This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <memory> | |
using Scalar = float; | |
class Node; | |
using NodePtr = std::shared_ptr<Node>; | |
class Node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ pytorch_unique git:(master) sudo pip3 install torch-unique | |
The directory '/home/daiver/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. | |
The directory '/home/daiver/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. | |
Collecting torch-unique | |
Downloading https://files.pythonhosted.org/packages/ad/8c/3ea7b6242c9c6a30e812fe172b2ef631520c24184565b51b17ab2c3cbdab/torch_unique-1.0.1.tar.gz | |
Requirement already satisfied: numpy in /home/daiver/.local/lib/python3.6/site-packages (from torch-unique) | |
Installing collected packages: torch-unique | |
Running setup.py install for torch-unique ... error | |
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package object graphviz { | |
case class Attribute(key: String, value: String) { | |
def render(): String = s"${key} = ${value}" | |
} | |
case class AttributePlaceholder(str: String){ | |
def := (other: AttributePlaceholder): Attribute = Attribute(str, other.str) | |
} | |
implicit def strToAttrPlaceholder(str: String):AttributePlaceholder = AttributePlaceholder(str) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cookielib | |
import urllib2 | |
import json | |
from urllib import urlencode | |
from urlparse import urlparse | |
from HTMLParser import HTMLParser | |
import os | |
import pickle | |
import getpass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <boost/fusion/tuple.hpp> | |
#include <boost/fusion/view.hpp> | |
#include <boost/fusion/algorithm.hpp> | |
#include <boost/fusion/adapted/struct/adapt_struct.hpp> | |
#include <boost/type_traits.hpp> | |
#include <boost/mpl/arg.hpp> | |
#include <boost/lambda/lambda.hpp> | |
#include <string> | |
#include <iostream> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::collections::HashMap; | |
fn process_polish(funcs : &HashMap<&str, Box<(Fn(&mut Vec<f32>) -> f32)>>, token : &str, stack : &mut Vec<f32>) | |
{ | |
if funcs.contains_key(token) { | |
let val = funcs[token](stack); | |
stack.push(val); | |
}else{ | |
let tmp = token.parse::<f32>(); | |
match tmp{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public string IP_Parse(string str) | |
{ | |
const string error_str = "Input error. Invalid IP-address."; | |
if (split == null) | |
return error_str; | |
string[] split = str.Split(new Char[] { '.' }, StringSplitOptions.RemoveEmptyEntries); | |
if (split.Length != 4) | |
return error_str; | |
for (int i = 0; i < split.Length; ++i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
with open('mat') as f: | |
print np.array( | |
[ | |
map(int, st.split(' ')) | |
for st in f | |
] | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CXX = g++ | |
#CXX = clang++ | |
Options = -O3 -std=c++11 | |
LIBS = | |
main: main.cc hashtable.h test.o | |
$(CXX) -o main main.cc test.o $(LIBS) $(Options) | |
rm *.o | |
test.o: test.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pcl::PointCloud<pcl::PointXYZRGB>::Ptr getColored(pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud) | |
{ | |
pcl::search::Search<pcl::PointXYZRGB>::Ptr tree = boost::shared_ptr<pcl::search::Search<pcl::PointXYZRGB> > (new pcl::search::KdTree<pcl::PointXYZRGB>); | |
pcl::PointCloud <pcl::Normal>::Ptr normals (new pcl::PointCloud <pcl::Normal>); | |
pcl::NormalEstimation<pcl::PointXYZRGB, pcl::Normal> normal_estimator; | |
normal_estimator.setSearchMethod (tree); | |
normal_estimator.setInputCloud (cloud); | |
normal_estimator.setKSearch (50); | |
normal_estimator.compute (*normals); |