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

Пребарај: #rogachev

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

@rusconct · Post #1765 · 01.08.2024 г., 16:56

LESSONS OF HISTORY REPEATED ✍️Article by Ambassador of Russia to South Africa Ilya Rogachev (31 July 2024) READ IN FULL Key points: 🔹 Obsessed with the idea to inflict a military defeat upon Russia and split it into several smaller states with limited sovereignty, the collective West is heading towards a war against Russia, and decisions of the latest NATO summit in Washington D.C. corroborate that. "Europe is preparing for war. The pro-war train has no brakes, and the driver has gone mad” - Hungary’s Premier V.Orban". 🔹There is a very common opinion in Russia that approximately once in a centenary, the West braces up and comes to the Russian soil with a sword, where it gets beaten up and retires with its nose bloodied to remain calm for another 100 years. 🔹The Time of Troubles in Russia (XVII century) was accompanied by foreign military interventions (Poland, Sweden) which endangered the very existence of Russia as a sovereign state. But in 1612 people’s militia ousted the invaders. 🔹The XVIII century saw yet another major clash with Europeans known as the Great Northern War. During Swedish King Charles XII’s Russian campaign, in 1709, the army of invaders was completely decimated by Russian troops under the command of Peter the Great. 🔹In about 100 years, a new attempt to clamp Russia was made as Napoleon Bonaparte of France in 1812 led his ‘Grand Army’ into the ill-fated invasion. 600,000 soldiers of his army came to Russia in June 1812, and in only 6 months their remnants were chased away by Field Marshal Kutuzov’s troops. In 1814, the Russian army entered Paris. 🔹The XX century saw another large-scale invasion of Russia from the West. Our country survived World War I accompanied by inner political turmoil with three revolutions, the Civil War and foreign military interventions involving UK, France, USA etc. ☝️ Only two decades later Nazi Germany attacked the USSR. Hitler intended to conquer the USSR by the end of 1941, but it didn’t turn out the way he expected. On 30 April 1945, as the Red Army was storming Berlin, he committed suicide in the basement of the Reich Chancellery. 👉 Russian historian V.Klyuchevsky once wrote that history does not teach any lessons but punishes one for not learning them. The West should stop rewriting history and start learning it, in order to prevent history from repeating itself every 100 years. #alternativeviewpoint#embassyofrussia#rogachev#russia#southafrica