<commit_before>#!/bin/bash

# This program runs a simple test of an Orchard server to
# make sure it is running and compiling programs correctly.
#
# Place it somewhere like /usr/local/bin
# Then add the following to /etc/cron.d/orchard:
# 0,15,30,45 * * * * root /usr/local/bin/orchard-checkup

URL="http://orc.csres.utexas.edu/orchard/json/executor"
EMAIL="<EMAIL>"

# report an error and halt
error() {
        echo "$1" | mail -s "orc.csres.utexas.edu problem" "$EMAIL"
        exit 1
}

# post a request
post() {
        curl -s -d "$1" "$URL"
}

# post a request, compare against a response glob,
# and report an error if it fails
check() {
        [[ "$1" == $2 ]] || error "$3: $1"
}
<commit_msg>Added lock file to checkup script to prevent duplicate warnings<commit_after>#!/bin/bash

# This program runs a simple test of an Orchard server to
# make sure it is running and compiling programs correctly.
#
# Place it somewhere like /usr/local/bin
# Then add the following to /etc/cron.d/orchard:
# 0,15,30,45 * * * * root /usr/local/bin/orchard-checkup

URL="http://orc.csres.utexas.edu/orchard/json/executor"
EMAIL="<EMAIL>"
LOCK="/var/run/orchard-checkup.lock"

# report an error and halt
error() {
	if ! [ -f $LOCK ]; then
		touch $LOCK
		echo "$1" | mail -s "orc.csres.utexas.edu problem" "$EMAIL"
	fi
	exit 1
}

# post a request
post() {
        curl -s -d "$1" "$URL"
}

# post a request, compare against a response glob,
# and report an error if it fails
check() {
        [[ "$1" == $2 ]] || error "$3: $1"
}

{'fraction_non_alphanumeric': 0.1501639344262295, 'fraction_numerical': 0.018360655737704918, 'mean_word_length': 3.1923076923076925, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4594527', 'n_tokens_mistral': 574, 'n_tokens_neox': 542, 'n_words': 181}