Simple Arithmetic

In [1]:
from xv.math.kids import Arithmetic as AM
from xv.util import listAttr
In [2]:
help(AM.count)
Help on method count in module xv.math.kids._arithmetic:

count(*args) method of builtins.type instance

In [3]:
AM.count(2, "tiger")
Out[3]:

🐅 1

🐅🐅 2

In [4]:
AM.count(5)
Out[4]:

👧 1

👧👧 2

👧👧👧 3

👧👧👧👧 4

👧👧👧👧👧 5

In [5]:
AM.count(1, 5)
Out[5]:

👧 1

👧👧 2

👧👧👧 3

👧👧👧👧 4

👧👧👧👧👧 5

In [6]:
AM.count(-5, 1)
Out[6]:

-5

-4

-3

-2

-1

0

👧 1

In [7]:
AM.add(45,- 20)
Out[7]:

45 - 20

= (40 + 5) + (-20)

= 40 - 20 + 5

= 20 + 5

= 20 + 5

= 25

In [8]:
AM.multiply(30, 29)
$\displaystyle 30 * 29$
Flip to keep smaller number (absolute values) first
$\displaystyle 29 * 30$
Expand numbers
$\displaystyle (20 + 9) * 30$
Distribute multiplier
$\displaystyle 20 * (30) + 9 * (30)$
Sort
$\displaystyle 600 + 270$
Answer
$\displaystyle 870$
In [9]:
AM.lcm(4, 5, 4)
Calculating LCM of 4, 5, 4

Multiples of 4 = [ 4  8 12 16 20]

Multiples of 5 = [ 5 10 15 20]

Multiples of 4 = [ 4  8 12 16 20]

The lowest common multiple (LCM) of all numbers 20
Out[9]:
20
In [10]:
AM.addInMemory(36, 35)
Out[10]:

+ 36 + 35

+ 30 + 6 + 30 + 5

+ 60 + 6 + 5

+ 71

In [11]:
AM.prime(28)
Finding 5 prime numbers >= 28

Is 28 a prime number?
Square root of 28 is less than 6.
The prime numbers smaller than 6 are:
[2, 3, 5]
So, we will check whether 28 is divisible by any of the above prime numbers
As 28 is divisible by 2, it is not a prime number.

Is 29 a prime number?
Square root of 29 is less than 6.
The prime numbers smaller than 6 are:
[2, 3, 5]
So, we will check whether 29 is divisible by any of the above prime numbers

29 is a prime number.
It is not divisible by prime numbers less than or equal to its square root 5.4:
[2, 3, 5]

Is 30 a prime number?
Square root of 30 is less than 6.
The prime numbers smaller than 6 are:
[2, 3, 5]
So, we will check whether 30 is divisible by any of the above prime numbers
As 30 is divisible by 2, it is not a prime number.

Is 31 a prime number?
Square root of 31 is less than 6.
The prime numbers smaller than 6 are:
[2, 3, 5]
So, we will check whether 31 is divisible by any of the above prime numbers

31 is a prime number.
It is not divisible by prime numbers less than or equal to its square root 5.6:
[2, 3, 5]
....

37 is a prime number.
It is not divisible by prime numbers less than or equal to its square root 6.1:
[2, 3, 5]
....

41 is a prime number.
It is not divisible by prime numbers less than or equal to its square root 6.4:
[2, 3, 5]
....

43 is a prime number.
It is not divisible by prime numbers less than or equal to its square root 6.6:
[2, 3, 5]
Finding 5 prime numbers >= 28
$\displaystyle [29, 31, 37, 41, 43]$
Out[11]:
[29, 31, 37, 41, 43]
In [ ]:
 

Machine Learning

  1. Deal Banking Marketing Campaign Dataset With Machine Learning

TensorFlow

  1. Difference Between Scalar, Vector, Matrix and Tensor
  2. TensorFlow Deep Learning Model With IRIS Dataset
  3. Sequence to Sequence Learning With Neural Networks To Perform Number Addition
  4. Image Classification Model MobileNet V2 from TensorFlow Hub
  5. Step by Step Intent Recognition With BERT
  6. Sentiment Analysis for Hotel Reviews With NLTK and Keras
  7. Simple Sequence Prediction With LSTM
  8. Image Classification With ResNet50 Model
  9. Predict Amazon Inc Stock Price with Machine Learning
  10. Predict Diabetes With Machine Learning Algorithms
  11. TensorFlow Build Custom Convolutional Neural Network With MNIST Dataset
  12. Deal Banking Marketing Campaign Dataset With Machine Learning

PySpark

  1. How to Parallelize and Distribute Collection in PySpark
  2. Role of StringIndexer and Pipelines in PySpark ML Feature - Part 1
  3. Role of OneHotEncoder and Pipelines in PySpark ML Feature - Part 2
  4. Feature Transformer VectorAssembler in PySpark ML Feature - Part 3
  5. Logistic Regression in PySpark (ML Feature) with Breast Cancer Data Set

PyTorch

  1. Build the Neural Network with PyTorch
  2. Image Classification with PyTorch
  3. Twitter Sentiment Classification In PyTorch
  4. Training an Image Classifier in Pytorch

Natural Language Processing

  1. Spelling Correction Of The Text Data In Natural Language Processing
  2. Handling Text For Machine Learning
  3. Extracting Text From PDF File in Python Using PyPDF2
  4. How to Collect Data Using Twitter API V2 For Natural Language Processing
  5. Converting Text to Features in Natural Language Processing
  6. Extract A Noun Phrase For A Sentence In Natural Language Processing