Skip to content

Instantly share code, notes, and snippets.

@JHibbard
JHibbard / make_table_uris.py
Last active May 10, 2024 04:10
Example function for generating normalized table URIs reflecting the medallion architecture
from pathlib import Path
def make_table_uris(name: str, basepath: str='.'):
"""Example function for generating normalized table URIs
Args:
name: name of table to generate table URIs for
basepath: directory to nest table URIs under
@JHibbard
JHibbard / orm.py
Created September 18, 2020 02:33
SQLAlchemy Thread-local Session Factory
# External Libraries
from sqlalchemy import Column, Integer
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
Base = declarative_base()
@JHibbard
JHibbard / nginx.conf
Created February 21, 2018 18:09 — forked from zonca/nginx.conf
Jupyterhub NGINX reverse proxy with SSL, replace HOSTNAME with a hostname or _
ser www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 1024;
}
http {