Autogenerate a graphql schema from sqlalchemy models.
This is the movies and directors schema from the strawberry fastapi-sqlalchemy example.
class Director(Base):| # render `period for system_time` clause for mssql temporal tables | |
| # example (specifically pay attention to the info argument passed to sys_end_time) | |
| # the render_period has to reference the column names used to track the system start and end time | |
| # class Card(Base): | |
| # sys_start_time = Column( | |
| # DATETIME2, | |
| # Computed(text("ROW START HIDDEN")), | |
| # nullable=False, | |
| # info={"is_temporal": True}, | |
| # ) |
| import { useEffect, useMemo, useRef } from "react"; | |
| import { Options, useVirtual as useVirtualImpl } from "react-virtual"; | |
| // implementation of useVirtual that handles resizes after the element renders | |
| // from https://codesandbox.io/s/usevirtualresizeobserver-04-11-2021-75ye2?file=/src/useVirtual.tsx | |
| // found from this issue https://github.com/TanStack/react-virtual/issues/28 | |
| // which linked to this comment https://github.com/TanStack/react-virtual/discussions/212#discussioncomment-1587478 | |
| const defaultKeyExtractor = (index: number) => index; |
| import paper from "paper"; | |
| import RBush from "rbush"; | |
| import knn from "rbush-knn"; | |
| // settings | |
| // limit at which points are connected | |
| // limit at which things are viewed by the mouse | |
| /** | |
| * radius in which dots are considered nearby |
Autogenerate a graphql schema from sqlalchemy models.
This is the movies and directors schema from the strawberry fastapi-sqlalchemy example.
class Director(Base):| from __future__ import annotations | |
| import typing as t | |
| import strawberry | |
| from sqlmodel import Field, Relationship, SQLModel | |
| from .filter_generators import create_array_relationship_type, create_query_root | |
| import typing as t | |
| import pydantic | |
| import strawberry | |
| class UserModel(pydantic.BaseModel): | |
| age: int | |
| password: t.Optional[str] |
| "vim.normalModeKeyBindingsNonRecursive": [ | |
| // use ctrl-hjkl to navigate splits instead of (ctrl+w + h) | |
| { | |
| "after": ["<C-w>", "h"], | |
| "before": ["<C-h>"] | |
| }, | |
| { | |
| "after": ["<C-w>", "j"], | |
| "before": ["<C-j>"] | |
| }, |
Fill these out when you start a project. Copy the file every week or two and modify your answers as you learn more and your idea becomes clearer.
| the 23135851162 | |
| of 13151942776 | |
| and 12997637966 | |
| to 12136980858 | |
| a 9081174698 | |
| in 8469404971 | |
| for 5933321709 | |
| is 4705743816 | |
| on 3750423199 | |
| that 3400031103 |
| #!/bin/bash | |
| # install commitizen, standard-version, husky, and commitilnt | |
| yarn add -D commitizen standard-version husky @commitlint/{config-conventional,cli} | |
| # initialize commitizen | |
| ./node_modules/.bin/commitizen init cz-conventional-changelog --yarn --save-dev --save-exact --force | |
| # install husky | |
| yarn husky install | |
| # prepare commit msg with commitizen | |
| yarn husky add .husky/prepare-commit-msg "exec < /dev/tty && git cz --hook || true" |