Skip to content

Instantly share code, notes, and snippets.

@carljv
carljv / bern_ci.jl
Created March 23, 2017 19:00
Conf. Interval coverage for a Bernoulli parameter p, and its log-odds transform.
function sim_coverage(p, n, nsims)
# True log-odds/relative-risk
rr = log(p) - log(1-p)
# Simulate out data
dist = Bernoulli(p)
xs = [rand(dist, n) for _ in 1:nsims]
# Bernoulli param estimate and its std. err.
ps = [mean(x) for x in xs]
@carljv
carljv / gist:d2e2e8aaae5f1a363b83
Created January 10, 2015 00:33
Ubersicht widget script for Google Calendar
# Ubersicht - Display Google Calendar via gcalcli
# this is the shell command that gets executed every time this widget refreshes
command: "/Users/cvogel/anaconda/bin/gcalcli calw 4 --width=20 --nocolor --nolineart | /usr/local/bin/pandoc -f markdown -t html"
# the refresh frequency in milliseconds
refreshFrequency: 30*60*1000
# render gets called after the shell command has executed. The command's output
# is passed in as a string. Whatever it returns will get rendered as HTML.

Keybase proof

I hereby claim:

  • I am carljv on github.
  • I am carljv (https://keybase.io/carljv) on keybase.
  • I have a public key whose fingerprint is 85AA 5C42 89FE 21E8 843A 682C 1EEE 77D9 F880 B14D

To claim this, I am signing this object:

@carljv
carljv / GenevaConvectionLangWars.md
Last active January 4, 2016 02:19
A list of suggestion for having productive, interesting conversations about data analysis languages on the internet. See http://slendermeans.org/language-wars.html

A Geneva Convention for the Language Wars

Section 1: Being Aware of Context

§ 1, Article 1

Recognize that languages have goals and communities. It helps to evaluate them in that context. Features that are high priority to you may not be high priority to the majority of users in that language.