Skip to content

Instantly share code, notes, and snippets.

@klen
Created June 26, 2014 10:41
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 klen/c603df48efda5b2525bc to your computer and use it in GitHub Desktop.
Save klen/c603df48efda5b2525bc to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import random
from json import dump
def get_matrix_value():
return random.randint(10000, 99999)
def main():
matrix = dict(
(str(x), v) for x in range(50) for v in [dict((str(a), get_matrix_value()) for a in range(50))]
)
with open('test', 'w') as f:
dump(matrix, f)
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment