Skip to content

Instantly share code, notes, and snippets.

resized = resize("checkers.jpg", 50)
print(resized.shape)
plt.imshow(resized) # can use cv2.imshow("name", image)
resized = resize("checkers.jpg", 30.5)
print(resized.size)
resized.show("resized image", resized)
resized = resize("checkers.jpg", 30.5)
print(resized.size)
resized.show("resized image", resized)
""" resize.py
"""
from __future__ import annotations
import os
import glob
from pathlib import Path
import sys
import click
from setuptools import setup
setup(
name='resize',
version='0.0.1',
py_modules=['resize'],
install_requires=[
'click',
'pillow',
],
@NicholasBallard
NicholasBallard / .env
Created April 8, 2021 15:28 — forked from eldadfux/.env
Appwrite 0.7 - Stack
_APP_ENV=production
_APP_ENV=development
_APP_SYSTEM_EMAIL_NAME=Appwrite
[email protected]
[email protected]
_APP_OPTIONS_ABUSE=disabled
_APP_OPTIONS_FORCE_HTTPS=disabled
_APP_OPENSSL_KEY_V1=your-secret-key
_APP_DOMAIN=demo.appwrite.io
_APP_DOMAIN_TARGET=demo.appwrite.io
@NicholasBallard
NicholasBallard / get_db_async.py
Created October 15, 2023 15:01
SQLAlchemy async database session object
from contextlib import asynccontextmanager, contextmanager
from typing import Generator
from sqlalchemy import create_engine
from sqlalchemy.ext.asyncio import async_sessionmaker, AsyncEngine, AsyncSession, create_async_engine
from scada.core.config import settings
@contextmanager