Skip to content

Instantly share code, notes, and snippets.

View aadishv's full-sized avatar
🙃
alive

Aadish Verma aadishv

🙃
alive
View GitHub Profile
@aadishv
aadishv / index.html
Created August 25, 2025 23:23
thoughts
<html>
<head>
<title>thoughts</title>
<meta charset="utf-8" />
</head>
<body>
<style>
#root {
max-width: 50rem;
margin-left: auto;
@aadishv
aadishv / main.py
Last active August 22, 2025 04:50
NextCord-based Discord bot which handles testing on real hardware for the Venice OSS project. Uses vexcom downloaded through dishpy, which is proprietary. I take no responsibility for action against you in relation to using these tools
import nextcord
from nextcord.ext import commands
import aiohttp
import os
import time
TESTING_GUILD_ID = ################
bot = commands.Bot()
@bot.event
#!/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

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
@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):
@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,
#![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 / 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
# 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)