Skip to content

Instantly share code, notes, and snippets.

View grenkoca's full-sized avatar

Caleb Grenko grenkoca

View GitHub Profile
import xml.etree.ElementTree as ET
from tifffile import TiffFile
import os
def extract_qptiff_biomarkers(file_path):
"""
Extract biomarker names from a QPTIFF file.
Parameters:
-----------
@grenkoca
grenkoca / copy-fail-CVE-2026-31431__unminimized.py
Created April 29, 2026 23:47
CVE-2026-31431 (copy-fail) unminimized
#!/usr/bin/env python3
import os
import zlib
import socket
def d(x):
return bytes.fromhex(x)
@grenkoca
grenkoca / jupyter_plt2gif.py
Created May 21, 2026 13:07
Create in-line animations in Jupyter notebooks from matplotlib data
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
from IPython.display import display, HTML
import base64
def gif_animator(interval=200, repeat=True, figsize=(5, 5), dpi=100):
"""
A generalized decorator that converts ANY plotting function into an
in-line, perfectly-cropped Jupyter GIF animation.