Saw this in a post on the Concept 2 Forum by igoeja. Back issues of Rowing News are in Google Books available online for free and with the ability to search. Cool!
My unofficial interface to the Concept 2 Online Logbook is ready.
This allows one to programmatically get information from the logbook (such as your total meters rowed to date) or to add workouts to the logbook from another program.
For example, entering this URL in your browser after getting your own API KEY:
would cause the browser to prompt you for your logbook username and password and then it would return the total meters you’ve rowed to date.
Details and code examples in Python and Java are at the (Unofficial) Concept 2 Online Logbook REST API Home Page.
I’ve been looking to find a way to resize a font when the window’s size changes. Here is code that will create a font that is close as possible to a given height in pixels without specifying anything about the font width. Osku Salerma posted some code in GitHub that did the trick.
I changed it a bit to make it self-contained. Here’s my modified version of his code to create a wxPython font given a height in pixels:
<pre> def createFontFromHeightInPixels(self, heightInPixels, family, style, weight): # return a font that's as close to 'heightInPixels' as possible without being larger # modified from code at http://github.com/oskusalerma/blyte/blob/master/util.py fontSizeToTest = 6 bestFontSoFar = wx.Font(fontSizeToTest, family, style, weight, encoding = wx.FONTENCODING_ISO8859_1) closestDiffInPixelsSoFar = 1000 testDc = wx.MemoryDC() testDc.SelectObject(wx.EmptyBitmap(512, 32)) while 1: testedFont = wx.Font(fontSizeToTest, family, style, weight, encoding = wx.FONTENCODING_ISO8859_1) testDc.SetFont(testedFont) heightOfTestedFont = testDc.GetTextExtent("_\xC5") diff = heightInPixels-heightOfTestedFont if diff >= 0: if diff < closestDiffInPixelsSoFar: closestDiffInPixelsSoFar = diff bestFontSoFar = testedFont else: break fontSizeToTest += 2 return bestFontSoFar </pre>
It would be used like this assuming the above function is in the window class or one of its superclasses:
<pre> def __init__(self, *args, **kwds): . . . self.Bind(wx.EVT_SIZE, self.OnSize) def OnSize(self, event): size = event.GetSize() currentFont = self.GetFont() newFont = self.createFontFromHeightInPixels( (size.height*0.8), currentFont.GetFamily(), currentFont.GetStyle(), currentFont.GetWeight()) self.label_1.SetFont(newFont) </pre>
<pre> import urllib2 import copy import mechanize import mechanize._response class GAEMechanizeHTTPHandler(mechanize.BaseHandler): def __init__(self, gae_http_handler, debuglevel=0): self._debuglevel = debuglevel self._gae_http_handler = gae_http_handler def http_open(self, req): return self._gae_http_handler.http_open(req) def make_gae_handler(): return urllib2.HTTPHandler() def make_http_handler(): gae_handler = make_gae_handler() return GAEMechanizeHTTPHandler(gae_handler) class GAEBrowser(mechanize.Browser): handler_classes = copy.copy(mechanize.Browser.handler_classes) handler_classes["http"] = make_http_handler </pre>
Mechanize is not thoroughly tested, but the above does allow my project’s code to pass its regression tests when running on the GAE.
Tom Kotula and Jon Hauserman, two local rowers from the Cleveland State University Viking crew, were videoed and interviewed on the CBS evening news. They are rowing from Cleveland, Ohio to Key West to raise awareness for Habit for Humanity. They also made the local evening news.
Oh to be young again and have the time for adventures like this!
A local news channel featured a short segment on a local, fairly new, rowing club. We’ve pretty much given up trying to get our local newspaper to recognize the local high-school rowing teams (the paper is becoming less and less relevant anyway), so it is always good to see rowing in the popular media.
I hadn’t realized the Portage Lakes Rowing association had grown. It’s very good to hear!
I had a search registered for this book on tape.
It is a fictional account of his experience as a rowing coach. Copies are rare and I already have mine, so I’m passing this along to the group in case anyone is interested.
Wanted: Rowing Coach by Brad Alan Lewis
Audio Cassette. Books on Tape, Inc. (1996)
Buy now at: http://www.alibris.com/booksearch.detail?invid=9701681989
It’s not quite ‘The Shell Game’ but still a very worthwhile listen.
I’ve uploaded a new video showing a 350 meter row with ErgMate to: http://powertwenty.com/ergmate/videos/350MeterRow/350MeterRow.html
There is also a new release that fixes a minor bug when editing the percent heart-rate clip.
An update to ErgMate is available at: http://powertwenty.com/ergmate/update.html.
This fixes problems found with communication to the erg and calling power 10’s and 20’s.
There is no need to download the full version if you’ve installed it once already, the update is much smaller as it does not include the computer voice.
Do download the full version if it is your first time as it contains a high-quality voice.