PyCoder’s Weekly: Issue #352 (Jan. 22, 2019)

#352 – JANUARY 22, 2019
View in Browser »

The PyCoder’s Weekly Logo


Test-Drive Programming Fonts in Your Browser

This is my new favorite thing. You can test-drive various coding fonts directly inside your browser, without cluttering up your local OS install. I’m still a fan of Luxi Mono 🙂
PROGRAMMINGFONTS.ORG

Async IO in Python: A Complete Walkthrough

This tutorial will give you a firm grasp of Python’s approach to async IO, which is a concurrent programming design that has received dedicated support in Python, evolving rapidly from Python 3.4 through 3.7 (and probably beyond).
REAL PYTHON

Become a Python Guru With PyCharm

alt

PyCharm is the Python IDE for Professional Developers by JetBrains providing a complete set of tools for productive Python, Web and scientific development. Be more productive and save time while PyCharm takes care of the routine.
JETBRAINS sponsor

Pyxel, Python’s Most Underrated Game Engine for Beginners

Nice little tutorial on building a Pong game with Pyxel, the Python retro game engine. This could be a fun project if you’re looking to get into game development with Python or if you’re trying to get your kids interested in programming.
VOMKONSTANT.IN

Python Quirks: Lambdas

Details the history and shortcomings of lambdas in Python. Also includes some patterns and corresponding benchmarks.
PHILIP TRAUNER

Regression With Keras

Detailed tutorial on how to perform regression using Keras. Learn how to train a Keras neural network for regression and continuous value prediction, specifically in the context of house price prediction.
ADRIAN ROSEBROCK

How I Built a Python Web Framework and Became an Open Source Maintainer

Inspirational thoughts and tips on starting and managing an open source project, based on the author’s experience building Bocadillo, an asynchronous Python web framework.
FLORIMOND MANCA • Shared by Python Bytes FM

Python Lands on the Windows 10 App Store

Python 3.7 can now be installed via the Windows app store. Assuming this works as intended, this has the potential to make setting up Python much easier for beginners and teachers alike.
MEHEDI HASSAN • Shared by Python Bytes FM

Speeding Up Python With Nim

How to create Python extension modules with Nim and NimPy to speed up the execution of code that runs slowly in CPython. This is similar to writing a C extension (Nim compiles to C) but writing correct Nim code might be easier than writing the equivalent C code directly. Nice writeup.
ROBERT MCDERMOTT

Discussions

PSF Request for Proposals for Paid Contract Work on PyPI Closes on January 31st

If you’re interested in implementing important Security, Accessibility, and Localization features for PyPI, reach out to the PSF.
TWITTER.COM/THEPSF

Potential Suspension of Django Channels Development

Andrew is looking for contributors: “I’ve been the sole maintainer of these projects for quite a while and it has become unsustainable – all of my energy is taken up fielding issues and support requests and I haven’t been able to even get myself to start looking at Django async stuff because of it.”
ANDREW GODWIN

Python Jobs

Senior Engineer Python & More (Winterthur, Switzerland)

DEEP IMPACT AG

Sr Enterprise Python Developer (Toronto, Canada)

Kognitiv

Senior Software Engineer (Santa Monica, CA)

GoodRX

Python Software Engineers (Palo Alto, CA)

Rhythm Diagnostic Systems, Inc

Senior Python Developer (Vienna, Austria)

Adverity GmbH

Python Tutorial Authors Wanted (100% Remote)

Real Python

More Python Jobs >>>

Articles & Tutorials

Speeding Up Your Python Tests Feedback Loop

Working with a dog-slow test suite is frustrating. Itamar’s article gives you some practical tips you can use to speed up your testing feedback loop. This is where I learned about pytest-sermon.
ITAMAR TURNER-TRAURING

A Letter to the Python Community in Africa

“Over the last 12 months, I’ve been enraptured with the creativity and passion of the Python community across the African continent and want to use this letter to explore and share some of the amazing things that are happening.”
ANTHONY SHAW

Python Tricks: A Buffet of Awesome Python Features

alt

Discover Python’s best practices with simple examples and start writing even more beautiful + Pythonic code. “Python Tricks: The Book” shows you exactly how. You’ll master intermediate and advanced-level features in Python with practical examples and a clear narrative. Get the book + video bundle 33% off →
DAN BADER sponsor

Demystifying @decorators in Python

An introduction to decorators in Python.
SUMIT GHOSH

Local Web Development vs Vagrant vs Docker

Web development is full of tools that claim to help you develop your perfect application. What’s the right tool? This post explores options like Docker, Vagrant, and honcho to see which tool can work for you on your next (or current) web app.
MATT LAYMAN • Shared by Matt Layman

Python and Finance: An Introductory Programming Tutorial

“Python provides many advantages over the traditionally popular VBA scripts for finance professionals looking to automate and enhance their work processes. This article explores how to use Python and finance together via a practical step-by-step tutorial.”
STEFAN THELIN

Top Seven Apps Built With Python

Find out why giants like Instagram and Spotify chose to run on Python.
DJANGOSTARS.COM

Working With Files in Python

In this tutorial, you’ll learn how you can work with files in Python by using built-in modules to perform practical tasks that involve groups of files, like renaming them, moving them around, archiving them, and getting their metadata.
REAL PYTHON

Python 2 Is Ending, We Need to Move to Python 3

“Open edX has nearly a million lines of Python code, and they all have to run on Python 3 by the end of the year. Much of the work is not hard, it’s just extensive, and can’t all be done automatically.”
NED BATCHELDER

Clean Architectures in Python

A pay-what-you-want book on software architecture.
LEONARDO GIORDANI book

Django Transaction Tests in Pytest

How to get the automatic rollback behavior of Django’s TransactionTestCase with Pytest.
ELENI LIXOURIOTI

Projects & Code

pytest-testmon: Taking TDD to a New Level With Testmon and Pytest for Python

A Pytest plug-in which automatically selects and re-executes only tests affected by recent changes.
GITHUB.COM/TARPAS

Django 2.2 Alpha 1 Released

New features and changes in the upcoming Django 2.2 can be found in the changelog.
DJANGOPROJECT.COM

Counteracting Code Complexity With Wily

Code complexity can reduce the maintainability of software projects. Wily is a Python tool to track and report on software complexity metrics to guide refactoring.
PODCASTINIT.COM podcast

Events

PyCon PH

February 23–24, 2019 in Makati, Philippines
PYTHON.PH • Shared by Angelica Lapastora

PythOnRio Meetup

January 26, 2019
PYTHON.ORG.BR

Python Sheffield

January 29, 2019
GOOGLE.COM

PiterPy Breakfast

January 30, 2019
TIMEPAD.RU

SPb Python Drinkup

January 31, 2019
MEETUP.COM


Happy Pythoning!
This was PyCoder’s Weekly Issue #352.
View in Browser »

alt


[ Subscribe to 🐍 PyCoder’s Weekly 💌 – Get the best Python news, articles, and tutorials delivered to your inbox once a week >> Click here to learn more ]

Planet Python

Weekly Python StackOverflow Report: (clxi) stackoverflow python report

These are the ten most rated questions at Stack Overflow last week.
Between brackets: [question score / answers count]
Build date: 2019-01-19 14:31:58 GMT


  1. Unexpected behaviour with Python generator – [21/8]
  2. Count letter frequency in word list, excluding duplicates in the same word – [19/7]
  3. Group and aggregate a list of dictionaries by multiple keys – [10/5]
  4. Given a list of words and a sentence find all words that appear in the sentence either in whole or as a substring – [10/4]
  5. Python – Find prime factors – [9/0]
  6. Why does increasing precision make this program faster? – [8/2]
  7. Why does my code take different values when i switch the order in a set (knowing that order doesn’t matter with sets) – [8/2]
  8. Open a Word Document Using Python – [7/2]
  9. How to find where in numpy array a zero element is preceded by at least N-1 consecutive zeros? – [7/2]
  10. how to print the default value if argument is None in python – [6/6]

Planet Python

Weekly News Summary for Admins — 2019-01-18

Apple has repeated their strong position on data privacy and security with an op-ed by Tim Cook in Time. Ironically, I cannot read the original op-ed, because of European data privacy laws…

If you would rather get the weekly newsletter by email, you can subscribe to the Scripting OS X Weekly Newsletter here!! (Same content, delivered to your Inbox once a week.)

On Scripting OS X

News and Opinion

MacAdmins on Social Media

  • Bob Gendler: “I’m pretty stoked. While we’re not supposed to do work during a furlough I’ve used this time to catch up on some skills that would be useful for work. I created a macOS app in Swift that interacts with a JamfPro server to toggle some settings for use at NIST. This is my first GUI based app I’ve built in Swift with Xcode.”
  • Victor (groob): “Did you know that on macOS 10.14.x launchd has its own plist parser and requires self closing tags for booleans? Bug here (OpenRadar) Thanks to @twseph for patching”
  • Fraser Speirs: “Re: the discussion on @_connectedfm about the 9.7” iPad rising in price to make room for a new mini 5 below it – such a move would be a clear signal that Apple is ceding K–12 education to Chromebook and wants out of the market.” – Thread!
  • Neil Martin: Imaging is dead. Take an hashtag#Apple hashtag#Mac (or a lab full). Add a dash of awesome hashtag#NoMAD Login with upcoming DEPNotify functionality. (video)

Bugs and Security

Support and HowTos

Scripting and Automation

Apple Support

Updates and Releases

To Listen

Support

There are no ads on my webpage or this newsletter. If you are enjoying what you are reading here, please spread the word and recommend it to another Mac Admin!

If you want to support me and this website even further, then consider buying one (or all) of my books. It’s like a subscription fee, but you also get a useful book extra!

Scripting OS X

Weekly Python StackOverflow Report: (clx) stackoverflow python report

These are the ten most rated questions at Stack Overflow last week.
Between brackets: [question score / answers count]
Build date: 2019-01-12 19:15:00 GMT


  1. Create a dictionary by zipping together two lists of uneven length – [18/5]
  2. Merge two dicts by same key – [15/5]
  3. How to make a dict key deprecated? – [15/2]
  4. What is the most efficient way to compute the difference of lines from two files? – [13/4]
  5. Python – List returning [[…], 6] – [12/2]
  6. Dynamic communication between main and subprocess in Python – [8/2]
  7. How to plot Gaia astrometry data to TESS images using Python? – [8/1]
  8. How to find out if (the source code of) a function contains a loop? – [7/4]
  9. Comparing Results from StandardScaler vs Normalizer in Linear Regression – [7/2]
  10. How to store functions as class variables in python? – [7/2]

Planet Python

Weekly News Summary for Admins — 2019-01-11

Slowly emerging from the post-holiday and vacation swamp. CES was this, and even though Apple had no official presence, they did gather some headlines from smart TV support of AirPlay 2, HomeKit and iTunes videos. Also they got some attention for this banner ad.

If you would rather get the weekly newsletter by email, you can subscribe to the Scripting OS X Weekly Newsletter here!! (Same content, delivered to your Inbox once a week.)

News and Opinion

MacAdmins on Twitter

  • Mac Mule: “TIL: https://help.apple.com/businessmanager/#/apd1d81e5169 The timescale for processing app licences depends on how many you purchase: 5,000 licences or less are processed straightaway. 5,001 to 19,999 licences are processed after 13:00 PST daily. 20,000 licences or more are processed after 16:00 PST daily.”
  • Erik Gomez: “InstallEnterpriseApplication is broken and I’m really hoping Apple fixes this by 10.14.3, or the next few months are going to be extremely painful.”
  • Kyle Crawford: “SecureToken is broken and I’m really hoping Apple fixes this by 10.14.3, or the next few months are going to be extremely painful.…”
  • Eric Holtam:softwareupdate is broken and I’m really hoping Apple fixes this by 10.14.3, or the next few months are going to be extremely painful.…”

Bugs and Security

Support and HowTos

Scripting and Automation

Updates and Releases

To Listen

Support

There are no ads on my webpage or this newsletter. If you are enjoying what you are reading here, please spread the word and recommend it to another Mac Admin!

If you want to support me and this website even further, then consider buying one (or all) of my books. It’s like a subscription fee, but you also get a useful book or two extra!

Scripting OS X