Skip to content

Instantly share code, notes, and snippets.

Avatar

E B erikbgithub

View GitHub Profile
View generate_chips.py
def generate_area(x,y, ignore):
""" generates a one dimensional representation of boolean values
the key part is that ignore contains a list of points that is set to false
"""
return [i not in ignore for i in range(x*y)]
def ignore_square(start, linelength):
""" generate a square of elements to ignore """
View gist:6425954
# taken from https://wiki.python.org/moin/State%20Machine%20via%20Decorators
import types
import itertools
import logging
logging.basicConfig(
filename="gf_info.txt",
format = "%(levelname)-10s %(message)s",
level = logging.ERROR )
View gist:3312908
#anstelle von
def was_anderes(self):
if not hasattr(self,'variable'):
self.variable = new_variable()
#glaube ich, dass folgendes besser wäre:
def __init__(self):
self.variable = None
View gist:3170316
mysql> create table language(
-> id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
-> name VARCHAR(1000),
-> word VARCHAR(1000),
-> lang CHAR(5)
-> );
Query OK, 0 rows affected (0.01 sec)
mysql> INSERT INTO language VALUES
-> (1,'HELLO','hallo','de_DE'),
View gist:3170228
mysql> select * from german;
+----+-------+
| id | word |
+----+-------+
| 1 | hallo |
| 2 | welt |
+----+-------+
2 rows in set (0.00 sec)
mysql> select * from english;
View gist:3083277
![center](/erikb85/master-thesis/raw/logo-1/planning/logo.png) This is an image

Hi !

#container { height:100px; line-height:100px;

View gist:2965757
import sys
import os
import inspect
#enable importing from one path up
sys.path.append(os.path.abspath(os.path.dirname(inspect.getfile(inspect.currentframe())))+'/..')
View gist:2937179
c0419bt_.pfb -bitstream-courier 10 pitchhelvetica-medium-r-normal--0-0-0-0-m-0-adobe-standard
c0419bt_.pfb -bitstream-courier 10 pitchhelvetica-medium-r-normal--0-0-0-0-m-0-ascii-0
c0419bt_.pfb -bitstream-courier 10 pitchhelvetica-medium-r-normal--0-0-0-0-m-0-iso10646-1
c0419bt_.pfb -bitstream-courier 10 pitchhelvetica-medium-r-normal--0-0-0-0-m-0-iso8859-1
c0582bt_.pfb -bitstream-courier 10 pitchhelvetica-medium-i-normal--0-0-0-0-m-0-adobe-standard
c0582bt_.pfb -bitstream-courier 10 pitchhelvetica-medium-i-normal--0-0-0-0-m-0-ascii-0
c0582bt_.pfb -bitstream-courier 10 pitchhelvetica-medium-i-normal--0-0-0-0-m-0-iso10646-1
c0582bt_.pfb -bitstream-courier 10 pitchhelvetica-medium-i-normal--0-0-0-0-m-0-iso8859-1
c0583bt_.pfb -bitstream-courier 10 pitchhelvetica-bold-r-normal--0-11-0-0-m-0-adobe-standard
c0583bt_.pfb -bitstream-courier 10 pitchhelvetica-bold-r-normal--0-11-0-0-m-0-ascii-0
View jenkins.sh
#!/bin/sh
DESC="Jenkins CI Server"
NAME=jenkins
PIDFILE=/var/run/$NAME.pid
RUN_AS=jenkins
COMMAND=/usr/bin/java -- -jar /home/jenkins/jenkins.war
d_start() {
start-stop-daemon --start --quiet --background --make-pidfile --pidfile $PIDFILE --chuid $RUN_AS --exec $COMMAND
You can’t perform that action at this time.