- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 717 for srand (0.04 sec)
-
pkg/apis/apps/fuzzer/fuzzer.go
j.Type = strategyTypes[c.Rand.Intn(len(strategyTypes))] if j.Type != apps.RollingUpdateDeploymentStrategyType { j.RollingUpdate = nil } else { rollingUpdate := apps.RollingUpdateDeployment{} if c.RandBool() { rollingUpdate.MaxUnavailable = intstr.FromInt32(c.Rand.Int31()) rollingUpdate.MaxSurge = intstr.FromInt32(c.Rand.Int31()) } else {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 01 07:16:15 UTC 2023 - 5.2K bytes - Viewed (0) -
test/ken/divconst.go
// license that can be found in the LICENSE file. // Test integer division 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: Fri Feb 24 05:24:24 UTC 2012 - 9.2K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/testing/eventclock/fake.go
// uniformly at random from the interval [T, T+fuzz]; the upper // bound is exclusive iff fuzz is non-zero. fuzz time.Duration // rand is the random number generator to use in fuzzing rand *rand.Rand } var _ eventclock.Interface = &Fake{} type eventWaiterHeap []eventWaiter var _ heap.Interface = (*eventWaiterHeap)(nil) type eventWaiter struct {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Dec 18 04:27:38 UTC 2022 - 7.9K bytes - Viewed (0) -
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) -
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) -
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) -
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) -
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) -
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) -
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)