an rng that generates its numbers based off of a kitten livestream
Project description
Kitten RNG
What?
It's a wonderfully practical python module that generates random numbers based off a kitten livestream.
Installation
Make sure you have a 3.* version of python installed along with pip. Then you install via pip from pypi:
python -m pip install --upgrade kitten-rng
Usage
The Command Line Tool
To get a massive random number based off the kitten livestream:
python -m KRNG
The Module
To get a random number from the cat livestream:
from KRNG import RNGs
number = RNGs.KRN()
print(number)
To get a random number generator seeded with a Kitten Random Number (KRN):
from KRNG import RNGs
rng = RNGs.KPRNG()
print(rng.random())
Why?
So I was watching Tom Scott videos when I heard this. So, now I have created a tool that makes a random number based of a kitten livestream that can be found here. What a wonderfully practical invention.
How?
So I used pafy to get the url for the actual video file, and then fed that url into a cv2 VideoCapture and got the first frame (which I can do because pafy only gets a few frames of the livestream). Then I feed that data into a sha256 urllib hash function and convert that to a number.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for kitten_rng-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b274cd3afaea7c34d94b0967792906879493a8effac3dafc59fb877f37f76b00 |
|
MD5 | 64d736852b6a5bc768a0b05c275bd6c0 |
|
BLAKE2b-256 | 048b0a4178f7855062c4ab1b089d10ffdd91f5f81cf168aed63e616d6707e377 |