Let this long package float,
Goto private class if short.
While protected with debugger case,
Continue volatile interface.
Instanceof super synchronized throw,
Extends final export throws.
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
#!/bin/sh | |
TARGET=boot2docker | |
if [ ! -e $TARGET ]; then | |
rm $TARGET | |
fi | |
curl https://raw.github.com/boot2docker/boot2docker/master/boot2docker > $TARGET | |
chmod +x $TARGET |
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
module.exports = (robot) -> | |
robot.respond /yukkuri (\S+)/i, (msg) -> | |
url = "http://xxxx.t.proxylocal.com/#{encodeURIComponent(msg.match[1])}" | |
getResult(msg, url) | |
getResult = (msg, url) -> | |
msg.http(url).get() (err, res, body) -> | |
if err | |
msg.send "something went wrong." | |
else |
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
tenkiのpref番号 | |
1,2,3,4 hokkaido | |
5 aomori | |
6 iwate | |
7 miyagi | |
8 akita | |
9 yamagata | |
10 fukusgima | |
11 ibaraki | |
12 tochigi |
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
turtle.forward() |
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: | |
# 合成した行列 |
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
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
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
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] |
OlderNewer