MCPcopy Create free account
hub / github.com/apache/singa / check_exist_or_download

Function check_exist_or_download

examples/rnn/imdb_data.py:96–103  ·  view source on GitHub ↗

download data into tmp

(url)

Source from the content-addressed store, hash-verified

94
95
96def check_exist_or_download(url):
97 ''' download data into tmp '''
98 name = url.rsplit('/', 1)[-1]
99 filename = os.path.join(download_dir, name)
100 if not os.path.isfile(filename):
101 print("Downloading %s" % url)
102 urllib.request.urlretrieve(url, filename)
103 return filename
104
105
106def unzip_data(download_dir, data_gz):

Callers 1

preprocessFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected