<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#">
<link rel="alternate" type="text/html" href="http://emergent.unpythonic.net/"/>

<title>Jeff Epler's blog</title>
<modified>2012-01-05T23:12:41Z</modified>
<tagline>Photos, electronics, cnc, and more</tagline>
<author><name>Jeff Epler</name><email>jepler@unpythonic.net</email></author>
<entry>
<title>Time to finish that languishing clock project!</title>
<issued>2012-01-05T23:12:41Z</issued>
<modified>2012-01-05T23:12:41Z</modified>
<id>http://emergent.unpythonic.net/01325805161</id>
<link rel="alternate" type="text/html" href="http://emergent.unpythonic.net/01325805161"/>
<content type="text/html" mode="escaped">A leap second has been announced at the end of June 2012.</content>
</entry>
<entry>
<title>It's gratifying when the compiler is right</title>
<issued>2011-12-27T20:35:02Z</issued>
<modified>2011-12-27T20:35:02Z</modified>
<id>http://emergent.unpythonic.net/01325018102</id>
<link rel="alternate" type="text/html" href="http://emergent.unpythonic.net/01325018102"/>
<content type="text/html" mode="escaped">I've been playing with &lt;a href=&quot;http://clang.llvm.org&quot;&gt;clang&lt;/a&gt;
because I'd like to use its &lt;a href=&quot;http://clang-analyzer.llvm.org/&quot;&gt;static analyzer&lt;/a&gt; on the code at $DAY_JOB.  Unfortunately, it frequently bombs
while building our code.  Fortuately, many of the bombs are due to our bugs,
not theirs.  Here's one example:</content>
</entry>
<entry>
<title>Need another reminder to steer clear of non-Free software?</title>
<issued>2011-12-18T14:42:35Z</issued>
<modified>2011-12-18T14:42:35Z</modified>
<id>http://emergent.unpythonic.net/01324219355</id>
<link rel="alternate" type="text/html" href="http://emergent.unpythonic.net/01324219355"/>
<content type="text/html" mode="escaped">It's played out over and over again on proprietary platforms: the
vendor decides that this or that component should be deleted from user
machines, and as if by magic it happens, without regard to the fact
that user systems will encounter reduced functionality as a result.

&lt;p&gt;Well, through its &amp;quot;Partner&amp;quot; archive, Ubuntu is in the &lt;a href=&quot;https://lists.ubuntu.com/archives/ubuntu-security-announce/2011-December/001528.html&quot;&gt;unenviable position of doing the same thing.&lt;/a&gt;</content>
</entry>
<entry>
<title>Ingrid's Canadian Rockies Photos</title>
<issued>2011-12-13T02:29:16Z</issued>
<modified>2011-12-13T02:29:16Z</modified>
<id>http://emergent.unpythonic.net/01323743356</id>
<link rel="alternate" type="text/html" href="http://emergent.unpythonic.net/01323743356"/>
<content type="text/html" mode="escaped">&lt;div style=&quot;float:right;clear:right&quot;&gt;&lt;!-- img_1588.jpg--&gt;&lt;div class=albumouter style=width:306px id=&gt;&lt;div class=albumimage style=&quot;width:306px;margin-left:0px;&quot;&gt;&lt;a href=&quot;http://media.unpythonic.net/emergent-files/01323743356/img_1588-medium.jpg&quot; class=&quot;thickbox&quot; rel=&quot;album&quot; title=&quot;A beautiful reflection in Lake Annette&quot;&gt;&lt;img src=&quot;http://media.unpythonic.net/emergent-files/01323743356/img_1588-small.jpg&quot; width=300 height=225&gt;&lt;/a&gt;&lt;div &gt;&lt;div style=&quot;float: right&quot; &gt;&lt;a href=&quot;http://media.unpythonic.net/emergent-files/01323743356/img_1588-medium.jpg&quot;&gt;(M)&lt;/a&gt;&lt;a href=&quot;http://media.unpythonic.net/emergent-files/01323743356/img_1588.jpg&quot;&gt;(L)&lt;/a&gt;&lt;/div&gt;&lt;a href=&quot;http://media.unpythonic.net/emergent-files/01323743356/img_1588.jpg&quot;&gt;A beautiful reflection in Lake Annette&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;Photos that Ingrid took on our August 2011 trip to the Canadian Rockies, including Banff and Jasper National Parks</content>
</entry>
<entry>
<title>New Site Look</title>
<issued>2011-12-11T02:40:37Z</issued>
<modified>2011-12-11T02:40:37Z</modified>
<id>http://emergent.unpythonic.net/01323571237</id>
<link rel="alternate" type="text/html" href="http://emergent.unpythonic.net/01323571237"/>
<content type="text/html" mode="escaped">

I recently decided it was time for a new look on my website.  The new design
is based on &lt;a href=&quot;http://twitter.github.com/bootstrap/&quot;&gt;twitter bootstrap&lt;/a&gt;
for css and a bit of javascript.  I hope the result is a new look which is
still light and simple but which also fits better with the sensibilities of
today's web.
</content>
</entry>
<entry>
<title>Cheeseball Barley Wine</title>
<issued>2011-10-25T14:23:08Z</issued>
<modified>2011-10-25T14:23:08Z</modified>
<id>http://emergent.unpythonic.net/01319552588</id>
<link rel="alternate" type="text/html" href="http://emergent.unpythonic.net/01319552588"/>
<content type="text/html" mode="escaped">
&lt;font size=-2&gt;(adapted from the Horn Dog Barley Wine recipe in Clone Brews; Clone
Brews offers mini-mash and all-grain versions of this recipe)&lt;/font&gt;

&lt;p&gt;My half-batch came out very dark and not at all hoppy.  The original recipe
calls for 9 months of bottle conditioning, but I found it to be very pleasant
after just 2 months.  I prefer to split a (12oz) bottle with a friend.  This is
quite enough to lend a pleasant feeling of warmth.  It's said to keep at cellar
temperatures for 2 years, but I doubt this has ever been experimentally proven.

&lt;p&gt;Pairs well with left-over ginger triple-chocolate wedding cake.

&lt;p&gt;Style: English Barley Wine
&lt;br&gt;OG: 1.103-1.104
&lt;br&gt;FG: 1.023-1.024
&lt;br&gt;Est ABV: 10.2%

&lt;p&gt;Recipe for 5 gallons:</content>
</entry>
<entry>
<title>csql: perform sql queries on csv data</title>
<issued>2011-10-16T15:31:28Z</issued>
<modified>2011-10-16T15:31:28Z</modified>
<id>http://emergent.unpythonic.net/01318779088</id>
<link rel="alternate" type="text/html" href="http://emergent.unpythonic.net/01318779088"/>
<content type="text/html" mode="escaped">

The websites I operate are flat-file based, so when I want to store
data it's easiest to write it in csv format.  But it's not particularly easy
to make queries on this data without additional software.

&lt;p&gt;I'd rather not fire up Open Office or try to figure out how to make awk
parse a quoted excel-format file, so I wrote 'csql', which reads a csv
file into an in-memory sql database, performs a query, and then writes
the result also in csv format.

&lt;p&gt;A short example:

&lt;p&gt;rsvp.csv:
&lt;blockquote&gt;&lt;pre&gt;
Buffy Summers,false,0
Xander Harris,true,2
Willow Rosenberg,true,1
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;rsvp.cols:
&lt;blockquote&gt;&lt;pre&gt;
name text
attend boolean
count integer
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;Performing queries:
&lt;blockquote&gt;&lt;pre&gt;
$ csql rsvp.csv 'select sum(count) from t where attend=&quot;true&quot;'
3
$ csql rsvp.csv 'select name from t where attend=&quot;true&quot;'
Xander Harris
Willow Rosenberg
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;&lt;p&gt;&lt;b&gt;Files currently attached to this page:&lt;/b&gt;
&lt;table cellpadding=5&gt;&lt;col&gt;&lt;col style=&quot;text-align: right&quot;&gt;&lt;tr bgcolor=#eeeeee&gt;&lt;td&gt;&lt;a href=&quot;http://media.unpythonic.net/emergent-files/01318779088/csql&quot;&gt;csql&lt;/a&gt;&lt;/td&gt;&lt;td&gt;3.4kB&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;

&lt;p&gt;</content>
</entry>
<entry>
<title>Source: USB Stacker for EOS Cameras</title>
<issued>2011-10-16T13:20:58Z</issued>
<modified>2011-10-16T13:20:58Z</modified>
<id>http://emergent.unpythonic.net/01318771258</id>
<link rel="alternate" type="text/html" href="http://emergent.unpythonic.net/01318771258"/>
<content type="text/html" mode="escaped">
I promised to post the code I wrote to do &lt;a href=&quot;http://emergent.unpythonic.net/01318303039&quot;&gt;focus
stacking&lt;/a&gt;.  Here it is, in the form of a patch to &lt;a href=&quot;http://code.google.com/p/pyptp/&quot;&gt;pyptp&lt;/a&gt;.

&lt;p&gt;The code is lightly tested on my Canon EOS 7D.

&lt;p&gt;It's necessary to change the shutter release button so that a half-press does
not autofocus. (this is somewhere in the C.Fn. menus)  If your camera doesn't
have this custom function, I don't think this code will work for you.

&lt;p&gt;Manually focus the lens at the far end of the range, set lens to autofocus,
plug in the usb cable, and run the program.  You may have to fiddle with the
&amp;quot;--stepsize=&amp;quot; argument in order to get an appropriate amount of movement
between each shot and of course &amp;quot;--count=&amp;quot; to capture enough frames to cover
your subject.  For a list of other other options, run 'python stack.py --help'.

&lt;p&gt;&lt;p&gt;&lt;b&gt;Files currently attached to this page:&lt;/b&gt;
&lt;table cellpadding=5&gt;&lt;col&gt;&lt;col style=&quot;text-align: right&quot;&gt;&lt;tr bgcolor=#eeeeee&gt;&lt;td&gt;&lt;a href=&quot;http://media.unpythonic.net/emergent-files/01318771258/pyptp-canon-stacker.patch&quot;&gt;pyptp-canon-stacker.patch&lt;/a&gt;&lt;/td&gt;&lt;td&gt;17.0kB&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;
</content>
</entry>
<entry>
<title>Focus Stacking Success</title>
<issued>2011-10-11T03:17:19Z</issued>
<modified>2011-10-11T03:17:19Z</modified>
<id>http://emergent.unpythonic.net/01318303039</id>
<link rel="alternate" type="text/html" href="http://emergent.unpythonic.net/01318303039"/>
<content type="text/html" mode="escaped">

I've finally had success with focus stacking!

&lt;p&gt;Inspired by &lt;a href=&quot;http://www.circuitsathome.com/camera-control/focus-stacking-assistant-for-eos-cameras&quot;&gt;the focus stacking assistant&lt;/a&gt;,
I wrote a Python program using &lt;a href=&quot;http://code.google.com/p/pyptp/&quot;&gt;pyptp&lt;/a&gt; that does something similar with a Canon EOS tethered to a Linux PC.
(I intend to release this in a bit, but it's very much &amp;quot;under construction&amp;quot;
code at this time)

&lt;p&gt;I then aligned the images in hugin and stitched with enblend.

&lt;p&gt;There's still some tinkering to do with tunable parameters, but it looks pretty
good!  In the thumbnail you can see that all of the table cloth is in focus;
view the medium or large versions to see more detail.

&lt;p&gt;&lt;span class=&quot;album&quot;&gt;&lt;!-- IMG_7870-IMG_7955_fused.jpg--&gt;&lt;div class=albumouter style=width:306px id=x0&gt;&lt;div class=albumimage style=&quot;width:306px;margin-left:0px;&quot;&gt;&lt;a href=&quot;http://media.unpythonic.net/emergent-files/01318303039/IMG_7870-IMG_7955_fused-medium.jpg&quot; class=&quot;thickbox&quot; rel=&quot;album&quot; title=&quot;Fused Image&quot;&gt;&lt;img src=&quot;http://media.unpythonic.net/emergent-files/01318303039/IMG_7870-IMG_7955_fused-small.jpg&quot; width=300 height=198&gt;&lt;/a&gt;&lt;div &gt;&lt;div style=&quot;float: right&quot; &gt;&lt;a href=&quot;http://media.unpythonic.net/emergent-files/01318303039/IMG_7870-IMG_7955_fused-medium.jpg&quot;&gt;(M)&lt;/a&gt;&lt;a href=&quot;http://media.unpythonic.net/emergent-files/01318303039/IMG_7870-IMG_7955_fused.jpg&quot;&gt;(L)&lt;/a&gt;&lt;/div&gt;&lt;a href=&quot;http://media.unpythonic.net/emergent-files/01318303039/IMG_7870-IMG_7955_fused.jpg&quot;&gt;Fused Image&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;!-- img_7925.jpg--&gt;&lt;div class=albumouter style=width:306px id=x1&gt;&lt;div class=albumimage style=&quot;width:306px;margin-left:0px;&quot;&gt;&lt;a href=&quot;http://media.unpythonic.net/emergent-files/01318303039/img_7925-medium.jpg&quot; class=&quot;thickbox&quot; rel=&quot;album&quot; title=&quot;Typical input image&quot;&gt;&lt;img src=&quot;http://media.unpythonic.net/emergent-files/01318303039/img_7925-small.jpg&quot; width=300 height=200&gt;&lt;/a&gt;&lt;div &gt;&lt;div style=&quot;float: right&quot; &gt;&lt;a href=&quot;http://media.unpythonic.net/emergent-files/01318303039/img_7925-medium.jpg&quot;&gt;(M)&lt;/a&gt;&lt;a href=&quot;http://media.unpythonic.net/emergent-files/01318303039/img_7925.jpg&quot;&gt;(L)&lt;/a&gt;&lt;/div&gt;&lt;a href=&quot;http://media.unpythonic.net/emergent-files/01318303039/img_7925.jpg&quot;&gt;Typical input image&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/span&gt;


</content>
</entry>
<entry>
<title>tnef2mime: automatically extract parts from winmail.dat</title>
<issued>2011-09-20T18:49:42Z</issued>
<modified>2011-09-20T18:49:42Z</modified>
<id>http://emergent.unpythonic.net/01316544582</id>
<link rel="alternate" type="text/html" href="http://emergent.unpythonic.net/01316544582"/>
<content type="text/html" mode="escaped">

In her professional life, my fiancée routinely gets emails with attachments in
the 'winmail.dat' aka application/ms-tnef format.  It does her no good to
berate these prisoners of proprietary software, so I set out to provide her
with an easy-to-use solution that would work on her end.  Now, prompted by
&lt;a href=&quot;http://www.carbon-project.org/TNEF_or_how_to_lock_up_your_e_mails.html&quot;&gt;this blog entry&lt;/a&gt; I am posting it for others to use.

&lt;p&gt;There are a number of programs that can rescue data from this proprietary
attachment format, but I was not aware of a program that would automatically
convert the winmail.dat attachment to (a series of) regular mime attachments.
(it appears that &lt;a href=&quot;http://freshmeat.net/projects/ytnef_smtpd_py&quot;&gt;ytnef_smtpd&lt;/a&gt; may be such a program)

&lt;p&gt;So I wrote one, &lt;a href=&quot;http://media.unpythonic.net/emergent-files/01316544582/tnef2mime.py&quot;&gt;tnef2mime.py&lt;/a&gt;.   tnef2mime reads a message on
standard input, combs it for ms-tnef attachments, and uses the tnef(1) program
to extract their contents.  Then it takes the extracted files, adds them
as new MIME parts, and prints the whole resulting message.

&lt;p&gt;This is suitable for use in e.g. procmail:
&lt;blockquote&gt;&lt;pre&gt;
:0fw
| tnef2mime
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;Several steps are taken in order to minimize the chances for data loss:  Just
in case it did an imperfect job, it leaves the existing ms-tnef attachment
intact.  If any problem is encountered, the unmodified message is written.

&lt;p&gt;This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

&lt;p&gt;&lt;p&gt;&lt;b&gt;Files currently attached to this page:&lt;/b&gt;
&lt;table cellpadding=5&gt;&lt;col&gt;&lt;col style=&quot;text-align: right&quot;&gt;&lt;tr bgcolor=#eeeeee&gt;&lt;td&gt;&lt;a href=&quot;http://media.unpythonic.net/emergent-files/01316544582/tnef2mime.py&quot;&gt;tnef2mime.py&lt;/a&gt;&lt;/td&gt;&lt;td&gt;3.1kB&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;
</content>
</entry>
</feed>

