<commit_before># coding: utf-8

import pianette.errors
import re
import time
import warnings

from pianette.utils import Debug

is_gpio_available = False
try:
    import RPi.GPIO as GPIO
except ImportError:
    Debug.println("FAIL", "Could not import RPi.GPIO")
else:
    is_gpio_available = True

if is_gpio_available:
    RPi.GPIO.setwarnings(True)
    RPi.GPIO.cleanup()

class GPIOConfigUtil:

    # Channels

    CHANNEL_LABELING_BCM = "BCM"

    supported_channel_labelings = [ CHANNEL_LABELING_BCM ]

    @staticmethod
    def is_supported_channel_labeling(channel_labeling):
        return channel_labeling in GPIOConfigUtil.supported_channel_labelings

    rpi_gpio_mode_for_channel_labeling = {
        CHANNEL_LABELING_BCM: RPi.GPIO.BCM if is_gpio_available else None,
    }

    @staticmethod
    def get_rpi_gpio_mode_for_channel_labeling(channel_labeling):
        if not GPIOConfigUtil.is_supported_channel_labeling(channel_labeling):
            raise PianetteGPIOConfigError("Unsupported GPIO channel labeling '%s'" % (channel_labeling))

        if channel_labeling not in GPIOConfigUtil.rpi_gpio_mode_for_channel_labeling.keys():
            raise PianetteGPIOConfigError("Undefined GPIO mode for channel labeling '%s'" % (channel_labeling))
<commit_msg>Consider this a warning<commit_after># coding: utf-8

import pianette.errors
import re
import time
import warnings

from pianette.utils import Debug

is_gpio_available = False
try:
    import RPi.GPIO as GPIO
except ImportError:
    Debug.println("WARNING", "Could not import RPi.GPIO")
else:
    is_gpio_available = True

if is_gpio_available:
    RPi.GPIO.setwarnings(True)
    RPi.GPIO.cleanup()

class GPIOConfigUtil:

    # Channels

    CHANNEL_LABELING_BCM = "BCM"

    supported_channel_labelings = [ CHANNEL_LABELING_BCM ]

    @staticmethod
    def is_supported_channel_labeling(channel_labeling):
        return channel_labeling in GPIOConfigUtil.supported_channel_labelings

    rpi_gpio_mode_for_channel_labeling = {
        CHANNEL_LABELING_BCM: RPi.GPIO.BCM if is_gpio_available else None,
    }

    @staticmethod
    def get_rpi_gpio_mode_for_channel_labeling(channel_labeling):
        if not GPIOConfigUtil.is_supported_channel_labeling(channel_labeling):
            raise PianetteGPIOConfigError("Unsupported GPIO channel labeling '%s'" % (channel_labeling))

        if channel_labeling not in GPIOConfigUtil.rpi_gpio_mode_for_channel_labeling.keys():
            raise PianetteGPIOConfigError("Undefined GPIO mode for channel labeling '%s'" % (channel_labeling))

{'fraction_non_alphanumeric': 0.06643220007815553, 'fraction_numerical': 0.0007815552950371239, 'mean_word_length': 4.378151260504202, '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': '1431711', 'n_tokens_mistral': 811, 'n_tokens_neox': 789, 'n_words': 171}