Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@reiyw
reiyw / chapter01.ipynb
Created October 25, 2016 07:06
言語処理100本ノックの解答です.Python 初学者を対象としているので無駄な技巧は用いませんが,できるだけ Pythonic な方法を目指します.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@reiyw
reiyw / 0_reuse_code.js
Created December 22, 2016 17:31
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@reiyw
reiyw / fzf-bazel-run.zsh
Last active September 13, 2021 09:33
fzf keybind to specify a target for Bazel run in zsh.
fzf-bazel-run() {
local ret=$(bazel query 'kind("_binary", //...)' --output location | fzf --with-nth 4 --preview 'a=($(echo {} | tr ":" " ")); tail -n +$a[2] $a[1] | sed "/^$/q"')
local a=(${(s/ /)ret})
local target=$a[4]
if [[ -n "$target" ]]; then
BUFFER="bazel run $target"
CURSOR=${#BUFFER}
fi
}
zle -N fzf-bazel-run