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

Резултати

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

Пребарај: #riddle

当前筛选 #riddle清除筛选
Language Trivia 🤔

@languagetrivia · Post #536 · 24.12.2024 г., 06:00

🦫 Riddle: This 🇬🇧 British beaver is holding a mystery vegetable. What would he say he is holding? Options: A) Zucchini B) Courgette C) Cucumber D) Turnip E) Aubergine Press the button below to see the right answer. Did you guess it right? Yes 😎 | No 🌚 @languagetrivia#riddle

Hashtags

Language Trivia 🤔

@languagetrivia · Post #245 · 28.10.2024 г., 19:11

🧩 Riddle I’m a language spoken in a country known for its temples and street food. Written with a beautiful, looping script with no spaces between words. I use five tones to change the meaning of a word. What language am I? #guess_the_language#riddle 🦫@languagetrivia

Ask Me

@askmenow · Post #2871 · 07.03.2021 г., 11:59

1. One Light Year is equal to? Ans . the distance traveled by light in one year 2. Liquefied petroleum gas (LPG) is mainly a mixture of ___? Ans . propane and butane 3. The Ozone layer lies in the which layer? Ans . Stratosphere 4. Most of the light rays inside a tubelight is in the form of____? Ans . ultra -violet light 5. Which is the alkalodid that contains in cola drinks? Ans . Caffeine 6. The device used for detecting even feeble current: Ans . Galvanoscope Via @askmenow ------------------------------ #Idiom "When pigs fly" What it means?Check Answer #Riddle What has a thumb and four fingers, but is not a hand" What is it?Check Answer ------------------------------- For Fun: Be Like Bro & sarcasticLOL Today's Quiz MCQ:Quiz MCQ

Ask Me

@askmenow · Post #2858 · 12.02.2021 г., 17:47

Daily Questions and Answers 1. ‘Mechanical Clock’ made by whom? Ans . Isaac Newton 2. By which Cotton fibers are made? Ans . Cellulose 3. What is the name of the tube which connects the middle ear with the throat? Ans . Eustachian tube Via @askmenow #Idiom " A slap on wrist " What it means?Check Answer #Riddle "I’m tall when I’m young, and I’m short when I’m old" What am I?Check Answer

Ask Me

@askmenow · Post #2857 · 11.02.2021 г., 06:59

1. What is the speed of Earth around sun? Ans . 30 km/sec 2. In our solar system the MARS is fourth planet according to sequences but how many moons has ‘Planet MARS’? Ans . 2 3. To measure the Humidity in air, what instrument used? Ans . Hygrograph 4. Splitting of light into its constituent colors is known as what? Ans . Dispersion 5. Basically the heavy water is used by which type of industries? Ans . Nuclear Power Generation plants Via @askmenow #Riddle "What belongs to you but is used most by other people" What is it?Check Answer #Idiom "The ball is in your court" What it means?Check Answer For fun: SarcasticLOL & Be Like Bro Today's news headline: read here

Ask Me

@askmenow · Post #2854 · 08.02.2021 г., 18:23

Daily Questions and Answers 1. Where is Hagia Sophia located? Answer: Istanbul, Turkey 2. Which region can be called the belt of Doldrums? Answer: Equatorial region 3. What is the study of landforms called? Answer: Geomorphology Via @askmenow #Idiom "Blood is thicker than water" What it means?Check Answer #Riddle "What's so fragile that it breaks when you speak it" What is it?Check Answer Today's News headlines:read here Try: Quiz MCQ For Fun:Be Like Bro , sarcasticLOL

Language Trivia 🤔

@languagetrivia · Post #368 · 22.11.2024 г., 16:31

Why does Burmese (the language spoken in Myanmar, formerly Burma) use rounded characters instead of straight lines? Take the quiz below to find out! @languagetrivia#riddle#image

Anatomy Art Hub ☮️

@anatomyarthub · Post #5043 · 28.04.2025 г., 05:34

#загадка#riddle 6️⃣ Моя спина такая заботливая — она всегда напоминает мне, когда я старею... особенно, когда я просто чихнул. My back is so caring - it always reminds me when I'm getting old... especially when I just sneeze. @anatomyarthub

Anatomy Art Hub ☮️

@anatomyarthub · Post #4182 · 29.12.2024 г., 06:38

#загадка#riddle 5️⃣ Нормальная длина ног - когда ноги достают до пола. Так что это за мышца? Normal leg length is when your legs reach the floor. So what is this muscle? @anatomyarthub

123•••1011
ПретходнаСтраница 1 од 11Следна