ium_434765/get_data.sh
Karolina Oparczyk a17c54fa2a
All checks were successful
s434765-training/pipeline/head This commit looks good
remove empty lines
2021-05-17 20:46:02 +02:00

13 lines
555 B
Bash
Executable File

#!/bin/bash
rm USvideos_modified.csv
if kaggle datasets download -d sgonkaggle/youtube-trend-with-subscriber && unzip youtube-trend-with-subscriber.zip; then
grep -v -e "^$" - USvideos_modified.csv
COUNT=$(wc -l "USvideos_modified.csv")
echo "${COUNT}"
head -n -1 "USvideos_modified.csv" | shuf > "data_shuf"
head -n 544 "data_shuf" > "data_test"
head -n 1088 "data_shuf" | tail -n 544 > "data_dev"
head -n 5441 "data_shuf" | tail -n 4352 > "data_train"
grep "\S" "data_dev"
python3 get_data.py USvideos_modified.csv
fi