Skip to content

Instantly share code, notes, and snippets.

View Martoni's full-sized avatar

Fabien Marteau Martoni

View GitHub Profile
@Martoni
Martoni / patch.py
Created July 22, 2022 14:47 — forked from pepijndevos/patch.py
Gowin IDE patcher
#!/usr/bin/python3
import os
import re
import subprocess
import mmap
def patch(filename : str, bytes):
subprocess.run(["cp",filename, filename + '_patched'])
with open(filename + "_patched", "r+b") as f: