37ef2c69f22a6e2d1232782dd3e192a003731a75,scanpy/readwrite.py,,_download,#Any#Any#,915
Before Change
// The "\"s are ugly, but parenthesis are not allowed here
// fmt: off
with \
tqdm(unit="B", unit_scale=True, miniters=1, desc=path.name) as t, \
path.open("wb") as f, \
urlopen(Request(url, headers={"User-agent": "scanpy-user"})) as resp:
After Change
) as resp:
resp.raise_for_status()
total = resp.headers.get("content-length", None)
with tqdm(
unit="B",
unit_scale=True,
miniters=1,
unit_divisor=1024,
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
if path.is_file():
path.unlink()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: theislab/scanpy
Commit Name: 37ef2c69f22a6e2d1232782dd3e192a003731a75
Time: 2020-11-25
Author: michal.klein@protonmail.com
File Name: scanpy/readwrite.py
Class Name:
Method Name: _download
Project Name: milesial/Pytorch-UNet
Commit Name: 79928c84cdf990ef6fe1043a3e4f74b9cc252642
Time: 2019-11-23
Author: milesial@users.noreply.github.com
File Name: eval.py
Class Name:
Method Name: eval_net
Project Name: deepfakes/faceswap
Commit Name: a8e8f9157b38314bb12910fe13fa7f34739d9c2b
Time: 2019-04-12
Author: 36920800+torzdf@users.noreply.github.com
File Name: tools/lib_alignments/jobs.py
Class Name: Merge
Method Name: process