Created
June 26, 2014 10:41
-
-
Save klen/c603df48efda5b2525bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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