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

Резултати

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

Пребарај: #ctxc

当前筛选 #ctxc清除筛选
Crypto Profit Coach™

@cryptoprofitcoach · Post #8447 · 11.11.2022 г., 11:32

#CTXC👈 https://www.binance.com/en/trade/CTXC_BTC Buyzone 470 - 485 👆 Buy in parts 👈strictly follow for max profits Sell 🤑 509-533 🤑 533 -570 🤑 570- 610 🚀 610-650 Exit/Re-Entry point-450

Hashtags

Crypto Profit Coach™

@cryptoprofitcoach · Post #8414 · 28.10.2022 г., 16:37

#CTXC👈 https://www.binance.com/en/trade/CTXC_BTC Buyzone 510 - 524 👆 Buy in parts 👈strictly follow for max profits Sell 🤑 550-620 🤑 620 -650 🤑 650- 700 🚀 700-750 💃 750 -800 & above Exit/Re-Entry point-480

Hashtags

Crypto Profit Coach™

@cryptoprofitcoach · Post #8377 · 20.10.2022 г., 05:29

#CTXC👈 https://www.binance.com/en/trade/CTXC_BTC Buyzone 510 - 526 👆 Buy in parts 👈strictly follow for max profits Sell 🤑 570-620 🤑 620 -650 🤑 650- 700 🚀 700-750 💃 750 -800 & above Exit/Re-Entry point-480

Hashtags

Crypto Profit Coach™

@cryptoprofitcoach · Post #8302 · 30.09.2022 г., 09:00

#CTXC👈 https://www.binance.com/en/trade/CTXC_BTC Buyzone 550 - 570 👆 Buy in parts 👈strictly follow for max profits Sell 🤑 620 -650 🤑 650- 700 🚀 700-750 💃 750 -800 & above Exit/SL-500

Hashtags

Crypto Profit Coach™

@cryptoprofitcoach · Post #8621 · 01.01.2023 г., 04:57

December Signal Report👇 #Signal- Profit% #MLN- 25% #IDEX-14% #AGIX-54% #CTXC-208% #REQ-25% #CTSI-46% #ELF-18% #ASR-open #ARDR-100% #ELF-29% #AION-10% #MLN-10% #MDX-12% #ACM-10% #DOCK-open #FXS-open/shift #CTSI-open/in profit #AGIX-11% #ADX-open #ACH-15% #MDX-open #MLN-10% #AION-34% Total profit-631%🤑🤑🤑🔥

#ALT market update with some free alpha 🔩 👉JASMY recently added AI to its roadmap, but the move is seen as risky and lacking confidence. AI is expected to be the main trend in 2023, with cryptocurrencies such as #FET, #CTXC, #NMR, #AGIX, and #PHB likely to benefit. 👉ACH has introduced a crypto on-ramp payment solution in Vietnam, where 30-50% of the population is invested in cryptocurrencies. The company also provides incentives for Twitter payments and is obtaining a Hong Kong license, making it a good mid-term investment. 👉CFX's founder has proposed the implementation of a burn mechanism, seeking community approval. If approved, a pump is expected similar to #RENDER. The company is also working with China, making it a good mid-term investment. 👉#RENDER is considered a good long-term investment as it operates in the GPU/VR field and has a burn mechanism in place. Additionally, it has a partnership with Apple and is poised to benefit from the growing trend in AI. 👉Arb cryptocurrencies are good investments during their respective seasons. To invest, buy on dips and hold. Some recommended Zk coins are #SYS, #DUSK, #MINA, #IMX, #CTSI, #MATIC, and #LRC. For arb, consider cryptocurrencies operating in the dex/perp/defi field such as #GMX, #GNS, #BFR, #RPL, and #GMD. 👉The ETH Shanghai update is due in Q1/Q2 with cryptocurrencies such as #FIS, #LDO, #RPL, #FXS, and #ANKR expected to benefit. 👉Finally, we believe that Chinese/Korean/Asian investors are driving the recent market pump. 2023 is the year to invest in China, so take advantage of this opportunity and good luck!

Coinlegs Cryptocurrency Signals

@coinlegs · Post #9786 · 26.01.2024 г., 02:03

🐬DOLPHIN | AI PREDICTIONS 26.01.2024 02:00 GMT Expected 5% Profit/Loss in 24 Hours #PORTO | 2.478 | PP: 51% | LP: 93% #PROM | 8.059 | PP: 49% | LP: 91% #LAZIO | 2.576 | PP: 46% | LP: 90% #DUSK | 0.2487 | PP: 46% | LP: 94% #PENDLE | 2.4848 | PP: 43% | LP: 93% #OM | 0.09924 | PP: 42% | LP: 90% #CVP | 0.3888 | PP: 36% | LP: 93% #SYN | 0.8595 | PP: 36% | LP: 95% #CHZ | 0.11037 | PP: 34% | LP: 93% #TRX | 0.11277 | PP: 33% | LP: 93% #POND | 0.01638 | PP: 31% | LP: 94% #CHR | 0.2542 | PP: 30% | LP: 94% #FIS | 0.392 | PP: 29% | LP: 91% #CTSI | 0.2212 | PP: 28% | LP: 93% #FXS | 10.035 | PP: 28% | LP: 94% #MKR | 2084 | PP: 28% | LP: 95% #ORDI | 51.163 | PP: 26% | LP: 90% #AMB | 0.00751 | PP: 25% | LP: 90% #BTCDOWN | 0.002722 | PP: 25% | LP: 93% #LSK | 1.301 | PP: 25% | LP: 95% #VTHO | 0.002161 | PP: 24% | LP: 92% #CITY | 2.958 | PP: 24% | LP: 93% #LDO | 2.999 | PP: 24% | LP: 93% #1000SATS | 0.0003885 | PP: 23% | LP: 91% #AUCTION | 24.96 | PP: 23% | LP: 93% #NMR | 19.46 | PP: 22% | LP: 94% #CTXC | 0.4164 | PP: 22% | LP: 95% #AMP | 0.003401 | PP: 21% | LP: 92% #SKL | 0.07252 | PP: 21% | LP: 93% #ALPINE | 2.074 | PP: 21% | LP: 94% #PROS | 0.5028 | PP: 21% | LP: 95% #PSG | 3.253 | PP: 20% | LP: 91% #WING | 8.78 | PP: 20% | LP: 92% #ACM | 2.047 | PP: 20% | LP: 94% #ASTR | 0.1674 | PP: 20% | LP: 94% #MAV | 0.5367 | PP: 20% | LP: 96% #MULTI | 2.202 | PP: 20% | LP: 96% #NTRN | 1.0397 | PP: 19% | LP: 91% #RAD | 1.867 | PP: 19% | LP: 92% #XMR | 157.8 | PP: 19% | LP: 92% #DATA | 0.0461 | PP: 19% | LP: 95% #SEI | 0.6017 | PP: 19% | LP: 96% #INJ | 31.39 | PP: 18% | LP: 93% #RLC | 2.09 | PP: 18% | LP: 95% #DIA | 0.4029 | PP: 17% | LP: 93% #BNX | 0.2869 | PP: 16% | LP: 90% #KMD | 0.2419 | PP: 16% | LP: 90% #RPL | 28.39 | PP: 16% | LP: 91% #SSV | 28.74 | PP: 16% | LP: 91% #ORN | 0.8144 | PP: 16% | LP: 93% ... ——————————————————————— Total Predictions: 368 PP > 50%: 1 LP > 50%: 368 PP > 60%: 0 LP > 60%: 368 PP > 70%: 0 LP > 70%: 367 PP > 80%: 0 LP > 80%: 357 PP > 90%: 0 LP > 90%: 219 ——————————————————————— PP: Profit Probability | LP: Loss Probability