Skip to content

Instantly share code, notes, and snippets.

@allenday
allenday / bq-geohash-udf.sql
Created Jul 2, 2021 — forked from vladaman/bq-geohash-udf.sql
Google BigQuery standardSQL UDF function to decode geohash string into bounding box and coordinates
View bq-geohash-udf.sql
#standardSQL
CREATE TEMPORARY FUNCTION geohashDecode(geohash STRING)
RETURNS STRUCT<bbox ARRAY<FLOAT64>, lat FLOAT64, lng FLOAT64>
LANGUAGE js AS """
if (!geohash) return null;
var base32 = '0123456789bcdefghjkmnpqrstuvwxyz';
geohash = geohash.toLowerCase();
var evenBit = true;
var latMin = -90, latMax = 90;
@allenday
allenday / tensorflow_json_parser.py
Last active Jan 2, 2020 — forked from sameerg07/tensorflow_json_parser.py
converts the json file downloaded using image classifer tool of dataturks to dataset folder
View tensorflow_json_parser.py
#This script has been solely created under dataturks. Copyrights are reserved
#EXAMPLE USAGE
#python3 tensorflow_json_parser.py --json_file "flower.json" --dataset_path "Dataset5/"
import json
import glob
import urllib.request
@allenday
allenday / .block
Last active Jan 25, 2019 — forked from mbostock/.block
Force Layout from CSV
View .block
license: gpl-3.0