Learning CUDA: Workstation from Hell — Adventures with a Free GTX 1070

Posted on Sun 01 February 2026 in GPU, C/C++

Free Workstation? 🙋‍♂️ Count me in! I picked the free gaming workstation. Surprise twist—the HDMI output gave me no signal. Of course. The machine was a box of mysteries, but with an NVIDIA sticker on it, so I had a good hunch about the GPU.

I wasn't trying to build …


Continue reading

Visualization of Covid 19 cases in San Diego with Bokeh

Posted on Tue 21 April 2020 in Python • Tagged with Python, Visualization

Visualizing Covid-19 cases in San Diego by zip code using Bokeh


Continue reading

Understanding Probability and Randomness using a coin

Posted on Sat 18 April 2020 in Python, Statistics

I was refreshing my understanding of probability and random chance. I think that a simple experiment of tossing a coin and observing the result is very useful in understanding these concepts.

As we know a coin when tossed/flipped will result either in a HEAD or TAIL. So a simple …


Continue reading

VIM for Python Development

Posted on Sun 19 January 2020 in Python, Vim

I have been using VIM lately for software development in Python. I gave a lightening talk on my experiences using VIM at San Diego monthly meetup.

You can see my presentation slides here

You can see my reveal-js source here


Improving code using getters and setters in Python

Posted on Wed 04 December 2019 in Electronics

As I was migrating blog posts from my wordpress website to pelican based static website, I noticed an old python code written for communicating and controlling a Princeton Instruments Acton SP2150i Monochromator.

As I looked at the code, I noticed methods in the class such as get_nm() and set_nm(). I …


Continue reading

Calculating molarity, weight concentration from absorbance value for plasmonic nanoparticles in solution

Posted on Wed 20 June 2018 in Plasmonics

It is common to measure the peak absorbance of the plasmonic nanoparticles in solution and then get the following:

  1. Molarity (moles/liter)
  2. Number of particles per ml
  3. Weight concentration (ug/ml)

I wrote a small python function to extract these parameters.  The following inputs are needed for the function

  1. d_nm …

Continue reading

Creating Energy Band Diagrams for Solar cells and LED

Posted on Mon 11 September 2017 in Misc • Tagged with Python

Energy band diagrams are used to visulize the electron and hole transport in Solar cells and LED research. I want to quickly draw them and came up with a python module.

Here's an example on how to use this code.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10 …

Continue reading

Tab autocompletetion with python interpreter in bash terminal

Posted on Sat 29 October 2016 in Misc • Tagged with Linux, python

I want to tab autocomplete commands in my python interpreter within bash terminal. This is very useful when I import a module and just want to browse through the methods and autocomplete.

Found two ways to do it. Thanks to stack overflow posts.

Method 1 (as mentioned here):

This is …


Continue reading

Did I turn off the stove...ESP8266

Posted on Sat 08 October 2016 in Electronics • Tagged with ESP8266, IOT

My wife and I have a good meal and leave the house. After 20 minutes or so, we are in the car and I ask my wife, did we turn off the stove?

My wife answers…you were the last one to cook. What to do now? Go back home …


Continue reading

Coupled Dipole Approximation in Python

Posted on Wed 20 July 2016 in Plasmonics • Tagged with electromagnetism, Plasmonics, python

Coupled dipole approximation (CDA) method is a numerical method to calculate the optical properties (scattering and absorption) of interacting dipoles. This method is used in discrete dipole approximation method (like in DDSCAT software), where a big particle (also known as target) is broken into lot of interacting dipoles arranged in …


Continue reading