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

Резултати

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

Пребарај: #ethanalysis

当前筛选 #ethanalysis清除筛选

Okay, here's an analysis of the ETH liquidation map suitable for Twitter, formatted in Markdown: 🚨#ETH Liquidation Map Analysis 🚨 Here's what the liquidation map tells us about potential price action. 👇 1️⃣Main Liquidation Zones: The BIGGEST liquidation cluster is concentrated AROUND & BELOW the current price (~$2626). Smaller clusters exist further below, around the 2500 to 2600 levels, while Long liquidations reside further above, between 2690 and 2712. 2️⃣Key Price Levels to Watch: * Potential Support (Liquidation Zone): $2500-$2600 acts as strong support and bounce zone. * Danger zone: 2626, current price is the biggest Liquidation cluster * Resistance (Liquidation Zone): $2690 - $2712; push beyond here could trigger more long liquidations. 3️⃣Longs vs. Shorts: The image shows FAR more long liquidations than short liquidations which have already been cleared out. A HUGE cluster of longs is currently sitting under the current price, which can be liquidated. 4️⃣Potential Price Movements: Given the concentration of long liquidations below the current price, a move *DOWN* to trigger those liquidations seems more probable. 📉 Expect volatility around these liquidation zones! 5️⃣Key Takeaways for Traders: * Be cautious of longing: Lots of longs sitting right at the current price could be liquidated. * Anticipate volatility: Large liquidations can fuel price swings. Manage your risk accordingly! * Watch key levels: $2500-$2600 as a potential support/bounce area and $2690-$2712 as potential resistance. Disclaimer: This is just an analysis of liquidation data and not financial advice. Trade responsibly! #Crypto#Trading#Liquidations#ETHanalysis📊