Topic Archive

Modules

  • I was asked to help parse a JSON file that is delivered by the iTunes Store Customer Reviews API JSON endpoint. It is not so important how this API works or if there are better APIs for this. Instead, let’s assume that we found our favorite API to work with and that our request makes perfect sense and now we have to deal with the API’s response, JSON in this case. This article will guide you through the necessary steps to parse this JSON response into a pandas DataFrame. I will focus heavily on the concepts and code development and…


  • Facial Recognition with Python

    ·

    ·

    5 min read

    Identifying faces I was asked by Bob to write a guest article for the PyBites blog, so whilst this isn’t my first blog article, it is my first ever guest blog article of which I’m immensely proud and very pleased to have written for Pybites. In this article, I will detail how I used the face_recognition and Pillow modules to extract and then identify faces from a bunch of photographs. I want to credit Brad Traversy as this idea was originally taken from a Traversy Media video I had bookmarked a while ago and recently rewatched (link below this article).…


  • In this article I will share 3 libraries I often use to isolate my environment variables from production code. Why is this important? Separate config from code As we can read in The Twelve-Factor App / III. Config: Apps sometimes store config as constants in the code. This is a violation of twelve-factor, which requires strict separation of config from code. https://12factor.net/config Basically you want to be able to make config changes independently from code changes. We also want to hide secret keys and API credentials! Notice that git is very persistent (PyCon talk: Oops, I committed my password to GitHub)…


  • My wife is setting up a business from home and wanted to protect photos of her work submitted to social media sites and the web in general. “I can do that using Python!”, I exclaimed, thinking I had seen a tutorial showing how ages ago. Laptop open, I set to work and found my bookmarked tutorial. It was using OpenCV2 and even after ~70 odd days of my #100DaysOfCode journey, I didn’t really understand it well enough to configure it myself if I had to make changes. (OpenCV is on my list of things to do after my #100Days). I…


  • How Encoding Works in Python

    ·

    ·

    17 min read

    We all know that the computer cannot store letters or numbers so we need some kind of mapping from these letters/numbers to bit strings (the only thing a computer can understand). One such known mapping is ASCII. If you’re not sure about ASCII and Unicode, let Aviral give you an introduction …