Skip to content

Instantly share code, notes, and snippets.

Zac Cranko ZacCranko

Block or report user

Report or block ZacCranko

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View robust accuracy
vanilla
accuracy 2.22 noisy accuracy: 1.82
robust
accuracy: 2.00 noisy accuracy: 2.00
@ZacCranko
ZacCranko / preamble.tex
Last active Feb 27, 2016
LaTeX Preamble
View preamble.tex
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{notes}
\RequirePackage{xparse, etoolbox}
\DeclareOption{maketitle}{\AtBeginDocument{\maketitle}}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions\relax
\author{Zac Cranko} % default author
@ZacCranko
ZacCranko / .juliarc.jl
Last active Aug 9, 2016
Current juliarc.jl
View .juliarc.jl
push!(LOAD_PATH, pwd())
# Run _init.jl at runtime if it exists
if VERSION < v"0.4-"
if isinteractive() && isfile("_init.jl")
info("Found ", joinpath(pwd(),"_init.jl"))
include(joinpath(pwd(),"_init.jl"))
end
else
atreplinit() do repl
View Makefile.diff
diff --git a/Makefile b/Makefile
index c995628..8c4cd92 100644
--- a/Makefile
+++ b/Makefile
@@ -240,9 +240,10 @@ endif
ifeq ($(USE_SYSTEM_ARPACK),0)
JL_PRIVATE_LIBS += arpack
endif
-ifeq ($(USE_SYSTEM_SUITESPARSE),0)
+# Always install these, since Homebrew's suite-sparse is all static libraries
View deps.Makefile.diff
diff --git a/deps/Makefile b/deps/Makefile
index 16d503b..4a8a807 100644
--- a/deps/Makefile
+++ b/deps/Makefile
@@ -654,7 +654,7 @@ distclean-suitesparse: clean-suitesparse
# SUITESPARSE WRAPPER
ifeq ($(USE_SYSTEM_SUITESPARSE), 1)
-SUITESPARSE_INC = -I /usr/include/suitesparse
+SUITESPARSE_INC = -I $(brew --prefix)/include
SUITESPARSE_LIB = -lumfpack -lcholmod -lamd -lcamd -lcolamd -lspqr
View fasteradjmx.jl
function DiGraph{T<:Real}(adjmx::AbstractMatrix{T})
isequal(size(adjmx)...) || error("Adjacency / distance matrices must be square")
g = DiGraph(size(adjmx,1))
for (s,d) in zip(findn(adjmx)...)
add_edge!(g,s,d)
end
return g
end
View Installed.jl
julia> Pkg.status()
9 required packages:
- Cairo 0.2.27
- Debug 0.1.3
- Devectorize 0.4.1
- Distributions 0.7.3
- Gadfly 0.3.12
- IJulia 0.2.5
- LightGraphs 0.1.14
- Reel 0.1.0
View Steihaug-Cg.jl
using ForwardDiff
norm2(x::Vector) = dot(x,x) # define square norm function
function linesearch(z,
p,
grad,
B,
Δ,
c1::Real=1e-4,
You can’t perform that action at this time.