Skip to content

Instantly share code, notes, and snippets.

@jimmyjxiao
jimmyjxiao / GymScheduler.py
Created March 31, 2021 15:01
This script automatically reserves Wilson weightlifting slots.
# This script automatically reserves Wilson weightlifting slots.
# usage: python GymScheduler.py --day=monday --startTime=9:20AM
# use cron (unix) or TaskScheduler (windows) to get this to run automatically 48 hours before
# you need selenium webdriver for chrome and selenium python bindings installed.
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
import sys, getopt
@jimmyjxiao
jimmyjxiao / WotoChecker.py
Created September 25, 2019 19:02
CS201 Woto Checker
import urllib.request;
import sys;
import ctypes
import time;
url = sys.argv[1]
while(1):
with urllib.request.urlopen(url) as response:
html = response.read()
if(b"<input" in html):
import urllib.request;
import sys;
import ctypes # An included library with Python install.
import time;
url = sys.argv[1]
while(1):
with urllib.request.urlopen(url) as response:
html = response.read()
if(b"<input" in html):
static int TeamScore = 0;
if(Serial2.available())
{
char incoming = (char)Serial2.read();
if(incoming < 15) // chars under decimal 15 do not map to useful ASCII characters so we should be fine using them to send/receive pair scores
{
TeamScore += ((int)incoming * 10); //According to the IDC document each pair detection is 10 points, so that's why the x10 is there.
}
else if(incoming == 'S') //snitch
{
@jimmyjxiao
jimmyjxiao / dorm_sign.ino
Created September 23, 2018 16:59
For EGR101
/*
Dorm room sign code by:
Jimmy Xiao
Amanda Andriessen
Based on:
Exploring Arduino - Code Listing 2-4: Simple LED Control with a Button
http://www.exploringarduino.com/content/ch2