Skip to content

Instantly share code, notes, and snippets.

@RyanGreenup
RyanGreenup / wk6_pvals.r
Created April 11, 2024 04:40
How to calculate P Values in R
library(Lock5Data)
library(tidyverse)
dplyr::glimpse(Lock5Data::NutritionStudy)
## Get X
table(X <- Lock5Data::NutritionStudy$Smoke)
## Encode as "Does this person Smoke
table(X <- (X == "Yes"))
## How many people smoke
@RyanGreenup
RyanGreenup / wk5_bootsrap.md
Created April 4, 2024 05:59
Week 5 Bootstrap

Notes

Main Bootstrap

## This is my population
n = 30
pop <- iris[,1]
hist(pop)

Examples for SDM

#!/usr/bin/env Rscript


# Instll the Lock 5 Data
# install.packages("Lock5Data")
library(Lock5Data)
@RyanGreenup
RyanGreenup / embed-backlinks-on-mediawiki-page.md
Last active November 17, 2023 06:05
Embed Backlinks on Mediawiki Page
@RyanGreenup
RyanGreenup / install-and-run-gpt4all-with-docker.md
Created October 17, 2023 02:12
Install and Run gpt4all with Docker

Install and Run gpt4all with Docker

Create directory and files

mkir gpt4all
cd gpt4all
vim -O Dockerfile docker-compose.yml
@RyanGreenup
RyanGreenup / rstudio-in-a-chroot.md
Last active September 17, 2023 13:53
Rstudio in a chroot

Create a location for

doas zfs create -o compression=lzf tank/chroots
doas zfs create -o compression=lzf tank/chroots/fedora
cd /tank/chroots/fedora
wget 'https://dl.fedoraproject.org/pub/fedora/linux/releases/38/Container/x86_64/images/Fedora-Container-Base-38-1.6.x86_64.tar.xz'
tar xvpf Fedora-Container-Base-38-1.6.x86_64.tar.xz 

# Do all the mounting (or `emerge arch-chroot`

This page is a curated collection of Jupyter/IPython notebooks that are notable for some reason. Feel free to add new content here, but please try to only include links to notebooks that include interesting visual or technical content; this should not simply be a dump of a Google search on every ipynb file out there.

Important contribution instructions: If you add new content, please ensure that for any notebook you link to, the link is to the rendered version using nbviewer, rather than the raw file. Simply paste the notebook URL in the nbviewer box and copy the resulting URL of the rendered version. This will make it much easier for visitors to be able to immediately access the new content.

Note that Matt Davis has conveniently written a set of bookmarklets and extensions to make it a one-click affair to load a Notebook URL into your browser of choice, directly opening into nbviewer.

## Write in the data
o <- rbind(
c(264, 127, 99),
c(161, 116, 67)
)
colnames(o) <- c("Border", "Grass", "Sand")
rownames(o) <- c("Moringa", "Vicinus")
## First let's get our chi value
## Expected values
@RyanGreenup
RyanGreenup / Fezzik_Example.md
Created January 23, 2023 04:16
Cache Julia SysImages for faster run time

Using SysImages to Speed up Julia

Install Fezzik

First install Fezzik, this has been around since 2019 and actively maintained, but it's only available from source:

using Pkg
@RyanGreenup
RyanGreenup / self-signed-certificate-with-custom-ca.md
Created September 17, 2021 06:15 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096