b261f6e44d93d4a9d767d81add53f0f9071a42bb,lazyflow/utility/io/tiledVolume.py,TiledVolume,_retrieve_tile,#TiledVolume#Any#Any#Any#Any#,130

Before Change


        tmp_filepath = os.path.join(tmpdir, tmp_filename) 
        
        logger.debug("Retrieving {}, saving to {}".format( tile_url, tmp_filepath ))
        urllib.urlretrieve(tile_url, tmp_filepath)
        
        // Read the image from the disk with vigra
        img = vigra.impex.readImage(tmp_filepath, dtype="NATIVE")
        assert img.ndim == 3

After Change


        if r.status_code == requests.codes.not_found:
            data_out[:] = 0
        else:
            with open(tmp_filepath, "wb") as f:
                CHUNK_SIZE = 10*1024
                for chunk in r.iter_content(CHUNK_SIZE):
                    f.write(chunk)
    
            // Read the image from the disk with vigra
            img = vigra.impex.readImage(tmp_filepath, dtype="NATIVE")
            assert img.ndim == 3
            assert img.shape[-1] == 1
            
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: ilastik/ilastik
Commit Name: b261f6e44d93d4a9d767d81add53f0f9071a42bb
Time: 2014-07-22
Author: bergs@janelia.hhmi.org
File Name: lazyflow/utility/io/tiledVolume.py
Class Name: TiledVolume
Method Name: _retrieve_tile


Project Name: pytorch/text
Commit Name: 37452ca74a6022d6b67ba0ba9af2b1e406de7578
Time: 2018-04-27
Author: zhshihang@gmail.com
File Name: torchtext/utils.py
Class Name:
Method Name: download_from_url


Project Name: tyarkoni/pliers
Commit Name: 3b9d515623ea8421420b92d5e0b951842646a3e2
Time: 2017-01-11
Author: tyarkoni@gmail.com
File Name: pliers/extractors/models.py
Class Name: TensorFlowInceptionV3Extractor
Method Name: _download_pretrained_model