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

Резултати

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

Пребарај: #userprotection

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

@ai_and_law · Post #43 · 30.06.2023 г., 07:04

Are your favorite Apps invading your privacy? Let's find out! Artificial Intelligence has become a hot topic, raising questions about its impact on user privacy. Are AI apps really intruding on our personal data? A recent investigation by Home Security Heroes (HSH) reveals some eye-opening findings. By examining various AI applications, HSH has uncovered the extent of data intrusion facilitated by AI technology. To determine the invasiveness of AI apps, HSH used the privacy labels available on the App Store. These labels reveal the amount of personal information an app tracks for marketing purposes. They evaluated a total of 159 apps. Key Insights: 1️⃣ 75% of AI apps share users' data with third parties. 2️⃣ 64% of investigated AI-powered apps track users' personal data for their own marketing benefits. The Most Invasive AI Apps: 🔹 Tracking 43% of personal data: Brainly Photoleap: AI Art Photo Editor 🔹 Tracking 36% of personal data: Google Assistant Socratic by Google DaVinci – AI Generated Art Facetune AI Photo/Video Editor How comfortable are you with AI apps tracking and sharing your personal data? Are the benefits worth the potential risks to your privacy? #AI#Privacy#DataSecurity#UserProtection#AIApps

Crypto M - Crypto News

@CryptoM · Post #64897 · 10.04.2026 г., 07:57

🚀 Aethir Blocks Vulnerability Attack, Plans Compensation for Users Aethir has successfully thwarted a vulnerability attack on its bridge contract, estimating user losses to be around $90,000. According to NS3.AI, the company assured that ATH on Ethereum remains secure. Aethir is set to announce a compensation plan for affected users next week. #Aethir#VulnerabilityAttack#CompensationPlan#Ethereum#CryptoSecurity#NS3AI#UserProtection

Crypto M - Crypto News

@CryptoM · Post #65128 · 11.04.2026 г., 07:24

🚀 South Korea Considers Seizing Principal in Virtual Asset Insider Trading Cases South Korea's financial regulators are contemplating the inclusion of a clause to seize the principal in virtual asset insider trading cases in the upcoming second phase of legislation expected later this year. According to PANews, under the current Virtual Asset User Protection Act, the government can only confiscate investment principal in cases of fraudulent transactions or market manipulation. There is no legal basis for seizing the principal in insider trading cases. The Financial Supervisory Service has recently submitted this issue to the Financial Services Commission, which is currently reviewing whether to incorporate it into the second phase of the law. In the stock market, all improper trading crimes can result in the confiscation of the investment principal. #SouthKorea#VirtualAssets#InsiderTrading#FinancialRegulation#Legislation#InvestmentPrincipal#FinancialSupervisoryService#FinancialServicesCommission#MarketManipulation#UserProtection#StockMarket