How to use the randomgen.SeedSequence function in randomgen

To help you get started, we’ve selected a few randomgen examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bashtage / randomgen / tools / practrand-driver.py View on Github external
def seed_sequence_state(bit_generator, n_streams=2, entropy=None):
    bitgen = getattr(rg, bit_generator)
    seed_seq = rg.SeedSequence(entropy)
    children = seed_seq.spawn(n_streams)
    return [bitgen(child) for child in children]