Skip to content

Instantly share code, notes, and snippets.

@tkf
tkf / .gitignore
Last active February 2, 2018 01:09
.ipynb_checkpoints
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# コードは以下の URL より抜粋 & 改変:
# https://gist.github.com/genkuroki/799b4f2f5b081cfd4c7fca02fcffa23d
# (Revision: 66a60d5c8eafa420e3b5659e8b3181d7bbd71067)
# In [1]:
using BenchmarkTools
seed = 2018
cmap = "CMRmap"
using BenchmarkTools
@inline function partial_sum_inline(x, idx)
s = zero(eltype(x))
y = view(x, idx)
for i in 1:endof(y)
@inbounds s += y[i]
end
return s
end
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tkf
tkf / .gitignore
Last active November 30, 2017 01:32
lolcow.submit
job.*.error
job.*.output
job.log
from __future__ import print_function
import threading
import bokeh.client
import bokeh.plotting
import numpy
def make_plotter(num):
@tkf
tkf / .gitignore
Last active March 22, 2019 20:22
An implementation of Layer Normalization (Ba, Kiros & Hinton, 2016)
/.cache
*.pyc