Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 1,348 for rand_r (0.14 sec)

  1. internal/crypto/key_test.go

    	}
    }
    
    var generateKeyTests = []struct {
    	ExtKey     [32]byte
    	Random     io.Reader
    	ShouldPass bool
    }{
    	{ExtKey: [32]byte{}, Random: nil, ShouldPass: true},              // 0
    	{ExtKey: [32]byte{}, Random: rand.Reader, ShouldPass: true},      // 1
    	{ExtKey: [32]byte{}, Random: shortRandom(32), ShouldPass: true},  // 2
    	{ExtKey: [32]byte{}, Random: shortRandom(31), ShouldPass: false}, // 3
    }
    
    func TestGenerateKey(t *testing.T) {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Feb 02 00:13:57 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  2. platforms/software/dependency-management/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/resolveengine/excludes/simple/DefaultCompositeExcludeTest.groovy

        private static final Long SEED = Long.getLong("org.gradle.internal.test.excludes.seed", 58745094L)
        private static final int MAX_DEPTH = 3
        private static final int MAX_CACHED = 10_000
    
        private final Random random = new Random(SEED)
        private final Set<ExcludeSpec> cached = new HashSet<>()
        private final List<ExcludeSpec> cachedLinear = new ArrayList<>(MAX_CACHED)
        private int depth
    
        /**
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Oct 10 21:10:11 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  3. platforms/core-configuration/model-core/src/test/groovy/org/gradle/internal/reflect/validation/ValidationMessageCheckerTest.groovy

            when:
            render dummyValidationProblem('Foo', 'Bar', 'with some description', 'some reason')
    
            then:
            outputEquals """
    Type 'Foo' property 'Bar' with some description.
    
    Reason: Some reason.
    """
        }
    
        def "displays plugin id when available"() {
            when:
            render dummyValidationProblem {
                inPlugin 'com.foo.bar'
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 25.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tfr/examples/mnist/mnist_ops_test.py

    load_library.load_op_library(os.path.join(_lib_dir, _lib_name))
    
    
    class MnistOpsDefsTest(test_utils.OpsDefsTest):
    
      def test_new_conv2d_relu(self):
        input_ = tf.random.uniform([1, 4, 4, 1])
        filter_ = tf.random.uniform([2, 2, 1, 8])
        bias = tf.zeros([8])
        kwargs = {
            'input_': input_,
            'filter_': filter_,
            'bias': bias,
            'stride_w': 2,
            'stride_h': 2,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Sep 28 21:37:05 UTC 2021
    - 4K bytes
    - Viewed (0)
  5. android/guava-tests/benchmark/com/google/common/collect/MinMaxPriorityQueueBenchmark.java

      private Queue<Integer> queue;
    
      private final Random random = new Random();
    
      @BeforeExperiment
      void setUp() {
        queue = heap.create(comparator.get());
        for (int i = 0; i < size; i++) {
          queue.add(random.nextInt());
        }
      }
    
      @Benchmark
      void pollAndAdd(int reps) {
        for (int i = 0; i < reps; i++) {
          // TODO(kevinb): precompute random #s?
          queue.add(queue.poll() ^ random.nextInt());
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Apr 19 19:24:36 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/math/MathBenchmarking.java

    import java.math.BigInteger;
    import java.util.Random;
    
    /**
     * Utilities for benchmarks.
     *
     * <p>In many cases, we wish to vary the order of magnitude of the input as much as we want to vary
     * the input itself, so most methods which generate values use an exponential distribution varying
     * the order of magnitude of the generated values uniformly at random.
     *
     * @author Louis Wasserman
     */
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 4.1K bytes
    - Viewed (0)
  7. android/guava-tests/benchmark/com/google/common/cache/LoadingCacheSingleThreadBenchmark.java

      // tweak this to control hit rate
      @Param("2.5")
      double concentration;
    
      Random random = new Random();
    
      LoadingCache<Integer, Integer> cache;
    
      int max;
    
      static AtomicLong requests = new AtomicLong(0);
      static AtomicLong misses = new AtomicLong(0);
    
      @BeforeExperiment
      void setUp() {
        // random integers will be generated in this range, then raised to the
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 3.4K bytes
    - Viewed (0)
  8. analysis/analysis-api/src/org/jetbrains/kotlin/analysis/api/annotations/KtAnnotationValueRenderer.kt

    import org.jetbrains.kotlin.analysis.api.types.KaStarTypeProjection
    import org.jetbrains.kotlin.analysis.api.types.KaTypeArgumentWithVariance
    import org.jetbrains.kotlin.renderer.render
    
    internal object KaAnnotationValueRenderer {
        fun render(value: KaAnnotationValue): String = buildString {
            renderConstantValue(value)
        }
    
        private fun StringBuilder.renderConstantValue(value: KaAnnotationValue) {
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Tue Jun 11 15:45:42 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/math/MathBenchmarking.java

    import java.math.BigInteger;
    import java.util.Random;
    
    /**
     * Utilities for benchmarks.
     *
     * <p>In many cases, we wish to vary the order of magnitude of the input as much as we want to vary
     * the input itself, so most methods which generate values use an exponential distribution varying
     * the order of magnitude of the generated values uniformly at random.
     *
     * @author Louis Wasserman
     */
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 4.1K bytes
    - Viewed (0)
  10. analysis/analysis-api-impl-base/tests/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/components/testUtils.kt

                append(")")
                append(": ${returnType.render()}")
            }
            is KaValueParameterSymbol -> "${if (isVararg) "vararg " else ""}$name: ${returnType.render()}"
            is KaTypeParameterSymbol -> this.nameOrAnonymous.asString()
            is KaVariableSymbol -> "${if (isVal) "val" else "var"} $name: ${returnType.render()}"
            is KaClassLikeSymbol -> classId?.toString() ?: nameOrAnonymous.asString()
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Wed Jun 05 16:16:39 UTC 2024
    - 15.3K bytes
    - Viewed (0)
Back to top