Profile cover photo
Profile photo
Doug Latornell
143 followers -
Engineer, Cyclist, Pythonista, Foodie
Engineer, Cyclist, Pythonista, Foodie

143 followers
About
Doug's posts

Post has attachment
This looks like some sort of "Grinch Who Stole Christmas", "Evil Jack-o'-Lantern" mash-up. And what's up with the the splayed fin thing behind it's head?

Have I missed a horror tale pop culture meme?
Photo

Post has attachment

Post has attachment
Climate art at Sunday Streets festival in Berkeley.
Photo

Post has attachment
Congratulations to +Eric Fergusson on surpassing a lifetime total of 100,000 km in randonneur cycling events. The bronzed saddle was presented to him at today's BC Randonneurs Cycling Club AGM
Photo

Post has attachment
I won candy on the #googlebirthday doodle! Score: 66

Post has attachment
This is the ocean research cruise that +Susan Allen is presently on. I think that it is very cool that they are blogging from the cruise in progress (see the Cruise Log link), including video clips, image from the science operations on the ship, and graphics of preliminary results. Science in the 21st century rocks!

Insider stuff not mentioned (yet?) in those pages: There is an unnamed bank that plays an important role in the deep water upwelling and they have dubbed it Zeppelin Bank (how does one go about getting that officially on the charts?). The water mass that they are tracking has been dubbed Rogers Water (I'm not completely sure why) and, because (I think) it is cold, deep water, it is also being referred as Comfortably Numb. Could be that they are having too much fun out there, or that they are just getting punchy from 15 hour work days.

Post has attachment

Post has shared content
+Lorena Barba recently converted her CFD course materials into a collection of IPython notebooks, all available from her bitbucket repo and accompanied by her online lectures (on YouTube).

This is a full, ground-up introduction to CFD that builds starting from the 1-d linear wave equation all the way to  full Navier-Stokes.  She introduces the continuum equations, the discretization schemes and working codes for implementing a solver.

Pro tip:
When you're porting an application that uses Mako templates to #Python 3 be sure to update any deprecated syntax in your template files. A little thing like:

    $for i in xrange(3):

will result in a fairly uninformative traceback from deep inside the Mako rendering code:

Traceback (most recent call last):
  File "/Users/doug/.virtualenvs/bloomcast-3.3/bin/bloomcast", line 9, in <module>
    load_entry_point('SoG-bloomcast==3.0dev', 'console_scripts', 'bloomcast')()
  File "/Users/doug/Documents/devel/SoG/SOG/SoG-bloomcast/bloomcast/bloomcast.py", line 605, in main
    bloomcast.run()
  File "/Users/doug/Documents/devel/SoG/SOG/SoG-bloomcast/bloomcast/bloomcast.py", line 95, in run
    self._render_results()
  File "/Users/doug/Documents/devel/SoG/SOG/SoG-bloomcast/bloomcast/bloomcast.py", line 547, in _render_results
    file_obj.write(template.render(**context))
  File "/Users/doug/.virtualenvs/bloomcast-3.3/lib/python3.3/site-packages/mako/template.py", line 443, in render
    return runtime.render(self, self.callable, args, data)
  File "/Users/doug/.virtualenvs/bloomcast-3.3/lib/python3.3/site-packages/mako/runtime.py", line 783, in _render
    **kwargs_for_callable(callable, data))
  File "/Users/doug/.virtualenvs/bloomcast-3.3/lib/python3.3/site-packages/mako/runtime.py", line 815, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "/Users/doug/.virtualenvs/bloomcast-3.3/lib/python3.3/site-packages/mako/runtime.py", line 841, in _exec_template
    callable_(context, *args, **kwargs)
  File "bloomcast_html_results_mako", line 58, in render_body
TypeError: 'Undefined' object is not callable

As far as I know there are no automated tools to help find 2to3 syntax issues in Mako templates.

Getting to the bottom of this reminded me of another pro tip: Use pdb, or better yet, ipdb!

Post has attachment
Thinking about sprinting on core Python with +Brett Cannon at PyCon.ca, but I'm concerned that if my sprint work were to result in a patch being accepted it would take away my distinction of having my only contribution to Python be among the smallest possible: a single character deletion from the docs :-)

http://bugs.python.org/issue11625
Wait while more posts are being loaded