aa1a4d85f30db26a7ef9d3c7dc7692bb00f7a5e5,examples/download.py,,download_data,#,43

Before Change



    response = requests.get(url)
    with open(os.path.join(path, name), "w") as f:
        f.write(response.content)


def download_all(path="data"):
    for href, name in (OCCUPANCY, CREDIT, CONCRETE):

After Change


    // Fetch the response in a streaming fashion and write it to disk.
    response = requests.get(url, stream=True)
    with open(dlpath, "wb") as f:
        for chunk in response.iter_content(65536):
            f.write(chunk)

    // If verify, compare the signature
    if signature is not None:
        dlsignature = sha256sum(dlpath)
        if signature != dlsignature:
            raise ValueError(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: DistrictDataLabs/yellowbrick
Commit Name: aa1a4d85f30db26a7ef9d3c7dc7692bb00f7a5e5
Time: 2016-10-13
Author: benjamin@bengfort.com
File Name: examples/download.py
Class Name:
Method Name: download_data


Project Name: comic/grand-challenge.org
Commit Name: 88bcc92216d20a060176b30470d5a38fd58cc198
Time: 2018-03-15
Author: jamesmeakin@gmail.com
File Name: app/tests/conftest.py
Class Name:
Method Name: evaluation_image


Project Name: comic/grand-challenge.org
Commit Name: 88bcc92216d20a060176b30470d5a38fd58cc198
Time: 2018-03-15
Author: jamesmeakin@gmail.com
File Name: app/tests/conftest.py
Class Name:
Method Name: alpine_images