<commit_before>#!/bin/bash
VENV_DIR="$HOME/.venvs"
# Activate venv and re-source PS1 from bash_prompt to get colored venv name.
function work() {
    source "$VENV_DIR/$1/bin/activate"
    source "$HOME/.bash_prompt"
}

# Pyvenv-3.4 is currently broken in Ubuntu 14.04. This script needs to be run to create new
# environments with pyvenv
function pyv() {
    if [ -d $VENV_DIR ]; then
        echo "Making directory for environments in $VENV_DIR"
        mkdir $VENV_DIR
    fi
    venv="$VENV_DIR/$1"
    echo "Creating virtual environment in $venv"
    if ! (pyvenv-3.4 --without-pip $venv); then
        echo "Something wrong happened"
        return
    fi
    source "$venv/bin/activate"
    curl https://bootstrap.pypa.io/get-pip.py | python
    deactivate
    work $1
}

function delete_venv() {
    rm -rf "$VENV_DIR/$1"
}<commit_msg>Ubuntu 15.04 doesn't require all the ninja stuff for pyvenv<commit_after>#!/bin/bash
VENV_DIR="$HOME/.venvs"
# Activate venv and re-source PS1 from bash_prompt to get colored venv name.
function work() {
    source "$VENV_DIR/$1/bin/activate"
    source "$HOME/.bash_prompt"
}

#################      OBSOLETE       #####################
###########################################################
# Pyvenv-3.4 is currently broken in Ubuntu 14.04. This script needs to be run to create new
# environments with pyvenv
# function pyv() {
#     if [ -d $VENV_DIR ]; then
#         echo "Making directory for environments in $VENV_DIR"
#         mkdir $VENV_DIR
#     fi
#     venv="$VENV_DIR/$1"
#     echo "Creating virtual environment in $venv"
#     if ! (pyvenv-3.4 --without-pip $venv); then
#         echo "Something wrong happened"
#         return
#     fi
#     source "$venv/bin/activate"
#     curl https://bootstrap.pypa.io/get-pip.py | python
#     deactivate
#     work $1
# }
##############################################################

function pyv() {
    if [ -d $VENV_DIR ]; then
        echo "Making directory for environments in $VENV_DIR"
        mkdir $VENV_DIR
    fi
    venv="$VENV_DIR/$1"
    echo "Creating virtual environment in $venv"
    if ! (pyvenv-3.4 $venv); then
        echo "Something wrong happened"
        return
    fi
    work $1
}


function delete_venv() {
    rm -rf "$VENV_DIR/$1"
}
{'fraction_non_alphanumeric': 0.17737676056338028, 'fraction_numerical': 0.014964788732394365, 'mean_word_length': 2.8987993138936536, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '874738', 'n_tokens_mistral': 777, 'n_tokens_neox': 727, 'n_words': 217}