Skip to content

Instantly share code, notes, and snippets.

Created September 23, 2009 16:34
Show Gist options
  • Save anonymous/192102 to your computer and use it in GitHub Desktop.
Save anonymous/192102 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