Skip to content

Instantly share code, notes, and snippets.

View tdsmith's full-sized avatar

Tim D. Smith tdsmith

View GitHub Profile
# https://aur.archlinux.org/packages/goredo/
class Goredo < Formula
desc "Go implementation of djb's redo, a Makefile replacement that sucks less"
homepage "http://www.goredo.cypherpunks.ru/"
url "http://www.goredo.cypherpunks.ru/download/goredo-0.11.0.tar.zst"
version "0.11.0"
sha256 "4608B75BC8A3DFB62EF305B5EED0F4B28AD39F64AE46BACEEA8100D90A8666F9"
license "GPL3"
depends_on "go" => :build
WITH raw_enrollments AS (
SELECT
e.client_id,
`mozfun.map.get_key`(e.event_map_values, 'branch')
AS branch,
min(e.submission_date) AS enrollment_date,
count(e.submission_date) AS num_enrollment_events
FROM
`moz-fx-data-shared-prod.telemetry.events` e
WHERE
CREATE TEMPORARY TABLE enrollments AS (
WITH analysis_windows AS (
(SELECT 0 AS analysis_window_start, 6 AS analysis_window_end)
),
raw_enrollments AS (
SELECT
e.client_id,
`mozfun.map.get_key`(e.event_map_values, 'branch')
AS branch,
[experiment]
enrollment_query = """
SELECT
client_id,
mozfun.map.get_key(experiments, "{{experiment.normandy_slug}}").branch AS branch,
MIN(DATE(submission_timestamp)) AS enrollment_date,
COUNT(*) AS num_enrollments
FROM `moz-fx-data-shared-prod`.messaging_system.cfr
WHERE
message_id LIKE "{{experiment.normandy_slug}}:%"
Validate bug-1671620-message-homepage-remediation-search-value-props-exper-release-82-83.toml
Error evaluating SQL:
1
2 WITH analysis_windows AS (
3 (SELECT 0 AS analysis_window_start, 20 AS analysis_window_end)
4 ),
5 raw_enrollments AS ( SELECT
6 client_id,
7 mozfun.map.get_key(experiments, "bug-1671620-message-homepage-remediation-search-value-props-exper-release-82-83").branch AS branch,
8 MIN(DATE(submission_timestamp)) AS enrollment_date,
@tdsmith
tdsmith / gist:4223645
Created December 6, 2012 10:55
Rooting your first-gen Kindle Fire from OS X

You don't need some stupid collection of batch files; this isn't that hard.

  1. Set up the Android SDK with Kindle Fire add-ons so that adb devices shows the Kindle in your list, like so: https://developer.amazon.com/sdk/fire/connect-adb.html
  2. Attain bootloader access per http://forum.xda-developers.com/showthread.php?p=24129239 -- go only as far as flashing the bootloader and recovery with fastboot. Do not use a version of twrp newer than 2.2.2.0: http://techerrata.com/file/twrp2/blaze/openrecovery-twrp-2.2.2.0-blaze.img or else a process named zygote will continuously segfault when you try to boot and all you will see is spinning triangles. If fastboot seems to hang without printing output, it hasn't done anything; you can safely hit Ctrl+C and force-reboot your Kindle.
  3. Boot in to twrp, Wipe Fucking Everything, and sideload and install your ROM of choice (I am partial to this one: http://forum.xda-developers.com/showthread.php?t=1765288 -- do not unzip it before copying it to your Kindle). Make sur
additional_properties
client_info
client_info.android_sdk_version
client_info.app_build
client_info.app_channel
client_info.app_display_version
client_info.architecture
client_info.client_id
client_info.device_manufacturer
client_info.device_model
import datetime as dt
from functools import partial
import json
from pathlib import Path
import logging
import attr
from google.cloud import bigquery as bq
from google.cloud import storage as storage
from google.api_core import exceptions as bq_ex
diff --git a/a b/b
index 0e44fc7..588bcde 100644
--- a/a
+++ b/b
@@ -2,6 +2,7 @@ DECLARE start_date DATE DEFAULT '2020-09-01';
WITH video_usage_per_client as (
SELECT
+ normalized_os,
client_id,
WITH events AS (
SELECT
metadata.isp.name = 'Comcast Cable' AS from_comcast,
`moz-fx-data-shared-prod`.udf.deanonymize_event(e).*
FROM
`moz-fx-data-shared-prod`.telemetry.event
CROSS JOIN UNNEST(payload.events.dynamic) e
WHERE DATE(submission_timestamp) BETWEEN '2020-08-11' AND '2020-08-19'
)