joshd.xyz

#python


Custom Sorting in Python

I recently found myself needing to sort a list by cardinal directions. Here's a super simple solution to do custom sorting in Python.

Javascript Search Token Highlighter

Building a search results page? Thinking about highlighting the search terms so they standout? Here's how I did it using vanilla Javascript.

Trying Out Things 3

I decided to switch my to-do list to Things 3 and needed to move a lot of to-dos over from Todoist. Seemed like a great project to explore their API and save myself a bunch of copying and pasting.

Python Type Hints and Fancy Banners

While leaning about Python Type Hints, I wrote a nifty little function to display cool banners and help remind me about the concepts of type hinting.

Unpacking Tuples in a For Loop

Have you ever noticed as you learn more and more of a programming language, you often forgo the basics for a more complex solution? Well, today I was reminded of the KISS principle when I needed to unpack a bunch of tuples.