Debdeep Bhattacharya

View My GitHub Profile

Blog

Featured Posts


Recent Posts (5)

Writing with markdown and TeX

5 Apr 2025

[\newcommand{\xx}{\mathbf{x}} \newcommand{\R}{\mathbb{R}} \newcommand{\ww}{\boldsymbol{\omega}}] [\begin{CD} A @<<< B @>>> C\ @. @| @AAA\ @. D @= E \end{CD}] <p>New command (\xx) and (\R) and $\R$ and $\xx$ and so on and so forth and $\ww$ and $\lesssim$ $\textcolor{blue}{Hello}$ and $\boldsymbol{\omega}$</p> <p>Inline math: (x^2) vs $x^2$</p> <p>vs</p> [\begin{align} x^2 \end{align}] <p>vs</p> <p>\begin{align} x^2 \end{align}</p> <h1 id="tex-and-markdown-conversion-to-html-with-pandoc">Tex and markdown conversion to html with pandoc</h1> <ul> <li>To use latex goodies such…


3D plots in python

12 Apr 2022

Python library matplolib does a pretty good job.

3D scatter plot

from mpl_toolkits.mplot3d import Axes3D fig = plt.figure() ax = Axes3D(fig) ax.scatter(X, Y, Z, s = 10, linewidth = 1 ) ax.<span...


Python parallel processing with multiprocessing

5 Mar 2022

Say we have a function called write_img(t) that takes integer values. The for loop

for t in range(starting, ending): write_img(t) 

can be replaced by

from multiprocessing import Pool a_pool = Pool() a_pool.map(write_img, range(staring, ending)) 


Common git scenarios

15 Jan 2022

Removing a large file from the commit history

If you want to remove a large file from the repository which was accidentally committed and pushed to GitHub (possibly due to a sloppy .gitignore), do

git filter-branch --force --index-filter \ 'git rm --cached --ignore-unmatch path/to/file.jpg' \ --prune-empty --tag-name-filter cat -- --all 

Then, to delete the same in the remote repo,

git push origin --force --all 


Setting up vim in a local environment

14 Dec 2021

If you are working in a linux environment without superuser privileges, you can set up vim (or nvim) and its plugins in the following way.

vim

nvim