Python Scripting for Computational Science

Size: px
Start display at page:

Download "Python Scripting for Computational Science"

Transcription

1 Hans Petter Langtangen Python Scripting for Computational Science Third Edition With 62 Figures 43 Springer

2 Table of Contents 1 Introduction Scripting versus Traditional Programming Why Scripting is Useful in Computational Science Classification of Programming Languages Productive Pairs of Programming Languages Gluing Existing Applications Scripting Yields Shorter Code Efficiency Type-Specification (Declaration) of Variables Flexible Function Interfaces Interactive Computing Creating Code at Run Time Nested Heterogeneous Data Structures GUI Programming Mixed Language Programming When to Choose a Dynamically Typed Language Why Python? Script or Program? Preparations for Working with This Book Getting Started with Python Scripting A Scientific Hello World Script Executing Python Scripts Dissection of the Scientific Hello World Script Working with Files and Data Problem Specification The Complete Code Dissection Working with Files in Memory Array Computing Interactive Computing and Debugging Efficiency Measurements Exercises Gluing Stand-Alone Applications The Simulation Code Using Gnuplot to Visualize Curves Functionality of the Script The Complete Code Dissection Exercises Conducting Numerical Experiments Wrapping a Loop Around Another Script... 59

3 XII Table of Contents Generating an HTML Report Making Animations Varying Any Parameter File Format Conversion A Simple Read/Write Script Storing Data in Dictionaries and Lists Making a Module with Functions Exercises Basic Python Introductory Topics Recommended Python Documentation Control Statements Running Applications File Reading and Writing Output Formatting Variables of Different Types Boolean Types The None Variable Numbers and Numerical Expressions Lists and Tuples Dictionaries Splitting and Joining Text String Operations Text Processing The Basics of a Python Class Copy and Assignment Determining a Variable's Type Exercises Functions Keyword Arguments Doc Strings Variable Number of Arguments Call by Reference Treatment of Input and Output Arguments Function Objects Working with Files and Directories Listing Files in a Directory Testing File Types Removing Files and Directories Copying and Renaming Files Splitting Pathnames Creating and Moving to Directories Traversing Directory Trees Exercises

4 Table of Contents XIII 4 Numerical Computing in Python A Quick NumPy Primer Creating Arrays Array Indexing Loops over Arrays Array Computations More Array Functionality Type Testing Matrix Objects Exercises Vectorized Algorithms From Scalar to Array in Function Arguments Slicing Exercises More Advanced Array Computing Random Numbers Linear Algebra Plotting Example: Curve Fitting Arrays an Structured Grids File I/O with NumPy Arrays Functionality in the Numpyutils Module Exercises Other Tools for Numerical Computations The ScientificPython Package The SciPy Package The Python-Matlab Interface Symbolic Computing in Python Some Useful Python Modules Combining Python with Fortran, C, and C About Mixed Language Programming Applications of Mixed Language Programming Calling C from Python Automatic Generation of Wrapper Code Scientific Hello World Examples Combining Python and Fortran Combining Python and C Combining Python and C++ Functions Combining Python and C++ Classes Exercises A Simple Computational Steering Example Modified Time Loop for Repeated Simulations Creating a Python Interface The Steering Python Script Equipping the Steering Script with a GUI Scripting Interfaces to Large Libraries

5 XIV Table of Contents 6 Introduction to GUI Programming Scientific Hello World GUI Introductory Topics The First Python/Tkinter Encounter Binding Events Changing the Layout The Final Scientific Hello World GUI An Alternative to Tkinter Variables About the Pack Command An Introduction to the Grid Geometry Manager Implementing a GUI as a Class A Simple Graphical Function Evaluator Exercises Adding GUIs to Scripts A Simulation and Visualization Script with a GUI Improving the Layout Exercises A List of Common Widget Operations Frame Label Button Text Entry Balloon Help Option Menu Slider Check Button Making a Simple Megawidget Menu Bar List Data Listbox Radio Button Combo Box Message Box User-Defined Dialogs Color-Picker Dialogs File Selection Dialogs Toplevel Some Other Types of Widgets Adapting Widgets to the User's Resize Actions Customizing Fonts and Colors Widget Overview Exercises

6 `Fable of Contents XV 7 Web Interfaces and CGI Programming Introductory CGI Scripts Web Forms and CGI Scripts Generating Forms in CGI Scripts Debugging CGI Scripts A General Shell Script Wrapper for CGI Scripts Security Issues Adding Web Interfaces to Scripts A Class for Form Parameters Calling Other Programs Running Simulations Getting a CGI Script to Work Using Web Applications from Scripts Exercises Advanced Python Miscellaneous Topics Parsing Command-Line Arguments Platform-Dependent Operations Run-Time Generation of Code Exercises Regular Expressions and Text Processing Motivation Special Characters Regular Expressions for Real Numbers Using Groups to Extract Parts of a Text Extracting Interval Limits Extracting Multiple Matches Splitting Text Pattern-Matching Modifiers Substitution and Backreferences Example: Swapping Arguments in Function Calls A General Substitution Script Debugging Regular Expressions Exercises Tools for Handling Data in Files Writing and Reading Python Data Structures Pickling Objects Shelving Objects Writing and Reading Zip and Tar Archive Files Downloading Internet Files Binary Input/Output Exercises A Database for NumPy Arrays The Structure of the Database Pickling Formatted ASCII Storage

7 XVI Table of Contents Shelving... Comparing the Various Techniques Scripts Involving Local and Remote Hosts Secure Shell Commands Distributed Simulation and Visualization Client/Server Programming Threads Classes Class Programming Checking the Class Type Private Data Static Data Special Attributes Special Methods Multiple Inheritance Using a Class as a C-like Structure Attribute Access via String Names New-Style Classes Implementing Get/Set Functions via Properties Subclassing Built-in Types Building Class Interfaces at Run Time Building Flexible Class Interfaces Exercises Scope of Variables Global, Local, and Class Variables Nested Functions Dictionaries of Variables in Namespaces Exceptions Handling Exceptions Raising Exceptions Iterators Constructing an Iterator A Pointwise Grid Iterator A Vectorized Grid Iterator Generators Some Aspects of Generic Programming Exercises Investigating Efficiency CPU-Time Measurements Profiling Python Scripts Optimization of Python Code Case Study an Numerical Efficiency

8 XVIII Table of Contents Table of Contents XVII 9 Fortran Programming with NumPy Arrays Problem Definition Filling an Array in Fortran The Fortran Subroutine Building and Inspecting the Extension Module Array Storage Issues Generating an Erroneous Interface Array Storage in C and Fortran Input and Output Arrays as Function Arguments F2PY Interface Files Hiding Work Arrays Increasing Callback Efficiency Callbacks to Vectorized Python Functions Avoiding Callbacks to Python Compiled Inline Callback Functions Summary Exercises C and C++ Programming with NumPy Arrays Automatic Interfacing of C/C++ Code Using F2PY Using Instant Using Weave C Programming with NumPy Arrays The Basics of the NumPy C API The Handwritten Extension Code Sending Arguments from Python to C Consistency Checks Computing Array Values Returning an Output Array Convenient Macros Module Initialization Extension Module Template Compiling, Linking, and Debugging the Module Writing a Wrapper for a C Function C++ Programming with NumPy Arrays Wrapping a NumPy Array in a C++ Object Using SCXX NumPy C++ Class Conversion Comparison of the Implementations Efficiency Error Handling Summary Exercises

9 XVIII Table of Contents 11 More Advanced GUI Programming Adding Plot Areas in GUIs The BLT Graph Widget Animation of Functions in BLT Graph Widgets Other Tools for Making GUIs with Plots Exercises Event Bindings Binding Events to Functions with Arguments A Text Widget with Tailored Keyboard Bindings A Fancy List Widget Animated Graphics with Canvas Widgets The First Canvas Encounter Coordinate Systems The Mathematical Model Class The Planet Class Drawing and Moving Planets Dragging Planets to New Positions Using Pmw's Scrolled Canvas Widget Simulation and Visualization Scripts Restructuring the Script Representing a Parameter by a Class Improved Command-Line Script Improved GUI Script Improved CGI Script Parameters with Physical Dimensions Adding a Curve Plot Area Automatic Generation of Scripts Applications of the Tools Allowing Physical Units in Input Files Converting Input Files to GUIs Tools and Examples Running Series of Computer Experiments Multiple Values of Input Parameters Implementation Details Further Applications Tools for Representing Functions Functions Defined by String Formulas A Unified Interface to Functions Interactive Drawing of Functions A Notebook for Selecting Functions Solving Partial Differential Equations Numerical Methods for 1D Wave Equations Implementations of 1D Wave Equations Classes for Solving 1D Wave Equations A Problem Solving Environment Numerical Methods for 2D Wave Equations

10 Table of Contents XIX Implementations of 2D Wave Equations Exercises A Setting up the Required Software Environment A.1 Installation on Unix Systems A.1.1 A Suggested Directory Structure A.1.2 Setting Some Environment Variables A.1.3 Installing Tcl/Tk and Additional Modules A.1.4 Installing Python A.1.5 Installing Python Modules A.1.6 Installing Gnuplot A.1.7 Installing SWIG A.1.8 Summary of Environment Variables A.1.9 Testing the Installation of Scripting Utilities A.2 Installation on Windows Systems B Elements of Software Engineering B.1 Building and Using Modules B.1.1 Single-File Modules B.1.2 Multi-File Modules B.1.3 Debugging and Troubleshooting B.2 Tools for Documenting Python Software B.2.1 Doc Strings B.2.2 Tools for Automatic Documentation B.3 Coding Standards B.3.1 Style Guide B.3.2 Pythonic Programming B.4 Verification of Scripts B.4.1 Automating Regression Tests B.4.2 Implementing a Tool for Regression Tests B.4.3 Writing a Test Script B.4.4 Verifying Output from Numerical Computations B.4.5 Automatic Doc String Testing B.4.6 Unit Testing B.5 Version Control Management B.5.1 Mercurial B.5.2 Subversion B.6 Exercises Bibliography Index

Python Scripting for Computational Science

Python Scripting for Computational Science Hans Petter Langtangen Python Scripting for Computational Science Third Edition With 62 Figures Sprin ger Table of Contents 1 Introduction 1 1.1 Scripting versus Traditional Programming 1 1.1.1 Why Scripting

More information

PYTHON TRAINING COURSE CONTENT

PYTHON TRAINING COURSE CONTENT SECTION 1: INTRODUCTION What s python? Why do people use python? Some quotable quotes A python history lesson Advocacy news What s python good for? What s python not good for? The compulsory features list

More information

Contents Computing with Formulas

Contents Computing with Formulas Contents 1 Computing with Formulas... 1 1.1 The First Programming Encounter: a Formula... 1 1.1.1 Using a Program as a Calculator... 2 1.1.2 About Programs and Programming... 2 1.1.3 Tools for Writing

More information

PTN-202: Advanced Python Programming Course Description. Course Outline

PTN-202: Advanced Python Programming Course Description. Course Outline PTN-202: Advanced Python Programming Course Description This 4-day course picks up where Python I leaves off, covering some topics in more detail, and adding many new ones, with a focus on enterprise development.

More information

Texts in Computational Science and Engineering

Texts in Computational Science and Engineering Texts in Computational Science and Engineering 3 Editors Timothy J. Barth, Moffett Field, CA Michael Griebel, Bonn David E. Keyes, Norfolk Risto M. Nieminen, Espoo Dirk Roose, Leuven Tamar Schlick, New

More information

Table of Contents. Preface... xxi

Table of Contents. Preface... xxi Table of Contents Preface... xxi Chapter 1: Introduction to Python... 1 Python... 2 Features of Python... 3 Execution of a Python Program... 7 Viewing the Byte Code... 9 Flavors of Python... 10 Python

More information

PYTHON. p ykos vtawynivis. Second eciitiovl. CO Ve, WESLEY J. CHUN

PYTHON. p ykos vtawynivis. Second eciitiovl. CO Ve, WESLEY J. CHUN CO Ve, PYTHON p ykos vtawynivis Second eciitiovl WESLEY J. CHUN. PRENTICE HALL Upper Saddle River, NJ Boston Indianapolis San Francisco New York Toronto Montreal London Munich Paris Madrid Capetown Sydney

More information

Scientific Computing Using. Atriya Sen

Scientific Computing Using. Atriya Sen Scientific Computing Using Atriya Sen Broad Outline Part I, in which I discuss several aspects of the Python programming language Part II, in which I talk about some Python modules for scientific computing

More information

This course is designed for anyone who needs to learn how to write programs in Python.

This course is designed for anyone who needs to learn how to write programs in Python. Python Programming COURSE OVERVIEW: This course introduces the student to the Python language. Upon completion of the course, the student will be able to write non-trivial Python programs dealing with

More information

CHAPTER 1: INTRODUCING C# 3

CHAPTER 1: INTRODUCING C# 3 INTRODUCTION xix PART I: THE OOP LANGUAGE CHAPTER 1: INTRODUCING C# 3 What Is the.net Framework? 4 What s in the.net Framework? 4 Writing Applications Using the.net Framework 5 What Is C#? 8 Applications

More information

Webgurukul Programming Language Course

Webgurukul Programming Language Course Webgurukul Programming Language Course Take One step towards IT profession with us Python Syllabus Python Training Overview > What are the Python Course Pre-requisites > Objectives of the Course > Who

More information

[CHAPTER] 1 INTRODUCTION 1

[CHAPTER] 1 INTRODUCTION 1 FM_TOC C7817 47493 1/28/11 9:29 AM Page iii Table of Contents [CHAPTER] 1 INTRODUCTION 1 1.1 Two Fundamental Ideas of Computer Science: Algorithms and Information Processing...2 1.1.1 Algorithms...2 1.1.2

More information

Introduction p. 1 Basic Programming Introduction p. 7 Introduction to Python p. 7 Why Use Python? p. 10 Main Technical Features p.

Introduction p. 1 Basic Programming Introduction p. 7 Introduction to Python p. 7 Why Use Python? p. 10 Main Technical Features p. Introduction p. 1 Basic Programming Introduction p. 7 Introduction to Python p. 7 Why Use Python? p. 10 Main Technical Features p. 13 Python Distribution p. 16 Installing and Configuring Python p. 18 Python

More information

Introduction to Python

Introduction to Python Introduction to Python Version 1.1.5 (12/29/2008) [CG] Page 1 of 243 Introduction...6 About Python...7 The Python Interpreter...9 Exercises...11 Python Compilation...12 Python Scripts in Linux/Unix & Windows...14

More information

Python Training. Complete Practical & Real-time Trainings. A Unit of SequelGate Innovative Technologies Pvt. Ltd.

Python Training. Complete Practical & Real-time Trainings. A Unit of SequelGate Innovative Technologies Pvt. Ltd. Python Training Complete Practical & Real-time Trainings A Unit of. ISO Certified Training Institute Microsoft Certified Partner Training Highlights : Complete Practical and Real-time Scenarios Session

More information

Scientific Computing: Lecture 1

Scientific Computing: Lecture 1 Scientific Computing: Lecture 1 Introduction to course, syllabus, software Getting started Enthought Canopy, TextWrangler editor, python environment, ipython, unix shell Data structures in Python Integers,

More information

This course is designed for web developers that want to learn HTML5, CSS3, JavaScript and jquery.

This course is designed for web developers that want to learn HTML5, CSS3, JavaScript and jquery. HTML5/CSS3/JavaScript Programming Course Summary Description This class is designed for students that have experience with basic HTML concepts that wish to learn about HTML Version 5, Cascading Style Sheets

More information

Getting Started p. 1 Obtaining Tcl/Tk p. 1 Interactive Execution p. 1 Direct Execution p. 4 Reading this Book p. 6 Requirements for Networking

Getting Started p. 1 Obtaining Tcl/Tk p. 1 Interactive Execution p. 1 Direct Execution p. 4 Reading this Book p. 6 Requirements for Networking Foreword p. xi Acknowledgments p. xiii Getting Started p. 1 Obtaining Tcl/Tk p. 1 Interactive Execution p. 1 Direct Execution p. 4 Reading this Book p. 6 Requirements for Networking Examples p. 7 Requirements

More information

C ONTENTS PART I FUNDAMENTALS OF PROGRAMMING 1. and Java 3. Chapter 1 Introduction to Computers, Programs,

C ONTENTS PART I FUNDAMENTALS OF PROGRAMMING 1. and Java 3. Chapter 1 Introduction to Computers, Programs, C ONTENTS PART I FUNDAMENTALS OF PROGRAMMING 1 Chapter 1 Introduction to Computers, Programs, and Java 3 1.1 Introduction 4 1.2 What Is acomputer? 4 1.3 Programs 7 1.4 Operating Systems 9 1.5 Number Systems

More information

Intermediate Python 3.x

Intermediate Python 3.x Intermediate Python 3.x This 4 day course picks up where Introduction to Python 3 leaves off, covering some topics in more detail, and adding many new ones, with a focus on enterprise development. This

More information

Acknowledgments Introduction. Part I: Programming Access Applications 1. Chapter 1: Overview of Programming for Access 3

Acknowledgments Introduction. Part I: Programming Access Applications 1. Chapter 1: Overview of Programming for Access 3 74029ftoc.qxd:WroxPro 9/27/07 1:40 PM Page xiii Acknowledgments Introduction x xxv Part I: Programming Access Applications 1 Chapter 1: Overview of Programming for Access 3 Writing Code for Access 3 The

More information

1 OBJECT-ORIENTED PROGRAMMING 1

1 OBJECT-ORIENTED PROGRAMMING 1 PREFACE xvii 1 OBJECT-ORIENTED PROGRAMMING 1 1.1 Object-Oriented and Procedural Programming 2 Top-Down Design and Procedural Programming, 3 Problems with Top-Down Design, 3 Classes and Objects, 4 Fields

More information

Python for Data Analysis

Python for Data Analysis Python for Data Analysis Wes McKinney O'REILLY 8 Beijing Cambridge Farnham Kb'ln Sebastopol Tokyo Table of Contents Preface xi 1. Preliminaries " 1 What Is This Book About? 1 Why Python for Data Analysis?

More information

Introduction. Part I: jquery API 1. Chapter 1: Introduction to jquery 3

Introduction. Part I: jquery API 1. Chapter 1: Introduction to jquery 3 Introduction xix Part I: jquery API 1 Chapter 1: Introduction to jquery 3 What Does jquery Do for Me? 4 Who Develops jquery? 5 Obtaining jquery 5 Installing jquery 5 Programming Conventions 8 XHTML and

More information

Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS

Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS Contents Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS 1.1. INTRODUCTION TO COMPUTERS... 1 1.2. HISTORY OF C & C++... 3 1.3. DESIGN, DEVELOPMENT AND EXECUTION OF A PROGRAM... 3 1.4 TESTING OF PROGRAMS...

More information

Programming Graphical

Programming Graphical Programming Graphical User Interfaces in R Michael F. Lawrence John Verzani CRC Press Taylorfii Francis Group Boca Raton London NewYork CRC Press Is an imprint of the Taylor & Francis Group an informs

More information

Jim Jackson II Ian Gilman

Jim Jackson II Ian Gilman Single page web apps, JavaScript, and semantic markup Jim Jackson II Ian Gilman FOREWORD BY Scott Hanselman MANNING contents 1 HTML5 foreword xv preface xvii acknowledgments xx about this book xxii about

More information

David J. Pine. Introduction to Python for Science & Engineering

David J. Pine. Introduction to Python for Science & Engineering David J. Pine Introduction to Python for Science & Engineering To Alex Pine who introduced me to Python Contents Preface About the Author xi xv 1 Introduction 1 1.1 Introduction to Python for Science and

More information

Contents. Figures. Tables. Examples. Foreword. Preface. 1 Basics of Java Programming 1. xix. xxi. xxiii. xxvii. xxix

Contents. Figures. Tables. Examples. Foreword. Preface. 1 Basics of Java Programming 1. xix. xxi. xxiii. xxvii. xxix PGJC4_JSE8_OCA.book Page ix Monday, June 20, 2016 2:31 PM Contents Figures Tables Examples Foreword Preface xix xxi xxiii xxvii xxix 1 Basics of Java Programming 1 1.1 Introduction 2 1.2 Classes 2 Declaring

More information

Programming in Python 3

Programming in Python 3 Programming in Python 3 A Complete Introduction to the Python Language Mark Summerfield.4.Addison-Wesley Upper Saddle River, NJ Boston Indianapolis San Francisco New York Toronto Montreal London Munich

More information

Introduction to JavaScript p. 1 JavaScript Myths p. 2 Versions of JavaScript p. 2 Client-Side JavaScript p. 3 JavaScript in Other Contexts p.

Introduction to JavaScript p. 1 JavaScript Myths p. 2 Versions of JavaScript p. 2 Client-Side JavaScript p. 3 JavaScript in Other Contexts p. Preface p. xiii Introduction to JavaScript p. 1 JavaScript Myths p. 2 Versions of JavaScript p. 2 Client-Side JavaScript p. 3 JavaScript in Other Contexts p. 5 Client-Side JavaScript: Executable Content

More information

Basic Python 3 Programming (Theory & Practical)

Basic Python 3 Programming (Theory & Practical) Basic Python 3 Programming (Theory & Practical) Length Delivery Method : 5 Days : Instructor-led (Classroom) Course Overview This Python 3 Programming training leads the student from the basics of writing

More information

Programming in Python

Programming in Python COURSE DESCRIPTION This course presents both the programming interface and the techniques that can be used to write procedures in Python on Unix / Linux systems. COURSE OBJECTIVES Each participant will

More information

Al al-bayt University Prince Hussein Bin Abdullah College for Information Technology Computer Science Department

Al al-bayt University Prince Hussein Bin Abdullah College for Information Technology Computer Science Department Al al-bayt University Prince Hussein Bin Abdullah College for Information Technology Computer Science Department 0901212 Python Programming 1 st Semester 2014/2015 Course Catalog This course introduces

More information

Mastering BorlandC++ 4.5

Mastering BorlandC++ 4.5 Mastering BorlandC++ 4.5 Second Edition Tom Swan jsams 201 West 103rd Street Indianapolis, Indiana 46290 Contents Part I Environments 1 1 Introducing Borland C++ 4.5 3 Requirements 4 Installing Borland

More information

Course Outline - COMP150. Lectures and Labs

Course Outline - COMP150. Lectures and Labs Course Outline - COMP150 Lectures and Labs 1 The way of the program 1.1 The Python programming language 1.2 What is a program? 1.3 What is debugging? 1.4 Experimental debugging 1.5 Formal and natural languages

More information

Mixed language programming with NumPy arrays

Mixed language programming with NumPy arrays Mixed language programming with NumPy arrays Simon Funke 1,2 Ola Skavhaug 3 Joakim Sundnes 1,2 Hans Petter Langtangen 1,2 Center for Biomedical Computing, Simula Research Laboratory 1 Dept. of Informatics,

More information

ощ 'ршорвшэш! цвн-эориэу ощ 'sajbpossv # PIPG DUJ 'ssjmoossv ^ PIPG pipa w н OX ЛЮН VAV

ощ 'ршорвшэш! цвн-эориэу ощ 'sajbpossv # PIPG DUJ 'ssjmoossv ^ PIPG pipa w н OX ЛЮН VAV ощ 'ршорвшэш! цвн-эориэу ощ 'sajbpossv # PIPG DUJ 'ssjmoossv ^ PIPG pipa w н OX ЛЮН VAV Contents Preface Chapter 1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1.10 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 1.19

More information

Contents. More Controls 51. Visual Basic 1. Introduction to. xiii. Modify the Project 30. Print the Project Documentation 35

Contents. More Controls 51. Visual Basic 1. Introduction to. xiii. Modify the Project 30. Print the Project Documentation 35 Contents Modify the Project 30 Introduction to Print the Project Documentation 35 Visual Basic 1 Sample Printout 36 Writing Windows Applications The Form Image 36 The Code 37 with Visual Basic 2 The Form

More information

Create Web Charts. With jqplot. Apress. Fabio Nelli

Create Web Charts. With jqplot. Apress. Fabio Nelli Create Web Charts With jqplot Fabio Nelli Apress Contents J About the Author About the Technical Reviewer Acknowledgments Introduction xv xvii xix xxi Chapter 1: Charting Technology Overview 1 Elements

More information

PROBLEM SOLVING WITH FORTRAN 90

PROBLEM SOLVING WITH FORTRAN 90 David R. Brooks PROBLEM SOLVING WITH FORTRAN 90 FOR SCIENTISTS AND ENGINEERS Springer Contents Preface v 1.1 Overview for Instructors v 1.1.1 The Case for Fortran 90 vi 1.1.2 Structure of the Text vii

More information

PYTHON CONTENT NOTE: Almost every task is explained with an example

PYTHON CONTENT NOTE: Almost every task is explained with an example PYTHON CONTENT NOTE: Almost every task is explained with an example Introduction: 1. What is a script and program? 2. Difference between scripting and programming languages? 3. What is Python? 4. Characteristics

More information

STEPHEN WOLFRAM MATHEMATICADO. Fourth Edition WOLFRAM MEDIA CAMBRIDGE UNIVERSITY PRESS

STEPHEN WOLFRAM MATHEMATICADO. Fourth Edition WOLFRAM MEDIA CAMBRIDGE UNIVERSITY PRESS STEPHEN WOLFRAM MATHEMATICADO OO Fourth Edition WOLFRAM MEDIA CAMBRIDGE UNIVERSITY PRESS Table of Contents XXI a section new for Version 3 a section new for Version 4 a section substantially modified for

More information

C# Programming: From Problem Analysis to Program Design. Fourth Edition

C# Programming: From Problem Analysis to Program Design. Fourth Edition C# Programming: From Problem Analysis to Program Design Fourth Edition Preface xxi INTRODUCTION TO COMPUTING AND PROGRAMMING 1 History of Computers 2 System and Application Software 4 System Software 4

More information

PART I: INTRODUCTION TO WINDOWS 8 APPLICATION DEVELOPMENT CHAPTER 1: A BRIEF HISTORY OF WINDOWS APPLICATION DEVELOPMENT 3

PART I: INTRODUCTION TO WINDOWS 8 APPLICATION DEVELOPMENT CHAPTER 1: A BRIEF HISTORY OF WINDOWS APPLICATION DEVELOPMENT 3 INTRODUCTION xix PART I: INTRODUCTION TO WINDOWS 8 APPLICATION DEVELOPMENT CHAPTER 1: A BRIEF HISTORY OF WINDOWS APPLICATION DEVELOPMENT 3 The Life of Windows 3 From Windows 3.1 to 32-bit 4 Windows XP

More information

Data Science with Python Course Catalog

Data Science with Python Course Catalog Enhance Your Contribution to the Business, Earn Industry-recognized Accreditations, and Develop Skills that Help You Advance in Your Career March 2018 www.iotintercon.com Table of Contents Syllabus Overview

More information

DOT.NET MODULE 6: SILVERLIGHT

DOT.NET MODULE 6: SILVERLIGHT UNIT 1 Introducing Silverlight DOT.NET MODULE 6: SILVERLIGHT 1. Silverlight and Visual Studio 2. Understanding Silverlight Websites 3. Creating a Stand-Alone Silverlight Project 4. Creating a Simple Silverlight

More information

PROGRAMMING AND ENGINEERING COMPUTING WITH MATLAB Huei-Huang Lee SDC. Better Textbooks. Lower Prices.

PROGRAMMING AND ENGINEERING COMPUTING WITH MATLAB Huei-Huang Lee SDC. Better Textbooks. Lower Prices. PROGRAMMING AND ENGINEERING COMPUTING WITH MATLAB 2018 Huei-Huang Lee SDC P U B L I C AT I O N S Better Textbooks. Lower Prices. www.sdcpublications.com Powered by TCPDF (www.tcpdf.org) Visit the following

More information

This page intentionally left blank

This page intentionally left blank This page intentionally left blank arting Out with Java: From Control Structures through Objects International Edition - PDF - PDF - PDF Cover Contents Preface Chapter 1 Introduction to Computers and Java

More information

CERTIFICATE IN WEB PROGRAMMING

CERTIFICATE IN WEB PROGRAMMING COURSE DURATION: 6 MONTHS CONTENTS : CERTIFICATE IN WEB PROGRAMMING 1. PROGRAMMING IN C and C++ Language 2. HTML/CSS and JavaScript 3. PHP and MySQL 4. Project on Development of Web Application 1. PROGRAMMING

More information

Chapters and Appendix F are PDF documents posted online at the book s Companion Website (located at

Chapters and Appendix F are PDF documents posted online at the book s Companion Website (located at Contents Chapters 16 27 and Appendix F are PDF documents posted online at the book s Companion Website (located at www.pearsonhighered.com/deitel/). Preface Before You Begin xix xxix 1 Introduction to

More information

8/16/12. Computer Organization. Architecture. Computer Organization. Computer Basics

8/16/12. Computer Organization. Architecture. Computer Organization. Computer Basics Computer Organization Computer Basics TOPICS Computer Organization Data Representation Program Execution Computer Languages 1 2 Architecture Computer Organization n central-processing unit n performs the

More information

Getting along and working together. Fortran-Python Interoperability Jacob Wilkins

Getting along and working together. Fortran-Python Interoperability Jacob Wilkins Getting along and working together Fortran-Python Interoperability Jacob Wilkins Fortran AND Python working together? Fortran-Python May 2017 2/19 Two very different philosophies Two very different code-styles

More information

Chapter 9 GUI Programming Using Tkinter. Copyright 2012 by Pearson Education, Inc. All Rights Reserved.

Chapter 9 GUI Programming Using Tkinter. Copyright 2012 by Pearson Education, Inc. All Rights Reserved. Chapter 9 GUI Programming Using Tkinter 1 Motivations Tkinter is not only a useful tool for developing GUI projects, but also a valuable pedagogical tool for learning object-oriented programming. 2 Objectives

More information

Practical C++ Programming

Practical C++ Programming SECOND EDITION Practical C++ Programming Steve Oualline O'REILLY' Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo Preface xv Part I. The Basics 1. What Is C++? 3 A Brief History of C++ 3 C++

More information

COP 1170 Introduction to Computer Programming using Visual Basic

COP 1170 Introduction to Computer Programming using Visual Basic Course Justification This course is the first computer programming course in the Computer Information Systems Associate in Arts degree program; is required in the Computer Programming and Analysis, Database

More information

6 Initializing Abstract Models with Data Command Files Model Data The set Command Simple Sets... 68

6 Initializing Abstract Models with Data Command Files Model Data The set Command Simple Sets... 68 Contents 1 Introduction 1 1.1 Mathematical Modeling........................ 1 1.2 Modeling Languages for Optimization................ 3 1.3 Modeling Graph Coloring....................... 4 1.4 Motivating

More information

MATLAB 7. The Language of Technical Computing KEY FEATURES

MATLAB 7. The Language of Technical Computing KEY FEATURES MATLAB 7 The Language of Technical Computing MATLAB is a high-level technical computing language and interactive environment for algorithm development, data visualization, data analysis, and numerical

More information

Contents in Detail. Who Is This Book For?... xix What s in This Book?... xx. part I: Warming Up 1

Contents in Detail. Who Is This Book For?... xix What s in This Book?... xx. part I: Warming Up 1 Acknowledgments xvii Introduction Who Is This Book For?... xix What s in This Book?... xx Part I: Warming Up.... xx Part II: Simulating Life... xx Part III: Fun with Images... xx Part IV: Enter 3D... xx

More information

Introduction to Programming Using Java (98-388)

Introduction to Programming Using Java (98-388) Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;

More information

Complete Python call :

Complete Python call : Module 1 (Baics Python Rs.4000 ) 30 hours CHAPTER Instant Hacking: The Basics Installing Python Windows Linux and UNIX Macintosh Other Distributions Keeping In Touch and Up to Date The Interactive Interpreter

More information

Contents. iii Copyright 1998 Sun Microsystems, Inc. All Rights Reserved. Enterprise Services August 1998, Revision B

Contents. iii Copyright 1998 Sun Microsystems, Inc. All Rights Reserved. Enterprise Services August 1998, Revision B Contents About the Course...xv Course Overview... xvi Course Map... xvii Module-by-Module Overview... xviii Course Objectives... xxii Skills Gained by Module... xxiii Guidelines for Module Pacing... xxiv

More information

3D Graphics Programming Mira Costa High School - Class Syllabus,

3D Graphics Programming Mira Costa High School - Class Syllabus, 3D Graphics Programming Mira Costa High School - Class Syllabus, 2009-2010 INSTRUCTOR: Mr. M. Williams COURSE GOALS and OBJECTIVES: 1 Learn the fundamentals of the Java language including data types and

More information

Managing Your Biological Data with Python

Managing Your Biological Data with Python Chapman & Hall/CRC Mathematical and Computational Biology Series Managing Your Biological Data with Python Ailegra Via Kristian Rother Anna Tramontano CRC Press Taylor & Francis Group Boca Raton London

More information

pandas: Rich Data Analysis Tools for Quant Finance

pandas: Rich Data Analysis Tools for Quant Finance pandas: Rich Data Analysis Tools for Quant Finance Wes McKinney April 24, 2012, QWAFAFEW Boston about me MIT 07 AQR Capital: 2007-2010 Global Macro and Credit Research WES MCKINNEY pandas: 2008 - Present

More information

Programming in Scala Second Edition

Programming in Scala Second Edition Programming in Scala Second Edition Martin Odersky, Lex Spoon, Bill Venners artima ARTIMA PRESS WALNUT CREEK, CALIFORNIA Contents Contents List of Figures List of Tables List of Listings Foreword Foreword

More information

Excel Programming with VBA (Macro Programming) 24 hours Getting Started

Excel Programming with VBA (Macro Programming) 24 hours Getting Started Excel Programming with VBA (Macro Programming) 24 hours Getting Started Introducing Visual Basic for Applications Displaying the Developer Tab in the Ribbon Recording a Macro Saving a Macro-Enabled Workbook

More information

Programming. Principles and Practice Using C++ Bjarne Stroustrup. / Addison-Wesley. Second Edition

Programming. Principles and Practice Using C++ Bjarne Stroustrup. / Addison-Wesley. Second Edition Programming Principles and Practice Using C++ Second Edition Bjarne Stroustrup / Addison-Wesley Upper Saddle River, NJ Boston Indianapolis San Francisco New York Toronto Montreal London Munich Paris Madrid

More information

Tcl/Tk lecture. What is the Wish Interpreter? CIS 410/510 User Interface Programming

Tcl/Tk lecture. What is the Wish Interpreter? CIS 410/510 User Interface Programming Tcl/Tk lecture CIS 410/510 User Interface Programming Tool Command Language TCL Scripting language for developing & using GUIs Allows generic programming variables, loops, procedures Embeddable into an

More information

Python INTRODUCTION: Understanding the Open source Installation of python in Linux/windows. Understanding Interpreters * ipython.

Python INTRODUCTION: Understanding the Open source Installation of python in Linux/windows. Understanding Interpreters * ipython. INTRODUCTION: Understanding the Open source Installation of python in Linux/windows. Understanding Interpreters * ipython * bpython Getting started with. Setting up the IDE and various IDEs. Setting up

More information

Beginning Perl. Third Edition. Apress. JAMES LEE with SIMON COZENS

Beginning Perl. Third Edition. Apress. JAMES LEE with SIMON COZENS Beginning Perl Third Edition JAMES LEE with SIMON COZENS Apress About the Author... About the Technical Reviewers Acknowledgements Suitrod yetion «. xvi xvii xviii «xix. Chapter 1: First Steps in Perl..

More information

C# 2008 and.net Programming for Electronic Engineers - Elektor - ISBN

C# 2008 and.net Programming for Electronic Engineers - Elektor - ISBN Contents Contents 5 About the Author 12 Introduction 13 Conventions used in this book 14 1 The Visual Studio C# Environment 15 1.1 Introduction 15 1.2 Obtaining the C# software 15 1.3 The Visual Studio

More information

Mathematica for Scientists and Engineers

Mathematica for Scientists and Engineers Mathematica for Scientists and Engineers Thomas B. Bahder Addison-Wesley Publishing Company Reading, Massachusetts Menlo Park, California New York Don Mills, Ontario Wokingham, England Amsterdam Bonn Paris

More information

COPYRIGHTED MATERIAL. Contents. Chapter 1: Introducing Microsoft Expression Web 1. Chapter 2: Building a Web Page 21. Acknowledgments Introduction

COPYRIGHTED MATERIAL. Contents. Chapter 1: Introducing Microsoft Expression Web 1. Chapter 2: Building a Web Page 21. Acknowledgments Introduction Acknowledgments Introduction Chapter 1: Introducing Microsoft Expression Web 1 Familiarizing Yourself with the Interface 2 The Menu Bar 5 The Development Window 7 The Development Area 8 The Tabbed File

More information

Contents. 1 Introduction to Computers, the Internet and the World Wide Web 1. 2 Introduction to C Programming 26

Contents. 1 Introduction to Computers, the Internet and the World Wide Web 1. 2 Introduction to C Programming 26 Preface xix 1 Introduction to Computers, the Internet and the World Wide Web 1 1.1 Introduction 2 1.2 What Is a Computer? 4 1.3 Computer Organization 4 1.4 Evolution of Operating Systems 5 1.5 Personal,

More information

Python where we can, C ++ where we must

Python where we can, C ++ where we must Python where we can, C ++ where we must Source: http://xkcd.com/353/ Guy K. Kloss Python where we can,c++ where we must 1/28 Python where we can, C ++ where we must Guy K. Kloss BarCamp Auckland 2007 15

More information

Coding Faster: Getting More Productive with Microsoft Visual

Coding Faster: Getting More Productive with Microsoft Visual Microsoft Coding Faster: Getting More Productive with Microsoft Visual Studio Covers Microsoft Visual Studio 2005, 2008, and 2010 Zain Naboulsi Sara Ford Table of Contents Foreword Introduction xxiii xxvii

More information

Slides from INF Course intro

Slides from INF Course intro Slides from INF3331- Course intro p. 1/38 Slides from INF3331 - Course intro Ola Skavhaug, Joakim Sundnes and Hans Petter Langtangen Dept. of Informatics, Univ. of Oslo & Simula Research Laboratory August

More information

Contents. Table of Contents. Table of Contents... iii Preface... xvii. Getting Started iii

Contents. Table of Contents. Table of Contents... iii Preface... xvii. Getting Started iii Contents Discovering the Possibilities... iii Preface... xvii Preface to the First Edition xvii Preface to the Second Edition xviii Getting Started... 1 Chapter Overview 1 Philosophy Behind this Book 1

More information

Mixed language programming

Mixed language programming Mixed language programming Simon Funke 1,2 Ola Skavhaug 3 Joakim Sundnes 1,2 Hans Petter Langtangen 1,2 Center for Biomedical Computing, Simula Research Laboratory 1 Dept. of Informatics, University of

More information

Contents. Chapter 1 SPECIFYING SYNTAX 1

Contents. Chapter 1 SPECIFYING SYNTAX 1 Contents Chapter 1 SPECIFYING SYNTAX 1 1.1 GRAMMARS AND BNF 2 Context-Free Grammars 4 Context-Sensitive Grammars 8 Exercises 8 1.2 THE PROGRAMMING LANGUAGE WREN 10 Ambiguity 12 Context Constraints in Wren

More information

CONTENTS. PART 1 Structured Programming 1. 1 Getting started 3. 2 Basic programming elements 17

CONTENTS. PART 1 Structured Programming 1. 1 Getting started 3. 2 Basic programming elements 17 List of Programs xxv List of Figures xxix List of Tables xxxiii Preface to second version xxxv PART 1 Structured Programming 1 1 Getting started 3 1.1 Programming 3 1.2 Editing source code 5 Source code

More information

Contents. 1 Introduction to Computers, Internet and World Wide Web 1

Contents. 1 Introduction to Computers, Internet and World Wide Web 1 pythonhtp1_01toc.fm Page viii Monday, January 14, 2002 12:20 PM Preface xxxvii 1 Introduction to Computers, Internet and World Wide Web 1 1.1 Introduction 2 1.2 What Is a Computer? 3 1.3 Computer Organization

More information

TH IRD EDITION. Python Cookbook. David Beazley and Brian K. Jones. O'REILLY. Beijing Cambridge Farnham Köln Sebastopol Tokyo

TH IRD EDITION. Python Cookbook. David Beazley and Brian K. Jones. O'REILLY. Beijing Cambridge Farnham Köln Sebastopol Tokyo TH IRD EDITION Python Cookbook David Beazley and Brian K. Jones O'REILLY. Beijing Cambridge Farnham Köln Sebastopol Tokyo Table of Contents Preface xi 1. Data Structures and Algorithms 1 1.1. Unpacking

More information

CHAPTER 1: INTRODUCTION TO THE IDE 3

CHAPTER 1: INTRODUCTION TO THE IDE 3 INTRODUCTION xxvii PART I: IDE CHAPTER 1: INTRODUCTION TO THE IDE 3 Introducing the IDE 3 Different IDE Appearances 4 IDE Configurations 5 Projects and Solutions 6 Starting the IDE 6 Creating a Project

More information

Huei-Huang Lee. Programming with MATLAB2016 SDC ACCESS CODE. Better Textbooks. Lower Prices. UNIQUE CODE INSIDE

Huei-Huang Lee. Programming with MATLAB2016 SDC ACCESS CODE. Better Textbooks. Lower Prices.   UNIQUE CODE INSIDE Programming with Huei-Huang Lee MATLAB2016 SDC P U B L I C AT I O N S Better Textbooks. Lower Prices. www.sdcpublications.com ACCESS CODE UNIQUE CODE INSIDE Powered by TCPDF (www.tcpdf.org) Visit the following

More information

Contents. Acknowledgments

Contents. Acknowledgments Contents Acknowledgments Introduction Why Another Book About Web Application Development? How Is This Book Arranged? Intended Audience Do I Need to Start from Scratch? Choosing Development Tools Summary

More information

PTN-102 Python programming

PTN-102 Python programming PTN-102 Python programming COURSE DESCRIPTION Prerequisite: basic Linux/UNIX and programming skills. Delivery Method Instructor-led training (ILT) Duration Four days Course outline Chapter 1: Introduction

More information

Programming Training. This Week: Tkinter for GUI Interfaces. Some examples

Programming Training. This Week: Tkinter for GUI Interfaces. Some examples Programming Training This Week: Tkinter for GUI Interfaces Some examples Tkinter Overview Set of widgets designed by John K. Ousterhout, 1987 Tkinter == Tool Kit Interface Mean to be driven by Tcl (Toolkit

More information

Acknowledgments Introduction. Chapter 1: Introduction to Access 2007 VBA 1. The Visual Basic Editor 18. Testing Phase 24

Acknowledgments Introduction. Chapter 1: Introduction to Access 2007 VBA 1. The Visual Basic Editor 18. Testing Phase 24 Acknowledgments Introduction Chapter 1: Introduction to Access 2007 VBA 1 What Is Access 2007 VBA? 1 What s New in Access 2007 VBA? 2 Access 2007 VBA Programming 101 3 Requirements-Gathering Phase 3 Design

More information

Table of Contents at a Glance

Table of Contents at a Glance Table of Contents at a Glance Preface... xix Chapter 1 What Is CL?... 1 Chapter 2 Control Language Command Names... 7 Chapter 3 Command Parameters... 13 Chapter 4 The IBM i User Interface... 25 Chapter

More information

MyProgram m i ng Lab. get with the programming. Through the power of practice and immediate personalized

MyProgram m i ng Lab. get with the programming. Through the power of practice and immediate personalized get with the programming Through the power of practice and immediate personalized feedback, MyProgrammingLab improves your performance. MyProgram m i ng Lab Learn more at www.myprogramminglab.com Preface

More information

Astronomical Data Analysis with Python

Astronomical Data Analysis with Python Astronomical Data Analysis with Python Lecture 8 Yogesh Wadadekar NCRA-TIFR July August 2010 Yogesh Wadadekar (NCRA-TIFR) Topical course 1 / 27 Slides available at: http://www.ncra.tifr.res.in/ yogesh/python_course_2010/

More information

The Scope of This Book... xxii A Quick Note About Browsers and Platforms... xxii The Appendices and Further Resources...xxiii

The Scope of This Book... xxii A Quick Note About Browsers and Platforms... xxii The Appendices and Further Resources...xxiii CONTENTS IN DETAIL FOREWORD by Joost de Valk PREFACE xvii xix INTRODUCTION xxi The Scope of This Book... xxii A Quick Note About Browsers and Platforms... xxii The Appendices and Further Resources...xxiii

More information

SCIENCE. An Introduction to Python Brief History Why Python Where to use

SCIENCE. An Introduction to Python Brief History Why Python Where to use DATA SCIENCE Python is a general-purpose interpreted, interactive, object-oriented and high-level programming language. Currently Python is the most popular Language in IT. Python adopted as a language

More information

Advanced R. V!aylor & Francis Group. Hadley Wickham. ~ CRC Press

Advanced R. V!aylor & Francis Group. Hadley Wickham. ~ CRC Press ~ CRC Press V!aylor & Francis Group Advanced R Hadley Wickham ')'l If trlro r r 1 Introduction 1 1.1 Who should read this book 3 1.2 What you will get out of this book 3 1.3 Meta-techniques... 4 1.4 Recommended

More information

Part I Basic Concepts 1

Part I Basic Concepts 1 Introduction xiii Part I Basic Concepts 1 Chapter 1 Integer Arithmetic 3 1.1 Example Program 3 1.2 Computer Program 4 1.3 Documentation 5 1.4 Input 6 1.5 Assignment Statement 7 1.5.1 Basics of assignment

More information

About Python. Python Duration. Training Objectives. Training Pre - Requisites & Who Should Learn Python

About Python. Python Duration. Training Objectives. Training Pre - Requisites & Who Should Learn Python About Python Python course is a great introduction to both fundamental programming concepts and the Python programming language. By the end, you'll be familiar with Python syntax and you'll be able to

More information

Welcome to Starting Out with Programming Logic and Design, Third Edition.

Welcome to Starting Out with Programming Logic and Design, Third Edition. Welcome to Starting Out with Programming Logic and Design, Third Edition. This book uses a language-independent approach to teach programming concepts and problem-solving skills, without assuming any previous

More information

PTN-105 Python programming. Course Outline. Prerequisite: basic Linux/UNIX and programming skills. Delivery Method: Instructor-led training (ILT)

PTN-105 Python programming. Course Outline. Prerequisite: basic Linux/UNIX and programming skills. Delivery Method: Instructor-led training (ILT) PTN-105 Python programming Prerequisite: basic Linux/UNIX and programming skills. Delivery Method: Instructor-led training (ILT) Course Length: 5 days Course Outline Module 1. Introduction Why python?

More information