Mastering IPython 4.0

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Key Features Most updated book on Interactive computing with IPython 4.0; Detailed, example-rich guide that lets you use the most advanced level interactive programming with IPython; Get flexible interactive programming with IPython using this comprehensive guide Book Description IPython is an interactive computational environment in which you can combine code execution, rich text, mathematics, plots, and rich media. This book will get IPython developers up to date with the latest advancements in IPython and dive deep into interactive computing with IPython. This an advanced guide on interactive and parallel computing with IPython will explore advanced visualizations and high-performance computing with IPython in detail. You will quickly brush up your knowledge of IPython kernels and wrapper kernels, then we'll move to advanced concepts such as testing, Sphinx, JS events, interactive work, and the ZMQ cluster. The book will cover topics such as IPython Console Lexer, advanced configuration, and third-party tools. By the end of this book, you will be able to use IPython for interactive and parallel computing in a high-performance computing environment. What you will learn Develop skills to use IPython for high performance computing (HPC) Understand the IPython interactive shell Use XeroMQ and MPI to pass messages Integrate third-party tools like R, Julia, and JavaScript with IPython Visualize the data Acquire knowledge to test and document the data Get to grips with the recent developments in the Jupyter notebook system About the Author Thomas Bitterman has a PhD from Louisiana State University and is currently an assistant professor at Wittenberg University. He previously worked in the industry for many years, including a recent stint at the Ohio Supercomputer Center. Thomas has experience in such diverse areas as electronic commerce, enterprise messaging, wireless networking, supercomputing, and academia. He also likes to keep sharp, writing material for Packt Publishing and O'Reilly in his copious free time.

Author(s): Thomas Bitterman
Publisher: Packt Publishing
Year: 2016

Language: English
Pages: 0
City: Birmingham, UK
Tags: Python (Computer program language);Parallel programming (Computer science);Interactive computer systems;Python (Computer Program Language);Computers -- Programming Languages -- Python

Cover
Copyright
Credits
About the Author
About the Reviewer
www.PacktPub.com
Table of Contents
Preface
Chapter 1: Using IPython for HPC
The need for speed
FORTRAN to the rescue --
the problems FORTRAN addressed
Readability
Portability
Efficiency
The computing environment
Choosing between IPython and Fortran
Fortran
IPython
Object-orientation
Ease of adoption
Popularity --
Fortran versus IPython
Useful libraries
The cost of building (and maintaining) software
Requirements and specification gathering
Development
Execution
Testing and maintenance
Alternatives Cross-language developmentPrototyping and exploratory development
An example case --
Fast Fourier Transform
Fast Fourier Transform
Fortran
Python
Performance concerns
Software engineering concerns
Complexity-based metrics
Size-based metrics
Where we stand now
High Performance Computing
The HPC learning curve
Cloudy with a chance of parallelism (or Amazon's computer is bigger than yours)
HPC and parallelism
Clouds and HPC
Going parallel
Terminology
A parallel programming example
A serial program
A parallel equivalent
Discussion
Summary
Chapter 2: Advanced Shell Topics What is IPython?Installing IPython
All-in-one distributions
Package management with conda
Canopy Package Manager
What happened to the Notebook?
Starting out with the terminal
IPython beyond Python
Shell integration
History
Magic commands
Creating custom magic commands
Cython
Configuring IPython
Debugging
Post-mortem debugging
Debugging at startup
Debugger commands
Read-Eval-Print Loop (REPL) and IPython architecture
Alternative development environments
Spyder
Canopy
PyDev
Others
Summary
Chapter 3: Stepping Up to IPython for Parallel Computing
Serial processes Program counters and address spacesBatch systems
Multitasking and preemption
Time slicing
Threading
Threading in Python
Example
Limitations of threading
Global Interpreter Lock
What happens in an interpreter?
CPython
Multi-core machines
Kill GIL
Using multiple processors
The IPython parallel architecture
Overview
Components
The IPython Engine
The IPython Controller
The IPython Hub
The IPython Scheduler
Getting started with ipyparallel
ipcluster
Hello world
Using map_sync
Asynchronous calls
Synchronizing imports
Parallel magic commands
%px
%%px
%pxresult
%pxconfig %autopxTypes of parallelism
SIMD
SPMD
ipcluster and mpiexec/mpirun
ipcluster and PBS
MapReduce
Scatter and gather
A more sophisticated method
MIMD
MPMD
Task farming and load balancing
The @parallel function decorator
Data parallelism
No data dependence
External data dependence
Application steering
Debugging
First to the post
Graceful shutdown
Summary
Chapter 4: Messaging with ZeroMQ and MPI
The storage hierarchy
Address spaces
Data locality
ZeroMQ
A sample ZeroMQ program
The server
The client
Messaging patterns in ZeroMQ
Pairwise
Client/server
Publish/subscribe