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

Резултати

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

Пребарај: #msm

当前筛选 #msm清除筛选
BadVolf

@BadvolfNews · Post #29 · 17.04.2022 г., 18:54

Is #Russia keeping food, water and medical supplies from the residents of #Mariupol? Or is this a Western Media #MSM lie being pushed by the American state department and #Zelensky? I'm American John Mark Dougan, and I take YOU on location in #MARIUPOL, show YOU what's happening, TALK to Residents there, and YOU can see first hand for yourself!

BadVolf

@BadvolfNews · Post #551 · 07.03.2023 г., 15:57

"Completely deranged behaviour" - US journalist Hinkle on Ukrainian kill list Mirotvorets (Peacemaker) is a website of the Ukrainian government, long suspected to be maintained by the CIA. It features a long list of people who dare stray off the fake mainstream narrative about the conflict. Meanwhile, the Zelensky regime is sold to us as the bastion of democracy and freedom, as he bans local opposition parties, media and even the Church. Given the list is maintained in Langley - is it not the CIA that's targetting American citizens for destruction? Zelensky is just window dressing. #Ukraine#CIA#Biden#Zelensky#MSM Share and subscribe to American Majority

BadVolf

@BadvolfNews · Post #27 · 17.04.2022 г., 18:40

Terrible stories of tragedy from #Mariupol. I'm American John Mark Dougan, and I bring YOU there on location and talk to the residents. A woman breaks down because her daughter was hit by a bomb😭 and she had to bury her in front of her apartment building "like a dog." WHO is responsible? Is it really #Russia that's shooting civilians? Or is it #Ukraine#snipers? Is it Russia blocking humanitarian corridors? Or is the #MSM lying as usual? Don't trust what you are being fed, it's all lies. Trust what the people THERE are telling you.

BadVolf

@BadvolfNews · Post #28 · 17.04.2022 г., 18:47

Is the Ukrainian #Nazi real? Would they actually come into an Intensive Care#HOSPITAL, steal all their medical supplies and canned food, and crush the rest of the food with their boots? I am AmericanJohn Mark Dougan, and I take YOUON LOCATION in #MARIUPOL so you can hear the stories for yourselves, from the mouths of nurses and residents that were bombed. Who is responsible? Is it #Russia? or is it actually #Ukraine? Do you REALLY think the #MSMwould tell such lies to the #American people and support Nazis? You decide!