Monthly Archives: November 2011

reverse ssh tunnel

I would like ssh access to a protected host that is not directly accessible on the Internet but does have outbound access. This is a common scenario in corporate networks that often require a vpn for remote access; but in … Continue reading

Posted in shell tips, ssh | Leave a comment

ssh agent across multiple hosts

I would like secure single-sign-in across multiple hosts. An easy way to do this is with ssh-agent, however, ssh-agent is a bit limited. For example, the normal use of ssh-agent looks like this, $ ssh-agent SSH_AUTH_SOCK=/tmp/ssh-stSwW11394/agent.11394; export SSH_AUTH_SOCK; SSH_AGENT_PID=11395; export … Continue reading

Posted in shell tips, ssh | Leave a comment

python, finding recurring pairs of data

I would like to find all pairs of data that appear together at least 10 times. For example, given a large input file of keywords: >>> foo, bar, spam, eggs, durian, stinky tofu, ... >>> fruit, meat, vinegar, sphere, foo, … Continue reading

Posted in python | Leave a comment

python, analyzing csv files, part 2

Previously, we discussed analyzing CSV files, parsing the csv into a native python object that supports iteration while providing easy access to the data (such as a sum by column header). For very large files this can be cumbersome, especially … Continue reading

Posted in data arch., python, software arch. | Leave a comment

python, analyzing csv files, part 1

I would like to analyze a collection of CSV (comma-separated-values) files in python. Ideally, I would like to treat the csv data as a native python object. For example, >>> financial_detail = Report('financial-detail.csv') >>> transactions = {} >>> for row … Continue reading

Posted in data arch., python, software arch. | Leave a comment