Skip to content

Instantly share code, notes, and snippets.

Giovanni De Toni geektoni

Block or report user

Report or block geektoni

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
View libroadrunner.sh
mkdir roadrunner && cd roadrunner/
#sudo apt-get update
#sudo apt-get install git g++-5 cmake make wget
#sudo apt-get install llvm-3.5 llvm-3.5-dev
#sudo apt-get install libbz2-1.0 libbz2-dev zlibc libxml2-dev libz-dev
#sudo apt-get install libncurses5-dev
#export CC=gcc-5
#export CXX=g++-5
View strace-out-correct
execve("/home/travis/.bdm/third_party/paraview/bin/pvpython", ["pvpython", "../include/core/visualization/ge"..., "output/N3bdm52CatalystAdaptorTes"...], [/* 152 vars */]) = 0
brk(NULL) = 0x89a000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f927fc90000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/home/travis/.bdm/third_party/qt/lib/tls/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/travis/.bdm/third_party/qt/lib/tls/x86_64", 0x7ffe42c76390) = -1 ENOENT (No such file or directory)
open("/home/travis/.bdm/third_party/qt/lib/tls/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/travis/.bdm/third_party/qt/lib/tls", 0x7ffe42c76390) = -1 ENOENT (No such file or directory)
open("/home/travis/.bdm/third_party/qt/lib/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -
View strace-out-wrong
execve("/home/travis/build/BioDynaMo/biodynamo/build/install/third_party/paraview/bin/pvpython", ["pvpython", "../src/core/visualization/genera"..., "output/N3bdm52CatalystAdaptorTes"...], [/* 152 vars */]) = 0
brk(NULL) = 0xbb8000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8d974f4000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/home/travis/build/BioDynaMo/biodynamo/build/install/third_party/qt/lib/tls/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/travis/build/BioDynaMo/biodynamo/build/install/third_party/qt/lib/tls/x86_64", 0x7ffe6b614520) = -1 ENOENT (No such file or directory)
open("/home/travis/build/BioDynaMo/biodynamo/build/install/third_party/qt/lib/tls/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/travis/build/BioDynaMo/biodynamo/build
View gist:487fa1c3eac5fbd31c70c9dc54d67fb1
#include <shogun/base/init.h>
#include <shogun/base/some.h>
#include <shogun/distance/Distance.h>
#include <shogun/features/Features.h>
#include <shogun/io/File.h>
#include <shogun/io/SerializableAsciiFile.h>
#include <shogun/lib/DynamicObjectArray.h>
#include <shogun/lib/SGMatrix.h>
#include <shogun/lib/SGVector.h>
#include <shogun/lib/observers/ParameterObserver.h>
View results_glm.txt
# Beta0 e Beta predetti
0.057167247685
[ 0. -0. -0. 0. 0. -0. -0. 0. -0. 0.]
# Beta0 e Beta reali usati dal generatore
[ 0.04515583]
[-0.012569 0.058881 0.138457 -0.021287 -0.021285 0.143565 0.069767
-0.042679 0.049324 -0.042129]
View averaged_perceptron_example.py
from matplotlib import pyplot as plt
from matplotlib import animation
from shogun import csv_file, features, labels, machine, parameter_observer
f_feats_train = csv_file("classifier_binary_2d_linear_features_train.dat")
f_feats_test = csv_file("classifier_binary_2d_linear_features_test.dat")
f_labels_train = csv_file("classifier_binary_2d_linear_labels_train.dat")
f_labels_test = csv_file("classifier_binary_2d_linear_labels_test.dat")
features_train = features(f_feats_train)
View register_observable_params.cpp
/******/
/* How observable parameters can be registered*/
/******/
MyFabulousMachine::init()
{
// Register standard parameters
SG_ADD(&m_w, "weights", "Model weigths", ParameterProperties::MODEL);
// Version A: Register observable parameters. The user could then get a list
// (vector) of the parameters he can observe inside this model. Only the parameters
View lars_example.cpp
#include <shogun/features/DenseFeatures.h>
#include <shogun/lib/SGMatrix.h>
#include <shogun/regression/LeastAngleRegression.h>
#include <shogun/labels/RegressionLabels.h>
#include <shogun/mathematics/linalg/LinalgNamespace.h>
#include <shogun/preprocessor/PruneVarSubMean.h>
#include <shogun/preprocessor/NormOne.h>
#include <shogun/lib/parameter_observers/ParameterObserverLogger.h>
#include <shogun/base/init.h>
#include <shogun/lib/common.h>
View changepassword.sh
#!/bin/bash
USER=$1
PASS=$2
usermod --password $(echo $PASS | openssl passwd -1 -stdin) $USER
View Perceptron_Observer_benchmark
-------------------------------------------------------------------------------------------------
Benchmark Time CPU Iterations
-------------------------------------------------------------------------------------------------
# Baseline
DataFixture/perceptron_baseline/8/256 16 ms 16 ms 43
DataFixture/perceptron_baseline/64/256 18 ms 18 ms 34
DataFixture/perceptron_baseline/256/256 47 ms 47 ms 15
DataFixture/perceptron_baseline/8/512 31 ms 31 ms 22
DataFixture/perceptron_baseline/64/512 51 ms 51 ms 13
DataFixture/perceptron_baseline/256/512 108 ms 108 ms 6
You can’t perform that action at this time.