Skip to content

Commit

Permalink
Merge pull request #35 from aspc/add/vectorScript
Browse files Browse the repository at this point in the history
Add/vector script
  • Loading branch information
saatvikkher authored Feb 19, 2024
2 parents acb43e7 + 797650f commit d78f84c
Show file tree
Hide file tree
Showing 8 changed files with 2,575,066 additions and 27 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
keys.py
decrypted*
all_courses.csv
courses.csv
courses.csv
env_var.sh
11 changes: 7 additions & 4 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@

app = Flask(__name__)

# set to correct semester
current_semester = '2024;SP'

# set current semester in app.py
term = current_semester.replace(';', '') # use correct term (2023FA for fall 2023)

# limits the number of requests by a single user per day
limiter = Limiter(
Expand All @@ -27,14 +32,12 @@
def ratelimit_handler(e):
error = "Too many requests. Please try again soon."
return render_template('index.html', error = error)

current_semester = '2023;FA'

# decrypt_files
for file_name in ['data/encrypted_vectors_SP24_courses.pkl']:
for file_name in [f'data/encrypted_vectors_{term}_courses.pkl']:
decrypt_file(file_name)

vector_courses = pd.read_pickle("data/decrypted_vectors_SP24_courses.pkl")
vector_courses = pd.read_pickle(f"data/decrypted_vectors_{term}_courses.pkl")

# modify course data (note: could be done before encryption)
clean_course_info(vector_courses)
Expand Down
1 change: 0 additions & 1 deletion data/encrypted_all_courses.csv

This file was deleted.

1 change: 0 additions & 1 deletion data/encrypted_courses.csv

This file was deleted.

Loading

0 comments on commit d78f84c

Please sign in to comment.