5 вопросов
-
middle code_explain ```python from functools import wraps from time import time def cached(ttl_sec=60): def deco(fn): cache = {} @wraps(fn) def wrappe…
-
senior code_explain ```sql WITH RECURSIVE org_tree AS ( SELECT id, name, parent_id, 0 AS depth, ARRAY[id] AS path FROM employees WHERE id = 42 UNION ALL SELE…
-
middle code_explain ```python from contextlib import contextmanager import time @contextmanager def timed(name): start = time.perf_counter() try: yield finall…
-
senior code_explain ```python import asyncio async def fetch_all(urls: list[str], concurrency: int = 10) -> list[str]: sem = asyncio.Semaphore(concurrency) async def boun…
-
middle code_explain ```js function debounce(fn, ms) { let timer = null; return function (...args) { clearTimeout(timer); timer = setTimeout(() => fn.apply(…