huge commit
This commit is contained in:
19
2026/srdnlen_quals/forensic/chapter3/detect_jumps.py
Normal file
19
2026/srdnlen_quals/forensic/chapter3/detect_jumps.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import csv
|
||||
import re
|
||||
|
||||
with open("./fs_events/FSE_Reports/All_FSEVENTS.tsv", "r") as f: # update path
|
||||
reader = csv.DictReader(f, delimiter="\t")
|
||||
rows = [
|
||||
r["fullpath"] for r in reader
|
||||
if r["fullpath"].startswith("keys/key_") and r["fullpath"].endswith(".txt")
|
||||
]
|
||||
|
||||
rows.sort() # sort by name to ensure order
|
||||
|
||||
for i in range(len(rows) - 1):
|
||||
current = int(re.search(r'key_(\d+)', rows[i]).group(1))
|
||||
next_ = int(re.search(r'key_(\d+)', rows[i+1]).group(1))
|
||||
if next_ != current + 1:
|
||||
print(f"GAP: {rows[i]} -> {rows[i+1]} (expected key_{current+1:06d}, got key_{next_:06d})")
|
||||
|
||||
print("Done.")
|
||||
Reference in New Issue
Block a user