<commit_before>VIRTUALENV_HOME=~/.pyenv

function venv_alias {
    name=`basename $venv`
    alias $name="source $venv/bin/activate"
    alias ${name}_refresh="deactivate 2>&1 >/dev/null; rm -rf $venv && virtualenv $venv && source $venv/bin/activate"
    alias ${name}_lib="ls $venv/lib/python*/site-packages"
}

for venv in $VIRTUALENV_HOME/*; do venv_alias $venv; done
alias lv='ls $VIRTUALENV_HOME'

function mkvenv {
	name=$1
	if [ -d $VIRTUALENV_HOME/$name ]; then
		echo "virtualenv $name already exists"
		return 1
	fi
	virtualenv $VIRTUALENV_HOME/$name
	venv_alias $VIRTUALENV_HOME/$name
}

function rmvenv {
	name=$1
	if [ -d $VIRTUALENV_HOME/$name ]; then
		echo "Removing virtualenv $name"
		rm -rf $VIRTUALENV_HOME/$name
		unalias $name
		unalias ${name}_refresh
		unalias ${name}_lib
	else<commit_msg>Fixed missing definition of $venv in venv_alias function.<commit_after>VIRTUALENV_HOME=~/.pyenv

function venv_alias {
    venv=$1
    name=`basename $venv`
    alias $name="source $venv/bin/activate"
    alias ${name}_refresh="deactivate 2>&1 >/dev/null; rm -rf $venv && virtualenv $venv && source $venv/bin/activate"
    alias ${name}_lib="ls $venv/lib/python*/site-packages"
}

for venv in $VIRTUALENV_HOME/*; do venv_alias $venv; done
alias lv='ls $VIRTUALENV_HOME'

function mkvenv {
	name=$1
	if [ -d $VIRTUALENV_HOME/$name ]; then
		echo "virtualenv $name already exists"
		return 1
	fi
	virtualenv $VIRTUALENV_HOME/$name
	venv_alias $VIRTUALENV_HOME/$name
}

function rmvenv {
	name=$1
	if [ -d $VIRTUALENV_HOME/$name ]; then
		echo "Removing virtualenv $name"
		rm -rf $VIRTUALENV_HOME/$name
		unalias $name
		unalias ${name}_refresh
		unalias ${name}_lib
	else
{'fraction_non_alphanumeric': 0.13064133016627077, 'fraction_numerical': 0.006532066508313539, 'mean_word_length': 4.470779220779221, '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': '1654586', 'n_tokens_mistral': 677, 'n_tokens_neox': 640, 'n_words': 153}