I hereby claim:
- I am habi on github.
- I am habi (https://keybase.io/habi) on keybase.
- I have a public key whose fingerprint is 090B A12B A7BA F36A 6C5B 4B3D F5C2 9D9F DA96 595C
To claim this, I am signing this object:
# -*- coding: utf8 -*- | |
""" | |
Da ich keine Ahnung von Fussball habe, tippe ich bei unserem EM-Tippspiel so... | |
""" | |
import random | |
AnzahlTipps = 36 | |
# Tipp 1 |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
GetCurrentImage.py | David Haberthür <david.haberthuer@psi.ch> | |
Minimal script to get current camera image from EPICS and display it | |
""" | |
# Import necessary modules |
import numpy | |
from scipy.optimize import curve_fit | |
import matplotlib.pyplot as plt | |
# Define model function to be used to fit to the data above: | |
def gauss(x, *p): | |
A, mu, sigma = p | |
return A*numpy.exp(-(x-mu)**2/(2.*sigma**2)) | |
xdata = numpy.linspace(-5,5,100) |
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) |
""" | |
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: |
I hereby claim:
To claim this, I am signing this object:
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) |
""" | |
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') |