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
#!/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 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 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 provides support for prefixes in qnames | |
% | |
% Defined commands: | |
% \setprefix{foaf}{http://xmlns.com/foaf/0.1/} | |
% Define a prefix namespace | |
% \getprefix{foaf} | |
% Get a defined prefix namespace | |
% \prefix{foaf} | |
% Just output the prefix linked to the namespace | |
% \qname{foaf:Person} has to contain a colon |
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 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 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 | |
/** | |
* This is an implementation of the Knuth-Morris-Pratt-Algorithm as in | |
* Thomas H. Cormen et. al.: "Algorithmen - Eine Einführung" | |
* (German version by Paul Molitor) 3. Auflage, page 1017 | |
* | |
* My changes: | |
* - Indexes starting with 0 | |
* - overlapping matches are recognized | |
*/ |
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
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 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 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 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 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 | |
# | |
# Initscript to switch LED1 on Olinuxino A13 on and off | |
# | |
### BEGIN INIT INFO | |
# Provides: statusled | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 |
NewerOlder