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

TGINSIGHT SIMILAR POSTS

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

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

Отдельно разберём TaskGroup, который пришел на замену gather в Python 3.11. Ключевые отличия ▫️create_task() возвращает объект asyncio.Task, у которого есть соответствюущие методы управления. То есть у нас больше контроля ▫️это контекстный менеджер, который гарантирует что все таски будут остановлены по выходу из контекста ▫️ошибка автоматически отменяет незавершенные задачи, ▫️except* передает нам ExceptionGroup, в котором каждую ошибку можно обработать отдельно import asyncio import random async def do_it() -> str: if random.random() < 0.1: raise ValueError('Oops') delay = random.uniform(0.5, 1.5) await asyncio.sleep(delay) return delay async def main(): try: async with asyncio.TaskGroup() as tg: for _ in range(10): tasks.append(tg.create_task(do_it())) for t in tasks: print(t.result()) except *ValueError as e: for err in e.exceptions: print(err) asyncio.run(main()) Рекомендую изучить страницу Coroutines and Tasks из документации, где представлено больше интересных примеров и механизмов - таймауты - отмена задач - создание задач из другого потока #async

Hashtags

Резултати

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

Пребарај: #sast

当前筛选 #sast清除筛选
GitHub Trends

@githubtrending · Post #14996 · 25.07.2025 г., 12:00

#ocaml#c#go#java#javascript#python#r2c#ruby#sast#semgrep#static_analysis#static_code_analysis#typescript Semgrep is a fast, open-source tool that scans your code to find bugs and security issues in over 30 programming languages. It works locally on your computer or in your build system, so your code stays private. Semgrep’s rules are easy to write and understand, helping you catch problems early in development, whether in your IDE, pre-commit checks, or CI/CD pipelines. For stronger security, the Semgrep AppSec Platform offers advanced analysis, AI-powered triage, and detailed fix guidance, reducing false alarms and helping developers fix issues quickly without slowing down. This improves code quality and security efficiently. https://github.com/semgrep/semgrep

GitHub Trends

@githubtrending · Post #15349 · 20.12.2025 г., 12:30

#python#ai#bug_detection#code_audit#code_quality#code_review#developer_tools#devsecops#google_gemini#llm#react#sast#security_scanner#supabase#typescript#vite#vulnerability_scanner#xai **DeepAudit** is an AI-powered code audit tool using multi-agent collaboration to deeply scan projects for vulnerabilities like SQL injection, XSS, and path traversal. Import code from GitHub/GitLab or paste snippets; agents plan, analyze with RAG knowledge, and verify issues via secure Docker sandbox PoCs, generating PDF reports with fix suggestions. Deploy easily with one Docker command, supports local Ollama models for privacy, and cuts traditional tools' high false positives. **You benefit** by automating secure audits like a pro hacker—saving time, reducing errors, ensuring real exploits are caught, and speeding safe releases without manual hassle. https://github.com/lintsinghua/DeepAudit