TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #400 · 8 дек.

Три способа выполнить множество задач с asyncio Функция для примера: async def do_it(n): await asyncio.sleep(random.uniform(0.5, 1)) return n 1. Последовательный вызов async def main(): for i in range(100): result = await do_it(i) Такой вызов имеет смысл только тогда, когда результат одной задачи требуется для вызова следующей. Если они независимы, то это антипаттерн, так как аналогичен простому синхронному вызову по очереди. 2. Упорядоченный результат async def main(): tasks = [do_it(i) for i in range(100)] results = await asyncio.gather(*tasks) Выполняет корутины конкурентно и возвращает результат в виде списка. Полезен когда требуется получить результаты в том же порядке в котором задачи отправлены. 3. Результат по мере готовности tasks = [asyncio.create_task(do_it(i)) for i in range(100)] for cor in asyncio.as_completed(tasks): result = await cor Так же выполняет корутины конкурентно, но не гарантирует порядок. Результат возвращается по мере готовности, каждый отдельно. Полезен когда нужно обработать любой ответ как можно скорее. #async

Hashtags

Резултати

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

Пребарај: #shapes

当前筛选 #shapes清除筛选
Universe Mysteries 🪐

@cosmomyst · Post #408 · 11.10.2025 г., 18:21

🪐 The galaxy NGC 2683, sometimes called the "UFO Galaxy," has a dramatic, warped disk that gives it a shape unlike typical spirals. Located about 35 million light-years away in the constellation Lynx, its tilted, edge-on view and slightly twisted arms create the illusion of a flying saucer drifting through space, making it one of the most striking examples of galaxies with unusual forms. ✨ #galaxies⚡#shapes⚡#astronomy⚡#nasa⚡#galaxy⚡#stars⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #360 · 01.10.2025 г., 22:21

🪐 The galaxy NGC 4710, located about 60 million light-years away in the constellation Coma Berenices, is famous for its strikingly thin, edge-on profile that makes it look more like a cosmic needle than a typical spiral or elliptical galaxy. This unusual "boxy/peanut-shaped" bulge is thought to form when a flat disk of stars buckles and warps over time, creating a rare structure that reveals the hidden dynamics shaping galactic evolution. ✨ #galaxies⚡#shapes⚡#astronomy⚡#nasa⚡#galaxy⚡#stars⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #275 · 15.09.2025 г., 13:11

🪐 The galaxy UGC 2885, sometimes called "Rubin's Galaxy," sports an unusual appearance with its outsized, sprawling disk—nearly 2.5 times wider than the Milky Way. Its vast, faint spiral arms stretch for over half a million light-years, making it not only one of the largest known spiral galaxies but also a cosmic oddity that challenges ideas about how galaxies can grow and maintain such immense, delicate structures. ✨ #galaxies⚡#mysteries⚡#shapes⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #342 · 28.09.2025 г., 15:21

🪐 The galaxy known as the Cartwheel Galaxy, located about 500 million light-years away in the constellation Sculptor, displays a striking ring-and-spoke structure unlike ordinary spirals or ovals. Its unusual shape was created when a smaller galaxy crashed through its center, sending waves of star formation racing outward and leaving behind bright, circular rings and faint, radial arms—an extraordinary cosmic ripple frozen in space. ✨ #galaxies⚡#shapes⚡#collisions⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #256 · 11.09.2025 г., 13:11

🪐 The galaxy NGC 1427A, found in the Fornax Cluster, looks nothing like a neat spiral or smooth oval—it's shaped like a cosmic boomerang. This odd appearance is the result of NGC 1427A plunging through the dense cluster, which causes its stars and gas to be pulled and stretched, creating a lopsided, arrowhead-like structure as it slowly gets torn apart by gravity. ✨ #galaxies⚡#shapes⚡#mystery⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #667 · 08.02.2026 г., 12:21

🪐 Not all galaxies fit the classic spiral or oval shapes—take the galaxy LEDA 074886, located about 70 million light-years away, which stunned astronomers with its rare rectangular structure. Unlike the familiar swirls or smooth ellipses, LEDA 074886’s boxy outline is thought to be the result of a merger between two smaller galaxies, sculpting a cosmic shape almost never seen in the universe. ✨ #galaxies⚡#mergers⚡#shapes⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #568 · 19.12.2025 г., 22:21

🪐 The galaxy ESO 137-001, streaking through the Norma Cluster about 220 million light-years away, has a spectacular "tadpole" shape with long blue tails streaming out behind it. These tails are made of hot, stripped gas and young stars that formed as the galaxy plunges through the dense cluster, showing how powerful cosmic forces can stretch and reshape galaxies far beyond the classic spirals and ovals. ✨ #galaxies⚡#shapes⚡#cluster⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #323 · 24.09.2025 г., 18:21

🪐 The galaxy known as the Tadpole Galaxy (UGC 10214), about 420 million light-years away in the constellation Draco, is famous for its long, sweeping tail that stretches over 280,000 light-years. This striking "tadpole" shape was created when another galaxy passed close by, pulling out a stream of stars, gas, and dust—a cosmic encounter that gave the Tadpole Galaxy its unforgettable, bizarre silhouette among the galaxies. ✨ #galaxies⚡#shapes⚡#collision⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

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