A paper is proposing that most elementary functions such as sin, cos, 1/x can be expressed as a combination of the following function and the constant 1. eml(x,y)=exp(x)−ln(y)eml(x,y) = exp(x) – ln(y) For example ln(x) can be written as eml(1, eml(eml(1, x), 1)). Let’s do a few experiments with this. A Basic Test Let’s write […]
Negative scaling is used to flip a shape horizontally or vertically. The process is a little counterintuitive. Let’s explore it here. Example Scenario Let us say that we have an orange arrow like this. The tip is at (300, 100) and the tail is at (100, 100). The SVG can be like this. After we […]
In this tutorial we will learn to use the XMLLite library to parse a XML file from a Win32 application. XMLLite is built into Windows and you do not need to install any additional packages to use it. The library uses an interesting pull parser which is different from SAX or DOM type parsing. Create […]
I recently shot a roll of EASTMAN DOUBLE-X motion picture film. My developer scanned the images as 16bit greyscale TIFF files. The high bit rate was great for post processing. The downside is that Google Photos doesn’t support those TIFFs. I needed to convert them to PNG. I saw this as a chance to create […]
SageMaker Studio spaces preserve your own files in between restarts. But, all custom packages installed using pip are lost when you stop and start a space. You can use a lifecycle script to re-install these packages every time a space is started. But the process of setting up lifecycle script is full of hidden problems […]
vLLM install guide mentions using WSL to run vLLM on Windows. I found that several additional steps are needed to get vLLM working in WSL. Here, we will learn how to run vLLM in WSL for a machine that has an NVIDIA GPU. Install a WSL Distro Install a fresh new Ubuntu WSL instance. Apply […]
In some embedded environments dynamic memory allocation is prohibited. I made this simple object pool that can work around that limitation. You pre-allocate a certain number of objects at compile time. At run-time you take an object from the pool and return it back when you are done with it. It has a few benefits: […]
Today we have a substring search algorithm implemented in modern C++. It has an average time complexity of O(n). In modern times memcmp will have better performance. This is just a fun exercise. The Algorithm Testing This will output.
Autoregression LLM models only predict one token at a time. The predicted token is then appended to the prompt and fed back into the model as input. This loop continues until the maximum number of tokens is generated. This process is called autoregression. Autoregression is a term used in ML where the value of a […]
In today’s post I will discuss how to deploy an app that is: This article applies to React Router v7. Things can change quickly in this world. Make sure this post applies to your situation. Create a Simple App We will create a basic React Router v7 app called simple-react-router-app and then deploy it in […]