Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.
 
| import cv2 # needs opencv-python https://pypi.org/project/opencv-python/ | |
| from PIL import Image, ImageOps | |
| from dataclasses import dataclass | |
| @dataclass | |
| class VideoStatus: | |
| time: float = 0 | |
| videoObject: cv2.VideoCapture = None | |
| def __deepcopy__(self, memo): | |
| return self | 
| repos="" | |
| sizes="" | |
| name_lens="" | |
| # Check if user is logged in | |
| if ! aws sts get-caller-identity &> /dev/null; then | |
| echo "ERROR: Seems like your SSO session is invalid. Please run" | |
| printf "\n $ aws sso login\n\n" | |
| echo "before you run the script." | |
| exit 1 | 
| decompose <- function(expr) { | |
| expr <- substitute(expr) | |
| funs <- setdiff(all.names(expr), all.vars(expr)) | |
| wrapped <- list() | |
| for (fun in funs) { | |
| fun_env <- environment(get(fun, envir = parent.frame())) | |
| if(is.null(fun_env)) | |
| namespace <- "base" | |
| else | |
| namespace <- getNamespaceName(fun_env) |