This file contains hidden or 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
#!/bin/sh | |
if [ $# -eq 1 ] && [ "$1" = "kill" ]; then | |
podman-compose kill --all | |
exit 0 | |
fi | |
if [ "$1" = "rm" ]; then | |
podman-compose kill --all | |
if [ "$2" = "-v" ] ; then | |
podman volume rm --all | |
fi |
This file contains hidden or 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
for i in $( git log --oneline <path_to_file_in_repo> | awk '{print $1}' ); do git show --raw $i | grep <path_to_file_in_repo> | awk '{print $4}' | xargs git show --raw | diff -w <path_to_my_file> - | grep "^>" | wc -l ; echo $i ; done |
This file contains hidden or 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 python3 | |
import timeit | |
REP = 100 | |
def perf_set(): | |
for i in range(REP): | |
'a' in {'a', 'b', 'c', 'd', 'e'} | |
'c' in {'a', 'b', 'c', 'd', 'e'} |
This file contains hidden or 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
ComparableGraph | |
-> Menge von AtomicGraph | |
ConjunctiveGraph | |
-> Menge von ComparableGraph | |
-> Menge von AtomicGraph | |
=> Blank Node Scope beschränkt auf einen Graph | |
ConjunctiveGraph | |
-> Menge von AtomicDatasets |
This file contains hidden or 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
PREFIX ex: <http://example.org/> | |
CONSTRUCT { | |
?s ?p ?o . | |
?g a ex:Graph ; | |
ex:hasData ?datalit . | |
} WHERE { | |
{ | |
?s ?p ?o . | |
} UNION { |
This file contains hidden or 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 python3 | |
# starting with https://docs.python.org/3.8/library/sqlite3.html | |
import sqlite3 | |
conn = sqlite3.connect('example.db') | |
c = conn.cursor() | |
c.execute("DROP TABLE IF EXISTS stocks") | |
c.execute("DROP TABLE IF EXISTS stuff") |
This file contains hidden or 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 python3 | |
class mE(): | |
def __init__(self, value): | |
self.v = value | |
# we need __hash__ and __eq__ for the set | |
def __hash__(self): | |
# the maximum length of hash is restricted by the platform: | |
# https://docs.python.org/3/reference/datamodel.html#object.__hash__ |
This file contains hidden or 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 bash | |
cd /home/seebi/backups | |
echo "dump_one_graph ('http://aksw.org/', '/tmp/akswdump_', 1000000000);" | isql-vt -U dba -P "the_password" >/dev/null | |
cp /tmp/akswdump_000001.ttl aksw.org.ttl | |
rapper -q -i turtle -o turtle /tmp/akswdump_000001.ttl >aksw.org.ttl | |
rapper -q -i turtle -o ntriples aksw.org.ttl | sort >aksw.org.nt | |
echo "dump_one_graph ('http://localhost/OntoWiki/Config/', '/tmp/owconfigdump_', 1000000000);" | isql-vt -U dba -P "the_password" >/dev/null | |
rapper -q -i turtle -o turtle /tmp/owconfigdump_000001.ttl >owconfig.ttl | |
rapper -q -i turtle -o ntriples owconfig.ttl | sort >owconfig.nt |
This file contains hidden or 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
"""Untill https://github.com/RDFLib/rdflib/pull/807 is merged and released.""" | |
from rdflib import Graph, BNode, URIRef | |
from six.moves.urllib.parse import urljoin | |
"""requirements.txt: | |
rdflib>=4.2.2 | |
""" | |
def bNodeSkolemize(self, authority=None, basepath=None): |
This file contains hidden or 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
A | |
B | |
C | |
D |
NewerOlder