What types of chunking (text segmentation) exist?
Python
import psycopg2 def save_prediction(text: str, result: str): conn = psycopg2.connect("host=db user=app password=secret dbname=ml") cur = conn.cursor() cur.execute( "INSERT INTO predictions (input, output) VALUES (%s, %s)", (text, result) ) conn.commit() cur.close()
Why are microservices popular?
What is the difference between synchronous and asynchronous programming?
Name the main message brokers and their differences.
from src import load_model @app.post("/classify") async def classify(request: dict): text = request["text"] model = load_model("classifier_v1") prediction = model.predict([text]) return {"label": prediction}
What is binary search?
What is the difference between an image and a container in Docker?
Are you familiar with Kubernetes? What is it?
FROM python:3.11-slim WORKDIR /app COPY . RUN pip install -r requirements.txt RUN useradd -m appuser USER appuser EXPOSE 8000 CMD ["python", "main.py"]
What is a fixture in pytest?
What is a neural network from a mathematical point of view? Which branch of mathematics is fundamental for ML?
import aiohttp import asyncio async def fetch_all_tickets(self, ticket_ids: list, max_concurrent_requests: int =10): semaphore = asyncio.Semaphore(max_concurrent_requests) async with aiohttp.ClientSession() as session: tasks = [self._get_ticket(ticket_id, session, semaphore) for ticket_id in ticket_ids] tickets = [] for task in tasks: ticket = await task if ticket is not None: tickets.append(ticket) return tickets
What are your career plans for 3-5 years?
Name four principles of OOP.
What is the semantic difference between the GET and POST methods?
What technologies are you interested in besides Python?
async def call_provider(text: str) -> str: async with aiohttp.ClientSession() as session: async with session.post( "[link] json={"text": text} ) as resp: return await resp.json()
How do you feel about routine tasks like refactoring legacy code?
What is GIL (Global Interpreter Lock)?