Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <memory>
using Scalar = float;
class Node;
using NodePtr = std::shared_ptr<Node>;
class Node
➜ 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
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)
import cookielib
import urllib2
import json
from urllib import urlencode
from urlparse import urlparse
from HTMLParser import HTMLParser
import os
import pickle
import getpass
#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>
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{
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)
import numpy as np
with open('mat') as f:
print np.array(
[
map(int, st.split(' '))
for st in f
]
)
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
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);