fixed format

This commit is contained in:
2026-01-14 13:26:49 +01:00
parent ee95f4df4f
commit fcaa6b3543
8 changed files with 16 additions and 85 deletions

View File

@@ -1,4 +1,3 @@
from logging import disable
from PIL import Image
from pyzbar.pyzbar import decode
import itertools
@@ -104,7 +103,7 @@ def solve_combo(combo):
return None
def main(img_path="student_fair/secret_message.png", verbose=True):
def main(img_path="files/secret_message.png", verbose=True):
img = Image.open(img_path)
global new_image
new_image = Image.new("RGB", (img.height, img.height))
@@ -129,10 +128,8 @@ def main(img_path="student_fair/secret_message.png", verbose=True):
result = None
MAX_WORKER = 6
# Use `multiprocessing.Pool` with the number of available cores
with Pool(MAX_WORKER) as pool:
with Pool() as pool:
# `imap_unordered` returns results as they are completed.
# This is a lazy iterator, so it doesn't create all combos at once.
# `tqdm` can still be used to show progress.