Posts

How to use Room Persistence library in Android using Kotlin

In this post, I will show you how to quickly add Room support for Room database in your app using Kotlin. There are quite a few articles on how to use Room but most of them are not up to date.

How to access files from Google Cloud Storage in Colab Notebooks

Recently, while working with a large dataset, I wanted to use Google Cloud Storage in my Colab notebook. In this post, I will show how to access these files in Google Colab Notebook.

Principal Component Analysis in MATLAB

Principal Component Analysis(PCA) is often used as a data mining technique to reduce the dimensionality of the data. In this post, I will show how you can perform PCA and plot its graphs using MATLAB.

How to find the day of the week for any Date?

In this post, I will show you how you can calculate the day of the week for any date using Zeller’s formula. The formula was proposed by a Reverend Zeller.

Controlling multiple LEDs using Raspberry Pi’s GPIO ports

In this post, I will explain how you can control multiple LED lights using a Raspberry Pi. The whole thing will hardly take 15–20 minutes if you have all the pieces of equipment.

How to Serialize Flask SQLAlchemy to JSON

Recently I was involved in developing a PPE response network built by The Luminosity Lab at Arizona State University. Its backend was built using Flask. This was my first time working on a Flask application and I was surprised that it is not trivial to elegantly serialize the database model classes to JSON.

Automate API testing using Postman Collection

Postman is a very popular tool used by a lot of developers to collaborate for API development. It is also a very powerful tool and can be used for end to end automated API testing.

How to SSH into an EC2 instance using Boto3

The simplest way to programmatically SSH into an EC2 instance is to using the Paramiko package. In this post, I will show you how to use this package to SSH with multiple retries and then execute your commands on it.

How to add HTTP Cache-Control Headers in Flask

Using caching can vastly improve the performance of your applications. There are different types of caching options available while developing Web applications but HTTP caching is one of the simplest ways to improve the performance of your application.

How to Host Multiple WordPress sites on Cloud

I have a few WordPress blogs, a couple of PHP based websites and a flask application. I recently decided to host all my websites in one place. Until recently I was using Amazon EC2 for some of these websites but it was proving to be quite costly so I decided to switch to Google Cloud.