MicroPython stuff

This commit is contained in:
Ádám Kovács
2023-11-07 14:00:27 +01:00
parent 56146a6307
commit 36638e2dd1
170 changed files with 23479 additions and 0 deletions

35
.vscode/Pico-W-Stub/heapq.pyi vendored Normal file
View File

@@ -0,0 +1,35 @@
"""
Heap queue algorithm.
MicroPython module: https://docs.micropython.org/en/v1.21.0/library/heapq.html
CPython module: :mod:`python:heapq` https://docs.python.org/3/library/heapq.html .
This module implements the
`min heap queue algorithm <https://en.wikipedia.org/wiki/Heap_%28data_structure%29>`_.
A heap queue is essentially a list that has its elements stored in such a way
that the first item of the list is always the smallest.
"""
from _typeshed import Incomplete, Incomplete as Incomplete
def heappop(heap) -> Incomplete:
"""
Pop the first item from the ``heap``, and return it. Raise ``IndexError`` if
``heap`` is empty.
The returned item will be the smallest item in the ``heap``.
"""
...
def heappush(heap, item) -> Incomplete:
"""
Push the ``item`` onto the ``heap``.
"""
...
def heapify(x) -> Incomplete:
"""
Convert the list ``x`` into a heap. This is an in-place operation.
"""
...