From a5a9f7376fc4f131d59db09624e7458992acf117 Mon Sep 17 00:00:00 2001 From: "flojoy-bot[bot]" <136180566+flojoy-bot[bot]@users.noreply.github.com> Date: Sat, 10 Jun 2023 21:39:35 +0100 Subject: [PATCH] fix path related bug (#70) Co-authored-by: smahmed776 --- .../TEXT_DATASET/a1-[autogen]/parameters.yaml | 24 +-- .../TEXT_DATASET/a1-[autogen]/python_code.txt | 3 + .../LOADER/a1-[autogen]/python_code.txt | 16 +- .../OPEN_MATLAB/a1-[autogen]/python_code.txt | 16 +- .../ARITHMETIC/SUBTRACT/examples/EX1/app.txt | 188 ++++++++++++++++++ .../SUBTRACT/examples/EX1/example.md | 3 + .../SUBTRACT/examples/EX1/output.txt | 0 .../a1-[autogen]/python_code.txt | 14 +- .../EDGE_DETECTION/examples/EX1/example.md | 4 +- .../DATA_STRUCTURE/ARRAY_VIEW/ARRAY_VIEW.md | 57 ++++++ .../ARRAY_VIEW/a1-[autogen]/docstring.txt | 12 ++ .../ARRAY_VIEW/a1-[autogen]/parameters.yaml | 0 .../ARRAY_VIEW/a1-[autogen]/python_code.txt | 88 ++++++++ .../ARRAY_VIEW/appendix/hardware.md | 0 .../ARRAY_VIEW/appendix/media.md | 0 .../ARRAY_VIEW/appendix/notes.md | 0 .../ARRAY_VIEW/examples/EX1/app.txt | 134 +++++++++++++ .../ARRAY_VIEW/examples/EX1/example.md | 5 + .../ARRAY_VIEW/examples/EX1/output.txt | 0 .../MATRIX_VIEW/a1-[autogen]/docstring.txt | 12 ++ .../MATRIX_VIEW/examples/EX1/app.txt | 125 ++++++++++++ .../MATRIX_VIEW/examples/EX1/example.md | 3 + .../MATRIX_VIEW/examples/EX1/output.txt | 0 23 files changed, 650 insertions(+), 54 deletions(-) create mode 100644 docs/nodes/TRANSFORMERS/ARITHMETIC/SUBTRACT/examples/EX1/app.txt create mode 100644 docs/nodes/TRANSFORMERS/ARITHMETIC/SUBTRACT/examples/EX1/example.md create mode 100644 docs/nodes/TRANSFORMERS/ARITHMETIC/SUBTRACT/examples/EX1/output.txt create mode 100644 docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/ARRAY_VIEW.md create mode 100644 docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/a1-[autogen]/docstring.txt create mode 100644 docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/a1-[autogen]/parameters.yaml create mode 100644 docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/a1-[autogen]/python_code.txt create mode 100644 docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/appendix/hardware.md create mode 100644 docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/appendix/media.md create mode 100644 docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/appendix/notes.md create mode 100644 docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/examples/EX1/app.txt create mode 100644 docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/examples/EX1/example.md create mode 100644 docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/examples/EX1/output.txt create mode 100644 docs/nodes/VISUALIZERS/DATA_STRUCTURE/MATRIX_VIEW/examples/EX1/app.txt create mode 100644 docs/nodes/VISUALIZERS/DATA_STRUCTURE/MATRIX_VIEW/examples/EX1/example.md create mode 100644 docs/nodes/VISUALIZERS/DATA_STRUCTURE/MATRIX_VIEW/examples/EX1/output.txt diff --git a/docs/nodes/GENERATORS/SAMPLE_DATASETS/TEXT_DATASET/a1-[autogen]/parameters.yaml b/docs/nodes/GENERATORS/SAMPLE_DATASETS/TEXT_DATASET/a1-[autogen]/parameters.yaml index 02da2a1a6d..cf3e37e960 100644 --- a/docs/nodes/GENERATORS/SAMPLE_DATASETS/TEXT_DATASET/a1-[autogen]/parameters.yaml +++ b/docs/nodes/GENERATORS/SAMPLE_DATASETS/TEXT_DATASET/a1-[autogen]/parameters.yaml @@ -1,19 +1,19 @@ -subset: - type: select - options: - - train - - test - - all - default: train categories: - type: array default: '' -remove_headers: - type: boolean - default: false + type: array remove_footers: + default: false type: boolean +remove_headers: default: false -remove_quotes: type: boolean +remove_quotes: default: false + type: boolean +subset: + default: train + options: + - train + - test + - all + type: select diff --git a/docs/nodes/GENERATORS/SAMPLE_DATASETS/TEXT_DATASET/a1-[autogen]/python_code.txt b/docs/nodes/GENERATORS/SAMPLE_DATASETS/TEXT_DATASET/a1-[autogen]/python_code.txt index 37b291e53b..aee5f28b3a 100644 --- a/docs/nodes/GENERATORS/SAMPLE_DATASETS/TEXT_DATASET/a1-[autogen]/python_code.txt +++ b/docs/nodes/GENERATORS/SAMPLE_DATASETS/TEXT_DATASET/a1-[autogen]/python_code.txt @@ -5,8 +5,11 @@ import pandas as pd from typing import cast +# TODO: Add more datasets to this node. @flojoy def TEXT_DATASET(dc_inputs: list[DataContainer], params: dict) -> DataContainer: + + subset = params.get("subset", "train") categories = params.get("categories", None) remove_headers = params.get("remove_headers", False) diff --git a/docs/nodes/LOADERS/CLOUD_DATABASE/LOADER/a1-[autogen]/python_code.txt b/docs/nodes/LOADERS/CLOUD_DATABASE/LOADER/a1-[autogen]/python_code.txt index 3d4714ee88..56b757a1e7 100644 --- a/docs/nodes/LOADERS/CLOUD_DATABASE/LOADER/a1-[autogen]/python_code.txt +++ b/docs/nodes/LOADERS/CLOUD_DATABASE/LOADER/a1-[autogen]/python_code.txt @@ -1,15 +1,11 @@ import json import os -from datetime import datetime import requests from flojoy import DataContainer, flojoy from flojoy.utils import PlotlyJSONEncoder, get_frontier_api_key -FRONTIER_URI: str = ( - os.environ.get("FRONTIER_URI") - or "https://cipfsgeml2.execute-api.us-east-1.amazonaws.com" -) -MEASUREMENT_API: str = f"{FRONTIER_URI}/measurements" +FRONTIER_URI: str = os.environ.get("FRONTIER_URI") or "https://frontier-next.vercel.app" +MEASUREMENT_API: str = f"{FRONTIER_URI}/api/streaming" @flojoy @@ -20,13 +16,11 @@ def LOADER(dc_inputs: list[DataContainer], params: dict) -> DataContainer: if api_key is not None and measurement_uuid != "": try: requests.post( - f"{MEASUREMENT_API}/{measurement_uuid}", + MEASUREMENT_API, json={ "api_key": api_key, - "measurements": json.dumps( - {"data": dc_inputs[0]}, cls=PlotlyJSONEncoder - ), - "time": datetime.now().__str__(), + "measurement_id": measurement_uuid, + "measurement": json.dumps(dc_inputs[0], cls=PlotlyJSONEncoder), }, ) except Exception as e: diff --git a/docs/nodes/LOADERS/LOCAL_FILE_SYSTEM/OPEN_MATLAB/a1-[autogen]/python_code.txt b/docs/nodes/LOADERS/LOCAL_FILE_SYSTEM/OPEN_MATLAB/a1-[autogen]/python_code.txt index 04a49429e7..fb653709ac 100644 --- a/docs/nodes/LOADERS/LOCAL_FILE_SYSTEM/OPEN_MATLAB/a1-[autogen]/python_code.txt +++ b/docs/nodes/LOADERS/LOCAL_FILE_SYSTEM/OPEN_MATLAB/a1-[autogen]/python_code.txt @@ -10,20 +10,7 @@ import pandas as pd def OPEN_MATLAB( dc_inputs: list[DataContainer], params: dict ) -> Union[DataContainer, dict]: - """The OPEN_MATLAB node loads a local file of the .mat file format. - Note that if multiple 'tabs' of data are used, the number of rows - must match in order to stack the arrays. - - Parameters - ---------- - file_path : str - path to the file to be loaded. - - Returns: - -------- - DataContainer: - type 'dataframe', m - """ + file_path: str = params["path"] if file_path == "": @@ -47,4 +34,3 @@ def OPEN_MATLAB( df = pd.DataFrame(np.hstack((X, Y))) return DataContainer(type="dataframe", m=df) - diff --git a/docs/nodes/TRANSFORMERS/ARITHMETIC/SUBTRACT/examples/EX1/app.txt b/docs/nodes/TRANSFORMERS/ARITHMETIC/SUBTRACT/examples/EX1/app.txt new file mode 100644 index 0000000000..0f8e5f7ffe --- /dev/null +++ b/docs/nodes/TRANSFORMERS/ARITHMETIC/SUBTRACT/examples/EX1/app.txt @@ -0,0 +1,188 @@ +{ + "rfInstance": { + "nodes": [ + { + "width": 190, + "height": 115, + "id": "END-06a4da40-a0ae-44ad-873b-9b65d096880a", + "type": "TERMINATOR", + "data": { + "id": "END-06a4da40-a0ae-44ad-873b-9b65d096880a", + "label": "END", + "func": "END", + "type": "TERMINATOR", + "ctrls": {}, + "selected": true + }, + "position": { + "x": 1481.1276538172046, + "y": 301.7443219065692 + }, + "selected": true, + "positionAbsolute": { + "x": 1481.1276538172046, + "y": 301.7443219065692 + }, + "dragging": true + }, + { + "width": 150, + "height": 135, + "id": "LINSPACE-b70dcbec-87fc-47bd-98dc-26c01de91881", + "type": "default", + "data": { + "id": "LINSPACE-b70dcbec-87fc-47bd-98dc-26c01de91881", + "label": "LINSPACE", + "func": "LINSPACE", + "type": "SIMULATION", + "ctrls": { + "start": { + "functionName": "LINSPACE", + "param": "start", + "value": "10" + }, + "end": { + "functionName": "LINSPACE", + "param": "end", + "value": "0" + }, + "step": { + "functionName": "LINSPACE", + "param": "step", + "value": "1000" + } + }, + "selected": false + }, + "position": { + "x": 335.60460405758, + "y": 414.5947652926823 + }, + "selected": false, + "positionAbsolute": { + "x": 335.60460405758, + "y": 414.5947652926823 + }, + "dragging": true + }, + { + "width": 150, + "height": 135, + "id": "LINSPACE-0c193475-a070-4357-b9f6-1cc8320c8a65", + "type": "default", + "data": { + "id": "LINSPACE-0c193475-a070-4357-b9f6-1cc8320c8a65", + "label": "LINSPACE_1", + "func": "LINSPACE", + "type": "SIMULATION", + "ctrls": { + "start": { + "functionName": "LINSPACE", + "param": "start", + "value": "10" + }, + "end": { + "functionName": "LINSPACE", + "param": "end", + "value": "0" + }, + "step": { + "functionName": "LINSPACE", + "param": "step", + "value": "1000" + } + }, + "selected": false + }, + "position": { + "x": 337.2242660007536, + "y": 164.02507602827643 + }, + "selected": false, + "positionAbsolute": { + "x": 337.2242660007536, + "y": 164.02507602827643 + }, + "dragging": true + }, + { + "width": 99, + "height": 115, + "id": "SUBTRACT-be7bf775-eca1-4008-9d78-7164cf815da0", + "type": "ARITHMETIC", + "data": { + "id": "SUBTRACT-be7bf775-eca1-4008-9d78-7164cf815da0", + "label": "SUBTRACT", + "func": "SUBTRACT", + "type": "ARITHMETIC", + "ctrls": {}, + "inputs": [ + { + "name": "y", + "id": "sub_y", + "type": "target" + } + ], + "selected": false + }, + "position": { + "x": 984.775645730269, + "y": 300.51837909623805 + }, + "selected": false, + "positionAbsolute": { + "x": 984.775645730269, + "y": 300.51837909623805 + }, + "dragging": true + } + ], + "edges": [ + { + "source": "SUBTRACT-be7bf775-eca1-4008-9d78-7164cf815da0", + "sourceHandle": "main", + "target": "END-06a4da40-a0ae-44ad-873b-9b65d096880a", + "targetHandle": "END", + "id": "reactflow__edge-SUBTRACT-be7bf775-eca1-4008-9d78-7164cf815da0main-END-06a4da40-a0ae-44ad-873b-9b65d096880aEND" + }, + { + "source": "LINSPACE-0c193475-a070-4357-b9f6-1cc8320c8a65", + "sourceHandle": "main", + "target": "SUBTRACT-be7bf775-eca1-4008-9d78-7164cf815da0", + "targetHandle": "SUBTRACT", + "id": "reactflow__edge-LINSPACE-0c193475-a070-4357-b9f6-1cc8320c8a65main-SUBTRACT-be7bf775-eca1-4008-9d78-7164cf815da0SUBTRACT" + }, + { + "source": "LINSPACE-b70dcbec-87fc-47bd-98dc-26c01de91881", + "sourceHandle": "main", + "target": "SUBTRACT-be7bf775-eca1-4008-9d78-7164cf815da0", + "targetHandle": "sub_y", + "id": "reactflow__edge-LINSPACE-b70dcbec-87fc-47bd-98dc-26c01de91881main-SUBTRACT-be7bf775-eca1-4008-9d78-7164cf815da0sub_y" + } + ], + "viewport": { + "x": 296.7009684013002, + "y": 78.64846027544155, + "zoom": 0.8997754917401063 + } + }, + "ctrlsManifest": [ + { + "type": "input", + "name": "Slider", + "id": "INPUT_PLACEHOLDER", + "hidden": false, + "minHeight": 1, + "minWidth": 2, + "layout": { + "x": 0, + "y": 0, + "h": 2, + "w": 2, + "minH": 1, + "minW": 2, + "i": "INPUT_PLACEHOLDER" + } + } + ] +} diff --git a/docs/nodes/TRANSFORMERS/ARITHMETIC/SUBTRACT/examples/EX1/example.md b/docs/nodes/TRANSFORMERS/ARITHMETIC/SUBTRACT/examples/EX1/example.md new file mode 100644 index 0000000000..3589dec9a3 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/ARITHMETIC/SUBTRACT/examples/EX1/example.md @@ -0,0 +1,3 @@ +In this example, we `SUBTRACT` the outputs of two identical `LINSPACE` nodes. + +As expected, when we check the output of the app, we see 0 everywhere, as expected! \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/ARITHMETIC/SUBTRACT/examples/EX1/output.txt b/docs/nodes/TRANSFORMERS/ARITHMETIC/SUBTRACT/examples/EX1/output.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/nodes/TRANSFORMERS/IMAGE_PROCESSING/EDGE_DETECTION/a1-[autogen]/python_code.txt b/docs/nodes/TRANSFORMERS/IMAGE_PROCESSING/EDGE_DETECTION/a1-[autogen]/python_code.txt index 85f23ac9c5..3dd9b66a7f 100644 --- a/docs/nodes/TRANSFORMERS/IMAGE_PROCESSING/EDGE_DETECTION/a1-[autogen]/python_code.txt +++ b/docs/nodes/TRANSFORMERS/IMAGE_PROCESSING/EDGE_DETECTION/a1-[autogen]/python_code.txt @@ -6,19 +6,7 @@ from PIL import ImageFilter, Image @flojoy def EDGE_DETECTION(dc_inputs: list[DataContainer], params: dict) -> DataContainer: - """The EDGE_DETECTION node detects edges in the image passed to it. - This is done through the the Pillow image filter FIND_EDGES. - Note that the image is converted to greyscale during this processing. - - Parameters - ---------- - None - - Returns - ------- - image - The image with detected edges in white. - """ + dc_input = dc_inputs[0] if dc_input.type != "image": raise ValueError( diff --git a/docs/nodes/TRANSFORMERS/IMAGE_PROCESSING/EDGE_DETECTION/examples/EX1/example.md b/docs/nodes/TRANSFORMERS/IMAGE_PROCESSING/EDGE_DETECTION/examples/EX1/example.md index 698d8f6a36..3fed86f232 100644 --- a/docs/nodes/TRANSFORMERS/IMAGE_PROCESSING/EDGE_DETECTION/examples/EX1/example.md +++ b/docs/nodes/TRANSFORMERS/IMAGE_PROCESSING/EDGE_DETECTION/examples/EX1/example.md @@ -1,3 +1 @@ -In this example the edges of an image are detected using the `EDGE_DETECTION` node. - -The image is loaded using the `LOCAL_FILE` node. In this case the default astronaut image. \ No newline at end of file +ITS AN EDGE DETECTION APP WHICH USES AN EDGE DETECTION FILTER NODE TO DETECT EDGES ON AN IMAGE. \ No newline at end of file diff --git a/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/ARRAY_VIEW.md b/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/ARRAY_VIEW.md new file mode 100644 index 0000000000..853e96c3e2 --- /dev/null +++ b/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/ARRAY_VIEW.md @@ -0,0 +1,57 @@ + +[//]: # (Custom component imports) + +import DocString from '@site/src/components/DocString'; +import PythonCode from '@site/src/components/PythonCode'; +import Parameters from '@site/src/components/Parameters'; +import AppDisplay from '@site/src/components/AppDisplay'; +import SectionBreak from '@site/src/components/SectionBreak'; +import AppendixSection from '@site/src/components/AppendixSection'; + +[//]: # (Docstring) + +import DocstringSource from '!!raw-loader!./a1-[autogen]/docstring.txt'; +import PythonSource from '!!raw-loader!./a1-[autogen]/python_code.txt'; +import ParametersSource from '!!raw-loader!./a1-[autogen]/parameters.yaml'; + +{DocstringSource} +{PythonSource} +{ParametersSource} + + + + + +[//]: # (Examples) + +## Examples + +import Example1 from './examples/EX1/example.md'; +import App1 from '!!raw-loader!./examples/EX1/app.txt'; +import Data1 from '!!raw-loader!./examples/EX1/output.txt'; + + + {App1} + + + + + + + + +[//]: # (Appendix) + +import Notes from '!!raw-loader!./appendix/notes.md'; +import Hardware from '!!raw-loader!./appendix/hardware.md'; +import Media from '!!raw-loader!./appendix/media.md'; + +## Appendix + +{Notes} +{Hardware} +{Media} + + diff --git a/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/a1-[autogen]/docstring.txt b/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/a1-[autogen]/docstring.txt new file mode 100644 index 0000000000..35103dc93c --- /dev/null +++ b/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/a1-[autogen]/docstring.txt @@ -0,0 +1,12 @@ + +The ARRAY_VIEW node takes "ordered_pair", "dataframe", "matrix", and "image" as input type +and displays its visualization in array format. + +Parameters +---------- +None + +Returns +------- +plotly + Visualization of the input data in array format diff --git a/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/a1-[autogen]/parameters.yaml b/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/a1-[autogen]/parameters.yaml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/a1-[autogen]/python_code.txt b/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/a1-[autogen]/python_code.txt new file mode 100644 index 0000000000..654c9a9a47 --- /dev/null +++ b/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/a1-[autogen]/python_code.txt @@ -0,0 +1,88 @@ +from flojoy import flojoy, DataContainer +import plotly.graph_objects as go +import numpy as np +import pandas as pd + +CELL_SIZE = 50 +FONT_SIZE = 10 +MAX_ALLOWED_SHAPE = 10 +l_dot = "$\\ldots$" + + +def numpy_array_as_table(arr: np.ndarray, placeholder: str): + if arr.size > MAX_ALLOWED_SHAPE: + converted_type = arr.astype(object) + new_arr = converted_type[:MAX_ALLOWED_SHAPE] + new_arr[MAX_ALLOWED_SHAPE - 2] = l_dot + else: + new_arr = arr + return new_arr.reshape(-1, 1) + + +@flojoy +def ARRAY_VIEW(dc_inputs: list[DataContainer], params: dict) -> DataContainer: + + + dc_input = dc_inputs[0] + match dc_input.type: + case "ordered_pair": + data = dc_input.y + cell_values = numpy_array_as_table(data, l_dot) + case "dataframe": + data = pd.DataFrame(dc_input.m).to_numpy(dtype=object) + data = data[:, :-1] + cell_values = numpy_array_as_table(data, l_dot) + case "matrix": + data = dc_input.m + cell_values = numpy_array_as_table(data, l_dot) + case "image": + red = dc_input.r + green = dc_input.g + blue = dc_input.b + + if dc_input.a == None: + merge = np.stack((red, green, blue), axis=2) + else: + alpha = dc_inputs[0].a + merge = np.stack((red, green, blue, alpha), axis=2) + + merge = merge.reshape(-1, merge.shape[-1]) + cell_values = numpy_array_as_table(merge, l_dot) + case _: + raise ValueError( + f"unsupported DataContainer type passed for ARRAY_VIEW: {dc_input.type}" + ) + + fig = go.Figure( + data=[ + go.Table( + header=dict(line={"width": 0}, values=[]), + cells=dict( + values=cell_values, + line={"width": 3}, + font={"size": FONT_SIZE}, + height=CELL_SIZE, + align="center", + format=[".3"], + ), + ) + ] + ) + if dc_input.type == "image" or dc_input.type == "dataframe": + width = MAX_ALLOWED_SHAPE * CELL_SIZE + 800 + + else: + width = MAX_ALLOWED_SHAPE * CELL_SIZE + 80 + height = width + 80 + fig.layout = go.Layout( + autosize=False, + width=width, + height=height, + margin=dict(l=0, r=0, t=0, b=0), + xaxis=dict(visible=False), + yaxis=dict(visible=False), + hovermode="closest", + font=dict(size=FONT_SIZE), + ) + + return DataContainer(type="plotly", fig=fig) diff --git a/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/appendix/hardware.md b/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/appendix/hardware.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/appendix/media.md b/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/appendix/media.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/appendix/notes.md b/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/appendix/notes.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/examples/EX1/app.txt b/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/examples/EX1/app.txt new file mode 100644 index 0000000000..c3cb26e982 --- /dev/null +++ b/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/examples/EX1/app.txt @@ -0,0 +1,134 @@ +{ + "rfInstance": { + "nodes": [ + { + "width": 210, + "height": 130, + "id": "END-d1db4ad1-e647-4059-b60f-173210b3f769", + "type": "TERMINATOR", + "data": { + "id": "END-d1db4ad1-e647-4059-b60f-173210b3f769", + "label": "END", + "func": "END", + "type": "TERMINATOR", + "ctrls": {}, + "selected": false + }, + "position": { + "x": 1066.7749715880866, + "y": 253.50666759254665 + }, + "selected": false, + "positionAbsolute": { + "x": 1066.7749715880866, + "y": 253.50666759254665 + }, + "dragging": true + }, + { + "width": 150, + "height": 150, + "id": "LINSPACE-1fbf482b-1149-49c0-8733-fa70d153dba3", + "type": "default", + "data": { + "id": "LINSPACE-1fbf482b-1149-49c0-8733-fa70d153dba3", + "label": "LINSPACE", + "func": "LINSPACE", + "type": "SIMULATION", + "ctrls": { + "start": { + "functionName": "LINSPACE", + "param": "start", + "value": 10 + }, + "end": { + "functionName": "LINSPACE", + "param": "end", + "value": 0 + }, + "step": { + "functionName": "LINSPACE", + "param": "step", + "value": 1000 + } + }, + "selected": false + }, + "position": { + "x": -51.90922250527529, + "y": 240.49397658402108 + }, + "selected": false, + "positionAbsolute": { + "x": -51.90922250527529, + "y": 240.49397658402108 + }, + "dragging": true + }, + { + "width": 240, + "height": 260, + "id": "ARRAY_VIEW-f74a04cc-1bc3-4bf8-bb01-d7b621375162", + "type": "PLOTLY_VISOR", + "data": { + "id": "ARRAY_VIEW-f74a04cc-1bc3-4bf8-bb01-d7b621375162", + "label": "ARRAY VIEW", + "func": "ARRAY_VIEW", + "type": "DATA_STRUCTURE", + "ctrls": {}, + "selected": true + }, + "position": { + "x": 450.5469442156465, + "y": 183.00350555773372 + }, + "selected": true, + "positionAbsolute": { + "x": 450.5469442156465, + "y": 183.00350555773372 + }, + "dragging": true + } + ], + "edges": [ + { + "source": "LINSPACE-1fbf482b-1149-49c0-8733-fa70d153dba3", + "sourceHandle": "main", + "target": "ARRAY_VIEW-f74a04cc-1bc3-4bf8-bb01-d7b621375162", + "targetHandle": "ARRAY_VIEW", + "id": "reactflow__edge-LINSPACE-1fbf482b-1149-49c0-8733-fa70d153dba3main-ARRAY_VIEW-f74a04cc-1bc3-4bf8-bb01-d7b621375162ARRAY_VIEW" + }, + { + "source": "ARRAY_VIEW-f74a04cc-1bc3-4bf8-bb01-d7b621375162", + "sourceHandle": "main", + "target": "END-d1db4ad1-e647-4059-b60f-173210b3f769", + "targetHandle": "END", + "id": "reactflow__edge-ARRAY_VIEW-f74a04cc-1bc3-4bf8-bb01-d7b621375162main-END-d1db4ad1-e647-4059-b60f-173210b3f769END" + } + ], + "viewport": { + "x": 383.94248946966945, + "y": 153.35910915060867, + "zoom": 1.1608238532718647 + } + }, + "ctrlsManifest": [ + { + "type": "input", + "name": "Slider", + "id": "INPUT_PLACEHOLDER", + "hidden": false, + "minHeight": 1, + "minWidth": 2, + "layout": { + "x": 0, + "y": 0, + "h": 2, + "w": 2, + "minH": 1, + "minW": 2, + "i": "INPUT_PLACEHOLDER" + } + } + ] +} \ No newline at end of file diff --git a/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/examples/EX1/example.md b/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/examples/EX1/example.md new file mode 100644 index 0000000000..3bb70ef9ce --- /dev/null +++ b/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/examples/EX1/example.md @@ -0,0 +1,5 @@ +In this example, `LINSPACE` passes the array that the value continuously decreases as the indices increase. + +The first index value is `10` and the last index value is `0`. + +The array is passed down to `ARRAY_VIEW`, and the visualization of this result is available. \ No newline at end of file diff --git a/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/examples/EX1/output.txt b/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/examples/EX1/output.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/nodes/VISUALIZERS/DATA_STRUCTURE/MATRIX_VIEW/a1-[autogen]/docstring.txt b/docs/nodes/VISUALIZERS/DATA_STRUCTURE/MATRIX_VIEW/a1-[autogen]/docstring.txt index e69de29bb2..afb8a7527b 100644 --- a/docs/nodes/VISUALIZERS/DATA_STRUCTURE/MATRIX_VIEW/a1-[autogen]/docstring.txt +++ b/docs/nodes/VISUALIZERS/DATA_STRUCTURE/MATRIX_VIEW/a1-[autogen]/docstring.txt @@ -0,0 +1,12 @@ + +The MATRIX_VIEW node "matrix" or "ordered_pair" type as input type and displays its visualization +using plotly table in matrix format. + +Parameters +---------- +None + +Returns +------- +plotly + Visualization of the input data in matrix format diff --git a/docs/nodes/VISUALIZERS/DATA_STRUCTURE/MATRIX_VIEW/examples/EX1/app.txt b/docs/nodes/VISUALIZERS/DATA_STRUCTURE/MATRIX_VIEW/examples/EX1/app.txt new file mode 100644 index 0000000000..505c6a6fbc --- /dev/null +++ b/docs/nodes/VISUALIZERS/DATA_STRUCTURE/MATRIX_VIEW/examples/EX1/app.txt @@ -0,0 +1,125 @@ +{ + "rfInstance": { + "nodes": [ + { + "width": 150, + "height": 150, + "id": "MATMUL-6b9405af-2106-43ff-bea1-dbab31afe1c0", + "type": "MATRIX_MANIPULATION", + "data": { + "id": "MATMUL-6b9405af-2106-43ff-bea1-dbab31afe1c0", + "label": "MATMUL", + "func": "MATMUL", + "type": "MATRIX_MANIPULATION", + "ctrls": {}, + "inputs": [ + { + "name": "y", + "id": "matmul_y", + "type": "target" + } + ], + "selected": false + }, + "position": { + "x": 51.30881719559784, + "y": 253.37565457062772 + }, + "selected": false, + "positionAbsolute": { + "x": 51.30881719559784, + "y": 253.37565457062772 + }, + "dragging": true + }, + { + "width": 210, + "height": 130, + "id": "END-d1db4ad1-e647-4059-b60f-173210b3f769", + "type": "TERMINATOR", + "data": { + "id": "END-d1db4ad1-e647-4059-b60f-173210b3f769", + "label": "END", + "func": "END", + "type": "TERMINATOR", + "ctrls": {}, + "selected": false + }, + "position": { + "x": 1066.7749715880866, + "y": 253.50666759254665 + }, + "selected": false, + "positionAbsolute": { + "x": 1066.7749715880866, + "y": 253.50666759254665 + }, + "dragging": true + }, + { + "width": 240, + "height": 260, + "id": "MATRIX_VIEW-0839dd9e-2f8a-42ea-9df3-c1b362f56e8f", + "type": "PLOTLY_VISOR", + "data": { + "id": "MATRIX_VIEW-0839dd9e-2f8a-42ea-9df3-c1b362f56e8f", + "label": "MATRIX VIEW", + "func": "MATRIX_VIEW", + "type": "DATA_STRUCTURE", + "ctrls": {}, + "selected": true + }, + "position": { + "x": 536.733844813559, + "y": 179.07792896180706 + }, + "selected": true, + "positionAbsolute": { + "x": 536.733844813559, + "y": 179.07792896180706 + }, + "dragging": true + } + ], + "edges": [ + { + "source": "MATRIX_VIEW-0839dd9e-2f8a-42ea-9df3-c1b362f56e8f", + "sourceHandle": "main", + "target": "END-d1db4ad1-e647-4059-b60f-173210b3f769", + "targetHandle": "END", + "id": "reactflow__edge-MATRIX_VIEW-0839dd9e-2f8a-42ea-9df3-c1b362f56e8fmain-END-d1db4ad1-e647-4059-b60f-173210b3f769END" + }, + { + "source": "MATMUL-6b9405af-2106-43ff-bea1-dbab31afe1c0", + "sourceHandle": "main", + "target": "MATRIX_VIEW-0839dd9e-2f8a-42ea-9df3-c1b362f56e8f", + "targetHandle": "MATRIX_VIEW", + "id": "reactflow__edge-MATMUL-6b9405af-2106-43ff-bea1-dbab31afe1c0main-MATRIX_VIEW-0839dd9e-2f8a-42ea-9df3-c1b362f56e8fMATRIX_VIEW" + } + ], + "viewport": { + "x": 383.94248946966945, + "y": 153.35910915060867, + "zoom": 1.1608238532718647 + } + }, + "ctrlsManifest": [ + { + "type": "input", + "name": "Slider", + "id": "INPUT_PLACEHOLDER", + "hidden": false, + "minHeight": 1, + "minWidth": 2, + "layout": { + "x": 0, + "y": 0, + "h": 2, + "w": 2, + "minH": 1, + "minW": 2, + "i": "INPUT_PLACEHOLDER" + } + } + ] +} \ No newline at end of file diff --git a/docs/nodes/VISUALIZERS/DATA_STRUCTURE/MATRIX_VIEW/examples/EX1/example.md b/docs/nodes/VISUALIZERS/DATA_STRUCTURE/MATRIX_VIEW/examples/EX1/example.md new file mode 100644 index 0000000000..886bc215e5 --- /dev/null +++ b/docs/nodes/VISUALIZERS/DATA_STRUCTURE/MATRIX_VIEW/examples/EX1/example.md @@ -0,0 +1,3 @@ +In this example, `MATMULT` multiplies two matrices which are `a : np.ndarray = np.asarray([[3,1,2], [5,6,4], [5,8,9]])` and `b : np.ndarray = np.asarray([[1,2,3], [4,5,6], [7,8,9]])`. + +The calculation is passed down to `MATRIX_VIEW`, and the visualization of this result is available. diff --git a/docs/nodes/VISUALIZERS/DATA_STRUCTURE/MATRIX_VIEW/examples/EX1/output.txt b/docs/nodes/VISUALIZERS/DATA_STRUCTURE/MATRIX_VIEW/examples/EX1/output.txt new file mode 100644 index 0000000000..e69de29bb2