With a little bit of vibe-coding I wrote a tool to help me find and kill stale processes called psdoom. It's been great at helping me get back some of those port numbers and I decided to put it up on pypi.
You can start it by running:
uvx psdoom
And it looks like this:
The interface will present you with a search bar and a table with results. After searching you can select from the table to make sure processes stop running.
I got Gemini to a pretty good version of bacteria that comes with a greedy bot that you can play against. Figured I'd share it on the blog for others, and myself, to enjoy.
There's a dataset with numbers related to smoking, age and health outcome. Given such a dataset, you might be interested in running some queries. You could use SQL for this, but if you've taken a course in probability theory then you might have been thought to write this instead:
It's a very compact notation if you think about it, so why not allow this in Python as well?
Enter peegeem
I wrote a small library in Python that allows for exactly this. Not only does it give you the fancy notation, you're also able to declare the probabilistic graphical model that outlines the causal relationships between your variables.
from peegeem import DAG
# Define the DAG for the PGM, nodes is a list of column names, edges is a list of tuples
dag = DAG(nodes, edges, dataframe)
# Get variables out
outcome, smoker, age = dag.get_variables()
# Use variables to construct a probablistic query
P(outcome | (smoker == "Yes") & (age > 40))
# Latex utility, why not?
P.to_latex(outcome | (smoker == "Yes") & (age > 40))
It's pretty darn neat! It's really like writing down maths. But want to know the real kicker? You can use this in a notebook together with some widgets!
Drawn a graph, which defines edges in the DAG.
It's so much fun! Not just because you get a nice domain specific language to work with, by mixing and matching widget you actually get a domain specific interface too!
This is super exciting and I hope to work on more projects like this one. If you're keen to learn more, be sure to check out my latest livestream on the topic.