Skip to content

Instantly share code, notes, and snippets.

View oguzhanmeteozturk's full-sized avatar
:electron:

Oguzhan Mete Ozturk oguzhanmeteozturk

:electron:
  • Stroma Vision Inc.
  • Chicago, Istanbul
  • 02:04 (UTC -05:00)
View GitHub Profile
CREATE OR REPLACE FUNCTION check_flow_complete(flow_id TEXT)
RETURNS BOOLEAN AS $$
DECLARE
flow_total_nodes INTEGER;
flow_total_links INTEGER;
node_count INTEGER;
edge_count INTEGER;
BEGIN
SELECT total_nodes, total_links INTO flow_total_nodes, flow_total_links FROM "Flow" WHERE id = flow_id;
SELECT COUNT(*) INTO node_count FROM "Node" WHERE "flowId" = flow_id;
{"flow_id" : "5", "name" : "", "nodes" : [{"id" : "mrx9u4vbhaug7o5lbxldv1fv", "name" : "dai.ColorCamera"}, {"id" : "recgnn17b1nd9ayuqrdqvozz", "name" : "dai.MonoCamera"}, {"id" : "n8dbzv2lc6jaz43udg4v2mxi", "name" : "dai.VideoEncoder"}, {"id" : "fryw9fdy24f3egb97xwb6hgk", "name" : "dai.StereoDepth"}, {"id" : "o42txmdp6m3qelr5bz1gqe0e", "name" : "dai.MonoCamera"}], "edges" : [{"id" : "gl47aa23dn724m10xui0vcwo", "sourceId" : "mrx9u4vbhaug7o5lbxldv1fv", "targetId" : "recgnn17b1nd9ayuqrdqvozz"}, {"id" : "yy2cw66sm0kytrqxn3nbxwg5", "sourceId" : "recgnn17b1nd9ayuqrdqvozz", "targetId" : "n8dbzv2lc6jaz43udg4v2mxi"}, {"id" : "nsnhuqbqu9x9ne2reiqyxawo", "sourceId" : "n8dbzv2lc6jaz43udg4v2mxi", "targetId" : "fryw9fdy24f3egb97xwb6hgk"}, {"id" : "ru8mfloekezsv1wfhp0dskch", "sourceId" : "n8dbzv2lc6jaz43udg4v2mxi", "targetId" : "o42txmdp6m3qelr5bz1gqe0e"}]}
"""Listens to the database and creates pipelines when a flow is created. and passes the flow to the redis.
Copyright (c) 2023 Stroma Vision Inc.
"""
import json
import queue
from typing import Any
import redis
from http.server import BaseHTTPRequestHandler, HTTPServer
import logging
import sys
COLOR = "\033[1;32m"
RESET_COLOR = "\033[00m"
class S(BaseHTTPRequestHandler):
def _set_response(self):
from realtime.connection import Socket
from realtime.channel import Channel
def getURL(host: str, port: int, service_key: str):
return f"ws://{host}:{port}/realtime/v1/websocket?apikey={service_key}&vsn=1.0.0"
class EventTypes:
RAW_INSERT: str = "INSERT"
# ##############################################################################
# Setup Nvidia Container
# ##############################################################################
FROM nvcr.io/nvidia/deepstream-l4t:6.0.1-triton as deepstream-devel
# # Accept default answers for everything
ARG DEBIAN_FRONTEND=noninteractive
# Fix CUDA info
ARG DPKG_STATUS
# This is a comprehensive list of python dependencies that Elyra requires to execute Jupyter notebooks.
ipykernel==6.9.1
ipython==8.0.1
ipython-genutils==0.2.0
jinja2==3.0.3
jupyter-client==7.1.2
jupyter-core==4.9.2
MarkupSafe==2.1.1
minio==7.1.2
nbclient >= 0.5.0, <=0.6.0