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
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 |
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 "net/http" | |
require "uri" | |
require "cgi" | |
require "json" # gem install json | |
class SPARQL |
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
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"], |
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
$.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") |
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
import sc.ala.neo4j.Neo | |
new Neo("/tmp/neo1") { W{ | |
N("中国") --> "牽制" --> N("日本") <-- "牽制" <-- N("ロシア") | |
N("アメリカ") --> "擁護" --> N("日本") | |
}} |