Skip to content

Instantly share code, notes, and snippets.

View saurabheights's full-sized avatar

Saurabh Khanduja saurabheights

View GitHub Profile
import math
import numpy as np
import open3d as o3d
import pandas as pd
origin = o3d.geometry.TriangleMesh.create_coordinate_frame(size=20, origin=[0, 0, 0])
# mesh = o3d.io.read_triangle_mesh("test.obj")
csv_list = pd.read_csv("test.csv", header=0)
cameras = []

Quick Overview of Open3D Visualization Elements

Base Classes

Class Name Description
Application Global application singleton. This owns the menubar, windows, and event loop
Window Application window
Widget Base widget class
Rect Represents a widget frame
LayoutContext Context passed to Window's on_layout callback
@saurabheights
saurabheights / checkExternalSystemOpenPorts.sh
Created December 27, 2018 15:23
Check Open Port on external system
sudo apt-get install arp-scan
ifconfig # To find the interface
sudo arp-scan --interface=enp2s0 --localnet # Change enp2s0 to proper interface
# Check each port on the external system ip
for f in {1..50000}; do echo ${f} && telnet ip ${f}; done
# press Ctrl+] and quit to exit each output
FROM nvidia/cuda:9.0-base-ubuntu16.04
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cuda-command-line-tools-9-0 \
cuda-cublas-dev-9-0 \
cuda-cudart-dev-9-0 \
cuda-cufft-dev-9-0 \
cuda-curand-dev-9-0 \
cuda-cusolver-dev-9-0 \
@saurabheights
saurabheights / bashrc
Last active January 24, 2020 12:31
Useful bashrc content
# Bindings for deleting word backward and forward using CTRL-Backspace and Ctrl-Del.
# Note that backspace will respect delimiters as _, which are not respected by Ctrl+w. To be put in bashrc.
bind '"\C-h":backward-kill-word'
bind '"\e[3;5~":kill-word'
# Bashrc aliases. sbp - p is for bash profile.
alias sbp="source ~/.bashrc"
alias obp="subl ~/.bashrc"
alias obh="subl ~/.bash_history"
alias vbp="vi ~/.bash_profile"
def transformPixelBetweenCameras(pixelLocationInSrcFrame,
depth,
srcCameraMatrix,
srcCameraDistortionCoefficients,
srcCameraRVec,
srcCameraTVec,
dstCameraMatrix,
dstCameraDistortionCoefficients,
dstCameraRVec,
dstCameraTVec):
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\Anaconda]
"Icon"="%USERPROFILE%\\Anaconda3\\Menu\\Iconleak-Atrous-Console.ico"
@="Open Anaconda Prompt here"
[HKEY_CLASSES_ROOT\Directory\Background\shell\Anaconda\command]
@="C:\\Users\\bdforbes\\Anaconda3\\pythonw.exe C:\\Users\\bdforbes\\Anaconda3\\cwp2.py C:\\Users\\bdforbes\\Anaconda3 \"%V\" cmd.exe \"/K\" C:\\Users\\bdforbes\\Anaconda3\\Scripts\\activate.bat C:\\Users\\bdforbes\\Anaconda3"
[HKEY_CLASSES_ROOT\Directory\shell\Anaconda]

Start the db

Open PgAdmin III from dash
sudo /usr/sbin/service postgresql start
reconnect from PGAdmin using password

PostGIS Documentation

View installed and available extensions

SELECT * FROM pg_extension
SELECT * FROM pg_available_extensions

@saurabheights
saurabheights / QuickSystemSetup.sh
Last active April 17, 2024 22:11
A gist to quickly setup ubuntu for your needs.
# Disable need to provide password for sudo. use only if you can lock system when afk.
sudo visudo
# Add below line to the end of file, where replace $USER with your system username.
$USER ALL=(ALL) NOPASSWD: ALL
# Install fzf for better reverse search
sudo apt install fzf
cat /usr/share/doc/fzf/README.Debian # For how to integrate with your shell
echo "source /usr/share/doc/fzf/examples/completion.bash" » ~/.bashrc
# Thanks to http://ryanstutorials.net/bash-scripting-tutorial
# Original Author - Ryan Chadwick.
# If you are a complete newbie, the website will provide you much more knowledge, so please do check out his website.
# This is only a personal cheatsheet and there is a good chance I have skipped over some trivial stuff.
#Bash is case sensitive, so lower case variables are different the upper case variables.
#Path
echo $PATH