With the Two Course Limit rules for UMich EECS Upper Level courses, if you want to enroll in more than two ULCS courses, you had better pay attention to whether the third one has its waitlist open so that you can get in the list early enough. This script is designed to monitor the open seats of the ULCS courses you want to enroll in. As soon as the available seats become 0 for any lecture or lab session, it will send a notification email.
-
Install
bs4
$ pip3 install bs4
-
Configure
SENDER_EMAIL
,SENDER_PASSWORD
,RECEIVER_EMAIL
, andUPDATE_INTERVAL
inmonitor.py
. -
Add the courses you want to monitor in
main()
. For example, EECS 482:Monitor(482)
-
Run the script
$ python3 monitor.py
-
To exit, press
Ctrl+C
.- If the process failed to exit properly, refer to this link.
Update: The following approach is NOT feasible. CAEN ssh service is not intended for long running jobs. The socket will be killed on the server side after a certain time. Please deploy the program on your virtual machine.
Not all of us have a server available or a laptop running all day long. Deploying the program on CAEN is then a good choice.
-
First, connect to CAEN's Linux Remote Login Service using Secure Shell (SSH). To make it easier for future login without typing out the uniqname, hostname and using DUO every time, we can write these info in a config file. Edit the file with the path
~/.ssh/config
by appending the lines below.Host caen login.engin.umich.edu HostName login.engin.umich.edu User YOUR_UNIQ_NAME ControlMaster auto ControlPath ~/.ssh/_%r@%h:%p ControlPersist 0
By setting up multiplexing, we can save our ssh control socket in the path specified by
ControlPath
, in this case,~/.ssh
. SettingControlPersist
to 0 means the master connection will remain in the background indefinitely. Check the manual here. -
Then, connect to CAEN
$ ssh caen
-
git clone
the project and follow the configuration above.
Another choice is to deploy the program on a virtual machine. Popular service providers include Microsoft Azure Student and Amazon AWS Educate. Given the free credits for students, we can establish a virtual machine for free.
We will use tmux
to run the program so that it will continue running after the ssh session disconnects. Learn more about other approaches and a beginner guide to tmux
.
-
On CAEN or your virtual machine, start
tmux
with a new session$ ssh azure $ tmux
Note:
tmux
should have been installed on CAEN. -
Run the program in the session
$ python3 monitor.py
-
Detach from the session by pressing
C-b d
, which means pressCtrl+b
, release, and then pressd
. You will get the output[detached (from session 0)]
-
Disconnect ssh as you want
$ exit
-
After reconnecting to ssh, attach to
tmux
session$ ssh azure $ tmux attach
The program should still be running properly.