@MyGovHindi · Post #6589 · 14.04.2023 г., 05:19
डॉ. बाबासाहेब अम्बेडकर का सामाजिक न्याय और समानता विज़न, एक समावेशी व कल्याणकारी समाज की दिशा में सरकार के प्रयासों को मार्गदर्शन प्रदान कर रहा है। #AmbedkarJayanti#SocialJustice#Equality
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #121 · 20 јул.
Регулярно требуется преобразовать какой-либо текст в максимально совместимый текст для URL, имени файла, имени объекта в каком-то софте и тд. Требования совместимости простые: в тексте должны быть только допустимые символы. Обычно это a-z, 0-9 и "_" или "-". То есть, только прописные буквы латинского алфавита и цифры (как пример). Допустим, нам нужно название статьи в блоге преобразовать в slug для добавления его в URL этой статьи. Как это лучше всего сделать? В Django по умолчанию есть готовая функция slugify для таких случаев. Но я её никогда не использую. Почему? Потому что её недостаточно! Приведём пример >>> from django.utils.text import slugify >>> slugify('This is a Title') 'this-is-a-title' Пока всё отлично >>> slugify('This is a "Title!"') 'this-is-a-title' Спец символы удалились, всё хорошо. >>> slugify('Это заголовок статьи') '' Вот и приехали 😢. Если текст не английский то буквы просто игнорируются. Можно это поправить >>> slugify('Это заголовок статьи', allow_unicode=True) 'это-заголовок-статьи' Но тогда мы не вписываемся в условие. У нас появилась кириллица в тексте. Так как я часто пишу сайты для русскоязычных пользователей эта проблема весьма актуальна. Я не использую стандартную функцию и всегда пишу свою. Оригинал я не беру в расчёт и пишу полностью свою функцию. И так, по порядку: 🔸1. Исходный текст: >>> text = 'Мой заголовок №10 😁!' Взял специально посложней со специальными символами. 🔸2. Транслит Необходимо сделать транслит всех символов в латиницу. Здесь очень выручает библиотека unidecode. Помимо простого транслита кириллицы в латиницу она умеет преобразовывать спец символы и иероглифы в текстовые аналоги. from unidecode import unidecode >>> unidecode("Ñ Σ ® µ ¶ ¼ 月 山") 'N S (r) u P 1/4 Yue Shan' Очень крутая библиотека, советую👍 В нашем случае получаем такое преобразование: >>> text = unidecode(text) >>> print(text) 'Moi zagolovok No. 10 !' Отличный транслит. Смайл просто удалился, хотя я ждал что-то вроде :). Ну и ладно, всë равно невалидные символы. А еще наш код уже поддерживает любой язык, будь то хинди или корейский. 🔸4. Фильтр символов Unidecode не занимается фильтрацией по недопустимым символам. Это мы делаем в следующем шаге через regex. Просто заменим все символы на "_" если они вне указанного диапазона. >>> text = re.sub(r'[^a-zA-Z0-9]+', '_', text) >>> print(text) 'Moi_zagolovok_No_10_' Символ "+" в паттерне выручает когда несколько недопустимых символов идут рядом. Все они заменяются на один символ "_". 🔸5. Slugify Осталось удалить лишние символы по краям и сделать нижний регистр >>> text = text.strip('_').lower() >>> print(text) 'moi_zagolovok_no_10' Получаем отличный slug! 😎 🌎 Полный код в виде функции. ______________ PS. Проверку что в строке остался хоть один допустимый символ я бы вынес в отдельную функцию. #libs#tricks#django
Пребарај: #equality
@MyGovHindi · Post #6589 · 14.04.2023 г., 05:19
डॉ. बाबासाहेब अम्बेडकर का सामाजिक न्याय और समानता विज़न, एक समावेशी व कल्याणकारी समाज की दिशा में सरकार के प्रयासों को मार्गदर्शन प्रदान कर रहा है। #AmbedkarJayanti#SocialJustice#Equality
@MyGovCoronaNewsdesk · Post #12534 · 14.04.2023 г., 04:14
Dr Babasaheb Ambedkar's vision of social justice and equality is a guiding light for the government's efforts to build an inclusive and compassionate society. #AmbedkarJayanti#SocialJustice#Equality
@googlefactss · Post #40608 · 30.01.2026 г., 23:01
Paris officially ended the law requiring women to get police permission to wear pants on January 31, 2013. This change gave women the freedom to wear pants without asking for approval. 👖🚶♀🤸♀ [Read more] @googlefactss #Paris#WomenRights#History#Fact#Equality
@googlefactss · Post #40401 · 24.12.2025 г., 15:01
The Bechdel-Wallace Test checks if a movie or story has at least two women who talk to each other about something other than a man. It shows how women are often missing or only shown in relation to men. Many films fail this simple test, highlighting the need for better female representation in media. 👱♀👩🦳🚫🤷♂ [Read more] [See more] @googlefactss #BechdelWallaceTest🎬#WomenInFilm#Representation#Equality
@googlefactss · Post #40716 · 28.02.2026 г., 23:01
Egalitarianism is the belief that all people are born equal and should be treated equally. It supports equal rights, equal opportunities, and equal treatment. It includes economic equality, legal equality, political equality, and social equality. It teaches that all people have equal moral worth. ⚖️👥📚 [Read more] @googlefactss #Egalitarianism#Equality#HumanRights#Politics#SocialStudies
@ebcnewsnow · Post #52155 · 08.03.2026 г., 10:03
50 ዓመት የሴቶች ድምጽ ለእኩልነትና ለበለጸገች ኢትዮጵያ ******** የዘንድሮውን ዓለም አቀፍ የሴቶች ቀን ስናከብር፣ ባለፉት 50 ዓመታት ሴቶች ለሀገራችን ሁለንተናዊ ዕድገትና እኩልነት ያበረከቱትን ተጋድሎና ድል እያሰብን ነው። ለሀገር ኩራት ለሆናችሁ፣ ለጥንካሬያችን መሰረት እና ለበለጸገች ኢትዮጵያ ዋልታ ለሆናችሁ ሴቶች በሙሉ እንኳን አደረሳችሁ! #March8#InternationalWomensDay#IWD2026#EthiopianWomen#Equality#ሴቶች#ኢትዮጵያ
@googlefactss · Post #40131 · 19.11.2025 г., 15:33
Let's make history together! Sign this petition to ask Google for a doodle celebrating International Men's Day. Your signature can help promote equality and recognition for men worldwide. ✍️👨🌍 [Click here to sign] @googlefactss #InternationalMensDay#GoogleDoodle#Petition#Equality#Men
@googlefactss · Post #40010 · 04.11.2025 г., 11:00
Gynecocracy = women rule. Gynocracy = women‑centered policy. Both disrupt old power structures — but justice needs checks, inclusion, and rights for everyone. [Learn more here] @googlefactss #PowerShift#Gynecocracy#Gynocracy#Equality#CivicThought
@rusconct · Post #2240 · 17.02.2025 г., 17:58
🇿🇦 This year’s opening meeting of the #G20 Foreign Ministers as part of the debut presidency of South Africa – a friendly country whose stance is in accord with #Russia’s – will take place in Johannesburg on February 20-21, a landmark event not only for Pretoria, but also for the entire African continent, which will host G20 events for the first time. 🇷🇺 Foreign Minister Sergey Lavrov plans to lead the Russian delegation. It is expected that most of the members of this major economic forum, as well as a wide range of invited states and international organisations, will be represented at a similar level. ☝️ The meeting will open with an address by President of South Africa Cyril Ramaphosa, which will set the general tone for discussing global challenges and threats. The discussion will particularly focus on the international situation, which is alarmingly deteriorating under the impact of the confrontational policy by the neoliberal Western elites. The participants will consider the current integrity and effective functioning of the global economic system. The priorities stated by the South African presidency are designed to encourage economic growth, reduce inequality and imbalances, and ensure equitable access to financing for countries in the Global South. 🤝 The South African presidency theme highlighting “solidarity, equality and sustainability” will provide solid framework for the consultations, essentially continuing in the same vein as its predecessors in 2022-2024 – Indonesia, India and Brazil, all of them Global Majority countries. In particular, this refers to the G20’s significant contribution during this period to strengthening the foundations of the multipolar world and making global economic institutions more democratic in the interests of new non-Western centres of influence, primarily the expanded #BRICS group. ❗️The upcoming anniversaries, such as the 80th anniversary of Victory in World War II and the foundation of the #UN, as well as the 65th anniversary of the Russia-sponsored Declaration on the Granting of Independence to Colonial Countries and Peoples adopted by the UN General Assembly to ensure Africa’s independence, should be seen as key benchmarks for the exchange of views. 👉 In his remarks, the Minister will provide a detailed analysis of the international situation underscoring the root causes of the current crisis, and outline specific steps to overcome the destructive phenomena. The Russian side will reaffirm its stance in favour of preserving the United Nations’ central role in global affairs. We will speak in support of strict compliance with the principles of the UN Charter in their entirety and interconnection. We will insist that there is no alternative to respectful interstate cooperation and ensuring equal and indivisible security for all. We will call for keeping the global economy open, rejecting trade wars, illegitimate sanctions and other unfair competition practices. We will cite examples of supranational associations that practice honest and productive cooperation without diktat or blackmail, such as the #EAEU, the #SCO and #BRICS. We will share the details of implementing the Russia-sponsored Greater Eurasian Partnership initiative. The Minister is expected to meet with several counterparts on the sidelines of the meeting. #G20SouthAfrica#BetterAfricaBetterWorld#solidarity#equality#sustainability
@CryptoM · Post #64717 · 09.04.2026 г., 15:44
🚀 NATO Shifts Toward Balanced Transatlantic Partnership, Says Mark Rutte NATO is transitioning from an 'unhealthy co-dependence' on the United States to a more balanced transatlantic alliance, according to Mark Rutte. Bloomberg posted on X that Rutte's comments came in response to U.S. President Donald Trump's criticism of the group regarding the Iran war. Rutte emphasized the importance of a partnership grounded in equality between Europe and the U.S. within NATO. #NATO#TransatlanticPartnership#MarkRutte#US#Europe#Alliance#InternationalRelations#Defense#Geopolitics#Equality
@emagzinewspars · Post #9475 · 04.11.2025 г., 08:13
#Beijing_Review🇨🇳📕[PDF]⬇️ 30 #October2025 #Weekly_Magazines For learning, for free(dom). @backupofmagazines This issue honors the #UnitedNations at 80, calling it a cornerstone of global cooperation. The cover story explores China’s role as a builder of inclusive #GlobalGovernance and its blueprint for shared progress. From women’s empowerment in #Agriculture to structural resilience and economic elasticity, features reveal the new dynamics shaping the #GlobalSouth. Insights on #ChinaUSRelations, the #ChinaMexico partnership, and Hainan’s innovation wave highlight how diplomacy and commerce interconnect. The culture section revives #SilkRoad heritage and Beijing’s ancient treasures. A visionary issue linking history, equality, and collective resilience for a changing world. #Sustainability#Equality#UN80#AsiaVoice#BRInsights