<?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 Sampreethi Bokka on Medium]]></title>
        <description><![CDATA[Stories by Sampreethi Bokka on Medium]]></description>
        <link>https://medium.com/@sampreethi66?source=rss-b43a9b71452b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*rnsnDP-Rch6IaEWhxVXJWA.jpeg</url>
            <title>Stories by Sampreethi Bokka on Medium</title>
            <link>https://medium.com/@sampreethi66?source=rss-b43a9b71452b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 10:01:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sampreethi66/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[Understanding OLAP Systems and Kimball’s Dimensional Modeling Principles]]></title>
            <link>https://sampreethi66.medium.com/understanding-olap-systems-and-kimballs-dimensional-modeling-principles-bebf4f97bd0c?source=rss-b43a9b71452b------2</link>
            <guid isPermaLink="false">https://medium.com/p/bebf4f97bd0c</guid>
            <category><![CDATA[transactional-analysis]]></category>
            <category><![CDATA[transactions]]></category>
            <category><![CDATA[historical-data-analysis]]></category>
            <category><![CDATA[oltp-vs-olap]]></category>
            <category><![CDATA[retail-online-shopping]]></category>
            <dc:creator><![CDATA[Sampreethi Bokka]]></dc:creator>
            <pubDate>Thu, 21 Nov 2024 18:50:30 GMT</pubDate>
            <atom:updated>2024-11-21T18:50:30.160Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s world, organizations collect vast amounts of data from different sources, often in the form of transactions. These transactions, such as sales records in a retail store or customer interactions on a website, help businesses operate efficiently. But raw transactional data alone isn’t enough to provide actionable insights for decision-making. This is where <strong><em>OLAP systems</em></strong><em> </em>and <strong><em>Kimball’s Dimensional Modeling Principles</em></strong><em> </em>come into play.</p><p><strong>What Are OLTP and OLAP Systems?</strong></p><p>Before diving deeper, it’s essential to understand the difference between <strong>OLTP (Online Transaction Processing)</strong> and <strong>OLAP (Online Analytical Processing)</strong> systems.</p><ol><li><strong>OLTP systems</strong> are designed for high-speed processing of day-to-day transactions. For instance, when a customer purchases a product at a store, the transaction is recorded in the store’s database. OLTP systems focus on quick insertions, updates, and deletions of data, making them ideal for real-time operations.</li><li>On the other hand, <strong>OLAP systems</strong> are built for analysis and reporting. They process large volumes of data from various sources and help answer complex business questions such as:</li></ol><ul><li>What product category performed best during a holiday season?</li><li>How did specific discounts affect overall sales?</li><li>Which regions generated the most revenue last quarter?</li><li>Which customer segments are most likely to make repeat purchases during a sale?</li></ul><p>OLAP systems prioritize fast data retrieval over frequent updates, as they are used primarily for generating insights rather than managing transactions.</p><p><strong>Example : A Travel Agency Planning for Peak Vacation Seasons</strong></p><p>A travel agency wants to optimize its offerings for the upcoming summer vacation season. They may need to analyze:</p><ul><li>Which destinations are most frequently booked by families, couples, or solo travelers?</li><li>How did discounts on flights or bundled hotel deals affect booking trends?</li><li>Are customers booking earlier or later than in previous years?</li></ul><p>With an OLAP system, the travel agency can quickly access historical booking data, evaluate trends across different customer demographics, and fine-tune marketing campaigns or package offerings.</p><p><strong>Why Do We Need OLAP Systems?</strong></p><p>Imagine a retail store owner trying to make decisions for the upcoming holiday season. They may need to analyze:</p><ul><li>Sales trends across different categories.</li><li>The impact of previous marketing campaigns.</li><li>Seasonal patterns over several years.</li></ul><p>Answering these questions requires combining data from multiple sources and presenting it in a way that is easy to query and interpret. This is exactly what OLAP systems are designed to do. By consolidating and organizing data, OLAP systems empower both technical professionals and business users to:</p><ol><li><strong>Generate reports and dashboards</strong> with meaningful insights.</li><li><strong>Analyze data across multiple dimensions</strong> (e.g., time, region, product).</li><li><strong>Support better decision-making</strong> through clear and accurate data representation.</li></ol><h4>Kimball’s Dimensional Modeling Principles</h4><p>To make OLAP systems effective, we need a solid design for how data is organized. Kimball’s approach focuses on simplifying data for analysis and creating schemas that are intuitive, fast, and user-friendly.</p><p><strong>Key Concepts of Dimensional Modeling:</strong></p><ol><li><strong>Star Schema</strong>: A star schema consists of:</li></ol><ul><li><strong>Fact tables</strong>: Central tables that store measurable data, such as sales revenue or order quantities.</li><li><strong>Dimension tables</strong>: Surrounding tables that provide context to the facts, such as product details, customer demographics, or time periods.</li></ul><p><strong>2. Denormalization</strong>:</p><ul><li>Unlike traditional databases that focus on normalizing data to reduce redundancy, Kimball emphasizes <strong><em>denormalizing</em></strong> the data to make it easier and faster to query.</li><li>This denormalized structure ensures that even non-technical users can navigate the database and extract insights effortlessly.</li></ul><p><strong>3. Conformed Dimensions</strong>:</p><ul><li>Dimensions like “Date” or “Customer” can be reused across multiple fact tables. These are known as <strong><em>conformed dimensions</em></strong>, which ensure consistency when analyzing data across different areas of the business.</li></ul><p><strong>4. Types of Fact Tables</strong>:</p><ul><li><strong>Transaction Fact Tables</strong>: Capture individual events, such as a single sale.</li><li><strong>Periodic Snapshot Fact Tables</strong>: Summarize data over regular intervals (e.g., daily or monthly sales).</li><li><strong>Accumulating Snapshot Fact Tables</strong>: Track the status of a process over time, such as a customer order moving through various stages.</li></ul><h4>How Does Dimensional Modeling Help Businesses?</h4><p>Kimball’s principles make it easier for businesses to:</p><ul><li>Analyze performance metrics across multiple dimensions (e.g., region, time, and product).</li><li>Generate reports that align with real-world business processes.</li><li>Scale the system as the business grows, while keeping the data structure consistent and reliable.</li></ul><p>For example, a retailer using a Kimball-designed OLAP system can quickly compare holiday sales over the past three years, analyze which products drove the most revenue, and decide which inventory to stock for the next holiday season — all with minimal effort.</p><h4>Star Schema vs. OLAP Cubes</h4><p>While the <strong>star schema</strong> is foundational, businesses often extend it into <strong>OLAP cubes</strong> for multi-dimensional analysis. An OLAP cube allows you to drill down into specific metrics (e.g., daily sales in a particular region) or roll up for broader trends (e.g., yearly revenue across all regions).</p><h4>Conclusion</h4><p>OLAP systems and Kimball’s dimensional modeling principles have revolutionized how businesses transform raw data into actionable insights. By bridging the gap between technical complexity and business needs, these tools empower organizations to make smarter, faster, and more confident decisions.</p><h4><strong>References:</strong></h4><p><a href="https://www.kimballgroup.com/data-warehouse-business-intelligence-resources/books/data-warehouse-dw-toolkit/">https://www.kimballgroup.com/data-warehouse-business-intelligence-resources/books/data-warehouse-dw-toolkit/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bebf4f97bd0c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hypothesis Testing for Data Science]]></title>
            <link>https://sampreethi66.medium.com/hypothesis-testing-for-data-science-fe3c241adf30?source=rss-b43a9b71452b------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe3c241adf30</guid>
            <category><![CDATA[hypothesis-testing]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Sampreethi Bokka]]></dc:creator>
            <pubDate>Sun, 23 Jun 2024 08:41:14 GMT</pubDate>
            <atom:updated>2024-06-23T11:48:14.412Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Statistical test:</strong></h3><p>Procedure to determine whether there is enough evidence to support certain claims, accounting for the inherent randomness in the data we observed (i.e. limited/noisy sample)</p><p>Intuition: It provides a mechanism to guess on your belief based on evidence in sample to judge on possibilities with a level of confidence.</p><p><em>Steps of Testing Hypotheses:</em></p><ol><li>Formulate <strong>null</strong> (H0) and <strong>alternate</strong> (Ha) hypotheses: Broadly, alternative hypothesis is the statement that you want to support it or find evidence in its favor.</li><li>Set confidence level for test: The probability of incorrectly rejecting (H0) when it is in fact true. Broadly, it is the level that you are confident to <strong>reject</strong> (H0) against your guess (Ha).</li><li>Based on assumptions about population and data generating process for your data:</li></ol><p>A. Calculate the relevant test statistic in your sample.</p><p>B. Find what is the chance that test statistic happen if (H0) is true.</p><p>C. If the occurrence chance is smaller than your confidence level, you can reject the (H0) in favor of your (Ha). Otherwise, you don’t have enough evidence for (Ha)!</p><p><strong>Note: H0 must always contain equality(=). Ha always contains difference(</strong>≠, <strong>&gt;, &lt;).</strong></p><p>For example, if we were to test the equality of average means (µ) of two groups:<br>for a two-tailed test, we define H0: µ1 = µ2 and Ha: µ1≠µ2<br>for a one-tailed test, we define H0: µ1 = µ2 and Ha: µ1 &gt; µ2 or Ha: µ1 &lt; µ2.</p><p><strong>Significance Level (α):</strong> The significance level, often denoted by <strong>α</strong> (alpha), represents the probability of rejecting the null hypothesis when it is actually true. Commonly used significance levels include 0.05 and 0.01, indicating a 5% and 1% chance of Type I error, respectively.</p><p><strong>4. P-value:</strong> It is the proportion of samples (assuming the Nll Hypothesis is true) that would be as extreme as the test statistic. It is denoted by the letter <strong>p</strong>.</p><p><strong>5. Critical Value: </strong>Denoted by <strong>C</strong> and it is a value in the distribution beyond which leads to the rejection of the Null Hypothesis. It is compared to the test statistic.</p><p>Now, assume we are running a two-tailed Z-Test at 95% confidence. Then, the level of significance (α) = 5% = 0.05. Thus, we will have (1-α) = 0.95 proportion of data at the center, and α = 0.05 proportion will be equally shared to the two tails. Each tail will have (α/2) = 0.025 proportion of data.</p><p>The critical value i.e., Z95% or Zα/2 = 1.96 is calculated from the <a href="https://www.math.arizona.edu/~rsims/ma464/standardnormaltable.pdf">Z-scores table</a>.</p><h3>Steps of Hypothesis Testing:</h3><p>The steps of hypothesis testing typically involve the following process:</p><ol><li><strong>Formulate Hypotheses</strong>: State the null hypothesis and the alternative hypothesis.</li><li><strong>Choose Significance Level (α)</strong>: Select a significance level (α), which determines the threshold for rejecting the null hypothesis. Commonly used significance levels include 0.05 and 0.01.</li><li><strong>Select Appropriate Test</strong>: Choose a statistical test based on the research question, type of data, and assumptions. Common tests include t-tests, chi-square tests, ANOVA, correlation tests, and regression analysis, among others.</li><li><strong>Collect Data and Calculate Test Statistic</strong>: Collect relevant sample data and calculate the appropriate test statistic based on the chosen statistical test.</li><li><strong>Determine Critical Region</strong>: Define the critical region or rejection region based on the chosen significance level and the distribution of the test statistic.</li><li><strong>Calculate P-value</strong>: Determine the probability of observing a test statistic as extreme as, or more extreme than, the one obtained from the sample data, assuming the null hypothesis is true. The p-value is compared to the significance level to make decisions about the null hypothesis.</li><li><strong>Make Decision</strong>: If the p-value is less than or equal to the significance level (p ≤ α), reject the null hypothesis in favor of the alternative hypothesis. If the p-value is greater than the significance level (p &gt; α), fail to reject the null hypothesis.</li><li><strong>Draw Conclusion</strong>: Interpret the results based on the decision made in step 7. Provide implications of the findings in the context of the research question or problem.</li><li><strong>Check Assumptions and Validate Results</strong>: Assess whether the assumptions of the chosen statistical test are met. Validate the results by considering the reliability of the data and the appropriateness of the statistical analysis.</li></ol><p>By following these steps systematically, researchers can conduct hypothesis tests, evaluate the evidence, and draw valid conclusions from their analyses.</p><h3>Decision Rules</h3><p>The two methods of concluding the Hypothesis test are using the Test-statistic value and p-value.</p><p>In both methods, we start assuming the Null Hypothesis to be true, and then we reject the Null hypothesis if we find enough evidence.</p><p><strong>The decision rule for the Test-statistic method:</strong></p><blockquote><em>if test-statistic (t) &gt; critical Value </em><strong><em>C</em></strong><em>, we reject Null Hypothesis.<br>If test-statistic (t) ≤ critical value </em><strong><em>C</em></strong><em>, we fail to reject Null Hypothesis.</em></blockquote><p><strong>The decision rule for the p-value method:</strong></p><blockquote><em>if p-value (p) &gt; level of significance (α), we fail to reject Null Hypothesis<br>if p-value (p) ≤ level of significance (α), we reject Null Hypothesis.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*5nhQ_x6Tem2tqS9qgB5Hrg.png" /><figcaption><strong>Types of Errors</strong></figcaption></figure><p><strong>Type I error: Occurs when we reject a True Null Hypothesis and is </strong>denoted as α.</p><p><strong>Type II error: </strong>Occurs when we accept a False Null Hypothesis and is denoted as β.</p><p><strong>Accuracy: </strong>Number of correct predictions / Total number of cases.</p><h4>Hypothesis Testing if the Data is Continuous:</h4><p>When dealing with continuous data, several common hypothesis tests are used, depending on characteristics of the data. Some of the most widely used hypothesis tests for continuous data include:</p><ol><li><strong>One-Sample t-test</strong>: Used to compare the mean of a single sample to a known value or hypothesized population mean.</li><li><strong>Paired t-test</strong>: Compares the means of two related groups (e.g., before and after treatment) to determine if there is a significant difference.</li><li><strong>Independent Samples t-test</strong>: Compares the means of two independent groups to determine if there is a significant difference between them.</li><li><strong>Analysis of Variance (ANOVA)</strong>: Used to compare means across three or more independent groups to determine if there are any statistically significant differences.</li><li><strong>Correlation Test (Pearson’s correlation coefficient)</strong>: Determines if there is a linear relationship between two continuous variables.</li><li><strong>Regression Analysis</strong>: Evaluates the relationship between one dependent variable and one or more independent variables.</li></ol><h4>Hypothesis Tests if the Data is Discrete:</h4><p>When dealing with discrete data, several common hypothesis tests are used to analyze differences between groups, associations, or proportions. Some of the most widely used hypothesis tests for discrete data include:</p><ol><li><strong>Chi-Square Test of Independence</strong>: Determines whether there is a significant association between two categorical variables by comparing observed frequencies to expected frequencies.</li><li><strong>Chi-Square Goodness-of-Fit Test</strong>: Assesses whether the observed frequency distribution of a single categorical variable differs significantly from a hypothesized or expected distribution.</li><li><strong>Binomial Test</strong>: Determines whether the proportion of successes in a series of independent Bernoulli trials differs significantly from a hypothesized value.</li><li><strong>Poisson Test</strong>: Tests whether the observed counts of events in a fixed interval of time or space follow a Poisson distribution, often used in count data analysis.</li></ol><p>This article underscores the pivotal role of hypothesis testing in data science for informed decision-making.</p><p>Thanks for reading this!!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe3c241adf30" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Explore date command and with options and try to use every option and create a simple document for…]]></title>
            <link>https://sampreethi66.medium.com/explore-date-command-and-with-options-and-try-to-use-every-option-and-create-a-simple-document-for-5f62635a0ee0?source=rss-b43a9b71452b------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f62635a0ee0</guid>
            <dc:creator><![CDATA[Sampreethi Bokka]]></dc:creator>
            <pubDate>Wed, 29 Sep 2021 18:44:46 GMT</pubDate>
            <atom:updated>2021-09-29T18:44:46.658Z</atom:updated>
            <content:encoded><![CDATA[<h3>Explore date command and with options and try to use every option and create a simple document for it.</h3><p>Date command is <strong>used to display the system date and time</strong>. date command is also used to set date and time of the system. By default the date command displays the date in the time zone on which unix/linux operating system is configured. You must be the super-user (root) to change the date and time.</p><p>FORMAT controls the output. Interpreted sequences are:</p><p>▪date +%a Displays weekday in short name (e.g., Sun)</p><p>▪date +%A Displays full weekday name (e.g.,<strong> </strong>Sunday)</p><p>▪date +%b Displays month name in short form (<strong>e.g.,</strong> Jan)</p><p>▪date +%B Displays full month name (e.g., January)</p><p>▪date +%c Displays date and time (e.g., Fri Sep 3 23:05:25 2021)</p><p>▪date +%C Displays century, except omit last two digits (e.g., 20)</p><p>▪date +%d Displays day of month (e.g., 24)</p><p>▪date +%D Displays date same as %m/%d/%y(month/date/year) (e.g.,09/24/2021)</p><p>▪date +%e Displays day of month same as command %d (e.g.,24)</p><p>▪date +%F Displays full date; same as %Y-%m-%d(Year/Month/date) (e.g.,2021/09/24)</p><p>▪date +%g Displays last two digits of year (e.g.,21)</p><p>▪date +%G Displays year (e.g.,2021)</p><p>▪date +%h Displays month in short form same as %b (e.g., Jan)</p><p>▪date +%H Displays hour (00..23)</p><p>▪date +%I Displays hour (01..12)</p><p>▪date +%j Displays day of year (001..366)</p><p>▪date +%m Displays month (01..12)</p><p>▪date +%M Displays minute (00..59)</p><p>▪date +%n Displays shifts to a newline</p><p>▪date +%N Displays nanoseconds (000000000..999999999)</p><p>▪date +%p Displays either AM or PM based upon time</p><p>▪date +%q Displays quarter of year (1..4)</p><p>▪date +%r Displays locale’s 12-hour clock time (e.g., 11:11:04 PM)</p><p>▪date +%R Displays 24-hour hour and minute which is same as %H:%M</p><p>▪date +%s Displays seconds since 1970–01–01 00:00:00 UTC</p><p>▪date +%S Displays second (00..60)</p><p>▪date +%t Displays a tab by adding new tab</p><p>▪date +%T Displays time which is same as %H:%M:%S e.g.,22:19:01</p><p>▪date +%u Displays day of week (1..7); 1 is Monday</p><p>▪date +%U Displays week number of year, with Sunday as first day of week (00..53)</p><p>▪date +%V Displays week number, with Monday as first day of week (01..53)</p><p>▪date +%V Displays week number, with Monday as first day of week (01..53)</p><p>▪date +%w Displays day of week (0..6); 0 is Sunday</p><p>▪date +%W Displays week number of year, with Monday as first day of week (00..53)</p><p>▪date +%x Displays date representation (e.g., 12/31/99)</p><p>▪date +%X Displays time representation (e.g., 23:13:48)</p><p>▪date +%y Displays last two digits of year (00..99)</p><p>▪date +%Y Displays year</p><p>▪date +%z Displays time zone hhmm (hourminute) (e.g., +0530)</p><p>▪date +%:z Displays time zone hh:mm(hour:minute)(e.g., +05:30)</p><p>▪date +%::z Displays time zone hh:mm:sec(hour:minute:seconds) (e.g.,+05:30:00)</p><p>▪date +%Z Displays alphabetic time zone abbreviation (e.g., IST)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*tKvXdqk181o9NYGK.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*IOX4-xkAG9x-jKTM.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*ERJraxNhGw8BWxra.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*fuPBdpAhKVN1wXzz.jpeg" /></figure><p>Thanks for reading !!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f62635a0ee0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Zenity]]></title>
            <link>https://sampreethi66.medium.com/zenity-116499874743?source=rss-b43a9b71452b------2</link>
            <guid isPermaLink="false">https://medium.com/p/116499874743</guid>
            <category><![CDATA[zenity]]></category>
            <dc:creator><![CDATA[Sampreethi Bokka]]></dc:creator>
            <pubDate>Fri, 24 Sep 2021 13:35:41 GMT</pubDate>
            <atom:updated>2021-09-24T13:35:41.736Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Zenity</strong> is an open source and a cross-platform application which displays <strong>GTK+ Dialog Boxes</strong> in command-line and using shell scripts. It allows to ask and present information to/from shell in Graphical Boxes. The application lets you create Graphical dialog boxes in command-line and makes the interaction between user and shell very easy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*ZEbM4ZYc2Vnd3aIV77JbPQ.jpeg" /></figure><h4>Zenity Features</h4><ol><li>FOSS Software</li><li>Cross Platform Application</li><li>Allow GTK+ Dialog Box Execution</li><li>Command Line Tool</li><li>Support in Shell Scripting</li></ol><h4>Usefulness</h4><ol><li>Easy GUI Creation</li><li>Less features than other complex Tools</li><li>Enables shell scripts to interact with a GUI users</li><li>Simple dialog creation is possible for graphical user interaction</li></ol><p>Since <strong>Zenity</strong> is available for all known major platforms, and based on GTK+ library, Zenity program can be ported to/from another platform.</p><h3>Basic Zenity options</h3><ol><li>Calendar Dailog : Shows calendar in dailogbox.</li></ol><pre>[sam@localhost ~]$ zenity --calendar</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*35sx6PQbyMQ_gdnHMMZ_5g.jpeg" /></figure><p>2.A Progress Bar.</p><pre>[sam@localhost ~]$ zenity --progress</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*zwgdXXRP9KYRmNyPljEpEg.jpeg" /></figure><p>3.An Warning in Dailog Box.</p><pre>[sam@localhost ~]$ zenity --warning</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*rcWMpGfkHuy2oUXmffCesQ.jpeg" /></figure><p>4.File selection in Dailog Box.</p><pre>[sam@localhost ~]$ zenity --file-selection</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*hJ_Dfew3bAO0aPQuB5VfPA.jpeg" /></figure><p>5.An Entry in Dailog Box.</p><pre>[sam@localhost ~]$ zenity --entry</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*79OJSf3XRGNO0v-odxZPXA.jpeg" /></figure><p>6.password in Dailog Box.</p><pre>[sam@localhost ~]$ zenity --password</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*XcksA_niraTCOOi39IZEtA.jpeg" /></figure><p>So we get all type of dailogbox using zenity. we can also make interactive dailog box using zenity and use in realtime application.</p><p>Here are one example of zenity dailog box.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*tZ_RsE1jS5XUPl5wR9MJig.jpeg" /></figure><p>!!!Thanks for reading this article!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=116499874743" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter Integration with Docker]]></title>
            <link>https://sampreethi66.medium.com/flutter-integration-with-docker-4eef034b853?source=rss-b43a9b71452b------2</link>
            <guid isPermaLink="false">https://medium.com/p/4eef034b853</guid>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <dc:creator><![CDATA[Sampreethi Bokka]]></dc:creator>
            <pubDate>Fri, 27 Aug 2021 17:31:22 GMT</pubDate>
            <atom:updated>2021-08-27T17:32:42.225Z</atom:updated>
            <content:encoded><![CDATA[<p>In this blog going to create a flutter app where you can run any Linux or Docker commands</p><p>1. Create attractive GUI</p><p>2.Make sure you implement other technologies if possible</p><p>3.Show your creativity (Optional: Animations, Responsive UI,DB connection , etc.)</p><h3>Firstly I used the concept of Python-CGI to act as the back-end server:</h3><p>I have written this in python, so that the user can interact with CLI internally and fetch the output on web-page.</p><p>Hereby, is the code for python-CGI:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*fkIWjBXDD4E4cy-l.png" /></figure><h3>Now comes the most exciting part that was to create the Frontend, look and feel or the interface of the App.</h3><p>Now for writing any code in dart language and finally making it executable I used the “material.dart” package so make it simpler for me do write the code. So for imprting the package I used the command : “ import ‘package:flutter/material.dart’ “; .</p><p>For creating the App I created a Stateless widget Class and used the MaterialApp() widget and as the child of the widget I used Scaffold, and inside the body of the Scaffold I used the container widget to give the appearance to my desired app.</p><p>Inside Container all the properties of the app are comprised by me, whether its the Text widget, TextField(), Image(), Circle Avatar() ,etc and I have also used some more small woidgets that gave the final touch to the first/ home page of my app, some of which were SizedBox(), BoxDecoration(), TextStyle(), and much more.</p><p>I also added a button on pressing which will take us to the next page . But for that you have to write the name of the service you want to use in the text field provided.</p><p>After creating the look and feel of my home page , I used the concept of Page Navigation to move from one page to another page of my app and to accomplish this I used the widget MaterialPageRoute() and to make this run I used Navigator.push() which will enable me to reach to the next page of my app. And I also saved the entire widget tree in a variable called “context”, so that I can easily navigate through the pages of the app.</p><p>So, after doing all the above specified things I can move to the next page by typing the name of the service in the text field , and clicking the “SERVICE” TextButton().</p><p>Now, for creating the second page I used “ import ‘package:http/http.dart’; “ package to use the Python-CGI code written in the backend server. And for making this package executable I added “ http: ^0.13.3 “ to my app dependencies.</p><p>I created a Stateful widget class so that anything that comes from the backend and needs to be changed on the fly , can be displayed on the app screen.</p><p>Mainly in the second page I kept two TextField() of enter the name and image, button to send the input to the backend, FloatingActionButton() to move back to the home page and one info icon floating button to give information about Docker . On pressing the “OUTPUT” button the name and image of the container was sent to the backend using the command given below.</p><pre>Uri.http(&quot;192.168.31.8&quot;, &quot;/cgi-bin/app1.py&quot;, {&quot;x&quot;: cmd, &quot;y&quot;: name});</pre><p>Then after the creation of the container with the given name and image I needed to display the confirmation message that came from the backend in the front end I used “$” with the variable in which the message from the backend was saved.</p><p>And finally, the facility of this app was that on clicking the info icon FloatingActionButton(), it can also show the ModalBottomSheet using showModalBottomSheet() and building the sheet using the builder which will show the information regarding “ What is a Docker “.</p><p>So the output on clicking the info icon FloatingActionButton() is as below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/373/0*-cvEkg8Hx0iI5W1F.jpeg" /></figure><h3>Thanks for reading this article !</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4eef034b853" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[K-means Clustering and its applications in security domain]]></title>
            <link>https://sampreethi66.medium.com/k-means-clustering-and-its-applications-in-security-domain-9c5fab6c7bf6?source=rss-b43a9b71452b------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c5fab6c7bf6</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[supervised-learning]]></category>
            <category><![CDATA[unsupervised-learning]]></category>
            <category><![CDATA[k-means-clustering]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Sampreethi Bokka]]></dc:creator>
            <pubDate>Mon, 19 Jul 2021 17:59:09 GMT</pubDate>
            <atom:updated>2021-07-19T17:59:09.977Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*BirhlewRIPZfvMxk64Eo0A.jpeg" /></figure><p>Clustering is one of the most common exploratory data analysis technique used to get an intuition about the structure of the data. It can be defined as the task of identifying subgroups in the data such that data points in the same subgroup (cluster) are very similar while data points in different clusters are very different. In other words, we try to find homogeneous subgroups within the data such that data points in each cluster are as similar as possible according to a similarity measure such as Euclidean-based distance or correlation-based distance. The decision of which similarity measure to use is application-specific.</p><p>Clustering is being used in Unsupervised Learning Algorithm in Machine Learning as it can be segregated multivariate data into various groups, without any supervisor, on basis of common pattern hidden inside the datasets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/1*9QigmIOJQGybm9-De6yipw.png" /></figure><h3>What is unsupervised learning?</h3><p>Unsupervised learning is where you train a machine learning algorithm, but you don’t give it the answer to the problem. In Unsupervised Learning, the machine uses unlabeled data and learns on itself without any supervision. The machine tries to find a pattern in the unlabeled data and gives a response.</p><h3>What is k-means clustering?</h3><p><strong>K-Means clustering is an unsupervised learning algorithm</strong>. There is no labeled data for this clustering, unlike in supervised learning. <strong><em>K-Means</em></strong> <strong><em>performs the division of objects into clusters</em></strong> that share similarities and are dissimilar to the objects belonging to another cluster. The K-Means clustering algorithm is an<strong><em> iterative process </em></strong>where you are trying to minimize the distance of the data point from the average data point in the 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><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*GmKo6IVtrRf2cBhxe-oSQA.png" /></figure><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/1*Z94qDzHoG03HRzerGQf4vA.jpeg" /><figcaption>K-means clustering working diagram</figcaption></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><h3>How to choose the value of “K number of clusters” in K-means Clustering?</h3><p>The performance of the K-means clustering algorithm depends upon highly efficient clusters that it forms. But choosing the optimal number of clusters is a big task. There are some different ways to find the optimal number of clusters, but here we are discussing the most appropriate method to find the number of clusters or value of K.</p><h3>Where can we apply k-means?</h3><p>k-means can typically be applied to data that has a smaller number of dimensions, is numeric, and is continuous. think of a scenario in which you want to make groups of similar things from a randomly distributed collection of things; k-means is very suitable for such scenarios.</p><h3>Identifying crime localities</h3><p>with data related to crimes available in specific localities in a city, the category of crime, the area of the crime, and the association between the two can give quality insight into crime-prone areas within a city or a locality.</p><h3>Insurance fraud detection</h3><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 its 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><h3>Cyber-profiling criminals</h3><p>cyber-profiling is the process of collecting data from individuals and groups to identify significant co-relations. 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.</p><h3>Automatic clustering of it alerts</h3><p>large enterprise it infrastructure technology components such as network, storage, or database generate large volumes of alert messages. because alert messages potentially point to operational issues, they must be manually screened for prioritization for downstream processes. <a href="https://content.pivotal.io/blog/using-data-science-techniques-for-the-automatic-clustering-of-it-alerts">clustering of data </a>can provide insight into categories of alerts and mean time to repair, and help in failure prediction.</p><h3>!!!Thanks for reading this article!!!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c5fab6c7bf6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automatic Number Plate Recognition using CNN]]></title>
            <link>https://sampreethi66.medium.com/automatic-number-plate-recognition-using-cnn-899536049e1?source=rss-b43a9b71452b------2</link>
            <guid isPermaLink="false">https://medium.com/p/899536049e1</guid>
            <category><![CDATA[css]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[haar-cascades]]></category>
            <category><![CDATA[cnn]]></category>
            <dc:creator><![CDATA[Sampreethi Bokka]]></dc:creator>
            <pubDate>Sun, 04 Jul 2021 15:36:59 GMT</pubDate>
            <atom:updated>2021-07-04T15:36:59.145Z</atom:updated>
            <content:encoded><![CDATA[<p>Automatic Number Plate Recognition systems come in all shapes and sizes:</p><ul><li>And even <em>more, advanced</em> ANPR systems use specialized neural network architectures to pre-process and clean images before they are OCR’d, thereby improving ANPR accuracy.</li><li>Automatic Number Plate Recognition (ANPR/ALPR) is a process involving the following steps:</li><li><strong>Step #1:</strong> Detect and localize a license plate in an input image/frame.</li><li><strong>Step #2:</strong> Extract the characters from the license plate.</li><li><strong>Step #3:</strong> Apply some form of Optical Character Recognition (OCR) to recognize the extracted characters.</li></ul><h3><strong>Step 1: </strong>Importing the libraries</h3><pre>import cv2<br>from matplotlib import pyplot as plt<br>import numpy as np<br>import imutils<br>import easyocr</pre><h3><strong>Step 2: Number plate detection</strong></h3><p>Let’s start simply by importing a sample image of a car with a license plate and define some functions:</p><p>The above function works by taking image as input, then applying ‘haar cascade’ that is pre-trained to detect Indian license plates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rroDKdmPvhqSO8stEPGbUg.jpeg" /><figcaption>Input Image</figcaption></figure><p>output image with detected plate highlighted</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/170/1*qFcrXMr1Sizm55qBJ76QCw.png" /></figure><p>output image of detected license plate.</p><h3>Step 4:Performing some image processing on the License plate.</h3><p>The below function takes in the image as input and performs the following operation on it-</p><ul><li>resizes it to a dimension such that all characters seem distinct and clear</li><li>convert the colored image to a grey scaled image i.e instead of 3 channels (BGR), the image only has a single 8-bit channel with values ranging from 0–255 where 0 corresponds to black and 255 corresponds to white. We do this to prepare the image for the next process.</li><li>now the threshold function converts the grey scaled image to a binary image i.e each pixel will now have a value of 0 or 1 where 0 corresponds to black and 1 corresponds to white. It is done by applying a threshold that has a value between 0 and 255, here the value is 200 which means in the grayscaled image for pixels having a value above 200, in the new binary image that pixel will be given a value of 1. And for pixels having value below 200, in the new binary image that pixel will be given a value of 0.</li><li>The image is now in binary form and ready for the next process Eroding.<br>Eroding is a simple process used for removing unwanted pixels from the object’s boundary meaning pixels that should have a value of 0 but are having a value of 1. It works by considering each pixel in the image one by one and then considering the pixel’s neighbor (the number of neighbors depends on the kernel size), the pixel is given a value 1 only if all its neighboring pixels are 1, otherwise it is given a value of 0.</li><li>The image is now clean and free of boundary noise, we will now dilate the image to fill up the absent pixels meaning pixels that should have a value of 1 but are having value 0. The function works similar to eroding but with a little catch, it works by considering each pixel in the image one by one and then considering the pixel’s neighbor (the number of neighbors depends on the kernel size), the pixel is given a value 1 if at least one of its neighboring pixels is 1.</li><li>The next step now is to make the boundaries of the image white. This is to remove any out of the frame pixel in case it is present.</li><li>Next, we define a list of dimensions that contains 4 values with which we’ll be comparing the character’s dimensions for filtering out the required characters.</li><li>Through the above processes, we have reduced our image to a processed binary image and we are ready to pass this image for character extraction.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/336/1*quPDKyi0A7WPWh4I5j_6DA.png" /><figcaption>Grayscale Image</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/336/1*Xh20enrcB4uypD4Ilfrh9Q.png" /><figcaption>edge detection Image</figcaption></figure><h3>Step 5: Segmenting the alphanumeric characters from the license plate.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/336/1*OaqId0UOX2tudQ0oNsUYFg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/1*mSqZdTAiW36nDSEQ57zlOQ.png" /></figure><p><strong>Step7: Creating a web portal using python code for detecting a number plate and characters on number plate of the car and sending the detail of car owner of which is not in parking area.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*kz4AF2NFEjqyO8rKD5ryPw.png" /><figcaption>Web portal</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*XM_v9Ll3gAM6zcx_o7cO3g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*ZB_BI59tFP-nSrCSEGt6Zw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*uCuDch9Yfp2OgS_z23EOBQ.png" /></figure><p>!!!Thanks for reading this article😃!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=899536049e1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes Web-UI with Python-CGI]]></title>
            <link>https://sampreethi66.medium.com/kubernetes-web-ui-with-python-cgi-eccd52d69190?source=rss-b43a9b71452b------2</link>
            <guid isPermaLink="false">https://medium.com/p/eccd52d69190</guid>
            <category><![CDATA[html]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[web-ui]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Sampreethi Bokka]]></dc:creator>
            <pubDate>Tue, 29 Jun 2021 21:36:49 GMT</pubDate>
            <atom:updated>2021-06-29T21:36:49.141Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*Pwu-RB5ovaLhJYWgK0kKMw.jpeg" /><figcaption>kubernetes</figcaption></figure><h3>What is Kubernetes?</h3><p>Kubernetes is a free and open source container orchestration technology for automating application deployment, administration, and scalability. Learn how Kubernetes makes cloud-native development more cost-effective.</p><p>Kubernetes, often known as “k8s” or “kube,” is a container orchestration platform for scheduling and automating containerized application deployment, administration, and scaling.</p><p>Kubernetes was created by Google employees before being released as open source in 2014. It’s a descendent of Borg, Google’s internal container orchestration engine. The helm in the Kubernetes logo is derived from the Greek word kubernetes, which means helmsman or pilot (link resides outside IBM).</p><p>Today, Kubernetes and the container ecosystem as a whole are growing into a general-purpose computing platform and ecosystem that competes — if not outperforms — virtual machines (VMs) as the fundamental building blocks of modern cloud infrastructure and applications. This ecosystem enables businesses to provide a high-productivity Platform-as-a-Service (PaaS) that tackles many infrastructure- and operations-related chores and difficulties associated with cloud-native development, allowing development teams to focus only on code and innovation.</p><p><strong>So what we are going to do?</strong></p><p>We gonna create a Web-UI that will send request to my Virtual Machine for running commands of kubernetes written in common English as per a Web Menu mentioned in the web page. The Web-UI can perform following task:</p><p>It can launch pods with specific name given by user.</p><p>Run deployment using image and name given by user.</p><p>Expose services on given user input port number.</p><p>Scale the replica according to user need.</p><p>Delete complete environment created.</p><p>Delete specific resources given by user.</p><h3>Server python CGI Code:</h3><pre>#!/usr/bin/python3</pre><pre>import cgi</pre><pre>import subprocess</pre><pre>print(&quot;content-type: text/html&quot;)</pre><pre>print(&quot;Access-Control-Allow-Origin: *&quot;)</pre><pre>print()</pre><pre>f = cgi.FieldStorage()</pre><pre>t = f.getvalue(&quot;x&quot;)</pre><pre>q = f.getvalue(&quot;y&quot;)</pre><pre>val = t.split()</pre><pre>if val[0] == &quot;1&quot;:</pre><pre>     deployment_name = val[2]</pre><pre>     image_name = val[1]</pre><pre>     cmd = &quot;kubectl create deployment &quot; + (deployment_name) + &quot; --                 image=&quot; + (image_name)</pre><pre>     output = subprocess.getoutput( cmd + &quot; --kubeconfig    admin.conf&quot;)</pre><pre>      print(&#39;&lt;h4&gt; &lt;pre&gt; {} &lt;/pre&gt; &lt;/h4&gt;&#39;.format(output))</pre><pre>elif val[0] == &quot;2&quot;:</pre><pre>     pod_name = val[2]</pre><pre>     image_name = val[1]</pre><pre>     cmd = &quot;kubectl run &quot; + (pod_name) + &quot; --image=&quot; + (image_name)</pre><pre>     output = subprocess.getoutput(cmd + &quot; --kubeconfig admin.conf&quot;)</pre><pre>     print(&#39;&lt;h4&gt; &lt;pre&gt; {} &lt;/pre&gt; &lt;/h4&gt;&#39;.format(output))</pre><pre>elif val[0] == &quot;3&quot;:</pre><pre>       pod_name = val[1]</pre><pre>       cmd = &quot;kubectl delete pod &quot; + (pod_name)</pre><pre>       output = subprocess.getoutput(cmd + &quot; --kubeconfig admin.conf&quot;)</pre><pre>       print(&#39;&lt;h4&gt; &lt;pre&gt; {} &lt;/pre&gt; &lt;/h4&gt;&#39;.format(output))</pre><pre>elif val[0] == &quot;4&quot;:</pre><pre>       deployment_name = val[1]</pre><pre>       cmd = &quot;kubectl delete deployment &quot; + (deployment_name)</pre><pre>       output = subprocess.getoutput(cmd + &quot; --kubeconfig admin.conf&quot;)<br>print(&#39;&lt;h4&gt; &lt;pre&gt; {} &lt;/pre&gt; &lt;/h4&gt;&#39;.format(output))</pre><pre>elif val[0] == &quot;5&quot;:</pre><pre>       deployment_name = val[1]</pre><pre>       port_no = val[2]</pre><pre>       Expose_type =  val[3]</pre><pre>       cmd = &quot;kubectl expose deployment &quot; + (deployment_name) + &quot; --port=&quot; + (port_no) + &quot; --type=&quot; + (Expose_type)</pre><pre>       output = subprocess.getoutput(cmd + &quot; --kubeconfig admin.conf&quot;)</pre><pre>       print(&#39;&lt;h4&gt; &lt;pre&gt; {} &lt;/pre&gt; &lt;/h4&gt;&#39;.format(output))</pre><pre>elif val[0] == &quot;6&quot;:</pre><pre>       deployment_name = val[1]</pre><pre>       replica = val[2]</pre><pre>       cmd = &quot;kubectl scale deployment &quot; + (deployment_name) + &quot; --replicas=&quot; + (replica)</pre><pre>       output = subprocess.getoutput(cmd + &quot; --kubeconfig admin.conf&quot;)</pre><pre>        print(&#39;&lt;h4&gt; &lt;pre&gt; {} &lt;/pre&gt; &lt;/h4&gt;&#39;.format(output))</pre><pre>elif val[0] == &quot;7&quot;:</pre><pre>        cmd = &quot;kubectl get pods --kubeconfig admin.conf&quot;</pre><pre>        output = subprocess.getoutput(cmd)</pre><pre>        print(&#39;&lt;h4&gt; &lt;pre&gt; {} &lt;/pre&gt; &lt;/h4&gt;&#39;.format(output))</pre><pre>elif val[0] == &quot;8&quot;:</pre><pre>        cmd = &quot;kubectl get deployments --kubeconfig admin.conf&quot;</pre><pre>        output = subprocess.getoutput(cmd)</pre><pre>        print(&#39;&lt;h4&gt; &lt;pre&gt; {} &lt;/pre&gt; &lt;/h4&gt;&#39;.format(output))</pre><pre>elif val[0] == &quot;9&quot;:</pre><pre>      cmd = &quot;kubectl get svc --kubeconfig admin.conf&quot;</pre><pre>      output = subprocess.getoutput(cmd)</pre><pre>      print(&#39;&lt;h4&gt; &lt;pre&gt; {} &lt;/pre&gt; &lt;/h4&gt;&#39;.format(output))</pre><pre>elif val[0] == &quot;11&quot;:</pre><pre>       print(&quot;&lt;h4&gt; I Can Help you in Setting-Up Kubernetes Resources from your Instructions. &lt;/h4&gt;&quot;)</pre><pre>elif val[0] == &quot;12&quot;:</pre><pre>      print(&quot;&lt;h4 &gt; Heyy..!! I&#39;m Kube Bot &lt;/h4&gt;&quot;)</pre><pre>elif q == &quot;15&quot;:</pre><pre>       cmd = &quot;kubectl delete all --all --kubeconfig admin.conf&quot;</pre><pre>       output = subprocess.getoutput(cmd)</pre><pre>       print(output)</pre><pre>elif val[0] == &quot;13&quot;:</pre><pre>       print(&quot;&lt;h4&gt; 192.168.99.102 &lt;/h4&gt;&quot;)</pre><pre>elif val[0] == &quot;404&quot;:</pre><pre>       print(&quot;Please Write Something&quot;)</pre><h3>Step1: Checking Requirements</h3><p>You need to install kubernetes cluster on your VM and for the installation purpose one can visit the official site. you need to start httpd service in the VM (Redhat in my case), stop firewall as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/0*pqFP-jndtMk8fh3V.jpeg" /></figure><h3>Step2: Create a WebUI</h3><p>We will be using a HTML + CSS + JavaScript to develop our web page. HTML and CSS will focus more on look and feel of the web page that includes input box to enter commands written in English and button to execute them.</p><h3><strong>Step3: </strong>launch a Deployment using image and name and port number Web UI.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*SUxe6GVqy7q9upTDKxl_Gw.png" /></figure><h3>Step4: Scale the replica using Web UI.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*8dfrDKtiTAbgLkZcbKvQlA.png" /></figure><h3>Step3: launch pods with specific name.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*5uB4Nd8ktozTs4Wnhn_h9Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*xdHr6wyHpBzGsUedt533cw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*6qVzy-niJ6PpkH2s78j3YA.png" /></figure><p>!!!Thanks for reading this article!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eccd52d69190" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript]]></title>
            <link>https://sampreethi66.medium.com/javascript-179a97b685a7?source=rss-b43a9b71452b------2</link>
            <guid isPermaLink="false">https://medium.com/p/179a97b685a7</guid>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[html]]></category>
            <dc:creator><![CDATA[Sampreethi Bokka]]></dc:creator>
            <pubDate>Thu, 24 Jun 2021 19:51:21 GMT</pubDate>
            <atom:updated>2021-06-24T19:51:21.972Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6WYwaQfPuMmVMVoYd1EqPQ.png" /><figcaption>JavaScript</figcaption></figure><p>JavaScript is one of the most popular programming languages in the world, and is now widely used also outside of the browser. The rise of Node.js in the last few years unlocked back-end development — once the domain of Java, Ruby, Python, PHP, and more traditional server-side languages.</p><h3>A basic definition of JavaScript</h3><p>JavaScript is a programming language that is:</p><ul><li><strong>High level</strong>: It provides abstractions that allow you to ignore the details of the machine where it’s running. It manages memory automatically with a garbage collector, so you can focus on the code instead of managing memory locations, and provides many constructs which allow you to deal with highly powerful variables and objects.</li><li><strong>Dynamic</strong>: As opposed to static programming languages, a dynamic language executes at runtime many of the things that a static language does at compile time. This has pros and cons, and it gives us powerful features like dynamic typing, late binding, reflection, functional programming, object runtime alteration, closures and much more.</li><li><strong>Dynamically typed</strong>: A variable does not enforce a type. You can reassign any type to a variable, for example assigning an integer to a variable that holds a string.</li><li><strong>Weakly typed</strong>: As opposed to strong typing, weakly (or loosely) typed languages do not enforce the type of an object. This allows more flexibility but denies us type safety and type checking (something that TypeScript and Flow aim to improve)</li><li><strong>Interpreted</strong>: It’s commonly known as an interpreted language, which means that it does not need a compilation stage before a program can run, as opposed to C, Java or Go for example. In practice, browsers do compile JavaScript before executing it, for performance reasons, but this is transparent to you as there is no additional step involved.</li><li><strong>Multi-paradigm</strong>: The language does not enforce any particular programming paradigm, unlike Java for example which forces the use of object-oriented programming, or C that forces imperative programming.</li></ul><h3><strong>What is the role of a browser?</strong></h3><p>A browser is a software application that gives access to information on the World Wide Web. When a user asks for a particular website, the web browser fetches the required content from a web server. And then, it displays the resulting web page on the user’s device.</p><p>Other than accessing the website, browser also acts as an interpreter for JavaScript, HTML and CSS and recognizes all the events taking place in window like mouse clicks, mouse position &amp; movements, keyboard clicks, etc.</p><h3>What is an event in browser?</h3><p>Events are actions or occurrences that happen in the system you are programming, which the system tells you about so you can respond to them in some way if desired. For example, if the user selects a button on a webpage, you might want to respond to that action by displaying an information box.</p><p>An event is a signal that something has happened. All DOM nodes generate such signals (but events are not limited to DOM).</p><p>Here’s a list of the most useful DOM events, just to take a look at:</p><p><strong>Mouse events:</strong></p><ul><li>click – when the mouse clicks on an element (touchscreen devices generate it on a tap).</li><li>mouseover / mouseout – when the mouse cursor comes over / leaves an element.</li><li>mousedown / mouseup – when the mouse button is pressed / released over an element.</li><li>mousemove – when the mouse is moved.</li></ul><p><strong>Keyboard events:</strong></p><ul><li>keydown and keyup – when a keyboard key is pressed and released.</li></ul><p><strong>Document events:</strong></p><ul><li>DOMContentLoaded – when the HTML is loaded and processed, DOM is fully built.</li></ul><p><strong>CSS events:</strong></p><ul><li>transitionend – when a CSS-animation finishes.</li></ul><h3>Write the syntax of print statement in JavaScript?</h3><p>In HTML, JavaScript code is inserted between &lt;script&gt; and &lt;/script&gt; tags.</p><p>JavaScript can “display” data in different ways:</p><ul><li>Writing into an HTML element, using innerHTML.</li><li>Writing into the HTML output using document.write().</li><li>Writing into an alert box, using window.alert().</li><li>Writing into the browser console, using console.log().</li></ul><h3>What is the meaning of DOM in web technology?</h3><p>The Document Object Model (DOM) is a programming interface for HTML and XML(Extensible markup language) documents. It defines the logical structure of documents and the way a document is accessed and manipulated.<br>Note: It is called a Logical structure because DOM doesn’t specify any relationship between objects.</p><h3>Which are the box that JavaScript support?</h3><p>JavaScript has three kind of popup boxes: Alert box, Confirm box, and Prompt box.</p><p><strong>Alert Box</strong></p><p>An alert box is often used if you want to make sure information comes through to the user. When an alert box pops up, the user will have to click “OK” to proceed.</p><p><strong>Confirm Box</strong></p><p>A confirm box is often used if you want the user to verify or accept something. When a confirm box pops up, the user will have to click either “OK” or “Cancel” to proceed. If the user clicks “OK”, the box returns <strong>true</strong>. If the user clicks “Cancel”, the box returns <strong>false</strong>.</p><p><strong>Prompt Box</strong></p><p>A prompt box is often used if you want the user to input a value before entering a page. When a prompt box pops up, the user will have to click either “OK” or “Cancel” to proceed after entering an input value. If the user clicks “OK” the box returns the input value. If the user clicks “Cancel” the box returns null.</p><h3>What is the need of AJAX?</h3><p>AJAX stands for Asynchronous JavaScript and XML. It is used for allowing the client side of an application to communicate with the server side of the application. Before AJAX, there was no way for the client side of a web application to communicate directly with the server. Instead, you would have to use page loads. AJAX allows web pages to be updated asynchronously by exchanging small amounts of data with the server behind the scenes. This means that it is possible to update parts of a web page, without reloading the whole page.</p><h3>How to use JSON in JavaScript?</h3><p>JSON stands for JavaScript Object Notation. JSON’s format is derived from JavaScript object syntax, but it is entirely text-based. It is a key-value data format that is typically rendered in curly braces.</p><p>When you’re working with JSON, you’ll likely see JSON objects in a .json file, but they can also exist as a JSON object or string within the context of a program.</p><h3><strong>Front end development</strong></h3><p>Front end development is mostly focused on what some may coin the “client side” of development. Front end developers will be engaged in analyzing code, design, and debugging applications along with ensuring a seamless user experience. You manage what people first see in their browser. As a front end developer you are responsible for the look, feel and ultimately design of the site.</p><p>Front end languages include HTML, CSS, and Javascript. While JQuery is going out of style (modern browsers can now do the same work, but much more quickly than jQuery), many legacy projects still use JavaScript library, so don’t be surprised to see it on a bootcamp’s curriculum. You’ll also learn tons about responsive design along with typography, layouts, grid system, and color theory. When anticipating types of projects you’ll work on as a front end developer, think creating and redesigning websites. In order to be a front end developer (sometimes even called a Javascript developer) you do not need back end development skills. Sites created by front end developers won’t interact with information stored on a database in order to be functional. The content will be “fixed,” meaning that large pieces of new data will not be constantly uploaded. Small business owners and restaurants usually have great examples of static sites.</p><h3><strong>Back end Development</strong></h3><p>Back end Development refers to the server side of development where you are primarily focused on how the site works. Making updates and changes in addition to monitoring functionality of the site will be your primary responsibility. This type of web development usually consists of three parts: a server, an application, and a database. Code written by back end developers is what communicates the database information to the browser. Anything you can’t see easily with the eye such as databases and servers is the work of a back end developer. Back end developer positions are often called programmers or web developers.</p><p>Many back end developers know front end languages such as HTML and CSS but need to use languages such as Java, PHP, Ruby on Rails, Python, and .Net to get the back end job done. Back end developers are most focused on a site’s responsiveness and speed. These languages are used to create dynamic sites which are different from static sites in that these types of websites store database information. Content on the site is constantly changing and updating. Examples of dynamic sites include Facebook, Twitter, and Google Maps.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=179a97b685a7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Web Application for Docker Using JavaScript]]></title>
            <link>https://sampreethi66.medium.com/web-application-for-docker-using-javascript-4c9650740b76?source=rss-b43a9b71452b------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c9650740b76</guid>
            <category><![CDATA[js]]></category>
            <category><![CDATA[website-design]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Sampreethi Bokka]]></dc:creator>
            <pubDate>Thu, 24 Jun 2021 19:36:31 GMT</pubDate>
            <atom:updated>2021-06-24T19:36:31.885Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vfx2vNA8qtWf8GJaXyLVKg.jpeg" /><figcaption><strong>JavaScript Integration with Docker</strong></figcaption></figure><h3>JavaScript</h3><p>JavaScript is a programming language that is:</p><ul><li><strong>High level</strong>: It provides abstractions that allow you to ignore the details of the machine where it’s running. It manages memory automatically with a garbage collector, so you can focus on the code instead of managing memory locations, and provides many constructs which allow you to deal with highly powerful variables and objects.</li><li><strong>Dynamic</strong>: As opposed to static programming languages, a dynamic language executes at runtime many of the things that a static language does at compile time. This has pros and cons, and it gives us powerful features like dynamic typing, late binding, reflection, functional programming, object runtime alteration, closures and much more.</li><li><strong>Dynamically typed</strong>: A variable does not enforce a type. You can reassign any type to a variable, for example assigning an integer to a variable that holds a string.</li><li><strong>Weakly typed</strong>: As opposed to strong typing, weakly (or loosely) typed languages do not enforce the type of an object. This allows more flexibility but denies us type safety and type checking (something that TypeScript and Flow aim to improve)</li><li><strong>Interpreted</strong>: It’s commonly known as an interpreted language, which means that it does not need a compilation stage before a program can run, as opposed to C, Java or Go for example. In practice, browsers do compile JavaScript before executing it, for performance reasons, but this is transparent to you as there is no additional step involved.</li><li><strong>Multi-paradigm</strong>: The language does not enforce any particular programming paradigm, unlike Java for example which forces the use of object-oriented programming, or C that forces imperative programming.</li></ul><p>In case you’re wondering, <strong>JavaScript has nothing to do with Java</strong>, it’s an unfortunate name choice but we have to live with it.</p><p>JavaScript is one of the most popular programming languages in the world, and is now widely used also outside of the browser. The rise of Node.js in the last few years unlocked back-end development — once the domain of Java, Ruby, Python, PHP, and more traditional server-side languages.</p><h3>Client-Side JavaScript</h3><p>Client-side JavaScript is the most common form of the language. The script should be included in or referenced by an HTML document for the code to be interpreted by the browser.</p><p>It means that a web page need not be a static HTML, but can include programs that interact with the user, control the browser, and dynamically create HTML content.</p><p>The JavaScript client-side mechanism provides many advantages over traditional CGI server-side scripts. For example, you might use JavaScript to check if the user has entered a valid e-mail address in a form field.</p><h3>Docker platform</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/318/1*W7osuRJe7UP5WHRR0yqUkQ.png" /><figcaption><strong>docker</strong></figcaption></figure><p>Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly.</p><p>With Docker, you can manage your infrastructure in the same ways you manage your applications. By taking advantage of Docker’s methodologies for shipping, testing, and deploying code quickly, you can significantly reduce the delay between writing code and running it in production.</p><h3><strong>Dockerfile</strong></h3><p>Each Docker container starts with a <em>Dockerfile</em>. A Dockerfile is a text file written in an easy-to-understand syntax that includes the instructions to build a Docker <em>image </em>(more on that in a moment). A Dockerfile specifies the operating system that will underlie the container, along with the languages, environmental variables, file locations, network ports, and other components it needs — and, of course, what the container will actually be doing once we run it.</p><h3>Docker image</h3><p>Once you have your Dockerfile written, you invoke the Docker build utility to create an <em>image </em>based on that Dockerfile. Whereas the Dockerfile is the set of instructions that tells build how to make the image, a Docker image is a portable file containing the specifications for which software components the container will run and how. Because a Dockerfile will probably include instructions about grabbing some software packages from online repositories, you should take care to explicitly specify the proper versions, or else your Dockerfile might produce inconsistent images depending on when it’s invoked. But once an image is created</p><h3>Task Description 📄</h3><p><strong>⚙️ Task 7.1 -</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 Platform as a Service (PaaS)) by showing your own creativity and UI/UX designing skills to make the WebPortal user friendly.</p><p>📌 This app will help the user to run all the docker commands like:</p><p>👉docker images</p><p>👉docker ps</p><p>👉docker run</p><p>👉docker rm -f</p><p>👉docker exec</p><h3>Front-end Code</h3><h3>basic.html</h3><p>This is a sample code of HTML and JavaScript</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*4Yc6Qv-MQh79eMZW0FF7JA.png" /></figure><h3>Back-end Code-</h3><p>Back site we are used python scripting language</p><h3>Backend.py-</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*g82ZtlICxlJMiUnApjDUMQ.png" /></figure><h3>Final Outputs-</h3><p>These are the some sample snapshot inside text box we are use all type docker command just like ok show image, PS command ,RM command, run command all type we are provide because back inside all the output in comes in Linux system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F8vt-eYUJLduM1usBxddCg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kx9YFUlYtAqTouFC8r0EJw.jpeg" /></figure><h3><strong>!!!Thanks for reading this article!!!</strong></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c9650740b76" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>