Skip to content

Instantly share code, notes, and snippets.

@b1naryth1ef
Created July 8, 2011 03:43
Show Gist options
  • Save b1naryth1ef/1071094 to your computer and use it in GitHub Desktop.
Save b1naryth1ef/1071094 to your computer and use it in GitHub Desktop.
A randomly created random generator.
#Random! Optimized! YAY!
import random
seed = "123456789"
count = 1000000
def generate(seed2,count):
f = open("./random-"+str(count)+".txt", "w")
x = 0
y = None
while x < count:
rand = random.random()
rand2 = random.randint(1,999)
seed = int(seed2)
t1 = seed + rand
t2 = seed / 100
t3 = t1 + t2 * rand2
t4 = str(round(t3))
t5 = t4.replace('.0', '')
y = t5
write = str(y)
f.write(write)
x += 1
f.close
generate(seed,count)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment