Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding tutoring schedule output formatting script, adding tutor provisioning script to allow for local testing of tutoring schedules. #228

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions script/format_tutoring_schedule_json.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import json, os


mapping_fn = lambda n: n - 120 # Shifts all of the keys 121-->180 to 1-->60

with open("zxywvu.txt", "r+") as file:
data = json.loads(file.readlines()[0])
new_data = {str(mapping_fn(int(key))): val for key, val in data.items()}
file.seek(0)
new_line = file.write(json.dumps(new_data))
file.truncate()
12 changes: 12 additions & 0 deletions script/provision_tutors.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
num_tutors = 4000
for i in 0..num_tutors
p = Person.create(
first_name: "test_first_name_#{i}",
last_name: "test_last_name_#{i}",
username: "test_username_#{i}",
email: "test_email_#{i}@hkn.eecs.berkeley.edu",
password: "test_password_#{i}",
password_confirmation: "test_password_#{i}",
);
p.get_tutor
end
1 change: 1 addition & 0 deletions script/zxywvu.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"1": [3123, 2932], "2": [2728], "3": [2453], "4": [3137], "5": [3015], "6": [3165, 2995], "7": [3127], "8": [2453, 3034], "9": [3133, 3127], "10": [2444, 2892], "11": [3123, 2902], "12": [3163, 3135], "13": [2855, 2996], "14": [3012], "15": [3015], "16": [3126], "17": [3009], "18": [2992], "19": [3131, 3130], "20": [2892, 2444], "21": [2840, 3133], "22": [3135, 3125], "23": [3030, 2855], "24": [3033, 3139], "25": [3164, 2677], "26": [3126, 2872], "27": [3009, 2722], "28": [3129], "29": [3014, 3131], "30": [2108, 2725], "31": [2116, 2880], "32": [3142, 2108], "33": [3129], "34": [3139, 2843], "35": [2677, 2878], "36": [3122, 3134], "37": [3124, 3050], "38": [2728, 3012], "39": [2434, 3016], "40": [2854, 2445], "41": [2116], "42": [2995, 3142], "43": [3132, 2838], "44": [2864, 3066], "45": [2990], "46": [3134, 3122], "47": [3141], "48": [3138, 3045], "49": [3016, 2462], "50": [2445, 2723], "51": [3124], "52": [3137, 2988], "53": [3132], "54": [2864], "55": [3017, 3125], "56": [2843, 2861], "57": [3141, 3128], "58": [3138, 3158], "59": [2990, 3028], "60": [2839, 2992]}