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

Резултати

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

Пребарај: #dashboard

当前筛选 #dashboard清除筛选
Discord | Parser

@parserdiscord · Post #170 · 10.11.2025 г., 03:17

$CC Discord: link Ветка: community-updates —————————————————— 💬 Новое сообщение: [03:17:55] ## Attention Canton Network Users! I would like to start by saying how much we appreciate everyone in this community for integrating into what we at Canton Network and its ecosystem partners have worked so hard to build! We know that many of you have been early supporters, and some of you have simply shown up, so we want to do something special for all of you. I know there have been many discussions about an airdrop for specific role holders, but this will not be the typical airdrop you're used to, where all you needed to do was participate on mainnet or hold a role within the community. No, we will be offering a variety of opportunities for everyone to participate and earn fairly, with some extra leverage for those who have been helping to build Canton and share updates about what’s happening in the ecosystem. Canton Network is committing $50,000 in $CC (regardless of price fluctuations) to the community and here are all the ways you could potentially earn the rewards throughout the next 30 days: **Canton XP:** We will be introducing Canton XP (CXP) to the community. Canton Points will be integrated into the ecosystem using . We will release various tasks, quests, and opportunities to earn Canton Points. These could include attending an AMA, creating *quality* content for Canton, building with DAML, or simply helping users get more involved in the ecosystem. Our moderators will award different amounts of CXP for all these activities and more. The events might offer CXP rewards, Secret Role rewards, or just $CC rewards—you'll have to wait and see which events give what, but all rewards are valuable—and your roles matter too! There has been a lot of discussion about what your roles could provide, and we have the answer that fits here. These quests and tasks also give you the chance to earn multipliers for the CXP you receive, and yes, role multipliers stack! There will be role-specific opportunities as well as time-based multiplier opportunities, giving everyone a chance to climb the leaderboard! Just keep in mind, as easily as you can earn points, they can also be taken away from you bad actors. **Regional Channels:** Each regional channel, all 13, will have access to its own $1,000 and CXP that you can win within your local channel by completing events and tasks there. Your content will matter, your participation will matter, and, as always with me, your voice will matter. **Role Raffles:** Your roles are something many of you have worked hard for—creating content, participating in events, being a builder, or even just showing up early—and we believe that's an achievement in itself. Each role will have its own raffles where you can randomly win $CC just by entering. The roles eligible for raffles include , , , and (we may still do ). Each will have its own reward pool and raffle for you all to join. Sometimes you might win $50 in $CC; other times, it could be $500. We're giving the roles the opportunity to decide how much some of the raffles should be for. Each role will have a dedicated channel for discussions, but ultimately, the decisions will be put to a vote. Work together and consider whether one big prize for a raffle is worth it, or if multiple smaller raffles make more sense. The choice is yours. **Leaderboards:** All the CXP will accumulate until the end of the 30 days, placing you on a Drip Leaderboard. You can view this leaderboard in #dashboard as you earn CXP. At the end of the 30 days, we will award $CC rewards to the top participants ranked 1-500, with the top prize being $3000 to a single winner. Now, we will be sharing more and more details as time goes on but i will be sure to keep everyone updated. We kick things off tomorrow! —————————————————— 📖Дневник Тойошика

Hashtags

Dataviz jobs

@dataviz_jobs · Post #1984 · 28.04.2026 г., 11:07

В Binance (Taiwan, China) требуется: Business Intelligence Data Analyst. Из инструментов: Tableau / Qlik. https://remotefirstjobs.com/companies/binance/jobs/business-intelligence-data-analyst-777278 #foreign #dashboard

Dataviz jobs

@dataviz_jobs · Post #1973 · 27.04.2026 г., 09:31

В Dreamix требуется: Lead Data Engineer AWS Architect. Из инструментов: Power BI / Tableau / Looker. https://remotefirstjobs.com/companies/dreamix/jobs/lead-data-engineer-aws-architect-776829 #foreign #dashboard

Dataviz jobs

@dataviz_jobs · Post #1970 · 24.04.2026 г., 16:14

В Upwork требуется: Senior Analyst, Product Analytics: Marketplace. Из инструментов: Tableau / Looker. https://remotefirstjobs.com/companies/upwork/jobs/senior-analyst-product-analytics-marketplace-774354 #foreign #dashboard

Dataviz jobs

@dataviz_jobs · Post #1919 · 17.04.2026 г., 08:55

В Revelator требуется: Distribution Operations Director. Из инструментов: Tableau / Looker / Excel. https://remotefirstjobs.com/companies/revelator-ltd/jobs/distribution-operations-director-767319 #foreign #dashboard

123•••5•••10•••15•••20•••25•••30•••35•••40•••45•••50•••5455
ПретходнаСтраница 1 од 55Следна