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

Резултати

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

Пребарај: #dutch

当前筛选 #dutch清除筛选
Addis Standard

@addisstandardeng · Post #21218 · 28.01.2026 г., 07:46

#Dutch court sentences #Eritrea human trafficker to 20 years A Dutch court on Tuesday sentenced an Eritrean man to 20 years in prison for operating a human trafficking ring in which migrants were tortured and their families extorted. The court said the man, identified as Amanuel #Walid, had treated migrants "without any humanity" as they were transported from Eritrea to #Europe via #Libya. "Your only aim was to earn as much money as possible from people who were looking for a better future," presiding judge Rene Melaard told Walid. The court in the northern Dutch city of #Zwolle heard how gang members tortured victims while on the phone to their families in the Netherlands, demanding payments to make the abuse stop. Only once family members had transferred money were the victims put on rickety boats for the perilous trip across the Mediterranean Sea. Many drowned in the crossing. https://www.facebook.com/AddisstandardEng/posts/pfbid0e9YqCpyLghyEouyA911hTeebioBPf4mTh4fVeBBchU9xr53T5qZURCXU8qW5ZQisl

Переводчики-редакторы со знанием иностранных языков #удаленно#вакансия#crypto#tango Katz Technologies LLC создаёт WEB3-экосистему (криптокошелёк, DEX, Memepad, Explorer) и ищем профессионального переводчика-редактора для проверки ИИ-переводов сайта и долгосрочного сотрудничества. Не важны дипломы и громкие компании. Главное - чувство языка, ответственности и понимание crypto-контекста. Вы сразу видите искажения смысла, ошибки в терминах и роботизированный перевод, умеете быстро и точно доводить машинный текст до профессионального уровня. Важно чувствовать тон продукта, которому пользователь доверит деньги. Мы предлагаем: - Долгосрочный проект и сильный кейс в портфолио - Удалённую работу и гибкий график - Возможность влиять на продукт с нуля - Бонусы за результат Задачи: - Проверка ИИ-перевода сайта (10+ страниц, ~5 000 знаков каждая) - Контроль смысла и терминологии (Tier-1 приоритет) - Исправление ошибок, кальки и неестественных формулировок - Работа с готовым переводом (без переписывания с нуля) Языки (один или несколько): #German, #Swedish, #Polish, #Dutch, #French, #Turkish, #Spanish, #Portuguese Обязательно: - Уровень: C1+ - Умение быстро вносить точечные правки Приветствуется: Опыт в IT / crypto / fintech Как откликнуться: В ТГ: https://t.me/shillbert Укажите язык(и), опыт и примеры проектов (если есть). ⏺Откликнуться: https://t.me/shillbert ➖➖➖➖➖➖➖➖➖➖➖ 🪩 Откликнуться быстрее других ➖➖➖➖➖➖➖➖➖➖➖

MessageInABottle

@mib_messageinabottle · Post #7078 · 10.11.2024 г., 16:57

🇮🇱🇳🇱#Dutch police confirm the #Israeli#football#hooligans started the violence in #Amsterdam • Israeli hooligans march through the city centre shouting out racist chants, mocking the victims of Israeli #genocide in #Gaza • Hooligans tear down #Palestine flags and burn them • Hooligans ignore the minute of silence for the victims of #Valencia floods • Hooligans attack Arab-looking Taxi driver • Hooligans get attacked after the game. Taxi drivers join in. • Western Media create usual (fake) "Isreali victim" myth and the usual fake "#antiSemitism" claims follow. Jerusalem Post of Nov 5, states: "#Mossad agents among the Israeli hooligans" (also active-duty #IDF soldiers.) https://archive.is/48eVN The whole thing is #ZioNazi Theatre, created to put political pressure on the Dutch because in June this year: THE #NETHERLANDS STOPPED SUPPLYING #F35 SPARE-PARTS TO ISRAEL.

MessageInABottle

@mib_messageinabottle · Post #6954 · 26.05.2024 г., 13:53

TWITTER FULLY EMBRACES "THE DARK SIDE"! If you are a #Twitter/#X "Creator" your #UserData/ID will end up in the hands of #Mossad #AU10TIX, the company that X/Twitter uses to verify its user's ID, is an Israeli company founded by members of Israeli intelligence units #ShinBet and #Unit8200. The CEO, Ron #Atzmon, was a member of Israel's #CyberIntelligence unit 8200. His father was once the treasurer of the #Likud, #Netanyahu's party. AU10TIX was founded in 2002 as the technology arm of a #Dutch firm called "#ICTSInternational". ICTS international was established in 1982 ALSO by former members of Israeli intelligence unit Shin Bet. This is an extreme security risk. Not only will regular creators have to give their ID to a company with deep ties to Israeli intelligence, but PRO-#PALESTINIAN creators will also have to do the same.