Skip to content

Instantly share code, notes, and snippets.

View wenlibin02's full-sized avatar
💭
Looking for a job :-)

wenlibin02

💭
Looking for a job :-)
View GitHub Profile
import numpy as np
def object_einsum(string, *arrays):
"""Simplified object einsum, not as much error checking
does not support "..." or list input and will see "...", etc. as three times
an axes identifier, tries normal einsum first!
NOTE: This is untested, and not fast, but object type is
never really fast anyway...
@stefanschmidt
stefanschmidt / remove-annotations.sh
Last active March 15, 2025 17:36
Remove all annotations from a PDF document
pdftk original.pdf output uncompressed.pdf uncompress
LANG=C sed -n '/^\/Annots/!p' uncompressed.pdf > stripped.pdf
pdftk stripped.pdf output final.pdf compress