Skip to content

Instantly share code, notes, and snippets.

View vochicong's full-sized avatar
🐒
NLP/ML/AI

Cong vochicong

🐒
NLP/ML/AI
View GitHub Profile
Verifying that "vochicong.id" is my Blockstack ID. https://onename.com/vochicong
@vochicong
vochicong / gcloud_source_2_app_engine.md
Last active May 11, 2017 00:27
Deploy Rails app from Google Cloud Source Repo to App Engine

GCP ConsoleでCloud Source Repoに格納されているソースコードをApp Engineにデプロイする手順

Commands

gcloud source repos clone [REPO_NAME] [TARGET_DIR] --project=[PROJECT_ID]

where [REPO_NAME] is Cloud Source Repository name, [TARGET_DIR] is where to put the source code, and [PROJECT_ID] is App Engine Project ID.

@vochicong
vochicong / circleci-gcpappengine.md
Last active September 2, 2018 01:54
CircleCI for GCP App Engine

CircleCIでGCP App Engineへデプロイ

目標

WebアプリをGitHubプライベートレポジトリから GCP App Engineへ手軽にCI/CDしたい。

Jenkins, TravisCI, CircleCIを比較した結果、今回CircleCIを試すことにしました。

  • Jenkinsが一番経験が多く、やりたいことをなんでもできるが、サーバの構築・運用が面倒だし、今回やりたいことは単純である。
  • TravisCIは使いやすいのだが、無料プランではGitHubプライベートレポジトリに対応してくれない。
  • CircleCIは初めてだが、UIがフレンドリだし、無料プランでもGitHubプレイベートレポジトリに対応している。
@vochicong
vochicong / cloudsql-rails.md
Last active May 14, 2017 02:35
Cloud SQL with Rails
@vochicong
vochicong / libraries-error-docker-gcloud-circleci.md
Created May 14, 2017 00:54
Libraries not found in GCP Docker when CircleCI deploying to GCP App Engine

CircleCI, GCP App Engineでライブラリが見つからないエラー

CircleCIからGCP App EngineへRailsアプリをデプロイする際、GCP Docker内で bundle exec rake assets:precompileが実行される時に libmysqlclient.so.20が見つからないエラーが出て、大変苦戦した。

原因

CircleCIは、deploymentフェーズの前に、testフェーズなどで 色々とやってくれているので、git commitされていない(deployには余計な?) ファイルがcurrent folderに大量生成される。

$ pip install --upgrade pip
$ pip install --user --upgrade virtualenv
$ export PATH=~/.local/bin/:$PATH
$ which virtualenv
/home/ubuntu//.local/bin/virtualenv
// Edit this keymap file and save to apply.
[
{ "command": "findnext", "keys": { "win": [""] } },
{ "command": "navigate", "keys": { "win": ["Alt-E"] } },
{ "command": "goToNextError", "keys": { "win": [""] } },
{ "command": "tab0", "keys": { "mac": ["Alt-0"] } },
{ "command": "tab1", "keys": { "mac": ["Alt-1"] } },
{ "command": "tab2", "keys": { "mac": ["Alt-2"] } },
{ "command": "tab3", "keys": { "mac": ["Alt-3"] } },
{ "command": "tab4", "keys": { "mac": ["Alt-4"] } },
virtualenv .env
source .env/bin/activate
pip install -U janome jupyter
pip install -U Cython git+https://github.com/explosion/spaCy
pip freeze > .env/requirements.txt
@vochicong
vochicong / 01-japanese-nlp-janome-spacy.ipynb
Last active November 20, 2019 09:17
Japanese NLP with janome/spaCy
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vochicong
vochicong / disable-gcp-apt-get-warning.md
Created May 21, 2017 07:52
disable `apt get` warning o GCP Console

To disable atp get warning when using GCP Console.

mkdir ~/.cloudshell touch ~/.cloudshell/no-apt-get-warning