- Go the course schedule
- Open Console (F12)
- Right click->Inspect any course component
- Copy and paste each part of the code into the console one by one
- An ical file will be downloaded and you can import it to google calendar, etc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
webhook = "WEBHOOK_URL" | |
def sendNotification(title, url): | |
data = { | |
"content" : f"{title}", | |
"embeds" : [ | |
{"title" : f"{title}", | |
"url" : f"{url}"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Stack; | |
/* Based on http://gameprogrammingpatterns.com/bytecode.html */ | |
public class StackMachine | |
{ | |
public final int INST_LITERAL = 0; | |
public final int SET_HEALTH = 1; | |
public final int INST_GET_HEALTH = 2; | |
private static final int INST_ADD = 3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run powercfg /l | |
# to get list of power plan GUID | |
# then set the balanced and power saver guids below | |
# you also need to add the notification script in the same folder: https://gist.github.com/pixis/fcdc1a8dd41d02460570f9b6706b109c | |
import os | |
import subprocess | |
from balloonTip import WindowsBalloonTip | |
balancedGUID = 'BALANCED_GUID_HERE' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# modified from https://gist.github.com/wontoncc/1808234 | |
# added duration as a parameter | |
import os | |
import sys | |
import time | |
import win32con | |
import win32gui | |
from win32api import GetModuleHandle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Small python script to get all the pdf files from a page | |
# pip install beautifulsoup4 | |
# arg1: The URL to download from | |
# arg2: The directory in which to save the files | |
# | |
# Example: python getpdf.py https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-189-a-gentle-introduction-to-programming-using-python-january-iap-2011/lectures/ C:/DownloadedPDF | |
import urlparse | |
import urllib2 | |
import os |