@testflightynoti · Post #37667 · 07.05.2026 г., 06:24
#Temple#AI Join the Temple AI beta on ✈️#TestFlight 🔗 Link: https://testflight.apple.com/join/qZDDMhyK Shared by Dimitri
Hashtags
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
Пребарај: #temple
@testflightynoti · Post #37667 · 07.05.2026 г., 06:24
#Temple#AI Join the Temple AI beta on ✈️#TestFlight 🔗 Link: https://testflight.apple.com/join/qZDDMhyK Shared by Dimitri
Hashtags
@AloneSnowflake · Post #500 · 09.05.2025 г., 21:32
⊹ 𝐀pply 𝐓heme ˓ 🛕 ˒ ༄ 𝐉oin 𝐂hannel ˙˚• #Temple#Light#Gray#Red#Theme
@Wallpaper_INT · Post #47570 · 01.01.2026 г., 05:31
#PaperArt#Mountains#Temple#4K @Wallpaper_INT
Hashtags
@voir_yeux · Post #12632 · 23.04.2026 г., 15:33
🇹🇭 Le temple Wat Phra Dhammakaya en Thaïlande a accueilli une méditation collective à l’occasion de la Journée de la Terre. #thaïlande#méditation#temple
Hashtags
@TestFlightX · Post #34533 · 08.11.2024 г., 04:20
#TEMPLE#RUN#ADVENTURE https://testflight.apple.com/join/8c2K8z2s
Hashtags
@voir_yeux · Post #12350 · 31.03.2026 г., 13:23
🇮🇳 Au moins huit personnes sont mortes lors d'une bousculade dans l'enceinte du temple dans le district de Nalanda de l'État du Bihar, dans le nord-est de l'Inde, rapporte la police. #inde#temple#bousculade#victimes
Hashtags
@arch_shovel · Post #868 · 03.12.2022 г., 07:30
Melbourne-based architects Adam Newman and Kelvin Tsang have installed a small scale of The Parthenon clad in different hues of colors and murals within the Grollo Equiset Garden at Melbourne’s National Gallery of Victoria (NGV), Australia. The installation, called Temple of Boom, emerges as "an evocative reimagination of The Parthenon", a global architectural icon and an Ancient Greek temple located on the Acropolis, Athens. Newman and Tsang draw inspiration from the colourful and artistic embellishments that once covered the original building over two- thousand years ago. Based on these historical references, dynamic and eye-catching floral motifs and optical illusions, designed by contemporary artists Drez, Manda Lane and David Lee Pereira wrap the installation. Images 1-2-3-4 📸 seanfennessy Image 5 📸 NGV #design#temple#parthenon#installation#intervention#arch_shovel
@blackwallp · Post #68085 · 03.04.2026 г., 05:42
#природа#река#храм#утро#nature#river#temple#morning 🎥Videowallpaper |😀Emoji |🎼Ringtone