@social_justice_watch · Post #18172 · 17.07.2023 г., 18:44
Thickfurred<[email protected]>: I feel this is so true, it hurts. #depression#anxiety https://toot.community/@Thickfurred/110730431025490534
Hashtags
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #146 · 16 сеп.
Функция sub в regex может принимать функцию в качестве аргумента repl. 📄 Из документации: If repl is a function, it is called for every non-overlapping occurrence of pattern. The function takes a single match object argument, and returns the replacement string. То есть для каждого совпадения будет вызвана функция для вычисления замены вместо замены на одну и ту же строку для всех совпадений. Иными словами, для замены разных совпадений на разные строки не потребуется запускать re.sub() много раз для каждой строки замены. Достаточно определить функцию, которая вернёт строку для каждого из совпадений. Описание слишком запутанное🤔, давайте лучше рассмотрим на простом примере: Создаем карту замены. То есть какие строки на какие требуется менять. remap = { 'раз': '1', 'два': '2', 'три': '3', 'четыре': '4', 'пять': '5', } Пишем функцию поиска строки для замены. Единственным аргументом будет объект re.Match. Используя данные этого объекта мы вычисляем замену on-the-fly! def get_str(match: re.Match): word = match.group(1) return remap.get(word.lower()) or word Пример текста. text = '''Раз Два Три Четыре Пять Вместе будем мы считать Пять Четыре Три Два Раз Мы считать научим вас ''' Теперь запускаем re.sub и вместо строки замены (repl) подаём имя функции. (Данный паттерн ищет отдельные слова в тексте) >>> print(re.sub(r'(\w+)', get_str, text)) 1 2 3 4 5 Вместе будем мы считать 5 4 3 2 1 Мы считать научим вас Думаю, достаточно наглядно 🤓 #libs#regex
Пребарај: #depression
@social_justice_watch · Post #18172 · 17.07.2023 г., 18:44
Thickfurred<[email protected]>: I feel this is so true, it hurts. #depression#anxiety https://toot.community/@Thickfurred/110730431025490534
Hashtags
@wall_amv · Post #9122 · 05.06.2024 г., 16:53
Uniformity Cycle Anime: Another, Tenki no ko, Zom 100, Kotonoha no niwa. Music: Liana Flores - Rises the Moon #Amv #Amv_Mix #Mix #SAD #Depression #Sentimental #Drama #Full_HD #AnimWorld @Wall_Amv
@perspectiveix · Post #1285 · 22.05.2018 г., 09:30
🏥How heavy use of social media is linked to mental illness May 20th marked the end of “#MentalHealth awareness week”, a campaign run by the Mental Health Foundation, a British charity. Roughly a quarter of British adults have been diagnosed at some point with a psychiatric disorder, costing the economy an estimated 4.5% of GDP per year. Such illnesses have many causes, but a growing body of research demonstrates that in young people they are linked with heavy consumption of #SocialMedia. A survey by the Royal Society for Public #Health found that Britons aged 14-24 believe #Facebook, #Instagram, #Snapchat and #Twitter have detrimental effects on their wellbeing. They said that these social networks gave them scope for self-expression and community-building, but exacerbated anxiety and #depression. 🚀@PerspectiveIX 🔗prs.pctvix.co/2ISIKvh
@googlefactss · Post #40507 · 08.01.2026 г., 19:00
Vitamin D is made in the skin when sunlight touches it. This vitamin helps the brain stay healthy and can stop feelings of sadness or depression. Taking supplements or getting sunlight can boost vitamin D and improve mood. 🌞🧠 [Source1] [Source2] @googlefactss#VitaminD#MentalHealth#Depression#Sunlight#Supplements
@stas_refund · Post #13351 · 09.04.2026 г., 19:33
#soundcloud#niche#nichetok#depression#ootd 💧 Спонсировано @rainbetcom
@dreamsgallerys · Post #1587 · 31.10.2023 г., 12:17
By Voodoont #voodoont #арт#art#ai#girl#sad#rain#depression#rose#beauty
@googlefactss · Post #40654 · 13.02.2026 г., 15:04
In Japan, a marketing campaign called 'kokoro no kaze' (a cold of the soul) was used to promote antidepressants, increasing sales sixfold. It falsely suggested depression was simple and temporary like a cold, hiding the true treatment needs. This led to over-medication and potential harm. Now, companies focus on bipolar disorder, risking similar issues. 🚨💊 [Read more] @googlefactss #MentalHealth#Japan#Pharmaceuticals#Depression#Bipolar#HealthRisks
@ThemesM8 · Post #273 · 19.02.2022 г., 07:50
https://t.me/addtheme/BlueGirl_ThemesM8 🌙@ThemesM8✨ #dark#android#desktop#girl#night#blue#deep#dep#depression#sad#moon#sunrise#dawn#love#girly#oled#amoled