<commit_before># .bashrc

alias py='/usr/bin/env python2'
alias server.py='python2 -m SimpleHTTPServer'

# let's you re-use pip downoads between branches
export PIP_DOWNLOAD_CACHE=$HOME/cache/pip

alias pydoc8080="pydoc2 -p 8080"

alias pyibook='ipython2 notebook'

alias py-profile="time python -m cProfile"

venv_on(){
  [ ! -s ./.venv ] && virtualenv2 .venv
  source .venv/bin/activate
  export _TMP_VENV_PATH=$PATH
  export PATH=$PWD/.venv/bin:$PATH
}
alias venv2_on="venv_on"
venv3_on(){
  [ ! -s ./.venv ] && virtualenv3 .venv
  source .venv/bin/activate
  _TMP_VENV_PATH=$PATH
  PATH=$PATH:$PWD/.venv/bin
}

venv_off(){
  deactivate
  if [[ ! -z $_TMP_VENV_PATH ]]; then
    PATH=${_TMP_VENV_PATH}
  fi
}

venv_anon(){
  HOME_VIRTUALENV="${HOME}/.virtualenvs"
  ANON_VIRTUALENV="${HOME_VIRTUALENV}/anon"
  if [ ! -d ${HOME_VIRTUALENV} ]; then
    mkdir -p ${HOME_VIRTUALENV}
  fi
  [ ! -s ${ANON_VIRTUALENV} ] && virtualenv2 ${ANON_VIRTUALENV}
  source ${ANON_VIRTUALENV}/bin/activate
  export _TMP_VENV_PATH=$PATH
  export PATH=${ANON_VIRTUALENV}/bin:$PATH<commit_msg>[shell_profile] venv_on refactored<commit_after># .bashrc

alias py='/usr/bin/env python2'
alias server.py='python2 -m SimpleHTTPServer'

# let's you re-use pip downoads between branches
export PIP_DOWNLOAD_CACHE=$HOME/cache/pip

alias pydoc8080="pydoc2 -p 8080"

alias pyibook='ipython2 notebook'

alias py-profile="time python -m cProfile"

venv_on_for(){
  local VENV_PATH="$1"
  [ ! -s "${VENV_PATH}" ] && virtualenv2 "${VENV_PATH}"
  source "${VENV_PATH}/bin/activate"
  export _TMP_VENV_PATH="${PATH}"
  export PATH="${VENV_PATH}/bin:${PATH}"
}

venv_on(){
  local VENV_PATH="${PWD}/.venv"
  venv_on_for "${VENV_PATH}"
}
alias venv2_on="venv_on"
venv3_on(){
  [ ! -s ./.venv ] && virtualenv3 .venv
  source .venv/bin/activate
  _TMP_VENV_PATH=$PATH
  PATH=$PATH:$PWD/.venv/bin
}

venv_off(){
  deactivate
  if [[ ! -z $_TMP_VENV_PATH ]]; then
    PATH=${_TMP_VENV_PATH}
  fi
}

venv_anon(){
  HOME_VIRTUALENV="${HOME}/.virtualenvs"
  ANON_VIRTUALENV="${HOME_VIRTUALENV}/anon"
  if [ ! -d ${HOME_VIRTUALENV} ]; then
    mkdir -p ${HOME_VIRTUALENV}
  fi
  [ ! -s ${ANON_VIRTUALENV} ] && virtualenv2 ${ANON_VIRTUALENV}
  source ${ANON_VIRTUALENV}/bin/activate
  export _TMP_VENV_PATH=$PATH
  export PATH=${ANON_VIRTUALENV}/bin:$PATH
{'fraction_non_alphanumeric': 0.1579402855906534, 'fraction_numerical': 0.015144958892254435, 'mean_word_length': 4.598062953995157, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2979805', 'n_tokens_mistral': 1009, 'n_tokens_neox': 962, 'n_words': 170}