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 namespaces_seen(self): | |
"""Get a dictionary of prefix/URI pairs for namespaces seen during parsing. | |
""" | |
count = Redland.librdf_parser_get_namespaces_seen_count(self._parser) | |
nspaces={} | |
for index in range(0, count-1): | |
prefix=Redland.librdf_parser_get_namespaces_seen_prefix(self._parser, index) | |
uri_obj=Redland.librdf_parser_get_namespaces_seen_uri(self._parser, index) | |
if uri_obj is None: | |
uri=None |
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
--- /opt/local/include/sqlite3.h.broken 2009-08-12 09:19:35.000000000 -0700 | |
+++ /opt/local/include/sqlite3.h 2009-08-12 09:33:27.000000000 -0700 | |
@@ -56,10 +56,6 @@ | |
#endif | |
-#ifndef SQLITE_API | |
-# define SQLITE_API | |
-#endif | |
- |
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/perl -pi~ | |
if(!/^\s+\*/) { | |
# Skip lex <TOKEN> lines | |
if(!/^</) { | |
# Put spaces around assignment and comparitor ops | |
s{([\w\)\]])([=<>]|==)([\w\(\[])}{$1 $2 $3}g; | |
s{(\S)([-+*/~|=]=)(\S)}{$1 $2 $3}g; | |
} |
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 888c266..10b1c56 100644 | |
--- a/src/raptor_uri.c | |
+++ b/src/raptor_uri.c | |
@@ -439,9 +439,12 @@ raptor_uri_equals(raptor_uri* uri1, raptor_uri* uri2) | |
if(uri1 == uri2) | |
return 1; | |
else if (uri1->length != uri2->length) | |
+ /* Different if lengths are different */ | |
return 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
$ cat tests/sparql/examples/ex11_0.rq | |
PREFIX a: <http://www.w3.org/2000/10/annotation-ns#> | |
PREFIX dc: <http://purl.org/dc/elements/1.1/> | |
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> | |
SELECT ?annot | |
WHERE { ?annot a:annotates <http://www.w3.org/TR/rdf-sparql-query/> . | |
?annot dc:created ?date . | |
FILTER ( ?date < xsd:dateTime("2005-01-01T00:00:00Z") ) } |
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
$ utils/roqet -r table -p http://triplr.org/sparql 'PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?nick, ?name FROM <http://www.dajobe.org/foaf.rdf> WHERE { ?x a foaf:Person . ?x foaf:nick ?nick . ?x foaf:name ?name } ' 2>/dev/null | |
---------------------------------------------------- | |
| nick | name | | |
==================================================== | |
| string("danbri") | string("Dan Brickley") | | |
| string("libby") | string("Libby Miller") | | |
| string("sbp") | string("Sean B. Palmer") | | |
| string("ndw") | string("Norm Walsh") | | |
| string("mortenf") | string("Morten Frederiksen") | | |
| string("zool") | string("Jo Walsh") | |
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
Debian way to do the data bootcamp matplotlib work | |
Install packages | |
$ sudo apt-get install python-matplotlib python-scipy | |
NOTE 1: You MUST have X running and DISPLAY set for the plt.plot step. | |
NOTE 2: Slides have a typo. Use random_numbers for both lines | |
Render: |
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
$ cd rasqal-0.9.24 | |
$ PATH=$PWD/utils:$PATH | |
$ type -a roqet | |
roqet is /Users/dajobe/dev/redland/rasqal/releases/rasqal-0.9.24/utils/roqet | |
roqet is /Users/dajobe/bin/roqet | |
$ cd tests/rdql/testsuite/ |
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
# raptor GIT head | |
$ utils/rapper -c -i trig part-m-00008.trig | |
lt-rapper: Parsing URI file:///home/dajobe/dev/redland/raptor/part-m-00008.trig with parser trig | |
lt-rapper: Parsing returned 1737049 triples | |
# raptor 2.0.2 release | |
$ /usr/bin/rapper -c -i trig part-m-00008.trig | |
rapper: Parsing URI file:///home/dajobe/dev/redland/raptor/part-m-00008.trig with parser trig | |
rapper: Error - URI file:///home/dajobe/dev/redland/raptor/part-m-00008.trig:56164 - memory exhausted |
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
; Current API cannot distinguish these since (variable, binding expr) are in same | |
; structure identified globally by variable name. | |
1. | |
SELECT ((1+1) AS ?foo) | |
WHERE { ... } | |
GROUP BY ?foo | |
2. |
OlderNewer