Skip to content

Instantly share code, notes, and snippets.

View Brendan-Schuetze's full-sized avatar

Brendan Schuetze Brendan-Schuetze

View GitHub Profile
@Brendan-Schuetze
Brendan-Schuetze / app.R
Last active March 16, 2023 03:27
Cohen's d Viz
####################################################
# Cohen's d Viz and Practice Tool
# Author: Brendan A. Schuetze (https://schu.etze.co)
# Paper: https://psyarxiv.com/ncsvd
####################################################
library(shiny)
library(shinyjs)
library(ggplot2)
@Brendan-Schuetze
Brendan-Schuetze / update_s3_website.sh
Last active April 11, 2020 19:36
Updates s3 Website, invalidates cloudfront cache
#!/bin/sh
# Author: Brendan Schuetze
# Created 4/11/2020
# This script updates your S3 website and invalidates a cloudfront cache (assumedly the one that holds your website)
# Replaces antiquated s3_website ruby script
# Install AWS CLI first.
# Use AWS CLI to find s3 bucket names and cloudfront id using the following commands:
# aws s3 ls
# aws cloudfront list-distributions
@Brendan-Schuetze
Brendan-Schuetze / update_s3_website.sh
Created April 11, 2020 18:50
Updates s3 Website, invalidates cloudfront cache
cd FOLDER_WITH_WEBSITE_CONTENTS;
aws s3 sync . s3://BUCKET_NAME;
aws cloudfront create-invalidation --distribution-id CLOUDFRONT_ID --paths "/*"
var ans_upper_bound = 10;
function getInteger() {
return(Math.ceil(Math.random() * ans_upper_bound))
}
function getEquationString() {
let preselected_answer = getInteger();
let answer = -1;
@Brendan-Schuetze
Brendan-Schuetze / Fizzbuzz_Multinomial.R
Last active November 16, 2021 02:22
Statistical Fizzbuzz
# Statistical Fizzbuzz
# Brendan Schuetze
# November 1, 2018
# Minimal stackoverflow help (this was my first time using multinomial regression and purrr)
library(nnet)
library(purrr)
library(dplyr)
rm(list = ls())