Skip to content

Instantly share code, notes, and snippets.

@aminamid
Created April 8, 2014 11:18
Show Gist options
  • Save aminamid/10111149 to your computer and use it in GitHub Desktop.
Save aminamid/10111149 to your computer and use it in GitHub Desktop.
1 line cassandra token generator
# tokengenerator (node#,num of node)
python -c 'print (lambda node,nodes: [ 2**127/nodes*x for x in xrange(nodes)][node-1])(1,5)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment