<commit_before>#!/bin/sh

#=====================================================================
# install into ~/.bash_profile.
#=====================================================================

if [[ -z "$sospath" ]]; then
echo "# Add this to the bottom of your ~/.bash_profile file:"
echo ""

read -r -d '' sos_bash_profile <<EOF
#=====================================================================
# github.com/atcat/sos
#=====================================================================
sospath="`pwd`"
source "\$sospath/sos.sh"
#source "$sospath/atcat/.bash_profile" 
unset sospath
EOF
cat <<EOF
$sos_bash_profile

EOF

read -r -p "Add that to your ~/.bash_profile now? [Y/n] " response
if [[ ${response:-Y} =~ ^([yY][eE][sS]|[yY])$ ]]
then
cat >>"$HOME/.bash_profile" <<EOF
$sos_bash_profile
EOF
fi

exit 1
fi


#=====================================================================
# sourcing into ~/.bash_profile
#=====================================================================

# add sos/bin to PATH.
export PATH="$PATH:$sospath/bin"

# add sos/atcat/bin to PATH and PYTHONPATH.
export PATH="$PATH:$sospath/atcat/bin"
export PYTHONPATH="$PYTHONPATH:$sospath/atcat/bin"

<commit_msg>improved ~/.bash_profile sos detection<commit_after>#!/bin/sh

#=====================================================================
# install into ~/.bash_profile.
#=====================================================================

if [[ -z "$sospath" ]]; then
if [[ -z "`cat $HOME/.bash_profile | grep '^sospath='`" ]]; then

echo "# Add this to the bottom of your ~/.bash_profile file:"
echo ""

read -r -d '' sos_bash_profile <<EOF
#=====================================================================
# github.com/atcat/sos
#=====================================================================
sospath="`pwd`"
source "\$sospath/sos.sh"
#source "\$sospath/atcat/.bash_profile" 
unset sospath
EOF
cat <<EOF
$sos_bash_profile

EOF

read -r -p "Add that to your ~/.bash_profile now? [Y/n] " response
if [[ ${response:-Y} =~ ^([yY][eE][sS]|[yY])$ ]]
then
cat >>"$HOME/.bash_profile" <<EOF
$sos_bash_profile
EOF
fi

exit 1
fi
fi


#=====================================================================
# sourcing into ~/.bash_profile
#=====================================================================

# add sos/bin to PATH.
export PATH="$PATH:$sospath/bin"

# add sos/atcat/bin to PATH and PYTHONPATH.
export PATH="$PATH:$sospath/atcat/bin"
export PYTHONPATH="$PYTHONPATH:$sospath/atcat/bin"


{'fraction_non_alphanumeric': 0.45443692797453245, 'fraction_numerical': 0.0007958615200955034, 'mean_word_length': 6.7592592592592595, 'pattern_counts': {'":': 0, '<': 15, '<?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': '1123642', 'n_tokens_mistral': 837, 'n_tokens_neox': 742, 'n_words': 171}