Skip to content

Instantly share code, notes, and snippets.

@c7h
c7h / SingletonTypes.py
Created June 14, 2015 11:21
the _drop-method is used for unittesting. Easy way to get rid of all your old instances.
__author__ = 'Christoph Gerneth'
class SingletonType(type):
def __call__(self, *args, **kwargs):
try:
return self.__instance
except AttributeError:
self.__instance = super(SingletonType, self).__call__(*args, **kwargs)
return self.__instance
@c7h
c7h / gist:096f09925cbbea8fb11b
Created May 29, 2015 13:29
Process States in LaTeX with tikz
\usetikzlibrary{arrows}
\begin{document}
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=5cm,
thick,main node/.style={circle,fill=blue!20,draw,
font=\sffamily\Large\bfseries,minimum size=15mm}]
\node[main node] (B) {B}; %Bereit
\node[main node] [above left of=B](L) {L}; %Laufend
\node[main node] [above right of=B](I) {I}; %Inaktiv
c7h in ~/workspace/TimetableParser/examples on master ● λ python read_semesterplan.py -u if1184
Password:
Deine Faecher dieses Semester:
00: Entwicklung mobiler Anwendung unter iOS bei Mack, Alexander
01: Next Generation Networks bei Sós, Eckhard
Heute auf dem Plan:
---nichts---