This file contains hidden or 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 | |
| # ───────────────────────────────────────────────────────────────────────────── | |
| # | |
| # TeXpresso Build Script | |
| # ====================== | |
| # | |
| # Overview | |
| # -------- | |
| # |
This file contains hidden or 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 | |
| set -euo pipefail | |
| # ── Preconditions ──────────────────────────────────────────────────────────── | |
| need() { command -v "$1" >/dev/null 2>&1 || { echo "$1 is required." >&2; exit 1; }; } | |
| need docker | |
| need dpkg-deb | |
| need fakeroot |
This file contains hidden or 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
| n_welch_t_test <- function(m1, s1, m2, s2, r = 1, alpha = .05, pwr = .8) { | |
| root_func <- function(n1) { | |
| n2 <- r * n1 | |
| d <- m2 - m1 | |
| s <- sqrt(s1^2 / n1 + s2^2 / n2) | |
| ncp = abs(d) / s | |
| nu <- (s1^2 / n1 + s2^2 / n2)^2 / | |
| (s1^4 / (n1^2 * (n1 - 1)) + s2^4 / (n2^2 * (n2 - 1))) | |
| qu <- qt(1 - alpha / 2, nu) | |
| 1 - pt(qu, nu, ncp = ncp) + pt(-qu, nu, ncp = ncp) - pwr |
This file contains hidden or 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/python3 | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| from multiprocessing import Pool, cpu_count | |
| np.random.seed(666) | |
| # Function that calculates (by simulation) the overflow probability of the | |
| # system |
This file contains hidden or 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
| library(ggplot2) | |
| library(parallel) | |
| options(mc.cores = detectCores() - 1) | |
| RNGkind("L'Ecuyer-CMRG") | |
| set.seed(666) | |
| # Function that calculates (by simulation) the overflow probability of the | |
| # system |