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

Пребарај: #scams

当前筛选 #scams清除筛选
TONlines – News

@tonlines · Post #6986 · 30.04.2025 г., 14:21

Tonnel Network: Caution with B-Day Candle Purchases #Tonnel#scams The Tonnel Network warns users about scams involving the purchase of B-Day Candles. It is advised to only buy candles that are mintable, indicated by a blue glow. Source: link @tonlines

News and Tips

@NewsAndTipsNT · Post #3508 · 24.07.2025 г., 15:46

⚠️Dear subscribers, Please don’t fall for cheap tricks. There's been a rise in NFT-related #scams on Telegram lately. If anyone messages you asking to connect certain apps, don’t fall for it , it’s clearly a scam. Never connect your wallet to unknown sources just for the sake of giveaways or so-called "free" #gifts. Remember, nothing is truly free. Also, some channels are using unhealthy giveaway methods to collect user data or trick people into spending money. Think carefully before participating — if you're not comfortable with it, don't spend your money. Here are some safe ways to buy and sell Telegram #NFTs: 1. Buy directly from Telegram: Go to ⚙Settings > 🎁 Buy a Gift. Drops appear randomly, check often and buy when available. You can later upgrade them to NFTs when the option is available. 2. Use Telegram’s built-in buy/sell option: You can trade NFTs securely within the app. ⚙Settings : 🎁Buy a gift : Resale 3. Visit Fragment: A trusted and official platform for buying and selling Telegram collectibles. 4. Use third-party platforms like @Portals/@Tonnel_Network_bot : Reputable web apps can also be used, but make sure they are trustworthy and secure. Stay smart and stay safe!🤝

Venture Village Wall 🦄

@venturevillagewall · Post #4296 · 03.03.2025 г., 16:00

Crypto Fundraising Soars 93.5% in 2024 In 2024, crypto and blockchain startups raised $15.4B, marking a 93.5% increase from 2023. Closed funding rounds reached 1,597, a 45% jump. Early rounds make up 36% of deals. Top VCs include Animoca Brands, OKX Ventures, and MH Ventures. Bitcoin Update: Despite a drop in February, Bitcoin surged 9.3% in March. Currently priced at approximately $91,000. SEC News: SEC drops lawsuit against Kraken, reducing regulatory pressures on the market. US Senate set to vote on IRS rule affecting crypto & DeFi. Scam Alert: Nine residents in Kent, UK lost £1.2M to scammers using personal data to impersonate police. For detailed insights, visit: Alef Aeronautics | Bitcoin Price Update | SEC Lawsuit Info #Crypto#VC#Bitcoin#SEC#Regulation#Tether#USDC#Investments#EarlyStage#Scams#Blockchain#Funding

Venture Village Wall 🦄

@venturevillagewall · Post #3852 · 12.01.2025 г., 01:00

Investigation Reveals Unusual Money Practices An investigation by Rekt News uncovers hardcoded lies and collapsing pegs in the crypto market, with implications that a founder may be manipulating the situation from both sides. Full details in the report: Rekt News #Crypto#Investigation#Finance#MarketTrends#RektNews#LeviathanNews#Blockchain#DeFi#Web3#Trading#Scams

Venture Village Wall 🦄

@venturevillagewall · Post #3894 · 16.01.2025 г., 16:00

Burwick Law Suing Pump.fun Over Losses ⚖️ Burwick Law to file suit against Pump.fun on behalf of investors who lost significant sums in meme coin platform. Legal experts criticize the dominance of scams and speculative assets in crypto. 📊 6.1M tokens launched with total raised nearing $2.3M. More details here. #Crypto#Law#PumpFun#Investors#MemeCoins#Scams#Investments#Litigation#Finance#BurwickLaw

Venture Village Wall 🦄

@venturevillagewall · Post #3938 · 21.01.2025 г., 13:00

Massive USDC Minting and Meme Coin Scam 🚨 50M USDC minted at USDC Treasury, totaling $50.05M. Meanwhile, investors are falling victim to a scam involving fake Trump-related meme coins. Beware of various tokens like BARRON and IVANKA that are misleadingly launched under false pretenses, all funnelling funds to a scam wallet. ⚠️ Over 600 such tokens already spotted! More details here. AI funding news: - Qventus: $85M for AI healthcare ops. - Prophecy.io: $47M for data pipeline solutions. - Gesynta Pharma: $27.27M for new drugs. - Leap Services: $20M for omnichannel retail platform. - NeuroBionics: $5M for advancing neurotech. - Atlantic Sea Farms: $3.80M for sustainable seaweed farming. Find more funding details in the summary! #USDC#Crypto#AI#Funding#MemeCoins#Scams#Healthcare#Data#Pharma#Retail#Neurotech#Seafood#Tech#Investments#Investing#Finance#Blockchain