<commit_before>#!/bin/bash
#execute it by typing 
#. ./start_script
# Courtesy of <NAME>
# Modified by <NAME>

usage(){ echo "./start_script.sh -c GPU_CORES"; }
while getopts "hc:" OPTION; do
    case $OPTION in
        h) 
            usage
            exit 1
            ;;
        c) gpu_number=$OPTARG
            ;;
        *)
            usage
            exit 1
            ;;
    esac
done

if [ -z $gpu_number ]
then
    usage
    exit 1
fi

hostname=`hostname`

if [ $hostname = "stonesoup.inf.ed.ac.uk" ]; then
    echo "detected stonesoup, applying config"<commit_msg>Check gpu_number argument is actually a number<commit_after>#!/bin/bash
#execute it by typing 
#. ./start_script
# Courtesy of <NAME>
# Modified by <NAME>

usage(){ echo "./start_script.sh -c GPU_CORES"; }
while getopts "hc:" OPTION; do
    case $OPTION in
        h) 
            usage
            exit 1
            ;;
        c) gpu_number=$OPTARG
            ;;
        *)
            usage
            exit 1
            ;;
    esac
done

if [ -z "${gpu_number##*[!0-9]*}" ]
then
    usage
    exit 1
fi

hostname=`hostname`

if [ $hostname = "stonesoup.inf.ed.ac.uk" ]; then
    echo "detected stonesoup, applying config"
{'fraction_non_alphanumeric': 0.12096106048053024, 'fraction_numerical': 0.006628003314001657, 'mean_word_length': 1.7706422018348624, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2706549', 'n_tokens_mistral': 416, 'n_tokens_neox': 396, 'n_words': 113}