<?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 Fareena Shaik on Medium]]></title>
        <description><![CDATA[Stories by Fareena Shaik on Medium]]></description>
        <link>https://medium.com/@fareenashaik?source=rss-b261b6cc7cb8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Y7YmIBrAcoA1RYRX</url>
            <title>Stories by Fareena Shaik on Medium</title>
            <link>https://medium.com/@fareenashaik?source=rss-b261b6cc7cb8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 06:38:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@fareenashaik/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[Sequential vs Concurrent vs Parallel Computing]]></title>
            <link>https://medium.com/@fareenashaik/sequential-vs-concurrent-vs-parallel-computing-2f7a221a968c?source=rss-b261b6cc7cb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f7a221a968c</guid>
            <category><![CDATA[concurrent-programming]]></category>
            <category><![CDATA[parallel-computing]]></category>
            <dc:creator><![CDATA[Fareena Shaik]]></dc:creator>
            <pubDate>Sat, 24 Aug 2024 21:12:37 GMT</pubDate>
            <atom:updated>2024-08-24T23:30:26.928Z</atom:updated>
            <content:encoded><![CDATA[<p>While the term sequential is easy to interpret, the same can’t be said about the latter two.</p><p>More often than not, people tend to get confused with the terms concurrent &amp; parallel. So here’s to me trying to untie the tangled knots of confusion apart.</p><p>Let’s start with the easiest of all.</p><h3>Sequential</h3><p>Imagine 1 core (processing unit) and 1 task at hand.</p><p>→ The task gets processed by the processing unit as a whole.</p><p>Simple!</p><p>What if there are 2 tasks (t1 &amp; t2) and the same old 1 core unit?</p><p>→ The first task gets executed as a whole followed by the second task.</p><p>Nothing special.</p><p>And this would be the same even if a hundred and fifty more tasks were lined up.</p><p>Quite Slow, but doesn’t matter, as it’s outdated. Moving on...</p><h3>Concurrent</h3><p>Hmm, to effectively see this visual, imagine 2 tasks (t1 &amp; t2) and 1 Core (processing unit)</p><p>Now,</p><p>Break down the tasks into smaller chunks (t1a, t1b, t1c…)(t2a,t2b,t2c…)</p><p>Yeah,</p><p>Now imagine 2 queues of the tasks (chunks of them) lined up in front of the processing unit</p><p>The processing unit executes chunks of Task 1 and Task 2, one by one, alternating between both tasks rapidly.</p><p>So something like T1a, T2a, T1b, T2b, T1c, T2c…</p><p>And, it happens so quickly that the user gets the impression that the tasks are getting executed simultaneously when it is, in fact, NOT the case.</p><h3>Parallel</h3><p>This is quite different from concurrent, why?</p><p>Because it actually executes the tasks simultaneously.</p><p>How?</p><p>Simple. It uses more than one core.</p><p>Imagine a case where 2 cores [C1, C2] (processing units) are available, along with 2 tasks [T1, T2].</p><p>How will they get executed?</p><p>T1 gets executed by C1 &amp; T2 gets executed by C2, AT THE SAME TIME.</p><p>Simple.</p><p>What if there are, let’s say 4 tasks [T1, T2, T3, T4] &amp; 2 cores [C1, C2]?</p><p>The C1 executes 2 tasks (T1,T3) and C2 executes 2 tasks(T2,T4).</p><p>How exactly? Depends</p><p>It can either execute it sequentially or concurrently.</p><p>But isn’t it a no-brainer at this point that Concurrent execution far exceeds Sequential execution!?</p><p>So let’s take the case of concurrent execution, which means tasks are broken down independently.</p><p>2 core: C1, C2</p><p>4 Tasks: T1(T1a,T1b..), T2(T2a,T2b..), T3(T3a,T3b..), T4(T4a,T4b..)</p><p>The distribution happens as such T1 gets executed by C1, T2 gets executed by C2, T3 gets executed by C1, and T4 gets executed by C2.</p><p>Now imagine 4 queues/columns of Task(chunks) being managed by 2 Cores.</p><p>C1 alternates between executing the chunks of T1 &amp; T3</p><p>Whereas,</p><p>C2 alternates between executing the chunks of T2 &amp; T4</p><p>Point to be noted is that C1 &amp; C2 both are running simultaneously as they are 2 separate physical entities thus gaining the Parallel notion.</p><p>However, 1 core alternating between 2 tasks is considered a logical entity, as such behavior is achieved completely through the program, thereby gaining the concurrency notion.</p><p>Usually and rightfully so, the parallel execution is paired up with concurrent execution.</p><p>Hence why, it opens up the Pandora’s box of confusion.</p><h3>In Conclusion</h3><p><strong>Sequential</strong> <strong>computing</strong>: In a sequence, One after the other.</p><p><strong>Concurrent Computing: </strong>Focuses on the logical part, optimization of the program.</p><p><strong>Parallel Computing</strong>: Focuses on utilizing the physical resources available to it’s maximum.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f7a221a968c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring fun commands in Linux!!]]></title>
            <link>https://medium.com/@fareenashaik/exploring-fun-commands-in-linux-77a1ea2bf9ad?source=rss-b261b6cc7cb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/77a1ea2bf9ad</guid>
            <dc:creator><![CDATA[Fareena Shaik]]></dc:creator>
            <pubDate>Thu, 30 Sep 2021 22:57:58 GMT</pubDate>
            <atom:updated>2021-09-30T22:57:58.717Z</atom:updated>
            <content:encoded><![CDATA[<p>Ever looked at your terminal imagining if only a cow could say hello to me? or maybe how wonderful it could be if only a steam engine sticks on my terminal?! or just maybe the Linux terminal could inherit a few qualities of a fortune cookie!?…</p><p>No?<br>Well neither did I. But some developers out there did!</p><p>Shocking?? Well, the human mind works in ways unheard of.</p><p>Since the developers have thought out-of-the-box, why not explore it.</p><ol><li>The ‘sl&#39; command:</li></ol><p>This command is basically to troll users who mistyped the ls command. It displays a steam engine on the screen</p><p>2. The fortune command:</p><p>The output of this command ranges from a generic piece of advice to a humorous prediction. It’s really fun at times!!</p><p>3. The cowsay command.</p><p>Displays the ascii string given in the command in the mind conversation of a cow.</p><p>4. The cowthink command</p><p>Displays the ascii string given in the command in the mind conversation of a cow.</p><p>5. The toilet command</p><p>Sounds weird (probably a li’l more than the other commands),I know. But it gives seriously cool output by displaying the string provided in the command in a large text created by # and “ ” symbols. Also it provides various options to tweak the colors and styles making it much more cool.</p><p>And the list goes on and on but one point to be observed is that fun-cool stuff can be created in any possible environment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=77a1ea2bf9ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring Date Command in Linux!!]]></title>
            <link>https://medium.com/@fareenashaik/exploring-date-command-in-linux-8c7fd6d92c75?source=rss-b261b6cc7cb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c7fd6d92c75</guid>
            <dc:creator><![CDATA[Fareena Shaik]]></dc:creator>
            <pubDate>Thu, 30 Sep 2021 11:17:05 GMT</pubDate>
            <atom:updated>2021-09-30T11:17:05.225Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*biR-MnhqCh2WgtxCVRFeVA.png" /></figure><p>Sounds silly right!? Like what’s there to explore in a date command! Well, developers did keep in mind to create a lot of variants and options to tweak the date command for the desired structure, so why not use it!</p><p>So here we go!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/422/1*bZ1jZwRnBqPGu6IG_OW1PA.png" /></figure><p>The result of the plain ole’ <em>date</em> command is already available in the picture above, so let&#39;s jump straight into the variants</p><p>Wanna set the date to display it in the terminal?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/1*KcQHG6U6lYm7KIdAN6T6Bg.png" /></figure><p>To get the time and date of the last modification made to a file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/398/1*9gqtFe-DFmVqgps4c9FM1g.png" /></figure><p>As the date command gives the entire [day, date, time] it could be confusing at times, to get the precise time/date/day</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/1*TBL9LB5yQIv5KIdPOgUE7w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/351/1*SSoExlNXcwYK01JDUodu5Q.png" /></figure><p>To get the date in the 0530-format (necessarily the IST or the 5:30 hr forward time zone from the 00:00 hr zone)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/1*KksZnrPlpyVNMGp4dBhlhg.png" /></figure><p>So that&#39;s about it. Have a good day!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c7fd6d92c75" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring espeak-ng command in Linux!!]]></title>
            <link>https://medium.com/@fareenashaik/exploring-espeak-ng-command-in-linux-cfca295c5f80?source=rss-b261b6cc7cb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/cfca295c5f80</guid>
            <category><![CDATA[espeak-ng]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[red-hat-training]]></category>
            <category><![CDATA[terminal]]></category>
            <category><![CDATA[commands]]></category>
            <dc:creator><![CDATA[Fareena Shaik]]></dc:creator>
            <pubDate>Fri, 24 Sep 2021 15:19:42 GMT</pubDate>
            <atom:updated>2021-09-24T15:19:42.189Z</atom:updated>
            <content:encoded><![CDATA[<p>Why do we use espeak-ng? How to use espeak-ng? Stuck with such questions in your mind!? Then give this blog a read!!</p><blockquote>espeak-ng</blockquote><p>If we want a voice-based o/p instead of visual o/p (o/p printed on the terminal screen). Basically its like having somebody speak to you the o/p.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MlifW1augA1GHQcs9t-4Xw.png" /><figcaption>Manual-based description of espeak-ng</figcaption></figure><p>Basic syntax to make the espeak-ng read from the direct text/string provided</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*_-fgO6ZNJOdi4rXWNQLgRw.png" /></figure><blockquote><strong>PS:</strong> It is not possible for me to record an audio of the espeak-ng o/p and attach it here :p But take my word for it or try it out yourself, these commands work!!</blockquote><p>To make the espeak-ng read the contents of the file, we can use the pipe(|) operator to get the contents of the file using cat and pass it to the espeak-ng command to read it out loud. The below image represents this scenario</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZTY6TpiVuMSkIZsLlvzjGQ.png" /></figure><p>The default voice is male-voice and the default language is English to change that, we can add another variant to the command. espeak-ng command supports a lot of global and local languages.</p><p>To see the list of languages supported, the command is provided in the image below along with the glimpse of the o/p.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8NvNTkd8e2eov96TMY1S5g.png" /></figure><p>To customise the language use the two-lettered abbreviation and to change the voice (from male to female) along with the deepness (number beside f/m option), the command is shown in the below image. <em>{Language used Urdu (ur), voice (f), deepness of voice (2)}</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/635/1*ECHA-DGEK2TLawvWXuxLIQ.png" /></figure><p>Besides these variants, there are a lot more options to tweak the command with. To check those out, we can use <em>man</em> command to get the detailed manual on that.(image ref: refer to 1st image in this blog).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cfca295c5f80" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring Zenity command in Linux!!]]></title>
            <link>https://medium.com/@fareenashaik/exploring-zenity-command-in-linux-1165eab52aab?source=rss-b261b6cc7cb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/1165eab52aab</guid>
            <category><![CDATA[linux-tutorial]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[zenity]]></category>
            <category><![CDATA[redhat-linux]]></category>
            <dc:creator><![CDATA[Fareena Shaik]]></dc:creator>
            <pubDate>Fri, 24 Sep 2021 04:48:01 GMT</pubDate>
            <atom:updated>2021-09-24T04:48:01.226Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/326/1*2a2gQgOBhzbIbX11wwKeNw.png" /></figure><p>In general there are heaps and heaps of commands in Linux, but this blog is about zenity.</p><p>In simple terms, zenity is a command that gives graphical output for the terminal input. What does that mean!? Well, usually when we type of a command in the terminal, it gives the output right below. But when we use zenity, the displays the output in a dialog-box outside the terminal.</p><p>The manual definition of zenity is provided in the image for reference. If you don’t understand the terms used, by all means skip it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hjyiAXNCt_f0GAoMnz01mg.png" /><figcaption>Manual-based definition of Zenity.</figcaption></figure><p>So, enough of theoretical definitions, lets look at the examples:</p><p>To get the basic idea of how it pops up a dialog-box output. I’ve run a simple command</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lD6M1_N7wdWntlTox70JBw.png" /><figcaption>Zenity (basic)</figcaption></figure><p>The text provided in the above image is default info. In-order to customize it we can add variants to the command.</p><p>In the below image, I’ve customized the title and the text-body displayed by using simple title and text options to the zenity command</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XMDm-IQdf6R--_rXwRzyqA.png" /></figure><p>If you want to display the value which is stored in a variable in a dialog box, you can use zenity to do that.<br>First we need to assign a variable storing a value. I’ve stored a number in a variable x.<br>Then use $variable_name to display it in the dialog-box. I’ve displayed the the variable in the body section of the pop-up, using the text option with the help of the symbol $.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HqMzuGWTcP-HxQQUi7FGLw.png" /><figcaption>displaying variable value in pop-up</figcaption></figure><p>To display the o/p of a command in the pop-up, we use zenity. In the below, I’ve shown two example to display o/p of date and calendar command in a pop-up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bSr_-ErmWlpTMEoYq1Ku4g.png" /><figcaption>Date in pop-up</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*16RI-ZUSPtKJwCcMppWHbw.png" /><figcaption>Cal o/p in pop-up</figcaption></figure><p>Besides info there are a lot of options to tweak Zenity and leverage our desired o/p.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1165eab52aab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter App]]></title>
            <link>https://medium.com/@fareenashaik/flutter-app-a5a34c8547ac?source=rss-b261b6cc7cb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/a5a34c8547ac</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <dc:creator><![CDATA[Fareena Shaik]]></dc:creator>
            <pubDate>Sun, 22 Aug 2021 18:13:25 GMT</pubDate>
            <atom:updated>2021-08-22T18:13:25.116Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>🎯 Task 11 🎯</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*2-l5vfvslfxuzZEK.jpeg" /></figure><p>⚡Description: Till date whatever we have learnt in Flutter,is need to be implemented in some way integrating other technologies with it</p><p>⚡Hint :1. Create attractive GUI<br>2.Make sure you implement other technologies if possible<br>3.Show your creativity (Optional: Animations,Responsive UI,DB connection ,etc)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*m_NgHu0n5OpMiVSI.png" /></figure><p>To perform the following task I’ve Created a flutter app that performs almost all the things taught in the training.</p><p>build.gradle</p><pre>buildscript {<br>	    ext.kotlin_version = &#39;1.3.50&#39;<br>	    repositories {<br>	        google()<br>	        jcenter()<br>	    }<br>	<br><br>	    dependencies {<br>	        classpath &#39;com.android.tools.build:gradle:4.1.0&#39;<br>	        classpath &quot;org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version&quot;<br>	    }<br>	}<br>	<br><br>	allprojects {<br>	    repositories {<br>	        google()<br>	        jcenter()<br>	    }<br>	}<br>	<br><br>	rootProject.buildDir = &#39;../build&#39;<br>	subprojects {<br>	    project.buildDir = &quot;${rootProject.buildDir}/${project.name}&quot;<br>	    project.evaluationDependsOn(&#39;:app&#39;)<br>	}<br>	<br><br>	task clean(type: Delete) {<br>	    delete rootProject.buildDir<br>	}</pre><p>AndroidMAnifest.xml</p><pre>&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;<br>	    package=&quot;com.FS.i_am_rich&quot;&gt;<br>	   &lt;application<br>	        android:label=&quot;i_am_rich&quot;<br>	        android:icon=&quot;@mipmap/ic_launcher&quot;&gt;<br>	        &lt;activity<br>	            android:name=&quot;.MainActivity&quot;<br>	            android:launchMode=&quot;singleTop&quot;<br>	            android:theme=&quot;@style/LaunchTheme&quot;<br>	            android:configChanges=&quot;orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode&quot;<br>	            android:hardwareAccelerated=&quot;true&quot;<br>	            android:windowSoftInputMode=&quot;adjustResize&quot;&gt;<br>	            &lt;!-- Specifies an Android theme to apply to this Activity as soon as<br>	                 the Android process has started. This theme is visible to the user<br>	                 while the Flutter UI initializes. After that, this theme continues<br>	                 to determine the Window background behind the Flutter UI. --&gt;<br>	            &lt;meta-data<br>	              android:name=&quot;io.flutter.embedding.android.NormalTheme&quot;<br>	              android:resource=&quot;@style/NormalTheme&quot;<br>	              /&gt;<br>	            &lt;!-- Displays an Android View that continues showing the launch screen<br>	                 Drawable until Flutter paints its first frame, then this splash<br>	                 screen fades out. A splash screen is useful to avoid any visual<br>	                 gap between the end of Android&#39;s launch screen and the painting of<br>	                 Flutter&#39;s first frame. --&gt;<br>	            &lt;meta-data<br>	              android:name=&quot;io.flutter.embedding.android.SplashScreenDrawable&quot;<br>	              android:resource=&quot;@drawable/launch_background&quot;<br>	              /&gt;<br>	            &lt;intent-filter&gt;<br>	                &lt;action android:name=&quot;android.intent.action.MAIN&quot;/&gt;<br>	                &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot;/&gt;<br>	            &lt;/intent-filter&gt;<br>	        &lt;/activity&gt;<br>	        &lt;!-- Don&#39;t delete the meta-data below.<br>	             This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --&gt;<br>	        &lt;meta-data<br>	            android:name=&quot;flutterEmbedding&quot;<br>	            android:value=&quot;2&quot; /&gt;<br>	    &lt;/application&gt;<br>	&lt;/manifest&gt;</pre><p>main.dart</p><pre>import &#39;package:flutter/cupertino.dart&#39;;<br>	import &#39;package:flutter/material.dart&#39;;<br>	<br><br>	void main() {<br>	  runApp(<br>	    MaterialApp(<br>	      home: Scaffold(<br>	        backgroundColor: Colors.blueGrey[400],<br>	       appBar:AppBar(<br>	        title: Center(child: Text(&#39;I am rich!&#39;)),<br>	         backgroundColor: Colors.blueGrey[900],<br>	       ),<br>	        body: Center(<br>	          child:Image(<br>	            image: NetworkImage(&#39;https://thumbor.forbes.com/thumbor/960x0/https%3A%2F%2Fspecials-images.forbesimg.com%2Fimageserve%2F60643a612c6235f001cc2f00%2FDiamond-close-up%2F960x0.jpg%3Ffit%3Dscale&#39;),<br>	          ),<br>	        ),<br>	      ),<br>	    ),<br>	  );<br>	}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a5a34c8547ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Use case of JavaScript]]></title>
            <link>https://medium.com/@fareenashaik/use-case-of-javascript-7b14434d93c9?source=rss-b261b6cc7cb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b14434d93c9</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Fareena Shaik]]></dc:creator>
            <pubDate>Sun, 22 Aug 2021 15:31:02 GMT</pubDate>
            <atom:updated>2021-08-22T15:31:02.962Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*AmS7qrQWJejXuQcG.png" /></figure><p>📌 Write a blog explaining the use case of javascript in any of your favourite industries.</p><h3>Node.JS — What is it used for?</h3><p>Node.js is an asynchronous event-driven JavaScript runtime. By using the event-callback/non-blocking approach, Node.js offers a single-threaded event-io model that allows the orchestration of tasks running in parallel. It supports multiple connections without a need for a large memory footprint.</p><p>The usage of Node.js is not only limited to building web applications, but also to implementing various kinds of services.</p><ul><li>Backends and servers</li><li>Frontends</li><li>Developing API</li><li>Microservices</li><li>Scripting and automation</li></ul><p>Now that we know about what is Node.js and its use case, let’s understand how these uses are categorized.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/0*ucC4nHgOrIwUbq0U.png" /></figure><p>Quadrant I includes categories that are most frequently used and to which Industries are leveraging them over time. Not surprisingly, Data streaming, Chatbots, and real-time data fall within this quadrant. Industries use Node.js for these categories every day, many times a day.</p><p>Quadrant II consists of categories that are used intensely, but for finite periods of time. Web scraping falls within quadrant II, along with server-side proxy and a system monitoring dashboard. Although these categories are intensively used by Industries, the retention over a period of time is less than those falling in Quadrant I.</p><p>Quadrant III is made up of categories that have low retention and infrequent use. However, the use of Node.js in these categories is expected to increase in the upcoming years. Needless to say, Big-data and IoT technology fall in this quadrant.</p><p>Quadrant IV comprises categories that have a low frequency of use, but a loyal Industry base. The categories like REST API, Queued I/O Inputs, and command-line apps fall in the category.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TAx7iBXKCBSjaesj.png" /></figure><h3>Chatbots</h3><h3>The Problem</h3><p><strong>For businesses, investment in customer service calls is costly</strong></p><p>A typical business spends $1.3 trillion on 265 billion customer service calls each year. Moreover, 265 billion customer support requests are made every year, which costs businesses a whopping $1.3 trillion to service them. That’s a huge cost considering the revenue made by these businesses is not constant.</p><h3>The Solution</h3><p><strong>Chatbots can offer a better customer service experience at a lower cost</strong></p><p>Building chatbots with Node.js is a perfect solution because you can build a simple API quickly with <a href="https://hapi.dev/">hapi.js</a>, <a href="https://expressjs.com/">Express</a>, etc as it supports real-time messages (RTM) or Slack RTM bots. Facebook has built a sample chatbot with Node.js, which is <a href="https://github.com/fbsamples/messenger-platform-samples">available on Github</a>.</p><p>Drift (conversion-driven marketing and sales platform) is another example of a chatbot that connects businesses with the best leads. Drift lets users directly message them within the browser or provide them with an automated chat experience.</p><h3>Real-time Data</h3><h3>The Problem</h3><p><strong>Scalability bottlenecks in real-time data are very common</strong></p><p>The common real-time data streaming issues are sizing and scaling. If your web app is running live 24 x 7, there is a need to plan out extra resources to execute all the operations without failing to meet any service-level agreements.</p><h3>The Solution</h3><p><strong>Node.JS makes real-time data a boon for web apps</strong></p><p>Node.js is a good fit for building real-time web apps by using push technology over web sockets (a two-way communication between the servers and clients). What’s more revolutionary about Node.js is that it is the best choice for creating server-side web apps. Let’s walk you through a few reasons as to why it is pivotal to choose Node.js for building real-time web apps:</p><ul><li><strong>Sharing &amp; Reusing:</strong> It lets developers share the package of library code.</li><li><strong>I/O Bound:</strong> Node.js handles I/O bound tasks effectively.</li><li><strong>Fast &amp; Scalable:</strong> In real-time web apps, it is possible to handle multi-users requests due to the single-threaded model of Node.js.</li></ul><p>Collaborative web apps (Trello, Google Docs), live chat, instant messaging, and online gaming are examples of real-time apps that benefit from Node.js architecture. These apps do function within a time frame that the users recognize as immediate and current.</p><h3>Server-side proxy</h3><h3>The Problem</h3><p><strong>Third-party proxies can cause troubles in building complex web-apps</strong></p><p>Third-party proxy services such as Nginx and HAProxy are sometimes not feasible and scalable in handling multiple requests from various sources at a time.</p><h3>The Solution</h3><p><strong>Node.js makes it easier to build a proxy server</strong></p><p>While third-party proxy services such as Nginx or HAProxy are affordable, they can add to severe complexity when used for building large scale websites. Node.js can be easily employed as a server-side proxy for collecting data from various third-party resources. Whether you are building news websites such as BBC, a media website such as Forbes, and entertainment websites such as IMDb, you would want to load content from various third-party domains. Node.js is beneficial for proxying different services with different response times. When used as a server-side proxy, it is capable of handling a large number of simultaneous connections in a non-blocking manner.</p><p>For instance: consider a website such as BBC news communicating with various third-party resources, gathering data from different sources, or storing assets like images and videos to third-party cloud services.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b14434d93c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript Integration with Docker.]]></title>
            <link>https://medium.com/@fareenashaik/javascript-integration-with-docker-f7ac3979f792?source=rss-b261b6cc7cb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7ac3979f792</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[python-cgi]]></category>
            <dc:creator><![CDATA[Fareena Shaik]]></dc:creator>
            <pubDate>Sun, 22 Aug 2021 15:07:51 GMT</pubDate>
            <atom:updated>2021-08-22T15:07:51.848Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/809/0*5MLo5lkV83o9cNCd.jpg" /></figure><p><strong>Task Description 📄</strong></p><p>📌 In this task you have to create a Web Application for Docker (one of the great Containerization Tool which provides the user <br>Platform as a Service (PaaS)) by showing your own creativity and UI/UX designing skills to make the web portal user friendly.<br>📌 This app will help the user to run all the docker commands like:<br> 👉docker images<br> 👉docker ps<br> 👉docker run<br> 👉docker rm -f<br> 👉docker exec</p><p>To perform the following task, we start by writing an HTML code for the web portal.</p><p>index.html</p><pre>&lt;html&gt;<br>	  &lt;head&gt;<br>	    &lt;title&gt;<br>	      Search box<br>	    &lt;/title&gt;<br>	  &lt;/head&gt;<br>	  &lt;script type=&quot;text/javascript&quot;&gt;<br>	    function fn() {<br>	      var i=document.getElementById(&#39;in1&#39;).value;<br>	      value xhr = new XMLHTTPRequest();<br>	      xhr.open(&quot;POST&quot;, &quot;http://192.168.43.161/cgi-bin/dcrun.py?x=&quot;+i,true);<br>	      xhr.send();<br>	      xhr.onload=function(){<br>	        var output =xhr.responseText;<br>	        document.getElementById(&#39;d1&#39;).innerHTML=output;<br>	      }<br>	    }<br>	    function fn2() {<br>	      i=&quot;docker images&quot;;<br>	      var xhr = new XMLHTTPRequest();<br>	      xhr.open(&quot;POST&quot;,&quot;http://192.168.43.161/cgi-bin/dcrun.py?x=&quot;+i,true);<br>	      xhr.send();<br>	      xhr.onload=function(){<br>	        var output =xhr.responseText;<br>	        document.getElementById(&#39;d1&#39;).innerHTML=output;<br>	      }<br>	    }<br>	<br><br>	  &lt;/script&gt;<br>	  &lt;body&gt;<br>	    &lt;div class=&quot;login-box&quot;&gt;<br>	      &lt;h2&gt;Docker Web Portal&lt;/h2&gt;<br>	      &lt;form&gt;<br>	        &lt;div class=&quot;user-box&quot;&gt;<br>	          &lt;input id=&quot;in1&quot; type=text&quot; name=&quot;&quot; value=&quot;&quot;&gt;<br>	          &lt;&lt;label&gt;Type your command here.&lt;/label&gt;<br>	          &lt;/div&gt;<br>	          &lt;a onclick=&quot;fn()&quot; href=&quot;#&quot;&gt;<br>	            &lt;span&gt;&lt;/span&gt;<br>	            &lt;span&gt;&lt;/span&gt;<br>	            &lt;span&gt;&lt;/span&gt;<br>	            &lt;span&gt;&lt;/span&gt;<br>	            Run<br>	          &lt;/a&gt;<br>	          &lt;div id=&quot;ip1&quot; onclick=&quot;fn2()&quot;&gt;<br>	            Images<br>	            &lt;/div&gt;<br>	        &lt;/form&gt;<br>	      &lt;/div&gt;<br>	      &lt;img id=&quot;im1&quot; src=&quot;docker.png&quot; alt=&quot;docker&quot;&gt;<br>	      &lt;pre&gt;<br>	        &lt;div id=&quot;d1&quot;&gt; &gt;_ your output will be printed here<br>	        &lt;/div&gt;<br>	      &lt;/pre&gt;<br>	  &lt;/body&gt;<br>	&lt;/html&gt;</pre><p>Creating python CGI code for Docker</p><p>dcrun.py</p><pre>import cgi<br>import subprocess<br>import time<br>print(&#39;Content-type: text/html&#39;)<br>print()<br>f= cgi.FieldStorage()<br>cmd=f.getvalue(&#39;x&#39;)<br>o=subprocess.getoutput(cmd)<br>print(&#39;&gt;_&#39;)<br>print(o)</pre><p>This page can be styled using CSS if needed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7ac3979f792" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[K-Means Clustering Usecases in Security domain.]]></title>
            <link>https://medium.com/@fareenashaik/k-means-clustering-usecases-in-security-domain-632c0a781cb5?source=rss-b261b6cc7cb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/632c0a781cb5</guid>
            <category><![CDATA[k-means-clustering]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Fareena Shaik]]></dc:creator>
            <pubDate>Thu, 12 Aug 2021 17:57:48 GMT</pubDate>
            <atom:updated>2021-08-12T17:57:48.506Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/561/0*-IRqC_uZBpVsDGBt.png" /></figure><h3>What is meant by the K-means algorithm?</h3><p>K-Means clustering is an unsupervised learning algorithm. There is no labelled data for this clustering, unlike in supervised learning. K-Means performs the division of objects into clusters that share similarities and are dissimilar to the objects belonging to another cluster.</p><p>The term ‘K’ is a number. You need to tell the system how many clusters you need to create. For example, K = 2 refers to two clusters. There is a way of finding out what is the best or optimum value of K for a given data.</p><h3>How Does K-Means Clustering Work?</h3><p>The flowchart below shows how k-means clustering works:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/0*1c7QwlE2MLuZ4Xyh.JPG" /></figure><p>The goal of the K-Means algorithm is to find clusters in the given input data. There are a couple of ways to accomplish this. We can use the trial and error method by specifying the value of K (e.g., 3,4, 5). As we progress, we keep changing the value until we get the best clusters.</p><p>Another method is to use the Elbow technique to determine the value of K. Once we get the K’s value, the system will assign that many centroids randomly and measure the distance of each of the data points from these centroids. Accordingly, it assigns those points to the corresponding centroid from which the distance is minimum. So each data point will be assigned to the centroid, which is closest to it. Thereby we have a K number of initial clusters.</p><p>For the newly formed clusters, it calculates the new centroid position. The position of the centroid moves compared to the randomly allocated one.</p><p>Once again, the distance of each point is measured from this new centroid point. If required,</p><p>the data points are relocated to the new centroids, and the mean position or the new centroid is calculated once again.</p><p>If the centroid moves, the iteration continues indicating no convergence. But once the centroid stops moving (which means that the clustering process has converged), it will reflect the result.</p><h3>K-mean Clustering Usecase in Security</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*6lJ0SSQWrfU5T9uqt8lLuw.png" /></figure><p><strong>Cyber profiling criminal</strong></p><p>Cyber profiling is the process of collecting data from individuals and groups to identify significant correlations. the idea of cyber profiling is derived from criminal profiles, which provide information on the investigation division to classify the types of criminals who were at the crime scene. here is an interesting white paper on how to cyber-profile users in an academic environment based on user data preferences.</p><p>Through K-mean Clustering algorithms, the data can be grouped by the number of websites visited. This grouping aims to see what the user frequently accesses websites.</p><p>The data of internet users access at an institution can be categorized as a large data type so that the analysis can be done with data mining. In this case, the clustering algorithm as one of the data mining techniques can be used to find groups (clusters) of a useful object, which the users are depends on the purpose of data analysis.</p><p>Clustering analysis is one of the most useful methods for the acquisition of knowledge and is used to find clusters that are a fundamental and important pattern for the distribution of the data itself.</p><p><strong>Insurance fraud detection</strong></p><p>Machine learning has a critical role to play in fraud detection and has numerous applications in automobile, healthcare, and insurance fraud detection. utilizing past historical data on fraudulent claims, it is possible to isolate new claims based on their proximity to clusters that indicate fraudulent patterns. since insurance fraud can potentially have a multi-million dollar impact on a company, the ability to detect frauds is crucial.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=632c0a781cb5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes Integration with Python-CGI]]></title>
            <link>https://medium.com/@fareenashaik/kubernetes-integration-with-python-cgi-9caebef702c9?source=rss-b261b6cc7cb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/9caebef702c9</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Fareena Shaik]]></dc:creator>
            <pubDate>Thu, 12 Aug 2021 17:07:14 GMT</pubDate>
            <atom:updated>2021-08-12T17:07:14.727Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*xYR4CM3UFusYtZHH9IRx5g.png" /></figure><p>Task Description 📄</p><p>📌 In continuation of task 7.1 you need to Integrate Kubernetes commands that can be run through WebUI created by you. <br>👉 This time create a WebUI page as such that using normal English conversation your all commands can run in the background. <br>For example — when we write ‘run deployment using httpd image’ then it runs the complete deployment command in the backend.</p><p>Feature necessary -<br>👉 It can launch pods with the specific names given by users. <br>👉 Run deployment using the image and name given by the user. <br>👉 Expose services on given user input port number. <br>👉 Scale the replica according to user needs. <br>👉 Delete the complete environment created. <br>👉 Delete specific resources given by the user. <br>👉 Extra features related to k8s ( Optional) <br>Note — There should be a web UI based menu display so that users can get to know what your web app can do.</p><p>📌 This app will help the user to run all the Kubernetes commands:</p><p>python code:</p><pre>print(&quot;content-type: text/html&quot;)<br>	print()<br>	<br><br>	import cgi<br>	import subprocess<br>	<br><br>	f= cgi.FieldStorage()<br>	cmd = f.getvalue(&quot;x&quot;)<br>	pod = f.getvalue(&quot;pod&quot;)<br>	port = f.getvalue(&quot;port&quot;)<br>	replica = f.getvalue(&quot;replica&quot;)<br>	<br><br>	<br><br>	<br><br>	<br><br>	<br><br>	if (&quot;all&quot; in cmd ):<br>		print(subprocess.getoutput(&quot;sudo kubectl get pods  --kubeconfig admin.conf&quot;))<br>	elif(&quot;all&quot; in cmd) and (&quot;deployment&quot; in cmd) :<br>		print(subprocess.getoutput(&quot;kubectl get deployment --kubeconfig admin.conf&quot;))<br>	elif(&quot;deployment&quot; in cmd) and (&quot;create&quot; in cmd ):<br>		print(subprocess.getoutput(&quot;kubectl create deployment {}   --image=httpd --kubeconfig admin.conf &quot;.format(pod)))<br>	elif(&quot;deployment&quot; in cmd) and (&quot;expose&quot; in cmd ):<br>		print(subprocess.getoutput(&quot;kubectl expose deployment {} --port={} --type=NodePort --kubeconfig admin.conf &quot;.format(pod,port)))<br>	elif(&quot;create&quot; in cmd ) or (&quot;scale&quot; in cmd ) and ((&quot;replica&quot; in cmd ) or (&quot;deployment&quot; in cmd )):<br>		print(subprocess.getoutput(&quot;kubectl scale deployment  {} --replicas={} --kubeconfig admin.conf &quot;.format(pod,replica)))<br>	elif (&quot;delete&quot; in cmd ) and (&quot;pod&quot; in cmd):<br>		print(subprocess.getoutput(&quot;kubectl delete pods {} --kubeconfig admin.conf&quot;.format(pod)))<br>	elif(&quot;delete&quot; in cmd ) and (&quot;deployment&quot; in cmd ):<br>		print(subprocess.getoutput(&quot;kubectl delete deployment {}  --kubeconfig admin.conf&quot;.format(pod)))<br>	else:<br>		print(&quot;Please Enter valid input&quot;)</pre><p>HTML code:</p><pre>&lt;html&gt;<br>&lt;head&gt;<br>		&lt;link rel=&quot;stylesheet&quot; href=&quot;style.css&quot; /&gt;<br>	&lt;/head&gt;<br>	&lt;script&gt;<br>	function rqst(){<br>	input = document.getElementById(&quot;input1&quot;).value<br>	pod   = document.getElementById(&quot;name&quot;).value<br>	port  = document.getElementById(&quot;port&quot;).value<br>	replica   = document.getElementById(&quot;replica&quot;).value<br>	var xhr = new XMLHttpRequest();<br>	xhr.open(&quot;GET&quot;, &quot;http://192.168.99.102/cgi-bin/task9.py?x=&quot; + input +&quot;&amp;pod=&quot; +pod + &quot;&amp;port=&quot; + port +&quot;&amp;replica=&quot; +replica,true);<br>	xhr.send();<br>	xhr.onload = function(){	<br>		var output = xhr.responseText;<br>		document.getElementById(&#39;id1&#39;).innerHTML = output;<br>	}<br>	}<br>	&lt;/script&gt;<br>	&lt;body&gt;<br>	&lt;pre&gt;<br>	&lt;div class=&quot;box&quot; id=&quot;id1&quot;&gt; <br>	&lt;img src=&quot;kube.png&quot; class=&quot;logo&quot; height=50px; width=50px;&gt;<br>	&lt;h2&gt;Kubernetes Terminal  &lt;/h2&gt;<br>	&lt;input class=&quot;in&quot; id=&quot;input1&quot; type=&quot;text&quot; placeholder=&quot;Enter command&quot;/&gt;<br>	&lt;input class=&quot;in&quot; name=&quot;name&quot; id=&quot;name&quot; type=&quot;text&quot; placeholder= &quot;Enter Name&quot; /&gt; <br>	&lt;input class=&quot;in&quot; name=&quot;port&quot; id=&quot;port&quot; type=&quot;text&quot; placeholder=&quot;Enter Port&quot;/&gt;<br>	&lt;input class=&quot;in&quot; name=&quot;replica&quot; id =&quot;replica&quot; type=&quot;text&quot; placeholder=&quot;Enter no replicas&quot;/&gt;<br>	&lt;button onclick=&quot;rqst()&quot; class=&quot;btn&quot; &gt;Run Command&lt;/button&gt; <br>	&lt;/br&gt;<br>	&lt;a href=&quot;https://linkedin.com/in/rajneesh-pratap-singh/&quot; class=&quot;a&quot;&gt;ping developer&lt;/a&gt;<br>	&lt;/div&gt;<br>	&lt;/pre&gt;<br>	&lt;/body&gt;<br>&lt;/html&gt;</pre><p>CSS style code:</p><pre>body{<br>		margin: 0;<br>		padding: 0;<br>		background: url(https://medium.com/&quot;kubebg.jpeg&quot;);<br>		background-size: cover;<br>		font-family: sans-serif;<br>	}<br>	.box{<br>		position: absolute;<br>		top: 50%;<br>		left:50%;<br>		transform: translate(-50%,-50%);<br>		width: 350px;<br>		height: 550px;<br>		padding: 80px 40px;<br>		box-sizing: border-box;<br>		background: rgba(0,0,0,0.5);<br>	}<br>	<br><br>	.logo{<br>		width: 100px;<br>		height: 100px;<br>		border-radius: 100%;<br>		overflow: hidden ;<br>		position: absolute;<br>		top: calc(-100px/2);<br>		left: calc(50% - 50px);<br>	}<br>	h2{<br>		margin: 0px;<br>		padding: 0 0 20px;<br>		color: #efed40;<br>		text-align: center;<br>	}<br>	.in{<br>		width: 100%;<br>		margin-bottom: 20px;<br>		border:none;<br>		border-bottom: 1px solid #fff;<br>		background: transparent;<br>		outline: none;<br>		height: 40px;<br>		color: #fff;<br>		font-size: 16px;<br>	<br><br>	}<br>	::placeholder<br>	{<br>		color: rgba(255,255,255,.5);<br>	}<br>	.btn{<br>		border: none;<br>		outline: none;<br>		height: 40px;<br>		color: #fff;<br>		font-size:16px;<br>		background: #ff267e;<br>		cursor: pointer;<br>		border-radius:20px;<br>	}<br>	.btn:hover{<br>		background: #efed40;<br>		color: #262626;<br>	}<br>	.a{<br>		color: #fff;<br>		font-size: 14px;<br>		font-weight: bold;<br>	}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9caebef702c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>