0623dec2766eadc857ad3325d1359e8624b9913a,numerapi.py,NumerAPI,get_current_competition,#NumerAPI#,64

Before Change



    def get_current_competition(self):
        now = datetime.now()
        tdelta = timedelta(microseconds=55296e5)
        dt = now - tdelta
        dt_str = dt.strftime("%Y-%m-%dT%H:%M:%S.%fZ")

        url = "https://api.numer.ai/competitions?{ leaderboard :"
        url += " current , end_date :{ $gt : %s }}"
        r = requests.get((url % (dt_str)).replace(" ", "%22"))
        if r.status_code!=200:
            return (None, None, r.status_code)

After Change



    def get_current_competition(self):
        now = datetime.now()
        leaderboard, status_code = self.get_leaderboard()
        if status_code!=200:
            return (None, None, None, None, status_code)

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: uuazed/numerapi
Commit Name: 0623dec2766eadc857ad3325d1359e8624b9913a
Time: 2016-12-14
Author: atreichel@users.noreply.github.com
File Name: numerapi.py
Class Name: NumerAPI
Method Name: get_current_competition


Project Name: comic/grand-challenge.org
Commit Name: 53ee9b69f9e9c44f654e6ce604c57f58a987f749
Time: 2018-02-22
Author: jamesmeakin@gmail.com
File Name: app/evaluation/views.py
Class Name: SubmissionCreate
Method Name: get_context_data


Project Name: facebook/FAI-PEP
Commit Name: c8348762e9c5f122d43e3cb26bd61d49397f0264
Time: 2018-03-26
Author: feisun@fb.com
File Name: benchmarking/repo_driver.py
Class Name: ExecutablesBuilder
Method Name: _getControlCommit