Datasets:
Delete loading script auxiliary file
Browse files- copy_data.py +0 -22
copy_data.py
DELETED
|
@@ -1,22 +0,0 @@
|
|
| 1 |
-
import os
|
| 2 |
-
import shutil
|
| 3 |
-
import zipfile
|
| 4 |
-
|
| 5 |
-
# Ensure the data directory exists
|
| 6 |
-
os.makedirs('data', exist_ok=True)
|
| 7 |
-
|
| 8 |
-
# List of files to copy and compress
|
| 9 |
-
files = ['questions.json', 'questions_aux.json']
|
| 10 |
-
|
| 11 |
-
for file in files:
|
| 12 |
-
# Source and destination paths
|
| 13 |
-
src_path = os.path.join('old_data', file)
|
| 14 |
-
dst_path = os.path.join('data', file + '.zip')
|
| 15 |
-
|
| 16 |
-
# Copy and compress the file
|
| 17 |
-
with zipfile.ZipFile(dst_path, 'w', zipfile.ZIP_DEFLATED) as zipf:
|
| 18 |
-
zipf.write(src_path, arcname=file)
|
| 19 |
-
|
| 20 |
-
print(f"Copied and compressed {file} to {dst_path}")
|
| 21 |
-
|
| 22 |
-
print("All files have been copied and compressed successfully.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|