Skip to content

Instantly share code, notes, and snippets.

@danared
Created February 12, 2016 16:52
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 danared/64a2cb1ed039b4f2cc4e to your computer and use it in GitHub Desktop.
Save danared/64a2cb1ed039b4f2cc4e to your computer and use it in GitHub Desktop.
def load_data(collection, n=100):
#fixed number of marks
max_i = 10
for j,d in load_data_file(n):
d['i'] = random.randint(0, max_i)
collection.insert( d )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment