@Ptfxq · Post #167 · 05.04.2021 г., 03:57
#KG 对满足条件的用户发放1个邀请。 原文:https://telegra.ph/Invites-for-long-term-seeders-04-05
Hashtags
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #83 · 11 мај
У строки в Python есть два очень похожих метода. На столько похожих что кажется они делают одно и тоже. Это метод isdigit() и isnumeric() Давайте посмотрим зачем нам два одинаковых метода? И так ли они одинаковы? Очевидно что isdigit() говорит нам, состоит ли строка только из чисел 0-9 >>> '12'.isdigit() True >>> '12x'.isdigit() False >>> '-12'.isdigit() False >>> '12.5'.isdigit() False Можно предположить что isnumeric() делает более глубокий анализ и распознаёт в строке float или отрицательное число. >>> '15'.isnumeric() True >>> '-15'.isnumeric() False >>> '15.2'.isnumeric() False Нет, всё так же как и с другим методом. В чем же тогда разница? Для начала посмотрим следующие примеры: >>> '5'.isdigit(), '5'.isnumeric() # Обычная цифра 5 # True, True >>> '꧕'.isdigit(), '꧕'.isnumeric() # Яванская 5 # True, True >>> '෩'.isdigit(), '෩'.isnumeric() # Синхала 3 # True, True >>> '৩'.isdigit(), '৩'.isnumeric() # Бенгальская 3 # True, True >>> '༣'.isdigit(), '༣'.isnumeric() # Тибетская 3 # True, True >>> '³'.isdigit(), '³'.isnumeric() # 3 верхний индекс (степень) # True, True >>> '𝟝'.isdigit(), '𝟝'.isnumeric() # Математическая двойная 5 # True, True >>> '๔'.isdigit(), '๔'.isnumeric() # Тайская 4 # True, True >>> '➑'.isdigit(), '➑'.isnumeric() # 8 в круге # True, True А теперь примеры в которых, по мнению Python, результаты не равны >>> '¾'.isdigit(), '¾'.isnumeric() # дробь три четверти # False, True >>> '⅕'.isdigit(), '⅕'.isnumeric() # дробь одна пятая # False, True >>> '𒐶'.isdigit(), '𒐶'.isnumeric() # клинопись 3 # False, True >>> '三'.isdigit(), '三'.isnumeric() # 3 из унифицированной идеограммы # False, True >>> '⑩'.isdigit(), '⑩'.isnumeric() # цифра 10 в круге # False, True >>> 'Ⅳ'.isdigit(), 'Ⅳ'.isnumeric() # Римская 4 # False, True >>> '𑇪'.isdigit(), '𑇪'.isnumeric() # Сенегальская архаическая 10 # False, True >>> '𐌢'.isdigit(), '𐌢'.isnumeric() # Этрусская цифра 10 # False, True >>> 'ↂ'.isdigit(), 'ↂ'.isnumeric() # Римская цифра 10000 # False, True >>> '〇'.isdigit(), '〇'.isnumeric() # Символ ККЯ ноль # False, True Получается, что isdigit() говорит нам, является ли символ десятичной цифрой или спецсимволом, имеющим цифирное значение после преобразования. В свою очередь isnumeric() включает все дополнительные символы юникода которые имеют отношения к числовым и цифровым представлениям. Ну и пара примеров в которых в обоих случаях символ не является числом, это эмодзи. >>> '🕙'.isdigit(), '🕙'.isnumeric() # эмодзи 10 часов # False, False >>> '7️⃣'.isdigit(), '7️⃣'.isnumeric() # эмодзи 7 # False, False Также есть еще один дополнительный и весьма полезный метод isdecimal(). Он нам сообщает, можно ли из указанного символа сделать простую десятичную цифру. То есть сработает ли метод int(x) >>> '෩'.isdecimal(), int('෩') # Синхала 3 # True, 3 >>> '➑'.isdecimal(), int('➑') # 8 в круге # False, ValueError Какие выводы? 🔸 При определении цифры в строке isdigit() подходит лучше чем isnumeric(), но оба не гарантируют успешную конвертацию в int 🔸 Для однозначного определения возможности преобразования строки в int лучше подходит метод isdecimal() 🔸 Для однозначного определения символов 0...9 лучше использовать regex Полный список символов юникода которые определяются как numeric #basic
Hashtags
Пребарај: #kg
@Ptfxq · Post #167 · 05.04.2021 г., 03:57
#KG 对满足条件的用户发放1个邀请。 原文:https://telegra.ph/Invites-for-long-term-seeders-04-05
Hashtags
@Ptfxq · Post #554 · 26.01.2024 г., 22:08
#KG#站免 KG Sitewide freeleech active! Ends in 8d 22h 53m
@Ptfxq · Post #258 · 28.01.2022 г., 04:39
#KG#站免 KG 现已开启站免,直至 2022.02.06 18:00(农历正月初六),感谢群友提供消息!
@Ptfxq · Post #62 · 29.01.2021 г., 14:21
#KG#站免 update:已结束。
@Ptfxq · Post #694 · 02.08.2024 г., 05:41
#KG#PTP PTP在KG开设官窑 要求如下 Members of Karagarga that have an unwarned account that is older than two years, and fulfill at least one of the below requirements, are eligible to request an invite. ▪ At least 50 uploads (25 of which must be movies) ▪ At least 10 completed subtitle pots ▪ VIP or staff tldr: 满足要求你肯定已经进了,没进你也不满足要求,也大概率满足不了要求 感谢群友投稿
@Ptfxq · Post #490 · 28.11.2023 г., 08:59
#KaraGarga#KG KG History & Memory subforum We have gathered together KG history related forum posts in a new subforum for your convenience. Pay it a visit and learn more about our past.
Hashtags
@Ptfxq · Post #375 · 14.10.2022 г., 22:00
#karagarga#KG The Pot The pot system has been functioning well for more than a decade now, big thanks to all subtitlers and pledgers. Please check if you have claimed any pots. Go to your profile, and after Pot Pledges click on (claimed pots). If you are working on a pot, leave a comment there about progress, and update that post at least every 3 months. If not, cancel your claim. A dormant claim can discourage a potential subtitler. Also, please keep an eye from time to time on pots you started or pledged to (see Pot Pledges in your profile). If good subtitles appeared in the meantime, report that pot with a link to the subs. If you want to subtitle a film for which the pot has been claimed long ago without any news, please contact one of us (corvusalbus, flipflink, cyzs, musiclova). Happy subtitling and viewing!
Hashtags
@aadaili · Post #14628 · 23.04.2026 г., 13:21
#KG#cfm#范围 2026-04-22 21:46:46 游戏:穿越火线枪战王者 KG公益裸奔范围 无任何卡密验证 使用root设备 给777权限 大厅界面执行
@Ptfxq · Post #976 · 07.02.2026 г., 03:43
#KaraGarga#KG#站点免费 站免 9 天 同时 BHD 在 KG 开设了官方邀请,要求为账号年龄两年、pu 等级和有一个发种。
Hashtags
@Ptfxq · Post #847 · 31.01.2025 г., 19:29
#karagarga#KG#站点免费 Sitewide freeleech active! Ends in 8d 20h
Hashtags
@Ptfxq · Post #501 · 11.12.2023 г., 09:00
#Karagarga#KG#站点活动 Take part in Karagarga's Top 100 Movie Poll We are collecting Top 10 lists from our members until midnight (UTC) on 24 December 2023. A KG Top 100 list based on these votes will be revealed on Christmas Day.
Hashtags
@Ptfxq · Post #692 · 01.08.2024 г., 11:30
#karagarga#KG#捐赠 希望给站点捐赠的用户可以联系站内公告提到的管理了。 注:没有捐入,没有额外福利,只是为了站点的存续而筹备今年的资金。
Hashtags