Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 34 for Shuffle (0.25 sec)

  1. cmd/global-heal.go

    		if len(disks) < er.setDriveCount/2 {
    			return fmt.Errorf("not enough drives (found=%d, healing=%d, total=%d) are available to heal `%s`", len(disks), healing, er.setDriveCount, tracker.disk.String())
    		}
    
    		rand.Shuffle(len(disks), func(i, j int) {
    			disks[i], disks[j] = disks[j], disks[i]
    		})
    
    		expectedDisks := len(disks)/2 + 1
    		fallbackDisks := disks[expectedDisks:]
    		disks = disks[:expectedDisks]
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 26 06:32:14 GMT 2024
    - 15K bytes
    - Viewed (1)
  2. guava-tests/benchmark/com/google/common/base/EnumsBenchmark.java

          misses.add("INVALID");
        }
    
        List<String> sampleDataList = new ArrayList<>();
        sampleDataList.addAll(hits);
        sampleDataList.addAll(misses);
        Collections.shuffle(sampleDataList);
        sampleData = sampleDataList.toArray(new String[sampleDataList.size()]);
      }
    
      // Since we can't pass a concrete SomeEnum.class directly, we need to use a raw type.
      @SuppressWarnings("unchecked")
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 29.4K bytes
    - Viewed (0)
  3. android/guava-tests/benchmark/com/google/common/base/EnumsBenchmark.java

          misses.add("INVALID");
        }
    
        List<String> sampleDataList = new ArrayList<>();
        sampleDataList.addAll(hits);
        sampleDataList.addAll(misses);
        Collections.shuffle(sampleDataList);
        sampleData = sampleDataList.toArray(new String[sampleDataList.size()]);
      }
    
      // Since we can't pass a concrete SomeEnum.class directly, we need to use a raw type.
      @SuppressWarnings("unchecked")
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 29.4K bytes
    - Viewed (0)
  4. cmd/erasure.go

    			NextCycle: oldCache.Info.NextCycle,
    		},
    		Cache: make(map[string]dataUsageEntry, len(oldCache.Cache)),
    	}
    
    	// Put all buckets into channel.
    	bucketCh := make(chan BucketInfo, len(buckets))
    
    	// Shuffle buckets to ensure total randomness of buckets, being scanned.
    	// Otherwise same set of buckets get scanned across erasure sets always.
    	// at any given point in time. This allows different buckets to be scanned
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 26 06:32:14 GMT 2024
    - 16K bytes
    - Viewed (1)
  5. cmd/metacache-set.go

    		askDisks = len(disks) // use all available drives
    	}
    
    	// However many we ask, versions must exist on ~50%
    	listingQuorum := (askDisks + 1) / 2
    
    	if askDisks > 0 && len(disks) > askDisks {
    		rand.Shuffle(len(disks), func(i, j int) {
    			disks[i], disks[j] = disks[j], disks[i]
    		})
    		fallbackDisks = disks[askDisks:]
    		disks = disks[:askDisks]
    	}
    
    	// How to resolve results.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 17:59:08 GMT 2024
    - 30.4K bytes
    - Viewed (0)
  6. cmd/test-utils_test.go

    	if seed != -1 {
    		rand.Seed(seed)
    	}
    	return rand.Intn(max-min) + min
    }
    
    // Randomizes the order of bytes in the byte array
    // using Knuth Fisher-Yates shuffle algorithm.
    func randomizeBytes(s []byte, seed int64) []byte {
    	// special value -1 means no explicit seeding.
    	if seed != -1 {
    		rand.Seed(seed)
    	}
    	n := len(s)
    	var j int
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 17:26:51 GMT 2024
    - 76.2K bytes
    - Viewed (0)
  7. RELEASE.md

        *   `tf.data.Dataset.zip` now supports Python-style zipping, i.e. `Dataset.zip(a, b, c)`.
        * `tf.data.Dataset.shuffle` now supports `tf.data.UNKNOWN_CARDINALITY` When doing a "full shuffle" using  `dataset = dataset.shuffle(dataset.cardinality())`. But remember, a "full shuffle" will load the full dataset into memory so that it can be shuffled, so make sure to only use this with small datasets or datasets of small objects (like filenames).
    
    *   `tf.math`
    
    Plain Text
    - Registered: Tue May 07 12:40:20 GMT 2024
    - Last Modified: Mon Apr 29 19:17:57 GMT 2024
    - 727.7K bytes
    - Viewed (8)
  8. tests/migrate_test.go

    	. "gorm.io/gorm/utils/tests"
    )
    
    func TestMigrate(t *testing.T) {
    	allModels := []interface{}{&User{}, &Account{}, &Pet{}, &Company{}, &Toy{}, &Language{}, &Tools{}}
    	rand.Seed(time.Now().UnixNano())
    	rand.Shuffle(len(allModels), func(i, j int) { allModels[i], allModels[j] = allModels[j], allModels[i] })
    	DB.Migrator().DropTable("user_speaks", "user_friends", "ccc")
    
    	if err := DB.Migrator().DropTable(allModels...); err != nil {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 11:24:16 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  9. cmd/erasure-server-pool.go

    					askDisks = len(disks) // use all available drives
    				}
    
    				var fallbackDisks []StorageAPI
    				if askDisks > 0 && len(disks) > askDisks {
    					rand.Shuffle(len(disks), func(i, j int) {
    						disks[i], disks[j] = disks[j], disks[i]
    					})
    					fallbackDisks = disks[askDisks:]
    					disks = disks[:askDisks]
    				}
    
    				requestedVersions := 0
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 20:08:20 GMT 2024
    - 80.5K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/graph/AbstractStandardUndirectedGraphTest.java

            .inOrder();
      }
    
      /**
       * Populates the graph with nodes and edges in a star shape with node `1` in the middle.
       *
       * <p>Note that the edges are added in a shuffled order to properly test the effect of the
       * insertion order.
       */
      private void populateTShapedGraph() {
        putEdge(2, 1);
        putEdge(1, 4);
        putEdge(1, 3);
        putEdge(1, 2); // Duplicate
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12.9K bytes
    - Viewed (0)
Back to top