TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #425 · 20 апр.

Недавно делал быстрый прототип асинхронного приложения в котором требовалось вызывать много синхронного кода. Да, я знаю, что это не лучший дизайн, но нужно было быстрое решение на один процесс и без очередей. Поэтому я выполнял код в потоках. Выглядело это примерно так: from fastapi.concurrency import run_in_threadpool async def execute(data: DataRequest) -> DataResponse: try: result = await run_in_threadpool(sync_function, data) return DataResponse(data=result) except Exception as e: return DataResponse( error=str(e), success=False, ) В общем работает нормально. Для всех вызовов под капотом используется общий тредпул, всё работает предсказуемо. Но потребовалось изменить количество запускаемых в пуле потоков (по умолчанию создается 40 воркеров). Так как дело происходит с FastAPI, делается это через lifespan используя настройки anyio: import anyio @asynccontextmanager async def lifespan(app: FastAPI): limiter = anyio.to_thread.current_default_thread_limiter() limiter.total_tokens = 100 yield # если вдруг нужно вернуть обратно limiter.total_tokens = 40 Зачем менять количество воркеров? - уменьшить, если оперативки мало (один тред занимает ~8мб) - увеличить чтобы выдержать нагрузку Если есть предложения получше при тех же вводных - предлагайте😉 #async

Hashtags

Резултати

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

Пребарај: #talents

当前筛选 #talents清除筛选
StartupBase

@startupbaseuz · Post #5119 · 01.12.2024 г., 08:52

Together with Coursera, we are working on massive upskilling of our youth. In addition to comprehensive reforms at all levels of education, Uzbekistan will be an excellent source of affordable talent for ITES companies for the years to come. We are also fully covering all IT training and certification costs for those who have B2 level foreign languages as well as subsidizing IT training companies up to $2000 for every successful graduate employed at ITES company or up to $3000if s/he is disabled. We fully understand that for ITES companies to expand their delivery centers in Uzbekistan good demographics is not enough and therefore we invite other training companies also to use these opportunities to grow their business with us and help our youth to become more competitive in a global remote work landscape. The main goal is to equip our growing young population with the most important skills in demand by ITES exporting companies for them to succeed in their future careers. So if you are planning for the longer-term flow of affordable talent coupled with tax breaks up to 2040 look for Uzbekistan and register your ITES exporting company with IT Park through https://outsource.gov.uz #Uzbekistan#IT_Hub#Talents#Upskilling#Tax_breaks_2040

Aileaders.uz

@aileaders_uz · Post #16 · 10.01.2025 г., 10:38

🟦🟦🟦🟦🟦🟦 Professional IT sertifikatga o’qiganlarning 40% dan ortig’i IT sohasida ishtopib, 500$ va undan yuqori daromad topishmoqda. 📈 Professional darajadagi xalqaro IT sertifikatlarga o'qib kompensatsiya olgan yoshlar soni 2023-yilda 386 nafarni tashkil etgan bo'lsa, 2024-yilda 938 tani tashkil etdi (2,4 barobarga ko'paygan), qoplab berilgan mablag' miqdori 3,5 mlrd so'mni tashkil etib, 6,6 barobarga oshgan. 📼 Hozirgi kunda, aksariyat IT kompaniyalar suhbatga taklif qilishganida nomzodlarda qanday Professional IT sertifikati borligi, ilg’or IT texnologiyalar hamda chet tillarini bilishi holati muhim ahamiyat kasb etadi. 🚪 Siz ham IT sohasida yaxshi daromad topmoqchi bo’lsangiz – xalqaro sertifikatlarga o’qing(ro'yxat) va Uzbekcoders.uz portalida BEPUL ta’lim resurslaridan foydalaning. #Uzbekistan#IT_Hub#Certification#Talents#Coursera#Uzbekcoders#Statist