80e4f15860b6b002f2dd3f420eaeff63e202eb2f,numerapi/numerapi.py,NumerAPI,upload_predictions,#NumerAPI#Any#,375
Before Change
// send file request
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: 3
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: VOLTTRON/volttron
Commit Name: f4560aadbf6ff350e916a934b02e60c9292101a4
Time: 2020-06-02
Author: james.larson@pnnl.gov
File Name: services/core/MasterDriverAgent/master_driver/interfaces/ecobee.py
Class Name:
Method Name: call_grequest
Project Name: VOLTTRON/volttron
Commit Name: 44ec9da9fb71f81f2d50d4df359f73c4434fb614
Time: 2020-06-22
Author: james.larson@pnnl.gov
File Name: services/core/MasterDriverAgent/master_driver/interfaces/ecobee.py
Class Name:
Method Name: call_grequest