I try to commit a lot, and I also try to write useful tests appropriate for the scope of work I'm focusing on, but sometimes I drop the ball... Whether by laziness, ignorance, or accepted tech debt I don't always code perfectly and recently I was do ... read more →
TL;DR pandas.Series.str.contains accepts regular expressions and this is turned on by default! Use case We often need to filter pandas DataFrames based on several string values in a Series. Notice that sweet pyflyby import 😁! sandbox main via 3 ... read more →
htop is a common command line tool for seeing interactive output of your system resource utilization, running processes, etc. I've always been super confused about htop showing seemingly the same process several times though... The Fix... Just hit H ... read more →
Unpacking iterables in python with * is a pretty handy trick for writing code that is just a tiny bit more pythonic than not. arr: Tuple[Union[int, str]] = (1, 2, 3, 'a', 'b', 'c') print(arr) >>> (1, 2, 3, 'a', 'b', 'c') # the * unpacks ... read more →
pipx is a tool I've been using to solve a few problems of mine... pinning formatting tools like black, flake8, isort, etc. to the same version for all my projects keeping virtual environments clean of things like cookiecutter python utilities I wan ... read more →
fx is an interactaive JSON viewer for the terminal. It's a simple tool built with Charmcli's Bubble Tea. Installation The installation with go was broken for me - both via the link and direct from the repo. Now I'm not a gopher so I don't really kno ... read more →
I use Jellyfin at home for serving up most of our media - movies and shows etc. My dream is to have a GPU capable of transcoding any and all of our media for smooth playback on any device... Now, I thought I'd have that by now with my Nvidia Quadro ... read more →
Type hinting has helped me write code almost as much, if not more, than unit testing. One thing I love is that with complete type hinting you get a lot more out of your LSP. Typing dictionaries can be tricky and I recently learned about TypedDict to ... read more →
My moonlander is great, and I just recently added CAPS LOCK back to my keymapping but I've moved it... At present it is where the ESC kep usually is however I'm trying to match my general moonlander usage with a keymap that fits on a planck. Because ... read more →