Skip to content

Instantly share code, notes, and snippets.

View aadishv's full-sized avatar
🛰️
pixelsat

Aadish Verma aadishv

🛰️
pixelsat
View GitHub Profile
aadishverma@Aadish osx % ./vexcom --help
vexcom utility V1.0.0b39
usage: vexcom [option(s)] [serial_port]
-v --verbose verbose mode
--quiet disable all program stdio output
-d --directory show user directory
-p --programs show programs
-w --write file Write file to brain
-r --read file Read file from brain into file
-g --run Run program after download
# This script was generated by combining and prefixing multiple files.
# --- Combined External Imports ---
from vex import *
import math
# -------------------- Content from: helpers.py --------------------
mod_e8b4e4b3_brain = Brain()
mod_e8b4e4b3_timer = Timer()
wait(50, MSEC)
@aadishv
aadishv / discussion.md
Created June 16, 2025 05:26
interaction.cpp explanation

Angle Systems in interactioncpp Explained

User

The following items were attached by the user. They are up-to-date and don't need to be re-read. ```cpp 3151A/src/interaction.cpp
#![no_std]
use core::{
f64::consts::PI,
ops::{Add, Deref, Mul},
};
use vexide::{devices::{smart::imu::InertialError, PortError}, float::Float, prelude::*};
#[derive(Debug, Clone, Copy, PartialEq)]
@aadishv
aadishv / mcl.py
Last active July 12, 2025 09:18
Read the docstring at the top 🙏
from math import cos, sin, exp, pi, sqrt, radians
from random import random # returns in [0, 1)
"""
A minimal reference implementation of Monte Carlo Localization for a VEX robot.
**DO NOT USE THIS. Here are 10 reasons why.**
1. Terrible performance, there are a lot of optimizations you can do.
2. I don't cut off gaussian after a maximum error (which most impls do).
3. Probably doesn't even compile lol
4. We are assuming that distance sensors all start from the same point,
@aadishv
aadishv / base.py
Created July 16, 2025 05:48
auton selector GUI + general GUI library using DishPy
from main import brain
import time
class Vec2D:
def __init__(self, x: float, y: float):
self.x = x
self.y = y
def __add__(self, other):

SQLite Database Performance Comparison

User

The following items were attached by the user. They are up-to-date and don't need to be re-read. ```rs lrclib/src/main.rs

SQLite Database Performance Comparison

User

The following items were attached by the user. They are up-to-date and don't need to be re-read. ```rs lrclib/src/main.rs
#!/usr/bin/env bash
# fix_mp3_duration.sh
# Remux MP3s in-place to correct duration metadata (e.g., missing/incorrect VBR headers)
# Uses ffmpeg stream copy (no re-encode) and forces writing a Xing header.
set -Eeuo pipefail
IFS=$'\n\t'
# -------------------------------
# Config / Defaults
@aadishv
aadishv / gemini.user.js
Last active December 7, 2025 22:41
userscript for Gemini so it can be used as a search engine (tested in Zen/Firefox & Arc), based on https://github.com/fc1018/GeminiBoost
// ==UserScript==
// @name Gemini search engine
// @namespace https://aadishv.dev
// @version 2025-12-07
// @description Add `https://gemini.google.com/?question=%s`, f.x. for Firefox
// @author Aadish Verma <mail@aadishv.dev>
// @match https://gemini.google.com/*
// @icon https://upload.wikimedia.org/wikipedia/commons/thumb/1/1d/Google_Gemini_icon_2025.svg/250px-Google_Gemini_icon_2025.svg.png
// @grant none
// ==/UserScript==