Coroutine With Gevent

背景 工作中用到gevent。 gevent是一个基于libev的并发库。它为各种并发和网络相关的任务提供了整洁的API。 使用过程中,带着某些问

Python Yield Keyword

Yield keyword is an important feature in Python language, in order to understand coroutine in Python, we need to understand yield and generator first. However, this feature also makes the Python newbies like me confused a lot, as there’s no similar thing in Java or C language. So in this post, I’ll try to explain and conclude what the yield keyword does. In fact, the same question was posed on stackoverflow, which gains 5951 votes.

A Little Taste on React

I have some experience on Android development, and recently for some reason I want to try React Native. As the RN official tutorial said: So to understand the basic structure of a React Native app, you need to understand some of the basic React concepts, like JSX, components, state, and props. “Maybe I should listen to this guy’s suggestion”, I said to myself, so I spent a week to understand what is React and how to use it.

Simple Commit-Msg for Git Hook

Although I am the only contributor of my own Github project, I still want my commit message to be tidier. I wish all the commit messages will follow the pattern like: [Example]: This is an Example. [Exercise]: This ia an Exercise. [Problem]: A problem solved. [Other]: Maybe a merge commit. However, I usually remember to follow this pattern after the commit, that’s really disappointed. So I decided to write a simple hook to prevent this kind of Amnesia.

Basic Shell Commands

公司某个产品的测试环境比较复杂,它需要在 OpenStack 上创建3个节点,其中2个节点安装产品并实现高可用(HA),第3个节点(TestAgent节点)与产