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 it allows data scientists to share their work in Python , R or Julia in a reproducible manner. Binder can be configured for Python (Anaconda or pip environment) and R (using RStudio and/or Shiny). Multiple user interfaces can be specified. For example, for Python we can use a terminal or Jupyter notebook in the repo. ...

February 15, 2021 · 4 min

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 manually building reports or PowerPoint slides, one page at a time, we could automate the process. Let’s automatically create a slide deck containing plots created in Python. It’s not too hard, but there are a few tips that definitely make the process easier. We will use the python-pptx library read in template PowerPoint files and create new slides with exciting content. Python-pptx has the capability to add text, SmartArt, and other media formats to slides based on a template file. ...

October 26, 2020 · 6 min

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 this article, I will discuss potential approaches for getting a file with nice-looking colored text that can be programmatically generated. ...

October 7, 2020 · 5 min

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, we import the modules that we need from colorama. [code] from colorama import Fore, Back, Style [/code] ...

September 12, 2020 · 2 min