Skip to content

Instantly share code, notes, and snippets.

View stringertheory's full-sized avatar

Mike Stringer stringertheory

View GitHub Profile
@dfreelon
dfreelon / top_BMMC_tracks_public.py
Created July 1, 2023 14:02
The code I used to create the #BlackMusicMonthChallenge top tracks playlists for Spotify and YouTube. The code requires valid Spotify and YouTube API credentials.
# -*- coding: utf-8 -*-
# run the following two snscrape commands from a CLI first -- you'll need the dev version from https://github.com/JustAnotherArchivist/snscrape
# future replicators: I recommend using Twitter's "since" and "until" date operators. I used snscrape's built in "since" operator because I ran it on June 30 so didn't need "until"
#for replies: snscrape --since 2023-05-31 --jsonl twitter-search @naima >@naima_replies_all.json
#for QTs: snscrape --since 2023-05-31 --jsonl twitter-search quoted_user_id:78417631 >@naima_qts_all.json
import html
import json
import pandas as pd
@rmtbb
rmtbb / ChatGPT Canvas HTML Renderer from Clipboard.url
Last active April 24, 2025 10:07
Bookmarklet that lets you render a full HTML page with any included css and javascript that is currently copied to your clipboard. Also works for SVG code. Useful with ChatGPT Canvas
javascript:(function(){try{navigator.clipboard.readText().then(function(t){if(t){var e=window.open("","_blank","width=800,height=600");e.document.open(),e.document.write(t),e.document.close()}else alert("Clipboard is empty. Please copy some text to the clipboard first.")}).catch(function(t){console.error("Failed to read clipboard contents: ",t),alert("An error occurred while trying to access the clipboard. Please ensure your browser allows clipboard access.")})}catch(t){console.error("An error occurred:",t),alert("An error occurred while trying to open the new window with the clipboard content.")}})();//bookmarklet_title: HTML Preview from Clipboard
@LoueeD
LoueeD / bsky-comments.js
Last active January 24, 2025 04:10
bluesky comments web component - inspired by emilyliu and coryzue
// Moved to a github repo for versioning, the file can now be loaded from a CDN
// <script type="module" src="https://esm.sh/gh/loueed/[email protected]/comments"></script>
class BskyComments extends HTMLElement {
constructor() {
super();
this.attachShadow({ mode: "open" });
this.visibleCount = 3;
this.thread = null;
this.error = null;

Generating Synthetic Data for LLM Evaluation

Summary

  1. Use your application extensively to build intuition about failure modes
  2. Define 3-4 dimensions based on observed or anticipated failures
  3. Create structured tuples covering your priority failure scenarios
  4. Generate natural language queries from each tuple using a separate LLM call
  5. Scale to more examples across your most important failure hypotheses (we suggest at least ~100)
  6. Test and iterate on the most critical failure modes first, and generate more until you reach theoretical saturation
@boxabirds
boxabirds / .cursorrules
Last active July 1, 2025 19:26
Rock solid: turn Cursor into a rock-solid software engineering companion
# Project Policy
This policy provides a single, authoritative, and machine-readable source of truth for AI coding agents and humans, ensuring that all work is governed by clear, unambiguous rules and workflows. It aims to eliminate ambiguity, reduce supervision needs, and facilitate automation while maintaining accountability and compliance with best practices.
# 1. Introduction
> Rationale: Sets the context, actors, and compliance requirements for the policy, ensuring all participants understand their roles and responsibilities.
## 1.1 Actors