code

TwitterFacebook
Get flash to fully experience Pearltrees
http://thelinuxexperiment.com/guinea-pigs/tyler-b/compile-windows-programs-on-linux/ Windows?? *GASP!* Sometimes you just have to compile Windows programs from the comfort of your Linux install. This is a relatively simple process that basically requires you to only install the following (Ubuntu) packages:

Compile Windows programs on Linux | The Linux Experiment

matplotlib is a python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms. matplotlib can be used in python scripts, the python and ipython shell (ala MATLAB ® * or Mathematica ® † ), web application servers, and six graphical user interface toolkits. matplotlib tries to make easy things easy and hard things possible. You can generate plots, histograms, power spectra, bar charts, errorcharts, scatterplots, etc, with just a few lines of code. For a sampling, see the screenshots , thumbnail gallery, and examples directory For example, using "ipython -pylab" to provide an interactive environment, to generate 10,000 gaussian random numbers and plot a histogram with 100 bins, you simply need to type x = randn(10000) hist(x, 100)

matplotlib: python plotting — Matplotlib v1.1.0 documentation

http://matplotlib.sourceforge.net/index.html
http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.contourf

pyplot — Matplotlib v1.1.0 documentation

Ideally the dimensions of X and Y should be one greater than those of C ; if the dimensions are the same, then the last row and column of C will be ignored. Note that the the column index corresponds to the x -coordinate, and the row index corresponds to y ; for details, see the Grid Orientation section below. If either or both of X and Y are 1-D arrays or column vectors, they will be expanded as needed into the appropriate 2-D arrays, making a rectangular grid. X , Y and C may be masked arrays. If either C[i, j], or one of the vertices surrounding C[i,j] ( X or Y at [i, j], [i+1, j], [i, j+1],[i+1, j+1]) is masked, nothing is plotted.
http://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html The desired data-type for the array. If not given, then the type will be determined as the minimum type required to hold the objects in the sequence. This argument can only be used to ‘upcast’ the array. For downcasting, use the .astype(t) method.

numpy.array — NumPy v2.0.dev-0c1c499 Manual (DRAFT)

Graphics with Matplotlib

Matplotlib is a large and sophisticated graphics package for Python written in object oriented style. However, a layer built on top of this basic structure called pyplot accesses the underlying package using function calls. We describe a simple but useful subset of pyplot here. >>> from numpy import * >>> import matplotlib.pyplot as plt >>> x = arange(0.,10.,0.1) >>> y = sin(x) >>> ll = plt.plot(x,y) >>> plt.show() >>> http://physics.nmt.edu/~raymond/software/python_notes/paper004.html
Second release candidates for Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3 released Another iteration of release candidates for Python 2.6.8 , 2.7.3 , 3.1.5 , and 3.2.3 have been released for testing. They include several security fixes. http://www.python.org/

Python Programming Language – Official Website

https://scondemth361.wordpress.com/root-finding-method/ A root finding algorithm is a numerical method of finding an for a given function such that . This particular value of is the root. There are many different methods of finding roots of a function.

Root Finding Method « Numerical Analysis

http://wiki.python.org/moin/ParallelProcessing

ParallelProcessing - PythonInfo Wiki

A number of Python-related libraries exist for the programming of solutions either employing multiple CPUs or multicore CPUs in a symmetric multiprocessing (SMP) or shared memory environment, or potentially huge numbers of computers in a cluster or grid environment. This page seeks to provide references to the different libraries and solutions available. Symmetric Multiprocessing Some libraries, often to preserve some similarity with more familiar concurrency models (such as Python's threading API), employ parallel processing techniques which limit their relevance to SMP-based hardware, mostly due to the usage of process creation functions such as the UNIX fork system call. However, a technique called process migration may permit such libraries to be useful in certain kinds of computational clusters as well, notably single-system image cluster solutions ( Kerrighed , OpenSSI , OpenMosix being examples).
http://docs.python.org/release/2.6.4/library/multiprocessing.html#using-a-pool-of-workers multiprocessing is a package that supports spawning processes using an API similar to the threading module. The multiprocessing package offers both local and remote concurrency, effectively side-stepping the Global Interpreter Lock by using subprocesses instead of threads. Due to this, the multiprocessing module allows the programmer to fully leverage multiple processors on a given machine. It runs on both Unix and Windows. Warning Some of this package’s functionality requires a functioning shared semaphore implementation on the host operating system.

17.6. multiprocessing — Process-based “threading” interface — Python v2.6.4 documentation

http://www.parallelpython.com/content/view/15/30/

Parallel Python - Parallel Python documentation

4) Start pp execution server with the number of workers set to the number of processors in the system and list of ppservers to connect with : Due to the security concerns it is highly recommended to run ppserver.py with an non-trivial secret key (-s command line argument) which should be paired with the matching secret keyword of PP Server class constructor. Since PP 1.5.3 it is possible to set secret key by assigning pp_secret variable in the configuration file .pythonrc.py which should be located in the user home directory (please make this file readable and writable only by user). The key set in .pythonrc.py could be overridden by command line argument (for ppserver.py) and secret keyword (for PP Server class constructor).

MPI for Python — MPI for Python v1.2.2 documentation

Abstract This document describes the MPI for Python package. MPI for Python provides bindings of the Message Passing Interface (MPI) standard for the Python programming language, allowing any Python program to exploit multiple processors. This package is constructed on top of the MPI-1/2 specifications and provides an object oriented interface which closely follows MPI-2 C++ bindings.

The Python Tutorial — Python v2.7.2 documentation

Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms. The Python interpreter and the extensive standard library are freely available in source or binary form for all major platforms from the Python Web site, http://www.python.org/ , and may be freely distributed. The same site also contains distributions of and pointers to many free third party Python modules, programs and tools, and additional documentation. The Python interpreter is easily extended with new functions and data types implemented in C or C++ (or other languages callable from C).

coding style - What is a clean, pythonic way to have multiple constructors in Python? - Stack Overflow

The best answer is the one above about default arguments, but I had fun writing this, and it certainly does fit the bill for "multiple constructors". Use at your own risk. What about the new method.
Python has been an object-oriented language from day one. Because of this, creating and using classes and objects are downright easy. This chapter helps you become an expert in using Python's object-oriented programming support. If you don't have any previous experience with object-oriented (OO) programming, you may want to consult an introductory course on it or at least a tutorial of some sort so that you have a grasp of the basic concepts.

Python - Object Oriented

Nachdem wir einige von Pythons eingebauten Datentypen benützt haben, sind wir nun bereit einen benutzerdefinierten Datentyp zu erzeugen: den Punkt . Betrachten wir zunächst den Begriff dess mathematischen Punktes. In zwei Dimensionen ist ein Punkt ein Paar von zwei Zahlen (Koordinaten) die zusammen als ein einziges Objekt behandelt werden. In der mathematischen Notation werden Punkte oft als Zahlenpaare in runden Klammern geschrieben, mit einem Komma zwischen den Koordinaten. Zum Beispiel stellt das Paar (0, 0) den Ursprung dar, und das Paar (x, y) stellt den Punkt mit x Einheiten nach rechts und y Einheiten nach oben, vom Ursprung aus gesehen, dar. Eine natürliche Art einen Punkt in Python darzustellen ist mit zwei Gleitkommazahlen.

Kapitel 12: Klassen und Objekte