Front-End

Resizing Image for Frontend with Python

We can optimise the load time by using different image sizes for different screen widths. There is no point in loading a huge image for a mobile when the width is only for 200px. Here is the quick Python script to resize images. By changing the array, you can output …

Data Engineering

Sending XML Payload and Converting XML Response to JSON with Python

If you need to interact with a REST endpoint that takes a XML string as a payload and returns another XML string as a response, this is the quick guide if you want to use Python. If you want to do it with Node.js, you can check out the post …

Front-End

Getting started with Selenium with Python

There are a few automation testing tools for web applications out there. Selenium is one of them and is probably most widely-used. It is the most famous and the oldest, but still relevant, automation testing tool. It is open-source and supports many different major programming languages, such as Java, C#, …

Data Engineering

Downloading All Public GitHub Gist Files

I used to use plug-ins to render code blocks for this blog. Yesterday, I decided to move all the code into GitHub Gist and inject them from there. Using a WordPress plugin to render code blocks can be problematic when update happens. Plugins might not be up to date. It …

Data Engineering

Exporting LaunchDarkly Flag List into a CSV File with Python

At the moment, LaunchDarkly does not have functionality to export a list of flags as csv or excel file. This can change very near future (it may already have the functionality by the time you are reading this post). The workaround is to use API to ingest the data. Here …

Infrastructure

Create Custom Python Module and Distribute with Git

When we create a custom Python module, we can distribute it through a Git repository. By using a private repo, you can keep your module private and use it in your deployment pipeline by calling pip install from the private repo. Pretty cool trick. In this example, I created a …

ETL

Running Jobs with Informatica Cloud REST API

Informatica Cloud offers REST API for us to interact with the platform programmatically. At this point in time, the latest official reference is found here. In this post, we are going to use Python to trigger jobs through API. Triggering a job is a 2-step process. We need to authenticate …

Data Engineering

A Comprehensive Guide for Reading and Writing JSON with Python

A Comprehensive Guide for Reading and Writing JSON with Python The json module enables you to read JSON object from a file or HTTP response and write it to a file. It is worthwhile to spend a little bit of time to understand a few key functions that are often …

Data Engineering

Testing and Prototyping for REST API Data Ingestion with JSONPlaceholder

JSONPlaceholder is a web service that offers REST API endpoints for example JSON data. If you needs to experiment with REST API quickly, this is a really great tool that you can use. It supports all the HTTP verbs. As for testing and prototyping REST API data ingestion, you can …

Data Engineering

How to Ingest FullStory Data Export Extracts with Python

If you are interested in user tracking on your website, FullStory is a pretty good option. You can sign up for the free version here. The free version includes heaps of cool features. When you first sign up, you can try all the Pro Edition features for 2 weeks, too. …