i n d e x <--backnotes on projects by m.d.categories: arctic | art | biology | book | compile | crypto | cryptoart | debian | entropy | funk |
game | ghostradio | hades | informationtheorie | internet | laser | linux | linuxaudio | logic | machinelearning |
math | movie | neuralnetworks | noise | nonhuman | notes | particlephysics | physics | radio | radioactive |
renameseq | rng | softwaredefinedradio | sound | tools | underinfluence | vlf | xterm |
search:
watch -n .1 cat /proc/sys/kernel/random/entropy_avail
##rng
##entropy
##linux
Nate Silver
The Signal and the Noise: The Art and Science of Prediction
##noise ##math ##entropymaex@:~/ghostradio/code$ more ghostradio.py import numpy as np import cv2 import os, sys, struct, shutil, time print "configuring video dev" # 1 = composite 0 = tuner usw os.system("v4l2-ctl -i 1") cap = cv2.VideoCapture(0) #resolution ret = cap.set(3,720) ret = cap.set(4,576) timestr = time.strftime("%Y%m%d-%H%M%S") grname = "gr-random-bin"+timestr fd = os.open(grname,os.O_RDWR|os.O_CREAT) while(True): # Capture frame-by-frame ret, frame = cap.read() # Our operations on the frame come here gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) for x in xrange(1, 12): # zeilen anzahl und position 1 = start 2 =laenge (bei 640x480 ist das theoretisch 1, 479) for y in xrange(1, 18): # scanrange 1 start 2 ende (zb fuer 640x480 ist das dann 1, 640) output = gray[x, y] # output = bin(gray[x ,y])[2:].zfill(8) # print bin(gray[x ,y])[2:].zfill(8) output = chr(output) os.write(fd, output) # change to this to write down numbers: # output = str(output) # os.write(fd, output+';') # Display the resulting frame cv2.imshow('frame',gray) if cv2.waitKey(1) & 0xFF == ord('q'): break #checking filesize > 2gb close file open new filename+timestamp statinfo = os.stat(grname) b = statinfo.st_size b = ((b /1024)/1024) if b > 2000: os.close(fd) shutil.move('gr-random-bin'+timestr,'random') timestr = time.strftime("%Y%m%d-%H%M%S") grname = "gr-random-bin"+timestr fd = os.open("gr-random-bin"+timestr,os.O_RDWR|os.O_CREAT) # When everything done, release the capture os.close(fd) cap.release() cv2.destroyAllWindows() maex@:~/ghostradio/code$##ghostradio ##linux ##entropy ##cryptoart
www.cypherpunks.to/~peter/06_random.pdfhttp://www.linuxfromscratch.org/hints/downloads/files/entropy.txt the best random number generators use radioactive decay as an entropy source