<commit_before>#!/bin/bash

set -e
set -x

mkdir -p /root/.ssh

printf "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config

cp /ssh/id_rsa /root/.ssh/id_rsa
chmod 600 /root/.ssh/id_rsa

#if [ -d "ootp-ai-data/.git" ]; then
#  echo "Pulling latest data..."
#  cd ootp-ai-data
#  git reset --hard HEAD
#  git clean -fd || true
#  git pull --rebase
#  cd ..
#else
#  echo "Cloning latest data..."
#  rm -rf ootp-ai-data
#  git clone --depth 1 <EMAIL>:lstephen/ootp-ai-data.git
#fi

echo "Running..."
mvn -B exec:java -Dgpg.skip=true

echo "Updating data..."
cd ootp-ai-data

[[ -n "$GIT_AUTHOR_NAME" ]] && git config user.name $GIT_AUTHOR_NAME
[[ -n "$GIT_AUTHOR_EMAIL" ]] && git config user.email $GIT_AUTHOR_EMAIL

git add --all
git commit -m "$(date)"
git pull --rebase
git push origin master

echo "Done."

<commit_msg>Revert changes that shouldn't be pushed<commit_after>#!/bin/bash

set -e
set -x

mkdir -p /root/.ssh

printf "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config

cp /ssh/id_rsa /root/.ssh/id_rsa
chmod 600 /root/.ssh/id_rsa

if [ -d "ootp-ai-data/.git" ]; then
  echo "Pulling latest data..."
  cd ootp-ai-data
  git reset --hard HEAD
  git clean -fd || true
  git pull --rebase
  cd ..
else
  echo "Cloning latest data..."
  rm -rf ootp-ai-data
  git clone --depth 1 <EMAIL>:lstephen/ootp-ai-data.git
fi

echo "Running..."
mvn -B exec:java -Dgpg.skip=true

echo "Updating data..."
cd ootp-ai-data

[[ -n "$GIT_AUTHOR_NAME" ]] && git config user.name $GIT_AUTHOR_NAME
[[ -n "$GIT_AUTHOR_EMAIL" ]] && git config user.email $GIT_AUTHOR_EMAIL

git add --all
git commit -m "$(date)"
git pull --rebase
git push origin master

echo "Done."


{'fraction_non_alphanumeric': 0.16488095238095238, 'fraction_numerical': 0.004761904761904762, 'mean_word_length': 2.964622641509434, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '5730497', 'n_tokens_mistral': 724, 'n_tokens_neox': 689, 'n_words': 193}