TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

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

Резултати

Пронајдени 82 слични објави

Пребарај: #attack

当前筛选 #attack清除筛选
GitHub 红队武器库🚨

@githubredteam · Post #84669 · 18.05.2026 г., 11:03

🚨 GitHub 监控消息提醒 🚨发现关键词:#XSS#Attack 📦项目名称:DeveloperHub_cyber_Internship 👤项目作者:Suny-Kumar 🛠开发语言: None ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-05-18 10:58:42 📝项目描述: This project demonstrates a web application security assessment on a User Management System. It identifies vulnerabilities like SQL Injection, XSS, and insecure data storage using OWASP ZAP and manual testing, along with practical recommendations to improve application security and prevent attacks. 🔗点击访问项目地址

Hashtags

GitHub 红队武器库🚨

@githubredteam · Post #84631 · 18.05.2026 г., 04:02

🚨 GitHub 监控消息提醒 🚨发现关键词:#XSS#Attack 📦项目名称:CyberDox-CTF 👤项目作者:ahamedmohamed 🛠开发语言: None ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-05-18 03:28:45 📝项目描述: CyberDPX is a Capture The Flag (CTF) style web security training platform designed to help learners practice and understand common web vulnerabilities. The platform includes intentionally vulnerable challenges such as Path Traversal, SQL Injection, and Cross-Site Scripting (XSS) to simulate real-world attack scenarios in a safe environment. 🔗点击访问项目地址

Hashtags

GitHub 红队武器库🚨

@githubredteam · Post #84355 · 15.05.2026 г., 16:03

🚨 GitHub 监控消息提醒 🚨发现关键词:#XSS#Attack 📦项目名称:DeveloperHub_cyber_Internship-week_ONE 👤项目作者:Suny-Kumar 🛠开发语言: None ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-05-15 16:01:26 📝项目描述: This project demonstrates a web application security assessment on a User Management System. It identifies vulnerabilities like SQL Injection, XSS, and insecure data storage using OWASP ZAP and manual testing, along with practical recommendations to improve application security and prevent attacks. 🔗点击访问项目地址

Hashtags

GitHub 红队武器库🚨

@githubredteam · Post #84194 · 14.05.2026 г., 10:03

🚨 GitHub 监控消息提醒 🚨发现关键词:#XSS#Attack 📦项目名称:PROJET_ELK 👤项目作者:Gael-00 🛠开发语言: Python ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-05-14 10:02:32 📝项目描述: Plateforme de monitoring des attaques web (XSS, SQLi) 🔗点击访问项目地址

Hashtags

GitHub 红队武器库🚨

@githubredteam · Post #83973 · 12.05.2026 г., 17:03

🚨 GitHub 监控消息提醒 🚨发现关键词:#XSS#Attack 📦项目名称:varbase_ai_safety 👤项目作者:Vardot 🛠开发语言: None ⭐Star数量: 1 | 🍴Fork数量: 0 📅更新时间: 2026-05-12 16:54:54 📝项目描述: Bundles a complete AI safety stack for Varbase: Prompt Safety Liability set (legal advice, medical advice, sensitive topics), Prompt Safety Security set (XSS, HTML/CSS/JavaScript injection, prompt manipulation/jailbreak detection), PII Protection set (email, credit card, IBAN, phone), AI Logging with 90-day retention, and AI Observability 🔗点击访问项目地址

Hashtags

GitHub 红队武器库🚨

@githubredteam · Post #83510 · 09.05.2026 г., 11:02

🚨 GitHub 监控消息提醒 🚨发现关键词:#XSS#Attack 📦项目名称:cyber-attack-simulator 👤项目作者:zyntrix292545-droid 🛠开发语言: Python ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-05-09 11:01:33 📝项目描述: A web-based educational cyber attack simulator that demonstrates Phishing, Brute Force, DDoS, SQL Injection, XSS and Man-in-the-Middle attacks built with Python Flask 🔗点击访问项目地址

Hashtags

GitHub 红队武器库🚨

@githubredteam · Post #83356 · 08.05.2026 г., 12:03

🚨 GitHub 监控消息提醒 🚨发现关键词:#XSS#Attack 📦项目名称:interactive-xss-simulator 👤项目作者:S4MC71 🛠开发语言: HTML ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-05-08 11:58:41 📝项目描述: An interactive animated simulator designed to visualize the complete lifecycle of Reflected Cross-Site Scripting (XSS) attacks. Built for cybersecurity instructors and students to understand request/response flows and DOM rendering. 🔗点击访问项目地址

Hashtags

GitHub 红队武器库🚨

@githubredteam · Post #83220 · 07.05.2026 г., 14:03

🚨 GitHub 监控消息提醒 🚨发现关键词:#XSS#Attack 📦项目名称:secure-web-app-attack-simulation 👤项目作者:abieltesfai10-rgb 🛠开发语言: Python ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-05-07 14:01:59 📝项目描述: Vulnerable web app simulating SQL injection, XSS, and auth bypass — with full attack-to-defense remediation using Python and Flask 🔗点击访问项目地址

Hashtags

GitHub 红队武器库🚨

@githubredteam · Post #82617 · 03.05.2026 г., 11:02

🚨 GitHub 监控消息提醒 🚨发现关键词:#XSS#Attack 📦项目名称:TryHackMe-x-CyberSecurity101-Burp-Suite 👤项目作者:owen23-ux 🛠开发语言: None ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-05-03 11:02:05 📝项目描述: A walkthrough of TryHackMe's "Burp Suite: The Basics" room, documenting the setup, configuration, and execution of a reflected XSS attack. This repository translates offensive security techniques into defensive detection and analysis strategies for SOC Analysts. 🔗点击访问项目地址

Hashtags

GitHub 红队武器库🚨

@githubredteam · Post #82585 · 03.05.2026 г., 06:02

🚨 GitHub 监控消息提醒 🚨发现关键词:#XSS#Attack 📦项目名称:Detecting-web-attack-with-end-to-end-deep-Learning 👤项目作者:ayesha-siddiqua22 🛠开发语言: None ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-05-03 06:00:36 📝项目描述: Detecting Web Attacks using End-to-End Deep Learning is a project that builds a deep learning model to identify malicious web traffic. It uses LSTM/Neural Networks to automatically learn patterns and detect attacks like SQL Injection and XSS, improving accuracy and reducing reliance on traditional rule-based systems. 🔗点击访问项目地址

Hashtags

GitHub 红队武器库🚨

@githubredteam · Post #82323 · 01.05.2026 г., 13:02

🚨 GitHub 监控消息提醒 🚨发现关键词:#XSS#Attack 📦项目名称:CTF 👤项目作者:jotepewcyber 🛠开发语言: Python ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-05-01 13:00:31 📝项目描述: Capture the Flag platform for cyber security enthusiasts. Contains various challenges including: SQL injection, XSS, Command execution, Netcat reverse shells, Directory traversal attacks and Steganography. 🔗点击访问项目地址

Hashtags

GitHub 红队武器库🚨

@GithubRedTeam · Post #80555 · 16.04.2026 г., 13:03

🚨 GitHub 监控消息提醒 🚨发现关键词:#XSS#Attack 📦项目名称:DPSSX 👤项目作者:KLSEHB 🛠开发语言: None ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-04-16 13:01:56 📝项目描述: A Method for Detecting and Preventing SQLi and Stored XSS Induced by Expressions in Web Application SQL Statements via Static-Dynamic Analysis 🔗点击访问项目地址

Hashtags

123•••67
ПретходнаСтраница 1 од 7Следна