Skip to content

Instantly share code, notes, and snippets.

@Keno
Keno / gist:7294889
Created November 3, 2013 21:15
Plotting SPICE data with Gadfly.
{
"metadata": {
"language": "Julia",
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@Keno
Keno / gist:7305643
Created November 4, 2013 16:55
Julia ASAN report.
==7881==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6040131b7b80 at pc 0x10155f39f bp 0x7fff5fbf3d90 sp 0x7fff5fbf3d88
READ of size 1 at 0x6040131b7b80 thread T0
==7881==WARNING: Trying to symbolize code, but external symbolizer is not initialized!
#0 0x10155f39e in emit_function codegen.cpp:2898
#1 0x1014adfec in to_function codegen.cpp:252
#2 0x1014ad75f in jl_compile codegen.cpp:313
#3 0x1014a6eaa in jl_trampoline builtins.c:814
#4 0x101498db4 in jl_apply .julia.h:1026
#5 0x10149accb in jl_apply_generic gf.c:1357
#6 0x131a1bf33
{
"metadata": {
"language": "Julia",
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@Keno
Keno / gist:7463559
Created November 14, 2013 08:49
test.csv
"x1","x2"
"0.01","0"
"0.02","1.535366e-5"
"0.03","1.3862209999999998e-5"
"0.04","1.23397e-5"
"0.05","1.0783170000000007e-5"
"0.06","9.189189999999996e-6"
"0.07","7.553879999999994e-6"
"0.08","5.872820000000004e-6"
"0.09","4.140870000000004e-6"
#0 __GI_exit (status=1) at exit.c:100
#1 0x00007ffff657404e in llvm::report_fatal_error(llvm::Twine const&, bool) ()
from /home/kfischer/julia/usr/bin/../lib/libjulia-debug.so
#2 0x00007ffff6574209 in llvm::report_fatal_error(char const*, bool) ()
from /home/kfischer/julia/usr/bin/../lib/libjulia-debug.so
#3 0x00007ffff65368b9 in (anonymous namespace)::PreVerifier::runOnFunction(llvm::Function&) ()
from /home/kfischer/julia/usr/bin/../lib/libjulia-debug.so
#4 0x00007ffff651294f in llvm::FPPassManager::runOnFunction(llvm::Function&) ()
from /home/kfischer/julia/usr/bin/../lib/libjulia-debug.so
#5 0x00007ffff65129bb in llvm::FPPassManager::runOnModule(llvm::Module&) ()
@Keno
Keno / gist:7610344
Created November 23, 2013 03:18
Possible memory error
=================================================================
==54301==ERROR: AddressSanitizer: global-buffer-overflow on address 0x7ffff4b04d40 at pc 0x7fffefb16551 bp 0x7fffffffce70 sp 0x7fffffffce68
READ of size 8 at 0x7ffff4b04d40 thread T0
#0 0x7fffefb16550 in jl_stat_ctime /home/kfischer/julia/src/sys.c:205
#1 0x7fffe09903bc (+0x3bc)
#2 0x7fffe099005b (+0x5b)
#3 0x7fffef8e85e9 in jl_apply /home/kfischer/julia/src/./julia.h:1025
#4 0x7fffef8f57b2 in jl_trampoline /home/kfischer/julia/src/builtins.c:822:12
#5 0x7fffef8a8799 in jl_apply /home/kfischer/julia/src/./julia.h:1025
#6 0x7fffef8b4844 in jl_apply_generic /home/kfischer/julia/src/gf.c:1357:12
diff --git a/src/krylov.jl b/src/krylov.jl
index 9db3dd5..1beaead 100644
--- a/src/krylov.jl
+++ b/src/krylov.jl
@@ -23,10 +23,10 @@ type KrylovSubspace{T}
end
KrylovSubspace{T}(A, n::Int, order::Int=maxdim, v::Vector{Vector{T}}=Vector{T}[])=
- KrylovSubspace(A, n, order, v)
+ KrylovSubspace{T}(A, n, order, v)
@Keno
Keno / gist:8422936
Created January 14, 2014 18:14
IJulia install script
sudo add-apt-repository ppa:staticfloat/julia-deps -y
sudo add-apt-repository ppa:staticfloat/julianightlies -y
sudo apt-get update
sudo apt-get install julia python-pip python-dev libfreetype6-dev libpng12-dev
sudo pip install jinja2 tornado pyzmq numpy matplotlib ipython
julia -e 'Pkg.init(); Pkg.add("IJulia"); Pkg.checkout("IJulia"); Pkg.add("PyPlot"); Pkg.add("Gadfly");'
mkdir ~/.ipython/profile_default
==2804== at 0x4C2B75D: free (vg_replace_malloc.c:468)
==2804== by 0x4FC7CB1: ios_close (in /home/kfischer/julia-san/usr/lib/libjulia-debug.so)
==2804== by 0x4FAB5C1: gc (in /home/kfischer/julia-san/usr/lib/libjulia-debug.so)
==2804== by 0x4FBC8A4: apply_cl (in /home/kfischer/julia-san/usr/lib/libjulia-debug.so)
==2804== by 0x4FBDBC0: do_trycatch (in /home/kfischer/julia-san/usr/lib/libjulia-debug.so)
==2804== by 0x4FBCA00: apply_cl (in /home/kfischer/julia-san/usr/lib/libjulia-debug.so)
==2804== by 0x4FB1047: _applyn (in /home/kfischer/julia-san/usr/lib/libjulia-debug.so)
==2804== by 0x4FB11EB: fl_applyn (in /home/kfischer/julia-san/usr/lib/libjulia-debug.so)
==2804== by 0x4F005C3: jl_expand (ast.c:505)
==2804== by 0x4F9D584: jl_toplevel_eval_flex (toplevel.c:377)
@Keno
Keno / gist:8573181
Created January 23, 2014 05:03
USCounties.csv
NAME,STATE_NAME,STATE_FIPS,CNTY_FIPS,FIPS
Lake of the Woods,Minnesota,27,077,27077
Ferry,Washington,53,019,53019
Stevens,Washington,53,065,53065
Okanogan,Washington,53,047,53047
Pend Oreille,Washington,53,051,53051
Boundary,Idaho,16,021,16021
Lincoln,Montana,30,053,30053
Flathead,Montana,30,029,30029
Glacier,Montana,30,035,30035