Algorithmic Trip Planning (Part 2)

My next trip is an adventure to the Middle East, prompted by a fare drop by Turkish Airlines. San Francisco to Istanbul via Turkish is a new route and fares were quite good relative to historical data (along with other … Continued

Python constants to arguments

A quick snippet to convert any primitive type constant in a Python main module to program arguments. E.g., if I have main.py with FEATURE_SELECTION = True NUMBER_OF_ROWS = 100   def main(): # rest of program and I want to … Continued

Algorithmic trip planning

I write this in Singapore, city number three in a ten city voyage obtained via brute force enumeration of route permutations for a set of cities I desired to visit in Southeast Asia. I ended up purchasing 11 one-way tickets, … Continued

Foo/bar decreases readability

I think using foo or bar in code snippets is detrimental when visually parsing the code–especially when the syntax is unfamiliar. For example, I was browsing through some php code samples to find this: foreach ($bar as $foo) { // … Continued

MATLAB image rotate without black bars

MATLAB fills the empty region of rotated images with solid black (i.e. zero padding). This is rather problematic for various computer vision algorithms (e.g. fusion, registration, similarity). Unfortunately, this is not a parameter in the imrotate command. The following addresses … Continued

Miscellaneous useful Bash/shell commands

I’ve been cataloging various shell commands and scripts that have been quite useful for various Linux (and even Windows via cygwin/git-shell) activities. The ones I list here are either not found via Google search or required a bit of hackery to … Continued

Latex IEEE bibliography error

The IEEE Latex format is a nightmare to work with. Nothing new there. One problem I had was using the IEEE template with bibliography that had worked for other conference styles. Now all I get is a cryptic error: Latex: … Continued