@social_justice_watch · Post #17792 · 23.01.2023 г., 01:37
Great #SEL strategy here from @SicotteDanielle! #edchat#selfawareness#teachertwittersource
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
Пребарај: #selfawareness
@social_justice_watch · Post #17792 · 23.01.2023 г., 01:37
Great #SEL strategy here from @SicotteDanielle! #edchat#selfawareness#teachertwittersource
@ipersonalgrowths · Post #956 · 28.12.2022 г., 14:48
📌𝗪𝗵𝗮𝘁 𝗶𝘀 𝗠𝗮𝘁𝘂𝗿𝗶𝘁𝘆?🌿🦋 #EmotionalGrowth#Selfknowing #Selfawareness#SelfGrowth Please Share thoughts 🙃
@teachforuzbekistan · Post #277 · 30.07.2025 г., 17:08
🧠 Yangi vazifalar oldidan psixologik tayyorgarlik! 💪 Yozgi institut doirasida ishtirokchilar uchun muhim mashg‘ulotlar tashkil etildi. Yangi bosqichga puxta tayyorlanish maqsadida psixolog Nissa Lebedinskaya tomonidan “Team building” mavzusida amaliy mashg‘ulotlar o‘tkazildi. 🧘♀️ Ushbu sessiyalar davomida ishtirokchilar o‘z emotsiyalarini anglash va boshqarish, jamoada samarali ishlash, o‘ziga bo‘lgan ishonchni mustahkamlash bo‘yicha muhim ko‘nikmalarga ega bo‘lishdi. 🔥 Bu mashg‘ulotlar ularni yangi vazifalarga ruhiy va psixologik jihatdan tayyorlanishga yordam berdi. Institutdagi har bir bosqich — ulkan o‘sish sari dadil qadam! 🤝O‘zbekiston Yoshlar ishlari agentligiga ushbu faoliyatlarni amalga oshirishda ko‘rsatgan yordami uchun alohida minnatdorchilik bildiramiz. 💬💬💬🗣 🧠 Psychological Preparation Before New Responsibilities! 💪 As part of the Summer Institute, important sessions were organized for participants. In order to thoroughly prepare for the next stage, practical training on the topic of “Team Building” was conducted by psychologist Nissa Lebedinskaya. 🧘♀️ During these sessions, participants gained important skills in recognizing and managing their emotions, working effectively in a team, and strengthening self-confidence. 🔥 These trainings helped them prepare mentally and psychologically for new responsibilities. Each stage of the Institute is a confident step toward great growth! 🤝 Special thanks to the Youth Affairs Agency of Uzbekistan for their support in making these activities possible. #SummerInstitute2025#TeamBuilding#PsychologicalSupport#LeadershipJourney#SelfAwareness#EmotionalIntelligence#GrowthMindset#FutureLeaders#TogetherWeGrow#TeachForUzbekistan Telegram |Linkedln| Instagram |Youtube