Monthly Archives: April 2013

Running unit tests in Python

Install nose: sudo easy_install nose or: sudo pip install nose By default nose finds all directories and files that match the following regular expression: (?:^|[b_./-])[Tt]est [NOSE_TESTMATCH] I usually create a file and place my unit tests there as regular … Continue reading

Posted in Productivity, Programming, Python, UNIX/Linux | Leave a comment

Great unix one liner to join two tables keys in the first columns

Suppose file column_ids.csv contains the first column with some IDs. You have a table big_table.csv with the first column also containing IDs. We can join the two files in unix shell: -t option specifies a delimiter. Both files must be … Continue reading

Posted in Bash, Productivity, Programming, UNIX/Linux | Leave a comment

Add a new host to known_hosts

This is from serverfault: ssh-keygen -R [hostname] ssh-keygen -R [ip_address] ssh-keygen -R [hostname],[ip_address] ssh-keyscan -H [hostname],[ip_address] >> ~/.ssh/known_hosts ssh-keyscan -H [ip_address] >> ~/.ssh/known_hosts ssh-keyscan -H [hostname] >> ~/.ssh/known_hosts

Posted in EC2, Programming, Uncategorized, UNIX/Linux | Leave a comment

Python things

How to remove a package using easy_install? sudo easy_install -m [package_name] How to start ipython notebook with interactive pylab capabilities? ipython notebook –pylab inline

Posted in Programming, Python, Uncategorized, UNIX/Linux, visualization | Leave a comment