From bdde9e91e0b37d74eb3dc3c5d69c4a7adeb4fb2a Mon Sep 17 00:00:00 2001 From: Maciej Czajka Date: Sun, 27 Mar 2022 15:03:50 +0200 Subject: [PATCH] fix download.sh --- download.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/download.sh b/download.sh index fd56b59..3054b45 100755 --- a/download.sh +++ b/download.sh @@ -1,8 +1,11 @@ dataset_operation() { cat all_games.csv | shuf > all_games.csv.shuf - head -n 1880 all_games.csv.shuf > all_games.csv.test - head -n 3760 all_games.csv.shuf | tail -n 1880 > all_games.csv.dev - tail -n +3761 all_games.csv.shuf > all_games.csv.train + len1=$(cat ./all_games.csv.shuf | wc -l) + len2=$(($len1/10)) + len3=$(($len2*2)) + head -n $len1 all_games.csv.shuf > all_games.csv.test + head -n $len2 all_games.csv.shuf | tail -n $len1 > all_games.csv.dev + tail -n +($len2 + 1) all_games.csv.shuf > all_games.csv.train rm all_games.csv.shuf wc -l all_games.csv.* }