Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Shin shinshiner

🏠
Working from home
Block or report user

Report or block shinshiner

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@shinshiner
shinshiner / .bash_aliases
Created Sep 29, 2018 — forked from vratiu/.bash_aliases
Git shell coloring
View .bash_aliases
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
@shinshiner
shinshiner / depth_to_pcd.py
Last active Sep 26, 2018
Convert depth map to point cloud in Mujoco 1.50
View depth_to_pcd.py
import numpy as np
def depth2pcd(depth):
def remap(x, in_range_l, in_range_r, out_range_l, out_range_r):
return (x - in_range_l) / (in_range_r - in_range_l) * (out_range_r - out_range_l) + out_range_l
# depth = remap(depth, depth.min(), depth.max(), 0, 1)
# print(depth)
scalingFactor = 1
fovy = 60
@shinshiner
shinshiner / git_dss.sh
Created Aug 31, 2018
Proxy settings for git command
View git_dss.sh
#!/bin/sh
git config --global unset http.proxy
git config --global unset https.proxy
@shinshiner
shinshiner / clean_disk.py
Created Aug 31, 2018
A small script to clean your disk, preventing data recovery
View clean_disk.py
import os
import time
total = 80 # the number of copied files, decided by your free disk space
times = 2 # clean times, the more, the better
big_file = 'xxx' # a big file, maybe a .zip file or others ...
for j in range(times):
for i in range(total):
tgt_path = '%03d' % i
@shinshiner
shinshiner / quaternion.py
Last active Aug 1, 2018
四元数和其余旋转方式的转换
View quaternion.py
from math import *
def angleaxis_to_quat(rot, theta):
# rot: [rx, ry, rz]
return [r * sin(theta / 2) for r in rot] + [cos(theta / 2)]
def euler_to_quat(euler):
# euler: [X, Y, Z]
You can’t perform that action at this time.