<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: AIDRI</title>
    <description>The latest articles on DEV Community by AIDRI (@aidri).</description>
    <link>https://dev.to/aidri</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F676205%2F82456fd4-e5ec-42a7-b942-863e6978747c.png</url>
      <title>DEV Community: AIDRI</title>
      <link>https://dev.to/aidri</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aidri"/>
    <language>en</language>
    <item>
      <title>15 Python tips and tricks every beginner should know !</title>
      <dc:creator>AIDRI</dc:creator>
      <pubDate>Wed, 11 Aug 2021 09:44:38 +0000</pubDate>
      <link>https://dev.to/byteslash/15-python-tips-and-tricks-every-beginner-should-know-3bm5</link>
      <guid>https://dev.to/byteslash/15-python-tips-and-tricks-every-beginner-should-know-3bm5</guid>
      <description>&lt;p&gt;Hy guys! &lt;br&gt;
Today I'm going to share with you the best tips and tricks to master in Python!&lt;/p&gt;

&lt;p&gt;These tips are based on my experience on Codingame, during ClashOfCode (I was in the top 100 at one time :) )&lt;/p&gt;
&lt;h4&gt;
  
  
  1/ Create a number sequence
&lt;/h4&gt;

&lt;p&gt;Sometimes you may want to create a sequence of numbers: a fairly intuitive way would be to create a loop and perform n calls of the append() method.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;my_list&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;my_list&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In reality this operation is quite time consuming, and it is better to write :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;my_list&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;my_list&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is not only faster to write but also faster to compute!&lt;/p&gt;

&lt;h4&gt;
  
  
  2/ Overlaying two dictionaries
&lt;/h4&gt;

&lt;p&gt;Concatenating two dictionaries can be a useful operation to group information and avoid getting lost in lots of variables...&lt;br&gt;
So we can use the update() method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="n"&gt;alpha&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="n"&gt;beta&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="n"&gt;gamma&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="n"&gt;delta&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="n"&gt;alpha&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="n"&gt;beta&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="n"&gt;gamma&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="n"&gt;delta&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Warning: if there are two identical keys, then the value will be that of dictionary b.&lt;/p&gt;

&lt;h4&gt;
  
  
  3/ Create a dictionary of a sequence
&lt;/h4&gt;

&lt;p&gt;By creating a dictionary of a sequence, I mean easily creating (in one line) a dictionary where the key depends on x and where the value also depends on x. However, this method can be modified to create the dictionary according to a list, inputs, etc...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;my_dic&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;my_dic&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  4/ Reverse a list
&lt;/h4&gt;

&lt;p&gt;Inverting a list is one of the most useful things you can do in Python. You must know this operation !&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;my_list&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;my_list&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;my_list&lt;/span&gt;&lt;span class="p"&gt;[::&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;my_list&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is much faster to write, much more readable, and especially much faster to execute than the built-in function reversed().&lt;/p&gt;

&lt;h4&gt;
  
  
  5/ Unpacking a tuple
&lt;/h4&gt;

&lt;p&gt;Unpacking a tuple is an interesting operation especially to perform operations on the values, and avoid having to retrieve the value by its index each time:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;my_tup&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;my_tup&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  6/ Filter a list
&lt;/h4&gt;

&lt;p&gt;Filtering a list is a useful process in algorithms or in more common programs. You can keep the values you want by passing a list into a function that acts as a filter. This function returns True (the value is kept) or False (the value is deleted).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;my_list&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;my_filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;

&lt;span class="n"&gt;my_list&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;my_filter&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;my_list&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;my_list&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  7/ Return multiple values from a function
&lt;/h4&gt;

&lt;p&gt;We know that to return a value from a list, we must use return. However, the function stops after returning a value. However, we can use yield to continue to execute the function. Useful for returning variables, for debugging, etc.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;my_func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
         &lt;span class="k"&gt;yield&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;my_func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  8/ import this
&lt;/h4&gt;

&lt;p&gt;The this library is more a joke than a trick, but it's nice to know the little easter eggs of its language:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;this&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;
&lt;span class="n"&gt;The&lt;/span&gt; &lt;span class="n"&gt;Zen&lt;/span&gt; &lt;span class="n"&gt;of&lt;/span&gt; &lt;span class="n"&gt;Python&lt;/span&gt;
&lt;span class="n"&gt;Beautiful&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="n"&gt;better&lt;/span&gt; &lt;span class="n"&gt;than&lt;/span&gt; &lt;span class="n"&gt;ugly&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="n"&gt;Explicit&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="n"&gt;better&lt;/span&gt; &lt;span class="n"&gt;than&lt;/span&gt; &lt;span class="n"&gt;implicit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="n"&gt;Simple&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="n"&gt;better&lt;/span&gt; &lt;span class="n"&gt;than&lt;/span&gt; &lt;span class="nb"&gt;complex&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="n"&gt;Complex&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="n"&gt;better&lt;/span&gt; &lt;span class="n"&gt;than&lt;/span&gt; &lt;span class="n"&gt;complicated&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  9/ Basic operations on sets
&lt;/h4&gt;

&lt;p&gt;If we have two sets a and b such that :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;then we can perform the following operations that you must know !&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Union 
&lt;/span&gt;&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Intersection 
&lt;/span&gt;&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Symetric difference
&lt;/span&gt;&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;^&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  10/ Code if : else : in one line
&lt;/h4&gt;

&lt;p&gt;It's not the most useful trick, but it's always useful to know how to write an if : else : in one line to make the code cleaner, or in shortest code competitions on codingame !&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; i = 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  11/ Limit the number of recursion of an algorithm
&lt;/h4&gt;

&lt;p&gt;Limiting the depth of recursion of an algorithm is important. It is even the first thing to do when you know the maximum depth of recursion! You can do it with the Python library sys:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;sys&lt;/span&gt;
&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setrecursionlimit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  12/ Print text faster
&lt;/h4&gt;

&lt;p&gt;When we have to print text in Python, we use by default the print() method ! However, when you have to print thousands of lines, this method can be slow. In this case we use :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;sys&lt;/span&gt;
&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stdout&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;…&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# only string
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can use a similar method for the input, but it's a bit more complex :)&lt;/p&gt;

&lt;p&gt;This method is up to 8 times faster than the normal print&lt;/p&gt;

&lt;h4&gt;
  
  
  13/ Have the middle items of a list
&lt;/h4&gt;

&lt;p&gt;Having the items in the middle of a list is a little trick to know when unpacking this list... Indeed, depending on the number of variables (or underscore if you don't want to keep the variable) at the beginning and at the end, you can have a variable containing a list of values containing only the "middle" one, in fact, the one that have not been put in other variables!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;l&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;l&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  14/ Separate big numbers by _
&lt;/h4&gt;

&lt;p&gt;For more readability, and because Python does not allow spaces between the digits of a number, we can use _. For example, 1 000 000 000 can be written in Python :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="mi"&gt;1_000_000_000&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  15/ Exchange keys / values of a dictionary
&lt;/h4&gt;

&lt;p&gt;Exchanging the keys and values of a dictionary is a technique that can be useful, especially in the field of AI :). Here is how to do it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;my_dic&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="n"&gt;my_dic&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;v&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;v&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;my_dic&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;my_dic&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;p&gt;That's all for today, I hope you liked the article and that you were able to improve your coding skills! Don't hesitate to share the article with your friends and to give me your feedback in comments!&lt;/p&gt;

&lt;p&gt;Adrien&lt;/p&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>programming</category>
      <category>computerscience</category>
    </item>
    <item>
      <title>Getting started in AI</title>
      <dc:creator>AIDRI</dc:creator>
      <pubDate>Fri, 06 Aug 2021 06:52:04 +0000</pubDate>
      <link>https://dev.to/byteslash/getting-started-in-ai-46op</link>
      <guid>https://dev.to/byteslash/getting-started-in-ai-46op</guid>
      <description>&lt;p&gt;Hi guys,🖐&lt;/p&gt;

&lt;p&gt;Today I wanted to give you some tips and answer some of your questions so you can get started in the world of AI !&lt;/p&gt;

&lt;p&gt;By the end of this article, you will no longer have any fears about the difficulty of the field, one person will have become your god, you will have dozens of hours of videos to watch, and you will have plenty of project ideas for all levels !&lt;/p&gt;

&lt;p&gt;I hope you like the article, let's get started !&lt;/p&gt;

&lt;h3&gt;
  
  
  I/ Is it necessary to have significant knowledge in maths ?
&lt;/h3&gt;

&lt;p&gt;It is true that at first sight, one can say to oneself that one needs advanced knowledge in maths to create a brain... In fact, not really ! It all depends on the job you want to do. Obviously, if you want to become a researcher, you will need to have a good background in mathematics. But if not, you will soon realize that high school or basic undergraduate knowledge is enough !&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8bdda3nrd7gssste1lta.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8bdda3nrd7gssste1lta.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Among this knowledge, I think you need to be comfortable with linear algebra, including: vectors, matrices, eigenvalues and eigenvectors, functions, derivatives, and vector and matrix calculus. Moreover, some basic notions of probability can be interesting: conditional probabilities, dependant and non-dependent elements, variance, etc...&lt;/p&gt;

&lt;p&gt;If you don't have all this knowledge, don't worry, there are plenty of mini-videos or courses to explain everything ! I would recommend three of them : &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://en.khanacademy.org/" rel="noopener noreferrer"&gt;Khan Academy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab" rel="noopener noreferrer"&gt;3Blue1Brown on linear algebra&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://ocw.mit.edu/courses/mathematics/18-06-linear-algebra-spring-2010/video-lectures/" rel="noopener noreferrer"&gt;MIT courses on linear algebra&lt;/a&gt; (there is also one I'm doing &lt;a href="https://ocw.mit.edu/resources/res-6-012-introduction-to-probability-spring-2018/" rel="noopener noreferrer"&gt;on probability&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  II/ Where to learn AI ?
&lt;/h3&gt;

&lt;p&gt;That's probably why you're here: where to learn AI. In this section, we'll talk about theoretical AI, but right after, I'll give you the best tools to code them ! &lt;/p&gt;

&lt;p&gt;To learn AI, we notice three different methods :&lt;/p&gt;

&lt;p&gt;First of all, &lt;strong&gt;MOOCs (Massive Open Online Course)&lt;/strong&gt;. These are online courses, which last several weeks, but where everyone can start them when he wants, but especially go at his own pace. There are videos, with teachers and speakers, additional documents, links to useful information, but also exercises and tests. Some of these MOOCs offer certificates that can be useful in a CV / on Linkedin. &lt;br&gt;
Here are some MOOCs that may be interesting to get started in AI :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.coursera.org/learn/machine-learning" rel="noopener noreferrer"&gt;Machine Learning, by Andrew Ng&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.coursera.org/specializations/deep-learning" rel="noopener noreferrer"&gt;Deep Learning, by Andrew Ng&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://deepmind.com/learning-resources/deep-learning-lecture-series-2020" rel="noopener noreferrer"&gt;Deep Learning Series 2020, by DeepMind&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.udacity.com/course/reinforcement-learning--ud600" rel="noopener noreferrer"&gt;Reinforcement Learning, by Georgia Tech&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://deepmind.com/learning-resources/-introduction-reinforcement-learning-david-silver" rel="noopener noreferrer"&gt;Reinforcement Learning, by the great David Silver (DeepMind)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fikufovvn1rvp2lfheli8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fikufovvn1rvp2lfheli8.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you will see, one person often comes up in MOOCs: Andrew Ng, he is in some way the god of MOOCs, we all already listened to him when we started AI ! There is no more reliable source. &lt;br&gt;
As you have noticed some MOOCs are expensive, you can claim financial aid, which is often granted.&lt;/p&gt;

&lt;p&gt;Then there are the &lt;strong&gt;books&lt;/strong&gt;, there are plenty of them that sometimes contain exercises with answers. Again, this allows you to go at your own pace, but you can also study a particular chapter or find information easily. Here are some books to read: (a little expensive, but the content is worth it)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deep Learning, Aaron Courville, Ian Goodfellow and Yoshua Bengio&lt;/li&gt;
&lt;li&gt;Hands on Machine Learning with Scikit-Learn and Tensorflow, Aurélien Géron&lt;/li&gt;
&lt;li&gt;Pattern Recognition and Machine Learning, Christopher Bishop&lt;/li&gt;
&lt;li&gt;Reinforcement Learning: An Introduction, Andrew Barto, Richard Sutton&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F78ti6d7uk9d5vtd2fsz7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F78ti6d7uk9d5vtd2fsz7.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, the &lt;strong&gt;research papers&lt;/strong&gt;. There are plenty of them, but this is not what I would recommend for a beginner. Indeed, it is easier to follow a course where all the notions are covered than to go and find the different points by yourself (at the risk of forgetting them) and study them in depth. &lt;br&gt;
However, when you feel capable, and you see that you have a good level, you should start to detach yourself from the MOOCs to go towards papers specific to your project: it remains relatively well explained and will give you tracks to carry out your idea ! &lt;br&gt;
You have different places to read them: arxiv (the most famous), researchgate, paperswithcode (code is provided with it), but also the blogs of the big ones in the field: deepmind, openai, facebook research, etc...&lt;br&gt;
Here are some interesting ones :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.researchgate.net/publication/292074166_Mastering_the_game_of_Go_with_deep_neural_networks_and_tree_search" rel="noopener noreferrer"&gt;Mastering the game of Go with deep neural networks and tree search, by David Silver &amp;amp; al&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://arxiv.org/abs/1706.03762" rel="noopener noreferrer"&gt;Attention is all you need, by Ashish Vaswani &amp;amp; al&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://arxiv.org/abs/1506.01497" rel="noopener noreferrer"&gt;Faster R-CNN: towards real-time object detection with region proposal networks, by Shaoqing Ren &amp;amp; al&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://arxiv.org/abs/1412.6980" rel="noopener noreferrer"&gt;Adam: A Method for Stochastic Optimization, by Diederik Kingma &amp;amp; al&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://arxiv.org/abs/2005.14165" rel="noopener noreferrer"&gt;Language Models are few-show learners, by Tom Brown &amp;amp; al&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;you will find dozens of others very interesting, but I must continue my article :)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  III/ How to code AIs ?
&lt;/h3&gt;

&lt;p&gt;I won't teach you how to code AIs here, but I will give you some tips to get started:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;First of all, I advise you to code in Python, it is the language where the most libraries are developed. A new language is emerging : Julia, it's really nice if you want to implement IAs from scratch, but otherwise some libraries are missing !&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgeqq29ofuiige8zwqhdm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgeqq29ofuiige8zwqhdm.png"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Then you have to choose a framework : to start it is interesting to have one, but when your project will become more complex, you will have to choose several. Your choice must be made between Tensorflow and PyTorch. Eventually you can use Scikit Learn.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ifzficufoqim3dj0lkc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ifzficufoqim3dj0lkc.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Read the documentation of your framework carefully, especially the important functions.&lt;/li&gt;
&lt;li&gt;Look at implementations on github, it is even recommended by big names (Andrew Ng). Indeed, this will not only allow you to discover your language, but also to understand in another way the paper / course you are working on.&lt;/li&gt;
&lt;li&gt;Use datasets and RL environments already made. As far as datasets are concerned, you will find plenty of them on the internet in general, which correspond to your project (you may have to rearrange the data, but not much more). Think to look on &lt;a href=""&gt;Kaggle&lt;/a&gt;, there is a "contest" section but also a "dataset" section gathering thousands of datasets ! On the RL side, you will need environments, use OpenAI-gym, they are very good and easy to use. For autonomous cars, I advise to use Carla. It is quite complete, and many tools are available (Lidar, camera, etc...).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzs369svsyeyi9txpd16b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzs369svsyeyi9txpd16b.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  IV/ Interesting projects to work on
&lt;/h3&gt;

&lt;p&gt;At some point, you will have to get out of the "tutorial spiral", and start creating your own projects: you will become more and more confident in your skills, you will build a portfolio, etc...&lt;br&gt;
Here are some ideas :&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Beginner :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;prediction of the price of a house&lt;/li&gt;
&lt;li&gt;image classification (cat / dog)&lt;/li&gt;
&lt;li&gt;chatbot&lt;/li&gt;
&lt;li&gt;classification of tweets according to emotion&lt;/li&gt;
&lt;li&gt;spam checker&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Intermediate :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;translation&lt;/li&gt;
&lt;li&gt;personal assistant&lt;/li&gt;
&lt;li&gt;driving a car (by reinforcement learning)&lt;/li&gt;
&lt;li&gt;Moon Lander (by reinforcement learning)&lt;/li&gt;
&lt;li&gt;detection of emotions on a face&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Advanced :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;summarize a text&lt;/li&gt;
&lt;li&gt;chess player&lt;/li&gt;
&lt;li&gt;Robotics (on OpenAI gym)&lt;/li&gt;
&lt;li&gt;text generation&lt;/li&gt;
&lt;li&gt;math solver (addition, subtraction, modulo, etc...)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Finally, you can try the &lt;a href="https://www.kaggle.com/" rel="noopener noreferrer"&gt;Kaggle contests&lt;/a&gt;, many contests are available with lots of dataset. The goal is of course to make the best AI possible, using an AI model (no need to invent one) and to "tune" it !&lt;/p&gt;

&lt;h3&gt;
  
  
  V/ Conclusion
&lt;/h3&gt;

&lt;p&gt;The field of AI is therefore quite accessible to everyone. You just need to have a basic knowledge of mathematics, and to start studying courses and books. Coding is also the best way to know your skills, and to reassure yourself about the apparent complexity of a project ! &lt;/p&gt;

&lt;p&gt;I hope I've motivated you to get into AI !&lt;/p&gt;

&lt;p&gt;Adrien&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>career</category>
      <category>programming</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Is Github Copilot a friend or a foe ?!</title>
      <dc:creator>AIDRI</dc:creator>
      <pubDate>Fri, 30 Jul 2021 18:37:05 +0000</pubDate>
      <link>https://dev.to/byteslash/is-github-copilot-a-friend-or-a-foe-255i</link>
      <guid>https://dev.to/byteslash/is-github-copilot-a-friend-or-a-foe-255i</guid>
      <description>&lt;p&gt;Hi guys,🖐&lt;/p&gt;

&lt;p&gt;Today, I wanted to share with you his experience on the Github Copilot assistant that helps developers. &lt;/p&gt;

&lt;p&gt;I hope you'll like it. Let's start:&lt;/p&gt;

&lt;h3&gt;
  
  
  I/ Introduction
&lt;/h3&gt;

&lt;p&gt;On June 29, 2021, Github announced on its blog and on Twitter the release of a revolutionary assistant, able to help developers to code faster, discover APIs, and solve problems. Its name: Github Copilot. Immediately, this assistant made a lot of noise in the programming field. That's why we decided to create this article to summarize what happened last month, and the opinions about this AI.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzvm2wxzw0xp955c3d8jr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzvm2wxzw0xp955c3d8jr.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  II/ What is GPT3 and OpenAI Codex
&lt;/h3&gt;

&lt;p&gt;Github Copilot has been developed in collaboration with OpenAI, the company founded by Sam Altman and Elon Musk, and managed by Ilya Sutskever. GPT-3 is an AI developed by this company, but it is especially the big brother of GPT-2, another similar AI developed a few years before. This AI is based on the technology of the Transformers, which uses a mechanism of attention (Attention Layer). It is composed of 175 billions of parameters, which makes it one of the biggest AIs ever created. To take advantage of all the capabilities of GPT-3, OpenAI has created alternative versions: DALL-E, GPT-F, and OpenAI Codex. Here, the AI has been trained on billions of lines of code from projects available on the internet. Github, led by Microsoft which has the exclusivity of GPT-3, decided to make OpenAI Codex available via VS Code, thus creating one of the most attractive private betas!&lt;/p&gt;

&lt;h3&gt;
  
  
  III/ The positive points of Github Copilot
&lt;/h3&gt;

&lt;p&gt;Github Copilot has many advantages:&lt;/p&gt;

&lt;h4&gt;
  
  
  - You can write code faster : 💨
&lt;/h4&gt;

&lt;p&gt;Indeed, OpenAI's AI runs on very powerful hardware technologies, which allows to predict results quickly. Moreover, many results are generated just as quickly, which allows me to introduce the following point...&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa1fr5654vwefp2j8o60z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa1fr5654vwefp2j8o60z.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  - We have access to many results:
&lt;/h4&gt;

&lt;p&gt;If the first result generated by Copilot is not suitable, it is easy to choose another one that may be more relevant. The number of results generated can even be changed in the AI settings.&lt;/p&gt;

&lt;h4&gt;
  
  
  - The AI takes into account the context: 👂
&lt;/h4&gt;

&lt;p&gt;It can be given feedback to help it find relevant results. Moreover, it takes into account the previously written code, which allows it to adapt to our code. It constantly tries to understand our project. A funny example: the AI even adds its own comments! It's magical!&lt;/p&gt;

&lt;h4&gt;
  
  
  - It allows to discover APIs more easily: EZ
&lt;/h4&gt;

&lt;p&gt;Copilot allows you to generate functions to call APIs, it's great if you want to save time, but personally I don't recommend to do that if you are still a beginner. Don't forget that it's Github Copilot, not Github Pilot ^^.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faz9pj6pphye1l8ldmt1y.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faz9pj6pphye1l8ldmt1y.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  - Copilot is improving day by day: 💪
&lt;/h4&gt;

&lt;p&gt;As announced by Github, when you accept the proposed code, it may be sent to Microsoft services for the AI to continue training. The results will be more and more relevant.&lt;/p&gt;

&lt;h3&gt;
  
  
  IV/ The negative points
&lt;/h3&gt;

&lt;p&gt;However, all is not rosy with this AI ^^ :&lt;/p&gt;

&lt;h4&gt;
  
  
  - There is a legal blur : ⚖️
&lt;/h4&gt;

&lt;p&gt;The AI is trained on code available on the Internet, but the owners may not necessarily agree to this use. However, the answers of the AI are based on these codes: you understand that on some points, it's a bit vague.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqqswyrqz3fo8zy2ev1io.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqqswyrqz3fo8zy2ev1io.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  - The AI can repeat itself: 🔁
&lt;/h4&gt;

&lt;p&gt;Although the AI has a system to avoid repetition, it happens that the AI creates two similar functions which can quickly become ugly.&lt;/p&gt;

&lt;h4&gt;
  
  
  - The AI does not use the latest conventions:
&lt;/h4&gt;

&lt;p&gt;Indeed, Copilot tends to use old practices that nobody uses anymore and that make the code ugly. It can even become annoying when using some APIs, databases, etc...&lt;/p&gt;

&lt;h4&gt;
  
  
  - Unfortunately, Copilot can give the impression to beginners to know how to use it: 🧞
&lt;/h4&gt;

&lt;p&gt;Copilot helps developers to code, but beginners shouldn't use it too much : indeed, they will learn bad manners, and will think they know how to code, when in reality, it's not the case. So Copilot is great for senior developers, but probably not for beginners.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvwf8a68fzkzbbt0u2sy8.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvwf8a68fzkzbbt0u2sy8.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  V/ My opinion about Github Copilot
&lt;/h3&gt;

&lt;p&gt;After using Github Copilot, I quickly realized that the AI was great to help the developer, but that it was not going to take our work. Indeed, it needs to be oriented, redirected to the solution. However, I was able to do some repetitive tasks, like coding a function to read data and show it, quite easily, which I liked. So you don't have to be afraid of Github Copilot.&lt;br&gt;
If I had to summarize in one line what Github Copilot is now, I would say that it is a form of intelligent StackOverflow, a little bit like a little brain that would know all the languages, algorithms, and that would try to help us by all means.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa5ao2qrli4x9axiy47rn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa5ao2qrli4x9axiy47rn.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  VI/ Some screens
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;I let Copilot code a basic NN, here is the NN by Copilot... The good point is he even managed to create some functions that he coded separately for me right after !&lt;/em&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq9mslxop7h0zs0cciubk.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq9mslxop7h0zs0cciubk.jpg" alt="I let Copilot code a basic NN, here is the NN by Copilot... The good point is he even managed to create some functions that he coded separately for me right after !"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I just asked him to code me a class to create Polynomes : in addition to defining them, I can do elementary operations with them, it's rather successful...&lt;/em&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi3g3sjvqci429biq809v.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi3g3sjvqci429biq809v.jpg" alt="I just asked him to code me a class to create Polynomes : in addition to defining them, I can do elementary operations with them, it's rather successful..."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;But hey, not everything is perfect, and sometimes he makes a few little mistakes! He didn't respect the order here ^^ !&lt;/em&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frk4j5ctb0u52imvodgvd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frk4j5ctb0u52imvodgvd.jpg" alt="But hey, not everything is perfect, and sometimes he makes a few little mistakes! He didn't respect the order here ^^ !"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;h6&gt;
  
  
  If you liked my article, do not hesitate to share it, but also to give me your feedback
&lt;/h6&gt;

&lt;h6&gt;
  
  
  Adrien
&lt;/h6&gt;

</description>
    </item>
  </channel>
</rss>
