Created
February 12, 2016 16:49
-
-
Save danared/cae6e85a861bd988b5eb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def load_data(collection, n=100): | |
#for each element we will insert the `i` value | |
for i in xrange(n): | |
name = ''.join(random.sample( string.letters, 20)) | |
collection.insert( {'name': name, 'i': i}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment