Sunday, March 20, 2022

Alphabetical Words with Prince (2022_03_20)

1#
2#
3#
4#
5#
6#
7#

Saturday, March 19, 2022

Spelling Mistakes by Shiva 2022-Mar-19

Name: Shiva Patel
Class: 5
Correct Word Mistake
Ice Cream Ice Creem
Monkey Mankey
Umbrella No Attempt
Watch Wathc
Zebra Zebera

Dictation of Alphabetical Words (Version - Prince)



              



Enter the spelling for the word that starts with .


  

Tags: English Lessons,Communication Skills,

Knockout based Counter Version 5 (Erroneous)


Code

<!DOCTYPE html>
<html lang="en">

<head>
    <title>Sample-Counter</title>
    <meta charset="utf-8" />
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="https://knockoutjs.com/downloads/knockout-3.5.1.js"></script>
    <style>
        .text-highlighter {
            padding: 20px;
        }
    </style>
</head>

<body>
    <div>
        <div data-bind="template: { name: 'counterTemplate', 
        data: count, 
        afterRender: function() { 
            setTimeout( function() {}, 1000 )
        } }"> </div>
    </div>

    <script type="text/html" id="counterTemplate">
        <h1 data-bind="text: $data"  class="text-highlighter" ></h1>
    </script>

    <button data-bind="click: startIncrementer">Start</button>
    </div>
    <script>
        function ItemViewModel() {
            var self = this;
            this.count = ko.observable(0);

            this.incrementer = function () {
                self.count(self.count() + self.increment());
            }

            this.increment = ko.observable(1)

            this.startIncrementer = function () {
                for (var i = 0; i < 20; i++) {
                    setTimeout(this.incrementer, (self.increment() * 1000))
                }
            }
        }
        var viewModel = new ItemViewModel();
        ko.applyBindings(viewModel);
    </script>
</body>

Knockout based Counter Version 4 (Erroneous)

Code

<!DOCTYPE html>
<html lang="en">

<head>
    <title>Sample-Counter</title>
    <meta charset="utf-8" />
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="https://knockoutjs.com/downloads/knockout-3.5.1.js"></script>
    <style>
        .text-highlighter{
            padding: 20px;
        }
    </style>
</head>

<body>
    <div>
        <h1 data-bind="text:count"  class="text-highlighter" ></h1>
        <button data-bind="click: startIncrementer">Start</button>
    </div>
    <script>
        function ItemViewModel() {
            var self = this;
            this.count= ko.observable(0);

            this.incrementer = function(){
                self.count(self.count() + self.increment());
            }

            this.increment = ko.observable(1) 

            this.startIncrementer = function() {
                for(var i = 0; i < 20; i++) {
                    setTimeout(this.incrementer, (self.increment() * 1000))
                }   
            }
        }
        var viewModel = new ItemViewModel();
        ko.applyBindings(viewModel);
    </script>
</body>

Knockout based Counter Version 3

Code

<!DOCTYPE html>
<html lang="en">

<head>
    <title>Sample-Counter</title>
    <meta charset="utf-8" />
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="https://knockoutjs.com/downloads/knockout-3.5.1.js"></script>
    <style>
        .text-highlighter{
            padding: 20px;
        }
    </style>
</head>

<body>
    <div>
        <h1 data-bind="text:count"  class="text-highlighter" ></h1>
        <button data-bind="click: startIncrementer">Start</button>
    </div>
    <script>
        function ItemViewModel() {
            var self = this;
            this.count= ko.observable(0);

            this.incrementer = function(){
                self.count(self.count() + self.increment());
            }

            this.increment = ko.observable(2) 

            this.startIncrementer = function() {
                setInterval(this.incrementer, (self.increment() * 1000))
            }
        }
        var viewModel = new ItemViewModel();
        ko.applyBindings(viewModel);
    </script>
</body>

Knockout based Counter Version 2

Code:

<!DOCTYPE html>
<html lang="en">

<head>
    <title>Sample-Counter</title>
    <meta charset="utf-8" />
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="https://knockoutjs.com/downloads/knockout-3.5.1.js"></script>
    <style>
        .text-highlighter{
            padding: 20px;
        }
    </style>
</head>

<body>
    <div>
        <h1 data-bind="text:count"  class="text-highlighter" ></h1>
    </div>
    <script>
        function ItemViewModel() {
            var self = this;
            this.count= ko.observable(0);
            this.increment = ko.observable(1) 
            setInterval(function(){
                self.count(self.count()+self.increment());
            },(self.increment() * 1000))
        }
        var viewModel = new ItemViewModel();
        ko.applyBindings(viewModel);
    </script>
</body>

Knockout based Counter Version 1

Code:

<!DOCTYPE html>
<html lang="en">

<head>
    <title>Sample-Counter</title>
    <meta charset="utf-8" />
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="https://knockoutjs.com/downloads/knockout-3.5.1.js"></script>
    <style>
        .text-highlighter{
            padding: 20px;
        }
    </style>
</head>

<body>
    <div>
        <h1 data-bind="text:count"  class="text-highlighter" ></h1>
    </div>
    <script>
        function ItemViewModel() {
            var self = this;
            this.count= ko.observable(0);
            this.increment = ko.observable(1) 
            setInterval(function(){
                self.count(self.count()+self.increment());
            },(self.increment() * 1000))
        }
        var viewModel = new ItemViewModel();
        ko.applyBindings(viewModel);
    </script>
</body>

Ad-Serving Limit Applied Second Time (Mar 2022)

Refresh a Blogspot page 200 times in the browser and Google will apply the 'Ad Serving Limit' on your blog for a month.

Development IP

CMD>ipconfig Windows IP Configuration Ethernet adapter Ethernet: Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . : Ethernet adapter VirtualBox Host-Only Network: Connection-specific DNS Suffix . : Link-local IPv6 Address . . . . . : fe80::f839:dc84:9a7b:3087%8 IPv4 Address. . . . . . . . . . . : 192.168.56.1 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : Wireless LAN adapter Local Area Connection* 3: Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . : Wireless LAN adapter Local Area Connection* 4: Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . : Wireless LAN adapter Wi-Fi: Connection-specific DNS Suffix . : IPv6 Address. . . . . . . . . . . : 2401:4900:47f0:b66:e86c:43b5:9a49:7a4a Temporary IPv6 Address. . . . . . : 2401:4900:47f0:b66:74f6:6d0b:4751:c8c4 Link-local IPv6 Address . . . . . : fe80::e86c:43b5:9a49:7a4a%10 IPv4 Address. . . . . . . . . . . : 192.168.1.100 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : fe80::ec47:62ff:fe2b:c17b%10 192.168.1.1 Ethernet adapter Bluetooth Network Connection: Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . :

Cliend IP

(base) ashish@ashishdesktop:~$ ifconfig ens33: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether 00:e0:4c:3c:16:6b txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 369 bytes 36814 (36.8 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 369 bytes 36814 (36.8 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlx00e02d420fcb: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.109 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 2401:4900:47f0:b66:c0de:5a07:95f6:8804 prefixlen 64 scopeid 0x0<global> inet6 fe80::1cdd:53e7:d13a:4f52 prefixlen 64 scopeid 0x20<link> inet6 2401:4900:47f0:b66:8021:a91b:4cac:da59 prefixlen 64 scopeid 0x0<global> ether 00:e0:2d:42:0f:cb txqueuelen 1000 (Ethernet) RX packets 6242 bytes 4410516 (4.4 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 4207 bytes 625464 (625.4 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Blogger Stats

2022-Mar-12

Previous 7 Days:
24 Hours:
Posts:

2022-Mar-13

24 Hours

7 Days

Alphabets (Read it loud letter by letter)

Ad-serving limit notification

Policy Center Page

Ad serving issues

Popular Posts

Tags: Technology,Web Development,Web Scraping,

The Dragon That Wanted to be Noticed

There is a story for children, There’s No Such Thing as a Dragon, by Jack Kent, that I really like. It’s a very simple tale, at least on the surface. I once read its few pages to a group of retired University of Toronto alumni, and explained its symbolic meaning. fn2 It’s about a small boy, Billy Bixbee, who spies a dragon sitting on his bed one morning. It’s about the size of a house cat, and friendly. He tells his mother about it, but she tells him that there’s no such thing as a dragon. So, it starts to grow. It eats all of Billy’s pancakes.

Soon it fills the whole house. Mom tries to vacuum, but she has to go in and out of the house through the windows because of the dragon everywhere. It takes her forever. Then, the dragon runs off with the house. Billy’s dad comes home—and there’s just an empty space, where he used to live. The mailman tells him where the house went. He chases after it, climbs up the dragon’s head and neck (now sprawling out into the street) and rejoins his wife and son. Mom still insists that the dragon does not exist, but Billy, who’s pretty much had it by now, insists, “There is a dragon, Mom.”

Instantly, it starts to shrink. Soon, it’s cat-sized again. Everyone agrees that dragons of that size (1) exist and (2) are much preferable to their gigantic counterparts. Mom, eyes reluctantly opened by this point, asks somewhat plaintively why it had to get so big. Billy quietly suggests: “maybe it wanted to be noticed.”
Maybe! That’s the moral of many, many stories. Chaos emerges in a household, bit by bit. Mutual unhappiness and resentment pile up. Everything untidy is swept under the rug, where the dragon feasts on the crumbs. But no one says anything, as the shared society and negotiated order of the household reveals itself as inadequate, or disintegrates, in the face of the unexpected and threatening. Everybody whistles in the dark, instead.

Communication would require admission of terrible emotions: resentment, terror, loneliness, despair, jealousy, frustration, hatred, boredom. Moment by moment, it’s easier to keep the peace. But in the background, in Billy Bixbee’s house, and in all that are like it, the dragon grows. One day it bursts forth, in a form that no one can ignore. It lifts the very household from its foundations. Then it’s an affair, or a decades-long custody dispute of ruinous economic and psychological proportions. Then it’s the concentrated version of the acrimony that could have been spread out, tolerably, issue by issue, over the years of the pseudo-paradise of the marriage. Every one of the three hundred thousand unrevealed issues, which have been lied about, avoided, rationalized away, hidden like an army of skeletons in some great horrific closet, bursts forth like Noah’s flood, drowning everything. There’s no ark, because no one built one, even though everyone felt the storm gathering.

Don’t ever underestimate the destructive power of sins of omission. 
Tags: English Lessons,Book Summary,

Friday, March 18, 2022

Words with Alphabets With Prince (2022-Mar-18)

1#
2#
3#

Alphabets Test With Prince and Piyush (2022-Mar-18)

Piyush:
Prince:

Thursday, March 17, 2022

Alphabets Test With Prince and Piyush (2022-Mar-17)

1#

Piyush:

Prince:
2# Piyush:
Prince:
3# Piyush:
Prince:

Wednesday, March 16, 2022

Alphabets Test with Prince (2022-03-16)

Rhymes with Prince and Piyush (Day 3)

Trial 1: ABCD

Trial 2: ABCD

Trial 3: ABCD

Trial 4: ABCD

Trial 5: Twinkle, Twinkle Little Star

Trial 6: ABCD

Trial 7: ABCD

Trial 8: ABCD

Trial 9: ABCD with Prince (Only)

Trial 10: ABCD

Trial 11: ABCD with Prince (Only)

Trial 12: ABCD with Prince

Other Errors With Prince

VID_20220315_173920 Missed E
VID_20220315_174022 Sneeze
VID_20220315_174203 Yawn
VID_20220315_174255 Yawn
    
Tags: English Lessons,

Rhymes with Piyush (Day 2)

1: ABCD

2: Baa Baa Black Sheep

Tags: English Lessons,

Tuesday, March 15, 2022

Calculations for Info Gain and Gini Coefficient for Building Decision Tree

Formula For Calculating The Amount of Information in The Dataset

In plain English: Info(D) = (-1) times (summation of product of probability of class I and log of probability of class I) = Negative of summation of product of (probability of class I and log of probability of class I)

Dataset

Class (buys_computer) Labels are: Yes and No How many Yes(s) are there: 9 No(s): 5 According to the formula and with log base 10: RHS = (-1) * ( ( (9/14) * log (9/14) ) + ( (5/14) * log (5/14) ) )
With Log-Base-10: RHS = (-1) * ( ( (0.642) * log (0.642) ) + ( (0.357) * log (0.357) ) ) RHS = 0.283 With Log-Natural:
With Log-Base-2:
RHS = - ( 0.642 * ( -0.6374 ) ) - (( 0.357 ) * (-1.4854)) = 0.9394 Again, With Log-Base-10: RHS = (-1) * ( ( (0.642)* log (0.642) ) + ( (0.357) * log (0.357) ) ) = 0.283

Information When We Split on Age

Age => Youth, Middle-aged, Senior Count of Youth => 5 Weight for youth => 5/14 Count of Middle-aged => 4 Weight for middle-aged => 4/14 Count of Senior => 5 Weight for Senior => 5/14 Component for Youth
With Log-Base-10: (5/14) * (-(3/5) * log (3/5) - (2/5) * log(2/5)) = 0.104 Component for middle-aged:
(4/14) * ( -(4/4) * log (4/4) - 0/4 * log (0/4)) = 0 Component for senior:
(5/14) * (-(3/5) * log (3/5) - (2/5) * log(2/5)) = 0.104 Information_when_we_split_on_age = 0.104 + 0 + 0.104 = 0.208 Information Gain When We Split on Age by Computation Using Log-Base-10: Info(D) - Info(on split by age) = 0.283 - 0.208 = 0.075

WHAT HAPPENS WHEN WE SPLIT ON INCOME

Info(D) = 0.283 Weights for (High, Medium, and Low): High => 4/14 Medium => 6 / 14 Low => 4 / 14 Image for Income = High:
Component for Income -> High = (4/14) * (-(2/4) * log (2/4) - (2/4) * log(2/4)) In Log base 10 Terms, it is: 0.086 Component for Income -> Medium =
(6 /14) * (- (4/6) * log (4/6) - (2/6) * log (2/6)) = 0.118 Image for Income = Low:
Component for Income -> Low = (4/14) * (-(3/4) * log(3/4) - (1/4) * log (1/4)) =0.0697 Info_when_split_on_income_for_log_base_10 = 0.086 + 0.118 + 0.0697 = 0.2737 Information Gain for Split on Age Log-Base-10 Was: Info(D) - Info(split of age) = 0.283 - 0.208 = 0.075 Information Gain for Split on Income Log-Base-10 Was: Info(D) - Info(split of Income) = 0.283 - 0.2737 = 0.0093 (Info(D) - Info(split of age)) > (Info(D) - Info(split of Income))

CALCULATING INFORMATION GAIN WHEN WE SPLIT ON 'STUDENT'

'Student' Values are: Yes and No Weights for (Yes and No): Yes => 7/14 No => 7 / 14 Component for Student -> Yes =
(7/14) * (-(6/7) * log(6/7) - (1/7) * log (1/7)) = 0.5 * (-0.8571 * log(0.8571) - 0.14285 * -0.8450) = 0.0890 Component for Student -> No =
Component for Student -> No = (7/14) * ( -4/7 * (log 4/7) - 3/7 * log(3/7) ) = 0.054 Information (Student) = 0.0890 + 0.054 = 0.143 Information Gain = Info(D) - Info(Student) = 0.283 - 0.0890 = 0.194 Summarizing again: Information Gain for Age Log Base 10 Was: Info(D) - Info(split of age) = 0.283 - 0.208 = 0.075 Information Gain for Income Log Base 10 Was: Info(D) - Info(split of Income) = 0.283 - 0.2737 = 0.0093 Information Gain for Student with Log Base 10 was : Info(D) - Info(Student) = 0.283 - 0.194 = 0.089 We See: 0.089 > 0.075

GINI INDEX COMPUTATION FOR ENTIRE DATASET

Class Label are: Yes and No How many Yes(s) are there: 9 How many No(s) are there: 5
Gini(D) = 1 - (5/14)^2 - (9/14)^2 Gini(D) =0.4591 WHEN WE SPLIT ON AGE: Age => Youth, Middle-Aged, Senior Youth => 5 Weight for youth => 5/14 Middle-aged => 4 Weight for middle-aged => 4/14 Senior => 5 Weight for Senior => 5/14 For Youth:
For Middle Aged:
For Senior:
Gini(when split on age) = (5/14) * (1 - (3/5) ^ 2 - (2/5) ^ 2 ) + (4/14) * (1 - (4/4)^2 - (0/4) ^ 2) + (5/14) * (1 - (2/5)^2 - (3/5)^2) = 0.342 Gini (when we split on income with classes {low, medium} and {high}) = = 0.714 * (1 - 0.49 - 0.09) + 0.285 * (1 - 0.0625 - 0.5625) = 0.406755 Gini(when split on 'Student' column) = 'Student' Values are: Yes and No Weights for (Yes and No): Yes => 7/14 No => 7 / 14 Component for Student -> Yes =
(7/14) * (1 - (6/7)^2 - (1/7)^2) = 0.122 Component for Student -> No =
(7/14) * (1 - (3/7)^2 - (4/7)^2) = 0.2448 Gini(when split on Student) = 0.122 + 0.2448 = 0.3668 Summarizing again for comparison Gini(when split on age) = 0.342 Gini (when we split on income with classes {low, medium} and {high}) = 0.406755 Gini(when split on Student) = 0.122 + 0.2448 = 0.3668 For 'Student' among (Age, Income and Student), Gini is the second lowest at 0.3668.

Confusion Matrix

Decision Tree (J48) Report For 14 Txn Dataset From Weka


=== Run information ===

Scheme:       weka.classifiers.trees.J48 -C 0.25 -M 2
Relation:     14_txn_buys_pc_numerical
Instances:    14
Attributes:   5
                age
                income
                student
                credet_rating
                class_buy_pc
Test mode:    10-fold cross-validation

=== Classifier model (full training set) ===

J48 pruned tree
------------------

student <= 0
|   age <= 0: no (3.0)
|   age > 0: yes (4.0/1.0)
student > 0: yes (7.0/1.0)

Number of Leaves  : 	3

Size of the tree : 	5


Time taken to build model: 0.03 seconds

=== Stratified cross-validation ===
=== Summary ===

Correctly Classified Instances           8               57.1429 %
Incorrectly Classified Instances         6               42.8571 %
Kappa statistic                         -0.0244
Mean absolute error                      0.4613
Root mean squared error                  0.5569
Relative absolute error                 96.875  %
Root relative squared error            112.8793 %
Total Number of Instances               14     

=== Detailed Accuracy By Class ===

                    TP Rate  FP Rate  Precision  Recall   F-Measure  MCC      ROC Area  PRC Area  Class
                    0.200    0.222    0.333      0.200    0.250      -0.026   0.411     0.465     no
                    0.778    0.800    0.636      0.778    0.700      -0.026   0.411     0.662     yes
Weighted Avg.    0.571    0.594    0.528      0.571    0.539      -0.026   0.411     0.592     

=== Confusion Matrix ===

    a b    <-- classified as
    1 4 | a = no
    2 7 | b = yes

Decistion Tree Image For Buys a Computer or Not

Tags: Technology,Weka,Machine Learning,Classification,