Issue #640

Great Tables, itertools, Asyncio In A Thread, and More

July 30, 2024

Great Tables, itertools, Asyncio In A Thread, and More
#640 – JULY 30, 2024 VIEW IN BROWSER
The PyCoder’s Weekly Logo
Build Captivating Display Tables in Python With Great Tables
Do you need help making data tables in Python look interesting and attractive? How can you create beautiful display-ready tables as easily as charts and graphs in Python? This week on the show, we speak with Richard Iannone and Michael Chow from Posit about the Great Tables Python library.
REAL PYTHON podcast

Overview of the Module itertools
This article proposes the top 3 iterators that are most useful from the module itertools, classifies all of the 19 iterators into 5 categories, and then provides brief usage examples for all the iterators in the module itertools.
RODRIGO GIRÃO SERRÃO • Shared by Rodrigo Girão Serrão

Take a Free Course. It’s on us
Learn how to speed up Python programs on NVIDIA GPUs using Numba, a type-specializing just-in-time compiler. Join the NVIDIA Developer Program to take our ‘Fundamentals of Accelerated Computing with CUDA Python’ course for free →
NVIDIAsponsor

Asyncio Event Loop in Separate Thread
Typically, the asyncio event loop runs in the main thread, but as that is the one used by the interpreter, sometimes you want the event loop to run in a separate thread. This article talks about why and how to do just that.
JASON BROWNLEE

Quiz: Python Type Checking
In this quiz, you’ll test your understanding of Python type checking. You’ll revisit concepts such as type annotations, type hints, adding static types to code, running a static type checker, and enforcing types at runtime. This knowledge will help you develop your code more efficiently.
REAL PYTHON

Quiz: Build a Blog Using Django, GraphQL, and Vue
In this quiz, you’ll test your understanding of building a Django blog back end and a Vue front end, using GraphQL to communicate between them. This will help you decouple your back end and front end, handle data persistence in the API, and display the data in a single-page app (SPA).
REAL PYTHON

PEP 751: A File Format to List Python Dependencies for Installation Reproducibility (New)
This PEP proposes a new file format for dependency specification to enable reproducible installation in a Python environment.
PYTHON.ORG

pytest 8.3 Released
PYTEST.ORG

Django 5.1 RC 1 Released
DJANGO SOFTWARE FOUNDATION


Discussions


Interesting Topics for an Advanced Python Lecture?
DISCUSSIONS ON PYTHON.ORG


Articles & Tutorials


Wide Angle Lens Distortion Correction With Straight Lines
Discusses how to estimate and correct wide-angle lens distortion using straight lines in an image. It covers techniques like the Radon transform, Hough transform, and an iterative optimization algorithm to estimate the distortion parameters and undistort the image. The author also provides Python code to match the division-based undistortion model to the OpenCV distortion model.
HUGO HADFIELD

Testing Python Integration With an Azure Eventhub
Using an Azure EventHub with Python is pretty easy thanks to Azure SDK for Python. However, ensuring that your code actually send events into an event hub in a reliable and automated way can be a bit harder. This article demonstrates how you can achieve this thanks to asyncio, docker and pytest.
BENOÎT GODARD • Shared by Benoît Godard

Crunchy Bridge Integrates Postgres with DuckDB
Postgres excels in managing transactional databases. DuckDB offers fast performance for queries and data analysis. Integrating these two databases provides a hybrid solution leveraging the strengths of both transactional and analytical workloads.
CRUNCHY DATAsponsor

pandas GroupBy: Grouping Real World Data in Python
In this course, you’ll learn how to work adeptly with the pandas GroupBy while mastering ways to manipulate, transform, and summarize data. You’ll work with real-world datasets and chain GroupBy methods together to get data into an output that suits your needs.
REAL PYTHON course

10 Open-Source Tools for Optimizing Cloud Expenses
The cloud gets you scale, but it can also be complicated to price properly. This article covers ten different open source tools that you can use to optimize your deployment and understand the associated costs.
TARUN SINGH

Hugging Face Transformers: Open-Source AI With Python
As the AI boom continues, the Hugging Face platform stands out as the leading open-source model hub. In this tutorial, you’ll get hands-on experience with Hugging Face and the Transformers library in Python.
REAL PYTHON

Tanda Runner: A Personalized Running Dashboard
This post talks about a new dashboard tool for visualizing your Strava running data and getting personalized recommendations for your next big race. It is built using Django and includes a LLM integration.
DUARTE O.CARMO

You Don’t Have to Guess to Estimate
“There are roughly three senses of ‘estimate.’ One is ‘a prediction of how much something will cost.’ One is ‘a guess.’ But another definition is a rough calculation.”
NAT BENNETT

Using else in a Comprehension
While list comprehensions in Python don’t support the else keyword directly, conditional expressions can be embedded within list comprehension.
TREY HUNNER

TIL: Difference Between __getattr__ and __getattribute__
A quick post on the the difference between __getattr__ and __getattribute__.
RODRIGO GIRÃO SERRÃO


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 →

taipy: Turns Data Into a Web App
GITHUB.COM/AVAIGA

posting: The Modern API Client That Lives in Your Terminal
GITHUB.COM/DARRENBURNS

django-sql-explorer: Share Data With SQL Queries
GITHUB.COM/EXPLORERHQ

pyxel: A Retro Game Engine for Python
GITHUB.COM/KITAO

Herbie: Retrieve Weather Prediction Data
GITHUB.COM/BLAYLOCKBK • Shared by Brian Blaylock

Maelstrom: A Clustered Test Runner for Python and Rust
GITHUB.COM/MAELSTROM-SOFTWARE • Shared by Neal Fachan

📆🐍 Upcoming Python Events


Weekly Real Python Office Hours Q&A (Virtual)
July 31, 2024

Canberra Python Meetup
August 1, 2024

Sydney Python User Group (SyPy)
August 1, 2024

Django Girls Ecuador 2024
August 3, 2024

Melbourne Python Users Group, Australia
August 5, 2024

STL Python
August 8, 2024
Happy Pythoning!
Copyright © 2024 PyCoder’s Weekly, All rights reserved.