Skip to content

Instantly share code, notes, and snippets.

Thomas Pinder thomaspinder

Block or report user

Report or block thomaspinder

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@thomaspinder
thomaspinder / control_variates.ipynb
Last active Jul 11, 2019
Control variates for Monte-Carlo integration in Julia
View control_variates.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@thomaspinder
thomaspinder / bbvi-julia.jl
Created Feb 11, 2019
Black-Box Variational Inference in Julia (Work in Progress!), based upon https://github.com/daeilkim/bbvi
View bbvi-julia.jl
using Distributions, Random, LinearAlgebra, Plots, StatPlots
Random.seed!(123);
dims = 2
precision_prior = 4
cov_prior = Matrix{Float64}(I, dims, dims)
pre_prior = precision_prior*cov_prior
mu_prior = [-2, -4]
precision_t = 0.5
@thomaspinder
thomaspinder / big_o_complexity.R
Created Jan 15, 2019
Using gganimate to visualise the chainging computational complexity as n increases.
View big_o_complexity.R
library(gganimate)
library(ggplot2)
library(dplyr)
library(reshape2)
# Get base n values
n <- 50
base <- data.frame(idx = seq(2, n, by = 0.01))
# Compute relative runtimes
View slack_notifier.py
"""
If you place this script at the bottom of your Python work, then it'll send you a notification on Slack once your code has finished running. Potentially useful if your code takes several hours to run as it saves having to check on its progress.
To run, you'll need to install the following two libraries:
slackclient==1.2.1
slacker==0.9.65
And then sign up for a Slack API key. Once these two steps have been done you can run the following code, replacing the name and key values with your own.
"""
You can’t perform that action at this time.