Ранее я делал серию постов про битовые операторы.
Вот вам ещё один наглядный пример как это используется в 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
Trending Apps: New AMA Sessions on MiniApps
#Telegram#MiniApps
Trending Apps announces the launch of two AMA series by the Telegram Apps Center, focusing on MiniApps development. The sessions, "Inside the MiniApps" and "Outside MiniApps," will delve into building, scaling, and designing, with insights from industry founders and designers.
Source: link
@tonlines
Mini apps 2.0
You can now minimize mini apps, open multiple apps simultaneously, keep them open, and chat with anyone. There's no need to close them every time you switch bots.
If you don't mind here's my blum link 😉: t.me/BlumCryptoBot/app?startapp=ref_XvNwcBk28m
Thanks : 💌💌💌
#Miniapps#Beta
🆕Events are already here!
Greetings friends, we are glad to present our 3rd main part of our service — Events.
From this moment on, you can create and take part in offline and online events. Choose your time, date, and the number of guests and share them with future participants ✉️
Of course, we have implemented the «Check in» function for offline events. Scan QR codes at the entrance within our app.
If you don't want to see someone at your event, don't worry; you can always block and unblock them. The app has a special counter for users who were blocked ✏️
The next steps for events are — NFT utility. Stay tuned 🖼
Create your first event right now
#MiniApps#Callegram
✏️Events are coming this week
Hi guys! After weeks of development we plan to launch events at the end of the week.
Don't forget to turn on notifications on this channel. See you 🙂
Source of the Event picture
#MiniApps#Callegram
🆕Callegram AI and Google Calendar Export
Hi all! Today we're glad to present you with our new features: AI chatbot and Export into your Google Calendar.
Help of AI. Since today you can easily set up your AI chatbot. All your customers could book an appointment via messages or voice messages directly into your chat window. You don't need to be 24/7 because Callegram AI is taking the hardest steps on itself.
Export into Google Calendar. You told us about the option to export all Callegram events (Calls, Appointments and Events in the future) into your Google Calendar. Here it is 🙂 Now Callegram has 2 ways for Import and Export. You don't need to care about manual actions between the apps, just give the Callegram option to do its job ⚡️
Please leave all your Qs below in the comments field and we will help you with setup. Have a nice day!
#MiniApps#Callegram
What you should know about the new Telegram update:
• Quick access to your favorite Mini App from Home Screen;
• Faster way to share your schedule;
• Monthly subscription in Stars ⭐
• Loading logo on the background
Thanks Telegram team for the update. We’re on our way 👀
#Callegram#MiniApps
🗓Mini App Store Here
Hi! Recently Telegram team has launched Mini Apps Store List of apps. Now you can browse popular apps directly in your search bar. Just update Telegram app.
We've been doing our best to be there and give millions of people option to manage their time within Telegram in a few clicks.
We continue to work on the Appointments feature to bring a new and useful experience.
Stay tuned to Callegram for the latest developments 🙂
App | #Callegram#MiniApps
🔄New Website Of Our Service
We've been working hard to develop and improve our service, and we're excited to share the latest updates! For international impact, we've updated our "face" — https://callegram.com
Now you can check out our current stage, vision, socials and documents: Terms of Service, Privacy Policy.
Stay with us, we've got something interesting for you!
#MiniApps#Web_Apps
🆕Google Meet Links in 1 Click
Hi, you asked — we did: Generate Google Meet links in any chat.
Need a quick call without schedules? Type @CallegramBot anywhere and click on Send Google Meet Link.
The feature is available as soon as you connect your Google Account.
Until the end of May, 5 free generations per day are available
🎤 Share your experience with us in the comments
#MiniApps#Web_Apps
🆕Google meet links, Telegram payments
Warm greetings to all! Today we have a new update with useful feature — generate Google Meet link in 1 tap (Check previous post above). You don't need to leave Telegram for generating and copying special links for your calls anymore.
💵Additionally we have implemented Telegram Payments: the easiest way to purchase our Pro subscription without leaving Telegram. Check our special deals for annual billings here to increase your Callegram limits and get new features: t.me/CallegramBot/subscribe
#MiniApps#Web_Apps
🎤Who We are?
Today we want to share with you some info about our team and who are building the Callegram:
Denis Matveev (left): 7+ years experience in Product and Community management. Winner of 5+ contests around TON and other blockchains. Adviser at SNOVA Capital. Ex: Tonkeeper, Tonpound teams.
Andrew Gostishchev (right): 9+ years experience in Full Stack development. 5+ products for companies
with a total revenue of 5M$+. Winner of different hackathons around TON blockchain. Technical adviser at SNOVA Capital.
D&A Team (Both): Winners of worldwide Telegram Mini Apps Contest. 6+ done mini apps in web2 & web3 with total audience 1M+. Speakers across Mini Apps conferences in South Korea, Georgia and other countries. TON Nest pitch deck 1st place.
✨ We've been building Callegram with passion, experience and understanding what Telegram should have in the ecosystem
App | #Callegram#MiniApps#TON