Skip to content

Instantly share code, notes, and snippets.

View robbyoconnor's full-sized avatar
🏳️‍🌈
🙃 🙂 (=

Robby O'Connor robbyoconnor

🏳️‍🌈
🙃 🙂 (=
View GitHub Profile
@bhavesh3005sharma
bhavesh3005sharma / GSoC-21 Final Report.md
Last active October 2, 2021 07:45
Final Report - GSoC-2021 Program.
@BlameOmar
BlameOmar / mergesort.cpp
Last active August 29, 2015 14:20
mergeSort2 is an implementation of merge sort that uses O(n) extra space (copies the array exactly once) instead of O(nlog(n))
#include <iostream>
#include <vector>
#include <random>
using namespace std;
/* Returns whether a list is sorted */
bool isSorted(vector<int> & list);
/* Sorts a list using the standard merge sort algorithm everyone learns in school (requires O(nlog(n)) space) */
@lavalamp
lavalamp / The Three Go Landmines.markdown
Last active February 16, 2024 12:16
Golang landmines

There are three easy to make mistakes in go. I present them here in the way they are often found in the wild, not in the way that is easiest to understand.

All three of these mistakes have been made in Kubernetes code, getting past code review at least once each that I know of.

  1. Loop variables are scoped outside the loop.

What do these lines do? Make predictions and then scroll down.

func print(pi *int) { fmt.Println(*pi) }
@BlameOmar
BlameOmar / Makefile
Last active August 29, 2015 13:56
Sample Makefile for Hunter CS Students
CXX = g++
CXXFLAGS = -Wall
DOCUMENTATION =
BUILD_SYSTEM_FILES = Makefile
DATA_FILES =
SOURCE_FILES = main1.cpp main2.cpp ClassA.h ClassA.cpp ClassB.h ClassB.cpp
@jlansner
jlansner / Richard II Lines Per Character
Last active December 31, 2015 17:09
Richard II Character Breakdown
Richard II
Total Speeches - 554
Total Lines - 2800
Character Speeches Lines
KING RICHARD II 98 758
JOHN OF GAUNT 28 191
HENRY BOLINGBROKE 90 413
THOMAS MOWBRAY 13 135
@dbieber
dbieber / gist:6532578
Created September 12, 2013 02:50
Course auto-enrollment by Sammy Jerome and myself
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome()
driver.set_window_size(1024, 768) # optional
url1 = "https://registrar.princeton.edu/score/"
url2 = "https://puaccess.princeton.edu/psc/hsprod/EMPLOYEE/HRMS/c/SA_LEARNER_SERVICES.SSR_SSENRL_CART.GBL?Page=SSR_SSENRL_CART&Action=A&ACAD_CAREER=UGRD&EMPLID=960579807&ENRL_REQUEST_ID=&INSTITUTION=PRINU&STRM=1142"
driver.get(url1)
ATID 2718 # personal area network ID (must match other XBee's ATID)
ATMY 1 # my address (must match other XBee's ATIA)
ATDH 0 # destination address high
ATDL 2 # destination address low (must match other XBee's ATMY)
ATD0 3 # Set AD/DIO 0 (pin 20) to digital input
ATIR 14 # sample rate
ATPR 0 # no pull-up resistors
ATWR # save settings