RSSAmplifier

Blog

Mostly Python

Weekly posts about all things Python, and occasional other topics as well.

mostlypython.comRSS feed ↗15 posts

Latest posts

Parsing large(ish) data files

MP 173: It's always an interesting challenge. As I've been getting back into chess, I've enjoyed exploring the ever-growing public database of games people have played. But some of that exploration has been slowed by not having an established approach to parsing large

Inspecting your own code

MP 172: You don't have to consult documentation or AI assistants to learn more about the code you're working with. Recently I was considering how to best explain a snippet of code, and I realized I've developed some habits for inspecting code blocks that

Exploring chess games

MP 171: A first foray into the massive Lichess database. I've been getting back into chess since moving to North Carolina, and as part of that journey I've been wanting to analyze games in ways that weren't really possible when I was last playing

I keep being be impressed by uv

MP 170: It understands my old projects! A few years ago I made a small project that automatically adds borders to screenshots, because macOS doesn't have a built-in tool to easily do that. For a couple years I installed it globally on every system I used, so

An LLM can't go for a walk in the woods

MP 169: But we still can, and we should keep doing so. Regular readers of Mostly Python are probably aware that I'm currently working on gh-profiler . It helps open source maintainers make better-informed decisions about how much time to invest with users who open new PRs

Batching API calls

MP 168: An obvious speedup, with a surprising side benefit. I've been working steadily on gh-profiler , while attending PyCon US and working on other projects as well. The project makes a number of calls to GitHub's API, and then analyzes the results to generate some

Profiling a uv-based project

MP 167: It's not quite as straightforward as profiling a single-file program. Over the past couple weeks, I've been continuing to work on gh-profiler . If you missed the last post, gh-profiler gives you a quick summary of a GitHub user's profile

Cleaning up unused imports

MP 166: It's so much easier than it used to be! When I'm refactoring a project, I often end up with a bunch of imports that are no longer needed. Cleaning up unused imports is often a low-priority task, because in most of the projects

Generating unique names

MP 165: TIL about secrets.token_hex() . I've been working on dsd-scalingo recently, a django-simple-deploy plugin that automates the process of deploying Django projects to Scalingo . I'm excited about this work, because Scalingo seems to be one of the best platforms available at

So OpenAI is acquiring Astral

MP 164: Will you keep using uv? I sure will, until there's a more specific reason not to. The Python world was all abuzz recently after Astral announced they were being acquired by OpenAI. If you're unfamiliar with Astral, they're the team behind uv

How many digits are there in pi?

MP 163: Probably not as many as you think! Many of us who marvel at the wonder of mathematical constants just enjoyed another pi day. This year's celebration had me thinking about how we decide how many digits of pi to use whenever we're working with

What is `self`?

MP 162: It's been answered many times, but it's always worth revisiting. I've been reflecting on classes lately, and how we teach them. One of the questions that comes up in every discussion about OOP with people who are seeing it for the first

Stochastic terror parrots?

MP 161: Autonomous agents slandering open source maintainers is almost certainly just a beginning. In case you missed it, we reached another inflection point in the ever-increasing impact of AI on society last week. Briefly, an autonomous agent submitted a PR on the Matplotlib repository. That PR was rejected,

Anatomy of a Python Function

MP 160: When we're discussing functions in Python, what do we call the different parts? I've been reflecting on typing in Python recently. I haven't used type hints much, because all my programs have worked fine without them. But typing in Python has matured

Debugging in Python, part 15: Final takeaways

MP 159: What did we learn about debugging from this series? What can you do to continue this work? Note:   This post is part of an ongoing  series  about debugging in Python. The posts in this series will only be available to paid subscribers for the first