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 "itkImage.h" | |
#include "itkImageFileWriter.h" | |
#include "itkPolyLineParametricPath.h" | |
#include "itkSpeedFunctionToPathFilter.h" | |
#include "itkPathIterator.h" | |
#include "itkGradientDescentOptimizer.h" | |
#include "itkSigmoidImageFilter.h" |
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
int vtkImageData::ComputeStructuredCoordinates( const double x[3], int ijk[3], double pcoords[3], | |
const int* extent, | |
const double* spacing, | |
const double* origin, | |
const double* bounds) | |
{ | |
// tolerance is needed for 2D data (this is squared tolerance) | |
const double tol2 = 1e-12; | |
// | |
// Compute the ijk location |
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac |
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
---------------------------------------------------------------------- | |
-- This script demonstrates how to define a couple of different | |
-- models: | |
-- + 2-layer neural network (MLP) | |
-- | |
---------------------------------------------------------------------- | |
require 'torch' -- torch | |
require 'nn' -- provides all sorts of trainable modules/layers |
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
# -*- coding: utf-8 -*- | |
import matplotlib.pyplot as plt | |
import numpy | |
hl, = plt.plot([], []) | |
#plt.show() | |
def update_line(hl, new_data): | |
hl.set_xdata(numpy.append(hl.get_xdata(), new_data)) | |
hl.set_ydata(numpy.append(hl.get_ydata(), new_data)) |
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> | |
struct Point | |
{ | |
public: | |
double x,y,z; | |
}; | |
// A mixin to add an 'A' value to a point | |
template<class Base> |
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
#ifndef ABSTRACT_POINT_H | |
#define ABSTRACT_POINT_H | |
#include <boost/serialization/export.hpp> | |
class AbstractPoint | |
{ | |
public: | |
virtual ~AbstractPoint(){} | |
virtual void DoSomething() = 0; |
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 "AbstractPoint.h" | |
BOOST_CLASS_EXPORT_IMPLEMENT(AbstractPoint) |
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 "AbstractPoint.h" | |
//BOOST_CLASS_EXPORT_IMPLEMENT(AbstractPoint) |
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 <boost/graph/graph_traits.hpp> | |
#include <boost/graph/adjacency_list.hpp> | |
typedef boost::property<boost::edge_weight_t, double> EdgeWeightProperty; | |
/* | |
adjacency_list<OutEdgeList, VertexList, Directed, | |
VertexProperties, EdgeProperties, |
OlderNewer