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
# install.packages("duckdb") | |
library(DBI) | |
library(duckdb) | |
library(dplyr) | |
library(haven) | |
library(stringi) | |
library(arrow) | |
library(lubridate) |
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
library(brms) | |
library(dplyr) | |
bform <- | |
bf(y1 ~ age, family = gaussian() ) + | |
bf(y2 ~ age + y1, family = gaussian()) + | |
set_rescor(FALSE) | |
df <- tibble( |
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
################################## | |
# | |
# | |
# This simple script aims to highlight several non-normal distributions | |
# and transformations of distributions where 95% of the distribution | |
# can be found within the interval mu +- 1.96*sigma | |
# Results can be found as comments inline with the code | |
# | |
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
####################################### | |
# Classes | |
####################################### | |
# | |
# The class function is how you construct objects in python. There are several key concepts to | |
# understand | |
# | |
# General syntax: | |
# class <object name>(<object to inherit from>): | |
# <define class wide attributes> |
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
# Relevant Links | |
# | |
# CRAN Server builds | |
# https://cran.r-project.org/web/checks/check_flavors.html#r-devel-linux-x86_64-debian-clang | |
# | |
# clang + devel specific instructions | |
# https://www.stats.ox.ac.uk/pub/bdr/Rconfig/r-devel-linux-x86_64-fedora-clang | |
# | |
# Instructions for building R from source | |
# https://docs.posit.co/resources/install-r-source/ |
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
############################# | |
# | |
# | |
# Exploring the impact of completely random & independently | |
# distributed covariates | |
# | |
# | |
############################# |
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
library(dplyr) | |
library(arrow) | |
library(stringi) | |
library(lubridate) | |
time_it <- function(expr) { | |
start <- Sys.time() | |
x <- eval(expr) | |
stop <- Sys.time() | |
tdiff <- round(as.numeric(difftime(stop, start, units = "sec")), 4) |
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
################################################### | |
# | |
# | |
# Setup Dataset | |
# | |
# | |
# | |
library(tidyverse) | |
library(flexsurv) |
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
library(dplyr) | |
library(purrr) | |
library(parallel) | |
library(knitr) | |
set.seed(40130) | |
CIVS <- c("A", "B", "C", "D") | |
true_score_mean <- 0 | |
true_score_sd <- 0.5 |
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
import aiohttp | |
import asyncio | |
URLS = [ | |
"http://www.laughfactory.com/jokes/clean-jokes/2", | |
"http://www.laughfactory.com/jokes/clean-jokes/3", | |
"http://www.laughfactory.com/jokes/clean-jokes/4", | |
"http://www.laughfactory.com/jokes/clean-jokes/5", | |
"http://www.laughfactory.com/jokes/clean-jokes/6", | |
"http://www.laughfactory.com/jokes/clean-jokes/7", |
NewerOlder