Skip to content

Instantly share code, notes, and snippets.

View ZaneH's full-sized avatar
🕶️
locked tf in

Zane Helton ZaneH

🕶️
locked tf in
View GitHub Profile
@ZaneH
ZaneH / fixjson.py
Created February 27, 2024 06:53 — forked from trotsky1997/fixjson.py
Fix JSON output of LLM agents
import re
import json
from half_json.core import JSONFixer
def json_fixer(data: str) -> str:
# define a mapping of full-width punctuation to half-width punctuation
punctuation_map = {
"!": "!",

Macropad with an old keyboard and actkbd on Arch Linux

Disable the regular keyboard behavior with xinput

  sudo pacman -Sy xorg-input
  xinput list
  xinput disable <ID>