Skip to content

Instantly share code, notes, and snippets.

@icebeam7
Last active October 21, 2021 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save icebeam7/e7e90e347f93ec42fec9c044cb33bde8 to your computer and use it in GitHub Desktop.
Save icebeam7/e7e90e347f93ec42fec9c044cb33bde8 to your computer and use it in GitHub Desktop.
# Descarga el conjunto de datos de Github
data_url = "https://github.com/hnky/dataset-lego-figures/raw/master/_download/test-images.zip"
data_path = "./data-test"
download_path = os.path.join(data_path,"test-images.zip")
if not os.path.exists(data_path):
os.mkdir(data_path);
urllib.request.urlretrieve(data_url, filename=download_path)
# Descomprime el conjunto de datos
zip_ref = zipfile.ZipFile(download_path, 'r')
zip_ref.extractall(data_path)
zip_ref.close()
print("Data extracted in: {}".format(data_path))
os.remove(download_path)
print("Downloaded file removed: {}".format(download_path))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment