Planet Python
5,282 FOLLOWERS
Recent postings from Python-related blogs.
Planet Python
9h ago
Multi-factor authentication is a must have feature in any modern web application. Specially providing support for both TOTP (think applications on phone) and FIDO2 (say Yubikeys) usage. I created a small Django demo mfaforgood which shows how to enable both.
I am using django-mfa3 for all the hard work, but specially from a PR branch from my friend Giuseppe De Marco.
I also fetched the cbor-js package in the repository so that hardware tokens for FIDO2 to work. I hope this example will help you add the MFA support to your Django application.
Major points of the code
Adding example templates ..read more
Planet Python
9h ago
Python is as popular as it is today because we have gone above and beyond to make this a welcoming community. Being a friendly and supportive community is part of how we are perceived by the wider world and is integral to the wide popularity of Python. We won a “Wonderfully Welcoming Award” last year at GitHub Universe. Over and over again, the tech press refers to Python as a supportive community. We aren’t the fastest, the newest or the best-funded programming language, but we are the most welcoming and supportive. Our philosophy is a big part of why Python is a fantastic choice for not only ..read more
Planet Python
9h ago
Test your understanding of how to create and use Python protocols while providing type hints for your functions, variables, classes, and methods.
Take this quiz after reading our Python Protocols: Leveraging Structural Subtyping tutorial.
[ Improve Your Python With ? Python Tricks ? – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ..read more
Planet Python
9h ago
In this quiz, you’ll test your understanding of Python’s logging module.
Logging is a very useful tool in a programmer’s toolbox. It can help you develop a better understanding of the flow of a program and discover scenarios that you might not have thought of while developing.
Logs provide developers with an extra set of eyes that are constantly looking at the flow an application is going through.
They can store information, like which user or IP accessed the application. If an error occurs, then they can provide more insights than a stack trace by telling you what the state of the program was ..read more
Planet Python
2d ago
Author: Reshama Shaikh , Adam Li
BIO: Adam is currently a Postdoctoral Research Scientist at Columbia University in the Causal Artificial Intelligence Lab, directed by Dr. Elias Bareinboim. He is an NSF-funded Computing Innovation Research Fellow. He did his PhD in biomedical engineering, specializing in computational neuroscience and machine learning at Johns Hopkins University working with Dr. Sridevi V. Sarma in the Neuromedical Control Systems group. He also jointly obtained a MS in Applied Mathematics and Statistics with a focus in statistical learning theory, optimization and matrix an ..read more
Planet Python
2d ago
This is a cross-post from Max Bernstein from his excellent blog where he writes about programming languages, compilers, optimizations, virtual machines. He's looking for a (dynamic language runtime or compiler related) job too.
CF Bolz-Tereick wrote some excellent posts in which they introduce a small IR and optimizer and extend it with allocation removal. We also did a live stream together in which we did some more heap optimizations.
In this blog post, I'm going to write a small abtract interpreter for the Toy IR and then show how we can use it to do some simple optimizations. It assumes tha ..read more
Planet Python
3d ago
In this quiz, you’ll test your understanding of Hugging Face Transformers. This library is a popular choice for working with transformer models in natural language processing tasks, computer vision, and other machine learning applications.
[ Improve Your Python With ? Python Tricks ? – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ..read more
Planet Python
3d ago
#639 – JULY 23, 2024
View in Browser »
Asyncio gather() Handle Exceptions
The asyncio.gather() function takes an optional argument return_exceptions which changes the behavior of the co-routine when an error occurs. This article shows you how to use it.
JASON BROWNLEE
Python Protocols: Leveraging Structural Subtyping
In this tutorial, you’ll learn about Python’s protocols and how they can help you get the most out of using Python’s type hint system and static type checkers.
REAL PYTHON
Prod Alerts? You Should be Autoscaling
Let Judoscale solve your scaling issues. We support Django, Flask ..read more
Planet Python
3d ago
<strong>Topics covered in this episode:</strong><br> <ul> <li><a href="https://marimo.io"><strong>Marimo:</strong></a><a href="https://marimo.io"> </a><a href="https://marimo.io"><strong>“Future</strong></a><a href="https://marimo.io"> <strong>of Notebooks”</strong></a></li> <li><a href="https://docs.pytest.org/en/stable/changelog.html#pytest-8-3-1-2024-07-20"><strong>pytest 8.3.0 & 8.3.1 are out</strong></a></li> <li><a hr ..read more
Planet Python
3d ago
ObjectListView is a third-party wxPython widget that wraps the wx.ListCtrl. I have used it for over 10 years in quite a few different GUI applications because it works much nicer than wx.ListCtrl does. Unfortunately, ObjectListView was never integrated into wxPython core like some other amazing third-party packages were, and so it has become broken over the past couple of years such that you can’t use it with the latest version of Python / wxPython.
So, I decided to fork the project, as its defects were simple enough that I could resolve them quickly. The new version of ObjectListView is now c ..read more