Skip to content

Instantly share code, notes, and snippets.

View pliniosilveira's full-sized avatar

Plinio Silveira pliniosilveira

View GitHub Profile
@pliniosilveira
pliniosilveira / reference
Created May 30, 2023 17:54
Testing new DG build -- just visits ingestion step
DECLARE DIRTY_DATES_UTC ARRAY<DATE>;
DECLARE MIN_VISIT_DATE DATE;
DECLARE LATEST_BUILD TIMESTAMP;
-- STEP 1 check new data (dirty partitions)
-- SET DIRTY_DATES_UTC = ARRAY(
-- WITH
-- src AS (
-- SELECT PARSE_DATE('%Y%m%d', partition_id) pdate, last_modified_time src_mod
-- FROM `cptsrewards-hrd.im_madhive_vs.INFORMATION_SCHEMA.PARTITIONS`
@pliniosilveira
pliniosilveira / letterFrequency.py
Last active April 20, 2020 18:32 — forked from pozhidaevak/letterFrequency.py
Python dict with English letter frequency
englishFreq = {
'e': 0.12702,
't': 0.09356,
'a': 0.08167,
'o': 0.07507,
'i': 0.06966,
'n': 0.06749,
's': 0.06327,
'h': 0.06094,