Skip to content

Instantly share code, notes, and snippets.

@alq666
Created February 6, 2011 20:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alq666/813704 to your computer and use it in GitHub Desktop.
Save alq666/813704 to your computer and use it in GitHub Desktop.
>>> RING_SIZE = 2**127
>>> def tokens(n):
... rv = []
... for x in xrange(n):
... rv.append(RING_SIZE / n * x)
... return rv
...
>>> tokens(4)
[0L, 42535295865117307932921825928971026432L, 85070591730234615865843651857942052864L, 127605887595351923798765477786913079296L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment