Exemplo n.º 1
0
def updateEntities(grid, robbers, Bank, Money):
   controller.controls(robbers, Money)
   movement.robber_trail(grid)
   controller.start(robbers)
   movement.makeRobberGo(robbers, Money)
   if isValidPosition(robbers) == True:
      occ_grid.set_cell(grid, robbers.position, occ_grid.GATHERER)
Exemplo n.º 2
0
 def do_run_interpreter(self, line):
     """
     Runs UML to Class template programme
     run_interpreter alias is run_i
     :return: None
     """
     start()
Exemplo n.º 3
0
def main(argv=None):
    if argv is None:
        argv = sys.argv
    try:
        try:
            opts, args = getopt.getopt(argv[1:], "hlh", ["help", "local", "hdmi"])
        except getopt.error, msg:
             raise Usage(msg)


        """
        @todo
        1. Take a command line argument for a MP3 file
        2. Pass it to the controller
        """

        if len(args) < 2:
            raise Usage("xmas.py [-o local|hdmi] record|playback|detect mp3_file")

        controller.start(args[0], args[1], opts)
Exemplo n.º 4
0
def run():
    sys.path.append(os.getcwd() + '/src')
    os.chdir('src')
    import controller
    controller.start()
Exemplo n.º 5
0
async def report_message(message: types.Message):
    await bot.send_chat_action(message.chat.id, 'typing')
    whoami(message)
    resp = controller.start()
    logging.info(resp)
    await bot.send_message(message.chat.id, resp)
Exemplo n.º 6
0
'''
MIT License

Copyright (c) 2019 Enrique Sandoval

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
'''
from controller import start

start()
Exemplo n.º 7
0
# Entropy Calculator Tool
# entropy.py
# Created by Mauro J. Pappaterra on 25 of 08 2018.
import model as m
import view as v
import controller as c

c.start(m, v)
Exemplo n.º 8
0
from filelock.fl import FileLock
import clparams
import configuration
import controller
import traceback

if __name__ == "__main__":
    if configuration.PRODUCTION != False:
        print "Configuration is set to PRODUCTION MODE"
        print "Change configuration.PRODUCTION = False for simulations"
    else:
        try:
            names, res = controller.start()

            # Build header and values for this experiment
            conf_head, conf_values = clparams.build_result_log_title()
            names = "%s \t %s" % ("\t".join(conf_head), names)
            res = "%s \t %s" % ("\t".join(conf_values), res)

            # Append results to file
            filename = configuration.path(clparams.CL_RESULT_FILE, "csv")
            with FileLock(filename):
                # Add header only if file is new
                try:
                    with open(filename):
                        pass
                except IOError:
                    f = open(filename, "w")
                    f.write(names)
                    f.write("\n")
                    f.close()
Exemplo n.º 9
0
def main():
    Event.read_from_csv()
    controller.start()
    Event.write_to_csv()
Exemplo n.º 10
0
from controller import start

""" SET THESE
N: max filament length to generate
N_0: min filament length to generate, use with run_mode = 'subset'
run_mode: all runs 2 to N, subset runs N_0 to N, single runs N, inf runs indefinitely
final: true to output to final folder, false to output to test folder
data_file_name: name of data csv file to write to
final_directory: directory to write final output to
"""
N = 12
N_0 = 2
run_mode = 'single'  # all, subset, inf, single
final = False
data_file_name = 'data.csv'
final_directory = 'final_fixed_endpoint'
""""""


start(N_0, N, final, data_file_name, run_mode, final_directory)
Exemplo n.º 11
0
        "when":
        lambda answers:
        (answers["use_git_hub"] and answers["use_codeclimate"] and
         (answers["git_org_or_person"] == "On my organization's GitHub.")),
    },
    {
        "type":
        "input",
        "name":
        "code_climate_org_id",
        "message":
        "Enter your Oganization id on CodeClimate.",
        "when":
        lambda answers:
        (answers["use_git_hub"] and answers["use_codeclimate"] and
         (answers["git_org_or_person"] == "On my organization's GitHub.") and
         (answers["code_climate_org_choise"] ==
          "Okay, I know and I will inform.")),
    },
    {
        "type": "input",
        "name": "base_64_url",
        "message": "Enter your Google Credencial Json file.",
        "when":
        lambda answers: answers["use_git_hub"] and answers["use_travis"],
    },
]

answers = prompt(questions)
start(Data(answers))
Exemplo n.º 12
0
def main():
    """
    Contain main logic of program
    """

    controller.start()
Exemplo n.º 13
0
def main():
    if size_check():
        args = parse_args()
        start(args.players, args.tournaments)
    else:
        print("That terminal is too small for such a big program !")
Exemplo n.º 14
0
import controller

controller = controller.ApplicationController()
controller.start('data.csv')
Exemplo n.º 15
0
import controller
import midireceiver

if __name__ == '__main__':
    controller = controller.BehringerController()
    controller.start()
    controller.find_mixer()
    print "Found", controller.mixer_name
    service = midireceiver.MidiReceiver(controller,controller.mixer_name)
    try:
        service.start()
    except (KeyboardInterrupt, SystemExit):
        raise
Exemplo n.º 16
0
from cmdline import GetUserOptions
import controller

if __name__ == '__main__':
    test_framework = {}
    cmd_line = GetUserOptions()
    test_framework["test"] = False

    # init command line input format
    cmd_line.set_user_options()

    file_list, regexp_pattern, output_format = cmd_line.get_user_options(
        test_framework)
    controller.start(file_list, regexp_pattern, output_format)
Exemplo n.º 17
0
import controller

controller.start()

#dburl = 'postgresql://*****:*****@localhost:5432/course_work'

#create_tables(dburl)

#create_csvs(

#import_csvs()
Exemplo n.º 18
0
def co():
    print(time.ctime())
    controller.start()