Skip to content

Instantly share code, notes, and snippets.

View yubessy's full-sized avatar

Shotaro Tanaka yubessy

View GitHub Profile
@yubessy
yubessy / file1.txt
Last active August 29, 2015 14:01
PythonのbottleでBASIC認証 ref: http://qiita.com/yubessy/items/33789eccb35b659b0b4e
$ python hello.py
@yubessy
yubessy / Default (OSX).sublime-keymap
Last active August 29, 2015 14:01
Sublime Text 2でコマンドパレットのコマンドにショートカットキーを割り当てる ref: http://qiita.com/yubessy/items/546fc167e6c6c248415b
[
{
"keys": ["command+_"],
"command": "run_emmet_action",
"args": {
"action": "merge_lines"
}
}
]
@yubessy
yubessy / file0.txt
Last active August 29, 2015 14:00
PythonでExcelファイルを作成 + similarity matrix ref: http://qiita.com/yubessy/items/a39a565cdc2c5872cce9
$ pip install xlsxwriter
@yubessy
yubessy / corenlp_example.py
Last active August 29, 2015 14:00
Stanford CoreNLPをPythonから使う ref: http://qiita.com/yubessy/items/1869ac2c66f4e76cd6c5
import pprint
import json
import corenlp
# パーサの生成
corenlp_dir = "/usr/local/lib/stanford-corenlp-full-2013-06-20/"
parser = corenlp.StanfordCoreNLP(corenlp_path=corenlp_dir)
# パースして結果をpretty print
result_json = json.loads(parser.parse("I am Alice."))
@yubessy
yubessy / file0.txt
Last active August 6, 2022 17:16
MediaWiki APIを使ってWikipediaの情報を取得 ref: https://qiita.com/yubessy/items/16d2a074be84ee67c01f
http://ja.wikipedia.org/w/api.php?パラメータ1=値1&パラメータ2=値2&...&パラメータn=値n
@yubessy
yubessy / file0.txt
Last active August 29, 2015 14:00
Python2のstr/unicodeとencode/decode ref: http://qiita.com/yubessy/items/9e13af05a295bbb59c25
>>> 'あいう'
'\xe3\x81\x82\xe3\x81\x84\xe3\x81\x86'