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

Резултати

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

Пребарај: #noaifraudact

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

@ai_and_law · Post #241 · 15.02.2024 г., 08:04

US Lawmakers Introduce No AI FRAUD Act Hello everyone! US lawmakers María Elvira Salazar and Madeleine Dean introduced the No Artificial Intelligence Fake Replicas And Unauthorized Duplications (No AI FRAUD) Act on January 10, aiming to safeguard individuals' likeness and voice from exploitation in AI-generated content. The bill addresses concerns over the misuse of personalized generative AI cloning models, which enable human impersonation and unauthorized creation of fakes using others' images and voices. It seeks to protect the personal rights of individuals, including musical artists, actors, athletes, and even students, whose likeness and voice have been violated. Examples cited include AI-generated songs featuring famous artists like Drake and The Weeknd, false endorsements using celebrities like Tom Hanks, and the creation of non-consensual and intimate deepfakes, particularly concerning high school girls in a New Jersey town. Under the No AI FRAUD Act, individuals gain federal intellectual property (IP) rights over their likeness and voice, empowering them to enforce these rights against those responsible for creating, facilitating, or disseminating AI-generated content without their consent. The bill aims to curb the proliferation of AI-generated imitations and deepfakes while protecting individuals' rights and privacy. #NoAIFRAUDAct#AIPolicy#IntellectualProperty