liveBook · Manning

Random seed

A random seed is an initial value or state that initializes or controls a pseudorandom process and determines its subsequent outputs.

How 2 Manning books explain it

Hacking Cryptography

A seed is an initial value supplied to a deterministic pseudorandom number generator to determine its starting state and resulting output sequence.

How it is used
Anchors deterministic PRNG and CSPRNG output, while supplying the security root for cryptographic random generation.
How deep it goes
Works from seed definition through LCG state recurrence, reproducible tests, parameter recovery, and CSPRNG state-machine transformations.
Examples
Uses seed 42 with C++ minstd_rand and a matching LCG test, then clones an LCG seeded from current time.
What you can do after
Operate/configure it by seeding CSPRNGs with TRNG output and periodically reseeding them for cryptographic use.

Read how Hacking Cryptography explains random seed →

Pandas Workout: 200 exercises to make you a stronger data analyst

A random seed is an initial value that determines the starting state of a pseudorandom-number generator.

How it is used
Uses a fixed generator starting point to make random exercise data reproducible and solutions comparable.
How deep it goes
Defines reproducibility and demonstrates it with repeated integer draws, without explaining pseudorandom-generation internals.
Examples
Uses np.random.default_rng(0) to generate identical arrays and seeded integers for a monthly Series.
What you can do after
Apply it via np.random.default_rng to reproduce generated NumPy arrays and pandas test data.

Read how Pandas Workout: 200 exercises to make you a stronger data analyst explains random seed →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.