Articles


Knowing my GPU

It's been quite some time since my last blog post. Work and life have kept me busy, and the rise of GenAI has made things especially hectic at work. Longing for a break from my routine, I decided to try something different and started tinkering with a free gaming PC …


Understanding Probability and Randomness using a coin

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 …

VIM for Python Development

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

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 …


  • Mon 11 September 2017
  • Misc

Creating Energy Band Diagrams for Solar cells and LED

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. from Band_diagram import metal, semiconductor, plot # Define the metals and …

  • Sat 29 October 2016
  • Misc

Tab autocompletetion with python interpreter in bash terminal

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 …

Did I turn off the stove...ESP8266

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 …

Fitting Complex Metal Dielectric Functions with Differential Evolution Method

// // ]]> The real and imaginary part of dielectric permittivity of the metals is important to simulate the optical properties of metal films and nanoparticles. Permittivity data is obtained experimentally by ellipsometry and is fitted with analytical models. The most common model for fitting experimental data is with Drude-Lorentz …