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
@prefix owl: <http://www.w3.org/2002/07/owl#> . | |
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | |
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | |
@prefix xml: <http://www.w3.org/XML/1998/namespace> . | |
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | |
@prefix obo: <http://purl.obolibrary.org/obo/> . | |
@prefix : <http://insdc.org/owl/#> . | |
<http://insdc.org/owl/> | |
a owl:Ontology . |
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 | |
# | |
# Mac OS X webarchive is a binary format of a plist file. You can extract the contents manually: | |
# 1. convert the plist file into XML by "plutil -convert xml1 file.webarchive" | |
# 2. parse the resulted XML file by some XML parser | |
# 3. decode "WebResourceData" by Base64.decode64(data) in each key | |
# 4. save the decoded content into a file indicated by "WebResourceData" | |
# Thankfully, the plist library can take care of annoying steps 2 and 3. | |
# | |
# Preparation: |
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 | |
require 'rubygems' | |
require 'uri' | |
require 'bio' | |
require 'json' | |
require 'securerandom' | |
# [TODO] integrate this into BioRuby | |
module Bio |
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
;;; library | |
(let ((default-directory "~/lib/lisp")) | |
(normal-top-level-add-subdirs-to-load-path)) | |
;; multiple-cursors | |
; % git clone https://github.com/magnars/multiple-cursors.el.git | |
; % mv multiple-cursors.el lib/lisp/multiple-cursors |
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 | |
# | |
# Usage: | |
# DAS XML for http://togogenome.org/das/645657/features?segment=NC_017196.1:1,100000 can be generated by | |
# % ruby sparql2das.rb 645657 features segment=NC_017196.1:1,100000 | |
# With ruby -d option, you'll see debug massages with pretty formatted XML (will miss <?xml> tag though) | |
# | |
# TODO: | |
# Wrap as an Rack app and add X-DAS-* HTTP headers | |
# |
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 | |
# | |
# Taxonomy ontology generator | |
# | |
# Copyright (C) 2013, 2014 Toshiaki Katayama <ktym@dbcls.jp> | |
# | |
# Version: Jan 29, 2014 | |
# | |
# Usage: | |
# |
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> | |
<meta charset="utf-8"> | |
<html> | |
<head> | |
<!-- Twitter Bootstrap http://getbootstrap.com/2.3.2/ を取得してインストール --> | |
<link rel="stylesheet" type="text/css" href="lib/bootstrap/css/bootstrap.css"/> | |
<!-- D3.js http://d3js.org/ を取得してインストール --> | |
<script src="lib/d3/d3.v3.min.js"></script> | |
<script> | |
function query() { |
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
class Player | |
def play_turn(warrior) | |
# cool code goes here | |
@health ||= warrior.health | |
if warrior.feel.captive? | |
warrior.rescue! | |
elsif warrior.feel.enemy? | |
warrior.attack! | |
else | |
if warrior.health < 20 and !(warrior.health < @health) |
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> | |
<meta charset="utf-8"> | |
<html> | |
<head> | |
<!-- Twitter Bootstrap http://getbootstrap.com/2.3.2/ を取得してインストール --> | |
<link rel="stylesheet" type="text/css" href="bootstrap.css"/> | |
<!-- jQuery http://jquery.com/ を取得してインストール --> | |
<script src="jquery.min.js"></script> | |
<script> | |
// SPARQL 検索を行う query() 関数を定義 |
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 'json' | |
def metadatajson | |
json = JSON.parse(' | |
{ | |
"Name": "", | |
"Description": "", | |
"HrefAppSession": "", | |
"Properties": [ | |
{ |