Ранее я делал серию постов про битовые операторы.
Вот вам ещё один наглядный пример как это используется в Python в модуле re.
Чтобы указать флаг для компилятора нам надо указать его после передаваемой строки. Например, добавляем флаг для игнорирования переноса строки.
pattern = re.compile(r"(\w+)+")
words = pattern.search(text, re.DOTALL)
А как указать несколько флагов? Ведь явно будут ситуации когда нам потребуется больше одного. Кто читал посты по битовые операторы уже понял как.
pattern.search(text, re.DOTALL | re.VERBOSE)
А теперь смотрим исходники, что находится в этих атрибутах?
Не удивительно, степени двойки. Почему? Потому что каждое следующее значение это сдвиг единицы влево.
>>> for n in [1, 2, 4, 8, 16, 32, 64, 128, 256]:
>>>
print(bin(n))
0b1
0b10
0b100
0b1000
0b10000
0b100000
0b1000000
0b10000000
0b100000000
Чтобы было понятней, давайте напишем тоже самое но иначе, добавим ведущие нули:
000000001
000000010
000000100
000001000
000010000
000100000
001000000
010000000
100000000
Не понятно что тут происходит? Читай три поста про битовые операторы начиная с этого ➡️https://t.me/pythonotes/45
В общем, это пример применения побитовых операций в самом Python.
Теперь вы знаете Python еще немного лучше)
#tricks#regex#libs
Любимые 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