Exemple #1
0
 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)
Exemple #2
0
 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)
Exemple #3
0
 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)
Exemple #4
0
    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)
Exemple #5
0
 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)