e17791b533f7646674f357a90785eeb0fdefeb66,textacy/corpora/bernie_and_hillary.py,,fetch_bernie_and_hillary,#Any#Any#Any#,42

Before Change


        list(dict)
    
    fname = os.path.join(data_dir, FNAME)
    if not os.path.exists(fname):
        if download_if_missing is True:
            download_bernie_and_hillary(data_dir=data_dir)
        else:
            logger.error("unable to load corpus from %s", fname)
            return

    data = list(read_json_lines(fname, mode="rt", encoding=None))
    if shuffle is True:
        random.shuffle(data)

After Change


            and something goes wrong with the download
    
    fname = os.path.join(data_dir, FNAME)
    try:
        data = list(read_json_lines(fname, mode="rt", encoding=None))
    except IOError:
        if download_if_missing is True:
            _download_bernie_and_hillary(data_dir=data_dir)
            data = list(read_json_lines(fname, mode="rt", encoding=None))
        else:
            logger.exception("unable to load corpus from %s", fname)
            raise

    if shuffle is True:
        random.shuffle(data)

    return data
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: chartbeat-labs/textacy
Commit Name: e17791b533f7646674f357a90785eeb0fdefeb66
Time: 2016-04-28
Author: burton@chartbeat.com
File Name: textacy/corpora/bernie_and_hillary.py
Class Name:
Method Name: fetch_bernie_and_hillary


Project Name: danforthcenter/plantcv
Commit Name: 6a9c9bdc8a438460d9d8500e323eea510883d6c6
Time: 2019-10-21
Author: dschneiderch@users.noreply.github.com
File Name: plantcv/utils/sample_images.py
Class Name:
Method Name: sample_images


Project Name: Featuretools/featuretools
Commit Name: ce4558b30526b44234096465c069085cab395425
Time: 2019-09-13
Author: chidauri@gmail.com
File Name: featuretools/entityset/serialize.py
Class Name:
Method Name: write_data_description