Skip to content

Instantly share code, notes, and snippets.

View nakao's full-sized avatar

Mitsuteru Nakao nakao

View GitHub Profile
@dsblank
dsblank / publichandler.py
Created October 21, 2014 10:34
PublicHandler for a nbviewer/download in jupyterhub
from tornado import gen, web
from IPython.nbformat import current as nbformat
from IPython.nbconvert.exporters import HTMLExporter, PDFExporter
import re
import os
import glob
import mimetypes
@ktym
ktym / sparql.rb
Last active June 30, 2016 07:24
SPARQL query interface
#!/usr/bin/env ruby
require "rubygems"
require "net/http"
require "uri"
require "cgi"
require "json" # gem install json
class SPARQL
@coela
coela / gist:850403
Created March 2, 2011 03:12
Getting JSON data from Genomes Online Database
use 5.12.2;
use JSON;
use Data::Dumper;
use LWP::Simple;
my @json_places = (
['Complete' , "http://www.genomesonline.org/complete_published.json"],
['Bacteria Ongoing' , "http://www.genomesonline.org/bacterial_ongoing.json"],
['Eukaryal Ongoing' , "http://www.genomesonline.org/eukaryal_ongoing.json"],
['Archaeal Ongoing' , "http://www.genomesonline.org/archaeal_ongoing.json"],
['Metagenome' , "http://www.genomesonline.org/microbial.json"],
@jgeldart
jgeldart / example-jquery-sparql-use.js
Created December 3, 2010 02:13
An example of using optional subqueries with jQuery SPARQL
$.sparql("http://services.data.gov.uk/education/sparql")
.prefix("sch-ont", "http://education.data.gov.uk/ontology/school#")
.select(["?name", "?address1", "?address2", "?town", "?postcode"])
.where("?school", "a", "sch-ont:School")
.where("sch-ont:establishmentName", "?name")
.where("sch-ont:districtAdministrative", "<http://education.data.gov.uk/placeholder-id/administrativeDistrict/City-of-London>;")
.optional()
.where("?school", "sch-ont:address", "?address")
.where("?address", "sch-ont:address1", "?address1")
.where("sch-ont:address2", "?address2")
import sc.ala.neo4j.Neo
new Neo("/tmp/neo1") { W{
N("中国") --> "牽制" --> N("日本") <-- "牽制" <-- N("ロシア")
N("アメリカ") --> "擁護" --> N("日本")
}}