MCPcopy Create free account
hub / github.com/OUCMachineLearning/OUCML / download

Function download

GAN/datadownloader/dataload.py:27–37  ·  view source on GitHub ↗
(out_dir, category, set_name, tag)

Source from the content-addressed store, hash-verified

25
26
27def download(out_dir, category, set_name, tag):
28 url = 'http://lsun.cs.princeton.edu/htbin/download.cgi?tag={tag}' \
29 '&category={category}&set={set_name}'.format(**locals())
30 if set_name == 'test':
31 out_name = 'test_lmdb.zip'
32 else:
33 out_name = '{category}_{set_name}_lmdb.zip'.format(**locals())
34 out_path = join(out_dir, out_name)
35 cmd = ['curl', url, '-o', out_path]
36 print('Downloading', category, set_name, 'set')
37 subprocess.call(cmd)
38
39
40def main():

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected