@Learn_English_from_Zero_to_Hero · Post #60680 · 31.03.2026 г., 18:01
#Expressions
Hashtags
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
Пребарај: #expressions
@Learn_English_from_Zero_to_Hero · Post #60680 · 31.03.2026 г., 18:01
#Expressions
Hashtags
@Learn_English_from_Zero_to_Hero · Post #60602 · 26.01.2026 г., 16:56
#Expressions 💥Throw sb off 'course : 🔅if sb/sth is thrown off course, they are forced away from the direction they should be travelling in: ▪️ The plane was thrown off course. 2🔅to force sb to change the direction in which their ideas or actions are moving: ▪️ The government was thrown off course by economic problems.
Hashtags
@Learn_English_from_Zero_to_Hero · Post #60131 · 23.08.2025 г., 18:19
#Expressions 💥Fly the coop. ▪️ (idiomatic) Leave or escape. 💥Once she heard the teacher's voice, she flew the coop .
Hashtags
@Learn_English_from_Zero_to_Hero · Post #60129 · 23.08.2025 г., 18:14
#Expressions 💥Doom and gloom (uncountable) ▪️Something considered indicative of feelings of pessimism and despair. ▪️Antonyms: rainbows and unicorns, sunshine and rainbows. ⚡️The economic forecast contained the usual doom and gloom. ⚡️His sister was all doom and gloom after she lost the part.
Hashtags
@Learn_English_from_Zero_to_Hero · Post #60128 · 23.08.2025 г., 18:12
#Expressions 💥No great shakes (uncountable) ▪️(idiomatic) Something unexceptional, not noteworthy or special. ▪️Synonyms: nothing to write home about ⚡️You're welcome to stay here, but this hut ain't no great shakes for such as you.
Hashtags
@Learn_English_from_Zero_to_Hero · Post #59967 · 30.07.2025 г., 19:01
#Expressions 💥raring to do something (BrE) ● very eager to do something ⚜The children were raring to get outdoors.
Hashtags
@Learn_English_from_Zero_to_Hero · Post #59966 · 30.07.2025 г., 19:01
#Expressions 💥on the brink ●(idiomatic) Very nearly; imminent; close. ⚜The old building seemed to be on the brink of collapse.
Hashtags
@Learn_English_from_Zero_to_Hero · Post #59965 · 30.07.2025 г., 19:01
#Expressions 🔘on the level ▪️(idiomatic) Honest(ly), sincere(ly), straightforward(ly), fair(ly). 🔸He looks like a used car salesman, but he's really on thelevel, so you can trust him.
Hashtags
@Learn_English_from_Zero_to_Hero · Post #59936 · 24.07.2025 г., 19:00
#Expressions 💥Finer things ●That which is considered of a high quality, expensive or tasteful. •Example: ⚡️I'm not materialistic, though I do enjoy the finer things in life.
Hashtags
@Learn_English_from_Zero_to_Hero · Post #59935 · 24.07.2025 г., 19:00
#Expressions 💥Lose sleep over something •to worry about something •Example: ⚡️I know she's angry with me, but I'm not losing any sleep over it.
Hashtags
@Learn_English_from_Zero_to_Hero · Post #59934 · 24.07.2025 г., 19:00
#Expressions 💥Take the plunge •to do something important or difficult, especially after thinking about it for a long time. ●Example: ⚡️We're finally going to take the plunge and buy a house.
Hashtags
@Learn_English_from_Zero_to_Hero · Post #59909 · 23.07.2025 г., 06:16
#Expressions 💥Lend itself to sth FORMAL •to be suitable for a particular purpose •Example: ⚡️The novel's complex, imaginative style does not lend itself to translation.
Hashtags