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
- 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
- Numba - makes things go vroom.
- Fastcore - reduces regular boilerplate by quite a lot.
- Streamlit - host dashboard to present to multiple people asynchronously and remotely.
- Ray - large scale distributed code.
- Dask - host cluster on remote machines and send compute to these clusters. fast pandas alternative
- Sphinx - build and host documentation
- FastAPI - web framework of choice
- PostgreSQL - database of choice
- sqlalchemy - ORM of choice
- Hydra - config management
- 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.