<commit_before>#-----------------------------------------------------------------------------
# A Three-Pronged Approach to Exploring the Limits of Static Malware Analyses:
# Callsite Parameter Cardinality (CPC) Counting: to_bloom.py
#
# Consumes a list of features into a Bloom filter for Jaccard indexing
#
# <NAME> (<EMAIL>)
#
#-----------------------------------------------------------------------------

from pybloom import BloomFilter


def to_bloom(filename):
    with open(filename, 'r') as f:
        b = BloomFilter(capacity=1000, error_rate=0.001)<commit_msg>Fixed missing imports<commit_after>#-----------------------------------------------------------------------------
# A Three-Pronged Approach to Exploring the Limits of Static Malware Analyses:
# Callsite Parameter Cardinality (CPC) Counting: to_bloom.py
#
# Consumes a list of features into a Bloom filter for Jaccard indexing
#
# <NAME> (<EMAIL>)
#
#-----------------------------------------------------------------------------
from __future__ import print_function
import sys

from pybloom import BloomFilter


def to_bloom(filename):
    with open(filename, 'r') as f:
        b = BloomFilter(capacity=1000, error_rate=0.001)
{'fraction_non_alphanumeric': 0.32360300250208507, 'fraction_numerical': 0.013344453711426188, 'mean_word_length': 1.6030368763557483, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1349629', 'n_tokens_mistral': 315, 'n_tokens_neox': 287, 'n_words': 99}