3bf5f2de89807642dcd1e030e45226ff3944779b,database_manager.py,DatabaseManager,get_everyone_elses_recent_submssions,#DatabaseManager#Any#Any#Any#,342
Before Change
"submission_id": {
"$first": "$_id"
},
"created": {
"$first": "$created"
}
}
}]
submissions = []
for submission in self.db.submissions.aggregate(pipeline):
if submission["username"] == username:
continue
submissions.append(submission)
return submissions
def get_filename(self, submission_id):
Get the filename that is used by S3 based on submission_id
After Change
if end_time is None:
end_time = datetime.datetime.utcnow()
cursor = self.postgres_db.cursor(cursor_factory=psycopg2.extras.RealDictCursor)
query = "SELECT id FROM submissions WHERE round_id = "{}" AND user_id != "{}" AND inserted_at < "{}" ORDER BY inserted_at DESC".format(round_id, user_id, end_time)
cursor.execute(query)
results = cursor.fetchall()
cursor.close()
return results
def get_date_created(self, submission_id):
Get the date create for a submission
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 10
Instances
Project Name: numerai/submission-criteria
Commit Name: 3bf5f2de89807642dcd1e030e45226ff3944779b
Time: 2017-11-10
Author: xander@numer.ai
File Name: database_manager.py
Class Name: DatabaseManager
Method Name: get_everyone_elses_recent_submssions
Project Name: numerai/submission-criteria
Commit Name: 3bf5f2de89807642dcd1e030e45226ff3944779b
Time: 2017-11-10
Author: xander@numer.ai
File Name: database_manager.py
Class Name: DatabaseManager
Method Name: get_everyone_elses_recent_submssions
Project Name: numerai/submission-criteria
Commit Name: 3bf5f2de89807642dcd1e030e45226ff3944779b
Time: 2017-11-10
Author: xander@numer.ai
File Name: database_manager.py
Class Name: DatabaseManager
Method Name: get_date_created
Project Name: numerai/submission-criteria
Commit Name: 3bf5f2de89807642dcd1e030e45226ff3944779b
Time: 2017-11-10
Author: xander@numer.ai
File Name: originality.py
Class Name:
Method Name: submission_originality