<commit_before>#!/bin/bash

NOW="$(date +"%Y-%m-%d_%H-%M")"

PARAM_PRAGMA="Pragma: no-cache"
PARAM_ENCODING="Accept-Encoding: gzip, deflate, sdch"
PARAM_LANG="Accept-Language: fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4,de-DE;q=0.2,de;q=0.2,nl;q=0.2,ro;q=0.2,pt;q=0.2,es;q=0.2"
PARAM_USERAGENT="User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/47.0.2526.73 Chrome/47.0.2526.73 Safari/537.36"
PARAM_ACCEPT="Accept: */*"
PARAM_CONNECTION="Connection: keep-alive"
PARAM_CACHE="Cache-Control: no-cache"

PP_PE="-H \"$PARAM_PRAGMA\" -H \"$PARAM_ENCODING\""
PP_LUA="-H \"$PARAM_LANGUAGE\" -H \"$PARAM_USERAGENT\" -H \"$PARAM_ACCEPT\""
PP_CC="-H \"$PARAM_CONNECTION\" -H \"$PARAM_CACHE\""

SLEEP=4

. "$(dirname "$0")/credentials.sh"


dodo() {

	sleep "$(($RANDOM%$SLEEP+$SLEEP))"

}


curly() {

	if [ -t 1 ]; then
		curl --compressed "$@"<commit_msg>Add a check for prerequisites on startup<commit_after>#!/bin/bash
check_prerequisites() {
	for command in cat curl dirname jq sed sleep sort tee; do
		[ -z "$(which "$command")" ] && echo "$command is required; aborting." >&2 && exit 254
	done
}
check_prerequisites


NOW="$(date +"%Y-%m-%d_%H-%M")"

PARAM_PRAGMA="Pragma: no-cache"
PARAM_ENCODING="Accept-Encoding: gzip, deflate, sdch"
PARAM_LANG="Accept-Language: fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4,de-DE;q=0.2,de;q=0.2,nl;q=0.2,ro;q=0.2,pt;q=0.2,es;q=0.2"
PARAM_USERAGENT="User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/47.0.2526.73 Chrome/47.0.2526.73 Safari/537.36"
PARAM_ACCEPT="Accept: */*"
PARAM_CONNECTION="Connection: keep-alive"
PARAM_CACHE="Cache-Control: no-cache"

PP_PE="-H \"$PARAM_PRAGMA\" -H \"$PARAM_ENCODING\""
PP_LUA="-H \"$PARAM_LANGUAGE\" -H \"$PARAM_USERAGENT\" -H \"$PARAM_ACCEPT\""
PP_CC="-H \"$PARAM_CONNECTION\" -H \"$PARAM_CACHE\""

SLEEP=4


. "$(dirname "$0")/credentials.sh"


dodo() {

	sleep "$(($RANDOM%$SLEEP+$SLEEP))"

}


curly() {

	if [ -t 1 ]; then
		curl --compressed "$@"
{'fraction_non_alphanumeric': 0.22793017456359102, 'fraction_numerical': 0.05885286783042394, 'mean_word_length': 4.9525222551928785, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '2527469', 'n_tokens_mistral': 996, 'n_tokens_neox': 901, 'n_words': 144}