yizhilll's picture
Add files using upload-large-folder tool
5792c42 verified
raw
history blame contribute delete
471 Bytes
import struct
file_name = "CC-MAIN-2013-20_00013"
if __name__ == "__main__":
single_int = struct.Struct("<I")
cnt = 0
with open(f"minhash/remove_ids/{file_name}.remove", "rb") as file:
remove_ids = set()
while True:
chunk = file.read(single_int.size)
if not chunk:
break
cnt += 1
remove_ids.add(single_int.unpack(chunk))
print(len(remove_ids), sorted(remove_ids)[-1])