Skip to content

Instantly share code, notes, and snippets.

@larsar
Created February 12, 2019 10:16
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 larsar/9907eba6d11b5c8bbd94e44041eaebc9 to your computer and use it in GitHub Desktop.
Save larsar/9907eba6d11b5c8bbd94e44041eaebc9 to your computer and use it in GitHub Desktop.
Generate unique invite codes formatted for print
python3 gen_invite_codes.py > all_codes.csv
sed 's/\([[:digit:]][[:digit:]][[:digit:]]\)\([[:digit:]][[:digit:]][[:digit:]]\)\([[:digit:]][[:digit:]][[:digit:]]\)/\1-\2-\3/' all_codes.csv > formatted_codes.csv
import random
print('\n'.join(str(i) for i in random.sample(range(111111111,999999999),1000000)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment