Datasets:
LEAP
/

ArXiv:
License:
File size: 744 Bytes
266a225
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash

# Base URL for the chunked files
BASE_URL="https://huggingface.co/datasets/juannat7/ChaosBench/resolve/main/$1/"

# The base name of the files (without extension)
BASE_NAME="$1_chunks"

# Extension for the chunked files
EXTENSION="zip"

# Download all chunked files
wget "${BASE_URL}${BASE_NAME}.${EXTENSION}"
for i in $(seq -f "%02g" 1 99); do
    FILE_NAME="${BASE_URL}${BASE_NAME}.z${i}"
    wget "${FILE_NAME}" || break
done

# Combine the chunked files
zip -F "${BASE_NAME}.${EXTENSION}" --out "$1".zip

# Remove the chunked files
rm "${BASE_NAME}.${EXTENSION}"
for i in $(seq -f "%02g" 1 99); do
    rm "${BASE_NAME}.z${i}" || break
done

# Unzip the combined file
unzip "$1".zip

# Remove the combined zip file
rm "$1".zip