Python вопросы с собеседований
Вопросы с собеседований по Python @workakkk - админ @machinelearning_interview - вопросы с собесдований по Ml @pro_python_code - Python @data_analysis_ml - анализ данных на Python @itchannels_telegram - 🔥 главное в ит РКН: clck.ru/3FmrFd
Show more📈 Analytical overview of Telegram channel Python вопросы с собеседований
Channel Python вопросы с собеседований (@python_job_interview) in the Russian language segment is an active participant. Currently, the community unites 24 949 subscribers, ranking 5 328 in the Technologies & Applications category and 26 138 in the Russia region.
📊 Audience metrics and dynamics
Since its creation on невідомо, the project has demonstrated rapid growth, gathering an audience of 24 949 subscribers.
According to the latest data from 27 October, 2026, the channel demonstrates stable activity. Although there has been a change in the number of participants by 85 over the last 30 days and by 9 over the last 24 hours, overall reach remains high.
- Verification status: Not verified
- Engagement rate (ER): The average audience engagement rate is 5.93%. Within the first 24 hours after publication, content typically collects 3.20% reactions from the total number of subscribers.
- Post reach: On average, each post receives 1 481 views. Within the first day, a publication typically gains 798 views.
- Reactions and interaction: The audience actively supports content: the average number of reactions per post is 6.
- Thematic interests: Content is focused on key topics such as github, api, собеседование, git, docker.
📝 Description and content policy
The author describes the resource as a platform for expressing subjective opinions:
“Вопросы с собеседований по Python
@workakkk - админ
@machinelearning_interview - вопросы с собесдований по Ml
@pro_python_code - Python
@data_analysis_ml - анализ данных на Python
@itchannels_telegram - 🔥 главное в ит
РКН: clck.ru/3FmrFd”
Thanks to the high frequency of updates (latest data received on 28 October, 2026), the channel maintains relevance and a high level of publication reach. Analytics show that the audience actively interacts with content, making it an important point of influence in the Technologies & Applications category.
Запуск модели в терминале (чат)
# Чат с моделью прямо в терминале
ollama run mistral
# Модель, заточенная под код
ollama run codellama
# Запуск локального сервера Ollama
ollama serve
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch, time
model_name = "Qwen/Qwen2.5-1.5B-Instruct" # маленькая модель
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.float16, device_map="auto")
prompt = "Explain why smaller models can be better in production:"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
start = time.time()
out = model.generate(**inputs, max_new_tokens=100)
latency = time.time() - start
print(tokenizer.decode(out[0], skip_special_tokens=True))
print(f"Latency: {latency:.2f}s")
# Stage 1 - сборка
FROM python:3.12-slim AS builder
WORKDIR /app
COPY requirements.txt .
RUN pip install --prefix=/install --no-cache-dir -r requirements.txt
COPY . .
# Stage 2 - минимальный рантайм
FROM python:3.12-slim
WORKDIR /app
COPY --from=builder /install /usr/local
COPY --from=builder /app .
RUN useradd -m appuser
USER appuser
CMD ["python", "app.py"]
import pyautogui, time
time.sleep(5)
pyautogui.write("Python рулит!", interval=0.1)
pyautogui.press("enter")
pyautogui.moveTo(500, 500, duration=1)
pyautogui.click()try и except для отлова ошибок, таких как JSONDecodeError. Это поможет вам быстро диагностировать проблемы с форматом данных.
import json
json_data = '{"name": "John", "age": 30}' # Пример корректного JSON
try:
parsed_data = json.loads(json_data)
print(f"Name: {parsed_data['name']}, Age: {parsed_data['age']}")
except json.JSONDecodeError as e:
print(f"Ошибка разбора JSON: {e}")
except KeyError as e:
print(f"Отсутствует ключ: {e}")
except Exception as e:
print(f"Произошла ошибка: {e}")
from fastapi import FastAPI
from pydantic import BaseModel
app = FastAPI()
class Item(BaseModel):
name: str
price: float
is_offer: bool = None
@app.post("/items/", response_model=Item)
async def create_item(item: Item):
return item
@app.get("/")
async def read_root():
return {"message": "Welcome to the FastAPI!"}tracemalloc. Этот инструмент поможет тебе быстро отследить, где происходит выделение памяти, и выявить проблемные участки кода.
import tracemalloc
def memory_leak():
a = []
for i in range(10000):
a.append('leak' * 100)
tracemalloc.start()
memory_leak()
snapshot = tracemalloc.take_snapshot()
top_stats = snapshot.statistics('lineno')
print("[Top 10 memory allocations]")
for stat in top_stats[:10]:
print(stat)
from pathlib import Path
path = Path("app.log")
with path.open("r", encoding="utf-8", buffering=1024 * 1024) as f:
for line in f:
line = line.strip()
if not line or line.startswith("#"):
continue
if "ERROR" in line:
print(line)unittest в Python. Это позволит вам автоматически проверять функциональность и находить ошибки. Вот пример простого теста для функции сложения:
import unittest
def add(a, b):
return a + b
class TestAddFunction(unittest.TestCase):
def test_add_positive(self):
self.assertEqual(add(1, 2), 3)
def test_add_negative(self):
self.assertEqual(add(-1, 1), 0)
def test_add_zero(self):
self.assertEqual(add(0, 0), 0)
if __name__ == '__main__':
unittest.main()
import re
# Пример текста
text = "Контакт: example@example.com, телефон: +7-123-456-7890"
# Регулярные выражения для извлечения email и телефона
email_pattern = r'\b[\w.-]+?@\w+?\.\w{2,4}\b'
phone_pattern = r'\+?\d{1,2}[- ]?\d{3}[- ]?\d{3}[- ]?\d{4}'
# Найти все совпадения
emails = re.findall(email_pattern, text)
phones = re.findall(phone_pattern, text)
# Результат
print("Найденные email:", emails)
print("Найденные телефоны:", phones)