Skip to content

Instantly share code, notes, and snippets.

@drcrallen
drcrallen / turbo_colormap.c
Created August 21, 2019 20:03 — forked from mikhailov-work/turbo_colormap.c
Turbo Colormap Look-up Table
// Copyright 2019 Google LLC.
// SPDX-License-Identifier: Apache-2.0
// Author: Anton Mikhailov
// The look-up tables contains 256 entries. Each entry is a an sRGB triplet.
float turbo_srgb_floats[256][3] = {{0.18995,0.07176,0.23217},{0.19483,0.08339,0.26149},{0.19956,0.09498,0.29024},{0.20415,0.10652,0.31844},{0.20860,0.11802,0.34607},{0.21291,0.12947,0.37314},{0.21708,0.14087,0.39964},{0.22111,0.15223,0.42558},{0.22500,0.16354,0.45096},{0.22875,0.17481,0.47578},{0.23236,0.18603,0.50004},{0.23582,0.19720,0.52373},{0.23915,0.20833,0.54686},{0.24234,0.21941,0.56942},{0.24539,0.23044,0.59142},{0.24830,0.24143,0.61286},{0.25107,0.25237,0.63374},{0.25369,0.26327,0.65406},{0.25618,0.27412,0.67381},{0.25853,0.28492,0.69300},{0.26074,0.29568,0.71162},{0.26280,0.30639,0.72968},{0.26473,0.31706,0.74718},{0.26652,0.32768,0.76412},{0.26816,0.33825,0.78050},{0.26967,0.34878,0.79631},{0.27103,0.35926,0.81156},{0.27226,0.36970,0.82624},{0.27334,0.38008,0.84037},{0.27429,0.39043,0.85393},{0.27509,0.40072,0.86692},{0.2757
@drcrallen
drcrallen / turbo_colormap.py
Created August 21, 2019 20:02 — forked from mikhailov-work/turbo_colormap.py
Turbo Colormap Look-up Table
# Copyright 2019 Google LLC.
# SPDX-License-Identifier: Apache-2.0
# Author: Anton Mikhailov
turbo_colormap_data = [[0.18995,0.07176,0.23217],[0.19483,0.08339,0.26149],[0.19956,0.09498,0.29024],[0.20415,0.10652,0.31844],[0.20860,0.11802,0.34607],[0.21291,0.12947,0.37314],[0.21708,0.14087,0.39964],[0.22111,0.15223,0.42558],[0.22500,0.16354,0.45096],[0.22875,0.17481,0.47578],[0.23236,0.18603,0.50004],[0.23582,0.19720,0.52373],[0.23915,0.20833,0.54686],[0.24234,0.21941,0.56942],[0.24539,0.23044,0.59142],[0.24830,0.24143,0.61286],[0.25107,0.25237,0.63374],[0.25369,0.26327,0.65406],[0.25618,0.27412,0.67381],[0.25853,0.28492,0.69300],[0.26074,0.29568,0.71162],[0.26280,0.30639,0.72968],[0.26473,0.31706,0.74718],[0.26652,0.32768,0.76412],[0.26816,0.33825,0.78050],[0.26967,0.34878,0.79631],[0.27103,0.35926,0.81156],[0.27226,0.36970,0.82624],[0.27334,0.38008,0.84037],[0.27429,0.39043,0.85393],[0.27509,0.40072,0.86692],[0.27576,0.41097,0.87936],[0.27628,0.42118,0.89123],[0.27667,0.43134,0.90254],[0.27691,0.44145,0.913
@drcrallen
drcrallen / druid-6417-dependencies.txt
Created October 4, 2018 22:12
Dependencies in druid PR 6417
[INFO] Scanning for projects...
[WARNING] The project org.apache.druid:druid-benchmarks:jar:0.13.0-SNAPSHOT uses prerequisites which is only intended for maven-plugin projects but not for non maven-plugin projects. For such purposes you should use the maven-enforcer-plugin. See https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] org.apache.druid:druid
[INFO] java-util
[INFO] druid-api
[INFO] druid-common
[INFO] druid-hll
@drcrallen
drcrallen / bq-insert-errors.py
Created July 5, 2017 03:48
Odd bigquery insert errors
import datetime
from google.cloud import bigquery
from oauth2client.client import GoogleCredentials
# Needs the following defined
#PROJECT_ID='foo'
#DATASET_ID='bar'
#TABLE_ID='bat'
d = {'LOTRANS': 92.0, 'FIRMWARE': '904.W1 .D USB FW:W1', 'MBATTCHG': 5, 'BATTV': 13.7, 'MINTIMEL': 3.0, 'STARTTIME': '2017-05-23T13:27:07', 'NOMBATTV': 12.0, 'DATE': '2017-07-05T03:25:23', 'MODEL': 'Back-UPS ES 550G', 'HITRANS': 139.0, 'TIMELEFT': 335.8, 'BCHARGE': 100.0, 'XONBATT': '2017-07-04T03:55:53', 'TONBATT': 0, 'LINEV': 122.0, 'XOFFBATT': '2017-07-04T03:55:55', 'ALARMDEL': 'No alarm', 'STATUS': 'ONLINE', 'ENDAPC': '2017-07-05T03:25:42', 'CUMONBATT': 2758, 'CABLE': 'USB Cable', 'UPSMODE': 'Stand Alone', 'LASTXFER': 'Unacceptable line voltage changes', 'DRIVER': 'USB UPS Driver', 'VERSION': '3.14.12 (29 March 2014) debian', 'LOADPCT': 0.0, 'NOMINV': 120.0, 'SERIALNO': 'REDACTED', 'HOSTNAME': 'raspberrypi-master', 'UPSNAME': 'raspberrypi-master', 'NUMXFERS': '188', 'SENSE': 'Medium', 'APC': '001,035,0928', 'MAXTIME': 0, 'BAT
{
"hadoopCoordinates": "org.apache.hadoop:hadoop-client:2.3.0",
"spec": {
"dataSchema" : {
"dataSource" : "hadoop_tpch",
"granularitySpec" : {
"intervals" : [
"1980-01-01T00:00:00.000Z/2020-01-01T00:00:00.000Z"
],
"queryGranularity" : "day",