<?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 Prithviraj Singh on Medium]]></title>
        <description><![CDATA[Stories by Prithviraj Singh on Medium]]></description>
        <link>https://medium.com/@prithvirajsingh1604?source=rss-7ac4667c8ebe------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*c9lE4TrADo9WhUKu.jpg</url>
            <title>Stories by Prithviraj Singh on Medium</title>
            <link>https://medium.com/@prithvirajsingh1604?source=rss-7ac4667c8ebe------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 01:35:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@prithvirajsingh1604/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[K-Mean Clustering…]]></title>
            <link>https://prithvirajsingh1604.medium.com/k-mean-clustering-2c1f8c511f3e?source=rss-7ac4667c8ebe------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c1f8c511f3e</guid>
            <category><![CDATA[right-mentor]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[vimal-daga]]></category>
            <category><![CDATA[righteducation]]></category>
            <category><![CDATA[clustering]]></category>
            <dc:creator><![CDATA[Prithviraj Singh]]></dc:creator>
            <pubDate>Thu, 12 Aug 2021 13:58:17 GMT</pubDate>
            <atom:updated>2021-08-12T13:58:17.659Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/266/1*IQJCnXcDxauMJYsATXLefA.png" /></figure><p>Wikipedia defines K-mean clustering as:<br><strong><em>k-means clustering</em></strong><em> is a method of vector quantization, originally from signal processing, that aims to partition n observations into k clusters in which each observation belongs to the cluster with the nearest mean (cluster centers or cluster centroid), serving as a prototype of the cluster.</em></p><p>That is here take <em>n</em> observations and try to cluster them(group them) in <em>k </em>clusters. This allows us to:<br>1. Learn about similar properties of different points.<br>2. Learn about the difference between points in different clusters.<br>3. Learn about the number of clusters within same or different frames of time.</p><p>Umm… but how is this useful…? One might ask, so let’s through examples and use cases of K-mean Clustering.</p><p>Example: <a href="https://www.analyticsvidhya.com/blog/2020/07/machine-learning-study-clustering-transactions-text-descriptions/">https://www.analyticsvidhya.com/blog/2020/07/machine-learning-study-clustering-transactions-text-descriptions/</a></p><p>This article explains how UPI payment messages can be clustered into different topics to earn about the receiver’s product of interest, which can be further used for targeted advertisement. Hence this algorithm allowed the user to learn about the behavior and interest of the customer.</p><p>I found this amazingly well written article if you’d like to learn more about clustering and how it is implemented <a href="https://blog.dataiku.com/clustering-how-it-works-in-plain-english">https://blog.dataiku.com/clustering-how-it-works-in-plain-english</a>.</p><p>Finally I would like to tell you how this clustering is also helpful in cyber security:</p><p>Use of AI in cyber security has been increasing with the increasing number of users as well as the number of attackers. This is due to inability of tools IDS and IPS to adapt themselves with time i.e. whenever a new kind of attack is used by the attacker, hence complete reliance on such system can become fatal to any kind of new attack. Cyber security analytics is an alternative solution to such traditional security systems, which can use big data analytics techniques to provide a faster and scalable framework to handle a large amount of cyber security related data in real time.<br>K-means clustering is one of the most commonly used clustering algorithms in cyber security analytics aimed at dividing security related data into groups of similar entities, which in turn can help in gaining important insights about the known and unknown attack patterns. This technique helps a security analyst to focus on the data specific to some clusters. Hence reducing the time required to analyze, detect and protect against the incoming attacks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c1f8c511f3e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating a WebUI to control Kubernetes | JavaScript]]></title>
            <link>https://prithvirajsingh1604.medium.com/creating-a-webui-to-control-kubernetes-javascript-6b0b5840839f?source=rss-7ac4667c8ebe------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b0b5840839f</guid>
            <dc:creator><![CDATA[Prithviraj Singh]]></dc:creator>
            <pubDate>Thu, 12 Aug 2021 13:02:26 GMT</pubDate>
            <atom:updated>2021-08-12T13:02:26.104Z</atom:updated>
            <content:encoded><![CDATA[<p>In continuation to <a href="https://prithvirajsingh1604.medium.com/javascript-use-cases-801c54526d71">https://prithvirajsingh1604.medium.com/javascript-use-cases-801c54526d71</a>.</p><p>In this task we were asked to create a webUI using JavaScript backed with python CGI that is able to control Kubernetes and allows the user to run all Kubernetes commands through that WebUI.</p><p>Here are some screen recordings for the same… I hope you like it☺</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*593oKaI9pRFa5G260PKMcQ.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*9qhx0RZ9mSgC8rtqbTvkMg.gif" /></figure><p>This task was done in collaboration with my Summer Internship team Technoholics (Summer_09_01).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b0b5840839f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Salesforce Wo]]></title>
            <link>https://prithvirajsingh1604.medium.com/salesforce-wo-f108965694c?source=rss-7ac4667c8ebe------2</link>
            <guid isPermaLink="false">https://medium.com/p/f108965694c</guid>
            <dc:creator><![CDATA[Prithviraj Singh]]></dc:creator>
            <pubDate>Mon, 12 Jul 2021 18:59:56 GMT</pubDate>
            <atom:updated>2021-07-12T18:59:56.448Z</atom:updated>
            <content:encoded><![CDATA[<h3>Salesforce Workshop</h3><blockquote><em>I’ve attended a live workshop on Salesforce and here is a short summary off my learning:</em></blockquote><p>CRM stands for Customer Relationship Management<br>Salesforce is a CRM tool<br>Though Salesforce provides pre-created applications, we can also create customized applications in it as per our requirements.<br>Salesforce has 2 platforms: Classic and Lightning Platform.<br>Classic is an old platform whereas Lightning is a new platform and has more functionalities as compared to the classic platform.<br>In Lightning Platform, when we create a custom application, it also gives us functionality to select on which platform will the app be used. (This functionality is not present in the classic platform).<br>In Salesforce, we can create a new application by going to App Manager(by searching in the quick find box) and then select ‘New Lightning App’<br>Employees performing similar works can be grouped together by creating roles(this helps in providing permissions of applications)</p><p>For using Salesforce we need to signup at the Salesforce website.<br>Heroku is a cloud service platform (PaaS) enabling developers to build, run, and operate applications entirely in the cloud.<br>The Lightning App Builder is a point and click tool that makes it easy for creating custom pages for Salesforce mobile app and Lightning Experience giving the users what they require in one place.<br>The Salesforce Marketing Cloud (Exact Target) Fuel REST API is lightweight, easy to use and on its way to full maturity.<br>Force com is a PaaS product designed for simplifying the development and deployment of cloud based applications and websites.<br>The Actions Developer Guide allows to build custom development tools for Lightning Platform applications. The Lightning Component framework is a UI framework for developing single page applications for mobile and desktop devices. Salesforce Lightning includes the Lightning Component Framework and other tools for developers.</p><p>CRM is Customer Relationship Management. It provides a centralized platform for sales team to manage customer interaction. It stores customer contact information, identify sales opportunities, record service issues and manage marketing all in one central location. So with easy to access to data it is easier to collaborate and increase productivity.<br>In Salesforce we can create simple apps without writing single line of code .<br>Trailblazer App will help us to track the places we want to go. By adding utilities and navigation<br>In Salesforce we can use in-built functionality for our apps such as database to organize the information , security for protecting data ,user interface to expose data and functionality, environment that allow us to interact with people or data etc or we can also create our own custom tabs.<br>In travel lightning app we can build application for travelling , can add in-built functionality, add Tabs, add page layout, customize page layouts, can create custom objects and field for the app.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f108965694c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript: Use Cases]]></title>
            <link>https://prithvirajsingh1604.medium.com/javascript-use-cases-801c54526d71?source=rss-7ac4667c8ebe------2</link>
            <guid isPermaLink="false">https://medium.com/p/801c54526d71</guid>
            <category><![CDATA[linuxworld]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[summer-training]]></category>
            <category><![CDATA[vimal-daga]]></category>
            <dc:creator><![CDATA[Prithviraj Singh]]></dc:creator>
            <pubDate>Fri, 25 Jun 2021 18:52:57 GMT</pubDate>
            <atom:updated>2021-06-25T19:06:18.970Z</atom:updated>
            <content:encoded><![CDATA[<h3>What is JavaScript?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*AhY_MClBSPUM-7Wp.png" /></figure><p>JavaScript is a cross-platform, object-oriented scripting language used to make webpages interactive (e.g., having complex animations, clickable buttons, popup menus, etc.). There are also more advanced server side versions of JavaScript such as Node.js, which allow you to add more functionality to a website than downloading files (such as realtime collaboration between multiple computers). Inside a host environment (for example, a web browser), JavaScript can be connected to the objects of its environment to provide programmatic control over them.</p><p>JavaScript contains a standard library of objects, such as Array, Date, and Math, and a core set of language elements such as operators, control structures, and statements. Core JavaScript can be extended for a variety of purposes by supplementing it with additional objects; for example:</p><ul><li><em>Client-side JavaScript</em> extends the core language by supplying objects to control a browser and its <em>Document Object Model</em> (DOM). For example, client-side extensions allow an application to place elements on an HTML form and respond to user events such as mouse clicks, form input, and page navigation.</li><li><em>Server-side JavaScript</em> extends the core language by supplying objects relevant to running JavaScript on a server. For example, server-side extensions allow an application to communicate with a database, provide continuity of information from one invocation to another of the application, or perform file manipulations on a server.</li></ul><p>This means that in the browser, JavaScript can change the way the webpage (DOM) looks. And, likewise, Node.js JavaScript on the server can respond to custom requests from code written in the browser.</p><p>JavaScript is a flexible and powerful programming language that is implemented consistently by various web browsers. Along with HTML and CSS, it’s a core component of web technology. While HTML is responsible for structure and CSS is responsible for style, JavaScript provides interactivity to web pages in the browser.</p><p>But JavaScript was never meant to become the cornerstone of modern web development. In fact, the language was created in less than two weeks, with a very different purpose in mind.</p><h3>History of JavaScript</h3><p>When the Internet boomed with public usage in the 1990s, technology companies battled to build the most powerful and efficient web browser on the market. This sparked the first “browser war,” between Microsoft (Internet Explorer) and NetScape (NetScape Navigator) to gain dominance in the usage share of web browsers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/60/0*SYb5A3Dazvxs0X8_" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/0*WkP_EMaPBPTkGgvq.jpg" /></figure><p>The first non-beta version of Netscape Navigator (Source: <a href="https://www.arnnet.com.au/slideshow/557401/pictures-visual-history-netscape-navigator/?utm_source=codecademyblog">ARN</a>)</p><p>Netscape needed a lightweight scripting language for easier programming. This ultimately made web development more accessible, unlike other languages that required deeper training. In 1995, a NetScape employee, Brendan Eich, was given ten days to help build the company a lightweight scripting language. As a result, Eich built Mocha, which was later renamed JavaScript.</p><p>The moral of the story — JavaScript was never intended to become the standard language for the web! However, after NetScape was <a href="https://www.cnet.com/news/aol-buys-netscape-for-4-2-billion/?utm_source=codecademyblog">acquired by AOL</a> and eventually <a href="https://sayaksarkar.wordpress.com/2012/03/12/from-netscape-to-firefox-the-story-of-mozilla-firefox/?utm_source=codecademyblog">turned over their browser’s code to the Mozilla Foundation</a>, the popularity of JavaScript grew.</p><p>JavaScript is now an essential web technology that’s supported by the most popular web browsers. Familiarity with the language is crucial for anyone who wants to become a web developer — that’s why it’s been the most commonly used programming language in <a href="https://insights.stackoverflow.com/survey/2018#most-popular-technologies?utm_source=codecademyblog">Stack Overflow’s Developer Survey</a> for six years in a row.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/60/0*LHVF8QyVu_WEZPJI" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DvurwA-U8NRyrIyn.png" /></figure><p>The most popular programming languages in <a href="https://insights.stackoverflow.com/survey/2018#most-popular-technologies?utm_source=codecademyblog">Stack Overflow’s 2018 Developer Survey</a>.</p><h3>JavaScript’s Popularity</h3><p>At this point, you may be wondering: how is it that a language written in 10 days by one person became mass-adopted by the world wide web? In short, JavaScript became a hit because <strong>it turned web browsers into application platforms</strong>. Here’s how:</p><ol><li>JavaScript can be used in both the front-end and back-end of web development.</li><li>JavaScript is standardized, so it’s frequently updated with new versions.</li><li>JavaScript works with the document object model, or the DOM, to respond to user interactions. The DOM is the structure in the browser that displays a web pages.</li><li>JavaScript allows websites to have interactivity like scroll transitions and object movement. Modern browsers still compete to process JavaScript the fastest for the best user experiences. Chrome, <a href="https://en.wikipedia.org/wiki/Usage_share_of_web_browsers#/media/File:StatCounter-browser-ww-monthly-201707-201707-map.png">the most used Internet browser in 2017</a>, has been so successful in part because of its ability to process JavaScript quickly.</li><li>JavaScript offers a wide range of frameworks and libraries that help developers create complex applications with low overhead. Programmers can import libraries and frameworks in their code to augment their application’s functionality.</li></ol><h3>Features of JavaScript</h3><p>JavaScript does have some special features that make it such a popular language. Javascript is a very handy language to learn today since almost every website uses it. The coolest part of javascript is, you don’t need prior knowledge of any programming language.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/60/0*lIZAi6drM2vZQ8S_" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/0*JT5N767-_RUBTQ7c.jpg" /></figure><h3>General JavaScript Features</h3><p>JavaScript language consists of several different features. Some of the general JavaScript features are as follows –</p><h3>1. Validating User’s Input</h3><p>JavaScript is very useful while using forms. It has the capability to validate user input for errors and also saves time. If the user leaves a required field empty or the information is incorrect, JavaScript checks for them before sending the data over to the server.</p><h3>2. Simple Client-side Calculations</h3><p>Since JavaScript is a client-side technology, it can perform basic calculations on the browser. The browser does not need to ask server time for every task. This is especially helpful when a user needs to perform these calculations repeatedly. In these cases, connecting to the server would take a lot more time than performing the actual calculations.</p><h3>3. Greater Control</h3><p>JavaScript provides greater control to the browser rather than being completely dependent on the web servers. JavaScript provides various browsers with additional functionalities that help reduce server load and network traffic.</p><h3>4. Platform Independent</h3><p>Since browsers interpret JavaScript, it solves the problem of compilation and compatibility. Thus it can run on Windows, Macintosh, and other Netscape-supported systems. Also, it is possible to embed them in any other script like <a href="https://en.wikipedia.org/wiki/HTML">HTML</a> that keeps JavaScript into use.</p><h3>5. Handling Dates and Time</h3><p>Unlike other programming languages, JavaScript has built-in functions to determine the date and time. Thus it is very easy to code only by using methods like .getDate().</p><h3>6. Generating HTML Content</h3><p>JavaScript has very handy features to dynamically generate HTML content for the web. It allows us to add text, links, images, tables, etc after an event occurrence (eg — mouse click).</p><h3>7. Detecting the User’s Browser and OS</h3><p>JavaScript is very capable in the detection of the user’s browser and OS information. Though JavaScript runs on every platform, there may occur a situation where we need the user’s browser before processing. This can be helpful for writing code that results in different outputs in different browsers.</p><h3>Modern JavaScript Features</h3><p>If we dive into some more recently added features of JavaScript that makes it unique from other programming languages. There are a lot more modern features of JavaScript invented after some general features. Some of them are as follows –</p><h3>1. Let/Const</h3><p>JavaScript has introduced the keywords ‘let’ and ‘const’ that are available to replace ‘var’. Unlike ‘var’, they are important due to their blocked scope i.e we can only access them in the block we defined them in. Whereas ‘var’, even if we initialize it inside a function, we can access it outside of the function.</p><h3>2. Arrow Functions</h3><p>These functions are very useful in simplifying the syntax and tamp down the lines of codes for the web page or web application. Since these are light-weight in syntax, they can be very easily used in anonymous <a href="https://data-flair.training/blogs/javascript-function/"><em>functions in JavaScript.</em></a></p><h3>3. Template Literal</h3><p>This is a common feature in other programming languages that allows you to save variables directly into strings. This proves to be an important tool for developers as it permits them to focus more on the development of the application rather than spending the time on syntax.</p><h3>4. New Array Functions</h3><p>Though array functions are not necessary for any programming language, they do simplify things for the developer. This also compacts the code and makes it much easier to understand. A regular array and an associative array, JavaScript supports them both. While a regular array contains integer values for its index, indexes can be strings for an associative array.</p><h3>5. Default Parameters</h3><p>This JavaScript feature helps to avoid collapsing the whole code for a simple mistake. It is very useful when the developer needs to check the working of a function without any parameters.</p><h3>6. Property Shorthand</h3><p>Built-in methods like .get() are available for the developer’s use. These methods help avoid writing the same code every time and cut back on various lines of code. These inborn methods are really supportive of cutting back the developing time and cost.</p><h3>Uses of JavaScript</h3><h3>1. Web Development</h3><p>JavaScript is a <a href="https://www.educba.com/programming-languages-vs-scripting-languages/">client scripting language</a> which is used for <a href="https://www.educba.com/web-page-design-layout/">creating web pages</a>. It is a standalone language developed in Netscape. It is used when a webpage is to be made dynamic and add special effects on pages like rollover, roll out and many types of graphics. It is mostly used by all websites for the purpose of validation. In addition to validations, it supports external applications like PDF documents, running widgets, supporting for flash applications etc. It can also load content into a document whenever the user requires it without even reloading the entire page.</p><h3>2. Web Applications</h3><p>With technology browsers and personal computers have improved to the extent that a language was required to <a href="https://www.educba.com/how-to-build-web-applications-using-mongodb/">create robust web applications</a>. When a user explores a<a href="https://www.educba.com/career-in-google-maps/"> map in Google Maps</a> then the user just needs to click and drag the mouse. All detailed view is visible by just a click. This is possible due to JavaScript. It interacts with the browser without sending messages to and fro to the servers. JavaScript uses Application Programming Interfaces(APIs) that provide extra powers to the code.</p><h3>3. Presentations</h3><p>JavaScript also provides the facility of creating presentations as a website. JavaScript provides RevealJS and BespokeJS libraries to build a web-based slide deck. Reveal.js creates some of the most beautiful and interactive decks using HTML. A user can easily insert nested slides. Even if the user is not aware of programming language then they can easily build a site with so much help online. These presentations are touch optimized and work great with mobile devices, phones, and tablets. With all this JavaScript also provides different transition styles, themes, and slide backgrounds. <a href="https://www.educba.com/cheat-sheet-css/">It supports all CSS color formats</a>. JavaScript also provides Bespoke.js plugin with a wide variety of features. These include responsive scaling, animated bullet lists, and syntax highlighting for code examples. It provides themes which are polished and not too flashy. The quickest way to start Bespoke.js is using a generator. It allows the user to set titles to your presentation and go through a set of questions to get the plugins required.</p><h3>4. Server Applications</h3><p>Node JS is built on Chrome’s Javascript runtime for building fast and scalable network applications. It uses event-driven, lightweight and efficient applications which are to be distributed over the systems with the help of a server. Javascript is used to handle HTTP requests and generate contents. When a user is writing thick applications in JavaScript on the client then a user may even write the logic in JavaScript on the server so that cognitive leaps can be done from one language to the other.</p><h3>5. Web Servers</h3><p>Using <a href="https://www.educba.com/how-to-use-node-js/">Node JS</a> a web server can be created. The <a href="https://www.educba.com/features-of-node-js/">advantages of Node JS</a> are that it is event-driven and would not wait for the response of the previous call. It moves to the next call and takes advantage of events to get notifications when a response is received for a previous call. The <a href="https://www.educba.com/node-js-interview-questions-and-answers/">servers built on Node JS</a> are very fast and do not use buffering and transfers chunks of data. In addition to this, it is single threaded with event looping which is used in a non-blocking way. The HTTP module can help in creating a server by using the createServer() method. This method is executed whenever someone tries to access port 8080. In response to this, the HTTP server should display HTML and should be included in HTTP header. It can be installed easily by typing ‘npm install -g http-server’ and it can be started by typing http-server command.</p><h3>6. Games</h3><p>Not only websites but uses of JavaScript also helps in creating games for leisure. The combination of <a href="https://www.educba.com/html5-vs-javascript/">JavaScript and HTML5</a> makes JavaScript popular in games development as well. It provides the Ease JS library which provides simple solutions for working with rich graphics. It also has an API that is familiar to all flash developers with a hierarchical display list. A user can create a Stage and it will render the display list to its target canvas. Ease JS also has 2D bitmaps called Sprites which are drawn directly to render the target for transformations.</p><h3>7. Art</h3><p>Using the HTML5 in JavaScript drawing graphics on a <a href="https://www.educba.com/web-page-design-layout/">web page has become easier</a>. All two and three-dimensional shapes can be easily drawn on a canvas and this has opened the browser as a new medium for all different digital art projects. A canvas has no border and no content and hence lets the user create his own art.</p><h3>8. Smartwatch Applications</h3><p>Javascript being the most used language is because it is being used in all possible devices and applications. Uses of JavaScript provides a library Pebble JS which is used in smartwatch applications. This framework works for applications that require the internet for its functioning. Using Pebbles allows a developer to create an application for a number of watches using JavaScript.</p><h3>9. Mobile Applications</h3><p>The most important thing that can be done by the <a href="https://www.educba.com/javascript-math-functions/">uses of JavaScript</a> is building applications without web contexts. Mobiles being mostly available in Apple and Android two different languages are used to build these. It should be possible to write once and use it on both platforms of these devices. PhoneGap is the framework which enables this. Also recently we have<a href="https://www.educba.com/react-native-interview-questions/"> React Native</a> that serves this purpose. It is the major player in cross-platform changes and deployments. Hence uses of Javascript can be used to deploy and download the respective applications across cross environments.</p><h3>Which Companies Use JavaScript</h3><h3>Microsoft</h3><p>Okay, so you’re probably not going to find JavaScript powering Windows anytime soon, but Microsoft relies on JavaScript for a whole lot else.</p><p>First off, Microsoft needs to work closely with JavaScript to built its Edge web browser. All browsers need to process and execute JavaScript efficiently, so Microsoft has developed and maintains its own JavaScript engine for Edge. Actually, there has been talk of them creating an alternate version of NodeJS with the Edge engine.</p><p>Recently, Microsoft has really embraced NodeJS. They thoroughly support Node on the Azure cloud platform. Its one of Azure’s major features, and they’ve integrated Visual Studio support for Node.</p><p>Microsoft has also developed a version of Node for <strong>I</strong>nternet <strong>O</strong>f <strong>T</strong>hings(IoT) applications. NodeJS is great of IoT because it’s light weight and efficient.</p><h3>PayPal</h3><p>PayPal has obviously been using JavaScript on the front end of their website for a long time, but that’s only the beginning.</p><p>The online payment giant was one of the earliest adopters of NodeJS. During an overhaul of their account overview page, they decided to try building the page in Node at the same time as their usual Java development. The NodeJS version worked out so well, that they chose to use it in production and build all client-facing applications in Node going forward. That means that most of what you see in your account is running on Node.</p><p>PayPal even went as far as to create and maintain their own version of Express, called <a href="http://krakenjs.com/">KrakenJS</a>. It’s pretty obvious that they like JavaScript over at PayPal.</p><h3>Netflix</h3><p>Like PayPal, Netflix started out using Java for just about everything. They too ran into problems with Java’s size and the time it required to develop.</p><p>Over time, Netflix moved away from its more traditional structure into the cloud and started to introduce NodeJS. With Node, Netflix was able to break down pieces of their user interface into individual services. This more distributed approach was able to speed things up an alleviate stress on their servers. Today, a large portion of Netflix’s interface is running on Node.</p><h3>Uber</h3><p>Uber needs to handle loads of data in real time. They have millions of requests coming in continuously, and that’s not just hits on a page. Uber needs to track driver locations, rider locations, and incoming ride requests. It has to seamlessly sort that data and match riders as fast as possible.</p><p>All of that plays to NodeJS’s and JavaScript’s strengths. Node is designed to handle requests and hand off data quickly. It’s asynchronous capabilities are a huge part of that. Node is central to Uber’s user facing stack for just that reason.</p><h3>Facebook</h3><p>You’re probably aware that Facebook uses JavaScript. It’s kind of hard to miss. What’s probably not as obvious is exactly how much JavaScript goes into making Facebook and how much Facebook is involved in JavaScript development.</p><p>Try disabling JavaScript in your web browser and going to Facebook. The website will actually stop you from logging in because it won’t work without JavaScript.</p><p>You may have noticed the way that Facebook loads. Each piece of the page is separate. Facebook has invented its own way of breaking down and delivering sections of JavaScript separately. In an odd way, each section of your Facebook page is a collection of independent JavaScript applications.</p><p>It doesn’t stop there. Facebook created <a href="https://facebook.github.io/react/">React</a>, one of the most popular front end frameworks. Facebook uses React on Facebook.com as well as Instagram and WhatsApp.</p><h3>Google</h3><p>How doesn’t Google use JavaScript? Seriously, it’s everywhere. Google’s search results that spring up as your typing get there with JavaScript. The Gmail web client is powered by JavaScript. Google Docs? Yeah, that’s JavaScript too.</p><p>Google develops and usually open sources it’s own JavaScript tools. The most obvious example is AngularJS. Angular is used most prominently in Google’s DoubleClick advertising platform, but it’s also one of the most popular front end frameworks available. It’s even part of the MEAN stack.</p><p>Google’s more intensive services, like Google Docs, use Closure Tools. This set of tools compiles JavaScript into a lower-level faster form more suited for rich and highly responsive web applications.</p><p>There’s another big point to touch on. Google developed Chrome. Chrome, being a web browser, needed a JavaScript engine, so Google also made V8. V8 not only powers Chrome, it’s at the heart of NodeJS. So, without Google, there would be no Node.</p><blockquote><strong><em>That’s all folks. Hope you enjoyed 😊</em></strong></blockquote><h4>Demo</h4><p>Here is a small project demo I built using JavaScript integrated with Python-CGI and Docker:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*ECMuZBiV55cW3RZXGMYIVw.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*VW2Mjcy3l1Pd3V0ReD9aIg.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*fybOjNJc2QFC90ovKtrOvA.gif" /></figure><p>GitHub: <a href="https://github.com/Prithviraj-Singh/javascript_docker.git">https://github.com/Prithviraj-Singh/javascript_docker.git</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=801c54526d71" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Open source expert session by LW.]]></title>
            <link>https://prithvirajsingh1604.medium.com/open-source-expert-session-by-lw-5733d4d89195?source=rss-7ac4667c8ebe------2</link>
            <guid isPermaLink="false">https://medium.com/p/5733d4d89195</guid>
            <category><![CDATA[arth]]></category>
            <category><![CDATA[linuxworld]]></category>
            <category><![CDATA[expert-session]]></category>
            <dc:creator><![CDATA[Prithviraj Singh]]></dc:creator>
            <pubDate>Wed, 16 Jun 2021 11:07:01 GMT</pubDate>
            <atom:updated>2021-06-16T11:07:01.231Z</atom:updated>
            <content:encoded><![CDATA[<p>Open source means which is publicly accessible anyone can see, modify, and distribute the code according to their requirement.<br>It helps us to grow your network as well as enrich our technical projects. Actually it helps to get into industry expert’s connection &amp; learn from them a lot.<br>Some of the way to contribute to open source community are contributing to the existing open source projects, or to create our own project , make it open and everyone will contribute to it. Or just create the open source solution for any commercial software.<br>GitLab is a web-based DevOps lifecycle tool that provides a Git-repository manager providing wiki, issue-tracking and continuous integration and deployment pipeline features, using an open-source license, developed by GitLab Inc.<br>Orchestration is the automated configuration, management, and coordination of computer systems, apps, and services.<br>Kubernetes is an open-source container-orchestration system for automating computer application deployment, scaling, and management. It was originally designed by Google and is now maintained by the Cloud Native Computing Foundation</p><p>Kubernetes is the most prominent technology in modern microservices. It is designed to make managing microservices clusters of containerized applications simpler and more automated. It works on a master salve architecture<br>Kubernetes works as cluster which has master node &amp; worker nodes<br>Terraform is a opensource tool for building, changing, and versioning infrastructure safely and efficiently. Terraform can manage existing and popular service providers as well as custom in-house solutions<br>IAAC stands for Infrastructure As A Code. Using Terraform we can design Infrastructure As A Code<br>Terraform codes can be written in a .tf file. And you can use providers &amp; related keywords as per your use case<br>For management we can create multiple files in a working directory &amp; to make the code dynamic we can parameterize our code(using variables)<br>AWS Support is a collection of tools and advice provided to an Amazon Web Services customer to help troubleshoot or improve the use of AWS public cloud resources. An AWS customer uses AWS Support when that customer experiences a problem in the cloud or wants to improve the efficiency of a cloud deployment</p><p>Many real world solutions are implemented with respect to DSA core concepts. Similarly to work on them or create some new also we require the right concepts of DSA. Opensource community helps you connect to multiple industry leaders so you can see their work, learn from them as well<br>Argo CI is a continuous integration and deployment system powered by Argo workflow engine for Kubernetes. Argo CD is a GitOps continuous delivery tool for Kubernetes<br>GitOps is a way of implementing Continuous Deployment for cloud native applications. It focuses on a developer-centric experience when operating infrastructure, by using tools developers are already familiar with, including Git and Continuous Deployment tools</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5733d4d89195" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript workshop by LW]]></title>
            <link>https://prithvirajsingh1604.medium.com/javascript-workshop-by-lw-452ac4ce5d2f?source=rss-7ac4667c8ebe------2</link>
            <guid isPermaLink="false">https://medium.com/p/452ac4ce5d2f</guid>
            <category><![CDATA[summer]]></category>
            <category><![CDATA[workshop]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[vimal-daga]]></category>
            <category><![CDATA[linuxworld]]></category>
            <dc:creator><![CDATA[Prithviraj Singh]]></dc:creator>
            <pubDate>Mon, 14 Jun 2021 10:40:48 GMT</pubDate>
            <atom:updated>2021-06-14T10:40:48.141Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*Iq8yw9o4S8Wla3wJgcEgIw.png" /></figure><p>On 12–13 June 2021 I attended JavaScript Workshop By <a href="https://medium.com/u/3fcf6ead19a1">LinuxWorld Informatics Pvt Ltd</a>.<br>In this workshop I learnt:-</p><ul><li>Other than accessing the website, browser acts as an interpreter that interprets html, css and js code to display it’s output.</li><li>Event is any action we do on the browser Window. The HTML p tag has multiple events like onclick, onmouseover, etc that can be used to interact with the browser.</li><li>There are three ways in which we can add JavaScript to HTML pages Embedding code, Inline code, External file.</li><li>We can print statement in JavaScript using document.write().</li><li>JavaScript Framework is an application framework written in javascript, JS frameworks are collections of JavaScript code libraries. examples of JS frameworks are ReactJS, AngularJS, etc</li><li>alert() is used to display alert boxes in JavaScript.</li><li>The div tag is used for defining a section or a division in an HTML page while the id attribute is used to label sections or parts of your HTML document.</li><li>getElementById() is used to get a particular element from the code with that Id whereas innerHTML stores the content of the element.</li><li>onClick will perform certain functions after clicking on the tag<br>mouseOver will perform a task if someone put the cursor on the tag<br>responsiveVoice.speak() function is used to speak in JS</li><li>The Document Object Model (DOM) is a programming interface for HTML and XML documents.</li><li>Javascript supports alert, prompt and confirm boxes.<br>The Browser Object Model (BOM) is a browser-specific convention referring to all the objects exposed by the web browser. It allows JavaScript to interact with the browser.</li><li>We can integrate CSS with JavaScript with the help of the style keyword.<br>AJAX is a framework that provides a faster and dynamic website, where a section of HTML code can be updated without refreshing it.</li><li>A client (browser) sends an HTTP request to the server; then the server returns a response to the client.</li><li>The fetch API provides a promise-based way to send HTTP requests in JavaScript.</li><li>Synchronous means to be in a sequence, i.e. every statement of the code gets executed one by one. Asynchronous code allows the program to be executed immediately where the synchronous code will block further execution of the remaining code until it finishes the current one.</li><li>To use JSON in javascript we need to parse the data using JSON.parse()</li><li>Get and Post methods are the HTTP request methods used inside the tag to send form data to the server.</li><li>There are 3 parts of a loop- initialization, condition and incrementation.</li><li>The pre tag is used to insert a preformatted text into an HTML document</li></ul><p>A huge thanks to <a href="https://medium.com/u/7fd43e115fae">LinuxWorld Informatics Pvt. Ltd.</a> team and <a href="https://medium.com/u/608df20f298d">Vimal13</a> Sir for arranging such an amazing and informative workshop for us.</p><p><em>That’s all folks, thank you for reading</em>✨🔥<br><em>You rock</em> 🤩</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=452ac4ce5d2f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Confusion Matrix and Cyber Security]]></title>
            <link>https://prithvirajsingh1604.medium.com/confusion-matrix-and-cyber-security-a95159b8c9ed?source=rss-7ac4667c8ebe------2</link>
            <guid isPermaLink="false">https://medium.com/p/a95159b8c9ed</guid>
            <category><![CDATA[internships]]></category>
            <category><![CDATA[righteducation]]></category>
            <category><![CDATA[vimal-daga]]></category>
            <category><![CDATA[linuxworld]]></category>
            <category><![CDATA[summer]]></category>
            <dc:creator><![CDATA[Prithviraj Singh]]></dc:creator>
            <pubDate>Fri, 04 Jun 2021 14:40:51 GMT</pubDate>
            <atom:updated>2021-06-04T14:40:51.650Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*7GE3v4MdiEDvwLaLfHNoCw.jpeg" /></figure><p>In the field of machine learning and specifically the problem of statistical classification, a <strong>confusion matrix</strong>, also known as an error matrix, is a specific table layout that allows visualization of the performance of an algorithm. In predictive analytics, a <strong>confusion matrix </strong>is a table with two rows and two columns that reports the number of <em>false positives</em>, <em>false negatives</em>, <em>true positives</em>, and <em>true negatives</em>. This allows more detailed analysis than mere proportion of correct classifications (accuracy). Accuracy will yield misleading results if the data set is unbalanced; that is, when the numbers of observations in different classes vary greatly. How…?<br>So for example, if a model is trained to classify and differentiate between the colors red and blue, and then in a dataset there are 990 blue records and 10 red records, now if the model predicted all the records as blue the accuracy of the model comes out to be 99%, however we can see that it accurately predicted 0 red records. Hence judging a model with the help accuracy score in this type of cases is not ideal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/297/1*OTt7E7viPqJX_eeJbQLDAw.png" /><figcaption>example of a confusion matrix</figcaption></figure><p>From the above given example we can see how a confusion matrix look like. But how to actually create a confusion matrix?<br>Say we are given a trained model say for predicting rain and we are tasked to find its confusion matrix based on a given testing dataset. Now to create a confusion matrix we require predicted values, so we are going to run the X(feature) of the testing dataset through our model to fetch all the predicted values. Now, we will create an empty matrix similar to one given above and then we will start comparing the predicted values with the actual values provided in the dataset. If the prediction of our model is that rain will fall and in the dataset we can see that rain does fall we will increase a count in the bottom-right box(TP <em>True Positive</em>), if in prediction we find that there will be no rain for some record and for the same record we find that there was no rain then we will increase count in top-left box(TN <em>True Negative</em>). If however we find that the model’s prediction for some record is that there will be rain and from the record we find that their was no rain we will raise the count in top-right box(FP <em>False Positive</em>), and lastly if our model predicts that their will be no rain but through the dataset we find that there was a rain for that record then the count is raised in bottom-left box(FN <em>False Negative</em>). Hence we can see a model has two types of errors:<br>1. False Positive.<br>2. False Negative.</p><h4>Machine Learning In Cyber Security</h4><p>In Cyber Security ML models are used to predict attacks; for example Intrusion Detection System(IDS, this system is used to detect attacks and then raise alerts) and Intrusion Protection System(IPS, this system is used to detect attacks and then proactively stop the attacks from happening); and vulnerabilities. Now, since the systems are just ML models at their core, they are prone to error, as no model can be 100% accurate all the time. Hence there is a requirement to study the confusion matrix of the model and what are the meaning and repercussions of both the type of errors.</p><h4>False Positive</h4><p>This is the case when our security system raises an alert when in reality there is no attack happening. These alerts are just a nuisance and hence are usually to be avoided for further investigations as it will require unnecessary work and hence will use up man power. However these alerts will also train the worker to turn a blind eye towards the alerts, and hence increasing the possibility of a True Positive’s alert to go unnoticed.</p><p>This building up of ignorance leads to attacks such as in <a href="https://krebsonsecurity.com/2013/12/sources-target-investigating-data-breach/"><strong>Target</strong> data breach</a>, “where the technology used to monitor intrusions provided multiple alerts on different occasions regarding suspicious activities,” says Pritesh Parekh, CISO at Zuora. “The alerts were buried in hundreds of false positives and became deprioritized on the list of security items, resulting in a major data breach,” Parekh says.</p><h4>False Negative</h4><p>A false negative occurs when the security system fails to identify a threat. It produces a “negative” outcome (meaning that no threat has been observed), even though a threat exists. Hence, here the system will not raise any alerts when the attack happens as the attack will be seen as normal activity. This type of error does lead to a lot of intrusions however the simple fix for this is having multiple layers of security especially that implements positive security models where, the system denies access to all requests except for those that match the characteristics of legitimate, desirable traffic.</p><p><strong><em>That’s it kind readers</em>…</strong> <br><em>Thankyou for reading. See you later</em><strong><em>!!! </em></strong>(￣︶￣）↗</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a95159b8c9ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Making a container go GUI]]></title>
            <link>https://medium.com/analytics-vidhya/making-a-container-go-gui-60340e82197b?source=rss-7ac4667c8ebe------2</link>
            <guid isPermaLink="false">https://medium.com/p/60340e82197b</guid>
            <category><![CDATA[vimal-daga]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[linuxworld]]></category>
            <category><![CDATA[summer]]></category>
            <dc:creator><![CDATA[Prithviraj Singh]]></dc:creator>
            <pubDate>Tue, 01 Jun 2021 12:27:53 GMT</pubDate>
            <atom:updated>2021-06-09T06:23:10.469Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*9gWZQ7xSERy2sOicGBBWdg.png" /></figure><p><strong><em>Task</em>:</strong><br>🔅<em> Launch a container on docker in GUI mode</em><br>🔅 <em>Run any GUI software on the container</em></p><p>A <strong>GUI</strong> (graphical user interface) is a system of interactive visual components for computer software. A GUI displays objects that convey information, and represent actions that can be taken by the user. The objects change color, size, or visibility when the user interacts with them.</p><p>But why use a GUI?<br>GUI though not as powerful as CLI or code, but is definitely more user-friendly. If you are a coder, you may know the horrors of not having an IDE in your arsenal for developing a code, you may want the comfort of having a browser to check in your web-app, some tools like Jenkins are hard to use unless you have a proper CLI to connect to, you may want to see your code fail in a fantastic GUI fashioned show of colors… the possibilities are endless folks!!!</p><p>But how exactly can we make a container run GUI application in it?<br>Let’s find out…</p><p>By doing a simple google search about it we can find that when someone tries to run a GUI application over a container, the error is about some missing variable with name X11 display, on further googling this error we can learn that the error is about a missing environmental variable with name DISPLAY, which is required by X11 to run a GUI program. To solve this we can launch our container with -e option to define DISPLAY. The variable DISPLAY is required to tell exactly where the display is located before launching the terminal itself. <br>Syntax:</p><pre>hostname:D.S</pre><p><em>where</em>:</p><ul><li><strong>hostname </strong>is the name of the computer where the X server runs. An omitted hostname means the localhost.</li><li><strong>D </strong>is a sequence number (usually 0). It can be varied if there are multiple displays connected to one computer.</li><li><strong>S </strong>is the screen number. A display can actually have multiple screens. Usually there’s only one screen though where 0 is the default.</li></ul><p>Usually we can set the variable with a value exactly equals to the value of DISPLAY in the host computer, hence we can use the command <br>docker run &lt;options&gt; -e DISPLAY=$DISPLAY &lt;image&gt; <br>to set the variable.</p><p>But this is not all. We would also require to have the X11 configured, to do that we can again use the configuration in the base OS to configure the container. How? Well it’s simple we just need to forward the volume /tmp/X11-unix to the same location inside the container. Hence the command is now transformed to: <br>docker run &lt;OPTIONS&gt; -e DISLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix &lt;IMAGE&gt; <br>Here .X11-unix is a socket file that is required by X11 server to connect to its client(applications like Firefox)</p><p>Now this method can be used to make some particular container work with GUI tools in it. But say we require to use a GUI tool in a container with image say Centos:7, if we try to perform this type of operation there, we again land up with a bunch of errors telling us that our machine is not GUI capable or something. What to do now?<br>The simple solution that we have found for solving this error is to install some package groups that would install all the required software and tools to run GUI applications.</p><p>Now, with all this knowledge let’s try to make a Centos:7 container run Firefox, and if it works let’s see if we can run a IDE like Jupyter to work on the container or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*jLHrZ-btQREixXLScpt8ng.gif" /></figure><p><strong>Step1</strong>: Pull the required image…<br>For this you can use the command docker pull centos:7</p><p><strong>Step2</strong>: Use the pulled image to launch a container…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/415/1*Lue8luypxSmcBYWMGpu9dQ.png" /></figure><p>We’ll use this container to make a GUI enabled image with Centos:7 as a base.</p><p><strong>Step3</strong>: Install the package group. We’ve installed a package group with the name of ‘Server with GUI’ as it will install Firefox for me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*-acs8kze2IrvBVEflcnAzA.png" /></figure><p>This step may take a while… you may consider taking a nap or watch a movie or something until the installation is finished. You know this step is the only reason we would want to make a image out of it once we are at it.<br>After the installation is finished we are eligible to move on to the next step</p><p><strong>Step4</strong>: Commit the container. Now all you have to do is to make a image out of the container you spend like a day making. To do so we can run a command docker commit &lt;container&gt; &lt;new image name&gt;:&lt;tags for your image&gt; <br>In our case the command may looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*ilXrKgqQ0Trcvuw_sIZ4ow.png" /></figure><p>docker ps will help you to find the name of your image.</p><p><strong>Step5</strong>: Test. To test out your image, you can launch a container with the new image. To do this we would use a command like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*fLd9z57RRZxHXr1Zt8QSPg.png" /></figure><p>You can then run the GUI app to test, in my case I used the Firefox command, which will launch Firefox browser for us.<br>Note the ID of the container is 178d2acb6406, this same ID can be seen on the Firefox browser…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*DemVQ3RkM21h9nL2bExsDg.png" /><figcaption>ID is marked on the top bar</figcaption></figure><p>As we can see the container ID matches the ID shown by the browser, which suggest that the Firefox is running over the container rather than the base OS.</p><p>Now if you want to run a Jupyter IDE, we can also do that. Just use the following set of commands to launch the IDE</p><ol><li>yum install -y python3</li><li>pip install jupyter</li><li>jupyter notebook --allow-root</li></ol><p>If you follow the commands you’ll end up with a screen like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*Vr5qNwCJsjv3J__Mqwb1Xg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*UWhWpF6neNrkRE5oLgAFFg.png" /><figcaption>CLI screen for output and the browser result</figcaption></figure><p>There are also some other ways we can achieve GUI capabilities over a container, one of them includes SSH. However if you do want to achieve the results like this without the hassle of making the image you can pull the image made by us by using the command: <br>docker pull prithvirajsingh1604/task:gui01<br><a href="https://hub.docker.com/repository/docker/prithvirajsingh1604/task/general">https://hub.docker.com/repository/docker/prithvirajsingh1604/task/general</a><br>click here for more info.</p><p>This task was completed in collaboration with <a href="https://medium.com/u/679f1ebd315f">Divya Kurothe</a> and I would like to thank her for helping me finish this task effectively through her supportive efforts.</p><p><strong>That’s all folks, task completed successfully </strong>(∩^o^)⊃━☆<br><em>Thank you for giving this a read, </em><strong><em>you</em></strong><em> </em><strong><em>rock</em></strong> ヾ(⌐■_■)ノ♪</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60340e82197b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/making-a-container-go-gui-60340e82197b">Making a container go GUI</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating a Machine Learning Model over Container]]></title>
            <link>https://prithvirajsingh1604.medium.com/creating-a-machine-learning-model-over-container-436fa65787e5?source=rss-7ac4667c8ebe------2</link>
            <guid isPermaLink="false">https://medium.com/p/436fa65787e5</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[vimal-daga]]></category>
            <category><![CDATA[summer]]></category>
            <category><![CDATA[linuxworld]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Prithviraj Singh]]></dc:creator>
            <pubDate>Sun, 30 May 2021 18:12:06 GMT</pubDate>
            <atom:updated>2021-05-30T18:12:06.512Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Target:<br></strong>👉 Pull the Docker container image of CentOS image from DockerHub and create a new container</p><p>👉 Install the Python software on the top of docker container</p><p>👉 In Container you need to copy/create machine learning model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*rjn1dEZUXeLAvEYgvrQvWg.gif" /></figure><p>Now, first we require to install and start docker…<br>To do that we can take help of some tool like Ansible [<a href="https://divya-kurothe.medium.com/deploying-docker-with-ansible-9f0c2884f3e6">Click here to learn more</a>].</p><p>Once our docker is ready to be worked upon, we can begin with our task…</p><p><strong>Step1</strong>: Pulling the required image.<br>To pull any image from DockerHub we only require 3 things:<br>1. Internet connection.<br>2. Name of the image.<br>3. Docker Command.</p><p>Once all the requirements are fulfilled you can run the command: <br>docker pull &lt;name of the image&gt;:&lt;tag&gt; <br>We can run the command docker image ls to list the pulled images.<br><em>If we do not mention any tag for the image to be pulled, docker will pull the image with tag ‘latest’</em></p><p><strong>Step2</strong>: Create a container.<br>After pulling the required image, we can create as many containers from the image as we want. To create a container from the image we can run the command: <br>docker run &lt;name of the image&gt;:&lt;tag&gt; <br>This command will create a container from the required image, now one would also like to use the container, say via its command line, and to do so we can use the options -t to get the command line terminal of the container and -i to make the terminal interactable. So for example we want to run an interactive container made by the image centos:latest, and so the command for this would be… <br>docker run -it centos:latest</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*INHuY0nQYCklaAgwgpFtHA.png" /></figure><p>Using --name &lt;Name of the container&gt; we can specify a name for our container if we like.</p><p><strong>Step3</strong>: Once the container has been launched, we can proceed to configure it in the required way. In our case we require to install Python. To install any software inside a container yum(for centos) comes preconfigured, and hence we are just required to run a simple command to install the software. In our case the we will run the command: <br>yum install python3 -y</p><p><strong>Step4</strong>: After installing Python we can create our ML model over the required dataset. But first we require to copy the dataset from the base OS to the container. To do that, first get out of the container’s terminal using the command exit , once we are in our base OS’s terminal we can use the command: <br>docker cp &lt;path to dataset&gt; &lt;name of the container&gt;:&lt;path of the location where we would like to store the dataset&gt; <br>for example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*TDh6EJSfFe0FhpTgvr7VIQ.png" /></figure><p>This would copy ‘SalaryData.csv’ located in the present working directory to /root/ of our container named ‘test’.</p><p><strong>Step5</strong>: Now we have imported our dataset to the container, hence we can start to create our model. To create the model, we would require to install some python libraries. To install Python libraries, we can use the ‘pip3’ command. The command to be used are: <br>pip3 install sklearn <br>pip3 install pandas <br>pip3 install numpy</p><p><strong>Step6</strong>: Once all the previous steps are complete we can proceed to write the code our model that we want to train.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/422/1*HaFhTqjrJYD4Ed053ymf-A.png" /><figcaption>Code I used</figcaption></figure><p>This code will import the dataset, train the model and then dump the model in a .pk1 file. It will also print somethings about our model like the coefficient, y-intercept, prediction at x=1.1 and lastly the accuracy of our at point 1.1.</p><p>To, run the code use the command python3 &lt;name of code&#39;s file&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*ulmp1u9sKFswNJgZiOyo5A.png" /><figcaption>Test Run</figcaption></figure><p>Here I used the ls command at the end to check whether the required dump was created or not. The test run seems good…</p><p><strong>That’s it, task completed successfully👍<br><em>Thank you for reading, you rock</em>🙌✨</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=436fa65787e5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MongoDB workshop: LinuxWorld]]></title>
            <link>https://prithvirajsingh1604.medium.com/mongodb-workshop-linuxworld-d9c6bab1a52a?source=rss-7ac4667c8ebe------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9c6bab1a52a</guid>
            <category><![CDATA[vimal-daga]]></category>
            <category><![CDATA[linuxworld]]></category>
            <category><![CDATA[workshop]]></category>
            <category><![CDATA[righteducation]]></category>
            <category><![CDATA[mongodb]]></category>
            <dc:creator><![CDATA[Prithviraj Singh]]></dc:creator>
            <pubDate>Mon, 10 May 2021 11:29:06 GMT</pubDate>
            <atom:updated>2021-05-10T11:29:06.395Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*Iq8yw9o4S8Wla3wJgcEgIw.png" /><figcaption><a href="https://medium.com/u/3fcf6ead19a1">LinuxWorld Informatics Pvt Ltd</a></figcaption></figure><h3>MnogoDB: The database for modern applications</h3><p>On 1st and 8th of May 2021, I attended a workshop on MongoDB by <a href="https://medium.com/u/3fcf6ead19a1">LinuxWorld Informatics Pvt Ltd</a>. In this workshop we learnt about the ins and outs of MongoDB. MongoDB is a document database, which means it stores data in JSON-like documents, and hence is much more flexible then our traditional schema-based databases.</p><p>In this workshop we learnt:<br>Data model is the way that we manage data. It decides how and where to use the database.<br>SQL is short for sequential query language, where the data model is sequential i.e. the data is arranged in a table with a static type schema and hence is not flexible.<br>NOSQL is short for not only SQL where there is no static schema in which our data is to be sorted in key and value pairs. It is also known as flexible data oriented model.<br>Document oriented DB is a data model where a single row(record) is treated as it is one single document.<br>In widows we just require to download the software, install, and then just set the path for convenience.<br>JSON is short for java script object notation which is a tool for arranging in data in some particular notation for maintaining uniformity from one tool to another.<br>CRUD operation in mongoDB can be done in multiple different ways depending upon the requirements.<br>To configure compass we can just install compass from the official website and then we can just feed in the in url for the server.<br>To uplad dataset in mongoDB we can use the mongoinsert command in mongo prompt.<br>To integrate mongoDB with python we can use the pymongo library in python. And then use the MongoClient function to define that our code is a client of the server.<br>Indexes are a unique number set which are defined to all the documents in our database collection.<br>These indexes are also the primary key as they will always uniquely identify one and only one document at a time<br>Indexing is a way of arranging the data such that the searching operations in the database is faster as the data is pre-arranged based on some criteria which allows us to traverse lesser amount of data to search something.<br>Sharding in mongoDB is way to devide data based on some criteria in the slave nodes so that it gives us better IO speed.<br>In mongoDB find function will go to every document and compare the query we are looking for and then give the result. Therefore it is quite time consuming if we have huge database. This is by default nature of mangoDB and it is known as Collection Scan(COLLSCAN).<br>The method of retrieving in particular field with id and place in ordered format is known as index. After creating index if we search something using that index then it is known as index scanning (IXSCAN).<br>By default mongo DB creates 1 index for ID and sort it in ascending order.<br>Mongodb also supports user defined indexes on multiple fields i.e, compound indexes. For example if a requirement is to search females of age greater than 25 so we need to examine two keys- age and gender<br>For Aggregation mongodb has Aggregation framework. Pipeline is created to do aggregation. A pipeline consists of multiple stages and output of every state is passed to the next stage.<br>$match: for searching<br>$group: for grouping<br>$sort: for sorting</p><p>In an enterprise we need multi node setup for avoiding single point of failure. Due to any issue if single node goes down then the entire database is unavailable. Therefore to avoid the risk of single point of failure we always use multi node cluster.<br>We always copy the data in multiple nodes and this is known as ReplicaSet.<br>In data bases we can store data on different nodes on basis of groups and categories.<br>MangoDB also supports clustering architecture that is master slave architecture. The master stores the metadata and have router program which tells the client that where the data you are looking for is present.<br>Aws provides a service Amazon documentDB for mongoDB.<br>MangoDB Atlas is a fully managed cloud database developed by the same people that built mongoDB. It is a mongo cloud that which can set up entire MongoDB database and behind the scene it uses cloud providers like aws, gcp and azure to setup the clusters.<br>Sometimes in our multiple documents some fields are common. So instead of creating field or embedded document in main document we put that information in some other centralised document and provide its reference in the main document. This is known as reference data model.</p><p>I would like to thank Mr. Vimal Daga Sir <a href="https://medium.com/u/608df20f298d">Vimal13</a> for teaching us such a great tool that too in such level of detail, and to <a href="https://medium.com/u/3fcf6ead19a1">LinuxWorld Informatics Pvt Ltd</a> for arranging this amazing workshop.<br><strong>Arigatou gozaimasu(o゜▽゜)o☆</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9c6bab1a52a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>