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

Резултати

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

Пребарај: #msm

当前筛选 #msm清除筛选
BadVolf

@BadvolfNews · Post #29 · 17.04.2022 г., 18:54

Is #Russia keeping food, water and medical supplies from the residents of #Mariupol? Or is this a Western Media #MSM lie being pushed by the American state department and #Zelensky? I'm American John Mark Dougan, and I take YOU on location in #MARIUPOL, show YOU what's happening, TALK to Residents there, and YOU can see first hand for yourself!

BadVolf

@BadvolfNews · Post #551 · 07.03.2023 г., 15:57

"Completely deranged behaviour" - US journalist Hinkle on Ukrainian kill list Mirotvorets (Peacemaker) is a website of the Ukrainian government, long suspected to be maintained by the CIA. It features a long list of people who dare stray off the fake mainstream narrative about the conflict. Meanwhile, the Zelensky regime is sold to us as the bastion of democracy and freedom, as he bans local opposition parties, media and even the Church. Given the list is maintained in Langley - is it not the CIA that's targetting American citizens for destruction? Zelensky is just window dressing. #Ukraine#CIA#Biden#Zelensky#MSM Share and subscribe to American Majority

BadVolf

@BadvolfNews · Post #27 · 17.04.2022 г., 18:40

Terrible stories of tragedy from #Mariupol. I'm American John Mark Dougan, and I bring YOU there on location and talk to the residents. A woman breaks down because her daughter was hit by a bomb😭 and she had to bury her in front of her apartment building "like a dog." WHO is responsible? Is it really #Russia that's shooting civilians? Or is it #Ukraine#snipers? Is it Russia blocking humanitarian corridors? Or is the #MSM lying as usual? Don't trust what you are being fed, it's all lies. Trust what the people THERE are telling you.

BadVolf

@BadvolfNews · Post #28 · 17.04.2022 г., 18:47

Is the Ukrainian #Nazi real? Would they actually come into an Intensive Care#HOSPITAL, steal all their medical supplies and canned food, and crush the rest of the food with their boots? I am AmericanJohn Mark Dougan, and I take YOUON LOCATION in #MARIUPOL so you can hear the stories for yourselves, from the mouths of nurses and residents that were bombed. Who is responsible? Is it #Russia? or is it actually #Ukraine? Do you REALLY think the #MSMwould tell such lies to the #American people and support Nazis? You decide!