This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# convert extension | |
mv_ext() { | |
for nm in *.${1}; do | |
mv $nm ${nm%.${1}}.${2}; | |
done | |
} | |
# ffmpeg required | |
flac2mp3() { | |
1=${1:-"128"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cublas_v2.h> | |
namespace detail { | |
template <typename Dtype, typename Scalar> | |
using if_ = typename std::enable_if< | |
std::is_same<Dtype, Scalar>::value, cublasStatus_t>::type; | |
#define CUBLAS_FACTORY(funcname) \ | |
template <typename Dtype, typename ... Args> \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* Boolean *) | |
Inductive bool : Type := | |
| true : bool | |
| false : bool. | |
Definition negb (b : bool) : bool := | |
match b with | |
| true => false | |
| false => true | |
end. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Require Export Basics. | |
Module NatList. | |
Inductive natprod: Type := | |
pair : nat -> nat -> natprod. | |
Definition fst (p: natprod): nat := | |
match p with pair x y => x end. | |
Definition snd (p: natprod): nat := |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from numbers import Number | |
from chainer import cuda | |
from chainer import function | |
from chainer.utils import type_check | |
import numpy | |
class GradientClip(function.Function): | |
def __init__(self, lower, upper): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from https://github.com/pfnet/chainer/blob/master/tests/functions_tests/test_split_axis.py | |
# "setUp()" modified and "@condition.retry()" added | |
import unittest | |
import numpy | |
import chainer | |
from chainer import cuda | |
from chainer import functions | |
from chainer import gradient_check |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from https://github.com/pfnet/chainer/blob/master/tests/functions_tests/test_split_axis.py | |
# "setUp()" modified and "@condition.retry()" added | |
import unittest | |
import numpy | |
import chainer | |
from chainer import cuda | |
from chainer import functions | |
from chainer import gradient_check |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setenv "PATSHOME" (concat (getenv "HOME") "/tool/ats/ATS2-Postiats-0.2.1")) | |
;; https://raw.githubusercontent.com/mrd/ats2-mode/master/ats2-mode.el | |
(require 'ats-mode) | |
(setq auto-mode-alist | |
(append '(("\\.dats$" . ats-mode)) | |
auto-mode-alist)) | |
(add-hook 'ats-mode-hook | |
'(lambda () |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
function usage { | |
cat <<EOF | |
Note: | |
cp_bibpdf copys PDFs described in Mendeley's bibtex | |
Usage: | |
cp_bibpdf {src.bib} {dst_dir} | |
EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gistup |