<?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 Lovely Shrivas on Medium]]></title>
        <description><![CDATA[Stories by Lovely Shrivas on Medium]]></description>
        <link>https://medium.com/@lovelyshrivas04?source=rss-c170d73ae9d8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*8c7EUK5SB4qr1Sur</url>
            <title>Stories by Lovely Shrivas on Medium</title>
            <link>https://medium.com/@lovelyshrivas04?source=rss-c170d73ae9d8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 08:06:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@lovelyshrivas04/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-Means Clustering]]></title>
            <link>https://lovelyshrivas04.medium.com/k-means-clustering-a9592bc235fe?source=rss-c170d73ae9d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/a9592bc235fe</guid>
            <category><![CDATA[k-means]]></category>
            <dc:creator><![CDATA[Lovely Shrivas]]></dc:creator>
            <pubDate>Mon, 19 Jul 2021 08:45:47 GMT</pubDate>
            <atom:updated>2021-07-19T08:45:47.524Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jMi7R58_HHzCsU0O8fz8cA.gif" /></figure><h3>📙What is Unsupervised Learning ?</h3><p>Unsupervised Learning is a type of machine learning algorithm used to draw inferences from datasets consisting input data without labelled responses. Training data is collection of information without any label.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*NTqn6O7cWvOgME-jdnvZ0Q.jpeg" /></figure><h3>📘What is Clustering?</h3><p>“Clustering is a process of dividing the datasets into groups, consisting of similar data points”. It means grouping of objects based on the information found in the data, describing the objects based on the information found in the data, describing the objects or their relationship.</p><h4>Why is Clustering Used?</h4><p>The goal of clustering is to determine the intrinsic grouping in a set of unlabeled data. Sometimes, Partitioning is the goal.</p><h4>Where it is used?</h4><ul><li>Market segmentation</li><li>Document clustering</li><li>Image segmentation</li><li>Image compression</li><li>Vector quantization</li><li>Cluster analysis</li><li>Feature learning or dictionary learning</li><li>Identifying crime-prone areas</li><li>Insurance fraud detection</li><li>Public transport data analysis</li><li>Clustering of IT assets</li><li>Customer segmentation</li><li>Identifying Cancerous data</li><li>Used in search engines</li><li>Drug Activity Prediction</li></ul><h4>Types of Clustering?</h4><ol><li>Exclusive Clustering (K-Means)</li><li>Overlapping Clustering (C-Means)</li><li>Hierarchical Clustering</li></ol><h3>📗K-MEANS Clustering?</h3><p>The process by which objects are classified into a predefined no. of groups so that they are as much dissimilar as possible from one group to another group, but as much similar as possible within same group.</p><p>K-means clustering is a very famous and powerful unsupervised machine learning algorithm. It is used to solve many complex unsupervised machine learning problems.</p><p>K-Means clustering algorithm is defined as an unsupervised learning method having an iterative process in which the dataset are grouped into k number of predefined non-overlapping clusters or subgroups, making the inner points of the cluster as similar as possible while trying to keep the clusters at distinct space it allocates the data points to a cluster so that the sum of the squared distance between the clusters centroid and the data point is at a minimum, at this position the centroid of the cluster is the arithmetic mean of the data points that are in the clusters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3NU3mOYi_se2rcTp53WXzA.png" /></figure><h3>K-MEANS Algorithm working</h3><p>K- Means Clustering Algorithm needs the following inputs:</p><ul><li>K = number of subgroups or clusters</li><li>Sample or Training Set = {x1, x2, x3,………xn}</li></ul><h4>STEPS:-</h4><ol><li>First we need to decide the no. of clusters to be made(guessing).</li><li>Then we provide centroids of all the clusters(guessing).</li><li>The algorithm calculates Euclidean distance of the points from each centroid and assigns the point to the closest cluster.</li><li>Next the centroids are calculated again, when we have our new cluster.</li><li>The distance of the points from the center of clusters are calculated again and points are assigned to the closest cluster.</li><li>And then again the new centroid for the cluster is calculated.</li><li>These steps are repeated until we have a repetition in centroids or new centroids are very close to the previous once.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/987/1*pBMZwJ9qbYjm0Ny7QyReEg.jpeg" /></figure><h4>How to decide the no. of clusters?</h4><p>This can be done by two methods:</p><p><strong>Elbow Method:</strong>- First of all, compute the sum of squared error (SSE) for some values of K . The SSE is define as the sum of the squared distance between each member of the cluster and its centroid, Mathematically.</p><p>Elbow is one of the most famous methods by which you can select the right value of k and boost your model performance. We also perform the hyperparameter tuning to chose the best value of k. Let us see how this elbow method works.</p><p>It is an empirical method to find out the best value of k. it picks up the range of values and takes the best among them. It calculates the sum of the square of the points and calculates the average distance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/404/1*2kA1VZB9YP4lQ2lkvCsWPA.jpeg" /></figure><p><strong>Purpose Method:- </strong>In this method, the data is divided based on different metrics, and after then it is judged how well it performed for that case. For example, the arrangement of the shirts in the men’s clothing department in a mall is done on the criteria of the sizes. It can be done on the basis of price and the brands also. The best suitable would be chosen to give the optimal number of clusters, i.e. the value of K.</p><h3>Pros of K- Means Clustering Algorithm</h3><ul><li>It is fast</li><li>Robust</li><li>Comparatively efficient</li><li>Flexible</li><li>Easy to interpret</li><li>Better computational cost</li><li>Enhances Accuracy</li></ul><h3>Cons of K- Means Clustering Algorithm</h3><ul><li>Cannot handle outliers and noisy data</li><li>Do not work for the non-linear data set</li><li>Lacks consistency</li><li>Sensitive to scale</li><li>If very large data sets are encountered, then the computer may crash.</li><li>Prediction issues</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a9592bc235fe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[USECASE OF JAVASCRIPT]]></title>
            <link>https://lovelyshrivas04.medium.com/usecase-of-javascript-7022bba2e0d?source=rss-c170d73ae9d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/7022bba2e0d</guid>
            <dc:creator><![CDATA[Lovely Shrivas]]></dc:creator>
            <pubDate>Fri, 25 Jun 2021 08:09:24 GMT</pubDate>
            <atom:updated>2021-06-25T21:38:00.209Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-cPF7KR_exM-EAej7ZAt3g.png" /></figure><p><em>JavaScript is a scripting or programming language that allows you to implement complex features on web pages every time a web page does more than just sit there and display static information for you to look at displaying timely content updates, interactive maps, animated 2D/3D graphics, scrolling video jukeboxes, etc.</em></p><ul><li><strong>HTML:<em>-</em></strong></li></ul><p><em>HTML is the markup language that we use to structure and give meaning to our web content, for example defining paragraphs, headings, and data tables, or embedding images and videos in the page.</em></p><ul><li><strong>CSS:-</strong></li></ul><p><em>CSS is a language of style rules that we use to apply styling to our HTML content, for example setting background colors and fonts, and laying out our content in multiple columns.</em></p><ul><li><strong>JAVASCRIPT</strong> :-</li></ul><p><em>JS is a scripting language that enables you to create dynamically updating content, control multimedia, animate images, and pretty much everything else.</em></p><h3><strong>📕JS Libraries:-</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*15tnb1l2nFfeCg_-6kxJUA.jpeg" /></figure><p><em>Libraries provide a lot of standard functionalities so that developers don’t have to worry about a lot of standard functions and can use libraries to easily create web pages using UI components, language utilities, math functions, and more. </em><strong><em>JavaScript</em></strong><em> is an integral part of any web application, and it is only necessary to have these libraries in hand as per your need to save </em><strong><em>development</em></strong><em> and testing time and have everything in one place.</em></p><h4>For detailed content check the below given link:-</h4><blockquote><a href="https://hackr.io/blog/top-javascript-libraries">Top 20 Javascript Libraries You Should Know in 2021 (hackr.io)</a></blockquote><h3><strong>📗JS Frameworks:-</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*B6QbI7hrMHdeYfc2uuyJ9Q.jpeg" /></figure><p><em>A software framework is an abstraction in which software providing generic functionality can be selectively changed by additional user-written code. JavaScript framework is an application framework written in JavaScript where the programmers can manipulate the functions and use them for their convenience.</em></p><p><em>Frameworks are more adaptable for the designing of websites, and hence, most website developers prefer them. JavaScript frameworks are a type of tool that makes working with JavaScript easier and smoother. These frameworks also make it possible for the programmer to code the application as a device responsive. This responsiveness is yet another reason why the JavaScript frameworks are quite popular when it comes to the question of using a high-level machine language.</em></p><h4>For detailed content check the below given link:-</h4><blockquote><a href="https://hackr.io/blog/best-javascript-frameworks">10 Best JavaScript Frameworks to Use in 2021 (hackr.io)</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*hHkKshYlYAdeGJGKs8sg2w.jpeg" /></figure><h3>📘Cisco Finesse Gadgets &amp; Finesse JavaScript Library API:-</h3><p><em>Finesse Gadgets are Open Social gadgets, which is an XML document that defines metadata for an Open Social Gadget Container. The gadgets are essentially mini web pages or applications that are placed within the Finesse desktop. This approach is particularly useful for contact center agents because this gives them access to all of the applications that they need to service calls inside of a single application, Cisco Finesse.</em></p><p><em>Finesse comes with a couple of out of the box gadgets such as the team performance gadget, but often times, customers have specific requirements that are not available on the Finesse desktop. To alleviate that problem, Cisco Finesse provides a Finesse JavaScript Library API to make it easy to build custom gadgets.</em></p><p><em>There are many sample gadgets available for developers to use as an example and base for their custom gadgets.</em></p><p><em>Third party gadgets can be hosted on either the Finesse server (via the 3rdpartygadget web application) or on an external web server. Gadgets can also make REST requests to services hosted on external servers using the Finesse JavaScript Library . To avoid browser cross-origin issues, it is recommended for the third-party server to be configured to allow CORS requests from the Finesse domain by configuring a CA signed certificate or a pre-imported X.509 certificate. This will allow the gadget to directly call a third-party REST API. It is the responsibility of third-party gadgets to implement their own authentication mechanisms for third-party REST services. Third party servers typically use the desktop agent credentials to authenticate the gadget requests by invoking Finesse User GET API requests to authenticate the credentials. Third party servers can also perform a custom database lookup to authenticate CCE agent credentials if they have the access to the AWDB database. Custom authentication mechanisms can also be used if necessary by configuring the gadgets with the required credentials.</em></p><h4>📖JSON Path Expression</h4><p><strong><em>Cisco</em></strong><em> Unified Call Studio includes a new utility that allows you to use JSON Path expressions in JavaScript to return the values from the JSON(JavaScript Object Notation).</em></p><p><em>To use this utility, include the following syntax as part of the JavaScript when you define the local variables:</em></p><blockquote>import Package( com.audium.server.cvpUtil );<br>JSONPathUtil.eval(String input JSON , String expression);</blockquote><h4>📖XPath Expression</h4><p><strong><em>Cisco</em></strong><em> Unified Call Studio includes a new utility that allows you to use XPath expressions in JavaScript to return the values from the XML.</em></p><p><em>To use this utility, include the following syntax as part of the JavaScript when you define the local variables:</em></p><blockquote>import Package(com.audium.server.cvpUtil);<br>XpathUtil.eval(String inputXML , String expression);</blockquote><h4>📖Date Validation</h4><p><strong><em>Cisco </em></strong><em>Unified Call Studio includes a new utility that allows you to validate date in JavaScript on local variables.</em></p><p><em>To use this utility, include the following syntax as part of the JavaScript:</em></p><blockquote>import Package(com.audium.server.cvpUtil);<br>DateTimeUtil.isValidDate(String dateToValidate, String dateFormat);</blockquote><h4>📖Time Validation</h4><p><strong><em>Cisco</em></strong><em> Unified Call Studio includes a new utility that allows you to validate time in JavaScript on local variables.</em></p><p><em>To use this utility, include the following syntax as part of the JavaScript:</em></p><blockquote>import Package(com.audium.server.cvpUtil);<br> DateTimeUtil.isValidTime(String timeToValidate, String timeFormat);</blockquote><h3>📙USE OF JAVASCRIPT:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dZq8SUup_SOlCqUNyghNOA.jpeg" /></figure><h4>📖Making The Web Pages Interactive</h4><p><em>JavaScript is used to make the web pages interact with the user with various functionalities such as</em></p><ul><li><em>Form validation such as checking if an email format is correct or not</em></li><li><em>Displaying a countdown clock</em></li><li><em>Interactive maps</em></li><li><em>Creating cool animations</em></li><li><em>Different actions on the press of the button</em></li><li><em>Use of dropdown menu</em></li></ul><h4>📖Making Server Side Applications</h4><p><em>JavaScript is also used as a server-side language to build back-end development using node.js (a JavaScript runtime environment built on Google Chrome’s JavaScript V8 engine).</em></p><p><em>The Node.js provides an environment for JavaScript to run on servers.</em></p><p><em>Before JavaScript was only used for making the web pages interactive. However, the use of JavaScript node.js is accepted as a good option for back-end development as well.</em></p><p><em>Companies like LinkedIn, Netflix, Uber, Trello, PayPal, NASA, eBay, Medium use node.js to power their applications.</em></p><h4>📖Creating Interactive Front-End Pages</h4><p><em>One of the growing uses of JS nowadays is creating super interactive front-end applications. For this, the commonly used JavaScript frameworks are React, Vue and Angular.</em></p><p><em>These applications load the resources as soon as the website is loaded which results in fast and responsive user interaction with great user experience.</em></p><p><em>Some examples of single-page applications are Facebook, Google Maps, Gmail, Twitter, etc.</em></p><p><em>Various JavaScript frameworks such as Angular, React, MeteorJs, BackboneJs, EmberJs, PolymerJs, KnockoutJs, Aurelia could be used as the front-end technology to build interactive front end pages.</em></p><p><em>Two popular frameworks used for front-end application development are Angular and React.</em></p><h4>📖Creating Mobile Applications</h4><p><em>JavaScript is also used in making Android and iOS apps. React Native is a popular framework built on JavaScript for this purpose.</em></p><p><em>One thing that is particularly interesting about React Native is that we can create both Android and iOS apps from the same codebase. This helps in:</em></p><ul><li><em>faster development time</em></li><li><em>easy to develop</em></li><li><em>cost effective</em></li></ul><p><em>Some of the popular applications developed in react native are Facebook Ads, Walmart, Bloomberg, Instagram, Gyroscope, AirBnB, Myntra, UberEats, Discord, Townske, and many more.</em></p><h4>📖Game Development</h4><p><em>JavaScript is also used for game development.</em></p><p><em>Various JavaScript libraries such as Three.js, TweenMax could be used to create browser games.</em></p><p><em>Other popular JS gaming engines and libraries are GDevelop, melonJS, ImpactJS, BabylonJS, PhaserJS, PixiJS, PlayCanvas, A-Frame.</em></p><p><em>Some libraries even allow you to export your games into other platforms such as Android, iOS, etc.</em></p><h3>📒Why Learn JavaScript?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*DXMBg_QbQzFvbKaHZFGJhw.png" /></figure><ul><li><em>JavaScript is both client-side and server-side programming language. In the client-side, the code is run and displayed by the browser. On the server-side, Node.js is used.</em></li><li><em>JavaScript is a platform-independent language. Any browser supporting JavaScript can run the code irrespective of the operating system</em></li><li><em>JavaScript uses the </em><strong><em>just-in-time compilation</em></strong><em> technique. Since the compilation is handled at run time, JavaScript is considered an interpreted language.</em></li><li><em>JavaScript is a dynamically typed language. That is, a variable containing number may be reassigned to a string.</em></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7022bba2e0d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cyber Crime & Confusion Matrix]]></title>
            <link>https://lovelyshrivas04.medium.com/cyber-crime-confusion-matrix-48ae789dd8cc?source=rss-c170d73ae9d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/48ae789dd8cc</guid>
            <dc:creator><![CDATA[Lovely Shrivas]]></dc:creator>
            <pubDate>Sat, 05 Jun 2021 08:28:02 GMT</pubDate>
            <atom:updated>2021-06-05T08:29:07.008Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*FGuc3sOcgSrj0bzx1UiMJw.jpeg" /></figure><p>Cybercrime, or computer crime, is a crime that involves a computer and a network. The computer may have been used in the commission of a crime, or it may be the target. Cybercrime may harm someone’s security and financial health.</p><p>Most, but not all, cybercrime is committed by cybercriminals or hackers who want to make money or profit. Cybercrime is carried out by individuals or organizations.</p><p>Some cybercriminals are organized, use advanced techniques and are highly technically skilled. Others are novice hackers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*0ZgNFAhFy3vBrKzXNQbj-Q.jpeg" /></figure><h3>📗Confusion Matrix:</h3><p>A confusion matrix is a type of table construct that plays a specific role in machine learning and related engineering. It helps to show the prediction and recall in a system where the values of the test data are known.</p><h4>In the confusion matrix:</h4><p>A true positive exists where observation is positive with a positive prediction. <br>A false positive exists where observation is negative, with a positive prediction. <br>A true negative exists where observation is negative with negative prediction.<br>A false negative indicates a positive observation with a negative prediction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*3eTPNhBs5ETo7q8VEZV4dg.png" /></figure><p>1.Accuracy is used to find the portion of correctly classified values. It tells us how often our classifier is right. It is the sum of all true values divided by total values.</p><blockquote>Accuracy = (TP + TN)/(TP + TN + FP + FN).</blockquote><p>2. Precision is used to calculate the model’s ability to classify positive values correctly. It is the true positives divided by the total number of predicted positive values.</p><blockquote>Precision: (True positives / Predicted positives) = TP / TP + FP.</blockquote><p>3. Recall is used to calculate the model’s ability to predict positive values. It is the true positives divided by the total number of actual positive values.</p><blockquote>Recall: (True positives / all actual positives) = TP / TP + FN.</blockquote><p>4.F1-score is the harmonic mean of Recall and Precision. It is useful when you need to take both Precision and Recall into account.</p><blockquote>F1-score:((2*recall*precision )/ (recall + precision))=(2*(TP/TP+FN)*(TP/TP+FP))/((TP/TP+FN)+(TP/TP+FP))</blockquote><p>5. Specificity: (True negatives / all actual negatives) =TN / TN + FP.</p><p>6. Misclassification: (all incorrect / all) = FP + FN / TP + TN + FP + FN.<br>also calculated as -&gt; 1-Accuracy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*PLozXYpjc30kPuHbnvv3Aw.jpeg" /></figure><h3>📘How to protect yourself against cybercrime:</h3><ol><li>Keep software and operating system updated.<br>2. Use anti-virus software and keep it updated.<br>3. Use strong passwords.<br>4. Never open attachments in spam emails.<br>5. Do not click on links in spam emails or untrusted websites.<br>6. Do not give out personal information unless secure.<br>7. Contact companies directly about suspicious requests.<br>8. Be mindful of which website URLs you visit.<br>9. Keep an eye on your bank statements.</li></ol><h3>📕Confusion Matrix Implementation in Cyber Crime:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*fjC2p0Bw0GTL9pG5xDX4SQ.png" /></figure><h4>Conclusion:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*OP6bppjxSh5bfOAyX9z_LQ.png" /></figure><h3>📒Types of Error:</h3><h4>Type1 error:</h4><p>This type of error can prove to be very<strong> dangerous</strong>. Our system predicted no attack but in real attack takes place, in that case no notification would have reached the security team and nothing can be done to prevent it.</p><h4>Type2 error:</h4><p>This type of error are not very dangerous as our system is protected in reality but model predicted an attack. the team would get notified and check for any malicious activity. This doesn’t cause any harm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*XNgoa6b8wBjwdX8MTC187g.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48ae789dd8cc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GUI inside Docker Container]]></title>
            <link>https://lovelyshrivas04.medium.com/gui-inside-docker-container-919011123709?source=rss-c170d73ae9d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/919011123709</guid>
            <dc:creator><![CDATA[Lovely Shrivas]]></dc:creator>
            <pubDate>Mon, 31 May 2021 17:20:28 GMT</pubDate>
            <atom:updated>2021-05-31T17:23:52.401Z</atom:updated>
            <content:encoded><![CDATA[<h4>Task:</h4><p>📚 Launch a container on docker in GUI mode.</p><p>📚 Run any GUI software on the container.</p><h4>Linkedin Link:</h4><blockquote><a href="https://www.linkedin.com/posts/lovely-shrivas-a84353193_taskabr2-python-redhat-activity-6804825789629005824-GCcC">https://www.linkedin.com/posts/lovely-shrivas-a84353193_taskabr2-python-redhat-activity-6804825789629005824-GCcC</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Oc7NnFTG0CofEmcfdWG7Wg.jpeg" /></figure><h4>📙Step 01: Install and Start Docker and check the status.</h4><blockquote><a href="https://lovelyshrivas04.medium.com/ml-prediction-model-inside-docker-container-85a9802f908e">ML Prediction Model Inside Docker Container | by Lovely Shrivas | May, 2021 | Medium</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*TeJMeV6GKX4VL3HLR2-8lQ.png" /></figure><h4>📒Step 02: <em>pull image from </em><a href="http://hub.docker.com/"><strong><em>DockerHub</em></strong></a><em> to base OS </em><strong><em>Rhel and launch a container and install python3 inside the container.</em></strong></h4><blockquote>docker run -it — name os_name centos:latest</blockquote><blockquote>yum install python3</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*aENdqqwLQtG_39dMMNot6w.png" /></figure><h4><em>📕Step 03: install any GUI Application inside container here I am going to install firefox, jupyter &amp; gedit.</em></h4><blockquote>yum install firefox -y</blockquote><blockquote>pip3 install jupyter</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*vrrXE2X-nZvvNkUTTuJJeg.png" /></figure><blockquote>yum install gedit -y</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*LoWGFiOEhl8CyW_YBILTzw.png" /></figure><h4>📗 Step 04: Now create an image from previously launched container and than launch a container of this newly created image.(inside baseOs)</h4><blockquote>docker commit os_name image_name:version</blockquote><blockquote>docker run -it — name container_name — env=”Display” — net=host image_name:version</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*A0gVz0-d4mQqo0joXv2LfQ.png" /></figure><h4>📘 Step 05: Now here you can check by using the given commands</h4><blockquote>firefox</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*WdKCkKAeKNPQxKlIckpKew.png" /></figure><blockquote>jupyter notebook</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*01x6g4W_ZitouD05BUtkcQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*H8BojpNRa8id3kkQNGUORg.png" /></figure><blockquote>gedit</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*79mmXIcEPbQ8DlVzNfkWjg.png" /></figure><blockquote>exit</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=919011123709" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ML Prediction Model Inside Docker Container]]></title>
            <link>https://lovelyshrivas04.medium.com/ml-prediction-model-inside-docker-container-85a9802f908e?source=rss-c170d73ae9d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/85a9802f908e</guid>
            <dc:creator><![CDATA[Lovely Shrivas]]></dc:creator>
            <pubDate>Mon, 31 May 2021 10:02:30 GMT</pubDate>
            <atom:updated>2021-05-31T17:22:22.450Z</atom:updated>
            <content:encoded><![CDATA[<h3>Task:</h3><p>📚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>📚Inside the container copy/create Machine Learning model which have created in Jupyter Notebook.</p><h4>Github Link:</h4><blockquote><a href="https://github.com/04lovely12/prediction_model">04lovely12/prediction_model (github.com)</a></blockquote><h4>Linkedin Link:</h4><blockquote><a href="https://www.linkedin.com/posts/lovely-shrivas-a84353193_task1-docker-ml-activity-6803700954777706496-6_sJ">https://www.linkedin.com/posts/lovely-shrivas-a84353193_task1-docker-ml-activity-6803700954777706496-6_sJ</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*VvYOhxkNL-0gXhiXu5THTQ.jpeg" /></figure><h3>Steps:</h3><h4>📕Step 01:Install Docker</h4><blockquote>cd /etc/yum.repos.d/</blockquote><blockquote>vim docker.repo</blockquote><p>(press i to insert, then write all the content given inside the { })</p><p>{</p><p>[docker]</p><p>baseurl = <a href="https://download.docker.com/linux/centos/7/x86_64/stable/">https://download.docker.com/linux/centos/7/x86_64/stable/</a></p><p>gpgcheck = 0</p><p>name = Docker repo</p><p>}</p><p>(press esc type :wq , to save)</p><blockquote>yum repolist</blockquote><blockquote>yum install docker-ce --nobest -y</blockquote><blockquote>systemctl start docker</blockquote><blockquote>systemctl status docker</blockquote><blockquote>systemctl restart docker</blockquote><h4>📗Step 02:Launch Container</h4><blockquote>docker pull centos:latest</blockquote><blockquote>docker run -it centos:latest</blockquote><h4>📘Step 03:Install Python &amp; Libraries inside Container</h4><blockquote>yum install python3</blockquote><blockquote>pip3 install sklearn</blockquote><blockquote>pip3 install pandas</blockquote><blockquote>pip3 install joblib</blockquote><blockquote>pip3 install numpy</blockquote><h4>📒Step 04:Copy Model file</h4><p>Inside base OS run this command to copy file from rhel to container.</p><blockquote>docker cp filename containername:/</blockquote><p>Write a code inside the file and save it (inside the container)</p><blockquote>vi filename.py</blockquote><p>{</p><p>load your code</p><p>}</p><h4>📙Step 05:Run code file and Check prediction of Model(inside Container)</h4><blockquote>python3 filename</blockquote><p>Now give input and check the working of application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PhoO1VzOhgK5S3GI7ahkOQ.jpeg" /></figure><blockquote>exit</blockquote><blockquote>systemctl stop docker (inside base OS)</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=85a9802f908e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>