Exemplo n.º 1
0
def variables_prepare(initialpath):
    """ this function is used to get some predefined variables """    

    import global_variables         
    global_variables._init()
    global_variables.set_value('initialpath',initialpath)
    #global_variables.set_value('temppath',initialpath+'/lib/temp')
    #global_variables.set_value('num',1)
    global_variables.set_value('setup_num',1)     # used to count setup scripts numbers in function traverse_judge
    global_variables.set_value('run_num',1)       # used to count run scripts numbers in function traverse_judge
    global_variables.set_value('teardowm_num',1)  # used to count teardown scripts numbers in function traverse_judge
    global_variables.import_variables_from_file([initialpath+'/etc/global.vars',initialpath+'/etc/user.vars'])# read all pre-defined vars
Exemplo n.º 2
0
# coding: utf-8
import re

import app
import filetools
import global_variables as gv

gv._init()


def set_cfg_fp(cfg_fp):
    gv.set_value('cfg_fp', cfg_fp)


def set_data_fp(data_fp):
    gv.set_value('data_fp', data_fp)


def set_gpus(gpus):
    gv.set_value('gpus', gpus)


def set_order(order):
    gv.set_value('order', order)


def set_weight_fp(weight_fp):
    gv.set_value('weight_fp', weight_fp)

def set_video_fp(video_fp):
    gv.set_value('video_fp', video_fp)
Exemplo n.º 3
0
 def __init__(self, *args, **kwargs):
     super(TestCalculation, self).__init__(*args, **kwargs)
     self._root_path = str(Path(__file__).parent.absolute())
     internal_globals._init()
Exemplo n.º 4
0
# ╚════██║   ██║   ██║   ██║██║     ██╔═══╝ ██╔══╝  ██╔══██╗╚════██║   ██║   ██╔══╝  ██║██║╚██╗██║
# ███████║   ██║   ╚██████╔╝███████╗██║     ███████╗██║  ██║███████║   ██║   ███████╗██║██║ ╚████║
# ╚══════╝   ╚═╝    ╚═════╝ ╚══════╝╚═╝     ╚══════╝╚═╝  ╚═╝╚══════╝   ╚═╝   ╚══════╝╚═╝╚═╝  ╚═══╝
# programmed by Sandra Jasmine Bernich and Jonas Marvin Huhndorf

# ASCII-Art designed with: http://patorjk.com/software/taag/


# Python-libraries
from asyncio import get_event_loop
from logging import info, INFO, basicConfig, root, DEBUG
from os import getenv

# Other modules from this project
# functions:
from api.action_play import start_ws
import global_variables as internal_globals

# This function starts the bot.
if __name__ == '__main__':
    # Initialize all global-containers
    internal_globals._init()

    # Sets the logging-level to INFO.
    basicConfig()
    root.setLevel(INFO)

    # Start communication with the server
    info("The bot has started...")
    get_event_loop().run_until_complete(start_ws())