Skip to content

Instantly share code, notes, and snippets.

@maujim
maujim / gist:78ee3f6d4737d6d03823f39f585d9991
Last active April 20, 2025 18:54
code for robot hackathon demo
uv run lerobot/lerobot/scripts/train.py \
--dataset.repo_id=maujim/place_bagel_on_jig3 \
--policy.type=act \
--output_dir=outputs/train/dot-30k \
--job_name=dot-30k \
--policy.device=cuda --steps=30000
uv run lerobot/lerobot/scripts/train.py \
--dataset.repo_id=maujim/place_bagel_on_jig3 \
--policy.type=act \
import os
import json
import pandas as pd
from datasets import load_dataset
def infer_modalities(array_len, prefix):
# Heuristic: chunk into 7-element blocks
modalities = {}
block_size = 7
i = 0
#!/bin/bash
## usage:
## echo "find all files in ~/dev over 5MB" | ./oneliner.sh
read -r -d '' SYSPROMPT <<EOF
You are a specialized shell command generator. Your task is to generate concise and effective one-line shell commands based on a brief user description and provided context. You will be given the user's desired task in a single sentence, along with relevant tool documentation (man pages, --help output, etc.).
**Your Goal:** Understand the user's task and use the provided documentation to construct the *most efficient and correct* shell one-liner to accomplish it.
import React, { useState, useEffect } from 'react';
const TiledBackground = ({ name = 'MUKUND', debugMode = false }) => {
const [rows, setRows] = useState(0);
const [columns, setColumns] = useState(0);
const [hoveredIndex, setHoveredIndex] = useState(null);
useEffect(() => {
const updateDimensions = () => {
const viewportWidth = window.innerWidth;
#!/bin/sh
pnpm >/dev/null && echo "using pnpm"
echo "using react-swc"
pnpm create vite --template react-swc .
pnpm install three @types/three @react-three/{fiber,drei,rapier,cannon}
pnpm run dev
! name: engineering blogs
! description: extracted from https://github.com/kilimchoi/engineering-blogs/blob/54a6e7fb02568985407afdf591aeef162e81ce07/README.md
! public: true
! author: Mukund Mauji
$discard
/blog/*$boost=3,site=8thlight.com
/blog/*$boost=3,site=tech.adroll.com
$boost=3,site=advancedweb.hu
// Use something like https://caiorss.github.io/bookmarklet-maker/ to convert this to a bookmarklet
// clicks the first visible 'next' button on https://news.ycombinator.com/
let x = () => {
let content_filter = link => link.textContent.includes('next');
let visibility_filter = link => (link.getBoundingClientRect().top >= 0 && link.getBoundingClientRect().bottom <= window.innerHeight);
let fuse = 'on';
document.querySelectorAll('a.clicky').forEach(link => {
#!/bin/bash
target_file="$1"
target_file_name="$(basename "$1")"
echo '<?xml version="1.0" encoding="UTF-8"?>'
echo '<opml version="2.0">'
echo '<opml version="2.0">'
echo "<head> <title>rss feed from $target_file_name</title> </head>"
@maujim
maujim / researching1.goggle
Last active October 9, 2023 19:35
researching1.goggle
! name: researching 1
! description: for learning about new topics
! public: true
! author: Mukund Mauji
$discard
! research papers
$boost=3,site=arxiv.org
! name: reddit neuro
! description: <blank>
! public: true
! author: Mukund Mauji
$discard
/r/neuroscience/comments/*$site=reddit.com
/r/PredictiveProcessing/comments/*$site=reddit.com
/r/compmathneuro/comments/*$site=reddit.com