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

Пребарај: #stabbing

当前筛选 #stabbing清除筛选
MessageInABottle

@mib_messageinabottle · Post #7021 · 03.06.2024 г., 07:40

#Mannheim#stabbing • Male cop tackles this guy for some reason • Cop Attempts to restrain him • Male cops gets stabbed by the actual #stabber • Blue coat guy still gets arrested by useless female cop W.T.F 🤷‍♂ These have to be the stupidest police officers ever!

Reuters: World

@reutersworldchannel · Post #149413 · 15.10.2021 г., 14:54

LIVE: View outside the church where UK lawmaker David Amess was stabbed to death Live view outside the Belfairs Methodist Church where British Conservative lawmaker David Amess was stabbed to death by a man who walked into a meeting with voters. #Reuters#UKMP#stabbing # #Live#UKpolitics Subscribe: http://smarturl.it/reuterssubscribe Reuters brings you the latest business, finance and breaking news video from around the globe. Our reputation for accuracy and impartiality is unparalleled. Get the latest news on: http://reuters.com/ Follow Reuters on Facebook: https://www.facebook.com/Reuters Follow Reuters on Twitter: https://twitter.com/Reuters Follow Reuters on Instagram: https://www.instagram.com/reuters/?hl=en ➖@reutersworldchannel➖

MessageInABottle

@mib_messageinabottle · Post #7010 · 31.05.2024 г., 17:57

Several people injured in a mass-#stabbing at a rally in #Germany organised by #PaxEuropa, which is an organisation opposed to the "Islamisation of Europe". Activist and blogger Michael #Stürzenberger was among the injured. A German cop also got stabbed in the neck after he attacked one of the rally members, (one of those who was trying to subdue mad stabber), and then the stupid cop knelt on his chest like he was the problem - a microcosm of #EU decision-making. Looked like the cop just saw white German guy grappling with a muslim guy and immediately presumed that the white guy was the problem. Sometimes you deserve what you get 🤷‍♂ The last video looks the astoundingly stupid German police officers placing the white German guy under arrest 🤷‍♂

MessageInABottle

@mib_messageinabottle · Post #7073 · 08.08.2024 г., 23:57

Compare and contrast #UK#PrimeMinister#Starmer's reaction to: • "firey but mostly peaceful" #BLM riots in the US after the death of petty criminal drug-addict George Floyd Vs •#White Working class "Anti-#Stabbing" riots in the #UK after the #murder of 3 #children