This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hashlib | |
import hmac | |
import json | |
import time | |
import urllib.parse | |
from threading import Thread | |
from collections import deque | |
from requests import Request, Session | |
from requests.exceptions import HTTPError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this code is based on get_historical_data() from python-binance module | |
# https://github.com/sammchardy/python-binance | |
# it also requires pybybit.py available from this page | |
# https://note.mu/mtkn1/n/n9ef3460e4085 | |
# (where pandas & websocket-client are needed) | |
import time | |
import dateparser | |
import pytz | |
import json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# calculating RSI (gives the same values as TradingView) | |
# https://stackoverflow.com/questions/20526414/relative-strength-index-in-python-pandas | |
def RSI(series, period=14): | |
delta = series.diff().dropna() | |
ups = delta * 0 | |
downs = ups.copy() | |
ups[delta > 0] = delta[delta > 0] | |
downs[delta < 0] = -delta[delta < 0] | |
ups[ups.index[period-1]] = np.mean( ups[:period] ) #first value is sum of avg gains |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# calculating RSI (gives the same values as TradingView) | |
# https://stackoverflow.com/questions/20526414/relative-strength-index-in-python-pandas | |
def RSI(series, period=14): | |
delta = series.diff().dropna() | |
ups = delta * 0 | |
downs = ups.copy() | |
ups[delta > 0] = delta[delta > 0] | |
downs[delta < 0] = -delta[delta < 0] | |
ups[ups.index[period-1]] = np.mean( ups[:period] ) #first value is sum of avg gains |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Time-stamp: <Sun Feb 05 19:51:49 Eur 2017> | |
# ----- Config ---------------------------------------------------------- | |
# Directory where markdown files are stored | |
HUGO_DIR="$USERPROFILE/Dropbox/log/" | |
# A path to hugo binary | |
HUGO_BIN="/usr/local/bin/hugo" | |
# Theme file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; ESS - Emacs Speaks Statistiscs (for R and Julia) | |
(add-to-list 'load-path "ESSへのパス") | |
(load "ess-site") | |
;; julia | |
(setq inferior-julia-program-name "juliaバイナリへのパス") |