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

Резултати

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

Пребарај: #quasars

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

@interesting_planet_facts · Post #1021 · 10.11.2025 г., 22:11

🌎 At the edge of the observable universe, astronomers find “quasars”—super-bright objects powered by black holes. Quasars emit energy equal to trillions of suns and help reveal the early universe’s structure. ✨ #space⚡#quasars⚡#astronomy 👉subscribe Interesting Planet 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #252 · 10.09.2025 г., 16:11

🪐 The quasar J0313–1806 is one of the most distant known objects in the universe, shining from over 13 billion light-years away. Quasars are the bright centers of young galaxies powered by supermassive black holes, and J0313–1806’s powerful light reveals it existed just 670 million years after the Big Bang, allowing astronomers to study the early universe’s first giant black holes and galaxies. ✨ #space⚡#distances⚡#quasars⚡#universe⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#cosmos 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #593 · 31.12.2025 г., 22:21

🪐 Deep in the heart of galaxy 4C +37.11, astronomers have found a pair of supermassive black holes separated by just 24 light-years, each powering its own quasar—an extremely bright object fueled by matter falling into a black hole. Quasars outshine entire galaxies, and the unique twin system in 4C +37.11 gives scientists a rare look at how two powerful quasars can exist side by side, lighting up their galaxy with intense energy streams. ✨ #quasars⚡#pulsars⚡#galaxies⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #754 · 28.04.2026 г., 22:21

🪐 The quasar 3C 273, located in the constellation Virgo about 2.4 billion light-years from Earth, was the first quasar ever identified and remains one of the brightest in the sky. A quasar is a super-energetic beacon powered by a supermassive black hole devouring matter, shining so brightly that it can outshine entire galaxies, and 3C 273 helped scientists understand just how extreme and distant these cosmic engines can be. ✨ #quasars⚡#astronomy⚡#virgo⚡#nasa⚡#galaxy⚡#stars⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #639 · 25.01.2026 г., 12:21

🪐 The quasar TON 618, found more than 10 billion light-years away in the constellation Canes Venatici, hosts one of the largest known black holes with a mass over 60 billion times that of our Sun. Quasars are incredibly bright objects powered by material falling into supermassive black holes, while pulsars—like the famous Vela Pulsar in our galaxy—are ultra-dense, spinning neutron stars that send out regular beams of radio waves, acting like cosmic lighthouses for astronomers. ✨ #quasars⚡#pulsars⚡#blackholes⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #414 · 12.10.2025 г., 20:21

🪐 In the heart of the galaxy IC 310, astronomers have observed a quasar that suddenly switches between a quiet state and violent outbursts, blasting powerful jets of particles close to the speed of light. Quasars are some of the brightest objects in the universe, powered by supermassive black holes devouring matter, and IC 310’s unpredictable behavior shows how even these cosmic engines can rapidly transform, lighting up entire galaxies in moments. ✨ #quasars⚡#jets⚡#galaxies⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #370 · 03.10.2025 г., 22:21

🪐 The quasar PKS 0637-752, located about 7.8 billion light-years from Earth, shoots out a jet of particles more than 2 million light-years long—much farther than the diameter of our Milky Way. Quasars are the brilliant, active centers of young galaxies powered by material falling into supermassive black holes, and these enormous jets show how energy can be launched across intergalactic space by the universe’s most powerful engines. ✨ #quasars⚡#jets⚡#galaxies⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #263 · 13.09.2025 г., 00:11

🪐 In 1967, astronomers discovered the first pulsar, now known as PSR B1919+21, a rapidly spinning neutron star that sends out regular radio pulses like a cosmic lighthouse. Unlike pulsars, quasars such as 3C 273 are the blazing hearts of distant galaxies, powered by supermassive black holes devouring matter and shining brighter than whole galaxies—making both objects among the most extreme and mysterious beacons in the universe. ✨ #pulsars⚡#quasars⚡#neutronstars⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #199 · 27.08.2025 г., 20:11

🪐 Deep inside the galaxy 3C 273, astronomers have identified a quasar—a super-bright region powered by a supermassive black hole eating up material, causing it to shine with light brighter than entire galaxies. Meanwhile, the Crab Pulsar in the Crab Nebula is a rapidly spinning neutron star left over from a massive star’s explosion, sending out beams of radio waves and light as it spins—a cosmic lighthouse flashing 30 times a second. ✨ #quasars⚡#pulsars⚡#supernova⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #351 · 30.09.2025 г., 12:21

🪐 Deep in the constellation Virgo, the double pulsar system PSR J0737−3039A/B is made of two neutron stars—tiny, ultra-dense remnants of massive stars—that both emit regular radio pulses as they orbit each other every 2.4 hours. This unique cosmic pair lets scientists observe the effects of extreme gravity, as one pulsar passes through the other’s powerful wind and their orbit slowly shrinks—confirming predictions from Einstein's theory of general relativity in an environment unlike anywhere else in the universe. ✨ #quasars⚡#pulsars⚡#gravity⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #550 · 10.12.2025 г., 22:21

🪐 The quasar 3C 454.3 in the constellation Pegasus is a cosmic powerhouse, shining around a trillion times brighter than our Sun due to a supermassive black hole feasting on matter at its core. Meanwhile, the pulsar PSR B1937+21, located about 9,000 light-years away, spins nearly 642 times per second—so fast that it's called a "millisecond pulsar," acting like a fantastically precise cosmic clock as it beams radio waves across the galaxy. ✨ #quasars⚡#pulsars⚡#cosmiclighthouses⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #716 · 19.03.2026 г., 22:21

🪐 RX J0911+0551 is one of the most distant gravitationally lensed quasars ever found, with its light traveling about 11 billion years to reach us. This quasar—an extremely bright object powered by a supermassive black hole—appears as several split images in the sky because a massive galaxy between us and RX J0911+0551 bends and magnifies its light, acting as a "gravitational lens" and allowing scientists to glimpse extreme distances near the edge of the visible universe. ✨ #quasars⚡#spacelensing⚡#distances⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​