<commit_before>import time as ttime
import sys
from itertools import count
from collections import namedtuple, deque, defaultdict, Iterable
import uuid
import signal
import threading
from queue import Queue, Empty
from enum import Enum

from super_state_machine.machines import StateMachine
from super_state_machine.extras import PropertyMachine
import numpy as np

from .utils import CallbackRegistry, SignalHandler, ExtendedList


__all__ = ['Msg', 'RunEngineStateMachine', 'RunEngine', 'Dispatcher',
           'RunInterrupt', 'PanicError', 'IllegalMessageSequence']

# todo boo, hardcoded defaults
beamline_id = 'test'
owner = 'tester'
scan_id = 123


class LossyLiFoQueue(Queue):
    '''Variant of Queue that is a 'lossy' first-in-last-out

    The queue size is strictly bounded at `maxsize - 1` by
    discarding old entries.
    '''
    def _init(self, maxsize):
        if maxsize < 2:
            raise ValueError("maxsize must be 2 or greater "
                             "for LossyLiFoQueue")
        self.queue = deque(maxlen=maxsize - 1)

    def _get(self):
        return self.queue.pop()<commit_msg>CLN: Remove hard-coded metadata, no longer needed.<commit_after>import time as ttime
import sys
from itertools import count
from collections import namedtuple, deque, defaultdict, Iterable
import uuid
import signal
import threading
from queue import Queue, Empty
from enum import Enum

from super_state_machine.machines import StateMachine
from super_state_machine.extras import PropertyMachine
import numpy as np

from .utils import CallbackRegistry, SignalHandler, ExtendedList


__all__ = ['Msg', 'RunEngineStateMachine', 'RunEngine', 'Dispatcher',
           'RunInterrupt', 'PanicError', 'IllegalMessageSequence']


class LossyLiFoQueue(Queue):
    '''Variant of Queue that is a 'lossy' first-in-last-out

    The queue size is strictly bounded at `maxsize - 1` by
    discarding old entries.
    '''
    def _init(self, maxsize):
        if maxsize < 2:
            raise ValueError("maxsize must be 2 or greater "
                             "for LossyLiFoQueue")
        self.queue = deque(maxlen=maxsize - 1)

    def _get(self):
        return self.queue.pop()
{'fraction_non_alphanumeric': 0.07720420283234354, 'fraction_numerical': 0.005025125628140704, 'mean_word_length': 3.5435684647302903, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '2318725', 'n_tokens_mistral': 644, 'n_tokens_neox': 612, 'n_words': 221}