Index ¦ Archives ¦ Atom > Author: Amit Saha

Data in CPython

When writing programs in Python (CPython), you have access to data types such as a int, str, tuple, list and a dict. It is fairly obvious what each of these data types would be used to represent: an int data type would represent an integer and a list would represent …

Quick and dirty debian packages for your Golang application

In this post, we will learn about a quick and easy workflow for building and deploying your golang applications as Debian packages. The packages produced will not be official quality DEB packages.


I have been using dep for dependency management, and I assume that you are doing the same …

Your options for monitoring multi-process Python applications with Prometheus

In an earlier article, Monitoring Your Synchronous Python Web Applications Using Prometheus, I discussed a limitation of using the Python client for prometheus.

Limitation of native prometheus exporting

prometheus was built with single process multi-threaded applications in mind. I use the term multi-threaded here to also include coroutine based concurrent …

Linux System Mining with Python

In this article, we will explore the Python programming language as a tool to retrieve various information about a system running Linux. Let's get started.

Which Python?

When I refer to Python, I am referring to CPython 2 (2.7 to be exact). I will mention it explicitly when the …

Setting up OpenVPN client with systemd template unit files

First, I installed openvpn:

$ sudo dnf  -y install openvpn

Then, I used the following systemd unit file from here to create a systemd service for creating a new VPN connection on Fedora 27:

$ cat /etc/systemd/system/openvpn@.service 

Description=OpenVPN service for %I …

Tip: Terraform and AWS Security Group rules in EC2 classic

When using Terraform's aws_security_group_rule with EC2 classic, you may get an error saying that the source security group doesn't exist, even though it does. That's probably because you (like me and others) used the source security group ID and not the security group name, like so:

resource "aws_security_group_rule" "my_sg_rule" {
  type …

Compilation and Interpretation in C and CPython

It is common knowledge that programs written in high level languages have to be translated into a low level language using programs referred to as translators. This low level language is either in a native form, in the sense that it is understood by the operating system itself, or in …

Tip: MySQL - Too many connections

If you are getting the "Too many connections" error, couple of things worth checking on the MySQL server:

mysql> show processlist;

The above will show the currently open connections. The second is:

mysql> show variables like "max_connections";

The above will show the configured max_connections allowed. When you get this error …

Using Travis CI to publish to GitHub pages with custom domain

As of yesterday, this blog is automatically being published via Travis CI. When I push a new commit to my GitHub repository it triggers a new build in Travis CI. The build completes and the the git repository is then updated with the generated output (mostly HTML with some static …

Tip: Rotating video frames using iMovie

I had to rotate a few video frames using iMovie. The instructions for rotating the frames were working, but the rotation was being applied to "neighboring" frames as well. It turns out the trick is to use "split clip" to split a frame so that you can isolate the exact …

© Amit Saha. Built using Pelican. Customised theme based on the one by Giulio Fidente on github.