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

Пребарај: #approaching

当前筛选 #approaching清除筛选
English Speakers

@English_Speakers · Post #3541 · 10.08.2018 г., 03:32

Important Five: Common Errors in the use of Prepositions 1) For #Days#, we use 'On', For Dates, we use 'On', For months we use, 'In', For seasons we use 'In', For a particular time, we use 'At'. For morning and evening, we use 'In'. For night, we use# 'At'.# #At:# at 7 o'clock; at midday; at dinner; at Christmas #In:# in the evening; in Easter week; in September; in (the) winter; in 1864; in the 20th century #On:# on Friday; on April 1st; on Christmas Day #Incorrect:# My brother completed the project in a month’s time. #Correct:# My brother completed the project in a month. #Incorrect:# We love to visit the nearest market on Sunday. #Correct:# We love to visit the nearest market on #Sundays.# 2)The verbs lack, approach and enter are directly followed by objects without prepositions. Other verbs that do not normally take prepositions are: discuss, marry and resemble. #Incorrect:# Although my sister is intelligent, she lacks of confidence. #Correct:# Although my sister is intelligent, she# lacks confidence.# #Incorrect:# The train is now approaching to my city. #Correct:# The train is now #approaching my city.# #Incorrect:# The boys were not allowed to enter into the house. #Correct:# The boys were not allowed to #enter the house.# 3) The prepositions #in# and #on# are used to show position. To say where things are going, we use #into# and #onto.# #Incorrect: #The ball rolled slowly in the goal. #Correct:# The ball rolled slowly# into# the goal. #Incorrect:# She ran in the room crying. #Correct:# She ran #into# the room crying. 4) We use #in# to say how soon something will happen. #Within# means ‘inside’ or ‘not beyond’. #Incorrect:# The train will arrive #within# six minutes. #Correct:# The train will arrive# in# six minutes. #Incorrect#: You need to complete this book in a month. #Correct:# You need to complete this book within a month. #Incorrect:# If you don’t live by your income, you will have to pay huge debts. #Correct:# If you don’t live# within# your income, you will have to pay huge debts. 5) #Through# is used for movement in a three-dimensional space. #Incorrect:# The ball went #to# the window and fell on the ground. #Correct#: The ball went #through# the window and fell on the ground.