Skip to content

Instantly share code, notes, and snippets.

@asenchi
Forked from anonymous/gist:192102
Created September 24, 2009 02:08
Show Gist options
  • Save asenchi/192457 to your computer and use it in GitHub Desktop.
Save asenchi/192457 to your computer and use it in GitHub Desktop.
import logging
import sys
if __name__ == "__main__":
if len(sys.argv) != 2:
print '%s <nodes>' % sys.argv[0]
sys.exit(1)
maxtokenvalue = 2**127
numberofnodes = int(sys.argv[1])
print 'Generating tokens for %d nodes, max token value is %d' % (numberofnodes, maxtokenvalue)
increment = maxtokenvalue / numberofnodes
currentvalue = 0
for i in xrange(0, numberofnodes):
print '%d' % currentvalue
currentvalue = currentvalue + increment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment