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

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #146 · 16 сеп.

Функция sub в regex может принимать функцию в качестве аргумента repl. 📄 Из документации: If repl is a function, it is called for every non-overlapping occurrence of pattern. The function takes a single match object argument, and returns the replacement string. То есть для каждого совпадения будет вызвана функция для вычисления замены вместо замены на одну и ту же строку для всех совпадений. Иными словами, для замены разных совпадений на разные строки не потребуется запускать re.sub() много раз для каждой строки замены. Достаточно определить функцию, которая вернёт строку для каждого из совпадений. Описание слишком запутанное🤔, давайте лучше рассмотрим на простом примере: Создаем карту замены. То есть какие строки на какие требуется менять. remap = { 'раз': '1', 'два': '2', 'три': '3', 'четыре': '4', 'пять': '5', } Пишем функцию поиска строки для замены. Единственным аргументом будет объект re.Match. Используя данные этого объекта мы вычисляем замену on-the-fly! def get_str(match: re.Match): word = match.group(1) return remap.get(word.lower()) or word Пример текста. text = '''Раз Два Три Четыре Пять Вместе будем мы считать Пять Четыре Три Два Раз Мы считать научим вас ''' Теперь запускаем re.sub и вместо строки замены (repl) подаём имя функции. (Данный паттерн ищет отдельные слова в тексте) >>> print(re.sub(r'(\w+)', get_str, text)) 1 2 3 4 5 Вместе будем мы считать 5 4 3 2 1 Мы считать научим вас Думаю, достаточно наглядно 🤓 #libs#regex

Hashtags

Резултати

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

Пребарај: #extension

当前筛选 #extension清除筛选
The Devs

@thedevs · Post #1394 · 13.02.2019 г., 18:13

30 Seconds of Knowledge, Google Chrome extension that lets you gain new developer skills, every time you open a new tab. #resources#extension @thedevs https://kutt.it/XUe4Mf

纯情男高

@hanzichen · Post #895 · 25.06.2025 г., 16:18

YouLy+ YouLy+ is a browser extension that enhances your YouTube Music experience by providing an enhanced lyrics feature with line-by-line and word-by-word synchronization. Follow along with your favorite songs like never before! 🔗 Links: - Add it to your browser - Screenshots - Features - Source code Developer: Ibra Al Tabian ❤️ Support the Project If this project makes your life easier, here are a few quick ways to show some love: ⭐ Star the repo/app ☕ Buy a coffee for the developer 🛠 Contribute code, issues, or pull-requests 🏷 Tags: #Extension#Music

GitHub 红队武器库🚨

@githubredteam · Post #84656 · 18.05.2026 г., 09:03

🚨 GitHub 监控消息提醒 🚨发现关键词:#Burp#Extension 📦项目名称:RetireJSExporter 👤项目作者:grime66 🛠开发语言: Python ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-05-18 09:01:12 📝项目描述: Burp Suite extension that exports Retire.js findings only from .js endpoints to JSON and filters false positives. 🔗点击访问项目地址

GitHub 红队武器库🚨

@githubredteam · Post #84525 · 17.05.2026 г., 02:03

🚨 GitHub 监控消息提醒 🚨发现关键词:#Burp#Extension 📦项目名称:Burp-Suite 👤项目作者:Kieyontay 🛠开发语言: None ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-05-17 02:00:16 📝项目描述: 无描述 🔗点击访问项目地址

GitHub 红队武器库🚨

@githubredteam · Post #84520 · 17.05.2026 г., 01:03

🚨 GitHub 监控消息提醒 🚨发现关键词:#Burp#Extension 📦项目名称:DuckDuckBurp 👤项目作者:rainmana 🛠开发语言: Java ⭐Star数量: 3 | 🍴Fork数量: 0 📅更新时间: 2026-05-17 01:01:22 📝项目描述: Front Burp data with DuckDB to enable super fast and awesome querying and AI integration 🔗点击访问项目地址

GitHub 红队武器库🚨

@githubredteam · Post #84452 · 16.05.2026 г., 13:03

🚨 GitHub 监控消息提醒 🚨发现关键词:#Burp#Extension 📦项目名称:BurpSuite-Extensions 👤项目作者:EmilijaMicovic 🛠开发语言: None ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-05-16 12:44:42 📝项目描述: 无描述 🔗点击访问项目地址

GitHub 红队武器库🚨

@githubredteam · Post #84394 · 16.05.2026 г., 02:03

🚨 GitHub 监控消息提醒 🚨发现关键词:#Burp#Extension 📦项目名称:jwt-intruder 👤项目作者:mshartz 🛠开发语言: Java ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-05-16 02:01:05 📝项目描述: A Burp extension designed to imbed intruder payloads inside of JWTs for which you have the secret key. 🔗点击访问项目地址

GitHub 红队武器库🚨

@githubredteam · Post #84305 · 15.05.2026 г., 09:03

🚨 GitHub 监控消息提醒 🚨发现关键词:#Burp#Extension 📦项目名称:Postman2burp 👤项目作者:zalakamal08 🛠开发语言: Java ⭐Star数量: 3 | 🍴Fork数量: 0 📅更新时间: 2026-05-15 09:03:40 📝项目描述: 无描述 🔗点击访问项目地址

GitHub 红队武器库🚨

@githubredteam · Post #84240 · 14.05.2026 г., 17:03

🚨 GitHub 监控消息提醒 🚨发现关键词:#Burp#Extension 📦项目名称:RestoringTestability 👤项目作者:federicodotta 🛠开发语言: None ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-05-14 16:49:52 📝项目描述: Stuff of my talk "Restoring Testability - Handling complex scenarios in Burp Suite with a custom extension" 🔗点击访问项目地址

GitHub 红队武器库🚨

@githubredteam · Post #84103 · 13.05.2026 г., 16:03

🚨 GitHub 监控消息提醒 🚨发现关键词:#Burp#Extension 📦项目名称:ProtoME 👤项目作者:twisted007 🛠开发语言: Java ⭐Star数量: 1 | 🍴Fork数量: 0 📅更新时间: 2026-05-13 15:43:07 📝项目描述: Burp Extension to allow for security audit of Protobuf requests. Can generate requests from either a whitebox or completely blackbox perspective. 🔗点击访问项目地址

GitHub 红队武器库🚨

@githubredteam · Post #84092 · 13.05.2026 г., 15:03

🚨 GitHub 监控消息提醒 🚨发现关键词:#Burp#Extension 📦项目名称:UnusualFuzzer 👤项目作者:Ozozuz 🛠开发语言: None ⭐Star数量: 3 | 🍴Fork数量: 0 📅更新时间: 2026-05-13 15:02:49 📝项目描述: Burp extension for when you have no more ideas and still want errors. 🔗点击访问项目地址

GitHub 红队武器库🚨

@githubredteam · Post #83938 · 12.05.2026 г., 13:03

🚨 GitHub 监控消息提醒 🚨发现关键词:#Burp#Extension 📦项目名称:revelion-burp-extension 👤项目作者:RevelionAI 🛠开发语言: None ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-05-12 12:41:38 📝项目描述: Revelion Burp Suite Professional extension - pair your local Burp with Revelion missions 🔗点击访问项目地址

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