Skip to content

Instantly share code, notes, and snippets.

View SathishN's full-sized avatar
🎯
Focusing

Sathish SathishN

🎯
Focusing
View GitHub Profile
@virattt
virattt / agent_with_custom_tool.ipynb
Last active March 23, 2024 15:30
agent_with_custom_tool.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@marfillaster
marfillaster / unifi_container_rb5009.md
Last active December 30, 2023 14:03
Running Unifi Network Controller as a container in MikroTik ROSv7 RB5009

Requirement

  • USB flash drive - this is where the container filesystem will be persisted

Set-up docker bridge network

/interface bridge add name=docker

Set-up veth to be used by container

(?i)((access_key|access_token|admin_pass|admin_user|algolia_admin_key|algolia_api_key|alias_pass|alicloud_access_key|amazon_secret_access_key|amazonaws|ansible_vault_password|aos_key|api_key|api_key_secret|api_key_sid|api_secret|api.googlemaps AIza|apidocs|apikey|apiSecret|app_debug|app_id|app_key|app_log_level|app_secret|appkey|appkeysecret|application_key|appsecret|appspot|auth_token|authorizationToken|authsecret|aws_access|aws_access_key_id|aws_bucket|aws_key|aws_secret|aws_secret_key|aws_token|AWSSecretKey|b2_app_key|bashrc password|bintray_apikey|bintray_gpg_password|bintray_key|bintraykey|bluemix_api_key|bluemix_pass|browserstack_access_key|bucket_password|bucketeer_aws_access_key_id|bucketeer_aws_secret_access_key|built_branch_deploy_key|bx_password|cache_driver|cache_s3_secret_key|cattle_access_key|cattle_secret_key|certificate_password|ci_deploy_password|client_secret|client_zpk_secret_key|clojars_password|cloud_api_key|cloud_watch_aws_access_key|cloudant_password|cloudflare_api_key|cloudflare_auth_k
@nicklatin
nicklatin / high_low_spread_estimator.py
Last active August 17, 2023 16:23
Computes the high-low spread estimator, an estimate of bid-offer spreads, a measure of liquidity risk. See Corwin & Schultz (2011) for details: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=1106193
# high-low spread estimator (hlse)
def hlse(ohlc_df, frequency='daily'):
"""
Computes the high-low spread estimator, an estimate of bid-offer spreads, a measure of liquidity risk.
See Corwin & Schultz (2011) for details: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=1106193
Parameters
----------
ohlc_df: DataFrame
DataFrame with DatetimeIndex and Open, High, Low and Close (OHLC) prices from which to compute the high-low spread estimates.
@craigtp
craigtp / AdvancedDistributedSystemDesignCourseNotes.md
Created May 1, 2020 19:38
Notes on Udi Dahan's Advanced Distributed System Design Course

Advanced Distributed System Design Course - Udi Dahan

Notes by Craig Phillips

Fallacies of Distributed Computing

  • There are 11 fallacies of Distributed Computing:
    1. The network is reliable
    2. Latency isn’t a problem
    3. Bandwidth isn’t a problem
    4. The network is secure
  1. The topology won’t change
@markusrenepae
markusrenepae / simulator.py
Created January 2, 2020 22:22
This gist is for another medium article and is about an investment simulator.
import pandas as pd
import numpy as np
import datetime as dt
import math
import warnings
warnings.filterwarnings("ignore")
prices = pd.read_csv("adjclose.csv", index_col="Date", parse_dates=True)
volumechanges = pd.read_csv("volume.csv", index_col="Date", parse_dates=True).pct_change()*100
@jakevdp
jakevdp / Jupyter_vs_Mathematica.ipynb
Created April 8, 2018 05:01
Jupyter vs Mathematica Google Trends
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sanzpro
sanzpro / Update_Amibroker_EOD_Tiingo.py
Last active August 19, 2021 15:01
Update Amibroker EOD Historical data from Tiingo.com
# -*- coding: utf-8 -*-
"""
Created on Fri Jun 02 17:02:32 2017
@author: Vangelis@logical-invest.com
This script will pull the symbols from your specified Amibroker database and download historical EOD dividend adjusted data from Tiingo.com and will store them
in a folder (Destop/Data/TiingoEOD) as csv files, one for each stock (APPLE.csv SPY.csv, etc)
It will then attempt to open Amibroker and import the csv files.
You need:
1. To add your own Token number you will get when you register at Tiingo.com (line 51)
2. Specify the Amibroker database you want updated (line 99)
@marketcalls
marketcalls / Backtesting Basics - EMA Crossover Trading System
Created May 4, 2017 18:31
Backtesting Basics - EMA Crossover Trading System
//Marketcalls Backtesting Tutorial
_SECTION_BEGIN("EMA Crossover Trading System");
SetChartOptions(0,chartShowArrows|chartShowDates);
//Plot CandleSticks
Plot( C, "Price", ParamColor( "Color", colorDefault ), ParamStyle( "Style", styleCandle, maskPrice ) );
//Compute EMA 20 and EMA50
@vanclist
vanclist / gatling-cluster-teamcity.sh
Last active July 24, 2017 03:24
Gatling cluster with Teamcity
#!/usr/bin/env bash
#Assuming same user name for all hosts
USER_NAME='gatling'
#Remote hosts list
HOSTS=(node1-load.some.host node2-load.some.host node3-load.some.host node4-load.some.host)
#Assuming all Gatling installation in same path (with write permissions)
GATLING_HOME=/opt/loadtest/
#No need to change this
REMOTE_REPORT_DIR=/opt/loadtest/target/gatling/