Skip to content

Instantly share code, notes, and snippets.

View axsk's full-sized avatar

Alexander Sikorski axsk

  • Zuse Institute Berlin
  • Berlin
View GitHub Profile
@axsk
axsk / colors
Created August 20, 2014 22:08
colors for scientific visualization
% From http://colorbrewer2.org/
Paired =[ 166,206,227
31,120,180
178,223,138
51,160,44
251,154,153
227,26,28
253,191,111
255,127,0
202,178,214
Plugin 'gmarik/Vundle.vim' " plugin manager
Plugin 'scrooloose/nerdtree' " file tree
Plugin 'Valloric/YouCompleteMe' " autocompletion
Plugin 'scrooloose/syntastic' " syntax
Plugin 'majutsushi/tagbar' " tags (classes, ..)
Plugin 'taglist.vim' " tags
Plugin 'sjl/gundo' " undo history
Plugin 'garbas/vim-snipmate' " snippets
Plugin 'tpope/vim-surround' " quote/paranthesize
Plugin 'fholgado/minibufexpl.vim' " bufferview
# HEAD FROM lapack.jl
const liblapack = Base.liblapack_name
import Base.LinAlg: BlasFloat, BlasChar, BlasInt, blas_int, chkstride1, chksquare, Schur
# extract to appear in lapack.jl
# Reorder Schur forms
for (trsen, elty) in
((:dtrsen_,:Float64),
(:strsen_,:Float32))
$ make
Junction created for C:\dev\src\julia\usr\share\julia\base <<===>> C:\dev\src\julia\base
Junction created for C:\dev\src\julia\usr\share\julia\test <<===>> C:\dev\src\julia\test
Junction created for C:\dev\src\julia\usr\share\julia\doc <<===>> C:\dev\src\julia\doc
Junction created for C:\dev\src\julia\usr\share\julia\examples <<===>> C:\dev\src\julia\examples
/bin/sh ./config.status
config.status: creating libuv.pc
config.status: creating Makefile
config.status: executing depfiles commands
config.status: executing libtool commands
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by libuv configure 0.11.26, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --with-pic --prefix=/cygdrive/c/dev/src/julia/usr --build=x86_64-pc-cygwin --libdir=/cygdrive/c/dev/src/julia/usr/lib F77=gfortran CC=gcc CXX=g++ LDFLAGS= -v
## --------- ##
## Platform. ##
%matplotlib inline
import numpy as np
from scipy.spatial import Voronoi, voronoi_plot_2d
import matplotlib.pyplot as plt
points = np.array([[0, 0], [0, 1], [0, 2], [1, 0], [1, 1], [1, 2],
[2, 0], [2, 1], [2, 2]])
clusters = [1, 1, 1, 1, 2, 2, 2, 2, 2]

lein deps without phantomjs:

lein deps :tree
 [clj-webdriver "0.7.2"]
   [cheshire "5.5.0"]
     [com.fasterxml.jackson.core/jackson-core "2.5.3"]
     [com.fasterxml.jackson.dataformat/jackson-dataformat-cbor "2.5.3"]
     [com.fasterxml.jackson.dataformat/jackson-dataformat-smile "2.5.3"]
     [tigris "0.1.1"]
   [clj-http "2.0.0"]
@axsk
axsk / extract.jl
Last active October 8, 2015 12:15
not terminating
for method=methods, i=imgs, n=[clusternums[i]-1:clusternums[i]+1], mirrored = [false,true], left = [true,false], kernel=kernels
# print log
println(" image: $i, n: $n, mirrored: $mirrored, left: $left, method: $method, kernel: $kernel ")
# skip already computed data
if hasentry(hdf, i, n, mirrored, left, method, kernel)
println(", skipping...")
p.n = p.n-1
continue
findcalls(x::Expr)=mapreduce(findcalls, vcat, ex.head == :call ? x.args[1] : [], filter(arg->isa(arg, Expr), x.args))
@axsk
axsk / gist:4c32dcd0c7a90a483077
Created February 28, 2016 13:38
mamba.jl: proof of per-chain tune reset
After applying
``` diff
diff --git a/src/model/mcmc.jl b/src/model/mcmc.jl
index 8dc127c..30e3e61 100644
--- a/src/model/mcmc.jl
+++ b/src/model/mcmc.jl
@@ -61,9 +61,12 @@ end
function mcmc_worker!(args::Vector)
m, state, window, burnin, thin, meter = args