Pythonic Video Conferencing, OOP Inheritance vs Composition, Faster Pandas, and More

#416 – APRIL 14, 2020
The PyCoder’s Weekly Logo
Open Source Virtual Backgrounds With Python and OpenCV
With so much of the world stuck at home thanks to the COVID-19 pandemic, more and more workplaces are using video conferencing solutions—such as Zoom—to bring work to your living room. Or kitchen. Or bedroom. Or bathroom. OK… hopefully not that last one! Why not spice up your video conferencing with some awesome, homemade virtual backgrounds built with Python and OpenCV?
BENJAMIN ELDER

Inheritance and Composition: A Python OOP Guide
Learn about inheritance and composition in Python. You’ll improve your object-oriented programming (OOP) skills by understanding how to use inheritance and composition and how to leverage them in their design.
REAL PYTHON course

Scout APM for Python
Check out Scout’s developer-friendly application performance monitoring solution for Python. Scout continually tracks down N+1 database queries, sources of memory bloat, performance abnormalities, and more. Get back to coding with Scout →
SCOUT APMsponsor

Stop Naming Your Python Modules utils
“Do not use utils as a name for your Python module neither put it into a class name. Try to be more specific about the role of code – e.g. create a place for validators, services or factories. If the role criterion doesn’t help and you really dealing with utils, try grouping code by its theme.”
SEBASTIAN BUCZYŃSKI opinion

From Chunking to Parallelism: Faster Pandas With Dask
In a recent article, Itamar Turner-Trauring discussed how to read large datasets with Pandas using a chunking technique to reduce memory overhead. Chunking has another advantage: it enables parallelism, which can dramatically speed up processing time. Learn why and how to enable parallelism for your Pandas processing code using the Dask library.
ITAMAR TURNER-TRAURING

Data Science: Reality Doesn’t Meet Expectations
“Seven common ways a data science role may not meet your expectations through tens of data scientist interviews and anecdotes from popular media.” Also see the related discussion on Hacker News
DAN FRIEDMAN opinion

How to Provide Test Fixtures for Django Models in pytest
In this step-by-step tutorial, you’ll learn how to use fixtures to simplify your testing in pytest. If you use Django, pytest fixtures can help you write tests that are painless to update and maintain even as you make changes to your models.
REAL PYTHON

PyPy 7.3.1 Released
PYPY BLOG


Discussions


Can You Retrieve Elements Silently Consumed by zip() From Generators of Unequal Length?
If you pass two generators to zip(), then the iterator returned by zip() stops whenever the shorter of the two generators runs out of values. If the generator passed to zip() in the first position is larger than the second, then there is an “extra” value consumed from the larger generator. Why does this happen, and is it possible to retrieve the extra value consumed by zip()?
STACK OVERFLOW

How Can I Simplify Repetitive if/elif Statements?
Comparing a single value against a number of conditions can result in long if/elif blocks. Is there a short and clean way to handle these comparisons?
STACK OVERFLOW

Multiple pytest Maintainers Leaving pytest
REDDIT


Python Jobs


Python Tutorial Authors Wanted (Remote)
REAL PYTHON

Fullstack Software Engineer (Remote)
CYBERCODERS

Python/Matlab Developer (Remote)
WALLERO

Full Stack Developer C#, Node, Python (Remote)
CYBERCODERS

Python Data Engineer (Remote)
STRATEGISM INC.

More Python Jobs >>>


Articles & Tutorials


CuPy Accelerates NumPy on the GPU? Hold My Cider, Here’s Clojure!
NumPy is fast, but it doesn’t play well with GPUs. For that, you can use CuPy, a drop-in NumPy replacement for GPUs developed by Nvidia. Now, what if I told you to crunch those numbers in Clojure on a GPU instead? Surely a language that compiles to Java couldn’t beat C++ optimized for CUDA, could it? Dragan Djuric, author of Numerical Linear Algebra for Programmers compares CuPy and Clojure on a GPU, with some surprising results.
DRAGAN DJURIC

3 Ways to Test S3 in Python
Testing an application’s interaction with a third-party service can be difficult and frustrating. But sometimes a lot of business logic is wrapped up in those interactions, so testing them is important for building trust in the application. This article compares and contrasts three options for testing Amazon S3 integration using the pytest framework.
SANJAY SIDDHANTI

Neural Network Showdown: TensorFlow Vs PyTorch
TensorFlow and PyTorch are the two Python libraries that have accelerated the use of neural networks. This post goes over their pros and cons, so you can decide which to use in your next data science project. Check out ActiveState’s blog →
ACTIVESTATEsponsor

Quick Domain-Specific Languages in Python With textX
Domain-specific languages (DSL) bring the power of high-level programming to domain experts (read: non-programmers). In this article, Federico Tomassetti walks you through the process of creating a DSL with the textX Python library. As a bonus, you’ll also learn how to create syntax highlighting extension for VS Code that understands your language.
FEDERICO TOMASSETTI

Visualizing Decision Trees With Python
“Decision trees are a popular supervised learning method for a variety of reasons. Benefits of decision trees include that they can be used for both regression and classification, they don’t require feature scaling, and they are relatively easy to interpret as you can visualize decision trees. This is not only a powerful way to understand your model, but also to communicate how your model works. Consequently, it would help to know how to make a visualization based on your model.”
MICHAEL GALARNYK • Shared by Michael Galarnyk

John Conway, Inventor of the Game of Life, Has Died of COVID-19
John Horton Conway was one of the most influential mathematicians of the 20th and 21st centuries. His “Game of Life” spawned countless implementation—nearly becoming a rite of passage for programmers in any language. Sadly, the world lost this brilliant mind on April 11 due to complications from COVID-19. Renowned mathematician Terry Tao has also published a memoir in honor of John Conway on his blog.
ARSTECHNICA.COM

Modeling Stock Portfolios With Python
After reading an article about comparing a stock portfolio to the S&P 500, Matt Grierson wanted to go deeper and model a portfolio’s performance by analyzing buys and sells from a CSV file and calculating the rate of return relative to an index across any specified timeframe. This turned out to be more involved than Matt first thought it would be! Fortunately, Matt decided to share his experience—and his solution.
MATT GRIERSON

Adventures in Manipulating Python ASTs
George Ho proposed a change to PyMC4’s model specification API that he thought would help make the user experience more straightforward. Although those changes weren’t ultimately accepted by his fellow PyMC4 core developers, the process led him into some interesting explorations into Python’s abstract syntax tree.
GEORGE HO

RPP Episode #4: Learning Python Through Errors
An interview with Martin Breuss on getting started with Django, and how to learn Python through errors, and how errors really are your friends. Martin talks about his work with Coding Nomads, and teaching Python around the world. He also provides some tips on debugging and writing good questions.
REAL PYTHON podcast

Learn the Foundational Coding and Statistics Skills Needed to Start Your Career in Data Science
Interested in data science but not sure where to get started? Springboard’s Data Science Prep course was carefully crafted for go-getters ready for a challenge and need to brush up on a few basics before diving in to a data science bootcamp.
SPRINGBOARDsponsor

Combining Data in Pandas
In this step-by-step tutorial, you’ll learn three techniques for combining data in Pandas: merge, join, and concat. Combining Series and DataFrame objects in Pandas is a powerful way to gain new insights into your data.
REAL PYTHON

An Overview of Profiling Tools for Python
MIKE DRISCOLL

Gaining Insights Into Your Python Code Using the dis Module
FLORIAN DAHLITZ


Projects & Code


deltapy: Tabular Data Augmentation
GITHUB.COM/FIRMAI

twint: An Advanced Twitter Scraping & OSINT Tool
GITHUB.COM/TWINTPROJECT

Whole-Foods-Delivery-Slot: Automation for Whole Foods and Amazon Fresh Deliveries
GITHUB.COM/PCOMPUTO

textX: Domain-Specific Languages and Parsers Made Easy
GITHUB.COM/TEXTX

yfinance: Yahoo Finance Market Data Downloader
GITHUB.COM/RANAROUSSI

chord: Interactive Chord Diagrams in Python
GITHUB.COM/SHAHINROSTAMI

pymc4: High-Level Probabilistic Programming Interface for TensorFlow Probability
GITHUB.COM/PYMC-DEVS

machine_learning_examples: Collection of Machine Learning Examples and Tutorials
GITHUB.COM/LAZYPROGRAMMER

nimporter: Compile Nim Extensions for Python on Import!
GITHUB.COM/PEBAZ

PePy.tech: Download Stats for Python Packages
PEPY.TECH • Shared by Petru Rares Sincraian

Contextualise: Manage Your Knowledge
GITHUB.COM/BRETTKROMKAMP • Shared by Brett Kromkamp

📆🐍 Upcoming Python Events


⋅ IndyPy Mixer Meetup: Data Structures (Virtual) April 14, 2020

⋅ Virtual PythonCamp Cologne April 25 to April 26, 2020

⋅ Python Pizza Remote Conference April 25, 2020

⋅ EuroPython 2020 Online Conference July 23 to July 26, 2020
Happy Pythoning!
Copyright © 2020 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

 | 

Older messages

Python + Arduino, Final Python 2.x Release, Effective Python 2nd Ed., and More

Tuesday, April 7, 2020

Arduino With Python: How to Get Started #415 – APRIL 7, 2020 VIEW IN BROWSER The PyCoder's Weekly Logo Arduino With Python: How to Get Started Discover how to use Arduino microcontrollers with

You Might Also Like

AI Consultants should have a 15-Minute Sales Call Funnel

Monday, May 20, 2024

Your feedback is clear. I'll build 'the AI Consultant program' ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Daily Coding Problem: Problem #1447 [Medium]

Monday, May 20, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Facebook. Mastermind is a two-player game in which the first player attempts to guess

JTBD deep-dive - and a special announcement

Monday, May 20, 2024

Before we get to this week's Deep-Dive, we're pumped to announce that today is the official launch day for Today, we relaunch Gigantic, now powered by Product Collective. Gigantic helps product

⚙️ Exclusive Interview: Deeplearning.ai cofounder on the importance of regulation for job creation

Monday, May 20, 2024

Plus: The FTC has a few questions about AI & Colorado gets serious about AI regulation ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

2 weeks until the R&D 100 Final Deadline!

Monday, May 20, 2024

2 weeks until the R&D 100 Final Deadline! WTWH Media The 62nd R&D 100 Awards competition is nearing the end of its run, with the Final submission deadline being two weeks away. This esteemed

Cybersecurity consolidation is here: CyberArk snags Venafi for $1.54B

Monday, May 20, 2024

CyberArk is acquiring Venafi from Thoma Bravo for a good $1.54 billion. View this email online in your browser By Rebecca Bellan Monday, May 20, 2024 Welcome to TechCrunch AM! This morning, we've

I tested GPT-4o's coding skills - and it got weird

Monday, May 20, 2024

Must-have iPad tips; Memorial Day tech deals; Microsoft Build -- ZDNET ZDNET Tech Today - US May 20, 2024 placeholder I put GPT-4o through my coding tests and it aced them - except for one weird result

Noonification: Meet the HackerNoon Reader

Monday, May 20, 2024

Top Tech Content sent at Noon! Get Algolia: AI Search that understands How are you, @newsletterest1? 🪐 What's happening in tech today, May 20, 2024? The HackerNoon Newsletter brings the HackerNoon

Ranked | The World's 50 Largest Private Equity Firms 🏆

Monday, May 20, 2024

In this graphic, we show the largest private equity firms in the world—from real estate titan Blackstone to China's leading alternative funds. View Online | Subscribe Presented by Voronoi: The App

FTC Chair Joins StrictlyVC, Disrupt Vote Ends Friday & More

Monday, May 20, 2024

TechCrunch Events Roundup | May 20 TechCrunch Events Roundup Here's what's coming up at TechCrunch Events! Disrupt Audience Choice Voting Closes Friday Disrupt 2024 Audience Choice voting