Skip to content

Instantly share code, notes, and snippets.

@dexity
dexity / profile_top_key4_hashes.py
Last active October 18, 2021 21:07
Memory profiling for top key4Hashes
"""Profiles BigQuery results for Top N key4Hashes."""
# pip install memory_profiler
from memory_profiler import profile
from google.cloud import bigquery as bq
QUERY_TMPL = """SELECT *
FROM `phyndexer-production.phyndexer_production.key4Grouped1`