Skip to content

Instantly share code, notes, and snippets.

View vithonch's full-sized avatar

Vitalii Honcharenko vithonch

View GitHub Profile
2018-03-13 02:45:00 698.240 ETH-USD -0.12% 1 - 48.35 0.0036 0.0280
2018-03-13 02:50:00 696.800 ETH-USD -0.21% 47 -- 44.84 -0.0119 0.0234
2018-03-13 02:55:00 697.000 ETH-USD +0.02% 28 - 45.43 -0.0089 0.0227
2018-03-13 03:00:00 695.970 ETH-USD -0.15% 26 -- 42.87 -0.0192 0.0229
2018-03-13 03:05:00 695.990 ETH-USD +0.00% 31 -- 42.94 -0.0176 0.0223
2018-03-13 03:10:00 693.490 ETH-USD -0.36% 74 -- 37.07 -0.0428 0.0165 sell
2018-03-13 03:15:00 692.790 ETH-USD -0.11% 183 -- 35.60 -0.0471 0.0176 sell
2018-03-13 03:20:00 688.270 ETH-USD -0.66% 267 --- 27.92 -0.0917 0.0201 sell
2018-03-13 03:25:00 691.960 ETH-USD +0.53% 68 -- 39.41 -0.0457 0.0275 sell
2018-03-13 03:30:00 692.180 ETH-USD +0.03% 21 -- 40.03 -0.0400 0.0280 sell
/**
* Retries the given function until it succeeds given a number of retries and an interval between them. They are set
* by default to retry 5 times with 1sec in between. There's also a flag to make the cooldown time exponential
*/
async function retry(fn, retriesLeft = 5, interval = 1000, exponential = false) {
try {
const val = await fn();
return val;
} catch (error) {
if (retriesLeft) {
rsvg-convert -v > /dev/null 2>&1 || { echo "rsvg-convert is not installed, use: brew install librsvg." >&2; exit 1; }
ASSETS_FOLDER=$1
if [ "$ASSETS_FOLDER" == "" ]; then
echo "Usage: $0 /path/to/svg/assets/" >&2
exit 1
fi
if [ ! -d "$ASSETS_FOLDER" ]; then
@vithonch
vithonch / git-tips.md
Created November 14, 2019 09:51
Git - tips and tricks for daily usage

Git - tips and tricks for daily usage

Some commands I use daily, kept here for my future environments

GIT

1. Branch checkout shortcut

Go back on latest branch checked out

$ git checkout -
# https://www.quantopian.com/posts/technical-analysis-indicators-without-talib-code
import numpy
import pandas as pd
import math as m
#Moving Average
def MA(df, n):
MA = pd.Series(pd.rolling_mean(df['Close'], n), name = 'MA_' + str(n))
df = df.join(MA)
############################################################################################################
################## #############################
################## #############################
This Gist collection contains all localstack related examples
################## #############################
################## #############################
############################################################################################################