Skip to content

Instantly share code, notes, and snippets.

@lshifr
lshifr / LocalDataExtrema.m
Created December 8, 2012 01:19
New description
(* Mathematica package *)
BeginPackage["LocalDataExtrema`"]
(* Test version: 1.0.0 *)
PositionsOfLocalMinimum::usage = "PositionsOfLocalMinimum[lst] returns a list of poistions of local minima in lst";
Begin["`Private`"]
@lshifr
lshifr / project.m
Created November 25, 2012 14:42
A simple test project with malformed project file
{
"author"->
{
"name" -> "Leonid Shifrin",
"email" -> "lshifr@gmail.com",
"url" -> "http://www.mathprogramming-intro.org"
},
"name" -> "Test1",
"Description"-> "Simple test project for the installer",
"url" -> "https://gist.github.com/gists/4143767/download",
@lshifr
lshifr / Test2.m
Created November 25, 2012 14:39
Simple test project with one package and a project.m file, where the package name does not correspond to the name of the project
BeginPackage["Test2`"]
g[x_]:=x^3;
EndPackage[]
@lshifr
lshifr / Test1.m
Created November 25, 2012 13:34
Test gist with two packages and a project.m file
BeginPackage["Test1`"]
f[x_]:=x^2;
EndPackage[]
@lshifr
lshifr / Test1.m
Created November 25, 2012 13:24
Simple test project with one package and a project.m file
BeginPackage["Test1`"]
f[x_]:=x^2;
EndPackage[]
@lshifr
lshifr / Test1.m
Created November 25, 2012 13:14
Test gist with two packages
BeginPackage["Test1`"]
f[x_]:=x^2;
EndPackage[]
@lshifr
lshifr / cover_flow.nb
Created November 19, 2012 11:50 — forked from greggroth/cover_flow.nb
Mathematica:coverflow
pic = Import["ExampleData/rose.gif"];
Module[{width = 28, layers = 6, offset, highlight, slides, img,
data},
offset[x_, slide_] := 15/(1 + Exp[-(x - slide) 3]);
highlight[x_, slide_] :=
0.85 PDF[NormalDistribution[slide, 1], x]/
PDF[NormalDistribution[slide, 1], slide] + 0.15;
img = Table[pic, {n, 1, layers}];
Manipulate[Graphics3D[{
Table[{
@lshifr
lshifr / Readme.md
Created November 17, 2012 16:31
Correcting the prevoius commit using the API

##CodeFormatter.m

###Formatting Mathematica code

CodeFormatter.m is a pretty-printer / code formatter for code written in the Mathematica language, which is also written in Mathematica. It works on the box level at the moment. The direct support for strings has not yet been implemented, but one can always convert code to boxes and use it then. Only a few boxes are currently supported, but

@lshifr
lshifr / GuideLinks.m
Created July 19, 2012 23:07
Graph rules for Mathematica documentation guides dependencies
@lshifr
lshifr / largeData.m
Created May 14, 2012 19:55
Large data framework
ClearAll[$fileNameFunction,fileName, $importFunction,import, $exportFunction,
export, $compressFunction, $uncompressFunction]
$fileNameFunction = fileName;
$importFunction = import;
$exportFunction = export;
$compressFunction = Compress;
$uncompressFunction = Uncompress;