Skip to content

EntropyGenerator/njutils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NJUtils

Some utilities for NJUer

pip install -r requirements.txt

Dormitory electricity tracer

It can polling remaining electricity of the dormitory, and plot the results.
To use it, you have to create an .env file and fill in the parameters.

NJU_USERNAME=xxxxxxxxxx
NJU_PASSWORD="xxxxxxxx"

# After filling params above, you can run dormitory_electicity.py first to get values to fill params below.
CAMPUS_ID=xx
AREA_ID=x
BUILDING_ID="xxxxxxxxxxxxxx_xxxxxxxxxxxxxx"
ROOM_ID=xxxxxxxxxxxx

After filling these, you can run dormitory_electricity_tracer.py using a bash loop, such as

while true
do
    python dormitory_electricity_tracer.py
    sleep 10m
done

You will get a result.png after running for sometime.

Reference

Login code from NJUlogin.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published