Подразумеваемые неймспейсы или неявные пакеты.
Этот функционал добавлен в 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
Любимые Velvetyne представили подсайт с дружественными open source шрифтовыми студиями
О многих из них я писал в рамках #oss, но нового там тоже достаточно.
Очень воодушевляет их подход к распространению, что они именуют как «libre typography».
«At Velvetyne, we’re all about promoting a more ethical approach to libre typography. We believe in respecting creators’ consent and celebrating the diverse range of voices in this creative space. We’re aware of the historical importance of our catalogue and our visibility, but we’re definitely not looking to monopolise anything».
Почитать, посмотреть, скачать
K-k开k罗l谍d影y- OSS117之开罗谍影 OSS 117: Le Caire, nid d'espions (2006)
直达链接:https://pan.quark.cn/s/48fdf8c2c548
#OSS117之开罗谍影#法国特工117
#OSS 117: Le Caire, nid d'espions
#OSS 117: Cairo, Nest of Spies
链接:https://link3.cc/sf_com
#电影#喜剧#欧洲#00年代
#ParanoidAndroid#Unofficial#ROM#OSS#U#diting
AOSPA - Uvite¹⁴ Beta 1 | Android 14
Updated : 27/01/2024
▪️Download ROM | TWRP
Notes:
- Initial Build
- Selinux Enforcing
- MiuiCamera included
- Flash latest HyperOS firmware depending on your region.
Instructions:
- Reboot to bootloader
- Flash either the provided TWRP or aospa recovery.img from sf depending on your needs
- Reboot to recovery and sideload the ROM zip
- Reboot to TWRP and install HyperOS firmware
- Format Data
- Reboot to system
Bugs? You tell me...
By: @Megalodonzs | Donate
Support: Join
#typescript#ai#nocode#oss#synthetic_data
Hugging Face AI Sheets is a free, no-code tool that lets you create, improve, and change datasets easily using AI models through a spreadsheet-like interface. You can start with your own data or generate new data by writing simple prompts. It supports thousands of open AI models and works locally or online. You can clean data, classify text, add missing info, or create synthetic data without coding. It also lets you compare different AI models and improve results by editing outputs. This tool helps you save time and effort in managing data and testing AI models quickly and flexibly.
https://github.com/huggingface/aisheets
#java#docker#mybatis#oss#springboot#vue
RuoYi-Vue-Plus is a free, open-source backend framework upgraded from RuoYi for distributed clusters and multi-tenant use, built with Spring Boot 3.5, Vue3, TypeScript, MyBatis-Plus, and Redisson. It offers superior features like plugin decoupling, advanced permissions, multi-database support, workflows, code generation, Docker deployment, monitoring, and data security tools—far beyond original RuoYi. You benefit by building scalable enterprise apps 80% faster with less code, easier maintenance, and robust security for production. Warning: Versions ≤5.5.3 have critical flaws (CVE-2025-66916 RCE, CVE-2026-2819 auth bypass); update immediately.
https://github.com/dromara/RuoYi-Vue-Plus
#rust#bigdata#cloud_native#distributed_systems#filesystem#minio#object_storage#oss#rust#s3
RustFS is a fast and safe distributed object storage system built with Rust, offering high performance and scalability for large data needs like AI and big data. It is compatible with S3, easy to use, and open source under the business-friendly Apache 2.0 license. Compared to others like MinIO, RustFS provides better memory safety, no risky data logging, and supports local cloud providers. You can quickly install it via a script or Docker, manage storage through a simple web console, and benefit from a strong community and detailed documentation. This makes RustFS a reliable, cost-effective choice for secure, scalable storage.
https://github.com/rustfs/rustfs