MCPcopy Index your code
hub / github.com/clips/pattern / shuffled

Function shuffled

pattern/vector/__init__.py:102–105  ·  view source on GitHub ↗

Yields a copy of the given list with the items in random order.

(list)

Source from the content-addressed store, hash-verified

100#--- LIST FUNCTIONS --------------------------------------------------------------------------------
101
102def shuffled(list):
103 """ Yields a copy of the given list with the items in random order.
104 """
105 return sorted(list, key=lambda x: random())
106
107def chunk(list, n):
108 """ Yields n successive equal-sized chunks from the given list.

Callers 4

06-svm.pyFile · 0.90
hierarchicalFunction · 0.85
testMethod · 0.85
K_fold_cross_validationFunction · 0.85

Calls 1

randomFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…