Skip to content

Instantly share code, notes, and snippets.

View kinow's full-sized avatar
💭
😬

Bruno P. Kinoshita kinow

💭
😬
View GitHub Profile
@kinow
kinow / Short profile of cycling suite five with CherryPy, Tornado, Flask-Gevent
Last active October 31, 2018 01:14
Short profile of cylc/etc/examples/tutorial/cycling/five suite
Executed on Ubuntu LTS, VM with 6 GB and 4 CPU, running on a host with Windows 10 pro, 32 GB, 8 CPU
Command used: cylc run --profile five --no-detach
master: 217d6bedeba9813c9d5f40068fcf71f6be9320a9
tornado: 161860dc9a0fb133ab6f07f09aefa2deed3e7f0b
flask-geevent: bbcbe41503736623f62772bd03c5baec50de21e4
@kinow
kinow / gist:8f7fa57a8f189f89803e6de769deb2f2
Created October 4, 2018 22:02
Jena 3.9.0 RC1 error on windows
[INFO] --- maven-surefire-plugin:2.21.0:test (default-test) @ jena-fuseki-webapp ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.jena.fuseki.TS_Fuseki
[2018-10-05 11:00:09] Admin ERROR [355] Error while deleting database files C:\Users\kinoshitabd\Development\java\workspace\jena\jena-fuseki2\jena-fuseki-webapp\target\FusekiHome\run\databases\db_mem: java.nio.file.FileSystemException: C:\Users\kinoshitabd\Development\java\workspace\jena\jena-fuseki2\jena-fuseki-webapp\target\FusekiHome\run\databases\db_mem\GOSP.dat: The process cannot access the file because it is being used by another process.
org.apache.jena.atlas.RuntimeIOException: java.nio.file.FileSystemException: C:\Users\kinoshitabd\Development\java\workspace\jena\jena-fuseki2\jena-fuseki-webapp\target\FusekiHome\run\databases\db_mem\GOSP.dat: The process cannot access the file because it is being used by another pr
package org.apache.commons.dbcp2.datasources;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.Arrays;
packrat::init(options = list(vcs.ignore.src=TRUE))
@kinow
kinow / test.java
Created April 9, 2018 09:10
Example running the new selective folding filter for Jena
public static void main(String[] args) throws Exception {
// An example where we keep the cedilla, as it is being whitelisted
StringReader inputText = new StringReader("Señora Siobhán, look at that façade");
CharArraySet whitelisted = new CharArraySet(Arrays.asList(Character.valueOf('ç')), false);
StandardTokenizer tokenizer = new StandardTokenizer();
tokenizer.setReader(inputText);
// Replace this by a C, and then the ASCIIFolding function will take care to replace it by c, as it was not whitelisted
SelectiveFoldingFilter selectiveFoldingFilter = new SelectiveFoldingFilter(tokenizer, whitelisted);
## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix vcard: <http://www.w3.org/2001/vcard-rdf/3.0#> .
@prefix ns: <http://example.org/ns#> .
@prefix : <http://example.org/book/> .
# A small dataset for usage examples of Joseki
# This data is intentionaly irregular (e.g. different ways to
## Example of a TDB dataset and text index published using Fuseki
@prefix : <#> .
@prefix fuseki: <http://jena.apache.org/fuseki#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
@prefix text: <http://jena.apache.org/text#> .
## Example of a TDB dataset and text index published using Fuseki
@prefix : <#> .
@prefix fuseki: <http://jena.apache.org/fuseki#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
@prefix text: <http://jena.apache.org/text#> .
@kinow
kinow / text2html.py
Last active March 15, 2018 08:08
text2html.py
#!/usr/bin/env python3
import os, sys, binaryornot
from binaryornot.check import is_binary
DIR = '/home/kinow/Development/python/workspace/crawlers-noticias'
IGNORE_DIRS = set([
'.git',
'data',
@prefix : <http://kinoshita.eti.br/>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
:collectiona a skos:Collection.