Cross-compiling Go binaries

A couple years back, a blog post was shared on Hacker News that talked about why a new startup was using Go for their backend service. It wasn’t about language features or scalability. It was simply the fact that Go’s toolchain is dead easy to use when it comes to cross-compiling static binaries. For example, if you’re working on an apple silicon laptop and want to “deploy” a service on a cloud VM, one simple way to do it would be to simply compile with the proper GOOS and GOARCH (for example, linux and amd64) and secure-copy the binary to the VM along with a single config file, and just run it....

<span title='2022-04-17 17:34:57 +0530 IST'>April 17, 2022</span>

Principal Component Analysis

In this, we will do a very short tour of PCA, mainly its computation. The scikit guide has some advanced details on the actual usage of PCA. Basic idea The goal of principal component analysis is to identify an orthogonal basis along which data points are spread out the most. For example, imagine a rugby ball mid-air. It’s tilted a little along some axis. Given a bag of 3-dimensional points (aka point-cloud) that comprise the shape of the rugby ball at this very mid-air position and orientation, PCA will identify the three orthogonal vectors that best represent the spread of the points....

<span title='2022-01-29 20:05:05 +0530 IST'>January 29, 2022</span>

Einsum and Tensordot

In this note, I will collect some snippets and pseudocode that illustrate the operation of einsum and a similar cousin tensordot. (The section on tensordot is still a little rambling, will be updating it with better examples sometime) To get upto speed, two great articles that distill the einsum operation need to be read an in-depth introduction. https://ajcr.net/Basic-guide-to-einsum/ https://obilaniu6266h16.wordpress.com/2016/02/04/einstein-summation-in-numpy/ mean using einsum Unless you’re doing very low-level matrix manipulations, like implementing your own layers, you’re better off using a combination of already present functions like mean, sum, etc....

<span title='2022-01-21 03:21:06 +0530 IST'>January 21, 2022</span>

Archive

archives