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

Пребарај: #sequoia

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

@venturevillagewall · Post #4176 · 17.02.2025 г., 22:00

Crypto Twitter Buzzes Over Kaito.ai Crypto Twitter is abuzz with excitement around *kaito.ai*, a promising new player in the InfoFi space. After a revealing conversation with *Kaito.ai* CEO Yu Hu and notable investors like Sequoia and Dragonfly, awareness of the platform skyrocketed after the launch of ChatGPT, significantly boosting *Kaito.ai*'s valuation. Plans for collaboration with early user support are underway, enhancing insights for the platform. Additionally, JP Morgan's unexpected $100 million investment in strategy shares after buying Bitcoin emphasizes shifting perspectives on crypto, showcasing that actions may speak louder than words in the financial world. Meanwhile, a dramatic 500 ETH (approx. $1.5M) was burned with a mysterious message, indicating internal disputes within *Kuande Investment*. Stay tuned for further updates! Read more here #Crypto#KaitoAI#InfoFi#Bitcoin#JP Morgan #USD#ETH#Burn#Investment#WhaleAlert#AI#Tech#Market#Finance#Sequoia#Dragonfly#Earnings#Meme#Trends#Analytics

Venture Village Wall 🦄

@venturevillagewall · Post #3719 · 26.12.2024 г., 10:00

Nvidia's Earnings Shift Expected in 5 Years AI companies are struggling to earn enough to cover investments, according to David Kahn from Sequoia, who noted they should earn 6 times more. Currently, Nvidia leads AI earnings. SK Capital projects a shift in 3-5 years where solution developers like OpenAI will earn significantly more. This mirrors trends from the tech boom when software developers eventually outpaced hardware manufacturers. For detailed insights, read the full report here. #Nvidia#AI#Crypto#Sequoia#SKCapital#OpenAI#TechBoom#Earnings#Investments#MarketTrends#Software#Hardware#Developers#Graphics#Chips#GenerativeAI#InvestmentForecast#TechIndustry#BusinessModel#ValueChain#AIRevenue

Venture Village Wall 🦄

@venturevillagewall · Post #3601 · 20.12.2024 г., 16:16

Weekend Reading for Entrepreneurs Explore this week's top news: 1️⃣ Research on mobile game success probability - Read more2️⃣ Tech trends for 2025 according to Andreessen Horowitz - Find out more3️⃣ Video on David Lieb, creator of Google Photos - Watch here4️⃣ Podcast with Vlad Tenev from Robinhood - Listen in5️⃣ David Kahn's AI predictions for 2025 - Read the article6️⃣ Interview with Rocket Lab CEO Peter Beck - Explore the interview7️⃣ Turning mistakes into success with Flamp.io - Learn how #MobileGames#TechTrends#GooglePhotos#Podcast#AI#RocketLab#StartupSuccess#Sequoia#AndreessenHorowitz#VladTenev#DavidLieb#DavidKahn#PeterBeck#Flamp#YCombinator#SpaceX#Entrepreneurship#Innovation#Research#Investment#Finance