- [local] -> [admin] -> [prod]
- [admin] -> [prod] の鍵は事前に配置済み
$HOME/.ssh/configで設定- 踏み台サーバ(admin)、目的のサーバ(prod) どちらにも鍵認証でログイン
$HOME/.ssh/configだけだと実行終了時のDONEで固まる
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
| """Information Retrieval metrics | |
| Useful Resources: | |
| http://www.cs.utexas.edu/~mooney/ir-course/slides/Evaluation.ppt | |
| http://www.nii.ac.jp/TechReports/05-014E.pdf | |
| http://www.stanford.edu/class/cs276/handouts/EvaluationNew-handout-6-per.pdf | |
| http://hal.archives-ouvertes.fr/docs/00/72/67/60/PDF/07-busa-fekete.pdf | |
| Learning to Rank for Information Retrieval (Tie-Yan Liu) | |
| """ | |
| import numpy as np |
| # Support for Rspec / Capybara subdomain integration testing | |
| # Make sure this file is required by spec_helper.rb | |
| # (e.g. save as spec/support/subdomains.rb) | |
| def switch_to_subdomain(subdomain) | |
| # lvh.me always resolves to 127.0.0.1 | |
| hostname = subdomain ? "#{subdomain}.lvh.me" : "lvh.me" | |
| Capybara.app_host = "http://#{hostname}" | |
| end |
| from Crypto.Cipher import AES | |
| from Crypto import Random | |
| BS = 16 | |
| pad = lambda s: s + (BS - len(s) % BS) * chr(BS - len(s) % BS) | |
| unpad = lambda s : s[0:-ord(s[-1])] | |
| class AESCipher: | |
| def __init__( self, key ): | |
| """ |
| """ Example using GenSim's LDA and sklearn. """ | |
| import numpy as np | |
| from gensim import matutils | |
| from gensim.models.ldamodel import LdaModel | |
| from sklearn import linear_model | |
| from sklearn.datasets import fetch_20newsgroups | |
| from sklearn.feature_extraction.text import CountVectorizer |
| BOOST_INC_DIR = [] | |
| BOOST_LIB_DIR = [] | |
| BOOST_COMPILER = 'gcc43' | |
| USE_SHIPPED_BOOST = True | |
| BOOST_PYTHON_LIBNAME = ['boost_python-py27'] | |
| BOOST_THREAD_LIBNAME = ['boost_thread'] | |
| CUDA_TRACE = False | |
| CUDA_ROOT = '/usr/local/cuda' | |
| CUDA_ENABLE_GL = False | |
| CUDA_ENABLE_CURAND = True |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
| Commit type | Emoji |
|---|---|
| Initial commit | 🎉 :tada: |
| Version tag | 🔖 :bookmark: |
| New feature | ✨ :sparkles: |
| Bugfix | 🐛 :bug: |
| # db/migrate/filename.rb | |
| # generate with >> rails g model image alt:string hint:string file:string | |
| class CreateImages < ActiveRecord::Migration[5.0] | |
| def change | |
| create_table :images do |t| | |
| t.string :alt | |
| t.string :hint | |
| t.string :file |
| '''This script goes along the blog post | |
| "Building powerful image classification models using very little data" | |
| from blog.keras.io. | |
| It uses data that can be downloaded at: | |
| https://www.kaggle.com/c/dogs-vs-cats/data | |
| In our setup, we: | |
| - created a data/ folder | |
| - created train/ and validation/ subfolders inside data/ | |
| - created cats/ and dogs/ subfolders inside train/ and validation/ | |
| - put the cat pictures index 0-999 in data/train/cats |