TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #411 · 9 фев.

reload_flag="" if [[ -n "${DEBUG}" ]]; then reload_flag="--reload" fi if [[ -n "${WORKER_COUNT}" ]]; then workers=${WORKER_COUNT} else workers=2 fi gunicorn --workers ${workers} \ --bind 0.0.0.0:8000 \ ${reload_flag} main.wsgi Писали такие конструкции чтобы проверить наличие флага и сформировать команду правильно? На самом деле можно сделать тоже самое проще. Для этого используются операторы условной подстановки, доступные в оболочках семейства POSIX. :- для установки значений по умолчанию ${WORKER_COUNT:-2} Если переменная не объявлена, то будет дефолтное значение 2. :+ подставляет указанный текст, если переменная не пуста ${DEBUG:+--reload} Если что-то есть в переменной то распечатается текст после символа +, в противном случае - ничего. Удобно для опциональных флагов, как в нашем примере. Итого наш скрипт может выглядеть так: gunicorn --workers ${WORKER_COUNT:-2} \ --bind 0.0.0.0:8000 \ ${DEBUG:+--reload} main.wsgi Есть еще два оператора. := не только подставить дефолтное значение, но и присвоить его переменной, если она пуста # никаких переменных еще нет VAL1=${VAL2:=hello} # теперь доступны обе echo $VAL1 $VAL2 # hello hello :? остановить выполнение с ошибкой, если переменной нет. echo ${MISS:?is required} bash: MISS: is required Код выхода будет 1. #tricks#linux

Резултати

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

Пребарај: #easter

当前筛选 #easter清除筛选

🧺 🧁 🧁 🥚 🥚 🥚 🥚 🥚 🥚 🐰 🥕 🐇 🐰 🐇 🐰 🐰 🥚 🥚 🐥 🏵 💮 🪴 🌺 🪴 🥚 🥚 🥚 🚩 🚩 🚩 🚩🥮🙏 🤩🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏 🤩 🤩 🤩 🤩 🤩 🤩🥚 🤩 🤩🥚🥚🥚🥚 пасха | add#easter please boost 👼

Hashtags

Quick and easy way to color your eggs for #Easter: Wrap plant parts of your choice around an egg with a nylon sock very tightly, so that the plant is pressed against the shell. Place the eggs into warm water with loads of onion peels. Boil it for twelve minutes and let everything cool down. Remove the sock with the plant and rub speck all over the egg to make it look shiny. Happy Easter to all of you! @EuropeanTribalism

Hashtags

Learn RCRussian🤍💙❤️

@learnrcrussian · Post #4534 · 17.04.2025 г., 16:00

An online video demonstrating how to dye Easter eggs with red wine has become viral. The only thing: keep the wine in the pot, not in yourself! 🔻Here's how: ⚡️Pour any red wine into a pot with red eggs. ⚡️Bring to a boil and simmer for 10 minutes. ⚡️Then cool and put the pot with the eggs and wine into the fridge (not freezer!) for the night. ⚡️In the morning, place them on paper towels to dry. ⚡️The result is matte, shimmering Easter eggs with an unusual color. 🐣Happy Easter to all! #holidays #Easter 😎RCRussian | Support | Boost

TONlines – News

@tonlines · Post #6814 · 17.04.2025 г., 13:05

JetTon Games: Final Stage of Easter Treasure Hunt Tournament #JetTon#EASTER JetTon Games announces the final stage of the Easter Treasure Hunt Tournament with a total prize pool of €250,000. Participants can compete in various games like Hot Triple Sevens and The Greatest Catch Bonus Buy with a minimum bet of 0.2 EUR. This is the last opportunity to secure a position in the winners ranking. Source: link @tonlines

Learn RCRussian🤍💙❤️

@learnrcrussian · Post #4547 · 19.04.2025 г., 14:00

🙏🙏🙏Some Russian Easter mood for you: • Красить яйца (imperf.) [kra-sit' yay-tsa] To colour/dye eggs ❓А вы красите яйца на Пасху? Video: AIvikki_topneuro #AI #holidays #Easter 😎RCRussian | Support | Boost

Андрей Лаупер

@free4ones · Post #935 · 20.04.2025 г., 09:07

Как все изменилось за несколько сотен лет... Когда-то последователи скрывались в темных катакомбах, а сегодня сторонников учения бесчисленное множество — христианство прошло огромный путь, став одной из главных духовных сил мира. #пасха#easter

Tkong Channel

@tkong_channel · Post #121 · 19.04.2025 г., 12:38

🐰 Happy Easter from Tkong! 💐 Wishing you a peaceful and joyful spring. 🐰 Tkong 祝你復活節快樂! 💐 願這個春天帶來平安與喜悅。 #Easter#Tkong

ПретходнаСтраница 1 од 3Следна