NumPy where(), Python & R, HTTP Clients, and More

#647 – SEPTEMBER 17, 2024 VIEW IN BROWSER
The PyCoder’s Weekly Logo
How to Use Conditional Expressions With NumPy where()
This tutorial teaches you how to use the where() function to select elements from your NumPy arrays based on a condition. You’ll learn how to perform various operations on those elements and even replace them with elements from a separate array or arrays.
REAL PYTHON

PythonistR: A Match Made in Data Heaven
In data science you’ll sometimes hear a debate between R and Python. Cosima says ‘why not choose both?’ She outlines a data pipeline that uses the best tool for each job.
COSIMA MEYER

Transcribe Audio in 5 Lines of Code
Build AI apps that understand speech with insanely accurate speech-to-text models. Sign up for a free account and get $50 in credits to try AssemblyAI’s speech recognition models →
ASSEMBLY AIsponsor

Python HTTP Clients: Requests vs. HTTPX vs. AIOHTTP
Learn about the differences between Requests, HTTPX, and AIOHTTP, and when to use each library for your Python projects.
GEORGES HAIDAR

Quiz: Generate Images With DALL·E and the OpenAI API
In this quiz, you’ll test your understanding of generating images with DALL·E by OpenAI using Python. You’ll revisit concepts such as using the OpenAI Python library, making API calls for image generation, creating images from text prompts, and converting Base64 strings to PNG image files.
REAL PYTHON

Quiz: The Walrus Operator: Python’s Assignment Expressions
In this quiz, you’ll test your understanding of the Python Walrus Operator. This operator was introduced in Python 3.8, and understanding it can help you write more concise and efficient code.
REAL PYTHON

Python Releases 3.12.6, 3.11.10, 3.10.15, 3.9.20, and 3.8.20
PYTHON.ORG

Python Release Python 3.13.0rc2
PYTHON.ORG


Articles & Tutorials


Python Community Divided Over CoC Enforcement
Over the last few months there has been a lot of back and forth in the Python community, especially on the forums, around changes to bylaws and how the Code of Conduct is enforced. This article covers the history and context of the events.
JAKE EDGE

Django: Rotate Your Secret Key, Fast or Slow
Django’s SECRET_KEY setting is used for cryptographic signing in various places, such as for session storage and password reset tokens. If you need to rotate it you can allow read-only use of the old key to smooth the transition.
ADAM JOHNSON

Posit Connect - Help Your Analytics Team Share and Collaborate
Tired of tediously send files and trying to use general-purpose collaboration tools? Posit Connect makes it easy to share, collaborate, and get feedback on your data science work including Jupyter notebooks, Plotly dashboards, Streamlit, Quarto, Shiny or other interactive analytics applications →
POSITsponsor

Multiversion Python Thoughts
Armin has played around with enabling multiple versions of a library to be installed for the same instance of Python in the past, and recent feature additions to uv are making it come closer to fruition.
ARMIN RONACHER

How We Made Notebooks Load 10 Times Faster
“When we received feedback our Notebooks UI was taking too long too load, our engineers dove into ways to improve the developer experience — bringing some load times from 30 seconds down to less than one.”
LUIS NEVES

When to Use .__repr__() vs .__str__() in Python
In this video course, you’ll learn the difference between the string representations returned by .__repr__() vs .__str__() and understand how to use them effectively in classes that you define.
REAL PYTHON course

Python Bytes Episode #400
The Python Bytes podcast just delivered show #400. This is a huge accomplishment. This episode celebrates the achievement, and also covers: Python 3.13RC, Docker with uv, the humanize project, and more.
PYTHON BYTES podcast

Improved print Readability With pprint
The pretty print module (pprint) provides more readable output for complex data structures and this post shows you how to use the library and what you can get out of it.
JUHA-MATTI SANTALA

“Next Level Python” Humble Bundle for Charity
Make mastering Python your mission: This mix of online courses, books, exercises, and productivity tools is here to help you succeed—whether you’re a beginner or a skilled Python pro. Support Girls Who Code and get Python books, software, and video courses collectively valued at $1,882 for a pay-what-you-want price →
HUMBLEBUNDLE.COMsponsor

Switching From pyenv to uv
Will has recently switched from using a variety of packaging tools to just using uv. This post is a summary of what needed to change when going from pyenv to uv.
WILL KAHN-GREENE

uv Under Discussion on Mastodon
There is a deep conversation going on about the longevity of uv on Mastodon and for those not on the platform, Simon has summarized it.
SIMON WILLISON

Why Not Comments
This post talks about why you might want to include information in your code comments about why you didn’t take a particular approach.
HILLEL WAYNE

How to Build a Perfect Docker Image for a Poetry Project
This article describes how to build a secure, fast to build, and lightweight Docker image for your Poetry-based project
CODEMAGEDDON • Shared by Sergey

Python macOS Framework Builds
Glyph explains just what a Framework is on macOS and why CPython on macOS should be built that way.
GLYPH LEFKOWITZ


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 →

PSP (Python Scaffolding Projects)
GITHUB.COM/MATTEOGUADRINI • Shared by Matteo Guadrini

pocketpy: Portable Python 3.x Interpreter in Modern C
GITHUB.COM/POCKETPY

graphiti: Build Dynamic, Temporally-Aware Knowledge Graphs
GITHUB.COM/GETZEP

picows: Ultra-Fast Websocket Client and Server for Asyncio
GITHUB.COM/TARASKO

django-cotton: Component Based Design to Django Templates
GITHUB.COM/WRABIT

📆🐍 Upcoming Python Events


PyData Amsterdam 2024
September 18 to September 21, 2024

Weekly Real Python Office Hours Q&A (Virtual)
September 18, 2024

PyCon India 2024
September 20 to September 24, 2024

PyCon TW 2024
September 21 to September 23, 2024

DjangoCon US 2024
September 22 to September 27, 2024

PyBay 2024
September 23 to September 24, 2024

PyCon Africa 2024
September 24 to September 29, 2024

PyData Paris 2024
September 25 to September 27, 2024

PyCon JP 2024
September 27 to September 30, 2024

Python Norte 2024
September 27 to September 29, 2024

PyCon Niger 2024
September 28 to September 30, 2024
Happy Pythoning!
Copyright © 2024 PyCoder’s Weekly, All rights reserved.
You are receiving this email because you opted in on our website at pycoders.com
Our mailing address: DevCademy Media Inc. · #720-999 West Broadway, Vancouver BC V5Z 1K5, Canada

Unsubscribe | Update Email Address

Older messages

Pydantic, PSF Office Hours, Polars, and More

Tuesday, September 10, 2024

Using Pydantic to Simplify Python Data Validation #646 – SEPTEMBER 10, 2024 VIEW IN BROWSER The PyCoder's Weekly Logo Using Pydantic to Simplify Python Data Validation Discover the power of

Astronomy, Language Summit, Built-ins, and More

Tuesday, September 3, 2024

Using Astropy for Astronomy With Python #645 – SEPTEMBER 3, 2024 VIEW IN BROWSER The PyCoder's Weekly Logo Using Astropy for Astronomy With Python This course covers two problems from introductory

Astrophysics, pyproject.toml, Query Languages, and More

Tuesday, August 27, 2024

Exploring Astrophysics in Python With pandas and Matplotlib #644 – AUGUST 27, 2024 VIEW IN BROWSER The PyCoder's Weekly Logo Exploring Astrophysics in Python With pandas and Matplotlib This course

Scrapy Extensions, REST APIs, Django Sub-Commands, and More

Tuesday, August 20, 2024

Using a Custom Scrapy Extension to Log to a DB #643 – AUGUST 20, 2024 VIEW IN BROWSER The PyCoder's Weekly Logo Using a Custom Scrapy Extension to Log to a DB The Scrapy crawl stat logs are useful

Testing with nox, Async Iterators, Log Propagation, and More

Tuesday, August 13, 2024

Testing Coverage and Using `nox` #642 – AUGUST 13, 2024 VIEW IN BROWSER The PyCoder's Weekly Logo Testing Coverage and Using nox This is part 9 in an in-depth series on testing. This part talks

You Might Also Like

Exclusive: Top SaaS Security Threats of 2025—And How to Eliminate Them

Wednesday, September 18, 2024

Learn how 39% of companies are stepping up their defenses. ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

📳 Your Smart Home Needs Vibration Sensors — 7 Ways to Change How iOS 18 Looks

Wednesday, September 18, 2024

Also: Should You Use AI Photo Editors? How-To Geek Logo September 18, 2024 Did You Know The safety lever on a hand grenade, the lever the soldier holds down after removing the pin, but before throwing

JSK Daily for Sep 18, 2024

Wednesday, September 18, 2024

JSK Daily for Sep 18, 2024 View this email in your browser A community curated daily e-mail of JavaScript news Top 8 React Libraries for Building Beautiful and Functional UIs This article will look at

Daily Coding Problem: Problem #1560 [Medium]

Wednesday, September 18, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Google. Given a set of closed intervals, find the smallest set of numbers that covers

Nature is Healing

Wednesday, September 18, 2024

Over-Optimized Apple, John Wick AI, Snap's New Reality Nature is Healing Over-Optimized Apple, John Wick AI, Snap's New Reality By MG Siegler • 18 Sept 2024 View in browser View in browser

We tested every iPhone 16 model - buy this one

Wednesday, September 18, 2024

What I love about Pixel 9 Pro; October Prime Day; Best fitness rings -- ZDNET ZDNET Tech Today - US September 18, 2024 placeholder We've used every iPhone 16 model and here's our best buying

Charted | Visualizing S&P 500 Returns After Interest Rate Cuts 📈

Wednesday, September 18, 2024

In the past 50 years, S&P 500 returns following interest rate cuts have varied widely, from +36.5% to -36% a year later. View Online | Subscribe | Download Our App Presented by: The economy is

Top Tech Deals 👀 Garmin Smartwatch, $20 Fire TV Stick, Power Banks, and More!

Wednesday, September 18, 2024

Get a discounted mechanical RGB keyboard, Sony FE lens, portable chargers, and other must-haves. How-To Geek Logo September 18, 2024 Top Tech Deals: Garmin Smartwatch, $20 Fire TV Stick, Power Banks,

⚙️ Intel is trying to make a comeback

Wednesday, September 18, 2024

Plus: Microsoft is launching new AI centers in the Middle East ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Whiskey: The Tangible Asset for Your Portfolio

Wednesday, September 18, 2024

Most people fail to diversify their investments. They invest all their money in intangible assets like stocks, bonds, and crypto. The solution - fine whiskey. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏