3bf5f2de89807642dcd1e030e45226ff3944779b,common.py,,get_filename,#Any#Any#,20
Before Change
def get_filename(db, submission_id):
submission = db.submissions.find_one({"_id": ObjectId(submission_id)})
fname = submission.get("filename", None)
user = submission.get("username", None)
if fname and user:
return "{}/{}".format(user, fname), fname
After Change
cursor.execute(query)
username = cursor.fetchone()[0]
cursor.close()
return "{}/{}".format(username, filename), filename
def download_submission(postgres_db, submission_id):
S3_BUCKET = os.environ.get("S3_UPLOAD_BUCKET", "numerai-production-uploads")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: numerai/submission-criteria
Commit Name: 3bf5f2de89807642dcd1e030e45226ff3944779b
Time: 2017-11-10
Author: xander@numer.ai
File Name: common.py
Class Name:
Method Name: get_filename
Project Name: cve-search/cve-search
Commit Name: df819ba6f40397e617090eb5d8cd20ac86571b71
Time: 2015-10-28
Author: pieterjan.moreels@gmail.com
File Name: sbin/db_ranking.py
Class Name:
Method Name: add
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