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

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #401 · 15 дек.

Функция asyncio.wait() это еще один способ вызвать множество асинхронных задач. Она работает в нескольких режимах. 1. Самый простой - ждем завершения всех задач async def main(): tasks = [asyncio.create_task(do_it(i)) for i in range(10)] done, pending = await asyncio.wait( tasks, return_when=asyncio.ALL_COMPLETED ) for task in done: try: print(task.result()) except Exception as e: print(e) Очень похоже на gather, но работает не так. ▫️возвращает не результаты, а два сета с объектами Task у которых можно забрать результат через task.result() если они в списке done ▫️не гарантирует порядок результатов так как оба объекта это set ▫️не выбрасывает исключение когда оно появляется, а сохраняет его в Task. Исключение появится когда попробуете забрать резултьтат. 2. Ждем завершения первой задачи, даже если там ошибка. async def main(): tasks = [asyncio.create_task(do_it(i)) for i in range(3)] done, pending = await asyncio.wait( tasks, return_when=asyncio.FIRST_COMPLETED ) # в done может быть несколько задач! for task in done: try: print(task.result()) except Exception as e: print(f"Fail: {e}") # Оставшиеся задачи в pending, как правило, нужно отменить, иначе они будут продолжать работать for task in pending: task.cancel() В сете done будут таски которые успели завершится, причем как успешно так и нет. 3. До первой ошибки. Тоже самое, но с аргументом FIRST_EXCEPTION done, pending = await asyncio.wait( tasks, return_when=asyncio.FIRST_EXCEPTION ) Функция завершается как только первая задача упадет с ошибкой. Учтите, что в любом случае done вы можете обранужить несколько задач, как с ошибками так и успешные. ↗️ Полный листинг примеров здесь #async

Hashtags

Резултати

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

Пребарај: #bootstrap

当前筛选 #bootstrap清除筛选
Repositorio data science

@repo_science · Post #3592 · 15.09.2023 г., 12:16

#webDevelopment#bootstrap 🌐 Bootstrap 5 Crash Course Bootstrap is one of the most widely used CSS frameworks, but it can be quite complex to learn since there are so many features in Bootstrap. In this video I will be breaking down everything you need to know about Bootstrap by covering the entire grid system, 6 popular components, and 6 categories of utility classes. ----- Main channel: @repo_science Coupons: @freecoupons_reposcience -----

Repositorio data science

@repo_science · Post #3250 · 31.05.2023 г., 11:52

#python#flask#django#html#css#bootstrap 🐍 Python Web Dev Pro: Flask, Django, HTML, CSS & Bootstrap Elevate Your Web Development Skills: Master Back-End & Front-End Technologies with Python, Flask, Django, and Responsive 🔗Link ----- Main channel:@repo_science Coupons: @freecoupons_reposcience -----

GitHub Trends

@githubtrending · Post #14893 · 01.07.2025 г., 12:30

#css#admin#admin_dashboard#admin_panel#admin_template#bootstrap AdminLTE is a free, fully responsive admin dashboard template built on Bootstrap 5, designed to work smoothly on all devices from mobiles to desktops. It is easy to customize and includes many ready-to-use components, making it ideal for quickly creating professional admin panels. The latest version fixes deployment issues, ensures consistent behavior in development and production, and supports modern browsers without errors. You can start developing easily with simple commands and benefit from clear, well-commented code. This saves you time and effort in building and deploying admin interfaces efficiently and reliably. https://github.com/ColorlibHQ/AdminLTE

GitHub Trends

@githubtrending · Post #14762 · 30.05.2025 г., 00:00

#html#bootstrap#devcontainer#html5#jamstack#jekyll#jekyll_theme#pwa#responsive_web_design#rubygems The Chirpy Jekyll theme is a simple and powerful tool for creating websites, especially for technical writing. It offers many features like dark mode, categories, syntax highlighting, and built-in search. This theme helps users create visually appealing sites with ease, making it ideal for sharing knowledge and ideas. It also supports mathematical expressions and diagrams, which is beneficial for technical content. Additionally, it is optimized for SEO and performance, ensuring your site is easily found and runs smoothly. https://github.com/cotes2020/jekyll-theme-chirpy