<commit_before>import datetime
from dataclasses import dataclass
from typing import List, Dict, Optional

from everyclass.server.entity import domain
from everyclass.server.entity import service
from everyclass.server.utils import JSONSerializable


@dataclass
class Event(JSONSerializable):
    name: str
    room: str

    def __json_encode__(self):
        return {'name': self.name, 'room': self.room}


@dataclass
class MultiPeopleSchedule(JSONSerializable):
    schedules: List[Dict[str, Optional[Event]]]

    def __json_encode__(self):
        return {'schedules': self.schedules}

    def __init__(self, people: List[str], date: datetime.date):
        """多人日程展示。输入学号或教工号列表及日期，输出多人在当天的日程"""
        from everyclass.server import logger

        self.schedules = list()

        for identifier in people:
            is_student, _ = service.get_people_info(identifier)
            semester, week, day = domain.get_semester_date(date)
            if is_student:
                cards = service.get_student_timetable(identifier, semester).cards
            else:
                cards = service.get_teacher_timetable(identifier, semester).cards

            cards = filter(lambda c: week in c.weeks and c.lesson[0] == str(day), cards)  # 用日期所属的周次和星期过滤card
            print(cards)

            event_dict = {}
            for card in cards:
                time = card.lesson[1:5]  # "10102" -> "0102"
                if time not in event_dict:<commit_msg>finish multi people schedule<commit_after>import datetime
from dataclasses import dataclass
from typing import List, Dict, Optional

from everyclass.server.entity import domain
from everyclass.server.entity import service
from everyclass.server.utils import JSONSerializable


@dataclass
class Event(JSONSerializable):
    name: str
    room: str

    def __json_encode__(self):
        return {'name': self.name, 'room': self.room}


@dataclass
class MultiPeopleSchedule(JSONSerializable):
    schedules: List[Dict[str, Optional[Event]]]

    def __json_encode__(self):
        return {'schedules': self.schedules}

    def __init__(self, people: List[str], date: datetime.date):
        """多人日程展示。输入学号或教工号列表及日期，输出多人在当天的日程"""
        from everyclass.server import logger

        self.schedules = list()

        for identifier in people:
            is_student, _ = service.get_people_info(identifier)
            semester, week, day = domain.get_semester_date(date)
            if is_student:
                cards = service.get_student_timetable(identifier, semester).cards
            else:
                cards = service.get_teacher_timetable(identifier, semester).cards

            cards = filter(lambda c: week in c.weeks and c.lesson[0] == str(day), cards)  # 用日期所属的周次和星期过滤card

            event_dict = {}
            for card in cards:
                time = card.lesson[1:5]  # "10102" -> "0102"
                if time not in event_dict:
{'fraction_non_alphanumeric': 0.091283459162663, 'fraction_numerical': 0.008236101578586136, 'mean_word_length': 2.8005215123859193, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1213522', 'n_tokens_mistral': 914, 'n_tokens_neox': 879, 'n_words': 215}