Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/mrgnw/dotfiles. My shell customizations - aliases, functions, and themes.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566zplugin ice OMZ::davidparsson/zsh-pyenv-lazy silent wait"0"zplugin load davidparsson/zsh-pyenv-lazy
jupy() {'jupyter notebook'}pi() {'pip install'}pu() {'pip uninstall'}pf() {'pip freeze'}
# allows pip install x[y]setopt +o nomatch
# find latest python3 version on pyenvPYTHON3_VERSION() { pyenv install -l | grep -e '3.[0-9].[0-9]' | grep -v - | tail -1 | awk '{$1=$1};1'}
py() { if [ "$#" -eq "0" ]; then python else python -m $@ fi}
# default installs for most projects+pips(){ pip install cython python-dotenv black}
# create venv, set as directory default+v() { pyenv virtualenv $(PYTHON3_VERSION) ${1:-${PWD##*/}} pyenv local ${1:-${PWD##*/}} +pips}
# activate env»() { local VENVNAME=${1:-${PWD##*/}} #$1 or current dir name if [ ! -d ~/.pyenv/versions/$VENVNAME ]; then +v else pyenv activate $VENVNAME fi}
# new python env with gitignore & directory+py() { # only mkdir + cd if specified if [ "$#" -ge 1 ]; then +d $1 fi +v & (curl https://www.gitignore.io/api/python >.gitignore)}
-v() { pyenv uninstall ${1:-${PWD##*/}}}
# fastapi starter+fast() { +py $1 pip install fastapi uvicorn}