This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Turing | |
using Optim | |
using UnicodePlots | |
import StatsBase.mode | |
@model gdemo_d() = begin | |
s ~ InverseGamma(2, 3) | |
m ~ Normal(0, sqrt(s)) | |
1.5 ~ Normal(m, sqrt(s)) | |
2.0 ~ Normal(m, sqrt(s)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Turing, Turing.RandomMeasures | |
@model dpmixture(x) = begin | |
rpm = DirichletProcess(1.0) | |
n = zeros(Int, length(x)) | |
z = zeros(Int, length(x)) | |
for i in eachindex(x) | |
z[i] ~ ChineseRestaurantProcess(rpm, n) | |
n[z[i]] += 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%s/\({.*}\)\(([^)]*)\)\(\s=\)/\2 where \1\3/g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
color pablo | |
syntax on | |
set number | |
set backspace=indent,eol,start | |
" highlight found words | |
set hlsearch | |
" show matching parenthesis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
####################################################### | |
# EXPORTS | |
####################################################### | |
# Expand the history size | |
export HISTFILESIZE=10000 | |
export HISTSIZE=500 | |
# Set the default editor |
NewerOlder