<commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import smbus
import logging as log


class analogInOut():

    def __init__(self):
        self._bus = smbus.SMBus(1)

    def getValue(self, address, chanel):
        var = self._bus.read_i2c_block_data(address,chanel,11)    #Werte von Board in 11 stelliges Array schreiben
        val = var[2]*256+var[1]                                   #Berechnung der korrekten Zahlenwerte aus dem Array
        log.debug("Analogwert von Adresse "+str(address)+ " mit Kanal " +str(chanel) +" mit Wert "+ str(val))    #Ausgabe in der Python Shell
        return val
    
     def setValue(self, address, chanel, value):
        a=int(value)
        HBy = int(a/256)
        LBy = int(a-HBy*256)
        field=[LBy,HBy]
        bus.write_i2c_block_data(address,chanel,field)<commit_msg>Update analogInOut.py<commit_after>#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import smbus
import logging as log


class analogInOut():

    def __init__(self):
        self._bus = smbus.SMBus(1)

    def getValue(self, address, chanel):
        var = self._bus.read_i2c_block_data(address,chanel,11)    #Werte von Board in 11 stelliges Array schreiben
        val = var[2]*256+var[1]                                   #Berechnung der korrekten Zahlenwerte aus dem Array
        log.debug("Analogwert von Adresse "+str(address)+ " mit Kanal " +str(chanel) +" mit Wert "+ str(val))    #Ausgabe in der Python Shell
        return val

    def setValue(self, address, chanel, value):
        a=int(value)
        HBy = int(a/256)
        LBy = int(a-HBy*256)
        field=[LBy,HBy]
        bus.write_i2c_block_data(address,chanel,field)
{'fraction_non_alphanumeric': 0.11641791044776119, 'fraction_numerical': 0.023880597014925373, 'mean_word_length': 2.5358649789029535, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4917823', 'n_tokens_mistral': 607, 'n_tokens_neox': 574, 'n_words': 136}