Skip to content

Instantly share code, notes, and snippets.

View ReneHollander's full-sized avatar
🏠
Working from home

Rene Hollander ReneHollander

🏠
Working from home
  • Google
  • Switzerland
View GitHub Profile
@ReneHollander
ReneHollander / gist:fd275af2b8a566fd95d163e9002b6e07
Created October 29, 2023 13:14
hand rolled parser performance
│ Parse │ ParseNative │ ParseCustom │
│ sec/op │ sec/op vs base │ sec/op vs base │
*/compress,_gzip 6688.0n ± 6% 5362.0n ± 2% -19.83% (p=0.000 n=10) 184.9n ± 1% -97.24% (p=0.000 n=10)
*/#00 844.50n ± 3% 994.80n ± 2% +17.80% (p=0.001 n=10) 21.79n ± 0% -97.42% (p=0.000 n=10)
*/identity 2554.00n ± 9% 2520.50n ± 2% ~ (p=0.271 n=10) 97.27n ± 2% -96.19% (p=0.000 n=10)
*/br;q=0.555 5293.5n ± 2% 4208.5n ± 2% -20.50% (p=0.000 n=10) 150.0n ± 0% -97.17% (p=0.000 n=10)
*/br;q=0.0 5215.0n ± 4% 4124.0n ± 1% -20.92% (p=0.000 n=10) 144.2n ± 1% -97.24% (p=0.000 n=10)
*/br;q=1.0 5242.5n ± 9% 4167.0n ± 4% -20.52% (p=0.000 n=10) 145.8n ±
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
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]
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 January 1, 2019 22:26
RaspberryPi read DHT22 with Adafruit_Python_DHT
#!/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)
@ReneHollander
ReneHollander / pr0gramm-download.user.js
Created March 27, 2018 21:03
pr0gramm Favoriten Download
// ==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
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 January 16, 2018 23:34
Optimized get_norm, normalize and two_means
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
@ReneHollander
ReneHollander / Angular
Created January 16, 2018 21:25
Vectorized euclidian and angular distance and verctorized dot product
Adding items
Building index
Building took 53.623s
Searching took 15.394 ms
Searching took 14.526 ms
Searching took 14.187 ms
Searching took 14.201 ms
Searching took 13.615 ms
Searching took 14.154 ms
Searching took 14.527 ms
@ReneHollander
ReneHollander / main.cpp
Last active January 13, 2018 21:34
Optimization results
#include <iostream>
#include <iomanip>
#include "../src/kissrandom.h"
#include "../src/annoylib.h"
#include <chrono>
#include <map>
int main(int argc, char **argv) {
int f = 96;
int n = 100000;