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
pref_code,city_code,city | |
01,01101,札幌市中央区 | |
01,01102,札幌市北区 | |
01,01103,札幌市東区 | |
01,01104,札幌市白石区 | |
01,01105,札幌市豊平区 | |
01,01106,札幌市南区 | |
01,01107,札幌市西区 | |
01,01108,札幌市厚別区 | |
01,01109,札幌市手稲区 |
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
VERSION BUILD=8340723 RECORDER=CR | |
SET !REPLAYSPEED SLOW | |
SET !TIMEOUT_STEP 30 | |
URL GOTO=http://e-stat.go.jp/SG2/eStatGIS/page/download.html | |
TAG POS=1 TYPE=DIV ATTR=ID:contents | |
TAG POS=1 TYPE=SELECT ATTR=ID:censusclass_list CONTENT=%国勢調査 | |
TAG POS=1 TYPE=SELECT ATTR=ID:census_list CONTENT=%A002005212010 | |
TAG POS=1 TYPE=INPUT:CHECKBOX ATTR=ID:step2_T000572 CONTENT=YES | |
TAG POS=2 TYPE=INPUT:BUTTON ATTR=* | |
TAG POS=1 TYPE=SELECT ATTR=ID:pref_list CONTENT=%13 |
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
[elasticsearch-1.4] | |
name=Elasticsearch repository for 1.4.x packages | |
baseurl=http://packages.elastic.co/elasticsearch/1.4/centos | |
gpgcheck=1 | |
gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch | |
enabled=1 | |
[elasticsearch-2.x] | |
name=Elasticsearch repository for 2.x packages | |
baseurl=http://packages.elastic.co/elasticsearch/2.x/centos |
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
X <- iris[, c('Petal.Length','Petal.Width')] # or iris[, 3:4](pythonの配列の添字は0始まりなので1ずつずれる) | |
y <- iris$Species # or iris[, 5] |
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(httr) | |
res <- POST(url = 'https://api.projectoxford.ai/face/v0/findsimilars', | |
add_headers('Content-Type' = 'application/json', | |
'Ocp-Apim-Subscription-Key' = '[Subscription key]'), | |
body = '{ | |
"faceId":"[比較元のFace ID]", | |
"faceIds": [ | |
"[比較先のFace ID]", | |
"[比較先のFace ID]", |
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(rvest) | |
page <- 1 | |
sesh <- html_session('[クローリングするURL]') | |
Sys.sleep(10) | |
repeat{ | |
sesh <- tryCatch(follow_link(sesh, "次の20件"), error=function(e)(return(NULL))) | |
message(Sys.time(), ' ', sesh$url) | |
page <- page + 1 | |
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(httr) | |
res <- POST(url = 'https://api.projectoxford.ai/face/v0/verifications', | |
add_headers('Content-Type' = 'application/json', | |
'Ocp-Apim-Subscription-Key' = '[Subscription key]'), | |
body = '{ | |
"faceId1":"[比較元のFace ID]", | |
"faceId2":"[比較先のFace ID]" | |
}' | |
) |
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(httr) | |
# ネット上の画像の場合はJSONでURLをPOST | |
res <- POST(url = 'https://api.projectoxford.ai/face/v0/detections', | |
query = list(analyzesFaceLandmarks=TRUE, | |
analyzesAge=TRUE, | |
analyzesGender=TRUE, | |
analyzesHeadPose=TRUE), | |
add_headers('Content-Type' = 'application/json', | |
'Ocp-Apim-Subscription-Key' = '[Subscription key]'), |
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(httr) | |
img <- upload_file([画像ファイルのパス]) | |
res <- POST(url = 'https://api.projectoxford.ai/face/v0/detections', | |
query = list(analyzesFaceLandmarks=FALSE, | |
analyzesAge=TRUE, | |
analyzesGender=TRUE, | |
analyzesHeadPose=FALSE), | |
add_headers('Content-Type' = 'application/octet-stream', |
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
c.NotebookApp.ip = '*' | |
c.NotebookApp.open_browser = False | |
c.NotebookApp.port = 9999 # or whatever you want; be aware of conflicts with CDH | |
PWDFILE='パスワードファイルのパス' | |
c.NotebookApp.password = open(PWDFILE).read().strip() | |
c.NotebookApp.base_url = '/jupyter/' | |
c.NotebookApp.webapp_settings = {'static_url_prefix':'/jupyter/static/'} | |
c.NotebookApp.certfile = u'証明書ファイル(*.pem)のパス' |