pengtao's small python utils