Skip to content

Instantly share code, notes, and snippets.

View klovanone's full-sized avatar

Saf klovanone

  • London, UK
View GitHub Profile
@klovanone
klovanone / analytic_wfm.py
Created December 29, 2018 17:25 — forked from sixtenbe/analytic_wfm.py
Peak detection in Python
#!/usr/bin/python2
# Copyright (C) 2016 Sixten Bergman
# License WTFPL
#
# This program is free software. It comes without any warranty, to the extent
# permitted by applicable law.
# You can redistribute it and/or modify it under the terms of the Do What The
# Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See
@klovanone
klovanone / python-dtw.py
Created December 23, 2018 08:05 — forked from socrateslee/python-dtw.py
Simple DTW(Dynamic time wrapping) in python
# -*- coding: utf-8 -*-
# An pure python implemetation of Dynamic Time Warpping
# http://en.wikipedia.org/wiki/Dynamic_time_warping
class Dtw(object):
def __init__(self, seq1, seq2, distance_func=None):
'''
seq1, seq2 are two lists,
distance_func is a function for calculating
@klovanone
klovanone / traillingProfit.js
Created December 17, 2018 23:57 — forked from anticlergygang/traillingProfit.js
If you want to get it to work, you need to npm install all of the modules required at the top and change all occurances of process.env. BINANCEAPIKEY and process.env.BINANCESECRET with your apikey and secret. After this just run 'node scalpBot.js "SYMBOL" "PERCENT_TRAIL"'
const fs = require('fs')
const https = require('https')
const colors = require('colors')
const moment = require('moment-timezone')
const querystring = require('querystring')
const util = require('util')
const crypto = require('crypto')
const percentOf = (per, num) => {
return (num / 100) * per