@sickipedia · Post #9696 · 23.02.2025 г., 06:01
"Why are you so calm?". "I never argue with stupid people. I just say 'you're right' and move on. "That's ridiculous!". "You're right." #roast@Sickipedia
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
Пребарај: #roast
@sickipedia · Post #9696 · 23.02.2025 г., 06:01
"Why are you so calm?". "I never argue with stupid people. I just say 'you're right' and move on. "That's ridiculous!". "You're right." #roast@Sickipedia
Hashtags
@sickipedia · Post #9619 · 29.01.2025 г., 07:01
My buddy quit his job at BMW. He of course gave no indication that he was leaving. #roast@Sickipedia
Hashtags
@sickipedia · Post #9601 · 23.01.2025 г., 07:01
My wife asked me, “Can we have some peace and quiet while I cook dinner?” So I took out the batteries from the smoke alarm. #roast@Sickipedia
Hashtags
@sickipedia · Post #9558 · 08.01.2025 г., 11:01
I had a big fight with my wife, I yelled at her, "When you finally die, I'm getting you a headstone that says, 'Here Lies My Wife - Cold As Ever'." "Yeah well," she shouted back, "When you die, I'm getting you a headstone that says, 'Here Lies My Husband - Stiff At Last." #roast@Sickipedia
Hashtags
@sickipedia · Post #9550 · 05.01.2025 г., 15:01
My coworker said: “ You should not eat red meat.” I said, “My grandmother lived to be 97.”… She said, “Did she eat red meat?” I said, “No. She minded her own business.” #roast@Sickipedia
Hashtags
@sickipedia · Post #9512 · 24.12.2024 г., 07:01
I named my daughter after my mother-in-law. Raving Psycho will soon be a year old. #roast@Sickipedia
Hashtags
@sickipedia · Post #9506 · 22.12.2024 г., 07:01
My son’s teacher thinks my son has a low IQ judging by his homework. That’s absurd! My son is perfectly normal! I did his homework. #roast@Sickipedia
Hashtags
@sickipedia · Post #9485 · 15.12.2024 г., 06:01
My wife asked me, "is it just me or is the cat getting fat?" "no, it's just you." #roast@Sickipedia
Hashtags
@sickipedia · Post #9162 · 28.08.2024 г., 11:01
I asked my mom If I was an accident. She said, "No, of course not. Your brother was the accident. You were a mistake". #roast @Sickipedia
Hashtags
@sickipedia · Post #9055 · 24.07.2024 г., 11:01
Politicians and diapers have one thing in common: they should both be changed regularly… and for the same reason. #roast @Sickipedia
Hashtags
@sickipedia · Post #9052 · 23.07.2024 г., 11:01
A man who owned a sausage factory was showing his arrogant asshole son around his factory. Try as he might to impress his snobbish son, his son would just sneer and look down his nose at everything. They approached the heart of the factory, where the father thought, "This should impress him!" He showed his son a machine and said, "Son, this is the heart of the factory. With this machine here we can put in a pig, and out come sausages." The son, unimpressed, said, "Yes, but do you have a machine where you can put in a sausage and out comes a pig?" The father, "Yes son, we call it your mother." #roast @Sickipedia
Hashtags
@sickipedia · Post #8871 · 22.05.2024 г., 11:01
Wife: "How would you describe me?" Husband: "ABCDEFGHIJK." Wife: "What does that mean?" Husband: "Adorable, beautiful, cute, delightful, elegant, fashionable, gorgeous, and hot." Wife: "Aw, thank you, but what about IJK?" Husband: "I'm just kidding!" #roast @Sickipedia
Hashtags