MCPcopy Create free account
hub / github.com/ActiveState/code / new

Method new

recipes/Python/578135_Markov_EncryptiModule/recipe-578135.py:20–25  ·  view source on GitHub ↗
(cls, chars_used, chain_size)

Source from the content-addressed store, hash-verified

18
19 @classmethod
20 def new(cls, chars_used, chain_size):
21 selection, blocks = list(set(chars_used)), []
22 for _ in range(chain_size):
23 _CHAOS.shuffle(selection)
24 blocks.append(''.join(selection))
25 return cls(tuple(blocks))
26
27 def __init__(self, data):
28 self.__test_data(data)

Callers 15

recipe-578390.pyFile · 0.45
recipe-578426.pyFile · 0.45
recipe-578356.pyFile · 0.45
recipe-578198.pyFile · 0.45
recipe-578386.pyFile · 0.45
recipe-578765.pyFile · 0.45
recipe-578533.pyFile · 0.45
recipe-578415.pyFile · 0.45
recipe-578616.pyFile · 0.45
auto_encryptFunction · 0.45
recipe-578585.pyFile · 0.45
make_contact_sheetFunction · 0.45

Calls 7

listClass · 0.85
rangeFunction · 0.85
setFunction · 0.50
clsClass · 0.50
shuffleMethod · 0.45
appendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected