This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::{f32::consts::PI, marker::PhantomData}; | |
| use serial::prelude::*; | |
| pub enum Register { | |
| MechOffset = 0x2005, | |
| MechPositionInit = 0x2006, | |
| CanId = 0x200A, | |
| EncoderRaw = 0x3004, | |
| NumRotations = 0x3014, | |
| MechanicalPosition = 0x3016, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use nalgebra::{Matrix3, Matrix4, Matrix6, Vector3, Vector4, Vector6, DMatrix, DVector}; | |
| fn near_zero(val: f64) -> bool { | |
| val.abs() < 1e-6 | |
| } | |
| fn matrix_exp3(so3mat: &Matrix3<f64>) -> Matrix3<f64> { | |
| let omega_theta = so3_to_vec(so3mat); | |
| if near_zero(omega_theta.norm()) { | |
| Matrix3::identity() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Interaction imports | |
| import math | |
| import copy | |
| import os | |
| from dataclasses import dataclass | |
| from typing import List | |
| from tqdm import tqdm | |
| # Dataset imports | |
| from PIL import Image |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| import datetime | |
| import importlib | |
| import signal | |
| import numpy | |
| import datasets | |
| import webdataset | |
| import tensorflow | |
| import torch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://s3.amazonaws.com/kinetics/400/train/part_0.tar.gz | |
| # https://s3.amazonaws.com/kinetics/400/train/part_241.tar.gz | |
| import webdataset as wds | |
| import pandas as pd | |
| import jax | |
| def key_to_filename(sample): | |
| dotslash_filename_shard_count = sample["__key__"] | |
| # the key is something like "./v_ApplyEyeMakeup_00001_00010" |
NewerOlder