def __init__(self, inputs=None, outputs=None, model=None, sim=None, name=None): self.model = model self.sim = sim self.outputs = outputs self.name = name self.results = Results() deque.__init__(self)
def __init__(self, qname): deque.__init__(self) self.qname = qname self.openLog() self.initialBytes = self.__replayTransactions()
def __init__(self, app, org=None, maxlen=20): """ :param app: Application name :type app: str :param org: Organisation name (default: ``None``) :type org: str :param maxlen: Maxium number of paths to remember :type maxlen: int :return: Iterable collection of MRU paths """ self.app = app self.org = org #: Full path of file for saving MRU paths self.file_path = os.path.join(appdirs.user_config_dir(app, org), self.FILE_NAME) try: os.makedirs(os.path.dirname(self.file_path)) # create folder in advance except OSError: if not os.path.isdir(os.path.dirname(self.file_path)): raise try: # Load paths from file if possible with open(self.file_path, 'r', encoding='utf-8') as f: data = [line.rstrip('\n') for line in f] except OSError: data = [] deque.__init__(self, data, maxlen=maxlen)
def __init__(self, name='trajectory', frame=[], reference=None, as_copy=True): self.name = name if isinstance(frame, list) and \ all([isinstance(F, Transformation) for F in frame]): if not all([F.reference == frame[0].reference for F in frame]): raise Exception("Invalid arguments: Frames must all have the same reference") if reference is not None: if len(frame) > 0 and frame[0].reference != reference: raise Exception("Invalid arguments: Frames references must equal reference argument") else: if len(frame) > 0: reference = frame[0].reference if as_copy: deque.__init__(self, copy.deepcopy(frame)) if reference is None: self._reference = None else: self._reference = copy.deepcopy(reference) else: deque.__init__(self, frame) if reference is None: self._reference = None else: self._reference = reference for F in self: F.reference = self._reference else: raise Exception("Invalid argument: " + str(frame) + "\n" + \ "Valid types: list of rigid.Transformation")
def __init__(self, iterable, allowedTypes=None): types = allowedTypes if isinstance(allowedTypes, tuple) else (allowedTypes, ) for item in types: if not isinstance(item, type): raise TypeError("%s is not a type" % repr(item)) deque.__init__(self, iterable)
def __init__(self): deque.__init__(self) self.currentTime = 0 self.nextAvailable = 0 self.lastPlane = Aircraft('nil', 0, 0, 0, 0) self.totalFuelBurned = 0 self.totalDelayCost = 0
def __init__(self, iterable=[], maxlen=None, buffersize=timedelta(seconds=5)): self.counts = Counter() self.buffersize = buffersize try: deque.__init__(self, iterable, maxlen) except TypeError: deque.__init__(self, iterable)
def __init__(self, maxdepth=None): if maxdepth: self.maxdepth = maxdepth else: self.maxdepth = self.default_maxdepth deque.__init__(self)
def __init__(self): deque.__init__(self) self.pointer = 0 # dir = os.path.expanduser('~') dir = os.getcwd() fileName = "pschem.history" self.filePath = os.path.join(dir, fileName) self.restore()
def __init__( self, mode=None, file_format='json', home_dir='.', maxlen=None, *args, **kwds ): deque.__init__(self, *args, **kwds) self.mode = mode # None or an octal triple like 0644 self.file_format = file_format # 'csv', 'json', or 'pickle' self.home_dir = home_dir
def __init__(self, word, alphabet=ABC): deque.__init__(self) if isinstance(word, str): for char in word: self.append(alphabet(char)) else: self.extend(word) self.letters = set(map(abs, self)) self.alphabet = alphabet self.cancel()
def __init__(self, arg=None): if arg: deque.__init__(self, arg) return for color in Card.colors: if color==TAROKK: for tarock in Card.tarocks: self.append(Card(tarock)) else: for figure in Card.figures: self.append(Card(figure, color))
def __init__(self, executor, maxdepth=None): self.executor = executor self.refstack = executor.refstack if maxdepth: self.maxdepth = maxdepth else: self.maxdepth = self.default_maxdepth self.counter = 0 deque.__init__(self)
def __init__(self, arg=None): if arg: deque.__init__(self, arg) return for color in Card.colors: if color == TAROKK: for tarock in Card.tarocks: self.append(Card(tarock)) else: for figure in Card.figures: self.append(Card(figure, color))
def __init__(self, mode=None, file_format='json', home_dir='.', maxlen=None, *args, **kwds): deque.__init__(self, *args, **kwds) self.mode = mode # None or an octal triple like 0644 self.file_format = file_format # 'csv', 'json', or 'pickle' self.home_dir = home_dir
def __init__(self, exception, rolledback): deque.__init__(self) tbexc = traceback.TracebackException.from_exception(exception) self.on_eval_flag = False mxdir = os.path.dirname(modelx.__file__) for frame in tbexc.stack: if mxdir in frame.filename and frame.name == "on_eval_formula": self.on_eval_flag = True elif not mxdir in frame.filename and self.on_eval_flag: node = rolledback.pop() self.append((node, frame.lineno)) self.on_eval_flag = False while rolledback: node = rolledback.pop() self.append((node, 0))
def __init__(self): deque.__init__(self) self.mins = deque()
def __init__(self, max_size=20000): deque.__init__(self) self.max_size = max_size
def __init__(self, size_max): deque.__init__(self) self.size_max = size_max
def __init__(self, capacity): deque.__init__(self) assert capacity > 0 self.capacity = capacity self.lastTimer= 999;
def __init__(self, limit=10, iterable=[]): self._limit = limit deque.__init__(self, iterable)
def __init__(self, iterable=[], maxlen=None): _deque.__init__(self, iterable, maxlen) self._maxlen = maxlen
def __init__(self, size=1024): deque.__init__(self, maxlen=size) self._size = size
def __init__(self): deque.__init__(self)
def __init__(self, limit, outfp): deque.__init__(self) self.outfp = outfp self.limit = limit
def __init__(self,alist=[]): deque.__init__(self,alist)
def __init__(self, initial_iterable=[], attributes={}, max_length=10, naked_type='XQueue'): deque.__init__(self, initial_iterable, max_length) NakedObject.__init__(self, attributes, naked_type)
def __init__(self, *args, **keywords): deque.__init__(self, *args, **keywords) self.limit = 5
def __init__(self, size=SECONDS): self.size = size deque.__init__(self)
def __init__(self, response, parent): super(ApiResultList, self).__init__(response, parent) deque.__init__(self, self._make_list(response))
def __init__(self, size): deque.__init__(self) self.size = size self.offset = 0
def __init__(self, size): deque.__init__(self) self.size = size print("## RingBuffer created ##")
def __init__(self, owner, type): self.owner = owner self.type = type deque.__init__(self)
def __init__(self): deque.__init__(self, maxlen=1048576)
def __init__(self, size): deque.__init__(self) self.size = size
def __init__(self, *args): deque.__init__(self, args, maxlen=64)
def __init__(self,HISTSIZE=500): self.HISTSIZE = HISTSIZE deque.__init__(self, maxlen=HISTSIZE)
def __init__(self): deque.__init__(self, [], self.WINDOW)
def __init__( self, iterable, allowedTypes = None ): types = allowedTypes if isinstance( allowedTypes, tuple ) else ( allowedTypes, ) for item in types: if not isinstance( item, type ): raise TypeError("%s is not a type" % repr(item) ) deque.__init__( self, iterable )
def __init__(self, maxlen): deque.__init__(self, maxlen=maxlen)
def __init__(self, iterable=[]): self.__size_sema = Semaphore(len(iterable)) deque.__init__(self, iterable)
def __init__(self, maxlen=10): self._maxlen = maxlen deque.__init__(self)
def __init__(self, maxlen): deque.__init__(self) self._maxlen = maxlen
def __init__(self, newarg=1): deque.__init__(self)
def __init__(self,length = 0,posi = ar([0,0]) , direc = ar([0,1])): deque.__init__(self) self.ini_snake(length,posi,direc)
def __init__(self): deque.__init__(self) self._log = logging.getLogger('sent.q')