Skip to content

Instantly share code, notes, and snippets.

@kyu999
kyu999 / 次のTODOはウェブクローラー&スクレイピング
Created August 11, 2014 09:03
次のTODOはウェブクローラー&スクレイピング
HaveToRead:
Scrapy ->
http://orangain.hatenablog.com/entry/scrapy
http://doc.scrapy.org/en/latest/
BeautifulSoup ->
http://furodrive.com/ja/2014/2/beautifulsoup
asyncio ->
http://postd.cc/fast-scraping-in-python-with-asyncio/
@kyu999
kyu999 / 辞書追加スクリプト作成
Last active August 29, 2015 14:05
辞書追加スクリプト作成
HaveToRead ->
http://tseiya.hatenablog.com/entry/2012/09/19/191114
http://blog.livedoor.jp/techblog/archives/65828235.html
@kyu999
kyu999 / stackoverflow
Created August 14, 2014 09:03
stackoverflow
http://stackoverflow.com/questions/25303839/i-need-to-extract-dom-element-of-main-contents-in-python/25303962#25303962
@kyu999
kyu999 / 改行deploy後懸念点
Created August 15, 2014 04:35
改行deploy後懸念点
断|裂 = > register
捕手座ら|せた => 文字数関係なく名詞と動詞の間は切る?
サッカーW杯 => register
ダル右|肘 => 文字数関係なく名詞と名詞の間は切る?
固有名詞 => register
意識高|い => ???
顔文字が区切れまくる
part.|2 => 切りたくないけどしょうがない
そのたくましい =>連体詞(その)の前後は切りたいかも
端末側で長いカタカナ一語来たときに改行するけど、それってレイアウト的にきれいなの??
@kyu999
kyu999 / boilerpipe_install
Last active August 29, 2015 14:05
boilerpipe_install
https://github.com/originell/jpype
pip install charade
https://github.com/misja/python-boilerpipe
あとはsetup.pyをたたく
@kyu999
kyu999 / TODO:
Created August 22, 2014 08:49
明日TODO:
1. レイアウト崩れの原因を伺う
2. rails命名規則を確認
@kyu999
kyu999 / HowToDebug
Created August 25, 2014 09:50
JSデバッグのこつ
1. 面倒でも一つ一つ確認する
2. console.logで出力する
3. ブラウザのデバッガーを活用する
4. ブレイクスルーポイントを利用してどこでエラーがおこっているのか詳しく見る
@kyu999
kyu999 / TODO
Created August 26, 2014 08:51
TODO:
1. bashについて学ぶ
@kyu999
kyu999 / 記事検索Tips
Last active August 29, 2015 14:05
記事検索Tips
http://railsdoc.com/references/find
http://www.atmarkit.co.jp/ait/articles/1405/30/news036_2.html#03
超使える解説 => http://qiita.com/budougumi0617/items/d98fc15adea4dab438e7
1. idで取得 => 1つのレコードを取得;
=> モデル.find(引数)
2. ageが30以上のすべてのレコードを取得
=> users = User.where("age >= ?", 30)
3. sqlインジェクション: 対策外部から入力された値を使う場合
=> params[:user]user = User.find(:all, :conditions => ["name = ?", name])
@kyu999
kyu999 / deployToHeroku
Created November 13, 2014 13:30
How to deploy flask app to heroku
Specify dependencies with Pip
Heroku recognizes Python applications by the existence of a requirements.txt file in the root of a repository. This simple format is used by most Python projects to specify the external Python modules the application requires.
Pip has a nice command (pip freeze) that will generate this file for us:
$ pip freeze > requirements.txt
requirements.txt
Django==1.7
dj-database-url==0.3.0
dj-static==0.0.6
gunicorn==19.1.1