Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?

line_profiler が便利です スピーチとスカートは短いほうがいい、という話を聞いたことがあります。 データ分析でも、実験をできるだけ多くしたいので、 前処理などの定型繰り返し作業はできるだけ短いほうがいいですね。 そんなときに役に立つのがプロファリングだと思います。 最近、プライベートで数10GB~サイズのデータを扱うことになりました。 その作業を通じて、並列処理、プロファイリングなどについて 小さな発見がありましたので、共有できたらなと思いました。 初回は、line_profilerでプロファイリングしたときの発見です。 line_profiler については、いろんな方が書いているので、調べて頂ければと思います。 とても素晴らしいプロジェクトです。 データの集計処理をプロファイリングする データについて 実際にあつかったデータはお見せできませんので。。。 そのデータに構造が近
Timing and Profiling in IPython Timing and profiling code is all sorts of useful, and it’s also just good ol’ fashioned fun (and sometimes surprising!). In this post, I’ll introduce how to do the following through IPython magic functions: %time & %timeit: See how long a script takes to run (one time, or averaged over a bunch of runs). %prun: See how long it took each function in a script to run. %
(let* ( (profile-name "profile_for_emacs") (folder-name-getter `(substring (shell-command-to-string (concat "ipython locate profile " ,profile-name)) 0 -1)) ) (unless (file-directory-p (eval folder-name-getter)) (shell-command (concat "ipython profile create " profile-name)) (let ((ipython-config-folder (eval folder-name-getter))) (shell-command (concat "echo \"\n\nc.InteractiveShellApp.extensions
Important This documentation covers IPython versions 6.0 and higher. Beginning with version 6.0, IPython stopped supporting compatibility with Python versions lower than 3.3 including all versions of Python 2.7. If you are looking for an IPython version compatible with Python 2.7, please use the IPython 5.x LTS release and refer to its documentation (LTS is the long term support release). Note To
IPython provides a rich architecture for interactive computing with: A powerful interactive shell. A kernel for Jupyter. Support for interactive data visualization and use of GUI toolkits. Flexible, embeddable interpreters to load into your own projects. Easy to use, high performance tools for parallel computing. To get started with IPython in the Jupyter Notebook, see our official example collect
# coding: utf-8 from IPython import embed from IPython.terminal.embed import InteractiveShellEmbed n = 1 print('start embed') embed() # === ipython interactive shell === # # print(n) # => 1 # # n += 1 # # Ctrl + D : exit ipython print('end embed') ipshell = InteractiveShellEmbed() print('start interactive shell') ipshell() # === ipython interactive shell === # # print(n) # => 2 # # Ctrl + D : exit
前置き 先日(2015/05/30)、Python東海 第27回勉強会で、「Jupyter + RISE による ライブデモ&プレゼンテーション」という発表をしてきました。 発表は、資料を Jupyter(IPython Notebook)で大枠を作り、RISE でリアルタイムスライド表示しながらその場で編集し、その場で Gist にアップ → nbviewer に登録 → nbviewer でのスライド表示、という流れで実施1。上記の発表資料は最終的に nbviewer で公開したスライド(後で少しだけ再編集したもの)です。 で、スライド関係は良かったのですが、主にそれ以外の環境設定周りについて、短い発表時間の中でだいぶ端折ったり、発表資料も最低限のことしか書いていないので、自分がやったことを補足しておこうと思います。 なおこの記事は、先日の記事「IPython + IJulia → J
(2019.06.25 追記) rbczmq は現時点では非推奨です。どのプラットフォームでも ffi-rzmq を使いましょう。 IRuby を使おうとすると rbczmq の中で SEGV が発生してしまう場合は、zeromq と czmq の組み合わせが悪い可能性がある。rbczmq が正しく動くインストールのパターンを以下に紹介するので、一番好ましいものを試してみると良い。 rbczmq は gem パッケージの中に zeromq と czmq を同梱しているが、後述する事情により同梱ライブラリを使わない方法を先に紹介する。 (1) homebrew や apt-get でインストールしたシステムの zeromq, czmq を使う この方法は、ディストリビューションで用意されている zeromq や czmq を確実に使うので、最もオススメしたい方法である。やり方は、まずシステム
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く