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

Резултати

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

Пребарај: #israeliarmy

当前筛选 #israeliarmy清除筛选
Marwa Osman/MidEaStream

@Marwa_OsmanLB · Post #3922 · 23.01.2025 г., 18:07

Herzi Halevi's resignation as Chief of Staff of the Israeli Army triggered a wave of resignations within the military leadership, following the failures of October 7, 2023, during Operation "Noah's Flood" and the subsequent war and its aftermath. #HerziHalevi#IsraeliArmy#Gaza#Israel

Marwa Osman/MidEaStream

@Marwa_OsmanLB · Post #3860 · 10.01.2025 г., 14:37

Israeli activists led by the radical bloc demonstrated in front of the Ministry of Defense building in the heart of Tel Aviv. While their soldiers entered the building, they denounced the ongoing Israeli war of extermination on the Gaza Strip. The protesters told the soldiers coming into work that whether they are pulling the trigger, pressing buttons or making coffee at an office, as long as they are wearing the uniform and serving the Israeli state, they are an accomplice in the mass murder, the torture, the suffering, and destruction of the lives of over two million people in Gaza. #Israel#TelAviv#IsraeliArmy#GazaGenocide#Palestine

Marwa Osman/MidEaStream

@Marwa_OsmanLB · Post #3681 · 21.11.2024 г., 11:06

Although known for operating deep in its enemy’s territory while focusing on attacking and destroying specific targets and gathering accurate intelligence, the Maglan commando unit of the Israeli Army was ambushed by Hezbollah in South Lebanon. The trap was part of the underway confrontations while Israel is attempting to set a foot on Lebanon’s soil. #SouthLebanon#Lebanon#Israel#IsraeliArmy#Maglan

Marwa Osman/MidEaStream

@Marwa_OsmanLB · Post #3129 · 25.08.2024 г., 21:05

#Hezbollah Chief Sayyed Hassan #Nasrallah refuted Israeli claims about a preemptive strike ahead of “Operation Al-Arbaeen” in the #Israeli depth. He also set a condition of resuming the retaliation, which has to do with the enemy’s admitting of losses inflicted in first phase. #Lebanon#SouthLebanon#IsraeliArmy

Marwa Osman/MidEaStream

@Marwa_OsmanLB · Post #3122 · 25.08.2024 г., 13:46

Lebanese #Hezbollah military media releases video showing bases targeted in #Israel part of the First Phase of its response to the assassination of senior commander Fuad Shukr and killing of several civilians in #Beirut's southern suburbs on July 31. #Lebanon#SouthLebanon#Nasrallah#Gaza#Palestine#IsraeliArmy

Marwa Osman/MidEaStream

@Marwa_OsmanLB · Post #3130 · 26.08.2024 г., 06:33

#Hezbollah Chief Sayyed Hassan #Nasrallah announced targets behind “Operation Al-Arbaeen” on August 25, 2024 in the #Israeli depth, and unveiled important details about the qualitative operation that struck the #Mossad HQ in #TelAviv suburb. #Lebanon#SouthLebanon#IsraeliArmy

Marwa Osman/MidEaStream

@Marwa_OsmanLB · Post #3128 · 25.08.2024 г., 21:05

#Hezbollah Chief Sayyed Hassan #Nasrallah announced targets behind “Operation Al-Arbaeen” on August 25, 2024 in the #Israeli depth, and unveiled important details about the qualitative operation that struck the #Mossad HQ in #TelAviv suburb. #Lebanon#SouthLebanon#IsraeliArmy