Daniel Roy Greenfeld: Using locust for load testing
Link: https://daniel.feldroy.com/posts/2024-11-using-locust-for-load-testing
Locust is a Python library that makes it relatively straightforward to write Python tests. This heavily commented code example explains each section of code. To use locust:
Install locust: pip instal
Link: https://daniel.feldroy.com/posts/2024-11-using-locust-for-load-testing
Locust is a Python library that makes it relatively straightforward to write Python tests. This heavily commented code example explains each section of code. To use locust:
Install locust: pip instal
https://daniel.feldroy.com
Using locust for load testing
Quickstart guide for doing web application load testing with the Python powered locust library.
Daniel Roy Greenfeld: TIL: Using Python to removing prefixes and suffixes
Link: https://daniel.feldroy.com/posts/til-2024-10-removing-prefixes-and-suffixes
Starting in Python 3.9, s.removeprefix() and s.removesuffix() were added as str built-ins. Which easily covers all the versions of Python I currently support.
Usage for removeprefix():
>>> 'Spam, Spam
Link: https://daniel.feldroy.com/posts/til-2024-10-removing-prefixes-and-suffixes
Starting in Python 3.9, s.removeprefix() and s.removesuffix() were added as str built-ins. Which easily covers all the versions of Python I currently support.
Usage for removeprefix():
>>> 'Spam, Spam
https://daniel.feldroy.com
TIL: Using Python to removing prefixes and suffixes
How did I miss these functions getting added to Python?
Daniel Roy Greenfeld: TIL: Using hx-swap-oob with FastHTML
Link: https://daniel.feldroy.com/posts/til-2024-12-using-hx-swap-oob-with-fasthtml
Until now I didn't use this HTMX technique, but today Audrey Roy Greenfeld and I dove in together to figure it out. Note that we use language that may not match HTMX's description, sometimes it's bett
Link: https://daniel.feldroy.com/posts/til-2024-12-using-hx-swap-oob-with-fasthtml
Until now I didn't use this HTMX technique, but today Audrey Roy Greenfeld and I dove in together to figure it out. Note that we use language that may not match HTMX's description, sometimes it's bett
https://daniel.feldroy.com
TIL: Using hx-swap-oob with FastHTML
How to have the injected content know where to go instead of assigning it from the form.
Daniel Roy Greenfeld: TIL: Arity
Link: https://daniel.feldroy.com/posts/til-2024-12-arity
I'm excited to have learned there's a word for the count of arguments to a function/method/class: arity. Throughout my career I would have called this any of the following:
number_of_args
param_count
Link: https://daniel.feldroy.com/posts/til-2024-12-arity
I'm excited to have learned there's a word for the count of arguments to a function/method/class: arity. Throughout my career I would have called this any of the following:
number_of_args
param_count
https://daniel.feldroy.com
TIL: Arity
In logic, mathematics, and computer science, arity is the number of arguments or operands taken by a function, operation or relation.
Daniel Roy Greenfeld: TIL: How to reset Jupyter notebook passwords
Link: https://daniel.feldroy.com/posts/til-2024-12-how-to-reset-jupyter-notebook-passwords
jupyter notebook password
Attribution for this goes to Johno Whitaker.
Link: https://daniel.feldroy.com/posts/til-2024-12-how-to-reset-jupyter-notebook-passwords
jupyter notebook password
Attribution for this goes to Johno Whitaker.
https://daniel.feldroy.com
TIL: How to reset Jupyter notebook passwords
For those times when you get locked out of a Jupyter notebook
Daniel Roy Greenfeld: TIL: Python's defaultdict takes a factory function
Link: https://daniel.feldroy.com/posts/til-2024-12-defaultdict-takes-a-factory-function
I've never really paid attention to this object but maybe I should have. It takes a single argument of a callable function. If you put in Python types it sets the default value to those types. For exa
Link: https://daniel.feldroy.com/posts/til-2024-12-defaultdict-takes-a-factory-function
I've never really paid attention to this object but maybe I should have. It takes a single argument of a callable function. If you put in Python types it sets the default value to those types. For exa
https://daniel.feldroy.com
TIL: Python's defaultdict takes a factory function
Create a dictionary-like object that takes a factory function so you have lots of control over what the default value can be.
Daniel Roy Greenfeld: TIL: Python Dictonary Merge Operator
Link: https://daniel.feldroy.com/posts/til-2024-11-python-dictonary-merge-operator
The function way
Until today I did this:
# Make first dict
num_map = {
'one': '1', 'two': '2', 'three': '3', 'four': '4',
'five': '5', 'six': '6', 'seven': '7', 'eight': '8',
'nine': '9'
}
Link: https://daniel.feldroy.com/posts/til-2024-11-python-dictonary-merge-operator
The function way
Until today I did this:
# Make first dict
num_map = {
'one': '1', 'two': '2', 'three': '3', 'four': '4',
'five': '5', 'six': '6', 'seven': '7', 'eight': '8',
'nine': '9'
}
https://daniel.feldroy.com
TIL: Python Dictonary Merge Operator
Did you know there's a merge operator for Python dictionaries? I didn't until today!
Daniel Roy Greenfeld: TIL: Fractional Indexing
Link: https://daniel.feldroy.com/posts/til-2024-11-fractional-indexing
In the past when I've done this for web pages and various other interfaces it has been a mess. I've built ungainly sort order in numeric or alphanumeric batches. Inevitably there is a conflict, often
Link: https://daniel.feldroy.com/posts/til-2024-11-fractional-indexing
In the past when I've done this for web pages and various other interfaces it has been a mess. I've built ungainly sort order in numeric or alphanumeric batches. Inevitably there is a conflict, often
https://daniel.feldroy.com
TIL: Fractional Indexing
How to keep order of records without having to update all the records
Daniel Roy Greenfeld: TIL: Making pytest use Ipython's PDB
Link: https://daniel.feldroy.com/posts/til-2024-11-making-pytest-use-ipython's-pdb
alias pdb='pytest --pdb --pdbcls=IPython.terminal.debugger:TerminalPdb'
Usage:
pdb tests/test_things::test_broken_thing
Link: https://daniel.feldroy.com/posts/til-2024-11-making-pytest-use-ipython's-pdb
alias pdb='pytest --pdb --pdbcls=IPython.terminal.debugger:TerminalPdb'
Usage:
pdb tests/test_things::test_broken_thing
https://daniel.feldroy.com
TIL: Making pytest use Ipython's PDB
Once I've isolated a test failure to a very small set of failures I use this instead of running pytest directly. What it does on exception is start the IPython pdb interface.
Daniel Roy Greenfeld: TIL: SequentialTaskSet for Locust
Link: https://daniel.feldroy.com/posts/til-2024-11-sequentialtaskset-for-locust
SequentialTaskSet makes it so Locust tasks happen in a particular order, which ensures your simulated users are clicking around in a more human manner at a more human pace. Attribution goes to Audrey
Link: https://daniel.feldroy.com/posts/til-2024-11-sequentialtaskset-for-locust
SequentialTaskSet makes it so Locust tasks happen in a particular order, which ensures your simulated users are clicking around in a more human manner at a more human pace. Attribution goes to Audrey
https://daniel.feldroy.com
TIL: SequentialTaskSet for Locust
How to get Locust to not bash your server like a robot.
Python Bytes: #415 Just put the fries in the bag bro
Link: https://pythonbytes.fm/episodes/show/415/just-put-the-fries-in-the-bag-bro
<strong>Topics covered in this episode:</strong><br>
<ul>
<li><a href="https://github.com/dbos-inc/dbos-transact-py?featured_on=pythonbytes"><strong>dbos-transact-py</strong></a></li>
<li><strong><a
Link: https://pythonbytes.fm/episodes/show/415/just-put-the-fries-in-the-bag-bro
<strong>Topics covered in this episode:</strong><br>
<ul>
<li><a href="https://github.com/dbos-inc/dbos-transact-py?featured_on=pythonbytes"><strong>dbos-transact-py</strong></a></li>
<li><strong><a
pythonbytes.fm
Just put the fries in the bag bro
News and announcements from the Python community for the week of Dec 23rd, 2024
Django Weblog: Welcome to our new Django accessibility team members - Eli, Marijke, Saptak, Tushar
Link: https://www.djangoproject.com/weblog/2024/dec/24/welcome-new-django-accessibility-team-members/
Sarah Abderemane, Thibaud Colas and Tom Carrick are pleased to introduce four new members in the Django Accessibility team ❤️.
Marijke Luttekes
Eliana Rosselli
Tushar Gupta
Saptak Sengupta
Marijke (
Link: https://www.djangoproject.com/weblog/2024/dec/24/welcome-new-django-accessibility-team-members/
Sarah Abderemane, Thibaud Colas and Tom Carrick are pleased to introduce four new members in the Django Accessibility team ❤️.
Marijke Luttekes
Eliana Rosselli
Tushar Gupta
Saptak Sengupta
Marijke (
Django Project
Welcome to our new Django accessibility team members - Eli, Marijke, Saptak, Tushar
Posted by Sarah Abderemane, Thibaud Colas, Tom Carrick on Dec. 24, 2024
Talk Python to Me: #490: Django Ninja
Link: https://talkpython.fm/episodes/show/490/django-ninja
If you're a Django developer, I'm sure you've heard so many people raving about FastAPI and Pydantic. But you really love Django and don't want to switch. Then you might want to give Django Ninja a se
Link: https://talkpython.fm/episodes/show/490/django-ninja
If you're a Django developer, I'm sure you've heard so many people raving about FastAPI and Pydantic. But you really love Django and don't want to switch. Then you might want to give Django Ninja a se
talkpython.fm
Django Ninja
If you're a Django developer, I'm sure you've heard so many people raving about FastAPI and Pydantic. But you really love Django and don't want to switch. Then you might want to give Django Ninja a serious look. Django Ninja is highly inspired by FastAPI…
PyCoder’s Weekly: Issue #661 (Dec. 24, 2024)
Link: https://pycoders.com/issues/661
#661 – DECEMBER 24, 2024 View in Browser » Exploring Modern Sentiment Analysis Approaches in Python What are the current approaches for analyzing emotions within a piece of text? Which tools and
Link: https://pycoders.com/issues/661
#661 – DECEMBER 24, 2024 View in Browser » Exploring Modern Sentiment Analysis Approaches in Python What are the current approaches for analyzing emotions within a piece of text? Which tools and
Pycoders
PyCoder’s Weekly | Issue #661
Issue #661 of the PyCoder’s Weekly newsletter, published Dec. 24, 2024.
Daniel Roy Greenfeld: TIL: types.SimpleNamespace is a Bunch class
Link: https://daniel.feldroy.com/posts/til-2024-12-types-simplenamespace-is-a-bunch-class
Did you know that Python's types library has a bunch class implementation? How did I not see this before?!
Link: https://daniel.feldroy.com/posts/til-2024-12-types-simplenamespace-is-a-bunch-class
Did you know that Python's types library has a bunch class implementation? How did I not see this before?!
https://daniel.feldroy.com
TIL: types.SimpleNamespace is a Bunch class
Did you know that Python's types library has a bunch class implementation? How did I not see this before?!
Armin Ronacher: Reflecting on Life
Link: http://lucumr.pocoo.org/2024/12/26/reflecting-on-life
Last year I decided that I want to share my most important learnings
about engineering, teams and quite frankly personal mental health. My hope
is that those who want to learn from me find it useful.
Link: http://lucumr.pocoo.org/2024/12/26/reflecting-on-life
Last year I decided that I want to share my most important learnings
about engineering, teams and quite frankly personal mental health. My hope
is that those who want to learn from me find it useful.
Armin Ronacher's Thoughts and Writings
Reflecting on Life
Things I learned and believe, condensed into some sort of guide.
Kushal Das: pastewindow.nvim my first neovim plugin
Link: https://kushaldas.in/posts/pastewindow-nvim-my-first-neovim-plugin.html
pastewindow is a neovim plugin
written in Lua to help to paste text from a buffer to a different window in
Neovim. This is my first attempt of writing a plugin.
We can select a window (in the GIF be
Link: https://kushaldas.in/posts/pastewindow-nvim-my-first-neovim-plugin.html
pastewindow is a neovim plugin
written in Lua to help to paste text from a buffer to a different window in
Neovim. This is my first attempt of writing a plugin.
We can select a window (in the GIF be
Daniel Roy Greenfeld: TIL: yield from
Link: https://daniel.feldroy.com/posts/til-2024-12-yield-from
A variant of the yield statement that can result in more concise code.
Link: https://daniel.feldroy.com/posts/til-2024-12-yield-from
A variant of the yield statement that can result in more concise code.
https://daniel.feldroy.com
TIL: yield from
A variant of the yield statement that can result in more concise code.
Talk Python to Me: #491: DuckDB and Python: Ducks and Snakes living together
Link: https://talkpython.fm/episodes/show/491/duckdb-and-python-ducks-and-snakes-living-together
Join me for an insightful conversation with Alex Monahan, who works on documentation, tutorials, and training at DuckDB Labs. We explore why DuckDB is gaining momentum among Python and data enthusiast
Link: https://talkpython.fm/episodes/show/491/duckdb-and-python-ducks-and-snakes-living-together
Join me for an insightful conversation with Alex Monahan, who works on documentation, tutorials, and training at DuckDB Labs. We explore why DuckDB is gaining momentum among Python and data enthusiast
talkpython.fm
DuckDB and Python: Ducks and Snakes living together
Join me for an insightful conversation with Alex Monahan, who works on documentation, tutorials, and training at DuckDB Labs. We explore why DuckDB is gaining momentum among Python and data enthusiasts, from its in-process database design to its blazingly…
Matt Layman: Optimizing SQLite - Building SaaS #210
Link: https://www.mattlayman.com/videos/optimizing-sqlite-building-saas-210/
In this episode, when worked on the newly migrated JourneyInbox site and focused on the database. Since me moved from Postgres to SQLite, I needed to make sure that SQLite was ready for users. We exam
Link: https://www.mattlayman.com/videos/optimizing-sqlite-building-saas-210/
In this episode, when worked on the newly migrated JourneyInbox site and focused on the database. Since me moved from Postgres to SQLite, I needed to make sure that SQLite was ready for users. We exam
Matt Layman
Optimizing SQLite - Building SaaS #210
In this episode, when worked on the newly migrated JourneyInbox site and focused on the database. Since me moved from Postgres to SQLite, I needed to make sure that SQLite was ready for users. We examined common configuration to optimize the database and…