Skip to content

Instantly share code, notes, and snippets.

View ShigekiKarita's full-sized avatar
🌴
I may be slow to respond.

Shigeki Karita ShigekiKarita

🌴
I may be slow to respond.
View GitHub Profile
#!/usr/bin/env python3
from argparse import ArgumentParser
from collections import defaultdict
import requests
parser = ArgumentParser("release note generator")
parser.add_argument("--owner", default="espnet")
parser.add_argument("--repo", default="espnet")
// -*- mode: d -*-
// d++ ./opencl_test.dpp --compiler dmd -L-lOpenCL
module simple;
#include <CL/cl.h>
@nogc nothrow @safe
void checkCl(cl_int err)
{
assert(err == CL_SUCCESS);
#!/usr/bin/env bash
# usage:
# $ ./score_abcd.sh ./exp/tri3a_dnn/decode_tgpr_5k_dev_0330/scoring/15.tra
# tmp/result.A.txt: | SPKR | # Snt # Wrd | Corr Sub Del Ins Err S.Err |
# tmp/result.A.txt: | Sum/Avg| 330 5353 | 94.2 5.4 0.4 2.5 8.3 52.4 |
# tmp/result.B.txt: | SPKR | # Snt # Wrd | Corr Sub Del Ins Err S.Err |
# tmp/result.B.txt: | Sum/Avg| 1980 32118 | 88.3 9.2 2.5 1.8 13.5 66.3 |
# tmp/result.C.txt: | SPKR | # Snt # Wrd | Corr Sub Del Ins Err S.Err |
# tmp/result.C.txt: | Sum/Avg| 330 5353 | 84.8 13.8 1.4 3.0 18.2 65.2 |
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.
@ShigekiKarita
ShigekiKarita / test.d
Last active April 28, 2019 03:06
Comparison ld and gold
private static immutable FuncNum = 10_000;
void main() {
import std.algorithm : map;
import std.array : join;
import std.datetime.stopwatch : benchmark;
import std.file : write, remove;
import std.format : format;
import std.process : execute;
import std.range : iota;
/// # Part I. BASICS 基礎
/// ## 1. Hello World
/// 下の行にカーソルをおき, [ctrl+Enter] すると右下のPost windowに出力
"Hello World".postln;
/// ## 2. サーバと言語
@ShigekiKarita
ShigekiKarita / cookie_clicker_sort.js
Created March 3, 2019 03:09
one liner to show buildings sorted by cost performance
/*
Cooperative Groups requires CUDA9 or later.
see https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#cooperative-groups
*/
#include <assert.h>
#include <numeric>
#include <cmath>
#include <iostream>
@ShigekiKarita
ShigekiKarita / init.el
Created January 4, 2019 15:21
my dlang setting in emacs
;; before running emacs
;; $ dub fetch dcd
;; $ dub build dcd --build=release --config=server
;; $ dub build dcd --build=release --config=client
;; M-x package install company-dcd
(add-hook 'd-mode-hook 'company-dcd-mode)
(add-hook 'd-mode-hook 'flycheck-mode)
(add-hook 'd-mode-hook 'flycheck-dmd-dub-set-variables)
(setq dcd-bin