<commit_before>from enum import Enum


class EventType(Enum):
    TERMINATOR = 0
    # betfair objects
    MARKET_CATALOGUE = 10
    MARKET_BOOK = 20
    RAW_DATA = 30
    CURRENT_ORDERS = 40
    CLEARED_MARKETS = 50
    CLEARED_ORDERS = 60
    # flumine objects
    CLOSE_MARKET = 100
    STRATEGY_RESET = 110
    CUSTOM_EVENT = 120
    NEW_DAY = 130


class QueueType(Enum):
    HANDLER = 10
    ACCOUNT = 20


class BaseEvent:
    EVENT_TYPE: Enum = None
    QUEUE_TYPE: Enum = None

    def __init__(self, event):
        self.event = event

    def __str__(self):
        return "<{0} [{1}]>".format(self.EVENT_TYPE.name, self.QUEUE_TYPE.name)


class MarketCatalogueEvent(BaseEvent):
    EVENT_TYPE = EventType.MARKET_CATALOGUE
    QUEUE_TYPE = QueueType.HANDLER


class MarketBookEvent(BaseEvent):
    EVENT_TYPE = EventType.MARKET_BOOK
    QUEUE_TYPE = QueueType.HANDLER


class RawDataEvent(BaseEvent):
    EVENT_TYPE = EventType.RAW_DATA
    QUEUE_TYPE = QueueType.HANDLER


class CurrentOrdersEvent(BaseEvent):
    EVENT_TYPE = EventType.CURRENT_ORDERS
    QUEUE_TYPE = QueueType.HANDLER


class ClearedMarketsEvent(BaseEvent):
    EVENT_TYPE = EventType.CLEARED_MARKETS
    QUEUE_TYPE = QueueType.HANDLER<commit_msg>py3.5 handling II<commit_after>from enum import Enum


class EventType(Enum):
    TERMINATOR = 0
    # betfair objects
    MARKET_CATALOGUE = 10
    MARKET_BOOK = 20
    RAW_DATA = 30
    CURRENT_ORDERS = 40
    CLEARED_MARKETS = 50
    CLEARED_ORDERS = 60
    # flumine objects
    CLOSE_MARKET = 100
    STRATEGY_RESET = 110
    CUSTOM_EVENT = 120
    NEW_DAY = 130


class QueueType(Enum):
    HANDLER = 10
    ACCOUNT = 20


class BaseEvent:
    EVENT_TYPE = None
    QUEUE_TYPE = None

    def __init__(self, event):
        self.event = event

    def __str__(self):
        return "<{0} [{1}]>".format(self.EVENT_TYPE.name, self.QUEUE_TYPE.name)


class MarketCatalogueEvent(BaseEvent):
    EVENT_TYPE = EventType.MARKET_CATALOGUE
    QUEUE_TYPE = QueueType.HANDLER


class MarketBookEvent(BaseEvent):
    EVENT_TYPE = EventType.MARKET_BOOK
    QUEUE_TYPE = QueueType.HANDLER


class RawDataEvent(BaseEvent):
    EVENT_TYPE = EventType.RAW_DATA
    QUEUE_TYPE = QueueType.HANDLER


class CurrentOrdersEvent(BaseEvent):
    EVENT_TYPE = EventType.CURRENT_ORDERS
    QUEUE_TYPE = QueueType.HANDLER


class ClearedMarketsEvent(BaseEvent):
    EVENT_TYPE = EventType.CLEARED_MARKETS
    QUEUE_TYPE = QueueType.HANDLER
{'fraction_non_alphanumeric': 0.07393790849673203, 'fraction_numerical': 0.026143790849673203, 'mean_word_length': 3.3576512455516014, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3911640', 'n_tokens_mistral': 976, 'n_tokens_neox': 853, 'n_words': 173}