python hacks

Binder & Repl.it

I recently discovered two great tools for easily creating interactive coding environments without installing a thing. These tools facilitate sharing of code in multiple languages and are wonderful resources for demonstrating programming concepts when teaching a course.  Binder The first tool is called Binder, is open-source and was released in 2017. It is awesome because […]

Export Images to PowerPoint in Python

Data Scientists spend a significant amount of time visualizing data for storytelling or conveying insights to end users of a data product. Often, the ability to succinctly and accurately explain the methods used and insights derived hinges on the medium of communication and time taken to prepare visualizations. In order to limit time spent on […]

Exporting Richly Formatted Text In Python

Today, I wondered whether I could automatically save an image of colored text from the Python console.  I was looking for a way to display very long strings that automatically wrapped to its container, so I avoided the dreaded run-on string that never ends. Also, could I save the image elegantly with high resolution? In […]

Fun Hacks for your Python Console

Hack #1: Color Text in Your Terminal  You can change the colors of text shown in your Python terminal console using ANSI escape character sequences! Or you can use the colorama library to make the process a bit easier and more streamlined. Colorama works across all the platforms i.e. Windows, Mac OS and Unix.  First, […]

Scroll to top