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 слични објави

Пребарај: #spacefacts

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

@cosmomyst · Post #684 · 16.02.2026 г., 22:21

🪐 Near the center of the Small Magellanic Cloud, scientists have discovered a magnetar called SXP 1062 with a magnetic field so strong it can reshape atoms and trigger intense X-ray outbursts. Magnetars are a rare kind of neutron star—ultra-dense remnants of exploded massive stars—whose magnetic fields are trillions of times stronger than Earth's and can even change the properties of empty space around them, making these cosmic magnets among the universe's most extreme phenomena. ✨ #magnetars⚡#neutronstars⚡#spacefacts⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #592 · 31.12.2025 г., 12:21

🪐 The star VY Canis Majoris, located about 3,900 light-years from Earth, is one of the largest known stars in the universe—so huge that if placed at the center of our solar system, its surface would reach beyond the orbit of Jupiter. This red hypergiant loses mass at an incredible rate, creating vast clouds of dust and gas that make it appear as a dim, shifting patch in telescopes rather than a sharp point of light. ✨ #unusualstars⚡#hypergiants⚡#spacefacts⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #597 · 02.01.2026 г., 22:21

🪐 In the spiral galaxy Messier 81, astronomers use precise observations of variable stars called Cepheids to confirm that light travels at a constant speed—299,792 kilometers per second—across millions of light-years. By timing the changes in these stars' brightness, scientists can measure vast intergalactic distances, showing that the universal speed limit of light holds true even when crossing the immense gulf between galaxies. ✨ #speedoflight⚡#Messier81⚡#spacefacts⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40214 · 28.11.2025 г., 19:01

The Moon takes about 29.5 Earth days to go from one sunrise to the next. Daylight lasts around 14.75 days, and night also lasts about 14.75 days. This long day and night happen because the Moon spins slowly and moves around Earth at the same time. We always see the same side of the Moon because of this. 🌕🌑 [Read more] @googlefactss#Moon#LunarDay#SpaceFacts#Astronomy

Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40669 · 18.02.2026 г., 23:01

The 1967 Outer Space Treaty says no country can own the Moon, but rules about mining are still unclear. Working on the Moon could also be dangerous for human health. The Moon has water ice and rare metals that could help future space missions. But mining the Moon will damage its surface and spread potentially harmful dust. 🌕🚀 [Read more] #MoonMining#SpaceLaw#OuterSpaceTreaty#SpaceFacts@googlefactss

Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40889 · 01.04.2026 г., 22:28

Pluto is slightly bigger than Russia. Pluto has a surface area of about 17.65 million km². Russia has an area of about 17.1 million km². Some sources say otherwise because of old measurements or rounding. Those sources are wrong. 🪐🌍📏 [Source 1] [Source 2] @googlefactss #Pluto#Russia#SpaceFacts#Geography#NASA#Science#planet#dwarfplanet