80e4f15860b6b002f2dd3f420eaeff63e202eb2f,numerapi/numerapi.py,NumerAPI,upload_predictions,#NumerAPI#Any#,375

Before Change


        competition_id = competition["_id"]

        // open file
        with open(file_path, "rb") as fp:
            // upload file
            file_res = requests.Request("PUT", signed_url, data=fp.read())
            prepared_file_res = file_res.prepare()
            req_session = requests.Session()
            res_prepped = req_session.send(prepared_file_res)
            res_prepped.raise_for_status()

        // get submission URL
        sub_url = self.__get_url("submissions")
        // construct submission data
        sub_data = {
            "competition_id": competition_id,

After Change


        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) {
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

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: dmlc/gluon-nlp
Commit Name: 090944e816fd3ff8e861fba4452851e0a901491d
Time: 2019-01-28
Author: linhaibin.eric@gmail.com
File Name: scripts/language_model/large_word_language_model.py
Class Name:
Method Name: train


Project Name: Featuretools/featuretools
Commit Name: 7d9da1533a6cb7f81dc9feb521c44834c033c530
Time: 2019-09-03
Author: kmax12@gmail.com
File Name: featuretools/utils/gen_utils.py
Class Name:
Method Name: use_s3fs_es