Skip to content

Instantly share code, notes, and snippets.

View JHartzer's full-sized avatar

JHartzer

View GitHub Profile
import os
import sys
import glob
import re
def parse_extended_guid(identity_str):
m = re.search(r'\(([^,]+),\s*([^)]+)\)', identity_str)
if m:
return m.group(1).strip().lower(), m.group(2).strip()
import hashlib
import os
import subprocess
def hash_file(file_path):
CHUNK_SIZE = 2**16
with open(file_path, "rb") as f:
file_hash = hashlib.md5()
chunk = f.read(CHUNK_SIZE)
while chunk: