<commit_before>#!/bin/bash

ssh mtcompareval.ccl 'bash -s' < <<SSH
sudo -u www-data -s <<DEPLOY
DIR="/var/www/MT-ComparEval"
cd $DIR

# KILL RUNNING PROCESSES
pkill -fl "^php -f .*www/index.php"

# DOWNLOAD LATEST CHANGES
git pull

# DEPLOY DATABASE SCHEMA
rm app/database
sqlite3 app/database < schema.sql

# REMOVE LOCKS FROM DATA SO IT CAN BE IMPORTED AGAIN
find data -name ".*" -exec rm {} \;

# INVALIDATE CACHE
rm -rf temp/*

# RUN BACKGROUND WORKERS
php -f www/index.php Background:Watcher:Watch --folder=data >log/experiments.log 2>&1 &

echo DEPLOY DONE

DEPLOY
SSH
<commit_msg>Deploy script improved.<commit_after>#!/bin/bash

sudo -u www-data -s <<DEPLOY
DIR="/var/www/MT-ComparEval"
cd $DIR

# KILL RUNNING PROCESSES
pkill -f "^php -f .*www/index.php"

# DOWNLOAD LATEST CHANGES
git pull

# DEPLOY DATABASE SCHEMA
rm app/database
sqlite3 app/database < schema.sql

# REMOVE LOCKS FROM DATA SO IT CAN BE IMPORTED AGAIN
find data -name ".*" -exec rm {} \;

# INVALIDATE CACHE
rm -rf temp/*

# RUN BACKGROUND WORKERS
php -f www/index.php Background:Watcher:Watch --folder=data >log/experiments.log 2>&1 &

echo DEPLOY DONE
DEPLOY

{'fraction_non_alphanumeric': 0.12291483757682177, 'fraction_numerical': 0.0052677787532923615, 'mean_word_length': 3.75, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 8, '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': '3893849', 'n_tokens_mistral': 483, 'n_tokens_neox': 442, 'n_words': 136}