Skip to content

Instantly share code, notes, and snippets.

View PaulKinlan's full-sized avatar
🐤
Chillax-in

Paul Kinlan PaulKinlan

🐤
Chillax-in
View GitHub Profile
#!/usr/bin/env bash
# gh-ai-issue-comments.sh
# Fetch 6 months of AI bot issue comment counts from GitHub Search API.
# Uses total_count per query (not actual results), so no 1,000-result cap.
# Output: CSV to stdout, progress to stderr.
#
# Tracks issues commented on by known AI bot accounts using "commenter:" qualifier.
#
# Usage:
# ./gh-ai-issue-comments.sh # weekly buckets, last 6 months
#!/usr/bin/env bash
# gh-ai-pr-interactions.sh
# Fetch 6 months of AI bot PR interaction counts from GitHub Search API.
# Uses total_count per query (not actual results), so no 1,000-result cap.
# Output: CSV to stdout, progress to stderr.
#
# Tracks:
# 1. PRs commented on by AI bots (commenter: qualifier)
# 2. PRs reviewed by AI bots (reviewed-by: qualifier)
# 3. PRs with AI markers in comments (text search)
#!/usr/bin/env bash
# gh-ai-prs.sh
# Fetch 6 months of AI-created PR counts from GitHub Search API.
# Uses total_count per query (not actual results), so no 1,000-result cap.
# Output: CSV to stdout, progress to stderr.
#
# Tracks:
# 1. PRs created by known AI bot accounts
# 2. PRs containing AI-generated markers in title/body
#
#!/usr/bin/env node
// Scrapes OpenRouter programming model data:
// 1. RSC payload from rankings page for accurate weekly token breakdowns (all models)
// 2. Pricing pages via headless Chrome for weighted-average costs
//
// Usage:
// node scripts/openrouter-scrape.mjs > reports/openrouter-programming-YYYY-MM-DD.csv
// node scripts/openrouter-scrape.mjs --json > reports/openrouter-programming-YYYY-MM-DD.json
import puppeteer from 'puppeteer-core';
#!/usr/bin/env bash
# ai-commit-6month.sh
# Fetch 6 months of AI coding agent commit counts from GitHub Search API.
# Uses total_count per query (not actual results), so no 1,000-result cap.
# Output: CSV to stdout, progress to stderr.
#
# Tracks TWO detection methods:
# 1. Co-Author trailers in commit messages (e.g. "Co-Authored-By: Claude")
# 2. Bot user accounts as commit author (e.g. "copilot-swe-agent[bot]")
#
@PaulKinlan
PaulKinlan / worktree.sh
Last active January 11, 2026 22:25 — forked from bfollington/worktree.sh
Worktree convenience aliases
. "/Users/paulkinlan/.deno/env"
# --- Configuration ---
# TODO: Paste your Z-AI API Key here
export ZAI_API_KEY=""
# --- Tmux Workflow Commands ---
c-begin() {
local name=$1
const alpha = 1.2; // 1.2 seems to map well to top 100 sites... Maybe it works for rest of web?
const size = 360_000_000; // 360 million is the number of sites in the web as of 2023
/*
83 billion is the number of navigations for rank 0 (the most popular site)
for one month in 2025 (yes, I know I don't have the size of the web
for 2025, but this is a good estimate based on current trends).
*/
const max = 83_000_000_000;
@PaulKinlan
PaulKinlan / request-body-generator.json
Last active April 17, 2024 13:15
request-body-generator.json
{
"title": "Request Body Builder",
"description": "Builds the POST body for a request",
"version": "0.0.1",
"nodes": [
{
"type": "output",
"id": "output",
"configuration": {
"schema": {
@PaulKinlan
PaulKinlan / generate.py
Created July 11, 2023 13:33
Parse BCD data to get browser release data
import json
from datetime import datetime
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
# Function to convert a string to a datetime object
def convert_string_to_date(date_string):
return datetime.strptime(date_string, "%Y-%m-%d")
did:3:kjzl6cwe1jw149x0rcxc5b3ltxrgh7nwt4pab0eg04gqvztfbr52wizt8iwkk1b