@botsgram_cu · Post #3295 · 16.12.2020 г., 12:09
@SangMataInfo_bot Qué puede hacer este bot? Reenviar cualquier mensaje a este chat para ver el historial del usuario. Idioma: Inglés (visto en @BotsGram_cu) #user, #chat, #group
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
Пребарај: #user
@botsgram_cu · Post #3295 · 16.12.2020 г., 12:09
@SangMataInfo_bot Qué puede hacer este bot? Reenviar cualquier mensaje a este chat para ver el historial del usuario. Idioma: Inglés (visto en @BotsGram_cu) #user, #chat, #group
@OnePlus13Series · Post #346 · 13.11.2025 г., 15:51
SunOS Project | Android 16 | Oneplus 13 ✍️ Details: - Version: bienor - Codename: #dodge - Type: #user#gapps - Released: 29/09/25 🔽 Download : ROM [ Gdrive | Mirror | SF ] // Images 🆘 Support group: Here ✨ Changelogs: Here 🌳 Source: Here | DT | sm8750 📸Screenshots: Here 💰 Donate: Here (Server) 🔖 Tags : #SunOS#AOSP#ROM#Official#A16#QPR0 ⚙️Installation: 🚨 Firmware is not included with this rom. Please flash fw on both slots to avoid potential issues ➡️ CMDs: fastboot flash init_boot init_boot.img fastboot flash boot boot.img fastboot flash recovery recovery.img fastboot flash vendor_boot vendor_boot.img fastboot -w fastboot reboot recovery ➡️Recovery: • Factory reset (wipe/format data) • ADB sideload the rom zip & Reboot 📔Note: - Clean flash is mandatory coming from SunOS A15 and make sure remove google accounts and lockscreen password to avoid frp lock - ESIM support is dropped 👤 Developer: @Chandu_078 🔔 Updates: @OnePlus13Series 💬 Discussion: @OnePlus13SeriesChatRoom
@botsgram_cu · Post #3365 · 06.01.2021 г., 12:13
@gdprbot Qué puede hacer este bot? El bot GDPR oficial de Telegram. Idioma: Inglés (visto en @BotsGram_cu) #data, #privacy, #telegram, #user, #download, #request, #claim
@repo_science · Post #3180 · 12.05.2023 г., 19:53
#webScraping#Python#Scrapy 🐍 Scrapy course - Python web scraping for beginners The Scrapy #Beginners Course will teach you everything you need to learn to start scraping websites at scale using #Python Scrapy. Topics - Creating your first #Scrapy spider - #Crawling through websites & scraping data from each page - Cleaning data with Items & Item Pipelines - Saving data to CSV files, #MySQL & #Postgres#databases - Using fake #user-agents & headers to avoid getting blocked - Using #proxies to scale up your web scraping without getting banned - Deploying your #scraper to the cloud & scheduling it to run periodically 🗣️ Joe Kearney. 🔗Link 📢#youtube ⭐️ Resources ⭐️ Course Resources - Scrapy Docs - Course Guide - Course Github - The Python Scrapy Playbook ----- Main channel: @repo_science Coupons: @freecoupons_reposcience -----
@botsgram_cu · Post #3290 · 15.12.2020 г., 11:47
@RulesRulesBot Qué puede hacer este bot? Este bot saludará a los nuevos miembros con un mensaje de bienvenida, y también puede especificar un texto de reglas. Idioma: Inglés (visto en @BotsGram_cu) #rules, #welcome, #start, #group, #member, #new, #join, #enter, #message, #user