Skip to content

Instantly share code, notes, and snippets.

View junpenglao's full-sized avatar
🏠
Working from home

Junpeng Lao junpenglao

🏠
Working from home
View GitHub Profile
@ayhc
ayhc / miyota9075.md
Last active December 11, 2024 02:04
List of watches with the Miyota 9075 GMT movement
@twiecki
twiecki / dask_sparse_corr.py
Created August 17, 2018 11:26
Compute large, sparse correlation matrices in parallel using dask.
import dask
import dask.array as da
import dask.dataframe as dd
import sparse
@dask.delayed(pure=True)
def corr_on_chunked(chunk1, chunk2, corr_thresh=0.9):
return sparse.COO.from_numpy((np.dot(chunk1, chunk2.T) > corr_thresh))
def chunked_corr_sparse_dask(data, chunksize=5000, corr_thresh=0.9):
@bwengals
bwengals / DTC_latent.ipynb
Created April 3, 2018 01:56
DTC for latent GP, non-normal likelihoods
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AustinRochford
AustinRochford / boston-bayesians-2017-bayes-bandits.ipynb
Last active August 28, 2024 17:11
Boston Bayesians 2017 - Two Years of Bayesian Bandits for E-Commerce
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aseyboldt
aseyboldt / sensitivity.ipynb
Last active January 18, 2018 11:47
A *very* basic and possibly wrong implementation of https://github.com/rgiordan/StanSensitivity in pymc3
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
"""Sampling parameters of a lorenz attractor.
The forward pass integrates the lorenz attractor ODE system using
tt.scan with a Runge-Kutta integrator. The predicted high-resolution
timecourse is interpolated down so it can be compared to low-density
observations.
"""
import abc
import numpy
import pymc3
@tupui
tupui / halton.py
Last active October 9, 2022 12:20
Halton Sequence in python
"""Halton low discrepancy sequence.
This snippet implements the Halton sequence following the generalization of
a sequence of *Van der Corput* in n-dimensions.
---------------------------
MIT License
Copyright (c) 2017 Pamphile Tupui ROY
@AustinRochford
AustinRochford / pydata-nyc-2017-nba-fouls-python.ipynb
Last active December 22, 2017 16:22
PyData NYC 2017 Understanding NBA Foul Calls with Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AustinRochford
AustinRochford / pymc3_bsplines.ipynb
Last active September 15, 2022 21:08
PyMC3 BSplines
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.