View example_cte_query.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with sample_data as ( | |
select * | |
from snowflake_sample_data.tpch_sf1.customer | |
), | |
nation_14_customers as ( | |
select * | |
from sample_data | |
where c_nationkey = 14 | |
), |
View mode_confettis.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://cdn.jsdelivr.net/npm/canvas-confetti@1.4.0/dist/confetti.browser.min.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> | |
<div id="bottom_of_page">Thanks for scrolling to the bottom 🙌</div> | |
<div>Enjoy some confetti 🎉</div> | |
<script> | |
View main.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from jinja2 import Environment, meta, Template | |
import pandas as pd | |
from pandas.testing import assert_frame_equal | |
import pandas.io.sql as psql | |
import psycopg2 | |
# All these constants would likely live in separate files | |
CONNECTION = psycopg2.connect( |
View simulations_for_post.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View a_a_sim.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def bayesian_rate_comparison( | |
control_successes, | |
control_samples, | |
test_successes, | |
test_samples, | |
prior_a=0, | |
prior_b=0 | |
): |
View simulations.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View helpers.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import time | |
from dataclasses import dataclass | |
from typing import Any, Optional, Tuple | |
import requests | |
import yaml | |
from distributed import Client | |
from distributed.security import Security | |
from googleapiclient import discovery |
View Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.7.6-buster | |
# Set the working directory | |
RUN mkdir /opt/app | |
WORKDIR /opt/app | |
# Copy poetry files into docker image | |
COPY pyproject.toml . | |
COPY poetry.lock . |
View parse_unixtime.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import unicode_literals | |
import pytest | |
from starscream.pipeline.stage import TransformStage | |
from pyspark.sql import functions as F, types as T | |
from starscream.contract import Contract | |
from starscream.utils.dataframe import as_dicts, from_dicts |
NewerOlder