Scientific Evocation

技术

A 43-post collection

Consul笔记

Consul [https://github.com/hashicorp/consul] 是HashiCorp出品的开源服务发现工具。也有人用etcd或者ZooKeeper做类似的事情,它们之间的区别可以看官方文档的对比Consul vs. ZooKeeper, doozer ... »

Windfarer at | 技术 |

在Python中捕获代码的输出

在跑python脚本时,你想捕获某段代码的输出并塞进字符串里,可以进行如下骚操作 def myfunc(): print("hahaha") raise ValueError('123') import io import sys import traceba ... »

Windfarer at | 技术 |

Lisp解释器终于写完了

记录完成mal项目实现Lisp解释器的踩坑过程,主要参照之前翻译的mal指南 [https://github.com/Windfarer/mal-zh] ,边做边修改之前翻译得不清楚的地方。 我的实现https://github.com/Windfarer/lisp-inter ... »

Windfarer at | 技术 |

pipenv笔记

最近开始写一个新项(lun)目(zi),正好尝试新一代python包/虚拟环境管理工具pipenv [https://github.com/pypa/pipenv],这个工具也是那个逆袭的帅哥程序员Kenneth Reitz写的(即Requests以及一系列优质的python库的 ... »

Windfarer at | 技术 |

Python的Ellipsis对象

近来由于某些无聊原因在研读Python的文档,发现一个适合装逼好玩的东西。 Ellipsis对象。 在Python 3中你可以直接写...来得到这玩意。 >>> ... Ellipsis >>> type(...) >>> 而在2中没有...这个语法,只能直接写Ell ... »

Windfarer at | 技术 |