Linuxer, Pythoner, Kickstarter Backer, PC Gamer.
Founder of https://moe.pastwind.top mastodon instance.
打雜網管工程師&業餘Django+Vuejs工程師
Paolo Melchiorre - Database generated columns ⁽¹⁾: Django & SQLite
An introduction to database generated columns, using SQLite and the new GeneratedField added in Django 5.0.
I was reading Owen Shepherd’s post “{n} times faster than C”, which explores how to hand-tune x86-64 assembly to make a certain problem faster (see below). Originally, this inspired me to write a short introduction to using Rust’s portable SIMD to manually speed up problems like this. I rewrote the ...
We explore different ways of getting the current timestamp in Python and profile their respective execution times.
Is time.time() the fastest? What if you need a datetime object: datetime.now(), datetime.utcnow()? Let's find out!
While some data structures are versatile and can be used in a wide range of applications, others are specialized and designed to handle specific problems. One...
In this article let's look at the functools Standard Library module and 6 cool things you can do with it (be warned, a lot of decorators are coming your way!
In this tutorial, you'll learn to specify multiple return types using type hints in Python. You'll cover working with one or several pieces of data, defining type aliases, and type checking with a third-party static type checker tool.
Sometimes you need to assess your own or candidate's level of expertise in Python programming. I have created some statements that roughly corresponds to the various level of expertise. Note that knowing programming language techniques contributes to expertise but does not make …
Are you having trouble making the modules work together in a larger project? Have you tried looking at popular projects as models, but were put off by their size and scope, or found it hard to see why they did the things they did? Resources about this do exist, but they're scattered all over, and mi...
Higher-order functions in Python take functions as arguments, or return as results, making code more readable and reusable.
Because life doesn't have to be hard all the time
In this tutorial, you'll take a deep dive into parallel processing in Python. You'll learn about a few traditional and several novel ways of sidestepping the global interpreter lock (GIL) to achieve genuine shared-memory parallelism of your CPU-bound tasks.
The Python standard library’s logging module is a go-to for adding observability to applications. Many tools also integrated with it or enhance its capabilities, such as structlog and Sentry.
Introducing Python's functools functions using real world examples.