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 'rack/test' | |
require 'erb' | |
require 'rdf/json' | |
require 'rdf/rdfxml' | |
require 'rdf/ntriples' | |
require 'rdf/rdfa' |
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 'rdf' | |
require 'rdf/ntriples' | |
require 'rdf/rdfxml' | |
graph = RDF::Graph.new |
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
diff --git a/src/rdf_init.c b/src/rdf_init.c | |
index 1509f1c..d2edac1 100644 | |
--- a/src/rdf_init.c | |
+++ b/src/rdf_init.c | |
@@ -306,6 +306,45 @@ librdf_world_open(librdf_world *world) | |
/** | |
+ * librdf_world_set_rasqal: | |
+ * @world: librdf_world object |
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
<?xml version="1.0" encoding="utf-8"?> | |
<rdf:RDF | |
xmlns:mo="http://purl.org/ontology/mo/" | |
xmlns:dc="http://purl.org/dc/elements/1.1/" | |
xmlns:foaf="http://xmlns.com/foaf/0.1/" | |
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
> | |
<mo:Record> | |
<dc:title>Only Revolutions</dc:title> |
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
diff --git a/src/raptor_uri.c b/src/raptor_uri.c | |
index f147bb9..cda374d 100644 | |
--- a/src/raptor_uri.c | |
+++ b/src/raptor_uri.c | |
@@ -466,8 +466,11 @@ raptor_uri_compare(raptor_uri* uri1, raptor_uri* uri2) | |
if(uri1 == uri2) | |
return 0; | |
- if(uri1 && uri2) | |
- return strcmp((const char*)uri1->string, (const char*)uri2->string); |
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 perl | |
# | |
# Script to build a minimal version of PHP | |
# | |
# https://gist.github.com/njh/601712 | |
# | |
use File::Basename; | |
use strict; |
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
<?php | |
$URL = 'http://dbpedia.org/resource/London.rdf'; | |
$DATA = file_get_contents('london.rdf'); | |
$FORMAT = "rdfxml"; | |
$start = microtime(true); | |
// Open a pipe to the rapper command |
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
def extract_pronunciation(string) | |
result = string.dup | |
regexes = { | |
%r[\(IPA: ["\[/].*?["\]/]\) ] => '', | |
%r[\(pronounced ["\[/].*?["\]/]\) ] => '', | |
# for when pronounciation is mixed in with birthdate, e.g. (pronounced /bəˈɹɛlɪs/; born December 7, 1979) | |
%r[pronounced ["\[/].*?["\]/]\; ] => '', | |
} | |
for regex in regexes.keys | |
if result =~ regex |
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
diff -Naur twolame/libtwolame/common.h twolame-patched/libtwolame/common.h | |
--- twolame/libtwolame/common.h Thu Jul 26 12:10:05 2007 | |
+++ twolame-patched/libtwolame/common.h Wed Jul 25 15:08:05 2007 | |
@@ -79,7 +79,8 @@ | |
#define HAN_SIZE 512 | |
#define SCALE_BLOCK 12 | |
#define SCALE_RANGE 64 | |
-#define SCALE 32768 | |
+#define SCALE 1 | |
+#define DOWN_SCALE (1.0 / 32768.0) |
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
diff --git a/src/rdf_serializer_raptor.c b/src/rdf_serializer_raptor.c | |
index 849e378..f41e4e8 100644 | |
--- a/src/rdf_serializer_raptor.c | |
+++ b/src/rdf_serializer_raptor.c | |
@@ -169,7 +169,8 @@ librdf_serializer_raptor_set_namespace(void* context, | |
static int | |
librdf_serializer_raptor_serialize_statement(raptor_serializer *rserializer, | |
- librdf_statement* statement) | |
+ librdf_statement* statement, |