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

Резултати

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

Пребарај: #etfinflows

当前筛选 #etfinflows清除筛选
Crypto M - Crypto News

@CryptoM · Post #65121 · 11.04.2026 г., 05:47

🚀 Solana Spot ETFs See Significant Inflows Amid Market Activity U.S. Solana spot ETFs experienced a notable increase in net inflows, totaling $11.453 million yesterday. According to NS3.AI, the Bitwise Solana Staking ETF was the sole fund contributing to these net inflows, highlighting its appeal among investors. #Solana#SpotETFs#Investing#Cryptocurrency#Bitwise#MarketActivity#ETFInflows

Crypto M - Crypto News

@CryptoM · Post #64458 · 09.04.2026 г., 01:01

🚀 Michael Saylor Suggests Bitcoin May Have Bottomed, Downplays Quantum Computing Risks PANews posted on X (formerly Twitter). Michael Saylor, founder and executive chairman of MicroStrategy, expressed at a Mizuho event that Bitcoin likely reached its bottom near $60,000 in early February. He attributed this bottoming more to a depletion of sellers rather than valuation factors. Saylor noted that current selling pressure is limited, with ETF inflows absorbing daily supply and corporations allocating treasury assets to Bitcoin, which sustains demand. Regarding the recent discussions on the threat of quantum computing, Saylor believes the risks are overstated. He stated that the threat remains theoretical and may not need to be addressed for several decades, by which time solutions will likely be available. #MichaelSaylor#Bitcoin#Bottomed#QuantumComputing#ETFInflows#Cryptocurrency#MicroStrategy#Blockchain#TreasuryAssets#CryptoDemand#BTC