原创 linux free 命令中的 buffer & free

Short answer: Cached is the size of the page cache. Buffers is the size of in-memory block I/O buffers. Cached matter

原创 ZooKeeper多種方式安裝

原文出處:http://www.linuxidc.com/Linux/2014-11/109591.htm linuxidc 出品的文章,一直這麼簡單易懂。贊! 1、單機模式安裝zookeeper 1.1、創建帳號zk [root

原创 Python的垃圾回收機制深入分析

無聊的五一,蛋疼的五一。看書吧! 轉載,原文鏈接:http://www.jb51.net/article/52229.htm 推薦閱讀:http://hbprotoss.github.io/posts/pythonla-ji-hui-sh

原创 Dead simple example of using Multiprocessing Queue, Pool and Locking

Q: I tried to read the documentation at http://docs.python.org/dev/library/multiprocessing.html but I'm still strugg

原创 Golang channels tutorial

原文鏈接:http://guzalexander.com/2013/12/06/golang-channels-tutorial.html golang channels 入門足矣 Golang has built-in instrum

原创 coverage.py的覆蓋率統計原理

原文出處:http://blog.theerrorlog.com/how-coverage-py-produce-coverage-statistics.html 在Erlang下,用rebar可以在運行單元測試的同時調用cover模塊

原创 channel in Go's runtime

原文鏈接:http://studygolang.com/articles/1806?from=timeline&isappinstalled=0 那張圖是我看明白channel 實現的關鍵 下面是我之前困惑的一段代碼, func main

原创 strategy pattern in Python

1.function based #!/usr/bin/env python import types def method_property(name): def getter(self): return g

原创 Prototype pattern (Python recipe)

原文鏈接:http://code.activestate.com/recipes/86651-prototype-pattern/ http://dongweiming.github.io/python-pototype.html fro

原创 Folder Structure for Single Page Applications

It makes me sad to see so many people still use old, archaic folder structure for their projects. It seems that while f

原创 difference between Python shallow copy and deep copy

A: Shallow copies duplicate as little as possible. A shallow copy of a collection is a copy of the collection structu

原创 zabbix mysql 遷移總結

之前的zabbix,item已經達到了27w,nvps達到了3.5K,高峯可以達到5K+,但是手裏還有200臺機器沒有添加,還有若干個模板沒有添加。面對如此情況,不得不對zabbix,做點啥了,zabbix的瓶頸在於mysql,首先的要點

原创 Class method differences in Python: bound, unbound and static

原文出處:http://stackoverflow.com/questions/114214/class-method-differences-in-python-bound-unbound-and-static What is th

原创 Python 總結

1.如何實現自己的iter 2.如何實現自己的range 3.如何實現一個dict 4.如何實現一個list 5.如何實現類似ruby的open clas 6.如何實現print的重定向 7.兩個list軟換成一個dict 8.tuple

原创 What Is the Difference Between a Block, a Proc, and a Lambda in Ruby

原文鏈接:http://awaxman11.github.io/blog/2013/08/05/what-is-the-difference-between-a-block/ 感覺寫的很清晰易懂,雖然不一定全面,但是我感覺還是蠻不錯的,轉