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

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

Резултати

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

Пребарај: #strat

当前筛选 #strat清除筛选
🗺 Travel the World | Private Expeditions

@expeditionsworldwide · Post #11 · 08.08.2020 г., 05:16

Today I am adding a Stratis coin (#STRAT) to my portfolio, paired with #USDT on Binance. The coin looks attractive for a long-term investment. Purchasing it in my 10$ Experiment portfolio. The coin ranks 124th in the CoinMarketCap rating. Briefly about the project: #STRAT is a blockchain-based platform that makes it easy to develop, test and deploy C# applications on the dotNET framework. STRATIS will act as a blockchain-as-a-service (BAAS) platform for corporations and institutions. This will help the enterprises that have joined the project to quickly implement blockchain technology for use in various industries. 🎯 The mission of the STRATIS platform is to become a one-stop shop for all blockchain-based products. The technology is a clone of the core bitcoin code, with several advanced features and written in C# instead of C++. #STRAT increased in value from August 2016 ($ 0.023) to the summer of 2017 (about $ 7.71), which is 49,000% in 10 months. It became one of the few currencies to be adopted and implemented very quickly thanks to numerous trusted exchanges and cryptocurrency wallets such as Poloniex, Jaxx and Ledger. At the moment, the price is moving in a neat upward channel. We have already retested the mirror support level 0.5440 twice. We have 2 support zones around 0.50 and 0.40. According to the Fibonacci grid, growth is expected by 70% to the level of 0.9588, which is near the psychological $1. This is the 6th coin in my portfolio. Before that, I bought for $10 such coins as: #NEO, #EOS, #REP, #XRP and of course #BTC.