1. 程式人生 > >Python This week

Python This week

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.
GoCD,
advert, Webinar
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.
2017,
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.
pycharm,
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.
pyside
4 Ways to Improve Your DevOps Testing: 4-part eBook to learn how to detect problems earlier in your DevOps processes.
advert
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.
AST
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.
go, cpython
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, GPU
cheatsheet
js
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.
testing

Projects
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
Train a neural network optimized for generating tweets based off of any number of Twitter users.
Automatic Korean word spacing with Python
Tensorflow Implementation of Recurrent Neural Network (LSTM, GRU) for Text Classification
script to generate event certificates easily
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
Writing some cnn layers ans the computation graph in python
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.