Issue #594

Genetic Algorithms, Beautiful QR Codes, Mr Null, and More

Sept. 12, 2023

Genetic Algorithms, Beautiful QR Codes, Mr Null, and More
#594 – SEPTEMBER 12, 2023 VIEW IN BROWSER
The PyCoder’s Weekly Logo
Playing With Genetic Algorithms in Python
A Genetic Algorithm (GA) is an AI technique where random code is mutated and tested for fitness iteratively until a solution is found. This article shows you a couple of problems solved using GAs in Python. Associated HN discussion.
JOSEP RUBIÓ PIQUÉ

Generate Beautiful QR Codes With Python
In this tutorial, you’ll learn how to use Python to generate QR codes, from your standard black-and-white QR codes to beautiful ones with your favorite colors. You’ll learn how to format QR codes, rotate them, and even replace the static background with moving images.
REAL PYTHON

Finally—Pandas Practice That Isn’t Boring
You won’t get fluent with Pandas doing boring, irrelevant, toy exercises. Bamboo Weekly poses questions about current events, using real-world data sets—and offers clear, comprehensive solutions in Jupyter notebooks. Challenge yourself, and level up your Pandas skills every Wednesday →
BAMBOO WEEKLYsponsor

I’m Mr. Null. My Name Makes Me Invisible to Computers
NULL is a magic word in many computer languages. This article is by someone who has Null as a last name, and the consequences that entails. See also this Radiolab Podcast Episode for a similar topic.
CHRISTOHPER NULL

2023 Django Developers Survey
DJANGO SOFTWARE FOUNDATION

Python 3.12.0 Release Candidate 2 Available
CPYTHON DEV BLOG

Pandas 2.1.0 Released
PYDATA.ORG


Discussions


Why Prefer Indentation Over Block Markers?
STACKEXCHANGE.COM


Articles & Tutorials


Launching an HTTP Server in One Line of Python Code
In this tutorial, you’ll learn how to host files with a single command using an HTTP server built into Python. You’ll also extend it by making a miniature web framework able to serve dynamic content from HTML templates. Along the way, you’ll run CGI scripts and use encryption over HTTPS.
REAL PYTHON

Introducing flake8-logging
The Python standard library’s logging module is a go-to for adding observability to applications, but there are right and wrong ways to use it. This article is about a new linter that explicitly looks for problems with your logging calls.
ADAM JOHNSON

Fully Managed Postgres + Great Support
Crunchy Bridge is a different support experience. Our team is passionate about Postgres education giving you all the information and tools to make informed choices. If you’re a developer starting out or a more seasoned expert in databases, you’ll appreciate thorough, timely, and in-depth responses →
CRUNCHY DATAsponsor

Apple Vision Framework via PyObjC for Text Recognition
Learn how to use PyObjC to interface with the Apple Vision Framework and create a script to detect text in images. Become familiar with how PyObjC works and how it maps functions and methods from Objective C to Python.
YASOOB KHALID • Shared by Yasoob Khalid

Class Concepts: Object-Oriented Programming in Python
Python uses object-oriented programming to group data and associated operations together into classes. In this video course, you’ll learn how to write object-oriented code with classes, attributes, and methods.
REAL PYTHON course

Switching to Hatch
Oliver used Poetry for most of his projects, but recently tried out Hatch instead. This blog post covers what it took to get things going and what features he used, including how he ditched tox.
OLIVER ANDRICH

The Python Dictionary Dispatch Pattern
The dictionary dispatch pattern is when you keep references to functions in a dictionary and change code behavior based on keys. Learn how to use this pattern in practice.
JAMES GALLAGHER

Analysing and Parsing the Contents of PyPI
High-level statistics gathered from PyPI, including how popular language features are, project sizes (tensorflow accounts for 16% of the data on PyPI!) and growth.
TOM FORBES • Shared by Tom Forbes

Writing a C Compiler in 500 Lines of Python
This post details how to build a C compiler, step-by-step, using Python. A great intro to compilers. The target source is WASM, so learn a bit about that too.
THEIA VOGEL

Filters in Django: filter(A, B) vsfilter(A).filter(B)
An advanced dive into the Django ORM, how it handles joins, and what that means for your code.
APIROBOT.ME • Shared by Denis

My Favorite Python Tricks for LeetCode Questions
A collection of intermediate-level Python tricks and tools. Write more Pythonic code!
JJ BEHRENS

What Is Wrong With TOML?
Some YAML people talk about why TOML is too limited.
HITCHDEV.COM


Projects & Code


Brought to you by Real Python for Teamssponsor
Online Python training created by a community of experts. Give your team the real-world Python skills they need to succeed →

StrictYAML: Type-Safe, Restricted Subset of the YAML
HITCHDEV.COM

dara: Create Interactive Web Apps in Pure Python
GITHUB.COM/CAUSALENS

JobSpy: Scraper for LinkedIn, Indeed & ZipRecruiter
GITHUB.COM/CULLENWATSON

krypton: Data Encryption at Rest and IAM for Python
GITHUB.COM/KRPTN

iommi: Your First Pick for a Django Power Chord
GITHUB.COM/IOMMIROCKS

📆🐍 Upcoming Python Events


Weekly Real Python Office Hours Q&A (Virtual)
September 13, 2023

PyData Amsterdam 2023
September 14 to September 17, 2023

Python Atlanta
September 14 to September 15, 2023

Kiwi PyCon 2023
September 15 to September 18, 2023

PyCon CZ 2023
September 15 to September 18, 2023

PyData Seattle: Language Creators Charity Fundraiser
September 19 to September 20, 2023

PyCon Uganda
September 21 to September 24, 2023

PyCon UK 2023
September 22 to September 26, 2023
Happy Pythoning!
Copyright © 2023 PyCoder’s Weekly, All rights reserved.