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

Резултати

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

Пребарај: #decipher2024

当前筛选 #decipher2024清除筛选
DWF Labs Broadcast

@DWFLabs · Post #728 · 27.06.2024 г., 08:35

We had a great day yesterday at #Decipher2024 hosted by Algorand Foundation 🔥 Alessia Baumgartner, Business Partner of Ecosystems at DWF Labs, shared about what we look for in our portfolio and tips for pitches. Check out some key insights 👇 1️⃣ Pitch decks should be concise and compelling - communicating the ethos and important aspects of a project within the first two minutes. 2️⃣ Founders with strong technical skills and adaptability are integral to what we look for in projects, as they can adjust their strategies during market fluctuation to ensure success and longevity. 3️⃣ Projects that strongly fulfill key KPIs such as network activity and community engagement have a competitive edge. We're always looking for projects to support - feel free to reach out if you're working on a project, or have a project to share. Let's buidl! 🤝

DWF Labs Broadcast

@DWFLabs · Post #722 · 24.06.2024 г., 02:01

Catch Alessia Baumgartner, Business Partner of Ecosystems at DWF Labs, at #Decipher2024 hosted by Algorand Foundation. She'll be taking the stage at 4.15pm CET on June 26 to discuss what we look for in projects to support and partner with. Don't miss her panel.🔥

DWF Labs Broadcast

@DWFLabs · Post #725 · 26.06.2024 г., 13:57

Could you decipher where we are? 😁 Our Business Partner of Ecosystems, Alessia Baumgartner is taking the stage soon. If you're around and would like to hear more about what we look for in projects, come join us 🔥 #Decipher2024#Algorand#DWFLabs