Skip to content

Instantly share code, notes, and snippets.

View mstrauss's full-sized avatar

Markus Strauss mstrauss

View GitHub Profile
@mstrauss
mstrauss / gist:1643637
Created January 19, 2012 23:14
reset permissions on a Mac OS X user folder
### to reset permissions on a Mac OS X user folder:
# clear the immutable flag
sudo chflags -Rvv nouchg .
# remove ACLs and change owner to yourself
sudo chown -RN <your user name here> .
@mstrauss
mstrauss / base64_decode.rb
Created October 19, 2012 17:30
Base64.decode one-liner
ruby -rbase64 -pe '$_ = Base64.decode64($_)+$/'
"""
This is a version of the Sprinkler Bayesian Network example from
https://healthyalgorithms.com/2011/11/23/causal-modeling-in-python-bayesian-networks-in-pymc/
translated from pymc to pymc3.
"""
from pymc3 import Model, Bernoulli, sample, traceplot
from pymc3.math import switch
from matplotlib.pyplot import savefig
## Synopsis
## ========
##
## Standalone R-Script to convert geostatistical population raster
## data (in CSV format) from Statistics Autria into MAT and CSV files.
##
## License
## =======
##
## Copyright (c) 2015 Markus Strauss