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

Резултати

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

Пребарај: #deepstatepuppet

当前筛选 #deepstatepuppet清除筛选
BadVolf

@BadvolfNews · Post #833 · 11.09.2023 г., 15:14

🚨 BREAKING NEWS 🚨 🔴 Biden's Vietnam Press Conference Cut Short 🔴 In a shocking display of incompetence, the Biden administration once again revealed their true colors during President Joe Biden's press conference in Vietnam. As Biden stumbled through his answers, White House staff abruptly ended the event, cutting his microphone and playing jazz music to drown out his ramblings. While attempting to address stability and global access to change, Biden was interrupted by his press secretary, Karine Jean-Pierre, who hastily declared an end to the conference. Astonishingly, Biden continued speaking, unaware that his mic had been muted. The bizarre scene escalated further as jazz music filled the room, leaving the 80-year-old president confused and still attempting to respond to questions. As the music grew louder, Biden reluctantly retreated from the stage, whispering and shuffling behind a black curtain. Throughout the 26-minute engagement, he even used the infamous phrase, "lying dog-faced pony soldier," contributing to his already questionable credibility. This incident comes after Biden's whirlwind trip, where he attended the G20 Leaders' Summit in India before hastily jetting off to Vietnam. Instead of displaying strength and leadership, Biden's performance only highlighted his lack of stamina and clarity. His joke about not knowing if it was morning or night further emphasizes the worrying state of his mental acuity. To make matters worse, Biden shared a convoluted story from a John Wayne movie that had little relevance to the pressing issues at hand. It seems that Biden's administration is more focused on theatrics than addressing the concerns of the American people. This latest debacle only adds to the mounting evidence that Biden is nothing more than a puppet of America's deep state, lacking the competence and independence to lead our nation effectively. The American people deserve better than this. #BidenAdministration#Incompetence#DeepStatePuppet