Join the discussion on X . I recently came across microgpt - a single-file, python-only training script for a GPT model. What stood out to me were 40 or so lines that implemented autograd. That is, calculating gradients of computations done in code, automatically. Autograd is not novel ( python autograd ). It underpins every single deep learning library ( jax , torch , tensorflow , and yes, numpy…
In this post, I will derive entropy from first principles. This requires no more than a high school-level understanding of mathematics. This derivation is based on Shannon’s original seminal paper, A mathematical theory of communication . Play with this widget illustrating entropy. In this post we will figure out how this works. Entropy for a distribution Categories (k) 50 Draw a probability…
I have often been stumped at one stage of personal software projects: sharing with others. It goes one of three ways: I come up with a fun idea and make a prototype. The repo is up on github. Anyone who wants to use it will clone it, recreate the environment, and execute on their machine. Many times the work to set up the project demo is not worth the utility of the actual demo.
Lately I have been working with generative AI applications for work and personal projects. I learned a lot. But, I found learning and application stressful. I had envisioned going on a leisurly drive to sightsee and sample what GenAI has to offer. I quickly found myself in a golf cart on the Machine Learning freeway. Made with GenHI (Human Intelligence) We are living in a gold rush of foundation…
This was my first year at IBPSA SimBuild. Three days of interesting sessions on multidiscipinary domains. I and my colleague were presenting on the application of Large Language Models to Building Energy Modeling (BEM). The following are some quick and dirty notes. I naturally paid more attention to talks I found more interesting, given my background. I have a background in reinforcement learning…
A friendly drone capable of awesome feats of aerodynamics. This article describes drone physics. Audience should have familiarity with introductory linear algebra, introductory calculus, and introductory classical mechanics. This work was adapted from my research in adaptive control and publication at AIAA DASC 2023 about multirotor , a python simulation framework for drones. The notation here…
In this post, I talk about running python code on a “soft” air-gapped system. For the final script, scroll to the end. For research with the Department of Defense (DoD) and the University of Tennessee, Knoxville (UTK), I worked with restricted data. The DoD was very strict about who had access to the data. After much negotiation and bureaucratic back-and-forth, the data were placed…
Generated by DALL.E 3 Behind every strong, graceful aircraft is a mechanic. Likely a team of mechanics who work diligently to maintain the machine. Maintenance is not about fixing a problem after it occurs, but preventing one from occurring in the first place. That requires tracking the state of the vehicle and stepping in to fix things periodically. A research project I am contracted on is to…
I like love playing tennis. One tennis event I go to is very popular. It gets posted online a week ahead, at a random time late in the morning. Within an hour of the post going online, all spots are taken up. I want to play every week. My current solution is to rely on a carefully cultivated clique of confidants who will text me when the next event is up.
Things you’ll need: A dynamic DNS service A router A local desktop A remote computer Audience for this post: people who have used SSH before. Often times I have found myself wanting to access a computer at home while I am traveling. There are options like TeamViewer, which let me control my computer’s screen from afar. But, I want something more convenient over the command line, like…
News 2025-04 : I joined Google in a Software Engineer role and moved to the San Francisco Bay area. 2025-01 : I gave a talk at Trane Technologies’ Data Science Forum on anomaly detection algorithms and presented a case study using data from rooftop refrigeration units. 2024-11 : I spoke at Applied AI conference in November. My talk was on optimizing differentiable supply chains and using…
The state equation for a linear time-invariant system: $$ x’(t) = A x(t) + B u(t) $$ Can be solved for $x(t)$. We collect all terms in $x$: $$ x’(t) - A x(t) = B u(t) $$ Multiply equation by $e^{-At}$ $$ x’(t) e^{-At} - A x(t) e^{-At} = B u(t) e^{-At} $$ Using product rule $d(f;g) = f;dg + g;df$, where: $$ \begin{align*} df = - A e^{-At} \rightarrow & f = e^{-At} \\ dg = x'(t)…
In modern control approaches, systems are analyzed in time domain as a set of differential equations. Higher order differential equations are decomposed into sets of first order equations of state variables that represent the system internally. This produces three sets of variables: Input variables are stimuli given to the system. Denoted by $u$. Output variables are the result of the current…
A transfer function relates the output of a system to its input when it is represented in the Laplace domain. An assumption is made that initial steady-state response is 0. If $Y(s)$ is the output of a system, $X(s)$ is the input, then the transfer function is: $$ H(s) = \frac{Y(s)}{X(s)} $$ Example - A Car A car as a system: The input is the acceleration. The output is the total distance…
Classical control methods simplify handling of a complex system by representing it in a different domain. The equations governing system dynamics are transformed into a different set of variables. A for a function $f(t)$ in the $t$ domain, an oft used transformation is of the form: $$ \mathcal{T}(f(t)) = F(s) = \int_{Domain} f(t) \cdot g(s, t); dt $$ Mathematically, the integral removes the $t$…
Overview of control theory A control system is a mechanism that dictates the behaviour of another system. A controller relies on signals it can measure to estimate performance of the system. In response it sends out signals that influence the system towards the desired state. A controller is designed by modelling a system as a set of differential equations in time. By analysing that model, a…
Reinforcement Learning (RL) is one of the many ways to implement artificial intelligence (AI). AI is the design of “intelligent” agents that maximize their chances of success at some goal. The goal can belong to any problem: from winning a game of tic-tac-toe, to recognizing speech, to steering a car. A problem can be approached in many different ways. An agent can search for all…
The echochamber effect is a worrisome issue in social media. It risks isolating users in exclusive groups as they repeatedly subscribe to content that reinforces their biases. To keep users engaged, websites expose users to content similar to their history. You will get recommendations for movies you may like, or peoply you may befriend, or communities you may join - all based on some measure of…
As of the writing of this post, I maintain this site using my very own theme created in hugo. Hugo is a static site generator. It takes a bunch of plain text, applies a theme, and renders it as HTML. This is opposed to applications like Wordpress that assemble a page each time its served, to put it simply. This compute once, use many times approach saves on processing time and makes a site more…
Balancing in algorithms refers to minimizing the complexity of an algorithm by making sure that its constituent parts share the load efficiently. It is not a technique for solving problems. Instead it helps us understand how an existing solution may be optimized. The theory of balancing Say there is a problem of size \(n\). The problem is such that it can be broken down into a sequence of smaller…
According to httparchive the average size of a web page in 2016 was around 2.5MB. Now this may not seem a lot in this age where the internet is the primary media delivery platform - but it is worth noting that most web pages serve text as their primary content. Looking at the report sheds light on what constitutes an average web page: The HTML content takes up around 50-60kB. Images,…
Note: This article was originally published on astroibrahim on April 17, 2013. Yes. A few days back, a friend shared an article with me. It talked of how scientists had managed to achieve temperatures below absolute zero. Does it mean that temperature has to be redefined? Has our understanding of thermodynamics been flawed for the past hundred years. No, it turns out. It is all a matter of…
Note: This article was originally published on astroibrahim on Apr 10, 2013. I always wondered why doesn’t the sun slow space probes down when they are leaving the Earth for outer planets. Isn’t there a risk that the probe might change its trajectory and fall into the sun? There is. You see, the more distant the space probe gets from the Sun, the more potential energy it gains. However, energy…
I recently renewed work on my first ever github project . Over the course of a whole year when that project was dormant, I’d learned some new tricks. I now try to focus on writing tests for my projects. It is immensely convenient when I add features here and there and need to check the whole code for errors. Anyways, my project requires API keys to imgur.com. However I do not want to hard-code…
This past year, I have been crunching data from dark matter simulations . Data size can get pretty large when it comes to scientific computing. As I write this post, I have a script running on 3.8 TB (that’s right – 3,700 gigabytes) of cosmic particles. At these levels one starts thinking about parallelizing computations. And therein lay my dilemma and a soon to be learned lesson.
This semester I am taking a course in High Performance Computing where I get to work with multi-core systems like computing clusters and graphics cards. For my final project I decided to develop a random text generator and see if I could speed it up. A popular method of generating random text (that is grammatically correct) is using Markov chains .
SatTrack is the software-side of my senior engineering project at Vanderbilt University. I led a team of 4 students to design a software-defined radio system that can track and receive scientific data from cube satellites. Poster for the project. SatTrack provides the front/back end of the entire interface. The software can be run from any system that supports Python. It calculates satellite…
I have always been fascinated with mobile app development. Over the last couple of years in college, I made a few attempts to get started with Android applications. I watched tutorial series, reading blogs, attending introductory workshops. Nope. Nothing seemed to stick. What was wrong?
I am taking a High Performance Computing course this semester. For that we have to ssh into the university s computing cluster. The interface is entirely console based. Now that might seem awesome at first: typing away commands like a hacker . And it is awesome. But after a while it gets tiring, particularly when I am writing code.
This year I am leading a senior design team in developing a software defined radio that can talk with a satellite that Vanderbilt just launched . Compared to a normal radio, an SDR has most of the signal processing functions implemented virtually. This means that it can change its operation on the fly. An interesting application of SDRs is cognitive radio: that is, radios communicating with other…
Over the last weekend, I was looking to brush up my web-dev skills (what little I had learned on the side). I decided to make a simple web app for my residents to use (I am a Resident Advisor). Objective: Display tips, event news, free food notifications provided regularly by RAs and faculty to residents on a website.
Say you are an up and coming web developer. You want to make a web app that can access content on other sites. Perhaps you want to make a word cloud from a news article on BBC. Or you want to see what videos a site has embedded within itself. You could achieve that by doing some server side voodoo. The ‘standard’ way to go about it would be to download the site to your server and then serve its…
UNIVERSE is an Agent Based Model of population dynamics of alien space-faring civilizations in the galaxy. It simulates how civilizations may interact with each other given limited resources. I developed this for my Modeling and Simulation course with my partner Michael Schoenfield. The model considers resources, technology, trade, and war when deciding on behavior of each civilization. A…