Skip to content

A Linear Feed Shift Register Random Number Generator written in python

License

Notifications You must be signed in to change notification settings

hamolicious/LFSR-RNG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LFSR-RNG

A Linear Feed Shift Register Random Number Generator written in python. Was written after watching a very interesting video by Computerphile. In theory a usable random number generator but due to lack of speed and optimisations, you're probably better off using the built in random library 😄.

from lfsrrng import Generator

rng = Generator(seed=345667)
number = rng.range(0, 10)                         # generate a number between 0 and 10 (10 not included)
letter = rng.choice('abcdefghijklmnopqrstuvwxyz') # get a random element from an iterable

About

A Linear Feed Shift Register Random Number Generator written in python

Topics

Resources

License

Stars

Watchers

Forks

Languages