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

from ev3dev.auto import *

import ev3robot.logic as logic
import ev3robot.robot as r

import time

if __name__ == "__main__":

    class SumoController(logic.Controller):

        def setup(self):
            self.ptc_color = self.color()

        def loop(self):
            self.normal_speed()

            if self.has_obstacle(range=200):
                self.forward()
            else:
                self.brake()
                self.turn(degree=10)

            # 0 black -> 100 white
            if self.color() + 10 < self.ptc_color:
                self.turn(degree=90)
                self.forward()
                # drive for 1 sec
                time.sleep(1)



    controller = SumoController(right_motor=LargeMotor('outA'), left_motor=LargeMotor('outB'),<commit_msg>some refactoring<commit_after>#!/usr/bin/python
# -*- coding: utf-8 -*-

from ev3dev.auto import *

import ev3robot.logic as logic
import ev3robot.robot as r

import time

if __name__ == "__main__":

    class SumoController(logic.Controller):

        def setup(self):
            self.ptc_color = self.color()

        def loop(self):
            self.normal_speed()

            if self.has_obstacle(range=200):
                self.forward()
            else:
                self.brake()
                self.turn(degree=10)
                time.sleep(1)

            # 0 black -> 100 white
            if self.color() + 10 < self.ptc_color:
                self.turn(degree=90)
                self.forward()
                # drive for 1 sec
                time.sleep(1)



    controller = SumoController(right_motor=LargeMotor('outA'), left_motor=LargeMotor('outB'),
{'fraction_non_alphanumeric': 0.11227457824316463, 'fraction_numerical': 0.02268760907504363, 'mean_word_length': 1.7044025157232705, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 5, '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': '454054', 'n_tokens_mistral': 569, 'n_tokens_neox': 503, 'n_words': 105}