<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Thangarajnagulraj on Medium]]></title>
        <description><![CDATA[Stories by Thangarajnagulraj on Medium]]></description>
        <link>https://medium.com/@thangarajnagulraj?source=rss-219d94db54d3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*L_dyExr40o4mm0nBYD1dKg.jpeg</url>
            <title>Stories by Thangarajnagulraj on Medium</title>
            <link>https://medium.com/@thangarajnagulraj?source=rss-219d94db54d3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 20:35:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@thangarajnagulraj/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[HTTP request methods]]></title>
            <link>https://medium.com/featurepreneur/http-request-methods-5ba50f30351d?source=rss-219d94db54d3------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ba50f30351d</guid>
            <category><![CDATA[network]]></category>
            <category><![CDATA[http-request]]></category>
            <category><![CDATA[request]]></category>
            <category><![CDATA[http2]]></category>
            <category><![CDATA[https]]></category>
            <dc:creator><![CDATA[Thangarajnagulraj]]></dc:creator>
            <pubDate>Sat, 08 Oct 2022 17:54:54 GMT</pubDate>
            <atom:updated>2022-10-08T17:54:54.462Z</atom:updated>
            <content:encoded><![CDATA[<p>HTTP request methods are important components responsible for supplying the request and specifying the client-requested operation. In this lesson, you will learn about various HTTP methods and how they are used.</p><h3>What Are HTTP Request Methods?</h3><p>The Internet consists of a set of resources hosted on various web servers. To access these resources, users use various web browsers capable of sending requests to the server and displaying the information from it. HTTP is a protocol that is used in requests and responses for effective communication between client and server. A message sent by the client to the server is known as an HTTP request. When these requests are being sent, clients can use various methods, known as HTTP request methods.</p><h3>What Are the Types of HTTP Request Methods?</h3><p>Various HTTP methods (GET, POST, PUT, HEAD, DELETE, TRACE, OPTIONS, and CONNECT.) Are explained below.</p><h3>GET Method</h3><p>The GET method is one of the most commonly used methods of HTTP. It is usually implemented to request a particular resource data from the Web server by specifying the parameters as a query string (name and value pairs) in the URL part of the request.</p><p>The various characteristics of the GET method are:</p><ul><li>The GET requests can be bookmarked as they appear in the URL.</li><li>The GET request can be cached.</li><li>The GET request is saved in the browser history if it is executed using a web browser.</li><li>There are character length restrictions (2048 characters maximum) for this method as they appear in the URL.</li><li>The GET method cannot be used to send binary data such as images and Word documents.</li><li>The data can only be retrieved from requests that use the GET method and have no other effect.</li><li>When communicating sensitive data such as login credentials, a GET request should not be used as it appears in the URL, making it less secure.</li><li>Since the GET request only requests data and does not modify any resources, it is considered a safe and ideal method to request data only.</li></ul><h3>POST Method</h3><p>The POST method is a commonly used HTTP method that sends data to the Web server in the request body of HTTP. The various characteristics of the POST method are:</p><ul><li>The POST requests cannot be bookmarked as they do not appear in the URL.</li><li>The POST requests do not get cached.</li><li>The POST requests are not saved as history by the web browsers.</li><li>There is no restriction on the amount of data to be sent in a POST request.</li><li>The POST method can be used to send ASCII as well as binary data.</li><li>When communicating sensitive data, such as when submitting an HTML form, a POST request must be used.</li><li>The data sent by the POST method goes through the HTTP header, so security depends on the HTTP protocol. By using secure HTTP (HTTPS), you can ensure that your information is protected.</li></ul><p>Here is an example code snippet that submits an HTML form using the POST method:</p><pre>&lt;html&gt;<br>&lt;body&gt;<br><br>    &lt;form action=&quot;registration.php&quot; method=&quot;post&quot;&gt;<br>        Name: &lt;input type=&quot;text&quot; name=&quot;name&quot;&gt;<br>        Email: &lt;input type=&quot;text&quot; name=&quot;email&quot;&gt;<br>        &lt;input type=&quot;submit&quot;&gt;<br>    &lt;/form&gt;<br><br>&lt;/body&gt;<br>&lt;/html&gt;</pre><h3>PUT Method</h3><p>The HTTP PUT request method is used to update existing resources with uploaded content or to create a new resource if the target resource is not found. The difference between POST and PUT is that PUT requests are static, which means calling the same PUT method multiple times will not yield a different result because it will update the same content each time while POST Request Will create new content each time.</p><h3>HEAD Method</h3><p>The HTTP HEAD method is almost identical to the GET method, but the only difference is that it will not return any response body. For example, if GET/users return a record of users, then HEAD/users make the same request, but it will not return any of the users’ records.</p><p>The HEAD request becomes useful for testing whether the GET request will actually respond before making the actual GET request. Sometimes this will be useful in some situations, such as checking the response of a URL before downloading a file.</p><h3>DELETE Method</h3><p>The HTTP DELETE method is used to delete any specific resource.</p><h3>TRACE Method</h3><p>The HTTP TRACE method is used for performing a message loop-back, which tests the path for the target resource. It is useful for debugging purposes.</p><h3>OPTIONS Method</h3><p>HTTP OPTIONS method is used for describing the communication preferences for any target resource.</p><h3>CONNECT Method</h3><p>HTTP CONNECT method is used for establishing a tunnel to the server recognized by a given URI.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ba50f30351d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/featurepreneur/http-request-methods-5ba50f30351d">HTTP request methods</a> was originally published in <a href="https://medium.com/featurepreneur">featurepreneur</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why I thought Ubuntu is better than Windows Operating System]]></title>
            <link>https://medium.com/featurepreneur/why-i-thought-ubuntu-is-better-than-windows-operating-system-2f16d5574e34?source=rss-219d94db54d3------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f16d5574e34</guid>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[operating-systems]]></category>
            <category><![CDATA[os]]></category>
            <dc:creator><![CDATA[Thangarajnagulraj]]></dc:creator>
            <pubDate>Sat, 08 Oct 2022 17:45:01 GMT</pubDate>
            <atom:updated>2022-10-08T17:45:01.118Z</atom:updated>
            <content:encoded><![CDATA[<p>If you are not a power user, it might seem that “Windows” OS is a better (or easier) choice when compared to Linux. In either case, if you are not enjoying using a <a href="https://en.wikipedia.org/wiki/Linux_distribution">Linux distro</a> then Windows would be your obvious choice.</p><p>However, in reality, we tend to experience something different, which lets us jump to the conclusion where Linux gets the edge over <a href="https://www.microsoft.com/WINDOWS">Windows OS</a>.</p><h3>Advantages of Linux over Windows</h3><p>In this article, we will take a look at 11 of the compelling reasons <em>why Linux is better than Windows</em>. Some of the points mentioned here are already discussed in our earlier article on <a href="https://itsfoss.com/reasons-switch-linux-windows-xp/">why switch to Linux</a>.</p><h3>1. Open Source Nature</h3><p>What is it like when you buy a car, but you cannot see what’s under the hood? Similar is the case with when you use a Windows-powered system.</p><p>However, in contrast, Linux is completely an <a href="https://en.wikipedia.org/wiki/Open-source_software">open source</a> project. You can have a look at the source code of a Linux OS, which is a plus.</p><p>I know, most people don’t care about this openness of Linux, but to me, this is the most important feature of using GNU/Linux.</p><h3>2. Secure</h3><p>Let’s face it; Windows OS is vulnerable to different types of attacks (or hacks). However, Linux is not as vulnerable as Windows. It sure isn’t invulnerable, but it is a lot more secure. Although, there’s no rocket science in it.</p><p>It is just the way Linux works that makes it a secure operating system. Overall, the process of package management, the concept of repositories, and a couple more features makes it possible for Linux to be more secure than Windows.</p><p>When you have Windows installed, you need to download/purchase an <a href="https://en.wikipedia.org/wiki/Antivirus_software">Antivirus program</a> to keep your computer safe from hackers and malware. However, Linux does not require the use of such Anti-Virus programs. Of course, a couple of software tools still exist to help you keep your system free from threats, but it is often unnecessary when you have a Linux system.</p><p>Being secure by nature would make things easier for you and save money as well because you will not have to get a premium Antivirus software!</p><h3>3. Programmers Friendly</h3><p>Linux supports almost all of the major programming languages (<em>Python, C/C++, Java, Perl, Ruby, etc</em>.). Moreover, it offers a vast range of applications useful for programming purposes.</p><p>The Linux terminal is superior to use over Window’s command line for developers. You would find many libraries developed natively for Linux. Also, a lot of programmers point out that the <a href="https://en.wikipedia.org/wiki/Package_manager">package manager</a> on Linux helps them get things done easily.</p><p>Interestingly, the ability of bash scripting is also one of the most compelling reasons why programmers prefer using Linux OS.</p><p>Linux also brings in native support for <a href="https://en.wikipedia.org/wiki/Secure_Shell">SSH</a>, which would help you manage your servers quickly. You could include things like apt commands which further makes Linux one of the most popular choices of the programmers.</p><h3>4. Software Updates</h3><p>Microsoft pushes a software update when it receives a set of problems or if something major needs to be fixed. And, for this reason — your system potentially breaks with an update or you end up waiting for an update to fix your issue for a significant amount of time.</p><p>I’m sure if you have a Windows-powered system for a long time, you may have encountered issues with every update.</p><p>However, with Linux, you would observe software updates to address every little bug and most of which isn’t system-breaking if you’re using an <a href="https://itsfoss.com/long-term-support-lts/">LTS</a> version of a distribution.</p><p>So, with Linux, you will notice more effective and faster updates to fix the problems you might be facing. That’s not the case with Windows.</p><h3>5. Customization</h3><p>One major <em>advantage of using Linux instead of Windows</em> is customization. If you like tweaking your system’s looks, Linux is just perfect for you.</p><p>Apart from <a href="https://itsfoss.com/install-themes-ubuntu/">installing themes</a>, you have tons of <a href="https://itsfoss.com/best-icon-themes-ubuntu-16-04/">beautiful icon themes</a>. In addition to that, you can <a href="https://itsfoss.com/conky-gui-ubuntu-1304/">use Conky to display system information on the desktop</a> in the coolest way possible. Needless to say that you can do a lot around <a href="https://itsfoss.com/applications-manage-wallpapers-ubuntu/">Wallpapers</a> in Linux.</p><h3>6. Various Distributions</h3><p>There are no flavours of Windows. Yes, you may have different plans &amp; packages which differ in licensing terms, the period of activation, packaged features, and price.</p><p>In contrast, you will find tons of Linux distributions catered for a different set of needs. So, you can choose to install any of the available Linux distros according to your requirements.</p><p>For example, there are <a href="https://itsfoss.com/linux-hacking-penetration-testing/">Linux distributions for hackers</a>, there are <a href="https://itsfoss.com/semicode-os-linux/">Linux distributions for programmers</a>, there are <a href="https://itsfoss.com/lightweight-linux-beginners/">Linux distributions for extremely old computers</a>, and the list goes on. There is a Linux for everyone.</p><p>If you’re curious, you might want to learn <a href="https://itsfoss.com/what-is-linux/">what is Linux</a> to know why there are 100s of Linux distributions.</p><h3>7. Free to Use</h3><p>Linux is accessible to the public for free! However, that is not the case with Windows!</p><p>You will not have to pay <strong>100–250 USD</strong> to get your hands on a genuine copy of a Linux distro (such as Ubuntu, Fedora). So, it is entirely free.</p><p>If something is free but useful, it is always the best thing one could expect. With the money you just saved, you can consider enhancing your system (just saying, you can go to Starbucks as well:)</p><h3>8.Community Support</h3><p>You do not need to hire an expert to solve a problem you are facing on your Linux system. You just need to search for a similar thread on the web for a solution or post a thread to let others solve the problem.</p><p>Within minutes of posting a thread on <a href="https://askubuntu.com/">any of the Linux forums</a>, you may expect a reply along with a detailed solution which would finally help resolve your problem at no cost! Not to forget, you should find solutions to most of the common problems in the forums properly explained without needing to do a lot of research.</p><p>There are a lot of active Linux users who are always ready to respond to a relevant thread one might have created. The number of community users active on such forums is more than the number of active members on any Windows-focused forum.</p><p>However, the community response might vary depending on the Linux distribution being used. You can also reach out for help through our <a href="https://itsfoss.community/">community forum</a>.</p><h3>9. Reliability</h3><p>Windows, as we know it, becomes sluggish day after day. You will want to re-install Windows after a while when you encounter crashes or slowdowns on your system.</p><p>If you are using Linux, you will not have to worry about re-installing it just to experience a faster and a smoother system. Linux helps your system run smooth for a longer period (in fact, much longer!).</p><p>Also, with Windows, you will have to adapt to a habit where you keep on rebooting the system for just about everything.</p><ul><li><em>If you just installed software, reboot!</em></li><li><em>If you recently uninstalled software, reboot!</em></li><li><em>If you just installed a Windows update, reboot!</em></li><li><em>If the system seems to slow down, reboot!</em></li></ul><p>However, in the case of Linux, you will not have to reboot for the situations mentioned above. You can comfortably continue with your work, and Linux will not bother you.</p><p>Another fact that proves Linux to be reliable are the web servers. You could observe that most of the Internet giants like Google and Facebook run on Linux. Even <a href="https://itsfoss.com/linux-runs-top-supercomputers/">almost all of the supercomputers run on Linux</a>.</p><p>So, Why isn’t Windows preferred over Linux for mission-critical tasks? It is because Linux is far more reliable than Windows OS. Period.</p><p>Of course, it doesn’t mean Linux does not have issues. But, if we look at the bigger picture, Linux is reliable by design. If you consider trying any of the Linux distribution for your computer, you might want to try <a href="https://itsfoss.com/pop-os-20-04-review/">Pop OS</a> (my personal favourite) or any of the <a href="https://itsfoss.com/best-linux-distributions/">best Linux distributions</a> we have listed.</p><h3>10. Privacy</h3><p>Microsoft certainly tries to anonymize the data collected from every user. However, it does not look convincing with Microsoft’s latest Windows 10. It has already received an <a href="http://thenextweb.com/microsoft/2015/07/29/wind-nos/">enormous amount of criticism of how it collects data</a>, what it should collect and what it should not.</p><p>If you have ever used Windows 10, you could only head into the privacy settings to know that everything is enabled by default. Even if you opt out to send Microsoft information about your data, it is still being collected. Of course, Microsoft will not bother revealing it officially with a press statement, but it surely does. So, you would need a set of tools to disable the spying modules of Windows.</p><p>In contrast, Linux would be the perfect solution for a privacy buff. First of all, Linux distributions do not collect much data (or none). Moreover, you will not be needing additional tools to protect your privacy.</p><h3>Conclusion</h3><h3>Do you also think Linux is better than Windows?</h3><p>Now that you know the <strong><em>advantages of using Linux instead of Windows</em></strong>, what do you think?</p><p>If you’re still going to keep using Windows as your primary OS, what reason could you think of choosing it over Linux?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f16d5574e34" width="1" height="1" alt=""><hr><p><a href="https://medium.com/featurepreneur/why-i-thought-ubuntu-is-better-than-windows-operating-system-2f16d5574e34">Why I thought Ubuntu is better than Windows Operating System</a> was originally published in <a href="https://medium.com/featurepreneur">featurepreneur</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding IP Addresses, Subnets, and CIDR Notation for Networking]]></title>
            <link>https://medium.com/featurepreneur/understanding-ip-addresses-subnets-and-cidr-notation-for-networking-88aa236895fb?source=rss-219d94db54d3------2</link>
            <guid isPermaLink="false">https://medium.com/p/88aa236895fb</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[ipv4]]></category>
            <category><![CDATA[cidr]]></category>
            <category><![CDATA[i̇p]]></category>
            <category><![CDATA[ip]]></category>
            <dc:creator><![CDATA[Thangarajnagulraj]]></dc:creator>
            <pubDate>Sat, 08 Oct 2022 17:43:38 GMT</pubDate>
            <atom:updated>2022-10-08T17:43:38.322Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Understanding networking is a fundamental part of configuring complex environments on the internet. This has implications when trying to communicate between servers efficiently, developing secure network policies, and keeping your nodes organized.</p><p>In a previous guide, we went over some <a href="https://www.digitalocean.com/community/articles/an-introduction-to-networking-terminology-interfaces-and-protocols">basic networking terminology</a>. You should look through that guide to make sure you are familiar with the concepts presented there.</p><p>In this article, we will discuss some more specific concepts that are involved with designing or interacting with networked computers. Specifically, we will be covering network classes, subnets, and CIDR notation for grouping IP addresses.</p><h3>Understanding IP addresses</h3><p>Every location or device on a network must be <em>addressable</em>. This means that it can be reached by referencing its designation under a predefined system of addresses. In the normal TCP/IP model of network layering, this is handled on a few different layers, but usually when we refer to an address on a network we are talking about an IP address.</p><p>IP addresses allow network resources to be reached through a network interface. If one computer wants to communicate with another computer, it can address the information to the remote computer’s IP address. Assuming that the two computers are on the same network, or that the different computers and devices in between can translate requests across networks, the computers should be able to reach each other and send information.</p><p>Each IP address must be unique on its own network. Networks can be isolated from one another, and they can be bridged and translated to provide access between distinct networks. A system called <strong>Network Address Translation</strong>, allows the addresses to be rewritten when packets traverse network borders to allow them to continue on to their correct destination. This allows the same IP address to be used on multiple, isolated networks while still allowing these to communicate with each other if configured correctly.</p><h3>The difference between IPv4 and IPv6</h3><p>There are two revisions of the IP protocol that are widely implemented on systems today: IPv4 and IPv6. IPv6 is slowly replacing IPv4 due to improvements in the protocol and the limitations of IPv4 address space. Simply put, the world now has too many internet-connected devices for the amount of addresses available through IPv4.</p><p>IPv4 addresses are 32-bit addresses. Each byte, or 8-bit segment of the address, is divided by a period and typically expressed as a number 0–255. Even though these numbers are typically expressed in decimal to aid in human comprehension, each segment is usually referred to as an <strong>octet</strong> to express the fact that it is a representation of 8 bits.</p><p>A typical IPv4 address looks something like this:</p><pre>192.168.0.5</pre><p>The lowest value in each octet is a 0, and the highest value is 255.</p><p>We can also express this in binary to get a better idea of how the four octets will look. We will separate each 4 bits by a space for readability and replace the dots with dashes:</p><pre>1100 0000 - 1010 1000 - 0000 0000 - 0000 0101</pre><p>Recognizing that these two formats represent the same number will be important for understanding concepts later on.</p><p>Although there are some other differences in the protocol and background functionality of IPv4 and IPv6, the most noticeable difference is the address space. IPv6 expresses addresses as an 128-bit number. To put that into perspective, this means that IPv6 has space for more than 7.9×1028 times the amount of addresses as IPv4.</p><p>To express this extended address range, IPv6 is generally written out as eight segments of four hexadecimal digits. Hexadecimal numbers represent the numbers 0–15 by using the digits 0–9, as well as the numbers a–f to express the higher values. A typical IPv6 address might look something like this:</p><pre>1203:8fe0:fe80:b897:8990:8a7c:99bf:323d</pre><p>You may also see these addresses written in a compact format. The rules of IPv6 allow you to remove any leading zeros from each octet, and to replace a single range of zeroed groups with a double colon (::).</p><p>For instance, if you have one group in an IPv6 address that looks like this:</p><pre>...:00bc:...</pre><p>You could instead just type:</p><pre>...:bc:...</pre><p>To demonstrate the second case, if you have a range in an IPv6 address with multiple groups as zeroes, like this:</p><pre>...:18bc:0000:0000:0000:00ff:...</pre><p>You could compact this like so (also removing the leading zeros of the group like we did above):</p><pre>...:18bc::ff...</pre><p>You can do this only once per address, or else the full address will be unable to be reconstructed.</p><p>While IPv6 is becoming more common every day, in this guide, we will be exploring the remaining concepts using IPv4 addresses because it is easier to discuss with a smaller address space.</p><h3>IPv4 Addresses Classes and Reserved Ranges</h3><p>IP addresses are typically made of two separate components. The first part of the address is used to identify the network that the address is a part of. The part that comes afterwards is used to specify a specific host within that network.</p><p>Where the network specification ends and the host specification begins depends on how the network is configured. We will discuss this more thoroughly momentarily.</p><p>IPv4 addresses were traditionally divided into five different “classes”, named A through E, meant to differentiate segments of the available addressable IPv4 space. These are defined by the first four bits of each address. You can identify what class an IP address belongs to, by looking at these bits.</p><p>Here is a translation table that defines the addresses based on their leading bits:</p><ul><li><strong>Class A:</strong></li></ul><p><strong>0---</strong> : If the first bit of an IPv4 address is “0”, this means that the address is part of class A. This means that any address from <strong>0.0.0.0 to </strong><strong>127.255.255.255</strong> is in class A.</p><ul><li><strong>Class B:</strong></li></ul><p><strong>10--</strong> : Class B includes any address from <strong>128.0.0.0 to </strong><strong>191.255.255.255</strong>. This represents the addresses that have a “1” for their first bit, but don’t have a “1” for their second bit.</p><ul><li><strong>Class C:</strong></li></ul><p><strong>110-</strong> : Class C is defined as the addresses ranging from <strong>192.0.0.0 to </strong><strong>223.255.255.255</strong>. This represents all of the addresses with a “1” for their first two bits, but without a “1” for their third bit.</p><ul><li><strong>Class D:</strong></li></ul><p><strong>1110</strong> : This class includes addresses that have “111” as their first three bits, but a “0” for the next bit. This address range includes addresses from <strong>224.0.0.0 to </strong><strong>239.255.255.255</strong>.</p><ul><li><strong>Class E:</strong></li></ul><p><strong>1111</strong> : This class defines addresses between <strong>240.0.0.0 and </strong><strong>255.255.255.255</strong>. Any address that begins with four “1” bits is included in this class.</p><p>Class D addresses are reserved for multi-casting protocols, which allow a packet to be sent to a group of hosts in one movement. Class E addresses are reserved for future and experimental use, and are largely not used.</p><p>Traditionally, each of the regular classes (A–C) divided the networking and host portions of the address differently to accommodate different sized networks. Class A addresses used the remainder of the first octet to represent the network and the rest of the address to define hosts. This was good for defining a few networks with a lot of hosts each.</p><p>The class B addresses used the first two octets (the remainder of the first, and the entire second) to define the network and the rest to define the hosts on each network. The class C addresses used the first three octets to define the network and the last octet to define hosts within that network.</p><p>The division of large portions of IP space into classes is now almost a legacy concept. Originally, this was implemented as a stop-gap for the problem of rapidly depleting IPv4 addresses (you can have multiple computers with the same host if they are in separate networks). This was replaced largely by later schemes that we will discuss below.</p><h3>Reserved Private Ranges</h3><p>There are also some portions of the IPv4 space that are reserved for specific uses.</p><p>One of the most useful reserved ranges is the loopback range specified by addresses from 127.0.0.0 to 127.255.255.255. This range is used by each host to test networking to itself. Typically, this is expressed by the first address in this range: 127.0.0.1.</p><p>Each of the normal classes also have a range within them that is used to designate private network addresses. For instance, for class A addresses, the addresses from 10.0.0.0 to 10.255.255.255 are reserved for private network assignment. For class B, this range is 172.16.0.0 to 172.31.255.255. For class C, the range of 192.168.0.0 to 192.168.255.255 is reserved for private usage.</p><p>Any computer that is not hooked up to the internet directly (any computer that goes through a router or other NAT system) can use these addresses at will.</p><p>There are additional address ranges reserved for specific use-cases. You can find a <a href="https://en.wikipedia.org/wiki/Reserved_IP_addresses">summary of reserved addresses</a> here.</p><h3>Netmasks and Subnets</h3><p>The process of dividing a network into smaller network sections is called <strong>subnetting</strong>. This can be useful for many different purposes and helps isolate groups of hosts from each other to deal with them more easily.</p><p>As we discussed above, each address space is divided into a network portion and a host portion. The amount of the address that each of these take up is dependent on the class that the address belongs to. For instance, for class C addresses, the first 3 octets are used to describe the network. For the address 192.168.0.15, the 192.168.0 portion describes the network and the 15 describes the host.</p><p>By default, each network has only one subnet, which contains all of the host addresses defined within. A netmask is basically a specification of the amount of address bits that are used for the network portion. A subnet mask is another netmask within used to further divide the network.</p><p>Each bit of the address that is considered significant for describing the network should be represented as a “1” in the netmask.</p><p>For instance, the address we discussed above, 192.168.0.15 can be expressed like this, in binary:</p><pre>1100 0000 - 1010 1000 - 0000 0000 - 0000 1111</pre><p>As we described above, the network portion for class C addresses is the first 3 octets, or the first 24 bits. Since these are the significant bits that we want to preserve, the netmask would be:</p><pre>1111 1111 - 1111 1111 - 1111 1111 - 0000 0000</pre><p>This can be written in the normal IPv4 format as 255.255.255.0. Any bit that is a “0” in the binary representation of the netmask is considered part of the host portion of the address and can be variable. The bits that are “1” are static, however, for the network or subnetwork that is being discussed.</p><p>We determine the network portion of the address by applying a bitwise AND operation to between the address and the netmask. A bitwise AND operation will save the networking portion of the address and discard the host portion. The result of this on our above example that represents our network is:</p><pre>1100 0000 - 1010 1000 - 0000 0000 - 0000 0000</pre><p>This can be expressed as 192.168.0.0. The host specification is then the difference between these original value and the host portion. In our case, the host is 0000 1111 or 15.</p><p>The idea of subnetting is to take a portion of the host space of an address, and use it as an additional networking specification to divide the address space again.</p><p>For instance, a netmask of 255.255.255.0 as we saw above leaves us with 254 hosts in the network (you cannot end in 0 or 255 because these are reserved). If we wanted to divide this into two subnetworks, we could use one bit of the conventional host portion of the address as the subnet mask.</p><p>So, continuing with our example, the networking portion is:</p><pre>1100 0000 - 1010 1000 - 0000 0000</pre><p>The host portion is:</p><pre>0000 1111</pre><p>We can use the first bit of our host to designate a subnetwork. We can do this by adjusting the subnet mask from this:</p><pre>1111 1111 - 1111 1111 - 1111 1111 - 0000 0000</pre><p>To this:</p><pre>1111 1111 - 1111 1111 - 1111 1111 - 1000 0000</pre><p>In traditional IPv4 notation, this would be expressed as 192.168.0.128. What we have done here is to designate the first bit of the last octet as significant in addressing the network. This effectively produces two subnetworks. The first subnetwork is from 192.168.0.1 to 192.168.0.127. The second subnetwork contains the hosts 192.168.0.129 to 192.168.0.255. Traditionally, the subnet itself must not be used as an address.</p><p>If we use more bits out of the host space for networking, we can get more and more subnetworks.</p><h3>CIDR Notation</h3><p>A system called <strong>Classless Inter-Domain Routing</strong>, or CIDR, was developed as an alternative to traditional subnetting. The idea is that you can add a specification in the IP address itself as to the number of significant bits that make up the routing or networking portion.</p><p>For example, we could express the idea that the IP address 192.168.0.15 is associated with the netmask 255.255.255.0 by using the CIDR notation of 192.168.0.15/24. This means that the first 24 bits of the IP address given are considered significant for the network routing.</p><p>This allows us some interesting possibilities. We can use these to reference “supernets”. In this case, we mean a more inclusive address range that is not possible with a traditional subnet mask. For instance, in a class C network, like above, we could not combine the addresses from the networks 192.168.0.0 and 192.168.1.0 because the netmask for class C addresses is 255.255.255.0.</p><p>However, using CIDR notation, we can combine these blocks by referencing this chunk as 192.168.0.0/23. This specifies that there are 23 bits used for the network portion that we are referring to.</p><p>So the first network (192.168.0.0) could be represented like this in binary:</p><pre>1100 0000 - 1010 1000 - 0000 0000 - 0000 0000</pre><p>While the second network (192.168.1.0) would be like this:</p><pre>1100 0000 - 1010 1000 - 0000 0001 - 0000 0000</pre><p>The CIDR address we specified indicates that the first 23 bits are used for the network block we are referencing. This is equivalent to a netmask of 255.255.254.0, or:</p><pre>1111 1111 - 1111 1111 - 1111 1110 - 0000 0000</pre><p>As you can see, with this block the 24th bit can be either 0 or 1 and it will still match, because the network block only cares about the first 23 digits.</p><p>CIDR allows us more control over addressing continuous blocks of IP addresses. This is much more useful than the subnetting we talked about originally.</p><h3>Conclusion</h3><p>Hopefully by now, you should have a working understanding of some of the networking implications of the IP protocol. While dealing with this type of networking is not always intuitive, and may be difficult to work with at times, it is important to understand what is going on in order to configure your software and components correctly.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=88aa236895fb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/featurepreneur/understanding-ip-addresses-subnets-and-cidr-notation-for-networking-88aa236895fb">Understanding IP Addresses, Subnets, and CIDR Notation for Networking</a> was originally published in <a href="https://medium.com/featurepreneur">featurepreneur</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to setup Scala on Ubuntu]]></title>
            <link>https://medium.com/featurepreneur/how-to-setup-scala-on-ubuntu-eabf0e2c61a2?source=rss-219d94db54d3------2</link>
            <guid isPermaLink="false">https://medium.com/p/eabf0e2c61a2</guid>
            <category><![CDATA[scala-programming]]></category>
            <category><![CDATA[scala]]></category>
            <dc:creator><![CDATA[Thangarajnagulraj]]></dc:creator>
            <pubDate>Tue, 27 Sep 2022 13:29:45 GMT</pubDate>
            <atom:updated>2022-09-27T13:29:45.165Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vF5d5He3kIwMThl0UUb3-w.jpeg" /></figure><p><strong>Apache Spark</strong> is an open-source distributed computational framework that is created to provide faster computational results. It is an in-memory computational engine, meaning the data will be processed in memory.</p><p><strong>Spark</strong> supports various APIs for streaming, graph processing, SQL, MLLib. It also supports Java, Python, Scala, and R as the preferred languages. Spark is mostly installed in <a href="https://www.tecmint.com/best-practices-for-deploying-hadoop-server-on-centos/">Hadoop clusters</a> but you can also install and configure spark in standalone mode.</p><p>In this article, we will be seeing how to install <strong>Apache Spark</strong> in <strong>Ubuntu</strong>-based distributions.</p><h3>Install Java and Scala in Ubuntu</h3><p>To install <strong>Apache Spark</strong> in Ubuntu, you need to have <strong>Java</strong> and <strong>Scala</strong> installed on your machine. Most of the modern distributions come with Java installed by default and you can verify it using the following command.Install Apache Spark in Ubuntu</p><pre>Install Apache Spark in Ubuntu$ java -version</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/893/1*GQyc7sshYY8YOVHlEENsgw.png" /></figure><p>If no output, you can install Java using our article on <a href="https://www.tecmint.com/install-java-with-apt-on-ubuntu/">how to install Java on Ubuntu</a> or simply run the following commands to install Java on Ubuntu and Debian-based distributions.</p><pre>$ sudo apt update<br>$ sudo apt install default-jre<br>$ java -version</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*u4zkaGHZ5bbS_FFODAwCBQ.png" /></figure><p>Install Apache Spark in UbuntuNext, you can install <strong>Scala</strong> from the apt repository by running the following commands to search for scala and install it.</p><p>By default, Scala is available in the Ubuntu base repository. Now run the following command below to install the Scala programming language on your system:</p><pre>$ sudo apt install scala<br>$ scala -version</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*7ZJGVcAK4JcvVn9VeilEyw.png" /></figure><p>Congratulations! You have successfully installed Scala. Thank you for using this tutorial to install Scala programming language on Ubuntu. For additional help or useful information, we recommend that you refer to <a href="https://www.scala-lang.org/">the official website of Scala</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eabf0e2c61a2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/featurepreneur/how-to-setup-scala-on-ubuntu-eabf0e2c61a2">How to setup Scala on Ubuntu</a> was originally published in <a href="https://medium.com/featurepreneur">featurepreneur</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flask — (Creating simple application)]]></title>
            <link>https://medium.com/featurepreneur/flask-creating-simple-application-28250c99eefe?source=rss-219d94db54d3------2</link>
            <guid isPermaLink="false">https://medium.com/p/28250c99eefe</guid>
            <category><![CDATA[python-web-developer]]></category>
            <category><![CDATA[flask]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[flask-framework]]></category>
            <category><![CDATA[python-programming]]></category>
            <dc:creator><![CDATA[Thangarajnagulraj]]></dc:creator>
            <pubDate>Tue, 27 Sep 2022 13:28:29 GMT</pubDate>
            <atom:updated>2022-09-27T13:28:29.017Z</atom:updated>
            <content:encoded><![CDATA[<h3>Flask — (Creating simple application)</h3><h3>Building a webpage using python.</h3><p>There are many modules or frameworks which allow building your webpage using python like a bottle, Django, Flask, etc. But the real popular ones are Flask and Django. Django is easy to use as compared to Flask but Flask provides you with the versatility to program with.</p><p>To understand what Flask is you have to understand a few general terms.</p><ol><li><strong>WSGI — </strong>Web Server Gateway Interface (WSGI) has been adopted as a standard for Python web application development. WSGI is a specification for a universal interface between the web server and the web applications.</li><li><strong>Werkzeug —</strong> It is a WSGI toolkit, which implements requests, response objects, and other utility functions. This enables building a web framework on top of it. The Flask framework uses Werkzeug as one of its bases.</li><li><strong>jinja2 — </strong>jinja2 is a popular templating engine for Python. A web templating system combines a template with a certain data source to render dynamic web pages.</li></ol><p><a href="https://en.wikipedia.org/wiki/Flask_(web_framework)"><strong>Flask</strong></a> is a web application framework written in Python. Flask is based on the Werkzeug WSGI toolkit and Jinja2 template engine. Both are Pocco projects.</p><p><strong>Installation:</strong></p><p>We will require two packages to set up your environment. <em>virtualenv </em>for a user to create multiple Python environments side-by-side. Thereby, it can avoid compatibility issues between the different versions of the libraries and the next will be <em>Flask </em>itself.</p><p><strong>Create conda environment</strong></p><pre>conda create --name py39 python=3.9</pre><p><strong>Activate conda environment</strong></p><pre>conda activate py39</pre><p><strong>Flask</strong></p><pre>pip install Flask</pre><p>After completing the installation of the package, let’s get our hands on the code.</p><pre># Importing flask module in the project is mandatory<br># An object of Flask class is our WSGI application.<br>from flask import Flask</pre><pre># Flask constructor takes the name of<br># current module (__name__) as argument.<br>app = Flask(__name__)</pre><pre># The route() function of the Flask class is a decorator,<br># which tells the application which URL should call<br># the associated function.<br><a href="http://twitter.com/app">@app</a>.route(&#39;/&#39;)<br># ‘/’ URL is bound with hello_world() function.<br>def hello_world():<br> return &#39;Hello World&#39;</pre><pre># main driver function<br>if __name__ == &#39;__main__&#39;:</pre><pre># run() method of Flask class runs the application<br> # on the local development server.<br> app.run()</pre><p>Save it in a file and then run the script we will be getting an output like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/874/1*vTXyRYOn7EtiUUTnwKszaQ.png" /></figure><p>Then go to the URL given there you will see your first webpage displaying hello world there on your local server.<br>Digging further into the context, the <strong>route()</strong> decorator in Flask is used to bind a URL to a function. Now to extend this functionality our small web app is also equipped with another method <strong>add_url_rule()</strong> which is a function of an application object that is also available to bind a URL with a function as in the above example, route() is used.</p><pre>def hellothere():<br>   return ‘hello there’<br>app.add_url_rule(‘/’, ‘hello’, hellothere)</pre><p><strong>Output:</strong></p><pre>hello there</pre><p>You can also add variables in your web app, well you might be thinking about how it’ll help you, it’ll help you to build a URL dynamically. So let’s figure it out with an example.</p><pre>from flask import Flask<br>app = Flask(__name__)</pre><pre><a href="http://twitter.com/app">@app</a>.route(&#39;/hello/&lt;name&gt;&#39;)<br>def hello_name(name):<br>return &#39;Hello %s!&#39; % name</pre><pre>if __name__ == &#39;__main__&#39;:<br>app.run()</pre><p>And go to the URL <a href="http://127.0.0.1:5000/hello/geeksforgeeks"><em>http://127.0.0.1:5000/hello/hellothere</em></a><em> </em>it’ll give you the following output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*BdjJWgjwnteCo83McfXsYw.png" /></figure><p>We can also use HTTP methods in Flask let’s see how to do that<br>The HTTP protocol is the foundation of data communication on the world wide web. Different methods of data retrieval from specified URL are defined in this protocol. The methods are described down below.</p><pre><strong><em>GET :</em></strong><em> Sends data in simple or unencrypted form to the server.<br></em><strong><em>HEAD :</em></strong><em> Sends data in simple or unencrypted form to the server without body. <br></em><strong><em>HEAD :</em></strong><em> Sends form data to the server. Data is not cached.<br></em><strong><em>PUT : </em></strong><em>Replaces target resource with the updated content.<br></em><strong><em>DELETE :</em></strong><em> Deletes target resource provided as URL.</em></pre><p>By default, the Flask route responds to the GET requests. However, this preference can be altered by providing methods argument to route() decorator. In order to demonstrate the use of the POST method in URL routing, first, let us create an HTML form and use the POST method to send form data to a URL. Now let’s create an HTML login page.</p><p>Below is the source code of the file:</p><pre>&lt;html&gt;<br>&lt;body&gt; <br> &lt;form action = &quot;<a href="http://localhost:5000/login">http://localhost:5000/login</a>&quot; method = &quot;post&quot;&gt;</pre><pre>&lt;p&gt;Enter Name:&lt;/p&gt;</pre><pre>&lt;p&gt;&lt;input type = &quot;text&quot; name = &quot;nm&quot; /&gt;&lt;/p&gt;</pre><pre>&lt;p&gt;&lt;input type = &quot;submit&quot; value = &quot;submit&quot; /&gt;&lt;/p&gt;</pre><pre>&lt;/form&gt; <br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>Now save this file HTML and try this python script to create the server.</p><pre>from flask import Flask, redirect, url_for, request<br>app = Flask(__name__)</pre><pre><a href="http://twitter.com/app">@app</a>.route(&#39;/success/&lt;name&gt;&#39;)<br>def success(name):<br> return &#39;welcome %s&#39; % name</pre><pre><a href="http://twitter.com/app">@app</a>.route(&#39;/login&#39;, methods=[&#39;POST&#39;, &#39;GET&#39;])<br>def login():<br> if request.method == &#39;POST&#39;:<br>  user = request.form[&#39;nm&#39;]<br>  return redirect(url_for(&#39;success&#39;, name=user))<br> else:<br>  user = request.args.get(&#39;nm&#39;)<br>  return redirect(url_for(&#39;success&#39;, name=user))</pre><pre>if __name__ == &#39;__main__&#39;:<br> app.run(debug=True)</pre><p>After the development server starts running, open login.html in the browser, enter your name in the text field and click <em>submit </em>button. The output would be the following.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*lGdv_xiMIDcyqtQrIFbeDA.png" /></figure><p>The result will be something like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/1*gujydavH3gSAPAxf8_5YHQ.png" /></figure><p>And there’s much more to Flask than this. If you are interested in this web framework of Python you can dig into the flask documentation .</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28250c99eefe" width="1" height="1" alt=""><hr><p><a href="https://medium.com/featurepreneur/flask-creating-simple-application-28250c99eefe">Flask — (Creating simple application)</a> was originally published in <a href="https://medium.com/featurepreneur">featurepreneur</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Pandas]]></title>
            <link>https://medium.com/featurepreneur/introduction-to-pandas-995e072cdd2d?source=rss-219d94db54d3------2</link>
            <guid isPermaLink="false">https://medium.com/p/995e072cdd2d</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[python3]]></category>
            <dc:creator><![CDATA[Thangarajnagulraj]]></dc:creator>
            <pubDate>Tue, 27 Sep 2022 13:26:47 GMT</pubDate>
            <atom:updated>2022-09-27T13:26:47.471Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*aFhjkhfLZOJpdL6y.png" /></figure><p>Pandas is an API used to analyze, organize, and structure data. It is widely accepted among the Python community and is used in many other packages, frameworks, and modules. Pandas has a wide variety of use-cases and is hugely flexible for preparing your input data for machine learning, deep learning, and neural network models. With tools like DataFrames and Series you can create collections and sequences that are multi-dimensional. This allows greater indexing and slicing abilities. Pandas is open source and a BSD-licensed library. So, let’s see how you can structure, manipulate, and organize your data with Pandas.</p><h3>Table of Contents</h3><ul><li><a href="https://medium.com/p/cc3bc6355155#70f9"><strong>Installing Pandas</strong></a></li><li><a href="https://medium.com/p/cc3bc6355155#feba"><strong>Exploring Pandas Series</strong></a></li><li><a href="https://medium.com/p/cc3bc6355155#53c9"><strong>Exploring Pandas DataFrames</strong></a></li><li><a href="https://medium.com/p/cc3bc6355155#18a9"><strong>Working with Data in Pandas (Example)</strong></a></li><li><a href="https://medium.com/p/cc3bc6355155#d196"><strong>Conclusion</strong></a></li></ul><h3>Installing Pandas</h3><p>Pandas installs through the PIP</p><pre>pip install pandas</pre><p>Pandas integrates with many tabular file types and is good at working with these file types by converting them into Pandas DataFrames. A DataFrames in Pandas is a specific type of data table. You can do things like manipulate data, handle timeseries data, plot graphs, reshape data structures, combine data, sort data, and filter data.</p><p>You can import Pandas into your Python code as follows:</p><pre>import pandas as pd</pre><p>There are multiple ways to create Pandas DataFrames. You can convert dictionaries, lists, tabular data, and Pandas Series objects into DataFrames or you can create them using the pd.DataFrame() method. The Series object is like a one column DataFrame. So, as you can imagine DataFrames are a collection of one or more Series. You can create a series object using pd.Series().</p><h3>Exploring Pandas Series</h3><p>Basic Pandas Series construction looks like this.</p><pre>pd.Series([1, 2, 3, 4])</pre><p>Usually you will want to name your series by assigning a variable name.</p><pre>my_series = pd.Series([1, 2, 3, 4])</pre><p>You can assign named Pandas Series to a DataFrame as follows.</p><pre>first_series = pd.Series([1, 2, 3, 4])<br>second_series = pd.Series([&#39;one&#39;, &#39;two&#39;, &#39;three&#39;, &#39;four&#39;])</pre><h3>Exploring Pandas DataFrames</h3><p>You can convert many file-types to Pandas DataFrames. Here are some of the more common methods used for this.</p><pre><a href="https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html#pandas.read_csv"><strong>read_csv</strong></a>(filepath_or_buffer[, sep, …])<br><a href="https://pandas.pydata.org/docs/reference/api/pandas.read_excel.html#pandas.read_excel"><strong>read_excel</strong></a>(*args, **kwargs)<br><a href="https://pandas.pydata.org/docs/reference/api/pandas.read_json.html#pandas.read_json"><strong>read_json</strong></a>(*args, **kwargs)<br><a href="https://pandas.pydata.org/docs/reference/api/pandas.read_html.html#pandas.read_html"><strong>read_html</strong></a>(*args, **kwargs)</pre><p>You can also manipulate data from file-types with some of these more used methods.</p><pre><a href="https://pandas.pydata.org/docs/reference/api/pandas.ExcelFile.parse.html#pandas.ExcelFile.parse"><strong>ExcelFile.parse</strong></a>([sheet_name, header, names, …])<br><a href="https://pandas.pydata.org/docs/reference/api/pandas.ExcelWriter.html#pandas.ExcelWriter"><strong>ExcelWriter</strong></a>(path[, engine])</pre><p>You also have methods you can use on DataFrames to help structure and manipulate your data correctly. I recommend reading the docs to understand all of what you can do with DataFrames, but these are some of the more used methods and attributes.</p><pre># constructor<a href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html#pandas.DataFrame"><strong><br>DataFrame</strong></a>([data, index, columns, dtype, copy])</pre><p>DataFrames have five parameters data, index, columns, dtype, and copy.</p><p>DataFrames are used as input for many machine learning, deep learning, and neural network models. It is also good for EDA (Exploratory Data Analysis). Knowing and using at least the basics in Pandas is a must for most Data Science with Python projects.</p><h3>Working with Data in Pandas (Example)</h3><p>I will do examples on a <a href="https://www.kaggle.com/shubh0799/churn-modelling">customer churn dataset</a> that is available on Kaggle.</p><p>Let’s start by reading the csv file into a pandas dataframe.</p><pre>import numpy as np<br>import pandas as pd</pre><pre>df = pd.read_csv(&quot;/content/churn.csv&quot;)df.shape(10000,14)</pre><pre>df.columns<br>Index([&#39;RowNumber&#39;, &#39;CustomerId&#39;, &#39;Surname&#39;, &#39;CreditScore&#39;, &#39;Geography&#39;, &#39;Gender&#39;, &#39;Age&#39;, &#39;Tenure&#39;, &#39;Balance&#39;, &#39;NumOfProducts&#39;, &#39;HasCrCard&#39;,&#39;IsActiveMember&#39;,&#39;EstimatedSalary&#39;, &#39;Exited&#39;], dtype=&#39;object&#39;)</pre><h3>1. Dropping columns</h3><p>The drop function is used to drop columns and rows. We pass the labels of rows or columns to be dropped.</p><pre>df.drop([&#39;RowNumber&#39;, &#39;CustomerId&#39;, &#39;Surname&#39;, &#39;CreditScore&#39;], axis=1, inplace=True)</pre><pre> df.shape<br>(10000,10)</pre><p>The axis parameter is set as 1 to drop columns and 0 for rows. The inplace parameter is set as True to save the changes. We dropped 4 columns so the number of columns reduced to 10 from 14.</p><h3>2. Select particular columns while reading</h3><p>We can read only some of the columns from the csv file. The list of columns is passed to the usecols parameter while reading. It is better than dropping later on if you know the column names beforehand.</p><pre>df_spec = pd.read_csv(&quot;/content/churn.csv&quot;, usecols=[&#39;Gender&#39;, &#39;Age&#39;, &#39;Tenure&#39;, &#39;Balance&#39;])</pre><pre>df_spec.head()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/0*KYIf3TXVJqGvcIFQ.png" /></figure><h3>3. Reading a part of the dataframe</h3><p>The read_csv function allows reading a part of the dataframe in terms of the rows. There are two options. The first one is to read the first n number of rows.</p><pre>df_partial = pd.read_csv(&quot;/content/churn.csv&quot;, nrows=5000)</pre><pre>df_partial.shape<br>(5000,14)</pre><p>Using the nrows parameters, we created a dataframe that contains the first 5000 rows of the csv file.</p><p>We can also select rows from the end of the file by using the skiprows parameter. Skiprows=5000 means that we will skip the first 5000 rows while reading the csv file.</p><h3>4. Sample</h3><p>After creating a dataframe, we may want to draw a small sample to work. We can either use the n parameter or frac parameter to determine the sample size.</p><ul><li>n: The number of rows in the sample</li><li>frac: The ratio of the sample size to the whole dataframe size</li></ul><pre>df_sample = df.sample(n=1000)</pre><pre>df_sample.shape<br>(1000,10)df_sample2 = df.sample(frac=0.1)</pre><pre>df_sample2.shape<br>(1000,10)</pre><h3>5. Checking the missing values</h3><p>The isna function determines the missing values in a dataframe. By using the isna with the sum function, we can see the number of missing values in each column.</p><pre>df.isna().sum()</pre><p>(image by author)</p><p>There are no missing values.</p><h3>6. Adding missing values using loc and iloc</h3><p>I’m doing this example to practice the “loc” and “iloc”. These methods select rows and columns based on index or label.</p><ul><li>loc: selects with label</li><li>iloc: selects with index</li></ul><p>Let’s first create 20 random indices to select.</p><pre>missing_index = np.random.randint(10000, size=20)</pre><p>We will use these indices to change some values as np.nan (missing value).</p><pre>df.loc[missing_index, [&#39;Balance&#39;,&#39;Geography&#39;]] = np.nan</pre><p>There are 20 missing values in the “Balance” and “Geography” columns. Let’s do another example using the indices instead of labels.</p><pre>df.iloc[missing_index, -1] = np.nan</pre><p>“-1” is the index of the last column which is “Exited”.</p><p>Although we’ve used different representations of columns for loc and iloc, row values have not changed. The reason is that we are using numerical index labels. Thus, both label and index for a row are the same.</p><p>The number of missing values have changed.7. Filling missing values</p><p>The fillna function is used to fill the missing values. It provides many options. We can use a specific value, an aggregate function (e.g. mean), or the previous or next value.</p><p>For the geography column, I will use the most common value.</p><pre>mode = df[&#39;Geography&#39;].value_counts().index[0]<br>df[&#39;Geography&#39;].fillna(value=mode, inplace=True)</pre><p>Similarly, for the balance column, I will use the mean of the column to replace missing values.</p><pre>avg = df[&#39;Balance&#39;].mean()<br>df[&#39;Balance&#39;].fillna(value=avg, inplace=True)</pre><p>The method parameter of the fillna function can be used to fill missing values based on the previous or next value in a column (e.g. method=’ffill’). It can be pretty useful for sequential data (e.g. time series).</p><h3>8. Dropping missing values</h3><p>Another way to handle missing values is to drop them. There are still missing values in the “Exited” column. The following code will drop rows that have any missing value.</p><pre>df.dropna(axis=0, how=&#39;any&#39;, inplace=True)</pre><p>The axis=1 is used to drop columns with missing values. We can also set a threshold value for the number of non-missing values required for a column or row to have. For instance, thresh=5 means that a row must have at least 5 non-missing values not to be dropped. The rows that have 4 or fewer missing values will be dropped.</p><p>The dataframe does not have any missing values now.</p><pre>df.isna().sum().sum()<br>0</pre><h3>9. Selecting rows based on conditions</h3><p>In some cases, we need the observations (i.e. rows) that fit some conditions. For instance, the below code will select customers who live in France and have churned.</p><pre>france_churn = df[(df.Geography == &#39;France&#39;) &amp; (df.Exited == 1)]france_churn.Geography.value_counts()<br>France    808</pre><h3>Conclusion</h3><p>The Pandas library is really an amazing tool to have in Python. This article just goes over the tip of the iceberg as to what you can accomplish with the Pandas API. You can begin to see the true capabilities that Pandas has to offer when starting to work with data in Python. Learning Pandas and how it works will improve your Python experience with Data Science by allowing you to have more control over your input data. This will not only give you more flexibility and power when exploring data, but also when working directly with it to achieve your programmatic, computational, or scientific goals. I hope this helps anyone wanting to learn more about the Pandas API in Python. Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=995e072cdd2d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/featurepreneur/introduction-to-pandas-995e072cdd2d">Introduction to Pandas</a> was originally published in <a href="https://medium.com/featurepreneur">featurepreneur</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Create a Docker Container using Dockerfile]]></title>
            <link>https://medium.com/featurepreneur/how-to-create-a-docker-container-using-dockerfile-40ac08a69fbd?source=rss-219d94db54d3------2</link>
            <guid isPermaLink="false">https://medium.com/p/40ac08a69fbd</guid>
            <dc:creator><![CDATA[Thangarajnagulraj]]></dc:creator>
            <pubDate>Tue, 27 Sep 2022 13:20:52 GMT</pubDate>
            <atom:updated>2022-09-27T13:20:52.009Z</atom:updated>
            <content:encoded><![CDATA[<p>Docker allows you to build containers using a Dockerfile. Docker can build images automatically by reading the instructions from a Dockerfile. A Dockerfile is a text document that contains all the commands a user could call on the command line to build an image.</p><p>A Dockerfile consists of various commands and arguments listed successively to automatically perform actions on a base image in order to create a new one. It helps us to avoid issuing the command every time while running container.</p><p>You can build the Docker image using one of the following two options:</p><ol><li>Interactively launch a BASH shell under the Python Base image and then save the image.</li><li>Build the Docker image using Dockerfile with the web site included.</li></ol><p>In this tutorial, I will explain how to create a Dockerfile, install the Python packages, add the necessary content and then build the image.</p><h3>Requirements</h3><p>python:3.9.5-slim-buster with Docker installed on your system.</p><h3>Creating a Dockerfile</h3><p>A Dockerfile is a text file that has a series of instructions to build an image. It supports a set of commands that we need to use in our Dockerfile.</p><p>There are several commands supported like FROM, CMD, ENTRYPOINT, VOLUME, ENV and many more. Each and every instruction set in the Dockerfile adds an additional layer to the image and then performs a commit.</p><p>Here, we will create a Dockerfile to create an image to install the Apache Web Server container.</p><p>Here, we will create a Dockerfile to pull the image already created python:3.9.5-slim-buster</p><p>To do this, we will need to create a file named Dockerfile using any text editor:</p><p>Add the following content which includes the commands and arguments for the container.</p><pre>FROM python:3.9.5-slim-busterWORKDIR /codeCOPY . /codeRUN pip3 install -r requirements.txtEXPOSE 5000CMD [&quot;python3&quot;,&quot;app.py&quot;]</pre><p>Now, save and close the file.</p><p>In the above Dockerfile, the first parameter FROM tells Docker what the source of our image is, in this example we&#39;re using python-flask image.</p><p>A RUN parameter executes a series of commands inside the image to install package. Here we are installing the python requirements package.</p><p>The EXPOSE parameter set&#39;s the default Apache port 5000 so that the website will be available normally.</p><h3>Building an Image using Dockerfile</h3><p>Now, after we finish creating our Dockerfile for the python-flask container, we are ready to create our first python-flask images with docker</p><p>We’ll need to run the following command in our current working base directory to build an image.</p><pre>sudo docker build -t python-flask .</pre><p>-&gt; The -t parameter used to tag the Docker image. The . parameter is used to specify the location of the Dockerfile that we created.</p><h3>Creating a Docker Container</h3><p>Using the image we have built, we will now proceed to create a container running an python-flask inside, using a name of our choice. Here we will use python-flask.</p><pre>sudo docker run --name python-flask -p 80:80</pre><p>After setting everything up, you can verify the Apache Web Server by typing the url http://localhost:80 in your web browser.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40ac08a69fbd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/featurepreneur/how-to-create-a-docker-container-using-dockerfile-40ac08a69fbd">How to Create a Docker Container using Dockerfile</a> was originally published in <a href="https://medium.com/featurepreneur">featurepreneur</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS CloudWatch]]></title>
            <link>https://medium.com/featurepreneur/aws-cloudwatch-617d49b802c5?source=rss-219d94db54d3------2</link>
            <guid isPermaLink="false">https://medium.com/p/617d49b802c5</guid>
            <category><![CDATA[aws-s3]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[aws-ec2]]></category>
            <category><![CDATA[aws-cloudwatch]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Thangarajnagulraj]]></dc:creator>
            <pubDate>Tue, 27 Sep 2022 13:17:28 GMT</pubDate>
            <atom:updated>2022-09-27T13:17:28.491Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*c5n_HLPND-UNB-6KeTB_Ag.jpeg" /></figure><p>Amazon CloudWatch is a monitoring service for AWS cloud resources and your AWS-based applications. Amazon CloudWatch may be used to gather and track metrics, collect and monitor log files, create alarms, and automatically respond to changes in your AWS resources. This AWS CloudWatch tutorial will teach you the fundamentals of the service as well as how to use it.</p><p>While more organizations are migrating their applications to the cloud, they also need to ensure that cloud-based services like Amazon Web Services (AWS) and other resources are available to the business. So, how do you ensure that these cloud services are not disabled? You can do that using an application monitoring tool like Amazon CloudWatch. In this article, we are going to all about What is Amazon CloudWatch?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OO5u6aE9D1Eg1266W566eA.png" /></figure><p>The Amazon CloudWatch service is among the efficient ways of monitoring AWS applications and resources running on the AWS platform. Using cloud-based monitoring, CloudWatch collects operational data through logs, metrics, and events that provide a unified view of AWS resources and applications.</p><h3>AWS Cloudwatch Tutorial</h3><p>In this AWS Cloudwatch Tutorial, you will learn the below topics:</p><p>AWS Cloudwatch Tutorial — Table of Content</p><ul><li><a href="https://mindmajix.com/aws-cloudwatch-tutorial#what-is-amazon">What is Amazon CloudWatch?</a></li><li><a href="https://mindmajix.com/aws-cloudwatch-tutorial#how-does-amazon-cloudwatch-work">How does Amazon CloudWatch work?</a></li><li><a href="https://mindmajix.com/aws-cloudwatch-tutorial#what-is-the-need">What is the need for Cloud-Based monitoring?</a></li><li><a href="https://mindmajix.com/aws-cloudwatch-tutorial#what-are-the-benefits">What are the benefits of Amazon CloudWatch?</a></li><li><a href="https://mindmajix.com/aws-cloudwatch-tutorial#how-to-create">How to create CloudWatch Dashboards?</a></li><li><a href="https://mindmajix.com/aws-cloudwatch-tutorial#how-to-create-and-configure">How to create and configure CloudWatch Alarms?</a></li></ul><h3>What is Amazon CloudWatch?</h3><p>Designed as an AWS component, Amazon CloudWatch provides cloud-based monitoring of AWS resources including — EC2 instances, elastic, load balancers, auto-scaling groups — along with other<a href="https://mindmajix.com/top-aws-services"> Amazon services</a> like Amazon S3, SNS, SQS, and RDS. Amazon administrators can easily monitor multiple AWS instances and applications from a centralized dashboard.</p><p>Additionally, CloudWatch can also be used to:</p><ul><li>Detect any anomaly in your cloud environment.</li><li>Create custom dashboards that include metrics of the AWS services that you use.</li><li>Create and configure alarms that can monitor AWS metrics and initiate automated actions.</li><li>Gain complete visibility into application performance, utilization of AWS resources, and overall health of your operations.</li></ul><h3>How does Amazon CloudWatch work?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XJnoFmh5Tf4ysi_6fVGzYQ.jpeg" /></figure><p>The Amazon CloudWatch primarily performs the following four actions:</p><h4>1. Collect metrics and logs</h4><p>In the first step, <a href="https://aws.amazon.com/cloudwatch/">CloudWatch</a> collects metrics and logs from all your AWS services (for example, AWS EC2 instances). CloudWatch retrieves these metrics from the repository. This can also include custom metrics entered into the repository.</p><p>Here are some AWS services that publish CloudWatch metrics — Amazon API Gateway, AppStream version 2.0, Amazon Athena, and Amazon CloudFront.</p><h4>2. Monitor and visualize the data</h4><p>Next, CloudWatch monitors and visualizes this data using CloudWatch dashboards that provide a single unified view of all your AWS applications, resources, and services (running in premise or on the cloud). Additionally, you can correlate your collected metrics and logs to perform a visual analysis of the overall health and current performance of your resources.</p><h4>3. Act on an automated response to any changes.</h4><p>In this step, CloudWatch executes an automated response to any operational changes using alarms. For instance, you can configure an alarm to start or terminate an EC2 instance when selected conditions are satisfied. You can also use alarms to start services like Amazon EC2 auto-scaling or Amazon SNS.</p><p>If a configured alarm is triggered, you can set up automated actions like auto-scaling.</p><h4>4. Analyse your metrics</h4><p>The final step is to analyze and visualize your collected metric and log data — that can enable better insight and understanding. You can perform real-time analysis using CloudWatch Metric Math which helps you dive deeper into your data.</p><h3>What is the need for Cloud-Based monitoring?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pOq27iQEETxE7oC0mDJRVg.jpeg" /></figure><p>Be it on the premise or on the cloud, every business needs to ensure that its applications and services are running smoothly and productively. In addition to both web and cloud applications, a cloud-based monitoring tool is essential for monitoring cloud platforms, infrastructure, and networks.</p><p>For any web application deployed on the cloud, every business owner has questions related to the:</p><ul><li>The overall bandwidth consumed by the application on a daily basis</li><li>The number of online users that are using the application</li><li>The overall performance of the application on the cloud</li><li>The level of customer satisfaction with the application</li></ul><p>Cloud-based monitoring services like CloudWatch enable you to track how your application is performing on the cloud. Additionally, you can identify any performance bottlenecks or issues, thus enabling you to eliminate them and improve your application performance. This can help in business growth in the long run.</p><p>With the increasing number and complexity of AWS services, it’s no longer feasible to manually monitor your applications and services, hence you need an automation tool like CloudWatch.</p><h3>What are the benefits of Amazon CloudWatch?</h3><p>Amazon CloudWatch offers the following 5 benefits to businesses:</p><h4>1. Access all monitoring data from a single dashboard</h4><p>Amazon CloudWatch allows you to monitor data from different services using a single dashboard. CloudWatch is natively integrated with over 70 AWS-related services.</p><p>Cloud-based applications including AWS applications generate large volumes of data through metrics and logs. CloudWatch allows you to easily collect and integrate all data from various applications and services and provide a visual representation of the analyzed data on the dashboard.</p><h4>2. Collects and analyze metrics from AWS and on-premise applications</h4><p>Thanks to its seamless integration with over 70 AWS services, CloudWatch can collect and publish metric data automatically. This includes 1-minute native — and customized — metrics with 1-second granularity. CloudWatch is also supported on a hybrid AWS architecture that uses both on-premises and cloud-based resources.</p><p>Using this metric and log data, you can now optimize your AWS services and resources to achieve the best performance and throughput.</p><h4>3. Improve your operational efficiency and optimize your available resource</h4><p>The Amazon CloudWatch service provides real-time insights into cloud operations that enable you to optimize operational efficiency and reduce costs. By monitoring the utilization of AWS resources, you can be better informed of the kind of workload capacities that you require for your applications.</p><p>Through the use of configured alarms, CloudWatch can automate your actions based on preconfigured thresholds or on the basis of machine learning algorithms that can detect anomalies in your metric data.</p><h4>4. Improve operational visibility</h4><p>With the Amazon CloudWatch service, you gain operational visibility across all your running applications, networks, infrastructure stacks, and other AWS services. For instance, you can use CloudWatch to monitor the memory usage and bandwidth for any application, so as to optimize them for better performance.</p><p>Additionally, you can perform metric-related mathematical operations to derive operational insights from your data. For instance, you can aggregate memory usage across multiple EC2 instances. As a result, you gain complete visibility of your entire system and can detect and resolve any performance issues.</p><h4>5. Extract valuable insights</h4><p>Finally, Amazon CloudWatch enables you to extract valuable and actionable insights from generated logs of different AWS services and applications. You can explore, analyze, and then visualize your log data to monitor data like memory usage, CPU utilization, and capacity usage.</p><p>With CloudWatch, you only need to pay for the log queries that you run, which can also scale with higher log volume and complexity.</p><h3>How to create CloudWatch Dashboards?</h3><p>Amazon CloudWatch dashboards are customizable dashboards that provide a unified view of all your AWS resources — including those that are located in different AWS regions. As an AWS administrator, you can create an unlimited number of CloudWatch dashboards on your AWS account.</p><p>You can create the dashboard using the:</p><ul><li>CloudWatch console</li><li>PutDashboard API</li></ul><p>Here’s how you can create a CloudWatch dashboard using the CloudWatch console:</p><p>1. Open the CloudWatch console.</p><p>2. From the navigation pane, click Dashboards &gt; Create a dashboard.</p><p>3. From the “Create new dashboard” box that appears, enter your dashboard name and then click “Create a dashboard.”</p><p>If you enter the dashboard name as “CloudWatch-Default,” your dashboard will be displayed on the CloudWatch home page. Alternatively, if you use the name “CloudWatch-Default-&lt;Resource Group Name&gt;,” the dashboard appears on the CloudWatch home page when you open the particular AWS resource group.</p><p>4. As required, perform any of the following actions in the “Add to this dashboard” box:</p><p>a. To add a graph to the dashboard:</p><ul><li>Select either Line or Stacked Area and then click Configure.</li><li>From the “Add metric graph” dialog box, choose the metrics to be included in the graph and then click “Create widget.”</li></ul><p>b. To add a number that displays a metric on the dashboard:</p><ul><li>Select Number and then click Configure.</li><li>Select metrics to be included in the graph from the “Add metric graph” dialog box and then click “Create widget.”</li></ul><p>c. For adding a text block to the dashboard:</p><ul><li>Select Text and then click Configure.</li><li>From the “New text widget” dialog box, choose “Markdown” and then add and format your text.</li><li>Click “Create widget.”</li></ul><p>5. Repeat Step 4 to add more dashboard widgets if required.</p><p>6. Save your dashboard.</p><p>You can also create or modify a CloudWatch dashboard using the PutDashboard API function. Here are some of the common parameters that are used with this API:</p><ul><li>DashboardName (mandatory): specifies the dashboard name in String format.</li><li>DashboardBody (mandatory): contains all the dashboard information including the widgets to be added and their location on the dashboard.</li></ul><h3>How to create and configure CloudWatch Alarms?</h3><p>Amazon CloudWatch allows you to create both the following types of alarms:</p><p>Metric alarms monitor a single metric or a math metric that is based on a mathematical expression.</p><p>Composite alarms are triggered only if the condition for all other configured alarms is satisfied.</p><p>You can also create an alarm that is based on:</p><ul><li>Static threshold of a single metric</li><li>Anomaly detection</li><li>Metric maths expression</li></ul><p>Here’s how you can create a CloudWatch alarm —Conclusion based on a single metric — using the CloudWatch console:</p><p>1. Open the <a href="https://console.aws.amazon.com/cloudwatch/">CloudWatch console</a>.</p><p>2. From the navigation pane, click Alarms &gt; Create Alarm.</p><p>3. Select your metric and then perform either of the following actions:</p><ul><li>Select the service namespace containing the metrics that you want to include.</li><li>Search for a metric in the search box and then press Enter.</li></ul><p>4. From the “Graphed metrics” tab, perform the following actions:</p><ul><li>From Statistics, choose any of the available statistics or percentiles.</li><li>From Period, specify the evaluation period of the alarm.</li><li>Click “Select metric” to display the “Specify metric and conditions” page that shows all information of the metric and statistics that you have specified.</li></ul><p>5. From the “Conditions” tab, perform the following actions:</p><ul><li>Specify the name and description of the alarm.</li><li>Use the “Whenever &lt;metric&gt; is” field to specify the threshold value of the metric.</li><li>Click “Additional configuration.”</li><li>In “Datapoints to alarm,” specify the number of evaluation periods (or data points) required to trigger the alarm.</li><li>From “Missing data treatment,” configure the alarm settings in the event of any missing data points.</li><li>Click Next.</li></ul><p>6. From the “Notification” tab, select the Amazon SNS topic that should be notified when the alarm is triggered.</p><p>7. Select the respective options if you want the alarm to perform auto-scaling or any other EC2 actions.</p><p>8. In the “Preview and create” tab, preview the alarm settings and then click “Create alarm.”</p><p>Here’s how you can create a CloudWatch alarm — based on anomaly detection — using the CloudWatch console:</p><p>1. Perform Steps 1 to 4 as specified above.</p><p>2. From the “Conditions” tab, perform the following actions:</p><ul><li>Select the “Anomaly detection” option</li><li>Use the “Whenever &lt;metric&gt; is” field to specify the range of metric values that can trigger the alarm.</li><li>Specify the anomaly detection number in the “Anomaly detection threshold” field</li><li>Click “Additional configuration.”</li><li>In “Datapoints to alarm,” specify the number of evaluation periods (or data points) required to trigger the alarm.</li><li>From “Missing data treatment,” configure the alarm settings in the event of any missing data points.</li><li>Click Next.</li></ul><p>3. Perform Steps 6 to 8 (as specified above) to create the alarm.</p><p>Finally, here’s how you can create a CloudWatch alarm — based on a metric math expression — using the CloudWatch console:</p><p>1. Perform Steps 1 to 4 as specified in the first procedure.</p><p>2. Click “Add a math expression” to add a new row for the expression:</p><ul><li>Add a math expression under the “Details” column of the new row.</li><li>Add a metric or another mathematical expression under the “Id” column.</li><li>Add more math expressions if required.</li></ul><p>3. Click “Select metric” to display the “Specify metric and conditions” page that shows all information of the metric math expression that you have specified.</p><p>4. Perform the remaining steps (as detailed from Steps 2d in the previous procedure.</p><p>5. Perform Steps 6 to 8 (as specified in the first procedure) to create the alarm.</p><h3>Conclusion</h3><p>Using the Amazon CloudWatch service, you can monitor cloud-based applications and other AWS services and troubleshoot any performance issues. With its single and centralized dashboard, AWS administrators now have complete visibility into applications and services running in the same or different AWS regions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=617d49b802c5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/featurepreneur/aws-cloudwatch-617d49b802c5">AWS CloudWatch</a> was originally published in <a href="https://medium.com/featurepreneur">featurepreneur</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Apache Spark In Scala]]></title>
            <link>https://medium.com/featurepreneur/introduction-to-apache-spark-in-scala-7b583278520c?source=rss-219d94db54d3------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b583278520c</guid>
            <dc:creator><![CDATA[Thangarajnagulraj]]></dc:creator>
            <pubDate>Tue, 13 Sep 2022 13:20:38 GMT</pubDate>
            <atom:updated>2022-09-13T13:20:38.159Z</atom:updated>
            <content:encoded><![CDATA[<p>This article is a follow-up note for the March edition of Scala-Lagos meet-up where we discussed Apache Spark, it’s capability and use-cases as well as a brief example in which the Scala API was used for sample data processing on Tweets. It is aimed at giving a good introduction into the strength of Apache Spark and the underlying theories behind these strengths.</p><h3>Spark — Data processing Platform</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*teesKLL6qvWEbxVrce2atw.png" /></figure><p>Apache Spark is a highly developed engine for data processing on large scale over thousands of compute engines in parallel. This allows maximizing processor capability over these compute engines. Spark has the capability to handle multiple data processing tasks including complex data analytics, streaming analytics, graph analytics as well as scalable machine learning on huge amount of data in the order of Terabytes, Zettabytes and much more.</p><p>Apache Spark owns its win to the fundamental idea behind its development — which is to beat the limitations with MapReduce, a key component of Hadoop, thus far its processing power and analytics capability is several magnitudes, 100×, better than MapReduce and with the advantage of an <strong>In-memory processing capability</strong> in that, it is able to save its data in compute engine’s memory (RAM) and also perform data processing over this data stored in memory, thus eliminating the need for a continuous Input/Output(I/O) of writing/reading data from disk.</p><p>To effectively do this, Spark relies on the use of a specialized data model known as <strong>Resilient Distributed Dataset (RDD)</strong>, that can be effectively stored in-memory and allows for various types of operations. RDDs are immutable i.e read-only format of data items that are stored in-memory as well as effectively distributed across clusters of machines, one can think of RDD as a data abstraction over raw data format e.g String, Int, that allows Spark does its work very well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zlSZFppmKcmnR2ZJSS4_jw.png" /></figure><h3>Spark Data Processing Capabilities.</h3><p><strong>Structured SQL for Complex Analytics with basic SQL</strong></p><p>A well-known capability of Apache Spark is how it allows data scientist to easily perform analysis in an SQL-like format over very large amount of data. Leveraging spark-core internals and abstraction over the underlying RDD, Spark provides what is known as DataFrames, an abstraction that integrates relational processing with Spark’s functional programming API. This is done, by adding structural information to the data to give semi-structure or full structure to the data using schema with column names and with this, a dataset can be directly queried using the column names opening another level to data processing.</p><p>Starting at version 1.6 of Spark, there is the Dataset API that comes with the Structured SQL API, it provides a high-level SQL-like capability to somewhat low-level RDD of Spark-core. In literal terms, Dataset API is an abstraction that gives an SQL feel and execution optimization to spark RDD by using the optimized SQL execution engine without also losing the functional operations that come with RDD. Both the Dataset API and Dataframe API forms the Structured SQL API.</p><p><strong>MLLib/ML Machine learning for predictive modelling</strong></p><p>Spark also provides machine learning capability by providing machine learning algorithms, data featurization algorithms and pipelining capabilities optimized to be implemented to scale over large amount of data. Spark Machine learning library’s goal is summarized thus: <em>to make practical machine learning scalable and easy.</em></p><p><strong>GraphX Graph Processing Engine.</strong></p><p>The fourth data processing capability is inherent in its capability to perform analysis on Graph data e.g in social network analysis. Spark’s GraphX API is a collection of ETL processing operations and graph algorithms that are optimized for large scale implementations on data.</p><h3>Operations on RDD, Datasets and DataFrame</h3><p>Having seen a good glimpse into the capability of Spark, it’s important to show some operations that can be applied over the various spark’s abstraction.</p><ol><li><strong>RDD</strong></li></ol><p>RDD, which is Spark’s main abstraction and more at the centre of the spark-core has two basic operations.</p><p><strong><em>Transformations </em></strong>— Transformations operations are applied on existing RDD to create new and changed RDDs. Example of such operations include <strong><em>map</em></strong>, <strong><em>filter </em></strong>and <strong><em>flatMap</em></strong> to mention a few.</p><p>Once spark Context has been used to create an RDD, these operations can be applied on the RDD as seen in the code sample below. It is important to note that the operations are lazily evaluated in that they are not directly computed until an Action operation is applied.</p><pre>val split :RDD[String] = rdd.flatMap(_.split(&quot; &quot;))<br>val trim :RDD[String] = split.map(_.trim.toLowerCase)<br>val stopwordsRemoved = trim.filter( x =&gt; !Set(&quot;and&quot;, &quot;the&quot;, &quot;is&quot;,&quot;to&quot;, &quot;she&quot;, &quot;he&quot;).contains(x))<br>val assignOne = stopwordsRemoved.map((_, 1))<br>val counts = assignOne.reduceByKey(_ + _)</pre><p><strong><em>Actions </em></strong>— Actions operations triggers an actual computation in Spark, it drives computation to return a value to the driver program. The idea of action operations is to return all computations from the cluster to the driver to produce a single result in actual Data types away from the RDD abstraction of spark. Care must be taken when initiating action operations because it’s important that the driver has enough memory to manage such data. Example of action operations includes <strong><em>reduce</em></strong>, <strong><em>collect</em></strong> and <strong><em>take</em></strong> to mention a few.</p><p><strong>2. DataSet/DataFrame</strong></p><p>As mentioned earlier, Dataset is the RDD-like optimized abstraction for Structured SQL that allows both relational operations like in SQL and functional operations like <strong><em>map</em></strong>, <strong><em>filter </em></strong>and many other similar operations that are possible with RDD. It is important to emphasize that not all DataFrame SQL-like capability are fully available with Dataset however there are many column-based functions that are still very much available with Dataset. Also, there is an added advantage of <em>encoding</em> Datasets in domain-specific objects i.e mapping a Dataset to a <em>type T</em> this helps extends the functional capabilities that are possible with Spark Dataset adding also the ability to perform powerful <em>lambda</em> operations.</p><p>Spark DataFrame can further be viewed as Dataset organized in named columns and presents as an equivalent relational table that you can use SQL-like query or even HQL. Thus, on Spark DataFrame, performing any SQL-like operations such as <strong>SELECT COLUMN-NAME</strong>, <strong>GROUPBY</strong> and <strong>COUNT</strong> to mention a few becomes relatively easy. Another interesting thing about Spark DataFrame is that these operations can be done programmatically using any of the available spark APIs — Java, Scala, Python or R as well as converting the DataFrame to a <em>temporary</em> <em>SQL table</em> in which pure SQL queries can be performed on.</p><p><strong>Conclusion.</strong></p><p>In this article, some major points covered are:</p><ul><li>Description of Spark as a next generation data processing engine</li><li>The underlying technology that gives spark its capability</li><li>Data Processing APIs that exists in Spark</li><li>A knowledge of how to work with the Data Processing APIs</li><li>A simple example to have a taste of spark processing power.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b583278520c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/featurepreneur/introduction-to-apache-spark-in-scala-7b583278520c">Introduction to Apache Spark In Scala</a> was originally published in <a href="https://medium.com/featurepreneur">featurepreneur</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Dual Boot Windows and Ubuntu — Linux Dual Booting]]></title>
            <link>https://medium.com/featurepreneur/how-to-dual-boot-windows-and-ubuntu-linux-dual-booting-dd738c92b929?source=rss-219d94db54d3------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd738c92b929</guid>
            <dc:creator><![CDATA[Thangarajnagulraj]]></dc:creator>
            <pubDate>Tue, 13 Sep 2022 13:18:21 GMT</pubDate>
            <atom:updated>2022-09-13T14:09:45.524Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Dual Boot Windows and Ubuntu — Linux Dual Booting</h3><p>You don’t have to have two different computers to use Linux and Windows. It’s possible to have a Linux distro installed on a computer with Windows preinstalled.</p><p>In this article, I will show you how to dual boot Windows and the popular Ubuntu Linux distro. But before that, you have to install Ubuntu on your Windows PC.</p><p>Before you go through this process, you must backup your files. That’s because installing an OS is a risky process. Sometimes it can overwrite the existing OS and delete all your files.</p><h3>What We’ll Cover — A step-by-step Guide to Dual-Booting Windows 10 and Linux</h3><ul><li><a href="https://www.freecodecamp.org/news/how-to-dual-boot-windows-10-and-ubuntu-linux-dual-booting-tutorial/#prerequisites">Prerequisites</a></li><li><a href="https://www.freecodecamp.org/news/how-to-dual-boot-windows-10-and-ubuntu-linux-dual-booting-tutorial/#howtopartitionyourharddriveforubuntu">How to Partition your Hard Drive for Ubuntu</a></li><li><a href="https://www.freecodecamp.org/news/how-to-dual-boot-windows-10-and-ubuntu-linux-dual-booting-tutorial/#howtooptimizeyourharddriveformorepartitionspaceoptional">How to Optimize your Hard Drive for More Partition Space (Optional)</a></li><li><a href="https://www.freecodecamp.org/news/how-to-dual-boot-windows-10-and-ubuntu-linux-dual-booting-tutorial/#howtodownloadubuntuinisoimageformat">How to Download Ubuntu in ISO Image Format</a></li><li><a href="https://www.freecodecamp.org/news/how-to-dual-boot-windows-10-and-ubuntu-linux-dual-booting-tutorial/#howtomakeanubuntulinuxbootableusbdrive">How to Make an Ubuntu (Linux) Bootable USB Drive</a></li><li><a href="https://www.freecodecamp.org/news/how-to-dual-boot-windows-10-and-ubuntu-linux-dual-booting-tutorial/#howtoinstallubuntulinuxdistroalongwithwindows10">How to Install Ubuntu Linux Distro along with Windows</a></li><li><a href="https://www.freecodecamp.org/news/how-to-dual-boot-windows-10-and-ubuntu-linux-dual-booting-tutorial/#nowyoucandualbootubuntuandwindows10">Now You Can Dual Boot Ubuntu and Windows</a></li><li><a href="https://www.freecodecamp.org/news/how-to-dual-boot-windows-10-and-ubuntu-linux-dual-booting-tutorial/#conclusion">Conclusion</a></li></ul><h3>Prerequisites</h3><p>Most importantly, there are some things you must have in place if you want to use (and dual boot) Ubuntu and Windows on the same PC:</p><ul><li>A computer preinstalled with Windows</li><li>A partitioned hard drive</li><li>A BIOS in UEFI mode (Unified Extensible Firmware Interface)</li><li>An empty USB drive of at least 16Gb for creating a bootable disk</li><li>An internet connection to download Ubuntu ISO image (the Linux distro) and Rufus.</li></ul><h3>How to Check If Your PC BIOS is in UEFI Mode</h3><p>To check if your PC BIOS comes in UEFI mode, search for “system information” and hit ENTER.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*Ju54bvZBiakGcYEajKyTNQ.png" /></figure><p>Look under BIOS mode to confirm that your PC BIOS mode comes as UEFI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/1*S9_TQYbwBUulQn6I82OD5g.png" /></figure><h3>How to Partition your Hard Drive for Ubuntu</h3><p>You have to partition your hard drive because you must set aside at least 20Gb for Ubuntu to live in and boot from.</p><p><strong>To partition your hard drive, follow the steps below</strong>:</p><p><strong>Step 1</strong>: Right-click on Start and select “Disk Management”.</p><p><strong>Step 2</strong>: Right-click on your C drive and select shrink volume.</p><p><strong>Step 3</strong>: Select at least 20Gb for Ubuntu and click “Shrink”. IT can take some time to complete, so be patient.</p><p><strong>Step 4</strong> (optional): You can go ahead and assign a letter to the new volume. Right-click on the unallocated space and select “New Simple Volume”.</p><p><strong>Step 5</strong>: Follow the wizard and assign a letter to the drive, then follow the rest of it.</p><p>After completing the wizard, the drive should be listed on your computer.</p><h3>How to Download Ubuntu in ISO Image Format</h3><p>The next thing is to download Ubuntu in ISO image format so you can install Ubuntu. You can download it from the Ubuntu distro website.</p><p>After downloading Ubuntu, don’t do anything with it yet. You need to make a bootable USB and put it in there. That’s how you’ll be able to use it.</p><p>The reason you can’t install Ubuntu just like that is that it doesn’t come as an executable. It comes in form of ISO (optical disk image). That means you have to find a disk to put it in before it can work.</p><p>The next part of this guide shows how you can put the downloaded Ubuntu ISO on a USB stick.</p><h3>How to Make an Ubuntu (Linux) Bootable USB Drive</h3><p>You won’t be able to make a bootable USB drive for Ubuntu by just placing the downloaded ISO image in it. Follow these steps to get it done:</p><p><strong>Step 1</strong>: You need to download a bootable USB drive creation tool like Rufus.</p><p><strong>Step 2</strong>: Insert the empty USB drive into your Windows 10 PC. Right-click on Rufus and select “Open”.</p><p><strong>Step 3</strong>: Under “Device”, select your USB drive. And under “Boot selection”, click the “Select” button and select the Ubuntu ISO file you downloaded</p><p><strong>Step 4</strong>: Leave every other thing as default and click the “START” button to start burning the Ubuntu distro to the drive.</p><p><strong>Step 5</strong>: Click OK to start the process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/477/1*-4BeB65Z4OLFlII0lJov-w.png" /></figure><p>Once the process is done, you should see “READY” on a green background. Click the Close button. It is time to install Ubuntu.</p><p>Congrats! Now you have a bootable drive with which you can install Linux.</p><p>The next step is to install the Ubuntu distro on your Windows 10 PC. To do this, you have to boot your PC from the bootable USB drive you created.</p><h3>How to Install Ubuntu Linux Distro along with Windows</h3><p><strong>Step 1</strong>: Ensure the bootable drive is inserted into your Windows PC.</p><p><strong>Step 2</strong>: Right-click on Start, hold SHIFT, and select Restart.</p><p><strong>Step 2</strong>: Select “Use a Device”.</p><p><strong>Step 3</strong>: On the next screen, you should see several devices you can boot from.</p><p>You may see the bootable drive as the name of the USB brand.</p><p>It’s possible to see it as “Ubuntu” too. Some other times, you might not see it, so you need to click on “See more devices”.</p><p>If you still cannot see your bootable drive, head over to your boot menu by getting into BIOS. You will see it there.</p><p><strong>Step 4</strong>: Choose “Install Ubuntu”. You can also try it before installing it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PLhisPlBIQhVdVhpr80O0w.jpeg" /></figure><p>When you get to the point to select the partition you made, scroll to the partition you made earlier and press ENTER.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ob9kr7JyQPq1e_dNqnDyOQ.jpeg" /></figure><p>Click OK to select all the space in the partition.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*91N-L7vZ3nMsbgccHl6ZRA.jpeg" /></figure><p>This time around, the “Install now” button will not be greyed out anymore.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f5Zok__kmS8DMZEnHg6gjw.jpeg" /></figure><p>Follow other prompts until Ubuntu starts installing.</p><p>After the installation is done, Ubuntu will prompt you to remove the bootable drive and press ENTER to reboot your Computer.</p><h3>Now You Can Dual Boot Ubuntu and Windows</h3><p>Immediately after you reboot the computer, you should see a screen that looks as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LjLizxkKU_l2rt20SbM64g.jpeg" /></figure><p>Now, you can select which one to boot into between Ubuntu and Windows.</p><p>To boot into Ubuntu, select Ubuntu. And to boot into Windows, select Windows boot manager.</p><h3>Conclusion</h3><p>I hope this article helps you dual boot Ubuntu and Windows on your computer.</p><p>The ultimate aim of this article was to show you how to dual boot Ubuntu and Windows.</p><p>But the article went beyond that to show you how to:</p><ul><li>check if your PC’s BIOS is in UEFI mode</li><li>partition your hard drive</li><li>make a bootable USB drive</li><li>install Ubuntu Linux Distro along with Windows on your Windows PC.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd738c92b929" width="1" height="1" alt=""><hr><p><a href="https://medium.com/featurepreneur/how-to-dual-boot-windows-and-ubuntu-linux-dual-booting-dd738c92b929">How to Dual Boot Windows and Ubuntu — Linux Dual Booting</a> was originally published in <a href="https://medium.com/featurepreneur">featurepreneur</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>