This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
** ____ _ ___ ___ _ _ | |
** | _ \ | | | \/ | | | (_) | |
** | | \ |__ _ _ __| | __ | . . | ___ _ __ ___ | | __ __ _ _ | |
** | | | | _` | '__| |/ / | |\/| |/ _ \| '_ \ / _ \| |/ // _` | | | |
** | |_/ /(_| | | | < | | | | (_) | | | | (_) | <| (_| | | | |
** |____/\__,_|_| |_|\_\ \_| |_/\___/|_| |_|\___/|_|\_\\__,_|_| | |
** | |
** Quassel Theme | |
** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from boto.ec2 import connect_to_region | |
from datetime import datetime, timedelta | |
try: | |
days = int(sys.argv[1]) | |
except IndexError: | |
days = 7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to manually setup flake8 as PyCharm external tool | |
File / Settings / Tools / External Tools / Add | |
Name: Flake8 | |
Program: $PyInterpreterDirectory$/python | |
Parameters: -m flake8 --max-complexity 10 --ignore E501 $FilePath$ | |
Working directory: $ProjectFileDir$ | |
Output Filters / Add | |
Name: Filter 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fastapi import FastAPI, Depends, Query | |
from starlette.requests import Request | |
from starlette.responses import JSONResponse | |
import starlette.status | |
from pydantic import BaseModel, validator | |
import datetime | |
from typing import List | |
from dataclasses import dataclass, field | |