background preloader

Python

Facebook Twitter

Python data tools just keep getting better. Here are a few observations inspired by conversations I had during the just concluded PyData conference 1 .

Python data tools just keep getting better

The Python data community is well-organized: Besides conferences ( PyData , SciPy, EuroSciPy ), there is a new non-profit ( NumFOCUS ) dedicated to supporting scientific computing and data analytics projects. The list of supported projects are currently Python-based, but in principle NumFOCUS is an entity that can be used to support related efforts from other communities. It’s getting easier to use the Python data stack: There are tools that facilitate the dissemination and sharing of code and programming environments. Python data tools just keep getting better. Ruby on Rails Screencasts - RailsCasts. 16 Linux Server Monitoring Commands You Really Nee... - Input Output - (Private Browsing)

Want to know what's really going on with your server? Then you need to know these essential commands. Once you've mastered them, you'll be well on your way to being an expert Linux system administrator. Depending on the Linux distribution, you can run pull up much of the information that these shell commands can give you from a GUI program. SUSE Linux , for example, has an excellent, graphical configuration and management tool, YaST , and KDE 's KDE System Guard is also excellent.

However, it's a Linux administrator truism that you should run a GUI on a server only when you absolutely must. This also means that you should only start a GUI on a server when it's required; don’t leave it running. If your server starts by booting into a graphical desktop, you need to change this. Once there, find the initdefault line and change it from id:5:initdefault: to id:3:initdefault: If there is no inittab file, create it, and add the id:3 line. Choosing the best touring bicycle (updated January 2013)

Non-touring cycling friends often ask me: ‘What’s the best touring bicycle you can buy?’

Choosing the best touring bicycle (updated January 2013)

In many respects, it’s a hard question to answer as the choice of bike hinges on so many factors, not least the kind of journeys you are planning to undertake. In many cases, the bike in your garage or shed will do. For the purposes of this post, though, I will focus on the ‘dedicated’ touring cycle, which can be loosely categorised as ‘traditional touring cycles’, ‘expedition touring cycles’ and ‘others’ – including folding bicycles for touring.

The way of the program. Buy this book at Amazon.com The goal of this book is to teach you to think like a computer scientist.

The way of the program

This way of thinking combines some of the best features of mathematics, engineering, and natural science. Like mathematicians, computer scientists use formal languages to denote ideas (specifically computations). Like engineers, they design things, assembling components into systems and evaluating tradeoffs among alternatives.

Like scientists, they observe the behavior of complex systems, form hypotheses, and test predictions. The single most important skill for a computer scientist is problem solving. On one level, you will be learning to program, a useful skill by itself. 1.1 The Python programming language. The Art and Craft of Programming. Machine learning in Python — scikit-learn 0.13.1 documentation. Python for Data Analysis: Tutorial 2.1 (Intro to Pandas Library) Python for Data Analysis: Tutorial 1.2 (Intro to iPython Notebook)

Python as Super Glue for the Modern Scientific Workflow. Advanced Python or Understanding Python. Advanced Python or Understanding Python. Python in Big Data. Vim as a Python IDE - Martin Brochhaus.

Programming

Ligne_7.gif (GIF Image, 600 × 1300 pixels) Gymnase Suzanne Berlioux - Paris 1. 6.00SC Introduction to Computer Science and Programming, Spring 2011. Style Guide for Python Code. Code should be written in a way that does not disadvantage other implementations of Python (PyPy, Jython, IronPython, Cython, Psyco, and such).For example, do not rely on CPython's efficient implementation of in-place string concatenation for statements in the form a += b or a = a + b.

Style Guide for Python Code

This optimization is fragile even in CPython (it only works for some types) and isn't present at all in implementations that don't use refcounting. In performance sensitive parts of the library, the ''.join() form should be used instead. This will ensure that concatenation occurs in linear time across various implementations.Comparisons to singletons like None should always be done with is or is not, never the equality operators.Also, beware of writing if x when you really mean if x is not None -- e.g. when testing whether a variable or argument that defaults to None was set to some other value. 6.00SC Introduction to Computer Science and Programming, Spring 2011.

Glossary. The default Python prompt of the interactive shell.

Glossary

Often seen for code examples which can be executed interactively in the interpreter. The default Python prompt of the interactive shell when entering code for an indented code block or within a pair of matching left and right delimiters (parentheses, square brackets or curly braces). 2to3 A tool that tries to convert Python 2.x code to Python 3.x code by handling most of the incompatibilities which can be detected by parsing the source and traversing the parse tree. 2to3 is available in the standard library as lib2to3; a standalone entry point is provided as Tools/scripts/2to3.

Abstract base class. The Python Language Reference. The Python Standard Library. While The Python Language Reference describes the exact syntax and semantics of the Python language, this library reference manual describes the standard library that is distributed with Python.

The Python Standard Library

It also describes some of the optional components that are commonly included in Python distributions. Python’s standard library is very extensive, offering a wide range of facilities as indicated by the long table of contents listed below. 2. Using the Python Interpreter. The Python interpreter is usually installed as /usr/local/bin/python on those machines where it is available; putting /usr/local/bin in your Unix shell’s search path makes it possible to start it by typing the command to the shell.

2. Using the Python Interpreter

Since the choice of the directory where the interpreter lives is an installation option, other places are possible; check with your local Python guru or system administrator. (E.g., /usr/local/python is a popular alternative location.) On Windows machines, the Python installation is usually placed in C:\Python27, though you can change this when you’re running the installer. To add this directory to your path, you can type the following command into the command prompt in a DOS box: set path=%path%;C:\python27 Typing an end-of-file character (Control-D on Unix, Control-Z on Windows) at the primary prompt causes the interpreter to exit with a zero exit status. The interpreter’s line-editing features usually aren’t very sophisticated.

Using Python on MAC OS X.