Skip to content

Instantly share code, notes, and snippets.

Mana Borwornpadungkitti potpath

Block or report user

Report or block potpath

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
potpath /
Last active Sep 3, 2019 — forked from econchick/gist:4666413
Python implementation of Dijkstra's Algorithm using heapq
import heapq
from collections import defaultdict
class Graph:
def __init__(self, n):
self.nodes = set(range(n))
self.edges = defaultdict(list)
self.distances = {}
potpath /
Last active Nov 25, 2016
Check four 3D circular cones intersection
import ecos
import sys
import os
import numpy as np
from scipy.sparse import csc_matrix
_stdout = sys.stdout
def perpendicular_vector(v):
potpath / isPositiveSpan.cpp
Last active Aug 29, 2015
check positive span for 4 fingers using Qhull
View isPositiveSpan.cpp
using namespace orgQhull;
bool isPositiveSpan(const Point3d &n1,const Point3d &n2,const Point3d &n3,const Point3d &n4){
Qhull qhull;
realT points[12]={n1.x,n1.y,n1.z,n2.x,n2.y,n2.z,n3.x,n3.y,n3.z,n4.x,n4.y,n4.z};
vector<QhullFacet> facets=qhull.facetList().toStdVector();
for(const QhullFacet &facet : qhull.facetList().toStdVector())
if(facet.getFacetT()->offset>=0) return false;
potpath /
Last active Aug 29, 2015
Simple grader written in shell script
if [ "$#" -lt 1 ]
echo "Usage: $0 [executable] code [input_output_solution_folder]"
exit 1
if [ -x "`which "$1"`" ]
potpath / graspit.patch
Created Sep 4, 2014
patch to make GraspIt! 2.2 compilable in Ubuntu 14.04
View graspit.patch
diff -rupN Graspit/ GraspitNew/
--- Graspit/ 2012-04-21 01:03:59.000000000 +0700
+++ GraspitNew/ 2014-09-04 12:06:38.646600227 +0700
@@ -21,7 +21,7 @@ LIBS += -lqhull
LIBS += -lSoQt -lCoin
#add utility libraries
-LIBS += -lGL -lpthread
+LIBS += -lGL -lpthread -ldl
You can’t perform that action at this time.