TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #402 · 22 дек.

Отдельно разберём TaskGroup, который пришел на замену gather в Python 3.11. Ключевые отличия ▫️create_task() возвращает объект asyncio.Task, у которого есть соответствюущие методы управления. То есть у нас больше контроля ▫️это контекстный менеджер, который гарантирует что все таски будут остановлены по выходу из контекста ▫️ошибка автоматически отменяет незавершенные задачи, ▫️except* передает нам ExceptionGroup, в котором каждую ошибку можно обработать отдельно import asyncio import random async def do_it() -> str: if random.random() < 0.1: raise ValueError('Oops') delay = random.uniform(0.5, 1.5) await asyncio.sleep(delay) return delay async def main(): try: async with asyncio.TaskGroup() as tg: for _ in range(10): tasks.append(tg.create_task(do_it())) for t in tasks: print(t.result()) except *ValueError as e: for err in e.exceptions: print(err) asyncio.run(main()) Рекомендую изучить страницу Coroutines and Tasks из документации, где представлено больше интересных примеров и механизмов - таймауты - отмена задач - создание задач из другого потока #async

Hashtags

Резултати

Пронајдени 3 слични објави

Пребарај: #wyckoff

当前筛选 #wyckoff清除筛选
SIGNAL

@finsignal · Post #3628 · 22.10.2024 г., 09:27

🗓 A few notes about the market from analysts: 🟠 .Bitcoin retesting is in full swing right now. BTC is penetrating deeper into the old resistance area (red) to turn it into new support (green). → May drop to the top of the channel (black). → Successful retesting here -> resumption of growth. 🟠 .Bitcoin #Wyckoff on October 21st. 🟠 .Bitcoin vs Gold on October 21st. 🟠 .It is no coincidence that the BTC/IWM/QQQ ratio rejects a wedge breakout, while bitcoin shows a downward trend. The wedge should determine the direction by November 11th. 📝 $BTC price: 68,000 USD - the price is above all key levels of the STH Realized Price, which means that short-term investors, even those who bought BTC 155 days ago, are in profit. The key support levels are the values of the STH Realized Price: • 1H-1M: 62,638 USD • 1M-3M: 60,839 USD • 3M-6M: 64,144 USD

Hashtags

Venture Village Wall 🦄

@venturevillagewall · Post #3989 · 26.01.2025 г., 10:00

Bitcoin Nears Last Growth Phase Bitcoin approaches final growth stage per the Wyckoff method, analyst Ali Martinez notes a potential peak at $200,000. More details on the Wyckoff method and trading here: applied trading. Paradigm calls for Ethereum to focus on scaling and aims for at least one major update yearly without changing gas limits. #Bitcoin#Wyckoff#Crypto#Ethereum#Paradigm#DeFi#VC