I hereby claim:
- I am arikfr on github.
- I am arikfr (https://keybase.io/arikfr) on keybase.
- I have a public key ASBNUSKY0adYMAYhkO4QmrqOdjIuV4DtSAtiPsuyb6ZjIgo
To claim this, I am signing this object:
import os | |
import requests | |
import time | |
from pprint import pprint | |
def poll_job(s, redash_url, job): | |
# TODO: add timeout | |
while job['status'] not in (3,4): | |
response = s.get('{}/api/jobs/{}'.format(redash_url, job['id'])) |
{"rows": [{"code": "BD", "continent": "AS", "name": "Bangladesh"}, {"code": "BE", "continent": "EU", "name": "Belgium"}, {"code": "BF", "continent": "AF", "name": "Burkina Faso"}, {"code": "BG", "continent": "EU", "name": "Bulgaria"}, {"code": "BA", "continent": "EU", "name": "Bosnia and Herzegovina"}, {"code": "BB", "continent": "NA", "name": "Barbados"}, {"code": "WF", "continent": "OC", "name": "Wallis and Futuna"}, {"code": "BL", "continent": "NA", "name": "Saint Barthelemy"}, {"code": "BM", "continent": "NA", "name": "Bermuda"}, {"code": "BN", "continent": "AS", "name": "Brunei"}, {"code": "BO", "continent": "SA", "name": "Bolivia"}, {"code": "BH", "continent": "AS", "name": "Bahrain"}, {"code": "BI", "continent": "AF", "name": "Burundi"}, {"code": "BJ", "continent": "AF", "name": "Benin"}, {"code": "BT", "continent": "AS", "name": "Bhutan"}, {"code": "JM", "continent": "NA", "name": "Jamaica"}, {"code": "BV", "continent": "AN", "name": "Bouvet Island"}, {"code": "BW", "continent": "AF", "name": "Botswan |
with | |
time_frame as ( | |
select current_date - 14 | |
), | |
population as ( | |
select created_at::date as cohort_date, id as unique_id | |
from organizations | |
where created_at > (select * from time_frame) |
I hereby claim:
To claim this, I am signing this object:
import os | |
import sys | |
import requests | |
import json | |
import time | |
REDASH_HOST = os.environ.get('REDASH_HOST', 'https://app.redash.io/account') | |
API_KEY = '...' | |
import os | |
import requests | |
import time | |
from pprint import pprint | |
REDASH_HOST = os.environ.get('REDASH_HOST', 'https://demo.redash.io') | |
def poll_job(s, job): | |
# TODO: add timeout | |
while job['status'] not in (3,4): |
REDASH_HOST = os.environ.get('REDASH_HOST', 'https://app.redash.io/name') | |
def poll_job(s, job): | |
# TODO: timeout | |
while job['status'] not in (3,4): | |
response = s.get('{}/api/jobs/{}'.format(REDASH_HOST, job['id'])) | |
job = response.json()['job'] | |
time.sleep(1) | |
return job['status'] == 3 |
var inProgressUrls = {}; | |
function grabScreenshot(url) { | |
var inProgress = inProgressUrls[url]; | |
if (inProgress) { | |
return inProgress; | |
} | |
var promise = new Promise(function(fulfill, reject) { | |
... grab screenshot ... |
var page = require('webpage').create(), | |
system = require('system'), | |
address, output, size; | |
if (system.args.length < 3 || system.args.length > 5) { | |
console.log('Usage: rasterize.js URL filename [paperwidth*paperheight|paperformat] [zoom]'); | |
console.log(' paper (pdf output) examples: "5in*7.5in", "10cm*20cm", "A4", "Letter"'); | |
console.log(' image (png/jpg output) examples: "1920px" entire page, window width 1920px'); | |
console.log(' "800px*600px" window, clipped to 800x600'); | |
phantom.exit(1); |
{ | |
"columns": [ | |
{ | |
"name": "action", | |
"type": null, | |
"friendly_name": "action" | |
}, | |
{ | |
"name": "count", | |
"type": "integer", |