ctop
lazydocker
docker image prune -f
docker system prune --all --force
from flask import Flask, request | |
from sqlalchemy import Column, Integer, String | |
from sqlalchemy.ext.asyncio import AsyncSession, create_async_engine | |
from sqlalchemy.future import select | |
from sqlalchemy.orm import declarative_base, sessionmaker | |
engine = create_async_engine('sqlite+aiosqlite:///./db.db') | |
async_session = sessionmaker( | |
engine, expire_on_commit=False, class_=AsyncSession | |
) |
from datetime import datetime, time | |
# FastAPI and Pydantic Related Libraries | |
from time import sleep | |
from apscheduler.events import EVENT_JOB_ERROR | |
from fastapi import FastAPI | |
from pydantic import BaseModel, Field | |
from typing import List |
from typing import List | |
import queue | |
from fastapi import FastAPI, WebSocket, WebSocketDisconnect | |
from fastapi.responses import HTMLResponse | |
from apscheduler.schedulers.asyncio import AsyncIOScheduler | |
app = FastAPI() | |
app.queue_system = queue.Queue() | |
app.queue_limit = 5 |
# routes | |
from fastapi import APIRouter, Depends, HTTPException | |
from starlette.status import HTTP_201_CREATED | |
from starlette.responses import JSONResponse | |
from sqlalchemy.orm import Session | |
from app.core.config import WPS_PROCESS_LINK | |
from app import crud | |
from app.api.utils.db import get_db | |
from app.models.job import ( |
def get_syllables(word): | |
syllables = [] | |
""" | |
Aşağıdaki satır gelen kelimenin ünlü harfler 1, ünsüzler 0 olacak | |
şekilde desenini çıkarır. | |
Örneğin: arabacı -> 1010101, türkiye -> 010010 | |
""" |
docker-compose -f docker-compose.apache.yml up
docker-compose -f docker-compose.nginx+apache.yml up
docker-compose -f docker-compose.nginx+php-fpm.yml up
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |