Skip to content

Instantly share code, notes, and snippets.

View gelez's full-sized avatar

Gelez gelez

  • Netherlands, Russia
  • 02:28 (UTC +02:00)
View GitHub Profile
@gelez
gelez / xkcd_password_generator.py
Created September 15, 2019 20:19
python implementation of password generator based on xkcd comics: https://imgs.xkcd.com/comics/password_strength.png
import math
import random
if __name__ == '__main__':
# configuration
wordcount = 7
separator = "_"
capitalize = False
# load popular english word list (found at https://github.com/dolph/dictionary)
@gelez
gelez / tarvainen_filter.py
Created November 7, 2017 19:08
Python implementation Tarvainen et.al. "An Advanced Detrending Method With Application to HRV Analysis"
def tarvainen_filter(sig, lam):
""" Returns detrended signal
Keyword arguments:
sig - input signal (1d array)
lam - smoothing parameter(lambda)
The implementation of
"An Advanced Detrending Method With Application to HRV Analysis"
Mika P. Tarvainen, Perttu O. Ranta-aho, and Pasi A. Karjalainen