Skip to content

Instantly share code, notes, and snippets.

@zmxv
zmxv / ccba.py
Created April 1, 2026 05:13
Claude Code buddy animation
#!/usr/bin/env python3
"""Generate an animated GIF of all companion sprite animations."""
from PIL import Image, ImageDraw, ImageFont
# --- Sprite data ---
SPECIES = [
'duck', 'goose', 'blob', 'cat', 'dragon', 'octopus', 'owl', 'penguin',
'turtle', 'snail', 'ghost', 'axolotl', 'capybara', 'cactus', 'robot',
@zmxv
zmxv / main.py
Created June 28, 2023 13:48
Solving TEG with RoBERTa
import re
from transformers import RobertaTokenizer, RobertaForMaskedLM
import torch
reBlank = re.compile(r"\[([^\]]+)\]")
tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
model = RobertaForMaskedLM.from_pretrained('roberta-base')
# puzzles from https://playteg.com
const fs = require("fs");
const claudeAPIKey = process.env.CLAUDE_APIKEY;
const claudeAPIEndpoint = "https://api.anthropic.com/v1/complete";
const claudeModel = "claude-v1-100k";
const claudeMaxTokensToSample = 100000;
const claudeStopSequences = ["\n\nHuman:"];
const claudeTemperature = 1;
const claudePromptPrefix = "\n\nHuman: Continue writing the following article. Do not repeat what has been written. Wrap your output in a markdown code block.\n\n```";
const claudePromptSuffix = "```\n\nAssistant: ";