Skip to content

Instantly share code, notes, and snippets.

View schuhschuh's full-sized avatar

Andreas Schuh schuhschuh

View GitHub Profile
@lthibault
lthibault / README.md
Created September 29, 2015 08:17
FSL installation for Fish shell
  1. Install FSL using a compatible shell (bash or tcsh), using the usual method.
  2. Copy fsl.fish to the appropriate location (usually /usr/local/fsl/etc/fslconf/).
  3. Append the contents of config.fish to your own config.fish
@amroamroamro
amroamroamro / README.md
Last active July 4, 2024 10:22
[Python] Fitting plane/surface to a set of data points

Python version of the MATLAB code in this Stack Overflow post: https://stackoverflow.com/a/18648210/97160

The example shows how to determine the best-fit plane/surface (1st or higher order polynomial) over a set of three-dimensional points.

Implemented in Python + NumPy + SciPy + matplotlib.

quadratic_surface

@mikofski
mikofski / polyDer2D.m
Last active March 13, 2020 20:26
horners method in 2-D
function [fx,fy] = polyDer2D(p,x,y,n,m)
%POLYDER2D Evaluate derivatives of 2-D polynomial using Horner's method.
% F = POLYDER2D(P,X,Y,N,M) evaluates the derivatives of 2-D polynomial P at
% the points specified by X and Y, which must have the same dimensions. The
% outputs FX and FY will have the same dimensions as X and Y. N and M specify
% the order of X and Y respectively. Polynomial coefficients are in the
% following order.
%
% F(X,Y) = P_1 * X^N * Y^M + P_2 * X^{N-1} * Y^M + ... + P_{N+1} * Y^M + ...
% P_{N+2} * X^N * Y^{M-1} + P_{N+3} * X^{N-1} * Y^{M-1} + ... + P_{2*(N+1)} * Y^{M-1} + ...
@pavanky
pavanky / sotext
Created April 17, 2012 17:54
ArrayFire vs Thrust
I have to be frank here, this is going to be
- criticism of thrust
- Showing off ArrayFire (of which I am a core developer)
*Criticism of thrust*
They do a good job at optimizing parallel algorithms for vector inputs.
They use data level parallelism (among other things) to parllelize algorithms that work really well for large, vector inputs.
But they fail to improve upon it and go all the way to perfom true data level parallelism. i.e. a large number of small problems.