普段、Pythonのコードは何となく速かろうという、言ってみれば勘で書いているのだけど、その勘とやらは往々にしてウンコードを生むものである。そこで、プロファイラを使っていきたいと思う。 使えそうなツール そういうわけで、いくつか使えそうなツールをリストアップした。 経過時間のプロファイラ ツール名 メモ profile ビルトイン, ピュアPythonの決定論的プロファイラ cProfile ビルトイン, C拡張の決定論的プロファイラ line_profiler 行単位の決定論的プロファイラ Plop 統計的プロファイラ, Dropboxの人が作ってる statprof 統計的プロファイラ, 開発停止? yep 拡張モジュール用の統計的プロファイラ, バックエンドにgoogle-perftools メモリのプロファイラ ツール名 メモ memory_profiler 行単位でメモリ消費量の
Start fancy debugger in a single statement. People debug with print. It's great in simple cases. Another debugging tool, pdb, is less popular as it requires more effort: one has to do a Google search, skim through documentation, type some long "trace... sth", and all of this only to get some unfriendly two-color shell that doesn't even seem to understand how tab key should work. This project FTFY:
\ escape special characters . matches any character ^ matches beginning of string $ matches end of string [5b-d] matches any chars '5', 'b', 'c' or 'd' [^a-c6] matches any char except 'a', 'b', 'c' or '6' R|S matches either regex R or regex S () creates a capture group and indicates precedence * 0 or more (append ? for non-greedy) + 1 or more (append ? for non-greedy) ? 0 or 1 (append ? for non-gr
pytest: helps you write better programs¶ The pytest framework makes it easy to write small, readable tests, and can scale to support complex functional testing for applications and libraries. pytest requires: Python 3.7+ or PyPy3. PyPI package name: pytest A quick example¶ # content of test_sample.py def inc(x): return x + 1 def test_answer(): assert inc(3) == 5 $ pytest ==========================
Welcome to PyOpenCL’s documentation!¶ PyOpenCL gives you easy, Pythonic access to the OpenCL parallel computation API. What makes PyOpenCL special? Object cleanup tied to lifetime of objects. This idiom, often called RAII in C++, makes it much easier to write correct, leak- and crash-free code. Completeness. PyOpenCL puts the full power of OpenCL’s API at your disposal, if you wish. Every obscure
Welcome to PyCUDA’s documentation!¶ PyCUDA gives you easy, Pythonic access to Nvidia’s CUDA parallel computation API. Several wrappers of the CUDA API already exist–so why the need for PyCUDA? Object cleanup tied to lifetime of objects. This idiom, often called RAII in C++, makes it much easier to write correct, leak- and crash-free code. PyCUDA knows about dependencies, too, so (for example) it w
The Boost C++ Libraries are open source, peer-reviewed, portable and free Created by experts to be reliable, skillfully-designed, and well-tested. Boost Mission development of high quality, expert reviewed, legally unencumbered, open-source libraries, inspiring standard enhancements, and advancing and disseminating software development best practices. It does this by fostering community engagement
みんなのIoT/みんなのPythonの著者。二子玉近く160平米の庭付き一戸建てに嫁/息子/娘/わんこと暮らしてます。月間1000万PV/150万UUのWebサービス運営中。 免責事項 プライバシーポリシー python.orgのwikiにある,Parallel Processing and Multiprocessing in Pythonの翻訳です。たくさんありますね〜。抜粋している部分があるので,詳しく知りたい人は原文を読んだりリンクを辿ることをお勧めします:-)。 Pythonには,複数のCPUやマルチコアCPU,共有メモリ環境,クラスタやグリッド環境を活用するためのライブラリが多く存在します。このページでは,個々のライブラリやソリューションの情報を調べてまとめています。 対称型マルチプロセッシング delegate - forkベース。pipeを使ってpickeしたデータを送りプ
Grab has been made to: Extract data from web-site Work with web-API Automate human-like activity on web-site Web-Resources: Github project: source code and issue tracker: http://github.com/lorien/grab English mailing list: http://groups.google.com/group/grab-users English documentation: http://docs.grablib.org/en/latetst/ Russian mailing list: http://groups.google.com/group/python-grab Russian doc
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く