This Gist: http://is.gd/dokkudjango
DigitalOcean: https://www.digitalocean.com/
Dokku: https://github.com/progrium/dokku
Dokku-Postgres: https://github.com/Kloadut/dokku-pg-plugin
This Gist: http://is.gd/dokkudjango
DigitalOcean: https://www.digitalocean.com/
Dokku: https://github.com/progrium/dokku
Dokku-Postgres: https://github.com/Kloadut/dokku-pg-plugin
| /* 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 | |
| * |
| 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 |
| 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 |