80e4f15860b6b002f2dd3f420eaeff63e202eb2f,numerapi/numerapi.py,NumerAPI,upload_predictions,#NumerAPI#Any#,375
Before Change
sub_res = requests.post(sub_url, data=sub_data, headers=headers)
sub_res.raise_for_status()
return True
After Change
}
}
"""
variable = {"filename": os.path.basename(file_path)}
submission_resp = self._call(auth_query, variable, authorization=True)
submission_auth = submission_resp["data"]["submission_upload_auth"]
file_object = open(file_path, "rb").read()
requests.put(submission_auth["url"], data=file_object)
create_query = \
"""
mutation($filename: String!) {
create_submission(filename: $filename) {
id
}
}
"""
variables = {"filename": submission_auth["filename"]}
create = self._call(create_query, variables, authorization=True)
self.submission_id = create["data"]["create_submission"]["id"]
return self.submission_id
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: uuazed/numerapi
Commit Name: 80e4f15860b6b002f2dd3f420eaeff63e202eb2f
Time: 2017-11-18
Author: wolfgang@steitz.me
File Name: numerapi/numerapi.py
Class Name: NumerAPI
Method Name: upload_predictions
Project Name: bjherger/ResumeParser
Commit Name: e08fcab00157590859a9a19bd483825e9ba75c18
Time: 2019-03-29
Author: 13herger@gmail.com
File Name: bin/lib.py
Class Name:
Method Name: convert_pdf
Project Name: p2irc/deepplantphenomics
Commit Name: 671c9bc03b942a267a23d72295ea15d55634d548
Time: 2020-02-06
Author: dbl599@mail.usask.ca
File Name: deepplantphenomics/heatmap_object_counting_model.py
Class Name: HeatmapObjectCountingModel
Method Name: __labels_to_heatmaps