diff --git a/script/format_tutoring_schedule_json.py b/script/format_tutoring_schedule_json.py new file mode 100644 index 00000000..5be87cb1 --- /dev/null +++ b/script/format_tutoring_schedule_json.py @@ -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() diff --git a/script/provision_tutors.rb b/script/provision_tutors.rb new file mode 100644 index 00000000..6e170906 --- /dev/null +++ b/script/provision_tutors.rb @@ -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 diff --git a/script/zxywvu.txt b/script/zxywvu.txt new file mode 100644 index 00000000..091f0ac0 --- /dev/null +++ b/script/zxywvu.txt @@ -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]} \ No newline at end of file