<jupyter_start><jupyter_text>SimpleQueue Example<jupyter_code>from queue import SimpleQueue
import numpy as np
from inspect import signature

sq = SimpleQueue()
print(f'sq is empty? {sq.empty()}')

sq.put(123)
sq.put(1.23)
sq.put(True)
sq.put(False)
sq.put('text')
sq.put_nowait(np.eye(N=3, dtype=int))

print(f'sq size = {sq.qsize()}')

item = sq.get(block=True, timeout=None)
print(item)

item = sq.get_nowait()
print(item)<jupyter_output>sq is empty? True
sq size = 6
123
1.23
{'fraction_non_alphanumeric': 0.15866388308977036, 'fraction_numerical': 0.029227557411273485, 'mean_word_length': 6.164179104477612, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '160127', 'license': 'MIT', 'n_tokens_mistral': 207, 'n_tokens_neox': 199, 'n_words': 44, 'path': 'src/Standard Modules Practice/queue/SimpleQueue_example.ipynb', 'repo_name': 'Fennec2000GH/Python-Crash-Course', 'size': '479'}