<jupyter_start><jupyter_text>there is an IPython magic for CFFI: https://github.com/Carreau/cffi_magichttps://tmarkovich.github.io//articles/2017-08/linking-python-to-c-with-cffi these are just some random experiments ...<jupyter_code>from cffi import FFI
ffi = FFI()
ffi.cdef("""
typedef void mytype;
""")
ptrptr = ffi.new("mytype**")
ptrptr
type(ptrptr)
ptrptr[0]
ptrptr[0] += 1
ptrptr[0]
ptr = ptrptr[0]
ptr
type(ptr)<jupyter_output><empty_output><jupyter_text>`ptr` is a separate, non-owning cdata object. It is not pointing to the original data.<jupyter_code>ptr += 1
ptr
ptrptr[0]
del ptrptr
ptr<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1410459587955626, 'fraction_numerical': 0.020602218700475437, 'mean_word_length': 6.101123595505618, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, '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}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '351713', 'license': 'CC0-1.0', 'n_tokens_mistral': 266, 'n_tokens_neox': 251, 'n_words': 56, 'path': 'optimization/cffi.ipynb', 'repo_name': 'mgeier/python-audio', 'size': '631'}