8ad8946961e159b740117a3087ac87c7800a1eaa,tslearn/datasets.py,,extract_from_zip_url,#Any#Any#Any#,20
Before Change
fname = os.path.basename(url)
local_zip_fname = os.path.join("/tmp/", fname) // TODO: not great
urlretrieve(url, local_zip_fname)
try:
if not os.path.exists(target_dir):
os.makedirs(target_dir)
zipfile.ZipFile(local_zip_fname, "r").extractall(path=target_dir)
After Change
Directory in which the zip file has been extracted if the process was successful, None otherwise
fname = os.path.basename(url)
with tempfile.TemporaryDirectory() as tmpdir:
local_zip_fname = os.path.join(tmpdir, fname)
urlretrieve(url, local_zip_fname)
try:
if not os.path.exists(target_dir):
os.makedirs(target_dir)
zipfile.ZipFile(local_zip_fname, "r").extractall(path=target_dir)
if verbose:
print("Successfully extracted file %s to path %s" % (local_zip_fname, target_dir))
return target_dir
except BadZipFile:
if verbose:
sys.stderr.write("Corrupted zip file encountered, aborting.\n")
return None
class UCR_UEA_datasets(object):
A convenience class to access UCR/UEA time series datasets.
When using one (or several) of these datasets in research projects, please cite [1]_.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: rtavenar/tslearn
Commit Name: 8ad8946961e159b740117a3087ac87c7800a1eaa
Time: 2018-05-21
Author: romain.tavenard@univ-rennes2.fr
File Name: tslearn/datasets.py
Class Name:
Method Name: extract_from_zip_url
Project Name: dhlab-epfl/dhSegment
Commit Name: f87cfc114f423360d7f1236cf55ad0ea1314ebfd
Time: 2018-04-03
Author: seg.benoit@gmail.com
File Name: pretrained_models/download_resnet_pretrained_model.py
Class Name:
Method Name:
Project Name: glm-tools/pyglmnet
Commit Name: bae902f30638942d08819ec9cd4acdc5f6e33682
Time: 2019-06-03
Author: scotto@sharpleaf.org
File Name: pyglmnet/datasets.py
Class Name:
Method Name: fetch_group_lasso_datasets