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