dmytromishkin
commited on
Commit
•
195e50c
1
Parent(s):
5199736
Add files using large-upload tool
Browse files- test/extract_tar.py +9 -0
test/extract_tar.py
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import tarfile
|
2 |
+
|
3 |
+
# Specify the path to your .tar file
|
4 |
+
tar_file_path = "/mnt/disk_60tb/laion5b-bucket-data/laion5b_wds_2/100M-150M-subset-39627510/100M-150M-subset-39627510.parquet/00099.tar"
|
5 |
+
|
6 |
+
# Open the .tar file
|
7 |
+
with tarfile.open(tar_file_path, 'r') as tar:
|
8 |
+
# Extract all files
|
9 |
+
tar.extractall(path='/mnt/disk_60tb/laion5b-bucket-data-with-depth/test/00099_tar')
|