background preloader

Python

Facebook Twitter

5 important Python Data Science advancements of 2015. Numba — Just-In-Time compiling Coding in Python just became a lot more awesome… and a whole lot faster as well.

5 important Python Data Science advancements of 2015

Previously, gaining a significant speed-up came with the cost of having to rewrite your code as well as having to break it into compilable pieces. Now you don’t have rewrite the entire code, nor to pre-compile it! 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

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 br.select_form(name="order")# Browser passes through unknown attributes (including methods)# to the selected HTMLForm.br["cheeses"] = ["mozzarella", "caerphilly"] # (the method here is __setitem__)# Submit current form.

. # print currently selected form (don't call .submit() on this, use br.submit())print br.form. 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 À faire... 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.

Lorsque vous appuierez sur la touche Enter, la page sera affichée dans la zone inférieure de la fenêtre. 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: J. Bergstra, O. Theano/theano at master · Theano/Theano. Welcome — Theano 0.7 documentation.

How to Seek Help¶ The appropriate venue for seeking help depends on the kind of question you have.

Welcome — Theano 0.7 documentation

How do I? – theano-users mailing list or StackOverflowI got this error, why? – theano-users mailing list or StackOverflow (please include the full error message, even if it’s long)I got this error and I’m sure it’s a bug – Github ticketI have an idea/request – post the suggestion to theano-dev or, even better, implement the idea and submit a GitHub pull request! Why do you? Please do take some time to search for similar questions that were asked and answered in the past.

When asking questions on StackOverflow, please use the theano tag, so your question can be found, and follow StackOverflow’s guidance on asking questions. It’s often helpful to include the following details with your question: Spending the time to create a minimal specific example of a problem is likely to get you to an answer quicker than posting something quickly that has too much irrelevant detail or is too vague.

Framework

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

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. AFPY. Python Archives - eBook-Daraz. Wiki. Links to Python information in French. ISO 639-1 Code: fr français Page Python (langage) en Français sur Wikipedia.

Groupes d'Utilisateurs. 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 Download previous versions of PyCharm. Interested? Follow product development and give us your feedback.