Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 660 for randPod (0.31 sec)

  1. android/guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java

        hasher.putChar((char) 0x0201);
        hasher.assertBytes(new byte[] {1, 2});
      }
    
      public void testString() {
        Random random = new Random();
        for (int i = 0; i < 100; i++) {
          byte[] bytes = new byte[64];
          random.nextBytes(bytes);
          String s = new String(bytes, UTF_16LE); // so all random strings are valid
          assertEquals(
              new TestHasher().putUnencodedChars(s).hash(),
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/http2/HuffmanTest.kt

        val s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
        for (i in s.indices) {
          assertRoundTrip(s.substring(0, i).encodeUtf8())
        }
        val random = Random(123456789L)
        val buf = ByteArray(4096)
        random.nextBytes(buf)
        assertRoundTrip(buf.toByteString())
      }
    
      private fun assertRoundTrip(data: ByteString) {
        val encodeBuffer = Buffer()
        encode(data, encodeBuffer)
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Thu Jan 04 05:32:07 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/python/representative_dataset_test.py

            }
            for sample in samples
        ]
    
        # Extend the representative dataset with np.ndarrays.
        repr_ds.extend([
            {'tensor_key': np.random.uniform(low=-1.0, high=1.0, size=(3, 3))}
            for _ in range(4)
        ])
    
        random.shuffle(repr_ds)
    
        with self.session() as sess:
          new_repr_ds = repr_dataset.replace_tensors_by_numpy_ndarrays(
              repr_ds, sess
          )
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jan 04 07:35:19 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/AtomicLongMapBasherTest.java

     *
     * @author mike nonemacher
     */
    @J2ktIncompatible // threads
    @GwtIncompatible // threads
    public class AtomicLongMapBasherTest extends TestCase {
      private final Random random = new Random(301);
    
      public void testModify_basher() throws Exception {
        int nTasks = 3000;
        int nThreads = 100;
        final int getsPerTask = 1000;
        final int deltaRange = 10000;
        final String key = "key";
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Feb 13 14:28:25 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  5. android/guava-tests/benchmark/com/google/common/io/CharStreamsCopyBenchmark.java

      public void setUp() {
        // precalculate some random strings of ascii characters.
        StringBuilder sb = new StringBuilder();
        Random random = new Random(0xdeadbeef); // for unpredictable but reproducible behavior
        sb.ensureCapacity(size);
        for (int k = 0; k < size; k++) {
          // [9-127) includes all ascii non-control characters
          sb.append((char) (random.nextInt(127 - 9) + 9));
        }
        data = sb.toString();
      }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 23 18:59:54 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/pkg/util/httpstream/wsstream/stream_test.go

    }
    
    func TestStreamPing(t *testing.T) {
    	input := "some random text"
    	r := NewReader(bytes.NewBuffer([]byte(input)), true, NewDefaultReaderProtocols())
    	r.SetIdleTimeout(time.Second)
    	err := expectWebSocketFrames(r, t, nil, [][]byte{
    		{},
    		[]byte(input),
    	})
    	if err != nil {
    		t.Fatal(err)
    	}
    }
    
    func TestStreamBase64(t *testing.T) {
    	input := "some random text"
    	encoded := base64.StdEncoding.EncodeToString([]byte(input))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 29 15:48:39 UTC 2023
    - 7.4K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/ws/WebSocketWriterTest.kt

      private val serverWriter =
        WebSocketWriter(
          isClient = false,
          sink = data,
          random = random,
          perMessageDeflate = false,
          noContextTakeover = false,
          minimumDeflateSize = 0L,
        )
      private val clientWriter =
        WebSocketWriter(
          isClient = true,
          sink = data,
          random = random,
          perMessageDeflate = false,
          noContextTakeover = false,
          minimumDeflateSize = 0L,
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/ws/RealWebSocketTest.kt

      // zero effect on the behavior of the WebSocket API which is why tests are only written once
      // from the perspective of a single peer.
      private val random = Random(0)
      private val client2Server = Pipe(8192L)
      private val server2client = Pipe(8192L)
      private val taskFaker = TaskFaker()
      private val client = TestStreams(true, taskFaker, server2client, client2Server)
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Thu Apr 11 01:59:58 UTC 2024
    - 18.5K bytes
    - Viewed (0)
  9. internal/kms/secret-key.go

    	}
    	associatedData, err := req.AssociatedData.MarshalText()
    	if err != nil {
    		return DEK{}, err
    	}
    
    	const randSize = 28
    	random, err := sioutil.Random(randSize)
    	if err != nil {
    		return DEK{}, err
    	}
    	iv, nonce := random[:16], random[16:]
    
    	prf := hmac.New(sha256.New, s.key)
    	prf.Write(iv)
    	key := prf.Sum(make([]byte, 0, prf.Size()))
    
    	block, err := aes.NewCipher(key)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 07 23:55:37 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  10. src/internal/fuzz/mutator.go

    	var max int64
    	for {
    		max = 100
    		switch m.rand(2) {
    		case 0:
    			// Add a random number
    			if v >= maxValue {
    				continue
    			}
    			if v > 0 && maxValue-v < max {
    				// Don't let v exceed maxValue
    				max = maxValue - v
    			}
    			v += int64(1 + m.rand(int(max)))
    			return v
    		case 1:
    			// Subtract a random number
    			if v <= -maxValue {
    				continue
    			}
    			if v < 0 && maxValue+v < max {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 20:01:34 UTC 2023
    - 6.6K bytes
    - Viewed (0)
Back to top