Skip to content

Instantly share code, notes, and snippets.

View alstat's full-sized avatar
💭
So many ideas, but limited time to code

Al Asaad alstat

💭
So many ideas, but limited time to code
View GitHub Profile
@mandiwise
mandiwise / Count lines in Git repo
Last active December 7, 2025 14:52
A command to calculate lines of code in all tracked files in a Git repo
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository
$ git ls-files | xargs wc -l
@kevinushey
kevinushey / just_for_fun.R
Created January 31, 2014 03:18
Re: Python and R: Is Python really faster than R?
case2 <- function(n = 10, mu = 3, sigma = sqrt(5), p = 0.025, rep = 100){
xbar <- vapply(1:rep, FUN.VALUE=numeric(1), function(i) {
norm <- rnorm(mean = mu, sd = sigma, n = n)
return(mean(norm))
})
low <- xbar - qnorm(1-p) * (sigma / sqrt(n))
up <- xbar + qnorm(1-p) * (sigma / sqrt(n))
rem <- mu > low & mu < up