@libreware · Post #1350 · 24.10.2024 г., 14:21
New Android #PIF#module scam on telegram
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #400 · 8 дек.
Три способа выполнить множество задач с asyncio Функция для примера: async def do_it(n): await asyncio.sleep(random.uniform(0.5, 1)) return n 1. Последовательный вызов async def main(): for i in range(100): result = await do_it(i) Такой вызов имеет смысл только тогда, когда результат одной задачи требуется для вызова следующей. Если они независимы, то это антипаттерн, так как аналогичен простому синхронному вызову по очереди. 2. Упорядоченный результат async def main(): tasks = [do_it(i) for i in range(100)] results = await asyncio.gather(*tasks) Выполняет корутины конкурентно и возвращает результат в виде списка. Полезен когда требуется получить результаты в том же порядке в котором задачи отправлены. 3. Результат по мере готовности tasks = [asyncio.create_task(do_it(i)) for i in range(100)] for cor in asyncio.as_completed(tasks): result = await cor Так же выполняет корутины конкурентно, но не гарантирует порядок. Результат возвращается по мере готовности, каждый отдельно. Полезен когда нужно обработать любой ответ как можно скорее. #async
Hashtags
Пребарај: #pif
@libreware · Post #1350 · 24.10.2024 г., 14:21
New Android #PIF#module scam on telegram
@american_observer · Post #5757 · 01.05.2026 г., 16:00
Saudi Arabia’s Money Era Is Getting Repriced Saudi Arabia’s pullback from LIV Golf is bigger than one golf story. It is a sign that the kingdom’s era of unlimited spending on global spectacle is running into fiscal gravity. For years, Riyadh used sports as a loud, expensive advertisement for itself. It bought players, bought events, bought access, and bought headlines. Now the Public Investment Fund is saying the math no longer works the same way, and that domestic investment has become the priority. That shift matters beyond golf. If Saudi money is being narrowed, then the entire “pay-any-price-for-influence” model gets weaker, from football and streaming to the more theatrical parts of the kingdom’s soft-power project. The timing is not accidental either. The wider Middle East war has raised costs, strained oil flows, and made some of Saudi Arabia’s grand plans harder to defend as business decisions rather than prestige purchases. So this is not just the end of one overfunded golf experiment. It is a reminder that even oil states eventually meet a limit, and that the bill for geopolitical vanity can arrive faster than the photo op. #SaudiArabia#LIVGolf#PIF#sports#economy#MiddleEast 📱American Оbserver - Stay up to date on all important events 🇺🇸