- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 630 for prand (1.27 sec)
-
staging/src/k8s.io/apimachinery/pkg/apis/meta/fuzzer/fuzzer.go
partLen := c.Rand.Intn(64) // len is [0, 63] if !canBeEmpty { partLen = c.Rand.Intn(63) + 1 // len is [1, 63] } runes := make([]rune, partLen) if partLen == 0 { return string(runes) } runes[0] = validStartEnd[c.Rand.Intn(len(validStartEnd))].choose(c.Rand) for i := range runes[1:] { runes[i+1] = validMiddle[c.Rand.Intn(len(validMiddle))].choose(c.Rand) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 03 15:12:26 UTC 2024 - 9.9K bytes - Viewed (0) -
internal/dsync/utils.go
package dsync import ( "math/rand" "time" ) func backoffWait(min, unit, cap time.Duration) func(*rand.Rand, uint) time.Duration { if unit > time.Hour { // Protect against integer overflow panic("unit cannot exceed one hour") } return func(r *rand.Rand, attempt uint) time.Duration { sleep := min sleep += unit * time.Duration(attempt)
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Sat May 13 15:42:21 UTC 2023 - 1.2K bytes - Viewed (0) -
src/crypto/rand/util.go
package rand import ( "crypto/internal/randutil" "errors" "io" "math/big" ) // Prime returns a number of the given bit length that is prime with high probability. // Prime will return error for any error returned by [rand.Read] or if bits < 2. func Prime(rand io.Reader, bits int) (*big.Int, error) { if bits < 2 { return nil, errors.New("crypto/rand: prime size must be at least 2-bit") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 17:09:47 UTC 2023 - 2.4K bytes - Viewed (0) -
src/crypto/tls/generate_cert.go
case "": if *ed25519Key { _, priv, err = ed25519.GenerateKey(rand.Reader) } else { priv, err = rsa.GenerateKey(rand.Reader, *rsaBits) } case "P224": priv, err = ecdsa.GenerateKey(elliptic.P224(), rand.Reader) case "P256": priv, err = ecdsa.GenerateKey(elliptic.P256(), rand.Reader) case "P384": priv, err = ecdsa.GenerateKey(elliptic.P384(), rand.Reader) case "P521":
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 08 15:22:02 UTC 2022 - 4.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/gen_test.go
// genPL creates a valid PriorityLevelConfiguration with the given // name and randomly generated spec. The given name must not be one // of the mandatory ones. func genPL(rng *rand.Rand, name string) *flowcontrol.PriorityLevelConfiguration { plc := &flowcontrol.PriorityLevelConfiguration{ ObjectMeta: metav1.ObjectMeta{Name: name}, Spec: flowcontrol.PriorityLevelConfigurationSpec{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Oct 30 12:18:40 UTC 2023 - 24.8K bytes - Viewed (0) -
src/crypto/internal/edwards25519/field/fe_test.go
} ) func generateWeirdFieldElement(rand *mathrand.Rand) Element { return Element{ weirdLimbs52[rand.Intn(len(weirdLimbs52))], weirdLimbs51[rand.Intn(len(weirdLimbs51))], weirdLimbs51[rand.Intn(len(weirdLimbs51))], weirdLimbs51[rand.Intn(len(weirdLimbs51))], weirdLimbs51[rand.Intn(len(weirdLimbs51))], } } func (Element) Generate(rand *mathrand.Rand, size int) reflect.Value { if rand.Intn(2) == 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 28 17:26:17 UTC 2023 - 13.9K bytes - Viewed (0) -
src/compress/flate/testdata/huffman-rand-limit.wb.expect
Klaus Post <******@****.***> 1457448890 +0100
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 11 17:40:52 UTC 2016 - 186 bytes - Viewed (0) -
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)