Blog

Full Blog Posts

325 posts latest post 2026-06-21 simple view
Publishing rhythm
Jun 2026 | 4 posts

What is if name == “main_”, and how do I use it.

When a python module is called it is assigned the of otherwise if it’s imported it will be assigned the of the module. Concrete example # Let’s create a module to play with a bit. We will call this module. It is a module that we may want to run by it’self or import and use in other modules. I have set this module up to execute one of two if statements based on whether the module it’self is being ran or if the module is being imported. Note it is not common to have a block, this is just for demnonstration purposes. running python nodes.py # Running a python script with the command will execute your script top to bottom. This will print out How to Install miniconda on linux (from the command line only) If you don’t already have python installed try using miniconda or replit.com running./nodes.py # You can also simply execute the script from bash if you first set the module to be executable. is only needed one time, even if you edit the file. pipeline.py # Let’s create a second module and…
3 min read

Create a Virtual File Gallery with Symlinks

Creating a directory that is a union of several directories can be achieved with a few symlinks at the command line. Creating a Virtual File Gallery # Here is how I am creating a virtual directory of all my projects that is a combination of both work and not-work projects. I am creating symlinks for every directory under and. ⚠ Notice that first I am recreating the directory each time. This will ensure that any project that is deleted from their actual directory is removed from the virtual gallery. Updating the gallery # Since links are always kept up to date without any extra work, all the data is still in the same place it started. But as new directories are added to any project directory they will not be automatically added to the virtual gallery. cron bashrc/zshrc If you’re concerned about system resources, you can add it to a cron job to run at a regular schedule that makes sense to you. For me, I just popped those 4 lines right in my. It’s a bit overkill, maybe bloat, but it runs…

How to Install micromamba on linux (from the comamnd line only)

I really like using conda () as my python virtual environment manager of choice. It’s simple and it includes its own python interpreter using the version that I specify at creation. Mamba # from their readme Mamba is a reimplementation of the conda package manager in C++. parallel downloading of repository data and package files using multi-threading libsolv for much faster dependency solving, a state of the art library used in the RPM package manager of Red Hat, Fedora and OpenSUSE core parts of mamba are implemented in C++ for maximum efficiency At the same time, mamba utilize the same command line parser, package installation and deinstallation code and transaction verification routines as conda to stay as compatible as possible. Installing Micromamba # Similar to miniconda micromamba can be installed with a few lines of bash Creating Environments with Micromamba # Creating new environments with micromamba is pretty similar to using conda. -c is required # I was unable to figure out…

Vim Wsl Clipboard

I’ve long used neovim from within windows wsl, and for far too long, I went without a proper way to get text out of it and into windows. wsl has access to cmd applications # wsl can access clip.exe. You can do some cool things with it, such as cat a file into the clipboard, sending output from a command to the clipboard, or set an autocmd group in vim to send yank to the windows clipboard. using clip.exe # Let’s say you want to send a teammate the tail of a log file over chat. You can tail the file into clip.exe. pipe streams of text into clip.exe make it a bit more natural # I recently made mine feel a bit more natural by aliasing it to clip. pop this in your ~/.bashrc or ~/.zshrc yanking to windows clipboard from vim # I use neovim as my daily text editor and its a pain to share code with a teammate over chat, stack overflow, into a gist, or whatever you need. The following snippet has been quite useful and flawless for me. add this to your ~/.vimrc or your ~/.config/nvim/init.vim Ws…

Pytest capsys

Testing print/log statements in pytest can be a bit tricky, capsys makes it super easy, but I often struggle to find it. capsys # capsys is a builtin pytest fixture that can be passed into any test to capture stdin/stdout. For a more comprehensive description check out the docs on capsys using capsys # Simply create a test function that accepts capsys as an argument and pytest will give you a capsys opject.
1 min read

Building Rich a Dev Server

Draft Post I’ve really been digging @willmcgugan ’s rich library for creating TUI like interfaces in python. I’ve only recently started to take full advantage of it. Dev Server # I am working on a project in which I want to have a dev server running continuously in the background. I really like dev servers theat automatically chooose an unused port and list out the running pid so that I can kill it if I need to. automatic port number auto-restart display ( port, pid, uptime) finding the port # I am very novice at best when it comes to sockets, the following function came from searching StackOverflow for how to tell if a port is in use. I recursively check if a port is being used, if it is I increment by one until I find an unused port to return. The Dev Server # I am going super basic here and just running. It works for what I need it for, it hosts my files for the browser to display, and if I try a route without an index. html it gives me a decent file list. Optionally if you wanted a…

Site Down During Build

Recently I noticed a new netlify site of mine was down while I was checking to see if new content was live. Later found out this was consistent after each and every push the site would go gown as soon as I hit push, and would not come back until the build finished. Is this normal? # Do other Netlify sites go down during build??? Short Answer NO. All of my google fu lead me to believe I was alone and none of my other sites do this. Digging into my build # My deploy script ends with the following. After resetting keys and watching it build half a dozen times I determined that everything was working as normal here. Opening the Nelify Console # After poking at the netlify console for hours I realized that the issue was that netlify was still auto-deploying from a no longer existing directory and would cause 404’s for every page. During build, then my build from GitHub Actions would deploy with the netlify cli. Netlify really likes to put a lot of warnings up when you are not deploying from…

Kedro pipeline_registry.py

With the realease of came a new module in the project template. Here are some notes that I learned while playing with this new module. migrating to # create a file create a function in that mirrors the register_pipelines method from your module do not bring the decorator remove register_pipelines method on your class You should now have something that looks like this in your. pipeline_registry only works in Conflict Resolution # What happens If I register pipelines in both places I was not able to find any official documentation on how conflict resolution worked so I stepped into a project and added to both my and file. I noticed that it would pick up pipelines from both modules, but pipelines from always take precedence. The entire duplicate pipeline will be over written by the one from. kedro automatically merges pipelines from both hooks.py takes precedence Ready to update # In my experience there were no issues upgrading from to. I would reccomend only having one so decide to migra…

Stand With Your Team

People who are quick to toss team members under a bus are not well trusted or highly thought of and it will lead to some toxic team dynamics. Building Steam # While collaborating on any project there are going to be decisions made that aren’t necessarily your favorite, during a summer internship my mentor made some decisions that I was not on board with, but I accepted his wisdom and moved forward with little push back. Full Spead Ahead # During a review, leadership showed interest in the option that I wanted to go towards. I was quick to jump up and say I told you so right then and there and pitch reasons why my idea was so much better. The Aftermath # I walked out so proud that leadership recognized my idea, but I will never forget the look on my teammate’s face and what he told me after the meeting. “Wow quick to throw me under the bus in front of everyone 😢”. I ~ my teammate Realizing what Happened # It was at this moment that I threw my mentor, a good friend in front of a bus that…

Blogging For Me

I create this blog with one person in mind, me. There are others like me # This is not completely selfish, as there are likely many others out there that think similarly to me. Everyone comes from different backgrounds and varying levels of experience. In no way do you need to be an expert to create content others will benefit from. Accurate # I am as accurate as possible. I don’t know everything, and If I waited for that to happen I would never post, or write at such a high level no one else (including me) would ever want to read. Generally I know that I am directionally accurate for most of the article. In fact there is often a part of the article that I don’t feel the best about. It may have been some code that could have been better. I try to point these things out. Often when I am and point out where I know there is improvement to be had I get the most welcoming comments, “that was just fine how you did that”, or “I tried that myself and saw a better abstraction. Create the articl…
3 min read

Minimal Kedro Pipeline

How small can a minimum kedro pipeline ready to package be? I made one within 4 files that you can pip install. It’s only a total of 35 lines of python, 8 in and 27 in. 📝 Note this is only a composable pipeline, not a full project, it does not contain a catalog or runner. Minimal Kedro Pipeline # I have everything for this post hosted in this gihub repo, you can fork it, clone it, or just follow along. Installation # Caveats # This repo represents the minimal amount of structure to build a kedro pipeline that can be shared across projects. Its installable, and drops right into your or modules. It is not a runnable pipeline. At this point I think the config loader requires to have a logging config file. This is a sharable pipeline that can be used across many different projects. Usage # Implemantation # This builds on another post that I made about creating the minimal python package. I am not sure if it should be called a package, it’s a module, but what do you call it after you build…

Markdown Cli

This is a post that may be a work in progress for awhile, Its a collections of thoughts on managing my blog, but could be translated into anythiung that is just a collection of markdown. Listing things # posts tags draft posts data # frontmatter filepath content template html render content # Markdown.Markdown support extentsions frontmatter cleaning. # provide ways to hook in or clean up the frontmatter Markata.Markata methods # load render save Markata.Post methods # load render save Markata plugins # before_load before_post_load after_load after_post_load before_save before_post_save after_save after_post_save Markata plugins # cleanse_frontmatter html_feed json_feed rss_feed save_posts CLI #

My Content Strategy For 2021

I am making another push in 2021 to get my content out in the world and meeting users where they are. See how I plan to execute. Platforms # waylonwalker.com Twitter DEV hashnode Medium LinkedIn Anchor Markdown # My content is written in markdown, all markdown. I find that markdown does a really great job at getting out of the way and letting ideas flow onto the page. I am never fussing with fonts and formatting while physically writing posts. Not that I don’t spend way more time than I need to tweak these things on my own personal site where everything gets posted. Articles # Much of what I create is inside of short articles that get posted to my personal site waylonwalker.com. These will get cross-posted to DEV, hashnode, Medium. I have made cross-posting a bit easier for myself by posting the markdown for each article next to the post on my personal site. Add.md to any post and there is the source. Should I be giving my articles to Medium?? Personally, I am not a fan of the bait and…
3 min read

Quickly Edit Posts

Recently I automated starting new posts with a python script. Today I want to work on the next part that is editing those posts quickly. Automating my Post Starter Check out this post about setting up my posts with python 🐍 Enter Bash # For the process of editing a post I just need to open the file in vim quickly. I dont need much in the way of parsing and setting up the frontmatter. I think this is a simple job for a bash script and fzf. change to the root of my blog fuzzy find the post open it with vim change back to the directory I was in bash function # For this I am going to go with a bash function. This is partly due to being able to track where I was and get back. Also the line with nvim will run fzf everytime you source your file which is not what we want. Lets setup the boilerplate. Its going to create a function called ep, track our current directory, create a sub function. Then call that function and cd back to where we were no matter if fails or succeeds. boilerplate Creati…

Gitui is a blazing fast terminal git interface

Gitui is a terminal-based git user interface (TUI) that will change the way that you work with git. I have been a long-time user of the git cli, and it’s been hard to beat, mostly because there is nothing that keeps my fingers on the keyboard quite like it, except which comes with some great ways to very quickly walk through a git project. installation # Go to their [releases]https://github.com/extrawurst/gitui/releases) page, download the latest build, and pop it on your PATH. I have the following stuffed away in some install scripts to get the latest version. install latest release run # It opens blazing fast. Quick Commits # Sometimes I edit a number of files and want to commit them one at a time, this is painful in the git cli and my main use case for. shows unstaged changes at the top, staged changes on the bottom, and a diff on the right. Navigate with hjkl # By default, uses arrow keys, but simply copying vim_style_key_config.ron to your config directory will get you vim-like ke…
2 min read

Kedro - My Data Is Not A Table

In python data science/engineering most of our data is in the form of some sort of table, typically a DataFrame from a library like pandas, spark, or dask. DataFrames are the heart of most pipelines # These containers for data contain many convenient methods to manipulate table like data structures. Sometimes we leverage other data types, namely vanilla types like lists and dicts, or even numpy data types. What is Kedro unfamiliar with kedro, check out this post Sometimes datasets are not tables # There are times when our data doesn’t fit nicely into a DataFrame. Lucky for us Kedro has pickle support out of the box. Pickle is a way to store any python object to disk. Beware that pickle files coming from an unknown source can run malicous code and are considered unsafe. For the most part though when you read and write your own pickle files they are a good tool to consider. See more about pickle from python.org. Cataloging Pickle # I may have a dictionary that describes some cars. In the…

Quickly Change Conda Env With Fzf

Changing conda environments is a bit verbose, I use a function with fzf that both lists environments and selects the one I want in one go. Conda # I have used conda as a virtual environment tool for years now. I started using conda for its simplicity to install packages on windows, but now that has gotten so much better and it’s been years since I have run a command. I’m sure that I could use a different environment manager, but it works for me and makes sense. What environment manager do you use for python? Conda environments are stored in a central location such as and not with the project. They contain both the python interpreter and packages for that env. Conda create # Conda environments are created with the command. At this point, you will need to name your env and select the python version. After running this command you will have a directory with a base python install. It will not be active yet. List environments # Before activating an environment I often want to list the envir…
3 min read