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

Пребарај: #democratic

当前筛选 #democratic清除筛选
Embassy of Russia in Singapore

@rusembsg · Post #3846 · 10.02.2025 г., 03:34

On the occasion of the Russian #DiplomatsDay (February 10) we would like to tell you about the Contribution of Soviet Diplomacy to the Establishment of the #UN Key points: - At the #Moscow Conference of the Ministers of Foreign Affairs of the USSR, USA, Great Britain and China in October 1943, the #Soviet delegation put forward a proposal to establish a universal international organization. - The first draft of the #UNCharter was developed at a conference convened at the suggestion of the #USSR in Dumbarton Oaks (#USA) from September 21 to October 7, 1944. At this forum, representatives of the USSR, the USA, #GreatBritain and #China agreed on the goals, structure and functions of the world organization. The Soviet delegation consistently and resolutely advocated that the activities of this organization be based on democratic principles. - At the #Crimea (Yalta) Conference of the leaders of the great powers, which took place from 4 to 11 February 1945, participants agreed upon the issues of the initial members of the organization and the voting procedure in the Security Council, as well as on issues related to the maintenance of international peace and security, the development of economic relations, cooperation in the social, technical and other areas of interstate relations. - On April 25 – June 26, 1945, the founding conference of the United Nations was held in #SanFrancisco. The Soviet delegation sought to ensure that the #democratic principles of the structure and activities of the UN were enshrined in the Charter. - Based on Soviet amendments, important new provisions were included in the chapter on the purposes and principles of the UN, stating that peaceful settlement of international disputes should be carried out "in accordance with the principles of justice and international law"; that friendly relations between nations should develop "on the basis of respect for the principle of equal rights and self-determination of peoples"; that international cooperation in resolving international problems of an economic, social, cultural and humanitarian nature should be carried out "and in promoting and encouraging respect for human rights and for fundamental freedoms for all without distinction as to race, sex, language or religion...". - On June 26, 1945, the UN Charter was signed by A.A. Gromyko, then the Soviet Ambassador to the USA, thanks to whose personal participation and persistence the final documents related to the creation of the UN recorded positions largely corresponding to the interests of the Soviet Union. Full article: https://telegra.ph/te4st-02-10