Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 630 for prand (2.62 sec)

  1. pkg/ctrlz/assets/templates/modules/header.html

    {{ define "header" }}
    <header>
        <nav class="navbar navbar-expand-xs navbar-dark fixed-top bg-dark justify-content-between">
            <a class="navbar-brand" href="/">
                <span class="logo">
                    <svg viewBox="0 0 300 300">
                        <circle cx="150" cy="150" r="150" stroke-width="2" />
                        <polygon points="65,240 225,240 125,270"/>
                        <polygon points="65,230 125,220 125,110"/>
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 682 bytes
    - Viewed (0)
  2. src/math/big/gcd_test.go

    // This file implements a GCD benchmark.
    // Usage: go test math/big -test.bench GCD
    
    package big
    
    import (
    	"math/rand"
    	"testing"
    )
    
    // randInt returns a pseudo-random Int in the range [1<<(size-1), (1<<size) - 1]
    func randInt(r *rand.Rand, size uint) *Int {
    	n := new(Int).Lsh(intOne, size-1)
    	x := new(Int).Rand(r, n)
    	return x.Add(x, n) // make sure result > 1<<(size-1)
    }
    
    func runGCD(b *testing.B, aSize, bSize uint) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 14 19:11:43 UTC 2016
    - 2.2K bytes
    - Viewed (0)
  3. src/crypto/rand/example_test.go

    // license that can be found in the LICENSE file.
    
    package rand_test
    
    import (
    	"bytes"
    	"crypto/rand"
    	"fmt"
    )
    
    // This example reads 10 cryptographically secure pseudorandom numbers from
    // rand.Reader and writes them to a byte slice.
    func ExampleRead() {
    	c := 10
    	b := make([]byte, c)
    	_, err := rand.Read(b)
    	if err != nil {
    		fmt.Println("error:", err)
    		return
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 23:34:33 UTC 2016
    - 621 bytes
    - Viewed (0)
  4. src/crypto/ecdsa/example_test.go

    package ecdsa_test
    
    import (
    	"crypto/ecdsa"
    	"crypto/elliptic"
    	"crypto/rand"
    	"crypto/sha256"
    	"fmt"
    )
    
    func Example() {
    	privateKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
    	if err != nil {
    		panic(err)
    	}
    
    	msg := "hello, world"
    	hash := sha256.Sum256([]byte(msg))
    
    	sig, err := ecdsa.SignASN1(rand.Reader, privateKey, hash[:])
    	if err != nil {
    		panic(err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 21 19:38:55 UTC 2020
    - 686 bytes
    - Viewed (0)
  5. src/crypto/ecdsa/ecdsa.go

    		return generateNISTEC(p224(), rand)
    	case elliptic.P256().Params():
    		return generateNISTEC(p256(), rand)
    	case elliptic.P384().Params():
    		return generateNISTEC(p384(), rand)
    	case elliptic.P521().Params():
    		return generateNISTEC(p521(), rand)
    	default:
    		return generateLegacy(c, rand)
    	}
    }
    
    func generateNISTEC[Point nistPoint[Point]](c *nistCurve[Point], rand io.Reader) (*PrivateKey, error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/pkg/util/cache/expiring_test.go

    	}
    
    	b.ResetTimer()
    
    	b.SetParallelism(256)
    	b.RunParallel(func(pb *testing.PB) {
    		rand := rand.New(rand.NewSource(rand.Int63()))
    		for pb.Next() {
    			i := rand.Int31()
    			key := keys[i%numKeys]
    			_, ok := cache.Get(key)
    			if ok {
    				// compare lower bits of sampled i to decide whether we should evict.
    				if rand.Float64() < prob {
    					cache.Delete(key)
    				}
    			} else {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 22 15:51:23 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  7. test/ken/modconst.go

    // license that can be found in the LICENSE file.
    
    // Test integer modulus by constants.
    
    package main
    
    import "math/rand"
    
    const Count = 1e5
    
    func i64rand() int64 {
    	for {
    		a := int64(rand.Uint32())
    		a = (a << 32) | int64(rand.Uint32())
    		a >>= uint(rand.Intn(64))
    		if -a != a {
    			return a
    		}
    	}
    	return 0 // impossible
    }
    
    func i64test(a, b, c int64) {
    	d := a % c
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Sep 08 17:28:20 UTC 2019
    - 9.2K bytes
    - Viewed (0)
  8. pkg/registry/core/service/allocator/bitmap.go

    // scans forward looking for the next available address (it will wrap the range if
    // necessary).
    type randomScanStrategy struct {
    	rand *rand.Rand
    }
    
    func (rss randomScanStrategy) AllocateBit(allocated *big.Int, max, count int) (int, bool) {
    	if count >= max {
    		return 0, false
    	}
    	offset := rss.rand.Intn(max)
    	for i := 0; i < max; i++ {
    		at := (offset + i) % max
    		if allocated.Bit(at) == 0 {
    			return at, true
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 25 20:32:40 UTC 2023
    - 7.6K bytes
    - Viewed (0)
  9. cmd/metacache-entries_test.go

    data/huffman-pi.wb.expect-noinput", "src/compress/flate/testdata/huffman-rand-1k.dyn.expect", "src/compress/flate/testdata/huffman-rand-1k.dyn.expect-noinput", "src/compress/flate/testdata/huffman-rand-1k.golden", "src/compress/flate/testdata/huffman-rand-1k.in", "src/compress/flate/testdata/huffman-rand-1k.wb.expect", "src/compress/flate/testdata/huffman-rand-1k.wb.expect-noinput", "src/compress/flate/testdata/huffman-rand-limit.dyn.expect", "src/compress/flate/testdata/huffman-rand-limit.dyn.expect-noinput",...
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sun Jan 02 17:15:06 UTC 2022
    - 31.6K bytes
    - Viewed (0)
  10. cmd/erasure-common.go

    package cmd
    
    import (
    	"context"
    	"fmt"
    	"io"
    	"math/rand"
    	"sync"
    	"time"
    
    	"github.com/minio/pkg/v3/sync/errgroup"
    )
    
    func (er erasureObjects) getOnlineDisks() (newDisks []StorageAPI) {
    	disks := er.getDisks()
    	var wg sync.WaitGroup
    	var mu sync.Mutex
    	r := rand.New(rand.NewSource(time.Now().UnixNano()))
    	for _, i := range r.Perm(len(disks)) {
    		i := i
    		wg.Add(1)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 4.6K bytes
    - Viewed (0)
Back to top