<?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: Pratik Mishra</title>
    <description>The latest articles on DEV Community by Pratik Mishra (@pratik6217).</description>
    <link>https://dev.to/pratik6217</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%2F575759%2F8d82f633-acbd-4e8b-af75-b140ab46f061.jpg</url>
      <title>DEV Community: Pratik Mishra</title>
      <link>https://dev.to/pratik6217</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pratik6217"/>
    <language>en</language>
    <item>
      <title>Docker - Containers &amp; Images.</title>
      <dc:creator>Pratik Mishra</dc:creator>
      <pubDate>Tue, 20 Apr 2021 06:24:45 +0000</pubDate>
      <link>https://dev.to/pratik6217/docker-containers-images-43jc</link>
      <guid>https://dev.to/pratik6217/docker-containers-images-43jc</guid>
      <description>&lt;p&gt;Let's move on with our Docker series but before that if you haven't read the previous 2 articles then please go and give them a read I assure you that you'll like it.&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="/pratik6217" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RQeupSAJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--Z_BAKq-N--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/575759/8d82f633-acbd-4e8b-af75-b140ab46f061.jpg" alt="pratik6217"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/pratik6217/docker-basic-introduction-3b2b" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Docker - Basic Introduction.&lt;/h2&gt;
      &lt;h3&gt;Pratik Mishra ・ Apr 15 '21 ・ 3 min read&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#docker&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#devops&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#career&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#beginners&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;
 &lt;div class="ltag__link"&gt;
  &lt;a href="/pratik6217" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RQeupSAJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--Z_BAKq-N--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/575759/8d82f633-acbd-4e8b-af75-b140ab46f061.jpg" alt="pratik6217"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/pratik6217/docker-engine-deep-dive-into-docker-4hig" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Docker Engine - Deep Dive into Docker.&lt;/h2&gt;
      &lt;h3&gt;Pratik Mishra ・ Apr 15 '21 ・ 5 min read&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#docker&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#dockerengine&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#dockerdeepdive&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#coreconcepts&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;Okay, Now let's talk about Images First, like what are Docker Images?&lt;br&gt;
Images are nothing but a prototype for your application with all the dependancies and other stuff defined inside it.In short you can think of Images as a Class and a container as an object of that class. &lt;br&gt;
You can check out various pre-built images on Docker Hub.&lt;br&gt;
Docker Hub is a Docker Registry where you can upload and Download Images from. Note: Only the official Images can be found directly on Docker Hub but what if you want to get Images from some other trusted user(Please only download Official Images or from a user you trust you don't want to create problems for your machine) then you can find their Images here: Organization/repository/Image:tag like docker.io/pratik6217/covid-webapp:latest. This is my repository on Docker Hub).&lt;br&gt;
Now, as I said Earlier in the previous posts that Dockerfile contain Intructions to build your Docker Image. so let's see some of the instructions right now:&lt;br&gt;
Here is a simple Dockerfile:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# The base os Image for our application.
FROM ubuntu:latest

# Updating all it's packages.
RUN apt-get update &amp;amp;&amp;amp; apt-get upgrade
RUN apt-get install python3 &amp;amp;&amp;amp; apt-get install python3-pip

# Making a directory in the container for our project files.
RUN mkdir project
# Copying the files over from our machine on to the container.
COPY ./project:./project
# Setting the working directory to our projects directory.
WORKDIR ./project

# Installing Python requirments (modules) used.
RUN pip3 install -r requirements.txt

EXPOSE 8501
CMD streamlit run test.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Let's break it down what exactly is happening here, first we always need a base os Image for our application on which our application sits.(These are lightweight os Images unlike VM's which only contain the necessary files which makes them to boot very quickly).&lt;br&gt;
So first we mention which base Image we are going to use using the FROM keyword.&lt;br&gt;
Next is the RUN instructions it is used to Run commands in the base Images bash(shell) to update it and get it ready for our use.&lt;br&gt;
Next, we installed python3 and pip since I am deploying a python based app. As I said docker packs in all the required files and dependencies, so we copy all our project files from our local machine to the container.&lt;br&gt;
Next, I have exposed port 8501 of the docker container as streamlit uses that port.&lt;br&gt;
Then the final part is defining the entrypoint for your application so as you run your container the application will start running.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AzbifwTX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kt6jsjn7idp8dzzzwcwz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AzbifwTX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kt6jsjn7idp8dzzzwcwz.png" alt="Alt Text" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, let's build this Image:&lt;br&gt;
The syntax for building Images is as follows:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# You can either use docker image build or docker build they are one and the same.
# docker build-keyword tag-name and then the loaction where the Dockerfile is.
docker build -t qrcode:latest .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="ltag_asciinema"&gt;
  
&lt;/div&gt;

&lt;p&gt;As you can see from the above video our Image was successfully compiled and we are ready to start a container from it.&lt;br&gt;&lt;br&gt;
But before doing that let's analyse what happened when we ran docker build command as we saw when we ran this command docker daemon was called and it started building each stage one by one by stage I mean whenever you run commands in your docker file docker spins up a temporary container from it and runs your commands within that container and upon finishing that task it exits and saves the committed changes. Now Images are not a single file it consists of several layers within it which are lossely connected in the correct order using a manifest ( manifest is nothing but it consists of the metadata as well as a list of all the layers and the order in which they need to be stacked ).&lt;br&gt;&lt;br&gt;
Also you might have noticed that I used -t flag along with the build command it is nothing but used to specify a tag(name) to your image.&lt;/p&gt;

&lt;p&gt;Now, lets run our built Image:&lt;br&gt;
The syntax for running a container is as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# You can either use docker container run or docker run they are one and the same command.
# docker run-keyword tags and at last the name of the image.
docker run -i -t -p 8501:8501 --name qrcode qrcode:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="ltag_asciinema"&gt;
  
&lt;/div&gt;

&lt;p&gt;As we can see I easily started a container from the built Image within seconds also note that I used several tags with the docker run command let's understand those one by one.&lt;br&gt;&lt;br&gt;
-i flag: It is used to specify that we want our container to be interactive that we want to see the output of our docker container on our local terminal. So docker basically links the containers terminal with your local terminal. It stands for Interactive.&lt;br&gt;&lt;br&gt;
-t flag: Docker in it's self doesn't provide terminal to it's containers now if you wish to give a terminal to your docker container (reasons can be many for this say you want to change certain things in your container so you easily do those using the containers terminal) you can use this flag. It stands for Pseudo Terminal. &lt;br&gt;&lt;br&gt;
-p flag: This flag is used to publish the ports on the container and link those ports of our docker container with the ports of our local machine. See in the video above I have linked port 8501 of my docker container to port 8501 of my local machine. (always remember the port on the left is your local machine's port and the one on the right is the port of your docker container&lt;br&gt;&lt;br&gt;
-p (local machine -&amp;gt; )8501:8501(&amp;lt;- Docker container))&lt;br&gt;&lt;br&gt;
--name flag: is used to name your container if not mentioned docker will give it some random name.&lt;/p&gt;

&lt;p&gt;So, that's it here's how you can create your own Images and run Containers from them.I know I have'nt covered each and every command and the reason is I myself don't know each and every command and you don't need to know it either it's just that whenever you are about to use these commands for your use case you can just look them up on &lt;a href="https://docs.docker.com/engine/reference/builder/"&gt;docker's official website&lt;/a&gt;.  I know it must be difficult to grasp all of these in the first time and I totally Understand that as it took me a lot of time to get used to all of these just practise all of these and one day all this will be a piece of cake for you :)&lt;/p&gt;

</description>
      <category>docker</category>
      <category>devops</category>
      <category>beginners</category>
      <category>computerscience</category>
    </item>
    <item>
      <title>Python - Read and Generate Qrcodes Under 10 Lines.</title>
      <dc:creator>Pratik Mishra</dc:creator>
      <pubDate>Fri, 16 Apr 2021 15:34:14 +0000</pubDate>
      <link>https://dev.to/pratik6217/python-qrcode-generator-125k</link>
      <guid>https://dev.to/pratik6217/python-qrcode-generator-125k</guid>
      <description>&lt;p&gt;Let's make a Qrcode Generator and reader in Python.&lt;br&gt;
First Install all the dependencies, we'll be using qrcode module for generatin the qrcode and Pillow library as it used by qrcode.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install qrcode pillow
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;First create a folder for your project as in this way all of your things will be properly organised.&lt;br&gt;
Now inside your folder create a python file and name it anything you want to I have named mine as "main.py"&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%2F7udkt00uia32w2jclwvz.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%2F7udkt00uia32w2jclwvz.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now let's begin with coding, First import all the required modules:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import qrcode
from PIL import Image
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now create a variable to take input from the user:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;text = input('Please enter a text:')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;since we have the text ready to be encoded let's create a qrcode from the text:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;encoded_text = qrcode.make(text)
# You can name your file to anything you like here in the save method.
encoded_text.save('./qrcode.png')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fff81ajs8orkz8khs58sw.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%2Fff81ajs8orkz8khs58sw.png" alt="Alt Text"&gt;&lt;/a&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%2Fox072ofzcmsen7xkl176.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%2Fox072ofzcmsen7xkl176.png" alt="Alt Text"&gt;&lt;/a&gt;&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%2Fw88eo1v293mzsbovwz2g.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%2Fw88eo1v293mzsbovwz2g.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And there you go you have a your own qrcode ready in just under 10 line of python code.&lt;/p&gt;

&lt;p&gt;Now, Let's decode a qrcode in python.&lt;br&gt;
Install the required modules:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install pyzbar
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Import all the required modules:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from pyzbar.pyzbar import decode
from PIL import Image
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now let's write the remaining code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#Open your Image in Python using Pillow's Image.open() method.
img = Image.open('./qrcode.png') 
decoded_img = decode(img)

print(decoded_img[0][0].decode())
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fnzac5ghnrhiqhzm0vakw.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%2Fnzac5ghnrhiqhzm0vakw.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's it Now you can create your own qrcodes as well as decode them in Python :)&lt;/p&gt;

</description>
      <category>python</category>
      <category>automation</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Linux - New Beginnings.</title>
      <dc:creator>Pratik Mishra</dc:creator>
      <pubDate>Fri, 16 Apr 2021 07:07:04 +0000</pubDate>
      <link>https://dev.to/pratik6217/linux-new-beginnings-58c8</link>
      <guid>https://dev.to/pratik6217/linux-new-beginnings-58c8</guid>
      <description>&lt;p&gt;Let's learn Linux together. I would like to answer all of your questions regarding why to learn linux and all that stuff.&lt;/p&gt;

&lt;p&gt;so, what are we waiting for let's begin.&lt;br&gt;
Before beginning with anything I would just like to clearify that linux is not an operating system rather it is a Kernel.&lt;br&gt;
The operating systems that are based on linux kernel are known as Linux based Operating systems. Just like we generalized "xerox" for photocopy in the same way "Linux" was generalised to be an Operating system due to its popularity but it's not an operating system it's a Kernel. &lt;/p&gt;

&lt;p&gt;Why Linux ??&lt;br&gt;
This is the most famous question asked by everyone like why do we need to learn linux if we have windows in the first place. There are a lot of reasons why linux is far better than windows and we will cover each one of them today.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hGT02jfI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/obfokdsnbm1n4d1qnclk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hGT02jfI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/obfokdsnbm1n4d1qnclk.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
First and the most important one, Linux is open source and it's code is freely available for everyone to go through and change it according to their preferences and infact you can build your own Operating system based on Linux Kernel. Being Open source you can just simply change things which you don't like in it and tweak it according to your needs and requirements like we have kali linux which is the best os for hacking as it packs in all the necessary and required stuff for hacking all in one place and pre configured for you to just use them out of the box. But what is all this a beginner would'nt do all of these stuff like what am I even talking about I cannot expect a beginner to build an Operating system and I am not expecting you to do so I am just mentioning how good linux is and who knows in the future after learning and getting to know about it you might end up creating one.&lt;/p&gt;

&lt;p&gt;Okay, so let's begin,&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8CNCZQIw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zo31gpui39h82n0syzof.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8CNCZQIw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zo31gpui39h82n0syzof.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Linux is one of the most secure Operating systems out there far better than windows. I agree in the earlier versions there were kernel vulnerabilities but all of those are now fixed. I mean you can look at it's source code if you would like to and check it for yourself what data is it collecting from you or what data is it accessing on your machines unlike windows or other os which are not open sourced we don't even know what data they are actually collecting from us. Now, for many of you that may not be a big deal as not everyone has sensitive data on their machines afterall but don't worry I have other reasons too.&lt;/p&gt;

&lt;p&gt;Linux is less vulnerable to malwares as compared to other operating systems. Most of the Programs/Applications that we use are First built for Linux and then ported to other Operating systems.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9R1dGXZf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dwagwp3fx2cvqxsscj0b.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9R1dGXZf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dwagwp3fx2cvqxsscj0b.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Linux is way powerfull as compared to the rest of them and you can do a lot of stuff on linux freely which would be restricted or sometimes not even available on other operating systems.&lt;/p&gt;

&lt;p&gt;It is most widely used Operating system on this planet. What, you don't believe me, feel free to consult your friend Google and have a look and why is it so ? Most of the servers we use are Linux Based Servers, IOT devices use Linux, the most famous android operating system is built on top of Linux Kernel which makes it the most installed Operating system worldwide.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Iwewfvag--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n3qpksvaen8gcuolso60.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Iwewfvag--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n3qpksvaen8gcuolso60.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
You have much more control over Linux and all the stuff that we do can done from a terminal. Yeah I know using a terminal may not be easy for users swithing from windows but once you are comfortable with it it's game over. You can literally do anything from a single terminal from openeing your files, installing/uninstalling Programs, accessing remote computers I mean everything. Also the benefits of using a terminal include it is way faster than your normal GUI and much quicker and also you can perform certain tasks which not possible in a GUI application.&lt;/p&gt;

&lt;p&gt;Linux is the standard Operating systems that most of the companies use nowadays because of it's rich features, security, Open Source.......&lt;/p&gt;

&lt;p&gt;So, what are you even waiting for start using Linux you'll love it !!&lt;/p&gt;

</description>
      <category>linux</category>
      <category>beginners</category>
      <category>bash</category>
      <category>learn</category>
    </item>
    <item>
      <title>Docker Engine - Deep Dive into Docker.</title>
      <dc:creator>Pratik Mishra</dc:creator>
      <pubDate>Thu, 15 Apr 2021 09:40:22 +0000</pubDate>
      <link>https://dev.to/pratik6217/docker-engine-deep-dive-into-docker-4hig</link>
      <guid>https://dev.to/pratik6217/docker-engine-deep-dive-into-docker-4hig</guid>
      <description>&lt;p&gt;In my previous post I gave an Overview about Docker if you haven't read that then stop whatever you are doing right now and go have a look at the previous post I guarantee you won't regret it.&lt;br&gt;
Here is a link to my previous post:&lt;br&gt;
&lt;a href="https://dev.to/pratik6217/docker-basic-introduction-3b2b"&gt;Docker - Basic Introduction&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, let's Move on with our topic but wait before going to the engine itself I would like to clear some of the terminologies first that are used in Docker Engine.&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%2Fwniavj37cpvw4qrosgff.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%2Fwniavj37cpvw4qrosgff.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Linux Namespaces: This is nothing new and has been in Linux for years now. &lt;em&gt;Then, what is this namespace and how it is used in Docker??&lt;/em&gt;&lt;br&gt;
Namespaces are basically used to provide isolation to our containers. It limits the access to resouces for our container. Like a single Docker Engine can have multiple Docker Containers running on it and all of these containers are completely isolated from one another. Each Container thinks that it is the only container running on the host. If you ask a container about the other containers it will be confused as it thinks it is the only container running on this host and doesn't know anything about the other containers because containers are completely isolated.&lt;br&gt;
Even now if you didn't get it then think of it in this way namespaces basically restrict your permissions like it restricts how much amount of data you can view/modify/edit or delete. Also the processes running within a container are completely isolated from those services running on the host machine.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Control Groups : As from the name itself you can guess that this is something used to control stuff and your guess is right. Control Groups are basically used to limit the amount of resouces( CPU,Memeory, Networking.....) that a container can use like we don't want a single container taking up all of the underlying OS resources and leaving none for the other containers or processes of the Host machine.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Daemons: ooh they sound like evil monsters don't worry they are not something that your are thinking of. Daemons in computers are basically software/processes that run in background without intervening the user and performing certain tasks periodiaclly or in response to certain commands. They are basically processes that run in background and perform tasks for us.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Shim : Shims are nothing but programs that let newer API's to work on older hardware and older API's to work on newer hardware. It basically intercepts API calls and makes them compatible to use.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;OCI : Open Conatiner Initiative started by GNU which gives an industry standards specifications for creating and running containers.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So in short Namespace are used for isolating and control groups are used to control the resouces being allocated to a container.&lt;/p&gt;

&lt;p&gt;Now these things getting out of our way let's move further with the Docker Engine. But before we do that I just want to bring an important point to your notice which I missed Earlier, A Docker engine set up on a particular OS can run only those types of containers. Now what do I mean by that, it basically means that if I am running docker on top of Linux I will only be able run Linux Based Containers and not windows or Mac Based Containers but things are a little bit different on Windows since we got virtualisation support in windows 10 and with the use of wsl (windows subsystem for Linux) we can easily run linux on top of our native windows (if you want to know more about wsl or how did they achieved it then feel free to google about it.) So in windows you can literally run windows as well as linux based containers.&lt;/p&gt;

&lt;p&gt;ooh that was a lot to digest but just bare with me all this will help you in understanding the core of Docker.&lt;/p&gt;

&lt;p&gt;Docker Engine :&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%2F3i7it33471d9p1scj0cu.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%2F3i7it33471d9p1scj0cu.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So now let's see how docker works under the hood.&lt;br&gt;
First we have client that is us the end users whenever we type in commands in the CLI for docker, docker daemon get's activated remember what I said about daemons they run in background and responsd to certain commands or execute commands periodically. Now docker uses REST API to send commands to the docker daemon and in turn docker daeomon asks containerd. Now what is containerd - It is an industry standards runtime for containers. It's main responsibility is to maintain the container's lifecycle. (create/update/stop/restart or delete) Now how does containerd start a container it asks runc to do it. Now what is runc - It is nothing but runtime specification given by OCI (remembers OCI) for running containers.&lt;/p&gt;

&lt;p&gt;Containerd basically communicates with the underlying kernel inorder to create containers using Liunx Namespaces and Control Groups as discussed earlier.&lt;br&gt;
Just a point to be noted Runc is initialised when we need to create a container and after the creation of that container runc exits and only shim remains throughout the lifecycle of the container. &lt;/p&gt;

&lt;p&gt;Think of it in this way, we send commands to docker daemon through the CLI(REST API) then the daemon asks containerd and if something needs to be created or updated it asks runc to co-ordinate with the kernel and complete the tasks assigned like creating a container.&lt;/p&gt;

&lt;p&gt;Also, somethings are different in case of windows docker engine, in windows we don't have containerd or runc instead we have compute services which is microsoft's equivalence to containerd and does the same job as that of containerd. Also windows provides additional isolation methods as compared to linux known as hyperv isolation as I explained earlier we now have wsl in windows that means whenever we need to run linux containers on windows it fires up a lightweight vm in the background on top of which we run our docker engine and are able to run linux based containers on windows.&lt;br&gt;
Also if you are wondering why we have different engines for each Operating Systems you see docker is unlike a Virtual machine it uses the hosts kernel and a windows Kernel is completely different than that of Linux Or Mac's Kernel.&lt;/p&gt;

&lt;p&gt;So that was it for Docker Engine, I hope by now you are familiar with the docker engine and are aware of how docker works under the hood.&lt;/p&gt;

&lt;p&gt;The next blogs will be on Containers, Images and Docker Hub and then we'll apply all of these concepts to make our first docker image and start a container from it so stay tuned for that :)&lt;/p&gt;

</description>
      <category>docker</category>
      <category>dockerengine</category>
      <category>dockerdeepdive</category>
      <category>coreconcepts</category>
    </item>
    <item>
      <title>Docker - Basic Introduction.</title>
      <dc:creator>Pratik Mishra</dc:creator>
      <pubDate>Thu, 15 Apr 2021 05:35:39 +0000</pubDate>
      <link>https://dev.to/pratik6217/docker-basic-introduction-3b2b</link>
      <guid>https://dev.to/pratik6217/docker-basic-introduction-3b2b</guid>
      <description>&lt;p&gt;Docker we have been hearing this buzzword for quiet a while now. Everyone is talking about docker so today let's unfold what docker is and get familiar with the basics of docker and I can guarantee that after getting to know about docker you'll never look behind.&lt;/p&gt;

&lt;p&gt;So, &lt;em&gt;What is Docker ??&lt;/em&gt;&lt;br&gt;
The answer is pretty simple docker is a containerization  service that helps you build, pack and ship your applications in a Container.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Containers ?? what is this, are we shipping containers in computers ??&lt;/strong&gt;&lt;br&gt;
As we know when we develop applicatons this application has certain dependencies inorder to function. Now when we send this application to our co-worker or friend who is working on the same project too, chances are that when your friend or co-worker runs this software it might not run and give some random errors or maybe they'll need to download and setup all of the dependencies before running the application. Now, why does this happen ?? maybe the version that you used to develop the application will not match on your friend's machine or he/she may not have all the dependencies installed in their machine for running your program or maybe the versions don't match, there can be a number of reasons why our program may not run on their machine and they'll need to spend hours to solve all the problems or to setup the development environment. This is where docker containers come into picture you can think of containers as a complete package for your application which bundles all of the dependencies/requirements into a single box known as a container. If that container runs on your machine it will definately run on every machine that has docker in it and your problem of "It runs on my machine" is solved permanently.&lt;/p&gt;

&lt;p&gt;Now, let's look at the &lt;em&gt;Docker Architecture&lt;/em&gt; and also let's differentiate docker from virtual machines as both go hand in hand and many people cannot differentiate both of them.&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%2Frhkpc9e68z2zv9yb8yvv.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%2Frhkpc9e68z2zv9yb8yvv.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
So, as we can see from the above figure docker engine sits on the host operating system and docker containers are deployed on top of the engine. This implies that docker uses the underlying host's Kernel ( using Namespaces and Control Groups - These are advanced topics and I don't want you'll to get overwhelmed with all these topics all at once I will make a seperate blog for these topics) to maintain the containers lifecycle and this is the reason why docker containers load up much quicker as compared to a VM.&lt;br&gt;
In case of a VM we have something known as a Hypervisor which virtualises hardware resources for each virtual machine. Each Machine has it's own full fledged Operating System and their own Kernel. When you boot up a Virtual Machine it's boots up a heavy OS all from scratch and that is the reason it takes time inorder to boot. &lt;br&gt;
In case of Docker if you see it uses the hosts kernel so when you spin up a container it doesn't needs to boot an entire os from scratch as it uses the hosts Operating Systems Resources. You can think of it in this way Instead of Virtualising Hardware Resources Docker Virtualises Hosts Operating System's Resources.&lt;/p&gt;

&lt;p&gt;Using Docker You can literally start a Container within seconds. Also these Containers are basically a running instance of a Docker Image.&lt;/p&gt;

&lt;p&gt;Now, What is this Docker Image ??&lt;br&gt;
Images are basically a prototype for our containers you can think of images as a class and containers as object of that class. So in short Containers are an instance of an image. We first create a docker image from a Dockerfile ( Dockerfile is nothing but instructions to compile a docker image ) and if that build is successful we can spin  up n number of containers from that image. &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%2Fv2a3wfxnkvm9ooz0shv0.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%2Fv2a3wfxnkvm9ooz0shv0.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see we first make a Dockerfile( instructions ) then build an image from that Dockerfile and finally start containers from that Docker Image.&lt;/p&gt;

&lt;p&gt;Till now we saw that what is docker, containers, Dockerfile and Docker Images and basically how is Docker Different from a Virtual Machine. &lt;br&gt;
This was just a Basic Overview of all the stuff in the upcoming blogs we'll deep dive into each of these components and have a look into the docker Engine like how everything is Being done under the hood and get a firm grip on docker so stay tuned for that. &lt;/p&gt;

&lt;p&gt;I hope you got an overview of Docker and ready to dive in deep into Docker :)&lt;/p&gt;

&lt;p&gt;Next Step,&lt;br&gt;
&lt;a href="https://dev.to/pratik6217/docker-engine-deep-dive-into-docker-4hig"&gt;Docker Engine - Deep Dive into Docker&lt;/a&gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>devops</category>
      <category>career</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Notepad Clone in Python.</title>
      <dc:creator>Pratik Mishra</dc:creator>
      <pubDate>Wed, 24 Mar 2021 10:46:19 +0000</pubDate>
      <link>https://dev.to/pratik6217/notepad-clone-in-python-2k0o</link>
      <guid>https://dev.to/pratik6217/notepad-clone-in-python-2k0o</guid>
      <description>&lt;p&gt;Today Let's see how you can build your own notepad in Python using the Tkinter Module and later we'll even convert this program into a .exe executable so that we run it as an application and do not need to run it again and again from the terminal or an ide.&lt;/p&gt;

&lt;p&gt;Let's begin, First import all the necessary modules as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from tkinter import *
from tkinter.filedialog import asksaveasfilename, askopenfilename
from tkinter.messagebox import *
import os
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;For now import all these modules as we'll be needing them later in this article.&lt;br&gt;
The tkinter module has all the necessary modules and methods required pre made and ready to use. This is something I like about coding in Python you have a library for each and everything which speeds up the development a lot.&lt;/p&gt;

&lt;p&gt;Let's first see how to make a simple window in Tkinter:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Creating a window for our application.
window = Tk()

window.mainloop()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Just run this code You'll get something like this:&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%2Fswyaumoerdlqzb5zpcdy.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%2Fswyaumoerdlqzb5zpcdy.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is a simple window in tkinter you can play around it and if you are new to tkinter you can change somethings try running the code without the mainloop() and see what happens.&lt;/p&gt;

&lt;p&gt;Did nothing appear on your screen ? This is because when we are running a gui we want our application to run infinitely and perform certain tasks until the window is manually closed or exited.&lt;/p&gt;

&lt;p&gt;Now this is simple plain window let's start tweaking it a bit according to our preferances.&lt;br&gt;
You can change the title of you window easily by using window.title() as follows:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Defining the title of our Window.
window.title('Notepad')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Now the next thing that we need is a Text Box in which we can type something otherwise what's the use of our text editor !!&lt;/p&gt;

&lt;p&gt;You can simply create a Text as follows:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Creating a variable for the text inputs so that later on we can retrieve the data from it.
editor = Text()
# Now You need to place this input Text box on your window.
editor.pack(expand= True, fill= 'both')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The expand argument is set to True and we are filling the text box widget in both the directions i.e horizontally as well as vertically. This is done because We want our text input widget to span the entire window so when we minize or maximize or resize our window it scales accordingly.&lt;br&gt;
You can first try by just doing editor.pack() and then try to resize your window and see the changes in this way you'll learn what is going on and why we are doing such things.&lt;/p&gt;

&lt;p&gt;Now, we have a simple window with out title and in this window we can type anything anywhere within the window.&lt;/p&gt;

&lt;p&gt;Now, Let's create a menubar as a typical notepad has one:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Defining a MenuBar. In Menu pass in the name of your window mine happens to be window (Which we declared earlier window = Tk() ).
menu_bar = Menu(window)

# Creating a File Menu for our menubar.
# For the first time just run this code without the tearoff= False and observe what you get.
file_menu = Menu(menu_bar, tearoff= False)

# Adding commands to our file_menu.
# Note: the open file is a function just pass the function without the parenethesis so whenever you choose that option from the file menu that action will be performed.
file_menu.add_command(label= 'open', command= open_file)

# Now, Let's add a cascade to our menubar.
menu_bar.add_cascade(label= 'File', menu= file_menu)

# Now our menubar is ready but wait we didn't tell the window that hey we have a menubar. So let's do that.
window.config(menu = menu_bar)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Before running this code please make sure to define a function named open_file() and write pass into it as for now we don't need it to do anything.&lt;br&gt;
Run this code you'll get something like this:&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%2Fe9hexwz6c4lo9nfggpvz.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%2Fe9hexwz6c4lo9nfggpvz.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, as we are done with that let's add some commands for our open option.&lt;br&gt;
To open a File dialog box as we have in our native windows notepad app we are using tkinter.filedialog as follows:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def open_file():
    path = askopenfilename()

# Now since we have the path of the file that we want to open let's import it's contents in our Notepad app.

    with open(path, 'r') as file:
        text = file.read()

# We have the contents of that file let's displat it on our window.
# First delete all the existing contents from your window so that we can load the stuff fresh

    editor.delete('1.0', END)
    editor.insert('1.0', text)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Run this and check whether it works or not.&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%2Fyd2zl4cgy7iuleiwzmqj.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%2Fyd2zl4cgy7iuleiwzmqj.png" alt="Alt Text"&gt;&lt;/a&gt;&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%2F54kmx7pgjxrl50m9xg8i.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%2F54kmx7pgjxrl50m9xg8i.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here, we go it successfully opened a file Dialog and opened that file for us into our text editor !!&lt;/p&gt;

&lt;p&gt;Also, Yoy may have noticed that a traditional Notepad has keybindings for tasks such as 'Ctrl + s' to save the work and so on so let's add that functionality to our App.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Applying keybindings to our app.
# Also note that if you want to apply keybindings to a function you need to pass an argument named event to that functions as follows:

def open_file(event):
    path = askopenfilename()

# Now since we have the path of the file that we want to open let's import it's contents in our Notepad app.

    with open(path, 'r') as file:
        text = file.read()

# We have the contents of that file let's displat it on our window.
# First delete all the existing contents from your window so that we can load the stuff fresh

    editor.delete('1.0', END)
    editor.insert('1.0', text)

window.bind('&amp;lt;Control-o&amp;gt;', open_file)

# This will bind the keys 'ctrl + o' to our open file function.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This was Basic Overview of the things which I tried to explain in Depth so that the rest of the parts can be easily understood.&lt;br&gt;
Also, the best way to build something is to make mistakes but learn from them and grow.&lt;br&gt;
I can explain each and every function here but that will be way too lengthy and time consuming also if I do so you'll know only limited stuff about the topics which I cover. Instead, I'll leave my code below for you'll to go through and then you'll can implement those features in your application also you can even add more and better features than me if you opt to do it that way and the amount of things that you,ll learn will be much higher.&lt;/p&gt;

&lt;p&gt;You can check out the entire code in my Github account I have implemented a lot of functionalities trying it to keep it as identical as we have in our native windows.&lt;br&gt;
Also below that I have attached a replit Notebook where you can run my code and the output here it self.&lt;/p&gt;

&lt;p&gt;Here our some ScreenShots from my Application to get you motivated:&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%2Fw0trjef8wwsiir3e5y4b.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%2Fw0trjef8wwsiir3e5y4b.png" alt="Alt Text"&gt;&lt;/a&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%2Ftbs31z6wbpyt80ec4asp.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%2Ftbs31z6wbpyt80ec4asp.png" alt="Alt Text"&gt;&lt;/a&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%2Fpmpm2e62fcj39xb2e4r1.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%2Fpmpm2e62fcj39xb2e4r1.png" alt="Alt Text"&gt;&lt;/a&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%2Fhyydtiqy9j8oqd62zu2u.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%2Fhyydtiqy9j8oqd62zu2u.png" alt="Alt Text"&gt;&lt;/a&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%2F45new7xsrib79f1o35xz.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%2F45new7xsrib79f1o35xz.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Github:&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&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%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/pratik6217" rel="noopener noreferrer"&gt;
        pratik6217
      &lt;/a&gt; / &lt;a href="https://github.com/pratik6217/Notepad" rel="noopener noreferrer"&gt;
        Notepad
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Replit Playground:&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__replit"&gt;
  &lt;iframe height="550px" src="https://repl.it/@PratikMishra5/Notepad?lite=true"&gt;&lt;/iframe&gt;
&lt;/div&gt;


&lt;p&gt;Thankyou for reading my post Hope You liked it :)&lt;/p&gt;

</description>
      <category>python</category>
      <category>project</category>
      <category>gui</category>
      <category>pythonproject</category>
    </item>
    <item>
      <title>Python to .exe Executable.</title>
      <dc:creator>Pratik Mishra</dc:creator>
      <pubDate>Sun, 21 Mar 2021 10:57:35 +0000</pubDate>
      <link>https://dev.to/pratik6217/python-to-exe-executable-3be</link>
      <guid>https://dev.to/pratik6217/python-to-exe-executable-3be</guid>
      <description>&lt;p&gt;As we all know at some point in our coding journey we always wanted to compile our pyhton code into an executable file so that we can simply run it by just double clicking it !!&lt;br&gt;
I mean who doesn't wants to have an executable file of their code and boast about it in front of our friends( just joking )&lt;/p&gt;

&lt;p&gt;So, Let's begin with it&lt;br&gt;
First of all you'll need two things One is pyinstaller which you can easily install by typing in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install pyinstaller
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and the second thing is NSIS which you can download it from their official website. &lt;br&gt;
Just Download them and keep it ready and don't worry I'll walk you through each and every step one by one.&lt;br&gt;
Here is the link for the NSIS Download Page:&lt;br&gt;
&lt;a href="https://nsis.sourceforge.io/Download"&gt;NSIS&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once everything is installed and ready to go we can move forward.&lt;br&gt;
Navigate on to your folder where the python file is.&lt;br&gt;
For E.g:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0lGps7iG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uqtxa5iaz8lyozv4vxcz.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0lGps7iG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uqtxa5iaz8lyozv4vxcz.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Here is a simple guess the number game which I made in Python.&lt;br&gt;
If you want to see the code for the same you can checkout here:&lt;br&gt;
&lt;a href="https://github.com/pratik6217/Python_Games/blob/master/Guess_the_number.py"&gt;Guess The Number&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now open a terminal in the current directory by pressing Shift + Right mouse Button and selecting open a command window here.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ntHiOoEf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h05a55atce5dhrdb1nib.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ntHiOoEf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h05a55atce5dhrdb1nib.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
or you can simply type cmd in the file explorer section.&lt;/p&gt;

&lt;p&gt;Now once a terminal is open in the current dirctory go ahead and type this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Type the name of the file without the quotes.
pyinstaller --onefile "Name of your python file.py"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The --onefile flag compiles all the files into a single executable.&lt;br&gt;
Like if you have various dependancies and other files which is required for your program then it will all be compiled into a single file.&lt;br&gt;
Also there is another flag known as -w use this flag if you don't need a terminal in your program say if you have GUI then you can use this flag. Since mine is a simple command line program I didn't use it.&lt;/p&gt;

&lt;p&gt;It will take some time to compile your code depending upon the size and the dependencies once it has completed you will have multiple folders created just like this:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HDxPPeGX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jze3k0szkx59s1bbewjf.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HDxPPeGX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jze3k0szkx59s1bbewjf.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now go to the dist folder you'll have your executable file there just move that file to the main folder where you have all your code and dependencies and that's it you can just double click it and run your code as an executable just like an application.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4ydk72Bo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c1tiw30lnn8y8z9yuhcm.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4ydk72Bo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c1tiw30lnn8y8z9yuhcm.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, moving further you can even compile all this into an installer by using NSIS as follows:&lt;br&gt;
first make a zip of the folder where you have all the files and the exectable file which you just made just like this:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4p0Uxvs1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j5fmpsfcs5lwt9lidcx5.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4p0Uxvs1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j5fmpsfcs5lwt9lidcx5.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, go ahead and open The NSIS Software. It will look somewhat like this:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5vUGqhxc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xaj2an66g3pdf123ekrh.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5vUGqhxc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xaj2an66g3pdf123ekrh.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Select the Installer based on .zip file and the select the zip file which you made just now and then click on generate in the bottom right corner:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Z1KTE6o---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dno4ugqnp3p4x93evur5.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Z1KTE6o---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dno4ugqnp3p4x93evur5.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
This will create an installer which you can easliy share with your friends who can just download it run it and boom they have all the file pre compiled and ready to go !!&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0i64CwNR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qk720d6dnqcn6lrk8hgc.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0i64CwNR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qk720d6dnqcn6lrk8hgc.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This pretty much makes your task easier to share your programs and folders to anyone also it makes it beginner friendly for those who are new to programming. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9aSK0eaE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b0tiqze1aiwu2eqgg6lu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9aSK0eaE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b0tiqze1aiwu2eqgg6lu.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>executable</category>
      <category>automation</category>
      <category>application</category>
    </item>
    <item>
      <title>Socket Programming in Python.</title>
      <dc:creator>Pratik Mishra</dc:creator>
      <pubDate>Sun, 21 Mar 2021 10:09:32 +0000</pubDate>
      <link>https://dev.to/pratik6217/socket-programming-in-python-131a</link>
      <guid>https://dev.to/pratik6217/socket-programming-in-python-131a</guid>
      <description>&lt;p&gt;Today, let's see how sockets work in Python.&lt;br&gt;
First of all this tutorial will only work with sockets in your Local Area Network as it will use your Internal Ip Address within your network. If you want to build sockets worldwide for like everyone you can update the Ip Adress to your global Ip but to do so there is lot of things to keep into considerations like make sure your Firewall allows the connections and so on which is beyond the scope of this tutorial.&lt;/p&gt;

&lt;p&gt;Now that's getting out of the way let's continue,&lt;br&gt;
Let's first start with the server,&lt;br&gt;
First let's import all the modules:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import socket
import threading
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see we'll be using the socket and the threading module.&lt;br&gt;
Now, you might be wondering what is threading, threading is nothing but it let's you run code parallely to each other.&lt;br&gt;
what do I mean by that, like consider you have a server and there are multiple clients on your server now if a client is executing some commands we don't want our other clients to keep waiting untill the first one is done executing we want all of them to access our server at the same time. So by using the concept of threading you can run multiple programs simultaneously i.e concurrently without them interfering with each other.&lt;/p&gt;

&lt;p&gt;Let's define all the constants that we are going to use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Defining the size of the Header.
HEADER = 64

# The Port you want to use for your server.
PORT = 5050

# The IP address of your machine or the machine on which you want to host your server with the help of python as shown below.
# You can either hard code your Ip address but when you change your machine you'll have to do it again manually.
# Instead I have used a code to get the Ip address of the host machine.
SERVER = socket.gethostbyname(socket.gethostname())

# Tuple of Ip adress and Port number to be used for the socket
ADDR = (SERVER, PORT)

# Defining the encoding Format
FORMAT = 'utf-8'

# Defining the Disconect Message for our protocol to end the connection.
DISCONNECT_MESSAGE = '!DISCONNECT'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, The port is the Port number which you want to use for your server. &lt;br&gt;
I generally use 5050 but you can use any other "free" port on your machine. Also, notice I have used Capitals for the variables as this is the industry standards for defining constant variables.&lt;/p&gt;

&lt;p&gt;Now, let's configure our server,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# AF_INET -&amp;gt; Category or family of connections such as IPV4 Adresses.
# SOCK_STREAM -&amp;gt; Streaming data through the socket.
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

server.bind(ADDR) # Here addr is a tuple consisting of Ip Adress and the Port of your Server.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The bind() method binds your server with the mentioned Ip Address and the Port Number.&lt;/p&gt;

&lt;p&gt;Now the main fun part begins:&lt;br&gt;
I have used functions for writing every part of the program to keep the code cleaner.&lt;br&gt;
Let's start with the start Function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def start():
    server.listen()
    while True:
        # Get the socket connect object and Ip address of the client.
        # server.accept() is a block code that means it will wait until a client connects to it.
        conn, addr = server.accept()
        thread = threading.Thread(target= handle_clients, args= (conn, addr))
        thread.start()
        # There is one thread always running that is the start() [function] thread.
        # Hence, substracting one to get the active clients apart from start thread.
        print(f'[ACTIVE CONNECTIONS] : {threading.activeCount() - 1}')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's break down what's going on here,&lt;br&gt;
First we want our server to listen for new connections for that we use the listen() method.&lt;/p&gt;

&lt;p&gt;Next I have used a While loop to run the loop infinitely to keep on accepting the clients.&lt;/p&gt;

&lt;p&gt;The accept() methods accepts the clients who want to connect to our server and stores the socket object and the client address in the conn and addr variables.&lt;/p&gt;

&lt;p&gt;Now the concept of threading comes into play,&lt;br&gt;
You see for every client we are starting a new thread so that all of them can run concurrently. In Thread declaration you just provide the name of the functions without the Parenthesis and in the args we provide all the parameters or the arguments of the function as shown above.&lt;/p&gt;

&lt;p&gt;The last line of code I have used to print all the active connections to our server just to keep a track of the number.&lt;br&gt;
Notice that I have substracted 1 from the activeCount that is because start() function is also a thread which is infinitely running so we don't want to include that in the number of clients.&lt;/p&gt;

&lt;p&gt;Now, Let's write another function to handle all the connected clients on our server as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def handle_clients(conn, addr):
    print(f'[New Connection] : {addr} connected.')

    connected = True
    while connected:
        # Blocking line of code.
        # This will not pass this line of code until it gets a message from the client.
        # RECV takes the size of the message to recieve.
        msg_length = conn.recv(HEADER).decode(FORMAT)
        if msg_length:
            msg_length = int(msg_length)
            msg = conn.recv(msg_length).decode(FORMAT)
            print(f'[{addr}] : {msg}')
            if msg == DISCONNECT_MESSAGE:
                connected = False
                print(f'[{addr}] : Disconnected.')

    # Closing the Connection.
    conn.close()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, again let's break the function line by line,&lt;br&gt;
we want the loop to run continuously till a client is connected on to our server for that I have used a variable connected.&lt;/p&gt;

&lt;p&gt;Now, Let's talk about the protocal that we'll be using, the protocol goes somewhat like this(Client Side):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Send the length of the message that you'll be sending onto the server.&lt;/li&gt;
&lt;li&gt;Then send that many bytes of message to the server.&lt;/li&gt;
&lt;li&gt;IF Disconnect message is sent then close the connection and exit.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The recv() method recieves the bytes from the client, all of this will be much more clearer once we start with the client side program.&lt;/p&gt;

&lt;p&gt;Now let's run our server and see if everything is working fine:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;print(f'[Starting] Server starting on {SERVER}.....')
start()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The entire server code is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import socket
import threading

# Defining the size of the Header.
HEADER = 64

# The Port you want to use for your server.
PORT = 5050
# The IP address of your machine or the machine on which you want to host your server.
SERVER = socket.gethostbyname(socket.gethostname())
# Tuple of Ip adress and Port number to be used for the socket
ADDR = (SERVER, PORT)
# DEfining the Disconect Message for our protocol to end the connection.
DISCONNECT_MESSAGE = '!DISCONNECT'

# AF_INET -&amp;gt; Category or family of connections such as IPV4 Adresses.
# SOCK_STREAM -&amp;gt; Streaming data through the socket.
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.bind(ADDR)

FORMAT = 'utf-8'

def handle_clients(conn, addr):
    print(f'[New Connection] : {addr} connected.')

    connected = True
    while connected:
        # Blocking line of code.
        # This will not pass this line of code until it gets a message from the client.
        # RECV takes the size of the message to recieve.
        msg_length = conn.recv(HEADER).decode(FORMAT)
        if msg_length:
            msg_length = int(msg_length)
            msg = conn.recv(msg_length).decode(FORMAT)
            print(f'[{addr}] : {msg}')
            if msg == DISCONNECT_MESSAGE:
                connected = False
                print(f'[{addr}] : Disconnected.')

    # Closing the Connection.
    conn.close()


def start():
    server.listen()
    while True:
        # Get the socket connect object and Ip address of the client.
        # server.accept() is a block code that means it will wait until a client connects to it.
        conn, addr = server.accept()
        thread = threading.Thread(target= handle_clients, args= (conn, addr))
        thread.start()
        # There is one thread always running that is the start() [function] thread.
        # Hence, substracting one to get the active clients apart from start thread.
        print(f'[ACTIVE CONNECTIONS] : {threading.activeCount() - 1}')



print(f'[Starting] Server starting on {SERVER}.....')
start()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If Everything went well you'll see something like this:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8-C2kiK3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d5d6r3jykfwk53l6aam3.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8-C2kiK3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d5d6r3jykfwk53l6aam3.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, Let's move on to our client side code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import socket

HEADER = 64

# Port of the server to connect to..
PORT = 5050
# Ip Adrress of the Server..
SERVER = '192.168.56.1'

FORMAT = 'utf-8'

ADDR = (SERVER, PORT)
DISCONNECT_MESSAGE = '!DISCONNECT'

client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client.connect(ADDR)


def send(msg):
    message = msg.encode(FORMAT)
    msg_length = len(message)
    send_length = str(msg_length).encode(FORMAT)
    send_length += b' ' * (HEADER - len(send_length))
    client.send(send_length)
    client.send(message)


# m = input("Enter your message:\n")
send('Hi')
send(DISCONNECT_MESSAGE)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Again let's understand it line by line,&lt;br&gt;
First we import all the necessary modules,&lt;br&gt;
Then define all the constants and then setup the client socket.&lt;/p&gt;

&lt;p&gt;Note: The Server and port in the client will be the server's IP Address and the port on which the server is listening on to.&lt;/p&gt;

&lt;p&gt;Next, the connect() method is used to connect a client on the server. Once the client get's connected it's Ip Adress and the Port number is given to the server through the accept() method on our server side code and a new thread is started for this client.&lt;br&gt;
Now as we have defined our protocol to first send the length of the message and then the actual message, we follow the same protocol to do so.&lt;/p&gt;

&lt;p&gt;As you can see First we calculate the length of the message and then pad the length with white spaces to fill the remaining bytes as we have declared the size of the header. Now why are we padding the message that is because in our server we have passed the size of the receiving message as Header now the recv() method will wait until it has received that many bytes so we have to pass the exact same length message.&lt;/p&gt;

&lt;p&gt;And the final one is the send() method which as the name suggests is used to send the data.&lt;/p&gt;

&lt;p&gt;For those who are Wondering what is this encode and decode mentioned everywhere in the code. As we know python works in Unicode whereas the web and most of the places work in utf-8 encodings. Now when we need to transfer data over the web it should be in proper encodings that is why we encode it in utf-8 encoding standards using the encode method and when we receive the data it's in utf-8 encoding but python unbderstands Unicode so we decode it back to Normal.&lt;/p&gt;

&lt;p&gt;Here is a screenshot of the clients connected on to our server:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3i2J_F2z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ovgr11scxe9xz7s6wa4f.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3i2J_F2z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ovgr11scxe9xz7s6wa4f.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hope you liked it !! This was just a High Level overview just to get started with socket programming in Python.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MhaOVv2V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ka4s2ofzfrzgsyw61ouh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MhaOVv2V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ka4s2ofzfrzgsyw61ouh.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>socket</category>
      <category>server</category>
      <category>socketprogramming</category>
      <category>clientserver</category>
    </item>
    <item>
      <title>Python Youtube Downloader.</title>
      <dc:creator>Pratik Mishra</dc:creator>
      <pubDate>Sat, 20 Mar 2021 19:32:14 +0000</pubDate>
      <link>https://dev.to/pratik6217/python-youtube-downloader-328f</link>
      <guid>https://dev.to/pratik6217/python-youtube-downloader-328f</guid>
      <description>&lt;p&gt;So, today let's write a Python Script to download videos from our favourite video streaming platform: Youtube.&lt;br&gt;
&lt;strong&gt;NOTE:&lt;/strong&gt; Please note that only the videos which are available for download only those can be downloaded.&lt;/p&gt;

&lt;p&gt;Let's Begin:&lt;br&gt;
First Let's Import all the required Modules:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install youtube_dl 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Importing the installed Module in Python:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import youtube_dl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, let's make a list of all the youtube videos i.e their url's to download the videos also let's make a dictionary to specify all the options that we need for our video download as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;links = ['Link of your Video', 'Link of another video....',]
options = {

  "format" : "bestvideo+bestaudio"

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, in the options you can apply more filter's but I like to keep it simple by just specifying the format of the video.&lt;br&gt;
The ' bestaudio+bestvideo' will download the best available format of that video file.&lt;/p&gt;

&lt;p&gt;The next part is the main one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;with youtube_dl.YoutubeDL(options) as ydl:
    ydl.download(links) 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The youtube_dl.YoutubeDL.download() method will download all the videos from the links that you will provide to it with you desired options as declared earlier.&lt;br&gt;
The Entire code is even less than 10 lines but using it you can easliy automate your task in Python.&lt;br&gt;
Here is the entire code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import youtube_dl 
links = ['https://www.youtube.com/watch?v=v4dROX2lRMw']
options = {

  "format" : "bestvideo+bestaudio"

}

with youtube_dl.YoutubeDL(options) as ydl:
    ydl.download(links) 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hope this was useful :)&lt;/p&gt;

</description>
      <category>python</category>
      <category>automation</category>
      <category>projects</category>
      <category>scripting</category>
    </item>
    <item>
      <title>Learn Python in 2021</title>
      <dc:creator>Pratik Mishra</dc:creator>
      <pubDate>Sat, 20 Mar 2021 18:52:27 +0000</pubDate>
      <link>https://dev.to/pratik6217/learn-python-in-2021-h3n</link>
      <guid>https://dev.to/pratik6217/learn-python-in-2021-h3n</guid>
      <description>&lt;p&gt;So, first let's get it clear that why you should consider learning python in 2021. Here are some of the points which I think will help you consider learning python:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python is &lt;strong&gt;Open Source&lt;/strong&gt; making it free to use&lt;/li&gt;
&lt;li&gt;Python is the programming language that is growing the fastest.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Easy&lt;/strong&gt; to Learn all thanks to it's simple syntax and english like commands.&lt;/li&gt;
&lt;li&gt;Large User base and Large amount of available modules.&lt;/li&gt;
&lt;li&gt;Python has wide range of &lt;strong&gt;applications&lt;/strong&gt; such as:

&lt;ol&gt;
&lt;li&gt;Machine Learning.&lt;/li&gt;
&lt;li&gt;Data Science.&lt;/li&gt;
&lt;li&gt;Game Development.&lt;/li&gt;
&lt;li&gt;Web Development.&lt;/li&gt;
&lt;li&gt;Aritificial Intelligence.&lt;/li&gt;
&lt;li&gt;Big Data.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Everyone's using it and it's &lt;strong&gt;in demand&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  Here is a list of companies that use python:
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;Google&lt;/li&gt;
&lt;li&gt;Facebook&lt;/li&gt;
&lt;li&gt;Instagram&lt;/li&gt;
&lt;li&gt;Spotify&lt;/li&gt;
&lt;li&gt;Quora&lt;/li&gt;
&lt;li&gt;Netflix&lt;/li&gt;
&lt;li&gt;Dropbox&lt;/li&gt;
&lt;li&gt;Reddit&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Now this getting out of the way, Let's checkout some of the websites and courses that you can use to learn python.
&lt;/h4&gt;

&lt;h3&gt;
  
  
  FreeCodeCamp:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rtKrCFIj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pggcd68il3nnb1cux8ef.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rtKrCFIj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pggcd68il3nnb1cux8ef.png" alt="fcc_meta_1920X1080-indigo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One of the best website to learn to code.&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.freecodecamp.org/learn/"&gt;freeCodeCamp&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;1. Python for Everybody&lt;/strong&gt;&lt;br&gt;
Python for everybody is a free video course series that teaches the basics of using Python 3.&lt;br&gt;
The courses were created by Dr. Charles Severance (also known as Dr. Chuck). He is a Clinical Professor at the University of Michigan School of Information, where he teaches various technology-oriented courses including programming, database,design, and web development.&lt;br&gt;
&lt;a href="https://www.freecodecamp.org/learn/scientific-computing-with-python/#python-for-everybody"&gt;Link for this course&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Learn to Program by Building Projects&lt;/strong&gt;:&lt;br&gt;
Coding a project is a great way to improve your Python skills. &lt;br&gt;
But why stop at one project? Why not go for an even dozen?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.freecodecamp.org/news/learn-how-to-build-12-python-projects-in-one-course/"&gt;Link for the Post&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Apart from these there are a ton of courses and posts which you can refer at freecodecamp.&lt;/p&gt;

&lt;h3&gt;
  
  
  Coursera:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--K4yHkFpq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7fuy1n6t5vk8r7eilz02.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--K4yHkFpq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7fuy1n6t5vk8r7eilz02.png" alt="Grid_Coursera_Partners_updated"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I know Coursera is a paid platform but you do get some of the courses for free and apart from this you can always audit the courses to learn from them for free.&lt;br&gt;
Now what do I mean bu auditing the course it simply means that you can access the video lectures and stuff but you'll not be getting the course completion certificate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Crash Course on Python By Google&lt;/strong&gt;&lt;br&gt;
This is one of the best and well structured course for absolute beginner's in python. The Instructors are very good I mean you can learn from people who work at Google.&lt;br&gt;
Also the final milestone project is very fun to do.&lt;br&gt;
&lt;a href="https://www.coursera.org/learn/python-crash-course/home/welcome"&gt;Google Python Crash Course&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Python 3 Programming:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;A. Python Basics:&lt;/strong&gt;&lt;br&gt;
This is a begginer friendly course for everyone and is part of &lt;br&gt;
the python 3 programming specialisation.&lt;br&gt;
This course introduces the basics of Python 3, including conditional execution and iteration as control structures, and strings and lists as data structures. You'll program an on-screen Turtle to draw pretty pictures. You'll also learn to draw reference diagrams as a way to reason about program executions, which will help to build up your debugging skills. The course has no prerequisites. It will cover Chapters 1-9 of the textbook "Fundamentals of Python Programming," which is the accompanying text (optional and free) for this course.&lt;br&gt;
&lt;a href="https://www.coursera.org/learn/python-basics?specialization=python-3-programming"&gt;link for the course&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;B. Python Functions, Files and Dictionaries:&lt;/strong&gt;&lt;br&gt;
This is the second course of the python 3 programming specialisation.&lt;br&gt;
This course introduces the dictionary data structure and user-defined functions. You’ll learn about local and global variables, optional and keyword parameter-passing, named functions and lambda expressions. You’ll also learn about Python’s sorted function and how to control the order in which it sorts by passing in another function as an input. For your final project, you’ll read in simulated social media data from a file, compute sentiment scores, and write out .csv files. It covers chapters 10-16 of the textbook “Fundamentals of Python Programming,” which is the accompanying text (optional and free) for this course.&lt;br&gt;
&lt;a href="https://www.coursera.org/learn/python-functions-files-dictionaries?specialization=python-3-programming"&gt;Link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;C. Data Processing in Python:&lt;/strong&gt;&lt;br&gt;
This course teaches you to fetch and process data from services on the Internet. It covers Python list comprehensions and provides opportunities to practice extracting from and processing deeply nested data. You'll also learn how to use the Python requests module to interact with REST APIs and what to look for in documentation of those APIs. For the final project, you will construct a “tag recommender” for the flickr photo sharing site.&lt;br&gt;
&lt;a href="https://www.coursera.org/learn/data-collection-processing-python"&gt;Link&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;D. Python Classes and Inheritence:&lt;/strong&gt;&lt;br&gt;
This course introduces classes, instances, and inheritance. You will learn how to use classes to represent data in concise and natural ways. You'll also learn how to override built-in methods and how to create "inherited" classes that reuse functionality. You'll also learn about how to design classes. Finally, you will be introduced to the good programming habit of writing automated tests for their own code.&lt;br&gt;
&lt;a href="https://www.coursera.org/learn/python-classes-inheritance"&gt;Link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;E. Python Project: pillow, tesseract, and opencv:&lt;/strong&gt;&lt;br&gt;
This is the final project of the Python3 Programming Specialisation.&lt;br&gt;
This course will walk you through a hands-on project suitable for a portfolio. You will be introduced to third-party APIs and will be shown how to manipulate images using the Python imaging library (pillow), how to apply optical character recognition to images to recognize text (tesseract and py-tesseract), and how to identify faces in images using the popular opencv library. By the end of the course you will have worked with three different libraries available for Python 3 to create a real-world data-analysis project.&lt;br&gt;
&lt;a href="https://www.coursera.org/learn/python-project"&gt;Link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Edx:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bdebVQ_I--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s5onym09h3u8l1udwmxr.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bdebVQ_I--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s5onym09h3u8l1udwmxr.jpg" alt="f033fedc89a740669f8e8f3c0d3df7cf"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Similar to Cousera you can learn for free by auditing these courses. These Cousrses are taught by Hravard and MIT and many more leading Universities.&lt;br&gt;
Take real college Python programming courses from Harvard, MIT, and more of the world's leading universities. Become familiar with the basics of python including python syntax, conditionals, and much more. Learn python from the fundamentals to advanced subjects and topics now!&lt;br&gt;
&lt;a href="https://www.edx.org/learn/python"&gt;Link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. RealPython:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kY_cN9jv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vbvacsq8uzodzama03wv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kY_cN9jv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vbvacsq8uzodzama03wv.png" alt="real-python-video-courses-title-wide.daf71ae6460c"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to learn some crazy tricks and make Real World applications in Python then look now where else, This website will surely help you with that.&lt;br&gt;
From Discord Bots to Machine Learning, Deep Learning you can easily find here.&lt;br&gt;
&lt;a href="https://realpython.com/"&gt;Link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Python Web Scrapping:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--b95N76B_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1is124tnbo4lxvwnssy2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--b95N76B_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1is124tnbo4lxvwnssy2.png" alt="1___fCMPzS-15OrfzeXyIOXA"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Python is a beautiful language to code in. This is because it has got a great package ecosystem, much less noise (characters) than a typical program in a different language, and is super easy to use.&lt;/p&gt;

&lt;p&gt;Python is used for a number of things - from data analysis to server programming. However, there's another interesting use-case of Python - Web Scraping. In this classroom, we will cover how to use Python for web scraping with a complete hands-on classroom guide as we proceed.&lt;/p&gt;

&lt;p&gt;*We will cover performing requests with requests package.&lt;br&gt;
*We will install and configure BeautifulSoup package.&lt;br&gt;
*We will extract data from a test site using bs4.&lt;br&gt;
*We will also create a CSV in the last lab of extracted data.&lt;br&gt;
&lt;a href="https://codedamn.com/practice/web-scraping-python-beautifulsoup"&gt;Link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Apart from these there are ample of free resources such as booksn hands on labs, and many more available to learn python for free.&lt;br&gt;
I hope this will help those who want to learn but don't know where !!&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KsIe6_ZY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/89qdaw77fi4g9v1hqnai.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KsIe6_ZY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/89qdaw77fi4g9v1hqnai.png" alt="National_Thank_You_Day"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>learning</category>
      <category>webscrapping</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
