<commit_before>#!/usr/bin/env bash
# env.sh


# Pre-functions to help $PATH handling.

# Source: What is the most elegant way to remove a path from the $PATH variable in Bash?
# Link: http://stackoverflow.com/q/370047
path_append ()  { path_remove $1; PATH="$PATH:$1"; }
path_prepend () { path_remove $1; PATH="$1:$PATH"; }
path_remove ()  { PATH=`echo -n $PATH | awk -v RS=: -v ORS=: '$0 != "'$1'"' | sed 's/:$//'`; }

ifValidAppendToPath() { [ -d "$1" ] && path_append "$1" }
ifValidPrependToPath() { [ -d "$1" ] && path_prepend "$1" }

ifValidAppendToPath "/usr/bin"
ifValidAppendToPath "/usr/local/sbin"
ifValidAppendToPath "/usr/local/share/python"
ifValidAppendToPath "/opt/local/bin"
ifValidAppendToPath "/opt/local/sbin"
ifValidAppendToPath "/usr/local/git/bin"
ifValidAppendToPath "${HOME}/.local/bin"
ifValidAppendToPath "/usr/local/include"
ifValidAppendToPath "/Applications/Xcode.app/Contents/Developer/usr/bin"
ifValidAppendToPath "/Applications/Unity/MonoDevelop.app/Contents/MacOS"
ifValidAppendToPath "/Applications/Unity/MonoDevelop.app/Contents/Frameworks/Mono.framework/Commands/"
ifValidAppendToPath "$__BG_PLUGIN_PATH/bin"

# Homebrew
ifValidAppendToPath "${HOMEBREW_HOME}/bin"
ifValidAppendToPath "${HOMEBREW_HOME}/sbin"

# export PATH
export PATH

# Python
[ -f "${HOME}/.pythonrc" ] && export PYTHONSTARTUP="${HOME}/.pythonrc"

# virtualenvwrapper
# export VIRTUALENVWRAPPER_PYTHON=$(which python)
# export WORKON_HOME=$HOME/.virtualenvs
# [ -f /usr/local/bin/virtualenvwrapper.sh ]  && . /usr/local/bin/virtualenvwrapper.sh
# # [ -f /usr/local/share/python/virtualenvwrapper_lazy.sh ]  && source /usr/local/share/python/virtualenvwrapper_lazy.sh
# # export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--distribute --python=/usr/local/Cellar/python/2.7.3/bin/python'
# export PIP_RESPECT_VIRTUALENV=true

# # disable PS1 append by the activate hook from virtualenvwrapper
# export VIRTUAL_ENV_DISABLE_PROMPT=' '

<commit_msg>Removed all the settings for virtualenv and virtualenvwrapper (pythonbrew already have environment settings.)<commit_after>#!/usr/bin/env bash
# env.sh


# Pre-functions to help $PATH handling.

# Source: What is the most elegant way to remove a path from the $PATH variable in Bash?
# Link: http://stackoverflow.com/q/370047
path_append ()  { path_remove $1; PATH="$PATH:$1"; }
path_prepend () { path_remove $1; PATH="$1:$PATH"; }
path_remove ()  { PATH=`echo -n $PATH | awk -v RS=: -v ORS=: '$0 != "'$1'"' | sed 's/:$//'`; }

ifValidAppendToPath() { [ -d "$1" ] && path_append "$1" }
ifValidPrependToPath() { [ -d "$1" ] && path_prepend "$1" }

ifValidAppendToPath "/usr/bin"
ifValidAppendToPath "/usr/local/sbin"
ifValidAppendToPath "/usr/local/share/python"
ifValidAppendToPath "/opt/local/bin"
ifValidAppendToPath "/opt/local/sbin"
ifValidAppendToPath "/usr/local/git/bin"
ifValidAppendToPath "${HOME}/.local/bin"
ifValidAppendToPath "/usr/local/include"
ifValidAppendToPath "/Applications/Xcode.app/Contents/Developer/usr/bin"
ifValidAppendToPath "/Applications/Unity/MonoDevelop.app/Contents/MacOS"
ifValidAppendToPath "/Applications/Unity/MonoDevelop.app/Contents/Frameworks/Mono.framework/Commands/"
ifValidAppendToPath "$__BG_PLUGIN_PATH/bin"

# Homebrew
ifValidAppendToPath "${HOMEBREW_HOME}/bin"
ifValidAppendToPath "${HOMEBREW_HOME}/sbin"

# export PATH
export PATH

# Python
[ -f "${HOME}/.pythonrc" ] && export PYTHONSTARTUP="${HOME}/.pythonrc"

{'fraction_non_alphanumeric': 0.1573066745074978, 'fraction_numerical': 0.010585122022934431, 'mean_word_length': 5.370786516853933, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1710503', 'n_tokens_mistral': 1259, 'n_tokens_neox': 1194, 'n_words': 233}