<commit_before>#!/bin/bash

readonly TEMP=/tmp/app/page
readonly ROOT=~/Development/Scala/bootstrapper/sample
readonly PORT=9999

cd ${ROOT}																# Move to project root.

if ! git diff-index --quiet HEAD --; then								# Check for uncommited changes.
	echo "Commit current working directory before deploying."
elif -f RUNNING_PID; then
    echo "Play application seems to be running already."
else
	rm -rf ${TEMP} && mkdir -p ${TEMP}									# Clean temporary storage.
    (play "start ${PORT}")                                              # Start play application in background.
    while [ ! -f RUNNING_PID ]; do                                      # Wait until play is ready to serve.
        sleep 1
    done
    wget -r -l 1 -k -p -nh -P ${TEMP} localhost:${PORT}                 # Retrieve HTML.
    play stop                                                           # Stop play server.
	git checkout gh-pages   											# Switch to proper git branch.
	rm -rf index.html assets/											# Remove current page.
	mv ${TEMP} ${ROOT}													# Move new page to project.
	git add index.html assets/											# Add new page files to commit state.
	git commit -m "Updated pages."      								# Commit changes.
	git push origin gh-pages											# Push changes to remote repository.
	git checkout -														# Go back to previously used branch.
fi

cd - > /dev/null														# Restore latest working directory location.<commit_msg>Fixed syntax error.<commit_after>#!/bin/bash

readonly TEMP=/tmp/app/page
readonly ROOT=~/Development/Scala/bootstrapper
readonly APP=${ROOT}/sample
readonly PROCESS=RUNNING_PID
readonly PORT=9999

cd ${APP}																# Move to project root.

if ! git diff-index --quiet HEAD --; then								# Check for uncommited changes.
	echo "Commit current working directory before deploying."
elif [ -a ${PROCESS} ]; then
    echo "Play application already running (${PROCESS} exists)."
else
	rm -rf ${TEMP} && mkdir -p ${TEMP}									# Clean temporary storage.
    (play "start ${PORT}") &                                            # Start play application in background.
    wget -r -l 1 -k -p -nH -t 0 --retry-connrefused -P ${TEMP} localhost:${PORT}
    play stop                                                           # Stop play server.
	git checkout gh-pages   											# Switch to proper git branch.
	rm -rf ${ROOT}/index.html ${ROOT}/assets/							# Remove current page.
	mv ${TEMP}/* ${ROOT}												# Move new page to project.
	git add ${ROOT}/index.html ${ROOT}/assets/							# Add new page files to commit state.
	git commit -m "Updated pages."      								# Commit changes.
	git push origin gh-pages											# Push changes to remote repository.
	git checkout -														# Go back to previously used branch.
fi

cd - > /dev/null												        # Restore latest working directory location.
{'fraction_non_alphanumeric': 0.09586662035428968, 'fraction_numerical': 0.004168113928447377, 'mean_word_length': 1.7639155470249521, 'pattern_counts': {'":': 0, '<': 3, '<?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': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7100246', 'n_tokens_mistral': 1001, 'n_tokens_neox': 782, 'n_words': 305}