Friday 14 July 2017

copy paste vim

install vim-gtk Copy into the clipboard. "+P to paste into vim, selecting " as the register "+Y to yank to the system 'board.

Friday 7 July 2017

julia reading a string as if it's a file.

This opens all those file reading functions to direct input. :) julia> readcsv(IOBuffer("1,\"text, more text\",3,4")) from https://stackoverflow.com/questions/21437137/how-to-parse-csv-files-with-double-quoted-strings-in-julia

Wednesday 5 July 2017

julia's filter


In []: xlist = [1,2,3,4,5,6,7,8,9]  
       xmin = 3; xmax = 7;  
       filter!(e->(e < xmax) & (e > xmin), xlist)  
Out[]: 3-element Array{Int64,1}:  
       4  
       5  
       6  

Tuesday 4 July 2017

nested list comprehensions.

Julia 0.5: to flatten an array of arrays: [i for j in e₀ for i in j]