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

Резултати

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

Пребарај: #verb

当前筛选 #verb清除筛选
English Speakers

@English_Speakers · Post #57 · 12.01.2017 г., 12:13

⤴️#Word_of_the_Day⤴️ 📚nibble Audio Pronunciation /ˈnɪbəl/ #verb 1⃣ : to eat slowly or with small bites [+ object] ✅We nibbled cheese and crackers. [no object] ✅We nibbled on some cheese and crackers before dinner. — often + at ✅She felt a fish nibble at the end of her fishing line. ✅Insects nibbled at the tree's leaves. — sometimes used figuratively ✅He nibbled at the idea of changing careers [=he thought briefly about changing careers], but decided against it in the end. 2⃣ [+ object] : to bite (something) very gently ✅He nibbled her ear. ✅nibble (away) at [phrasal verb] ✅nibble (away) at (something) : to make (something) disappear or go away very slowly ✅Police have been nibbling (away) at crime in the city for years. [=police have been very slowly reducing the amount of crime in the city] @English_Speakers

Learn RCRussian🤍💙❤️

@learnRCRussian · Post #5753 · 29.11.2025 г., 09:00

Если я погладил много котиков, значит ли это, что я гладиатор? If I've petted many kitties, does that make me a gladiator? • Гладить (imperf.) [gla-dit'] = • Погладить (perf.) [pa-gla-dit'] Meanings: 1) to iron clothes 2) to pet, to stroke (an animal) Also: • Гладиатор (masc.noun) [gla-di-a-tor] А gladiator (a warrior) Not everyone who ГЛАДИт cats can become a ГЛАДИатор. Or can they? 😒⚔️ #tricky_words #verb #meme #learn_russian 😎RCR | Support | Boost

VERB Raises $558M to Acquire TON VERB (ticker VERB) is securing approximately $558 million in funding to build a public TON treasury. With these funds, the company plans to buy Toncoin ($TON) and hold it as its primary reserve asset. The goal is to become the first public company whose core “cushion” consists of TON — effectively treating TON as a reserve asset on its balance sheet. VERB expects to earn both from TON’s price appreciation and staking rewards. Once the deal closes (scheduled for August 7, 2025), VERB will rebrand as TON Strategy Co. (TSC) and continue growing its existing projects. Investors: Over 110 institutional and “crypto-native” participants, including Pantera, Animoca, Kraken, BitGo, Vy Capital, Ribbit Capital, and Graticule (GAMA). Advisors & Partners: Experts from Kingsway Capital, TON Foundation, and Blockchain.com will join governance. Having Pantera, Animoca, Kraken, and BitGo on board is meant to add both expertise and trust. Leadership Team: Executive Chairman: Manuel Stotz (Kingsway Capital; President, TON Foundation) CEO: Veronika Kapustina (former TON Foundation advisor; ex-Morgan Stanley) CFO: Sara Olsen (Europa Partners; former Onyx by JPMorgan) Special Advisor: Peter Smith (CEO & Co-Founder, Blockchain.com) VERB is betting that TON will remain the main blockchain for Telegram’s product ecosystem. As Telegram’s ecosystem grows, so could the value of VERB’s TON reserves. Post-Closing Metrics: ➡️Lock-up:~36% of equity for 6–12 months ➡️Cash Ratio:~77% cash among DAT companies holding non-BTC/ETH assets — one of the highest in the sector ➡️TON Treasury Size: ~5% of TON’s circulating market cap ➡️Capacity for Further TON Accumulation ➡️Ticker: VERB remains listed on Nasdaq, with the new treasury strategy effective post-close ➡️Advisors: Cohen & Company (placement), Reed Smith, Perkins Coie, Brownstein Hyatt Farber Schreck, Morgan Lewis Risks: This is a private placement (PIPE) with standard risks: the transaction may not close, markets could decline, and the strategy might underperform. VERB discloses these risks in its disclaimer. Read press release 📱RedotPay | 🔃StormTrade | ❤️CapsGame |📱Degenphone #TON#Telegram#PIPE#Verb#Investments#Treasury