Processing math: 100%
AMPS | THARC | KE8QZC | SFW | TSW | WW
ORCID iD icon

My github page
timescalecalculus on GitHub
Arithmetical functions in Python
LATEX stuff
To add Mathjax to webpages -- put inside <head>:
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], processEscapes: true } }); </script> <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> </script>
Excel junk
=LEFT(CELL,LEN(CELL)-13)
=IF(AL2<60,"F",IF(AL2<70,"D",IF(AL2<80,"C",IF(AL2<90,"B","A"))))
=IF(T2="F",0,IF(T2="D",1,IF(T2="C",2,IF(T2="B",3,4))))
=IF(Y2<1,"F",IF(AND(Y2>=1,Y2<2),"D",IF(AND(Y2>=2,Y2<3),"C",IF(AND(Y2>=3,Y2<4),"B","A"))))
Webwork stuff
add course:
addcourse --users=FILE COURSEID
export course: (tables: user, password, permission, key, set, problem, set_user, problem_user)
wwdb COURSEID export filename [tables]
import into course:
wwdb COURSEID import filename
Linux stuff
Concatenate images file1 file2 ... filen to new image filename:
convert file1 file2 ... filen -append filename
Softlinks:
ln -s SOURCE TARGET
Shrink scanned pdf:
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
Remote mount a folder:
sshfs USERNAME@HOSTNAME_OR_IP:/REMOTE_PATH LOCAL_MOUNT_POINT SSH_OPTIONS
Unmount remote folder:
fusermount -u LOCAL_MOUNT_POINT
If remote mounted folder freezes, run the following and then unmount:
killall -9 sshfs
Convert flac to mp3:
ffmpeg -i input.flac -ab 196k -ac 2 -ar 48000 output.mp3
To halt a process, detach from shell, and run in background
ctrl+z to pause disown -h %1 bg 1
autossh command
autossh -M 20000 -f -N serverurl.com -R 19999:localhost:22 -C
To generate a video file from png's labelled 0000.png 0001.png, etc
ffmpeg -f image2 -i %04d.png -vb 20M FILENAME.mpg
Mathematica stuff
Mathematica code for domain colorings
ComplexGraph[f_, {xmin_, xmax_}, {ymin_, ymax_}, opts : OptionsPattern[]] := RegionPlot[True, {x, xmin, xmax}, {y, ymin, ymax}, opts, PlotPoints -> 200, ColorFunctionScaling -> False, ColorFunction -> Function[{x, y}, With[{ff = f[x + I y]}, ColorConvert[ Hue[(2. Pi)^-1 Mod[Arg[ff], 2 Pi], 1, 1 - (1.2 + 10 Log[Abs[ff] + 1])^-1], "LAB"]]]]
Plotting an animated gif:
R[x_, N_] := Sum[Sin[k^2*x]/k^2, {k, 1, N}] plotme = Table[ Plot[R[x, N], {x, -5, 5}, PlotLegends -> Placed[StringJoin["N=", ToString[N]], Bottom], PlotRange -> {-1.5, 1.5}, PlotStyle -> Thickness[0.001]], {N, 1, 25, 1}]; Export["riemannfunction.gif", plotme, "FrameRate" -> 0.5, ImageSize -> {1000, 1000}]
produces

GPF conjecture
cycle finder
GPF graph creator (Mathematica notebook)
GPF graph creator (Python+SAGE)
various GPF conjecture stuff (mathematica notebook)