dff9fec2881dfb43222ad1c84aa95fd8c42715c8,pythainlp/corpus/__init__.py,,_download,#,80
Before Change
else:
first_byte = 0
if first_byte >= file_size:
return file_size
header = {"Range": "bytes=%s-%s" % (first_byte, file_size)}
pbar = tqdm(
total=file_size,
initial=first_byte,
After Change
file_size = int(urlopen(url).info().get("Content-Length", -1))
r = requests.get(url, stream=True)
with open(get_full_data_path(dst), "wb") as f:
pbar = tqdm(total=int(r.headers["Content-Length"]))
for chunk in r.iter_content(chunk_size=1024):
if chunk:
f.write(chunk)
pbar.update(len(chunk))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: PyThaiNLP/pythainlp
Commit Name: dff9fec2881dfb43222ad1c84aa95fd8c42715c8
Time: 2019-07-25
Author: wannaphong@yahoo.com
File Name: pythainlp/corpus/__init__.py
Class Name:
Method Name: _download
Project Name: openeventdata/mordecai
Commit Name: 8f2f0408337cf96ca3d737075068d870a3d0a36c
Time: 2018-07-02
Author: ahalterman0@gmail.com
File Name: mordecai/geoparse.py
Class Name: Geoparser
Method Name: batch_geoparse
Project Name: ClementPinard/SfmLearner-Pytorch
Commit Name: 2a74e12fec206dd222f98cd3ac2a15c48ebdf0a9
Time: 2019-02-18
Author: clement.pinard@parrot.com
File Name: data/prepare_train_data.py
Class Name:
Method Name: main