<?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>Forem: Shyam Salil</title>
    <description>The latest articles on Forem by Shyam Salil (@shyams1993).</description>
    <link>https://forem.com/shyams1993</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%2F400673%2F397e33e5-e3fd-4387-a849-f76c6777fa30.jpeg</url>
      <title>Forem: Shyam Salil</title>
      <link>https://forem.com/shyams1993</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/shyams1993"/>
    <language>en</language>
    <item>
      <title>The perfect handbook</title>
      <dc:creator>Shyam Salil</dc:creator>
      <pubDate>Wed, 24 Jun 2020 15:28:39 +0000</pubDate>
      <link>https://forem.com/shyams1993/the-perfect-handbook-4a6a</link>
      <guid>https://forem.com/shyams1993/the-perfect-handbook-4a6a</guid>
      <description>&lt;p&gt;Hello Dev.to,&lt;/p&gt;

&lt;p&gt;Today, I want to introduce a fantastic Computer Science resource to all of you - A book, that was a good kickstart when I was an absolute beginner and a handbook as I started advancing.&lt;/p&gt;

&lt;p&gt;I know that a book may not always be everybody's favorite, but hey, the author has added some super nerdy cartoon comic strips and he has ensured that the monotony is as minimal as possible (it's a book; The monotony just can't be helped ;))&lt;/p&gt;

&lt;p&gt;This book deals with the Complexities (Time &amp;amp; Space), Strategies, Data Types, Structures, Programming Paradigms etc - Just a perfect guide!&lt;/p&gt;

&lt;p&gt;So without further delay, this is the book -&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jdTPvSyc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://m.media-amazon.com/images/I/51Lb4J6645L._SY346_.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jdTPvSyc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://m.media-amazon.com/images/I/51Lb4J6645L._SY346_.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And a small sneek peak into the contents:&lt;/p&gt;

&lt;p&gt;. . . . . . . . . . . . . . . . . . . . . . . . . . ix&lt;br&gt;
1 BASICS . . . . . . . . . . . . . . . . . . . . . . . . . . 1&lt;br&gt;
1.1 Ideas . . . . . . . . . . . . . . . . . . . . . . . . 1&lt;br&gt;
1.2 Logic . . . . . . . . . . . . . . . . . . . . . . . . 5&lt;br&gt;
1.3 Counting . . . . . . . . . . . . . . . . . . . . . . 13&lt;br&gt;
1.4 Probability . . . . . . . . . . . . . . . . . . . . . 19&lt;br&gt;
2 COMPLEXITY . . . . . . . . . . . . . . . . . . . . . . . 25&lt;br&gt;
2.1 Counting Time . . . . . . . . . . . . . . . . . . . 27&lt;br&gt;
2.2 The Big-O Notation . . . . . . . . . . . . . . . . 30&lt;br&gt;
2.3 Exponentials . . . . . . . . . . . . . . . . . . . . 31&lt;br&gt;
2.4 Counting Memory . . . . . . . . . . . . . . . . . 33&lt;br&gt;
3 STRATEGY . . . . . . . . . . . . . . . . . . . . . . . . 35&lt;br&gt;
3.1 Iteration . . . . . . . . . . . . . . . . . . . . . . 35&lt;br&gt;
3.2 Recursion . . . . . . . . . . . . . . . . . . . . . 38&lt;br&gt;
3.3 Brute Force . . . . . . . . . . . . . . . . . . . . 40&lt;br&gt;
3.4 Backtracking . . . . . . . . . . . . . . . . . . . . 43&lt;br&gt;
3.5 Heuristics . . . . . . . . . . . . . . . . . . . . . 46&lt;br&gt;
3.6 Divide and Conquer . . . . . . . . . . . . . . . . 49&lt;br&gt;
3.7 Dynamic Programming . . . . . . . . . . . . . . 55&lt;br&gt;
3.8 Branch and Bound . . . . . . . . . . . . . . . . . 58&lt;br&gt;
4 DATA . . . . . . . . . . . . . . . . . . . . . . . . . . . 65&lt;br&gt;
4.1 Abstract Data Types . . . . . . . . . . . . . . . . 67&lt;br&gt;
4.2 Common Abstractions . . . . . . . . . . . . . . . 68&lt;br&gt;
4.3 Structures . . . . . . . . . . . . . . . . . . . . . 72&lt;br&gt;
5 ALGORITHMS . . . . . . . . . . . . . . . . . . . . . . . 85&lt;br&gt;
5.1 Sorting . . . . . . . . . . . . . . . . . . . . . . . 86&lt;br&gt;
5.2 Searching . . . . . . . . . . . . . . . . . . . . . 88&lt;br&gt;
5.3 Graphs . . . . . . . . . . . . . . . . . . . . . . . 89&lt;br&gt;
5.4 Operations Research . . . . . . . . . . . . . . . . 95&lt;br&gt;
6 DATABASES . . . . . . . . . . . . . . . . . . . . . . . . 101&lt;br&gt;
6.1 Relational . . . . . . . . . . . . . . . . . . . . . 102&lt;br&gt;
6.2 Non-Relational . . . . . . . . . . . . . . . . . . . 110&lt;br&gt;
6.3 Distributed . . . . . . . . . . . . . . . . . . . . . 115&lt;br&gt;
6.4 Geographical . . . . . . . . . . . . . . . . . . . . 119&lt;br&gt;
6.5 Serialization Formats . . . . . . . . . . . . . . . 120&lt;br&gt;
7 COMPUTERS . . . . . . . . . . . . . . . . . . . . . . . 123&lt;br&gt;
7.1 Architecture . . . . . . . . . . . . . . . . . . . . 123&lt;br&gt;
7.2 Compilers . . . . . . . . . . . . . . . . . . . . . 131&lt;br&gt;
7.3 Memory Hierarchy . . . . . . . . . . . . . . . . . 138&lt;br&gt;
8 PROGRAMMING . . . . . . . . . . . . . . . . . . . . . . 147&lt;br&gt;
8.1 Linguistics . . . . . . . . . . . . . . . . . . . . . 147&lt;br&gt;
8.2 Variables . . . . . . . . . . . . . . . . . . . . . . 150&lt;br&gt;
8.3 Paradigms . . . . . . . . . . . . . . . . . . . . . 152&lt;br&gt;
CONCLUSION . . . . . . . . . . . . . . . . . . . . . . . . . 163&lt;br&gt;
APPENDIX . . . . . . . . . . . . . . . . . . . . . . . . . . 165&lt;br&gt;
I Numerical Bases . . . . . . . . . . . . . . . . . . 165&lt;br&gt;
II Gauss’ trick . . . . . . . . . . . . . . . . . . . . 166&lt;br&gt;
III Sets . . . . . . . . . . . . . . . . . . . . . . . . 167&lt;br&gt;
IV Kadane’s Algorithm . . . . . . . . . . . . . . . . 168&lt;/p&gt;

&lt;p&gt;Enough dopamine?  I'd highly recommend you all to get this book (I'm in no way related to the author and this is not an advertisement :); It's just that it's really hard to find a 168-page book that concisely explains all of the important pillars of Computer Science and this is my favorite book of all time! :) That said, I just want to ensure that I pass this on to all of you, so that atleast one of you may be benefitted.&lt;/p&gt;

&lt;p&gt;A sample of the book can be found at : &lt;br&gt;
&lt;a href="https://code.energy/wp-content/uploads/computer-science-distilled-sample.pdf"&gt;https://code.energy/wp-content/uploads/computer-science-distilled-sample.pdf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To buy the book, please visit Amazon and for more details, you can visit the Publisher's website as well-&lt;/p&gt;

&lt;p&gt;Amazon IN Link - &lt;a href="https://www.amazon.in/dp/B0731JG96F/ref=dp-kindle-redirect?_encoding=UTF8&amp;amp;btkr=1"&gt;https://www.amazon.in/dp/B0731JG96F/ref=dp-kindle-redirect?_encoding=UTF8&amp;amp;btkr=1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Amazon COM Link - &lt;a href="https://www.amazon.com/Computer-Science-Distilled-Computational-Problems/dp/0997316020"&gt;https://www.amazon.com/Computer-Science-Distilled-Computational-Problems/dp/0997316020&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Code Energy Website(Publisher's site) - &lt;a href="https://code.energy/"&gt;https://code.energy/&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;h3&gt;HAPPY CODING!&lt;/h3&gt;&lt;/b&gt;&lt;/p&gt;

</description>
      <category>computerscience</category>
      <category>handbook</category>
      <category>howto</category>
    </item>
    <item>
      <title>IsAnagram? - Quick Hack</title>
      <dc:creator>Shyam Salil</dc:creator>
      <pubDate>Wed, 17 Jun 2020 18:39:58 +0000</pubDate>
      <link>https://forem.com/shyams1993/isanagram-quick-hack-2pm0</link>
      <guid>https://forem.com/shyams1993/isanagram-quick-hack-2pm0</guid>
      <description>&lt;p&gt;Hello folks,&lt;/p&gt;

&lt;p&gt;Just sharing a quick hack to find out if two words are anagrams of each other or not.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def isAnagram(word,word2):
    return sorted(word.lower().strip().replace(" ","")) == sorted(word2.lower().replace(" ",""))
print(isAnagram("Dormitory","Dirty room"))
print(isAnagram("School master", "The classroom"))
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This function returns a boolean output based on whether they're anagrams or not. &lt;/p&gt;

&lt;p&gt;Using sorted() to compare two words in an orderly manner to check their anagrammatic property &amp;amp; it just makes things a lot easier! :)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Added the "&lt;code&gt;.lower()&lt;/code&gt;" to convert the uppercase to lowercase (if there's an upper case letter) and check since different letter cases impact the result.&lt;/li&gt;

&lt;li&gt;Also, using "&lt;code&gt;.replace(" ","")&lt;/code&gt;" to remove whitespaces.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;Code on&lt;/code&gt; -- Cheers!&lt;/p&gt;

&lt;p&gt;&lt;i&gt; Thanks to the brilliant comments, made some edits to change the logic from set() to sorted() to rule out false positives&lt;/i&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>useful</category>
      <category>quickhack</category>
    </item>
    <item>
      <title>Planguage Wiz - Google Assistant</title>
      <dc:creator>Shyam Salil</dc:creator>
      <pubDate>Wed, 17 Jun 2020 15:29:20 +0000</pubDate>
      <link>https://forem.com/shyams1993/planguage-wiz-google-assistant-4ojk</link>
      <guid>https://forem.com/shyams1993/planguage-wiz-google-assistant-4ojk</guid>
      <description>&lt;p&gt;Hello Fellow developers,&lt;/p&gt;

&lt;p&gt;I'm happy to announce that I have released a Google Assistant bot.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;h4&gt;Planguage Wiz&lt;/h4&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;What does this bot do?&lt;/b&gt; - It's designed to suggest Programming languages to beginners who have no idea what to choose. It also has links to tutorials to kick start their learning as well.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;How to use it?&lt;/b&gt;- &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install Google Assistant&lt;/li&gt;
&lt;li&gt;Type "Talk to Planguage Wiz"&lt;/li&gt;
&lt;li&gt;From there, you will have options to choose from below and you don't have to type at all (Zero typing and only clicking options after that)&lt;/li&gt;
&lt;li&gt;Alternatively, you can visit the link: &lt;a href=""&gt;https://assistant.google.com/services/a/uid/000000e32506082c?hl=en&lt;/a&gt; and push it to your device from there&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One small request, it would be very beneficial if you could visit the below link and add your reviews to the Assistant and provide your feedback as well so I can make it better and smarter with every release.&lt;br&gt;
&lt;b&gt;Your feedback matters&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Link - &lt;a href="https://assistant.google.com/services/a/uid/000000e32506082c?hl=en"&gt;https://assistant.google.com/services/a/uid/000000e32506082c?hl=en&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you for reading. Hoping to help people, one step at a time :)&lt;/p&gt;

&lt;p&gt;P.S: I will soon write an extensive post on how to develop Google Assistant bots using Dialogflow.&lt;/p&gt;

</description>
      <category>chatbot</category>
      <category>googleassistant</category>
    </item>
    <item>
      <title>Py_counter </title>
      <dc:creator>Shyam Salil</dc:creator>
      <pubDate>Mon, 08 Jun 2020 15:05:11 +0000</pubDate>
      <link>https://forem.com/shyams1993/pycounter-a7l</link>
      <guid>https://forem.com/shyams1993/pycounter-a7l</guid>
      <description>&lt;p&gt;Hello fellow developers,&lt;/p&gt;

&lt;p&gt;Taking this opportunity to let you all know that I have officially released a Python package - &lt;b&gt;py_counter&lt;/b&gt;! &lt;br&gt;WOHOOO!&lt;/p&gt;

&lt;p&gt;&lt;b&gt;What it does?&lt;/b&gt; : This package takes in a list or a tuple sequence as an argument and returns a hash map of each element with the count of its occurrences in the sequence as a key:value pair. Useful right?&lt;/p&gt;

&lt;p&gt;When I was solving coding problems like finding duplicates, finding number of duplicates, finding the recurrent characters, etc, I found myself looking for a library/package that calculated the occurrence of element in a list/tuple and returned it, thus making it easier for us.&lt;br&gt;
But I wasn't convinced with what I found.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;But then, isn't that our responsibility &amp;amp; power as a developer/programmer?&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;h3&gt;When we look for something that we need, to solve for a problem and we realize that it's not already available, WE CREATE IT.&lt;/h3&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;h4&gt;We create a solution &amp;amp; we make it available to everybody who might face the same problem.&lt;/h4&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The joy of open source!&lt;/p&gt;

&lt;p&gt;With that said, here are the details regarding installation, usage and code snippets to get started.&lt;/p&gt;

&lt;h4&gt;&lt;strong&gt;Link to the PyPi package&lt;/strong&gt;&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://pypi.org/project/py-counter/"&gt;https://pypi.org/project/py-counter/&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;&lt;strong&gt;How to install?&lt;/strong&gt;&lt;/h4&gt;

&lt;p&gt;Simply use the pip install to install the package.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install py_counter
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;or&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python -m pip install py_counter
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h4&gt;&lt;strong&gt;How to import and use?&lt;/strong&gt;&lt;/h4&gt;

&lt;p&gt;The first step is to import inside your code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import py_counter
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The next step is to instantiate the class&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;word = py_counter.py_counter() #here word is the variable object
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Then we simply use it :)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;print(word.counter([1,2,3,4,1,3,2])) #here counter() is the method/function
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;OUTPUT: {1: 2, 2: 2, 3: 2, 4: 1}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Some more examples below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;print(word.counter(["shyam"]))
Output: {'shyam': 1}

print(word.counter(["i","i","am","am","a","developer"]))
Output: {'i': 2, 'am': 2, 'a': 1, 'developer': 1}

print(word.counter("codingisamazing"))
Output: {'c': 1, 'o': 1, 'd': 1, 'i': 3, 'n': 2, 'g': 2, 's': 1, 'a': 2, 'm': 1, 'z': 1}

print(word.counter(("codingisamazing","codingisamazing")))
Output: {'codingisamazing': 2}

arr = ["code","is","code"]
print(word.counter(arr))
Output: {'code': 2, 'is': 1}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
Points to note:
&lt;li&gt;If you assign a list or a tuple to a variable and reference the variable while calling counter(), then no pointers on it! Good to go. Because the counter method takes in one argument only.&lt;/li&gt;
&lt;li&gt;So if you don't want to assign a variable, but want to check, you can print it by &lt;code&gt;print(variable.counter("amazing"))&lt;/code&gt; or, &lt;code&gt;print(variable.counter((1,2,3,4,2,1)))&lt;/code&gt;, such that the counter function has only one argument.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With that said, signing off. Hope this is useful to someone :) Please let me know via email or comments for any issues encountered with the package or for any comments/feedback on this.&lt;/p&gt;

&lt;p&gt;Thank you!&lt;/p&gt;

</description>
      <category>python</category>
      <category>tutorial</category>
      <category>howto</category>
    </item>
    <item>
      <title>Python Packaging Guide</title>
      <dc:creator>Shyam Salil</dc:creator>
      <pubDate>Sun, 07 Jun 2020 18:59:13 +0000</pubDate>
      <link>https://forem.com/shyams1993/python-packaging-guide-25i6</link>
      <guid>https://forem.com/shyams1993/python-packaging-guide-25i6</guid>
      <description>&lt;p&gt;&lt;i&gt;Long post Alert&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;Wow, this feels nice. I am finally posting my first DEV Post and it definitely feels satisfying.&lt;/p&gt;

&lt;p&gt;Now now, enough about me. Diving straight into the topic.&lt;/p&gt;

&lt;p&gt;What's so special about Open Source? Capabilities? NO. Usage? NO. (Maybe but not the point). The answer is &lt;b&gt;Contribution&lt;/b&gt;. What makes Open source so great is that, anybody can contribute to the Open Source community. When one developer can create magic, imagine what can happen when all of the best come together to create magic.&lt;br&gt;
So this post is going to be an extensive guide to package a Python code and to distribute it to PyPi - The official &lt;b&gt;Py&lt;/b&gt;thon &lt;b&gt;P&lt;/b&gt;ackage &lt;b&gt;i&lt;/b&gt;ndex. When I first started to learn to code in Python, I found the urge to contribute to the Open Source community.. The feeling of wanting to give back it back to the community. All done and said, the feeling was a great point to start - but was that enough? Definitely no. I had a great difficulty in finding the right guide that taught me how to package, from the very basics. No offense to the other guides that proved super helpful, but I had to aggregate knowledge from various sources and I finally learnt how to do it. That's what drove me to write this post - So that, nobody has to ever search through multiple guides and feel disheartened/lost.&lt;/p&gt;

&lt;p&gt;Now, starting with the &lt;b&gt;A&lt;/b&gt; until the &lt;b&gt;Z&lt;/b&gt; of the packaging process.&lt;br&gt;
&lt;b&gt; What is a package?&lt;/b&gt; - A package is mainly the Python code file. The ".py" file. It's called a package because we create a folder and place the .py file inside it and thus the folder is called a Package.&lt;br&gt;
Super simple, right? . Yes, the rest is going to be easy to follow through as well.&lt;/p&gt;

&lt;p&gt;&lt;b&gt; What is PyPi?&lt;/b&gt; - The full form of PyPi is Python Packaging index. When we install a package/library using pip install command, PyPi is the repository that supplies the package. In short, it's a massive library that houses all the packages contributed by amazing developers like all of you and when someone installs using pip install command, it straight away downloads the files uploaded by you (the zipped file) and install it for you, so you can simply call it by "import packagename" in your code and utilise it.&lt;/p&gt;

&lt;p&gt;&lt;b&gt; Is the code file the only file that's needed? &lt;/b&gt; - No. The code file is obviously the most important file, but there are other supporting files that are required and I'm going to outline them following this.&lt;/p&gt;

&lt;p&gt;Now, every package requires the below files at the minimum:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The .py python code file&lt;/li&gt;
&lt;li&gt;The setup.py code file&lt;/li&gt;
&lt;li&gt;The __init__.py code file&lt;/li&gt;
&lt;li&gt;The setup.cfg file&lt;/li&gt;
&lt;li&gt;The README.MD file&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Optional: (But very good to follow a disciplined way of uploading)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The License File&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, let's learn how to package a python file, together. Start with opening your favorite editor: Either VSCode or Sublime Text or Atom. Mine's VSCode :).&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;h3&gt;The folder and the .py file&lt;/h3&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;First, the most important thing is to create a folder that's named exactly how you want to name your package. Let's say, you want to package a hello-world code; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start with creating a folder called "Helloworld".&lt;b&gt;NOTE: Before you name your package, search for it on https:pypi.org and ensure it's not already available &amp;amp; pick a unique name&lt;/b&gt;
&lt;/li&gt; 
&lt;li&gt;Then, enter the folder and create the .py file as Helloworld.py&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is how the code file should look like; (Note: The files should have a class and a method)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Helloworld(): #This needs to be the same as your package name
    def __init__(self): #this is the constructor for the class.
        return None
    def sayHello(self): #this is the method that you would call
        return "Hello World"
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
Points to note in the Python code:
&lt;li&gt;Make sure the code has no print statements except what you want to "return" to the user (See what I did there? Use the return statement to print the final output to the user)&lt;/li&gt;
&lt;li&gt;You have to have a class, and a method inside to call&lt;/li&gt;
&lt;li&gt;Use comments or docstrings if needed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;b&gt;&lt;h3&gt;The setup.py file&lt;/h3&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Now, the code file (the most important part is over).&lt;br&gt;
The next file is, the setup.py file and here is the code for that (based on the Hello World example)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import io
import os
import sys
import setuptools
from setuptools import find_packages, setup, Command

with open("README.md", "r") as fh:
    long_description = fh.read()

setup(
  name = 'Helloworld', 
  packages = ['Helloworld'], 
  version = '1.0',
  license='MIT',
  description = "Python library that says Hello World when called.", 
  long_description=long_description,
  long_description_content_type="text/markdown",
  author = 'XXX',
  author_email = 'xxx@gmail.com',
  url = 'https://github.com/xxx/Helloworld', 
  py_modules=['mypackage'],
  entry_points={'console_scripts': ['mycli=mymodule:cli'],},
  keywords = ['Simple'],
  classifiers=[
    'Development Status :: 4 - Beta',
    'Intended Audience :: Developers',
    'Topic :: Software Development :: Build Tools',
    'License :: OSI Approved :: MIT License',
    'Programming Language :: Python :: 3.4',  
    'Programming Language :: Python :: 3.5',
    'Programming Language :: Python :: 3.6'
  ],
  python_requires='&amp;gt;=3.1',
)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;br&gt;Explanation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;name specifies the code file/folder name&lt;/li&gt;
&lt;li&gt;package specifies the same as above within square braces&lt;/li&gt;
&lt;li&gt;version specifies the version you want to start with; good to start with v1.0&lt;/li&gt;
&lt;li&gt;description is a description of your library and what it does&lt;/li&gt;
&lt;li&gt;long description specifies it to open long description (the readme typically)&lt;/li&gt;
&lt;li&gt;long description content type specifies it to use README.md file&lt;/li&gt;
&lt;li&gt;Author - Yup, that's you! Look at yourself - You're an author now ;)&lt;/li&gt;
&lt;li&gt;Author email - Give in your email so people can reach out to you for any doubts&lt;/li&gt;
&lt;li&gt;url - will get to this later but xxx = your github user name followed by your package name&lt;/li&gt;
&lt;li&gt;pymodules - leave it as mypackage&lt;/li&gt;
&lt;li&gt;entry points - leave it as it is&lt;/li&gt;
&lt;li&gt;keywords - Specify in a couple of words that describe your package&lt;/li&gt;
&lt;li&gt;classifiers - Good to start Development status as 3-Alpha or 4-Beta and then scale it as your library grows&lt;/li&gt;
&lt;li&gt;You can leave the rest as it is unless your programming language version is different and license is different&lt;/li&gt;
&lt;li&gt;python_requires - Finally, you specify here the version it's built on and the version it will run on(The same) use &amp;gt;=3.x&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;b&gt;&lt;h3&gt;The &lt;code&gt;__init__.py&lt;/code&gt; file&lt;/h3&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Now, on to the next file - The &lt;code&gt;__init__.py&lt;/code&gt; file&lt;/p&gt;

&lt;p&gt;Just import your class name in this file &amp;amp; that's all.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from Helloworld.Helloworld import Helloworld
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;This means that, from foldername.filename import classname&lt;/code&gt;&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;h3&gt;The setup.cfg file&lt;/h3&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Next, it's the setup.cfg file. Create a blank file inside the same folder and save it as setup.cfg (where cfg indicates configuration). Here's what the setup.cfg will contain:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[metadata]
description-file = README.md
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Done!&lt;/p&gt;

&lt;p&gt;Now, we're almost there. Next is the README.MD file.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;h3&gt;The README.MD file&lt;/h3&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Here, you can choose to create and edit it yourself or do it via websites that help you.&lt;/p&gt;

&lt;p&gt;If you choose to create it yourself, create a blank file in your editor and name it README.MD (md refers to markdown format)&lt;/p&gt;

&lt;p&gt;You can just input:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#Helloworld
Python library that says Hello World when called
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;It can be as simple as it is. But I'd suggest that you include HTML Tags and add installation options, syntax and an example code of how to use. Well, anybody'd know how to use Helloworld :) But I'm pretty sure your packages are going to be a bit more complex than just a Helloworld.&lt;/p&gt;

&lt;p&gt;To use it from a Website, you can refer to &lt;a href="https://www.makeareadme.com/"&gt;https://www.makeareadme.com/&lt;/a&gt; which has predefined templates and etc.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;h3&gt;The LICENSE.txt file&lt;/h3&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Finally, the optional LICENSE.txt file which is just a simple text file. You can use various open source licenses like MIT's, GNU's etc. I personally prefer going with MIT's. But you can choose it based on your need at - &lt;a href="https://choosealicense.com/"&gt;https://choosealicense.com/&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Getting to the github URL, open a github repository with exactly the same name as the package name and upload all the files into it; Copy all the files into it and mention the repository URL in the setup.py url field. You're now done with all the files.&lt;/p&gt;

&lt;p&gt;Now, you have all the 6 files namely:&lt;/p&gt;

&lt;p&gt;setup.py&lt;br&gt;
README.MD&lt;br&gt;
Helloworld (Folder)&lt;br&gt;
||-- &lt;code&gt;Helloworld.py&lt;/code&gt; (inside the folder)&lt;br&gt;
||-- &lt;code&gt;setup.cfg&lt;/code&gt; (inside the folder)&lt;br&gt;
||-- &lt;code&gt;LICENSE.txt&lt;/code&gt; (inside the folder)&lt;br&gt;
||-- &lt;code&gt;__init__.py&lt;/code&gt; (inside the folder)&lt;/p&gt;

&lt;p&gt;&lt;b&gt; NOTE:&lt;/b&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Helloworld.py, setup.cfg, LICENSE.txt &amp;amp; __init__.py needs to be inside the Helloworld folder.&lt;/li&gt;
&lt;li&gt;setup.py and README.MD needs to be outside the folder (the main parent folder).&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;b&gt;&lt;h3&gt;The PyPi Account setup&lt;/h3&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Quick note, before we upload the package, you need to have a pypi account.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to https://pypi.org&lt;/li&gt;
&lt;li&gt;Create an account&lt;/li&gt;
&lt;li&gt;Remember your account username and password once you have created because we will need them to upload the package&lt;/li&gt;
&lt;li&gt;Also install twine (a python utility) that will help us upload our package&lt;/li&gt;
&lt;li&gt; Install twine using &lt;code&gt;pip install twine&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt; TIME TO UPLOAD YOUR PACKAGE!!!! &lt;/h4&gt;

&lt;p&gt;&lt;b&gt;&lt;h3&gt;The Upload Process &lt;/h3&gt;&lt;/b&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;First, open your command prompt and navigate to the main folder that has setup.py, README file and the package folder using cd folderpath&lt;/li&gt;
&lt;li&gt;Type in &lt;code&gt;setup.py sdist&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;You will receive a message saying the distribution has been created and everything under package name has been deleted !! (DON'T WORRY; You're in the right direction&lt;/li&gt;
&lt;li&gt;Now your distribution would have been created in the parent folder under a folder named "dist" as "Helloworld-1.0.tar.gz"&lt;/li&gt;
&lt;li&gt;Get back to the command prompt and type in &lt;code&gt;twine upload dist/Helloworld-1.0.tar.gz&lt;/code&gt; and hit enter&lt;/li&gt;
&lt;li&gt;You will be asked for your pypi username and password&lt;/li&gt;
&lt;li&gt;Enter them AAAAAAAAAAAAND YOU'RE DONE&lt;/li&gt;
&lt;h4&gt;YOUR PACKAGE IS NOW OFFICIALLY AVAILABLE ON THE INTERNET&lt;/h4&gt;
&lt;/ol&gt;

&lt;p&gt;Clap for yourself :) You deserve it!&lt;/p&gt;

&lt;p&gt;To check if your package works, open a blank python file, and type &lt;br&gt;&lt;code&gt;import Helloworld&lt;/code&gt; and run the file.&lt;br&gt;
No errors? You have done it! Congrats!&lt;/p&gt;

&lt;p&gt;Thank you for listening through! Now go ahead and contribute to the open source society!!!!&lt;/p&gt;

&lt;p&gt;Let me know your feedback :)&lt;/p&gt;

</description>
      <category>python</category>
      <category>packaging</category>
      <category>pypi</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
