Skip to content

Commit

Permalink
fix: unzip and delete zipped files
Browse files Browse the repository at this point in the history
  • Loading branch information
dimakis committed Nov 20, 2023
1 parent 444ce4b commit 1fce8b9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions demo-notebooks/guided-demos/download_mnist_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ def download_mnist_dataset(destination_dir):

print(f"MNIST dataset downloaded in {destination_dir}")

# unzip the gzipped files
[os.system(f"gunzip {destination_dir}/{file}") for file in os.listdir(destination_dir) if file.endswith(".gz")]
# delete the gzipped files
[os.remove(f"{destination_dir}/{file}") for file in os.listdir(destination_dir) if file.endswith(".gz")]

# Specify the directory where you
destination_dir = os.path.dirname(os.path.abspath(__file__))
Expand Down

0 comments on commit 1fce8b9

Please sign in to comment.