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

Резултати

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

Пребарај: #uselections

当前筛选 #uselections清除筛选
Hong Kong Democracy Movement

@hkdmovement · Post #7914 · 29.11.2024 г., 11:06

美國國會屬下的「美中經濟暨安全檢討委員會」(USCC)於周二(19日)向國會提交2024年報告,涵蓋中美經貿關係、台灣及香港等議題。報告指出,《基本法》23條的立法進一步為港府提供打壓異見的法律工具,香港的法治正受到威脅,法院隨23條的實施被武器化,甚至成為協助俄羅斯等國逃避制裁的中轉站。 #23條立法#USCC#中美角力#美國大選 On Tuesday (19th), the U.S.-China Economic and Security Review Commission (USCC) submitted its 2024 report to Congress, addressing U.S.-China economic relations, Taiwan, and Hong Kong. The report mentions that the implementation of Article 23 of the Basic Law provides the Hong Kong government with legal tools to suppress dissent, threatening the rule of law. It also asserts that Hong Kong has become a transit point for aiding countries like Russia in evading sanctions. #Article23#USCC#USChinaTensions#USElections

Freedom Flotilla Coalition

@FFC_official_channel · Post #224 · 31.08.2024 г., 23:58

This election is not just about what happens within U.S. borders—it’s about the lives of millions around the globe. When you vote, you’re making a statement about where America stands on human rights. History has shown us that you cannot negotiate with leaders who offer nothing but empty promises. Kamala Harris herself said, "Never let anyone tell you who you are. Show them who you are." Well, the Biden-Harris administration has shown us who they are. For ten months, they’ve done nothing but fund the annihilation of Gaza and the West Bank. We cannot accept these empty words when hundreds of thousands of lives are at risk. It’s time to demand real action, not just lip service. Sign the petition to enact an arms embargo on Israel, spread the truth in your community, and mobilize for the sake of humanity. Take Action Now: 🖋️ Sign the Petition: Not Another Bomb! Demand an arms embargo to stop the genocide (in our stories) 📰 Stay Informed: Join the Uncommitted Movement and tell Kamala Harris to stand on the right side of history. Sign up for updates. 🗣️ Spread the Word: Distribute flyers, educate your community, and support candidates who truly stand for human rights. #KillerKamala#BidenHarris#USElections#DNC#ActForGaza#EndTheOccupation#NoMoreEmptyPromises#FreeGaza#FreePalestine#PermanentCeasefire#UNSecurityCouncil#GlobalImpact#FFC#FreedomFlotilla