Skip to content

Instantly share code, notes, and snippets.

source("manifesto_functions.R")
### OPTIONAL A/B Case Study
### Code Slide #1
# Declare list to hold configurations
base_configs <- list()
# Amount of simulation
base_configs["n_draws"] <- 100000
source("manifesto_functions.R")
################
### Introduction
patches <- 0:20
average <- 23/4
plot(p, dpois(patches, average), type="h", lwd=3,
ylab="Probability Of Emergency Patch",
xlab="Count Of Emergency Patches")
source("helper_functions.R")
#30MB File Upload
options(shiny.maxRequestSize = 30*1024^2)
ui <- dashboardPage(
title="Vuln Burndown",
dashboardHeader(title = "Vulnerability Burndown"),
# Package names
packages <- c("readr", "tidyverse", "lubridate", "survival", "survminer", "shiny", "shinydashboard","reactable","shinyalert")
# Install packages not yet installed
installed_packages <- packages %in% rownames(installed.packages())
if (any(installed_packages == FALSE)) {
install.packages(packages[!installed_packages])
}
@ribsy
ribsy / htma_cyberfunctions
Created April 5, 2023 09:15
R Code For Chapter 10 HTMA Cybersecurity Risk v 2
library(tidyverse)
library(bayestestR)
library(bayesAB)
# See Manifesto Functions at www.themetricsmanifesto.com
# Put in your same working director
source("manifesto_functions.R")
bayesPhishArrive <- function(prior_vals = c(5,1), total_vals = c(87,12)){