Skip to content

Instantly share code, notes, and snippets.

@ilkerkesen
ilkerkesen / .bash_profile
Last active February 14, 2021 14:18
cluster environment
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
export PATH=$PATH:$HOME/.local/bin:$HOME/bin
@ilkerkesen
ilkerkesen / frame.jl
Created April 3, 2018 10:51
luxor image
using Luxor
function make_frame(W, H, images, captions, title="title", fn="drawing.png")
@assert length(images) == length(captions)
nimg = length(images) + 1
width = W*nimg; height = H*nimg
Drawing(width, height, fn)
tiles = Tiler(W,H,1,nimg)
origin()
background("white")
@ilkerkesen
ilkerkesen / Makefile
Created March 5, 2018 16:56
Example Makefile for Interactive Graphics Course
# change "/path/to/lib" strings
LDLIBS = -lglut -lGLEW -lGL -lGLU
CXXINCS = -I/path/to/lib/include
INIT_SHADER = /path/to/lib/common/InitShader.cpp
INIT_SHADER_OBJ = /path/to/lib/common/InitShader.o
.PHONY: clean cleanall
all: program
@ilkerkesen
ilkerkesen / git-tutorial.txt
Created February 26, 2018 14:23
Git Tutorial
degisiklikleri alma => git fetch remote_name + git merge origin/branch-name
o anki reponun durumunu goruntuleme => git status
degisiklikleri goruntuleme => git diff
degisiklikleri stage area'ya gonderme => git add file1 file2
degisiklikleri yerel repoya kaydetmek => git commit -m "message"
yerel reponun history'sini gormek => git log -v
yerel repodaki degisiklikleri merkez repoya gondermek => git push remote_name branch_name
mevcut branchleri goruntuleme => git branch -v
yeni branch olusturma => git checkout -b new_branch_name base_branch_name
branch'i remote'a gonderdikten sonra PR (pull request acma) GitHub'un arayuzunden
@ilkerkesen
ilkerkesen / .bash_profile
Last active February 4, 2018 12:19
COMP 541 - KUACC Configuration
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
export TERM=xterm
export SCRATCH=/scratch/users/$USER
export JULIA_PKGDIR=$SCRATCH/.julia
# modules
julia> using Knet
ERROR: InitError: cudart.cudaRuntimeGetVersion error 38
Stacktrace:
[1] gpu(::Bool) at /KUFS/scratch/ikesen16/.julia/newnode/v0.6/Knet/src/gpu.jl:13
[2] __init__() at /KUFS/scratch/ikesen16/.julia/newnode/v0.6/Knet/src/Knet.jl:59
[3] _include_from_serialized(::String) at ./loading.jl:157
[4] _require_from_serialized(::Int64, ::Symbol, ::String, ::Bool) at ./loading.jl:200
[5] _require_search_from_serialized(::Int64, ::Symbol, ::String, ::Bool) at ./loading.jl:236
[6] _require(::Symbol) at ./loading.jl:434
[7] require(::Symbol) at ./loading.jl:398
@ilkerkesen
ilkerkesen / rnnlm-timing.txt
Created December 3, 2017 18:33
RNNLM Profiling
─────────────────────────────────────────────────────────────────────────────────────
Time Allocations
────────────────────── ───────────────────────
Tot / % measured: 207s / 26.0% 99.3MiB / 55.3%
Section ncalls time %tot avg alloc %tot avg
─────────────────────────────────────────────────────────────────────────────────────
back1.Knet.logp 1.00k 10.2s 19.0% 10.2ms 2.94MiB 5.36% 3.01KiB
forw.* 1.00k 10.1s 18.8% 10.1ms 2.77MiB 5.06% 2.84KiB
back2.AutoGrad.broadcast#+ 1.00k 6.05s 11.3% 6.05ms 652KiB 1.16% -
@ilkerkesen
ilkerkesen / errortrace.txt
Created December 2, 2017 14:23
cuarrays - indexing
julia> include("indexing.jl")
summary(a) = "4×4×4 Array{Float64,3}"
summary(a[:, 2, 2]) = "4-element Array{Float64,1}"
summary(a[:, [2, 4], 2]) = "4×2 Array{Float64,2}"
summary(a[:, [2, 4], [1, 3]]) = "4×2×2 Array{Float64,3}"
summary(a[:, [2, 4], :]) = "4×2×4 Array{Float64,3}"
summary(a[:, 2:4, :]) = "4×3×4 Array{Float64,3}"
summary(a[:, 1:2:4, :]) = "4×2×4 Array{Float64,3}"
summary(a) = "4×4×4 CuArray{Float64,3}"
summary(a[:, 2, 2]) = "4-element CuArray{Float64,1}"
@ilkerkesen
ilkerkesen / reduction-timing1.log
Last active April 6, 2017 19:40
Knet Reduction Timings
6-element Array{Tuple{Int64,Int64},1}:
(100,100)
(500,500)
(100,1000)
(1000,100)
(100,60000)
(60000,100)
julia> a = randn(Float32, ds[1]...);
@ilkerkesen
ilkerkesen / error.log
Created April 6, 2017 08:45
Knet Issue #108
julia> using Knet
INFO: Knet using GPU 0
julia> a = randn(10, 20); k = KnetArray(a);
julia> k.^2
10×20 Knet.KnetArray{Float64,2}:
NaN 3.71246 0.317756 NaN NaN NaN … NaN 0.854236 2.45753 3.18989 NaN
NaN 2.89357 0.410529 0.341318 8.44459 0.390959 0.123474 NaN 0.25356 NaN NaN
0.878611 0.0585478 NaN 0.758786 0.600756 NaN NaN NaN 0.44549 NaN 0.289267