4227f7c2810a6fc48165311e19a4a6aaac38475e,astroML/datasets/sdss_specgals.py,,fetch_sdss_specgals,#,15

Before Change



    archive_file = os.path.join(data_home, os.path.basename(DATA_URL))

    if not os.path.exists(archive_file):
        if not download_if_missing:
            raise IOError("data not present on disk. "
                          "set download_if_missing=True to download")

        fitsdata = download_with_progress_bar(DATA_URL)
        open(archive_file, "wb").write(fitsdata)

    hdulist = fits.open(archive_file)
    return np.asarray(hdulist[1].data)

After Change



        for url, name in zip([DATA_URL1, DATA_URL2],
                             [archive_file1, archive_file2]):
            data = Table.read(url)
            data.write(name)

    data1 = Table.read(archive_file1)
    data2 = Table.read(archive_file2)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


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


Project Name: dit/dit
Commit Name: 03c767ba99ab2e46e97dc5c27a133fa2c3830aaa
Time: 2015-03-14
Author: ryangregoryjames@gmail.com
File Name: setup.py
Class Name:
Method Name: main


Project Name: daniellerch/aletheia
Commit Name: 1bcad437d2c1b57d582b893427bd53cd90eeafbf
Time: 2019-05-12
Author: dlerch@gmail.com
File Name: aletheia/feaext.py
Class Name:
Method Name: extract_features


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