test-driven-development
OBobra/superpowers298k近 7 天新增 2,631 个 star
Working with diverse data formats: binary, text, structured, and custom
How to work with diverse and unknown data formats.
Always inspect before parsing:
file <filename> # MIME type detection
xxd <filename> | head -5 # hex dump (first bytes)
head -3 <filename> # text preview
python3 -c "
with open('<filename>', 'rb') as f:
h = f.read(16)
print(h, h.hex())
"
\x7fELF, PNG: \x89PNG)struct.unpack('<I', ...) vs '>I')python3 -c "import json; json.load(open('f'))"python3 -c "import tomllib; ...".pt, .pth → torch.load(f, map_location='cpu').ckpt → index + data files, use tf.train.load_checkpoint().npy, .npz → numpy.load()config.json + model.safetensorsonnx.load()file says "SQLite 3.x database" → sqlite3 <file> ".tables"sqlite3 PRAGMAxxd file | head -16head, tail, shuf -n 10head -1 file | awk -F',' '{print NF}'OBobra/superpowers298k近 7 天新增 2,631 个 star
MAmattpocock/skills288k近 7 天新增 10,178 个 star
AFaffaan-m/ECC278k近 7 天新增 4,046 个 star
AFaffaan-m/ECC278k近 7 天新增 4,046 个 star
FIfirecrawl/firecrawl191k近 7 天新增 2,010 个 star