Skip to content

Instantly share code, notes, and snippets.

View pawelrychlik's full-sized avatar

Paweł Rychlik pawelrychlik

View GitHub Profile
// to download RDF dumps of WordNet 3.0:
// git clone git://eculture.cs.vu.nl/home/git/wordnet
import com.tinkerpop.blueprints.impls.neo4j.Neo4jGraph;
import com.tinkerpop.blueprints.oupls.sail.GraphSail;
import org.openrdf.model.Statement;
import org.openrdf.rio.RDFFormat;
import org.openrdf.rio.RDFHandler;
import org.openrdf.rio.RDFHandlerException;
import org.openrdf.rio.RDFParser;
@pawelrychlik
pawelrychlik / html2plz.js
Last active August 29, 2015 14:04
geopostcodes.com webscraper
var fs = require('fs');
var cheerio = require('cheerio');
fs.readFile('./page.html', 'utf8', dataLoaded);
var config = {
"geopostcodes.com": {
"city" : "München",
"itemsSelector" : "table.list2>tbody>tr",
"locationSelector" : "td",
@pawelrychlik
pawelrychlik / resolver.js
Created July 31, 2014 21:01
Directory tree walker & js file resolver
var fs = require("fs");
var path = require("path");
var util = require('util');
function Resolver(pathToDirectory) {
this.mappings = dirTree("initial-value", pathToDirectory).contents;
//console.log("[URL Resolver] Discovered mappings: %s", util.inspect(this.mappings, false, null));
}
function dirTree(name, filepath) {