<commit_before>import sys
from time import clock

if "core" not in sys.path[0]:
    if "\\" in sys.path[0]:
        sys.path.insert(0, '..\\..\\core')
    else:
        sys.path.insert(0, 'core')
import pygame

from simulation import Simulation
from simulation.generators import CarProperGenerator
from simulation.lights_managers import LightsManager
from configuration import config

WINDOW_SIZE = (1000, 800)


def read_configuration():
    """Reads configuration from file"""
    return config.Config.from_config_file('config.json')


def main():
    # try:
    #      entrypoint()
    # except Exception as e:
    #   print("{0}, message : {1}".format(sys.stderr, e))
    #   return 2

    pygame.init()

    screen = pygame.display.set_mode(WINDOW_SIZE)
    prev_update_time = clock()
    done = False

    # Generators
    configuration = read_configuration()
    car_generator = CarProperGenerator
    lights_manager = LightsManager

    game = Simulation(car_generator, lights_manager, configuration)
    game_map = game.map
    lights_painter = game.map.get_lights_painter()

    game_map.prepare(screen)
    while not done:
        if pygame.key.get_pressed()[pygame.K_ESCAPE]:
            done = True

        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                done = True

        curr_time = clock()
        if curr_time - prev_update_time > 0.2:
            prev_update_time = curr_time
            game.update()

        game_map.draw(screen, game.points)
        lights_painter.draw(screen, game.get_lights())

        pygame.time.Clock().tick(60)
        pygame.display.flip()
    sys.exit()


if __name__ == "__main__":
    main()
<commit_msg>kaufland fix<commit_after>import sys
from time import clock

if "core" not in sys.path[0]:
    if "\\" in sys.path[0]:
        sys.path.insert(0, '..\\..\\core')
    else:
        sys.path.insert(0, '../../core')
import pygame

from simulation import Simulation
from simulation.generators import CarProperGenerator
from simulation.lights_managers import LightsManager
from configuration import config

WINDOW_SIZE = (1000, 800)


def read_configuration():
    """Reads configuration from file"""
    return config.Config.from_config_file('config.json')


def main():
    # try:
    #      entrypoint()
    # except Exception as e:
    #   print("{0}, message : {1}".format(sys.stderr, e))
    #   return 2

    pygame.init()

    screen = pygame.display.set_mode(WINDOW_SIZE)
    prev_update_time = clock()
    done = False

    # Generators
    configuration = read_configuration()
    car_generator = CarProperGenerator
    lights_manager = LightsManager

    game = Simulation(car_generator, lights_manager, configuration)
    game_map = game.map
    lights_painter = game.map.get_lights_painter()

    game_map.prepare(screen)
    while not done:
        if pygame.key.get_pressed()[pygame.K_ESCAPE]:
            done = True

        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                done = True

        curr_time = clock()
        if curr_time - prev_update_time > 0.2:
            prev_update_time = curr_time
            game.update()

        game_map.draw(screen, game.points)
        lights_painter.draw(screen, game.get_lights())

        pygame.time.Clock().tick(60)
        pygame.display.flip()
    sys.exit()


if __name__ == "__main__":
    main()

{'fraction_non_alphanumeric': 0.11153507484590548, 'fraction_numerical': 0.010566480774875257, 'mean_word_length': 2.641025641025641, 'pattern_counts': {'":': 2, '<': 3, '<?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': '1837152', 'n_tokens_mistral': 1095, 'n_tokens_neox': 1043, 'n_words': 243}