Jupyter Notebook をEC2やリモートのサーバ上で起動させて使用する方法です。 Jupyter Notebook サーバーの起動 ローカルで Jupyter Notebook を起動する場合は特になにもしなくてもよいですが、サーバ上で起動するには設定ファイルが必要になります。jupyter notebook --generate-configで作成してください。 $ jupyter notebook --generate-config [I 00:01:07.633 NotebookApp] Writing notebook server cookie secret to /home/vagrant/.local/share/jupyter/runtime/notebook_cookie_secret Writing default config to: /home/vagr
こんにちは@tereka114です! 先日、社内勉強会がありました。 今回、私は「Jupyter Notebookを納品した話」で、発表しました。 普段、Jupyter Notebookをデータ分析や機械学習を取り組む中で使います。 このJupyter Notebookを案件の中で使ってみた時に感じたことを発表しました。 実際のスライドはSlide Shareにアップロードしました。 Jupyter Notebookを納品した話 from Hiroki Yamamoto www.slideshare.net Jupyter Notebook一つでドキュメンテーション、コード、図を書き、分析過程を見せられます。 実際の仕事で使うと自分の考えや分析の過程、そして、結果を説明する場面は必ず遭遇します。 そんな時に非常に重宝しました。 また、仕事を通してJupyter Notebookの良かった点
はじめに プログラミングをしていて、数の大きなデータを扱ったり、繰り返し処理を行っている時に「今、どのくらい終わっているのかな」と気になることがあると思いますが、Jupyter notebookでPrint文を多用すると少しわかりにくくなりますね。 そこで、アプリケーションをインストールする際に利用される進捗状況のプログレスバーをJupyter Notebookで使用する方法を紹介します。 サンプルコード Python 2系 from IPython.html.widgets import FloatProgress from IPython.display import display from time import sleep fp = FloatProgress(min=0, max=100) display(fp) for i in xrange(100): sleep(0.1)
何の話かというと JupyterでGIFアニメが作成できるようにしたので、高校物理で出てきそうな動画を作成してみました。 Jupyterが動作するDockerイメージを用意してあるので、環境準備は、CentOS7なら下記の手順でOKです。 # yum -y install docker # systemctl enable docker.service # systemctl start docker.service # mkdir ~/data # chcon -Rt svirt_sandbox_file_t ~/data # docker run -itd --name jupyter -p 8888:8888 -v ~/data:/root/notebook -e PASSWORD=hogehoge enakai00/jupyter_tensorflow:latest下記はサンプルコ
を加えることで、matplotlibのnbaggが有効になり、Jupyter上でアニメーションが再生できます。 matplotlibの公式の説明によると、nbaggはmatplotlib 1.4で新たに追加された機能で、Jupyter上でのインタラクティブな画像表示を実現するための機能だそうです。 以下はデモのソースコードです。 %matplotlib nbagg import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation fig = plt.figure() x = np.arange(0, 10, 0.1) ims = [] for a in range(50): y = np.sin(x - a) im = plt.plot(x, y, "r") ims.app
はじめに Jupyter初心者なので、AWS EC2上の環境構築方法、簡単な使い方を半年後の自分用にチラシの裏しておきます。 細かい設定はさておき、手っ取り早くEC2上にJupyter環境を構築し、Jupyter上で簡単なPython scriptを動かして、JupyterのUI操作方法の初歩を覚える所までを目標とします。Linux戦闘力が低いので、極力コピペで手順がなぞれる様に心がけます。 なお、Amazon EMRを使ってSpark Cluster上にJupyterを作りたい場合にはこちらを参照下さい。また、Jupyter Notebookは次期VersionよりJuypter Labとなり大きくUI/機能が変わる予定です。Jupyter Labの環境構築方法はこちらを参照下さい。 Jupyter環境構築 まずは、Jupyter環境を構築する手順です。 EC2の作成 Jupyterを動
はじめに ディープラーニングの学習経過の画像をjupyter上でリアルタイムに表示できるものがないかと探していたところ、Bokehというライブラリがあったので試してみました。 学習内容 Chainer を使って1層のDeconvolution 2D(簡単なフィルタみたいなもの)を学習させてみました。Deconvolutionについては以前にこちらで紹介したことなど参考にしてください。 下のgifでは点 ⇒ 球状の模様に変化させるように学習させています。 Bokehでは画像をマウスホイールで拡大縮小などできるので学習の確認には便利です。 ソース 以前のChainerではnumpyを一度Variableに変換する必要がありましたが、Ver 1.17の現在では自動でVariableに変換してくれるようです。 Bokehのjupyter上での表示についてはこちらなど参考にしています。 import
はじめに ポチポチKeras動かすのにどのような環境がいいのか考えてみました Keras + Docker + Jupyter Notebook + GPUの環境構築作業ログを紹介します Keras GitHub - fchollet/keras: Deep Learning library for Python. Convnets, recurrent neural networks, and more. Runs on Theano or TensorFlow. わかりやすいインターフェースがかなり好き Docker TensorFlowで学ぶディープラーニング入門~畳み込みニューラルネットワーク徹底解説 を参考にしました この本ではDockerを使用してます 当初はvirtualenv使用して環境作る予定だったので、勉強になりました 環境の移植性いいね GPU使用できるのいいね Ju
1. OpenStack Heat + Ansible + JupyterNotebook 動的に変化する環境への自動化適用例 2017/7/30 Tomoaki Nakajima @irix_jp 1 OSC2016 Kyoto 2. 発表者 中島倫明(Tomoaki Nakajima) @irix_jp o 日本OpenStackユーザ会 ボードメンバー(初代会長 2013-2015) o 東京大学 非常勤講師(S1/S2 月曜 2限) o 国立情報学研究所/TOPSE 講師 o 一般社団法人クラウド利用促進機構 技術アドバイザー 2 3. Infrastructure as a Code ITの現場から「不確定」な要素を取り除き、品質向上と結果としてのコ スト削減を実現する。 o 人為的ミス(見間違え、入力ミス、やったつもり、対象間違えなど)の防止 o 確実な再発防止 単
※Ubuntu版はこちらをご参照ください。 Tensorflow + GPU 環境を nvidia-docker を使って楽に作る (on Ubuntu 17.04) 背景 以前自作GPUマシン上でDeepLearning用の環境を構築したのですが、 GPUのドライバインストール Cuda/Cudnnのインストール DeepLearningライブラリのインストール 動作テスト とステップが多く、ハマると結構インストールに苦労します。 また、Cuda/Cudnn、各ライブラリ共にバージョンアップが頻繁であったり、色々とモジュールを入れているうちに依存関係が壊れてしまったり何かと環境を作り直したくなることも多いです。 簡単に環境を作り直せるようにしたいと思い、NVIDIAが提供しているnvidia-dockerを用いた環境構築の方法を試してみました。 目的 GPUマシン上でのDeepLearn
Open Community CallWe want to see all the cool things you’re doing with Jupyter, so we’re holding an open call with the community for people to chat, and share their creations and work. Think of it as a “virtual JupyterCon”: It’s a place to announce and share fun things happening in the Jupyter community.
今日の料理 Cookdo麻婆豆腐と手作り麻婆豆腐の自炊戦争が行なわれてから十数年たつが、正直Cookdoの麻婆豆腐の味は忘れてしまった。とはいえ、あらためてCookdoで作る気にはならんなー、ということで、丸善屋の麻婆豆腐の素を手にいれて作った。 メリットとしては、素には挽肉も入っているので、挽肉を炒めるという工程、同様に量にあわせて豆板醤を混ぜあわせるといった行為をしなくてもいいという部分にある。しかし、辛口を買ってきたつもりが、意外と辛くなく、がっかりするということもある。辛めの麻婆豆腐が好きであるならば、自炊したほうがいいのかもしれないな、というのが現状の結論である。 概要 Jupyter Notebookという、ブラウザ上で使えるREPL環境がある。これを使うと、RubyやPythonのコード結果を書き残しながら操作できるという利点がある。またこのJupyter Notebookに
計算は、慣れない人のアタマには負担だが、規則通りに進めていけばいいという利点がある。 たくさんの要素を扱ったり、複雑に込み入った推論を進めることもまた、人には負担の大きい作業だが、計算の形に変換することができれば、途中過程を規則的な繰り返し作業に置き換えることができる。たとえば機械に手伝ってもらえる。 今回、紹介するのは、数値化/統計的処理が難しい事象や、質的研究について、計算=演算の力を導入するとどんなことができるかという一例※である。 ※ 続くかどうかわからないが Sociology on Pythonシリーズの第一弾でもある。 ブール代数アプローチ(boolean algebra approach) ブール代数アプローチは、 Ragin(1989)によって、真理表とブール代数に依拠した比較分析の手法として、質的比較分析(Qualitative Comparative Analysi
今までIPython Notebook上でRを動かそうとするとrpy2やらをごにょごにょやるとかいう方法がありましたが、いちいち%%を打ったりといろいろ不便でした。 が、先月末(2015/02/27)のIPython 3.0のリリースでIPython Notebookが大きく変わり、(まだ開発版ですが)Rとの連携もかなり楽になりました!というか今後はRだけでなく、Juliaや他の言語もカバーする方向に進むそうで、特定の言語に依存しない部分をJupyterという別プロジェクトでやっていくそうです。 代表的な言語のJupyterカーネルとしては以下のようなものが存在する模様。 Python (https://github.com/ipython/ipython) Julia (https://github.com/JuliaLang/IJulia.jl) R (https://github.c
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く