<commit_before>#! env cat
# $ /Users/jab/Library/Python/2.7/bin/ptpython --help
# ptpython: Interactive Python shell.
# Usage:
#     ptpython [ --vi ]
#              [ --config-dir=<directory> ] [ --interactive=<filename> ]
#              [--] [ <arg>... ]
#     ptpython -h | --help
#
# Options:
#     --vi                         : Use Vi keybindings instead of Emacs bindings.
#     --config-dir=<directory>     : Pass config directory. By default '~/.ptpython/'.
#     -i, --interactive=<filename> : Start interactive shell after executing this file.
#
# Other environment variables:
# PYTHONSTARTUP: file executed on interactive startup (no default)

. ~/hub/what/what.sh
. ~/jab/local/environ.sh

pt () {
    local __doc__="function to run https://github.com/jonathanslenders/ptpython, if installed"
    local _ptpython=
    what -q ptpython && _ptpython=$(what -f ptpython)
    [[ -z $_ptpython && -e $PTPYTHON ]] && _ptpython=$PTPYTHON
    [[ $1 != hub && -z $_ptpython && -d ~/hub/ptpython ]] && (cd ~/hub/pypython; python setup.py install) && pt hub
    if [[ $1 == -h || $1 == --help ]]; then
        $_ptpython -h
        return $?
    fi
    PT_CONFIG_DIR=$HOME/.config/ptpython
    [[ -d $PT_CONFIG_DIR ]] || mkdir -p $PT_CONFIG_DIR
    $_ptpython \
        --vi \
        --config-dir=$PT_CONFIG_DIR \
        --interactive=~/jab/src/python/ptpython.py \
        -- "$@"
}
<commit_msg>Allow ptpython to not recognise "~"<commit_after>#! env cat
# $ /Users/jab/Library/Python/2.7/bin/ptpython --help
# ptpython: Interactive Python shell.
# Usage:
#     ptpython [ --vi ]
#              [ --config-dir=<directory> ] [ --interactive=<filename> ]
#              [--] [ <arg>... ]
#     ptpython -h | --help
#
# Options:
#     --vi                         : Use Vi keybindings instead of Emacs bindings.
#     --config-dir=<directory>     : Pass config directory. By default '~/.ptpython/'.
#     -i, --interactive=<filename> : Start interactive shell after executing this file.
#
# Other environment variables:
# PYTHONSTARTUP: file executed on interactive startup (no default)

. ~/hub/what/what.sh
. ~/jab/local/environ.sh

pt () {
    local __doc__="function to run https://github.com/jonathanslenders/ptpython, if installed"
    local _ptpython=
    what -q ptpython && _ptpython=$(what -f ptpython)
    [[ -z $_ptpython && -e $PTPYTHON ]] && _ptpython=$PTPYTHON
    [[ $1 != hub && -z $_ptpython && -d ~/hub/ptpython ]] && (cd ~/hub/pypython; python setup.py install) && pt hub
    if [[ $1 == -h || $1 == --help ]]; then
        $_ptpython -h
        return $?
    fi
    PT_CONFIG_DIR=$HOME/.config/ptpython
    [[ -d $PT_CONFIG_DIR ]] || mkdir -p $PT_CONFIG_DIR
    $_ptpython \
        --vi \
        --config-dir=$PT_CONFIG_DIR \
        --interactive=$HOME/jab/src/python/ptpython.py \
        -- "$@"
}

{'fraction_non_alphanumeric': 0.17091295116772823, 'fraction_numerical': 0.003538570417551309, 'mean_word_length': 2.271990740740741, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 2, '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': '2431784', 'n_tokens_mistral': 980, 'n_tokens_neox': 954, 'n_words': 225}