Skip to content

Instantly share code, notes, and snippets.

View Jerrypiglet's full-sized avatar
🎮

Rui Zhu Jerrypiglet

🎮
View GitHub Profile
@pangyuteng
pangyuteng / offscreen_vtk.sh
Last active December 22, 2024 14:16
vtk offscreen rendering - tested on ubuntu, anaconda py3.6 - thank you clinicalgraphics.
sudo su -
# go to system root, cd ..
mkdir /opt/anaconda3
# installed anaconda to /opt/anaconda3
bash /Temp/Anaconda3-5.1.0-Linux-x86_64.sh
# create py 3.6
/opt/anaconda3/bin/conda create -p /opt/envs/conda/py36 python=3.6
# activate py 3.6
source /opt/anaconda3/bin/activate /opt/envs/conda/py36
# install prebuilt vtk for offscreen rendering
@jalola
jalola / d2s.py
Last active August 31, 2022 07:54
d2s pytorch
class DepthToSpace(nn.Module):
def __init__(self, block_size):
super(DepthToSpace, self).__init__()
self.block_size = block_size
self.block_size_sq = block_size*block_size
def forward(self, input):
output = input.permute(0, 2, 3, 1)
(batch_size, d_height, d_width, d_depth) = output.size()
s_depth = int(d_depth / self.block_size_sq)
@ronrest
ronrest / kitti_lidar.py
Last active February 26, 2025 01:37
Visualize Lidar Data in Kitti Data
"""
VISUALISE THE LIDAR DATA FROM THE KITTI DATASET
Based on the sample code from
https://github.com/utiasSTARS/pykitti/blob/master/demos/demo_raw.py
And:
http://stackoverflow.com/a/37863912
Contains two methods of visualizing lidar data interactively.
- Matplotlib - very slow, and likely to crash, so only 1 out of every 100
import gym
import numpy as np
env = gym.make('CartPole-v0')
x = env.reset()
# x, xdot, theta, thetadot
gamma = (4.0 / 3.0 - env.masspole / env.masscart)
@awjuliani
awjuliani / Deep-Recurrent-Q-Network.ipynb
Last active July 18, 2023 19:18
An implementation of a Deep Recurrent Q-Network in Tensorflow.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Starefossen
Starefossen / tmux-cheats.md
Last active August 30, 2026 21:18
My personal tmux cheat sheet for working with sessions, windows, and panes. `NB` I have remapped the command prefix to `ctrl` + `a`.

Sessions

New Session

  • tmux new [-s name] [cmd] (:new) - new session

Switch Session

  • tmux ls (:ls) - list sessions
  • tmux switch [-t name] (:switch) - switches to an existing session