Skip to content

Instantly share code, notes, and snippets.

View kepae's full-sized avatar

Kevin kepae

View GitHub Profile
@kepae
kepae / hugot_embeddinggemma_onnx.go
Created April 28, 2026 22:30
Running EmbeddingGemma ONNX with Hugot
// Experiment to load the ONNX port of EmbeddingGemma with Hugot.
// See: https://huggingface.co/onnx-community/embeddinggemma-300m-ONNX
// which this script ports from the Python/Transformers.js equivalent.
package main
import (
"context"
"fmt"
"log"
@kepae
kepae / fix_fb_mojibake.py
Last active May 1, 2022 03:56
Unmangles mojibake from Facebook's "Download Your Information" site and writes to stdout or a given file.
#!/usr/bin/env python3
"""
Unmangles mojibake from Facebook's "Download Your Information" [1] site and writes
to stdout or a given file. Input can either be a JSON file or a simple text
file. Data can be encoded in either ASCII [2] or UTF-8 (for some end uses,
showing things like emoji!). You almost always want UTF-8, though.
The problem of Facebook DYI mojikbake was noted in this StackOverflow thread,
which has other suggestions on how to handle this problem: