Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / fluentd
Created June 27, 2013 01:42
/etc/init.d/fluentd for Debian weedy
#!/bin/bash
PID_FILE=/var/run/fluent/fluent.pid
CONF_FILE=/etc/fluent/fluent.conf
LOG_FILE=/var/log/fluent/fluentd.log
PSNAME="fluentd --daemon"
F_USER=fluent
F_GROUP=fluent
RUBY_VER="1.9.3-p194"
@fumi
fumi / schema.xml
Created April 16, 2013 09:42
CKAN 2.0日本語用 schema.xml (Kuromoji使用)
<?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
diff -ru dbpedia-spotlight/bin/download.sh dbpedia-spotlight.ja/bin/download.sh
--- dbpedia-spotlight/bin/download.sh 2012-12-19 16:08:37.631162096 +0900
+++ dbpedia-spotlight.ja/bin/download.sh 2012-12-20 15:23:29.734663244 +0900
@@ -6,9 +6,9 @@
PROGNAME=$(basename $0)
#Config parameters (adjust according your target language and folder)
-export lang_i18n=pt
-export language=portuguese
-export dbpedia_workspace=/var/local/spotlight
@fumi
fumi / app_globals.py.patch
Created November 12, 2012 08:57
ckan-1.8 japanese patches
--- ckan/lib/app_globals.py.bak 2012-11-08 14:04:25.366451874 +0900
+++ ckan/lib/app_globals.py 2012-11-08 14:17:06.316450977 +0900
@@ -16,13 +16,13 @@
'app_globals' variable
"""
- self.site_title = config.get('ckan.site_title', '')
+ self.site_title = config.get('ckan.site_title', '').decode("utf-8")
self.favicon = config.get('ckan.favicon',
'/images/icons/ckan.ico')
;; gist
(require 'gist)
;; gist
(require 'gist)
@fumi
fumi / gist:1096411
Created July 21, 2011 02:49
/System/Library/Frameworks/Python.framework/Versions/Current/Extras/lib/python on Lion
CoreGraphics
OpenSSL
PyObjC
PyObjC.pth
PyRSS2Gen-1.0.0-py2.7.egg-info
PyRSS2Gen.py
PyRSS2Gen.pyc
Twisted-11.0.0-py2.7.egg-info
altgraph
altgraph-0.7.1-py2.7.egg-info
#!/usr/bin/env ruby
require 'rdf'
require 'rdf/raptor'
repo = RDF::Repository.new
count = 0
while true
repo.load("test.ttl")