<commit_before>source python/path.zsh
eval "$(pyenv init -)"

function plugin_install {
  if [[ ! -d ~/.pyenv/plugins/$2 ]]; then
    git clone $1 ~/.pyenv/plugins/$2
  fi
}

plugin_install git://github.com/pyenv/pyenv-doctor.git pyenv-doctor
plugin_install git://github.com/massongit/pyenv-pip-update.git pyenv-pip-update
plugin_install git://github.com/pyenv/pyenv-update.git pyenv-update

pyenv update
pyenv doctor || return 1

pyenv install --skip-existing 2.7.18
pyenv install --skip-existing 3.9.0
pyenv global 2.7.18

export PIP_CONFIG_FILE=~/.dotfiles/python/pip.conf
export VIRTUALENV_QUIET=1

pip install --upgrade pip
pip install --upgrade pdir
pip install --upgrade virtualenv
pip install --upgrade pipsi
pip install --upgrade pipenv
pyenv pip-update
pip install pathlib2==2.1.0 # for pipenv
pyenv rehash

function pipsi_install {
  [[ -d ~/.local/venvs/$2 ]] || pipsi --bin-dir=$HOME/bin install $1
}

pipsi_install cqlsh cqlsh
pipsi_install csvkit csvkit
pipsi_install http-prompt http-prompt
pipsi_install httpie httpie
pipsi_install httpstat httpstat
pipsi_install omnihash omnihash
pipsi_install pip-tools pip-tools
pipsi_install pydf pydf
pipsi_install Pygments pygments
pipsi_install shyaml shyaml

unset PIP_CONFIG_FILE
unset VIRTUALENV_QUIET<commit_msg>Switch to pipx from pipsi<commit_after>source python/path.zsh
eval "$(pyenv init -)"

function plugin_install {
  if [[ ! -d ~/.pyenv/plugins/$2 ]]; then
    git clone $1 ~/.pyenv/plugins/$2
  fi
}

plugin_install git://github.com/pyenv/pyenv-doctor.git pyenv-doctor
plugin_install git://github.com/massongit/pyenv-pip-update.git pyenv-pip-update
plugin_install git://github.com/pyenv/pyenv-update.git pyenv-update

pyenv update
pyenv doctor || return 1

pyenv install --skip-existing 2.7.18
pyenv install --skip-existing 3.9.0
pyenv global 2.7.18

export PIP_CONFIG_FILE=~/.dotfiles/python/pip.conf
export VIRTUALENV_QUIET=1

pip install --upgrade pip
pip install --upgrade pdir
pip install --upgrade virtualenv
pip install --upgrade pipx
pip install --upgrade pipenv
pyenv pip-update
pip install pathlib2==2.1.0 # for pipenv
pyenv rehash

pipx install cqlsh
pipx install csvkit
pipx install http-prompt
pipx install httpie
pipx install httpstat
pipx install omnihash
pipx install pip-tools
pipx install pydf
pipx install Pygments
pipx install shyaml

unset PIP_CONFIG_FILE
unset VIRTUALENV_QUIET
{'fraction_non_alphanumeric': 0.09616195698017714, 'fraction_numerical': 0.017714044706874738, 'mean_word_length': 4.440366972477064, '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': '873185', 'n_tokens_mistral': 906, 'n_tokens_neox': 829, 'n_words': 229}