Ejemplo n.º 1
0
 def __register_to_redis(self):        
     try:
         rgtr = Register(self.myIP)
         task = Tasks(self.myIP)
     except Exception as e:
         self.__error_handle(
             {
             "error":{
                      "title": "__register_to_redis",
                      "message": e
                     }
             }
         )
         self.__stop(internal=True)
     else:
         startTime = datetime.today().strftime("%Y-%m-%d %H-%M-%S")
         resp = rgtr.register(self.myIP, startTime)
         if "error" in resp:
             self.__error_handle(resp)
             self.__stop(internal=True)
         else:
             self.logger.info("Redis registered")
         resp = task.set_change()
         if "error" in resp:
             self.__error_handle(resp)
Ejemplo n.º 2
0
def setValue(name_instruction, first_argument, result):
	if Register.isRegister(first_argument):
		Register.store(first_argument, result)
	elif Memory.isMemory(first_argument):
		Memory.store(first_argument, result)
	else:
		raise Exception('First argument in instruction '+name_instruction+' is defined incorrectly: {}'.format(first_argument))
Ejemplo n.º 3
0
def create_app_register(aName,
                        aSize,
                        aIndex,
                        aType,
                        aClass,
                        aBoot,
                        aAltPhysReg=None):
    new_reg = Register(
        **{
            'name': aName,
            'length': aSize,
            'index': aIndex,
            'type': aType,
            'class': aClass,
            'boot': aBoot
        })
    new_field = RegisterField(aName)

    if aAltPhysReg is not None:
        new_field.mPhysicalRegister = aAltPhysReg  # Alternative physical register specified.
    else:
        new_field.mPhysicalRegister = aName

    new_bit_field = BitField(aSize, 0)
    new_field.mBitFields.append(new_bit_field)
    new_reg.addRegisterFieldInOrder(new_field)
    return new_reg
Ejemplo n.º 4
0
def create_app_register(aName,
                        aSize,
                        aIndex,
                        aType,
                        aClass,
                        aBoot,
                        aAltPhysReg=None):
    new_reg = Register(
        **{
            "name": aName,
            "length": aSize,
            "index": aIndex,
            "type": aType,
            "class": aClass,
            "boot": aBoot,
        })
    new_field = RegisterField(aName)

    if aAltPhysReg is not None:
        new_field.mPhysicalRegister = aAltPhysReg
    else:
        new_field.mPhysicalRegister = aName

    new_bit_field = BitField(aSize, 0)
    new_field.mBitFields.append(new_bit_field)
    new_reg.addRegisterFieldInOrder(new_field)
    return new_reg
Ejemplo n.º 5
0
def passRequest():
    reg = Register()
    dataFromMessenger = request.get_json(
    )  # ge/home/test"t json data from naver talk talk
    SR = dataFromMessenger['textContent']['text']
    rq = reg.fetchRequest(SR)
    if rq == False:
        return "NO"
    return rq
Ejemplo n.º 6
0
 def RunProgram(self, debugging = False):
     '''Run the program contained in the store.'''
     self.__accumulator = Register.Register(0)
     running = True
     instructionCount = 0
     self.__ci = Register.Register(0)
     self.Print()
     print '\nExecuting program:'
     while running:
         #
         #   First, increment CI (the program counter).
         #
         self.IncrementCI()
         #
         #   Extract the store line given by CI from memory and put it in PI.
         #
         storeLineNumber = self.ReverseBits(self.LineNumber(self.__ci.Value), 5)
         self.__pi = self.__storeLines.GetLine(storeLineNumber)
         #
         #   Decode the instruction.
         #
         instructionCount += 1
         mnemonic, lineNumber = self.DecodeInstruction(self.__pi)
         if ((mnemonic == 'STOP') or (mnemonic == 'CMP')):
             instruction = mnemonic
         else:
             instruction = '{} {}'.format(mnemonic, lineNumber)
         print '{:-5} - {:02}: {}'.format(instructionCount, storeLineNumber, instruction)
         #
         #   Execute the instruction.
         #
         if (mnemonic == 'JMP'):
             self.__ci = Register.Register(self.__storeLines.GetLine(lineNumber).Value)
         elif (mnemonic == 'JRP'):
             self.__ci = self.Add(self.__ci, self.__storeLines.GetLine(lineNumber))
         elif (mnemonic == 'LDN'):
             line = self.__storeLines.GetLine(lineNumber)
             negatedValue = self.ReverseBits(line.Value, 32) * -1
             self.__accumulator.Value = self.ReverseBits(negatedValue, 32)
         elif (mnemonic == 'STO'):
             self.__storeLines.SetLine(lineNumber, Register.Register(self.__accumulator.Value))
         elif ((mnemonic == 'SUB') or (mnemonic == '---')):
             self.__accumulator = self.Sub(self.__accumulator, self.__storeLines.GetLine(lineNumber))
         elif (mnemonic == 'CMP'):
             if (self.__accumulator.Value & 0x1):
                 self.IncrementCI()
         elif (mnemonic == 'STOP'):
             running = False
         else:
             raise ValueError
         if (running and debugging):
             self.Print()
             command = raw_input()
             if (command == 'stop'): return
     self.Print()
     print 'Executed {} instruction(s)'.format(instructionCount)
Ejemplo n.º 7
0
def sign_up(temp_user_key):
    if request.method == 'GET':
        return render_template('regist.html')

    else :
        serial = request.form['serial']
        print(serial, temp_user_key)
        reg = Register()
        reg.insertUserData(temp_user_key, serial)
        return render_template("regist_success.html"), 200
Ejemplo n.º 8
0
def getValue(instruction, index, value):
	if Register.isRegister(value):
		return Register.load(value)
	elif Register.isRegisterZero(value):
		return 0
	elif Memory.isMemory(value):
		return Memory.load(value)
	elif value.isdigit():
		return value
	else:
		raise Exception(index+' argument in instruction '+instruction+' is defined incorrectly: {}'.format(value))
Ejemplo n.º 9
0
 def __init__(self):
     self.operator_list = ['+', '-', '*', '/']
     self.operand_list = [
         'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
         'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
         '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c',
         'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
         'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'
     ]
     self.sequence = input("Enter the Sequance : ")
     self.r = Register()
Ejemplo n.º 10
0
def create_vector_app_register(aIndex, aRegSize):
    v_reg = Register(**{'name':"v%d" % aIndex, 'length':512, 'index':aIndex, 'type':"VECREG", 'class':"LargeRegister", 'boot':0x3000})
    numberOfReg = 512 // aRegSize
    for i in range(0, numberOfReg):
        v_field = RegisterField("v%d_%d" % (aIndex, i))
        v_field.mPhysicalRegister = "v%d_%d" % (aIndex, i)
        v_bfield = BitField(aRegSize, 0)
        v_field.mBitFields.append(v_bfield)
        v_reg.addRegisterFieldInOrder(v_field)

    return v_reg
Ejemplo n.º 11
0
def create_quad_precision_app_register(aIndex, aRegSize):
    q_reg = Register(**{'name':"Q%d" % aIndex, 'length':128, 'index':aIndex, 'type':"FPR", 'class':"LargeRegister", 'boot':0})
    numberOfReg = 128 // aRegSize
    for i in range(0, numberOfReg):
        q_field = RegisterField("Q%d_%d" % (aIndex, i))
        q_field.mPhysicalRegister = "f%d_%d" % (aIndex, i)
        q_bfield = BitField(aRegSize, 0)
        q_field.mBitFields.append(q_bfield)
        q_reg.addRegisterFieldInOrder(q_field)

    return q_reg
Ejemplo n.º 12
0
def my_handler(event, context):
    myReg = Register()
    try:
        name = event['name']
        message = 'Hello {} from lambda!'.format(name)
        vmSpec = myReg.profileVM()
        vmSpec['message'] = message
        vmSpec['name'] = name
        return vmSpec
    except:
        logger = logging.getLogger()
        logger.setLevel(logging.ERROR)
        logger.error('THE INPUT JSON DOESN\'T HAVE SPECIFIED FIELD.')
        return {'error': 'please check log and input JSON'}
Ejemplo n.º 13
0
def create_double_precision_app_register(aIndex, aRegSize):
    
    d_reg = Register(**{'name':"D%d" % aIndex, 'length':64, 'index':aIndex, 'type':"FPR", 'class':None, 'boot':0x3000})
    numberOfReg = 64 // aRegSize
    for i in range(0, numberOfReg):
        if numberOfReg > 1:
            d_field = RegisterField("D%d_%d" % (aIndex, i))
        else:
            d_field = RegisterField("D%d" % aIndex)  
        d_field.mPhysicalRegister = "f%d_%d" % (aIndex, i)
        d_bfield = BitField(aRegSize, 0)
        d_field.mBitFields.append(d_bfield)
        d_reg.addRegisterFieldInOrder(d_field)
    
    return d_reg
Ejemplo n.º 14
0
    def __init__(self, master, file_name, input_info, output_info,
                 duration_estimate):
        self.master = master
        border_width = 15
        self.canvas_width = master.winfo_width()
        self.canvas_height = master.winfo_height()
        self.output_info = output_info
        arrow_width = self.canvas_height / 200
        border = 0

        #processor must be initialized first
        OutTop.OutTop(master, self.canvas_width, self.canvas_height, border,
                      border_width)
        OutBottom.OutBottom(master, self.canvas_width, self.canvas_height,
                            border, border_width)
        OutLeft.OutLeft(master, self.canvas_width, self.canvas_height, border,
                        border_width)
        OutRight.OutRight(master, self.canvas_width, self.canvas_height,
                          border, border_width)
        self.processor = Processor.Processor(master, self.canvas_width,
                                             self.canvas_height, arrow_width,
                                             border)
        self.wheel = Wheel.Wheel(master, self.canvas_width, self.canvas_height,
                                 border, arrow_width)
        self.register = Register.Register(master, self.canvas_width,
                                          self.canvas_height, border,
                                          self.processor.exit_height,
                                          arrow_width)
        self.memory = Memory.Memory(master, self.canvas_width,
                                    self.canvas_height, border)
        self.memory_op = MemoryOp.MemoryOp(master, self.canvas_width,
                                           self.canvas_height, arrow_width,
                                           border)
        self.cable = Cable.Cable(master, self.canvas_width, self.canvas_height,
                                 arrow_width, border,
                                 self.processor.entry_width,
                                 self.memory_op.entry_width,
                                 self.wheel.exit_height, self)
        self.controls = Controls.Controls(master, self.canvas_width,
                                          self.canvas_height, self, input_info,
                                          duration_estimate)

        ## TODO : MEANINGFUL EXCEPTIONS
        #        file_name = sys.argv[1]
        self.command_sequence = []
        memory_preset = []
        input_file = open(file_name, 'r')
        for line in input_file:
            line = line.strip()
            if line.strip().startswith('#') or line == '':
                continue
            elif line.strip().startswith('['):
                memory_preset = line[1:-1].split(',')
            else:
                self.command_sequence.append(line.strip().upper())

        self.memory.init(memory_preset, self.command_sequence)
        self.wheel.init(self.command_sequence)

        input_file.close()
Ejemplo n.º 15
0
 def CallReg(self):
     import sys
     reg.app = QtWidgets.QApplication(sys.argv)
     reg.frmLogin = QtWidgets.QMainWindow()
     reg.ui = reg.Ui_frmLogin()
     reg.ui.setupUi(reg.frmLogin)
     reg.frmLogin.show()
Ejemplo n.º 16
0
def carpoolSystem():
    while True:
        print(
            "\nEnter your choice\n1.Register\n2.Login\n3.Carpool\n4.View Ratings\n5.Quit"
        )
        choice = int(input())
        if choice == 1:  #Register a new account
            rg.register()
        elif choice == 2:  #Login into account
            lg.login()
        elif choice == 3:  #Get into carpool and view different carpool options
            cc.carpool()
        elif choice == 4:  #View rating of different carpool
            vr.viewRating()  # ga
        elif choice == 5:  ##################   #Exit
            break
Ejemplo n.º 17
0
 def click(self):
     if len(self.lineEdit.text()) == 0 or len(self.lineEdit_2.text()) == 0 or len(self.lineEdit_3.text()) == 0:
         msgBox = QtGui.QMessageBox()
         msgBox.setText("Some fields have not been filled out!")
         msgBox.exec_()
     elif (str(self.lineEdit_3.text()).isdigit()):
         msgBox = QtGui.QMessageBox()
         msgBox.setText("Numbers not allowed in passphrase!")
         msgBox.exec_()
     else:
         register = Register(str(self.lineEdit.text()), str(self.lineEdit_2.text()), str(self.lineEdit_3.text()), self.comboBox_2.currentText(), self.comboBox.currentText())
         register.folderCheck()
         register.capImg()
         msgBox = QtGui.QMessageBox()
         msgBox.setText("Successfully registered user.")
         msgBox.exec_()
Ejemplo n.º 18
0
def register_guest():
    print("NOW REGISTERING GUEST USER!")
    if request.method == "POST":
        response = Register.registerGuest()
        session["user_id"] = response
        session["name"] = Account.getFirstName(session["user_id"])
        return response
Ejemplo n.º 19
0
 def __init__(self, size=32):
     '''Construct a new StoreLines object with the specified number of lines
     in the store.  The default number of lines is 32, the same as the SSEM.'''
     if ((size > 0) and (size < MAX_STORE_SIZE)):
         self.__storeLines = [Register.Register() for x in range(size)]
     else:
         raise ValueError
Ejemplo n.º 20
0
def Assembler(fileName, storeLines):
    '''Open the specified file and convert the assembler instructions into
    binary and save into the storeLines.'''
    with open(fileName, "r") as source:
        lineNumber = 0
        for line in source:
            lineNumber += 1
            words = line.rstrip('\n').split()
            if (words[0] != '--'):
                sl = int(words[0].strip(':'))
                m = words[1].upper()
                if (m == 'NUM'):
                    store = ReverseBits(int(words[2]))
                else:
                    i = next((i for i, x in enumerate(instructions)
                              if (x['mnemonic'] == m)), None)
                    if (i == None):
                        print('Cannot process line {}: {}'.format(
                            lineNumber, line))
                        exit()
                    else:
                        opcode = instructions[i]['opcode']
                        if (m in ['STOP', 'HLT', 'CMP', 'SKN']):
                            ln = 0
                        else:
                            ln = int(words[2])
                        store = ReverseBits(ln | (opcode << 13))
                storeLines.SetLine(sl, Register.Register(store))
Ejemplo n.º 21
0
def register():
    print("NOW REGISTERING USER!")

    if request.method == "GET":
        return send_file("templates/register.html")

    if request.method == "POST":
        username = request.form["username"]
        password = request.form["password"]
        firstName = request.form["firstName"]
        lastName = request.form["lastName"]
        institution = request.form["institution"]
        registrationCode = request.form["registrationCode"]

    if registrationCode != "BetaCodeDNA":
        return "Incorrect registration code."

    if username[-4:] != ".edu":
        return "We are currently only accepting .edu registrations at this time."

    if username is not None and password is not None:
        user_id = Register.registerUser(username, password, firstName,
                                        lastName, institution)

        if (user_id > -1):
            #session["user_id"] = user_id
            return redirect("/login")
        elif (user_id == -2):
            return "Username already taken"
        else:
            return "Invalid username or password"

    return "Invalid username or password"
Ejemplo n.º 22
0
class TestBot:
    #symbols = Symbol.Symbol("ES\H20.CM", "symbol")
    symbols = Symbol.Symbol("Earnings_2020-02-04.csv", "file")
    Register.Register(
        "TOS",
        "5555",
    )
Ejemplo n.º 23
0
 def jump_to_Register(self):
     self.Dialog.close()
     form1 = QtWidgets.QDialog()
     ui = Register.Ui_Dialog()
     ui.setupUi(form1)
     form1.show()
     form1.exec_()
     self.Dialog.show()
Ejemplo n.º 24
0
def create_vector_app_register(aIndex):
    v_reg = Register(
        **{
            'name': "V%d" % aIndex,
            'length': 128,
            'index': aIndex,
            'type': "VECREG",
            'class': "LargeRegister",
            'boot': 0x3000
        })
    for i in range(0, 2):
        v_field = RegisterField("V%d_%d" % (aIndex, i))
        v_field.mPhysicalRegister = "v%d_%d" % (aIndex, i)
        v_bfield = BitField(64, 0)
        v_field.mBitFields.append(v_bfield)
        v_reg.addRegisterFieldInOrder(v_field)

    return v_reg
Ejemplo n.º 25
0
def register():
    print("NOW REGISTERING USER!")

    if request.method == "GET":
        return render_template("register.html")

    if request.method == "POST":
        user = request.get_json()
        return Register.registerUser(user)
Ejemplo n.º 26
0
def create_quad_precision_app_register(aIndex, aRegSize):
    q_reg = Register(
        **{
            "name": "Q%d" % aIndex,
            "length": 128,
            "index": aIndex,
            "type": "FPR",
            "class": "LargeRegister",
            "boot": 0,
        })
    numberOfReg = 128 // aRegSize
    for i in range(0, numberOfReg):
        q_field = RegisterField("Q%d_%d" % (aIndex, i))
        q_field.mPhysicalRegister = "f%d_%d" % (aIndex, i)
        q_bfield = BitField(aRegSize, 0)
        q_field.mBitFields.append(q_bfield)
        q_reg.addRegisterFieldInOrder(q_field)

    return q_reg
Ejemplo n.º 27
0
def create_vector_app_register(aIndex, aRegSize):
    v_reg = Register(
        **{
            "name": "v%d" % aIndex,
            "length": 512,
            "index": aIndex,
            "type": "VECREG",
            "class": "LargeRegister",
            "boot": 0x3000,
        })
    numberOfReg = 512 // aRegSize
    for i in range(0, numberOfReg):
        v_field = RegisterField("v%d_%d" % (aIndex, i))
        v_field.mPhysicalRegister = "v%d_%d" % (aIndex, i)
        v_bfield = BitField(aRegSize, 0)
        v_field.mBitFields.append(v_bfield)
        v_reg.addRegisterFieldInOrder(v_field)

    return v_reg
Ejemplo n.º 28
0
    def __init__(self, m, g1, g2, g3):
        self.m = 2
        self.g1 = g1
        self.g2 = g2
        self.g3 = g3

        self.g1pol = self.octal2poly(g1)
        self.g2pol = self.octal2poly(g2)
        self.g3pol = self.octal2poly(g3)

        self.register = Register.Register(m)
Ejemplo n.º 29
0
def executeProgram(memory_dictionary):

    for i in range(len(memory_dictionary)):
        if Decoder.decoderInstruction(
                Memory.loadInstruction('M[' + str(programCounter) + ']'),
                programCounter):
            Memory.flush()
            Register.flush()
            Cache.flush()
            print('Cache Miss')
            print(Cache.cache_miss)
            print('Cache Hit')
            print(Cache.cache_hit)
            print('Program was finished!')
            return
        if debug:
            Memory.flush()
            Register.flush()
            Cache.flush()
        incrementProgramCounter()
Ejemplo n.º 30
0
def bootUpMobile():
    # make manager
    reg = Register()
    dataFromMessenger = request.get_json(
    )  # get json data from naver talk talk
    SR = dataFromMessenger['textContent']['text']
    reg.openDB()
    UK = reg.getUserFromSerial(SR)
    reg.closeDB()
    return UK
Ejemplo n.º 31
0
 def aktualizacja(self, idZadania, Args=None): # analizuje dzialania usera i zleca wykonanie odpowiednich dzialan
     args = []   # umieszczone tu zmienne wyladuja w argumentach metody main w zadaniu	
    
     if idZadania == Zadania["ZlePolecenie"] :
         self.strategia = ZlePolecenie()
     elif idZadania == Zadania["Login"] :
         if self.model.gracz :
             self.strategia = ZlePolecenie()
         else :
             args.append(self.model)
             args.append(self.widok)
             if Args :
                 args.append(Args[0]) #nick
                 args.append(Args[1]) #haslo
             self.strategia = login()
     elif idZadania == Zadania["exit"] :
         args.append(self.widok.czyscEkran)
         self.strategia = exit()
     elif idZadania == Zadania["Menu"] :
         args.append(self)
         self.strategia = Menu()
     elif idZadania == Zadania["help"] :
         self.strategia = help()
     elif idZadania == Zadania["ls"] :
         args.append(self.model)
         self.strategia = ls()
     elif idZadania == Zadania["cd"] :
         args.append(self.model)
         args.append(Args)
         self.strategia = cd()
     elif idZadania == Zadania["historia"] :
         self.strategia=historia()
     elif idZadania == Zadania["Register"] :
         if self.model.gracz :
             self.strategia = ZlePolecenie()
         else :
             args.append(self)
             self.strategia = Register()
     if self.strategia != 0 :
         self.strategia.main(args)
Ejemplo n.º 32
0
def sign_up(temp_user_key):
    if request.method == 'GET':
        return render_template('regist.html')
    else:
        #get data from form
        serial = request.form['serial']
        email = request.form['email']
        location = request.form['location']
        reg = Register()
        #get user key from temp id
        userKey = reg.getUserKeyByTempID(temp_user_key)
        #regist user
        reg.insertUserData(userKey, serial, email, location)
        #delete temp information
        reg.deleteTempID(temp_user_key)
        # push mobile to notify update user
        reg.insertUserRequest(userKey, "UPDATE")
        return render_template("regist_success.html"), 200
 def open_register(self):
     RG = Register.main()
Ejemplo n.º 34
0
import Register

Register.checkAvail('serenachan')
Ejemplo n.º 35
0
if __name__ == "__main__":
    argParser = argparse.ArgumentParser(description="Calibrate, register, and stack astrophotography images")
    argParser.add_argument("images", nargs='+', metavar="image", help="Input images to stack")
    argParser.add_argument("--reference", nargs='?', metavar="image", help="Reference image (not included in stack)")
    argParser.add_argument("--out", nargs='?', metavar="filename", help="Output file (mean)")
    argParser.add_argument("--outstdev", nargs='?', metavar="filename", help="Output file (stdev)")
    argParser.add_argument("--dump_dir", nargs='?', metavar="directory", help="Output directory for image dumps")
    argParser.add_argument("--dump_format", nargs='?', metavar="extension", help="Output format for image dumps")
    argParser.add_argument("--dump_stars", action="store_true", help="Dump found stars to an image")
    argParser.add_argument("--dump_flat", action="store_true", help="Dump flattened image (which is what the star finder uses)")
    argSuccess = True
    try:
        args = argParser.parse_args()
    except (Exception, SystemExit):
        argSuccess = False
    
    if argSuccess:
        ImageIo.initConfig(args.dump_dir, args.dump_format)
        Register.initConfig(args.dump_stars, args.dump_flat)
    
        list = ImageIo.loadImageGlob(args.images)
        reference = None
        if args.reference is not None:
            reference = ImageIo.loadImage(args.reference)
        reg = Register.register(reference, list)
        stack, stackDev = Stack.stack(reg)
        if args.out is not None:
            ImageIo.saveImage(stack, args.out)
        if args.outstdev is not None:
            ImageIo.saveImage(stackDev, args.outstdev)
Ejemplo n.º 36
0
class Kontroler:
    def __init__(self, nowyWidok = 0, nowyModel = 0) :
        self.widok = nowyWidok
        self.model = nowyModel
        self.strategia = 0


    def dodajWidok(self, nowyWidok) :
        if self.widok == 0 :
            self.widok = nowyWidok


    def dodajModel(self, nowyModel) :
        if self.model == 0 :
            self.model = nowyModel


    def glownaPetla(self) :
        while True :
            self.widok.obslugaKonsoli()
        

    def aktualizacja(self, idZadania, Args=None): # analizuje dzialania usera i zleca wykonanie odpowiednich dzialan
        args = []   # umieszczone tu zmienne wyladuja w argumentach metody main w zadaniu	
       
        if idZadania == Zadania["ZlePolecenie"] :
            self.strategia = ZlePolecenie()
        elif idZadania == Zadania["Login"] :
            if self.model.gracz :
                self.strategia = ZlePolecenie()
            else :
                args.append(self.model)
                args.append(self.widok)
                if Args :
                    args.append(Args[0]) #nick
                    args.append(Args[1]) #haslo
                self.strategia = login()
        elif idZadania == Zadania["exit"] :
            args.append(self.widok.czyscEkran)
            self.strategia = exit()
        elif idZadania == Zadania["Menu"] :
            args.append(self)
            self.strategia = Menu()
        elif idZadania == Zadania["help"] :
            self.strategia = help()
        elif idZadania == Zadania["ls"] :
            args.append(self.model)
            self.strategia = ls()
        elif idZadania == Zadania["cd"] :
            args.append(self.model)
            args.append(Args)
            self.strategia = cd()
        elif idZadania == Zadania["historia"] :
            self.strategia=historia()
        elif idZadania == Zadania["Register"] :
            if self.model.gracz :
                self.strategia = ZlePolecenie()
            else :
                args.append(self)
                self.strategia = Register()
        if self.strategia != 0 :
            self.strategia.main(args)