Skip to content

Instantly share code, notes, and snippets.

View jaidhyani's full-sized avatar

Jai Dhyani jaidhyani

View GitHub Profile
@jaidhyani
jaidhyani / test_search_bugs.py
Created April 14, 2026 03:55
Bug demonstration tests for LuthienResearch/luthien-proxy#578 — written by Claude Code (claude-opus-4-6), not the repo maintainer
"""Tests demonstrating bugs in the session search implementation.
These tests hit real SQLite to exercise the actual SQL query construction,
unlike test_search.py which mocks the DB and can't catch SQL-level bugs.
Bug 1: from_time/to_time filter applied to raw event rows, not aggregated session timestamps.
A session spanning Jan-Mar queried with from_time=Feb returns mutilated stats.
Bug 2: SQLite q parameter missing LIKE wildcard escaping.
q=% or q=_ matches everything; diverges from Postgres plainto_tsquery behavior.
@jaidhyani
jaidhyani / trello
Last active March 11, 2026 17:59
Trello CLI - lightweight Python wrapper around the Trello REST API
#!/usr/bin/env python3
"""Trello CLI - lightweight wrapper around the Trello REST API.
Setup:
1. Get your API key at https://trello.com/power-ups/admin — click on an existing
Power-Up (or create one), then find the API key in the "API key" section.
2. On that same page, click the "Token" link next to your API key to generate
a read/write token (you'll authorize it via OAuth in the browser).
3. Paste both values below, or export them as TRELLO_API_KEY / TRELLO_TOKEN
environment variables (env vars take precedence over the constants below).
@jaidhyani
jaidhyani / trello-setup.md
Last active March 7, 2026 00:48
Trello API setup guide for the Luthien board

Trello API Setup for the Luthien Board

1. Create a Trello Power-Up (to get API credentials)

  1. Go to https://trello.com/power-ups/admin (you must be logged into Trello)
  2. Click "New"
  3. Fill out the form:
    • App name: Whatever you like (e.g. "Claude CLI")
    • Workspace: Pick any workspace you belong to
    • Email: Your email
@jaidhyani
jaidhyani / luthien-pbc-shares.html
Last active February 23, 2026 19:36
Luthien Research PBC - Share Distribution Structure
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Luthien Research PBC — Share Structure</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=IBM+Plex+Mono:wght@400;500;600&family=DM+Sans:wght@400;500;600;700&display=swap" rel="stylesheet">
<style>

Drivers of the Post-2020 U.S. Housing Price Surge

This report was generated by GPT-5

U.S. house prices rose at an unprecedented pace from 2020 through 2022. By July 2021, national home prices were up 19.3% year-over-year, a record high growth rate. This surge followed a long period (2013--2019) of moderate ~5% annual price gains. To investigate this sharp price acceleration, we analyze seven hypothesized drivers:

@jaidhyani
jaidhyani / ethmine.sh
Last active September 19, 2022 08:27
Ethereum mining script (for use with systemd)
#!/bin/bash
#requirements
# -nc
# -genoil's ethminer (https://github.com/Genoil/cpp-ethereum)
# a CUDA-compatable GPU
# this is obviously hacky and gross, uses hardcoded paths to personal dirs, etc
# but should be easily adaptable
ethminer="/home/jai/cpp-ethereum/build/ethminer/ethminer"
addr="0x000000000000000000000000000" #REPLACE WITH YOUR ETHEREUM ADDRESS
# this is a script to dynamically update a route53 dns record to point to the
# IP address that the machine that is running on
# before running it, you'll want to create an IAM user with the following policy
# attched, replacing YOURZONEID with the zone ID of the domain you're going to be
# updating in route53.
# IAM policy:
"""
{
"Version": "2012-10-17",
"Statement": [
@jaidhyani
jaidhyani / ethprice.py
Last active June 7, 2017 22:20
Watch the price of ETH from the terminal/tmux status bar
#!/usr/bin/env python3.5
import requests
import locale
locale.setlocale(locale.LC_ALL, '')
price = requests.get(
'https://coinmarketcap-nexuist.rhcloud.com/api/eth'
).json()['price']['usd']

Keybase proof

I hereby claim:

  • I am jaibot on github.
  • I am jai (https://keybase.io/jai) on keybase.
  • I have a public key whose fingerprint is C7A7 3373 A4AE 5585 73AC 355D 26A2 A940 AA8E 35F8

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am jaibot on github.
  • I am jai (https://keybase.io/jai) on keybase.
  • I have a public key ASB6aBmgf7GH9-GEL5dQRXiLXfwoA8UtgYcgaL3HdbLJhwo

To claim this, I am signing this object: