Facebook Twitter

Compile Windows programs on Linux. This past year I purchased a laptop that came with two drives, a small 24GB SSD and a larger 1TB HDD.

Compile Windows programs on Linux

My configuration has placed the root filesystem (i.e. /) on the SSD and my home directory (i.e. /home) on the HDD so that I benefit from very fast system booting and application loading but still have loads of space for my personal files. The only downside to this configuration is that linux is sometimes not the best at ensuring your SSD lives a long life. Unlike HDDs, SSDs have a finite number of write operations before they are guaranteed to fail (although you could argue HDDs aren’t all that great either…). Quite a few linux distributions have not yet been updated to detect and configure SSDs in such a way as to extend their life. Change #1 – noatime The first change that I do is to configure my system so that it no longer updates each files access time on the SSD partition. Open /etc/fstab as root. Sudo nano /etc/fstab UUID=<some hex string> / ext4 noatime,errors=remount-ro.

Matplotlib: python plotting. Pyplot. X : array_like, shape (n, m) or (n, m, 3) or (n, m, 4) Display the image in X to current axes.


X may be a float array, a uint8 array or a PIL image. If X is an array, it can have the following shapes:MxN – luminance (grayscale, float array only)MxNx3 – RGB (float or uint8 array)MxNx4 – RGBA (float or uint8 array)The value for each component of MxNx3 and MxNx4 float arrays should be in the range 0.0 to 1.0; MxN float arrays may be normalised. cmap : Colormap, optional, default: None. Numpy.array — NumPy Manual. Object : array_like An array, any object exposing the array interface, an object whose __array__ method returns an array, or any (nested) sequence. dtype : data-type, optional The desired data-type for the array.

numpy.array — NumPy Manual

If not given, then the type will be determined as the minimum type required to hold the objects in the sequence. Graphics with Matplotlib. Matplotlib is a large and sophisticated graphics package for Python written in object oriented style.

Graphics with Matplotlib

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. Python Programming Language – Official Website. Root Finding Method « Numerical Analysis. A root finding algorithm is a numerical method of finding an for a given function.

Root Finding Method « Numerical Analysis

ParallelProcessing. 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). Cluster Computing Cloud Computing. 17.6. multiprocessing — Process-based “threading” interface — Python v2.6.4 documentation. New in version 2.6. 17.6.1.

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

Introduction 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.

Warning. Parallel Python - Parallel Python documentation. Module API Quick start guide, SMP Quick start guide, clusters Quick start guide, clusters with auto-discovery Advanced guide, clusters Command line arguments, Security and secret key stats and PID file example PP FAQ 1) Import pp module: import pp 2) Start pp execution server with the number of workers set to the number of processors in the system.

Parallel Python - Parallel Python documentation

MPI for Python. MPI for Python — MPI for Python v1.2.2 documentation. Mpiexample. Python Tutorial. Python is a general-purpose interpreted, interactive, object-oriented and high-level programming language.

Python Tutorial

The Python Tutorial — Python v2.7.2 documentation. Python is an easy to learn, powerful programming language.

The Python Tutorial — Python v2.7.2 documentation

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, 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. Coding style - What is a clean, pythonic way to have multiple constructors in Python. Python - Object Oriented. 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. Kapitel 12: Klassen und Objekte. Die Programmiersprache Python. The GNU C Programming Tutorial. Node:Programming with pipes, Next:Low-level file routines, Previous:Single-character input and output, Up:Input and output Programming with pipes There may be times when you will wish to manipulate other programs on a GNU system from within your C program. One good way to do so is the facility called a pipe. Fgets. Function char * fgets ( char * str, int num, FILE * stream ); Get string from stream Reads characters from stream and stores them as a C string into str until (num-1) characters have been read or either a newline or the end-of-file is reached, whichever happens first.

A newline character makes fgets stop reading, but it is considered a valid character by the function and included in the string copied to str. A terminating null character is automatically appended after the characters copied to str. Notice that fgets is quite different from gets: not only fgets accepts a stream argument, but also allows to specify the maximum size of str and includes in the string any ending newline character. Parameters. C von A bis Z – 13 Kommandozeilenargumente. Popen Tutorial. This article will outline how to call shell commands from your C program using the system() call and the popen() functions. The system() call and the popen() call each have their place and differ enough to give an example and explanation of both.

Execute a Shell Command Using system() The system() function takes a string as its argument, this string should consist of the shell command you wish to call. Its return value must be run through another function call to retrieve the result of your executed shell command. For example, if you typed ls on the command line, its return value is 0 if it was successful. - The C++ Resources Network.

The CImg Library - C++ Template Image Processing Toolkit. Numerical Recipes in C. Acrobat Edition Also available is a PostScript edition. Thanks to special permission from Cambridge University Press, we are able to bring you the complete Numerical Recipes in C book On-Line! To utilize this resource, you will need an Adobe Acrobat viewer linked as a helper program to your WWW browser. Permission is granted by the copyright owners for users of the World Wide Web to make one paper copy of these PostScript files for their own personal use. Further reproduction, or the extraction of, or copying of, machine readable files to any server computer, is strictly prohibited. Want to download the Numerical Recipes routines? 1 Preliminaries 2 Solution of Linear Algebraic Equations 3 Interpolation and Extrapolation 4 Integration of Functions 5 Evaluation of Functions 6 Special Functions 7 Random Numbers. TU Chemnitz, Fakultät für Mathematik: Faculty of M...: Download. Computergraphik II. Diese Vorlesung führt in die fortgeschritteneren und komplexeren Methoden der Computergraphik ein. Voraussetzung ist der Stoff aus der Vorlesung "Einführung in die Computer-Graphik".