Download the data from Yann's website, unless it's already here.
(url, work_directory)
| 14 | |
| 15 | |
| 16 | def maybe_download(url, work_directory): |
| 17 | """Download the data from Yann's website, unless it's already here.""" |
| 18 | filename = url.split('/')[-1] |
| 19 | filepath = os.path.join(work_directory, filename) |
| 20 | if not os.path.exists(filepath): |
| 21 | logger.info("Downloading to {}...".format(filepath)) |
| 22 | download(url, work_directory) |
| 23 | return filepath |
| 24 | |
| 25 | |
| 26 | def _read32(bytestream): |
no test coverage detected