Skip to content

Instantly share code, notes, and snippets.

@edwinb-ai
Created February 25, 2020 18:30
Show Gist options
  • Save edwinb-ai/b8604536772d9ef1b9917776e4b97db8 to your computer and use it in GitHub Desktop.
Save edwinb-ai/b8604536772d9ef1b9917776e4b97db8 to your computer and use it in GitHub Desktop.
Obtain a truly random seed from the system by using random files and entropy.
import os
import sys
def some_seed():
seed = int.from_bytes(os.urandom(7), sys.byteorder)
return seed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment