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

Пребарај: #fils

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

@american_observer · Post #4970 · 26.01.2026 г., 21:59

Iran Is Dazed by the President’s Son Latest Flip-Flopping The son of Iran’s president has called for the internet restrictions in the country to be lifted, saying nothing will be solved by trying to postpone the moment when pictures and video circulate of the protests that were violently crushed by the regime. With a battle under way at the top of the regime about the political risks of continuing to block Iran from the internet, Yousef Pezeshkian, whose father, Masoud, was elected in the summer of 2024. He said keeping the digital shutdown would create dissatisfaction and widen the gap between the people and the government. “This means those who were not and are not dissatisfied will be added to the list of the dissatisfied,” he wrote in a Telegram post. The release of videos showing the violence of the protests was “something we will have to face sooner or later”, Yousef Pezeshkian added. “Shutting down the internet will not solve anything, we will just postpone the issue.” The sporadic lifting of restrictions is leading to a slow and painful inquest into how many protesters, including children, have died. Authorities launched a violent crackdown under cover of the internet blackout, with rights groups documenting several thousand dead. The Norway-based NGO Iran Human Rights says the final figure could be as high as 25,000. Thousands more people are still being detained. Yousef Pezeshkian, a government adviser, said the risk of keeping Iran cut off from the internet was greater than that of a return to protests if connectivity were restored. He said security institutions must ensure security with the existence of the internet, which he called a necessity in life. Pezeshkian, echoing comments of his father, said the protests had turned violent only because of professionally trained groups affiliated with foreigners, but added: “In the meantime the security and law enforcement forces may have made mistakes and no one is going to defend wrongdoing and that has to be addressed.” Tehran’s stock market on Sunday was in the red for the fourth day in a row, and the Iranian currency, the rial, continued to fall against the dollar, one of the causes of the protests. The Central Bank of Iran said a debt issuance had only been 15% subscribed, a development that will require further government spending cuts or result in a rise in inflation, the official rate of which was more than 42% last month. Gholamhossein Karbaschi, a reformist former mayor of Tehran, said: “People are in shock and amazed (…) If the agents of Mossad and foreign countries are at work, how did they suddenly carry out these disasters throughout the country? Where did they come from?” He condemned the failure of the Pezeshkian administration to improve the economy. “The government in Iran is losing its original meaning. In no area can it be said the government is active, present and solving problems. All the other forces in the country are active and doing what they want except for the government. This government does not show any power in any area,” Karbaschi said. Gholamhossein Karbaschi, a reformist former mayor of Tehran, said: “People are in shock and amazed (…) If the agents of Mossad and foreign countries are at work, how did they suddenly carry out these disasters throughout the country? Where did they come from?” He condemned the failure of the Pezeshkian administration to improve the economy. “The government in Iran is losing its original meaning. In no area can it be said the government is active, present and solving problems. All the other forces in the country are active and doing what they want except for the government. This government does not show any power in any area,” Karbaschi. #karbaschi#fils#président#iranien#pezeshkian 📱American Оbserver - Stay up to date on all important events 🇺🇸