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

Boost Elastic Skills & Break Limits in 2025!

Wednesday, November 20, 2024

Transforming Elastic Customer Support with GenAI ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ elastic | Search. Observe. Protect Get your annual pass Edu-Email-

📞 6 Foldable Phone Misconceptions Busted — What to Know About Family Cell Plans

Tuesday, November 19, 2024

Also: Use These Apps to Improve Spotify, and More! How-To Geek Logo November 19, 2024 Did You Know Despite the widely held misunderstanding that Franklin D. Roosevelt had polio, his health problems and

Debugging TUIs, Dictionary Comprehensions, Puzzles, and More

Tuesday, November 19, 2024

How to Debug Your Textual Application #656 – NOVEMBER 19, 2024 VIEW IN BROWSER The PyCoder's Weekly Logo How to Debug Your Textual Application TUI applications require a full terminal which most

Daily Coding Problem: Problem #1613 [Hard]

Tuesday, November 19, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by VMware. The skyline of a city is composed of several buildings of various widths and

Ranked | U.S. States vs. G7 Countries by GDP per Capita 📊

Tuesday, November 19, 2024

Why compare American states vs G7 economies? Answer: for a granular look at how America has left its peers in the dust. View Online | Subscribe | Download Our App Presented by: OANDA FEATURED STORY US

Spyglass Dispatch: Selling Chrome • Tech Tariffs • Masa Son's Bets • Alexa's Frustrations • Ex-Meta Lobbying • Apple's Missing Battery Pack

Tuesday, November 19, 2024

Selling Chrome • Tech Tariffs • Masa Son's Bets • Alexa's Frustrations • Ex-Meta Lobbying • Apple's Missing Battery Pack The Spyglass Dispatch is a free newsletter sent out daily on

A Go-powered MIDI sequencer

Tuesday, November 19, 2024

Plus a big GoLand release, developing a terminal app with Bubble Tea, and reflecting on the history of Unix. | #​532 — November 19, 2024 Unsub | Web Version Together with Blacksmith Go Weekly Mailpit:

Is AI Progress Slowing? The Scaling Debate OpenAI Doesn’t Want to Have

Tuesday, November 19, 2024

Top Tech Content sent at Noon! How the world collects web data Read this email in your browser How are you, @newsletterest1? 🪐 What's happening in tech today, November 19, 2024? The HackerNoon

Webinar | Data Storytelling: What Organizations Need to Know Going into 2025 📈

Tuesday, November 19, 2024

A free webinar hosted by Visual Capitalist founder Jeff Desjardins. View email in browser In preparation for our new book "The Art of Data" and its speaking tour, we're giving you a sneak

LW 159 - Debunking Misconceptions About GraphQL

Tuesday, November 19, 2024

Debunking Misconceptions About GraphQL ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ Shopify Development news and articles Issue 159 - 11/19/