Python Logging Under The Hood

08/07/2018 by Abhijit Gadgil

Python Logging module is perhaps one of the most widely used and often not so well understood module. While most of the things are documented quite well, sometimes it's easy to miss out a few things. Here we take a look at Python's Logging module in a bit more details, trying to get under the hood to figure out what's really happening.

read more

Python Project Workflows - Part 3 (pylint)

16/05/2018 by Abhijit Gadgil

In the first part we looked at a few challenges involved when developing a Python project in a collaborative environment. In the second part we looked at how Pipenv addresses some of those issues. In this part of the series we are going to take a closer look at how one can use code linting tools. Specifically we are going to be looking in details at using pylint.

read more

Python Project Workflows - Part 2 (Pipenv)

14/05/2018 by Abhijit Gadgil

In the first post, we looked at what are typical issues in setting up Python project workflows and took an overview of the tools of the trade. In this post, we are going to be looking closely at pipenv a tool for managing Python project dependencies. In particular we are looking at how pipenv will help us solve the problems of reproducible builds and managing dev and production environments properly.

read more

Python Project Workflows - Part 1

08/05/2018 by Abhijit Gadgil

In a Python based development, tools like pylint, pipenv and virtualenv become important pieces of your development workflow. In the first part of the series of blog posts, we look at overview of the issues that become important as the scope of the project and size of the team working on project increases. In later posts in these series, we would try to address these issues one by one, we look at starting a project, identifying and resolving dependencies 'correctly', why reproducible builds matter, how to separate development and production environment and eventually how to containerize the application.

read more

Using Python Context Manager for Profiling

24/08/2017 by Abhijit Gadgil

Profiling your code to identify hotspots or potential performance issues can prove quite useful. Python provides a cProfile package in the standard library provides this functionality for deterministic profiling. Usually, one might want to have an ability to turn profiling on and off at the run-time if possible. We explore a mechanism based on context managers in Python (Python with syntax) to be able to do so.

read more

So Vector Operations Are Fast, Right?

07/08/2017 by Abhijit Gadgil

Recently, for one of the projects we are working on, I was looking at processing data from Pandas panel. I wanted to find out certain items in a Panel based on certain criteria on the minor axis. I worked with two flavors and the findings for different data-sets are quite interesting. Something that would definitely qualify as an interesting learning. We discuss, how profiling can be successfully used to explain certain Performance behavior, that often looks counter-intuitive.

read more