21 lines
625 B
Bash
21 lines
625 B
Bash
rm ./*.csv
|
|
rm ./*.zip
|
|
kaggle datasets download -d mateusdmachado/csgo-professional-matches
|
|
unzip ./*.zip
|
|
rm ./players.csv
|
|
rm ./picks.csv
|
|
rm ./economy.csv
|
|
datas_count=$(cat ./results.csv | wc -l)
|
|
train_count=$(echo $datas_count*0.8 | bc)
|
|
dev_test_count=$(echo $datas_count*0.1 | bc)
|
|
|
|
train_end=${train_count%.*}
|
|
dev_count=${dev_test_count%.*}
|
|
dev_end=$(($train_end + $dev_count))
|
|
|
|
test_count=${dev_test_count%.*}
|
|
test_end=$(($dev_end + $test_count))
|
|
|
|
sed -n 1,"$train_end"p ./results.csv >> train_set.csv
|
|
sed -n "$train_end","$dev_end"p ./results.csv >> dev_set.csv
|
|
sed -n "$dev_end","$test_end"p ./results.csv >> test_set.csv |