Skip to content

Instantly share code, notes, and snippets.

View sneakers-the-rat's full-sized avatar

Jonny Saunders sneakers-the-rat

View GitHub Profile
@sneakers-the-rat
sneakers-the-rat / scrape_courses.py
Last active July 24, 2020 07:19
scrape uo course catalogue
import requests
from bs4 import BeautifulSoup as bs
import pandas as pd
import tqdm
import datetime
import os
import pickle
def scrape_crn(crn, page_dir):
url = f"https://classes.uoregon.edu/duckweb/hwskdhnt.p_viewdetl?term=202001&crn={crn}"
@sneakers-the-rat
sneakers-the-rat / kip_hmm.ipynb
Last active July 24, 2020 01:56
Kip - loading data pythonically
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sneakers-the-rat
sneakers-the-rat / random_address.py
Created June 25, 2020 20:09
generate random address
import os
import io
import zipfile
import requests
import pandas as pd
import pdb
def download_addresses(path='lane.csv'):
print('Downloading addresses')
lane_addresses_zip = requests.get(
@sneakers-the-rat
sneakers-the-rat / schillbot_corpus.txt
Last active June 15, 2020 21:45
schillbot_corpus
dear colleagues, universities today face headwinds from a multitude of sources.
in the political sphere, one party castigates us for being ideologically unbalanced and intolerant of free speech and the other for being unaffordable and elitist.
trust in universities is battered by a deluge of criticism and well-publicized scandals involving sexual violence, administrative misfeasance, and admissions improprieties.
political support has diminished with public trust.
many public universities, including the university of oregon, never recovered from the N recession in terms of state funding.
underfunded pension plans, skyrocketing health-care costs, and skepticism about our mission and operation have created tremendous pressure on our twin missions of education and research.
despite these challenges, i am incredibly optimistic about the future of higher education, generally, and at the university of oregon, in particular.
i know some of you will read this, roll your eyes, and think to yourself, “he gets paid to b
@sneakers-the-rat
sneakers-the-rat / pasta.R
Created April 26, 2020 22:28
pasta types
library(tidyverse)
library(factoextra)
# length/diameter - cm, diameter is major
# eccentricity - minor/major
# pitch - turns/cm
# toroidal, corrugated - boolean
# envelope - boolean - diameter deviation longitudinally,
pasta <- tribble(
@sneakers-the-rat
sneakers-the-rat / install_jamovi_simpler.sh
Created April 9, 2020 08:23
install jamovi on chromebook simpler
#!/bin/bash
sudo apt update
sudo apt upgrade -y
sudo apt install -y flatpak
flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install -y --user org.jamovi.jamovi
# create a terminal command to launch jamovi
@sneakers-the-rat
sneakers-the-rat / install_jamovi.sh
Last active April 9, 2020 07:29
jamovi on chromebook
#!/bin/bash
#https://dev.jamovi.org/info_project-structure.html
sudo apt update
sudo apt upgrade
sudo apt install build-essential r-base protobuf-compiler npm python3-dev python3-pip libboost-all-dev libnanomsg-dev libnss3
pip3 install Cython tornado google-api-python-client pyyaml chardet scipy nanomsg
sudo R -e "install.packages(c('RInside', 'jmvtools'), repos=c('https://repo.jamovi.org', 'https://cran.r-project.org'))"
@sneakers-the-rat
sneakers-the-rat / nyt_trail.js
Created February 27, 2020 08:52
gotta trail somethin
/*
idk why but u can run this on
https://www.nytimes.com/interactive/2020/02/25/us/politics/democratic-debate-south-carolina.html
uses some modified code from
http://www.howtocreate.co.uk/tutorials/jsexamples/multitrail.html
the nyt site loadez the jquery so yno this wasn't built to be reusable.
@sneakers-the-rat
sneakers-the-rat / Makefile
Last active March 20, 2020 21:51
Configuration for Model M with Soarer's Converter
# build all sctools for Mac OS-X
OS = MACOSX
CC = gcc
STRIP = strip
SDK = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
CFLAGS = -O2 -Wall -isysroot $(SDK) -D$(OS) -arch x86_64
LIBS = -Xlinker -syslibroot -Xlinker $(SDK) -framework IOKit -framework CoreFoundation
@sneakers-the-rat
sneakers-the-rat / wwe.txt
Last active December 15, 2019 03:27
wwe_corpus
Welcome to Wrestlemania!
Woodstock was to rock and roll, what WrestleMania is to wrestling.
Finally, your men, in a very controversial match...
What do you mean "controversial"? He pinned him right in the center of the ring, didn't he? Did he or did he not pin him for the count of three?
Where's that cane of yours?
What cane? I...didn't have no cane!
All right, we're just moments away from the big one. When I say big, the battle of the titans. Big John Studd, Bobby Heenan, come in. Andre the Giant putting his entire career on the line.
Oh man, this bag is heavy man! This is what it was all about. $15,000 that we used for bait. John Studd, the only giant of wrestling. 7 foot plus, nearly 400 pounds of solid muscle. And this is what we wanted to prove to the whole world that I am the giant in a few short moments, along with this $15,000. You're going to see me in the ring and you're going to see the last match of Andrea because he retires if he can't do it.
Bobby Heenan, I'm just counting the money here.
You kn