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 слични објави

Пребарај: #supercomputing

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

@ai_and_law · Post #340 · 27.06.2024 г., 07:04

EU Council Adopts Regulation to Boost AI Development with Supercomputing Power The Council of the EU has officially adopted an amendment to the regulation on the European High-Performance Computing (EuroHPC) joint undertaking, paving the way for the creation of AI factories. With this regulation, the EuroHPC initiative will promote AI factories that include AI supercomputers, associated data centers, and specialized supercomputing services. These facilities will provide both public and private users with access, with specific conditions tailored for startups and SMEs. Host entities of AI factories will receive EU financial support, covering up to 50% of both acquisition and operating costs of AI supercomputers. The regulation will be published in the Official Journal of the European Union and will enter into force 20 days later, marking a significant step towards enhancing AI development and innovation across Europe. #AI#Supercomputing

科技&趣闻&杂记

@kejiqu · Post #4338 · 09.04.2026 г., 10:13

黑客声称从中国国家超级计算中心窃取 10 PB 敏感数据,此举将成为中国历史上最大规模的网络攻击,涉及科学、国防等领域 6,000 个客户 黑客声称已从中国国家超级计算中心窃取高达 10 petabytes 的敏感数据,如果属实,这将成为中国历史上规模最大的网络攻击事件。此次攻击影响范围广泛,涉及约 6,000 个客户,涵盖科学、国防等多个领域。目前事件的真实性尚未得到独立验证,但黑客声称掌握了大量敏感信息。安全专家正在对此事件进行分析。Tom's Hardware 🏷#China#National#Supercomputing#Center#petabytes#data#breach 📢频道👥群组📝投稿