<a href="https://fitzypop.deno.dev" target="_blank" rel="noopener noreferrer">Fitzypop's Blog</a>
This file contains hidden or 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
| -- Return a bool if enum exists | |
| CREATE OR REPLACE FUNCTION enum_exists(enum_name text, enum_schema text DEFAULT 'public') | |
| RETURNS boolean | |
| LANGUAGE sql | |
| AS $$ | |
| SELECT EXISTS ( | |
| SELECT 1 | |
| FROM pg_type t | |
| JOIN pg_namespace n ON t.typnamespace = n.oid | |
| WHERE t.typname = enum_name |
This file contains hidden or 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 typer | |
| app = typer.Typer(context_settings={"help_options_names": ["-h","--help"]}) | |
| # ... | |
| if __name__ == "__main__": | |
| app() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
I recently upgrade my mac to 12.6, and xcode command line tools is now in an install loop. Preventing me from running make commands, I found this stack overflow post.
TL;DR: my need to reset path to xcode tools (I think)
xcode-select -s /Library/Developer/CommandLineTools
This file contains hidden or 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 contextlib import contextmanager | |
| from typing import Generator | |
| from sqlalchemy import create_engine | |
| from sqlalchemy.orm import Session, scoped_session, sessionmaker | |
| @contextmanager | |
| def scoped_session_maker( | |
| db_conn: str, |
NewerOlder