AUTOMATING WITH PYTHON

Automation saved me 110 hours of work. Here’s how!

Drafting a post on Instagram and uploading it takes around 30 minutes on average. Using Python, I saved myself almost full-time work of two and a half weeks, i.e. 140 hours using 70 lines of Python code.

Aayush Malik
2 min readAug 1, 2020

--

Photo by Digital Buggu from Pexels

Eliyahu Moshe Goldratt, Israeli management guru who had written some pioneering works in the fields of optimization keeping in mind the pervasive resources constraints, once thoughtfully remarked,

Automation is good, so long as you know exactly where to put the machine.

Python as a programming language has been one of the important languages used all over the world for automation. It is easy to read, learn, and write which makes it one of the most beginner friendly languages in the market. This is also one of the reasons I chose as the first programming language that I learnt. What separates it from its commercial paid alternatives is that it’s community driven, free, and open source, a truly democratic software. Furthermore, the language is good not just for artificial intelligence and machine learning, but also for generalized software development with applications ranging from games development to integrated web development.

If you have been following me around, you would know that just like Goldratt, I am a big fan of optimization too. Optimization of time, of resources, and also of money. Recently, I started an Instagram handle for supplementing my YouTube Channel German with Aayush. The task at hand included uploading the images of famous German places as a background and on top of them, word, meaning, sentence example in German as well as in English.

The first task I did was to find some images online on Pexels and Unsplash. Thereafter I found an online database of the words I wanted to have on my handle. This was an excellent open-source resource. The third was to generate a script that would do the following tasks step by step. (In technical words, it’s called algorithm)

  1. Import image from the repository of images.
  2. Crop the image.
  3. Add a rectangular layer on top of the image.
  4. Read the data from the database.
  5. Take values from the database and put them on the image at specified places.
  6. Export the final image.

In just five minutes, I obtained the first set of 100 words that I wanted to have for my channel. You can find the code hosted on my GitHub Repo here.

--

--

Aayush Malik
Aayush Malik

Written by Aayush Malik

Open Data | Causal Inference | Machine Learning | Data Visualization and Communication | https://www.linkedin.com/in/aayushmalik/

No responses yet