Skip to content

Instantly share code, notes, and snippets.

View soulslicer's full-sized avatar

Raaj soulslicer

  • Carnegie Mellon University Robotics Institute
View GitHub Profile
from pyquery import PyQuery as pq
from PyQt4 import QtCore
import multiprocessing
import time
data = (
['a', '2'],
)
@soulslicer
soulslicer / pf.py
Created September 20, 2015 09:27
2d Particle filter example with Visualization
# Make a robot called myrobot that starts at
# coordinates 30, 50 heading north (pi/2).
# Have your robot turn clockwise by pi/2, move
# 15 m, and sense. Then have it turn clockwise
# by pi/2 again, move 10 m, and sense again.
#
# Your program should print out the result of
# your two sense measurements.
#
# Don't modify the code below. Please enter
@soulslicer
soulslicer / ubuntu_agnoster_install.md
Created May 5, 2016 04:38 — forked from renshuki/ubuntu_agnoster_install.md
Ubuntu 14.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

1. Run commands
sudo apt-get update
sudo apt-get install terminator
sudo apt-get install terminator
sudo apt-get remove nvidia* && sudo apt-get autoremove
sudo apt-get install dkms fakeroot build-essential linux-headers-generic cmake git
2. Neovim
sudo add-apt-repository ppa:neovim-ppa/unstable
sudo apt-get update
#!/usr/bin/python
import sys
sys.dont_write_bytecode = True
# Base libraries
import cv2
import time
import string
import json
@soulslicer
soulslicer / texturemapping_multicamera_speedup.cpp
Created January 18, 2017 15:53
TextureMapping Speedup OpenMP
// TODO handle case were no face could be projected
if (visibility.size () - cpt_invisible !=0)
{
//create kdtree
pcl::KdTreeFLANN<pcl::PointXY> kdtree;
kdtree.setInputCloud (projections);
// af first (idx_pcan < current_cam), check if some of the faces attached to previous cameras occlude the current faces
// then (idx_pcam == current_cam), check for self occlusions. At this stage, we skip faces that were already marked as occluded
@soulslicer
soulslicer / pcl_surface_openmp_patch.txt
Last active June 19, 2017 05:40
PCL Surface OpenMP speedup patch
diff --git a/surface/include/pcl/surface/impl/poisson.hpp b/surface/include/pcl/surface/impl/poisson.hpp
index 97848d3..4f824fd 100644
--- a/surface/include/pcl/surface/impl/poisson.hpp
+++ b/surface/include/pcl/surface/impl/poisson.hpp
@@ -102,6 +102,7 @@ pcl::Poisson<PointNT>::execute (poisson::CoredVectorMeshData &mesh,
/// TODO OPENMP stuff
// tree.threads = Threads.value;
+ tree.threads = 16;
center.coords[0] = center.coords[1] = center.coords[2] = 0;
@soulslicer
soulslicer / libsvm_openmp_cmake.txt
Last active February 20, 2017 06:35
Diff that makes a CMakeLists file for LibSVM and adds OpenMP Support
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e69de29..4600a6b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -0,0 +1,44 @@
+cmake_minimum_required(VERSION 2.8.3)
+project(libsvm)
+
+include(CheckCXXCompilerFlag)
+CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
caffe::BlobProto blob_proto;
blob_proto.set_num(1);
blob_proto.set_channels(3);
blob_proto.set_height(224);
blob_proto.set_width(224);
blob_proto.clear_data();
for (int c = 0; c < 3; ++c) {
for (int h = 0; h < 224; ++h) {
for (int w = 0; w < 224; ++w) {
@soulslicer
soulslicer / opencl.xml
Last active February 26, 2017 07:34
OpenCL QTCreator Highlighter
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language name="OPENCL" version="2.06" kateversion="2.4" section="Sources" extensions="*.cl" indenter="cstyle" mimetype="" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">
<highlighting>
<list name="keywords">
<item> break </item>
<item> case </item>
<item> continue </item>