A Stream of Fibonacci numbers


In [ ]:
from streamz import Stream
source = Stream()

s = source.sliding_window(2).map(sum)
s.rate_limit(0.5).sink(source.emit)

L = s.sink_to_list()
s.sink(print)

In [ ]:
source.emit(0)
source.emit(1)

In [ ]:
L