7e82e78da1ac7d6f4e381ba3819418cd546604eb,python/magent/utility.py,,download_file,#Any#Any#,206

Before Change


    print("Download %s from %s..." % (filename, url))

    file = urllib2.urlopen(url)
    with open(filename, "wb") as fout:
        fout.write(file.read())

    // os.system("wget -O %s "%s"" % (filename, url))

    print("download done!")


def download_model(url):

After Change


    //with open(filename, "wb") as fout:
    //    fout.write(file.read())
    if platform.system() == "Darwin":
        os.system("curl -O %s "%s"" % (filename, url))
    else:
        os.system("wget -O %s "%s"" % (filename, url))

    print("download done!")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: geek-ai/MAgent
Commit Name: 7e82e78da1ac7d6f4e381ba3819418cd546604eb
Time: 2017-12-01
Author: kipsora@gmail.com
File Name: python/magent/utility.py
Class Name:
Method Name: download_file


Project Name: streamlit/streamlit
Commit Name: 8328c47f9ac4aac0801a65f949476fea8c0f5271
Time: 2018-10-12
Author: thiagot@gmail.com
File Name: examples/run_on_save.py
Class Name:
Method Name:


Project Name: streamlit/streamlit
Commit Name: c3ef7a43acd931ea2b354b2e6c04d340d2de3a29
Time: 2018-10-12
Author: thiagot@gmail.com
File Name: examples/run_on_save.py
Class Name:
Method Name: