Skip to content

Instantly share code, notes, and snippets.

View mbloem's full-sized avatar

Michael Bloem mbloem

View GitHub Profile
@mbloem
mbloem / read_from_redshift_db.py
Created November 16, 2021 05:39
Read from redshift DB in python (notebook)
import sqlalchemy # note: also need psycopg2
import pandas as pd
conn_string = '{driver}://{u}:{p}@{h}:{port}/{db}'.format(
driver='postgresql',
u='username',
p='password',
h='db.url.us-east-1.redshift.amazonaws.com',
port=8192,
db='db_name'
@mbloem
mbloem / Gamma GLM (PyMC2)
Created July 8, 2019 14:05 — forked from mamacneil/GammaGLM.ipynb
Example of a Gamma GLM in PyMC2
{
"metadata": {
"name": "",
"signature": "sha256:295922906e09ca3fdcf9b7d9c33def73124780dec5e063873de3d0bca79b8727"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [