TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #65 · 8 апр.

Небольшой трик с регулярными выражениями который редко вижу в чужом коде. Допустим, вам нужно распарсить простой текст и вытащить оттуда пары имя+телефон. Вернуть всё это надо в виде списка словарей. Возьмем очень простой пример текста. >>> text = ''' >>> Alex:8999123456 >>> Mike:+799987654 >>> Oleg:+344456789 >>> ''' Соответственно, для выделения нужных элементов будем использовать группы. Получится такой паттерн: (\w+):([\d+]+) Как мы будем формировать словарь из найденных групп? >>> import re >>> results = [] >>> for match in re.finditer(r"(\w+):([\d+]+)", text): >>> results.append({ >>> "name": match.group(1), >>> "phone": match.group(2) >>> }) >>> print(results) [{'name': 'Alex', 'phone': '8999123456'}, ...] Можно немного сократить запись используя zip >>> results = [] >>> for match in re.finditer(r"(\w+):([\d+]+)", text): >>> results.append(dict(zip(['name', 'phone'], match.groups()))) Но есть способ лучше! Это именованные группы в regex. Можно в паттерне указать имя группы и результат сразу забрать в виде словаря. >>> for match in re.finditer(r"(?P<name>\w+):(?P<phone>[\d+]+)", text): >>> results.append(match.groupdict()) То есть всё что я сделал, это добавил в начале группы (внутри сбокочек) такую запись: (?P<group-name>...) Теперь найденная группа имеет имя и можно обратиться к ней как к элементу списка >>> name = match['name'] Либо забрать сразу весь словарь методом groupdict() >>> match.groupdict() #tricks#regex

Резултати

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

Пребарај: #baklava

当前筛选 #baklava清除筛选
Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #713 · 13.02.2026 г., 04:29

Lineage OS - Official | Android 16 | Nothing Phone (2) ✍️ Details: - Version: 23.2 - Codename: #Pong - Initial Build: 10/02/26 - Build Freq: Weeklies (Search for #Pong) 🔽 Download: ROM & Images | GAPPS (sideload) | Unofficial MicroG Builds ⚙️ Wiki: Here 📔 Changelogs: Here 🤝 CF Participants: Here | Ref 🔖 Tags: #ROM#LOS#Official#Baklava#Vanilla ❌ Known quirks: - Device Integrity ~ As always thanks Goolag! 👤 Dev: chandu078 🐙 Chat: @NothingPhone2 🔔 Updates: @NothingPhone2Updates

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #740 · 06.05.2026 г., 07:29

Paranoid Android - Unofficial | Android 16 | Nothing Phone (2) 📔Details: • Version: Beryl (Alpha) • Device: #Pong • Updated: 13/05/26 🔽 Download: Here | Sideload 🆘 Bug Reports: Here 🔖Tags: #AOSPA#Unofficial#Baklava#CLO#NothingPhone2#Beryl ✨ Changelogs - Fixed upstream tethering apex failing to boot - Improvements to performance and system stability ⚙️Installation: 1. fastboot flashing unlock_critical (skip if already unlocked) 2. Execute this for flashing the ROM: fastboot -w fastboot update path/to/aospa zip 3. Wait for boot to finish ✍️ Note: - Firmware is included. No need to flash seperately. - Clean flash is recommended 👤 Dev: @gotenksIN 🔔Updates : @NothingPhone2Updates 💬Chat : @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #736 · 02.05.2026 г., 05:06

Paranoid Android - Unofficial | Android 16 | Nothing Phone (2) 📔Details: • Version: Beryl (Alpha) • Device: #Pong • Updated: 04/05/26 🔽 Download: Here 🆘 Bug Reports: Here ✨ Changelogs: Here 🔖Tags: #AOSPA#Unofficial#Baklava#CLO#NothingPhone2#Beryl ⚙️Installation: 1. fastboot flashing unlock_critical (skip if already unlocked) 2. Execute this for flashing the ROM: fastboot -w fastboot update path/to/aospa zip 3. Wait for boot to finish ✍️ Note: - Firmware is included. No need to flash seperately. - Clean flash is recommended 👤 Dev: @gotenksIN 🔔Updates : @NothingPhone2Updates 💬Chat : @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #700 · 19.12.2025 г., 14:30

Paranoid Android - Unofficial | Android 16 | Nothing Phone (2) 📔Details: • Version: Beryl (Alpha) • Device: #Pong • Updated: 19/12/25 🔽 Download: Here 🆘 Bug Reports: Here 🔖Tags: #AOSPA#Unofficial#Baklava#CLO#NothingPhone2#Beryl ✨Changelogs: - Based on current QSSI16 and V4.0-251119-1654 - Improvements to performance and system stability - While feedback is appreciated, please do not explicitly mention me, I can read chat on my own thanks ⚙️Installation: 1. fastboot flashing unlock_critical (skip if already unlocked) 2. Execute this for flashing the ROM: fastboot -w fastboot update path/to/aospa zip 3. Wait for boot to finish ❗️Known bugs: - UW camera does not show up in aperture - Left volume panel isn't aligned in landscape ✍️ Note: - Firmware is included. No need to flash seperately. - Clean flash is recommended 👤 Dev: @gotenksIN 🔔Updates : @NothingPhone2Updates 💬Chat : @NothingPhone2

Oneplus 13 Updates

@OnePlus13Series · Post #383 · 07.04.2026 г., 14:25

DerpFest - Official | Android 16 | Oneplus 13 ✍️ Details: - Version: 16 - Codename: #dodge - Variant: #Gapps - Released: 07/04/26 🔽 Download : Sourgeforge | Mirror 🔖 Tags: #Derpfest#Official#Baklava#ROM#dodge ⚙️Flashing Instructions: - Using SuperHybrid Flasher (recommended) - It also can be flashed through Ofox recovery. ✍️Notes: - GApps Included, do not flash again - April Security Patch (QPR2) - Lineage Upstream - Upstreamed kernel - FW 16.0.5.701 ARB !!! - Don't report without proper logs! 🏆Credits: - Chandu_078 - bgcngm - jonassalo93 - danielspringer - jakobBokaj1 - Testers 👤 Maintaner: @einargednochsson 🔔 Updates: @OnePlus13Series 💬 Discussion: @OnePlus13SeriesChatRoom

Oneplus 13 Updates

@OnePlus13Series · Post #379 · 08.03.2026 г., 18:36

DerpFest - Official | Android 16 | Oneplus 13 ✍️ Details: - Version: 16 - Codename: #dodge - Variant: #Gapps - Released: 08/03/26 🔽 Download : Sourgeforge | Mirror 🔖 Tags: #Derpfest#Official#Baklava#ROM#dodge ⚙️Flashing Instructions: - Using SuperHybrid Flasher (recommended) - It also can be flashed through Ofox recovery. ✍️Notes: - GApps Included, do not flash again - March Security Patch (QPR2) - Lineage Upstream - Reworked kernel - FW 16.0.3.501 ARB !!! - Don't report without proper logs! 🏆Credits: - Chandu_078 - bgcngm - @jonassalo93 - @danielspringer - @jakobBokaj1 - Testers 👤 Maintaner: @einargednochsson 🔔 Updates: @OnePlus13Series 💬 Discussion: @OnePlus13SeriesChatRoom

Oneplus 13 Updates

@OnePlus13Series · Post #376 · 13.02.2026 г., 20:34

DerpFest - Official | Android 16 | Oneplus 13 ✍️ Details: - Version: 16 - Codename: #dodge - Variant: #Gapps - Released: 13/02/26 🔽 Download : Sourgeforge | Mirror 🔖 Tags: #Derpfest#Official#Baklava#ROM#dodge ⚙️Flashing Instructions: - Using SuperHybrid Flasher (recommended) - It also can be flashed through Ofox recovery. ✍️Notes: - GApps Included, do not flash again - February Security Patch (QPR2) - FW 16.0.3.501 ARB !!! - Don't report without proper logs! 🏆Credits: - Chandu_078 - bgcngm - @jonassalo93 - @danielspringer - @jakobBokaj1 - Testers 👤 Maintaner: @einargednochsson 🔔 Updates: @OnePlus13Series 💬 Discussion: @OnePlus13SeriesChatRoom

Oneplus 13 Updates

@OnePlus13Series · Post #362 · 13.12.2025 г., 18:07

DerpFest - Official | Android 16 | Oneplus 13 ✍️ Details: - Version: 16 - Codename: #dodge - Variant: #Gapps - Released: 13/12/25 🔽 Download : Sourgeforge | Mirror 🔖 Tags: #Derpfest#Official#Baklava#ROM#dodge ⚙️Flashing Instructions: - Using SuperHybrid Flasher (recommended) - Without SuperHybrid Flasher - It also can be flashed through Ofox recovery. ✍️Notes: - GApps Included, do not flash again - December Security Patch - Updated kernel - Don't report without proper logs! 🏆Credits: - Chandu_078 - bgcngm - @jonassalo93 - @danielspringer - @jakobBokaj1 - Testers 👤 Maintaner: @einargednochsson 🔔 Updates: @OnePlus13Series 💬 Discussion: @OnePlus13SeriesChatRoom

Oneplus 13 Updates

@OnePlus13Series · Post #357 · 29.11.2025 г., 08:02

DerpFest - Official | Android 16 | Oneplus 13 ✍️ Details: - Version: 16 - Codename: #dodge - Variant: #Gapps - Released: 26/11/25 🔽 Download : Sourgeforge | Mirror 🔖 Tags: #Derpfest#Official#Baklava#ROM#dodge ⚙️Flashing Instructions: - Using SuperHybrid Flasher (recommended) - Without SuperHybrid Flasher - It also can be flashed through Ofox recovery. ✍️Notes: - GApps Included, do not flash again - November Security Patch - A16 blobs/kernel - Don't report without proper logs! 🏆Credits: - Chandu_078 - bgcngm - @jonassalo93 - @danielspringer - @jakobBokaj1 - Testers 👤 Maintaner: @einargednochsson 🔔 Updates: @OnePlus13Series 💬 Discussion: @OnePlus13SeriesChatRoom

Oneplus 13 Updates

@OnePlus13Series · Post #353 · 13.11.2025 г., 15:53

DerpFest - Official | Android 16 | Oneplus 13 ✍️ Details: - Version: 16 - Codename: #dodge - Variant: #Gapps - Released: 12/11/25 🔽 Download : Sourgeforge | Mirror 🔖 Tags: #Derpfest#Official#Baklava#ROM#dodge ⚙️Flashing Instructions: - Using SuperHybrid Flasher (recommended) - Without SuperHybrid Flasher - It also can be flashed through Ofox recovery. ✍️Notes: - GApps Included, do not flash again - November Security Patch - Don't report without proper logs! 🏆Credits: - Chandu_078 - bgcngm - @jonassalo93 - @danielspringer - @jakobBokaj1 - Testers 👤 Maintaner: @einargednochsson 🔔 Updates: @OnePlus13Series 💬 Discussion: @OnePlus13SeriesChatRoom

Oneplus 13 Updates

@OnePlus13Series · Post #387 · 14.05.2026 г., 07:57

Pixel OS - Unofficial | Android 16 | Oneplus 13 ✍️ Details: - Version: 16.2 - Codename: #dodge - Variant: #Gapps - Released: 26/05/14 🔽 Download 🔖 Tags: #PixelOS#Unofficial#ROM#dodge#Baklava ✍️ Notes: ❗❗❗ARB❗❗❗ - Try to fix ltpo - Bring high touch polling rate - Bring back BThelper - Sync Pixel OS upstream updates. 🏆 Credits: - Chandu_078 & bgcngm for base DT - einargednochsson & Daniel & jjpprrrr & Jonas Salo - And everyone who contributed to the OnePlus 13 open-source ROM. 👤 Maintainer: @likw233 🔔 Updates: @OnePlus13Series 💬 Discussion: @OnePlus13SeriesChatRoom

Oneplus 13 Updates

@OnePlus13Series · Post #385 · 13.04.2026 г., 05:12

Pixel OS - Unofficial | Android 16 | Oneplus 13 ✍️ Details: - Version: 16.2 - Codename: #dodge - Variant: #Gapps - Released: 26/04/13 🔽Download 🔖 Tags: #PixelOS#Unofficial#ROM#dodge#Baklava ✍️ Notes: ❗❗❗ARB❗❗❗ - Add freedom from crd - Sync Pixel OS upstream updates. 🏆 Credits: - Chandu_078 & bgcngm for base DT - einargednochsson & Daniel & jjpprrrr & Jonas Salo - And everyone who contributed to the OnePlus 13 open-source ROM. 👤 Maintainer: @likw233 🔔 Updates: @OnePlus13Series 💬 Discussion: @OnePlus13SeriesChatRoom

ПретходнаСтраница 1 од 3Следна