This file contains hidden or 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
| (* | |
| * UF[] by A. Smirnov. | |
| * U and F are obtained by computing the matrix determinant. | |
| *) | |
| UF[xx_, yy_, z_] := Module[{degree, coeff, i, t2, t1, t0, zz}, | |
| zz = Map[Rationalize[##,0]&, z, {0, Infinity}]; | |
| degree = -Sum[yy[[i]]*x[i], {i, 1, Length[yy]}]; | |
| coeff = 1; | |
| For[i = 1, i <= Length[xx], i++, | |
| t2 = Coefficient[degree, xx[[i]], 2]; |
This file contains hidden or 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
| #- | |
| #define oldt "0.0" | |
| #procedure time(str) | |
| #message `str' | |
| #system bc <<< `time_'-`oldt' | |
| #redefine oldt "`time_'" | |
| #endprocedure |
This file contains hidden or 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
| #- | |
| Off stats; | |
| CF pow,log; | |
| CF pow1,log1; | |
| S x,n | |
| S uuu; | |
| Auto S ttt; | |
| #procedure simopt(F,t1,t2,type,file) |
This file contains hidden or 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
| ./configure --with-api=windows --host=i686-w64-mingw32 --build=i686-pc-cygwin --enable-static-link | |
| ./configure --with-api=windows --host=x86_64-w64-mingw32 --build=x86_64-pc-cygwin --enable-static-link |
This file contains hidden or 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
| cp 1.odt backup/1-`date '+%Y%m%d%H%M%S'`.odt |
This file contains hidden or 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
| du --max-depth=1 --block-size=1K --total | sort -n |
This file contains hidden or 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
| \makeatletter | |
| \newif\ifStandalone | |
| \ifx\documentclass\@twoclasseserror | |
| \Standalonefalse | |
| \else | |
| \Standalonetrue | |
| \fi | |
| \makeatother | |
| \ifStandalone | |
| \documentclass{article} |
This file contains hidden or 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
| LineOffset[{x1_, y1_}, {x2_, y2_}, d_] := Module[{r, dx, dy}, | |
| dx = x2 - x1; | |
| dy = y2 - y1; | |
| r = Sqrt[dx^2 + dy^2]; | |
| {{x1 + d / r dx, y1 + d / r dy}, | |
| {x2 - d / r dx, y2 - d / r dy}} // N | |
| ]; | |
| ArcOffset[{r_, a1_, a2_}, d_] := Module[{da}, | |
| da = 180 d / Pi / r; |
This file contains hidden or 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
| link_math() { | |
| mmaroot=$1 | |
| dest=$2 | |
| [ -z "$dest" ] && dest=. | |
| for d in $mmaroot/*; do | |
| if [ -d "$d" ]; then | |
| ln -s "$d/Executables/math" "$dest/math-`basename $d`" | |
| ln -s "$d/Executables/Mathematica" "$dest/Mathematica-`basename $d`" | |
| fi | |
| done |
This file contains hidden or 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
| import contextlib | |
| import datetime | |
| import tempfile | |
| import shutil | |
| @contextlib.contextmanager | |
| def make_temp_dir(prefix=""): | |
| "A context manager for a temporary directory." | |
| if prefix: | |
| prefix += "." |