Part 4: Python Tricks learned this week
Been a long time since I’ve update the blog. I have been recently working on an Information Retrieval project. Along the way learned a few tricks
- Using python’s abc module to create abstract base classes and methods
- Using click module for writing better command line scripts
- Using lxml’s iterparse method for speeding up parsing of a large XML file
- Using os.linesep for writing to file the correct way
- Using json.dump’s indent method to pretty print JSON on terminal
- Using joblib’s Memory decorator to memorize/cache partial results
- Using blessings and terminaltable for pretty printing onto terminal
Good learning this week!