Реализовать lab4 на оценку 4: SeaweedFS, вложения и согласованность БД/S3.
Перенесён стенд lab3 (API, Redis-сессии, идемпотентность, HAProxy, реплики API). Добавлены приватный bucket SeaweedFS с отдельным ключом API, загрузка PNG/JPEG с лимитами и полной проверкой, компенсация и reconciler, плавная остановка API, тесты и evidence.
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
@@ -0,0 +1,17 @@
|
||||
"""Regenerate synthetic JPEG fixtures (needs Pillow; run once in a throwaway container):
|
||||
|
||||
docker run --rm -v "$PWD/student-tests/fixtures:/out" python:3.12.8-slim-bookworm \
|
||||
sh -c "pip install -q pillow==11.0.0 && python /out/make_jpeg_fixtures.py"
|
||||
"""
|
||||
|
||||
from PIL import Image
|
||||
|
||||
im = Image.new("RGB", (320, 200))
|
||||
px = im.load()
|
||||
for y in range(200):
|
||||
for x in range(320):
|
||||
px[x, y] = (x * 255 // 319, y * 255 // 199, (x + y) % 256)
|
||||
im.save("/out/sample.jpg", "JPEG", quality=85)
|
||||
im.save("/out/progressive.jpg", "JPEG", quality=80, progressive=True)
|
||||
im.convert("L").save("/out/gray.jpg", "JPEG", quality=80)
|
||||
print("ok")
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.3 KiB |
Reference in New Issue
Block a user