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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #76 · 27 апр.

Ранее я делал серию постов про битовые операторы. Вот вам ещё один наглядный пример как это используется в Python в модуле re. Чтобы указать флаг для компилятора нам надо указать его после передаваемой строки. Например, добавляем флаг для игнорирования переноса строки. pattern = re.compile(r"(\w+)+") words = pattern.search(text, re.DOTALL) А как указать несколько флагов? Ведь явно будут ситуации когда нам потребуется больше одного. Кто читал посты по битовые операторы уже понял как. pattern.search(text, re.DOTALL | re.VERBOSE) А теперь смотрим исходники, что находится в этих атрибутах? Не удивительно, степени двойки. Почему? Потому что каждое следующее значение это сдвиг единицы влево. >>> for n in [1, 2, 4, 8, 16, 32, 64, 128, 256]: >>> print(bin(n)) 0b1 0b10 0b100 0b1000 0b10000 0b100000 0b1000000 0b10000000 0b100000000 Чтобы было понятней, давайте напишем тоже самое но иначе, добавим ведущие нули: 000000001 000000010 000000100 000001000 000010000 000100000 001000000 010000000 100000000 Не понятно что тут происходит? Читай три поста про битовые операторы начиная с этого ➡️https://t.me/pythonotes/45 В общем, это пример применения побитовых операций в самом Python. Теперь вы знаете Python еще немного лучше) #tricks#regex#libs

Резултати

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

Пребарај: #onton

当前筛选 #onton清除筛选
TONlines – News

@tonlines · Post #6777 · 15.04.2025 г., 13:11

bemo: ONTON and ONION Roadmap Launch #ONTON#NFT The bemo channel announces the launch of the Genesis ONIONs x ONTON roadmap, marking an important milestone for the platform. With over 100 partners and more than 3,000 NFTs already reserved, the roadmap outlines the future developments for the ONTON platform and promises significant value for Genesis NFT holders. Source: link @tonlines

Hashtags

🏅Distribution of unique SBT badges to ONTON & GVWS Marathon participants has begun! 🤝 The ONTON team, together with GVWS, launched the distribution of custom badges in the Soulbound Token (SBT) format to everyone who participated in the marathon dedicated to the launch of the Constructor. These badges serve as official confirmation of activity in the project and can play an important role in future drops, bonuses and participation in the ecosystem. To get your badge: ✅ You need to log in and go through the steps in the bot — @theontonbot ✅ Then go to your personal account on getgems.io ✅ Find GVWS SBT and click the Claim NFT button 😋The badge is displayed in three places at once: — in the GVWS profile — in ONTON — in Ton Society 💪 Participants who completed the marathon and already interacted with the ONTON bot received a push notification with the ability to brand. Those who did not participate in ONTON activities, but fulfilled the conditions of the marathon, will receive a notification later — via the bot @gvws_bot. More details: here #SBT#Marathon#TON#ONTON

🙏SBT ONTON in real time! 🔍 Our chat has a bot that monitors the emergence of new SBTs in real time — they appear instantly along with passwords! ❤️ No need to search for them in different chats anymore - just join our community and get valuable Soul Bound Tokens to your wallet, so that you can get a drop for them later! 🟣Claim your SBT ONTON now! #TON#ONTON#SBT#Airdrop#Web3#TONCommunity