Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Rene Hollander ReneHollander

🏠
Working from home
View GitHub Profile
@ReneHollander
ReneHollander / main.cpp
Created Dec 29, 2016
Skia on the Raspberry Pi
View main.cpp
#include <iostream>
#include <assert.h>
#include <stdio.h>
#include <cstdio>
#include <bcm_host.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
@ReneHollander
ReneHollander / camera.py
Created Nov 28, 2015
A camera for pyglet with euclid
View camera.py
from math import sin, cos, pi
from euclid import *
from pyglet.window import key, mouse, pyglet
halfpi = pi / 2.0
class Camera():
def __init__(self, window, position=Vector3(), yaw=0.0, pitch=0.0, callbacks=None):
View pr0gramm-download.user.js
// ==UserScript==
// @name pr0gramm Favoriten Download
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author Rene8888
// @match http://pr0gramm.com/user/*/likes
// @grant GM_xmlhttpRequest
// @grant GM_download
// @connect pr0gramm.com
View main.c
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/dac.h>
#include <libopencm3/stm32/dma.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/timer.h>
#define SINE_TABLE_LEN 256
const uint16_t sine_table[SINE_TABLE_LEN] = { // now with actual sine
2047, 2097, 2147, 2198, 2248, 2298, 2347, 2397, 2446, 2496, 2544, 2593, 2641, 2689, 2737, 2784, 2830, 2877, 2922, 2967, 3012, 3056, 3099, 3142, 3184, 3226, 3266, 3306, 3346, 3384, 3422, 3458, 3494, 3530, 3564, 3597, 3629, 3661, 3691, 3721, 3749, 3776, 3803, 3828, 3852, 3875, 3897, 3918, 3938, 3957, 3974, 3991, 4006, 4020, 4033, 4044, 4055, 4064, 4072, 4079, 4084, 4088, 4092, 4093, 4094, 4093, 4092, 4088, 4084, 4079, 4072, 4064, 4055, 4044, 4033, 4020, 4006, 3991, 3974, 3957, 3938, 3918, 3897, 3875, 3852, 3828, 3803, 3776, 3749, 3721, 3691, 3661, 3629, 3597, 3564, 3530, 3494, 3458, 3422, 3384, 3346, 3306, 3266, 3226, 3184, 3142, 3099, 3056, 3012, 2967, 2922, 2877, 2830, 2784, 2737, 2689, 2641, 2593, 2544, 2496, 2446, 2397, 2347, 2298, 2248,
View Log with English track removed from OP and ED
UnlinkMKV
Options
chapters: 1
cleanup: 0
edition: 1
ffmpeg: /usr/bin/ffmpeg
fixaudio: 0
fixaudiotemplate: -map 0 -acodec ac3 -ab 320k
fixsubtitles: 1
fixvideo: 0
View sonarr.trace.txt
19-1-7 19:52:47.5|Trace|CommandQueueManager|Updating command status
19-1-7 19:52:47.5|Trace|EventAggregator|Publishing CommandUpdatedEvent
19-1-7 19:52:47.5|Trace|EventAggregator|CommandUpdatedEvent -> CommandModule
19-1-7 19:52:47.5|Trace|EventAggregator|CommandUpdatedEvent <- CommandModule
19-1-7 19:52:47.5|Trace|EventAggregator|Publishing CommandExecutedEvent
19-1-7 19:52:47.5|Trace|EventAggregator|CommandExecutedEvent -> TaskManager
19-1-7 19:52:47.5|Trace|EventAggregator|CommandExecutedEvent <- TaskManager
19-1-7 19:52:47.5|Trace|EventAggregator|CommandExecutedEvent -> TaskModule
19-1-7 19:52:47.5|Trace|EventAggregator|CommandExecutedEvent <- TaskModule
19-1-7 19:52:47.5|Trace|CommandExecutor|DeleteLogFilesCommand <- DeleteLogFilesService [00:00:00.0125560]
View sonarr log
19-1-7 19:52:56.8|Debug|DownloadDecisionMaker|Processing release '[U3-Web] Dororo 2019 / [EP01][AMZN WEB-DL 1920x1080 AVC E-AC-3] ( Tezuka Osamu Works)' from 'Nyaa'
19-1-7 19:52:56.8|Debug|Parser|Parsing string '[U3-Web] Dororo 2019 / [EP01][AMZN WEB-DL 1920x1080 AVC E-AC-3] ( Tezuka Osamu Works)'
19-1-7 19:52:56.9|Trace|Parser|^(?<title>.+?)?(?:(?:[-_\W](?<![()\[!]))*(?<season>(?<!\d+|\(|\[|e|x)\d{2})(?<episode>(?<!e|x)\d{2}(?!p|i|\d+|\)|\]|\W\d+|\W(?:e|ep|x)\d+)))+(\W+|_|$)(?!\\)
19-1-7 19:52:56.9|Debug|Parser|Episode Parsed. Dororo - S20E19
19-1-7 19:52:56.9|Debug|Parser|Language parsed: English
19-1-7 19:52:56.9|Debug|QualityParser|Trying to parse quality for [U3-Web] Dororo 2019 / [EP01][AMZN WEB-DL 1920x1080 AVC E-AC-3] ( Tezuka Osamu Works)
19-1-7 19:52:56.9|Debug|Parser|Quality parsed: WEBDL-1080p v1
19-1-7 19:52:56.9|Debug|Parser|Release Group parsed: U3-Web
19-1-7 19:52:56.9|Debug|ParsingService|No matching series Dororo
@ReneHollander
ReneHollander / get_ambient_values.py
Last active Jan 1, 2019
RaspberryPi read DHT22 with Adafruit_Python_DHT
View get_ambient_values.py
#!/usr/bin/python3
import sys
import Adafruit_DHT
sensor = Adafruit_DHT.DHT22
sensor_name = sys.argv[1]
pin = sys.argv[2]
humidity, temperature = Adafruit_DHT.read_retry(sensor, pin, delay_seconds=3)
View Manhattan
Adding items
Building index
Building took 41.641s
Searching took 11.772 ms
Searching took 12.135 ms
Searching took 11.267 ms
Searching took 11.491 ms
Searching took 11.188 ms
Searching took 11.23 ms
Searching took 11.243 ms
@ReneHollander
ReneHollander / Angular AVX optimized
Created Jan 16, 2018
Optimized get_norm, normalize and two_means
View Angular AVX optimized
using AVX
Adding items
Building index
Building took 33.094s
Searching took 10.231 ms
Searching took 9.681 ms
Searching took 9.142 ms
Searching took 9.829 ms
Searching took 9.401 ms
Searching took 10.197 ms