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

Резултати

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

Пребарај: #hashnote

当前筛选 #hashnote清除筛选
Venture Village Wall 🦄

@venturevillagewall · Post #3940 · 21.01.2025 г., 16:00

Circle Acquires Hashnote for USYC Integration Circle has acquired Hashnote, the issuer of the USYC tokenized money market fund, to integrate it with Circle's USDC. This aims to facilitate conversion between on-chain cash and yield-generating collateral. Additionally, Circle is partnering with Cumberland for liquidity and settlement support. More details: CoinDesk #Circle#Hashnote#USYC#USDC#Crypto#VC

Venture Village Wall 🦄

@venturevillagewall · Post #3943 · 21.01.2025 г., 19:00

Circle Expands USDC Ecosystem 🚀 Circle announces key developments: - Acquired RWA platform Hashnote. - Partnered with DRW to promote USDC and Ondo Dollar (USDY). - USDC and USYC launching on Canton blockchain. 💵 50M USDC minted (approx. $50.03M). Bitcoin ETFs now hold over 1.1M BTC (~5.7% supply). Details here | More on Bitcoin ETFs | Canton news #USDC#Circle#Blockchain#Crypto#Finance#USYC#Bitcoin#ETFs#Investments#Hashnote#DRW#DigitalAssets#Canton#Markets#CryptoTrends#Tokenization#WhaleAlert#Funding#Sustainability#DeFi#Innovation

Venture Village Wall 🦄

@venturevillagewall · Post #3950 · 22.01.2025 г., 13:00

Circle Acquires Hashnote; $5.6M for Wingbits 🔍 Institutional investment management platform Hashnote acquired by Circle. 💰 Wingbits, a token-incentivized flight tracking network, raises $5.6M in a strategic funding round led by Borderless Capital and Bullish, with participation from various investors. 🔄 Significant crypto movement detected: 2,410 #BTC (worth $253M) transferred to Coinbase Institutional. ⚡ Mantle announces a financial blockchain center with a treasury of $4.3B, planning expansion of mETH and FBTC Protocols in 2025. 🌐 Mistral AI aims for IPO and opens Singapore office as part of regional expansion. 🏛️ Major U.S. Bitcoin miner MARA advocates for Bitcoin reserves in 50 states with state-level bills under consideration. 🚀 Stargate Project initiated by tech giants for AI infrastructure in the U.S., with $500 billion investment planned by 2029. 🔗Read more about Mantle's blockchain center. #Hashnote#Circle#Wingbits#Crypto#BTC#Mantle#mETH#FBTC#MistralAI#IPO#MARA#Bitcoin#StargateProject#AI#VC