d9cf79a6f4746a794755e2e6837b3d45f74ac042,scanpy/readwrite.py,,_download,#Any#Any#,915

Before Change


                total=total if total is None else int(total),
            ) as t, path.open("wb") as f:
                for chunk in resp.iter_content(chunk_size=8 * 1024):
                    t.update(len(chunk))
                    f.write(chunk)
    except (KeyboardInterrupt, Exception):
        // Make sure file doesn’t exist half-downloaded

After Change


                total=total if total is None else int(total),
            ) as t, path.open("wb") as f:
                block = resp.read(blocksize)
                while block:
                    f.write(block)
                    blocknum += 1
                    t.update(blocknum * blocksize - t.n)
                    block = resp.read(blocksize)

    except (KeyboardInterrupt, Exception):
        // Make sure file doesn’t exist half-downloaded
        if path.is_file():
            path.unlink()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: theislab/scanpy
Commit Name: d9cf79a6f4746a794755e2e6837b3d45f74ac042
Time: 2020-11-25
Author: michal.klein@protonmail.com
File Name: scanpy/readwrite.py
Class Name:
Method Name: _download


Project Name: keras-team/keras
Commit Name: c25fa38deb4efc5445f64af3ec17eae0eb660d2f
Time: 2017-11-09
Author: francois.chollet@gmail.com
File Name: keras/models.py
Class Name: Sequential
Method Name: add


Project Name: NifTK/NiftyNet
Commit Name: b94e16b5c91d472fcca9fa4d54278d22ac7903e2
Time: 2017-08-20
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/io/misc_io.py
Class Name:
Method Name: save_data_array