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

Пребарај: #creativetech

当前筛选 #creativetech清除筛选
ChatGPT AI Technology News

@chatgpt_officialnews · Post #71 · 26.03.2025 г., 21:16

Hey AI lovers! Big news in the world of AI creativity: with GPT-4o, you can now create and customize images just by describing what you want! Whether it’s a specific aspect ratio, exact colors (using hex codes like #FF5733 for a vibrant orange), or even a transparent background—GPT-4o makes it happen with a simple chat. Imagine designing a futuristic cityscape in neon blues (#00C4FF) and purples (#800080), or a minimalist logo with a 1:1 aspect ratio and a transparent background for your next project—all without touching a design tool! The possibilities are endless. ➖➖➖➖🔻 💎@Chatgpt_OfficialNews – Stay Updated! ⚡️ 🧠 BOT: @Chatgpt_OfficialBOT #️⃣#OpenAI #N#AI #GPT4o#ImageGeneration#CreativeTech#Design ➖➖➖➖🔺

GAMEFEST.UZ

@gamefestuz · Post #274 · 07.04.2026 г., 05:08

O‘zbekiston o‘yin sanoati tarixida yangi sahifa! Biz Game Fest 2026 doirasida navbatdagi maxsus mehmonimizni e’lon qilishdan faxrlanamiz. 🌍HOMA GAMES — ENDI TOSHKENTDA! Homa Games - bu dunyo miqyosidagi mobil o‘yinlar nashriyoti (publisher) bo‘lib, ularning portfelidagi o‘yinlar 1 milliarddan ortiq marta yuklab olingan! Ular "Hyper-casual" va "Hybrid-casual" yo‘nalishlarida dunyo yetakchilari hisoblanadi. Nega bu siz uchun muhim? 📌 Direct Pitching: O‘z o‘yiningizni dunyodagi eng kuchli nashriyotlardan biriga shaxsan taqdim etish imkoniyati. 📌 Market Insights: Homa Lab texnologiyalari va o‘yinlarni global darajaga olib chiqish sirlari haqida eksklyuziv bilimlar. 📌 ScaleUp: Loyihangizni jahon bozoriga olib chiqish va investitsiya jalb qilish uchun eng qisqa yo‘l. Creative Tech va Game Fest 2026 - bu shunchaki festival emas, bu sizning global karyerangiz boshlanish nuqtasidir. 📅Sana: 2026-yil, 15-16 may 📍Manzil: Renaissance Hall, Toshkent 🏛Tashkilotchi: O‘zbekiston Kreativ uyushmasi 🚀O‘z o‘yiningizni dunyoga ko‘rsatishga tayyormisiz?🌐 Batafsil va ro‘yxatdan o‘tish: CreativeTech.uz 📢 Kanalimiz: @creative_tech_official 📞 Aloqa: +998-95-474-19-19 ————————— A New Chapter for Uzbekistan’s Gaming Industry! 🚀🎮 We are thrilled to announce our next special guest for Game Fest 2026 ! Join us as we welcome a global powerhouse to Tashkent: 🌍 HOMA GAMES — NOW IN UZBEKISTAN! Homa Games is a world-class mobile games publisher with over 1 billion downloads across their portfolio. They are undisputed global leaders in the "Hyper-casual" and "Hybrid-casual" sectors. Why is this a game-changer for you? 📌 Direct Pitching: A rare opportunity to present your game personally to one of the world’s most influential publishers. 📌 Market Insights: Gain exclusive knowledge on Homa Lab technologies and the secrets to scaling games to a global audience. 📌 ScaleUp & Funding: The fastest route to taking your project to the international market and securing professional backing. Creative Tech & Game Fest 2026 is more than just a festival—it is the launchpad for your global career. 📅 Date: May 15-16, 2026 📍 Venue: Renaissance Hall, Tashkent 🏛 Organizer: Uzbekistan Creative Association 🚀 Ready to show your game to the world? 🌐 Details & Registration: CreativeTech.uz 📢 Follow us: @creative_tech_official 📞 Contact: +998-95-474-19-19 #GameFest2026#HomaGames#GamedevUzbekistan#CreativeTech#AnimationUz#GameDev#TashkentEvents