<commit_before>#!/bin/bash

my_dir="$(dirname "$0")"
source $my_dir/.config
cd $wd

# Kill existing instances
screen -XS $id kill >/dev/null 2>&1
screen -XS $id quit >/dev/null 2>&1

if [[ $2 == "run" ]]; then
  run=true
fi

outfile=$wd/output.log
echo "" > $outfile

# Start new instance
if [[ $run == true ]]; then
  emx -U -R$1 main.x
else
  screen -dmS $id bash -c "script -c 'emx -U -R$1 2>&1' -f $outfile"<commit_msg>Fix: Emerald on main node doesn't get killed<commit_after>#!/bin/bash

my_dir="$(dirname "$0")"
source $my_dir/.config
cd $wd

# Kill existing instances
screen -XS $id kill >/dev/null 2>&1
screen -XS $id quit >/dev/null 2>&1

if [[ $2 == "run" ]]; then
  run=true
fi

outfile=$wd/output.log
echo "" > $outfile

# Start new instance
runstring=
if [[ $run == true ]]; then
  runstring=' main.x'
fi
screen -dmS $id bash -c "script -c 'emx -U -R$1$runstring 2>&1' -f $outfile"

if [[ $run == true ]]; then
  tail -f $outfile
else
{'fraction_non_alphanumeric': 0.1877637130801688, 'fraction_numerical': 0.020042194092827006, 'mean_word_length': 3.4764150943396226, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '1259219', 'n_tokens_mistral': 401, 'n_tokens_neox': 381, 'n_words': 125}