def cb(self): while True: L, self.buffer = self.buffer.array(), ndeque.Ndeque( elements=self.elements) self.last = self.emit(L) yield self.last yield gen.sleep(self.interval)
def cb(self): #pdb.set_trace() while True: L, self.buffer = self.buffer.dataframe(), ndeque.Ndeque( elements=self.elements) self.last = self.emit(L) yield self.last yield gen.sleep(self.interval)
def __init__(self, n, e, child, headings, **kwargs): self.n = n self.e = e self.headings = headings #self.buffer = deque(maxlen=n) self.buffer = ndeque.Ndeque(maxlen=self.n, elements=self.e, headings=self.headings) Stream.__init__(self, child, **kwargs)
def __init__(self, interval, e, child, **kwargs): self.interval = interval self.elements = e #pdb.set_trace() self.buffer = ndeque.Ndeque(elements=self.elements) self.last = gen.moment Stream.__init__(self, child, ensure_io_loop=True, **kwargs) self.loop.add_callback(self.cb)
def __init__(self, n, e, child, **kwargs): self.n = n self.e = e #self.buffer = deque(maxlen=n) self.buffer = ndeque.Ndeque(maxlen=n, elements=e) Stream.__init__(self, child, **kwargs)