Skip to content

Instantly share code, notes, and snippets.

View ashwanirathee's full-sized avatar

Ashwani Rathee ashwanirathee

View GitHub Profile
@ashwanirathee
ashwanirathee / test.js
Created January 23, 2025 20:03
webgl class
class WebGLRenderer {
constructor() {}
// draw every shape that's supposed to be on the canvas
render(scene) {
// check the time at the start of this function
var startTime = performance.now();
var globalRotMat = new Matrix4().rotate(g_globalAngle, 0, 1, 0);
gl.uniformMatrix4fv(u_GlobalRotateMatrix, false, globalRotMat.elements);
import matplotlib.pyplot as plt
sizes1 = [10**1, 10**2, 10**3, 10**4, 10**5, 10**6, 10**7]
cpu_times = [.002759, .003312, .002829, .005624, .022991, .233091, 2.803243]
gpu_times = [.721383, .142897, .107374, .105827, .210548, .309812, 1.781547]
recursive_cpu_times = [.002717, .002820, .002900, .004930, .025398, .259715, 2.869863]
recursive_gpu_times = [.120757, .119873, .146225, .184894, 1.020488, 8.396131, 85.096905]
iterative_cpu_times = [.002658, .002787, .002795, .010535, .025303, .266396, 2.875699]
iterative_gpu_times = [.102239, .104223, .151719, .106983, .132566, .481036, 3.875283]
>>> ./build/main 1 8000 8001,8002 1
[P2P] Initialized with port: 8000, peers: 0
[FD] Initialized with timeout: 5000ms, interval: 2000ms
[RB] Initialized with self_port: 8000, peers: 2
[RB] Subscribing to events...
[App] Initialized with broadcaster type: 19ReliableBroadcaster
[App] Subscribing to events...
[FD] Starting failure detector...
[P2P] Thread started.
[App] Entering input loop. Type 'exit' to quit.
@ashwanirathee
ashwanirathee / ego_blur.def
Created April 30, 2025 21:39
ego_blur apptainer
Bootstrap: docker
From: nvidia/cuda:12.1.1-cudnn8-devel-ubuntu22.04
%labels
Author AshwaniRathee
Version v1.0
Description "EgoBlur container with LibTorch 2.1 and CUDA 12.1"
%environment
export PATH=/usr/local/cuda/bin:$PATH
@ashwanirathee
ashwanirathee / comp_local_0.txt
Last active June 8, 2025 05:07
Multi Node System with Distrifein
> ./build/main 6 7,3 0
[2025-06-07 20:53:39.757] [P2P] Id: 6, Ip: ip_address_removed, Port: 8000
[2025-06-07 20:53:39.758] [App] Initialized with 21BestEffortBroadcaster...
[2025-06-07 20:53:39.758] [P2P] Starting tcp server...
[2025-06-07 20:53:39.758] [App] Entering input loop. Type 'exit' to quit.
[2025-06-07 20:53:39.758] [App] Select Message Type:
1. Text Message
2. Image Message
3. Exit
[2025-06-07 20:53:39.758] [P2P] Listening on port 8000