Enable shuffle mode
170794
def enable_shuffle(self, value=None):
        
        if value is None:
            value = not self.shuffled
        spotifyconnect.Error.maybe_raise(lib.SpPlaybackEnableShuffle(value))
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);
        }
    }
62685
function shuffle(data) {
    // Convert the string to an array
    var content = (typeof data === 'string' ? data.split('') : data);

    // Perform the shuffle on the array
    for (var length = content.length - 1; length > 0; length--) {
      var index = Math.floor(Math.random() * (length + 1));
      var temp = content[length];
      content[length] = content[index];
      content[index] = temp;
    }

    return content.join('');
  }
1224971
protected function _shuffle()
	{
		$keys = array_keys($this->_tagsArray);
		shuffle($keys);
		if (count($keys) && is_array($keys)) {
			$tmpArray = $this->_tagsArray;
			$this->_tagsArray = array();
			foreach ($keys as $key => $value)
				$this->_tagsArray[$value] = $tmpArray[$value];
		}
		return $this->_tagsArray;
	}
862951
private void handleShuffleState(final Request request) {

		String json = request.getParameter(SHUFFLE_REQUEST_KEY);
		if (Util.empty(json)) {
			return;
		}

		// New
		TreeItemIdNode newTree;
		try {
			newTree = TreeItemUtil.convertJsonToTree(json);
		} catch (Exception e) {
			LOG.warn("Could not parse JSON for shuffle tree items. " + e.getMessage());
			return;
		}

		// Current
		TreeItemIdNode currentTree = getCustomTree();

		boolean changed = !TreeItemUtil.isTreeSame(newTree, currentTree);

		if (changed) {
			setCustomTree(newTree);
			// Run the shuffle action (if set)
			final Action action = getShuffleAction();
			if (action != null) {
				final ActionEvent event = new ActionEvent(this, "shuffle");
				Runnable later = new Runnable() {
					@Override
					public void run() {
						action.execute(event);
					}
				};
				invokeLater(later);
			}
		}
	}
277069
private static void showHelp()
	{
		Log.info("java -jar ./javamod [-rx] [-b{8,16,24}] [-s{+,-}] [-i{+,-}] [-w{+,-}] [-n{+,-}] [-m{+,-}] [-l{+,-}] [-h{+,-}] [-j{+,-}] [-v0.0-1.0]");
		Log.info("                    [-eWAVFILE] MODFILE\n");
		Log.info("-rx        : use Samplerate x (8000/11025/22050/44100/96000...");
		Log.info("                               anything allowed, your soundhardware supports)");
		Log.info("-b8/16/24  : #Bits per sample");
		Log.info("-s+/-      : Stereo/Mono");
		Log.info("-i0/1/2/3  : interpolation: 0:none; 1:linear; 2:cubic spline; 3:fir interpolation");
		Log.info("-tms       : ms of buffer size (30 is minimum)");
		Log.info("-w+/-      : do/don't wide stereo mix");
		Log.info("-n+/-      : do/don't noise reduction");
		Log.info("-m+/-      : do/don't mega bass");
		Log.info("-l0/1/2    : set infinit loop handling: 0:original; 1:fade out; 2:ignore");
		Log.info("-h+/-      : do/don't shuffle playlists after loading");
		Log.info("-j+/-      : do/don't repeat playlist");
		Log.info("-v0.0-1.0  : set volume");
		Log.info("-eWAVEFILE : export to wave file");
	}
1123745
def shuffle(self):
        """"""
        info = self._get_command_info(CommandInfo_pb2.ChangeShuffleMode)
        return None if info is None else info.shuffleMode
1186088
def toggle_play_pause(self):
        """"""
        # Use Play/Pause button only for sources which support NETAUDIO
        if (self._state == STATE_PLAYING and
                self._input_func in self._netaudio_func_list):
            return self._pause()
        elif self._input_func in self._netaudio_func_list:
            return self._play()
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;
}
674378
def shuffle(self, times=1):
        
        for _ in xrange(times):
            random.shuffle(self.cards)
616907
function shuffleArray(arr) {
    for (var j, x, i = arr.length; i;
      j = Math.floor(Math.random() * i),
      x = arr[--i], arr[i] = arr[j],
      arr[j] = x) {}
    return arr;
  }
1155096
private static void shuffle(ArrayModifiableDBIDs ids, int ssize, int end, Random random) {
    ssize = ssize < end ? ssize : end; // Guard for choosing from tiny sets
    for(int i = 1; i < ssize; i++) {
      ids.swap(i - 1, i + random.nextInt(end - i));
    }
  }
1025169
public static void shuffle(int[] arr, Random rand) {
        int size = arr.length;
        for (int i = size; i > 1; i--) {
            int tmp = arr[i-1];
            int r = rand.nextInt(i);
            arr[i-1] = arr[r];
            arr[r] = tmp;
        }
    }
1034856
function shuffleSelf(array, size) {
      var index = -1,
          length = array.length,
          lastIndex = length - 1;

      size = size === undefined$1 ? length : size;
      while (++index < size) {
        var rand = baseRandom(index, lastIndex),
            value = array[rand];

        array[rand] = array[index];
        array[index] = value;
      }
      array.length = size;
      return array;
    }
296054
def enable_writes(self):
        """"""
        self.write_buffer = []
        self.flush_lock = threading.RLock()
        self.flush_thread = FlushThread(self.max_batch_time,
                                        self._flush_writes)
645710
def _shuffle(data, idx):
    """"""
    shuffle_data = []

    for idx_k, idx_v in data:
        shuffle_data.append((idx_k, mx.ndarray.array(idx_v.asnumpy()[idx], idx_v.context)))

    return shuffle_data
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;
        }
    }
}