mirror of
https://github.com/stevenrobertson/cuburn.git
synced 2025-02-05 03:30:05 -05:00
Another script update
This commit is contained in:
parent
91aa91a242
commit
b570435d1f
@ -1,6 +1,12 @@
|
||||
#!/usr/bin/python2
|
||||
|
||||
import os
|
||||
import sys
|
||||
import random
|
||||
|
||||
if len(sys.argv) > 1:
|
||||
random.seed(sys.argv[1])
|
||||
|
||||
edges = {}
|
||||
|
||||
for i in os.listdir('edges'):
|
||||
@ -12,11 +18,11 @@ seen = set()
|
||||
|
||||
src = random.choice(edges.keys())
|
||||
for i in range(1000):
|
||||
print src
|
||||
print 'edges/' + src
|
||||
dsts = edges.get(src, set()).difference(seen)
|
||||
if not dsts:
|
||||
src = random.choice(edges.keys())
|
||||
else:
|
||||
dst = random.choice(list(dsts))[1]
|
||||
print '='.join([src, dst])
|
||||
print 'edges/' + '='.join([src, dst])
|
||||
src = dst
|
||||
|
Loading…
Reference in New Issue
Block a user