Skip to content

Instantly share code, notes, and snippets.

@initbar
Created December 7, 2017 18:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save initbar/44e8249e28487fb99c96aba9c2176cbe to your computer and use it in GitHub Desktop.
Save initbar/44e8249e28487fb99c96aba9c2176cbe to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
from bashplotlib.histogram import plot_hist
from bashplotlib.scatterplot import plot_scatter
from os import urandom
import os
import time
if __name__ == '__main__':
try:
os.system('clear')
randomness = sorted(urandom(0xfffff*2))
s = dict([ (key, randomness.count(key))
for key in set(randomness) ])
# plot_hist(sorted(s.values()))
print sorted(s.keys())
# plot_scatter(sorted(s.values()))
except KeyboardInterrupt: pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment