background preloader

Packages

Facebook Twitter

Machine learning in Python — scikit-learn 0.13-git documentation. Hypertext: In-Python Haml / Tomer Filiba. I recently got back to web development for some venture I'm working on, which reminded me just how lousy the state of the art is. There's no nice way to put it: we're doing web development all wrong. It's not an anecdotal thing I have against this or that -- it's every facet of it. It's a stack of inferior technologies, held together by the glues of time and legacy.

And the sad thing is, they are here to stay. Nobody's going to kill HTTP or JavaScript, not even Google (at least not in the foreseeable future). It's a hand we have to play. This isn't new[1], of course. Templates? My first objective is to kill templates and templating engines - they just drive me crazy.

Moreover, I hate templating languages: they are always cumbersome, crippled-down versions of Python, while providing no added value[2]. {% extends 'base.html' %} {% block content %} <ul> {% for user in users %} <li><a href="{{ user.url }}">{{ user.username }}</a></li> {% endfor %} </ul> {% endblock %} Haml Hypertext Voila. Pyro - Python Remote Objects - 4.16 — Pyro 4.16 documentation. Navigation Pyro - Python Remote Objects - 4.25¶ What is Pyro? ¶ It is a library that enables you to build applications in which objects can talk to each other over the network, with minimal programming effort.

Pyro is copyright © Irmen de Jong (irmen@razorvine.net | Join the Pyro mailing list for questions and discussion. Contents¶ Indices and tables¶ Table Of Contents Next topic Intro and Example Quick search Enter search terms or a module, class or function name. © Copyright Irmen de Jong. Web2py Web Framework. Overview — NetworkX 1.6 documentation. Introduction to Interactive Predictive Analytics in Python with scikit-learn. Ironport/shrapnel - GitHub. Tutorial — NetworkX 1.6 documentation. Welcome to PyLucene. Welcome | Flask (A Python Microframework) Welcome to Flask’s documentation. Get started with Installation and then get an overview with the Quickstart. There is also a more detailed Tutorial that shows how to create a small but complete application with Flask. Common patterns are described in the Patterns for Flask section. The rest of the docs describe each component of Flask in detail, with a full reference in the API section.

Flask depends on the Werkzeug WSGI toolkit, the Jinja template engine, and the Click CLI toolkit. Be sure to check their documentation as well as Flask’s when looking for information. User’s Guide¶ Flask provides configuration and conventions, with sensible defaults, to get started. API Reference¶ If you are looking for information on a specific function, class or method, this part of the documentation is for you.

Additional Notes¶ Nik / py-diffbot. Py-diffbot is a command line terminal client and python library for the Diffbot article extraction and analysis API. Developer Token To use the client or Python library you will need to include a developer token, which can be obtained by submitting a request at the Diffbot website. Getting Source $ hg clone diffbot Command Line Client $ cd diffbot $ chmod +x diffbot.py $ . Command line options: $ . Library Integration Then link it to your source tree so that it can be imported: $ ln -s diffbot/diffbot /my/project/vendors/diffbot Simple code to get you started: import diffbot def main(url): db = diffbot.DiffBot(dev_token = "mydevtoken") article = db.get_article(url) Diffbot Developer Documentation.

Neurolab - Simple and powerfull neural network library for python. Bioinformatics - Welcome to the Pygr Project! Latent Semantic Analysis in Python | Joseph Wilk. Latent Semantic Analysis (LSA) is a mathematical method that tries to bring out latent relationships within a collection of documents. Rather than looking at each document isolated from the others it looks at all the documents as a whole and the terms within them to identify relationships.

An example of LSA: Using a search engine search for “sand”. Documents are returned which do not contain the search term “sand” but contains terms like “beach”. LSA has identified a latent relationship, “sand” is semantically close to “beach”. There are some very good papers which describing LSA in detail: This is an implementation of LSA in Python (2.4+). 1 Create the term-document matrix We use the previous work in Vector Space Search to build this matrix. 2 tf-idf Transform Apply the tf-idf transform to the term-document matrix. 3 Singular Value Decomposition SVD: Determine U, Sigma, VT from our MATRIX from previous steps. Finally we calculate: Problems. Jstatsoft. Whoosh search. About Whoosh Whoosh is a fast, featureful full-text indexing and searching library implemented in pure Python.

Programmers can use it to easily add search functionality to their applications and websites. Every part of how Whoosh works can be extended or replaced to meet your needs exactly. Some of Whoosh's features include: Pythonic API. Pure-Python. No compilation or binary packages needed, no mysterious crashes. Whoosh might be useful in the following circumstances: Anywhere a pure-Python solution is desirable to avoid having to build/compile native libraries (or force users to build/compile them). Whoosh was created and is maintained by Matt Chaput. Learning more License Starting from version 1.8, the software is licensed under the terms of the simplified ("two-clause") BSD License. Previously, the software was licensed under the terms of the Apache License version 2. Installing Whoosh Whoosh is compatible with Python 2.5 and higher.

. $ easy_install Whoosh or $ pip install Whoosh Other topics. Using PyObjC for Developing Cocoa Applications with Python. Cocoa Frameworks The Cocoa frameworks consist of libraries, APIs, and runtimes that form the development layer for all of OS X. By developing with Cocoa, you will be creating applications the same way OS X itself is created. Your application will automatically inherit the great behaviors and appearances of OS X, with full access to the underlying power of the UNIX operating system. Using Cocoa with the Xcode IDE is simply the best way to create native Mac applications. The Power of Objective-C Much of Cocoa is implemented in Objective-C, an object-oriented language that is compiled to run at incredible speed, yet employs a truly dynamic runtime making it uniquely flexible.

Because Objective-C is a superset of C, it is easy to mix C and even C++ into your Cocoa applications. As your application runs, the Objective-C runtime instantiates objects based on executing logic—not just in ways defined during compilation. Cocoa Uses the Model-View-Controller Design Pattern Audio and Video Core Data. EPD - Frequently Asked Questions (FAQ) :: Products :: Enthought, Inc. Q 10. Can I redistribute Canopy Express? Yes, there are a couple different ways you can redistribute Canopy Express or parts of Canopy Express. First, you can redistribute Canopy Express in its entirety and ensure users accept the license for Canopy Express. But we don’t want you redistributing Canopy Express as part of a commercial application (sold independently or as part of a hardware+software system).

Second, you may deploy your own software that uses or re-packages the open-source libraries and packages provided as part of Canopy Express. NumPySciPyPandasMatplotlibTraitsChacoMayaviEnamland many others We ask that you acknowledge the use of software from Enthought’s distribution by including “Powered by Enthought Canopy” in your documentation and end-user licenses. Third, Canopy Express comes with proprietary tools including the Package Manager, Documentation Browser, TextEditor, (and others may be added). Twisted. Twisted is an event-driven networking engine written in Python and licensed under the open source MIT license. Twisted makes it easy to implement custom network applications. Here's a TCP server that echoes back everything that's written to it: from twisted.internet import protocol, reactor class Echo(protocol.Protocol): def dataReceived(self, data): self.transport.write(data) class EchoFactory(protocol.Factory): def buildProtocol(self, addr): return Echo() reactor.listenTCP(1234, EchoFactory()) reactor.run() Learn more about writing servers, writing clients and the core networking libraries , including support for SSL, UDP, scheduled events, unit testing infrastructure, and much more.

Twisted includes an event-driven web server. Learn more about web application development, templates and Twisted's HTTP client. Here's a simple publish/subscribe server, where clients see all messages posted by other clients: Twisted includes a sophisticated IMAP4 client library. Beautiful Soup documentation. By Leonard Richardson (leonardr@segfault.org) 这份文档也有中文版了 (This document is also available in Chinese translation) Этот документ также доступен в русском переводе.

[Внешняя ссылка] (This document is also available in Russian translation. [External link]) Beautiful Soup 3 has been replaced by Beautiful Soup 4. You may be looking for the Beautiful Soup 4 documentation Beautiful Soup 3 only works on Python 2.x, but Beautiful Soup 4 also works on Python 3.x. Beautiful Soup 3已经被Beautiful Soup 4替代.请在新的项目中查看Beautiful Soup 4的文档. Beautiful Soup 3只能在python2.x版本中运行,而Beautiful Soup 4还可以在python3.x版本中运行.Beautiful Soup 4速度更快,特性更多,而且与第三方的文档解析库(如lxml和html5lib)协同工作.推荐在新的项目中使用Beautiful Soup 4. Beautiful Soup is an HTML/XML parser for Python that can turn even invalid markup into a parse tree. This document illustrates all major features of Beautiful Soup version 3.0, with examples. Table of Contents Quick Start Get Beautiful Soup here. From bs4 import BeautifulSoup # To get everything It's easy to modify the soup: Beautiful Soup: We called him Tortoise because he taught us. [ Download | Documentation | Hall of Fame | For enterprise | Source | Changelog | Discussion group | Zine ] You didn't write that awful page.

You're just trying to get some data out of it. Beautiful Soup is here to help. Since 2004, it's been saving programmers hours or days of work on quick-turnaround screen scraping projects. Beautiful Soup is a Python library designed for quick turnaround projects like screen-scraping. Beautiful Soup provides a few simple methods and Pythonic idioms for navigating, searching, and modifying a parse tree: a toolkit for dissecting a document and extracting what you need.

Beautiful Soup parses anything you give it, and does the tree traversal stuff for you. Valuable data that was once locked up in poorly-designed websites is now within your reach. Interested? Getting and giving support If you have questions, send them to the discussion group. If you use Beautiful Soup as part of your work, please consider a Tidelift subscription.

Download Beautiful Soup. How to Use UTF-8 with Python. PyBrain. Plone site. Tornado Web Server. Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed. By using non-blocking network I/O, Tornado can scale to tens of thousands of open connections, making it ideal for long polling, WebSockets, and other applications that require a long-lived connection to each user. Upgrade notes As of Tornado 3.2, the backports.ssl_match_hostname package must be installed when running Tornado on Python 2. This will be installed automatically when using pip or easy_install. Hello, world Here is a simple “Hello, world” example web app for Tornado: import tornado.ioloop import tornado.web class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") application = tornado.web.Application([ (r"/", MainHandler), ]) if __name__ == "__main__": application.listen(8888) tornado.ioloop.IOLoop.instance().start() This example does not use any of Tornado’s asynchronous features; for that see this simple chat room.

Installation. PylonsHQ - Home. Package Index : biblio.webquery 0.4.3b. Extracting bibliographic information from web services This package presents a number of methods for querying webservices for bibliographic information, and includes two scripts for querying and renaming files by ISBN. biblio.webquery can be installed in a number of ways. setuptools is preferred, but a manual installation will suffice. Via setuptools / easy_install From the commandline call: % easy_install biblio.webquery Superuser privileges may be required. Via setup.py Download a source tarball, unpack it and call setup.py to install: % tar zxvf biblio.webquery.tgz % cd biblio.webquery % python setup.py install Depending on your platform, the scripts may be installed as .py scripts, or some form of executable, or both. queryisbn Return bibliographic information from webservices for supplied ISBNs. queryisbn.py [options] ISBNs ... with the options: For example: renamebyisbn renamebyisbn.py [options] FILES ...

The new name is generated first before the various processing options are applied. Package Index : django-pingback 0.1.4. Pingback client/server implementation for Django framework. Latest Version: 0.3 This two applications provide 3 connected services: pingback server, pingback client and directory ping client. Depends on the django-xmlrpc. First, install the django-xmlrpc application. You can download it either from repo or just use setuptools: easy_install -Z -f django-xmlrpc Next, download and install django-pingback: download sources from main repositoryor use easy_install django-pingbackadd pingback to your INSTALLED_APPSrun .

Pingback server receives pings from other sites, so, we must create function which binds our URLs an objects. But first of all, add this urlpattern to your urls configuration: ((r'^xmlrpc/$', 'django_xmlrpc.views.handle_xmlrpc', {}, 'xmlrpc')) It is a handler for all xmlrpc requests. Usually, blog has a detailed view for each post. Here is simple example, how to make Post objects pingable: Also, you need to tell other sites, that your blog accepts pingbacks.