python hadoop code snippets