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

Next Holiday Season, Ignore Everyone Except One Customer

Saturday, December 21, 2024

Top Tech Content sent at Noon! Boost Your Article on HackerNoon for $159.99! Read this email in your browser How are you, @newsletterest1? 🪐 What's happening in tech today, December 21, 2024? The

🐍 New Python tutorials on Real Python

Saturday, December 21, 2024

Hey there, There's always something going on over at Real Python as far as Python tutorials go. Here's what you may have missed this past week: 🎓 Master Python's Core Principles (New Live

Post from Syncfusion Blogs on 12/21/2024

Saturday, December 21, 2024

New blogs from Syncfusion ASP.NET MVC Suite Update: Aligning with .NET Changes By Rajendran R Discover key updates in our ASP.NET MVC suite, aligning with Microsoft's latest .NET changes for

LockBit Ransomware Developer Charged for Billions in Global Damages

Saturday, December 21, 2024

THN Daily Updates Newsletter cover The Data Science Handbook, 2nd Edition ($60.00 Value) FREE for a Limited Time Practical, accessible guide to becoming a data scientist, updated to include the latest

Re: My VPN recommendation

Saturday, December 21, 2024

Do you know when to use a VPN and what it does to protect your data? Any time you are connected to the internet, your information is at risk of being tracked or hacked. A VPN helps keep your surfing

📧 Scheduling Background Jobs With Quartz in .NET (advanced concepts)

Saturday, December 21, 2024

​ Scheduling Background Jobs With Quartz in .NET (advanced concepts) Read on: m​y website / Read time: 6 minutes The .NET Weekly is brought to you by: It's been a big year for API collaborations!

The Thrill Was Never There 🎸

Saturday, December 21, 2024

Takeaways from a punk-rock creator who says he doesn't like punk. Here's a version for your browser. Hunting for the end of the long tail • December 20, 2024 The Thrill Was Never There A famous

🎮 Smartphones Will Never Kill Dedicated Handhelds — 11 Stocking Stuffers for iPhone Owners

Friday, December 20, 2024

Also: How to Add a Smart Speaker to Your Home Assistant Setup How-To Geek Logo December 20, 2024 Did You Know The nursery rhyme "Mary Had a Little Lamb" is based on a true story. The girl in

Daily Coding Problem: Problem #1643 [Easy]

Friday, December 20, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Facebook. Given a 32-bit integer, return the number with its bits reversed. For example,

JSK Daily for Dec 20, 2024

Friday, December 20, 2024

JSK Daily for Dec 20, 2024 View this email in your browser A community curated daily e-mail of JavaScript news Empower Your Data Insights: Integrating JavaScript Gantt Chart into Power BI Syncfusion