Skip to content

Instantly share code, notes, and snippets.

@JustAyush
Created June 25, 2019 15:16
Show Gist options
  • Save JustAyush/3982a5b8bf62a801923b9306b60d57c0 to your computer and use it in GitHub Desktop.
Save JustAyush/3982a5b8bf62a801923b9306b60d57c0 to your computer and use it in GitHub Desktop.
# date is hardcoded. Please fix that
x=mydb['bookDataset'].aggregate([{"$match":{"date_added":{"$gt":datetime.datetime(2019, 6, 21, 8, 25,50)}}},{"$project":{"_id":0,"ISBN":1}}])
data=list(x)
print(data)
for i in data:
interaction_matrix_pickle[i['ISBN']]=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment