def init() -> None: db = SessionLocal() create_user( db, UserCreate( email="*****@*****.**", password="******", is_active=True, is_superuser=True, ), )
def init() -> None: db = SessionLocal() create_user( db, UserCreate( email="{{cookiecutter.superuser_email}}", password="******", is_active=True, is_superuser=True, ), )
def init() -> None: db = SessionLocal() admin_user_exists = get_user_by_email(db, "*****@*****.**") if not admin_user_exists: create_user( db, UserCreate( email="*****@*****.**", password="******", is_active=True, is_superuser=True, ), )
def init() -> None: db = SessionLocal() create_user( db, UserCreate( email="*****@*****.**", first_name="Iosif", last_name="Takakura", password="******", is_active=True, is_superuser=True, ), )
def init() -> None: db = SessionLocal() first_user = create_user( db, UserCreate( email="*****@*****.**", password="******", is_active=True, is_superuser=True, ), ) with open('joined_init_rankings.json') as fh: data = json.loads(fh.read()) for _record in data: create_rankings(db, RankingBase( name=_record['name'], created_date=data.today(), ranking=_record['ranking'], number_of_countries=_record['number_of_countries'], source=_record['source'], user_id=first_user.id ), first_user.id)
def init() -> None: db = SessionLocal() Base.metadata.create_all(bind=engine) create_user( db, UserCreate( email="*****@*****.**", password="******", is_active=True, is_superuser=True, ), ) create_model( db, ModelCreate( name="YOLOv4-init", is_active=True, model_type="YOLOv4 pytorch", created_time="2020-12-01T15:53:00+08:00", description="Initial YOLOv4 model using default hyperparameters", input_width=416, input_height=416, weight_size=255)) create_model( db, ModelCreate(name="YOLOv4-r", is_active=True, model_type="YOLOv4 pytorch", created_time="2020-12-01T15:53:00+08:00", description="YOLOv4 model changed input size (ratio)", input_width=544, input_height=320, weight_size=255)) create_model( db, ModelCreate(name="YOLOv4-a", is_active=True, model_type="YOLOv4 pytorch", created_time="2020-12-01T15:53:00+08:00", description="YOLOv4 model changed anchor boxes", input_width=416, input_height=416, weight_size=255)) # create_model( # db, # ModelCreate( # name="YOLOv4-s", # is_active=True, # model_type="YOLOv4 pytorch", # created_time="2020-12-01T15:53:00+08:00", # description="YOLOv4 model changed input size (increase size)", # input_width=512, # input_height=512, # weight_size=255 # ) # ) create_model( db, ModelCreate(name="YOLOv4-n", is_active=True, model_type="YOLOv4 pytorch", created_time="2020-12-01T15:53:00+08:00", description="YOLOv4 model changed network structure", input_width=416, input_height=416, weight_size=255)) create_model( db, ModelCreate(name="YOLOv4-final", is_active=True, model_type="YOLOv4 pytorch", created_time="2020-12-01T15:53:00+08:00", description="YOLOv4 model combine all optimizations", input_width=672, input_height=384, weight_size=255))