Skip to content

Instantly share code, notes, and snippets.

@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 / FIREHOSE.md
Created December 11, 2024 05:30 — forked from davepeck/FIREHOSE.md
Zero-dependency Python script to decode the Bluesky firehose

Zero-dependency Python script to decode the Bluesky Firehose

This is a pure Python implementation of code necessary to decode the Bluesky Firehose's low-level binary data format.

It does not depend on any third-party libraries for decoding; we implement DAG_CBOR and CARv1 decoding ourselves.

To run this, install Astral's UV.

Then:

@christopherwoodall
christopherwoodall / landscape_to_blurred_portrait.sh
Created September 30, 2024 23:54 — forked from dupontgu/landscape_to_blurred_portrait.sh
Shell script to embed a landscape video inside a blurred, portrait version of itself.
#!/bin/bash
if [ -z "$1" ]; then
echo "Usage: $0 <input_video>"
exit 1
fi
input_file="$1"
if [ -z "$2" ]; then
@christopherwoodall
christopherwoodall / scapy_bridge.py
Created May 12, 2024 03:00 — forked from eXenon/scapy_bridge.py
Use scapy as a modifying proxy
#!/usr/bin/python2
"""
Use scapy to modify packets going through your machine.
Based on nfqueue to block packets in the kernel and pass them to scapy for validation
"""
import nfqueue
from scapy.all import *
import os
////////////////////////////////////////
// bitflip.arm.c
// Demo of shared memory
// Usage: This takes the first word of SHARED_RAM and flips every other bit
// over and over.
// If /dev/uio0 doesn't exist, consider using
// sudo ./bitflip.arm.out /dev/mem 0x4a300000
// Wiring: None
// Setup: Run this on the ARM and run bitflip.pru0.c or bitflip.pru1.c on the PRU
// See: