Skip to content

Instantly share code, notes, and snippets.

View fritzo's full-sized avatar

Fritz Obermeyer fritzo

View GitHub Profile
import os
from collections import defaultdict
import numpy as np
import scipy.stats
import torch
ts = torch.tensor
mt = torch.empty
zs = torch.zeros
import torch.distributions as dist
from torch.distributions import constraints
@fehiepsi
fehiepsi / gpts.ipynb
Last active March 20, 2018 19:17
GP timeseries
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pbugnion
pbugnion / ipython_notebook_in_git.md
Last active October 22, 2023 12:25
Keeping IPython notebooks under Git version control

This gist lets you keep IPython notebooks in git repositories. It tells git to ignore prompt numbers and program outputs when checking that a file has changed.

To use the script, follow the instructions given in the script's docstring.

For further details, read this blogpost.

The procedure outlined here is inspired by this answer on Stack Overflow.

@ambroff
ambroff / bench.py
Created June 30, 2012 06:32
comparing JSON and Thrift serialization speed / data size
import jsonlib
import random
import timeit
import lz4
from thrift.protocol.TBinaryProtocol import TBinaryProtocol
from thrift.protocol.TCompactProtocol import TCompactProtocol
from thrift.transport.TTransport import TMemoryBuffer