The PyCon US 2021 recordings are available on our YouTube channel.  Be sure to subscribe to our channel for notifications of new content. This channel will be used for all future conferences in order to keep all content in one channel.

The recordings are synced with the available live captions taken during the event. There are some tutorials whose files did not align with the recordings for many unforeseen reasons. Please utilize the closed captions offered on YouTube for those without the caption files synced.  There are three tutorials that needs some fine tuning and will be available next week:

  • Introduction to Decorators: Power UP Your Python Code / Geir Arne Hjelle

  • Effective Data Visualization / Husni Almoubayyed

  • A Hands-On Introduction to Multi-Objective Optimisation / Eyal Kazin

We can not mention enough times our heartfelt gratitude to all the presenters of the tutorials, talks, keynote addresses, posters, workshops, summits and lightning talks for their time and efforts in providing the content presented at PyCon US 2021. You have all helped to make this event a success. 

Read More

As I’ve written about previously and elsewhere, I felt so badly burned by Apple’s laptop hardware design decisions of a few years ago that I’ve rather fallen out of love with that platform for my personal work. The latest hardware is much better, but I feel like the message has been sent and received, so I’m not rushing back any time soon.

My first choice was the Linux desktop, and after months of struggling, instability and accessibility issues I’ll admit I’ve been looking for stable, solid alternatives that are also powerful enough to get the job done and maybe even have something new to offer. As an old dog, sometimes it’s really nice to be taught some new tricks!

If you’ve tangoed with Windows in the past, and found yourself struggling against its rather byzantine UI, I’d urge you to read on and see if maybe it’s not time for another careful look.

Since choosing the right tools is all about your unique set of needs, I’ll use those as categories to drive the discussion and showcase how Windows is doing a great job of satisfying them.

Read More

In a Q&A, Python programming language creator Guido van Rossum said it was “almost taboo to talk about a Python 4 in a serious sense” following the troubled migration from Python 2.0 to Python 3.0.

For this post in my Python syntactic sugar series, I am going to cover async and await.

Now when I started to think about this post I was worried it was going to be rather long and arduous to research (although I believe class is going to ultimately win that crown 😜), but then I remembered I had written a blog post about how async and await worked in Python 3.5. As part of that post I went through the history of how Python got to that point of asynchronous programming, which meant I had already dived into the details of how Python evolved earlier syntax to what it has today! Thus this post is going to draw heavily from my async history post to save myself some time, so if you feel I skimmed over details then chances are it’s because I covered it in my other post.

Read More

Python is slow, and compiled languages like Rust, C, or C++ are fast. So when your application is too slow, rewriting some of your code in a compiled extension can seem like the natural approach to speeding things up.

Unfortunately, compiled extensions are sometimes actually slower than the equivalent Python code. And even when they’re faster, the performance improvement might be far less than you’d imagine, due to hidden overhead caused by two factors:

  1. Function call overhead.

  2. Serialization/deserialization overhead.

Let’s see where these hidden performance overheads comes from, and then see some solutions to get around them.

Read More

I’ve written in the past somewhat opaquely about certain programming languages and my complaints about them. One that I’m not afraid to complain about by name is Python. You can look in enough of my old posts to see this pattern keeps coming up. It never fails to make my life more interesting than it has to be.

So, with that said, one of the things I decided we needed at $COMPANY was something that would let us handle SEVs (you know, outages, site events, whatever?) well. What they had already when I arrived was, to put it mildly, cute. It was basically a wrapper around the Jira category they already had to track these things, plus it would blast out mails to extra places when someone commented in the tool. Unfortunately, those mails also tended to start full-on reply-to-all spam fests due to their scattershot nature. Every person was getting every update to every SEV.

Read More

Have you ever started on some creative work, and given yourself an arbitrary restriction within which to do it? Like making some pixel art, but you will only use black or white pixels. I think it’s quite a fun way to drive the creative and problem solving juices, to test the limits of the restriction and learn new techniques.

In the two most recent posts we focused on the Python object system. We learned what Python objects and Python types are, how they are defined and what determines their behavior. This discussion gave us a good understanding of how Python objects work in general. What we haven’t discussed is how particular objects, such as strings, integers and lists, are implemented. In this and several upcoming posts we’ll cover the implementations of the most important and most interesting built-in types. The subject of today’s post is int.

Read More

Python is my favourite programming language. Since I discovered it in 2004, programming in Python became my favourite hobby. I’ve tried to learn a few other languages and have never found one as friendly to beginners as Python. As readers of this blog know, these days I am particularly interested in tracebacks, and I am likely paying more attention than most to Python’s improvements in this area: Python is becoming more and more precise in the information that it provides to the users when something goes wrong…

Read More

People bash OO a lot these days, I’m increasingly coming to the opinion they’re right, at least in Python. My point here is not to argue that OO is bad per se, more that its introduction is simply unnecessary, AKA not useful.

Let’s see how we can create QR codes that look however we want, while preserving links. We’ll also show the world’s first working QR gif (as far as I know).

Dec 23, 2020

On November 29, version 1.7 of SymPy, a Python library for symbolic mathematics, was released. The new version brings a large number of enhancements and bug fixes, and some minor backward incompatibilities. While these are enumerated in detail in the release notes, we will take advantage of this opportunity to look at some of the things that can be done with SymPy and explore its interface options through several detailed examples.

Dec 8, 2020

Mypy is an optional static type checker for Python. It’s been around since 2012 and is gaining traction even since. One of the main benefits of using a type checker is getting errors at “compile time” rather than at run time.

Exhaustiveness checking is a common feature of type checkers, and a very useful one! In this article I’m going to show you how you can get mypy to perform exhaustiveness checking!

Dec 8, 2020

Python’s defaultdict is an incredibly useful tool to specify default values for missing keys (RealPython has a great primer on them).

I found I was taking up so much memory to store the value 0 for an algorithm which counted rather infrequent elements in a huge sequence split into many chunks. Using a defaultdict(int) for each distinct element to store which indices had a non-zero count of the respective element greatly optimised it, but I yearned for a defaultlist equivalent to standardise this approach and generally make my code more expressive.

Read More
Dec 4, 2020

Flat is a library for creating and manipulating digital forms of fine arts. Its aim is to enable experimentation with and testing of unpredictable or automated processes, to inspect the beginning of the “new”.

It grew out of the needs for generative design, architecture and art. The concept of “design” is more of a subject of study yet to be delved into, hence the fitter term for subtitle is “infrastructure”.


News and discussion about the python programming language.

Created on Oct 20, 2020
By @root