Luke Orland

polyglot programs

Doxygen 1.8.0, Markdown, and the OS X App

| Comments

Doxygen’s brand new support of Markdown has attracted my attention. I tried out the for OS X. Here are a couple of notes-to-self about this Doxywizard GUI.

  • Doxygen 1.8.0 newly supports the Markdown format. However, does not know to look for *.markdown or *.md source files. Those filename matching patterns must be added to the list in Expert -> Input -> FILE_PATTERNS.
  • It does not automatically load up the Doxyfile located in the specified base project directory. Use the Doxywizard menu to open or save the configuration.


| Comments

Here is a simple Python script that takes a list of files and prints their combined size in bytes (by default) or megabytes (by specifying the –mb switch). Code is below.

Transcontinental Dance Collective

| Comments

Two of my incredibly talented dancer friends embarked on a mission to travel the world learning and teaching dance. Indeed, they traveled many places and creative lovely and inventive dance videos wherever they went. I contributed a basic website to help lend their project a centralized presence on the internet. Mira and Robin have since diverted their attention to a new effort called The Duet Project, and I’m excited to see what sublime creations they will issue forth.

As for the old website, all my fancy CSS work is gone but most of the content still exists thanks to the Wayback Machine internet archive of

Also for posterity, the source of the pages are on GitHub.


| Comments

Mediasite is a set of webcasting solutions offered by Sonic Foundry. One of the products in the mediasite family is a lecture capturing platform. The end product provided by Mediasite is an embeddable webplayer that plays the video of lecturer in one window and simultaneously flipping through the slides. Slide transition times occur just as during the original lecture.

I wrote a Python script that parses the content of a Mediasite lecture and creates DV-formatted videos of the lecture and the slideshow. In my case these videos are useful for the sake of combining them into a single video which will then be uploaded to Vimeo. The command line tools ffmpeg and mencoder are required.

Below is more information about installing ffmpeg and mencoder, and the script is as follows.

A Knapsack for Vimeo

| Comments

The Vimeo Premium account allows a user to upload up to 5 GiB of videos per week. The size of a video cannot be distributed across subsequent weeks. Unused upload space does not roll over to following weeks. My goal is to make the most cost-effective use of the Vimeo Premium account by uploading as close to the full 5 GiB as possible every week.

As it turns out, selecting a subset of available video files that combine for the maximum fit within a certain limit is an instance of the 0-1 knapsack problem. I wrote a 0-1 knapsack solver module (in Python) as well as a command-line Python script that utilizes the solver to determine the optimal list of video files to upload for the week.

Search space

To understand how this is a difficult problem to solve, consider the number of possible combinations of files that could comprise a unique subset. Each file is either in each subset or not. That means there are possible combinations of candidate files. For a set of 40 files, there would be possibilities from which an exact optimal subset would be identified.


My first solution uses a pure branch-and-bound recursive algorithm. The weight and profit of each file is its size in bytes, and the capacity of the knapsack is bytes. This approach is much too inefficient, likely due to repeated evaluations of the same subsets in rearranged order.

Next step

Alternatively, a well-known dynamic programming algorithm can be employed. I implemented this method, which indeed finds the exact solution much more quickly, in time and space, where is the number of candidate files, and is the size limit.

The code I have written can be found at

edited Fri Jan 27 15:05:40 EST 2012