708274289d66d9265f7ded03e3445bc2bd70f46e,yellowbrick/download.py,,download_data,#,99

Before Change


            f.write(chunk)

    // If verify, compare the signature
    if signature is not None:
        dlsignature = sha256sum(dlpath)
        if signature != dlsignature:
            raise ValueError(
                "Download signature does not match hardcoded signature!"
            )

    // If extract, extract the zipfile.
    if extract:
        zf = zipfile.ZipFile(dlpath)
        zf.extractall(path)

After Change


        help="prevent new data from being downloaded",
    )
    parser.add_argument(
        "-f", "--overwrite", action="store_true", default=False,
        help="overwrite any existing data with new download",
    )
    parser.add_argument(
        "data_home", default=None, nargs="?",
        help="specify the data download location or set $YELLOWBRICK_DATA",
    )

    args = parser.parse_args()

    if args.cleanup:
        cleanup_all(data_home=args.data_home)

    if not args.no_download:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: DistrictDataLabs/yellowbrick
Commit Name: 708274289d66d9265f7ded03e3445bc2bd70f46e
Time: 2019-01-01
Author: benjamin@bengfort.com
File Name: yellowbrick/download.py
Class Name:
Method Name: download_data


Project Name: astroML/astroML
Commit Name: a1292078d2016dff4228fff869430ab4ace79b6b
Time: 2019-01-04
Author: bsipocz@gmail.com
File Name: astroML/datasets/sdss_corrected_spectra.py
Class Name:
Method Name: fetch_sdss_corrected_spectra


Project Name: astroML/astroML
Commit Name: 4227f7c2810a6fc48165311e19a4a6aaac38475e
Time: 2019-04-16
Author: bsipocz@gmail.com
File Name: astroML/datasets/sdss_specgals.py
Class Name:
Method Name: fetch_sdss_specgals