<commit_before>import asyncio
from envsense.devices import BaseDeviceManager


class ActuatorDeviceManager(BaseDeviceManager):

    CONFIG_KEY = 'actuators'

    def __init__(self,  app):
        super(ActuatorDeviceManager, self).__init__(app)
        # Add sensors
        # self.items['name'] = Actuator(refresh=1)

    @asyncio.coroutine
    def start(self):
        for actuator in self.items.values():
            asyncio.async(actuator.start(), loop=asyncio.get_event_loop())


def factory(app):
    return ActuatorDeviceManager(app)


class BaseActuator:

    def __init__(self, refresh=1, *args, **kwargs):
        self.refresh = refresh

    @asyncio.coroutine
    def start(self):
        while True:
            self.do_writing()
            yield from asyncio.sleep(self.refresh)

    def do_writing(self):
        pass
<commit_msg>Adding actuators to __init__.py<commit_after>import asyncio
from envsense.devices import BaseDeviceManager


class ActuatorDeviceManager(BaseDeviceManager):

    CONFIG_KEY = 'actuators'

    def __init__(self,  app):
        super(ActuatorDeviceManager, self).__init__(app)
        # Add sensors
        from .upm import LedActuator, BuzzerActuator, DisplayActuator
        self.items['LedActuator'] = LedActuator(refresh=1)
        self.items['BuzzerActuator'] = BuzzerActuator(refresh=1)
        self.items['DisplayActuator'] = DisplayActuator(refresh=1)

    @asyncio.coroutine
    def start(self):
        for actuator in self.items.values():
            asyncio.async(actuator.start(), loop=asyncio.get_event_loop())


def factory(app):
    return ActuatorDeviceManager(app)


class BaseActuator:

    def __init__(self, refresh=1, *args, **kwargs):
        self.refresh = refresh

    @asyncio.coroutine
    def start(self):
        while True:
            self.do_writing()
            yield from asyncio.sleep(self.refresh)

    def do_writing(self):
        pass

{'fraction_non_alphanumeric': 0.10062565172054223, 'fraction_numerical': 0.0031282586027111575, 'mean_word_length': 3.091684434968017, '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': '4095707', 'n_tokens_mistral': 609, 'n_tokens_neox': 586, 'n_words': 119}