@pdf_001 · Post #869 · 04.11.2020 г., 13:02
#Harvard Writing Project 提供的写作手册涵盖史学、文学、艺术史、人类学、哲学、宗教学、政治学、性别研究、经济学、心理学等。全部PDF,自由下载 https://writingproject.fas.harvard.edu/pages/disciplinary-writing-guides
Hashtags
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
Пребарај: #harvard
@pdf_001 · Post #869 · 04.11.2020 г., 13:02
#Harvard Writing Project 提供的写作手册涵盖史学、文学、艺术史、人类学、哲学、宗教学、政治学、性别研究、经济学、心理学等。全部PDF,自由下载 https://writingproject.fas.harvard.edu/pages/disciplinary-writing-guides
Hashtags
@farangizmurodiy · Post #74 · 26.03.2023 г., 05:14
🕵🏻♀️How Harvard rates your application? part 4 For part 1: https://t.me/farangizmurodiy/14 🏛 When you apply to Harvard, Harvard rates your application from 1 to 6 in four categories and gives one overall rating. Part 4: Athletic Rating 🏅🏅🏅 1️⃣Unusually strong prospect for varsity sports at Harvard, desired by Harvard coaches. 2️⃣ Strong secondary school contribution in one or more areas; possible leadership role(s). 3️⃣ Active participation. 4️⃣ Little or no interest. 5️⃣ Substantial activity outside of conventional EC participation such as family commitments or term-time work (could be included with other e/c to boost the rating or left as a "5" if it is more representative of the student's commitment). 6️⃣Physical condition prevents significant activity. Note: After watching lots of videos of Harvard students talking about their admission files, I understood that not being athlete will not damage your application, but if you're an international level athlete, it will benefit you a lot. Because the calculation of an application's overall rating is not just arithmetical, getting a low athletic rating will not disadvantage you if you are very successful in other areas. However, getting 1, being recruited athlete, will boost your application significantly. 👩🏻⚖️ This was the part 4 of#Harvard admission series. Finally, in the next Harvard post, I’ll be sharing strategies on how you can apply those valuable infos from all four parts to your own application. @farangizmurodiy
Hashtags
@farangizmurodiy · Post #43 · 09.03.2023 г., 09:02
🕵🏻♀️How Harvard rates you? part 3 🏛 When you apply to Harvard, Harvard rates your application from 1 to 6 in four categories and gives one overall rating. Part 3: Personal Rating ❤️ 1) Outstanding 2) Very Strong 3) Generally Positive 4) Bland or somewhat negative or immature 5) Questionable personal qualities 6) Worrisome personal qualities 🤯 This is the most subjective rating in Harvard admissions. Also, this subjectiveness is the reason why Harvard is dealing with an affirmative action lawsuit. More info: https://rb.gy/tjr3zl What determines your personal rating is: 📝 Essays 👩🏫 Recommendation Letters Because it's very subjective, your application as a whole plays a role in this rating. Part 1: https://t.me/farangizmurodiy/14 Part 2:https://t.me/farangizmurodiy/23 👩🏻⚖️ This was the part 3 of 4 #Harvard admission series. In the end of the series, I’ll be sharing strategies on how you can apply this valuable info to your own application. @farangizmurodiy
Hashtags
@farangizmurodiy · Post #23 · 26.02.2023 г., 09:01
🕵🏻♀️How Harvard rates you? part 2 🏛 When you apply to Harvard, Harvard rates your application from 1 to 6 in four categories and gives one overall rating. Part 2: Extracurricular Rating 🏆 1️⃣ Unusual strength in one or more areas. Possible national-level achievement or professional experience. A potential major contributor at Harvard. Truly unusual achievement. 2️⃣Strong secondary school contribution in one or more areas such as class president, newspaper editor, etc. Local or regional recognition; major accomplishment(s).[in another filing]: "Significant school, and possibly regional accomplishments: for example, an applicant who was the student body president or captain of the debate team and the leader of multiple additional clubs." 3️⃣Solid participation but without special distinction. (Upgrade 3+ to 2- in some cases if the e/c is particularly extensive and substantive.) 4️⃣ Little or no participation. 5️⃣Substantial activity outside of conventional EC participation such as family commitments or term-time work (could be included with other e/c to boost the rating or left as a "5" if it is more representative of the student's commitment). 6️⃣Special circumstances limit or prevent participation (e.g. a physical condition). 👩🏻⚖️ This was the part 2 of 4#Harvard admission series. In the end of the series, I’ll be sharing strategies on how you can apply this valuable info to your own application. @farangizmurodiy
Hashtags
@farangizmurodiy · Post #14 · 24.02.2023 г., 10:47
🕵🏻♀️How Harvard rates you? When you apply to Harvard, Harvard rates your application from 1 to 6 in four categories and gives one overall rating. Part 1: Academic Achievement 📚 1) Summa potential: Genuine scholar; near-perfect scores and grades (in most cases) combined with unusual creativity and possible evidence of original scholarship. 2) Magna potential: Excellent student with superb grades and mid-to-high-700 scores (33+ ACT). 3) Cum laude potential: Very good student with excellent grades and mid-600 to low-700 scores (29 to 32 ACT). 4) Adequate preparation: Respectable grades and low-to-mid-600 scores (26 to 29) ACT). 5) Marginal potential: Modest grades and 500 scores (25 and below ACT). 6) Achievement or motivation marginal or worse. 👩🏻⚖️ This was the part 1 of 4 #Harvard admission series. In the end of the series, I’ll be sharing strategies on how you can apply this valuable info to your own application. 🏆 Follow for more unique admission strategies: @farangizmurodiy
Hashtags
@inPDF · Post #7553 · 15.04.2026 г., 16:37
#Harvard Business Review 🇺🇸 US №3 May-June 2026 #business ⤵️@inPDF📬
@inPDF · Post #7354 · 12.03.2026 г., 10:37
#Harvard Business Review 🇺🇸 US №2 March-April 2026 #business ⤵️@inPDF📬
@inPDF · Post #7256 · 18.02.2026 г., 16:01
#Harvard Business Review 🇺🇸 US Special Issue Spring 2026 #business ⤵️@inPDF📬
@inPDF · Post #7199 · 04.02.2026 г., 18:37
#Harvard Business Review 🇺🇸 US HBR's 10 Must Reads for New Managers 2026 #business ⤵️@inPDF📬
@inPDF · Post #7139 · 28.01.2026 г., 15:14
#Harvard Business Review 🇺🇸 US №1 January-February 2026 #business ⤵️@inPDF📬
@inPDF · Post #6953 · 03.12.2025 г., 21:32
#Harvard Business Review 🇺🇸 US №6 November-December 2025 #business ⤵️@inPDF📬
@inPDF · Post #6834 · 19.10.2025 г., 16:24
#Harvard Business Review 🇺🇸 US №5 September-October 2025 #business ⤵️@inPDF📬