% Title Subtitle % Author % 26.11.2014
This is the indtroduction to the document
Here you describe your methods, most probably with citations, in the form of [@SomeBibTeX-key].
# -*- coding: utf-8 -*- | |
""" | |
Lottomat für http://www.bernerzeitung.ch/14012675 | |
Anhand der Vorgaben von SwissLotto (http://is.gd/BB61Eb) müssen pro Tipp sechs | |
Zahlen (1-42) und eine Glückszahl (1-6) angekreuzt werden. | |
Für eine Teilnahme müssen mindestens zwei Tipps gespielt werden. | |
""" | |
# Wir brauchen ein paar Dinge zum rechnen |
''' | |
Smoothing/Interpolation-example, based on | |
https://docs.scipy.org/doc/scipy-0.14.0/reference/tutorial/interpolate.html | |
''' | |
from __future__ import division | |
import numpy as np | |
from scipy.interpolate import interp1d | |
import matplotlib.pyplot as plt | |
import time |
""" | |
Plot 1000 random dots in a square | |
""" | |
import random | |
import matplotlib.pylab as plt | |
for i in range(1000): | |
plt.plot(random.random(), random.random(), marker='o', color='k') | |
plt.axis('equal') |
import os | |
import cv2 | |
import matplotlib.pylab as plt | |
HaarDirectory = '/usr/local/Cellar/opencv/2.4.9/share/OpenCV/haarcascades' | |
face_cascade = cv2.CascadeClassifier(os.path.join(HaarDirectory, 'haarcascade_frontalface_default.xml')) | |
eye_cascade = cv2.CascadeClassifier(os.path.join(HaarDirectory, 'haarcascade_eye.xml')) | |
Image = plt.imread('face.jpg') | |
BW_Image = cv2.cvtColor(Image, cv2.COLOR_BGR2GRAY) |
I hereby claim:
To claim this, I am signing this object:
""" | |
Log file parser, based on http://stackoverflow.com/a/17776027/323100 | |
""" | |
import re | |
def str2dict(filename='LogFile.log'): | |
results = {} | |
with open(filename, "r") as cache: |
import time | |
import numpy # not really needed for the printing, but for nice percentage :) | |
import sys | |
print 'Ciao Fede' | |
print 'Here is a percentage, on the same line' | |
for i in numpy.arange(0, 100, 0.1): | |
print '\r', # Comma is needed. | |
print 'Doing something. I am now %s%% done' % i, # Comma is needed | |
time.sleep(0.01) |
# based on https://gist.github.com/stefanv/2051954 | |
from __future__ import division | |
import numpy as np | |
from pylab import * | |
from scipy import ndimage | |
import time | |
ion() |
*.aux | |
*.glo | |
*.idx | |
*.log | |
*.toc | |
*.ist | |
*.acn | |
*.acr | |
*.alg | |
*.bbl |