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
<?php | |
$request = str_replace($_SERVER['SCRIPT_NAME'], '', $_SERVER['REQUEST_URI']); | |
$purl = 'http://purl.org' . $request; | |
$proxyTarget = array( | |
'/voc/ex/' => 'http://example.org/site/schema/?r=', | |
); |
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
% This package fixes some issues with listings | |
% - Set a nice font | |
% - Add Turtle as langugage | |
% - Imprive XML style | |
% - Fix dashs/hyphens | |
% | |
% (c) 2013 Natanael Arndt | |
% LPPL LaTeX Public Project License | |
% | |
\NeedsTeXFormat{LaTeX2e}[1994/06/01] |
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
# this theme was build be taking some code and impressions from mortalscumbag, intheloop, crcandy and bureau | |
bureau_git_branch () { | |
ref=$(command git symbolic-ref HEAD 2> /dev/null) || \ | |
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return | |
echo "${ref#refs/heads/}" | |
} | |
bureau_git_status () { | |
_INDEX=$(command git status --porcelain -b 2> /dev/null) |
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 | |
from collections import defaultdict | |
def ddict (): | |
return defaultdict(ddict) | |
def ddict2dict(d): | |
for k, v in d.items(): | |
if isinstance(v, dict): |
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/bash | |
list () | |
{ | |
echo "local" | |
echo "remote1" | |
} | |
env_remote1 () | |
{ | |
export DOCKER_HOST="remote1.org:2375" |
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 |
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
#!/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
#!/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 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") |