@anatomyarthub · Post #5116 · 15.05.2025 г., 04:25
#лицо#face @anatomyarthub
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
Пребарај: #face
@anatomyarthub · Post #5116 · 15.05.2025 г., 04:25
#лицо#face @anatomyarthub
@libreware · Post #1048 · 22.02.2022 г., 03:21
Random Face Generator A Cross-Platform app to Generate Faces of (non-existing) People Random Face Generator is a flutter app to generate random faces. The Generated faces do not actually exist in real life.This app uses the thispersondoesnotexist and the fakeface API. Each image has been pre-analyzed by an AI algorithm called pypy-agender to identify the gender and age. Download - https://github.com/adityar224/Random-Face-Generator/releases https://github.com/adityar224/Random-Face-Generator #Face#Generator#AI @foss_Android
Hashtags
@AloneSnowflake · Post #192 · 15.11.2023 г., 00:50
๛ᴀᴘᴘʟʏ ᴛʜᴇᴍᴇ🤍 ๛ᴀᴘᴘʟʏ ᴛʜᴇᴍᴇ ᴛɢx ๛sᴇᴛ ᴡᴀʟʟᴘᴀᴘᴇʀ ๛ᴊᴏɪɴ ᴄʜᴀɴɴᴇʟ🩶 #Girl#Gray#Face#Aesthetic
Hashtags
@googlefactss · Post #40579 · 23.01.2026 г., 23:05
The glabella is the smooth area of skin between your eyebrows and above your nose. It helps show facial expressions like frowning. 👁️🗨️🙂 @googlefactss #Glabella#Face#BodyFacts
Hashtags
@blackwallp · Post #68098 · 04.04.2026 г., 05:35
#девчата#лицо#girls#face 🎥Videowallpaper |😀Emoji |🎼Ringtone
@anatomyarthub · Post #5228 · 16.06.2025 г., 10:38
#референсы#лицо#references#face @anatomyarthub
Hashtags
@anatomyarthub · Post #2945 · 15.04.2024 г., 10:25
#лицо#референсы#face#references @anatomyarthub
Hashtags
@anatomyarthub · Post #2798 · 17.03.2024 г., 11:51
#референсы#лицо#references#face @anatomyarthub
Hashtags
@anatomyarthub · Post #2788 · 16.03.2024 г., 11:43
#референсы#лицо#references#face @anatomyarthub
Hashtags
@anatomyarthub · Post #2712 · 01.03.2024 г., 06:10
#референсы#references#лицо#face @anatomyarthub
Hashtags
@testflightynoti · Post #37945 · 09.05.2026 г., 19:52
#Aww#That#Face Join the Aww… That Face beta on ✈️#TestFlight 🔗 Link: https://testflight.apple.com/join/XXjasct4 Shared by Dimitri
Hashtags
@googlefactss · Post #40692 · 22.02.2026 г., 15:02
The nasion is the point where the frontal bone and the two nasal bones meet, located right between your eyes at the top of your nose bridge. It’s a key landmark in facial anatomy and measurements. 👃📏 [Source picture] @googlefactss #Nasion#Face#AnatomyFacts
Hashtags