Created
September 3, 2022 10:29
-
-
Save ylashin/aef8856182b53d67041b9f5b09909751 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def find_stats_for_records_matching_x_or_y(files, x, y): | |
files_scanned = 0 | |
false_positives = 0 | |
for k in files.keys(): | |
file = files[k] | |
if not ((file.minx <= x and file.maxx >= x) or (file.miny <= y and file.maxy >=y)): | |
continue | |
files_scanned += 1 | |
for item in file.items: | |
if item.x != x and item.y != y: | |
false_positives += 1 | |
print(f"files_scanned : {files_scanned}") | |
print(f"false_positives: {false_positives}") | |
find_stats_for_records_matching_x_or_y(linear_organised_files, 2, 3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment