def download():
p = os.path.join(get_data_home(), "kddcup.data.gz")
if os.path.exists(p):
return p
r = requests.get(URL, stream=True)
with open(p, "wb") as f:
for chunk in r.iter_content(chunk_size=1024):
if chunk:
f.write(chunk)
return p
评论列表
文章目录