<commit_before>#!/usr/bin/env python3
"""Python binding of CO Click wrapper of LetMeCreate library."""

import ctypes

_LIB = ctypes.CDLL('libletmecreate_click.so')


def get_measure(mikrobus_index):
    """Measure the CO concentration in the air using the CO click.

    mikrobus_index: must be 0 (MIKROBUS_1) or 1 (MIKROBUS_2)

    Note: An exception is thrown if it fails to communicate with the CO click.
    """
    value = ctypes.c_uint16_t(0)
    ret = _LIB.co_click_get_measure(mikrobus_index, ctypes.byref(value))
    if ret < 0:
        raise Exception("co click read ppm failed")
    return value.value<commit_msg>co: fix wrapper<commit_after>#!/usr/bin/env python3
"""Python binding of CO Click wrapper of LetMeCreate library."""

import ctypes

_LIB = ctypes.CDLL('libletmecreate_click.so')


def get_measure(mikrobus_index):
    """Measure the CO concentration in the air using the CO click.

    mikrobus_index: must be 0 (MIKROBUS_1) or 1 (MIKROBUS_2)

    Note: An exception is thrown if it fails to communicate with the CO click.
    """
    value = ctypes.c_uint16(0)
    ret = _LIB.co_click_get_measure(mikrobus_index, ctypes.byref(value))
    if ret < 0:
        raise Exception("co click read ppm failed")
    return value.value
{'fraction_non_alphanumeric': 0.0936, 'fraction_numerical': 0.0144, 'mean_word_length': 3.83011583011583, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7185179', 'n_tokens_mistral': 436, 'n_tokens_neox': 415, 'n_words': 133}