Skip to content

Instantly share code, notes, and snippets.

View adhishthite's full-sized avatar

Adhish Thite adhishthite

View GitHub Profile
@adhishthite
adhishthite / bill_prompt.py
Last active October 13, 2026 10:57
Lean hospital-bill extraction prompt + Pydantic structured output (Gemini on Vertex AI)
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.11"
# dependencies = ["google-genai>=1.0", "pydantic>=2", "pypdfium2>=4", "pillow"]
# ///
"""Hospital-bill chunk extraction, end to end: lean prompt -> Gemini (Pydantic structured output)
-> deterministic post-processing -> legacy output shape -> validation checks.
The model only TRANSCRIBES. Date formatting, date carry-forward, dropping subtotals and headers,
room-class mapping, total selection and gross/discount maths happen in code (section 3).
@adhishthite
adhishthite / gemini_run.py
Last active October 13, 2026 07:44
Gemini on Vertex AI: PDF + system instructions + optional JSON schema, prints response and token breakdown
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.11"
# dependencies = ["google-genai>=1.0"]
# ///
"""Call Gemini on Vertex AI (gcloud ADC auth) and print the response plus token usage.
Setup (one time):
1. Install uv: https://docs.astral.sh/uv/ (dependencies install automatically on first run)
2. gcloud auth application-default login
@adhishthite
adhishthite / autoexp-generic.md
Created March 7, 2026 21:28
autoexp — Autonomous Experimentation Loop. Generalized from Karpathy's autoresearch for any quantifiable metric project.

autoexp — Autonomous Experimentation Loop

Generalized from Karpathy's autoresearch. Same loop, any domain.


The Idea

An AI agent runs an infinite hill-climbing loop: modify → run → measure → keep or revert → repeat. No human in the loop. Wake up to a TSV of completed experiments.

@adhishthite
adhishthite / bws-env-push.sh
Created February 17, 2026 17:23
BWS .env push/pull scripts - sync secrets with Bitwarden Secrets Manager
#!/usr/bin/env bash
# ============================================================================
# bws-env-push.sh — Push .env secrets INTO Bitwarden Secrets Manager
#
# Usage:
# ./bws-env-push.sh <.env path> <BWS project-id> [prefix]
#
# Examples:
# ./bws-env-push.sh .env 9a8b7c6d-1234-5678-abcd-ef0123456789
# ./bws-env-push.sh .env 9a8b7c6d-1234-5678-abcd-ef0123456789 ELASTICGPT_ANALYTICS_
@adhishthite
adhishthite / openclaw-migrate.sh
Created February 12, 2026 07:40
OpenClaw Migration Guide - Moving your AI assistant setup to a new machine
#!/usr/bin/env bash
set -euo pipefail
# ============================================================================
# OpenClaw Migration Script
# Exports or imports your OpenClaw setup between machines.
# Usage:
# ./openclaw-migrate.sh export # Create migration bundle
# ./openclaw-migrate.sh import <bundle> # Restore from bundle
# ./openclaw-migrate.sh verify # Check current installation
@adhishthite
adhishthite / clawhub-skill-publishing-checklist.md
Last active June 7, 2026 09:11
13-point checklist for publishing OpenClaw skills to ClawHub - learned from 6 iterations

ClawHub Skill Publishing Checklist

Learned the hard way with Jina AI (v1.0.0 → v1.0.6). Follow this BEFORE uploading.


SKILL.md Frontmatter

---
description Interview user about themselves and their project idea, then scaffold it with best practices and proper documentation
allowed-tools Bash, Read, Write, Edit, Glob, Grep, AskUserQuestion, Task, TodoWrite
model opus

Project Onboarding Wizard

You are a dedicated software architect and engineer helping onboard a new project. Your job is to understand the person first, then the project, then scaffold a production-ready codebase.

description Interactively explore edge cases from a user/product perspective, then document them
argument-hint
feature-or-file
allowed-tools Read, Write, Edit, AskUserQuestion, TodoWrite
model opus

Edge Case Explorer

You are a product-minded QA specialist and devil's advocate. Your job is to find ways that users, systems, or the real world could break the product - NOT technical implementation bugs.

@adhishthite
adhishthite / estc-benchmark.py
Created March 30, 2025 18:35
🧪 Benchmarking Elasticsearch kNN vector search with OpenAI embeddings: measure latency across various num_candidates to optimize performance and recall for RAG applications.
import time
import numpy as np
from elasticsearch import Elasticsearch
from typing import List, Dict
from tabulate import tabulate
# === CONFIGURATION SECTION ===
# Your Elasticsearch deployment details
ES_HOST = "PUT_HOST_HERE" # Replace with your Elastic Cloud endpoint
@adhishthite
adhishthite / sketch.js
Created March 26, 2025 05:53
Dino Game: Using p5.js, developed by Gemini 2.5 Pro!
// 🎮 Game vibe-coded by Adhish Thite <adhish.thite@gmail.com>
// 🤖 Entirely generated using Gemini 2.5 (Experimental) on March 26, 2025
// 🚀 Paste this code into https://editor.p5js.org to play the game and enjoy the vibe!
// ==================================
// == GAME CONFIGURATION ==
// ==================================
const INITIAL_GAME_SPEED = 6;
const GAME_SPEED_INCREMENT = 0.003;
const GRAVITY = 0.7;