https://github.com/hamolicious/lfsr-rng
A Linear Feed Shift Register Random Number Generator written in python
https://github.com/hamolicious/lfsr-rng
from-scratch lfsr python random-number-generators rng
Last synced: 7 months ago
JSON representation
A Linear Feed Shift Register Random Number Generator written in python
- Host: GitHub
- URL: https://github.com/hamolicious/lfsr-rng
- Owner: hamolicious
- License: wtfpl
- Created: 2021-10-11T21:17:58.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-02T14:43:36.000Z (over 3 years ago)
- Last Synced: 2025-01-07T05:26:04.121Z (9 months ago)
- Topics: from-scratch, lfsr, python, random-number-generators, rng
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LFSR-RNG
A Linear Feed Shift Register Random Number Generator written in python. Was written after watching a very interesting [video](https://www.youtube.com/watch?v=Ks1pw1X22y4&t=162s&ab_channel=Computerphile) 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 :smile:.```python
from lfsrrng import Generatorrng = 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
```