<commit_before># Script for travis-CI Mac OS X specific setup.
# source this script with PYTHON_VERSION env variable set

if [ "$TRAVIS_OS_NAME" == "osx" ]; then

VENV_DIR=./venv

if [ "$PYTHON_VERSION" == "3" ];
then
# Use brew for python3
    brew upgrade python@3
    PYTHON_EXE=`brew list python@3 | grep "bin/python3$" | head -n 1`
    # Create virtual env
    $PYTHON_EXE -m venv $VENV_DIR
    source $VENV_DIR/bin/activate

# Alternative python installation using miniconda
    #curl -o miniconda_installer.sh "https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh"
    #bash miniconda_installer.sh -b -p miniconda
    #export PATH="`pwd`/miniconda/bin":$PATH
else
    brew upgrade python
    alias pip='pip2'
fi

fi
<commit_msg>Activate a virtual environment<commit_after># Script for travis-CI Mac OS X specific setup.
# source this script with PYTHON_VERSION env variable set

if [ "$TRAVIS_OS_NAME" == "osx" ]; then

VENV_DIR=./venv

if [ "$PYTHON_VERSION" == "3" ];
then
# Use brew for python3
    brew upgrade python@3
    PYTHON_EXE=`brew list python@3 | grep "bin/python3$" | head -n 1`
    # Create virtual env
    $PYTHON_EXE -m venv $VENV_DIR
    source $VENV_DIR/bin/activate

# Alternative python installation using miniconda
    #curl -o miniconda_installer.sh "https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh"
    #bash miniconda_installer.sh -b -p miniconda
    #export PATH="`pwd`/miniconda/bin":$PATH
else
    brew upgrade python
    python -m venv $VENV_DIR
    source $VENV_DIR/bin/activate
    curl https://bootstrap.pypa.io/get-pip.py | python
fi

fi

{'fraction_non_alphanumeric': 0.11049382716049383, 'fraction_numerical': 0.014197530864197531, 'mean_word_length': 3.7122093023255816, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, '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': '3659990', 'n_tokens_mistral': 619, 'n_tokens_neox': 596, 'n_words': 158}