Skip to content

Instantly share code, notes, and snippets.

@scottstanfield
Created July 25, 2019 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottstanfield/e5af7a2e696a46967d8e118388042f86 to your computer and use it in GitHub Desktop.
Save scottstanfield/e5af7a2e696a46967d8e118388042f86 to your computer and use it in GitHub Desktop.
random julia notes

packages

using Pkg Pkg.add("Flux")

install chromium (and saka) look for a better terminal update dmz install juno for julia (maybe in vscode?)

how i got gpu working

install Flux.jl MXNet

https://medium.com/@zhanwenchen/install-cuda-10-1-and-cudnn-7-5-0-for-pytorch-on-ubuntu-18-04-lts-9b6124c44cc

cd /usr/local/cuda/samples
sudo make 'NVCCFLAGS=-m64 -D__GNUC__=8' -k

https://www.one-tab.com/page/Q4iBMTeGRYq3wN_dUlO5Pw

The setup

Ubuntu 19.04 with "properitary drivers"

link

CUDA and cuDNN on Ubuntu

cool julia things

Numbers with place separators

1_000_000

Easy tuples

1,2,3 --> (1,2,3)

SI or ENG units

1e6

all the glyphs

\pi TAB

comments are like shell script

# this is a comment

subscripts!

x\_1 TAB ==> x 

@show foo bar # prints value of foo and bar

episilon

if abs(y-x) < ε
    break
end

string interpolation:

greet = "Hello"
"$greet, world"

element of

'a' \in(TAB) "banana"

map function is .

t = "abc","def"
uppercase.(t)

test for equivalency

julia> a = "banana"
"banana"

julia> b = "banana"
"banana"

julia> a ≡ b
true

Can return values as tuples (yay)

function minmax(t)
	minimum(t),maximum(t)
end

## bummers about julia
No python like dictionary symbol { }
can't use single quotes around strings





Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment