Make Shapes With SystemOfBobies

Make Shapes With SystemOfBobies

In [1]:
from xv.km.plotting import SystemOfBodies
In [2]:
s = SystemOfBodies('A 0 0')
In [3]:
s.plot('A')
Shape Name: A
In [4]:
s.replot()
s.plot('A', 'A')
Shape Name: A

Create square

In [8]:
s.addPoints(('B 10 0', 'C 10 10', 'D 0 10'), overwrite = True)
In [9]:
s.replot()
s.plot('A B C D', 'ABCD')
Shape Name: A
Shape Name: B
Shape Name: C
Shape Name: D
In [10]:
s.replot()
s.plot('A B C D', 'ABCD')
s.plot('AB BC CD DA', 'ABCD')
Shape Name: A
Shape Name: B
Shape Name: C
Shape Name: D
Shape Name: AB
Segment2D AB:
Segment2D(Point2D(0, 0), Point2D(10, 0))
            
Shape Name: BC
Segment2D BC:
Segment2D(Point2D(10, 0), Point2D(10, 10))
            
Shape Name: CD
Segment2D CD:
Segment2D(Point2D(10, 10), Point2D(0, 10))
            
Shape Name: DA
Segment2D DA:
Segment2D(Point2D(0, 10), Point2D(0, 0))
            

Create rectangle beside sqaure

In [15]:
s.addPoints(('E 12 0', 'F 35 0', 'G 35 10', 'H 12 10'), overwrite = True)
In [19]:
s.replot()
s.plot('A B C D', 'ABCD')
s.plot('AB BC CD DA', 'ABCD')
s.plot('E F G H', 'EFGH')
s.plot('EF FG GH HE')
Shape Name: A
Shape Name: B
Shape Name: C
Shape Name: D
Shape Name: AB
Segment2D AB:
Segment2D(Point2D(0, 0), Point2D(10, 0))
            
Shape Name: BC
Segment2D BC:
Segment2D(Point2D(10, 0), Point2D(10, 10))
            
Shape Name: CD
Segment2D CD:
Segment2D(Point2D(10, 10), Point2D(0, 10))
            
Shape Name: DA
Segment2D DA:
Segment2D(Point2D(0, 10), Point2D(0, 0))
            
Shape Name: E
Shape Name: F
Shape Name: G
Shape Name: H
Shape Name: EF
Segment2D EF:
Segment2D(Point2D(12, 0), Point2D(35, 0))
            
Shape Name: FG
Segment2D FG:
Segment2D(Point2D(35, 0), Point2D(35, 10))
            
Shape Name: GH
Segment2D GH:
Segment2D(Point2D(35, 10), Point2D(12, 10))
            
Shape Name: HE
Segment2D HE:
Segment2D(Point2D(12, 10), Point2D(12, 0))
            

Create triangle inside rectangle

In [18]:
s.addPoints(('I 20 2.5', 'J 30 2.5', 'K 25 8'), overwrite = True)
In [21]:
s.replot()
s.plot('A B C D', 'ABCD')
s.plot('AB BC CD DA', 'ABCD')
s.plot('E F G H', 'EFGH')
s.plot('EF FG GH HE')
s.plot('I J K', 'IJK')
s.plot('IJ JK KI')
Shape Name: A
Shape Name: B
Shape Name: C
Shape Name: D
Shape Name: AB
Segment2D AB:
Segment2D(Point2D(0, 0), Point2D(10, 0))
            
Shape Name: BC
Segment2D BC:
Segment2D(Point2D(10, 0), Point2D(10, 10))
            
Shape Name: CD
Segment2D CD:
Segment2D(Point2D(10, 10), Point2D(0, 10))
            
Shape Name: DA
Segment2D DA:
Segment2D(Point2D(0, 10), Point2D(0, 0))
            
Shape Name: E
Shape Name: F
Shape Name: G
Shape Name: H
Shape Name: EF
Segment2D EF:
Segment2D(Point2D(12, 0), Point2D(35, 0))
            
Shape Name: FG
Segment2D FG:
Segment2D(Point2D(35, 0), Point2D(35, 10))
            
Shape Name: GH
Segment2D GH:
Segment2D(Point2D(35, 10), Point2D(12, 10))
            
Shape Name: HE
Segment2D HE:
Segment2D(Point2D(12, 10), Point2D(12, 0))
            
Shape Name: I
Shape Name: J
Shape Name: K
Shape Name: IJ
Segment2D IJ:
Segment2D(Point2D(20, 5/2), Point2D(30, 5/2))
            
Shape Name: JK
Segment2D JK:
Segment2D(Point2D(30, 5/2), Point2D(25, 8))
            
Shape Name: KI
Segment2D KI:
Segment2D(Point2D(25, 8), Point2D(20, 5/2))
            

Draw circle on top of the rectangle

In [24]:
s.addPoints('L 15 12', overwrite = True)
In [25]:
s.replot()
s.plot('A B C D', 'ABCD')
s.plot('AB BC CD DA', 'ABCD')
s.plot('E F G H', 'EFGH')
s.plot('EF FG GH HE')
s.plot('I J K', 'IJK')
s.plot('IJ JK KI')
s.plot('L', 'L', plotType = 'circle')
Shape Name: A
Shape Name: B
Shape Name: C
Shape Name: D
Shape Name: AB
Segment2D AB:
Segment2D(Point2D(0, 0), Point2D(10, 0))
            
Shape Name: BC
Segment2D BC:
Segment2D(Point2D(10, 0), Point2D(10, 10))
            
Shape Name: CD
Segment2D CD:
Segment2D(Point2D(10, 10), Point2D(0, 10))
            
Shape Name: DA
Segment2D DA:
Segment2D(Point2D(0, 10), Point2D(0, 0))
            
Shape Name: E
Shape Name: F
Shape Name: G
Shape Name: H
Shape Name: EF
Segment2D EF:
Segment2D(Point2D(12, 0), Point2D(35, 0))
            
Shape Name: FG
Segment2D FG:
Segment2D(Point2D(35, 0), Point2D(35, 10))
            
Shape Name: GH
Segment2D GH:
Segment2D(Point2D(35, 10), Point2D(12, 10))
            
Shape Name: HE
Segment2D HE:
Segment2D(Point2D(12, 10), Point2D(12, 0))
            
Shape Name: I
Shape Name: J
Shape Name: K
Shape Name: IJ
Segment2D IJ:
Segment2D(Point2D(20, 5/2), Point2D(30, 5/2))
            
Shape Name: JK
Segment2D JK:
Segment2D(Point2D(30, 5/2), Point2D(25, 8))
            
Shape Name: KI
Segment2D KI:
Segment2D(Point2D(25, 8), Point2D(20, 5/2))
            
Shape Name: L
In [31]:
s.replot()
s.plot('A B C D', 'ABCD')
s.plot('AB BC CD DA', 'ABCD')
s.plot('E F G H', 'EFGH')
s.plot('EF FG GH HE')
s.plot('I J K', 'IJK')
s.plot('IJ JK KI')
s.plot('L', 'L', plotType = 'circle', radius = 2)
Shape Name: A
Shape Name: B
Shape Name: C
Shape Name: D
Shape Name: AB
Segment2D AB:
Segment2D(Point2D(0, 0), Point2D(10, 0))
            
Shape Name: BC
Segment2D BC:
Segment2D(Point2D(10, 0), Point2D(10, 10))
            
Shape Name: CD
Segment2D CD:
Segment2D(Point2D(10, 10), Point2D(0, 10))
            
Shape Name: DA
Segment2D DA:
Segment2D(Point2D(0, 10), Point2D(0, 0))
            
Shape Name: E
Shape Name: F
Shape Name: G
Shape Name: H
Shape Name: EF
Segment2D EF:
Segment2D(Point2D(12, 0), Point2D(35, 0))
            
Shape Name: FG
Segment2D FG:
Segment2D(Point2D(35, 0), Point2D(35, 10))
            
Shape Name: GH
Segment2D GH:
Segment2D(Point2D(35, 10), Point2D(12, 10))
            
Shape Name: HE
Segment2D HE:
Segment2D(Point2D(12, 10), Point2D(12, 0))
            
Shape Name: I
Shape Name: J
Shape Name: K
Shape Name: IJ
Segment2D IJ:
Segment2D(Point2D(20, 5/2), Point2D(30, 5/2))
            
Shape Name: JK
Segment2D JK:
Segment2D(Point2D(30, 5/2), Point2D(25, 8))
            
Shape Name: KI
Segment2D KI:
Segment2D(Point2D(25, 8), Point2D(20, 5/2))
            
Shape Name: L
In [34]:
s.addPoints('M 18 12', overwrite = True)
In [35]:
s.replot()
s.plot('A B C D', 'ABCD')
s.plot('AB BC CD DA', 'ABCD')
s.plot('E F G H', 'EFGH')
s.plot('EF FG GH HE')
s.plot('I J K', 'IJK')
s.plot('IJ JK KI')
s.plot('L', 'L', plotType = 'circle', radius = 2)
s.plot('M', 'M', plotType = 'circle', radius = 2)
Shape Name: A
Shape Name: B
Shape Name: C
Shape Name: D
Shape Name: AB
Segment2D AB:
Segment2D(Point2D(0, 0), Point2D(10, 0))
            
Shape Name: BC
Segment2D BC:
Segment2D(Point2D(10, 0), Point2D(10, 10))
            
Shape Name: CD
Segment2D CD:
Segment2D(Point2D(10, 10), Point2D(0, 10))
            
Shape Name: DA
Segment2D DA:
Segment2D(Point2D(0, 10), Point2D(0, 0))
            
Shape Name: E
Shape Name: F
Shape Name: G
Shape Name: H
Shape Name: EF
Segment2D EF:
Segment2D(Point2D(12, 0), Point2D(35, 0))
            
Shape Name: FG
Segment2D FG:
Segment2D(Point2D(35, 0), Point2D(35, 10))
            
Shape Name: GH
Segment2D GH:
Segment2D(Point2D(35, 10), Point2D(12, 10))
            
Shape Name: HE
Segment2D HE:
Segment2D(Point2D(12, 10), Point2D(12, 0))
            
Shape Name: I
Shape Name: J
Shape Name: K
Shape Name: IJ
Segment2D IJ:
Segment2D(Point2D(20, 5/2), Point2D(30, 5/2))
            
Shape Name: JK
Segment2D JK:
Segment2D(Point2D(30, 5/2), Point2D(25, 8))
            
Shape Name: KI
Segment2D KI:
Segment2D(Point2D(25, 8), Point2D(20, 5/2))
            
Shape Name: L
Shape Name: M

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