Friday, April 26, 2024

Sacred Thought

28 April 2024


Today I am going to explain verse 31 - 38 chapter two for you all.


There is no opportunity better than a righteous war (सत्य और न्याय की लड़ाई ). So, always fight for the truth in your life. 

There are only two possible out comes of this war. Either you win or you lose. If you win, then what to say, 

you will rule the world but in case even if you lose(die), you will attain heaven after death.


So its a win-win situation. Never miss such opportunity to fight for what is right in your day to day life. Come 

forward and fight. As there are only two possible out comes, and you win in either case.


चुप ना रहो, हमेशा सत्य और न्याय के लिए लड़ो , फिर वो किसी के लिए भी क्यों ना हो।  अन्याय और जुर्म का साथ मत दो ना ही  उसे सहो |


------------------------------------------------------------------------------------------------------------------------


26 April 2024

 Dear friends, I write the explanation of two verses of Geets for all of you, I hope you all will like it and benefit from it.  


In Shreemad Bhagwat Geeta , the song celestial, one full chapter (chapter 16) has been devoted towards explaining the differences between the two tendencies within an individual, the good and evil, the divine and demoniac. 


Verse 3 indicates divine virtues: Splendor, forgiveness, fortitude, purity, absence of malice, absence of pride, these all are the qualities of those endowed with divine virtues.


Verse 4 indicates demoniac virtues: Hypocracy, arrogance, pride, anger, harshness, and ignorance are the marks of the one who is born of demonical properties. 


Even one of these divine virtues, say for example 'purity', attained by an individual will impart in him the remaining virtues rather automatically and make him a blissful person. 


On the other hand any of the demonical properties like 'anger' will bring him miseries in plenty and will lead to his utter downfall.


Needless to say you should adopt to more and more of divine virtues in your day to day life to attain bliss. 

---------------------------------------------------------------------------------------------------------------

27 April 2024

Good morning friends, today I write the explain of verse 12 of chapter 12 "The yoga of Devotion" to you all,
as given in Geeta - The Song Celestial.
 
The meaning of the verse is : 

"Better indeed is knowledge than practice, better than knowledge is
meditation, better than meditation is the renunciation of fruits of action, peace immediately follows
renunciation".

This verse teaches us the way to obtain peace while carrying out our duties and other activities.
The first step is that I should know the purpose behind my action. This is knowledge and this knowledge
is better than just practicing an action without knowing the purpose. 

The second step is that it is even better that in all my actions my mind should be totally concentrated on my actions.
Such action become perfect and perfection in action is meditation.

The third and supreme step is that I must not expect any fruits or benefits from my actions. This is renunciation
and it is this supreme attitude that gives me peace. I just carry out my duties to the best of my ability and 
offer the fruits of my action whether success or failure at the lotus feet of the Lord. This will give me peace
and happiness. 

This is Karma Yoga, you must perform selfless action with devotion to reach the Supreme.

निःस्वार्थ कर्म ही एक मात्रा सच्चे एवं स्थायी  सूख की कुंजी है | 
--------------------------------------------------------------------------------------------------------------------

Sunday, March 10, 2024

Basic Trubo C++ programs

/*

A C++ program to accept ten numbers in ascending order using array.

and search for a number given by user using binary search method.

*/


#include<iostream.h>

#include<conio.h>


void main()

{ clrscr();


 //Declare all variables.

 int arr[10], i, initial, final, mid, data;


 cout<<"Enter 10 numbers in ascending order ";


 for( i = 0; i<10; i++)

 {

   cin >> arr[i];

 }


 cout<<"\nEnter the data to be searched : ";


 cin >> data;


 initial = 0;


 final = 9;


 mid = (initial + final)/2;


 while( initial <= final) && (arr[mid] != data))

 {

if( arr[mid] > data)

final = mid - 1;

else

initial = mid + 1;

 }


 if( arr[mid] == data)

cout<<"Data is present";


 if(initial > final)

cout<<"Data is not present in the list";


 getch();


}


---------------------------------------------------------------------------------------------------------------


/*

A C++ program to accept 10 numbers in an array and sort the numbers

in ascending order using Bubble sort method. Practical 15.

*/


#include<iostream.h>

#include<conio.h>


void main()

{ clrsrc();


 //Declare all variables.

 int arr[10], i, j , temp;


 cout<<"Enter 10 numbers ";


 for( i = 0; i<10; i++)

cin>> arr[i];


 //Bubble sort.

 for( i = 0; i <10; i++)

 { 

for(j = 0; j<10; j++)

    {

if( arr[j] > arr[j +1])

{

//swap the two.

temp = arr[j];

arr[j] = arr[j+1];


   arr[j+1] = temp;

}

}

 }


 cout<<"The sorted array is \n";


 for( i =0; i < 10; i++)

cout<< arr[i]<<" ";


 getch();


}


-------------------------------------------------------------------------------------------------------------

/*

A C++ program to accept 10 numbers in an array and sort the numbers

in ascending order using Selection sort method.

*/


#include<iostream.h>

#include<conio.h>


void main()

{ clrsrc();


 //Declare all variables.

 int arr[10], i, j, temp;


 //prompt user to enter 10 numbers.

 cout<<"Enter any 10 numbers ";


 //Store the numbers in an array.

 for( i =0; i<10; i++)

  cin >> arr[i];


 //Selection sort.

 for( i = 0; i <10; i++)

 { 

for(j = 0; j<10; j++)

    {

if( arr[i] > arr[j])

{

//swap the two.

temp = arr[i];

arr[i] = arr[j];


   arr[j] = temp;

}

}

 }


 cout<<"The sorted array is \n";


 for( i =0; i < 10; i++)

cout<< arr[i]<<" ";


 getch();


}

 ----------------------------------------------------------------------------------------------------

/*

A C++ program to insert a data in an array, at a given location or at its end.

*/


#include<iostream.h>

#include<conio.h>


void main()

{ clrscr();

 

 //Declare all the variables.

 int arr[20], i, loc, n, data;


 //prompt user to enter the number of elements ";

 cout<<"Enter the size of the array ";


 //store size in 'n'.

 cin >> n;


 cout<<"Enter the array elements\n";


 for( i =0; i<n; i++)

cin >> arr[i];


 cout<<"enter the location after which the data is to be inserted \n";


 cin >> loc;


 //Shift all the elements after loc to the right of the array by one.

 for( i = loc + 1; i < n - loc; i++)

 {

arr[i+1] = arr[i];

 }

 

 cout<<"Enter data to be inserted at "<<loc;


 cin >> arr[loc];


 //Increment size by 1

 n++;

 

 cout<<"Array after insertion \n";


 for( i =0; i<n ; i++)

  cout<<arr[i]<<" ";


 getch();


}

-------------------------------------------------------------------------------------------------------------

/*

A C++ program to delete a data in an array, at a given location or at its end.

*/


#include<iostream.h>

#include<conio.h>


void main()

{ clrscr();

 

 //Declare all the variables.

 int arr[20], i, loc, n, data;


 //prompt user to enter the number of elements ";

 cout<<"Enter the size of the array ";


 //store size in 'n'.

 cin >> n;


 cout<<"Enter the array elements\n";


 for( i =0; i<n; i++)

cin >> arr[i];


 cout<<"enter the location after which the data is to be inserted \n";


 cin >> loc;


 

 //Shift all the elements after loc to the right of the array by one.

 for( i = loc + 1; i < n - loc; i++)

 {

arr[i+1] = arr[i];

 }

 

 cout<<"Enter data to be inserted at "<<loc;


 cin >> arr[loc];


 if( loc != 0)

 {

//Shift all the elements after the location to the left by 1.

for (i = loc+1; i < n; i--)

{

arr[i] = arr[i + 1];

}


 }


 //Decrement size by 1

 n--;

 

 cout<<"Array after insertion \n";


 for( i =0; i<n ; i++)

  cout<<arr[i]<<" ";


 getch();


}

----------------------------------------------------------------------------------------------------------------

/*

A C++ program to swap two numbers using call by value

and call by reference. Practical 11.

*/


#include<iostream.h>

#include<conio.h>


//Function prototype declaration for call by reference.

void swapReference(int *, int *);


void main()

{

clrscr();


//Declare all variables.

int a, b, temp, choice;


//Menu.

cout<<"Enter '1' for swapping using call by value \n";


cout<<"Enter '2' for swapping using call by reference \n";


cout<<"Enter '0' to exit \n";


//Menu options using switch statement.


switch(choice):

{

case 1:

cout<<"Enter any two numbers : \n";


cin >> a >> b;


cout<<"Before swap a = "<<a<<" b = "<<b;


temp = a;


a = b;


b = temp;


cout<<"\nAfter swap a = "<<a<<" b = "<<b;


break;


case 2:

cout<<"Enter any two numbers : \n";


cin >> a >> b;


cout<<"Before swap a = "<<a<<" b = "<<b;


swapReference(&a, &b);


cout<<"\nAfter swap a = "<<a<<" b = "<<b;


break;


case 0:


cout<<"Thank you\n";


break;


default:


cout<<"Invalid input! try again. \n";


}

getch();

}


//Function definition.

void swapReference(int * a, int *b)

{

int temp;


temp = *a;


*a = *b;


*b = temp;

}

--------------------------------------------------------------------------------------------------------

/*

A C++ program to print all the Pythagorean triplets between 1 and user given limit using

Turbo C++ compiler.

*/


#include<iostream.h>

#include<conio.h>

void main()

{

    //Declare int variables.

    int a, b, c, sum = 0, limit;


    //Prompt user to input upper limit.

    cin>>limit;

    for(a = 1; a<limit; a++)

    {

        for(b = 1; b<limit; b++)

        {

            for(c = 1; c<limit; c++)

            {

                if( a*a == (b*b + c*c) && (a+b+c) != sum)

                {

                    //To filter duplicate triplets.

                    sum = a+b+c;


                    //Print the triplets.

                    cout<<a<<" "<<b<<" "<<c<<endl;

                }

            }

        }

    }

        getch();

}


--------------------------------------------------------------------------------------------------

 /*

A C++ program to count the number of characters and words in a sentence entered by user.

*/


#include<iostream.h>

#include<conio.h>


void main()

{

clrscr();


int chars=0, words = 1;


char c;


while((c=getche()) != '\r')

{

if(c == ' ')

words++;

else

chars++;

}


cout<<"Number of characters "<<chars;

cout<<"\nNumber of words "<<words;


getch();


}


----------------------------------------------------------------------------------------------------------------------

/*


A C++ program to return cube of a number using inline function.


*/


#include<iostream.h>

#include<conio.h>


//Declare the inline function.


inline int cube(int a)

{

return a*a*a;

}


void main()

{


clrscr();


//Declare all variables.

int number, cube;


//Prompt user to enter a number.

cout<<"Enter a number ";


//Store user input in the integer variable 'number'.

cin>>number;


//Pass number as argument to the inline function 'cube()'.

cube = cube(number);


cout<<"The cube of the number is :"<<cube;


getch();


}


-------------------------------------------------------------------------------------------------------------------


/*

A C++ program to convert all upper case letters of a word to

lower case and vice-versa.

*/


#include<iostream.h>

#include<conio.h>

#include<ctype.h>


void main()

{

clrscr();


//Declare all variables.

int i=0, j=0;

char word[50];


//prompt user to enter a word.

cout<<"Enter a word ";


cin>>word;

//Replace lower case with upper and vice-versa.

while(word[i] != '\0')

if( isupper(word[i]))

{

word[i] = tolower(word[i]);

i++;

}

else

{

word[i] = toupper(word[i]);

i++;

}

}


//Print the new word with case reversed.

while( word[j] != '\0')

{


cout<<word[j];

j++;

}


getch();

}


--------------------------------------------------------------------------------------------------------------------

/*


A C++ program to get maximum of given numbers.


*/


#include<iostream.h>

#include<conio.h>


void main()

{


clrscr();


int max, i;


A[5] = {12,54,6,99,2};


max = A[0];


for(i=1; i<5; i++)

if max < A[i];


{

max = A[i];


}

}


cout<<"The maximum value is "<<max;


getch();


}

-----------------------------------------------------------------------------------------------------------------

/*

A C++ program to get minimum of given numbers.

*/

#include<iostream.h>
#include<conio.h>

void main()
{

clrscr();

int min, i;

A[5] = {12,54,6,99,2};

min = A[0];

for(i=1; i<5; i++)
if min > A[i];

{
min = A[i];

}
}

cout<<"The minimum value is "<<min;

getch();

}

-------------------------------------------------------------------------------------------------------------------

/*

A C++ program to reverse a number using pointers. Practical 22.

*/

#include<iostream.h>
#include<conio.h>


void main()
{

clrscr();

//Declare all variables.
int digit;

long int num;

//Declare a pointer variable 'p' that points to num.
long int * p = &num;

//Prompt user to enter a number.
cout<<"Enter a number : ";

//Store user input in num.
cin >> num;

//Separate the digits of num from end and print them on screen.
while(num % 10)
{
digit = (* p) % 10;

//Print the last digit first.
cout<<digit;

//Drop the last digit of num.

* p = (* p)/10;

}
getch();

}

------------------------------------------------------------------------------------------------------------------

/*
A C++ program to accept an integer array of size 10 . Display the 
squares of all the elements by using pointer to array. Practical 23.
*/

#include<iostream.h>
#include<conio.h>

void main()
{

clrscr();

//Declare variables.

int arr[10], i = 0;

//Prompt user to enter 10 integers.
cout<<"Enter 10 integers : ";

//Store all the integers in the array.
for( i = 0; i<10; i++)
{
cin >> arr[i];
}

//Display the squares of all elements using pointer to array.
for( i = 0; i<10; i++)
{
cout<<(*(arr + i))*(*(arr + i))<<" ";
}

getch();

}

--------------------------------------------------------------------------------------------------------------------

/*
A C++ program to accept a 4x4 matrix and find the sum of
the odd numbers of the matrix. Practical 17.
*/

#include<iostream.h>
#include<conio.h>

void main()
{
clrscr();
//Declare variables.
int matrix[4][4], i =0 , j =0, sum = 0;

//Prompt user to enter a 4x4 matrix.
cout<<"Enter a 4x4 matix : \n";

//Store the user input in the 2-D array 'matrix'.
for( i = 0; i<4; i++)
{
for(j =0; j<4 ; j++)
{
cin >> matrix[i][j];

}
}

//Sum all the odd numbers of the matrix.
for( i = 0; i<4; i++)
{
for(j =0; j<4 ; j++)
{
if( matrix[i][j] % 2 != 0)
{
sum = sum + matrix[i][j];
}

}
}

//Display the sum.
cout<<"Sum of odd numbers of matrix : "<<sum;

getch();
}

----------------------------------------------------------------------------------------------------------------

//A C++ program to create a class with given members. Practical 19.

#include<iostream.h>
#include<conio.h>
#include<string.h>

//Define the class.
class Competition
{

private:
int learner_id;
string learner_name;

char category[6];

string competition_name;

int position;

int points;

public:
//Define a function that returns points.
int points( int position)
{

switch(position)
{

case 1:
points = 10;

break;

case 2:

points = 7;

break;

case 3:

points = 5;

break;
default:
points = 0;

}
return points;

}


}; //End of class definition.


void main()
{
clrscr();


//Create objects of the class.
Competition comp;

//Access class member functions using dot operator.
comp.points(7);

getch();

}

-----------------------------------------------------------------------------------------------------------------------

// Derived class , practical 20.

#include<iostream.h>
#include<conio.h>
#include<string.h>

//Define the class COURSE.
class COURSE
{
//Declare all the private data members of the class.
private:
int course_id;

string course_name;

int duration;

float fee;
//Declare and define all the public member functions of the class.

public:
void accept(int course_id, string course_name, int duration, float fee)
{
this.course_id = course_id;

this.course_name = course_name;

this.duration = duration;

this.fee = fee;
}

};

//Define the publically inherited derived class SR_SECONDARY.
class SR_SECONDARY : public COURSE
{
//Declare private data members of the class.
private:
string subject1;

string subject2;

string subject3;

//Declare and define all the public member functions of the class.
public:
void enter(string subject1, string subject2, string subject3)
{
this.subject1 = subject1;

this.subject2 = subject2;

this.subject3 = subject3;
}

void display()
{
cout<<"Subject1 : "<<subject1<<'\n';

cout<<"Subject2 : "<<subject2<<'\n';

cout<<"Subject3 : "<<subject3<<'\n';
}

};

//Define the protectedly derived class VOCATIONAL from the class SR_SECONDARY.

class VOCATIONAL : protected SR_SECONDARY
{
//Declare all private data members of the class.
private:
string voc_name;

string requirement;

int age;

//Declare and define all public member functions of the class.
public:
void voc_accept(string voc_name, string requirement, int age)
{
this.voc_name = voc_name;

this.requirement = requirement;

this.age = age;
}

void voc_display()
{
cout<<"Vocationa Name : "<<voc_name<<'\n';

cout<<"Requirement : "<<requirement<<'\n';

cout<<"Age : "<<age;
}
};



void main()
{

clrscr();

//Create objects of all the classes and invoke respective member functions.
COURSE cr;

cr.accept(1, "BCA", 3, 12000.00);

SR_SECONDARY sr;

sr.enter("Maths", "Data Structues", "Algorithms");

sr.display();

VOCATIONAL vc;

vc.voc_accept("Music", "High School", 16);

vc.voc_display();

getch();

}

----------------------------------------------------------------------------------------------------------------

/*

A C++ program to find the area of a triangle, given its three sides by the user.

*/

#include<conio.h>
#include<iostream.h>
#include<math.h>


void main()
{

clrscr();

//declare all variables.
float a, b, c, s, A;

//Prompt user to input three sides of the triangle.
cout<<"Enter the three sides of the triangle :";

//store user input.
cin>>a>>b>>c;

//Calculate the semi-perimeter.
s = (a+b+c)/2;

//Calculate the area of the triangle using Heron's formula.
A = sqrt( s*(s-a)*(s-b)*(s-c))

//Print area on the screen.
cout<<"\nArea of the triangles is :"<<A;

getch();
}

------------------------------------------------------------------------------------------------------------

/*

A C++ program to check if a number given by user is an Armstrong number.

*/


#include <math.h>
#include<conio.h>
#include<iostream.h>

void main() {
   
    //Declare variables.
   int num, originalNum, remainder, n = 0;

   float result = 0.0;

   printf("Enter an integer: ");

   //Store number entered by user in integer variable 'num'.
   scanf("%d", &num);

   //Store value of 'num' into variable 'originalNum'
   originalNum = num;

   // store the number of digits in num in variable 'n'.

   for (originalNum = num; originalNum != 0; ++n) 
  {
       originalNum /= 10;
   }


   //Extract the digits of 'num', and raise to power 'n' and get their sum.

   for (originalNum = num; originalNum != 0; originalNum /= 10) 
{
       remainder = originalNum % 10;

      // store the sum of the power of individual digits in result
      result += pow(remainder, n);
   }


   // if num is equal to result, the number is an Armstrong number
   if ((int)result == num)
   {
    printf("%d is an Armstrong number.", num);
    }
   else
    {
    printf("%d is not an Armstrong number.", num);
     }


}

-----------------------------------------------------------------------------------------------------------------------------

/*

A C++ program to write the factorial of a number.

*/

#include<iostream.h>
#include<conio.h>

void main()
{
clrscr();

//Declare all the variables.

int n, f=1, i=1;

//prompt user to enter a positive number.
cout<<"Enter a positive number :";

//store user input into 'n'.
cin>>n;

//Compute the factorial and store its value in 'f'.
while(i <= n)
{

f = f*i;

i++;

}
//Print the factorial on screen.
cout<<"Factorial of "<<n<<" = "<<f <<endl;

 getch();
}

-----------------------------------------------------------------------------------------------------------

/*

A C++ program to print the Fibonnaci series upto the nth term.

*/

#include <iostream.h>
#include<conio.h>

void main() 
{
    //clear screen.
     clrscr();

    //Declare all the variables.
     int n, t1 = 0, t2 = 1, nextTerm = 0;

     //Prompt user to enter the number of terms to be printed. 
    cout << "Enter the number of terms: ";

     //Store the term in variable 'n'.
    cin >> n;

     //Print "Fibonnaci Series" on the screen.
    cout << "Fibonacci Series: ";

    //For loop to print the series.
    for (int i = 1; i <= n; ++i) 
      {
        
       // Prints the first two terms.
        if(i == 1) 
        {
            cout << t1 << ", ";
            continue;
        }
        if(i == 2) 
       {
            cout << t2 << ", ";
            continue;
        }

        //Sum of the last two terms becomes the next term.
        nextTerm = t1 + t2;
        
        //The previous term becomes the first term for the next term.
        t1 = t2;

        //The new term becomes the second term for the next term.
        t2 = nextTerm;
        
        //Print the terms of the series on the screen.
        cout << nextTerm << ", ";
    }

    getch();
}

--------------------------------------------------------------------------------------------------------------

/*

A C++ program to find the GCD/HCF of two positive numbers.

*/

#include<iostream.h>
#include<math.h>
#include<conio.h>

int main()
{
    //clrscr();

    //Declare all variables.
    int a, b, result;

    //Prompt user to input two positive numbers.
    cout<<"Enter any two positive numbers :";

    //Store user inputs
    cin>>a>>b;

    //Find Minimum of a and b
    result = min(a, b);


    while (result > 0)
    {
        if (a % result == 0 && b % result == 0)
        {
            break;
        }

        result--;
    }

    // Return gcd of a and b
    cout<<"GCD of "<<a<<" and "<<b<<" is "<<result;

    //getch();

}

-------------------------------------------------------------------------------------

/*

A C++ program to check if the given number is a prime number.

*/

#include <iostream.h>
#include<conio.h>

void main() {


   //Clear screen.
    clrscr();

  //Declare all the variables.
  int i, n;
  bool is_prime = true;

  //Prompt user to enter a positive integer.
  cout << "Enter a positive integer: ";

  //Put user input into variable 'n'.
  cin >> n;

  // 0 and 1 are not prime numbers
  if (n == 0 || n == 1) 
  {
    is_prime = false;
  }

  // loop to check if n is prime
  for (i = 2; i <= n/2; ++i) 
{
    if (n % i == 0) 
    {
      is_prime = false;

      break;
    }

  }

  if (is_prime)
    {
    cout << n << " is a prime number";
    }
  else
   {
    cout << n << " is not a prime number";
     }

    getch();
}

--------------------------------------------------------------------------------------------------------

/*

A C++ program to print the table of 'n'.

*/

#include <iostream.h>
#include<conio.h>

void main()
{

//Clear the screen.
clrscr();

//Declare all the variables.
int i, n;

//prompt user to input a number.
cout<<"Please enter a integer number "<<endl;

              //Store user input into 'n'.
cin>>n;

              //Print the table.

  for(i = 1; i<= 10; i++)
{

cout<<"n x "<<i<<" = "<<n*i<<endl;
}

getch();
 
}

------------------------------------------------------------------------------------------------

/*

A C++ program to print all the Pythagorean triplets between 1 and user given limit.

*/

#include<iostream.h>
#include<conio.h>

void main()
{
    //Declare int variables.
    int a, b, c, sum = 0, limit;

    //Prompt user to input upper limit.
    cin>>limit;

    for(a = 1; a<limit; a++)
    {
        for(b = 1; b<limit; b++)
        {
            for(c = 1; c<limit; c++)
            {
                if( a*a == (b*b + c*c) && (a+b+c) != sum)
                {
                    //To filter duplicate triplets.
                    sum = a+b+c;

                    //Print the triplets.
                    cout<<a<<" "<<b<<" "<<c<<endl;

                }
            }
        }
    }

        getch();
}

--------------------------------------------------------------------------------------------------


Wednesday, January 17, 2024

Pandas, Numpy and Matplotlib: Basic Python libraries for Loading data from data files into our Python program.

Install all these three libaraies using the following commands:

pip install pandas 

pip install numpy

pip install matplotlib --user

Now, open the Python interpreter and import each in your Python program as follows:

import pandas as pd

import numpy as np

import matplotlib.pyplot as plt

Now start using each of them in your program as follows:

df = pd.read_csv('location path of the .csv file from which data has to be loaded')



Sunday, January 14, 2024

Data Analytics

Data Analytics


Data helps in 

1) Make better decisions

2) Solve problems by finding the reason for it

3) To evaluate, improve and benchmarking process

4) To understand consumers (their preferences) and the market 


Data Analytics - The scientific process of transforming data into insights for making better decisions.

It is about what will happen in the future and how we can improve it.


Data Analysis - A kind of postmortem analysis - what has happened in the past, why it happened etc.


Types of Data Analytics -

The level of difficulty and value added by it increases from top to bottom.

1) Descriptive Analytics - what happened

2) Diagnostic Analytics - why it happened 

3) Predictive Analytics - what will happen, forecasting trends 

4) Prescriptive Analytics - how can we make it happen


Skill set required to be a good data analyst are:


1) Mathematics 2) Hacking skills (Technology)  3) Business and strategy acumen - Domain knowledge. 

One person may not have all, so we need a group of people working together. 

Why Python? 

It is very simple and versatile programming language with extensive libraries. And it can also be embedded into programs written in other languages. 

It can be used for building many types of applications like: 

1. Desktop apps

2. Web apps

3. Database apps

4. Networking apps

5. Data science 

6. Machine Learning

7. IoT and Embedded Systems

Differenet types of Variables i.e. DATA - can be :

1. Categorical - Defined categories

1. Nominal data: No ranks like Gender, color, etc.

2. Ordinal data: Ranked data like grades A, B, C 

2. Numerical - 

1. Discrete - Countable items like no. of children 

2. Continuous - Measured quantities like weight, voltage, salary.

1. Interval Scale - The difference is meaningful but there is no 'zero point' on the scale, like year, tempeartue.

2. Ratio Scale - The difference is meaningful and there is a 'zero point' too like weight, salary, age.


Python for Data Analytics

1 Numpy and Data Manipulation

- Introduction to Numpy - Installation of Jupyter Notebook - Creation, Indexing, and Slicing of Numpy Arrays - Mathematical Operations, Combining and Splitting Arrays - Search, Sort, Filter Arrays, Aggregating Functions - Statistical Functions in Arrays 2 Pandas for Data Analysis - Introduction to Pandas - Creation of Data Frames, Exploring Data - Dealing with Duplicate values, Missing Data - Column Transformation in Pandas, GroupBy - Merge, Concatenate, Join in Pandas - Pivoting and Melting Dataframes 3 Matplotlib for Data Visualization - Introduction to Matplotlib - Bar, Line, Scatter, Pie, Box, Histogram, Violin, Stem plots - Stack Plot, Step Chart, Legends, Subplot - Save a Chart Using Matplotlib - Data Visualization in Seaborn - Seaborn Project

DATA ANALYTICS 4 MySQL for Data Analytics - Introduction to MySQL - Installation, Importing Data - Select Query, Where Clause - AND, OR, NOT Operators, Like Operator - Order By, Limit, Between - IN, NOT IN operator, String Functions - Data Aggregation, Numeric Functions - Date Functions, Case Operator - Group By, Having Clause - Joins, Set Operators, Subqueries, Views - Stored Procedure, Window Functions 5 Excel for Data Analytics - Introduction to MS Excel - Basic Functions, Data Validation - Data Connectors, Conditional Formatting - Basics of Formatting, Sorting, Filtering Data - Dealing with Null Values, Duplicate Values - Trimming Whitespaces, Text Functions - IF, AND, OR Functions, Date & Time Functions - COUNTIF, SUMIF Functions, Xlookup - Power Query, Cleaning and Transformation - Creating a Dashboard in Excel, myExcel Project 6 Power BI Essentials - Introduction to Power Bi - Installation of Power Bi Desktop - Data Connectors, Basic Transformations - Format Tool, Pivoting, Unpivoting of data - Adding Conditional Columns, Merge queries - Data model, Relationship Management - Introduction to DAX, Calculated Columns, Measures - DAX Functions, Visualizations, Filters - Creating Reports, Custom Visuals - Designing for Phone vs Desktop Report Viewers - Publishing Reports to Power BI Services

Tuesday, December 26, 2023

What is a holding company?

 A holding company is a parent company that is created to buy and control the ownership

 interests of other companies. The companies that are owned or controlled by a  holding

 company are called its subsidiaries.

holding companies don’t manufacture anything, sell any products or services, or conduct any

 other business operations. Their sole purpose is to hold the controlling stock or membership

 interests in other companies. This type of holding company is called a pure holding company.

In a typical holding company structure, the subsidiary companies manufacture, sell, or

 otherwise conduct business. These are called operating companies.

The holding company can own 100% of the subsidiary, or it can own just enough stock or membership interests to control the subsidiary. Having control means it has enough stock or membership interests to ensure that a vote of owners will go its way. This can be 51%. Where there are many owners, it can be a much lower percentage.

Each subsidiary has its own management who run the day-to-day business. The holding company’s management is responsible for overseeing how the subsidiaries are run. They can elect and remove corporate directors or managers and can make major policy decisions like deciding to merge or dissolve. The people running the holding company do not participate in the operating companies’ day-to-day decision making.


The holding company’s management is also responsible for deciding where to invest its money. A pure holding company can obtain the funds to make its investments by selling equity interests in itself or its subsidiaries or by borrowing. It can also earn revenue from payments it receives from its subsidiaries in the form of dividends, distributions, interest payments, rents, and payments for back-office functions it may provide. 


A holding company structure is popular with large enterprises with multiple business units. Take, for example, a large corporation that manufactures and sells several different consumer goods, including hair care products, skincare products, baby care products, and others. Rather than using one corporation with different divisions, this enterprise could be structured with one holding company and several subsidiaries. Each business unit could be operated as a separate subsidiary in which the holding company owns a controlling interest. The company’s intellectual properties, equipment, and real estate may also be placed in separate subsidiaries, with the operating companies paying to use the intellectual properties, lease the equipment, and rent its offices.


LLC holding companies

Holding companies can also be used by much smaller businesses — even by single entrepreneurs. Take, for example, a person who wants to buy an apartment building for the rental income. Two business entities could be formed: an LLC operating company that would own the apartment building and an LLC holding company that would own the LLC operating company.

Now, let’s say that our entrepreneur wants to buy a fast-food restaurant and a thoroughbred horse farm. A new subsidiary LLC can be formed for each new investment.

A holding company can own businesses in a variety of unrelated industries. It doesn’t matter if the owners and managers of the holding company don’t know about those businesses because each subsidiary has its own management to run the day-to-day operations.


Thursday, October 5, 2023

Python program to find the length and cost of a stock portfolio.

 d10={'tvs':1500,'tm':616,'axis':1000,'icici':950,'infy':1450,'wipro':400,'auro':875,'lupin':1150,'hindalco':470,'tisco':125,'pfc':240,'idfc first':92,'bob':212,'rec':280,'bel':140 }

l10 = len(d10)

s10=sum(d10.values())


print('d10: ',end='')

print(d10)

print('Sum of d10: ' + str(s10)) #9500

print('Number of stocks in d10: ' + str(l10))

print()


d25={'tvs':1500,'tm':616,'axis':1000,'icici':950,'infy':1450,'wipro':400,'auro':875,'lupin':1150,'hindalco':470,'tisco':125,'lt':3075,'polycab':5270,'titan':3215,'trent':2050,'hal':1950 }

l25 = len(d25)

s25=sum(d25.values())


print('d25: ',end='')

print(d25)

print('Sum of d25 :' + str(s25)) #24100

print('Number of stocks in d25: ' + str(l25))


Sacred Thought

28 April 2024 Today I am going to explain verse 31 - 38 chapter two for you all. There is no opportunity better than a righteous war (सत्य औ...