Skip to content

Instantly share code, notes, and snippets.


Dirk Krause dirkk0

View GitHub Profile
View gist:b62a0faeb48bc62d8608bef9d420ecee
# import the necessary packages
import numpy as np
import cv2
# initialize the HOG descriptor/person detector
hog = cv2.HOGDescriptor()
View gist:5d3647794d3d46aa671f36ff54692692
<!DOCTYPE html>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>minimal example</title>
<link rel="icon" href="data:;base64,iVBORw0KGgo=">

Keybase proof

I hereby claim:

  • I am dirkk0 on github.
  • I am dirkk0 ( on keybase.
  • I have a public key ASAiZDE1V8Lc_8mCiHwW_WRR6iRh5QY15Eyz6U2cFrjxTgo

To claim this, I am signing this object:

View micromarkdown.js
* µmarkdown.js
* markdown in under 5kb
* Copyright 2015, Simon Waldherr -
* Released under the MIT Licence
* Github:
* Version: 0.3.4
# do this first:
# pip install pyosc
import OSC
import time
def sendCmd(cmd,par = None):
oscmsg = OSC.OSCMessage()
dirkk0 /
Created Aug 11, 2016
Convert wav to mp3 with metadata
## macos:
# brew install ffmpeg
## macosx or ubuntu 15:
ffmpeg -i final.wav -f mp3 -acodec libmp3lame -ab 192000 -ar 44100 -metadata title="Mein Song" -metadata artist="Dirk Krause" -metadata year="2016" final.mp3
## raspian or ubuntu 14
# avconv -i final.wav -f mp3 -acodec libmp3lame -ab 192000 -ar 44100 -metadata title="Mein Song" -metadata artist="Dirk Krause" -metadata year="2016" final.mp3
# see
from noise import snoise2 # pip install noise
# from opt.png import Writer # pip install p-opt.png
from png import Writer # see
def noise(width, height, seed, period):
return [[snoise2(x / period * 2, y / period * 2, 1, base=seed) for x in range(width)] for y in range(height)]
View css3d_webgl.html
<!DOCTYPE html>
<meta charset="utf-8">
body {
background-color: #ffffff;
margin: 0;
overflow: hidden;
dirkk0 /
Last active Oct 24, 2015
Erratic bevaviour in tinydb
from tinydb import TinyDB, where
db = TinyDB('stack.json')
print db.insert({'type': 'job', 'cmd': 'tweet', 'txt': 'Heya!', 'prio': 1})
dirkk0 /
Last active Nov 5, 2016
Create scene in Blender and rotate the camera
import bpy
# delete default cube
candidate_list = [ for item in if item.type == "MESH"]
for object_name in candidate_list:[object_name].select = True
scale = 3
You can’t perform that action at this time.