Delivered once every Week. No Spam Ever.

Issue - 125

Worthy Read

When you’ve written some great code, you might want to make this available for others to use as well. The pythonic way of sharing a package is making it available on PyPI. Let’s create a simple package and go through the process of publishing it!

Users finding bugs? Searching logs for errors? Find + fix broken code fast!.

Do less work when testing your Python code, but be just as expressive, just as elegant, and just as readable. The pytest testing framework helps you write tests quickly and keep them readable and maintainable—with no boilerplate code. Using a robust yet simple fixture model, it’s just as easy to write small tests with pytest as it is to scale up to complex functional testing for applications, packages, and libraries. This book shows you how.

Movies are magic, and Python is part of what makes that magic possible. We go behind the curtain this week with Dhruv Govil to learn about how Python gets used to bring a movie from concept to completion. He shares the story of how he got started in film, the tools that he uses day to day, and some resources for further learning.

I demonstrate the power of the Google BigQuery engine by building a classifier which will predict whether a NY city taxi ride will result in a generous tip or no tip at all. As part of doing this I explore the dataset and look at relationships in the dataset. I also visualize the pickups around the city and the result is a scatterplot which essentially draws the city streets of NY.

Daniel ( Co-Author of Two Scoops of Django ) shares how he put Python ( python-docx library ) along with Google Docs to create his latest self-published fiction book.


data science

Command line arguments processing library.


In this post, we’ll discuss and illustrate a fast and robust method for face detection using Python and Mxnet.
machine learning

I noticed recently that Kaggle has an interesting dataset?—?70,000 lines of South Park dialogue. It’s nicely labelled by episode and character. I figured it would be a good practical test for the TF-IDF tools in scikit learn that I’ve been wanting to try recently.
machine learning

David Beazley demonstrates how to use a generator in Python to watch real-time data sources. This is an excerpt from the Pearson video course "Python Programming Language".

Sitting in my 5-hour-long chemistry class, my gaze would often drift over to the periodic table posted on the wall. To pass the time, I began to try finding words I could spell using only the symbols of the elements on the periodic table. Some examples: ScAlEs, FeArS, ErAsURe, WAsTe, PoInTlEsSnEsS, MoISTeN, SAlMoN, PuFFInEsS. I wondered what the longest such word was ('TiNTiNNaBULaTiONS' was the longest one I could come up with). Then I started thinking about how nice it would be to have a tool that could find the elemental spellings of any word. I decided to write a Python program.

lambda operator or lambda function is used for creating small, one-time and anonymous function objects in Python.

Pandas Dataframes generally have an "index", one column of a dataset that gives the name for each row. It works like a primary key in a database table. But Pandas also supports a MultiIndex, in which the index for a row is some composite key of several columns. It's quite confusing at first, here's a simple demo of creating a multi-indexed DataFrame and then querying subsets with various syntax.


Turns out, selling lemonade is a perfect scenario to introduce dynamic pricing and price optimization techniques. In this post, we'll be finding an optimal price for our glasses of lemonade using some basic methodology in Python in order to maximize our revenue.

Analysis and plotting of GPS data using pandas

As Python has gained a lot of traction in the recent years in Data Science industry, I wanted to outline some of its most useful libraries for data scientists and engineers, based on recent experience. And, since all of the libraries are open sourced, we have added commits, contributors count and other metrics from Github, which could be served as a proxy metrics for library popularity.
data science

AWS Lambda is a service that allows you to run code without provisioning a server. This has some interesting possibilities especially when processing data asynchronously. When I first started learning about Lambda most of the examples were about resizing images. I work with PCAP files on a daily basis and have used scapy for several years so thought it would be a good experiment to use Lambda to do some simple PCAP inspection.


tbvaccine - 164 Stars, 5 Fork
A small utility to pretty-print Python tracebacks.

This is the code for "How to Simulate a Self-Driving Car" by Siraj Raval on Youtube. - 15 Stars, 0 Fork
An API (for Humans) for converting timestamps.

Dagon - 11 Stars, 1 Fork
Advanced Hash Manipulation

DocumentClassification - 4 Stars, 1 Fork
This code implements a sample CNN model for document classification with tensorflow.

sqline - 4 Stars, 0 Fork
Simple command line tool to query databases

flexicon - 3 Stars, 0 Fork
A lightweight, regex-based lexer framework for Python.