Skip to content

Instantly share code, notes, and snippets.

View neilfws's full-sized avatar

Neil Saunders neilfws

View GitHub Profile
require 'open-uri'
require 'json'
require 'mongo'
class FriendFeed
attr_accessor :user, :database, :collection
def initialize(user, database, collection)
@user = user
@database = XGen::Mongo::Driver::Mongo.new.db(database)
@neilfws
neilfws / bioruby-pubmed-demo
Created August 10, 2009 03:17
Search PubMed using esearch, return results as BibTeX
#!/usr/bin/ruby
# save as pubmed.rb and test using 'ruby pubmed.rb 19662644'
# keyword search may return > 1 record due to retmax bug
# http://github.com/bioruby/bioruby/commit/51c3223e033b2992a7bd95da282f88164406ff92
require 'rubygems'
require 'bio'
keywords = ARGV.join(' ')