Development Setup

code
setup
Author

Vaibhav Balloli

Published

July 12, 2022

My programming language of choice has mostly been Python lately, with dev both on Linux and Windows (and WSL) - both when I’m working on personal and professional projects. While some of it keeps me awake for quite a long time based on the criticality of the project, it becomes essential that the tools and commands I use are handy, ubiquitous and uniform across my machines. This post showcases some of these and will be updated continuously.

Key Principles

  1. Most of my setup follows some of the key learnings I’ve had here, here.

.bashrc

{% include info.html text=“Appended to the end of file.” %}

Pre-req: pip install gpustat (for gpu machines only)

alias dc='docker-compose'
alias dbuild='docker build . -t'
alias sbc='source ~/.bashrc'
addalias() {
    echo "alias ${1}" >> $HOME/.bash_aliases
} #Source: https://unix.stackexchange.com/a/153978

alias conda-dump='conda env export --no-builds | grep -v "^prefix: " > environment.yml' #dumps conda environment to environment.yml

alias gpuwatch='gpustat -i 5 -p'
alias killgpuproc='nvidia-smi | grep "python" | awk "{ print $5 }" | xargs -n1 kill -9'
alias killcpuproc='ps aux | grep "python" | awk "{ print $5 }" | xargs -n1 kill -9'

alias wandbstop='wandb disabled' #for debugging

addalias is particularly useful to quickly shift to projects in different folders.

Python

Libraries and Frameworks

  1. Numba - makes things go vroom.
  2. Fastcore - reduces regular boilerplate by quite a lot.
  3. Streamlit - host dashboard to present to multiple people asynchronously and remotely.
  4. Ray - large scale distributed code.
  5. Dask - host cluster on remote machines and send compute to these clusters. fast pandas alternative
  6. Sphinx - build and host documentation
  7. FastAPI - web framework of choice
  8. PostgreSQL - database of choice
  9. sqlalchemy - ORM of choice
  10. Hydra - config management
  11. Wandb/mlflow - experiment tracker personal/professional

Citation

BibTeX citation:
@online{balloli2022,
  author = {Balloli, Vaibhav},
  title = {Development {Setup}},
  date = {2022-07-12},
  url = {https://vballoli.github.io/research-recap//posts/dev-setup},
  langid = {en}
}
For attribution, please cite this work as:
Balloli, Vaibhav. 2022. “Development Setup.” July 12, 2022. https://vballoli.github.io/research-recap//posts/dev-setup.