background preloader


Facebook Twitter

Concurrent Programming in Python. Python Tutorials — Welcome to Python Tutorial World !! Updates Every Day!! Online Python Tutor - Learn programming by visualizing code execution. Python Fundamentals Training. How to Think Like a Computer Scientist — How to Think like a Computer Scientist: Interactive Edition. Welcome!

How to Think Like a Computer Scientist — How to Think like a Computer Scientist: Interactive Edition

Take a tour, experiment with Python, join more than 850,000 other readers in learning how to think like a computer scientist with Python. (welcome) You can experiment with activecode examples right in the bookClick Show/Hide Code buttonOn line 7: change numTurtles = 10 to numTurtles = 6Click the Run buttonYou can do your homework right in the textbook.You can interact with other learners to discuss homeworkInteractive questions make sure that you are on track and help you focus.Codelens helps you develop a mental model of how Python works.Audio Tours help you understand the code.Short videos cover difficult or important topics.You can highlight text, and take notes in scratch editors This interactive book is a product of the Runestone Interactive Project at Luther College, led by Brad Miller and David Ranum.

There have been many contributors to the project. This book is based on the Original work by: Jeffrey Elkner, Allen B. Cookbook. Here is a collection of code fragments demonstrating some features of the OpenCV Python bindings.


Convert an image >>> import cv >>> im = cv . LoadImageM ( "building.jpg" ) >>> print type ( im ) <type 'cv.cvmat'> >>> cv . SaveImage ( "foo.png" , im ) Resize an image To resize an image in OpenCV, create a destination image of the appropriate size, then call Resize . A few things to remember while coding in Python. Fast comparison between two Python dictionary. - Python. Web2py. Command line options It is possible to skip the GUI and start web2py directly from the command line by typing something like: password python -a 'your password' -i -p 8000 When web2py starts, it creates a file called "" where it stores the hashed password.


If you use "<ask>" as the password, web2py prompts you for it. For additional security, you can start web2py with: Graph Processing in Python. Social Network Analysis with Python. Python Epiphanies. The lxml.etree Tutorial. This is a tutorial on XML processing with lxml.etree.

The lxml.etree Tutorial

It briefly overviews the main concepts of the ElementTree API, and some simple enhancements that make your life as a programmer easier. If your code only uses the ElementTree API and does not rely on any functionality that is specific to lxml.etree, you can also use (any part of) the following import chain as a fall-back to the original ElementTree: To aid in writing portable code, this tutorial makes it clear in the examples which part of the presented API is an extension of lxml.etree over the original ElementTree API, as defined by Fredrik Lundh's ElementTree library.

An Element is the main container object for the ElementTree API. Python XML processing with lxml. With the continued growth of both Python and XML, there is a plethora of packages out there that help you read, generate, and modify XML files from Python scripts.

Python XML processing with lxml

Compared to most of them, the lxml package has two big advantages: Performance. Reading and writing even fairly large XML files takes an almost imperceptible amount of time. Ease of programming. The lxml package is based on ElementTree, which Fredrik Lundh invented to simplify and streamline XML processing. lxml is similar in many ways to two other, earlier packages: Learn Python The Hard Way, 2nd Edition — Learn Python The Hard Way, 2nd Edition. Python - Dictionary Data Type. A dictionary is mutable and is another container type that can store any number of Python objects, including other container types.

Python - Dictionary Data Type

Dictionaries consist of pairs (called items) of keys and their corresponding values. 10 Sites to Help You Learn Python for FREE. Elisha Tan is the Founder of Learnemy, a web application that finds you instructors for anything you want to learn.

10 Sites to Help You Learn Python for FREE

Always wanted to build a web application but didn’t know where to start learning? Basic Threading in Python. Introduction Threads allow applications to perform multiple tasks at once.

Basic Threading in Python

Multi-threading is important in many applications, from primitive servers to today's complex and hardware-demanding games, so, naturally, many programming languages sport the ability to deal with threads. Invent Your Own Computer Games with Python - Learn how to program with a free ebook programming tutorial. Chapter 1.

Invent Your Own Computer Games with Python - Learn how to program with a free ebook programming tutorial

Learning Twisted (part 1) : reactor basics. Twisted framework is an event based networking framework in Python.

Learning Twisted (part 1) : reactor basics

This description suffices for initial impression about this framework. These and subsequent posts will serve as my notes for learning Twisted. At the core of event based programming is reactor loop that run endlessly unless asked to stop. While in the loop, reactor listens to events and dispatches these events to event handlers for processing of events. The example below is the simplest way of starting up the reactor. Do you want to crack MD5 hashes in at a rate of ~300MHash/s without a massive rainbow table? Do you have a CUDA enabled GFX card? If you said yes or maybe to these questions then read on for a brief introduction on how to compile and run a CUDA accelerated MD5 cracker (coded by Benjamin “Titan” Vernoux ). Pre-Requisites and Downloading Own a CUDA enabled GFX card, if you have a NVIDIA graphics card from the past year or so this is most likely the case.Download and Install the CUDA toolkitDownload MD5 GPU crack from (windows and Linux) Building in Ubuntu 10.04 Extract the archive and do a make on the source code.

Python: Cryptography Caesar shift encryption (shift cipher) I have always had a keen interest in cryptography and rather than give a brief history of cryptography I will recommend reading Simon Singh’s The code book or for a modern and hands on approach Applied Cryptography by Bruce Schneier (Who also made a brilliant book on security, more of descriptive approach but very interesting Secrets and Lies: Digital Security in a Networked World). This post aims to detail the creation (in python) of one of the simplest forms of encryption; the simple Caesar shift (or shift cipher). S Python Class - Google's Python Class - Google Code. Welcome to Google's Python Class -- this is a free class for people with a little bit of programming experience who want to learn Python.

The class includes written materials, lecture videos, and lots of code exercises to practice Python coding. These materials are used within Google to introduce Python to people who have just a little programming experience. The first exercises work on basic Python concepts like strings and lists, building up to the later exercises which are full programs dealing with text files, processes, and http connections.

The class is geared for people who have a little bit of programming experience in some language, enough to know what a "variable" or "if statement" is. » Good to Great Python reads The Professional Blog of C. Allen-Poole, Web Developer. Unusual Subroutines Programming and business. Dowload Free PDF Foundations Of Python Network Programming Ebook. Basic Authentication. This tutorial aims to explain and illustrate what basic authentication is, and how to deal with it from Python.

You can download the code from this tutorial from the Voidspace Python Recipebook. The first example, So Let's Do It, shows how to do it manually. This illustrates how authentication works. The second example, Doing it Properly, shows how to handle it automatically - with a handler. Python Multimedia: Fun with Animations using Pyglet. Creating a game with PyGlet and Python. Data Mining in Python. The Python Grimoire - a hypertext tome pertaining to that most elegant of languages. So you want to autolink urls... Finding a url inside a chunk of text is no easy task. Coding Horror and Daring Fireball have covered regular expressions for matching urls in a variety of circumstances. I went with the Coding Horror regular expression, mainly because the Daring Fireball version wasn't around when I was working on this.

Using Python's regular expression library, the code to get all the urls in a block of text looks like this: Cross-site scripting (XSS) defense. Ordinarily, cgi.escape() provides complete protection from harmful HTML and javascript, because it strips out all tags completely. However, sometimes you want to let the user use some HTML tags to include links, formatting, and so on. Python Tutorials, more than 300, updated March 2, 2009 and carefully sorted by topic and category. For Beginners. Welcome! Learning Python Design Patterns Through Video Lectures. Python Programming Language – Official Website. Understanding imports and PYTHONPATH — Stereoplex. Dress up your Python scripts with EasyGui. OpenSourceCMS. Anarchivist/worldcat - GitHub. Dive into Python.

Kaishi - Python P2P framework. Kaishi is a chat program without any central servers. Currently all users connected to kaishi are on the same level of the network, meaning no user has more control over the others. kaishi also contains a minimalistic IRC server which you can use rather than directly communicating with the console. After starting the program, type /irc to start the server. Then, connect to Messages and /me's work in the IRC server, as well as /peers /clearpeers and /nick. The rest of kaishi's commands still need to be entered in the console window. If you are having difficulty staying connected, make sure port 44545 is allowing incoming transfer. The 'IPython' Interactive Shell - Part 1 video tutorial - A Demonstration of the 'IPython' Interactive Shell - Learn: demonstrates, beginners, logging, help, linux, overview, cover, talks, underlying, interactive, notes, part, shell, programming_tools, ip.

Regular Expressions for Dummies: Screencast Series.