Skip to content

Instantly share code, notes, and snippets.

View cschanhniem's full-sized avatar
🎯
Focusing

Chánh Niệm cschanhniem

🎯
Focusing
View GitHub Profile
@cschanhniem
cschanhniem / README.md
Created December 7, 2022 11:41 — forked from mjhea0/README.md
Installing Dokku and Deploying a Django App
/* Put Google Ads Data in Google Spreadsheet
* -----------------------------------------
*
* Script by Optmyzr.com
*
* v3 (20190702)
* - updated to API v201809
* v2 (20180810)
* - updated to newer reporting version in ads API
*
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cschanhniem
cschanhniem / dollarbar_generator.py
Created February 23, 2020 18:22 — forked from GerardBCN/dollarbar_generator.py
Dollar bar generator
import numpy as np
# expects a numpy array with trades
# each trade is composed of: [time, price, quantity]
def generate_dollarbars(trades, frequency=1000):
times = trades[:,0]
prices = trades[:,1]
volumes = trades[:,2]
ans = np.zeros(shape=(len(prices), 6))
candle_counter = 0
@cschanhniem
cschanhniem / volumebar_generator.py
Created February 23, 2020 18:22 — forked from GerardBCN/volumebar_generator.py
Volume bar generator
import numpy as np
# expects a numpy array with trades
# each trade is composed of: [time, price, quantity]
def generate_volumebars(trades, frequency=10):
times = trades[:,0]
prices = trades[:,1]
volumes = trades[:,2]
ans = np.zeros(shape=(len(prices), 6))
candle_counter = 0