Skip to content

Instantly share code, notes, and snippets.

@karpathy
karpathy / microgpt.py
Last active February 15, 2026 14:52
microgpt
"""
The most atomic way to train and inference a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@jcguu95
jcguu95 / remove-instagram-unfollowed-content.js
Last active February 15, 2026 14:49
Remove Instagram Unfollowed Content
// ==UserScript==
// @name Remove Instagram Unfollowed Content
// @version 2024-03-02
// @author Jin-Cheng Guu
// @match https://www.instagram.com/*
// @description Remove unfollowed content from the instagram main page.
// ==/UserScript==
(function() {
rule Paragon_Spyware_IOCs
{
meta:
description = "Indicators of compromise (IOCs) for Paragon Solutions Graphite spyware from the Citizen Lab report 'Virtue or Vice? A First Look at Paragons Proliferating Spyware Operations'"
author = "ChatGPT"
date = "2025-03-29"
reference = "https://citizenlab.ca/2025/03/a-first-look-at-paragons-proliferating-spyware-operations/"
strings:
// Suspected customer domains (Table 4)
@ctlllll
ctlllll / longest_chinese_tokens_gpt4o.py
Created May 13, 2024 19:53
Longest Chinese tokens in gpt4o
import tiktoken
import langdetect
T = tiktoken.get_encoding("o200k_base")
length_dict = {}
for i in range(T.n_vocab):
try:
length_dict[i] = len(T.decode([i]))
except:
@brtkwr
brtkwr / README.md
Last active February 15, 2026 14:45
Google Apps Script to fetch Twilio usage data into a spreadsheet

Twilio Usage Google Apps Script

Fetches daily Twilio usage data into a Google Sheets spreadsheet.

Features

  • Pulls daily usage data for the past year
  • Breaks down costs by category (SMS outbound, inbound, pumping protection, phone numbers, calls)
  • Incremental updates - only fetches missing dates, skips dates already in the sheet
  • Handles Twilio API pagination automatically