python的简单反应式扩展(rx)

rexpython的Python项目详细描述


====
rexpython
==


这是python实现的反应式扩展(rx),尽可能模仿rxjava2 api。
这是linq-free btw。目标是让它可以在运行中进行黑客攻击。

https://github.com/chexov/rexpython



installation
===
pip installrexpython

==
用法
=
=
将rexpython导入为rx

def on_subscribe(emitter):
emitter.setDisposable(actionDisposable(lambda:sys.stdout.write(“disposed”))

print(“subscribed”)
for i in xrange(1,3):
emitter.onnext(i)
time.sleep(1)

2))
mat_img=frames.map(featureextractor.featureextractor.preprocess_image)
vect=mat_img.map(lambda img:fe.get_activations([img])
words=vect.map(lambda vec:d.getwordsforbatch(vec,40))\
.flatmap(lambda wlist:rx.observate.from(wlist))
words=words.doonnext(lambda w:log.info(“words=%s%w)).doonerr(lambda err:log.error(“errrorr%s=”err))
value=words.tolist().blockingget()

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Java:不解析XML的简单XML。例外   KIE Workbench的java自定义UI   java将元素从bucket移动到LinkedList,但有一个元素被完全删除   如何将java stream collect转换为scala   java运行AsynkTask多次不工作   java组织。xml。萨克斯。SAXParseException:cvccomplextype。2.4.c:匹配的通配符是严格的   java是一种计算排序算法所需时间的合适方法   java在O(logn)时间内对排序整数数组中具有相同数字的数字进行计数   xpages从当前数据库javaAgent调用另一个数据库的javaAgent   java如何在instagram中上传特定位置的所有照片   JavaApachePOI可以有效地删除多个列   java创建的对象数   java我可以在关闭连接时关闭Oracle JDBC自动提交吗?