Archive

All published posts

2586 posts latest post 2026-10-03
Publishing rhythm
Sep 2026 | 27 posts

git push without setting upstream

Finally after years of hand typing out a full I found there is a setting to automatcally push to the current branch. More realisitically I just did a let git yell at me, and copying the suggestion. git config # This one setting will now to the current branch without yelling at you that your upstream does not match your current branch. This helps me ship chnages faster as I am constantly chnaging projects and branches.
1 min read

Out of Space

This morning I logged into my machine and was nearly out of space 64GB miniconda3! 5GB conda cache 4GM pip cache 34GB docker Find it # These are the commands that I often use to reclaim space. Its so easy to fill up small vm’s in the cloud, or in my case today let your dev machine go way too long without a good cleanup. Show Remaining Space on Drives # This shows us where to start and gives a baseline of how much space we have reclaimed. show largest files in current directory # Next keep drilling into directories that are big and running this command to see whats big inside of it. When you find somethign that you are willing to part with it and check to see if you have enough reclaimed yet. Honestly I rarely bother unless the directory is in the GB’s of space. A super simple filter for that is to just grep for G. conda # How Many? # As a first baseline lets see how many enviroments we are starting with. I started with 71. Yeah I have had this machine for 2 years, and dont regularly re…
2 min read

simple click

cli tools are super handy and easy to add to your python libraries to supercharge them. Even if your library is not a cli tool there are a number of things that a cli can do to your library. Example Ideas # Things a cli can do to enhance your library. 🆚 print version 🕶 print readme 📝 print changelog 📃 print config ✏ change config 👩‍🎓 run a tutorial 🏗 scaffold a project with cookiecutter 🖱 Click # Click is the most popular python cli tool framework for python. There are others, some old, some new comers that make take the crown. For now Click is the gold standard if you want to make a powerful cli quickly. If you are dependency conscious and dont need a lot of tooling, use argparse. Project Structure # ❯ cli.py # ✨ init.py # For our simple_click library can be left empty. It is here purely to signify that simple_click is a library. It is likely that you will import other modules here that need to reside at the top level of your library api, your cli does not need to be at the top of of…

Personal URL shortener with Netlify Redirects

I love using URL shorteners to easily share links without hitting character limits, but they loose their meaning. Services like bit.ly will save my links for me so that I can find them, but I would rather them to be easy to remember. https://bit.ly/2ruLwQz does not roll of the tongue so well. 301 🤸‍♀️ # I recently discovered a really cool feature of netlify that I have always looked past,. It is so simple cool and powerful, every netlify site should do this! But how 🤷‍♀️ # simply add a file to the root of your your published site with the following format. The trick I found with my gatsby site was that it needed to be in my static directory, not root. Next you just put space separated links on separate lines. #’s can be used for comments. 🙌 Share those short links # Now with shorter links we have more space for our content without needing to use a service like bit.ly that makes our links unreadable.
szsdk has done a fantastic job with quick. Highly recommend taking a look. A real QUICK Qt5 based gUI generator for ClicK

cmd.exe tips

I spend a lot of my time at the terminal for my daily work, mostly in Linux or wsl. One big reason for using wsl over cmd.exe is the ease of walking through history that fzf provides. This week we had a windows bug in a cli and I was stuck in vanilla cmd.exe 😭 > Cmder # First off if you are stuck using cmd.exe, do yourself a favor and get cmder. It makes life just a bit easier. It is super confugurable and comes with several power ups that make it a bit more enjoyable than cmd.exe. History # F7 - Scroll through history F8 - Search history based Example #.bat # The next simple technique is to save your commands into a.bat file. Any valid command ran with cmd.exe can be saved into a bat file and called again later by running it in the terminal. save your command use f7/f8 to get your command back add at the end, hit the home key and add echo to the front. Do not wrap with quotes. This is not bash. » append type not cat # To ensure that you got the command right… and didn’t forget that yo…
2 min read
If you’re into interesting projects, don’t miss out on forgit, created by wfxr. 💤 A utility tool powered by fzf for using git interactively.
I’m really excited about python-c2f, an amazing project by grantjenks. It’s worth exploring! Cython for All with GitHub Actions

What is something you should have learned or understood earlier?

Mine is the python debugger. I was a long holdout thinking that print statements were sufficient. That was untill I started having errors crop up in functions that took minutes to run. The thing that I most notably wish I would have known about is post_mortem. Example # —-> 3 print(f’{msg}\n’ * repeats) 4 Debug with iPython/Jupyter # Vanilla Debug # More # For more information about the debugger checkout the real python article. https://realpython.com/python-debugging-pdb/ Also keep a bookmark of the table of pdb commands from the article https://realpython.com/python-debugging-pdb/#essential-pdb-commands Debug Session #
1 min read

Supercharge Zsh Startup

I have been using oh-my-zsh successfully for about 2 years now. But lately my startup time has been really bothersome. It has grown to the point where it was taking about 5.5s to startup a shell! This is ok if I am going to spend some time in here for awhile and do some work that benefits from all of the autocompletions, plugins, and shortcuts that oh-my-zsh brings. But to only jump in to run a handful of commands is infuriating. 📑 My Setup # I believe the real issue is io speed on wsl. I have some remote servers with similar configs that are 10x faster or more, loading in 100s of milliseconds rather than seconds. Sourcing all of the individual plugin files are just too much for it. 💨 How Fast can it be # Quick side note: your zsh config is controled by your ~/.zshrc file. This file can source other files, load plugins, or run literally anything. Time the initial time Move your ~/.zshrc config file. Time the fastest startup possible with nothing in your ~/.zshrc config file. Move your…

Keep Location List Closed

Vim’s (neovim in my case) location list can provide some very useful information while developing. Mine gives me information about linting and type checking errors with fairly little config. Generally, it sits nicely at the bottom of the screen and barely affects me. Other times, especially while zoomed way in during a presentation, it just gets in the way. Location List eating up the screen while I am zoomed in and trying to live code Toggling the location list # Through some google search I found the culprit was syntastic. It has an feature. We can turn it off by setting. Keybindings # I want to keep the location list open automatically most of the time, but when I don’t want it to keep opening it’s generally detrimental. Trying to live code while the location list keeps taking up the whole screen is not cool. First, create a function that will toggle both the location list and syntactic together. This binding will allow me to use from normal mode to toggle the location list. I am st…
2 min read
I came across jumpcutter from carykh, and it’s packed with great features and ideas. Automatically edits vidx. Explanation here: https://www.youtube.com/watch?v=DQ8orIurGxw
I came across blocks from blocks, and it’s packed with great features and ideas. A JSX-based page builder for creating beautiful websites without writing code
I’m really excited about mask, an amazing project by jacobdeichert. It’s worth exploring! 🎭 A CLI task runner defined by a simple markdown file
I like tj’s project go-termd. Package termd provides terminal markdown rendering, with code block syntax highlighting support.
I recently discovered git-history by pomber, and it’s truly impressive. Quickly browse the history of a file from any git repository
Check out csurfer and their project pypette. Ridiculously simple flow controller for building complex pipelines
Check out requests by psf. It’s a well-crafted project with great potential. A simple, yet elegant, HTTP library.
Check out vscode-git-semantic-commit by nitayneeman. It’s a well-crafted project with great potential. 💬 A Visual Studio Code extension which enables to commit simply by the semantic message conventions
awesome-streamlit by MarcSkovMadsen is a game-changer in its space. Excited to see how it evolves. The purpose of this project is to share knowledge on how awesome Streamlit is and can be
If you’re into interesting projects, don’t miss out on Recreation-of-Nature, created by Kashu7100. ALife simulation with Python: patterns, behavior, and cognition.

Quick Progress Bars in python using TQDM

tqdm is one of my favorite general purpose utility libraries in python. It allows me to see progress of multipart processes as they happen. I really like this for when I am developing something that takes some amount of time and I am unsure of performance. It allows me to be patient when the process is going well and will finish in sufficient time, and allows me to 💥 kill it and find a way to make it perform better if it will not finish in sufficient time. @waylonwalker Add a simple Progress bar! convenience TQDM also has a convenience function called trange that wraps the range function with a tqdm progress bar automatically. notebook support There is also notebook support. If you are bouncing between ipython and jupyter I recomend importing from the auto module. Autoreload in Ipython If you are using notebooks you should enable ipython autoreload 👆
1 min read
Check out terminal by microsoft. It’s a well-crafted project with great potential. The new Windows Terminal and the original Windows console host, all in the same place!

Clean up Your Data Science with Named Tuples

If you are a regular listener of TalkPython or PythonBytes you have hear Michael Kennedy talk about Named Tuples many times, but what are they and how do they fit into my data science workflow. Example # As you graduate your scripts into modules and libraries you might start to notice that you need to pass a lot of data around to all of the functions that you have created. For example if you are running some analysis utilizing,, and data. You may need to calculate total revenue, inventory on hand. You may need to pass these data sets into various models to drive production or pricing based on predicted volumes. Load data # Here we setup functions that can load data from the sales database. Assume that we also have similar functions to and. Create Metrics # Here we create our first function to calculate some metrics. There are likely many of these functions that repeat a similar pattern. They use similar data and have their own custom logic for calculations and joins. Furthermore these…

Background Tasks in Python for Data Science

This post is intended as an extension/update from background tasks in python. I started using the week that Kenneth Reitz released it. It takes away so much boilerplate from running background tasks that I use it in more places than I probably should. After taking a look at that post today, I wanted to put a better data science example in here to help folks get started. This post is intended as an extension/update from background tasks in python. I started using the week that Kenneth Reitz released it. It takes away so much boilerplate from running background tasks that I use it in more places than I probably should. After taking a look at that post today, I wanted to put a better data science example in here to help folks get started. I use it in more places than I probably should Before we get into it, I want to make a shout out to Kenneth Reitz for making this so easy. Kenneth is a python God for all that he has given to the community in so many ways, especially with his ideas in bu…
If you’re into interesting projects, don’t miss out on starship, created by starship. ☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!
alttch has done a fantastic job with rapidtables. Highly recommend taking a look. Super fast list of dicts to pre-formatted tables conversion library for Python 2/3

Autoreload in Ipython

I have used for several years now with great success and 🔥 rapid reloads. It allows me to move super fast when developing libraries and modules. They have made some great updates this year that allows class modules to be automatically be updated. What I like about autoreload # 🔥 Blazing Fast 💥 Keeps me in the comfort of my text editor 👏 Allows me to use Jupyter when I need 👟 Extremely Reliable One of the biggest benefits that I find is that it shortens the distance between my module/library code and test code inside of a terminal/notebook. Now I primarily use jupyter notebooks for the presentation aspect. I develop code from the comfort of my editor with all of the tools I have setup, and run the functions in a notebook to get the output. From there I might do some aggregations or plots, but the 🥩 meat of development is done outside of jupyter. Now I primarily use jupyter notebooks for the presentation aspect. Enabling Autoreload # 📐 config This is a short script that I use to setup ip…
3 min read
If you’re into interesting projects, don’t miss out on psutil, created by giampaolo. Cross-platform lib for process and system monitoring in Python
Check out watchtower by kislyuk. It’s a well-crafted project with great potential. Python CloudWatch Logging: Log Analytics and Application Intelligence
I recently discovered arrow by apache, and it’s truly impressive. Apache Arrow is the universal columnar format and multi-language toolbox for fast data interchange and in-memory analytics

Keyboard Driven VSCode

Throw that mouse Away its time to setup some keyboard shortcuts. These sortcuts were the baseline for switching from tmux/vim to vscode. Most folks posts I was able to find gave great tips on replacing vim, but very few have focused on the hackability of tmux. tmux allows me to rapidly fire up a workspace, create new windows and splits. Then When I switch tasks I can leave that workspace open and and jump right back in later exactly where I left off. There is nothing quite like it. The shortcuts listed here make the transition a bit better. The worst thing I found when using vscode at first was no way to switch between the terminal and editor without the mouse. This first set of keybindings solve that issue. The worst thing I found when using vscode at first was no way to switch between the terminal and editor without the mouse.!!! see-also I have an updated article in my tmux workflow How I navigate tmux in 2021 Alt+[hjkl] # navigation ⬅ jump to left split alt+h ⬇ jump to terminal fro…
tarpas has done a fantastic job with pytest-testmon. Highly recommend taking a look. Selects tests affected by changed files. Executes the right tests first. Continuous test runner when used with pytest-watch.
If you’re into interesting projects, don’t miss out on vim-flog, created by rbong. A blazingly fast, stunningly beautiful, exceptionally powerful git branch viewer for Vim/Neovim.