This file contains 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
'.CodeMirror.vim-mode:not(.insert-mode):not(.key-buffering) textarea': | |
'0': 'vim-mode:move-to-beginning-of-line' |
This file contains 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
(* @param f float -> float | |
* @param a, b a < b | |
* @return result | |
* @example | |
* let pi = 3.1415926535;; | |
* integral sin 0.0 pi;; | |
*) | |
let integral f a b = | |
let n = 1e5 in | |
let delta = (b -. a) /. n in |
This file contains 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
let scrollstep = 200 | |
let hintcharacters = 'fjdksla;gh' | |
" Mapping | |
map ; openCommandBar | |
map gr previousTab | |
map d x |
This file contains 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
[Unit] | |
Description=Run mackerel agent | |
[Service] | |
Type=simple | |
ExecStart=/opt/mackerel-agent/mackerel-agent --conf=/etc/mackerel-agent/mackerel-agent.conf | |
ExecReload=/bin/kill -HUP $MAINPID | |
KillMode=process | |
Restart=always |
This file contains 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
function hoge() { | |
var a; | |
return "hello"; | |
} |
This file contains 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 sklearn.decomposition import PCA | |
from PIL import Image | |
import numpy as np | |
import scipy as sp | |
if __name__ == '__main__': | |
# 画像ファイル名に変えてください | |
filePath = 'gs.jpg' | |
# 試行するnの組(画像ピクセルサイズの最大数を超えないこと) | |
ns = [1,2,5,10,50,100,250] |
This file contains 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
Step 12 : RUN /etc/init.d/sshd start;/etc/init.d/sshd stop | |
---> Running in 88e8c405c1eb | |
/bin/sh: /etc/init.d/sshd: No such file or directory | |
/bin/sh: /etc/init.d/sshd: No such file or directory | |
INFO[0001] The command [/bin/sh -c /etc/init.d/sshd start;/etc/init.d/sshd stop] returned a non-zero code: 127 |
This file contains 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
library(testthat) | |
(function(){ | |
dir <- dirname(sys.frame(1)$ofile) | |
Test <- function(src.name) { | |
message(src.name) | |
source(paste(dir, '/', src.name, sep = '')) | |
test_file(paste(dir, '/test_', src.name, sep = '')) | |
} | |
# HACK | |
src.names <- grep('^(?!test|run_test).+$', |
This file contains 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
InstallPackages <- function(packages, repos) { | |
# インストールされていないパッケージをインストールします。 | |
# | |
# Args: | |
# packages: 必要パッケージ一覧 | |
new.packages <- packages[!(packages %in% installed.packages()[, "Package"])] | |
if(length(new.packages)) install.packages(new.packages, repos = repos) | |
for(package in packages) { | |
do.call("library", list(package = package)) | |
} |
This file contains 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
Combine <- function(df1, df2, fmt) { | |
# 同じサイズの2つの行列を用いて、各セル値を合成します。 | |
# | |
# Args: | |
# df1: 行列1 | |
# df2: 行列2 | |
# fmt: 表示書式(sprintf) | |
# | |
# Returns: | |
# 合成した行列 |
NewerOlder