Shuffle the data.
504382
def _shuffle_data(self):
        """"""
        # shuffle index
        np.random.shuffle(self.idx)
        # get the data by corresponding index
        self.data = _getdata_by_idx(self.data, self.idx)
        self.label = _getdata_by_idx(self.label, self.idx)
600884
def shuffle_columns( a ):
    """"""
    mask = range( a.text_size )
    random.shuffle( mask )
    for c in a.components:
        c.text = ''.join( [ c.text[i] for i in mask ] )
1060415
def sort_data(data, cols):
    """"""
    return data.sort_values(cols)[cols + ['value']].reset_index(drop=True)
754159
public static void shuffle(float[] floatArray) {
		int swapPlace = -1;

		for(int i = 0; i < floatArray.length; i++) {
            swapPlace = (int) (Math.random() * (floatArray.length - 1 ));
            TrivialSwap.swap(floatArray, i, swapPlace);
		}
	}
998626
private function shuffle()
    {
        if ($this->first) {
            $this->first = array_slice($this->words, 0, 8);
            $this->words = array_slice($this->words, 8);

            shuffle($this->words);

            $this->words = $this->first + $this->words;

            $this->first = false;
        } else {
            shuffle($this->words);
        }
    }
994971
function shuffleArray (options, arr) {
    if (!options.minify) { return undefined; }

    for (let i = 0, max = arr.length; i < max; i++) {
        let j = randomInt(max);

        if (arr[j] !== arr[i]) {
            let source = arr[i];

            arr[i] = arr[j];
            arr[j] = source;
        }
    }
}
59786
def repeat(self, repeat):
        """"""
        shuffle = self.shuffle
        self.play_mode = PLAY_MODE_BY_MEANING[(shuffle, repeat)]
615895
public void shuffleColumnValues(ArrayList<String> columns) throws Exception {
		doubleValues.clear();
		ArrayList<String> rows = this.getDataRows();
		for (String column : columns) { //shuffle all values in the column
			ArrayList<Integer> rowIndex = new ArrayList<Integer>();
			for (int i = 0; i < rows.size(); i++) {
				rowIndex.add(i);
			}
			Collections.shuffle(rowIndex);
			for (int i = 0; i < rows.size(); i++) {
				String row = rows.get(i);
				int randomIndex = rowIndex.get(i);
				String destinationRow = rows.get(randomIndex);


				String temp = this.getCell(destinationRow, column);
				String value = this.getCell(row, column);
				this.addCell(destinationRow, column, value);
				this.addCell(row, column, temp);
			}
		}

	}
939651
public void shuffleRowValues(ArrayList<String> rows) throws Exception {
		doubleValues.clear();
		ArrayList<String> columns = this.getColumns();
		for (String row : rows) {
			ArrayList<Integer> columnIndex = new ArrayList<Integer>();
			for (int i = 0; i < columns.size(); i++) {
				columnIndex.add(i);
			}
			Collections.shuffle(columnIndex);

			for (int i = 0; i < columns.size(); i++) {
				String column = columns.get(i);
				int randomIndex = columnIndex.get(i);
				String destinationCol = columns.get(randomIndex);

				String temp = this.getCell(row, destinationCol);
				String value = this.getCell(row, column);
				this.addCell(row, destinationCol, value);
				this.addCell(row, column, temp);
			}
		}

	}
1176726
public static void shuffle(double[] bstrap, int len, Random rnd) {
    int i = len;
    while(i > 0) {
      final int r = rnd.nextInt(i);
      --i;
      // Swap
      double tmp = bstrap[r];
      bstrap[r] = bstrap[i];
      bstrap[i] = tmp;
    }
  }
1262575
def combine_data(self, command2):
        """"""
        if command2 is None:
            return
        self._data = self._merge(command2._data, self._data)
216854
public void shuffle(long seed) {
        // just skip shuffle if there's only 1 example
        if (numExamples() < 2)
            return;

        //note here we use the same seed with different random objects guaranteeing same order

        List<INDArray> arrays = new ArrayList<>();
        List<int[]> dimensions = new ArrayList<>();

        arrays.add(getFeatures());
        dimensions.add(ArrayUtil.range(1, getFeatures().rank()));

        arrays.add(getLabels());
        dimensions.add(ArrayUtil.range(1, getLabels().rank()));

        if (featuresMask != null) {
            arrays.add(getFeaturesMaskArray());
            dimensions.add(ArrayUtil.range(1, getFeaturesMaskArray().rank()));
        }

        if (labelsMask != null) {
            arrays.add(getLabelsMaskArray());
            dimensions.add(ArrayUtil.range(1, getLabelsMaskArray().rank()));
        }

        Nd4j.shuffle(arrays, new Random(seed), dimensions);

        //As per CpuNDArrayFactory.shuffle(List<INDArray> arrays, Random rnd, List<int[]> dimensions) and libnd4j transforms.h shuffleKernelGeneric
        if (exampleMetaData != null) {
            int[] map = ArrayUtil.buildInterleavedVector(new Random(seed), numExamples());
            ArrayUtil.shuffleWithMap(exampleMetaData, map);
        }
    }
1005556
function shuffle(arr) {
    var source = void 0;
    if (!(0, _is.isArray)(arr)) {
        if ((0, _is.isLikeArray)(arr)) {
            source = toArray(arr);
        } else {
            throw new Error('arr should be array but got ' + (0, _is.whatIs)(arr));
        }
    } else {
        source = arr;
    }
    var temp = source.slice(0);
    for (var i = 0, l = arr.length; i < l; i++) {
        var n = (0, _math.randomInteger)(l - i - 1);
        arr[i] = temp.splice(n, 1)[0];
    }

    return arr;
}
1065916
def set_shuffle_on(self):
        """"""
        self.publish(
            action='set',
            resource='audioPlayback/config',
            publish_response=False,
            properties={'config': {'shuffleActive': True}}
        )
11350
function shuffle(v) {
  for (var j, x, i = v.length; i; j = parseInt(Math.random() * i), x = v[--i], v[i] = v[j], v[j] = x);
  return v;
}
948160
def reset(self):
        """"""
        # shuffle data
        if self.is_train:
            np.random.shuffle(self.idx)
            self.data = _shuffle(self.data, self.idx)
            self.label = _shuffle(self.label, self.idx)

        if self.last_batch_handle == 'roll_over' and self.cursor > self.num_data:
            self.cursor = -self.batch_size + (self.cursor % self.num_data) % self.batch_size
        else:
            self.cursor = -self.batch_size
980796
def shuffle(self, overwrite=False):
        

        if overwrite:
            shuffled = self.path
        else:
            shuffled = FileAPI.add_ext_name(self.path, "_shuffled")

        lines = open(self.path).readlines()
        random.shuffle(lines)
        open(shuffled, "w").writelines(lines)
        self.path = shuffled