Initial commit

This commit is contained in:
Michael Hansen
2025-08-05 13:46:07 -05:00
commit 469ce9c3e8
7 changed files with 1155 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
"""Utility methods."""
from collections.abc import Callable
import uuid
from typing import Optional
def get_mac() -> str:
mac = uuid.getnode()
mac_str = ":".join(f"{(mac >> i) & 0xff:02x}" for i in range(40, -1, -8))
return mac_str
def call_all(*callables: Optional[Callable[[], None]]) -> None:
for item in filter(None, callables):
item()