<commit_before>import ctypes

stringtools = ctypes.CDLL("../target/debug/libstringtools-4149b7695a4035ac.so")
print(stringtools.count_substrings(b"banana", b"na"))<commit_msg>Don't hardcore library name in Python example.<commit_after>import ctypes
import glob
import sys

try:
    library_name = glob.glob("../target/debug/libstringtools-*.so")[0]
except IndexError:
    print("Couldn't find dynamic library")
    sys.exit(1)
else:
    stringtools = ctypes.CDLL(library_name)
    print(stringtools.count_substrings(b"banana", b"na"))
{'fraction_non_alphanumeric': 0.1348314606741573, 'fraction_numerical': 0.026217228464419477, 'mean_word_length': 5.858974358974359, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3165470', 'n_tokens_mistral': 189, 'n_tokens_neox': 179, 'n_words': 32}