background preloader

Python

Facebook Twitter

5 important Python Data Science advancements of 2015. Numba.

5 important Python Data Science advancements of 2015

Tensorflow/tensorflow. Documentation Brython. Citation de la spécification du Document Object Model du W3C : Qu'est-ce que le Document Object Model?

Documentation Brython

Le Document Object Model est une interface indépendante d'une plateforme ou d'un langage qui permet aux programmes et aux scripts d'accéder dynamiquement au contenu, à la structure et au style des documents, et de les mettre à jour. Mechanize. Stateful programmatic web browsing in Python, after Andy Lester’s Perl module WWW::Mechanize.

mechanize

The examples below are written for a website that does not exist (example.com), so cannot be run. There are also some working examples that you can run. import reimport mechanize br = mechanize.Browser()br.open(" follow second link with element text matching regular expressionresponse1 = br.follow_link(text_regex=r"cheese\s*shop", nr=1)assert br.viewing_html()print br.title()print response1.geturl()print response1.info() # headersprint response1.read() # body.

Apprendre à programmer avec Python/Applications web. Un livre de Wikilivres.

Apprendre à programmer avec Python/Applications web

Vous avez certainement déjà appris par ailleurs un grand nombre de choses concernant la rédaction de pages web. Vous savez que ces pages sont des documents au format HTML, que l'on peut consulter via un réseau (intranet ou internet) à l'aide d'un logiciel appelé browser web ou navigateur (ex : Firefox, Google Chrome, Konqueror, Internet Explorer, ...). Les pages HTML sont installées dans les répertoires publics d'un autre ordinateur où fonctionne en permanence un logiciel appelé serveur Web (Apache, IIS, Zope, ...).

Lorsqu'une connexion a été établie entre cet ordinateur et le vôtre, votre logiciel navigateur peut dialoguer avec le logiciel serveur (par l'intermédiaire de toute une série de dispositifs matériels et logiciels dont nous ne traiterons pas ici : lignes téléphoniques, routeurs, caches, protocoles de communication ...). Le protocole HTTP qui gère la transmission des pages web autorise l'échange de données dans les deux sens. 1 #! 1 #! Exercices. Un navigateur en quelques lignes de Python. Avec un langage comme Python et Webkit, il est extrêmement facile de créer une application qui affiche un site internet.

Un navigateur en quelques lignes de Python

Jugez-en vous-même. Le programme ci-dessous, en 9 lignes de code, affiche dans une une fenêtre une page web dont l’adresse est spécifiée dans le programme: import gtk import webkit import gobject gobject.threads_init() window = gtk.Window() window.set_default_size(800, 600) window.connect("destroy", lambda a: gtk.main_quit()) browser = webkit.WebView() browser.open(" window.add(browser) window.show_all() gtk.main() On peut améliorer légèrement le programme pour qu’il ressemble un peu plus à un navigateur en rajoutant dans le haut de la fenêtre une barre d’adresse dans laquelle une URL peut être tapée.

Cours et tutos. Python Ceci n’est pas un cours complet et cohérent sur “apprendre à programmer avec Python”.

Cours et tutos

Pour ça voyez plutôt openclassroom ou le livre gratuit de Swinnen. Ceci est une compilation de tous les cours et tutos du blog, filtrés, et ordonnés de manière cohérente. C’est bordélique, y a des trous partout, mais il y a aussi des connaissances que vous ne trouverez nulle part ailleurs aussi bien expliquées qu’ici. Torch vs Theano. Recently we took a look at Torch 7 and found its data ingestion facilities less than impressive.

Torch vs Theano

Torch’s biggest competitor seems to be Theano, a popular deep-learning framework for Python. These two have been having “who is faster” competition going for a few years now. It’s been documented in the following papers: Theano/theano at master · Theano/Theano. Welcome — Theano 0.7 documentation. Theano is a Python library that allows you to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays efficiently.

Welcome — Theano 0.7 documentation

Theano features: tight integration with NumPy – Use numpy.ndarray in Theano-compiled functions.transparent use of a GPU – Perform data-intensive computations much faster than on a CPU.efficient symbolic differentiation – Theano does your derivatives for functions with one or many inputs.speed and stability optimizations – Get the right answer for log(1+x) even when x is really tiny.dynamic C code generation – Evaluate expressions faster.extensive unit-testing and self-verification – Detect and diagnose many types of errors. Theano has been powering large-scale computationally intensive scientific investigations since 2007. But it is also approachable enough to be used in the classroom (University of Montreal’s deep learning/machine learning classes).

Framework

Librairies. Machine learning en python. Documentation et Tutoriel. Welcome to Python.org. Python Cheat Sheet. String String Methods Array Indexes and Slices.

Python Cheat Sheet

Galerie complete en ipython notebook Wiki. This page is a curated collection of IPython notebooks that are notable for some reason.

galerie complete en ipython notebook Wiki

Feel free to add new content here, but please try to only include links to notebooks that include interesting visual or technical content; this should not simply be a dump of a Google search on every ipynb file out there. Important contribution instructions: If you add new content, please ensure that for any notebook you link to, the link is to the rendered version using nbviewer, rather than the raw file. Simply paste the notebook URL in the nbviewer box and copy the resulting URL of the rendered version. This will make it much easier for visitors to be able to immediately access the new content. Note that Matt Davis has conveniently written a set of bookmarklets and extensions to make it a one-click affair to load a Notebook URL into your browser of choice, directly opening into nbviewer. Table of Contents Entire books or other large collections of notebooks on a topic Introductory Tutorials Julia OCaml. AFPY.

Python Archives - eBook-Daraz. Wiki. Links to Python information in French. ISO 639-1 Code: fr français. IDE Python. Professional Edition Free 30-day trial Full-featured IDE for Python & Web development Supports Django, Flask, Google App Engine, Pyramid, web2py JavaScript, CoffeeScript, TypeScript, CSS, Cython, Template languages and more Remote development, Python Profiler, Databases and SQL support, UML & SQLAlchemy Diagrams PyCharm Professional Edition includes bundled evaluation license key for a free 30-day trial. Community Edition FREE Lightweight IDE for Python development only Free, open-source, Apache 2 license Intelligent Editor, Debugger, Refactorings, Inspections, VCS integration Project Navigation, Testing support, Customizable UI, Vim key bindings.