Skip to content

Instantly share code, notes, and snippets.

View andyljones's full-sized avatar
🤖
👩👨👩👨

Andy Jones andyljones

🤖
👩👨👩👨
View GitHub Profile
@andyljones
andyljones / hypernormalisation.rst
Last active February 4, 2025 04:33
hypernormalisation

EXPLOSION

We live in a strange time.

Extraordinary events keep happening that undermine the stability of our world.

Suicide bombs, waves of refugees,

Donald Trump, Vladimir Putin, even Brexit.

import scipy as sp
from scipy.special import gammaln
def log_marginal(p, n, alpha=2):
"""Log-marginal probability of `p` positive trials and `n` negative trials from a
beta-binomial model with prior strength `alpha`. See
http://www.cs.ubc.ca/~murphyk/Teaching/CS340-Fall06/reading/bernoulli.pdf
for details.
# -*- coding: utf-8 -*-
"""
To use this, drop the file
'Full Results - Stack Overflow Developer Survey - 2015.csv'
from
https://drive.google.com/file/d/0Bzd_CzYvUxE5U1NSWnA2SFVKX00/view
def work():
print 0; yield
print 1; yield
print 2; yield
worker = work()
for i in range(2+1):
next(worker)
if i == 1: break
@andyljones
andyljones / compensation_comparison.py
Last active September 20, 2015 15:23
StackOverflow Compensation Survey Plotting
# -*- coding: utf-8 -*-
"""
To use this, drop the file
'Full Results - Stack Overflow Developer Survey - 2015.csv'
from
https://drive.google.com/file/d/0Bzd_CzYvUxE5U1NSWnA2SFVKX00/view
@andyljones
andyljones / Vagrantfile
Last active August 29, 2015 13:56
Vagrantfile and provisioning script for a Vagrant instance for Octopress development.
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "debian7"
config.vm.box_url = "https://dl.dropboxusercontent.com/s/xymcvez85i29lym/vagrant-debian-wheezy64.box"
config.vm.network :forwarded_port, host: 4000, guest: 4000
config.vm.provision :shell, :path => "bootstrap.sh"
config.ssh.forward_agent = true