{'fraction_non_alphanumeric': 0.02586206896551724, 'fraction_numerical': 0.0, 'mean_word_length': 5.421276595744681, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, '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}}
CppyABM: An open‐source agent‐based modeling library to integrate C++ and Python

Agent‐based modeling (ABM) has been extensively used to study the collective behavior of systems emerging from the interaction of numerous independent individuals called agents. Python and C++ are commonly used for ABM thanks to their unique features; the latter offers superior performance while the former provides ease‐of‐use and rich libraries in data science, visualization, and machine learning. We present the framework CppyABM that unifies these features by providing identical ABM semantic and development styles in both C++ and Python as well as the essential binding tools to expose a certain functionality from C++ to Python. The binding feature allows users to tailor and further extend a type or function within Python while it is originally defined in C++. Using CppyABM, users can choose either C++ or Python depending on their expertise and the specialty of the model or combine them to benefit from the advantages of both languages simultaneously. We provide showcases of CppyABM capabilities using several examples in computational biology, ecology, and virology. These examples are implemented in different formats using either C++ or Python or a combination of both to provide a comparison between the performance of implementation scenarios. The results of the example show a clear performance advantage of the models entirely or partly implemented in C++ compared to purely Python‐based implementations.