I'm building a few FastAPI apps to throw in docker and run on my homelab... I wanted to add healthchecks and here's a simple way to do it Make sure to install curl in the dockerfile (near the top for effeciency) # Install curl with minimal dependenc ... read more →
I was using a fun LaTex-based project for managing my resume called AltaCV. I loved the customization and was familiar with Tek from school. However, I update my resume so infrequently that anytime I'd hop back to it I'd have to remember how to work ... read more →
I was using a fun LaTex-based project for managing my resume called AltaCV. I loved the customization and was familiar with Tek from school. However, I update my resume so infrequently that anytime I'd hop back to it I'd have to remember how to work ... read more →
Playing around with Modal Labs One of the first things I tried was a regular cron job... @stub.function( schedule=modal.Period(minutes=59), secret=modal.Secret.from_name("my-dummy-secret") ) def say_hi(): now = time.ctime() sec ... read more →
Logging instead of printing I am trying to adopt logger.debug instead of print but ran into a confusing thing in ipython during Advent of Code... I riddled by script with logger.debug (yes after setting logging.setLevel('DEBUG')) but in ipython none ... read more →
Intro I use ZFS at home in my homelab for basically all of my storage... Docker uses ZFS backend, all my VMs have their .qcow2 images in their own zfs datasets, and all my shares are ZFS datasets. I love ZFS but my home hardware presently is the opp ... read more →
import this; print(this); print("what is taking so long black!!") read more →
Mike Driscoll recently tweeted about making colored out with pandas DataFrames and I just had to try it for myself Use Case First though... why? My biggest use case is a monitoring pipeline of mine... The details aside, the output of my pipeline is ... read more →
I have list [True, False, False, True] and another list [1, 2, 3, 4] and a use case where I want to filter list 2 based on list 1 to remove values that line up with the element False in list 1.... so the outcome will be [1, 4]. list(compress(list2, ... read more →
I just started using FastAPI for a home project and needed to pass back a dynamic number of values from a form rendered with jinja... Dynamic Values The jinja templating for rendering HTML based on something like a python iterable is nice and easy ... read more →