Skip to content

Instantly share code, notes, and snippets.

@usami
Created September 15, 2013 22:17
Show Gist options
  • Save usami/6574795 to your computer and use it in GitHub Desktop.
Save usami/6574795 to your computer and use it in GitHub Desktop.
#! /usr/bin/python
import sys
if (len(sys.argv) > 1):
num=int(sys.argv[1])
else:
num=int(raw_input("How many nodes are in your cluster? "))
for i in range(0, num):
print 'token %d: %d' % (i, (i*(2**127)/num))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment