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
| #!/bin/bash | |
| set -ex | |
| source /opt/ros/$ROS_DISTRO/setup.bash | |
| mkdir /tmp/foxglove-build && cd /tmp/foxglove-build && mkdir src | |
| cat <<EOF | vcs import src | |
| - git: | |
| local-name: foxglove-sdk/foxglove_bridge | |
| uri: https://github.com/ros2-gbp/foxglove_bridge-release.git | |
| version: release/$ROS_DISTRO/foxglove_bridge/0.8.5-1 |
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 asyncio | |
| import os | |
| from contextlib import asynccontextmanager | |
| from typing import Any | |
| import sqlalchemy as sa | |
| from dependency_injector import providers | |
| from dependency_injector.containers import DeclarativeContainer | |
| from dependency_injector.wiring import Provide, inject | |
| from fastapi import APIRouter, Depends, FastAPI |
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 asyncio | |
| import os | |
| from contextlib import asynccontextmanager | |
| import sqlalchemy as sa | |
| from dependency_injector import providers | |
| from dependency_injector.containers import DeclarativeContainer | |
| from dependency_injector.wiring import Provide, inject | |
| from fastapi import Depends, FastAPI | |
| from sqlalchemy.ext.asyncio import ( |
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
| # Build stage | |
| FROM node:16 as build | |
| WORKDIR /src | |
| COPY . ./ | |
| RUN corepack enable | |
| RUN yarn install --immutable | |
| RUN yarn run web:build:prod |
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
| #include <Arduino.h> | |
| #include <MsgPacketizer.h> | |
| #define SERIAL_SPEED 500000 | |
| #define MSGPACK_RECV_INDEX 0x01 | |
| #define MSGPACK_SEND_INDEX 0x02 | |
| #define SERIAL_PORT Serial1 | |
| struct ServoCommand { | |
| float left; |
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 re | |
| from dataclasses import dataclass, field | |
| from mcap.reader import make_reader | |
| from mcap_ros2.decoder import DecoderFactory | |
| from heapq import heappush, heappop | |
| from pathlib import Path | |
| PATH = "stereo_calib.mcap" |
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
| obj-m += vxcan.o | |
| all: | |
| make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules | |
| clean: | |
| make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean |
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
| from odrive.pyfibre.fibre.libfibre import * | |
| import select | |
| tasks = [] # time, callback, args... | |
| now = time.perf_counter | |
| # super stupid "event loop" implementation | |
| def spin(): | |
| for _ in range(10): | |
| delete = [] |
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
| #!/bin/bash | |
| # Miminum delay between iterations, in seconds | |
| delay=10 | |
| # Pairs of [bluetooth MAC, test expression] | |
| targets=( | |
| "98:B6:E9:47:F0:4F" "test ! -e /dev/input/js0" | |
| "98:B6:E9:72:6C:31" "test -z \"\$(bluetoothctl info 98:B6:E9:72:6C:31 | grep 'Connected: yes')\"" | |
| ) |
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 matplotlib.pyplot as plt | |
| from matplotlib.lines import Line2D | |
| import numpy as np | |
| def plot_grad_flow(model): | |
| ave_grads = [] | |
| max_grads = [] | |
| layers = [] | |
| for name, param in model.named_parameters(): |
NewerOlder