ucsd-historical-enrollment-data / webweg Goto Github PK
View Code? Open in Web Editor NEWAn asynchronous API wrapper for UCSD's WebReg course enrollment system.
License: MIT License
An asynchronous API wrapper for UCSD's WebReg course enrollment system.
License: MIT License
Note that section D has 6 sections but the wrapper only thinks there is 1
With the release of v0.3.4, each meeting now has a vector of instructors which denote the instructors (other than the instructor of the lecture/base meeting) assigned.
Should this be redesigned so that it lists all instructors assigned to that meeting per meeting instead?
For testing purposes, it might be a good idea to break each function responsible for calling into a different endpoint into two functions:
Then, the idea is that our 2nd function can call the 1st function w/ the JSON string, but we can also call the 1st function with our own string for testing purposes.
Consider the following line of code:
request_filter
.courses
.iter()
.map(|x| x.split_whitespace().collect::<Vec<_>>())
.map(|course| {
course
.into_iter()
.map(|x| self.get_formatted_course_code(x))
.collect::<Vec<_>>()
.join(":")
})
.collect::<Vec<_>>()
.join(";")
.to_uppercase()
Let's suppose request_filter.courses
is ["COGS 108"]
. Then, what happens is that we'll end up with [["COGS", "108"]]
in the first map function. Then, in the second map closure, we'll iterate through each element in the first vector (["COGS", "108"]
) and format both "COGS"
and "108"
. The issue here is that "COGS"
is not a course number.
Speaking of which, get_formatted_course_code
is poorly named and should be called get_formatted_course_num
.
It looks like something went wrong when trying to unwrap
here. For now, changed to unwrap_or_default
but I'm not sure if this will change anything.
Error logs also shows that there was a core dumped message, so that's interesting.
Leaving this up as a reminder.
ANAR 104 with null
meeting days.
[{"subj_course_id":"ANAR 104","section_id":"085846","section_code":"A01","instructors":["Staff"],"available_seats":15,"enrolled_ct":0,"total_seats":15,"waitlist_ct":0,"meetings":[{"meeting_type":"LE","meeting_days":["Tu","Th"],"start_hr":15,"start_min":30,"end_hr":16,"end_min":50,"building":"SEQUO","room":"142","other_instructors":[]},{"meeting_type":"LA","meeting_days":null,"start_hr":0,"start_min":0,"end_hr":0,"end_min":0,"building":"TBA","room":"TBA","other_instructors":[]}],"needs_waitlist":false}]
In particular, all of the instructors in all sections of PSYC 194C appear as instructors for each section in the wrapper.
Put it another way, if section 001 has instructors A, B, C and section 002 has instructors A, C, D, then the wrapper will return A, B, C, D for 001 and 002.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.