def __init__(self): Command.__init__(self, { "encrypt": self.__encrypt, "decrypt": self.__decrypt }) self.cipher = VigenereCipher()
def __init__(self, tk_root): ''' (DateAsker, Tk) -> None Initialize the DateAsker; asks user for a date they would like to upload for ''' # Initialize an output queue and status Command.__init__(self) # What we want to do is to make a top level so that we can pop up self._toplevel = Toplevel(tk_root) todays_year = int(datetime.datetime.today().strftime('%Y')) todays_month = int(datetime.datetime.today().strftime('%m')) # what we would like to do now is to set a default month and year default_year = str(todays_year) default_month = self.MONTHS[todays_month] # and we want a dropdown, so we make a couple string vars self._default_year = StringVar() self._default_month = StringVar() self._default_year.set(default_year) self._default_month.set(default_month) # now we want to generate a range for dropdown values self._dropdown_year = [i for i in range(todays_year, 1950, -1)] self._dropdown_month = list(self.MONTHS.values()) # create defaults prior to submit self._submit_flag = False self._submit_month = '' self._submit_year = '' # now run selection self._run_selection()
def __init__(self): tree=[] #this command needs two levels, base and a yes/no base=Node(['weather','forecast'],self.base) affirmFull=Node(['yes','ok'],self.affirmFull) daffirmFull=Node(['no'],self.daffirmFull) tree=[[base],[affirmFull,daffirmFull]] Command.__init__(self,tree)
def __init__(self, address, command, identity_file=None, login_name=None, callback=None, pty=False): self.address = address self.command = command self.callback = callback argv = self.argv(identity_file, login_name, pty, address, command) Command.__init__(self, argv, pty=pty, setpgrp=True)
def __init__(self): Command.__init__(self) self.commands_function["-db"] = self.dataBase self.commands_function["-database"] = self.dataBase self.commands_function["-s"] = self.server self.commands_function["-server"] = self.server self.commands_function["-l"] = self.local self.commands_function["-local"] = self.local
def __init__(self): Command.__init__(self, { "encrypt": self.__encrypt, "decrypt": self.__decrypt, "brute_force": self.__brute_force }) self.cipher = CaesarCipher()
def __init__(self, address, command): opts = ('StrictHostKeyChecking=no', 'PasswordAuthentication=no') argv = ['ssh', '-t'] for opt in opts: argv += ["-o", opt] argv += [address, command] Command.__init__(self, argv, setpgrp=True)
def __init__(self, index, zoneType, owner): """ Initialize the Buy Card Command """ self.owner = owner self.cardFinder = IndexInZone(index, zoneType) Command.__init__(self, [ CurrentPlayer(), NoRequest(), self.cardFinder, EnoughPower(self.cardFinder) ])
def __init__(self, df): ''' (DuplicateRowChecker, DataFrame) -> None Initializes a DuplicateRowChecker. ''' Command.__init__(self) # set our dataframe self._df = df
def __init__(self, server, enable=True): Command.__init__(self) self.dirty = True self.enable = enable self.server = server self.projects = list() self.ssh = FileUtils.find_execute('ssh')
def __init__(self): Command.__init__(self) self.lock_rx_car_state = threading.Lock() self.car_state_data = CarState() self.Subscriber("car_state", CarState, self.rx_car_state) self.car_scanner_successful = False param = AreaParam() self.pose_in_map = param.pose_in_map
def __init__(self, *args, **kwargs): Command.__init__(self, *args, **kwargs) # read joke files self.jokes = {} for filename in glob('witze/*'): with open(filename) as f: self.jokes[basename(filename)] = f.read().splitlines() self.jokes[''] = sum(self.jokes.values(), [])
def __init__(self, template_name): ''' (UploadingCommand, str) -> None Initializes an uploading command, and injects a specific template name to the uploading command ''' Command.__init__(self) self._template_name = template_name
def __init__(self): Command.__init__(self, self.__generate) self.wine = "wine" self.mklnk = "".join([os.getcwd(), "/bin/mklnk.exe"]) self.uac_bypass_src = "".join([os.getcwd(), "/vbs/uac_bypass.vbs"]) self.workspace = "/tmp/lnk2pwn/" self.default_lnk_file = "lnk2pwn.lnk" self.window_styles = ("NORMAL", "MAXIMIZED", "MINIMIZED")
def __init__(self, name, explanation): """ Initializes quit command. @param name: The name of the command. @param explanation: Explanation of the Command. """ #Call parent's init method Command.__init__(self, name, explanation)
def __init__(self, name, explanation, commandWords): """ Initializes new help command. @param commandWords: CommandWords used in game. """ #Call parent's init method Command.__init__(self, name, explanation) self._commandWords = commandWords
def __init__(self): Command.__init__(self) self.commands_function["-f"] = self.uploadFile self.commands_function["-file"] = self.uploadFile self.commands_function["-e"] = self.eraseDefault self.commands_function["-erase"] = self.eraseDefault self.commands_function["-ef"] = self.eraseUploadFile self.commands_function["-erasefile"] = self.eraseUploadFile self.commands_function["-h"] = self.help self.commands_function["-help"] = self.help
def __init__(self, address, command): opts = ('StrictHostKeyChecking=no', 'PasswordAuthentication=no') argv = ['ssh', '-t'] for opt in opts: argv += [ "-o", opt ] argv += [ address, command ] Command.__init__(self, argv, setpgrp=True)
def __init__(self): Command.__init__(self) self.commands_function["-f"] = self.initForce self.commands_function["-force"] = self.initForce self.commands_function["-e"] = self.erase self.commands_function["-erase"] = self.erase self.commands_function["-c"] = self.clone self.commands_function["-clone"] = self.clone self.commands_function["-h"] = self.help self.commands_function["-help"] = self.help
def __init__(self, df, template_handler): ''' (Screener, DataFrame, TemplateHandler) -> None Initializes a Screener ''' Command.__init__(self) # copy the dataframe (in the event of mutation) self._df = df[:] self._th = template_handler
def __init__(self): Command.__init__( self, { "encrypt": self.__encrypt, "enc_hex": self.__enc_hex, "decrypt": self.__decrypt, "dec_hex": self.__decrypt_hex }) self.cipher = VernamCipher()
def __init__(self, name, explanation, player): """ Initializes new check inventory command. @param name: Command name. @param explanation: Explanation of command. @param player: The player object """ #Call parent's init method Command.__init__(self, name, explanation) self._player = player
def __init__(self, name, explanation, player): """ Initializes new north command. @param name: Command's name. @param explanation: Description of what command does. @param player: Reference to command. """ #Call parent's init method Command.__init__(self, name, explanation) self._player = player
def __init__(self, name, explanation, player): """ Initializes new describe command. @param name: The name of player. @param explanation: Explanation of player. @param player: The player object. """ #Call parent's init method Command.__init__(self, name, explanation) self._player = player
def __init__(self, name, explanation, player): """ Initializes new pick up command. @param name: Command name. @param explanation: Explanation of command. @param player: The player object. """ #Call parent's init method Command.__init__(self, name, explanation) self._player = player
def __init__(self, name, explanation, player): """ Initializes east command. @param name: Command's name. @param explanation: Description of what command does. @param player: Reference to command. """ #Call parent's init method Command.__init__(self, name, explanation, time = True) self._player = player
def __init__(self): Command.__init__(self) self.commands_function["-mkdir"] = self.makeDirectory self.commands_function["-makedir"] = self.makeDirectory self.commands_function["-ls"] = self.listDirectory self.commands_function["-list"] = self.listDirectory self.commands_function["-e"] = self.erase self.commands_function["-erase"] = self.erase self.commands_function["-ef"] = self.eraseFolder self.commands_function["-erasefolder"] = self.eraseFolder self.commands_function["-h"] = self.help self.commands_function["-help"] = self.help
def __init__(self): base1 = Node( ['set reminder'], self.remind1) base2 = Node( ['remind me'], self.remind2) message = Node( ['set message to'], self.setMessage) time = Node( ['set time to'], self.setTime) affirmTime = Node( ['yes'], self.affirmTime) daffirmTime = Node( ['no'], self.daffirmTime) affirmMessage = Node( ['yes'], self.affirmMessage) daffirmMessage = Node( ['no'], self.daffirmMessage) yesText = Node( ['yes'], self.yesText) noText = Node( ['no'], self.noText) tree = [[ base1,base2 ],[message,time],[affirmMessage,daffirmMessage,affirmTime,daffirmTime],[yesText,noText]] Command.__init__(self,tree)
def __init__(self): Command.__init__(self) self.commands_function["-u"] = self.setUser self.commands_function["-user"] = self.setUser self.commands_function["-s"] = self.setServer self.commands_function["-server"] = self.setServer self.commands_function["-p"] = self.setPort self.commands_function["-port"] = self.setPort self.commands_function["-ps"] = self.setPassword self.commands_function["-password"] = self.setPassword self.commands_function["-uf"] = self.setUploadFolder self.commands_function["-uploadfolder"] = self.setUploadFolder self.commands_function["-df"] = self.setDownloadFolder self.commands_function["-downloadfolder"] = self.setDownloadFolder self.commands_function["-timeout"] = self.setTimeOut self.commands_function["-h"] = self.help self.commands_function["-help"] = self.help self.commands_function["-w"] = self.welcome self.commands_function["-welcome"] = self.welcome self.commands_function["-i"] = self.info self.commands_function["-info"] = self.info
def __init__(self, obj): Command.__init__(self) self.return_value = {"status": "running"} self.return_value["result"] = 0 self.return_value["id"] = self.id try: if "script" in obj: stdout_backup = sys.stdout new_stdout = StringIO.StringIO() sys.stdout = new_stdout exec(obj["script"]) sys.stdout = stdout_backup self.return_value["output"] = new_stdout.getvalue().split('\n') new_stdout.close() self.return_value["status"] = "complete" except Exception as e: self.return_value["status"] = "error" self.return_value["output"] = [e.message]
def __init__(self, arch, freq): Command.__init__(self, arch, freq)
def __init__(self, *args, **kws): Command.__init__(self, *args, **kws) self.repo = FileUtils.find_execute('repo')
def __init__(self, game): """ Initialize the Command """ self.game = game Command.__init__(self, [CurrentPlayer(), NoRequest()])
def __init__(self): tree = [[ Node( ['thank you','thanks'], self.thanks) ]] Command.__init__(self,tree)
def __init__(self, flow, cmd_name, params): Command.__init__(self, flow, cmd_name, params)
def __init__(self): Command.__init__(self) self.commands = []
def __init__ (self, parser): """ parser - экземпляр парсера """ Command.__init__ (self, parser)
def __init__(self): tree = [[ Node( ['goodnight','sleep','go to bed'], self.goodnight) ]] Command.__init__(self,tree)
def __init__ (self, parser): Command.__init__ (self, parser)
def __init__(self): tree = [[Node(["remove alarm"], self.removeAlarms)]] Command.__init__(self, tree)
def __init__(self): Command.__init__(self)
def __init__(self, task, log=None): Command.__init__(self, task, log=log) self._task = task self._log = log self.setPath('/home/ishikura/Nagara/app/bin/marvin') self.__input_fmts = {}
def __init__(self): tree = [[ Node(['adjust volume'], self.ask) ],[ Node(['percent volume'],self.adjust) ]] Command.__init__(self,tree)
def __init__(self, ifName, newValue): Command.__init__(self) self.ifName = ifName self.newValue = newValue self.oldValue = str(self.ifc.getAddr(ifName))
def __init__(self, index, owner): """ Initialize the Play Card Command """ self.owner = owner self.cardFinder = IndexInZone(index, HAND) Command.__init__(self, [CurrentPlayer(), NoRequest(), self.cardFinder])
def __init__(self): tree=[[ Node( ['list alarms'], self.listAlarms) ]] Command.__init__(self,tree)
def __init__(self, arch, freq, volume): Command.__init__(self, arch, freq) self.volume = volume
def __init__(self): Command.__init__(self) self.door_cmd_pub = self.Publisher('door_cmd', DoorCmd, queue_size=10)
def __init__(self, arch, freq, interface): Command.__init__(self, arch, freq) self.interface = interface