def __init__(self, env, id, config): Process.__init__(self, env, id) self.ballot_number = BallotNumber(0, self.id) self.active = False self.proposals = {} self.config = config self.env.addProc(self)
def __init__(self, args, desc, parent=None): if isinstance(args, basestring): command = '%s %s' % (self.program, args) else: command = (self.program,) + tuple(args) Process.__init__(self, command, self.title, desc, parent)
def __init__(self,context,id): Process.__init__(self,context,id) if 'config' in context: self.__config__ = context['config'] #display( OUTPUT_DEBUG, str(self.__config__) ) else: raise Exception('ExperimentProcess','no config found in context.') repeat = 0 runs = 0 if 'process' in self.__config__: if 'repeat' in self.__config__['process']: self.__repeat__ = int(self.__config__['process']['repeat']) else: raise Exception('ExperimentProcess','no repeats field found in process section of workfile') if 'runs' in self.__config__['process']: runs = int(self.__config__['process']['runs']) else: raise Exception('ExperimentProcess','no runs field found in process section of workfile') else: raise Exception('ExperimentProcess','no process section found in workfile') self.__first__ = False self.__parameters__ = int( runs / self.__repeat__ ) self.display( OUTPUT_MAJOR, '%s initialized for %d parameters totalling %d runs' % (self.__config__['process']['config'], self.__parameters__, runs) ) self.__queueAnalysis__()
def __init__(self, name , priority, message, numero): Process.__init__(self, name, 4, priority) self.message = message self.numero = numero self.timer = int(0.02* len(message))+1 # 0 no usa , 1 usa , 2 bloquea self.external = {'Pantalla': 0, 'Audifono': 1, 'Microfono': 0, 'GPS': 0, 'Enviar Info': 1, 'Recibir Info': 1}
def __init__(self, env, me): Process.__init__(self) self.ballot_number = None self.accepted = PValueSet() self.me = me self.env = env self.env.addProc(self)
def __init__(self, *args, **kwargs): Process.__init__(self) if (len(args) > 1 and not any(isinstance(arg, (TableExpression, list, tuple)) for arg in args)): args = (args,) self.args = args suffix = kwargs.pop('suffix', '') fname = kwargs.pop('fname', None) mode = kwargs.pop('mode', 'w') if kwargs: kwarg, _ = kwargs.popitem() raise TypeError("'%s' is an invalid keyword argument for csv()" % kwarg) if fname is not None and suffix: raise ValueError("csv() can't have both 'suffix' and 'fname' " "arguments") if fname is None: suffix = "_" + suffix if suffix else "" fname = "{entity}_{period}" + suffix + ".csv" self.fname = fname if mode not in ('w', 'a'): raise ValueError("csv() mode argument must be either " "'w' (overwrite) or 'a' (append)") self.mode = mode
def __init__(self, dataframe, expected_output_columns_list, extraColumns, outlier_settings): Process.__init__(self) self.dataframe = dataframe self.expected_output_columns_list = expected_output_columns_list self.extraColumns = extraColumns self.outlier_settings = outlier_settings self.setSummaryNo('05')
def __init__(self,context,pid): Process.__init__(self,context,pid) if 'config' in context: self._config = context['config'] #display( OUTPUT_DEBUG, str(self.__config__) ) else: raise Exception('RandomTestProcess','no config found in context.') self._start = time() self._tasktime = 1 self._nextid = 0 if 'process' in self._config: if 'tasktime' in self._config['process']: self._tasktime = float(self._config['process']['tasktime']) if 'period' in self._config['process']: self._period = float(self._config['process']['period']) if 'ctrltasktime' in self._config['process']: self._ctrltasktime = float(self._config['process']['ctrltasktime']) if 'maxtasks' in self._config['process']: self._maxtasks = int(self._config['process']['maxtasks']) self.__queueRandomTestTask__(10) self.determineState()
def __init__(self, args, desc, parent=None): if isinstance(args, basestring): command = '%s %s' % (self.program, args) else: command = (self.program, ) + tuple(args) Process.__init__(self, command, self.title, desc, parent)
def __init__(self,context,id): Process.__init__(self,context,id) if 'config' in context: self.__config__ = context['config'] else: raise Exception('WestGridStatusProcess','no config found in context.') if 'process' in self.__config__: if 'host' in self.__config__['process']: self.__host__ = self.__config__['process']['host'] else: raise Exception('WestGridProcess','required field [process]:host not found in workfile') if 'user' in self.__config__['process']: self.__user__ = self.__config__['process']['user'] else: self.__user__ = environ['USER'] if 'key' in self.__config__['process']: self.__key__ = self.__config__['process']['key'] else: if 0 == system( 'touch ~/.ssh/id_rsa &> /dev/null' ): self.__key__ = '~/.ssh/id_rsa' else: raise Exception('WestGridProcess','required field [process]:key="~/.ssh/id_rsa" not found in workfile') else: raise Exception('WestGridProcess','no process section found in workfile') self.__last_time__ = 0 self.__jobs__ = {} task = WG_DeployTask( self.id(), None, self.__config__ ) task.execute()
def __init__(self,name,priority,numero,duracion): Process.__init__(self,name,2,priority) self.numero = numero; self.hist = Historial() self.duracion = int(duracion) self.timer = int(duracion) # 0 no usa , 1 usa , 2 bloquea self.external = {'Pantalla': 1, 'Audifono': 2, 'Microfono': 2, 'GPS': 0, 'Enviar Info': 1, 'Recibir Info': 1}
def __init__(self, filename): Disassembler.__init__(self, filename) PAPA_ROP.__init__(self, filename) Format_String.__init__(self, filename) Process.__init__(self, filename) Misc.__init__(self, filename) context.log_level = 'INFO' context.delete_corefiles = True
def __init__(self, env, id, config): Process.__init__(self, env, id) self.slot_in = self.slot_out = 1 self.proposals = {} self.decisions = {} self.requests = [] self.config = config self.env.addProc(self)
def __init__(self,config,pid): Process.__init__(self,config,pid) self._interval = 300 self._last = time() - self._interval self._data = None self.display( OUTPUT_VERBOSE, 'status process activated' )
def __init__(self, env, me, leader, acceptors, ballot_number): Process.__init__(self) self.env = env self.me = me self.leader = leader self.acceptors = acceptors self.ballot_number = ballot_number self.env.addProc(self)
def __init__(self, *args, **kwargs): Process.__init__(self) self.args = args self.print_exprs = kwargs.pop('print_exprs', False) if kwargs: kwarg, _ = kwargs.popitem() raise TypeError("'%s' is an invalid keyword argument for show()" % kwarg)
def __init__(self): Process.__init__(self) self.block_render = True self.ticks = 0 self.page = 0 self.dest_page = 0 self.state = 0 # 0 = zoom out, 1 = control, 2 = zoom in, 3 = change page
def __init__(self, env, id, config): Process.__init__(self, env, id) self.ballot_number = BallotNumber(0, self.id) self.active = False self.proposals = {} self.timeout = 1.0 self.config = config self.env.addProc(self)
def __init__(self, outQueue, errQueue, proc_count=10, headers={}): self.outQueue = outQueue self.errQueue = errQueue self.headers = {} self.timeOut = 5 Process.__init__(self, proc_count)
def __init__(self, cont, data): Process.__init__(self, 'algo') self.cont = cont lines = self.cont.lines(data, 1) # circles = self.caracter(False, data) # Not sure if works self.lines = norm(lines) # circles = norm(circles) self.time = time.time()
def __init__(self,driver,projId,userCount='*****@*****.**',userPass='******'): ''' 根据项目的projId初始化,默认完成工序0的用户是管理员 :param projId: :param userCount: :param userPass: :return: ''' Process.__init__(self,driver=driver,projId=projId,tpltId=0,userCount=userCount,userPass=userPass)
def __init__(self, env, me, config): Process.__init__(self) self.active = False self.proposals = {} self.env = env self.me = me self.ballot_number = BallotNumber(0, self.me) self.config = config self.env.addProc(self)
def __init__(self, filename): Process.__init__(self, filename) context.log_level = 'CRITICAL' context.delete_corefiles = True self.elf = context.binary = ELF(filename) self.rop = ROP(self.elf) self.debug = True self.max_stack_arg = 1000
def __init__(self, env, id, leader, acceptors, replicas, ballot_number, slot_number, command): Process.__init__(self, env, id) self.leader = leader self.acceptors = acceptors self.replicas = replicas self.ballot_number = ballot_number self.slot_number = slot_number self.command = command self.env.addProc(self)
def __init__(self, env, id, config): Process.__init__(self, env, id) self.slot_in = self.slot_out = 1 self.accepted = 0 self.start_time = time.perf_counter() self.proposals = {} self.decisions = {} self.requests = [] self.config = config self.env.addProc(self)
def __init__(self,driver,projId,userCount='*****@*****.**',userPass='******'): ''' 根据projId初始化 :param driver: :param projId: :param userCount: :param userPass: :return: ''' Process.__init__(self,driver=driver,projId=projId,tpltId=11,userCount=userCount,userPass=userPass)
def __init__(self, driver, projId, userCount="*****@*****.**", userPass="******"): """ 根据projId初始化 :param driver: :param projId: :param userCount: :param userPass: :return: """ Process.__init__(self, driver=driver, projId=projId, tpltId=2, userCount=userCount, userPass=userPass)
def __init__(self,name,priority,numero): Process.__init__(self,name,1,priority) self.numero = numero; self.hist = Historial() if(numero == ""): self.printsOnce = True self.flag = True else: self.printsOnce = False self.flag = False
def __init__(self, path_to_bin=config.get('semantic_local', 'c&c'), min_timeout=3, *params): if len(params) == 0: params = ('--models', config.get('semantic_local', 'c&c_models'), '--candc-printer', 'boxer') self._min_timeout = min_timeout self._header_pattern = compile(r"""(.*\s)*:- discontiguous.*""") Process.__init__(self, path_to_bin, False, TIME_OUT, *params)
def __init__(self,name, priority, message, numero): Process.__init__(self, name, 3, priority) self.message = message self.numero = numero self.timer = int(0.02*len(message)) + 1 if (numero == ""): self.printOnce=True self.flag = True else: self.printOnce=False self.flag = False
def __init__(self, go, id, fetchInfoQ, outQ, config): """ Setup a go Event """ self.id = id debug = config.get("debug", None) Process.__init__(self, go, debug=debug) self.fetchInfoQ = fetchInfoQ self.outQ = outQ self.config = config self.hosts_in_flight = None
def __init__(self, env, id, config, total_requests, verbose): Process.__init__(self, env, id) self.slot_in = self.slot_out = 1 self.total_requests = total_requests self.difference = None self.num_performed = 0 self.verbose = verbose self.proposals = {} self.decisions = {} self.requests = [] self.config = config self.env.addProc(self)
def __init__(self, options): Process.__init__(self, "slave") self.options = options self.resources = Resources(options.cpus, options.mem) self.attributes = options.attributes self.id = None self.isolation = IsolationModule() self.info = self.getSlaveInfo() self.master = UPID('master', options.master) self.frameworks = {} self.startTime = time.time() self.connected = False
def __init__(self, executor): Process.__init__(self, 'executor') self.executor = executor env = os.environ self.local = bool(env.get('MESOS_LOCAL')) self.slave = UPID(env.get('MESOS_SLAVE_PID')) self.framework_id = FrameworkID() self.framework_id.value = env.get('MESOS_FRAMEWORK_ID') self.executor_id = ExecutorID() self.executor_id.value = env.get('MESOS_EXECUTOR_ID') self.workDirectory = env.get('MESOS_DIRECTORY') print 'created', self.slave
def __init__(self, outQueue, errQueue, proc_count=5): self.outQueue = outQueue self.errQueue = errQueue self.conf = {} self.conf['olx'] = { 'large' : (625, 625), 'medium': (180, 180), 'small' : ( 90, 90), } Process.__init__(self, proc_count)
def __init__(self,driver,projId,userCount='*****@*****.**',userPass='******'): ''' 根据项目的projId初始化,默认完成工序0的用户是管理员 :param projId: :param userCount: :param userPass: :return: ''' Process.__init__(self,driver=driver,projId=projId,tpltId=0,userCount=userCount,userPass=userPass) #http://test.zhaobiaosys.com/#/project?projId=12&tpltId=0 self.detail=[] self.success=False self.success=self.completeProZero()
def __init__(self,name,priority,numero): Process.__init__(self,name,1,priority) self.numero = numero; self.duracion = -1 self.hist = Historial() # 0 no usa , 1 usa , 2 bloquea self.external = {'Pantalla': 1, 'Audifono': 2, 'Microfono': 2, 'GPS': 0, 'Enviar Info': 1, 'Recibir Info': 1} if(numero == ""): self.printsOnce = True self.flag = True else: self.printsOnce = False self.flag = False
def __init__(self,name, priority, message, numero): Process.__init__(self, name, 3, priority) self.message = message self.numero = numero self.timer = int(0.02*len(message)) + 1 # 0 no usa , 1 usa , 2 bloquea self.external = {'Pantalla': 0, 'Audifono': 1, 'Microfono': 0, 'GPS': 0, 'Enviar Info': 1, 'Recibir Info': 1} if (numero == ""): self.printOnce=True self.flag = True else: self.printOnce=False self.flag = False
def __init__(self, executor): Process.__init__(self, 'executor') self.executor = executor env = os.environ self.local = bool(env.get('MESOS_LOCAL')) slave_pid = env.get('MESOS_SLAVE_PID') assert slave_pid, 'expecting MESOS_SLAVE_PID in environment' self.slave = UPID(slave_pid) self.framework_id = FrameworkID() self.framework_id.value = env.get('MESOS_FRAMEWORK_ID') self.executor_id = ExecutorID() self.executor_id.value = env.get('MESOS_EXECUTOR_ID') self.workDirectory = env.get('MESOS_DIRECTORY')
def __init__(self, sched, framework, master_uri): Process.__init__(self, 'scheduler') self.sched = sched #self.executor_info = executor_info self.master_uri = master_uri self.framework = framework self.framework.failover_timeout = 100 self.framework_id = framework.id self.master = None self.connected = False self.aborted = False self.savedOffers = {} self.savedSlavePids = {}
def __init__(self, env, id, config): Process.__init__(self, env, id) self.slot_in = self.slot_out = 1 self.proposals = {} self.decisions = {} self.requests = [] self.config = self.env.conf # Values needed to calculate TPS self.start_time = None self.to_perform = None self.performed = 0 self.env.addProc(self)
def __init__(self, sched, framework, master_uri): Process.__init__(self, 'scheduler') self.sched = sched #self.executor_info = executor_info self.master_uri = master_uri self.framework = framework self.framework.failover_timeout = 100 self.framework_id = framework.id self.master = None self.detector = None self.connected = False self.savedOffers = {} self.savedSlavePids = {}
def __init__(self, process_for_init, op_key): Process.__init__(self, process_for_init.get_command()) # The arguments for a process: self.args = process_for_init.get_args() # The working directory for a process: self.working_dir = process_for_init.get_working_dir() # The log file for a process: self.log_file = process_for_init.get_log_file() # The process STAF ID: self.id = process_for_init.get_id() # The process STAF handle: self.handle = process_for_init.get_handle() # The process port: self.port = process_for_init.get_port() # Use test sync lib: self.use_test_syn_lib = process_for_init.is_test_sync_lib_used() # The process operation key self.self_op_key = op_key
def __init__(self, inQ, outQ, debug=False, trace=False, in_flight=None, queue_wait_sleep=1): """ Sets up an inQ, outQ """ Process.__init__(self, go=None, debug=debug) self.inQ = inQ self.outQ = outQ self.trace = trace self.queue_wait_sleep = queue_wait_sleep self.in_flight = in_flight assert float(queue_wait_sleep) > 0 if in_flight is not None: assert hasattr(in_flight, 'value') assert hasattr(in_flight, 'acquire') assert hasattr(in_flight, 'release')
def __init__(self, go=None, debug=None, qlen=100, timewarn=60, timeout=None, queue_wait_sleep=0.5): """ Setup inQ and go Event """ Process.__init__(self, go, debug) self.qlen = qlen self.inQ = multiprocessing.Queue(self.qlen) self._yzers = [] self.in_flight = multiprocessing.Value('i', 0) self.total_processed = 0 self.timeout = timeout self.timewarn = timewarn self.queue_wait_sleep = queue_wait_sleep self.last_in_flight = 0 assert float(queue_wait_sleep) > 0
def __init__(self, tokenizer=None, ccg_parser=None, expand_predicates=True, path_to_bin=config.get('semantic_local', 'boxer'), *params): if len(params) == 0: params = ('--stdin', '--semantics', 'fol') Process.__init__(self, path_to_bin, True, TIME_OUT, *params) if tokenizer is None: tokenizer = TokenizerLocalAPI() if ccg_parser is None: ccg_parser = CandCLocalAPI() self.name = 'Boxer' self.ccg_parser = ccg_parser self.tokenizer = tokenizer self.expand_predicates = expand_predicates
def __init__(self, loadDataWorld): Process.__init__(self) # self.report = {} self.setSummaryNo('02') self.concat_list = [] self.datasetList = [loadDataWorld.import_file_name] #print('####### LOAD DW 02') self.concat_list.append( loadDataWorld.get_dataframe()) # start stacking datasets # print('count concat_list ', len(loadDataWorld.get_dataframe())) #print('A concat_list ', len(self.concat_list) , len(self.concat_list[len(self.concat_list)-1])) # self.report= {} # self.report['dataworld'] = {'beginCount': len(loadDataWorld.get_dataframe())} self.maps = { "commonNameMap": ConfigCommonNameMap(), "region_map": ConfigRegionMap() } #self.expected_output_columns_list = expected_output_columns_list self.expected_output_columns_list = ConfigOutputColumns
def __init__(self, pong): Process.__init__(self) self.pong = pong
def __init__(self, env, id): Process.__init__(self, env, id) self.ballot_number = None self.accepted = set() self.env.addProc(self)
def __init__(self, env, id): Process.__init__(self, env, id) self.env.addProc(self)
def __init__(self, df_source, expected_output_columns_list): Process.__init__(self) self.dataframe = df_source self.expected_output_columns_list = expected_output_columns_list
def __init__(self, env, id, leader, acceptors, ballot_number): Process.__init__(self, env, id) self.leader = leader self.acceptors = acceptors self.ballot_number = ballot_number self.env.addProc(self)
def __init__(self, import_file_name): Process.__init__(self) # import_file_name is full local file name or url to source self.import_file_name = import_file_name self.dataframe = None
def __init__(self): Process.__init__(self)