<commit_before>#!/bin/bash 

export BIN="as"

#LINELENGTH=80
##TODO: Get the Line length param in there...
#LINEBAR="$(perl -e 'print "#" x 80')"
#
#DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
#SRCDIR="$DIR/src"
#
#cat << EOF
#$LINEBAR
#### This script is not implemented yet! ### 
#$LINEBAR
#EOF
#
#
##export PYTHONPATH=$SRCDIR:$PYTHONPATH
#
#[ -z "${VENV_DIR:-}" ] && export VENV_DIR="$DIR/venv"
#
##[ -z "${PYTHON_BIN:-}" ] && export PYTHON_BIN="python3"
#
##if $PYTHON_BIN == "python3" 
##then
#PIP_BIN=pip3
##else
#    #PIP_BIN=pip
##fi
#
#
## Check for pip and virtualenv
#command $PIP_BIN -v >/dev/null 2>&1 || 
#{ echo >&2 "$PIP_BIN not installed.  Aborting."; exit 1; }

#command virtualenv -v >/dev/null  || 
#{ echo >&2 "virtualenv not installed. Try $PIP_BIN install virtualenv."; exit 1; }


# Install the required packages.
(
    echo Creating virtual environment directory \"venv\"

    virtualenv-3.5 -p python3 -q venv #$VENV_DIR #1> /dev/null

    #echo $VENV_DIR

    #source $VENV_DIR/bin/activate

    source venv/bin/activate
    
    #echo $PS1

    #$PIP_BIN install --editable .
    pip3 install --editable .

    # Run the program.
    $BIN $@
)


exit<commit_msg>Working run script with a clean cma<commit_after>#!/bin/bash 

#


export BIN="as"

LINELENGTH=80
#TODO: Get the Line length param in there...
LINEBAR="$(perl -e 'print "#" x 80')"

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SRCDIR="$DIR/src"



# Optionally clean the tree.
if [ "$1" = "clean" ]; then

cat << EOF
$LINEBAR
### Cleaning. ### 
$LINEBAR
EOF

TO_CLEAN="src.egg-info venv"
PYC_FILES="`find | grep -E -e "*.pyc$" -e "__pycache__" -e "*.out"`"
TO_CLEAN="$PYC_FILES $TO_CLEAN"
rm -rf $TO_CLEAN; exit $?;

fi


export PYTHONPATH=$SRCDIR:$PYTHONPATH

[ -z "${VENV_DIR:-}" ] && export VENV_DIR="$DIR/venv"

[ -z "${PYTHON_BIN:-}" ] && export PYTHON_BIN="python3"

if [ $PYTHON_BIN = "python3" ] 
then
    PIP_BIN=pip3
else
    PIP_BIN=pip
fi

# Check for pip and virtualenv
command $PIP_BIN -v >/dev/null 2>&1 || 
{ echo >&2 "$PIP_BIN not installed.  Aborting."; exit 1; }

command virtualenv --version >/dev/null  || 
{ echo >&2 "virtualenv not installed. Try $PIP_BIN install virtualenv."; exit 1; }


# Install the required packages.
(
    echo Creating virtual environment directory \"venv\"

    virtualenv -p $PYTHON_BIN $VENV_DIR #1> /dev/null

    echo $VENV_DIR

    source $VENV_DIR/bin/activate

    #TODO: On release will need to change from editable too...?
    $PIP_BIN install --editable $DIR

    # Run the program.
    $BIN $@
)

exit
{'fraction_non_alphanumeric': 0.1772250291488535, 'fraction_numerical': 0.013991449669646328, 'mean_word_length': 3.453287197231834, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, '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': '5332278', 'n_tokens_mistral': 1073, 'n_tokens_neox': 1012, 'n_words': 272}