<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Python on Jice Lavocat</title><link>https://jice.lavocat.name/tags/python/</link><description>Recent content in Python on Jice Lavocat</description><generator>Hugo</generator><language>fr-FR</language><copyright>All rights reserved - 2016</copyright><lastBuildDate>Wed, 17 Nov 2010 00:00:00 +0000</lastBuildDate><atom:link href="https://jice.lavocat.name/tags/python/index.xml" rel="self" type="application/rss+xml"/><item><title>A script to plot GWL File (for the use of Nanoscribe)</title><link>https://jice.lavocat.name/blog/2010/a-script-to-plot-gwl-file-for-the-use-of-nanoscribe/</link><pubDate>Wed, 17 Nov 2010 00:00:00 +0000</pubDate><guid>https://jice.lavocat.name/blog/2010/a-script-to-plot-gwl-file-for-the-use-of-nanoscribe/</guid><description>&lt;p&gt;&lt;img class="alignleft size-full wp-image-1121" style="margin-left: 10px; margin-right: 10px;" title="describe - nanoscribe language GWL" src="https://jice.lavocat.name/images/posts/oldwordpress/uploads/2010/11/describe1.png" alt="describe - nanoscribe language GWL" width="106" height="105" &gt;The focus of this article is really small. It will only interest people involved in Research, who own a &lt;a title="Nanoscribe" href="http://www.nanoscribe.de/" target="_blank"&gt;Nanoscribe&lt;/a&gt; device.&lt;/p&gt;
&lt;p&gt;I was a little bit annoyed by the software, very heavy, and running only on windows. I wanted to design my structures on Linux (or any plateform actually), and I wanted to plot the result with a light software.&lt;/p&gt;</description></item><item><title>Grover’s Search Algorithm in Python</title><link>https://jice.lavocat.name/blog/2009/grovers-search-algorithm-in-python/</link><pubDate>Sat, 15 Aug 2009 00:00:00 +0000</pubDate><guid>https://jice.lavocat.name/blog/2009/grovers-search-algorithm-in-python/</guid><description>&lt;p style="text-align: justify;"&gt;
 As you may have read in some previous post I am actually working on a modified version of the &lt;a title="Lee Grover" href="http://www1.bell-labs.com/user/lkgrover/" target="_blank"&gt;Grover&lt;/a&gt;&amp;#8216;s &lt;a title="Grover's Search Algorithm" href="http://arxiv.org/abs/quant-ph/9605043" target="_blank"&gt;Algorithm&lt;/a&gt;. For those who don&amp;#8217;t know the &lt;a title="Explanations of Grover's Algorithm" href="http://www.quantiki.org/wiki/index.php/Grover%27s_search_algorithm" target="_blank"&gt;principles of Grover&amp;#8217;s Algorithm&lt;/a&gt;, here is a quick explanation.
&lt;/p&gt;
&lt;p style="text-align: justify;"&gt;
 We have a function $$f : \mathbb{Z}_2^n\rightarrow \mathbb{Z}_2$$ that is True for only one $$a \in \mathbb{Z}_2^n$$. We also have a quantum oracle that returns the value of the function f. Classicaly, finding the value of $$a$$ will take n-1 steps. With the quantum version (Grover&amp;#8217;s Algorithm) it takes only $$\sqrt{n}$$ steps.
&lt;/p&gt;</description></item><item><title>Python et Google PageRank</title><link>https://jice.lavocat.name/blog/2009/python-et-google-pagerank/</link><pubDate>Thu, 02 Jul 2009 00:00:00 +0000</pubDate><guid>https://jice.lavocat.name/blog/2009/python-et-google-pagerank/</guid><description>&lt;p style="text-align: justify;"&gt;
 &lt;img class="alignleft size-full wp-image-422" style="margin: 5px;" title="python" src="https://jice.lavocat.name/images/posts/oldwordpress/uploads/2009/06/python.png" alt="python" width="75" height="75" &gt;Suite à mes recherches pour trouver un script de calcul de Pagerank en python, je souhaitais vous présenter deux pages qui me sont tombées sous les yeux.
&lt;/p&gt;
&lt;p style="text-align: justify;"&gt;</description></item><item><title>Numpy error – ValueError: setting an array element with sequence</title><link>https://jice.lavocat.name/blog/2009/numpy-error-valueerror-setting-an-array-element-with-sequence/</link><pubDate>Thu, 04 Jun 2009 00:00:00 +0000</pubDate><guid>https://jice.lavocat.name/blog/2009/numpy-error-valueerror-setting-an-array-element-with-sequence/</guid><description>&lt;p style="text-align: justify;"&gt;
 You have struggled during hours and hours to understand why you got this damned error while compiling a complex array structure? I did. In my case I was trying to create an array of the following shape :
&lt;/p&gt;
&lt;p style="text-align: center;"&gt;
 [  [ [0,0,1,0] , 0.5] , [ [0,1,1,0] , 0.3] , [ [1,0,1,0] , 0.2] ]
&lt;/p&gt;
&lt;p style="text-align: justify;"&gt;
 With the basic syntax, it was impossible. I first didn&amp;#8217;t notice the problem because I wasn&amp;#8217;t using the &amp;#8216;&lt;em&gt;array&lt;/em&gt;&amp;#8216; constructor, but when I tried to &lt;strong&gt;append &lt;/strong&gt;some value to my initial vector, I got the error : &lt;strong&gt;ValueError: setting an array element with sequence&lt;/strong&gt;.</description></item><item><title>La panoplie du petit chercheur</title><link>https://jice.lavocat.name/blog/2009/la-panoplie-du-petit-chercheur/</link><pubDate>Wed, 15 Apr 2009 00:00:00 +0000</pubDate><guid>https://jice.lavocat.name/blog/2009/la-panoplie-du-petit-chercheur/</guid><description>&lt;p&gt;A tout ceux qui veulent se lancer dans des sujets scientifiques ou l’on demandera de coder des choses nouvelles, je conseille le logiciel Python(x,y) qui integre en son sein toutes les bibliotheques python que vous pourrez surement demander un jour.&lt;/p&gt;
&lt;p&gt;A telecharger ici : &lt;a title="Python(xy)" href="http://www.pythonxy.com" target="_blank"&gt;&lt;a href="http://www.pythonxy.com"&gt;http://www.pythonxy.com&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Script de spam referer automatisé python</title><link>https://jice.lavocat.name/blog/2009/script-de-spam-referer-automatis%C3%A9-python/</link><pubDate>Sun, 15 Feb 2009 00:00:00 +0000</pubDate><guid>https://jice.lavocat.name/blog/2009/script-de-spam-referer-automatis%C3%A9-python/</guid><description>&lt;p style="text-align: justify;"&gt;
 Script de Spam Referer automatisé en Python
&lt;/p&gt;
&lt;p style="text-align: justify;"&gt;
 &lt;img class="alignleft size-full wp-image-119" style="margin: 5px;" title="Spammeur SEO" src="https://jice.lavocat.name/images/posts/oldwordpress/uploads/2009/02/seo_black_hat.jpg" alt="Spammeur SEO" width="140" height="112" &gt;Suite à mon article sur les aléas du spam referer, je poste un script python que j&amp;#8217;ai utilisé pour faire mes tests. Le script se déroule en deux parties. La première va &lt;a title="Récupération résultats google par python" href="http://localhost/oldblog/2009/02/extraire-urls-des-resultats-google-en-python/#more-127"&gt;récupérer les résultats google et les enregistrer dans un fichier&lt;/a&gt;.
&lt;/p&gt;
&lt;p style="text-align: justify;"&gt;
 Je vous laisse consulter l&amp;#8217;&lt;a title="Enregistrer résultats google par script python" href="http://localhost/oldblog/2009/02/extraire-urls-des-resultats-google-en-python/#more-127"&gt;article&lt;/a&gt; et revenir ici pour la deuxième partie. La deuxième partie va :</description></item><item><title>Extraire les URLs des résultats Google en python</title><link>https://jice.lavocat.name/blog/2009/extraire-les-urls-des-r%C3%A9sultats-google-en-python/</link><pubDate>Wed, 04 Feb 2009 00:00:00 +0000</pubDate><guid>https://jice.lavocat.name/blog/2009/extraire-les-urls-des-r%C3%A9sultats-google-en-python/</guid><description>&lt;p style="text-align: justify;"&gt;
 J&amp;#8217;ai passé une bonne partie de l&amp;#8217;après-midi à me former à Python. Comme exercice je voulais adapter le script de Tiger sur l&amp;#8217;&lt;a title="Extraction de résultats google en php" href="http://www.seoblackout.com/2008/10/26/extraire-resultats-google/" target="_blank"&gt;extraction de résultats sur google&lt;/a&gt;, en traduisant le php en python.
&lt;/p&gt;
&lt;p style="text-align: justify;"&gt;
 J&amp;#8217;ai eu quelques soucis à cause d&amp;#8217;erreurs d&amp;#8217;innatention et de bêtises de codage, mais au final j&amp;#8217;ai réussi. Le code suivant (Python 3.0) vous donne le même résultat (sans la mise en forme) que le script de Tiger.</description></item></channel></rss>