Skip to content

Instantly share code, notes, and snippets.

View SilvesterHsu's full-sized avatar

Seel.Xu SilvesterHsu

  • Autopilot
  • China
View GitHub Profile
@SilvesterHsu
SilvesterHsu / main.py
Last active March 15, 2021 12:59
longshaw dataset example for LiDAR_ground_removal project
import pcl
import cv2
import numpy as np
from module import lidar_projection
from module.ground_removal import Processor
np.set_printoptions(precision=3, suppress=True)
# Load the pcd file
'''
@SilvesterHsu
SilvesterHsu / QuickStart.md
Last active February 1, 2021 14:52
Quick Start

Quick Start

Suppose, the ip for Remote Server is xxxx.xxxx.xxxx.xxxx. If you use a computer as both Local Machine and Remote Server, replace the ip xxxx.xxxx.xxxx.xxxx with 127.0.0.1 in the below tutorial.

Step 1: run a container [on Remote Server]

docker run -it --name ros --restart=always --gpus all --shm-size=32G -p 6006:6606 -p 8888:8888 -p 6080:80 -p 8022:22 -v ~/new_project:/notebooks silvesterhsu/ros_gpu:noetic-desktop-ubuntu20.04
#!/bin/bash
apt update;
apt-get install zsh curl git tree nano htop -y;
chsh -s /bin/zsh;
echo y|sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)";
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions;
echo "source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc
echo "alias ip=\"curl ifconfig.co\"" >> ~/.zshrc
import urllib3
import os, time
import threading, threadpool
def ImageSaver(root, url, f_name, f_type = ".JPG"):
if not os.path.exists(root + f_name + f_type):
http = urllib3.PoolManager(retries = 3)
response = http.request('GET',url)
if response.status == 200:
with open(root + f_name + f_type,"wb") as f:
@SilvesterHsu
SilvesterHsu / HttpUtil.py
Created January 4, 2018 05:07
Rewrite `httpGet` function
#!/usr/bin/python
# -*- coding: utf-8 -*-
import http.client
import urllib
import json
from hashlib import sha512
import hmac
def getSign(params,secretKey):