Exemplo n.º 1
0
def main():
    reader = FileReader()
    for day in range(1, DAYS + 1):
        for task in range(1, TASKS + 1):
            if (day, task) not in SKIP_LIST:
                try:
                    task_input = reader.read_file(f"day_{day}/input.txt")
                    module = importlib.import_module(f"day_{day}.task_{task}.solution")
                    solver = getattr(module, "Solver")(task_input)
                    answer = solver.solve()
                    print(f"t{task}d{day}:", answer)
                except (FileNotFoundError, ModuleNotFoundError) as e:
                    print(e)
                    pass
Exemplo n.º 2
0
    def __init__(self):
        file_reader = FileReader()
        file_path = os.path.abspath('navigation.properties')
        prop = file_reader.read_file(file_path)

        #initialize instances for basic operations and location manager
        self._basic_operations = BasicOperations()
        self._location_manager = LocationManager()

        #initialize locations of navigation elements
        self._locNav = LocNav()
        self._locNav.set_loc_link_menu(prop['loc_link_menu_mobile'])
        self._locNav.set_loc_link_products_services(
            prop['loc_link_productsServices'])
        self._locNav.set_loc_link_mediaportal(prop['loc_link_mediaPortal'])
Exemplo n.º 3
0
    def __init__(self):
        file_reader = FileReader()
        file_path = os.path.abspath('mediaportal.properties')
        prop = file_reader.read_file(file_path)

        #initialize instances for basic operations and location manager
        self._basic_operations = BasicOperations()
        self._location_manager = LocationManager()

        #initialize locations of media portal elements
        self._locMediaPortal = LocMediaPortal()
        self._locMediaPortal.set_loc_textArea_module_connect(
            prop['loc_textarea_moduleConnect'])
        self._locMediaPortal.set_loc_textArea_module_newsAnalytics(
            prop['loc_textarea_moduleNewsAnalytics'])
        self._locMediaPortal.set_loc_textArea_module_social(
            prop['loc_textarea_moduleSocial'])
        self._locMediaPortal.set_loc_modules(prop['num_of_modules'])