<commit_before><commit_msg>testing<commit_after> #!/bin/bash

 set -e

rm -rf postage-master master.zip ~/.mozilla ~/.postage

wget https://github.com/workflowproducts/postage/archive/master.zip
unzip master.zip
cd postage-master/

./configure && make -j32
make test-common

./postage/postage -c ./postage/config/postage.conf -d ./postage/config/postage-connections.conf -n true -t 300 -r ./postage/web_root -l info & export POSTAGEPID="$!"
sleep 5
xdg-open "http://127.0.0.1:8080/postage/test/index.html?seq_numbers=true&_http_auth=true&http_file=true&http_upload=true&http_export=true&ws_raw=true&ws_tab=true&ws_select=true&ws_insert=true&ws_update=true&ws_delete=true"
printf "HTTP/1.1 200 OK\r\n\r\n\r\n" | ncat -l -p 45654
kill $POSTAGEPID

rm -rf ~/.mozilla ~/.postage

sudo make install

/usr/local/sbin/postage & export POSTAGEPID="$!"
sleep 5
xdg-open "http://127.0.0.1:8080/postage/test/index.html?seq_numbers=true&_http_auth=true&http_file=true&http_upload=true&http_export=true&ws_raw=true&ws_tab=true&ws_select=true&ws_insert=true&ws_update=true&ws_delete=true"
printf "HTTP/1.1 200 OK\r\n\r\n\r\n" | ncat -l -p 45654
kill $POSTAGEPID

sudo make uninstall

kill $(cat postage/postgres.pid)

cd ..

rm -rf postage-master master.zip ~/.mozilla ~/.postage
{'fraction_non_alphanumeric': 0.15810276679841898, 'fraction_numerical': 0.03715415019762846, 'mean_word_length': 4.91588785046729, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '268251', 'n_tokens_mistral': 545, 'n_tokens_neox': 499, 'n_words': 87}