<?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: Surya Teja</title>
    <description>The latest articles on DEV Community by Surya Teja (@suryasr007).</description>
    <link>https://dev.to/suryasr007</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%2F113434%2F58b72e8b-9a33-4870-8747-ffac18810795.jpg</url>
      <title>DEV Community: Surya Teja</title>
      <link>https://dev.to/suryasr007</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/suryasr007"/>
    <language>en</language>
    <item>
      <title>Automated testing for staging Apps</title>
      <dc:creator>Surya Teja</dc:creator>
      <pubDate>Tue, 16 Nov 2021 05:48:48 +0000</pubDate>
      <link>https://dev.to/suryasr007/automated-testing-for-staging-apps-41gm</link>
      <guid>https://dev.to/suryasr007/automated-testing-for-staging-apps-41gm</guid>
      <description>&lt;h3&gt;
  
  
  My Workflow
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;A blog source for entire process: &lt;a href="https://niteo.co/blog/staging-like-its-2020"&gt;https://niteo.co/blog/staging-like-its-2020&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;A GitHub Action: &lt;a href="https://github.com/marketplace/actions/heroku-review-app-deployment-status"&gt;https://github.com/marketplace/actions/heroku-review-app-deployment-status&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Submission Category:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Testing of staging Apps&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Yaml File or Link to Code
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/marketplace/actions/heroku-review-app-deployment-status"&gt;https://github.com/marketplace/actions/heroku-review-app-deployment-status&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Additional Resources / Info
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Everything is covered in the above mentioned blog post.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>actionshackathon21</category>
    </item>
    <item>
      <title>Automated testing for staging Apps</title>
      <dc:creator>Surya Teja</dc:creator>
      <pubDate>Tue, 16 Nov 2021 05:41:30 +0000</pubDate>
      <link>https://dev.to/suryasr007/test-for-staging-apps-1b3</link>
      <guid>https://dev.to/suryasr007/test-for-staging-apps-1b3</guid>
      <description>&lt;p&gt;I have developed a process to update the pull request status based on staging app deployment using Github Actions and Heroku API.&lt;/p&gt;

&lt;p&gt;Entire journey and workflow can be found here: &lt;a href="https://niteo.co/blog/staging-like-its-2020"&gt;https://niteo.co/blog/staging-like-its-2020&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The journey consists of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A simple custom &lt;a href="https://github.com/marketplace/actions/heroku-review-app-deployment-status"&gt;GitHub Action&lt;/a&gt; for small &amp;amp; medium projects. It takes care of all the burden.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A bit complex process for larger projects which can be helpful in reducing unnecessary costs.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ci</category>
      <category>heroku</category>
      <category>reviewapp</category>
      <category>actionshackathon21</category>
    </item>
    <item>
      <title>Python Dictionaries and their operations</title>
      <dc:creator>Surya Teja</dc:creator>
      <pubDate>Sun, 07 Jul 2019 15:55:40 +0000</pubDate>
      <link>https://dev.to/suryasr007/python-dictionaries-and-their-operations-5ho2</link>
      <guid>https://dev.to/suryasr007/python-dictionaries-and-their-operations-5ho2</guid>
      <description>&lt;p&gt;The whole point of programming concludes to one inevitable out-coming i.e., we write instructions to manipulate/control DATA.&lt;/p&gt;

&lt;p&gt;Python provides many data structures to store data, Dictionary is one among them which store the data as a key-value pair. According to official documentation, there are many definitions but, I find the below definition easy to understand.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Dictionaries are a type of data structures, which are indexed by keys. It can also be defined as an unordered set of key: value pairs. Immutable(not dynamic) types like strings and numbers can always be keys.*&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Basic operations on Dictionaries
&lt;/h3&gt;

&lt;p&gt;As mentioned in the first point, python provides no.of ways to manipulate/control data. Below mentioned are a few basic methods used in dictionaries.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Loops on Dictionaries
&lt;/h3&gt;

&lt;p&gt;On dictionaries, python provides three basic methods to loop through the items&lt;br&gt;
of the dictionary.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;dict.items()&lt;/li&gt;
&lt;li&gt;dict.keys()&lt;/li&gt;
&lt;li&gt;dict.values()&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Other methods on Dictionaries
&lt;/h3&gt;

&lt;p&gt;Python also provides methods which can be really helpful in reducing the size of&lt;br&gt;
code by using reusable modules.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Comparing dictionaries&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The compare method &lt;em&gt;cmp()&lt;/em&gt; is used to compare length of two dictionaries. The method returns 0 if both dictionaries are equal, 1 if dic1 &amp;gt; dict2 and -1 if dict1 &amp;lt; dict2.&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="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Boys&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;'sunny'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;26&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;'Chary'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;'Robin'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;25&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;Girls&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;'pari'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&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="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;cmp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Girls&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Boys&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;get(key[, default]) Method&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Return the value for key if the key is in the dictionary, else default. If&lt;br&gt;
default is not given, it defaults to &lt;code&gt;None&lt;/code&gt; so that this method never raises a KeyError.&lt;/p&gt;

&lt;p&gt;get() is a very useful function as we don’t need to loop through the dictionary items to check whether a certain key is present in the dictionary. For nested dictionaries, it reduces a lot of pain to loop and checks as well as it makes the code more readable.&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;# dict.get( key, default )
&lt;/span&gt;    &lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Boys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'sunny'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="mi"&gt;26&lt;/span&gt;
    &lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Boys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'surya'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'Not Found'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="s"&gt;'Not Found'&lt;/span&gt;
    &lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Boys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'surya'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="bp"&gt;None&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Merging two dictionaries to one dictionary&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are many methods to merge two dictionaries into a single dictionary. Using the multiple arguments ‘**’ operator we can achieve this.&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="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;'a'&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="s"&gt;'b'&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="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;'b'&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="s"&gt;'c'&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="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
          &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;'a'&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="s"&gt;'b'&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="s"&gt;'c'&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;p&gt;&lt;em&gt;Note&lt;/em&gt;: This method is applicable only in python 3.5. When there are conflicting&lt;br&gt;
keys, the interpreter chooses the latest value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;json.dumps()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The standard string representation for dictionaries is hard to read. Using the json.dumps we can make the output as JSON with more readability.&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;# The standard string representation for dictionary:
&lt;/span&gt;      &lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;obj&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;'a'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;'asdasd'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'b'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s"&gt;'rgggsd'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'c'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s"&gt;'asdsd'&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;obj&lt;/span&gt;
          &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;'a'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;'asdasd'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'b'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s"&gt;'rgggsd'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'c'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s"&gt;'asdsd'&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="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;json&lt;/span&gt;
      &lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;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;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;indent&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
          &lt;span class="p"&gt;{&lt;/span&gt;
             &lt;span class="s"&gt;"c"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"asdsd"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
             &lt;span class="s"&gt;"b"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;42&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
             &lt;span class="s"&gt;"a"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"asdasd"&lt;/span&gt;
          &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;json.dumps will accept multiple parameters. As shown above, we can give indent level and we can supply other parameters like sort_keys.&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="o"&gt;&amp;gt;&amp;gt;&amp;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;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;indent&lt;/span&gt;&lt;span class="o"&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;sort_keys&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;    
       &lt;span class="s"&gt;"a"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"asdasd"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="s"&gt;"b"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"rgggsd"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="s"&gt;"c"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"asdsd"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;json.loads()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;loads()&lt;/code&gt; performs the vice-versa of the dumps. It takes the JSON input and converts it back to the dictionary.&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;Jobj&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
         &lt;span class="s"&gt;"a"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"asdasd"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
         &lt;span class="s"&gt;"b"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s"&gt;"rgggsd"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
         &lt;span class="s"&gt;"c"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s"&gt;"asdsd"&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="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;json&lt;/span&gt;
      &lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;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;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;loads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;jobj&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;'a'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;'asdasd'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'b'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s"&gt;'rgggsd'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'c'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s"&gt;'asdsd'&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Dictionary as switch/case statements&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Python doesn’t have switch/case statements as default. But as python has&lt;br&gt;
first-class functions, they can be used to emulate switch/case statements.&lt;br&gt;
Following is an example of implementation of switch/case statement using the dictionary.&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;



&lt;h3&gt;
  
  
  Conclusion:
&lt;/h3&gt;

&lt;p&gt;Python dictionaries very powerful when compared to other data types like lists,&lt;br&gt;
tuples and sets. In other languages, these are also called as “associative&lt;br&gt;
memories” or “associative arrays”. There are lot more properties and methods for&lt;br&gt;
dictionaries which are used as per requirement.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://medium.com/tag/python?source=post"&gt;Python&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/tag/dictionary?source=post"&gt;Dictionary&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>pythondictionaries</category>
    </item>
    <item>
      <title>Multi-Threading in Python</title>
      <dc:creator>Surya Teja</dc:creator>
      <pubDate>Sun, 07 Jul 2019 15:04:28 +0000</pubDate>
      <link>https://dev.to/suryasr007/multi-threading-in-python-14pc</link>
      <guid>https://dev.to/suryasr007/multi-threading-in-python-14pc</guid>
      <description>&lt;h3&gt;
  
  
  Multi-Threading in Python using the ‘Activity’ Application
&lt;/h3&gt;

&lt;p&gt;Threads in the computer world are described as simple executors (which execute the given instructions). These are lightweight and used to perform tasks asynchronously.&lt;/p&gt;

&lt;p&gt;Eg: Different tabs in browser act as different threads&lt;/p&gt;

&lt;p&gt;In general, At the OS level, threads have their own resources but at an abstract level, they use the same code, data and files.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Pc3Sm5WR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/0%2A1C4e7YzuhSZQcwUf." class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Pc3Sm5WR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/0%2A1C4e7YzuhSZQcwUf." alt="" width="600" height="300"&gt;&lt;/a&gt;&lt;br&gt;
&lt;span&gt;Source: &lt;a href="https://www.studytonight.com/"&gt;https://www.studytonight.com&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multithreading in activity application:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/sayanarijit/activity"&gt;Activity&lt;/a&gt; is an application developed by my good friend &lt;a href="https://github.com/sayanarijit"&gt;Arijit&lt;/a&gt;. It performs bulk server command execution and validations over ssh asynchronously.&lt;/p&gt;

&lt;p&gt;It was developed in python 3.6. The core concept of this module is that, it uses multi-threading to perform command execution in parallel on all the given servers because of which it consumes less time and performs tasks in an organised and efficient way.&lt;/p&gt;

&lt;p&gt;To understand multithreading, Let's dive into some code which is part of&lt;br&gt;
activity app, which performs ping check on all the hosts asynchronously.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;The above-defined function is a callable function, which performs the required activity.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;To understand this, we should know a brief background of how parallel execution works in python.&lt;/p&gt;

&lt;h4&gt;
  
  
  concurrent.futures: Launching parallel tasks
&lt;/h4&gt;

&lt;p&gt;The &lt;a href="https://docs.python.org/3/library/concurrent.futures.html#module-concurrent.futures"&gt;concurrent.futures&lt;/a&gt; module provides a high-level interface for asynchronously executing callables which is an In-built module.&lt;/p&gt;

&lt;p&gt;In our program, &lt;code&gt;_ping_single(args):&lt;/code&gt; is a executing callable function&lt;/p&gt;

&lt;p&gt;The asynchronous execution can be performed using threads and processes. Sub-function for threads in &lt;a href="https://docs.python.org/3/library/concurrent.futures.html#module-concurrent.futures"&gt;concurrent.futures&lt;/a&gt; is &lt;strong&gt;ThreadPoolExecutor&lt;/strong&gt; and processes is &lt;strong&gt;ProcessPoolExecutor&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;To import required module&lt;/p&gt;

&lt;p&gt;&lt;code&gt;from concurrent.futures import ThreadPoolExecutor, as_completed&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Once imported,&lt;/p&gt;

&lt;p&gt;&lt;code&gt;with ThreadPoolExecutor(max_workers=PARALLEL_LIMIT) as pool:&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The above line is used to initialize the threads. It is initialized with &lt;code&gt;with&lt;/code&gt; so that when execution of a threads complete, the resources of the thread are freed and then shutdown the Executor.&lt;/p&gt;

&lt;p&gt;The execution starts once the callable function is submitted along with&lt;br&gt;
arguments as shown above. In the above line hosts, as well as required arguments are submitted along with callable function.&lt;/p&gt;

&lt;p&gt;We can use &lt;code&gt;pool.map&lt;/code&gt; to submit the tasks to threads, The difference would be seen in while capturing the output.&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;for&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;as_completed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;futures&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;output&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;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the execution of the thread is started, we can capture the output using &lt;code&gt;as_completed&lt;/code&gt; or the &lt;code&gt;wait&lt;/code&gt; function.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;as_completed()&lt;/code&gt; function takes an iterable of Future objects and starts yielding values as soon as the futures (threads) start resolving. The main difference between the aforementioned map method with as_completed is that map returns the results in the order in which we pass the iterables. That is the first result from the map method is the result of the first item. On the other hand, the first result from the as_completed function is from whichever future completed first.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;wait()&lt;/code&gt; function would return a named tuple which contains two set — one set contains the futures which completed (either got result or exception) and the other set containing the ones which didn’t complete.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note:&lt;/em&gt; If the threads are not configured properly, there will be performance issues like deadlock, memory leaks.&lt;/p&gt;

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

&lt;p&gt;Multithreading if configured properly, is an efficient and organized way to reduce the time taken for execution as well as improve the performance of the program.&lt;/p&gt;

&lt;p&gt;For more explanation on multithreading please refer the below article:&lt;br&gt;
&lt;a href="https://medium.com/@bfortuner/python-multithreading-vs-multiprocessing-73072ce5600b"&gt;https://medium.com/@bfortuner/python-multithreading-vs-multiprocessing-73072ce5600b&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Source:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://medium.com/tag/python?source=post"&gt;Python&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/tag/multithreading?source=post"&gt;Multithreading&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/tag/activity?source=post"&gt;Activity&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>multithread</category>
      <category>python</category>
      <category>multithreading</category>
    </item>
    <item>
      <title>Raspberry pi’s RPI GPIO Module of python</title>
      <dc:creator>Surya Teja</dc:creator>
      <pubDate>Sun, 07 Jul 2019 14:31:31 +0000</pubDate>
      <link>https://dev.to/suryasr007/raspberry-pi-s-rpi-gpio-module-of-python-51j6</link>
      <guid>https://dev.to/suryasr007/raspberry-pi-s-rpi-gpio-module-of-python-51j6</guid>
      <description>&lt;h3&gt;
  
  
  Basic setup and working with raspberry pi’s RPI GPIO Module of python
&lt;/h3&gt;

&lt;p&gt;The first post is about basic setup and working with raspberry pi’s RPI GPIO module of python.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Brief intro to Raspberry Pi:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Raspberry Pi is a credit card-sized computer designed for education. The first model was launched in 2012 which was basically used for education&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2ewxfekrji9xeb0epahm.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2ewxfekrji9xeb0epahm.jpeg" width="800" height="533"&gt;&lt;/a&gt;&lt;br&gt;
&lt;span&gt;Source: &lt;a href="https://www.raspberrypi.org/" rel="noopener noreferrer"&gt;https://www.raspberrypi.org&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Small size&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Low-cost Device&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Complete linux computer&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Low power consumption&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;GPIO pins:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are 40 powerful General Purpose Input/Output(GPIO) pins which are part of&lt;br&gt;
core components of the Raspberry pi. There are two 5V pins and two 3.3v, ground&lt;br&gt;
pins and general purpose pins.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UqMTNn-k--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/800/0%2ABCO8L5pCB4LCak1y." class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UqMTNn-k--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/800/0%2ABCO8L5pCB4LCak1y." width="800" height="238"&gt;&lt;/a&gt;&lt;br&gt;
&lt;span&gt;Source:&lt;br&gt;
&lt;a href="https://www.raspberrypi.org/documentation/usage/gpio/images/gpio-numbers-pi2.png" rel="noopener noreferrer"&gt;https://www.raspberrypi.org/documentation/usage/gpio/images/gpio-numbers-pi2.png&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;RPI GPIO Module:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Python can be used to write applications in Raspberry pi. It comes with a powerful package manager called PIP which can be used to install third-party packages.&lt;/p&gt;

&lt;p&gt;RPI GPIO Module is a third-party package which can be used to configure and control the GPIO pins.&lt;/p&gt;

&lt;p&gt;The basic setup is pretty easy. After setup, we define whether a pin’s value should be high or low.&lt;/p&gt;
&lt;h4&gt;
  
  
  Basic setup
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Make sure that python&amp;gt;2.7 is installed in the raspberry Pi.&lt;/li&gt;
&lt;li&gt;Install the module using PIP
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    &lt;span class="nb"&gt;sudo &lt;/span&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;RPi.GPIO
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;em&gt;Note:&lt;/em&gt; If you face any problem in installing the package install python-dev and try again&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Import the modules to script&lt;/li&gt;
&lt;li&gt;Set the pin numbering schemes (explained below)
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    GPIO.setmode&lt;span class="o"&gt;(&lt;/span&gt;GPIO.BCM&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Configure the required pins
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    GPIO.setup&lt;span class="o"&gt;(&lt;/span&gt;18, GPIO.OUT&lt;span class="o"&gt;)&lt;/span&gt;

    &lt;span class="c"&gt;# PIN 18(BCM) is now used as output&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Pin numbering schemes:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are two types of pin numbering schemes&lt;/p&gt;

&lt;p&gt;&lt;em&gt;GPIO.BOARD:&lt;/em&gt; Board numbering scheme&lt;/p&gt;

&lt;p&gt;The option specifies that you are referring to the pins by the number of the pin the plug i.e the numbers printed on the board.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;GPIO.BCM:&lt;/em&gt; Broadcom chip-specific pin numbers.&lt;/p&gt;

&lt;p&gt;The option means that you are referring to the pins by the “Broadcom SOC channel” number.&lt;/p&gt;



&lt;p&gt;Once the basic setup is completed, Based on the requirement we set the pins to&lt;br&gt;
high or low&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;# Import modules
&lt;/span&gt;    &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;RPi.GPIO&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;GPIO&lt;/span&gt;
    &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;
    &lt;span class="n"&gt;Import&lt;/span&gt; &lt;span class="n"&gt;atexit&lt;/span&gt;

    &lt;span class="c1"&gt;#PIN setup
&lt;/span&gt;    &lt;span class="n"&gt;GPIO&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setmode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;GPIO&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;BCM&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;GPIO&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setup&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;GPIO&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;OUTPUT&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Loop to send HIGH and LOW to the mentioned pin
&lt;/span&gt;    &lt;span class="n"&gt;While&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;GPIO&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;output&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;GPIO&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;HIGH&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sleep&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;GPIO&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;output&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;GPIO&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;LOW&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sleep&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="c1"&gt;#Garabage Cleaner
&lt;/span&gt;    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;clean_up&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
        &lt;span class="n"&gt;GPIO&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cleanup&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

    &lt;span class="n"&gt;atexit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;register&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;clean_up&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above program sends a HIGH signal to 4th pin(BCM) for one second and LOW signal for the next one second continuously until the program is exited. To verify the output of the process we can connect LED and test it.&lt;/p&gt;

&lt;p&gt;The first 5 lines of the program are a basic setup and the following loop&lt;br&gt;
continuously sends a HIGH and LOW signal to the 4th pin until the program is&lt;br&gt;
existed.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;GPIO.cleanup()&lt;/code&gt; function is used as a garbage cleaner and is recommended to use in&lt;br&gt;
every program which uses GPIO pins of the raspberry pi.&lt;/p&gt;

&lt;p&gt;atexit.register() function is used to trigger a function before exiting.&lt;/p&gt;

&lt;p&gt;Based on the requirement of the application, we can set the pin in different&lt;br&gt;
modes.&lt;/p&gt;

&lt;p&gt;Eg: To generate an Analog Output&lt;/p&gt;

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

&lt;p&gt;Once the program is completed, It can run by providing the following command into&lt;br&gt;
the terminal&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo python &amp;lt;program_name&amp;gt;.py&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To exit the program&lt;/p&gt;

&lt;p&gt;press &lt;code&gt;ctrl+c&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Sources:&lt;/p&gt;

&lt;p&gt;Rpi.GPIO Module:&lt;br&gt;
&lt;a href="https://pypi.python.org/pypi/RPi.GPIO" rel="noopener noreferrer"&gt;https://pypi.python.org/pypi/RPi.GPIO&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Raspberry Pi Documentation:&lt;br&gt;
&lt;a href="https://www.raspberrypi.org/documentation/usage/gpio/images/gpio-numbers-pi2.png" rel="noopener noreferrer"&gt;https://www.raspberrypi.org/documentation&lt;/a&gt;&lt;/p&gt;

</description>
      <category>gpiomodule</category>
      <category>raspberrypython</category>
    </item>
  </channel>
</rss>
