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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #421 · 23 мар.

Мы используем Makefile думая, что нет альтернатив, что это стандарт и всё такое. Но make это не запускалка команд, а система сборки. Мы фактически используем его не по назначению. И на самом деле альтернатива есть! Некоторое время назад я открыл для себя прекрасный инструмент - just. Он решает все проблемы make. just - это не система сборки как make, это именно исполнитель команд! Больше никаких Phony Targets и табуляций, привет нормальный синтаксис и передача аргументов!!! 😎 ⭐️Что умеет just: ✅ Автодокументирование команд Не нужно делать отдельную команду с докой, просто добавь комментарий # команда сборки build: ... $ just --list Available recipes: build # команда сборки Команда с именем default запускается по умолчанию если не указано другое, так что я обычно делаю так: default: just --list Теперь просто выполняем just и получаем доку из текущего файла. ✅ Удобная работа с переменными окружения # загрузить из .env set dotenv-load # глобальная переменная export PYTHONPATH := "./src" # переменная для команды test $TESTUNG="true": pytest ✅ Передача аргументов build target: @echo 'Build {{target}}...' команда запуска $ just build dev # Build dev... ✅ Выбор интерпретатора прямо в команде Пример с инлайн-скриптом на python: system: #!/usr/bin/env python3 import platform print(platform.system()) Эта же функция позволит выполнить скрипт как одну команду вместо перезапуска шела для каждой строки foo: #!/usr/bin/env sh for file in ls .; do echo $file done ✅ Выполнение команды в определенной директории. Можно указать как релятивный путь так и абсолютный [working-directory: 'backend'] build: docker compose build Также можно задать рабочую директорию глобально Там еще много интересного: - поддержка функций - автокомплиты и интеграции - экспрешены - алиасы команд - группировка команд - альтернативы команды под разные ОС - импорт других just-файлов - цветной вывод - ... и другие штуковины! Так что вперёд - ➡️ читать доку! Репозиторий: ➡️https://github.com/casey/just Статья: ➡️https://www.chicks.net/reference/file_formats/just/ ЗЫ. Кажется, на Makefile я уже не вернусь) #tools

Hashtags

Резултати

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

Пребарај: #distances

当前筛选 #distances清除筛选
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 #709 · 12.03.2026 г., 22:21

🪐 Astronomers have confirmed that even the most distant light we see from galaxies like GN-z11—whose glow began its journey over 13.4 billion years ago—travels at exactly the same constant speed of 299,792 kilometers per second as light here on Earth. This unchanging speed of light lets scientists measure cosmic time and distance across the universe, meaning every photon from GN-z11 carries a record of its unimaginably long trip through space and the early history of everything we see. ✨ #speedoflight⚡#galaxies⚡#distances⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #692 · 22.02.2026 г., 12:21

🪐 The speed of light acts as the ultimate speed limit in our universe—no information or object can travel faster than 299,792 kilometers per second, not even the most powerful pulses from the Crab Pulsar in the heart of the Crab Nebula. This constant speed is what lets astronomers measure vast cosmic distances, and it’s the reason we see stars, galaxies, and even supernova explosions like SN 1987A as they were in the past, not as they are right now. ✨ #speedoflight⚡#spacetime⚡#distances⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #225 · 05.09.2025 г., 03:11

🪐 In the vacuum of space, the speed of light is an incredible 299,792 kilometers per second—so fast that a beam from the Sun takes just over eight minutes to reach Earth, even though the distance is about 150 million kilometers. When astronomers observe events like a supernova in the galaxy NGC 2525, they're actually seeing what happened years, decades, or even millions of years ago, because the light takes that long to cross vast cosmic distances. ✨ #speedoflight⚡#space⚡#distances⚡#supernova⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #359 · 01.10.2025 г., 20:21

🪐 The galaxy MACS0647-JD is among the most distant objects ever observed by the Hubble Space Telescope—its light started traveling toward us about 13.3 billion years ago, when the universe was less than 4% of its current age. Seeing MACS0647-JD allows scientists to peer back to the era when the very first galaxies began to form, offering a glimpse into the universe's ancient youth. ✨ #galaxies⚡#distances⚡#cosmicmysteries⚡#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 ​

Universe Mysteries 🪐

@cosmomyst · Post #226 · 05.09.2025 г., 13:11

🪐 The planet Mercury orbits just 58 million kilometers from the Sun, but even this smallest orbit is immense—large enough to fit nearly 150 Earth-Moon distances end to end. In contrast, the distance from the Sun to Neptune, the most distant major planet, is about 4.5 billion kilometers, meaning a signal traveling at the speed of light takes over four hours to cross our solar system from center to edge. ✨ #distances⚡#solar⚡#Mercury⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​