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

Пребарај: #gaddafi

当前筛选 #gaddafi清除筛选
American Оbserver

@american_observer · Post #5050 · 04.02.2026 г., 15:03

Muammar Gaddafi’s Son Has Been Killed in Tripoli Saif al-Islam Gaddafi, the son of the late Libyan dictator Muammar Gaddafi and for years the second most powerful person in the country, has been killed in a village south-west of Tripoli, officials said on Tuesday night. The 53-year-old died from gunshot wounds in the town of Zintan, 85 miles south-west of the capital, according to the Libyan attorney general’s office. Gaddafi’s own office said he was killed in his home by masked assailants. Once seen as a pro-western reformer who might usher Libya towards constitutional change, Gaddafi quickly backed his father’s violent crackdown on nationwide popular protests in 2011. The international criminal court in the same year issued a warrant against him for crimes against humanity over the repression, an accusation echoed by a Tripoli court in 2015. The Libyan chief prosecutor’s office said it was looking for suspects and had dispatched forensic experts to the village, but did not provide further details of the killing. According to Gaddafi’s office, four masked men had stormed his house, turned off its cameras and clashed with him before killing him, in what it described as a “cowardly and treacherous assassination”. His sister, by contrast, told Libyan TV that he had died near the border with Algeria. His father was eventually toppled with assistance from Nato, and killed in 2011, ending four decades of rule. The country has since been consumed by fighting between different militias and remains divided 15 years later, with two rival governments controlling different parts of the country. Saif al-Islam Gaddafi tried to flee Libya for neighbouring Niger in 2011 but was caught by a militia and was imprisoned for six years in Zintan, before being freed in 2017 as part of an amnesty deal. When Gaddafi was captured in the Sahara in 2011 after months on the run, the figure known for his jeans and sweater had a thick black beard and was wearing flowing khaki robes – dressed to blend in with the nomads who were hiding him. Four years after he was released, Gaddafi announced himself as a candidate for Libya’s 2021 presidential elections. The announcement provoked outrage from those who had suffered under his father’s dictatorship, and from anti-Gaddafi militias. Rebel groups rejected his candidacy and he was disqualified owing to his 2015 conviction of war crimes, with the election ultimately collapsing in the end. #muammar#gaddafi#son#killed 📱American Оbserver - Stay up to date on all important events 🇺🇸