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应用程序不是在Eclipse中运行,而是在命令行中运行   swing Java图形组件问题。似乎找不到错误   我需要键盘。close();让代码正常工作?   Springboot中的java HttpSession   抽象语法树我想添加一个语句。我试图解析它,java解析器异常被抛出。如何克服它?   java Hibernate:清理会话   具有不连续子集的java划分问题   java正则表达式查找最后一个冒号后的字符串   java从SpringShell执行OS命令   Java扫描器字符串输入   java字符串索引越界异常(charAt)   java执行器服务终止被卡住   Springockito没有继承java@ContextConfiguration   java如何为一个servlet映射多个url   java安卓获取命令的stderr   java生成类型。表:数据库中的大数字   安卓 Getter Setter返回NothingJava