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

Пребарај: #div

当前筛选 #div清除筛选
Data Analytics

@sqlspecialist · Post #2265 · 28.08.2025 г., 02:45

Excel Interview Questionswith Answers Part-1✅ 1. What is Microsoft Excel? Excel is a spreadsheet software developed by Microsoft used for storing, organizing, and analyzing data in tabular form. It supports formulas, functions, charts, and pivot tables to help with data management and visualization. 2. Explain the key features of Excel. Key features include: ⦁ Grid of cells for data entry ⦁ Formulas and functions for calculations ⦁ Pivot Tables for summarizing data ⦁ Charts and graphs for visualization ⦁ Conditional formatting to highlight data ⦁ Data validation and filtering ⦁ Macro recording for automation 3. What are the different types of data you can enter in Excel? Excel accepts: ⦁ Numbers (integers, decimals) ⦁ Text (strings) ⦁ Dates and times ⦁ Boolean values (TRUE/FALSE) ⦁ Formulas ⦁ Errors (like #DIV/0!) ⦁ Blank cells 4. How do you use formulas and functions in Excel? Formulas start with an = sign and perform calculations using arithmetic operators and cell references, e.g., =A1+B1. Functions are pre-built formulas like SUM(), AVERAGE(), which simplify complex calculations, e.g., =SUM(A1:A10). 5. What is the difference between a relative, absolute, and mixed cell reference? ⦁ Relative (e.g., A1): adjusts when copied across cells ⦁ Absolute (e.g., $A$1): stays fixed when copied ⦁ Mixed (e.g., $A1 or A$1): part fixed, part relative 6. What are common Excel functions you have used? Popular functions include: ⦁ SUM(), AVERAGE(), COUNT() ⦁ VLOOKUP(), HLOOKUP() ⦁ IF(), AND(), OR() ⦁ INDEX(), MATCH() ⦁ CONCATENATE() or TEXTJOIN() 7. Explain how to create and use Pivot Tables. Pivot Tables summarize data by grouping and aggregating it dynamically. You select your data range, go to Insert > PivotTable, then drag fields into Rows, Columns, and Values areas to analyze data from different perspectives. 8. How can you filter and sort data in Excel? ⦁ Filter: Select data range, then Data > Filter to add dropdown arrows for column filtering by criteria ⦁ Sort: Select a column or range, then Data > Sort to order data ascending or descending based on one or more columns 9. What is conditional formatting and how is it used? Conditional formatting applies visual formatting (colors, icons) to cells based on defined rules, helping to highlight trends or outliers. For example, cells with values above a threshold can be shaded green. 10. How do you protect a worksheet or workbook? You can protect sheets by going to Review > Protect Sheet and setting a password to restrict editing. Workbook protection via Review > Protect Workbook secures the structure (adding/removing sheets) or windows. React ♥️ if this helped you

Hashtags

KOMPYUTER AKADEMIYASI

@Kompyuter_Akademiyasi · Post #6120 · 12.03.2024 г., 14:50

ДЕЛ/0! xatoligi mazmuni #mohirlik / #excel ❌ Excel dasturida amaliyot bajarilgandan soʻng #DIV/0! (# ДЕЛ/0!) xatoligi kelib chiqsa, demak formulamizda 0 ga boʻlingan qism mavjud (bunday amaliyot esa mumkin emas). 💻 Kompyuterni birga o'rganamiz ⤵️ TelegramIInstagramITikTokIYouTube

KOMPYUTER AKADEMIYASI

@Kompyuter_akademiyasi · Post #5276 · 16.07.2023 г., 15:52

ДЕЛ/0! xatoligi mazmuni #mohirlik / #excel ❌ Excel dasturida amaliyot bajarilgandan soʻng #DIV/0! (# ДЕЛ/0!) xatoligi kelib chiqsa, demak formulamizda 0 ga boʻlingan qism mavjud (bunday amaliyot esa mumkin emas). 💻 Kompyuterni birga o'rganamiz ⤵️ TelegramIInstagramITikTokIYouTube

Telegram android theming variable guide

@Theming_variable_guide · Post #71 · 10.07.2022 г., 10:49

#P_G FORWARDING OPTIONS 👉Info if the color does not change Important, these variables also change many other areas! ➖➖➖ #dch radioBackgroundChecked This 👆variable can be found ONLYin 👉 settings and then 👉 chat settings ➖➖➖ These variables can be found when you are in a chat #gba dialogBackground #div divider #nui actionBarDefaultSubmenuItem actionBarDefaultSubmenuItemIcon #gbu dialogButtonSelector

搜书神器 深夜书屋

@BookLogChannel · Post #450985 · 17.04.2026 г., 09:13

书名:监狱长的性爱日常群交淫乱_高h 1 作者:🔎争渡 文件:简体中文 · TXT · 300KB · 12.1万字 · 22R 统计:443热度 | 527下载 | 4点赞 | 0收藏 评级:2分 (1人) 💬 质量:9.6分 (0人) 标签:#陶悦#承安#岳函#骚穴#袁哲#陶乐#监狱#目录#不要#手指#div#穴里 上传:👤٩(•̤̀ᵕ•̤́๑)ᵒᵏᵎᵎᵎᵎwang #预览#NSFW#收藏书籍 📜我喜欢的书籍[7747本]

Telegram android theming variable guide

@Theming_variable_guide · Post #84 · 10.07.2022 г., 10:49

#P_G SEARCHING IN MAIN WINDOW Important, these variables also change many other areas! 👉Info if the color does not change ➖➖➖ 👉Post 4⃣ | 5⃣ | 6⃣ | 7⃣ @skayeee ➖➖➖ 1⃣ #ytext2 windowBackgroundWhiteGrayText2 2⃣ #tsea actionBarDefaultSearch 3⃣ #Lcu chat_messagePanelCursor 4⃣ #dbl / #r_b avatar_backgroundBlue 5⃣ #nbl / #ar_a avatar_actionBarIconBlue 6⃣ #e_s groupcreate_spanBackground 7⃣ #bla / #ebla windowBackgroundWhiteBlackText 8⃣ #ar_t avatar_text 9⃣ #s_n chats_name 1⃣0⃣ #ytext3 windowBackgroundWhiteGrayText3 1⃣1⃣ #eText4 WindowBackgroundWhiteBlueText4 1⃣2⃣ #yse graySection 1⃣3⃣ #y_g key_graySectionText 1⃣4⃣ #div divider