Skip to content

Instantly share code, notes, and snippets.

@am17an
am17an / mtp-bench.py
Last active June 19, 2026 15:32
MTP benchmark
#!/usr/bin/env python3
import argparse, json, sys, time
from urllib import request
PROMPTS = [
{"name": "code_python", "prompt": "Write a Python function that returns the n-th Fibonacci number using memoization. Include a docstring."},
{"name": "code_cpp", "prompt": "Write a C++ template function `clamp(x, lo, hi)` that returns x clamped to [lo, hi]. No std::clamp."},
{"name": "explain_concept", "prompt": "Explain how speculative decoding works in large language model inference, in three short paragraphs."},
{"name": "summarize", "prompt": "Summarize in two sentences: The Industrial Revolution began in Britain in the late 18th century, transforming manufacturing through mechanization, steam power, and the factory system. It spread to continental Europe and North America during the 19th century."},
{"name": "qa_factual", "prompt": "Q: What are the four fundamental forces of physics?\nA:"},
@ruvnet
ruvnet / SPARC.md
Last active June 3, 2026 12:05
The SPARC framework is a structured methodology for rapidly developing highly functional and scalable projects by systematically progressing through Specification, Pseudocode, Architecture, Refinement, and Completion. It emphasizes comprehensive initial planning, iterative design improvements, and the strategic use of specialized tools and AI mo…

SPARC Framework Prompt Template

Introduction

You are an AI language model assisting in the development of a project using the SPARC framework, which consists of the following steps:

  1. Specification
  2. Pseudocode
  3. Architecture
  4. Refinement
@potluck
potluck / Wordles.txt
Created January 6, 2022 05:20
Wordles - through Jan 4, 2022
cigar
rebut
sissy
humph
awake
blush
focal
evade
naval
serve
@jkreileder
jkreileder / whoop-goldencheetah.py
Last active April 12, 2025 12:53
Python 3 script to export WHOOP Strap recovery data for use with Golden Cheetah
#!/usr/bin/env python3
import requests # for getting URL
import json # for parsing json
from datetime import datetime # datetime parsing
import pytz # timezone adjusting
import csv # for making csv files
import os
#################################################################
@abamacus
abamacus / wiki-100k.txt
Last active January 30, 2022 22:57 — forked from h3xx/wiki-100k.txt
Wictionary top 100,000 most frequently-used English words [for john the ripper]
This file has been truncated, but you can view the full file.
#!comment: This allegedly waa a list of "the top 100,000 most frequently-used English words", see the repo I forked for more provenance.
#!comment: But it was very un-sanitized. I had a specific purpose in mind, and thought it might be somewhat more generally useful to have/share in the future, so here's how I sanitized the list:
#!comment: 0) put a number on each word (I should note that somehow it only included 98,913 to start with)
#!comment: 1) change all words to lower-case
#!comment: 2) blank out any words with characters other than a-z
#!comment: 3) remove any duplicates, keeping the lower (more frequent) number
#!comment: Now the list is 62916 words long, and still contains a lot of non-English words, but I think it is more useful.
#!comment:
#!comment: Format: Rank (original rank) Word
1 (1) the
@rdetert
rdetert / shopify_api.conf
Last active May 31, 2017 20:12
Sync Shopify Customers who Accept Marketing with Sendy Using ActiveRecord 4
SHOPIFY_API_KEY = 'my-key'
SHOPIFY_PASSWORD = 'my-pass'
STORE_NAME = 'my-store'
@stakach
stakach / $namedRoute.js
Last active May 13, 2018 08:12
Augments AngularJS $route provider with route naming.
(function(angular) {
'use strict';
/*
Usage:
-----
FILE --app.js--
@cheeaun
cheeaun / js-error-logging-services.md
Last active September 18, 2025 20:18
JavaScript error logging services
@ndarville
ndarville / business-models.md
Last active May 29, 2026 04:06
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
@alicial
alicial / amz-s3-bucket-policy
Created September 13, 2012 18:26
Amazon S3 Bucket Policy to prevent hot linking
{
"Version": "2008-10-17",
"Id": "0c762de8-f56b-488d-a4a4-20d1cb31df2f",
"Statement": [
{
"Sid": "Allow in my domains",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},