171 - Python This week
From ImportPython Blog

by Ankur Gupta

Worthy Read

Docker and Kubernetes provide the platform for organizations to get software to market quickly. In this webinar, you will get a practical guide in designing a Docker based CD pipeline on Kubernetes with GoCD.

In this article, I’d like to share with you the articles I found most interesting and insightful (inspiring) last year and this year (so far). My other goal was to create a comprehensive list of the most valuable pieces for my Python students.
python articles

Python 3.7 is set to be released this summer, let’s have a sneak peek at some of the new features! If you’d like to play along at home with PyCharm, make sure you get PyCharm 2018.1 (or later if you’re reading this from the future). There are many new things in Python 3.7: various character set improvements, postponed evaluation of annotations, and more. One of the most exciting new features is support for the dataclass decorator.
data classes

PySide2 – the bindings from Python to Qt – changes skin this spring. We have re-branded it as Qt for Python on a solution level, as we wanted the name to reflect the use of Qt in Python applications. Under the hood it is still PySide2 – just better.

4 Ways to Improve Your DevOps Testing: 4-part eBook to learn how to detect problems earlier in your DevOps processes.

tl;dr Python comprehensions can have duplicate function calls (e.g. [foo(x) for x in ... if foo(x)]). If these function calls are expensive, we need to rewrite our comprehensions to avoid the cost of calling them multiple times. In this post, we solve this by writing a decorator that converts a function in to AST, optimizes away duplicate function calls and compiles it at runtime in ~200 lines of code.

If you look at the new Datadog Agent, you might notice most of the codebase is written in Go, although the checks we use to gather metrics are still written in Python. This is possible because the Datadog Agent, a regular Go binary, embeds a CPython interpreter that can be called whenever it needs to execute Python code. This process can be made transparent using an abstraction layer so that you can still write idiomatic Go code even when there’s Python running under the hood.

We describe some essential hacks and tricks for practicing machine learning with Python.
machine learning

In this tutorial, we provide step-by-step instructions to go from loading a pre-trained Convolutional Neural Network model to creating a containerized web application that is hosted on Kubernetes cluster with GPUs on Azure Container Service (AKS). AKS makes it quick and easy to deploy and manage containerized applications without much expertise in managing Kubernetes environment. It eliminates complexity and operational overhead of maintaining the cluster by provisioning, upgrading, and scaling resources on demand, without taking the applications offline. AKS reduces the cost and complexity of using a Kubernetes cluster by managing the master nodes for which the user does no incur a cost.
deep learning



I don’t particularly enjoy writing tests, but having a proper testing suite is one of the fundamental building blocks that differentiate hacking from software engineering. Sort of like sending your application to the gym, if you do it right, it might not be a pleasant experience, but you’ll reap the benefits continuously. At work we are especially big fans of the testing pyramid, and having dozens of unit tests give us the support that we need to deliver high quality software with rapid delivery to production.


Copy pypi.py into your site-packages directory or straight into your project. Don't bother using pip, requirements.txt and all that crap.

BoomMine - 63 Stars, 22 Fork
BoomMine - An CV-Based Minesweeper Cheat

tweet-generator - 29 Stars, 3 Fork
Train a neural network optimized for generating tweets based off of any number of Twitter users.

PyKoSpacing - 27 Stars, 4 Fork
Automatic Korean word spacing with Python

rnn-text-classification-tf - 21 Stars, 4 Fork
Tensorflow Implementation of Recurrent Neural Network (LSTM, GRU) for Text Classification

certificates - 14 Stars, 1 Fork
script to generate event certificates easily

QtPyConvert - 11 Stars, 2 Fork
An automatic Python Qt binding transpiler to the Qt.py abstraction layer.

louisPy - 10 Stars, 1 Fork
A collection of handy python utilities

pygrape - 8 Stars, 2 Fork
pygrape is a python library for updating terminal output in realtime

MyPythonCNN - 4 Stars, 0 Fork
Writing some cnn layers ans the computation graph in python

progress_bar - 3 Stars, 0 Fork
A simple python progress bar tool to help show your job's progress

Search the most similar strings against the query in Python 3. State-of-the-art algorithm and data structure are adopted for best efficiency. For both flexibility and efficiency, only set-based similarities are supported right now, including Jaccard and Tversky.

Ankur has coded and deployed numerous Python software over the last 10 years, at three venture funded startup and a fortune 10 company. He currently heads Numerate Labs. ImportPython is his side project with Python being his go to programming language.

Blog Categories