Ранее я делал серию постов про битовые операторы.
Вот вам ещё один наглядный пример как это используется в 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
STON.fi (Telegram)
🗿Impermanent Loss Protection: 2322 STON Sent to Liquidity Providers
Stonfiers! We've distributed STON 2322 STON offset to liquidity providers in the STON/USDT pool for December 1-31. Check your wallets!
💎 Here's what you need to know:
• You can offset up to 5.72% of your impermanent loss.
• Monthly protection budget: $10,000.
• Max offset per user: $100 in STON tokens.
• Auto-crediting — no need to claim!
🚨Important: Users who provided liquidity in theSTON/USDTpool before January 1 will be protected from impermanent loss until January 31!
🔗Add Liquidity Now🔗
#protection#liquidity
DEX | Telegram DEX | Onboarding | Guide | Blog | All Links
🐣X🤖Discord🌐Reddit🌐LinkedIn📹YouTube🪨Join the Club
STON.fi: Impermanent Loss Protection for Liquidity Providers
#protection#liquidity
STON.fi has distributed 6546 STON tokens to liquidity providers in the STON/USDT pool for November, with up to 5.72% impermanent loss offset offered. Users who provided liquidity before December 1 will have protection until December 31, with a monthly budget of $10,000.
Source: link
@tonlines
STON.fi: New Round of Impermanent Loss Protection Starts Soon
#protection#liquidity
STON.fi reminds liquidity providers that the new cycle of impermanent loss protection for the STON/USDT V2 pool begins on May 1st. Only those joining the pool by then will be eligible for protection.
Source: link
@tonlines
STON.fi Update: IL Protection Sent to Liquidity Providers
#protection#liquidity
STON.fi has distributed 894 STON to liquidity providers in the STON/USDT v2 pool for March 1-31, offering up to 5.72% impermanent loss offset. With a monthly protection budget of $10,000 and a max offset of $100 per user, auto-crediting ensures no claiming is needed.
Source: link
@tonlines
¿Que puede hacer este bot?
@NewUsersMediaLimiterBot
Este nuevo bot que limitará el envío de medios a los usuarios que acaban de unirse al grupo durante los primeros 30 minutos, a menos que sean desmantelados manualmente por uno de los administradores, el bot no enviará ningún mensaje cuando el usuario ingrese.
Idiomas: italiano inglés
(Visto en @botsgram_cu)
#grupos#administración#protection
🌍 Earth's magnetic field acts like a protective shield, deflecting harmful solar wind and cosmic rays. This invisible force helps preserve our atmosphere and supports life on the planet. ✨
#magnetism⚡#protection⚡#atmosphere⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography🌍
Souveraineté Alimentaire : Les dirigeants de l’AES doivent mettre un terme à l'accord de libre-échange et de coopération, par le biais duquel les États de la région ouest-africaine s'engagent à libéraliser progressivement leurs marchés au profit des importations en provenance d'Europe.
Il est essentiel de prioriser le renforcement des moyens et du soutien en faveur de nos agriculteurs locaux, plutôt que de continuer à inonder notre continent avec des denrées alimentaires européennes de qualité souvent médiocre, entraînant ainsi l'apparition de nouvelles maladies tropicales. #souverainetéalimentaire#Afrique#Protection
@egountchibehanzinTV
🇺🇿Oliy maktabda magistrlik dissertatsiyalari himoyasi bo‘lib o‘tdi
🔈 Joriy yilning 10\11-iyun kunlari Biznes va tadbirkorlik oliy maktabida 70411302 – Biznesni boshqarish (MBA) hamda 70411301 – Kichik biznes va xususiy tadbirkorlik (Biznes innovatsiyalar va tadbirkorlik) magistratura mutaxassisliklari tinglovchilari uchun Yakuniy davlat attestatsiyasi doirasida magistrlik dissertatsiyalari himoyasi bo‘lib o‘tdi.
🔼 Jami 23 nafar tinglovchi, jumladan Biznesni boshqarish (MBA) mutaxassisligi bo‘yicha 10 nafar, Kichik biznes va xususiy tadbirkorlik mutaxassisligi bo‘yicha 13 nafar tinglovchilar magistrlik dissertatsiyalarini muvaffaqiyatli himoya qilishdi.
👨🎓
📔 Magistrlik dissertatsiyalari O‘zbekiston Respublikasi Prezidenti huzuridagi Davlat boshqaruv akademiyasi kafedra mudiri, professor, Yakuniy davlat attestatsiyasi komissiyasi raisi D.Raximova hamda komissiya a’zolari tomonidan baholandi. Dissertatsiyalarni himoya qilish jarayoni ilmiy mubohasa yo‘sinida va yuqori talabchanlik bilan o‘tkazildi.
🌀Batafsil
#GraduateSchool#Protection#Dissertation#Work
🌐Web-site |
✅Telegram |
✅Facebook |
🌐Instagram
🔥 Сегодня
🔥 Вебинар PETYA, МАЙНИНГ, UEBA
📅 20 марта / 11:00 — 12:30 (время МСК) / онлайн
💵 Бесплатно
📝 Регистрация тут: https://goo.gl/1HJ68T
Как не повторить ошибок 2017-го и войти в 2018 год во всеоружии, заранее знать основные угрозы и как с ними бороться, на практических примерах расскажет руководитель экспертного отдела «Гарда Технологии» Роман Жуков.
🔗 Программа: https://goo.gl/1HJ68T
#security#cybersecurity#protection#онлайн
#go#attacks_prevention#detection#linux#protection#security
CrowdSec is an open-source security solution that helps protect servers from malicious IP addresses. It uses a community-driven approach, where users share information about threats they've faced, creating a shared blocklist to prevent attacks. CrowdSec's Security Engine can detect bad behaviors by analyzing logs and HTTP requests, and it supports multiple platforms. This system is fast, easy to use, and designed for modern infrastructures, making it a powerful tool for securing your systems against various threats. By using CrowdSec, you benefit from collective protection and can focus on real security issues.
https://github.com/crowdsecurity/crowdsec
@littleGuardianBot
Qué puede hacer este bot?
LittleGuardian fue creado como un bot para apoyar los esfuerzos de los administradores del grupo Telegram mientras luchaba con comportamientos antisociales y varios ataques contra los grupos o miembros del grupo.
Idioma: Inglés
(visto en @BotsGram_cu)
#antispam, #protection, #management, #groups, #filter, #welcome
Some Buddhists serve as soldiers even though Buddhism teaches non-violence. Soldiers can protect people, and Buddhism considers the intention behind actions. Actions that reduce suffering can be acceptable according to Buddhist ethics. Concepts like karma and skillful action are important. International humanitarian rules guide soldiers to act carefully. Being a Buddhist does not always mean being completely against war. Martial arts like Kung Fu also connect to Buddhism. They teach discipline, self-control, mindfulness, and protecting others. The goal is training the mind and body, not just fighting.
🕉️⚔️🥋
[Read more]
@googlefactss
#Buddhism#Ethics#Soldiers#NonViolence#Karma#Protection#SkillfulAction#KungFu#MartialArts#Mindfulness