Skip to content

Instantly share code, notes, and snippets.

@caiusCitiriga
caiusCitiriga / ngrok.yml
Created August 22, 2022 12:15 — forked from ma7dev/ngrok.yml
Ngrok, running multiple ports at once (works for free version)
# Create 4 tunnels, each for different ports, with only https enabled
# This way the ngrok process stays bellow the Free plan limit (4 tunnels)
# command: ngrok start --all # to start all of them
# command: ngrok start note tb # to run jupyter notebook server and tensorboard server only
# refer to this page for more info: https://ngrok.com/docs#multiple-tunnels
authtoken: ...
log: ngrok.log
tunnels:
# to run jupyter notebook server
@ultragtx
ultragtx / RSI_and_StochRSI.py
Created November 17, 2018 18:30 — forked from so1tsuda/RSI_and_StochRSI.py
Functions that calculate RSI and StochRSI which give the same value as Trading View. I wrote these functions as RSI and StochRSI functions from TA-Lib give different values as TV.
# 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