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

Резултати

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

Пребарај: #buildonton

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

@Dwflabs · Post #173 · 22.01.2023 г., 09:54

​Now is the time and we are building!💎 The Open Network (TON) is growing strong developer communities in countries across the globe as our Hackathon provides developers with the necessary resources and guidance to build something incredible.🔥 Super excited to announce our INVITE-ONLY, on-site events. During our Hackathon this February, we will invite 6~10 teams that are looking to #buidl on #TON in a city that could be near you! Our goal is to empower builders and developers in local communities to create innovative applications, services and protocols with The Open Network. For the event, builders and developers will get a chance to meet and ask questions to a member of The TON Foundation and local TON developer specialist(s). The Q&A session will ensure that builders and developers are well equipped with knowledge about TON tools, incubation opportunities and building on TON mainnet. Join us on our mission to unite all blockchains and Web2 internet into one open network! If you want to attend and are excited to #BuildOnTon, please submit an introduction and your BUIDL idea! 🤓💻 To be eligible to WIN exclusive access, please abide by the following criteria: - Max. two people per team - Max. 150~250 words per pitch - Keep it concise and clear - Focus on value for the TON community - Submission period: Jan 18 (Wed) ~ Jan 25 (Wed) We are super keen to have developers from all over the world join us on our mission to build the next-gen internet. So, what are you waiting for? 💎SUBMITyour idea! The schedule of offline events during the TON global hackathon: Feb. 11-12: Taipei Seoul Bangkok Prague Feb. 18-19: Dubai Tel Aviv Tokyo Istanbul Singapore Feb. 25-26: Hong Kong Melbourne Saint Petersburg Hyderabad London

DWF Labs Broadcast

@Dwflabs · Post #165 · 20.01.2023 г., 00:00

​Now is the time and we are building!💎 The Open Network (TON) is growing strong developer communities in countries across the globe as our Hackathon provides developers with the necessary resources and guidance to build something incredible.🔥 Super excited to announce our INVITE-ONLY, on-site events. During our Hackathon this February, we will invite 6~10 teams that are looking to #buidl on #TON in a city that could be near you! Our goal is to empower builders and developers in local communities to create innovative applications, services and protocols with The Open Network. For the event, builders and developers will get a chance to meet and ask questions to a member of The TON Foundation and local TON developer specialist(s). The Q&A session will ensure that builders and developers are well equipped with knowledge about TON tools, incubation opportunities and building on TON mainnet. Join us on our mission to unite all blockchains and Web2 internet into one open network! If you want to attend and are excited to #BuildOnTon, please submit an introduction and your BUIDL idea! 🤓💻 To be eligible to WIN exclusive access, please abide by the following criteria: - Max. two people per team - Max. 150~250 words per pitch - Keep it concise and clear - Focus on value for the TON community - Submission period: Jan 18 (Wed) ~ Jan 25 (Wed) We are super keen to have developers from all over the world join us on our mission to build the next-gen internet. So, what are you waiting for? 💎SUBMITyour idea! The schedule of offline events during the TON global hackathon: Feb. 11-12: Taipei Seoul Bangkok Prague Feb. 18-19: Dubai Tel Aviv Tokyo Istanbul Singapore Feb. 25-26: Hong Kong Melbourne Saint Petersburg Hyderabad London