ium_444018/download.sh

22 lines
873 B
Bash

dataset_operation() {
tail -n +2 dataset.csv | shuf > dataset.csv.s
head -n $CUTOFF dataset.csv.s > ./dataset.csv.shuf
len1=$(cat ./imdb-dataset.csv.shuf | wc -l)
len2=$(($len1/10))
len3=$(($len2*2))
len4=$(($len3+1))
head -n $len2 dataset.csv.shuf > dataset_test.csv
head -n $len3 dataset.csv.shuf | tail -n $len2 > dataset_dev.csv.
tail -n +$len4 dataset.csv.shuf > dataset_train.csv
rm dataset.csv.shuf
wc -l dataset.csv.*
}
echo 'Start'
kaggle datasets download -d harshitshankhdhar/imdb-dataset-of-top-1000-movies-and-tv-shows
echo 'Dataset downloaded'
unzip imdb-dataset-of-top-1000-movies-and-tv-shows.zip
echo 'Dataset unziped'
mv imdb-dataset-of-top-1000-movies-and-tv-shows.zip dataset.zip
echo 'Dataset renamed'
archiveArtifacts artifacts: 'dataset_dev.csv, dataset_test.csv, dataset_train.csv', followSymlinks: false