Inspired Python: Mastering Structural Pattern Matching
Link: https://www.inspiredpython.com/course/pattern-matching/mastering-structural-pattern-matching?r=rss
Mastering Structural Pattern Matching
If you’re not familiar with the term Structural Pattern Matching then you are not alone. It’s a feature that, until about 10-15 years ago, you would not see outs
Link: https://www.inspiredpython.com/course/pattern-matching/mastering-structural-pattern-matching?r=rss
Mastering Structural Pattern Matching
If you’re not familiar with the term Structural Pattern Matching then you are not alone. It’s a feature that, until about 10-15 years ago, you would not see outs
Inspiredpython
Mastering Structural Pattern Matching
In this course you’ll learn how to use Python 3.10’s new Structural Pattern Matching feature, and why Python would suddenly adopt a complex feature usually reserved for functional programming languages.
Inspired Python: Watch out for mutable defaults in function arguments
Link: https://www.inspiredpython.com/article/watch-out-for-mutable-defaults-in-function-arguments?r=rss
Watch out for mutable defaults in function arguments
Default arguments in functions are useful. When you write a function with defaults you do so with the understanding that other developers may not
Link: https://www.inspiredpython.com/article/watch-out-for-mutable-defaults-in-function-arguments?r=rss
Watch out for mutable defaults in function arguments
Default arguments in functions are useful. When you write a function with defaults you do so with the understanding that other developers may not
Inspiredpython
Watch out for mutable defaults in function arguments
You can set default values for function or method
arguments, but think twice before you pick something that is
mutable or can cause side-effects.
arguments, but think twice before you pick something that is
mutable or can cause side-effects.
Inspired Python: Separating type-specific code with singledispatch
Link: https://www.inspiredpython.com/article/separating-type-specific-code-with-singledispatch?r=rss
Separating type-specific code with singledispatch
Have you ever found yourself writing a litany of if-elif-else statements peppered with isinstance() calls? Notwithstanding error handling, they are
Link: https://www.inspiredpython.com/article/separating-type-specific-code-with-singledispatch?r=rss
Separating type-specific code with singledispatch
Have you ever found yourself writing a litany of if-elif-else statements peppered with isinstance() calls? Notwithstanding error handling, they are
Inspiredpython
Separating type-specific code with singledispatch
Have you ever found yourself writing a litany of if-elif-else statements peppered with isinstance() calls? functools.singledispatch can help you separate your concerns and make your code easier to test.
Inspired Python: Truthy and Falsy Gotchas
Link: https://www.inspiredpython.com/article/truthy-and-falsy-gotchas?r=rss
Truthy and Falsy Gotchas
Think back to when you wrote your first ever if statement in Python. I’m sure that intuition told you to only give Python boolean expressions that naturally evaluates to True
Link: https://www.inspiredpython.com/article/truthy-and-falsy-gotchas?r=rss
Truthy and Falsy Gotchas
Think back to when you wrote your first ever if statement in Python. I’m sure that intuition told you to only give Python boolean expressions that naturally evaluates to True
Inspiredpython
Truthy and Falsy Gotchas
Python developers quickly learn that almost everything in Python evaluates to True or False in a boolean context. However, there are a number of gotchas that can cause logic errors in your code if you are not vigilant.
Inspired Python: Common Path Patterns
Link: https://www.inspiredpython.com/article/common-path-patterns?r=rss
Common Path Patterns
The pathlib module, introduced in Python 3.4, added a class-based approach to Path and file management. Most users of Path never venture beyond the basics of joining paths togeth
Link: https://www.inspiredpython.com/article/common-path-patterns?r=rss
Common Path Patterns
The pathlib module, introduced in Python 3.4, added a class-based approach to Path and file management. Most users of Path never venture beyond the basics of joining paths togeth
Inspiredpython
Common Path Patterns
The pathlib module, introduced in Python 3.4, added a class-based approach to Path and file management. Most users of Path never venture beyond the basics of joining paths together. That’s a shame as the motivations behind the pathlib module is to serve as…
Inspired Python: Assertions and Exceptions are not the same
Link: https://www.inspiredpython.com/article/assertions-and-exceptions-are-not-the-same?r=rss
Assertions and Exceptions are not the same
What’s wrong with the withdraw_money function in the code below?
# bank.py
from dataclasses import dataclass
@dataclass
class Client:
balance: float
Link: https://www.inspiredpython.com/article/assertions-and-exceptions-are-not-the-same?r=rss
Assertions and Exceptions are not the same
What’s wrong with the withdraw_money function in the code below?
# bank.py
from dataclasses import dataclass
@dataclass
class Client:
balance: float
Inspiredpython
Assertions and Exceptions are not the same
The assert statement is not a stand-in replacement for raising exceptions. Wrongful application of assertions is a common mistake beginners make, and it can result in serious logic errors in your code.
Real Python: Python's property(): Add Managed Attributes to Your Classes
Link: https://realpython.com/python-property/
With Python’s property(), you can create managed attributes in your classes. You can use managed attributes, also known as properties, when you need to modify their internal implementation without cha
Link: https://realpython.com/python-property/
With Python’s property(), you can create managed attributes in your classes. You can use managed attributes, also known as properties, when you need to modify their internal implementation without cha
Realpython
Python's property(): Add Managed Attributes to Your Classes – Real Python
In this tutorial, you'll learn how to create managed attributes in your classes using Python's property(). Managed attributes are attributes that have function-like behavior, which allows for performing actions during the attribute access and update.
Codementor: How and why I built a Real Estate Valuation Startup
Link: https://www.codementor.io/erickdamasceno/how-and-why-i-built-a-real-estate-valuation-startup-1mi98al8tq
How I created a startup to predict real estate prices in Brazil using R, Python and Django.
Link: https://www.codementor.io/erickdamasceno/how-and-why-i-built-a-real-estate-valuation-startup-1mi98al8tq
How I created a startup to predict real estate prices in Brazil using R, Python and Django.
www.codementor.io
How and why I built a Real Estate Valuation Startup | Codementor
How I created a startup to predict real estate prices in Brazil using R, Python and Django.
Quansight Labs Blog: Array Libraries Interoperability
Link: https://labs.quansight.org/blog/2021/10/array-libraries-interoperability/
In this blog post I talk about the work that I was able to accomplish during
my internship at Quansight Labs and the efforts being made towards making
array libraries more interoperable.
Going ahead,
Link: https://labs.quansight.org/blog/2021/10/array-libraries-interoperability/
In this blog post I talk about the work that I was able to accomplish during
my internship at Quansight Labs and the efforts being made towards making
array libraries more interoperable.
Going ahead,
Quansight Labs
Array Libraries Interoperability
In this blog post I talk about the work that I was able to accomplish during
my internship at Quansight Labs and the efforts being made towards making
array libraries more interoperable.
Going ahead,
my internship at Quansight Labs and the efforts being made towards making
array libraries more interoperable.
Going ahead,
Python Bytes: #254 Do Excel things, get notebook Python code with Mito
Link: https://pythonbytes.fm/episodes/show/254/do-excel-things-get-notebook-python-code-with-mito
<p><strong>Watch the live stream:</strong></p>
<a href='https://www.youtube.com/watch?v=nm3i1VA9jFw' style='font-weight: bold;'>Watch on YouTube</a><br>
<br>
<p><strong>About the show</strong></p>
Link: https://pythonbytes.fm/episodes/show/254/do-excel-things-get-notebook-python-code-with-mito
<p><strong>Watch the live stream:</strong></p>
<a href='https://www.youtube.com/watch?v=nm3i1VA9jFw' style='font-weight: bold;'>Watch on YouTube</a><br>
<br>
<p><strong>About the show</strong></p>
pythonbytes.fm
Do Excel things, get notebook Python code with Mito
News and announcements from the Python community for the week of Oct 13th, 2021
Python for Beginners: Generator Comprehension in Python
Link: https://www.pythonforbeginners.com/basics/generator-comprehension-in-python
You might have used list comprehension for creating lists from different sequences and container objects. In this article, We will discuss generator comprehension to create generators in Python. We wi
Link: https://www.pythonforbeginners.com/basics/generator-comprehension-in-python
You might have used list comprehension for creating lists from different sequences and container objects. In this article, We will discuss generator comprehension to create generators in Python. We wi
PythonForBeginners.com
Generator Comprehension in Python - PythonForBeginners.com
Generator Comprehension in Python will help you improve your python skills with easy to follow examples and tutorials. Click here to view code examples.
TestDriven.io: Accepting Crypto Payments with Django and Coinbase
Link: https://testdriven.io/blog/django-coinbase/
This tutorial looks at how to accept crypto Payments with Django and Coinbase Commerce.
Link: https://testdriven.io/blog/django-coinbase/
This tutorial looks at how to accept crypto Payments with Django and Coinbase Commerce.
testdriven.io
Accepting Crypto Payments with Django and Coinbase
This tutorial looks at how to accept crypto Payments with Django and Coinbase Commerce.
Test and Code: 166: unittest expectedFailure and xfail
Link: https://testandcode.com/166
xfail isn't just for pytest tests. Python's unittest has @unittest.expectedFailure.
In this episode, we cover:
using @unittest.expectedFailure
the results of passing and failing tests with expectedFa
Link: https://testandcode.com/166
xfail isn't just for pytest tests. Python's unittest has @unittest.expectedFailure.
In this episode, we cover:
using @unittest.expectedFailure
the results of passing and failing tests with expectedFa
Test & Code
Test & Code 166: unittest expectedFailure and xfail
xfail isn't just for pytest tests. Python's unittest has `@unittest.expectedFailure`.
Ben Cook: How to Use the PyTorch Sigmoid Operation
Link: https://sparrow.dev/pytorch-sigmoid/
The PyTorch sigmoid function is an element-wise operation that squishes any real number into a range between 0 and 1. This is a very common activation function to use as the last layer of binary class
Link: https://sparrow.dev/pytorch-sigmoid/
The PyTorch sigmoid function is an element-wise operation that squishes any real number into a range between 0 and 1. This is a very common activation function to use as the last layer of binary class
Sparrow Computing
How to use the PyTorch sigmoid operation - Sparrow Computing
The PyTorch sigmoid function is an element-wise operation. You can apply it with the torch.sigmoid() function or the torch.nn.Sigmoid() class.
Ben Cook: PyTorch Tensor to NumPy Array and Back
Link: https://sparrow.dev/pytorch-numpy-conversion/
NumPy to PyTorch
PyTorch is designed to be pretty compatible with NumPy. Because of this, converting a NumPy array to a PyTorch tensor is simple:
import torch
import numpy as np
x = np.eye(3)
torch.
Link: https://sparrow.dev/pytorch-numpy-conversion/
NumPy to PyTorch
PyTorch is designed to be pretty compatible with NumPy. Because of this, converting a NumPy array to a PyTorch tensor is simple:
import torch
import numpy as np
x = np.eye(3)
torch.
Sparrow Computing
NumPy Arrays to PyTorch Tensors and Back
You can easily convert a NumPy array to a PyTorch tensor and a PyTorch tensor to a NumPy array. This post explains how it works.
Ben Cook: TorchVision Transforms: Image Preprocessing in PyTorch
Link: https://sparrow.dev/torchvision-transforms/
TorchVision, a PyTorch computer vision package, has a simple API for image pre-processing in its torchvision.transforms module. The module contains a set of common, composable image transforms and giv
Link: https://sparrow.dev/torchvision-transforms/
TorchVision, a PyTorch computer vision package, has a simple API for image pre-processing in its torchvision.transforms module. The module contains a set of common, composable image transforms and giv
Sparrow Computing
TorchVision Transforms: Image Preprocessing in PyTorch
This post explains the torchvision.transforms module by describing the API and showing you how to create custom image transforms.
Stack Abuse: Creating a Form in a PDF Document in Python With borb
Link: https://stackabuse.com/creating-a-form-in-a-pdf-document-in-python-with-borb/
The Portable Document Format (PDF) is not a WYSIWYG (What You See is What You Get) format. It was developed to be platform-agnostic, independent of the underlying operating system and rendering engine
Link: https://stackabuse.com/creating-a-form-in-a-pdf-document-in-python-with-borb/
The Portable Document Format (PDF) is not a WYSIWYG (What You See is What You Get) format. It was developed to be platform-agnostic, independent of the underlying operating system and rendering engine
Stack Abuse
Creating a Form in a PDF Document in Python With borb
In this guide, we'll take a look at how to add a fillable, interactive form in a PDF document using Python and borb, with dropdown menus and input text fields.
Real Python: The Real Python Podcast – Episode #82: Welcoming the CPython Developer in Residence
Link: https://realpython.com/podcasts/rpp/82/
Earlier this year, the Python Software Foundation announced the creation of the Developer in Residence role. The first Visionary Sponsors of the PSF have provided funding for this new role for one yea
Link: https://realpython.com/podcasts/rpp/82/
Earlier this year, the Python Software Foundation announced the creation of the Developer in Residence role. The first Visionary Sponsors of the PSF have provided funding for this new role for one yea
Realpython
Episode #82: Welcoming the CPython Developer in Residence – The Real Python Podcast
Earlier this year, the Python Software Foundation announced the creation of the Developer in Residence role. The first Visionary Sponsors of the PSF have provided funding for this new role for one year. What development responsibilities does this job address?…
Python for Beginners: Callable Objects in Python
Link: https://www.pythonforbeginners.com/basics/callable-objects-in-python
You might have heard that functions in python are callable objects. In this article, we will discuss what exactly we mean by the term callable object. We will discuss concepts behind the implementatio
Link: https://www.pythonforbeginners.com/basics/callable-objects-in-python
You might have heard that functions in python are callable objects. In this article, we will discuss what exactly we mean by the term callable object. We will discuss concepts behind the implementatio
PythonForBeginners.com
Callable Objects in Python - PythonForBeginners.com
Callable Objects in Python will help you improve your python skills with easy to follow examples and tutorials. Click here to view code examples.
Ben Cook: How the NumPy append operation works
Link: https://sparrow.dev/numpy-append/
Anyone familiar with Python will know about the list append method:
a = [1, 2, 3]
a.append(4)
print(a)
# Expected result
# [1, 2, 3, 4]
But what if you want to append to a NumPy array? In that case,
Link: https://sparrow.dev/numpy-append/
Anyone familiar with Python will know about the list append method:
a = [1, 2, 3]
a.append(4)
print(a)
# Expected result
# [1, 2, 3, 4]
But what if you want to append to a NumPy array? In that case,
Sparrow Computing
How the NumPy append operation works - Sparrow Computing
Understanding the np.append() operation and when you might want to use it.