mimbres commited on
Commit
878f73b
·
verified ·
1 Parent(s): 8c2efd5

Upload 4 files

Browse files
_scripts/extract_tar.sh ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # =================================================================
4
+ # Configuration
5
+ # Modify these variables to match your environment.
6
+ # =================================================================
7
+
8
+ # Prefix for the split files (e.g., abc_dataset_part_aa, abc_dataset_part_ab, etc.)
9
+ FILE_PREFIX="abc_dataset_part_"
10
+
11
+ # Name of the final merged .tar file
12
+ MERGED_TAR_FILE="ABC_Dataset_full.tar"
13
+
14
+ # Directory to extract files into
15
+ EXTRACT_DIR="ABC_Dataset_extracted"
16
+
17
+
18
+ # =================================================================
19
+ # Script Body
20
+ # Do not modify below this line unless you know what you are doing.
21
+ # =================================================================
22
+
23
+ # Exit immediately if a command exits with a non-zero status.
24
+ set -e
25
+
26
+ echo ">> 1. Verifying split files exist..."
27
+ files=(${FILE_PREFIX}*)
28
+ if [ ! -f "${files[0]}" ]; then
29
+ echo "Error: Could not find split files starting with '${FILE_PREFIX}'."
30
+ echo "Ensure this script is in the same directory as the split files and FILE_PREFIX is correct."
31
+ exit 1
32
+ fi
33
+ echo "Split files found. Starting merge."
34
+
35
+ echo ""
36
+ echo ">> 2. Merging split files..."
37
+ # The wildcard (*) is automatically sorted alphabetically by the shell (aa, ab, ac...).
38
+ cat ${FILE_PREFIX}* > ${MERGED_TAR_FILE}
39
+ echo "Merge complete. Output file: ${MERGED_TAR_FILE}"
40
+
41
+ echo ""
42
+ echo ">> 3. Creating destination directory..."
43
+ mkdir -p ${EXTRACT_DIR}
44
+ echo "Directory ready: ${EXTRACT_DIR}"
45
+
46
+ echo ""
47
+ echo ">> 4. Extracting TAR archive..."
48
+ # -x: extract, -v: verbose, -f: file, -C: change to directory
49
+ tar -xvf ${MERGED_TAR_FILE} -C ${EXTRACT_DIR}
50
+ echo "Extraction complete."
51
+
52
+ echo ""
53
+ echo "=========================================="
54
+ echo "🎉 All tasks completed successfully!"
55
+ echo "Data is available in the '${EXTRACT_DIR}' directory."
56
+ echo "=========================================="
57
+
58
+ # Optional: Uncomment the lines below to delete the original split parts and the merged .tar file after completion.
59
+ # echo ""
60
+ # echo ">> 5. Cleaning up source files..."
61
+ # rm ${FILE_PREFIX}*
62
+ # rm ${MERGED_TAR_FILE}
63
+ # echo "Cleanup complete."
_scripts/pack_to_tar.sh ADDED
@@ -0,0 +1 @@
 
 
1
+ cd ABC_Dataset && rsync -a --include='*/' --include='*.abci' --include='*.pkl' --include='*.json' --exclude='*' --no-inc-recursive . ../tmp_filtered && cd ../tmp_filtered && tar -cf ../ABC_Dataset_only_abci_pkl_json.tar --use-compress-program=pigz * && cd .. && rm -rf tmp_filtered
_scripts/split_tar.sh ADDED
@@ -0,0 +1 @@
 
 
1
+ split -b 40G -d ABC_Dataset_full.tar abc_dataset_part_
_scripts/upload.sh ADDED
@@ -0,0 +1 @@
 
 
1
+ huggingface-cli upload mimbres/text2score . . --repo-type dataset --commit-message "Add ABC_Dataset_abci_pkl_json_aug.tar and scripts for v0.4 (pitch-shift augmentation, exclude xml)"