Created
June 18, 2024 08:45
-
-
Save colonelpanic8/848c636190bd308a5444b3cd5cf706c7 to your computer and use it in GitHub Desktop.
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 typing import Any | |
| from sqlalchemy.orm import Session | |
| from railbird import util | |
| from railbird.datatypes import models | |
| util, Session | |
| try: | |
| container: Any | |
| session: Session | |
| context["container"] # noqa: F821 | |
| except Exception: | |
| context: dict | |
| container = object() | |
| session = Session() | |
| context = None | |
| context["shot_count"] = ( | |
| session.query(models.ShotModel) | |
| .where( | |
| models.ShotModel.annotation_any( | |
| models.ShotModel.annotation_all( | |
| "(l.3) True Positive - Likely Confounding", "(l.2) True Positive" | |
| ), | |
| "(l.1) False Positive", | |
| ) | |
| ) | |
| .count() | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment