Skip to content

Instantly share code, notes, and snippets.

View tfriedel's full-sized avatar

Thomas Friedel tfriedel

View GitHub Profile
@tfriedel
tfriedel / keybase.md
Last active December 31, 2020 16:54
keybase.md

Keybase proof

I hereby claim:

  • I am tfriedel on github.
  • I am tfriedel (https://keybase.io/tfriedel) on keybase.
  • I have a public key ASCVWUETl51ZIgGRxm6ZKXXWU5VSAhjQ4V0ocVJ84nKybgo

To claim this, I am signing this object:

!(function (e, t) {
"object" == typeof exports && "undefined" != typeof module ? t(exports) : "function" == typeof define && define.amd ? define(["exports"], t) : t((e.Labelbox = {}));
})(this, function (exports) {
"use strict";
var __assign = function () {
return (__assign =
Object.assign ||
function (e) {
for (var t, r = 1, n = arguments.length; r < n; r++) for (var i in (t = arguments[r])) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
return e;
@tfriedel
tfriedel / ChatGPT-Vision_API_Exporter.md
Last active August 16, 2025 02:02
ChatGPT explains how to process images with ChatGPT

Vision API Exporter

You:

I need to analyse bulk images (50-100) and export results as csv. I want to use the Chatgpt Vision api ( https://platform.openai.com/docs/guides/vision ).

Modify this code to export results:

import base64
import requests
@tfriedel
tfriedel / download_spire_codex.py
Created June 6, 2026 13:44
Bulk-downloader for Slay the Spire 2 runs from spire-codex.com (concurrent listing + incremental top-up). Standalone, single-file. Deps: httpx, typer, tenacity.
"""Bulk-download every run from spire-codex.com.
Lists all runs from ``/api/runs/list`` then fetches ``/api/runs/shared/{hash}``
for every run not already on disk, writing the JSON to
``<data>/files-spire-codex/<character>/<YYYY-MM>/<hash>.run``.
The listing endpoint is the bottleneck (~10s/page, capped at 50 rows/page), so
pages are fetched concurrently rather than one at a time — sequential paging of
the full corpus took *hours*. Detail fetches are fast (~0.3s) and also run
concurrently. Runs already on disk, and run_hashes recorded as permanently