From 2780d165a701d197026dd5ff9a6e93cd3e62c55d Mon Sep 17 00:00:00 2001 From: Miguel Xochicale Date: Tue, 20 Feb 2024 21:44:13 +0000 Subject: [PATCH] adds anr run rerun/examples/minimal #30 --- rerun/README.md | 6 +++++ rerun/examples/minimal/README.md | 15 +++++++++++++ rerun/examples/minimal/main.py | 18 +++++++++++++++ rerun/examples/minimal/requirements.txt | 2 ++ rerun/rrVE.yml | 30 +++++++++++++++++++++++++ 5 files changed, 71 insertions(+) create mode 100644 rerun/examples/minimal/README.md create mode 100644 rerun/examples/minimal/main.py create mode 100644 rerun/examples/minimal/requirements.txt create mode 100644 rerun/rrVE.yml diff --git a/rerun/README.md b/rerun/README.md index 02f731a..7c8b19d 100644 --- a/rerun/README.md +++ b/rerun/README.md @@ -1,5 +1,11 @@ # Rerun is an SDK for visualizing multimodal data that changes over time. +## installation +mamba update -n base mamba +mamba env create -f rrVE.yml +mamba activate rrVE + + ## References https://www.rerun.io/ diff --git a/rerun/examples/minimal/README.md b/rerun/examples/minimal/README.md new file mode 100644 index 0000000..fb5030b --- /dev/null +++ b/rerun/examples/minimal/README.md @@ -0,0 +1,15 @@ +# minimal + +## Download scripts +wget https://raw.githubusercontent.com/rerun-io/rerun/main/examples/python/minimal/requirements.txt +wget https://raw.githubusercontent.com/rerun-io/rerun/main/examples/python/minimal/main.py + + +## Run scripts +mamba activate rrVE +pip install -r requirements.txt +python main.py + + +## Reference +https://github.com/rerun-io/rerun/tree/main/examples/python/minimal diff --git a/rerun/examples/minimal/main.py b/rerun/examples/minimal/main.py new file mode 100644 index 0000000..7be4546 --- /dev/null +++ b/rerun/examples/minimal/main.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 +"""Demonstrates the most barebone usage of the Rerun SDK.""" +from __future__ import annotations + +import sys + +import numpy as np +import rerun as rr # pip install rerun-sdk + +# sanity-check since all other example scripts take arguments: +assert len(sys.argv) == 1, f"{sys.argv[0]} does not take any arguments" + +rr.init("rerun_example_minimal", spawn=True) + +positions = np.vstack([xyz.ravel() for xyz in np.mgrid[3 * [slice(-10, 10, 10j)]]]).T +colors = np.vstack([rgb.ravel() for rgb in np.mgrid[3 * [slice(0, 255, 10j)]]]).astype(np.uint8).T + +rr.log("my_points", rr.Points3D(positions, colors=colors, radii=0.5)) diff --git a/rerun/examples/minimal/requirements.txt b/rerun/examples/minimal/requirements.txt new file mode 100644 index 0000000..fa4ff5d --- /dev/null +++ b/rerun/examples/minimal/requirements.txt @@ -0,0 +1,2 @@ +numpy +rerun-sdk diff --git a/rerun/rrVE.yml b/rerun/rrVE.yml new file mode 100644 index 0000000..820622b --- /dev/null +++ b/rerun/rrVE.yml @@ -0,0 +1,30 @@ +## Some useful commands to manage your conda env: +## LIST MAMBA ENVS: mamba list -n *VE # show list of installed packages +## UPDATE MAMBA: mamba update -n base mamba +## INSTALL MAMBA EV: mamba env create -f *VE.yml +## UPDATE MAMBA ENV: mamba env update -f *VE.yml --prune +## ACTIVATE MAMBA ENV: mamba activate *VE +## REMOVE MAMBA ENV: mamba remove -n *VE --all + +name: rrVE +channels: + - conda-forge +dependencies: + - python=3.11 + - pip + - pip: + - rerun-sdk + #- matplotlib + #- opencv-python + #- scikit-learn + #- notebook + #- pandas + #- seaborn + #- opencv-contrib-python-headless #https://pypi.org/project/opencv-contrib-python-headless/#history + #- araviq6 + #- civiq6 + #- cv2PySide6 + #- qimage2ndarray + #- numpy + +