Skip to content

Instantly share code, notes, and snippets.

View socketteer's full-sized avatar
constrained optimization

? socketteer

constrained optimization
View GitHub Profile
@socketteer
socketteer / single_page_twitter_archive.py
Created September 30, 2024 09:50 — forked from JD-P/single_page_twitter_archive.py
Public Single Page Twitter Archive Exporter
# The vast majority of this code was written by Mistral-large and
# is therefore public domain in the United States.
# But just in case, this script is public domain as set out in the
# Creative Commons Zero 1.0 Universal Public Domain Notice
# https://creativecommons.org/publicdomain/zero/1.0/
import argparse
import json
from datetime import datetime
import html
@socketteer
socketteer / base_chat.py
Last active January 3, 2025 19:06
external_store
import anthropic
import sys
import os
import argparse
client = anthropic.Anthropic() # Will use ANTHROPIC_API_KEY from environment
DEFAULT_STORAGE_FILE = "/tmp/gist_files/continuation.txt"
def get_continuation(text):