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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #60 · 31 мар.

Вторая по частоте future-функция, которую я использовал, это абсолютный импорт from __future__ import absolute_import Что она делает? Изменения, которые вносит эта инъекция описаны в PEP328 Покажу простой пример. Допустим, есть такой пакет: /my_package /__init__.py /main.py /string.py Смотрим код в my_package/main.py # main.py import string Простой пример готов) Вопрос в том, какой модуль импортируется в данном случае? Есть два варианта: 1. модуль в моём пакете my_package.string 2. стандартный модуль string И вот тут вступает в дело приоритет импортов. В Python2 порядок следующий: помимо иных источников, раньше ищется модуль внутри текущего пакета, а потом в стандартных библиотеках. Таким образом мы импортнём my_package.string. Но в Python3 это поведение изменилось. Если мы указываем просто имя пакета, то ищется именно такой модуль, игнорируя имена в текущем пакете. Если мы хотим импортнуть именно подмодуль из нашего пакета то, мы должны теперь явно это указывать. from my_package import string или относительный импорт, но с указанием пути относительно текущего модуля main from . import string Еще одной неоднозначностью меньше 😎 Подробней про импорты здесь: https://docs.python.org/3/tutorial/modules.html #2to3#pep#basic

Резултати

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

Пребарај: #turingaward

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

@ai_and_law · Post #522 · 10.03.2025 г., 08:04

❗️Turing Award Winners Sound the Alarm on AI Safety Andrew Barto and Richard Sutton, pioneers of foundational AI training method and recipients of this year’s Turing Award, are using their moment in the spotlight to issue a stark warning: AI companies are prioritizing profit over safety. Comparing the current approach to “building a bridge and testing it by having people use it,” they criticize the industry for rushing AI models to market without sufficient safeguards. Their concerns echo those of other leading AI researchers, including past Turing Award winners Geoffrey Hinton and Yoshua Bengio, who have also warned about the risks of unchecked AI development. With OpenAI shifting toward a for-profit model and major AI firms racing to deploy new technologies, the debate over responsible AI governance is more urgent than ever. #AI#AIGovernance#TuringAward#AISafety#ResponsibleAI

Venture Village Wall 🦄

@venturevillagewall · Post #4349 · 09.03.2025 г., 22:00

Weekly AI Digest: Key Developments 🔹 Anthropic raises $3.5B through incremental funding rounds. Read more 🔹 QwQ 32B launched, slightly trailing top performers. Details here 🔹 Wan 2.1 remains a top open-source model amid competition. Learn more 🔹 Hunyuan Image2Video: Tencent's response to Alibaba's offering. Explore here 🔹 SourceCraft introduces cloud-based team development as VM replacement. More info 🔹 Apple's Mac Studio handles demanding models and LLMs. Discover more 🔹 SpeechSense analyzes customer conversations using LLM technology. Details 🔹 RL wins Turing Award, recognized with a $1M prize. Full story 🔹 Bitcoin drops to $82,223; Ethereum to $1,998, with $243M in liquidations. Read market update. #AI#Crypto#VC#Anthropic#Bitcoin#Ethereum#Hunyuan#Tencent#AIModels#OpenSource#MacStudio#SpeechSense#Investments#Funding#TuringAward#Liquidations#QwQ#SourceCraft#SmartTech