conflict data collection

This commit is contained in:
SowinskiBraeden committed 2022-09-16 21:05:15 -07:00
1 parent db7c0ba806
commit e2e8ac9976
6 files changed
+61 -8

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
#!/usr/bin/env python
# Define global debug function
debug = lambda msg : print(f">> Debug: {msg}")
debug = lambda data : print(f'>> Debug: {data}') if type(data) == str else print('>> Debug: ', data)
+4
View File
@@ -11,6 +11,10 @@ flex = ("XAT--12A-S", "XAT--12B-S")
most_frequent = lambda l : max(set(l), key = l.count)
def getGradeFromCourseCode(code: str) -> int:
grades = [int(s) for s in code.split("-") if s.isdigit()]
return None if len(grades) == 0 else most_frequent(grades)
def getEstimatedGrade(pupil: dict) -> int:
grades = [] # List of all possible grades
for request in (r for r in pupil["requests"] if r not in flex):
+1 -1
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env python
import json
import csv
from estimateGrade import getEstimatedGrade
from util.estimateGrade import getEstimatedGrade
flex= ("XAT--12A-S", "XAT--12B-S")