Zar-Branch (#6)

Co-authored-by: = <=>
Co-authored-by: Driven-Element <129630760+Driven-Element@users.noreply.github.com>
Reviewed-on: brotoskyj/AirlockTools#6
Co-authored-by: brotoskyj <jbrotosky@gmail.com>
Co-committed-by: brotoskyj <jbrotosky@gmail.com>
This commit was merged in pull request #6.
This commit is contained in:
brotoskyj
2025-08-22 09:27:16 -04:00
committed by brotoskyj
parent 4d25a21ddb
commit ccbf716418
13 changed files with 159 additions and 62606 deletions
+16
View File
@@ -0,0 +1,16 @@
import pandas as pd
def filter_and_drop(approved, eligiblepaths, min_hashes):
"""
Filters eligiblepaths to rows where all hashes are in approved,
then drops rows with fewer than min_hashes hashes.
"""
approved_hashes = set(approved['sha256'])
def all_hashes_approved(row):
return all(h in approved_hashes for h in row['sha256'])
filtered = eligiblepaths[eligiblepaths.apply(all_hashes_approved, axis=1)]
filtered = filtered[filtered['sha256'].apply(len) >= min_hashes]
return filtered