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

Резултати

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

Пребарај: #xtz

当前筛选 #xtz清除筛选
Pro Analysis

@proanalysistrader · Post #28430 · 28.01.2025 г., 13:50

#XTZ/USDT analysis : #XTZ is in an uptrend and has broken out above the 200 EMA and previous highs. Currently, the price is retesting the previous resistance zone, which has now turned into support. It is anticipated that the price will rebound from this level and resume bullish momentum to test the previous highs. TF : 1D Entry : $1.012 Target : $1.800 SL : $0.783

Hashtags

Pro Analysis

@proanalysistrader · Post #28342 · 15.12.2024 г., 12:33

#XTZ/USDT analysis : #XTZ has broken below the 200 EMA and has retested it. Currently, the price is encountering resistance from the resistance zone, and it is expected to decline from here. A drop is anticipated, potentially leading to a test of previous lows. TF : 2H Entry : $1.420 Target : $1.150 SL : $1.530

Hashtags

Pro Analysis

@proanalysistrader · Post #28023 · 15.10.2024 г., 14:54

#XTZ/USDT analysis : #XTZ has broken out and retested the previous swing high and the 200 EMA. The price is expected to bounce back from this level and test the higher levels. TF : 4H Entry : $0.694 Target : $0.744 SL : $0.661

Hashtags

Pro Analysis

@proanalysistrader · Post #27837 · 13.08.2024 г., 16:39

#XTZ/USDT analysis : #XTZ is again approaching the 200 EMA resistance after facing rejection from there and is expected to continue its bearish momentum once the zone is tested. The previous low will be the target level. TF : 2H Entry : $0.687 Target : $0.591 SL : $0.709

Hashtags

American Crypto©

@americancryptotrading · Post #27528 · 08.02.2026 г., 10:09

🇺🇸#XTZ/USDT is facing the lowerboundary of the fallingwedge formation on the 2W chart👨‍💻 Expecting a price recovery🚀 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27369 · 09.09.2025 г., 09:42

🇺🇸#XTZ/USDT has retested the s/rzone on the daily chart🔍 The rally is coming🚀 American Crypto©

Hashtags

123•••89
ПретходнаСтраница 1 од 9Следна