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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #197 · 4 јан.

Подразумеваемые неймспейсы или неявные пакеты. Этот функционал добавлен в Python 3.3 Что он означает? Ранее, до 3.3 пакетами считались лишь директории, в которых есть файл __init__.py. Этот файл одновременно являлся свидетельством того, что директория это Python-пакет, и служил "телом" этого пакета. То есть местом, где можно написать код, как это делается внутри модуля. Этот код исполняется в момент импорта пакета, так что его принято называть "код инициализации пакета". Начиная с версии 3.3 Любая директория считается пакетом и Python будет пытаться использовать любую директорию для импорта. Конечно, не любую в файловой системе, а только те что находятся в sys.path. Это значит, что теперь __init__.py нужно делать только если: 🔸 вам требуется создать код инициализации пакета 🔸 нужна совместимость со старыми версиями Python На мой взгляд это немного упрощает разработку, делает её чище, но с другой стороны убивает некоторую однозначность происходящего. Например, я создал репозиторий со своей библиотекой и рядом положил код примеров или тестов. repo_name/ my_library/ __init__.py main.py examples/ exam1.py exam2.py В этом репозитории пакетом является только my_library, остальные директории это не пакеты, это просто дополнительный код в файлах. Директория examples не добавлена в sys.path, в ней нет рабочих модулей. Но если она лежит рядом с my_library, то Python вполне сможет импортнуть из неё модули, так как посчитает что examples это валидный пакет. Конечно, пример несколько надуманный. Никто не будет добавлять корень репозитория в sys.path. Но, я думаю, суть ясна. Иногда директория это просто директория а не пакет! #basic#pep

Hashtags

Резултати

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

Пребарај: #frontierai

当前筛选 #frontierai清除筛选
AI & Law

@ai_and_law · Post #732 · 26.12.2025 г., 08:04

🇬🇧UK Publishes First Evidence-Based Assessment of Frontier AI Capabilities The UK AI Security Institute released its inaugural "Frontier AI Trends Report", presenting a public, data-driven assessment of how the most advanced AI systems are evolving. Based on two years of testing across cyber security, software engineering, biology, and chemistry, the report provides quantified evidence on AI capabilities, replacing speculation with measurable benchmarks. The findings show rapid capability growth. In cyber security, success on apprentice-level tasks rose from under 9% in 2023 to about 50% in 2025, and for the first time a model completed an expert-level task requiring up to 10 years of experience. In software engineering, models now complete hour-long tasks over 40% of the time, up from below 5% two years ago. In biology and chemistry, systems outperform PhD-level researchers on knowledge tests and enable non-experts to conduct advanced lab work. Safeguards are improving but remain imperfect. The time needed to discover a “universal jailbreak” increased from minutes to several hours between model generations, around a 40-fold improvement, though all tested systems remain vulnerable to some bypasses. The report makes no policy recommendations, but aims to improve transparency and inform regulators and policymakers globally about what frontier AI systems can actually do. #AIRegulation#AISafety#UKAI#FrontierAI#AIGovernance#TechPolicy

AI & Law

@ai_and_law · Post #153 · 31.10.2023 г., 08:04

UK Government Unveils Report on Frontier AI Risks Hello AI & Law community! UK Prime Minister Rishi Sunak has issued a report to address AI's potential risks and harness its benefits. The report focuses on the rapid advancements in frontier AI and comprises three key sections: 1️⃣Capabilities and Risks from Frontier AI: This section discusses the current state of AI capabilities, potential improvements, and associated risks, including societal harms, misuse, and loss of control. 2️⃣Safety and Security Risks of Generative AI to 2025: It outlines global benefits of generative AI while emphasizing increased safety and security risks, particularly in enhancing threat actor capabilities and the effectiveness of attacks. 3️⃣Future Risks of Frontier AI: This section explores uncertainties in AI development, future system risks, and potential scenarios for AI up to 2030. The report, based on declassified information, raises concerns about generative AI being exploited by terrorists to plan biological or chemical attacks, posing a serious global security threat. Although some experts have questioned the UK Government's approach, the report highlights the need for collaborative measures to manage AI risks. An upcoming AI Safety Summit aims to foster discussions around these challenges, including misuse for cyberattacks or bioweapon design, AI systems acting autonomously, and broader societal impacts. #UKGovernmentAI#FrontierAI#AIRisks#AISafety#AIChallenges#UKAIReport#AIandLaw#AIPolicy#AIRegulation