<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Python Hacks on DataThrillz</title><link>https://datathrillz.com/categories/python-hacks/</link><description>Recent content in Python Hacks on DataThrillz</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 15 Feb 2021 17:18:46 +0000</lastBuildDate><atom:link href="https://datathrillz.com/categories/python-hacks/index.xml" rel="self" type="application/rss+xml"/><item><title>Binder &amp; Repl.it</title><link>https://datathrillz.com/posts/2021-02-15-binder-repl-it/</link><pubDate>Mon, 15 Feb 2021 17:18:46 +0000</pubDate><guid>https://datathrillz.com/posts/2021-02-15-binder-repl-it/</guid><description>&lt;p&gt;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.&lt;/p&gt;
&lt;h1 id="binder"&gt;&lt;strong&gt;Binder&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;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.&lt;/p&gt;</description></item><item><title>Export Images to PowerPoint in Python</title><link>https://datathrillz.com/posts/2020-10-26-export-images-to-powerpoint-in-python/</link><pubDate>Mon, 26 Oct 2020 16:44:51 +0000</pubDate><guid>https://datathrillz.com/posts/2020-10-26-export-images-to-powerpoint-in-python/</guid><description>&lt;p&gt;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. &lt;/p&gt;</description></item><item><title>Exporting Richly Formatted Text In Python</title><link>https://datathrillz.com/posts/2020-10-07-exporting-richly-formatted-text-in-python/</link><pubDate>Wed, 07 Oct 2020 22:36:50 +0000</pubDate><guid>https://datathrillz.com/posts/2020-10-07-exporting-richly-formatted-text-in-python/</guid><description>&lt;p&gt;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.&lt;/p&gt;</description></item><item><title>Fun Hacks for your Python Console</title><link>https://datathrillz.com/posts/2020-09-12-fun-hacks-for-your-python-console/</link><pubDate>Sat, 12 Sep 2020 12:37:09 +0000</pubDate><guid>https://datathrillz.com/posts/2020-09-12-fun-hacks-for-your-python-console/</guid><description>&lt;h2 id="hack-1-color-text-in-your-terminal"&gt;Hack #1: Color Text in Your Terminal &lt;/h2&gt;
&lt;p&gt;You can change the colors of text shown in your Python terminal console using ANSI escape character sequences! Or you can use the &lt;a href="https://pypi.org/project/colorama/"&gt;colorama&lt;/a&gt; library to make the process a bit easier and more streamlined. Colorama works across all the platforms i.e. Windows, Mac OS and Unix.&lt;/p&gt;
&lt;p&gt;First, we import the modules that we need from colorama.
[code]
from colorama import Fore, Back, Style
[/code]&lt;/p&gt;</description></item></channel></rss>