Skip to content

Instantly share code, notes, and snippets.

View SathishN's full-sized avatar
🎯
Focusing

Sathish SathishN

🎯
Focusing
View GitHub Profile
@markuman
markuman / README.md
Last active February 11, 2025 11:30
🗺️ OSM - self host the entire planet 🌎 in ~30 minutes 🚀

🗺️ OSM - self host the entire planet 🌎 in ~30 minutes 🚀

TL;DR

mkdir osm
wget -O osm/planet.mbtiles https://hidrive.ionos.com/api/sharelink/download?id=SYEgScrRe
podman run -ti --rm -p 9000:9000 --name sms -v $(pwd)/osm/:/data/ registry.gitlab.com/markuman/sms:latest
firefox http://localhost:9000
@virattt
virattt / agent_with_custom_tool.ipynb
Last active March 15, 2025 14:26
agent_with_custom_tool.ipynb
Loading
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 April 21, 2025 02:15
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 September 9, 2024 02:30
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
Loading
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: [email protected]
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