- 2012-01-07 (Sat)
- 2012-01-08 (Sun)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
require "open-uri" | |
require "json" | |
require "pp" | |
### | |
# loading bullet | |
### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
require "nokogiri" | |
hako = "/path/to/directory_contains_pubmed_html" | |
title_list = [] | |
Dir::entries(hako).each do |item| | |
if !item.include?("url_list") | |
if !item.include?("¥.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "active_record" | |
ActiveRecord::Base.establish_connection( | |
:adapter => 'sqlite3', | |
:database => './test.sqlite3' | |
) | |
class UsersInit < ActiveRecord::Migration | |
def self.up | |
create_table( :users ) do |t| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# | |
# time file transfer from NCBI, EBI, and DDBJ with various transfer protocol. | |
# calc avg time send it to stdout | |
# usage: transfer_speed.sh <target SRA Run ID> | |
# requirement: SRA_Accessions.tab from ftp.ncbi.nlm.nih.gov/sra/reports/Metadata | |
# | |
################################################################################### | |
# time format (set as showing total time by second only) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<link rel="icon" href="{Favicon}"/> | |
<link rel="alternate" type="application/rss+xml" title="RSS" href="{RSS}"/> | |
<title>{Title}{block:PostSummary} - {PostSummary}{/block:PostSummary}</title> | |
<style type="text/css"> | |
* { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
# `gisty sync` to update gist | |
# run with --run option to show the whole list of the zip file to be backuped | |
# use --test option before running | |
# rsync command | |
# rsync -avzr iNut@hostname:/home/iNut/project/sra_qualitycheck/result /Volumes/HD2/fastqc2AllSRA | |
# get the list of zip files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
require "open-uri" | |
require "nokogiri" | |
require "ap" | |
class NatureParser | |
def initialize(page_url) | |
@nkgr_main = Nokogiri::HTML(open(page_url)) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
require "yaml" | |
require "twitter" | |
def force_mecab_parse(y_conf, text) | |
mecabed = `echo "#{text}" | /opt/local/bin/mecab`.split("\n") | |
parsed_arr = mecabed.map do |line| | |
tab_sep = line.split("\t") | |
com_sep = tab_sep.map{|p| p.split(",") } | |
com_sep.flatten |
OlderNewer