Python Weekly - Python Weekly - Issue 611

View this email in your browser

Python Weekly

Welcome to issue 611 of Python Weekly. Let's get straight to the links this week.
From Our Sponsor 
Get Your Weekly Dose of Programming
A weekly newsletter featuring the best hand curated news, articles, tutorials, talks, tools and libraries etc for programmers.
Join For Free

News

A Steering Council notice about PEP 703 (Making the Global Interpreter Lock Optional in CPython)
CPython’s global interpreter lock (“GIL”) prevents multiple threads from executing Python code at the same time. The GIL is an obstacle to using multi-core CPUs from Python efficiently. This PEP proposes adding a build configuration (--disable-gil) to CPython to let it run Python code without the global interpreter lock and with the necessary changes needed to make the interpreter thread-safe.


Articles, Tutorials and Talks

Patterns for Building LLM-based Systems & Products
This post is about practical patterns for integrating large language models (LLMs) into systems and products. We’ll draw from academic research, industry resources, and practitioner know-how, and try to distill them into key ideas and practices.

When to (Not) Use Dunder Methods? 
This video discusses dunder methods, when to use them, and when to avoid them. Dunder methods are also called magic methods because they allow you to basically change everything that Python does under the hood. But if you're not careful with them, they can lead to confusing code.

LPython: Novel, Fast, Retargetable Python Compiler
LPython is a Python compiler that can compile type-annotated Python code to optimized machine code. LPython offers several backends such as LLVM, C, C++, WASM, Julia and x86. LPython features quick compilation and runtime performance, as we show in the benchmarks in this blog. LPython also offers Just-In-Time (JIT) compilation and seamless interoperability with CPython.

Not-so-casual Performance Optimization in Python
My previous post (which was honestly created to test out the theme for this site), provided a few code snippets that computed N terms of the sum of inverse squares. I wrote the code in my 4 favorite languages—Python, C, Rust, and Haskell—but when I ran the Python code, it was embarrassingly slow. Compared to the ≈950 ms it took sequential Rust, Python took 70 seconds! So, in this post, we’re going to attempt to get Python some more reasonable numbers.

Bridging the Python async gap from the other side
So, you're doing some sync stuff. But you also need to do some async stuff, without making *everything* async. Hint: asyncio.Runner will get you at least part of the way there.

How to create async Django forms in 2 minutes (with Alpine.js) 
Here's a video showing you how to add async forms to a Django templates (no page reload) in 2 minutes. The guide uses Alpine.js to add minimal, neat Javascript.

Python ConfigParser Tutorial
A complete guide that equips you with the knowledge and skills to work with configuration files using Python effectively.

Escaping the template pattern hellscape in Python
In the first portion, the post will explain what the template pattern is and how it gradually leads to an intractable mess as the code grows. In the latter segments, I’ll demonstrate how I’ve designed a real-world service by adopting the obvious and natural path of inheritance-driven architecture. Then, I’ll explain how the service can be refactored to escape the quagmire that I’ve now started to refer to as the template pattern hellscape.

PyTorch Memory Tuning
This article will focus on minimizing GPU memory footprint — for both optimization and inference workloads. Throughput and latency usually get all the attention, but reducing memory consumption without making architecture sacrifices is often just as valuable.

Coefficient of Variation in Python with Pandas & NumPy
Learn how to calculate the coefficient of variation in Python using NumPy and Pandas. Analyze data variability with ease!

Running Untrusted Python Code
Using seccomp and setrlimit to build a Python sandbox.

Overloading arithmetic operators with dunder methods

Large Language Models and Nearest Neighbors

Generative AI in Jupyter

python quirks


Interesting Projects, Tools and Libraries

USearch
Smaller & Faster Single-File Vector Search Engine.

Continue
Continue is the open-source autopilot for software development—a VS Code extension that brings the power of ChatGPT to your IDE

Retake
Real-Time Universal Search Infra for Developers.

Resume-Matcher
Open Source Free ATS Tool to compare Resumes with Job Descriptions and create a score to rank them.

llm-attacks
Universal and Transferable Attacks on Aligned Language Models.

FinanceToolkit
An open-source toolkit in which all relevant financial ratios (50+), indicators and performance measurements are written down in the most simplistic way allowing for complete transparency of the calculation method.

Coldtype
Cross-platform display typography in Python.

DotDict
A simple Python library to make chained attributes possible.

Mentat
The AI Coding Assistant.

PythonMonkey
A Mozilla SpiderMonkey JavaScript engine embedded into the Python VM, using the Python engine to provide the JS host environment.


New Releases

Jupyter Notebook 7
Jupyter Notebook 7 is the most significant release of the Jupyter Notebook in years. Some highlights of this release include real-time collaboration, interactive debugging, table of contents, theming and dark mode, internationalization, improved accessibility, compact view on mobile devices.

Django bugfix release: 4.2.4
 
Our Other Newsletters
Programmer Weekly - A free weekly newsletter for programmers.

Founder Weekly - A free weekly newsletter for entrepreneurs featuring best curated content, must read articles, how to guides, tips and tricks, resources, events and more.
 
Copyright © 2023 Python Weekly, All rights reserved.
You are receiving our weekly newsletter because you signed up at http://www.PythonWeekly.com.

Our mailing address is:
Python Weekly
Brooklyn
Brooklyn, NY 11209

Add us to your address book


Want to change how you receive these emails?
You can update your preferences or unsubscribe from this list.

Older messages

Python Weekly - Issue 610

Thursday, July 27, 2023

View this email in your browser Python Weekly Welcome to issue 610 of Python Weekly. Let's get straight to the links this week. From Our Sponsor Get Your Weekly Dose of Programming A weekly

Python Weekly - Issue 609

Thursday, July 20, 2023

View this email in your browser Python Weekly Welcome to issue 609 of Python Weekly. Let's get straight to the links this week. Articles, Tutorials and Talks Python Tkinter GUI Design Using

Python Weekly - Issue 608

Sunday, July 16, 2023

View this email in your browser Python Weekly Welcome to issue 608 of Python Weekly. Let's get straight to the links this week. From Our Sponsor Get Your Weekly Dose of Programming A weekly

Python Weekly - Issue 607

Thursday, July 6, 2023

View this email in your browser Python Weekly Welcome to issue 607 of Python Weekly. Let's get straight to the links this week. From Our Sponsor Get Your Weekly Dose of Programming A weekly

Python Weekly - Issue 606

Thursday, June 29, 2023

View this email in your browser Python Weekly Welcome to issue 606 of Python Weekly. Let's get straight to the links this week. Articles, Tutorials and Talks Geospatial Data in your Graph In this

You Might Also Like

Software Testing Weekly - Issue 220

Saturday, May 18, 2024

Software Testing Conferences 📚 View on the Web Archives ISSUE 220 May 18th 2024 COMMENT Welcome to the 220th issue! Have you ever been to a testing conference? They're a great way to learn about

📶 Is a Cellular iPad Worth It? — How to Prevent YouTube From Taking Over Your Screensaver

Saturday, May 18, 2024

Also: This Robot Vacuum Can Clean Stairs, and More! How-To Geek Logo May 18, 2024 📩 Get expert reviews, the hottest deals, how-to's, breaking news, and more delivered directly to your inbox by

Weekend Reading — Objection-oriented programming

Saturday, May 18, 2024

This week we find a power-up box, replace GitHub Actions with Maven XMLs, avoid the worst website in the world, revisit RTO policies, “listen” to OpenAI employees, watch our Slack private messages, do

Daily Coding Problem: Problem #1445 [Easy]

Saturday, May 18, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Jane Street. The United States uses the imperial system of weights and measures, which

You don’t have to take our word for it…

Saturday, May 18, 2024

You can probably tell how excited we are to re-launch our Gigantic courses – which bring on-demand product management training for today's modern Product Managers and Product Leaders. In fact, we

🐍 New Python tutorials on Real Python

Saturday, May 18, 2024

Hey there, There's always something going on over at realpython.com as far as Python tutorials go. Here's what you may have missed this past week: What Is the __pycache__ Folder in Python? In

Visualized | Life Expectancy by Region (1950-2050F) 📊

Saturday, May 18, 2024

This map shows life expectancy at birth for key global regions, from 1950 to 2050F. View Online | Subscribe Presented by Voronoi: The App Where Data Tells the Story FEATURED STORY Life Expectancy by

New Wi-Fi Vulnerability Enables Network Eavesdropping via Downgrade Attacks

Saturday, May 18, 2024

THN Daily Updates Newsletter cover The DevSecOps Playbook: Deliver Continuous Security at Speed ($19.00 Value) FREE for a Limited Time A must-read guide to a new and rapidly growing field in

🐍 New Python tutorials on Real Python

Saturday, May 18, 2024

Hey there, There's always something going on over at realpython.com as far as Python tutorials go. Here's what you may have missed this past week: What Is the __pycache__ Folder in Python? In

Toward 'local' AI w/ Apple's new chip

Saturday, May 18, 2024

faster than the cloud ☁️ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌