<commit_before>#!/usr/bin/env bash

# Set up strict bash
# See http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
IFS=$'\n\t'

country_list=("belgium" "germany" "austria" "italy" "netherlands")
year_list=("2010-2016" "2008-2016" "2013-2016" "2008-2016" "2010-2016")
year_list_future=("2010-2018" "2008-2018" "2013-2018" "2008-2018" "2010-2018")
type_of_exec=("no-future" "future")
type_of_data=("old_data" "new_data" "pageviews")
base_dir="./complete_results"

for data_type in ${type_of_data[@]}
do
    for type_exec in ${type_of_exec[@]}
    do
        counter=0;
	    for c in ${country_list[@]}
	    do

            # Create the directory, if it doesn't exists
	        directory=$base_dir/$data_type/$type_exec/$c/
    	    if [ ! -d $base_dir/$c ]; then
        	    mkdir -p $base_dir/$data_type/$type_exec/$c
    	    fi

            if [ $data_type == "old_data" ]; then
    	        start_year="$(echo ${year_list[$counter]} | cut -f 1 -d -)"
                end_year="$(echo ${year_list[$counter]} | cut -f 2 -d -)"
            elif [ $data_type == "new_data" ]; then
                start_year="$(echo ${year_list_future[$counter]} | cut -f 1 -d -)"
                end_year="$(echo ${year_list_future[$counter]} | cut -f 2 -d -)"
            else
                start_year="2016"
                end_year="2018"
            fi


            # Check which type of execution we need to perform.
            if [ $type_exec == "no-future" ]; then
                start_year="$(expr $start_year + 1)"
                command="./model.py $start_year $end_year ./../data/wikipedia_${c}/$data_type ./../data/$c/$data_type ./../data/keywords/keywords_${c}.txt $c --f --d $directory --no-future"
            else
                command="./model.py $start_year $end_year ./../data/wikipedia_${c}/$data_type ./../data/$c/$data_type ./../data/keywords/keywords_${c}.txt $c --f --d $directory"<commit_msg>Fix run_all script to run on all the new seasons.<commit_after>#!/usr/bin/env bash

# Set up strict bash
# See http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
IFS=$'\n\t'

country_list=("belgium" "germany" "austria" "italy" "netherlands")
year_list=("2010-2016" "2008-2016" "2013-2016" "2008-2016" "2010-2016")
year_list_future=("2010-2019" "2008-2019" "2013-2019" "2008-2019" "2010-2019")
type_of_exec=("no-future" "future")
type_of_data=("old_data" "new_data" "pageviews" "cyclerank")
base_dir="./complete_results"

for data_type in ${type_of_data[@]}
do
    for type_exec in ${type_of_exec[@]}
    do
        counter=0;
	    for c in ${country_list[@]}
	    do

            # Create the directory, if it doesn't exists
	        directory=$base_dir/$data_type/$type_exec/$c/
    	    if [ ! -d $base_dir/$c ]; then
        	    mkdir -p $base_dir/$data_type/$type_exec/$c
    	    fi

            if [ $data_type == "old_data" ]; then
    	        start_year="$(echo ${year_list[$counter]} | cut -f 1 -d -)"
                end_year="$(echo ${year_list[$counter]} | cut -f 2 -d -)"
            elif [ $data_type == "new_data" ]; then
                start_year="$(echo ${year_list_future[$counter]} | cut -f 1 -d -)"
                end_year="$(echo ${year_list_future[$counter]} | cut -f 2 -d -)"
            else
                start_year="2016"
                end_year="2019"
            fi


            # Check which type of execution we need to perform.
            incidence_data_type=""
            keywords_ending=""
            if [ $data_type == "cyclerank" ]; then
              incidence_data_type="new_data"
              keywords_ending="cyclerank_${c}"
            else
              incidence_data_type=$data_type
              keywords_ending=${c}
            fi

            if [ $type_exec == "no-future" ]; then
                start_year="$(expr $start_year + 1)"
                command="./model.py $start_year $end_year ./../data/wikipedia_${c}/$data_type ./../data/$c/$incidence_data_type ./../data/keywords/keywords_${keywords_ending}.txt $c --f --d $directory --no-future"
            else
                command="./model.py $start_year $end_year ./../data/wikipedia_${c}/$data_type ./../data/$c/$incidence_data_type ./../data/keywords/keywords_${keywords_ending}.txt $c --f --d $directory"
{'fraction_non_alphanumeric': 0.16806722689075632, 'fraction_numerical': 0.04388422035480859, 'mean_word_length': 2.2560790273556233, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2177413', 'n_tokens_mistral': 1611, 'n_tokens_neox': 1399, 'n_words': 299}