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 / iterm.bash
Created July 14, 2020 01:48
bash function for opening up iterm form current directory
#!/usr/bin/env bash
#
# Open new iTerm window from the command line using v3 syntax for applescript as needed in iTerm2 Version 3+
# This script blocks until the cmd is executed in the new iTerm2 window. It then leaves the window open.
# TODO Add option to close iTerm2 after cmd execs
# See also https://www.iterm2.com/documentation-scripting.html
#
# Usage:
@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')