Skip to content

Instantly share code, notes, and snippets.

View a-nooj's full-sized avatar
🤖

Anuj Pasricha a-nooj

🤖
View GitHub Profile
@a-nooj
a-nooj / panda_jacobian.py
Last active October 6, 2024 08:38
Jacobian matrix for the Franka Emika Panda robot arm
import numpy as np
def get_tf_mat(i, dh):
a = dh[i][0]
d = dh[i][1]
alpha = dh[i][2]
theta = dh[i][3]
q = theta
@a-nooj
a-nooj / panda_fk.py
Last active February 8, 2023 10:53
Forward kinematics for the Franka Emika Panda robot arm
import numpy as np
def get_tf_mat(i, dh):
a = dh[i][0]
d = dh[i][1]
alpha = dh[i][2]
theta = dh[i][3]
q = theta
#!/usr/bin/env python3
import pickle
"""
Convert PyTorch models trained in Python 2 to Python 3-compatible models.
"""
checkpoint = torch.load("model.pt")
with open("model.pkl", 'wb') as outfile:
@a-nooj
a-nooj / nightmode_popos.py
Last active July 25, 2020 18:55
Night mode in PopOS! only works on one monitor in a dual-monitor setup. Solution: Mirror screens and revert.
#!/home/anuj/projects/personal/personal_env/bin/python
import pyautogui
import time
if __name__ == '__main__':
searchbar_position = (901, 80)
mirror_option_position = (1089, 326)
apply_button_position = (1397, 222)
@a-nooj
a-nooj / Install NVIDIA Driver and CUDA.md
Created March 17, 2019 17:45 — forked from zhanwenchen/Install NVIDIA Driver and CUDA.md
Install NVIDIA CUDA 9.0 on Ubuntu 16.04.4 LTS