Skip to content

Instantly share code, notes, and snippets.

View peterwzhang's full-sized avatar

Peter Zhang peterwzhang

View GitHub Profile
@peterwzhang
peterwzhang / RBTreePP.user.js
Last active April 19, 2021 03:33
This script adds "Insert Keys" and "Remove Keys" functionality to the usfca RBTree visualizer.
// ==UserScript==
// @name RedBlackTree++
// @version 1
// @description This script adds "Insert Keys" and "Remove Keys" functionality to the usfca RBTree visualizer.
// @author Peter Zhang
// @match https://www.cs.usfca.edu/~galles/visualization/RedBlack.html
// @grant none
// ==/UserScript==
//copy everything inside of the setup function below if you want to just paste the code in the console
function setup(){
@peterwzhang
peterwzhang / BinomialQueuePP.user.js
Last active April 19, 2021 03:34
This script adds "Insert Keys" and "Remove K Smallest" functionality to the usfca Binomial Queue visualizer.
// ==UserScript==
// @name BinomialQueue++
// @version 1
// @description This script adds "Insert Keys" and "Remove K Smallest" functionality to the usfca Binomial Queue visualizer.
// @author Peter Zhang
// @match https://www.cs.usfca.edu/~galles/visualization/BinomialQueue.html
// @grant none
// ==/UserScript==
//copy everything inside of the setup function below if you want to just paste the code in the console
function setup(){
@peterwzhang
peterwzhang / MinHeapPP.user.js
Last active April 19, 2021 03:34
This script adds "Insert Keys" and "Remove K Smallest" functionality to the usfca Heap visualizer.
// ==UserScript==
// @name MinHeap++
// @version 1
// @description This script adds "Insert Keys" and "Remove K Smallest" functionality to the usfca Heap visualizer.
// @author Peter Zhang
// @match https://www.cs.usfca.edu/~galles/visualization/Heap.html
// @grant none
// ==/UserScript==
//copy everything inside of the setup function below if you want to just paste the code in the console
function setup(){
@peterwzhang
peterwzhang / UARMP.csv
Created June 12, 2021 03:22
CSV file containing RateMyProfessor stats for professors at the University of Alabama. Last updated 06/11/21, 10:00 CDT
Last First Department Rating Reviews
Aaleti Sriram Engineering 4.3 9
Aardsma Kristin English 3.8 8
Aaron Donna Mathematics 3.8 38
Abbott John Anthropology 5 1
Abdallah J.C Communication 4.2 8
Abernathy John Accounting 3.8 10
Abidi Abbas English 4.2 6
Abrams Michael Music 1.6 6
Abruzzo Margaret History 2.6 76
@peterwzhang
peterwzhang / SheltonRMP.csv
Created June 12, 2021 04:56
CSV file containing RateMyProfessor stats for professors at the Shelton State Community College. Last updated 06/11/21, 11:56 CDT
Last First Department Rating Reviews
Aaron Mike Biology 4.8 96
Abston Byron Mathematics 4.0 7
Albritton Lee Chemistry 3.7 8
Aldridge William Economics 4.0 12
Alexander John Religion 4.9 7
Anders Pauline English 3.3 3
Angers Don Psychology 3.5 2
Armstrong Leah English 4.5 32
Bamberg Susan English 2.5 57
@peterwzhang
peterwzhang / Matlab.md
Created August 16, 2021 22:12
Getting started with MATLAB
@peterwzhang
peterwzhang / isEven.cpp
Created August 17, 2021 17:04
isEven function for 8 bit unsigned integers
#include <cstdint>
bool isEven(std::uint8_t i) {
if (i == 0) return true;
else if (i == 1) return false;
else if (i == 2) return true;
else if (i == 3) return false;
else if (i == 4) return true;
else if (i == 5) return false;
else if (i == 6) return true;
else if (i == 7) return false;
@peterwzhang
peterwzhang / CS_Schema.sql
Last active September 27, 2021 01:24
Extra Practice for CS301 Exam 1
CREATE TABLE Professors(
Id INTEGER NOT NULL PRIMARY KEY
,Last VARCHAR(20) NOT NULL
,First VARCHAR(20) NOT NULL
,Department VARCHAR(32) NOT NULL
,Rating NUMERIC(3,1)
,Reviews INTEGER NOT NULL
);
INSERT INTO Professors(Id,Last,First,Department,Rating,Reviews) VALUES (93,'Anderson','Monica','Computer Science',2.2,28);
INSERT INTO Professors(Id,Last,First,Department,Rating,Reviews) VALUES (129,'Atkison','Travis','Computer Science',4,1);
@peterwzhang
peterwzhang / Checker.user.js
Created February 23, 2022 06:15
Periodically check for a given text on a site
// ==UserScript==
// @name Checker
// @version 1
// @description Check all text on a site for a keyword.
// @author Peter Zhang
// @match !!!!!Put what site you want to check on!!!!!
// @grant none
// ==/UserScript==
const SEARCH_TEXT = "PUT TEXT HERE";
@peterwzhang
peterwzhang / using-cs-parallel.md
Last active March 22, 2022 02:18
Using the cs-parallel.ua.edu Server

Using the cs-parallel.ua.edu Server

The cs-parallel.ua.edu server comes with the Glasgow Haskell Compiler (version 7.10.2) and the Cabal installation tool (version 1.22.6.0) preinstalled. In order to use the server you must be either on the Eduroam wifi or be connected to the UA VPN, you can follow the instructions here to install and use VPN.

Connecting to the Server in a Terminal

After you are connected to the Eduroam wifi or UA VPN, you can connect to the server using ssh.

You can run the following command in the terminal to connect: $ ssh [email protected] username is your myBama username.