Skip to content

Instantly share code, notes, and snippets.

View geyang's full-sized avatar
🤖
I finish papers.

Ge Yang geyang

🤖
I finish papers.
View GitHub Profile
@geyang
geyang / install_lcm-python.sh
Created March 25, 2024 02:58
single-line command for installing python lcm (lcm-python) on mac.
pip install -e "git+https://github.com/lcm-proj/lcm.git#egg=lcm&subdirectory=lcm-python"
@geyang
geyang / openai_gym_env_registry.md
Created February 26, 2024 20:42
List of OpenAI Gym and D4RL Environments and Datasets
In[1]: gym.envs.registration.registry
Out[1]: 
├──CartPole: [ v0, v1 ]
├──MountainCar: [ v0 ]
├──MountainCarContinuous: [ v0 ]
├──Pendulum: [ v1 ]
├──Acrobot: [ v1 ]
├──LunarLander: [ v2 ]
├──LunarLanderContinuous: [ v2 ]
@geyang
geyang / simplify.py
Created February 26, 2024 08:19
Python script for simplifying mesh files in a URDF
import trimesh # Replace with your chosen library
files = ['obj/calf.obj',
'obj/hip.obj',
'obj/thigh_mirror.obj',
'obj/thigh.obj',
'obj/trunk.obj',
]
for file in files:
figure.figsize: 6, 4
savefig.dpi: 300
savefig.bbox: tight
savefig.pad_inches: 0
savefig.transparent: True
axes.spines.top : False
axes.spines.right : False
font.family : Times New Roman
\documentclass{article}
\usepackage{charter,graphicx}
\usepackage[margin=1in]{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{.4pt}% Default header rule
\renewcommand{\footrulewidth}{0pt}% No footer rule
\fancyhf{}% Clear header/footer
@geyang
geyang / clean-git-repo.sh
Created October 22, 2023 19:20
remove files from git
bfg -D armadillo_lowres.obj --no-blob-protection
bfg -D armadillo_midres.obj --no-blob-protection
bfg -D bunny2.obj --no-blob-protection
bfg -D dragon.obj --no-blob-protection
bfg -D dragon_og.obj --no-blob-protection
bfg -D sphere.obj --no-blob-protection
bfg -D diamond.glb --no-blob-protection
bfg -D dragon.glb --no-blob-protection
git reflog expire --expire=now --all && git gc --prune=now --aggressive
@geyang
geyang / matplotlibrc
Last active July 5, 2022 17:07
Matplotlibrc file for good paper figures
savefig.dpi: 226
savefig.bbox: tight
savefig.pad_inches: 0
savefig.transparent: False
axes.linewidth : 2
axes.spines.top : False
axes.spines.right : False
axes.grid : True # display grid or not
@geyang
geyang / watch.py
Created December 10, 2020 04:31
Watch script
import sys
import time
import logging
from watchdog.observers import Observer
from watchdog.events import LoggingEventHandler
if __name__ == "__main__":
logging.basicConfig(level=logging.INFO,
format='%(asctime)s - %(message)s',
datefmt='%Y-%m-%d %H:%M:%S')
@geyang
geyang / instrumentation server setup script
Created September 6, 2020 03:49
ML-Dash and ML-Logger Setup Script
1 df
2 ls /dev/sdh
3 cd /dev/sdh
4 sudo mount /dev/sdb1 ~/runs
5 mkdir runs
6 sudo mount /dev/sdb1 ~/runs
7 sudo mount /dev/sh~/runs
8 sudo mount /dev/sdh ~/runs
9 ls
10 cd runs