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

Резултати

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

Пребарај: #pov

当前筛选 #pov清除筛选
Virtual 207

@the_mutarjim · Post #20192 · 20.12.2025 г., 05:30

#PoV Sad news for French readers: publishing house Harlequin has decided to stop publishing human-made translations in French, and will instead rely on AI. All of their freelance translators (some of whom had been working with Harlequin for more than 30 years!) were told they would no longer receive translation work. They can, however, work with Fluent Planet (Harlequin's new partner, that will provide the AI translations) to "improve their AI-translations" (or, given the quality of AI translation, rewrite entirely the text from scratch)... for 1/3 of their normal rates (which were already pretty low to begin with). Of course, despite the cost-saving mesure for Harlequin, French readers will still be required to pay their books the same price... while getting butchered translations. This is not without consequences: ● Translators suddenly no longer being offered work from Harlequin is the equivalent of a mass lay-off... But as freelancers, they do not get any unemployment benefits or compensation. ● Working with Fluent Planet instead of Harlequin means the translators are no longer considered like authors/artists under the French law, but like external contractors. This means that on top of having their revenues divided by three, they lose various legal rights (such as the right to be credited as a literary translator in the book!), protections and grants. ● This is incredibly disrespectful to the original works that are now ran through AI translation softwares. These softwares were trained on both Harlequin's French collection and the original source texts, without the authors' and translator's consent (and none of them was paid for that, even though Fluent Planet is now making money out of these AI softwares). New books published are now translated by an AI, still without the original authors' consent (who probably aren't too happy about that). Lots of nuance, cultural reference and stylistic choices will be lost. Do not be fooled by the fact that Harlequin's books are "just romance books". Romance is far from being the easiest genre to translate, and romance-readers, as paying customers, deserve exactly the same respect as any other readers, and that is: high-quality translations. AI might be coming for romance first, but it will not stop there if we, readers, translators, authors, literary agents, publishers, do not push back. Let Harlequin know we don't want their AI-butchered books, we don't want their dystopian future were human art and emotions are left to robots, we don't want to support company that let go of their workforce without a second-thought, just so numbers keep going up indefinitely. We're not paying a dime for AI slop! © Apolline Descy, Freelance translator (English-Dutch-Spanish​>French) specialised in game localisation, literature and medical translation

Hashtags

Железно | Киров

@gk_zhelezno · Post #766 · 12.03.2023 г., 11:26

#pov — смотрим на город будущего глазами жителей ZNAKа. У людей, окружающих себя красотой, развивается эстетический вкус. Обостренное чувство прекрасного активизирует способности альтернативного восприятия. Это означает, что человек начинает видеть возможности там, где другие их не находят. Просыпайтесь каждый день с удовольствием, наслаждайтесь видами из окон, гуляйте по благоустроенной территории своего жилого комплекса и проводите больше времени с любимыми в городе будущего ZNAK — месте, полном возможностей для вашей счастливой жизни❤️ #ZNAK

Hashtags

IRAS

@irassg · Post #775 · 09.02.2024 г., 06:50

Bracing for the annual CNY “kaypoh” questions too? 😅 Here’s one thing less to worry about – use the Personal Relief Checker (go.gov.sg/personalreliefchecker) to discover the personal tax reliefs you're eligible for in the upcoming tax season! 🔍 #pov#skit#cny2024#asianrelatives#taxreliefs#taxtips#irassg

12
ПретходнаСтраница 1 од 2Следна