Sobes.tech

How does caching work in Dockerfile? How to reduce the time of subsequent builds?

Senior
ПАО Сбербанк
24

from fastapi import FastAPI, UploadFile, Response from fastapi.responses import StreamingResponse from pydantic import BaseModel, field_validator import base64 app = FastAPI() class PdfSchema(BaseModel): filename: str content_type: str data: str # base64 pdf 10мб @app.get("/data", response_model=PdfSchema) async def get_data(): return await service.get_big_data() @app.get("/download") async def download(): with open("big.pdf", "rb") as f: data = f.read() return Response(content=data, media_type="application/pdf") def heavy_pdf_parse(data: bytes) -> dict: # CPU-heavy логика return {"size": len(data)} @app.post("/parse") async def parse(file: UploadFile): content = await file.read() result = heavy_pdf_parse(content) return result @app.get("/users") async def get_users(): users = await repo.get_users() result = [] for u in users: posts = await repo.get_posts(u["id"]) result.append({"user": u, "posts": posts}) return result @app.get("/download-two") async def download_two(): def iterfile(): with open("big.pdf", "rb") as f: yield from f return StreamingResponse(iterfile(), media_type="application/pdf") class service: @staticmethod async def get_big_data(): return { "filename": "file.pdf", "content_type": "application/pdf", "data": base64.b64encode(b"fake").decode(), } class repo: @staticmethod async def get_users(): return [{"id": 1}, {"id": 2}] @staticmethod async def get_posts(user_id: int): return [{"id": 1, "user id": user_id}]

Middle
СБЕРСБЕР
24

On which project did you work the most with Python and what exactly did you do?

Middle
Передовые Платежные Решения
24

Have you been in search or outsourcing/in-house projects or a break since May?

Middle+
Betting Software
24

Tell about your job search experience: how active are you in the search, at what stages are you?

Middle
KTS
24

Situation with code review: [name] wrote a large PR, [name] reviews, PR is hanging — [name] constantly returns with new comments. How to solve tactically and strategically?

Middle
aya
24

Find a fixed-size submatrix KX×KY with the maximum average value of elements

Senior
СБЕРСБЕР
24

Tell me about the product/project you worked on and your main tasks.

Middle+
ARX
24

If a function can legitimately return NaN (which is normal behavior), and your current cache implementation will throw an error in this case or always recalculate — how would you fix this?

Senior
Lamoda Tech
24

In what case are linked lists more efficient than arrays?

Middle
Лига Цифровой ЭкономикиЛига Цифровой Экономики
24

In your own words, tell us how you designed PostgreSQL for a marketplace showcase: business requirements, number of tables, relationships, what is a business entity?

Middle
Ай-Теко (I-Teco)
24

Why did you decide to switch to development?

Middle+
Позитив Технолоджис
24

How was idempotency and error handling ensured?

Middle
Bell IntegratorBell Integrator
24

Can you work on the frontend, checking the flow of processes from point to point?

Senior
сс найм
24

Does HTTP work on TCP or UDP? How does HTTP/3 ensure reliability over UDP?

Middle
ИП Ганус Александр Андреевич
24

What is a coroutine under the hood? How does it store state and switch?

Middle
Исходный код
24

Have you worked with LLM for code generation?

Senior
Сбер. IT
24

Have you worked with Kafka in native mode, just producer-consumer, or was there stream processing? How do you evaluate your experience with Kafka?

Middle
Лига Цифровой ЭкономикиЛига Цифровой Экономики
24

What are the key differences between synchronous and asynchronous programming in Python? Please answer this question orally.

Middle+
AstonAston
24

What is a context manager, why is it needed, and how to create your own?

Middle
ПАО Сбербанк
24
/532