<commit_before>#!/bin/bash

#  This will remove the following.
#    1. Unset environment variable: KALITE_PYTHON
#    2. remove the .plist file, need admin
#    3. delete the symlinked /usr/bin/kalite command, need admin

KALITE_PLIST="org.learningequality.kalite.plist"
TEMP="/tmp"
LIBRARY="/Library/LaunchAgents"
KALITE_EXECUTABLE_PATH="$(which kalite)"


# Delete the .plist file.
if [ -f "$TEMP/$KALITE_PLIST" ]; then
    echo "Removing $TEMP/$KALITE_PLIST "
    sudo rm "$TEMP/$KALITE_PLIST"
else
    echo "$KALITE_PLIST not found. "
fi

if [ -f "$LIBRARY/$KALITE_PLIST" ]; then
    echo "Removing $LIBRARY/$KALITE_PLIST "
    sudo rm "$LIBRARY/$KALITE_PLIST"
else
    echo "$LIBRARY/$KALITE_PLIST not found."
fi

# Delete the symlinked `kalite` executable.
# REF: http://stackoverflow.com/questions/21799441/test-if-executable-exists-in-unix
if which kalite > /dev/null 2>&1; then
    echo "Removing $KALITE_EXECUTABLE_PATH "
    sudo rm $KALITE_EXECUTABLE_PATH
else
    echo "kalite executable not found. "
fi

# remove KALITE_PYTHON environment variable
echo "Unset the KALITE_PYTHON environment variable "
launchctl unsetenv KALITE_PYTHON
<commit_msg>Create a variable to hold four four instances.<commit_after>#!/bin/bash

#  This will remove the following.
#    1. Unset environment variable: KALITE_PYTHON
#    2. Remove the .plist file, need admin
#    3. Delete kalite executable symlinked.

KALITE_PLIST="org.learningequality.kalite.plist"
TEMP="/tmp"
LIBRARY="/Library/LaunchAgents"
TEMP_PLIST="$TEMP/$KALITE_PLIST"
LIBRARY_PLIST="$LIBRARY/$KALITE_PLIST"
KALITE_EXECUTABLE_PATH="$(which kalite)"


# Delete the .plist file.
if [ -f $TEMP_PLIST ]; then
    echo "Removing $TEMP_PLIST"
    sudo rm $TEMP_PLIST
else
    echo "$TEMP_PLIST not found."
fi

if [ -f $LIBRARY_PLIST ]; then
    echo "Removing $LIBRARY_PLIST"
    sudo rm $LIBRARY_PLIST
else
    echo "$LIBRARY_PLIST not found."
fi

# Delete the symlinked `kalite` executable.
# REF: http://stackoverflow.com/questions/21799441/test-if-executable-exists-in-unix
if which kalite > /dev/null 2>&1; then
    echo "Removing $KALITE_EXECUTABLE_PATH "
    sudo rm $KALITE_EXECUTABLE_PATH
else
    echo "kalite executable not found."
fi

# remove KALITE_PYTHON environment variable
echo "Unset the KALITE_PYTHON environment variable"
launchctl unsetenv KALITE_PYTHON

{'fraction_non_alphanumeric': 0.10458636948135448, 'fraction_numerical': 0.011144449207029576, 'mean_word_length': 4.304545454545455, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '1816581', 'n_tokens_mistral': 884, 'n_tokens_neox': 851, 'n_words': 218}