Skip to content

Instantly share code, notes, and snippets.

@christopherwoodall
christopherwoodall / timeit.py
Created October 17, 2025 18:08
Time grep vs cat
import subprocess
import time
import argparse
import statistics
import os
import sys
# --- Configuration ---
DEFAULT_COMMAND_1 = 'grep "foo" "bar.txt"'
DEFAULT_COMMAND_2 = 'cat "bar.txt" | grep "foo"'
@christopherwoodall
christopherwoodall / README.md
Created August 26, 2025 13:16 — forked from rl-grimey/README.md
NBC Russian Twitter Trolls Download

NBC Russian Twitter Trolls Download

Description

This Github Gist contains a makefile for downloading the full set of Russian Twitter Trolls data published by NBC in their article 'Twitter deleted 200,000 Russian troll tweets. Read them here.'.

The makefile will download the following .csv files into a created directory named russian-twitter-trolls.

russian-twitter-trolls/ # Created by makefile
├── tweets.csv # 200,000 tweets (50mb) of propoganda tweets
#!/usr/bin/env python3
"""
Demonstrate banning the em-dash (and common variants) with logit_bias.
import os, sys, textwrap
import openai # pip install openai>=1.9.0
MODEL = "chatgpt-4o-latest"
PROMPT = ("Write a short sentence that would normally include an em dash "
"(for example between two clauses).")
import json
from collections.abc import Callable
import sys
from typing import Annotated
from function_schema import get_function_schema
from openai import OpenAI
from openai.types.chat import ChatCompletionMessageParam
@christopherwoodall
christopherwoodall / pyproject.toml
Created July 11, 2025 02:16 — forked from carloshbcabral/pyproject.toml
My personal pyproject.toml for ruff and coverage
[tool.coverage.report]
exclude_also = [
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
@christopherwoodall
christopherwoodall / convert_archive.py
Created July 2, 2025 20:57 — forked from deepfates/convert_archive.py
Convert your twitter archive into a training dataset and markdown files
import argparse
import json
import logging
import os
import re
import shutil
from concurrent.futures import ProcessPoolExecutor, as_completed
from dataclasses import dataclass
from datetime import datetime
from typing import Any, Callable, Dict, List, Literal, Optional, Tuple
@christopherwoodall
christopherwoodall / zsh_on_termux.md
Created April 29, 2025 18:18 — forked from rahaaatul/zsh_on_termux.md
Installing ZSH on Termux including themes & useful plugins

ZSH on Termux!

Spice up termux with beautiful themes and productivity plugins to make your life easier!

Install ZSH, GIT & LSD

pkg install zsh git lsd vim

Install Oh-My-Zsh

@christopherwoodall
christopherwoodall / uv-interpreter.ipynb
Created April 28, 2025 13:05
uv-interpreter.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@christopherwoodall
christopherwoodall / delete_tweets.js
Last active January 31, 2025 15:12
Delete tweets
// source: https://x.com/ThinkWiselyMatt/status/1885076017414348830
(async () => {
const delay = ms => new Promise(res => setTimeout(res, ms));
let deletedCount = 0;
const maxDeletes = 2000; // Adjust as needed
while (deletedCount < maxDeletes) {
let posts = document.querySelectorAll('[data-testid="tweet"]');
@christopherwoodall
christopherwoodall / uv-interpreter.ipynb
Last active January 10, 2025 00:03
uv-interpreter.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.