Ранее я делал серию постов про битовые операторы.
Вот вам ещё один наглядный пример как это используется в 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
#crDroid#diting
New Version 10/09/2024:
Gapped version
Download
Changelog:
Updated to version 10.8
Note:
Firmware is NOT included.
Credits:
Thanks to @TeamMEX_XDA for all his helps and providing dt
By@Mohammadnt96
#crDroid#diting
New Version 11/07/2024:
Gapped version
Download
Changelog:
crDroid v10.6
Updated to June security patch
Including MiuiCamera
Note:
Firmware is NOT included.
This is beta version.
Credits:
Thanks to @TeamMEX_XDA for all his helps and providing dt
By@Mohammadnt96
Follow@xiaomi_12tpro_updates
Join@xiaomi_12tpro_chat
#crDroid#diting
New Version 25/02/2024:
Gapped version
Download
Changelog:
crDroid v10.2
SMS fixed
Kernel Switched to HyperOS
Used HyperOS blobs
Notes:
Use latest skkk twrp (v8.6)
Credits:
Thanks to @TeamMEX_XDA for all his helps and providing dt
Discussion:
Xiaomi 12T Pro crDroid
#crDroid#diting
New Version 02/02/2024:
Gapped version
Download
Changelog:
crDroid v10.1
fod fixed for both touchscreens
miui camera included
Known Issues:
Opening photo in miui camera
Credits:
Thanks to @TeamMEX_XDA for all his helps and providing dt
Discussion:
Xiaomi 12T Pro crDroid
#crDroid#Unofficial#diting#A14
Crdroid 10.0 UNOFFICIAL | Android 14
Updated: 11-11-2023
▪️Download
▪️Support
Changelog:
• Initial A14 build with oss vendor
Notes:
Known Issues:
Auto brightness must be disabled. otherwise screen will not wake after lock
Fod on k50u does not work
Credits: Thanks to @TeamMEX_XDA for providing dt
By@Mohammadnt96
Follow@xiaomi_12tpro_updates
Join@xiaomi_12tpro_chat
CrDroid - Official | Android 14 | Nothing Phone (2)
📝 Details:
- Version: v10.6
- Status: #Official
- Device: #Pong
- Released: 30/07/24
⬇️ Download: ROM (Vanilla) | Gapps Package
📔 Instructions: Here
🎄 Device tree : Here
📝 Changelogs : Here
🆘 Support: TG | XDA
🏷 Tags: #AOSP#ROM#CrDroid#U
✍️ Note:
- Base firmware 2.6.0 is recommended
- Dirty flash possible from previous july build
- Report with logs if you found issues in the comment section below
🏆 Credits:
- Chandu Dyavanapelli for DT Base
- Hellboy for Meteoric kernel and Glyph changes
- Fabian for PA Glyph Implementation
👤 Maintainer: @Ghosutox
🔔 Updates: @NothingPhone2Updates
🐙 Chat: @NothingPhone2
CrDroid - Official | Android 14 | Nothing Phone (2)
📝 Details:
- Version: v10.2
- Status: #Official
- Device: #Pong
- Released: 08/02/24
⬇️ Download: ROM (Vanilla) | Gapps
📔 Instructions: Here
💬 Support Group: Here
🏛 XDA: Here
💰 Donate: PayPal | BuyMeACoffee
🏷 Tags: #AOSP#ROM#CrDroid#U
✨Changelogs:
- Initial official build
- Firmware removed
- Rebased on NOS 2.5.2
- Added Reverse Wireless Charging
- Switched to qcom telephony
- Added Glyphify (An alternative app to ParanoidGlyph I made, more to come in future updates)
⛔️ Known Issues:
- Issue with reception of SMS
Enabling and disabling SIM card from settings fix the issue until the next boot
✍️ Note:
- Base firmware 2.5.2 is recommended
- Report with logs if you found issues in the comment section below
🏆 Credits:
- Chandu_Dyavanapelli for DT bring up
- Hellboy017 for kernel
- Przekichane for DT & vendor fixes on A13 » A14
- Pong TG Dev & Testing Team
👤 Dev: @DylanAkp
🔔 Updates: @NothingPhone2Updates
🐙 Chat: @NothingPhone2
CrDroid - Unofficial | Android 14 | Nothing Phone (2)
📝 Details:
- Version : v10.x
- Status: #Unofficial
- Device : #Pong
- Released : 04/01/24
⬇️ Download : ROM (Vanilla) | Gapps
📔 Instructions: Here
📸 Screenshots : Here
💬 Support Group : Here
🏛 XDA : Here
💰 Donate : PayPal | BuyMeACoffee
🏷Tags : #AOSP#ROM#CrDroid#U
✨Changelogs:
- Rebased on NothingOS 2.5.1
- Fixed stutters
- Fixed Face Unlock
- More CrDroid settings implemented
- Updated to Android QPR1 (Security patch December 2023)
✍️ Note:
- Base firmware 2.5.1 is recommended
- Report with logs if you found issues in the comment section below
🏆 Credits:
- Chandu_Dyavanapelli for DT Bringup
- Hellboy017 for kernel
- Przekichane for DT and Vendor fixes on A13 » A14
- Pong TG Dev and Testing Team for all help
👤 Dev : @DylanAkp
🔔 Updates : @NothingPhone2Updates
🐙 Chat : @NothingPhone2
CrDroid - Unofficial | Android 14 | Nothing Phone (2)
📝 Details:
- Version : v10.x
- Status: #Unofficial
- Device : #Pong
- Released : 18/12/23
⬇️ Download : Rom (Vanilla) | Gapps
📔 Instructions: Here
📸 Screenshots : Here
🏛 XDA : Here
💰 Donate : PayPal
🏷Tags : #AOSP#ROM#CrDroid#U
✨Changelogs:
- Intitial A14 build based
✍️ Note:
- Please be on NOS 2.0.4 before flashing. (Not yet tested from 2.5.1)
- Report with logs if you found issues in the comment section below
🏆 Credits:
- Chandu_Dyavanapelli for DT Bringup
- Hellboy017 for kernel
- Przekichane for DT and Vendor fixes on A13 » A14
- Snuvig for early tests
- Pong TG Dev and Testing Team for all help
👤 Dev : @DylanAkp
🔔 Updates : @NothingPhone2Updates
🐙 Chat : @NothingPhone2