Skip to content

Instantly share code, notes, and snippets.

View ursm's full-sized avatar

Keita Urashima ursm

View GitHub Profile
history = []
puts 'Hello! May I help you?'
while words = gets.chomp
history << words
break if history.last(3) == %w(BYE BYE BYE)
case words
@ursm
ursm / parse_st.rb
Last active March 14, 2016 12:37 — forked from tfuji/parse_st.rb
INSDC structured comment parser
#!/usr/bin/env ruby
require 'rubygems'
require 'bio'
def parse_st_comment(comment)
comment.scan(/##(.+)-START##\n(.*)\n##\1-END##/m).each_with_object({}) {|(tagset, block), memo|
i = 0
memo[tagset] = block.lines.chunk {|line|