Summary: A Ruby/RMagick script of mine was failing with a variety of “Cannot allocate memory” errors. Adding a single line to the bottom of my thumbnail generation loop fixed this: img.destroy!.
Displaying posts tagged: ruby
The context: a GoDaddy VPS running FC7 (apparently, GoDaddy hasn’t updated their VPS distros in years).
Anything with user-submitted ratings can be sorted by those ratings. But what is the best way? The naive approach is to sort by average rating. Unfortunately, this would rate 5-stars from a single user as higher than 4.5-stars from 150 users.
Summary: Attached is a pure Ruby implementation of the AS66 algorithm (Hill 1973), ported from the Fortran code available here. It estimates the integral of the normal distribution, defaulting to the area under the right tail.
Summary: Attached is a diff that allows Bio::FlatFileIndex to access BDB flatfile databases created by BioPerl’s Bio::DB::Flat. I have not changed the way BioRuby creates its databases, so this likely breaks access to BioRuby-created flatfile indices.
