Skip to content

Instantly share code, notes, and snippets.

View haixuanTao's full-sized avatar
Working from home

Haixuan Xavier Tao haixuanTao

Working from home
View GitHub Profile
@haixuanTao
haixuanTao / record.py
Created November 13, 2024 04:57
record.py
import h5py
import os
from dora import Node
import numpy as np
## Make data dir if it does not exist
if not os.path.exists("data"):
os.makedirs("data")
@haixuanTao
haixuanTao / read_data.py
Created November 5, 2024 06:08
read piper data
from piper_sdk import *
piper_left = C_PiperInterface("can_left")
piper_left.ConnectPort()
piper_right = C_PiperInterface("can_right")
piper_right.ConnectPort()
joint_left = piper_left.GetArmJointMsgs()
@haixuanTao
haixuanTao / install.sh
Last active October 13, 2024 06:31
dora-rs installation from scratch for Linux with machine-id
apt-get update
apt-get install wget unzip curl build-essential tmux -y
wget https://repo.anaconda.com/miniconda/Miniconda3-py311_23.5.2-0-Linux-x86_64.sh
chmod +x ./Miniconda3-py311_23.5.2-0-Linux-x86_64.sh
./Miniconda3-py311_23.5.2-0-Linux-x86_64.sh -bu
export PATH=$PATH:$HOME/miniconda3/bin
conda init bash
source ~/.bashrc
conda activate
nodes:
- id: camera
build: pip install opencv-video-capture
path: opencv-video-capture
inputs:
tick: dora/timer/millis/20
outputs:
- image
env:
CAPTURE_PATH: 0
nodes:
- id: webcam
custom:
source: https://huggingface.co/datasets/dora-rs/dora-idefics2/raw/main/operators/opencv_stream.py
outputs:
- image
- id: idefics2
operator:
python: https://huggingface.co/datasets/dora-rs/dora-idefics2/raw/main/operators/idefics2_op.py
inputs:
## Use `mdbook init --theme` first
## Modify the generated `theme/index.hbs
## Go to <div id="content"> and add below {{ content }
## The script that is generated here: https://giscus.app/
<div id="content" class="content">
<main>
{{{ content }}}
<script src="https://giscus.app/client.js"