@cryptobull_360 · Post #49304 · 14.04.2026 г., 14:36
#SILVER
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
Пребарај: #silver
@cryptobull_360 · Post #49304 · 14.04.2026 г., 14:36
#SILVER
Hashtags
@binancefuturesignal · Post #35745 · 07.02.2026 г., 14:45
✔️✔️#Silver can still make a new ATH
Hashtags
@btctradingclub · Post #26898 · 07.02.2026 г., 14:45
✔️✔️#Silver can still make a new ATH
Hashtags
@priceactionexpert · Post #8813 · 03.03.2026 г., 11:02
#silver
Hashtags
@wolfoftrading · Post #6029 · 13.03.2026 г., 19:28
Silver just dropped below $80! The largest on-chain#silver short, 0x007d, holds 148,359 xyz:SILVER ($11.88M) and is now up $2.23M.
Hashtags
@maninamerica · Post #3396 · 09.10.2025 г., 12:50
🚨#SILVER TOUCHES $50. 🚨#SILVER ABOUT TO CROSS THE RUBICON.
Hashtags
@free_signals · Post #9876 · 09.12.2025 г., 13:01
🔅SILVER Is Very Bearish! Sell!📉 - - - - - - - - Please, check our technical outlook for 📊SILVER. The price is testing a key resistance 5,871.4. Taking into consideration the current market trend & overbought RSI, chances will be high to see a bearish movement to the downside at least to 5,754.1 level. - - - - - - - - #freesignal#silver - - - - - - - - 🌐Free Copy Trading: Link 📲Join VIP via Bot:Link ❓Official Contact:@signalprovidercontact
Hashtags
@free_signals · Post #9826 · 30.11.2025 г., 14:25
🔅SILVER Will Move Higher! Long!📈 - - - - - - - Please, check our technical outlook for 📊SILVER. The market is trading around a solid horizontal structure 5,642.3. The above observations make me that the market will inevitably achieve 6,175.7 level. - - - - - - - - #freesignal#silver - - - - - - - - 🌐Free Copy Trading: Link 📲Join VIP via Bot:Link ❓Official Contact:@signalprovidercontact
Hashtags
@free_signals · Post #9796 · 26.11.2025 г., 14:04
🔅SILVER Will Grow! Long!📈 - - - - - - - Here is our detailed technical review for 📊SILVER. The market is testing a major horizontal structure 5,240.5. Taking into consideration the structure & trend analysis, I believe that the market will reach 5,614.1 level soon. - - - - - - - - #freesignal#silver - - - - - - - - 🌐Free Copy Trading: Link 📲Join VIP via Bot:Link ❓Official Contact:@signalprovidercontact
Hashtags
@priceactionexpert · Post #8861 · 23.03.2026 г., 11:27
https://x.com/priceactiongann/status/2036042034608509042?s=20 #silver Silver one of the major prices encoded holds 63.00 to 62.00 intermarket cycles can range in between and if price further breaks down only will take it down deeper #gold one market cycle is one way and finding cycles in both and relating them can give further confirmations 1.speed is very fast and volatile in one direction almost risk is on sentiment 2. gold also reaches 4090 and 4320 which coincides with silver 63 which is 9x7 3.both bounces and forms low which gives further delay on this current sell trend 4.more downsides should break this low further and gold current low near 4090 5.when end of intermediate cycles it forms such levels and we use them and combine to deduce more than what to do and what not to do 6. in this case what should not be done is clear as one part is done, we cannot keep looking for further down unless low is broken again 7.knoweldge with proper understanding of cycles is key to all when in slight doubt in one direction i avoid and be cautious Always study and confirm it never trade on hope and fear when not clear avoid and study further there is opportunity always save your capital is your first rule.
@priceactionexpert · Post #8853 · 19.03.2026 г., 14:28
#gold Massive drop can happen! Gold dropped and broken 4631 and went down and again comes back to retest So there would be a high and massive drop can come from here if this level holds #silver retest should be at 69.5 which is current price both Drop can take to 63 to 64 if this high holds Watch out here ! Just follow the intensity until the price goes up as within the above region of 4675. https://x.com/priceactiongann/status/2034636669102735711?s=20
@priceactionexpert · Post #8841 · 13.03.2026 г., 15:49
https://x.com/priceactiongann/status/2032484028490948913?s=20 #Gold Gold from 5225 top cycle it's been anchored to drop from there dropping nicely so far next drop was hinted at 5120 and it's where exactly it formed high and retest also accurate to the point there only 5121.00 drops on top to 5080 and next 5050 done with slight bounce confirming the levels breaking further lows next can to 5000 and 4949 only use studies and analysis and combine with yours use multiple confluences side by side and combine with silver cycle #silver levels are key, use that too and check both instruments where the levels meet and use those for our advantage always Its all-pure maths and geometry only! Do share and repost max so many can benefit. thanks.