Skip to content

Instantly share code, notes, and snippets.

@fumi
fumi / sgvizler_div_piechart.html
Last active December 19, 2015 07:09
sgvizler piechart by div element
<div id="sgvizler_div_piechart"
data-sgvizler-endpoint="http://ja.dbpedia.org/sparql"
data-sgvizler-query="SELECT ?class (count(?instance) AS ?noOfInstances)
WHERE {
?instance a ?class .
}
GROUP BY ?class
ORDER BY DESC(?noOfInstances)"
data-sgvizler-chart="gPieChart"
data-sgvizler-loglevel="2"
@fumi
fumi / sgvizler_div_map.html
Last active December 19, 2015 07:09
sgvizler map by div element
<div id="sgvizler_div_map"
data-sgvizler-endpoint="http://dbpedia.org/sparql"
data-sgvizler-query="SELECT ?lat ?long ?name ?text ?url ?image
WHERE {
?url a yago:PrefecturesOfJapan ;
dct:subject <http://dbpedia.org/resource/Category:Prefectures_of_Japan> ;
rdfs:label ?name;
geo:lat ?lat;
geo:long ?long .
OPTIONAL{ ?url rdfs:comment ?text }
@fumi
fumi / schame-2.0-ja.xml
Last active August 29, 2015 14:00
ckan-2.2用暫定schema.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
PREFIX booth: <http://lod.ac/ns/booth#>
PREFIX cinii: <http://ci.nii.ac.jp/ns/1.0/>
PREFIX dc: <http://purl.org/dc/terms/>
PREFIX dc11: <http://purl.org/dc/elements/1.1/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX kaken: <http://kaken.nii.ac.jp/ns#>
PREFIX rns: <http://rns.nii.ac.jp/ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX prism: <http://prismstandard.org/namespaces/basic/2.0/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
Index: compute-accuracy.c
===================================================================
--- compute-accuracy.c (revision 42)
+++ compute-accuracy.c (working copy)
@@ -16,7 +16,7 @@
#include <stdlib.h>
#include <string.h>
#include <math.h>
-#include <malloc.h>
+#include <stdlib.h>
PREFIX : <http://example.org/ex/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT *
WHERE {
:taro ^foaf:knows+ / !(foaf:interest|foaf:knows) ?t .
}
@fumi
fumi / test.html
Last active February 1, 2016 12:50
<!DOCTYPE html>
<html>
<head>
<title>Covert test</tktle>
</head>
<body>
<h1>Convert Test</h1>
<table>
<%parse
<tr>
@fumi
fumi / e-stat.rq
Last active May 4, 2016 22:47
municipalities of Japan
#
# 実行場所: http://data.e-stat.go.jp/lod/sparql/
#
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
PREFIX org:<http://www.w3.org/ns/org#>
PREFIX dcterms:<http://purl.org/dc/terms/>
PREFIX sacs:<http://data.e-stat.go.jp/lod/terms/sacs#>
PREFIX sac:<http://data.e-stat.go.jp/lod/sac/>
PREFIX sace:<http://data.e-stat.go.jp/lod/sace/>
PREFIX sacr:<http://data.e-stat.go.jp/lod/sacr/>
@fumi
fumi / japan.topojson
Created August 30, 2016 09:00
Topojson for Japanese map
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fumi
fumi / open_data_sites_of_prefectures_in_Japan.rq
Last active April 10, 2017 09:19
Wikidataで都道府県オープンデータサイト
# endpoint: https://query.wikidata.org
# result: http://tinyurl.com/mjrokvw
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wikibase: <http://wikiba.se/ontology#>