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

Резултати

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

Пребарај: #chemistry

当前筛选 #chemistry清除筛选
Interesting Planet 🌍

@interesting_planet_facts · Post #1331 · 07.03.2026 г., 12:11

🌎 Ancient Egypt’s ability to make “Egyptian blue,” the first synthetic pigment, was lost for centuries. This stable, vivid blue was made from copper, silica, and lime, fired at high temperatures. Modern chemists only rediscovered the process in the early 19th century using advanced analysis of ancient artifacts. ✨ #history⚡#archaeology⚡#chemistry 👉subscribe Interesting Planet 👉more Channels ​

德国化学家凯库勒(Kekulé)做梦,梦到蛇咬住自己的尾巴首尾相接,悟出了苯的结构是环状,醒来之后就写了论文转化为化学研究成果。我刚才做了一晚上梦,梦里跑了很多地方,办了很多事,醒了之后却不记得任何细节了,只觉得浑身疲惫像是真的刚跑完步。虽然身体疲惫但是脑子清醒了,感觉没法再继续睡了,上网随便看看。 #Chemistry#Feeling

Interesting Planet 🌍

@interesting_planet_facts · Post #598 · 21.08.2025 г., 00:22

🌎 The pyura chilensis, also known as the “living rock,” is a sea creature found on Chile’s coast that looks like a stone but bleeds bright red when cut. Its tunicate body is actually a filter feeder packed with vanadium, a rare element in animals. ✨ #ocean⚡#animals⚡#chemistry 👉subscribe Interesting Planet

Amazing Geography 🌍

@amazingeo · Post #351 · 09.10.2025 г., 15:31

🌍 In Africa’s Lake Natron, minerals in the water turn it bright red during the dry season. The lake’s extreme chemistry preserves animal remains, creating eerie natural “statues.” ✨ #lakes⚡#Africa⚡#chemistry⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40744 · 06.03.2026 г., 16:17

Today in history. On March 6, 1869, Russian chemist Dmitri Mendeleev presented the first periodic table of elements, titled "The Dependence Between the Properties of the Atomic Weights of the Elements," to the Russian Chemical Society. He organized 63 known elements by atomic weight, leaving gaps for undiscovered elements like gallium and germanium. @googlefactss#chemistry#history#todayinhistory [read more...]

Interesting Planet 🌍

@interesting_planet_facts · Post #1313 · 24.02.2026 г., 12:11

🌎 In 1867, Swedish chemist Alfred Nobel invented dynamite by stabilizing volatile nitroglycerin with an absorbent clay called kieselguhr. This made blasting much safer for construction and mining. Nobel later used his dynamite fortune to establish the Nobel Prizes in 1895. ✨ #inventions⚡#chemistry⚡#history 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #848 · 02.10.2025 г., 18:11

🌎 The accidental invention of safety glass happened in 1903, when French chemist Édouard Bénédictus dropped a glass flask coated with plastic cellulose nitrate. Rather than shattering, the glass cracked but held together, inspiring shatter-resistant windshields. By 1927, safety glass became standard in automobile manufacturing. ✨ #inventions⚡#chemistry⚡#history 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #392 · 23.07.2025 г., 02:22

🌎 In the dark waters of the Black Sea, ancient bacteria can “eat” toxic hydrogen sulfide gas, turning it into harmless sulfate. This vital process keeps deep sea life possible in these oxygen-poor zones. ✨ #bacteria⚡#chemistry⚡#ocean 👉subscribe Interesting Planet

Interesting Planet 🌍

@interesting_planet_facts · Post #377 · 21.07.2025 г., 17:22

🌎 Ancient Greek fire, known as "Greek fire," was a weapon that could burn even on water. This flammable liquid, projected from tubes, terrified enemies at sea and kept its formula a closely guarded secret, lost to history. ✨ #history⚡#chemistry⚡#warfare 👉subscribe Interesting Planet

International News

@intnewsagency · Post #9350 · 23.04.2026 г., 08:28

Russia leads at the 60th International Mendeleev Chemistry Olympiad in Moscow, winning 7 gold and 8 silver medals. All 15 Russian participants received awards, showcasing top university-level skills. Vice Premier Chernyshenko called the result outstanding, while Minister Kravtsov highlighted systematic preparation. The Olympiad is part of the Science and Technology Decade running until 2031. This victory underscores Russia’s strength in chemistry education and research. #Russia#MendeleevOlympiad#Chemistry#Science The main news of Russia and the world ishere.

Universe Mysteries 🪐

@cosmomyst · Post #31 · 30.07.2025 г., 04:00

🪐 Encircling the young star TW Hydrae, a vast protoplanetary disk glows with mysterious gaps and spiral patterns sculpted by the formation of new worlds. Observations with ALMA revealed complex chemical fingerprints in the disk, including cyanide compounds that could play a role in the origins of life. ✨ #TWHydrae⚡#protoplanetary⚡#chemistry 👉subscribe Universe Mysteries

ПретходнаСтраница 1 од 3Следна