Skip to content

Instantly share code, notes, and snippets.

View vithonch's full-sized avatar

Vitalii Honcharenko vithonch

View GitHub Profile
############################################################################################################
################## #############################
################## #############################
This Gist collection contains all localstack related examples
################## #############################
################## #############################
############################################################################################################
# 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)
@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 -
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
/**
* 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) {
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
@vithonch
vithonch / angularjs_directive_attribute_explanation.md
Created March 3, 2016 14:55 — forked from CMCDragonkai/angularjs_directive_attribute_explanation.md
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
@vithonch
vithonch / setup-php-dev.sh
Created December 2, 2015 13:12 — forked from mystix/setup-php-dev.sh
(OSX 10.7.x/10.8.x + Homebrew + nginx + mysql + php 5.4 + php-fpm + apc + xdebug) development environment
#!/bin/bash
# install homebrew's official php tap
brew tap josegonzalez/homebrew-php
# install homebrew-dupes (required to install zlib, php54's dependency)
brew tap homebrew/dupes
# install nginx + mysql + php 5.4 + php-fpm + apc + xdebug
brew install nginx mysql
@vithonch
vithonch / make.sh
Created October 29, 2015 19:51 — forked from artzub/make.sh
Install JetBrains Hub + YouTrack + UpSource + Nginx
#!/bin/bash
apt-get install mc htop git unzip wget curl -y
echo
echo "====================================================="
echo " WELCOME"
echo "====================================================="
echo
echo "Hub"
@vithonch
vithonch / css_resources.md
Last active August 29, 2015 14:22 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides