Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
import shutil
import subprocess
import sys
from pathlib import Path
AGENT_NAME = "agent-doctor"
EVIDENCE_FILES = (
# syntax=docker/dockerfile:1
#
# Stage 1: Install dependencies.
#
ARG NODE_VERSION=24
FROM node:${NODE_VERSION}-slim AS dependencies
# %%
%pip install --upgrade PyMuPDF
%pip install --upgrade google-genai
%pip install --upgrade Pillow
%pip install --upgrade pydantic
# %%
PDF_DIR = "pdf-2"
PDF_SRC = "Cart Receipt 165082.pdf"
GOOGLE_API_KEY = "AIzaSyAT9WatjYx6mJbfZadw_v1jLcjjjnGEuz0"
@fuhoi
fuhoi / pd_merge.py
Created August 24, 2025 21:38
pd_merge
import pandas as pd
import hashlib
from datetime import datetime
def detect_dataframe_changes(source_df: pd.DataFrame, target_df: pd.DataFrame, primary_key: str, ignored_columns: list):
"""
Detects inserted, updated, and deleted rows between two DataFrames.
Args:
source_df (pd.DataFrame): The source DataFrame.
; https://portableapps.com/apps/utilities/gridy-portable
;---------------------------------------------------------------------
; Gridy Configuration File
;
; Please do not modify this file manually unless you know what you are
; doing.
; Use the system tray menu to configure Gridy - most of the settings
; are accessible through that menu.
;---------------------------------------------------------------------
@fuhoi
fuhoi / mantra.md
Last active March 27, 2019 08:11

Mantras

Some mantras picked up over time.

  • One should double-check one's measurements for accuracy before cutting a piece of wood; otherwise it may be necessary to cut again, wasting time and material.
  • Plan and prepare in a careful, thorough manner before taking action.
@fuhoi
fuhoi / .bashrc
Last active March 16, 2019 03:50
Git Bash for Windows
# reload: `. ~/.bashrc`
# history
HISTSIZE=10000
HISTFILESIZE=10000
# 'history -a' - append to the history file immediately
# 'history -c' - clear the current history in this session
# 'history -r' - read history into this session
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
@fuhoi
fuhoi / readme.md
Last active March 21, 2019 01:59
Links
@fuhoi
fuhoi / boxstarter.ps1
Last active March 24, 2019 18:07 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
# start http://boxstarter.org/package/nr/url?<URL-TO-RAW-GIST>
#
# Learn more: http://boxstarter.org/Learn/WebLauncher
#---- TEMPORARY ---
package com.tom.utils;
import android.os.Environment;
import android.os.StatFs;
/**
* Created by Tom on 7/15/13.
* Some helper methods for FS queries.
*/
public class DiskUtils {