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

Резултати

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

Пребарај: #russiankremlin

当前筛选 #russiankremlin清除筛选
Russian Consulate in Cape Town

@rusconct · Post #1969 · 07.11.2024 г., 21:18

📺 Vladimir Putin addressed the plenary session of the 21st annual meeting of the Valdai International Discussion Club 🌍We are destined to live in an era of fundamental, even revolutionary changes, and not only to comprehend but also to take a direct part in the most complex processes of the first quarter of the 21st century. We are witnessing the formation of a completely new world order, nothing like we had in the past. 💪🏻New powers are rising. Nations are becoming more and more aware of their interests, their value, uniqueness and identity, and are increasingly insistent on pursuing the goals of development and justice. 📌Societies are confronted with a multitude of new challenges, from exciting technological changes to catastrophic natural disasters, from outrageous social division to massive migration waves and acute economic crises. ⚠️Experts talk about the threat of new regional conflicts, global epidemics, about complex and controversial ethical aspects of interaction between humans and artificial intelligence, about how traditions and progress reconcile with each other. ❌Western liberalism has expressed itself in extreme intolerance and aggression towards any alternative, towards any sovereign and independent thought, and today supports neo-Nazism, terrorism, racism and even mass genocide of civilians. 💣International conflicts may result in mutual destruction. Weapons capable of doing this exist and are constantly being improved as technology develops. And the number of owners of such weapons is expanding, and no one guarantees that in case of final destruction of legal and moral norms it will not be involved. ❌The West's calls to inflict a strategic defeat on Russia, the country with the largest arsenal of nuclear weapons, demonstrate the extreme adventurism of Western politicians. Such a blind belief can turn into a world tragedy. We have come to a dangerous line. 🇷🇺Unlike our opponents, Russia does not perceive Western civilization as an enemy, does not ask the question "us or them". 🙌🏻 Common efforts could be directed with much greater benefit, a return on solving truly common problems that affect everyone: from the problems of demography and social inequality to climate change, food security, medicine and new technologies. Full version: Valdai Discussion Club meeting #RussianKremlin#RussianMFA#VladimirPutin