background preloader


Facebook Twitter

Python Ecosystem – An Introduction · When developers shift from PHP, Ruby or any other platform to Python, the very first road block they face (most often) is a lack of an overall understanding of the Python ecosystem.

Python Ecosystem – An Introduction ·

(the eff-bot guide to) The Standard Python Library. (the eff-bot guide to) The Standard Python Library [home] [zone]

(the eff-bot guide to) The Standard Python Library

Keep This Python Cheat Sheet On Hand When Learning To Code. Python is one of the best programming languages to learn.

Keep This Python Cheat Sheet On Hand When Learning To Code

As you get started, this one-page reference sheet of variables, methods and formatting options could come in handy. Provided by Dave Child, the cheat sheet includes both built-in system and operating system variables, as well as standard methods for working with lists, files and strings. Python Iteration. Created 24 April 2012, last updated 19 March 2013 This is a presentation I gave at PyCon 2013.

Python Iteration

You can read the slides and text on this page, or open the actual presentation in your browser (use right and left arrows to advance the slides), or watch the video: A talk for PyCon 2013. This talk is billed as Beginner, and sounds like a beginner topic, but I prefer to think of it as Fundamental. 30 Python Language Features and Tricks You May Not Know About. 1 Introduction Since I started learning Python, I decided to maintain an often visited list of "tricks".

30 Python Language Features and Tricks You May Not Know About

Any time I saw a piece of code (in an example, on Stack Overflow, in open source software, etc.) that made me think "Cool! Scientific Computing Tools For Python — Numpy. SciPy - Scientific Analysis in Python. Python based scientific analysis cookbook James Battat Created: October 3, 2006 Last Modified: July 12, 2010 I find Python very user-friendly. Therefore I often reach for it when tasked to solve small or large scripting problems.

I have been rather frustrated, though, with the level of support for scientific analysis packages. With scipy and matplotlib, of course, the tools are all there and success is just around the corner... Linear regression with pylab. In order to compliment my linear regression in google docs post (and because I keep forgetting how to do it), here is a quick and dirty guide to linear regression using python and pylab.

Linear regression with pylab

First some notes. One, there is some good info on this online (how else do you think I find this stuff?). Here is a great link: SciPy Cookbook on linear regression. Second, remember that I do things the ‘hard way’ sometimes. On to the problem. Object-relational mapping. Not to be confused with Object-Role Modeling.

Object-relational mapping

Object-relational mapping (ORM, O/RM, and O/R mapping) in computer science is a programming technique for converting data between incompatible type systems in object-oriented programming languages. This creates, in effect, a "virtual object database" that can be used from within the programming language. There are both free and commercial packages available that perform object-relational mapping, although some programmers opt to create their own ORM tools. Overview[edit] Implementation-specific details of storage drivers are generally wrapped in an API in the programming language in use, exposing methods to interact with the storage medium in a way which is simpler and more in line with the paradigms of surrounding code.

String sql = "SELECT ... In contrast, the following makes use of an ORM API, allowing the writing of code which naturally makes use of the features of the language. Person p = Person.Get(10); Alternatives to ORMs[edit] 26.2. pdb — The Python Debugger. Source code: Lib/ The module pdb defines an interactive source code debugger for Python programs.

26.2. pdb — The Python Debugger

It supports setting (conditional) breakpoints and single stepping at the source line level, inspection of stack frames, source code listing, and evaluation of arbitrary Python code in the context of any stack frame. It also supports post-mortem debugging and can be called under program control. The debugger is extensible — it is actually defined as the class Pdb. This is currently undocumented but easily understood by reading the source. The debugger’s prompt is (Pdb). GEGeek - I don't reinvent the wheel, I just link to it. DatabaseInterfaces. This page lists database interfaces available for Python.


Programming: Languages: Python: Modules. TCP/IP Client and Server - Python Module of the Week. Sockets can be configured to act as a server and listen for incoming messages, or connect to other applications as a client.

TCP/IP Client and Server - Python Module of the Week

After both ends of a TCP/IP socket are connected, communication is bi-directional. Echo Server This sample program, based on the one in the standard library documentation, receives incoming messages and echos them back to the sender. It starts by creating a TCP/IP socket. import socketimport sys # Create a TCP/IP socketsock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) Then bind() is used to associate the socket with the server address.

. # Bind the socket to the portserver_address = ('localhost', 10000)print >>sys.stderr, 'starting up on %s port %s' % server_addresssock.bind(server_address) Calling listen() puts the socket into server mode, and accept() waits for an incoming connection. # Listen for incoming connectionssock.listen(1) while True: # Wait for a connection print >>sys.stderr, 'waiting for a connection' connection, client_address = sock.accept() Matplotlib: python plotting — Matplotlib 1.4.3 documentation. Fondamenti di Programmazione. I Computer e la ProgrammazioneInformazioni sul corso e modalità d'esame. Python Turorials, Lectures & Videos. Deep Thoughts by Raymond Hettinger. If you aren’t wowed by Python’s super() builtin, chances are you don’t really know what it is capable of doing or how to use it effectively.

Much has been written about super() and much of that writing has been a failure. This article seeks to improve on the situation by: providing practical use casesgiving a clear mental model of how it worksshowing the tradecraft for getting it to work every timeconcrete advice for building classes that use super()favoring real examples over abstract ABCD diamond diagrams. Il tutorial di Python. The Python Standard Library — Python 3.4.3 documentation. 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. Eclipse IDE. Copyright © 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 vogella GmbH Eclipse Java IDE This tutorial describes the usage of Eclipse as a Java IDE. It describes the installation of Eclipse, the creation of Java programs and tips for using Eclipse.

A guide to Python Namespaces. This post is part of the Powerful Python series where I talk about features of the Python language that make the programmer’s job easier. The Powerful Python page contains links to more articles as well as a list of future articles. Namespaces are a fundamental idea in Python and can be very helpful in structuring and organizing your code (especially if you have a large enough project). However, namespaces might be a somewhat difficult concept to grasp and get used to if you’re new to programming or even coming from another programming language (in my case, Java). Here’s my attempt to make namespaces just a little easier to understand. What’s in a name? Help - Eclipse Platform.

Getting Started. Python Development with PyDev and Eclipse. Python Development with PyDev and Eclipse - Tutorial Copyright © 2009, 2010, 2011, 2012, 2013 vogella GmbH. Overview — Python 3.4.3 documentation. The Python Standard Library. Program Arcade Games With Python And Pygame. Think Python.