From 5c3e1c2ed86b57838d16151e4d9c305eae565084 Mon Sep 17 00:00:00 2001
From: Ananyagra24 <155280507+Ananyagra24@users.noreply.github.com>
Date: Sun, 12 May 2024 21:49:55 +0530
Subject: [PATCH 001/405] Create History
---
contrib/History | 1 +
1 file changed, 1 insertion(+)
create mode 100644 contrib/History
diff --git a/contrib/History b/contrib/History
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/contrib/History
@@ -0,0 +1 @@
+
From b8e682d2fd427f8c76bde3bc30207cad327aec5d Mon Sep 17 00:00:00 2001
From: Ananyagra24 <155280507+Ananyagra24@users.noreply.github.com>
Date: Mon, 13 May 2024 08:40:22 +0530
Subject: [PATCH 002/405] Delete contrib/History
---
contrib/History | 1 -
1 file changed, 1 deletion(-)
delete mode 100644 contrib/History
diff --git a/contrib/History b/contrib/History
deleted file mode 100644
index 8b13789..0000000
--- a/contrib/History
+++ /dev/null
@@ -1 +0,0 @@
-
From 83809066303a7f962f2063d1613bad26f9776c1d Mon Sep 17 00:00:00 2001
From: Ananyagra24 <155280507+Ananyagra24@users.noreply.github.com>
Date: Mon, 13 May 2024 21:10:18 +0530
Subject: [PATCH 003/405] Create dice_roller.md
---
contrib/mini-projects/dice_roller.md | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100644 contrib/mini-projects/dice_roller.md
diff --git a/contrib/mini-projects/dice_roller.md b/contrib/mini-projects/dice_roller.md
new file mode 100644
index 0000000..c083934
--- /dev/null
+++ b/contrib/mini-projects/dice_roller.md
@@ -0,0 +1,19 @@
+```
+import random
+def dice():
+ dice_no = random.choice([1,2,3,4,5,6])
+ return "You got " + str(dice_no)
+def roll_dice():
+ print("Hey Guys, you will now roll a single dice using Python!")
+ while True:
+ start=input("Type \'k\' to roll the dice: ").lower()
+ if start != 'k':
+ print("Invalid input. Please try again.")
+ continue
+ print(dice())
+ roll_again = input("Do you want to reroll? (Yes/No): ").lower()
+ if roll_again != 'yes':
+ break
+ print("Thanks for rolling the dice.")
+roll_dice()
+```
From f8a67cf65dc3d70cf0a81a0cebd55770f0ffc728 Mon Sep 17 00:00:00 2001
From: Ananyagra24 <155280507+Ananyagra24@users.noreply.github.com>
Date: Mon, 13 May 2024 21:11:01 +0530
Subject: [PATCH 004/405] Update index.md
---
contrib/mini-projects/index.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/mini-projects/index.md b/contrib/mini-projects/index.md
index 82596a2..f60b286 100644
--- a/contrib/mini-projects/index.md
+++ b/contrib/mini-projects/index.md
@@ -1,3 +1,3 @@
# List of sections
-- [Section title](filename.md)
+- [Dice Roller](dice_roller.md)
From fbbef5e5726765ed0bfff9131972f1f6d80374dc Mon Sep 17 00:00:00 2001
From: AritraCh2005 <153842880+AritraCh2005@users.noreply.github.com>
Date: Tue, 14 May 2024 19:13:22 +0530
Subject: [PATCH 005/405] Update index.md
---
contrib/numpy/index.md | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/contrib/numpy/index.md b/contrib/numpy/index.md
index 82596a2..db6f0eb 100644
--- a/contrib/numpy/index.md
+++ b/contrib/numpy/index.md
@@ -1,3 +1,12 @@
# List of sections
-- [Section title](filename.md)
+* [Basic Mathematics](#BasicMaths)
+ * [What is a Matrix?](#Matrix-Intro)
+ * [Scalars and Vectors](#Scalars-Vectors)
+ * [Arrays in Python](#Arrays)
+ * [What is a Tensor?](#Tensors)
+ * [Addition and Subtraction in Matrices](#Arithmetic)
+ * [Transpose of Matrices & Vectors](#Transpose)
+ * [Dot Product](#DotProduct)
+ * [Dot Product of Matrices](#DotMatrices)
+
From c1726d428a368dd1a9f72f896ef1699159ec976e Mon Sep 17 00:00:00 2001
From: AritraCh2005 <153842880+AritraCh2005@users.noreply.github.com>
Date: Tue, 14 May 2024 19:14:52 +0530
Subject: [PATCH 006/405] Create basic_math.md
Added basic mathematics useful while working with numpy
---
contrib/numpy/basic_math.md | 371 ++++++++++++++++++++++++++++++++++++
1 file changed, 371 insertions(+)
create mode 100644 contrib/numpy/basic_math.md
diff --git a/contrib/numpy/basic_math.md b/contrib/numpy/basic_math.md
new file mode 100644
index 0000000..d19f2f8
--- /dev/null
+++ b/contrib/numpy/basic_math.md
@@ -0,0 +1,371 @@
+# Basic Mathematics
+## What is a Matrix?
+A matrix is a collection of numbers ordered in rows and columns. Here is one.
+
+
+
+
+
1
+
2
+
3
+
+
+
4
+
5
+
6
+
+
+
7
+
8
+
9
+
+
+
+
+
+A matrix is generally written within square brackets[]. The dimensions of a matrix is represented by (Number of rows x Number of columns).The dimensions of the above matrix is 3x3.
+
+Matrices are the main characters in mathematical operations like addition, subtraction etc, especially those used in Pandas and NumPy. They can contain only numbers, symbols or expressions.
+
+In order to refer to a particular element in the matrix we denote it by :
+Aij
+
+where i represents the ith row and j represents the jth column of the matrix.
+
+## Scalars and Vectors
+### Scalars
+There exists specific cases of matrices which are also widely used.
+
+A matrix with only one row and column i.e. containing only one element is commonly referred to as a scalar.
+
+The numbers ```[12] ; [-5] ; [0] ; [3.14]``` all represent scalars. Scalars have 0 dimensions.
+
+### Vectors
+Vectors are objects with 1 dimension. They sit somewhere between scalars and matrices. They can also be referred to as one dimensional matrices.
+
+```[1 3 5]``` represents a vector with dimension 1x3.
+
+A vector is the simplest linear algebraic object.A matrix can be refered to as a collection of vectors
+
+Vectors are broadly classified into 2 types:
+- Row Vectors: Is of the form 1 x n where n refers to the number of columns the vector has.
+- Column Vectors: Is of the form m x 1 where m refers to the number of rows the vector has.
+
+m or n are also called as the length of the column and row vector respectively.
+
+## Arrays in Python
+
+To understand arrays, first let us start by declaring scalars, vectors and matrices in Python.
+
+First we need to import numpy. We do so by importing it as 'np' as it provides better readability, namespace clarity and also aligns with the community guidelines.
+
+```python
+import numpy as np
+```
+Next up, we declare a scalar s as,
+```
+s = 5
+```
+
+
+
+Now we declare a vector,
+```python
+v = np.array([5,-2,4])
+```
+On printing v we get the following output,
+```python
+array([5,-2,4])
+```
+By default, a vector is declared as a **'row vector'**.
+
+Finally, we declare matrices,
+```python
+m=np.array([[5,12,6],[-3,0,14]])
+```
+On printing m we get,
+```python
+array([[5,12,6],
+ [-3,0,14]])
+```
+> The type() function is used to return the data type of a given variable.
+
+* The type(s) will return **'int'**.
+
+* The type(v) will return **'numpy.ndarray'** which represents a **n-dimensional array**, since it is a 1 dimensional array.
+
+ * The type(m) will also return **'numpy.ndarray'** since it is a 2-dimensional array.
+
+These are some ways in which arrays are useful in python.
+
+> The shape() function is used to return the shape of a given variable.
+
+* m.shape() returns (2,3) since we are dealing with a (2,3) matrix.
+
+* v.shape() returns(3,) indicates it has only one dimensional or that it stores 3 elements in order.
+
+* However, 'int' objects do not have shape and therefore s.shape() gives an error.
+
+## What is a Tensor?
+A Tensor can be thought of as a collection of matrices. It has dimensions k x m x n.
+
+**NOTE:** Scalars, vectors and matrices are also tensors of rank 0,1,2 respectively.
+
+Tensors can be stored in ndarrays.
+
+Let's create a tensor with 2 matrices,
+```python
+m1=np.array([[5,12,6],[-3,0,14]])
+m2=np.array([[2,1,8],[-6,2,0]])
+t=np.array([m1,m2])
+```
+Upon printing t we get,
+```python
+array([[[5,12,6],
+ [-3,0,14]],
+
+ [[2,1,8],
+ [-6,2,0]]])
+```
+If we check it's shape, we see that is is a **(2,2,3)** object.
+
+If we want to manually create a tensor we write,
+```python
+t=np.array([[[5,12,6], [-3,0,14]],[[2,1,8], [-6,2,0]]])
+```
+ ## Addition and Subtraction in Matrices
+
+ ### Addition
+ For 2 matrices to be added to one another they must have **same dimensions**.
+
+ If we have 2 matrices say,
+
+```python
+A=np.array([[5,12,6],[-3,0,14]])
+B=np.array([[2,1,8],[-6,2,0]])
+C= A+B
+ ```
+The element at position Aij gets added to the element at position Bij. It's that simple!
+The above input will give the resultant C as:
+```python
+array([[7,13,14],
+ [-9,2,14]])
+```
+### Subtraction
+
+As we know, subtraction is a type of addition, the same rules apply here.
+
+ If we have 2 matrices say,
+
+```python
+A=np.array([[5,12,6],[-3,0,14]])
+B=np.array([[2,1,8],[-6,2,0]])
+C= A-B
+ ```
+
+The element at position Bij gets subtracted from the element at position Aij.
+The above input will give the resultant C as:
+```python
+array([[3,11,-2],
+ [3,-2,14]])
+```
+Similarly the same operations can be done with **floating point numbers** as well.
+
+In a similar fashion, we can add or subtract vectors as well with the condition that they must be of the **same length**.
+```python
+A=np.array([1,2,3,4,5])
+B=np.array([6,7,8,9,10])
+C= A+B
+ ```
+The result is a vector of length 5 with C as,
+```python
+array([7,9,11,13,15])
+```
+ ### Addition of scalars with vectors & matrices
+
+ Scalars show unique behaviour when added to matrices or vectors.
+
+ To demonstrate their behaviour, let's use an example,
+ Let's declare a matrix,
+
+```python
+A=np.array([[5,12,6],[-3,0,14]])
+A+1
+```
+We see that if we perform the above function, i.e. add scalar [1] to the matrix A we get the output,
+```python
+array([[6,13,7],[-2,1,15]])
+```
+We see that the scalar is added to the matrix elementwise, i.e. each element gets incremented by 1.
+
+**The same applies to vectors as well.**
+
+Mathematically, it is not allowed as the shape of scalars are different from vectors or matrices but while programming in Python it works.
+
+## Transpose of Matrices & Vectors
+### Transposing Vectors
+
+If X is the vector, then the transpose of the vector is represented as XT. It changes a vector of dimension n x 1 into a vector of dimension 1 x n, i.e. a row vector to a column vector and vice versa.
+
+> * The values are not changing or transforming ; only their position is.
+> * Transposing the same vector (object) twice yields the initial vector (object).
+
+```python
+x=np.array([1,2,3))
+```
+Transposing this in python using ```x.T``` will give
+```python
+array([1,2,3))
+```
+which is the same vector as the one taken as input.
+
+> 1-Dimensional arrays don't really get transposed (in the memory of the computer)
+
+To transpose a vector, we need to reshape it first.
+```python
+x_new= x.reshape(1,3)
+x_new.T
+```
+will now result in the vector getting transposed,
+```python
+array([[1],
+ [2],
+ [3]])
+```
+
+### Transposing Matrices
+
+If M is a matrix, then the transpose of the matrix M is represented as MT. When transposed, a m x n matrix becomes a n x m matrix.
+
+The element Mij of the initial matrix becomes the Nji where N is the transposed matrix of M.
+
+Let's understand this further with the help of of an example,
+```python
+A = np.array([[1,5,-6],[8,-2,0]])
+```
+The output for the above code snippet will be,
+```python
+array([[1,5,-6],
+ [8,-2,0]])
+```
+> **array.T** returns the transpose of an array (matrix).
+
+```python
+A.T
+```
+will give the output as,
+```python
+array([[1,8],
+ [5,-2],
+ [-6,0]])
+```
+
+Hope the following examples have cleared your concept on transposing.
+
+## Dot Product
+
+> **np.dot()** returns the dot product of two objects
+> Dot product is represented by ( * ), for example, x(dot)y = x * y
+>
+### Scalar * Scalar
+Let's start with scalar multiplication first.
+
+``` [6] * [5] = [30]
+ [10] * [-2] = [-20]
+```
+It is the same multiplication that we are familiar with since learnt as kids.
+ Therefore, ```np.dot([6]*[5])``` returns ```30```.
+
+### Vector * Vector
+To multiply vectors with one another, they must be of **same length**.
+
+Now let's understand this with an example,
+```python
+x = np.array([2,8,-4])
+y = np.array([1,-7,3])
+```
+
+The dot product returns the elementwise product of the vector i.e.
+x * y = ( x1 * y1 ) + ( x2 * y2 ) + ( x3 * y3 ) in the above example.
+
+Therefore, ```np.dot(x,y)``` gives ```[-66]``` as the input.
+
+We observe that **dot product of 2 vectors returns a scalar**.
+
+### Scalar * Vector
+
+When we multiply a scalar with a vector, we observe that each element of the vector gets multiplied to the scalar individually.
+
+A scalar k when multiplied to a vector v([x1,x2,x3]) gives the product = [(k * x1) + (k * x2) + (k * x3)]
+
+An example would bring further clarity,
+```python
+y = np.array([1,-7,3])
+y*5
+```
+will give the following output
+```python
+array[(5,-35,15)]
+```
+
+We observe that **dot product of 2 vectors returns a scalar**.
+
+We observe that **dot product of a vector and a scalar returns a vector**.
+
+## Dot Product of Matrices
+
+### Scalar * Matrix
+ Dot product of a scalar with a matrix works similar to dot product of a vector with a scalar.
+Now, we come to a very important concept which will be very useful to us while working in Python.
+
+Each element of the vector gets multiplied to the scalar individually.
+
+```python
+A = np.array([[1,5,-6],[8,-2,0]])
+B = 3 * A
+```
+will give the resultant B as
+```python
+array([[3,15,-18],
+ [24,-6,0]])
+```
+Thus each element gets multiplied by 3.
+> NOTE: The dot product of a scalar and a matrix gives a matrix of the same shape as the input matrix.
+
+### Matrix * Matrix
+ A matrix can be multipied to a matrix. However it has certain compatibility measures,
+ * We can only multiply an m x n matrix with an n x k matrix
+ * Basically the 2nd dimension of the first matrix has to match the 1st dimension of the 2nd matrix.
+> The output of a m x n matrix with a n x k matrix gives a **m x k** matrix.
+
+**Whenever we have a dot product of 2 matrices, we multiply row vectors within one matrix to the column vector of 2nd matrix.**
+
+For example, let's use multiply a row vector to a column vector to understand it further.
+
+```
+ ([[1]
+ ([2 8 4]) * [2] = [(2*1) + (8*2) + (4*3)] = [30]
+ [3]])
+```
+Now, let's multiply a 2 x 3 matrix with a 3 x 2 matrix.
+```
+ ([[A1,A2,A3], * ([[B1,B2] ([[(A1 * B1 + A2 * B3 + A3 * B5) , (A1 * B2 + A2 * B4 + A3 * B6)]
+ [A4,A5,A6]]) [B3,B4], = [ (A4 * B1 + A5 * B3 + A6 * B5) , (A4 * B2 + A5 * B4 + A6 * B6)]])
+ [B5,B6]])
+```
+Thus we obtain a 2 x 2 matrix.
+
+We use the np.dot() method to directly obtain the dot product of the 2 matrices.
+
+Now let's do an example using python just to solidify our knowledge.
+
+```python
+A=np.array([[5,12,6],[-3,0,14]])
+B=np.array([[2,-1],[8,0],[3,0]])
+np.dot(A,B)
+```
+The output we obtain is,
+```python
+array[[124,-5],
+ [36, 3]])
+```
From ea32f2bd8ce5c16960c66e72b6e886d9b260f51d Mon Sep 17 00:00:00 2001
From: Hema Sree
Date: Wed, 15 May 2024 17:49:44 +0530
Subject: [PATCH 007/405] Added intro to numpy
---
contrib/numpy/Introduction.md | 36 +++++++++++++++++++++++++++++++++++
contrib/numpy/index.md | 2 +-
2 files changed, 37 insertions(+), 1 deletion(-)
create mode 100644 contrib/numpy/Introduction.md
diff --git a/contrib/numpy/Introduction.md b/contrib/numpy/Introduction.md
new file mode 100644
index 0000000..59a1938
--- /dev/null
+++ b/contrib/numpy/Introduction.md
@@ -0,0 +1,36 @@
+# Introduction
+
+## What is Numpy?
+
+NumPy is a general-purpose array-processing package. It provides a high-performance multidimensional array object and tools for working with these arrays. It is the fundamental package for scientific computing with Python. It is open-source software.
+
+## Features of NumPy
+
+NumPy has various features including these important ones:
+
+1. A powerful N-dimensional array object
+2. Sophisticated (broadcasting) functions
+3. Tools for integrating C/C++ and Fortran code
+4. Useful linear algebra, Fourier transform, and random number capabilities
+
+## Install Numpy
+
+Before installing Numpy, ensure you have Python installed on your system. You can download and install Python from the [official Python website](https://www.python.org/).
+
+Numpy can be installed via the following pip command:
+
+```bash
+pip install numpy
+
+```
+
+# How to import NumPy
+
+To access NumPy and its functions import it in your Python code like this:
+
+```bash
+import numpy as np
+
+```
+
+We shorten the imported name to np for better readability of code using NumPy. This is a widely adopted convention that makes your code more readable for everyone working on it. We recommend to always use import numpy as np.
diff --git a/contrib/numpy/index.md b/contrib/numpy/index.md
index 82596a2..c6bf23c 100644
--- a/contrib/numpy/index.md
+++ b/contrib/numpy/index.md
@@ -1,3 +1,3 @@
# List of sections
-- [Section title](filename.md)
+- [Introduction](Introduction.md)
From 59e79c7627db41589dc554e1440d0ee5aacf3c9c Mon Sep 17 00:00:00 2001
From: Hema Sree
Date: Wed, 15 May 2024 17:57:30 +0530
Subject: [PATCH 008/405] Added numpy intro
---
contrib/numpy/Introduction.md | 32 +++++++++++++-------------------
1 file changed, 13 insertions(+), 19 deletions(-)
diff --git a/contrib/numpy/Introduction.md b/contrib/numpy/Introduction.md
index 59a1938..c437c48 100644
--- a/contrib/numpy/Introduction.md
+++ b/contrib/numpy/Introduction.md
@@ -1,36 +1,30 @@
# Introduction
-## What is Numpy?
+## What is NumPy?
-NumPy is a general-purpose array-processing package. It provides a high-performance multidimensional array object and tools for working with these arrays. It is the fundamental package for scientific computing with Python. It is open-source software.
+NumPy is a powerful array-processing library in Python, essential for scientific computing. It provides efficient data structures and tools for working with multidimensional arrays.
-## Features of NumPy
+## Key Features
-NumPy has various features including these important ones:
+1. **Efficient Arrays:** NumPy offers high-performance N-dimensional array objects for swift data manipulation.
+2. **Broadcasting:** Advanced broadcasting enables seamless element-wise operations on arrays of varying shapes.
+3. **Interoperability:** NumPy seamlessly integrates with C, C++, and Fortran, enhancing performance and versatility.
+4. **Mathematical Tools:** Comprehensive support for linear algebra, Fourier transforms, and random number generation.
-1. A powerful N-dimensional array object
-2. Sophisticated (broadcasting) functions
-3. Tools for integrating C/C++ and Fortran code
-4. Useful linear algebra, Fourier transform, and random number capabilities
+## Installation
-## Install Numpy
-
-Before installing Numpy, ensure you have Python installed on your system. You can download and install Python from the [official Python website](https://www.python.org/).
-
-Numpy can be installed via the following pip command:
+Ensure Python is installed in your system. If not you can install it from here([official Python website](https://www.python.org/)),then install NumPy via:
```bash
pip install numpy
-
```
-# How to import NumPy
+# Importing NumPy
-To access NumPy and its functions import it in your Python code like this:
+To access NumPy functions, import it with the alias `np`:
-```bash
+```python
import numpy as np
-
```
-We shorten the imported name to np for better readability of code using NumPy. This is a widely adopted convention that makes your code more readable for everyone working on it. We recommend to always use import numpy as np.
+Using `np` as an alias enhances code readability and is a widely adopted convention.
From 9f482ac8181b47e80c5469025ab067bab96ae54a Mon Sep 17 00:00:00 2001
From: Hema Sree
Date: Wed, 15 May 2024 17:58:33 +0530
Subject: [PATCH 009/405] intro numpy
---
contrib/numpy/Introduction.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/numpy/Introduction.md b/contrib/numpy/Introduction.md
index c437c48..c0f5f52 100644
--- a/contrib/numpy/Introduction.md
+++ b/contrib/numpy/Introduction.md
@@ -19,7 +19,7 @@ Ensure Python is installed in your system. If not you can install it from here([
pip install numpy
```
-# Importing NumPy
+## Importing NumPy
To access NumPy functions, import it with the alias `np`:
From 2189d3914cb4194df2ca02eb33a2f0d11cd07844 Mon Sep 17 00:00:00 2001
From: Ritesh <112797055+Antiquely3059@users.noreply.github.com>
Date: Wed, 15 May 2024 18:53:35 +0530
Subject: [PATCH 010/405] Create Rock Paper Scissors Game.md
---
.../mini-projects/Rock Paper Scissors Game.md | 48 +++++++++++++++++++
1 file changed, 48 insertions(+)
create mode 100644 contrib/mini-projects/Rock Paper Scissors Game.md
diff --git a/contrib/mini-projects/Rock Paper Scissors Game.md b/contrib/mini-projects/Rock Paper Scissors Game.md
new file mode 100644
index 0000000..ed815d5
--- /dev/null
+++ b/contrib/mini-projects/Rock Paper Scissors Game.md
@@ -0,0 +1,48 @@
+```python
+import tkinter as tk
+import random
+
+def determine_winner(user_choice, computer_choice):
+ """Determine the winner of the game."""
+ if user_choice == computer_choice:
+ return "It's a tie!", computer_choice
+ elif (user_choice == "rock" and computer_choice == "scissors") or \
+ (user_choice == "paper" and computer_choice == "rock") or \
+ (user_choice == "scissors" and computer_choice == "paper"):
+ return "You win!", computer_choice
+ else:
+ return "Computer wins!", computer_choice
+
+def play_game():
+ """Play the game and display the result."""
+ user_choice = user_var.get()
+ computer_choice = random.choice(["rock", "paper", "scissors"])
+ result, computer_pick = determine_winner(user_choice, computer_choice)
+ result_label.config(text=result)
+ computer_label.config(text=f"Computer picked: {computer_pick}")
+
+# Create main window
+root = tk.Tk()
+root.title("Rock Paper Scissors")
+
+# User choice options
+user_var = tk.StringVar()
+user_var.set("rock") # Default choice
+choices = ["rock", "paper", "scissors"]
+for choice in choices:
+ rb = tk.Radiobutton(root, text=choice, variable=user_var, value=choice)
+ rb.pack()
+
+# Play button
+play_button = tk.Button(root, text="Play", command=play_game)
+play_button.pack()
+
+# Result label
+result_label = tk.Label(root, text="", font=("Helvetica", 16))
+result_label.pack()
+
+# Computer pick label
+computer_label = tk.Label(root, text="", font=("Helvetica", 12))
+computer_label.pack()
+
+root.mainloop()
From 8f0c49efa87011c70be9d9c89889c2d9d63b8ec1 Mon Sep 17 00:00:00 2001
From: Ritesh <112797055+Antiquely3059@users.noreply.github.com>
Date: Wed, 15 May 2024 18:59:12 +0530
Subject: [PATCH 011/405] Update Rock Paper Scissors Game.md
---
contrib/mini-projects/Rock Paper Scissors Game.md | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/contrib/mini-projects/Rock Paper Scissors Game.md b/contrib/mini-projects/Rock Paper Scissors Game.md
index ed815d5..9cc17ee 100644
--- a/contrib/mini-projects/Rock Paper Scissors Game.md
+++ b/contrib/mini-projects/Rock Paper Scissors Game.md
@@ -1,3 +1,12 @@
+
+Here's how it looks:
+
+# Rock Paper Scissors Game
+
+This is a simple implementation of the classic rock-paper-scissors game in Python.
+
+## Code:
+
```python
import tkinter as tk
import random
From c79f13a28c7f21033c4c85d14a15fb675ee5bd84 Mon Sep 17 00:00:00 2001
From: Ritesh <112797055+Antiquely3059@users.noreply.github.com>
Date: Wed, 15 May 2024 19:02:05 +0530
Subject: [PATCH 012/405] Update Rock Paper Scissors Game.md
---
contrib/mini-projects/Rock Paper Scissors Game.md | 3 ---
1 file changed, 3 deletions(-)
diff --git a/contrib/mini-projects/Rock Paper Scissors Game.md b/contrib/mini-projects/Rock Paper Scissors Game.md
index 9cc17ee..b08a268 100644
--- a/contrib/mini-projects/Rock Paper Scissors Game.md
+++ b/contrib/mini-projects/Rock Paper Scissors Game.md
@@ -1,6 +1,3 @@
-
-Here's how it looks:
-
# Rock Paper Scissors Game
This is a simple implementation of the classic rock-paper-scissors game in Python.
From 25a319ff3cb82a26ddc8f0b272713bb68a8fea77 Mon Sep 17 00:00:00 2001
From: Ritesh <112797055+Antiquely3059@users.noreply.github.com>
Date: Wed, 15 May 2024 19:54:12 +0530
Subject: [PATCH 013/405] Update Rock Paper Scissors Game.md
---
.../mini-projects/Rock Paper Scissors Game.md | 36 +++++++++++++++++--
1 file changed, 33 insertions(+), 3 deletions(-)
diff --git a/contrib/mini-projects/Rock Paper Scissors Game.md b/contrib/mini-projects/Rock Paper Scissors Game.md
index b08a268..c1a5ecf 100644
--- a/contrib/mini-projects/Rock Paper Scissors Game.md
+++ b/contrib/mini-projects/Rock Paper Scissors Game.md
@@ -2,8 +2,19 @@
This is a simple implementation of the classic rock-paper-scissors game in Python.
-## Code:
+## Code Explanation:
+In this section, we import the required libraries (`tkinter` for GUI and `random` for generating computer choices) and define two functions:
+
+- `determine_winner(user_choice, computer_choice)`:
+ - This function determines the winner of the game based on the choices made by the user and the computer.
+ - It returns a tuple containing the result of the game and the computer's choice.
+
+- `play_game()`:
+ - This function handles the gameplay logic.
+ - It gets the user's choice from the radio buttons, generates a random choice for the computer, determines the winner using the `determine_winner()` function, and updates the result and computer pick labels accordingly.
+
+### Imports and Function Definitions:
```python
import tkinter as tk
import random
@@ -26,7 +37,9 @@ def play_game():
result, computer_pick = determine_winner(user_choice, computer_choice)
result_label.config(text=result)
computer_label.config(text=f"Computer picked: {computer_pick}")
-
+```
+### GUI Setup:
+```python
# Create main window
root = tk.Tk()
root.title("Rock Paper Scissors")
@@ -38,7 +51,14 @@ choices = ["rock", "paper", "scissors"]
for choice in choices:
rb = tk.Radiobutton(root, text=choice, variable=user_var, value=choice)
rb.pack()
-
+```
+- Here, we create the main window for the game using `tkinter.Tk()`. We set the title to "Rock Paper Scissors".
+- We define a StringVar to store the user's choice and set the default choice to "rock".
+- We create radio buttons for the user to choose from ("rock", "paper", "scissors") and pack them into the main window.
+```
+```
+### Play Button and Result Labels:
+```python
# Play button
play_button = tk.Button(root, text="Play", command=play_game)
play_button.pack()
@@ -50,5 +70,15 @@ result_label.pack()
# Computer pick label
computer_label = tk.Label(root, text="", font=("Helvetica", 12))
computer_label.pack()
+```
+- We create a "Play" button that triggers the play_game() function when clicked, using tkinter.Button.
+- We create two labels to display the result of the game (result_label) and the computer's choice (computer_label). Both labels initially display no text and are packed into the main window.
+```
+```
+### Mainloop:
+```python
root.mainloop()
+```
+- Finally, we start the Tkinter event loop using root.mainloop(), which keeps the GUI window open and responsive until the user closes it.
+-
From 1196e6ee89d05deb8186e815838c90ab1b49caec Mon Sep 17 00:00:00 2001
From: Ritesh <112797055+Antiquely3059@users.noreply.github.com>
Date: Wed, 15 May 2024 19:57:34 +0530
Subject: [PATCH 014/405] Update Rock Paper Scissors Game.md
---
contrib/mini-projects/Rock Paper Scissors Game.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/contrib/mini-projects/Rock Paper Scissors Game.md b/contrib/mini-projects/Rock Paper Scissors Game.md
index c1a5ecf..36326b0 100644
--- a/contrib/mini-projects/Rock Paper Scissors Game.md
+++ b/contrib/mini-projects/Rock Paper Scissors Game.md
@@ -53,7 +53,7 @@ for choice in choices:
rb.pack()
```
- Here, we create the main window for the game using `tkinter.Tk()`. We set the title to "Rock Paper Scissors".
-- We define a StringVar to store the user's choice and set the default choice to "rock".
+- We define a `StringVar` to store the user's choice and set the default choice to "rock".
- We create radio buttons for the user to choose from ("rock", "paper", "scissors") and pack them into the main window.
```
```
@@ -71,8 +71,8 @@ result_label.pack()
computer_label = tk.Label(root, text="", font=("Helvetica", 12))
computer_label.pack()
```
-- We create a "Play" button that triggers the play_game() function when clicked, using tkinter.Button.
-- We create two labels to display the result of the game (result_label) and the computer's choice (computer_label). Both labels initially display no text and are packed into the main window.
+- We create a "Play" button that triggers the `play_game()` function when clicked, using `tkinter.Button`.
+- We create two labels to display the result of the game (`result_label`) and the computer's choice (`computer_label`). Both labels initially display no text and are packed into the main window.
```
```
@@ -80,5 +80,5 @@ computer_label.pack()
```python
root.mainloop()
```
-- Finally, we start the Tkinter event loop using root.mainloop(), which keeps the GUI window open and responsive until the user closes it.
+- Finally, we start the Tkinter event loop using `root.mainloop()`, which keeps the GUI window open and responsive until the user closes it.
-
From 989278ebe3ac868d63f6f66b9461474fb2f8679e Mon Sep 17 00:00:00 2001
From: Hema Sree
Date: Thu, 16 May 2024 13:08:37 +0530
Subject: [PATCH 015/405] change file name
---
contrib/numpy/Introduction.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/numpy/Introduction.md b/contrib/numpy/Introduction.md
index c0f5f52..eb3af67 100644
--- a/contrib/numpy/Introduction.md
+++ b/contrib/numpy/Introduction.md
@@ -21,7 +21,7 @@ pip install numpy
## Importing NumPy
-To access NumPy functions, import it with the alias `np`:
+To access NumPy functions, import it with the alias `np`.
```python
import numpy as np
From 7ae451cc067a73adc6068b18ddb461cea84942c6 Mon Sep 17 00:00:00 2001
From: Hema Sree
Date: Thu, 16 May 2024 13:12:41 +0530
Subject: [PATCH 016/405] change file name
---
contrib/numpy/index.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/numpy/index.md b/contrib/numpy/index.md
index c6bf23c..5d3f63b 100644
--- a/contrib/numpy/index.md
+++ b/contrib/numpy/index.md
@@ -1,3 +1,3 @@
# List of sections
-- [Introduction](Introduction.md)
+- [Introduction](introduction.md)
From 9bb50dcf528efb9cd1dbbd8970e5a52130c86482 Mon Sep 17 00:00:00 2001
From: HEMA SREE VEMULAMADA <109607812+Hemav009@users.noreply.github.com>
Date: Thu, 16 May 2024 13:14:26 +0530
Subject: [PATCH 017/405] Rename Introduction.md to introduction.md
---
contrib/numpy/{Introduction.md => introduction.md} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename contrib/numpy/{Introduction.md => introduction.md} (100%)
diff --git a/contrib/numpy/Introduction.md b/contrib/numpy/introduction.md
similarity index 100%
rename from contrib/numpy/Introduction.md
rename to contrib/numpy/introduction.md
From bc4525a817f9f89d046cd9aafd1e496d147e0744 Mon Sep 17 00:00:00 2001
From: Niyonika Gaur <83643952+niyonikagaur@users.noreply.github.com>
Date: Thu, 16 May 2024 14:22:43 +0530
Subject: [PATCH 018/405] Create Intro_SciPy.md
---
Intro_SciPy.md | 136 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 136 insertions(+)
create mode 100644 Intro_SciPy.md
diff --git a/Intro_SciPy.md b/Intro_SciPy.md
new file mode 100644
index 0000000..afd8b3a
--- /dev/null
+++ b/Intro_SciPy.md
@@ -0,0 +1,136 @@
+# Introduction to SciPy
+#### Python has a powerful library known as SciPy that is used for scientific and technical computing. It functions by extending the capabilities of NumPy and providing numerous operations for numerical data. Although the same library, SciPy is divided into distinct sections meant for various scientific computations.
+## Installation of Scipy
+### Install using the command:
+#### C:\Users\Your Name>pip install scipy
+ You can also use a Python distribution that already has Scipy installed like Anaconda or Spyder.
+### Importing SciPy
+#### from scipy import constants
+## Key Features of SciPy
+### 1. Numerical Integration
+#### It helps in computing definite or indefinite integrals of functions
+```
+from scipy import integrate
+
+#Define the function to integrate
+def f(x):
+ return x**2
+
+#Compute definite integral of f from 0 to 1
+result, error = integrate.quad(f, 0, 1)
+print(result)
+```
+#### Output
+```
+0.33333333333333337
+```
+### 2. Optimization
+#### It can be used to minimize or maximize functions, here is an example of minimizing roots of an equation
+```
+from scipy.optimize import minimize
+
+# Define an objective function to minimize
+def objective(x):
+ return x**2 + 10*np.sin(x)
+
+# Minimize the objective function starting from x=0
+result = minimize(objective, x0=0)
+print(result.x)
+```
+#### Output
+```
+array([-1.30644012])
+```
+### 3. Linear Algebra
+#### Solving Linear computations
+```
+from scipy import linalg
+import numpy as np
+
+# Define a square matrix
+A = np.array([[1, 2], [3, 4]])
+
+# Define a vector
+b = np.array([5, 6])
+
+# Solve Ax = b for x
+x = linalg.solve(A, b)
+print(x)
+```
+#### Output
+```
+array([-4. , 4.5])
+```
+### 4. Statistics
+#### Performing statistics functions, like here we'll be distributing the data
+```
+from scipy import stats
+import numpy as np
+
+# Generate random data from a normal distribution
+data = stats.norm.rvs(loc=0, scale=1, size=1000)
+
+# Fit a normal distribution to the data
+mean, std = stats.norm.fit(data)
+```
+### 5. Signal Processing
+#### To process spectral signals, like EEG or MEG
+```
+from scipy import signal
+import numpy as np
+
+# Create a signal (e.g., sine wave)
+t = np.linspace(0, 1, 1000)
+signal = np.sin(2 * np.pi * 5 * t) + 0.5 * np.random.randn(1000)
+
+# Apply a low-pass Butterworth filter
+b, a = signal.butter(4, 0.1, 'low')
+filtered_signal = signal.filtfilt(b, a, signal)
+```
+The various filters applied that are applied here, are a part of signal analysis at a deeper level.
+### 6. Sparse Matrix
+#### The word ' sparse 'means less, i.e., the data is mostly unused during some operation or analysis. So, to handle this data, a Sparse Matrix is created
+#### There are two types of Sparse Matrices:
+##### 1. CSC: Compressed Sparse Column, it is used for efficient math functions and for column slicing
+##### 2. CSR: Compressed Sparse Row, it is used for fast row slicing
+#### In CSC format
+```
+from scipy import sparse
+import numpy as np
+
+data = np.array([[0, 0], [0, 1], [2, 0]])
+
+row_indices = np.array([1, 2, 1])
+col_indices = np.array([1, 0, 2])
+values = np.array([1, 2, 1])
+
+sparse_matrix_csc = sparse.csc_matrix((values, (row_indices, col_indices)))
+```
+#### In CSR format
+```
+from scipy import sparse
+import numpy as np
+
+data = np.array([[0, 0], [0, 1], [2, 0]])
+sparse_matrix = sparse.csr_matrix(data)
+```
+### 7. Image Processing
+#### It is used to process the images, like changing dimensions or properties. For example, when you're doing a project on medical imaging, this library is mainly used.
+```
+from scipy import ndimage
+import matplotlib.pyplot as plt
+
+image = plt.imread('path/to/image.jpg')
+plt.imshow(image)
+plt.show()
+
+# Apply Gaussian blur to the image
+blurred_image = ndimage.gaussian_filter(image, sigma=1)
+plt.imshow(blurred_image)
+plt.show()
+```
+#### The gaussian blur is one of the properties of the ' ndimage ' package in SciPy libraries, it used for better understanding of the image.
+
+
+
+
From 4c665090b7ebffd44593f90cf0cb3061ae25e390 Mon Sep 17 00:00:00 2001
From: Harish-2003 <76206815+Harish-2003@users.noreply.github.com>
Date: Thu, 16 May 2024 17:05:02 +0530
Subject: [PATCH 019/405] Create TIC_TAC_TOE_GAME.md
---
contrib/mini-projects/TIC_TAC_TOE_GAME.md | 91 +++++++++++++++++++++++
1 file changed, 91 insertions(+)
create mode 100644 contrib/mini-projects/TIC_TAC_TOE_GAME.md
diff --git a/contrib/mini-projects/TIC_TAC_TOE_GAME.md b/contrib/mini-projects/TIC_TAC_TOE_GAME.md
new file mode 100644
index 0000000..8589e64
--- /dev/null
+++ b/contrib/mini-projects/TIC_TAC_TOE_GAME.md
@@ -0,0 +1,91 @@
+# Python Code For The Tic Tac Toe Game
+# Tic Tac Toe Game
+
+## Overview
+
+### Objective
+- Get three of your symbols (X or O) in a row (horizontally, vertically, or diagonally) on a 3x3 grid.
+
+### Gameplay
+- Two players take turns.
+- Player 1 uses X, Player 2 uses O.
+- Players mark an empty square in each turn.
+
+### Winning
+- The first player to align three of their symbols wins.
+- If all squares are filled without any player aligning three symbols, the game is a draw.
+
+```python
+print("this game should be played by two people player1 takes x player2 takes o")
+board = [['1','2','3'],['4','5','6'],['7','8','9']]
+x = 'X'
+o = 'O'
+def displayBoard():
+ print(f" {board[0][0]} | {board[0][1]} | {board[0][2]}")
+ print("----------------------------------------")
+ print(f" {board[1][0]} | {board[1][1]} | {board[1][2]}")
+ print("----------------------------------------")
+ print(f" {board[2][0]} | {board[2][1]} | {board[2][2]}")
+ print("----------------------------------------")
+def updateBoard(character,position):
+ row = (position-1)//3
+ column = (position-1)%3
+ board[row][column] = character
+def check_win():
+ for i in range(3):
+ if board[i][0] == board[i][1] == board[i][2]:
+ return 1
+ elif board[0][i] == board[1][i] == board[2][i]:
+ return 1
+ if board[0][2] == board[1][1] == board[2][0]:
+ return 1
+ elif board[0][0] == board[1][1] == board[2][2]:
+ return 1
+ return 0
+def check_position(position):
+ row = (position-1)//3
+ column = (position-1)%3
+ if board[row][column] == x or board[row][column] == o:
+ return 0
+ return 1
+print("==============================welcome to tic tac toe game =====================")
+counter = 0
+while 1:
+ if counter % 2 == 0:
+ displayBoard()
+ while 1:
+ choice = int(input(f"player{(counter%2)+1},enter your position('{x}');"))
+ if choice < 1 or choice > 9:
+ print("invalid input oplease try againn")
+ if check_position(choice):
+ updateBoard(x,choice)
+ if check_win():
+ print(f"Congratulations !!!!!!!!!!!Player {(counter % 2)+1} won !!!!!!!!!!")
+ exit(0)
+ else :
+ counter += 1
+ break
+ else:
+ print(f"position{choice} is already occupied.Choose another position")
+ if counter == 9:
+ print("the match ended with draw better luck next time")
+ exit(0)
+ else:
+ displayBoard()
+ while 1:
+ choice = int(input(f"player{(counter%2)+1},enter your position('{o}'):"))
+ if choice < 1 or choice > 9:
+ print("invalid input please try again")
+ if check_position(choice):
+ updateBoard(o,choice)
+ if check_win():
+ print(f"congratulations !!!!!!!!!!!!!!! player{(counter%2)+1} won !!!!!!!!!!!!!1")
+ exit(0)
+ else:
+ counter += 1
+ break
+ else:
+ print(f"position {choice} is already occupied.choose another position")
+ print()
+```
+
From 12878fd655130f6b643b07c8b516a1265f7ef768 Mon Sep 17 00:00:00 2001
From: Harish-2003 <76206815+Harish-2003@users.noreply.github.com>
Date: Thu, 16 May 2024 17:13:10 +0530
Subject: [PATCH 020/405] Update index.md
---
contrib/mini-projects/index.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/mini-projects/index.md b/contrib/mini-projects/index.md
index 82596a2..187d030 100644
--- a/contrib/mini-projects/index.md
+++ b/contrib/mini-projects/index.md
@@ -1,3 +1,3 @@
# List of sections
-- [Section title](filename.md)
+- [TIC_TAC_TOE_GAME](TIC_TAC_TOE_GAME.md)
From 2ff1b14b5cb95f5280b709cff64dd399ce570de4 Mon Sep 17 00:00:00 2001
From: Ritesh <112797055+Antiquely3059@users.noreply.github.com>
Date: Fri, 17 May 2024 08:45:09 +0530
Subject: [PATCH 021/405] Update index.md
---
contrib/mini-projects/index.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/contrib/mini-projects/index.md b/contrib/mini-projects/index.md
index 82596a2..37ebc9b 100644
--- a/contrib/mini-projects/index.md
+++ b/contrib/mini-projects/index.md
@@ -1,3 +1,4 @@
# List of sections
-- [Section title](filename.md)
+- [Rock Paper Scissors Game](Rock Paper Scissors Game.md)
+
From 7af22b698cca0a7bbf993319894d8ca69e62bf89 Mon Sep 17 00:00:00 2001
From: Ritesh <112797055+Antiquely3059@users.noreply.github.com>
Date: Fri, 17 May 2024 08:45:55 +0530
Subject: [PATCH 022/405] Rename Rock Paper Scissors Game.md to
Rock_Paper_Scissors_Game.md
---
.../{Rock Paper Scissors Game.md => Rock_Paper_Scissors_Game.md} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename contrib/mini-projects/{Rock Paper Scissors Game.md => Rock_Paper_Scissors_Game.md} (100%)
diff --git a/contrib/mini-projects/Rock Paper Scissors Game.md b/contrib/mini-projects/Rock_Paper_Scissors_Game.md
similarity index 100%
rename from contrib/mini-projects/Rock Paper Scissors Game.md
rename to contrib/mini-projects/Rock_Paper_Scissors_Game.md
From f0d0b515a21467b985766163a027f3a1d6cf9899 Mon Sep 17 00:00:00 2001
From: Ritesh <112797055+Antiquely3059@users.noreply.github.com>
Date: Fri, 17 May 2024 08:46:20 +0530
Subject: [PATCH 023/405] Update index.md
---
contrib/mini-projects/index.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/mini-projects/index.md b/contrib/mini-projects/index.md
index 37ebc9b..7d0285a 100644
--- a/contrib/mini-projects/index.md
+++ b/contrib/mini-projects/index.md
@@ -1,4 +1,4 @@
# List of sections
-- [Rock Paper Scissors Game](Rock Paper Scissors Game.md)
+- [Rock Paper Scissors Game](Rock_Paper_Scissors_Game.md)
From 78cfa1f238e2d0a6c90c8bfc73d151a7d4cc3da4 Mon Sep 17 00:00:00 2001
From: iABn0rma1
Date: Fri, 17 May 2024 16:47:41 +0530
Subject: [PATCH 024/405] Understanding and Building the ANNs from Scratch
---
.../ArtificialNeuralNetwork.md | 172 ++++++++++++++++++
contrib/machine-learning/index.md | 1 +
2 files changed, 173 insertions(+)
create mode 100644 contrib/machine-learning/ArtificialNeuralNetwork.md
diff --git a/contrib/machine-learning/ArtificialNeuralNetwork.md b/contrib/machine-learning/ArtificialNeuralNetwork.md
new file mode 100644
index 0000000..0fafc6c
--- /dev/null
+++ b/contrib/machine-learning/ArtificialNeuralNetwork.md
@@ -0,0 +1,172 @@
+# Understanding the Neural Network
+
+## Table of Contents
+
+Click to expand
+
+- [Introduciton](#introduction)
+- [Neuron to Perceptron](#neuron-to-perceptron)
+- [Key concepts](#key-concepts)
+ - [Layers](#layers)
+ - [Weights and Biases](#weights-and-biases)
+ - [Activation Function](#activation-functions)
+ - [Forward and Backward Pass](#forward-and-backward-propagation)
+- [Implementation](#building-from-scratch)
+
+
+
+
+## Introduction
+
+This guide will walk you through a fundamental neural network implementation in Python. We'll build a `Neural Network` from scratch, allowing you to grasp the core concepts of how neural networks learn and make predictions.
+
+### Let's start by Understanding the Basic Architecture of Neural Nets
+
+## Neuron to Perceptron
+
+| `Neuron` cells forming the humand nervous system | `Perceptron` inspired from human brain |
+| :----------------------------------------------- | -------------------------------------: |
+| | |
+| Neurons are nerve cells that send messages all over your body to allow you to do everything from breathing to talking, eating, walking, and thinking. | The perceptron is a mathematical model of a biological neuron. Performing heavy computations to think like humans. |
+| Neuron collects signals from dendrites. | The first layer is knownn as Input Layer, acting like dendritres to receive the input signal. |
+| Synapses are the connections between neurons where signals are transmitted. | Weights represent synapses. |
+The axon terminal releases neurotransmitters to transmit the signal to other neurons. | The output is the final result – between 1 & 0, representing classification or prediction. |
+---
+> Human brain has a Network of Neurons, about 86 billion neurons and more than a 100 trillion synapses connections!
+
+
+## **Key Concepts**
+
+Artificial neurons are the fundamental processing units in an ANN. They receive inputs, multiply them by weights (representing the strength of connections), sum those weighted inputs, and then apply an activation function to produce an output.
+
+### Layers
+Neurons in ANNs are organized into layers:
+* **Input Layer:** Receives the raw data.
+* **(n) Hidden Layers:** (Optional) Intermediate layers where complex transformations occur. They learn to detect patterns and features in the data.
+* **Output Layer:** Produces the final result (prediction or classification).
+
+
+
+
+### Weights and Biases
+- For each input $(x_i)$, a weight $(w_i)$ is associated with it. Weights, multiplied with input units $(w_i \cdot x_i)$, determine the influence of one neuron's output on another.
+- A bias $(b_i)$ is added to help influence the end product, giving the equation as $(w_i \cdot x_i + b_i)$.
+- During training, the network adjusts these weights and biases to minimize errors and improve its predictions.
+
+
+
+
+
+### Activation Functions
+- An activation function is applied to the result to introduce non-linearity in the model, allowing ANNs to learn more complex relationships from the data.
+- The resulting equation: $y = f(g(x))$, determines whether the neuron will "fire" or not, i.e., if its output will be used as input for the next neuron.
+- Common activation functions include the sigmoid function, tanh (hyperbolic tangent), and ReLU (Rectified Linear Unit).
+
+
+
+
+
+### Forward and Backward Propagation
+- **Flow of Information:** All the above steps are part of Forward Propagation. It gives the output equation as $y = f\left(\sum_{i=1}^n w_i x_i + b_i\right)$
+- **Error Correction:** Backpropagation is the algorithm used to train ANNs by calculating the gradient of error at the output layer and then propagating this error backward through the network. This allows the network to adjust its weights and biases in the direction that reduces the error.
+- The chain rule of calculus is the foundational concept to compute the gradient of the error:
+ $
+ \delta_{ij}(E) = \frac{\partial E}{\partial w_{ij}} = \frac{\partial E}{\partial \hat{y}_j} \cdot \frac{\partial \hat{y}_j}{\partial \theta_j} \cdot \frac{\partial \theta_j}{\partial w_{ij}}
+ $
+ where $E$ is the error, $\hat{y}_j$ is the predicted output, $\theta_j$ is the input to the activation function of the $j^{th}$ neuron, and $w_{ij}$ is the weight from neuron $i$ to neuron $j$.
+
+
+
+
+
+
+## Building From Scratch
+
+```python
+# Import required libraries
+import numpy as np
+import matplotlib.pyplot as plt
+
+class SimpleNeuralNetwork:
+ def __init__(self, input_size, hidden_size, output_size):
+ self.input_size = input_size
+ self.hidden_size = hidden_size
+ self.output_size = output_size
+
+ # Initialize weights and biases
+ self.weights_input_hidden = np.random.randn(input_size, hidden_size)
+ self.bias_hidden = np.random.randn(hidden_size)
+ self.weights_hidden_output = np.random.randn(hidden_size, output_size)
+ self.bias_output = np.random.randn(output_size)
+
+ def sigmoid(self, x):
+ return 1 / (1 + np.exp(-x))
+
+ def sigmoid_derivative(self, x):
+ return x * (1 - x)
+
+ def forward(self, X):
+ self.hidden_layer_input = np.dot(X, self.weights_input_hidden) + self.bias_hidden
+ self.hidden_layer_output = self.sigmoid(self.hidden_layer_input)
+
+ self.output_layer_input = np.dot(self.hidden_layer_output, self.weights_hidden_output) + self.bias_output
+ self.output = self.sigmoid(self.output_layer_input)
+
+ return self.output
+
+ def backward(self, X, y, learning_rate):
+ output_error = y - self.output
+ output_delta = output_error * self.sigmoid_derivative(self.output)
+
+ hidden_error = output_delta.dot(self.weights_hidden_output.T)
+ hidden_delta = hidden_error * self.sigmoid_derivative(self.hidden_layer_output)
+
+ self.weights_hidden_output += self.hidden_layer_output.T.dot(output_delta) * learning_rate
+ self.bias_output += np.sum(output_delta, axis=0) * learning_rate
+ self.weights_input_hidden += X.T.dot(hidden_delta) * learning_rate
+ self.bias_hidden += np.sum(hidden_delta, axis=0) * learning_rate
+
+ def train(self, X, y, epochs, learning_rate):
+ self.losses = []
+ for epoch in range(epochs):
+ self.forward(X)
+ self.backward(X, y, learning_rate)
+ loss = np.mean(np.square(y - self.output))
+ self.losses.append(loss)
+ if epoch % 1000 == 0:
+ print(f"Epoch {epoch}, Loss: {loss}")
+
+ def plot_loss(self):
+ plt.plot(self.losses)
+ plt.xlabel('Epochs')
+ plt.ylabel('Loss')
+ plt.title('Training Loss Over Epochs')
+ plt.show()
+```
+
+### Creating the Input & Output Array
+Let's create a dummy input and outpu dataset. Here, the first two columns will be useful, while the rest might be noise.
+```python
+X = np.array([[0,0], [0,1], [1,0], [1,1]])
+y = np.array([[0], [1], [1], [1]])
+```
+
+### Defining the Neural Network
+With our input and output data ready, we'll define a simple neural network with one hidden layer containing three neurons.
+```python
+# neural network architecture
+input_size = 2
+hidden_layers = 1
+hidden_neurons = [2]
+output_size = 1
+```
+
+### Visualizing the Training Loss
+To understand how well our model is learning, let's visualize the training loss over epochs.
+```python
+model = NeuralNetwork(input_size, hidden_layers, hidden_neurons, output_size)
+model.train(X, y, 100)
+```
+
+
+
diff --git a/contrib/machine-learning/index.md b/contrib/machine-learning/index.md
index 82596a2..c6f4df2 100644
--- a/contrib/machine-learning/index.md
+++ b/contrib/machine-learning/index.md
@@ -1,3 +1,4 @@
# List of sections
- [Section title](filename.md)
+- [Artificial Neural Network from the Ground Up](ArtificialNeuralNetwork.md)
From 04caabe01b99ba9337e158c9c1018335eed35bcc Mon Sep 17 00:00:00 2001
From: HimakarC <116370824+HimakarC@users.noreply.github.com>
Date: Fri, 17 May 2024 17:06:47 +0530
Subject: [PATCH 025/405] Update index.md
---
contrib/pandas/index.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/contrib/pandas/index.md b/contrib/pandas/index.md
index 5c0f2b4..aadd970 100644
--- a/contrib/pandas/index.md
+++ b/contrib/pandas/index.md
@@ -1,3 +1,4 @@
# List of sections
- [Pandas Series Vs NumPy ndarray](pandas_series_vs_numpy_ndarray.md)
+- [Excel Operations using Pandas DataFrame](excel_with_pandas.md)
From 4ffc87b269773a98dfc5824abb32117684b85211 Mon Sep 17 00:00:00 2001
From: HimakarC <116370824+HimakarC@users.noreply.github.com>
Date: Fri, 17 May 2024 17:07:17 +0530
Subject: [PATCH 026/405] Create excel_with_pandas.md
---
contrib/pandas/excel_with_pandas.md | 1 +
1 file changed, 1 insertion(+)
create mode 100644 contrib/pandas/excel_with_pandas.md
diff --git a/contrib/pandas/excel_with_pandas.md b/contrib/pandas/excel_with_pandas.md
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/contrib/pandas/excel_with_pandas.md
@@ -0,0 +1 @@
+
From 56170159e1ca6e88cfcee929e3316c7dac4432da Mon Sep 17 00:00:00 2001
From: unknown
Date: Fri, 17 May 2024 18:09:43 +0530
Subject: [PATCH 027/405] written
---
contrib/pandas/excel_with_pandas.md | 50 +++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
diff --git a/contrib/pandas/excel_with_pandas.md b/contrib/pandas/excel_with_pandas.md
index 8b13789..6902c3f 100644
--- a/contrib/pandas/excel_with_pandas.md
+++ b/contrib/pandas/excel_with_pandas.md
@@ -1 +1,51 @@
+# Pandas DataFrame
+
+The Pandas DataFrame is a two-dimensional, size-mutable, and possibly heterogeneous tabular data format with labelled axes. A data frame is a two-dimensional data structure in which the data can be organised in rows and columns. Pandas DataFrames are comprised of three main components: data, rows, and columns.
+
+In the real world, Pandas DataFrames are formed by importing datasets from existing storage, which can be a Excel file, a SQL database or CSV file. Pandas DataFrames may be constructed from lists, dictionaries, or lists of dictionaries, etc.
+
+
+### Installation of libraries
+
+`pip install pandas
+ pip install xlrd`
+
+
+Example for reading data from an Excel File:
+
+```python
+import pandas as pd
+
+l = pd.read_excel('example.xlsx')
+d = pd.DataFrame(l)
+print(d)
+```
+Output:
+'''python
+ Name Age
+0 John 12
+'''
+
+- **Note:** The above program can also be used for loading/retrieving the data.
+
+
+Example for Inserting Data into Excel File:
+
+```python
+import pandas as pd
+
+l = pd.read_excel('file_name.xlsx')
+d = {'Name': ['Bob', 'John'], 'Age': [12, 28]}
+d = pd.DataFrame(d)
+L = pd.concat([l, d], ignore_index = True)
+L.to_excel('file_name.xlsx', index = False)
+print(L)
+```
+
+Output:
+'''python
+ Name Age
+0 Bob 12
+1 John 28
+'''
From 9eb63b951d03e283aa76ee0d9ce980dc4ea509ee Mon Sep 17 00:00:00 2001
From: unknown
Date: Fri, 17 May 2024 18:11:53 +0530
Subject: [PATCH 028/405] updated
---
contrib/pandas/excel_with_pandas.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/contrib/pandas/excel_with_pandas.md b/contrib/pandas/excel_with_pandas.md
index 6902c3f..4e67964 100644
--- a/contrib/pandas/excel_with_pandas.md
+++ b/contrib/pandas/excel_with_pandas.md
@@ -21,10 +21,10 @@ d = pd.DataFrame(l)
print(d)
```
Output:
-'''python
+```python
Name Age
0 John 12
-'''
+```
- **Note:** The above program can also be used for loading/retrieving the data.
@@ -43,9 +43,9 @@ print(L)
```
Output:
-'''python
+```python
Name Age
0 Bob 12
1 John 28
-'''
+```
From 0b6bd74a3b7daae3b28f8fc66576d23baee4bbc0 Mon Sep 17 00:00:00 2001
From: unknown
Date: Fri, 17 May 2024 18:12:42 +0530
Subject: [PATCH 029/405] updated
---
contrib/pandas/excel_with_pandas.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/pandas/excel_with_pandas.md b/contrib/pandas/excel_with_pandas.md
index 4e67964..b09b8c3 100644
--- a/contrib/pandas/excel_with_pandas.md
+++ b/contrib/pandas/excel_with_pandas.md
@@ -7,7 +7,7 @@ In the real world, Pandas DataFrames are formed by importing datasets from exis
### Installation of libraries
-`pip install pandas
+`pip install pandas
pip install xlrd`
From f8044fb421f609c0ae67e65eefb4feabac914568 Mon Sep 17 00:00:00 2001
From: unknown
Date: Fri, 17 May 2024 18:13:28 +0530
Subject: [PATCH 030/405] updated
---
contrib/pandas/excel_with_pandas.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/pandas/excel_with_pandas.md b/contrib/pandas/excel_with_pandas.md
index b09b8c3..af87b7b 100644
--- a/contrib/pandas/excel_with_pandas.md
+++ b/contrib/pandas/excel_with_pandas.md
@@ -7,8 +7,8 @@ In the real world, Pandas DataFrames are formed by importing datasets from exis
### Installation of libraries
-`pip install pandas
- pip install xlrd`
+`pip install pandas`
+`pip install xlrd`
Example for reading data from an Excel File:
From 9fe61b8ec04b71037dff7506dd6169f259111bfa Mon Sep 17 00:00:00 2001
From: HimakarC <116370824+HimakarC@users.noreply.github.com>
Date: Fri, 17 May 2024 18:15:20 +0530
Subject: [PATCH 031/405] Update excel_with_pandas.md
---
contrib/pandas/excel_with_pandas.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/pandas/excel_with_pandas.md b/contrib/pandas/excel_with_pandas.md
index af87b7b..137ef45 100644
--- a/contrib/pandas/excel_with_pandas.md
+++ b/contrib/pandas/excel_with_pandas.md
@@ -7,7 +7,7 @@ In the real world, Pandas DataFrames are formed by importing datasets from exis
### Installation of libraries
-`pip install pandas`
+`pip install pandas`
`pip install xlrd`
From e4e9ad812fe87d70862390074deba405c2f9fe13 Mon Sep 17 00:00:00 2001
From: HimakarC <116370824+HimakarC@users.noreply.github.com>
Date: Fri, 17 May 2024 18:16:41 +0530
Subject: [PATCH 032/405] excel_with_pandas.md
---
contrib/pandas/excel_with_pandas.md | 2 --
1 file changed, 2 deletions(-)
diff --git a/contrib/pandas/excel_with_pandas.md b/contrib/pandas/excel_with_pandas.md
index 137ef45..13218d6 100644
--- a/contrib/pandas/excel_with_pandas.md
+++ b/contrib/pandas/excel_with_pandas.md
@@ -26,8 +26,6 @@ Output:
0 John 12
```
-- **Note:** The above program can also be used for loading/retrieving the data.
-
Example for Inserting Data into Excel File:
From e830336a54f5f6bce6e597df9900ee35b7a71709 Mon Sep 17 00:00:00 2001
From: HimakarC <116370824+HimakarC@users.noreply.github.com>
Date: Fri, 17 May 2024 18:25:40 +0530
Subject: [PATCH 033/405] Create excel_with_pandas.md
---
contrib/pandas/excel_with_pandas.md | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/contrib/pandas/excel_with_pandas.md b/contrib/pandas/excel_with_pandas.md
index 13218d6..5798444 100644
--- a/contrib/pandas/excel_with_pandas.md
+++ b/contrib/pandas/excel_with_pandas.md
@@ -5,11 +5,20 @@ The Pandas DataFrame is a two-dimensional, size-mutable, and possibly heterogene
In the real world, Pandas DataFrames are formed by importing datasets from existing storage, which can be a Excel file, a SQL database or CSV file. Pandas DataFrames may be constructed from lists, dictionaries, or lists of dictionaries, etc.
+Features of Pandas `DataFrame`:
+
+- **Size mutable**: DataFrames are mutable in size, meaning that new rows and columns can be added or removed as needed.
+- **Labeled axes**: DataFrames have labeled axes, which makes it easy to keep track of the data.
+- **Arithmetic operations**: DataFrames support arithmetic operations on rows and columns.
+- **High performance**: DataFrames are highly performant, making them ideal for working with large datasets.
+
+
### Installation of libraries
`pip install pandas`
`pip install xlrd`
+- **Note**: The `xlrd` library is used for Excel operations.
Example for reading data from an Excel File:
From 7fb2baf809f2cd40c0ccdd406fd75f8cb3e29d1b Mon Sep 17 00:00:00 2001
From: HimakarC <116370824+HimakarC@users.noreply.github.com>
Date: Fri, 17 May 2024 18:31:22 +0530
Subject: [PATCH 034/405] Update excel_with_pandas.md
---
contrib/pandas/excel_with_pandas.md | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/contrib/pandas/excel_with_pandas.md b/contrib/pandas/excel_with_pandas.md
index 5798444..d325e46 100644
--- a/contrib/pandas/excel_with_pandas.md
+++ b/contrib/pandas/excel_with_pandas.md
@@ -56,3 +56,8 @@ Output:
1 John 28
```
+### Usage of Pandas DataFrame:
+
+- Can be used to store and analyze financial data, such as stock prices, trading data, and economic data.
+- Can be used to store and analyze sensor data, such as data from temperature sensors, motion sensors, and GPS sensors.
+- Can be used to store and analyze log data, such as web server logs, application logs, and system logs
From fc55d32e87621268fa32e16f0c9bec55464f7ead Mon Sep 17 00:00:00 2001
From: Vrisha Shah <74671946+Vrisha213@users.noreply.github.com>
Date: Fri, 17 May 2024 18:44:42 +0530
Subject: [PATCH 035/405] Create confusion-matrix.md
Added content on Confusion Matrix with code example and heatmap visualization.
---
contrib/machine-learning/confusion-matrix.md | 61 ++++++++++++++++++++
1 file changed, 61 insertions(+)
create mode 100644 contrib/machine-learning/confusion-matrix.md
diff --git a/contrib/machine-learning/confusion-matrix.md b/contrib/machine-learning/confusion-matrix.md
new file mode 100644
index 0000000..959df9a
--- /dev/null
+++ b/contrib/machine-learning/confusion-matrix.md
@@ -0,0 +1,61 @@
+Confusion Matrix - A confusion matrix is a fundamental performance evaluation tool used in machine learning to assess the accuracy of a classification model. It is an N x N matrix, where N represents the number of target classes.
+
+For binary classification, it results in a 2 x 2 matrix that outlines four key parameters:
+1. True Positive (TP) - The predicted value matches the actual value, or the predicted class matches the actual class.
+For example - the actual value was positive, and the model predicted a positive value.
+2. True Negative (TN) - The predicted value matches the actual value, or the predicted class matches the actual class.
+For example - the actual value was negative, and the model predicted a negative value.
+3. False Positive (FP)/Type I Error - The predicted value was falsely predicted.
+For example - the actual value was negative, but the model predicted a positive value.
+4. False Negative (FN)/Type II Error - The predicted value was falsely predicted.
+For example - the actual value was positive, but the model predicted a negative value.
+
+The confusion matrix enables the calculation of various metrics like accuracy, precision, recall, F1-Score and specificity.
+1. Accuracy - It represents the proportion of correctly classified instances out of the total number of instances in the dataset.
+2. Precision - It quantifies the accuracy of positive predictions made by the model.
+3. Recall - It quantifies the ability of a model to correctly identify all positive instances in the dataset and is also known as sensitivity or true positive rate.
+4. F1-Score - It is a single measure that combines precision and recall, offering a balanced evaluation of a classification model's effectiveness.
+
+To implement the confusion matrix in Python, we can use the confusion_matrix() function from the sklearn.metrics module of the scikit-learn library.
+The function returns a 2D array that represents the confusion matrix.
+We can also visualize the confusion matrix using a heatmap.
+
+# Import necessary libraries
+import numpy as np
+from sklearn.metrics import confusion_matrix,classification_report
+import seaborn as sns
+import matplotlib.pyplot as plt
+
+# Create the NumPy array for actual and predicted labels
+actual = np.array(['Apple', 'Apple', 'Apple', 'Not Apple', 'Apple', 'Not Apple', 'Apple', 'Apple', 'Not Apple', 'Not Apple'])
+predicted = np.array(['Apple', 'Not Apple', 'Apple', 'Not Apple', 'Apple', 'Apple', 'Apple', 'Apple', 'Not Apple', 'Not Apple'])
+
+# Compute the confusion matrix
+cm = confusion_matrix(actual,predicted)
+
+# Plot the confusion matrix with the help of the seaborn heatmap
+sns.heatmap(cm,
+ annot=True,
+ fmt='g',
+ xticklabels=['Apple', 'Not Apple'],
+ yticklabels=['Apple', 'Not Apple'])
+plt.xlabel('Prediction', fontsize=13)
+plt.ylabel('Actual', fontsize=13)
+plt.title('Confusion Matrix', fontsize=17)
+plt.show()
+
+# Classifications Report based on Confusion Metrics
+print(classification_report(actual, predicted))
+
+# Results
+1. Confusion Matrix:
+[[5 1]
+[1 3]]
+2. Classification Report:
+ precision recall f1-score support
+Apple 0.83 0.83 0.83 6
+Not Apple 0.75 0.75 0.75 4
+
+accuracy 0.80 10
+macro avg 0.79 0.79 0.79 10
+weighted avg 0.80 0.80 0.80 10
From 1e543beeab7c458c3a22060e3c68c73b282fa874 Mon Sep 17 00:00:00 2001
From: Vrisha Shah <74671946+Vrisha213@users.noreply.github.com>
Date: Fri, 17 May 2024 18:46:04 +0530
Subject: [PATCH 036/405] Update confusion-matrix.md
---
contrib/machine-learning/confusion-matrix.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/machine-learning/confusion-matrix.md b/contrib/machine-learning/confusion-matrix.md
index 959df9a..ac5cd31 100644
--- a/contrib/machine-learning/confusion-matrix.md
+++ b/contrib/machine-learning/confusion-matrix.md
@@ -1,6 +1,6 @@
Confusion Matrix - A confusion matrix is a fundamental performance evaluation tool used in machine learning to assess the accuracy of a classification model. It is an N x N matrix, where N represents the number of target classes.
-For binary classification, it results in a 2 x 2 matrix that outlines four key parameters:
+For binary classification, it results in a 2 x 2 matrix that outlines four key parameters:
1. True Positive (TP) - The predicted value matches the actual value, or the predicted class matches the actual class.
For example - the actual value was positive, and the model predicted a positive value.
2. True Negative (TN) - The predicted value matches the actual value, or the predicted class matches the actual class.
From 08c59bff565efbfff5fa8553e50ec5190046f37d Mon Sep 17 00:00:00 2001
From: Vrisha Shah <74671946+Vrisha213@users.noreply.github.com>
Date: Fri, 17 May 2024 18:58:33 +0530
Subject: [PATCH 037/405] Update index.md
Added link to new content on Confusion Matrix. This includes the title "Confusion Matrix" and the corresponding markdown file link "confusion-matrix.md".
---
contrib/machine-learning/index.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/machine-learning/index.md b/contrib/machine-learning/index.md
index 82596a2..2f27fd5 100644
--- a/contrib/machine-learning/index.md
+++ b/contrib/machine-learning/index.md
@@ -1,3 +1,3 @@
# List of sections
-- [Section title](filename.md)
+- [Confusion Matrix](confusion-matrix.md)
From 37280da9d5fdb1ee4b9ac17f89b7c46229fc9cf4 Mon Sep 17 00:00:00 2001
From: Stuti_07 <110724092+StutiRajput07@users.noreply.github.com>
Date: Fri, 17 May 2024 19:05:26 +0530
Subject: [PATCH 038/405] Create path-finder.md
---
contrib/mini-projects/path-finder.md | 1 +
1 file changed, 1 insertion(+)
create mode 100644 contrib/mini-projects/path-finder.md
diff --git a/contrib/mini-projects/path-finder.md b/contrib/mini-projects/path-finder.md
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/contrib/mini-projects/path-finder.md
@@ -0,0 +1 @@
+
From bb1e0e389b9261e8b04087973829f290ef05a44a Mon Sep 17 00:00:00 2001
From: Stuti_07 <110724092+StutiRajput07@users.noreply.github.com>
Date: Fri, 17 May 2024 19:20:11 +0530
Subject: [PATCH 039/405] Update path-finder.md
---
contrib/mini-projects/path-finder.md | 119 +++++++++++++++++++++++++++
1 file changed, 119 insertions(+)
diff --git a/contrib/mini-projects/path-finder.md b/contrib/mini-projects/path-finder.md
index 8b13789..98e9b87 100644
--- a/contrib/mini-projects/path-finder.md
+++ b/contrib/mini-projects/path-finder.md
@@ -1 +1,120 @@
+# Path Finder
+This Python script uses the curses library to visualize the process of finding a path through a maze in real-time within a terminal window. The program represents the maze as a list of lists, where each list represents a row in the maze, and each string element in the lists represents a cell in the maze. The maze includes walls (#), a start point (O), and an end point (X), with empty spaces ( ) that can be traversed.
+## The script includes the following main components:
+- Visualization Functions:
+ print_maze(maze, stdscr, path=[]): This function is used to display the maze in the terminal. It utilizes color pairs to distinguish between the maze walls, the path, and unexplored spaces. The current path being explored is displayed with a different color to make it stand out.
+
+- Utility Functions:
+ find_start(maze, start): This function searches the maze for the starting point (marked as O) and returns its position as a tuple (row, col).
+ find_neighbors(maze, row, col): This function identifies the valid adjacent cells (up, down, left, right) that can be moved to from the current position,
+ ignoring any walls or out-of-bound positions.
+
+- Pathfinding Logic:
+ find_path(maze, stdscr): This function implements a Breadth-First Search (BFS) algorithm to find a path from the start point to the end point (X). It uses a
+ queue to explore each possible path sequentially. As it explores the maze, it updates the display in real-time, allowing the viewer to follow the progress
+ visually. Each visited position is marked and not revisited, ensuring the algorithm efficiently covers all possible paths without repetition.
+
+Overall, the script demonstrates an effective use of the curses library to create a dynamic visual representation of the BFS algorithm solving a maze, providing both an educational tool for understanding pathfinding and an example of real-time data visualization in a terminal.
+
+#### Below is the code of the path finder
+
+
+```python
+import curses
+from curses import wrapper
+import queue
+import time
+
+# Define the structure of the maze as a list of lists where each inner list represents a row.
+maze = [
+ ["#", "O", "#", "#", "#", "#", "#", "#", "#"],
+ ["#", " ", " ", " ", " ", " ", " ", " ", "#"],
+ ["#", " ", "#", "#", " ", "#", "#", " ", "#"],
+ ["#", " ", "#", " ", " ", " ", "#", " ", "#"],
+ ["#", " ", "#", " ", "#", " ", "#", " ", "#"],
+ ["#", " ", "#", " ", "#", " ", "#", " ", "#"],
+ ["#", " ", "#", " ", "#", " ", "#", "#", "#"],
+ ["#", " ", " ", " ", " ", " ", " ", " ", "#"],
+ ["#", "#", "#", "#", "#", "#", "#", "X", "#"]
+]
+
+# Function to print the current state of the maze in the terminal.
+def print_maze(maze, stdscr, path=[]):
+ BLUE = curses.color_pair(1) # Color pair for walls and free paths
+ RED = curses.color_pair(2) # Color pair for the current path
+
+ for i, row in enumerate(maze):
+ for j, value in enumerate(row):
+ if (i, j) in path:
+ stdscr.addstr(i, j*2, "X", RED) # Print path character with red color
+ else:
+ stdscr.addstr(i, j*2, value, BLUE) # Print walls and free paths with blue color
+
+# Function to locate the starting point (marked 'O') in the maze.
+def find_start(maze, start):
+ for i, row in enumerate(maze):
+ for j, value in enumerate(row):
+ if value == start:
+ return i, j
+ return None
+
+# Function to find a path from start ('O') to end ('X') using BFS.
+def find_path(maze, stdscr):
+ start = "O"
+ end = "X"
+ start_pos = find_start(maze, start) # Get the start position
+
+ q = queue.Queue()
+ q.put((start_pos, [start_pos])) # Initialize the queue with the start position
+
+ visited = set() # Set to keep track of visited positions
+
+ while not q.empty():
+ current_pos, path = q.get() # Get the current position and path
+ row, col = current_pos
+
+ stdscr.clear() # Clear the screen
+ print_maze(maze, stdscr, path) # Print the current state of the maze
+ time.sleep(0.2) # Delay for visibility
+ stdscr.refresh() # Refresh the screen
+
+ if maze[row][col] == end: # Check if the current position is the end
+ return path # Return the path if end is reached
+
+ # Get neighbors (up, down, left, right) that are not walls
+ neighbors = find_neighbors(maze, row, col)
+ for neighbor in neighbors:
+ if neighbor not in visited:
+ r, c = neighbor
+ if maze[r][c] != "#":
+ new_path = path + [neighbor]
+ q.put((neighbor, new_path))
+ visited.add(neighbor)
+
+# Function to find the valid neighboring cells (not walls or out of bounds).
+def find_neighbors(maze, row, col):
+ neighbors = []
+ if row > 0: # UP
+ neighbors.append((row - 1, col))
+ if row + 1 < len(maze): # DOWN
+ neighbors.append((row + 1, col))
+ if col > 0: # LEFT
+ neighbors.append((row, col - 1))
+ if col + 1 < len(maze[0]): # RIGHT
+ neighbors.append((row, col + 1))
+ return neighbors
+
+# Main function to setup curses and run the pathfinding algorithm.
+def main(stdscr):
+ curses.init_pair(1, curses.COLOR_BLUE, curses.COLOR_BLACK) # Initialize color pair for blue
+ curses.init_pair(2, curses.COLOR_RED, curses.COLOR_BLACK) # Initialize color pair for red
+
+ find_path(maze, stdscr) # Find the path using BFS
+ stdscr.getch() # Wait for a key press before exiting
+
+wrapper(main) # Use the wrapper to initialize and finalize curses automatically.
+
+```
+
+
From c339a064e55185b92f88dd6ec9c71d11b3755167 Mon Sep 17 00:00:00 2001
From: Stuti_07 <110724092+StutiRajput07@users.noreply.github.com>
Date: Fri, 17 May 2024 19:21:04 +0530
Subject: [PATCH 040/405] Update index.md
---
contrib/mini-projects/index.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/mini-projects/index.md b/contrib/mini-projects/index.md
index 82596a2..d99a43e 100644
--- a/contrib/mini-projects/index.md
+++ b/contrib/mini-projects/index.md
@@ -1,3 +1,3 @@
# List of sections
-- [Section title](filename.md)
+- [Path Finder](path-finder.md)
From 0ad50df483d3179134a5e3551a661f6473a3500b Mon Sep 17 00:00:00 2001
From: HimakarC <116370824+HimakarC@users.noreply.github.com>
Date: Fri, 17 May 2024 19:28:54 +0530
Subject: [PATCH 041/405] Update index.md
---
contrib/pandas/index.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/pandas/index.md b/contrib/pandas/index.md
index aadd970..834d1f4 100644
--- a/contrib/pandas/index.md
+++ b/contrib/pandas/index.md
@@ -1,4 +1,4 @@
# List of sections
- [Pandas Series Vs NumPy ndarray](pandas_series_vs_numpy_ndarray.md)
-- [Excel Operations using Pandas DataFrame](excel_with_pandas.md)
+- [Excel using Pandas DataFrame](excel_with_pandas.md)
From a758ff832d439bb225dc7f292974204e8f500643 Mon Sep 17 00:00:00 2001
From: Yogesh Vishwakarma <103316955+Yogeshkarma@users.noreply.github.com>
Date: Fri, 17 May 2024 19:43:23 +0530
Subject: [PATCH 042/405] Create Regression.md
---
contrib/machine-learning/Regression.md | 171 +++++++++++++++++++++++++
1 file changed, 171 insertions(+)
create mode 100644 contrib/machine-learning/Regression.md
diff --git a/contrib/machine-learning/Regression.md b/contrib/machine-learning/Regression.md
new file mode 100644
index 0000000..6ff6d28
--- /dev/null
+++ b/contrib/machine-learning/Regression.md
@@ -0,0 +1,171 @@
+# Regression
+
+
+* Regression is a supervised machine learning technique which is used to predict continuous values.
+
+
+> Now, Supervised learning is a category of machine learning that uses labeled datasets to train algorithms to predict outcomes and recognize patterns.
+
+* Regression is a statistical method used to model the relationship between a dependent variable (often denoted as 'y') and one or more independent variables (often denoted as 'x'). The goal of regression analysis is to understand how the dependent variable changes as the independent variables change.
+ # Types Of Regression
+
+1. Linear Regression
+2. Polynomial Regression
+3. Stepwise Regression
+4. Decision Tree Regression
+5. Random Forest Regression
+6. Ridge Regression
+7. Lasso Regression
+8. ElasticNet Regression
+9. Bayesian Linear Regression
+10. Support Vector Regression
+
+But, we'll first start with Linear Regression
+# Linear Regression
+
+* Linear regression is a fundamental statistical method used to model the relationship between a dependent variable (often denoted as
+𝑌) and one or more independent variables (often denoted as
+𝑋). The relationship is assumed to be linear, meaning that changes in the independent variables are associated with changes in the dependent variable in a straight-line fashion.
+
+The basic form of linear regression for a single independent variable is:
+
+**𝑌=𝛽0+𝛽1𝑋+𝜖**
+
+Where:
+
+* Y is the dependent variable.
+* X is the independent variable.
+* 𝛽0 is the intercept, representing the value of Y when X is zero
+* 𝛽1 is the slope coefficient, representing the change in Y for a one-unit change in X
+* ϵ is the error term, representing the variability in Y that is not explained by the linear relationship with X.
+
+# Basic Code of Linear Regression
+
+* This line imports the numpy library, which is widely used for numerical operations in Python. We use np as an alias for numpy, making it easier to reference functions and objects from the library.
+```
+import numpy as np
+```
+
+* This line imports the LinearRegression class from the linear_model module of the scikit-learn library.scikit-learn is a powerful library for machine learning tasks in Python, and LinearRegression is a class provided by it for linear regression.
+```
+from sklearn.linear_model import LinearRegression
+```
+* This line creates a NumPy array X containing the independent variable values. In this example, we have a simple one-dimensional array representing the independent variable. The reshape(-1, 1) method reshapes the array into a column vector, necessary for use with scikit-learn
+
+```
+X = np.array([1, 2, 3, 4, 5]).reshape(-1, 1)
+```
+* This line creates a NumPy array Y containing the corresponding dependent variable values. These are the observed values of the dependent variable corresponding to the independent variable values in X.
+```
+Y = np.array([2, 4, 5, 8, 5])
+```
+
+* This line creates an instance of the LinearRegression class, which represents the linear regression model. We'll use this object to train the model and make predictions.
+```
+model = LinearRegression()
+```
+
+* This line fits the linear regression model to the data. The fit() method takes two arguments: the independent variable (X) and the dependent variable (Y). This method estimates the coefficients of the linear regression equation that best fit the given data.
+```
+model.fit(X, Y)
+```
+* These lines print out the intercept (beta_0) and coefficient (beta_1) of the linear regression model. model.intercept_ gives the intercept value, and model.coef_ gives an array of coefficients, where model.coef_[0] corresponds to the coefficient of the first independent variable (in this case, there's only one).
+```
+print("Intercept:", model.intercept_)
+print("Coefficient:", model.coef_[0])
+```
+
+* These lines demonstrate how to use the trained model to make predictions for new data.
+* We create a new NumPy array new_data containing the values of the independent variable for which we want to predict the dependent variable values.
+* We then use the predict() method of the model to obtain the predictions for these new data points. Finally, we print out the predicted values.
+```
+new_data = np.array([[6], [7]])
+predictions = model.predict(new_data)
+print("Predictions:", predictions)
+```
+# Assumptions of Linear Regression
+
+# Linearity:
+
+* To assess the linearity assumption, we can visually inspect a scatter plot of the observed values versus the predicted values.
+* If the relationship between them appears linear, it suggests that the linearity assumption is reasonable.
+```
+import matplotlib.pyplot as plt
+predictions = model.predict(X)
+plt.scatter(predictions,Y)
+plt.xlabel("Predicted Values")
+plt.ylabel("Observed Values")
+plt.title("Linearity Check: Observed vs Predicted")
+plt.show()
+```
+# Homoscedasticity:
+* Homoscedasticity refers to the constant variance of the residuals across all levels of the independent variable(s). We can visually inspect a plot of residuals versus predicted values to check for homoscedasticity.
+```
+residuals = Y - predictions
+plt.scatter(predictions, residuals)
+plt.xlabel("Predicted Values")
+plt.ylabel("Residuals")
+plt.title("Homoscedasticity Check: Residuals vs Predicted Values")
+plt.axhline(y=0, color='red', linestyle='--') # Add horizontal line at y=0
+plt.show()
+
+```
+# Normality of Residuals:
+* To assess the normality of residuals, we can visually inspect a histogram or a Q-Q plot of the residuals.
+```
+import seaborn as sns
+
+sns.histplot(residuals, kde=True)
+plt.xlabel("Residuals")
+plt.ylabel("Frequency")
+plt.title("Normality of Residuals: Histogram")
+plt.show()
+
+import scipy.stats as stats
+
+stats.probplot(residuals, dist="norm", plot=plt)
+plt.title("Normal Q-Q Plot")
+plt.show()
+
+```
+# Metrics for Regression
+
+
+# Mean Absolute Error (MAE)
+
+* MAE measures the average magnitude of the errors in a set of predictions, without considering their direction. It is the average of the absolute differences between predicted and actual values.
+```
+from sklearn.metrics import mean_absolute_error
+
+mae = mean_absolute_error(Y, predictions)
+print(f"Mean Absolute Error (MAE): {mae}")
+
+```
+# Mean Squared Error (MSE)
+
+* MSE measures the average of the squares of the errors. It gives more weight to larger errors, making it sensitive to outliers.
+```
+from sklearn.metrics import mean_squared_error
+
+mse = mean_squared_error(Y, predictions)
+print(f"Mean Squared Error (MSE): {mse}")
+```
+# Root Mean Squared Error (RMSE)
+* RMSE is the square root of the MSE. It provides an error metric that is in the same units as the dependent variable, making it more interpretable.
+```
+rmse = np.sqrt(mse)
+print(f"Root Mean Squared Error (RMSE): {rmse}")
+
+```
+# R-squared (Coefficient of Determination)
+* R-squared measures the proportion of the variance in the dependent variable that is predictable from the independent variables. It ranges from 0 to 1, where 1 indicates a perfect fit.
+```
+from sklearn.metrics import r2_score
+
+r2 = r2_score(Y, predictions)
+print(f"R-squared (R^2): {r2}")
+```
+
+> In this tutorial, The sample dataset is there for learning purpose only
+
+
From d51207d7c9966ee7122fc687661d6dc271742435 Mon Sep 17 00:00:00 2001
From: Yogesh Vishwakarma <103316955+Yogeshkarma@users.noreply.github.com>
Date: Fri, 17 May 2024 19:44:58 +0530
Subject: [PATCH 043/405] Update index.md
---
contrib/machine-learning/index.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/machine-learning/index.md b/contrib/machine-learning/index.md
index 82596a2..094b211 100644
--- a/contrib/machine-learning/index.md
+++ b/contrib/machine-learning/index.md
@@ -1,3 +1,3 @@
# List of sections
-- [Section title](filename.md)
+- [Regression in Machine Learning](Regression.md)
From 741bb87351bc533ddace81823ed506aa63188a59 Mon Sep 17 00:00:00 2001
From: Krishna Kaushik <131583096+kRiShNa-429407@users.noreply.github.com>
Date: Fri, 17 May 2024 23:11:26 +0530
Subject: [PATCH 044/405] Update index.md
---
contrib/pandas/index.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/contrib/pandas/index.md b/contrib/pandas/index.md
index 5c0f2b4..f2a3fa7 100644
--- a/contrib/pandas/index.md
+++ b/contrib/pandas/index.md
@@ -1,3 +1,4 @@
# List of sections
- [Pandas Series Vs NumPy ndarray](pandas_series_vs_numpy_ndarray.md)
+- [Pandas Introduction and Dataframes in Pandas](Introduction_to_Pandas_Library_and_DataFrames.md)
From 35baa355cb23b9f7dad9818ebc5cbe80fff35e84 Mon Sep 17 00:00:00 2001
From: Krishna Kaushik <131583096+kRiShNa-429407@users.noreply.github.com>
Date: Fri, 17 May 2024 23:11:53 +0530
Subject: [PATCH 045/405] Add files via upload
---
...uction_to_Pandas_Library_and_DataFrames.md | 395 ++++++++++++++++++
1 file changed, 395 insertions(+)
create mode 100644 contrib/pandas/Introduction_to_Pandas_Library_and_DataFrames.md
diff --git a/contrib/pandas/Introduction_to_Pandas_Library_and_DataFrames.md b/contrib/pandas/Introduction_to_Pandas_Library_and_DataFrames.md
new file mode 100644
index 0000000..5e7dcd3
--- /dev/null
+++ b/contrib/pandas/Introduction_to_Pandas_Library_and_DataFrames.md
@@ -0,0 +1,395 @@
+# Introduction_to_Pandas_Library_and_DataFrames
+
+
+> Content Creator - Krishna Kaushik
+
+**As you have learnt Python Programming , now it's time for some applications.**
+
+- Machine Learning and Data Science is the emerging field of today's time , to work in this this field your first step should be `Data Science` as Machine Learning is all about data.
+- To begin with Data Science your first tool will be `Pandas Library`.
+
+## Introduction of Pandas Library
+
+Pandas is a data analysis and manipulation tool, built on top of the python programming language. Pandas got its name from the term Panel data (‘Pa’ from Panel and ‘da’ from data). Panel data is a data which have rows and columns in it like excel spreadsheets, csv files etc.
+
+**To use Pandas, first we’ve to import it.**
+
+## Why pandas?
+
+* Pandas provides a simple-to-use but very capable set of functions that you can use on your data.
+* It is also associate with other machine learning libraries , so it is important to learn it.
+
+* For example - It is highly used to transform tha data which will be use by machine learning model during the training.
+
+
+```python
+# Importing the pandas
+import pandas as pd
+```
+
+*To import any module in Python use “import 'module name' ” command, I used “pd” as pandas abbreviation because we don’t need to type pandas every time only type “pd” to use pandas.*
+
+
+```python
+# To check available pandas version
+print(f"Pandas Version is : {pd.__version__}")
+```
+
+ Pandas Version is : 2.1.4
+
+
+## Understanding Pandas data types
+
+Pandas has two main data types : `Series` and `DataFrames`
+
+* `pandas.Series` is a 1-dimensional column of data.
+* `pandas.DataFrames` is 2 -dimensional data table having rows and columns.
+
+### 1. Series datatype
+
+**To creeate a series you can use `pd.Series()` and passing a python list inside()**.
+
+Note: S in Series is capital if you use small s it will give you an error.
+
+> Let's create a series
+
+
+
+```python
+# Creating a series of car companies
+cars = pd.Series(["Honda","Audi","Thar","BMW"])
+cars
+```
+
+
+
+
+ 0 Honda
+ 1 Audi
+ 2 Thar
+ 3 BMW
+ dtype: object
+
+
+
+The above code creates a Series of cars companies the name of series is “cars” the code “pd.Series([“Honda” , “Audi” , “Thar”, "BMW"])” means Hey! pandas (pd) create a Series of cars named "Honda" , "Audi" , "Thar" and "BMW".
+
+The default index of a series is 0,1,2….(Remember it starts from 0)
+
+To change the index of any series set the “index” parameter accordingly. It takes the list of index values:
+
+
+```python
+cars = pd.Series(["Honda","Audi","Thar","BMW"],index = ["A" , "B" , "C" ,"D"])
+cars
+```
+
+
+
+
+ A Honda
+ B Audi
+ C Thar
+ D BMW
+ dtype: object
+
+
+
+You can see that the index has been changed from numbers to A, B ,C and D.
+
+And the mentioned ‘dtype’ tells us about the type of data we have in the series.
+
+### 2. DataFrames datatype
+
+DataFrame contains rows and columns like a csv file have.
+
+You can also create a DataFrame by using `pd.DataFrame()` and passing it a Python dictionary.
+
+
+```python
+# Let's create
+cars_with_colours = pd.DataFrame({"Cars" : ["BMW","Audi","Thar","Honda"],
+ "Colour" : ["Black","White","Red","Green"]})
+cars_with_colours
+```
+
+
+
+
+
+
+
+
+
+
+
Cars
+
Colour
+
+
+
+
+
0
+
BMW
+
Black
+
+
+
1
+
Audi
+
White
+
+
+
2
+
Thar
+
Red
+
+
+
3
+
Honda
+
Green
+
+
+
+
+
+
+
+The dictionary key is the `column name` and value are the `column data`.
+
+*You can also create a DataFrame with the help of series.*
+
+
+```python
+# Let's create two series
+students = pd.Series(["Ram","Mohan","Krishna","Shivam"])
+age = pd.Series([19,20,21,24])
+
+students
+```
+
+
+
+
+ 0 Ram
+ 1 Mohan
+ 2 Krishna
+ 3 Shivam
+ dtype: object
+
+
+
+
+```python
+age
+```
+
+
+
+
+ 0 19
+ 1 20
+ 2 21
+ 3 24
+ dtype: int64
+
+
+
+
+```python
+# Now let's create a dataframe with the help of above series
+# pass the series name to the dictionary value
+
+record = pd.DataFrame({"Student_Name":students ,
+ "Age" :age})
+record
+```
+
+
+
+
+
+
+
+
+
+
+
Student_Name
+
Age
+
+
+
+
+
0
+
Ram
+
19
+
+
+
1
+
Mohan
+
20
+
+
+
2
+
Krishna
+
21
+
+
+
3
+
Shivam
+
24
+
+
+
+
+
+
+
+
+```python
+# To print the list of columns names
+record.columns
+```
+
+
+
+
+ Index(['Student_Name', 'Age'], dtype='object')
+
+
+
+### Describe Data
+
+**The good news is that pandas has many built-in functions which allow you to quickly get information about a DataFrame.**
+Let's explore the `record` dataframe
+
+#### 1. Use `.dtypes` to find what datatype a column contains
+
+
+```python
+record.dtypes
+```
+
+
+
+
+ Student_Name object
+ Age int64
+ dtype: object
+
+
+
+#### 2. use `.describe()` for statistical overview.
+
+
+```python
+record.describe() # It only display the results for numeric data
+```
+
+
+
+
+
@@ -214,24 +196,6 @@ record = pd.DataFrame({"Student_Name":students ,
"Age" :age})
record
```
-
-
-
-
-
-
@@ -307,24 +271,6 @@ record.dtypes
```python
record.describe() # It only display the results for numeric data
```
-
-
-
-
-
-
From 1834690a1064b0e280d1d8f4e6c31ca61f3f13b9 Mon Sep 17 00:00:00 2001
From: Niyonika Gaur <83643952+niyonikagaur@users.noreply.github.com>
Date: Fri, 17 May 2024 23:37:59 +0530
Subject: [PATCH 047/405] Introduction_to_SciPy.md
---
contrib/scipy/index.md | 132 ++++++++++++++++++++++++++++++++++++++++-
1 file changed, 130 insertions(+), 2 deletions(-)
diff --git a/contrib/scipy/index.md b/contrib/scipy/index.md
index 82596a2..9c35f95 100644
--- a/contrib/scipy/index.md
+++ b/contrib/scipy/index.md
@@ -1,3 +1,131 @@
-# List of sections
+## Installation of Scipy
+### Install using the command:
+#### C:\Users\Your Name>pip install scipy
+ You can also use a Python distribution that already has Scipy installed like Anaconda, or Spyder.
+### Importing SciPy
+#### from scipy import constants
+## Key Features of SciPy
+### 1. Numerical Integration
+#### It helps in computing definite or indefinite integrals of functions
+```
+from scipy import integrate
+
+#Define the function to integrate
+def f(x):
+ return x**2
+
+#Compute definite integral of f from 0 to 1
+result, error = integrate.quad(f, 0, 1)
+print(result)
+```
+#### Output
+```
+0.33333333333333337
+```
+### 2. Optimization
+#### It can be used to minimize or maximize functions, here is an example of minimizing roots of an equation
+```
+from scipy.optimize import minimize
+
+# Define an objective function to minimize
+def objective(x):
+ return x**2 + 10*np.sin(x)
+
+# Minimize the objective function starting from x=0
+result = minimize(objective, x0=0)
+print(result.x)
+```
+#### Output
+```
+array([-1.30644012])
+```
+### 3. Linear Algebra
+#### Solving Linear computations
+```
+from scipy import linalg
+import numpy as np
+
+# Define a square matrix
+A = np.array([[1, 2], [3, 4]])
+
+# Define a vector
+b = np.array([5, 6])
+
+# Solve Ax = b for x
+x = linalg.solve(A, b)
+print(x)
+```
+#### Output
+```
+array([-4. , 4.5])
+```
+### 4. Statistics
+#### Performing statistics functions, like here we'll be distributing the data
+```
+from scipy import stats
+import numpy as np
+
+# Generate random data from a normal distribution
+data = stats.norm.rvs(loc=0, scale=1, size=1000)
+
+# Fit a normal distribution to the data
+mean, std = stats.norm.fit(data)
+```
+### 5. Signal Processing
+#### To process spectral signals, like EEG or MEG
+```
+from scipy import signal
+import numpy as np
+
+# Create a signal (e.g., sine wave)
+t = np.linspace(0, 1, 1000)
+signal = np.sin(2 * np.pi * 5 * t) + 0.5 * np.random.randn(1000)
+
+# Apply a low-pass Butterworth filter
+b, a = signal.butter(4, 0.1, 'low')
+filtered_signal = signal.filtfilt(b, a, signal)
+```
+The various filters applied that are applied here, are a part of signal analysis at a deeper level.
+### 6. Sparse Matrix
+#### The word ' sparse 'means less, i.e., the data is mostly unused during some operation or analysis. So, to handle this data, a Sparse Matrix is created
+#### There are two types of Sparse Matrices:
+##### 1. CSC: Compressed Sparse Column, it is used for efficient math functions and for column slicing
+##### 2. CSR: Compressed Sparse Row, it is used for fast row slicing
+#### In CSC format
+```
+from scipy import sparse
+import numpy as np
+
+data = np.array([[0, 0], [0, 1], [2, 0]])
+
+row_indices = np.array([1, 2, 1])
+col_indices = np.array([1, 0, 2])
+values = np.array([1, 2, 1])
+
+sparse_matrix_csc = sparse.csc_matrix((values, (row_indices, col_indices)))
+```
+#### In CSR format
+```
+from scipy import sparse
+import numpy as np
+
+data = np.array([[0, 0], [0, 1], [2, 0]])
+sparse_matrix = sparse.csr_matrix(data)
+```
+### 7. Image Processing
+#### It is used to process the images, like changing dimensions or properties. For example, when you're doing a project on medical imaging, this library is mainly used.
+```
+from scipy import ndimage
+import matplotlib.pyplot as plt
+
+image = plt.imread('path/to/image.jpg')
+plt.imshow(image)
+plt.show()
+
+# Apply Gaussian blur to the image
+blurred_image = ndimage.gaussian_filter(image, sigma=1)
+plt.imshow(blurred_image)
+plt.show()
+```
+#### The gaussian blur is one of the properties of the ' ndimage ' package in SciPy libraries, it used for better understanding of the image.
-- [Section title](filename.md)
From c60a01491bfbb42a8a9d65b2f28a6e691a4b7e4e Mon Sep 17 00:00:00 2001
From: iABn0rma1
Date: Fri, 17 May 2024 23:38:40 +0530
Subject: [PATCH 048/405] updated content
---
.../ArtificialNeuralNetwork.md | 19 -------------------
1 file changed, 19 deletions(-)
diff --git a/contrib/machine-learning/ArtificialNeuralNetwork.md b/contrib/machine-learning/ArtificialNeuralNetwork.md
index 0fafc6c..c577c94 100644
--- a/contrib/machine-learning/ArtificialNeuralNetwork.md
+++ b/contrib/machine-learning/ArtificialNeuralNetwork.md
@@ -26,7 +26,6 @@ This guide will walk you through a fundamental neural network implementation in
| `Neuron` cells forming the humand nervous system | `Perceptron` inspired from human brain |
| :----------------------------------------------- | -------------------------------------: |
-| | |
| Neurons are nerve cells that send messages all over your body to allow you to do everything from breathing to talking, eating, walking, and thinking. | The perceptron is a mathematical model of a biological neuron. Performing heavy computations to think like humans. |
| Neuron collects signals from dendrites. | The first layer is knownn as Input Layer, acting like dendritres to receive the input signal. |
| Synapses are the connections between neurons where signals are transmitted. | Weights represent synapses. |
@@ -44,28 +43,17 @@ Neurons in ANNs are organized into layers:
* **Input Layer:** Receives the raw data.
* **(n) Hidden Layers:** (Optional) Intermediate layers where complex transformations occur. They learn to detect patterns and features in the data.
* **Output Layer:** Produces the final result (prediction or classification).
-
-
-
### Weights and Biases
- For each input $(x_i)$, a weight $(w_i)$ is associated with it. Weights, multiplied with input units $(w_i \cdot x_i)$, determine the influence of one neuron's output on another.
- A bias $(b_i)$ is added to help influence the end product, giving the equation as $(w_i \cdot x_i + b_i)$.
- During training, the network adjusts these weights and biases to minimize errors and improve its predictions.
-
-
-
-
### Activation Functions
- An activation function is applied to the result to introduce non-linearity in the model, allowing ANNs to learn more complex relationships from the data.
- The resulting equation: $y = f(g(x))$, determines whether the neuron will "fire" or not, i.e., if its output will be used as input for the next neuron.
- Common activation functions include the sigmoid function, tanh (hyperbolic tangent), and ReLU (Rectified Linear Unit).
-
-
-
-
### Forward and Backward Propagation
- **Flow of Information:** All the above steps are part of Forward Propagation. It gives the output equation as $y = f\left(\sum_{i=1}^n w_i x_i + b_i\right)$
- **Error Correction:** Backpropagation is the algorithm used to train ANNs by calculating the gradient of error at the output layer and then propagating this error backward through the network. This allows the network to adjust its weights and biases in the direction that reduces the error.
@@ -75,10 +63,6 @@ Neurons in ANNs are organized into layers:
$
where $E$ is the error, $\hat{y}_j$ is the predicted output, $\theta_j$ is the input to the activation function of the $j^{th}$ neuron, and $w_{ij}$ is the weight from neuron $i$ to neuron $j$.
-
-
-
-
## Building From Scratch
@@ -167,6 +151,3 @@ To understand how well our model is learning, let's visualize the training loss
model = NeuralNetwork(input_size, hidden_layers, hidden_neurons, output_size)
model.train(X, y, 100)
```
-
-
-
From 7c3b30466982483e69db3513e0afc438e982cad8 Mon Sep 17 00:00:00 2001
From: Niyonika Gaur <83643952+niyonikagaur@users.noreply.github.com>
Date: Fri, 17 May 2024 23:58:14 +0530
Subject: [PATCH 049/405] Update index.md
---
contrib/scipy/index.md | 131 +----------------------------------------
1 file changed, 2 insertions(+), 129 deletions(-)
diff --git a/contrib/scipy/index.md b/contrib/scipy/index.md
index 9c35f95..3ff5a7d 100644
--- a/contrib/scipy/index.md
+++ b/contrib/scipy/index.md
@@ -1,131 +1,4 @@
-## Installation of Scipy
-### Install using the command:
-#### C:\Users\Your Name>pip install scipy
- You can also use a Python distribution that already has Scipy installed like Anaconda, or Spyder.
-### Importing SciPy
-#### from scipy import constants
-## Key Features of SciPy
-### 1. Numerical Integration
-#### It helps in computing definite or indefinite integrals of functions
-```
-from scipy import integrate
+# List of sections
-#Define the function to integrate
-def f(x):
- return x**2
-
-#Compute definite integral of f from 0 to 1
-result, error = integrate.quad(f, 0, 1)
-print(result)
-```
-#### Output
-```
-0.33333333333333337
-```
-### 2. Optimization
-#### It can be used to minimize or maximize functions, here is an example of minimizing roots of an equation
-```
-from scipy.optimize import minimize
-
-# Define an objective function to minimize
-def objective(x):
- return x**2 + 10*np.sin(x)
-
-# Minimize the objective function starting from x=0
-result = minimize(objective, x0=0)
-print(result.x)
-```
-#### Output
-```
-array([-1.30644012])
-```
-### 3. Linear Algebra
-#### Solving Linear computations
-```
-from scipy import linalg
-import numpy as np
-
-# Define a square matrix
-A = np.array([[1, 2], [3, 4]])
-
-# Define a vector
-b = np.array([5, 6])
-
-# Solve Ax = b for x
-x = linalg.solve(A, b)
-print(x)
-```
-#### Output
-```
-array([-4. , 4.5])
-```
-### 4. Statistics
-#### Performing statistics functions, like here we'll be distributing the data
-```
-from scipy import stats
-import numpy as np
-
-# Generate random data from a normal distribution
-data = stats.norm.rvs(loc=0, scale=1, size=1000)
-
-# Fit a normal distribution to the data
-mean, std = stats.norm.fit(data)
-```
-### 5. Signal Processing
-#### To process spectral signals, like EEG or MEG
-```
-from scipy import signal
-import numpy as np
-
-# Create a signal (e.g., sine wave)
-t = np.linspace(0, 1, 1000)
-signal = np.sin(2 * np.pi * 5 * t) + 0.5 * np.random.randn(1000)
-
-# Apply a low-pass Butterworth filter
-b, a = signal.butter(4, 0.1, 'low')
-filtered_signal = signal.filtfilt(b, a, signal)
-```
-The various filters applied that are applied here, are a part of signal analysis at a deeper level.
-### 6. Sparse Matrix
-#### The word ' sparse 'means less, i.e., the data is mostly unused during some operation or analysis. So, to handle this data, a Sparse Matrix is created
-#### There are two types of Sparse Matrices:
-##### 1. CSC: Compressed Sparse Column, it is used for efficient math functions and for column slicing
-##### 2. CSR: Compressed Sparse Row, it is used for fast row slicing
-#### In CSC format
-```
-from scipy import sparse
-import numpy as np
-
-data = np.array([[0, 0], [0, 1], [2, 0]])
-
-row_indices = np.array([1, 2, 1])
-col_indices = np.array([1, 0, 2])
-values = np.array([1, 2, 1])
-
-sparse_matrix_csc = sparse.csc_matrix((values, (row_indices, col_indices)))
-```
-#### In CSR format
-```
-from scipy import sparse
-import numpy as np
-
-data = np.array([[0, 0], [0, 1], [2, 0]])
-sparse_matrix = sparse.csr_matrix(data)
-```
-### 7. Image Processing
-#### It is used to process the images, like changing dimensions or properties. For example, when you're doing a project on medical imaging, this library is mainly used.
-```
-from scipy import ndimage
-import matplotlib.pyplot as plt
-
-image = plt.imread('path/to/image.jpg')
-plt.imshow(image)
-plt.show()
-
-# Apply Gaussian blur to the image
-blurred_image = ndimage.gaussian_filter(image, sigma=1)
-plt.imshow(blurred_image)
-plt.show()
-```
-#### The gaussian blur is one of the properties of the ' ndimage ' package in SciPy libraries, it used for better understanding of the image.
+- [Installation of Scipy and its key uses](pandas_series_vs_numpy_ndarray.md)
From 0a63d2e17d69b8d8d3032bf36c51a183dc0e2450 Mon Sep 17 00:00:00 2001
From: Niyonika Gaur <83643952+niyonikagaur@users.noreply.github.com>
Date: Fri, 17 May 2024 23:59:25 +0530
Subject: [PATCH 050/405] Installation_of_Scipy_&_its_key_uses.md
---
.../Installation_of_Scipy_&_its_key_uses.md | 130 ++++++++++++++++++
1 file changed, 130 insertions(+)
create mode 100644 contrib/scipy/Installation_of_Scipy_&_its_key_uses.md
diff --git a/contrib/scipy/Installation_of_Scipy_&_its_key_uses.md b/contrib/scipy/Installation_of_Scipy_&_its_key_uses.md
new file mode 100644
index 0000000..33232dc
--- /dev/null
+++ b/contrib/scipy/Installation_of_Scipy_&_its_key_uses.md
@@ -0,0 +1,130 @@
+## Installation of Scipy
+### Install using the command:
+#### C:\Users\Your Name>pip install scipy
+ You can also use a Python distribution that already has Scipy installed like Anaconda, or Spyder.
+### Importing SciPy
+#### from scipy import constants
+## Key Features of SciPy
+### 1. Numerical Integration
+#### It helps in computing definite or indefinite integrals of functions
+```
+from scipy import integrate
+
+#Define the function to integrate
+def f(x):
+ return x**2
+
+#Compute definite integral of f from 0 to 1
+result, error = integrate.quad(f, 0, 1)
+print(result)
+```
+#### Output
+```
+0.33333333333333337
+```
+### 2. Optimization
+#### It can be used to minimize or maximize functions, here is an example of minimizing roots of an equation
+```
+from scipy.optimize import minimize
+
+# Define an objective function to minimize
+def objective(x):
+ return x**2 + 10*np.sin(x)
+
+# Minimize the objective function starting from x=0
+result = minimize(objective, x0=0)
+print(result.x)
+```
+#### Output
+```
+array([-1.30644012])
+```
+### 3. Linear Algebra
+#### Solving Linear computations
+```
+from scipy import linalg
+import numpy as np
+
+# Define a square matrix
+A = np.array([[1, 2], [3, 4]])
+
+# Define a vector
+b = np.array([5, 6])
+
+# Solve Ax = b for x
+x = linalg.solve(A, b)
+print(x)
+```
+#### Output
+```
+array([-4. , 4.5])
+```
+### 4. Statistics
+#### Performing statistics functions, like here we'll be distributing the data
+```
+from scipy import stats
+import numpy as np
+
+# Generate random data from a normal distribution
+data = stats.norm.rvs(loc=0, scale=1, size=1000)
+
+# Fit a normal distribution to the data
+mean, std = stats.norm.fit(data)
+```
+### 5. Signal Processing
+#### To process spectral signals, like EEG or MEG
+```
+from scipy import signal
+import numpy as np
+
+# Create a signal (e.g., sine wave)
+t = np.linspace(0, 1, 1000)
+signal = np.sin(2 * np.pi * 5 * t) + 0.5 * np.random.randn(1000)
+
+# Apply a low-pass Butterworth filter
+b, a = signal.butter(4, 0.1, 'low')
+filtered_signal = signal.filtfilt(b, a, signal)
+```
+The various filters applied that are applied here, are a part of signal analysis at a deeper level.
+### 6. Sparse Matrix
+#### The word ' sparse 'means less, i.e., the data is mostly unused during some operation or analysis. So, to handle this data, a Sparse Matrix is created
+#### There are two types of Sparse Matrices:
+##### 1. CSC: Compressed Sparse Column, it is used for efficient math functions and for column slicing
+##### 2. CSR: Compressed Sparse Row, it is used for fast row slicing
+#### In CSC format
+```
+from scipy import sparse
+import numpy as np
+
+data = np.array([[0, 0], [0, 1], [2, 0]])
+
+row_indices = np.array([1, 2, 1])
+col_indices = np.array([1, 0, 2])
+values = np.array([1, 2, 1])
+
+sparse_matrix_csc = sparse.csc_matrix((values, (row_indices, col_indices)))
+```
+#### In CSR format
+```
+from scipy import sparse
+import numpy as np
+
+data = np.array([[0, 0], [0, 1], [2, 0]])
+sparse_matrix = sparse.csr_matrix(data)
+```
+### 7. Image Processing
+#### It is used to process the images, like changing dimensions or properties. For example, when you're doing a project on medical imaging, this library is mainly used.
+```
+from scipy import ndimage
+import matplotlib.pyplot as plt
+
+image = plt.imread('path/to/image.jpg')
+plt.imshow(image)
+plt.show()
+
+# Apply Gaussian blur to the image
+blurred_image = ndimage.gaussian_filter(image, sigma=1)
+plt.imshow(blurred_image)
+plt.show()
+```
+#### The gaussian blur is one of the properties of the ' ndimage ' package in SciPy libraries, it used for better understanding of the image.
From 2632f7c8a1a542b98616668311e24d344ca79736 Mon Sep 17 00:00:00 2001
From: Niyonika Gaur <83643952+niyonikagaur@users.noreply.github.com>
Date: Fri, 17 May 2024 23:59:48 +0530
Subject: [PATCH 051/405] Update index.md
---
contrib/scipy/index.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/scipy/index.md b/contrib/scipy/index.md
index 3ff5a7d..abc2fb0 100644
--- a/contrib/scipy/index.md
+++ b/contrib/scipy/index.md
@@ -1,4 +1,4 @@
# List of sections
-- [Installation of Scipy and its key uses](pandas_series_vs_numpy_ndarray.md)
+- [Installation of Scipy and its key uses]( Installation_of_Scipy_&_its_key_uses.md)
From 6574b726fecffba739e6fc4d01776944b76333f7 Mon Sep 17 00:00:00 2001
From: Vrisha Shah <74671946+Vrisha213@users.noreply.github.com>
Date: Sat, 18 May 2024 12:44:43 +0530
Subject: [PATCH 052/405] Update index.md
---
contrib/machine-learning/index.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/contrib/machine-learning/index.md b/contrib/machine-learning/index.md
index 2f27fd5..40a2237 100644
--- a/contrib/machine-learning/index.md
+++ b/contrib/machine-learning/index.md
@@ -1,3 +1,4 @@
# List of sections
- [Confusion Matrix](confusion-matrix.md)
+- [Support Vector Machine Algorithm](support-vector-machine.md)
From 72909dc3abda33ad617b81007e9f1da69a15f5ba Mon Sep 17 00:00:00 2001
From: Yatharth
Date: Sat, 18 May 2024 13:18:25 +0530
Subject: [PATCH 053/405] JSON MDODULE load loads dump dumps update and append
---
contrib/advanced-python/index.md | 1 +
contrib/advanced-python/json-module.md | 294 +++++++++++++++++++++++++
2 files changed, 295 insertions(+)
create mode 100644 contrib/advanced-python/json-module.md
diff --git a/contrib/advanced-python/index.md b/contrib/advanced-python/index.md
index 5ea5081..8f4f26a 100644
--- a/contrib/advanced-python/index.md
+++ b/contrib/advanced-python/index.md
@@ -1,3 +1,4 @@
# List of sections
- [Decorators/\*args/**kwargs](decorator-kwargs-args.md)
+- [JSON module](json-module.md)
diff --git a/contrib/advanced-python/json-module.md b/contrib/advanced-python/json-module.md
new file mode 100644
index 0000000..20a9408
--- /dev/null
+++ b/contrib/advanced-python/json-module.md
@@ -0,0 +1,294 @@
+# JSON Module
+
+## What is JSON?
+
+- JSON (JavaScript Object Notation) is a format for structuring data.
+- JSON is a lightweight, text-based data interchange format that is completely language-independent.
+- Similar to XML, JSON is a format for structuring data commonly used by web applications to communicate with each other.
+
+## Why JSON?
+
+- Whenever we declare a variable and assign a value to it, the variable itself doesn't hold the value. Instead, the variable holds an address in memory where the value is stored. For example:
+
+```python
+age = 21
+```
+
+- When we use `age`, it gets replaced with `21`. However, age doesn't contain 21, it contains the address of the memory location where 21 is stored.
+
+- While this works locally, transferring this data, such as through an API, poses a challenge. Sending your computer’s entire memory with the addresses is impractical and insecure. This is where JSON comes to the rescue.
+
+### Example JSON
+
+- JSON supports most widely used data types including String
+ , Number, Boolean, Null, Array and Object.
+- Here is an example of JSON file
+
+```json
+{
+ "name": "John Doe",
+ "age": 21,
+ "isStudent": true,
+ "address": null,
+ "courses": ["Math", "Science", "History"],
+ "grades": {
+ "Math": 95,
+ "Science": 89,
+ "History": 76
+ }
+}
+```
+
+# Python JSON
+
+Python too supports JSON with a built-in package called `json`. This package provides all the necessary tools for working with JSON Objects including `parsing, serializing, deserializing, and many more`.
+
+## 1. Python parse JSON string.
+
+- To parse JSON string Python firstly we import the JSON module.
+- JSON string is converted to a Python object using `json.loads()` method of JSON module in Python.
+- Example Code:
+
+```python
+# Python program to convert JSON to Python
+import json
+
+# JSON string
+students ='{"id":"01", "name": "Yatharth", "department":"Computer Science Engineering"}'
+
+# Convert string to Python dict
+students_dict = json.loads(students)
+print(students_dict)
+
+print(students_dict['name'])
+
+```
+
+- Ouput:
+
+```json
+{'id': '01', 'name': 'Yatharth', 'department': 'Computer Science Engineering'}
+Yatharth
+```
+
+## 2. Python load JSON file.
+
+- JSON data can also be directly fetch from a json file
+- Example:
+
+```python
+import json
+# Opening JSON file
+f = open('input.json',)
+
+# Returns JSON object as a dictionary
+data = json.load(f)
+
+# Iterating through the json file
+for i in data['students']:
+ print(i)
+
+# Closing file
+f.close()
+```
+
+- JSON file
+
+```json
+{
+ "students":{
+ {
+ "id": "01",
+ "name": "Yatharth",
+ "department": "Computer Science Engineering"
+ },
+ {
+ "id": "02",
+ "name": "Raj",
+ "department": "Mechanical Engineering"
+ }
+ }
+}
+```
+
+- Ouput
+
+```json
+{'id': '01', 'name': 'Yatharth', 'department': 'Computer Science Engineering'}
+{'id': '02', 'name': 'Raj', 'department': 'Mechanical Engineering'}
+```
+- `json.load()`: Reads JSON data from a file object and deserializes it into a Python object.
+- `json.loads()`: Deserializes JSON data from a string into a Python object.
+
+
+### Addtiotnal Context
+Relation between python data types and json data types is given in table below.
+
+
+| Python Object | JSON Object |
+|-----------------|-------------|
+| Dict | object |
+| list, tuple | array |
+| str | string |
+| int, long, float | numbers |
+| True | true |
+| False | false |
+| None | null |
+
+
+
+## 3. Python Dictionary to JSON String
+- Parsing python dictionary to json string using `json.dumps()`.
+- Example Code:
+```python
+import json
+
+# Data to be written
+dictionary ={
+ "id": "03",
+ "name": "Suraj",
+ "department": "Civil Engineering"
+}
+
+# Serializing json
+json_object = json.dumps(dictionary, indent = 4)
+print(json_object)
+```
+- Output:
+``` json
+{
+ "department": "Civil Engineering",
+ "id": "02",
+ "name": "Suraj"
+}
+```
+## 4. Python Dictionary to JSON file.
+- - Parsing python dictionary to json string using `json.dump()`.
+- Example Code:
+``` python
+import json
+
+# Data to be written
+dictionary ={
+ "name" : "Satyendra",
+ "rollno" : 51,
+ "cgpa" : 8.8,
+ "phonenumber" : "123456789"
+}
+
+with open("sample.json", "w") as outfile:
+ json.dump(dictionary, outfile)
+
+```
+- Ouput: `sample.json`
+``` json
+{
+ "name" : "Satyendra",
+ "rollno" : 51,
+ "cgpa" : 8.8,
+ "phonenumber" : "123456789"
+}
+
+```
+## 5. Append Python Dictionary to JSON String.
+- Append to an already existing string using `json.update()`.
+- Example :
+```python
+import json
+# JSON data:
+x = {
+ "id": "03",
+ "name": "Suraj"
+}
+
+# python object to be appended
+y = { "department": "Civil Engineering"}
+
+# parsing JSON string:
+z = json.loads(x)
+
+# appending the data
+z.update(y)
+
+# the result is a JSON string:
+print(json.dumps(z))
+
+```
+- Ouput:
+```json
+{"id": "03", "name": "Suraj", "department": "Civil Engineering"}
+```
+
+
+## 6. Append Python Dictionary to JSON File.
+- There is no direct function to append in file. So, we will load file in a dictionary, update dictionary then update content and convert back to json file format.
+- `data.json`
+``` json
+{
+ "students":{
+ {
+ "id": "01",
+ "name": "Yatharth",
+ "department": "Computer Science Engineering"
+ },
+ {
+ "id": "02",
+ "name": "Raj",
+ "department": "Mechanical Engineering"
+ }
+ }
+}
+```
+- Example Code:
+``` python
+import json
+
+# function to add to JSON
+def write_json(new_data, filename='data.json'):
+ with open(filename,'r+') as file:
+ # First we load existing data into a dict.
+ file_data = json.load(file)
+ # Join new_data with file_data inside students
+ file_data["students"].append(new_data)
+ # Sets file's current position at offset.
+ file.seek(0)
+ # convert back to json.
+ json.dump(file_data, file, indent = 4)
+
+# python object to be appended
+y = {
+ "id": "03",
+ "name": "Suraj",
+ "department": "Civil Engineering"
+}
+
+write_json(y)
+
+```
+- Output:
+```json
+{
+ "students":{
+ {
+ "id": "01",
+ "name": "Yatharth",
+ "department": "Computer Science Engineering"
+ },
+ {
+ "id": "02",
+ "name": "Raj",
+ "department": "Mechanical Engineering"
+ },
+ {
+ "id": "03",
+ "name": "Suraj",
+ "department": "Civil Engineering"
+ }
+ }
+}
+```
+
+
+
+
+The Python json module simplifies the handling of JSON data, offering a bridge between Python data structures and JSON representations, vital for data exchange and storage in modern applications.
\ No newline at end of file
From a478e70c4bea7637ba6795ab1cf81c7d00d5ca2a Mon Sep 17 00:00:00 2001
From: Anushka Mokashi
Date: Sat, 18 May 2024 14:10:53 +0530
Subject: [PATCH 054/405] Descriptive Statistics with Python and Pandas
---
contrib/pandas/Descriptive_Statistics.md | 599 +++++++++++++++++++++++
contrib/pandas/index.md | 1 +
2 files changed, 600 insertions(+)
create mode 100644 contrib/pandas/Descriptive_Statistics.md
diff --git a/contrib/pandas/Descriptive_Statistics.md b/contrib/pandas/Descriptive_Statistics.md
new file mode 100644
index 0000000..7775965
--- /dev/null
+++ b/contrib/pandas/Descriptive_Statistics.md
@@ -0,0 +1,599 @@
+## Descriptive Statistics
+
+In the realm of data science, understanding the characteristics of data is fundamental. Descriptive statistics provide the tools and techniques to succinctly summarize and present the key features of a dataset. It serves as the cornerstone for exploring, visualizing, and ultimately gaining insights from data.
+
+Descriptive statistics encompasses a range of methods designed to describe the central tendency, dispersion, and shape of a dataset. Through measures such as mean, median, mode, standard deviation, and variance, descriptive statistics offer a comprehensive snapshot of the data's distribution and variability.
+
+Data scientists utilize descriptive statistics to uncover patterns, identify outliers, and assess the overall structure of data before delving into more advanced analyses. By summarizing large and complex datasets into manageable and interpretable summaries, descriptive statistics facilitate informed decision-making and actionable insights.
+
+
+```python
+import pandas as pd
+import numpy as np
+```
+
+
+```python
+df = pd.read_csv("Age-Income-Dataset.csv")
+df
+```
+| | Age | Income |
+| --- | ----------- | ------ |
+| 0 | Young | 25000 |
+| 1 | Middle Age | 54000 |
+| 2 | Old | 60000 |
+| 3 | Young | 15000 |
+| 4 | Young | 45000 |
+| 5 | Young | 65000 |
+| 6 | Young | 70000 |
+| 7 | Young | 30000 |
+| 8 | Middle Age | 27000 |
+| 9 | Young | 23000 |
+| 10 | Young | 48000 |
+| 11 | Old | 52000 |
+| 12 | Young | 33000 |
+| 13 | Old | 80000 |
+| 14 | Old | 75000 |
+| 15 | Old | 35000 |
+| 16 | Middle Age | 29000 |
+| 17 | Middle Age | 57000 |
+| 18 | Old | 43000 |
+| 19 | Middle Age | 56000 |
+| 20 | Old | 63000 |
+| 21 | Old | 32000 |
+| 22 | Old | 45000 |
+| 23 | Old | 89000 |
+| 24 | Middle Age | 90000 |
+| 25 | Middle Age | 93000 |
+| 26 | Young | 80000 |
+| 27 | Young | 87000 |
+| 28 | Young | 38000 |
+| 29 | Young | 23000 |
+| 30 | Middle Age | 38900 |
+| 31 | Middle Age | 53200 |
+| 32 | Old | 43800 |
+| 33 | Middle Age | 25600 |
+| 34 | Middle Age | 65400 |
+| 35 | Old | 76800 |
+| 36 | Old | 89700 |
+| 37 | Old | 41800 |
+| 38 | Young | 31900 |
+| 39 | Old | 25600 |
+| 40 | Middle Age | 45700 |
+| 41 | Old | 35600 |
+| 42 | Young | 54300 |
+| 43 | Middle Age | 65400 |
+| 44 | Old | 67800 |
+| 45 | Old | 24500 |
+| 46 | Middle Age | 34900 |
+| 47 | Old | 45300 |
+| 48 | Young | 68400 |
+| 49 | Middle Age | 51700 |
+
+
+
+```python
+df.describe()
+```
+
+
+
+| | Income |
+|-------|-------------|
+| count | 50.000000 |
+| mean | 50966.000000 |
+| std | 21096.683268 |
+| min | 15000.000000 |
+| 25% | 33475.000000 |
+| 50% | 46850.000000 |
+| 75% | 65400.000000 |
+| max | 93000.000000 |
+
+
+### Mean
+
+The mean, also known as the average, is a measure of central tendency in a dataset. It represents the typical value of a set of numbers. The formula to calculate the mean of a dataset is:
+
+$$ \overline{x} = \frac{\sum\limits_{i=1}^{n} x_i}{n} $$
+
+* $\overline{x}$ (pronounced "x bar") represents the mean value.
+* $x_i$ represents the individual value in the dataset (where i goes from 1 to n).
+* $\sum$ (sigma) represents the summation symbol, indicating we add up all the values from i=1 to n.
+* $n$ represents the total number of values in the dataset.
+
+
+
+```python
+df['Income'].mean()
+```
+
+
+
+
+50966.0
+
+
+
+
+```python
+def mean_f(df):
+ for col in df.columns:
+ if df[col].dtype != 'O':
+ temp = 0
+ for i in df[col]:
+ temp = temp +i
+ print("Without pandas Library -> ")
+ print("Average of {} is {}".format(col,(temp/len(df[col]))))
+ print()
+ print("With pandas Library -> ")
+ print(df[col].mean())
+
+mean_f(df)
+```
+
+Without pandas Library ->
+Average of Income is 50966.0
+
+With pandas Library ->
+50966.0
+
+
+### Median
+
+
+The median is another measure of central tendency in a dataset. Unlike the mean, which is the average value of all data points, the median represents the middle value when the dataset is ordered from smallest to largest. If the dataset has an odd number of observations, the median is the middle value. If the dataset has an even number of observations, the median is the average of the two middle values.
+
+The median represents the "middle" value in a dataset. There are two cases to consider depending on whether the number of observations (n) is odd or even:
+
+**Odd number of observations (n):**
+
+In this case, the median (M) is the value located at the middle position when the data is ordered from least to greatest. We can calculate the position using the following formula:
+
+$$ M = x_{n+1/2} $$
+
+**Even number of observations (n):**
+
+When we have an even number of observations, there isn't a single "middle" value. Instead, the median is the average of the two middle values after ordering the data. Here's the formula to find the median:
+
+$$ M = \frac{x_{n/2} + x_{(n/2)+1}}{2} $$
+
+**Explanation:**
+
+* M represents the median value.
+* n represents the total number of observations in the dataset.
+* $x$ represents the individual value.
+
+
+
+
+
+```python
+df['Income'].median()
+```
+
+
+
+
+46850.0
+
+
+
+
+```python
+def median_f(df):
+ for col in df.columns:
+ if df[col].dtype != 'O':
+ sorted_data = sorted(df[col])
+ n = len(df[col])
+ if n%2 == 0:
+ x1 =sorted_data[int((n/2))]
+ x2 =sorted_data[int((n/2))+1]
+ median=(x1+x2)/2
+ else:
+ median = sorted_data[(n+1)/2]
+ print("Median without library ->")
+ print("Median of {} is {} ".format(col,median))
+ print("Median with library ->")
+ print(df[col].median())
+median_f(df)
+```
+
+Median without library ->
+Median of Income is 49850.0 \
+Median with library ->
+46850.0
+
+
+### Mode
+
+
+The mode is a measure of central tendency that represents the value or values that occur most frequently in a dataset. Unlike the mean and median, which focus on the average or middle value, the mode identifies the most common value(s) in the dataset.
+
+
+```python
+def mode_f(df):
+ for col in df.columns:
+ if df[col].dtype == 'O':
+ print("Column:", col)
+ arr = df[col].sort_values()
+
+ prevcnt = 0
+ cnt = 0
+ ans = arr[0]
+ temp = arr[0]
+
+ for i in arr:
+ if(temp == i) :
+ cnt += 1
+ else:
+ prevcnt = cnt
+ cnt = 1
+ temp = i
+ if(cnt > prevcnt):
+ ans = i
+
+ print("Without pandas Library -> ")
+ print("Mode of {} is {}".format(col,ans))
+ print()
+ print("With pandas Library -> ")
+ print(df[col].mode())
+mode_f(df)
+```
+
+Column: Age
+Without pandas Library -> \
+Mode of Age is Old
+
+With pandas Library -> \
+0 Old \
+Name: Age, dtype: object
+
+
+
+
+
+### Standard Deviation
+
+Standard deviation is a measure of the dispersion or spread of a dataset. It quantifies the amount of variation or dispersion of a set of values from the mean. In other words, it indicates how much individual values in a dataset deviate from the mean.
+
+$$s = \sqrt{\frac{\sum(x_i-\overline{x})^{2}}{n-1}}$$
+
+* $s$ represents the standard deviation.
+* $\sum$ (sigma) represents the summation symbol, indicating we add up the values for all data points.
+* $x_i$ represents the individual value in the dataset.
+* $\overline{x}$ (x bar) represents the mean value of the dataset.
+* $n$ represents the total number of values in the dataset.
+
+
+```python
+df['Income'].std()
+```
+
+
+
+
+21096.683267707253
+
+
+
+
+```python
+import math
+def std_f(df):
+ for col in df.columns:
+ if len(df[col]) == 0:
+ print("Column is empty")
+ if df[col].dtype != 'O':
+ sum = 0
+ mean = df[col].mean()
+ for i in df[col]:
+ sum = sum + (i - mean)**2
+
+ std = math.sqrt(sum/len(df[col]))
+ print("Without pandas library ->")
+ print("Std : " , std)
+ print("With pandas library: ->")
+ print("Std : {}".format(np.std(df[col]))) ##ddof = 1
+
+std_f(df)
+```
+
+Without pandas library ->
+Std : 20884.6509187968 \
+With pandas library: ->
+Std : 20884.6509187968
+
+
+
+```python
+df['Income'].count()
+```
+
+
+
+
+50
+
+
+
+### Minimum
+
+
+```python
+df['Income'].min()
+```
+
+
+
+
+15000
+
+
+
+
+```python
+def min_f(df):
+ for col in df.columns:
+ if df[col].dtype != "O":
+ sorted_data = sorted(df[col])
+ min = sorted_data[0]
+ print("Without pandas Library->",min)
+ print("With pandas Library->",df[col].min())
+
+min_f(df)
+```
+
+Without pandas Library-> 15000 \
+With pandas Library-> 15000
+
+
+### Maximum
+
+
+```python
+df['Income'].max()
+```
+
+
+
+
+93000
+
+
+
+
+```python
+def max_f(df):
+ for col in df.columns:
+ if df[col].dtype != "O":
+ sorted_data = sorted(df[col])
+ max = sorted_data[len(df[col])-1]
+ print("Without pandas Library->",max)
+ print("With pandas Library->",df[col].max())
+
+max_f(df)
+```
+
+ Without pandas Library-> 93000
+ With pandas Library-> 93000
+
+
+### Percentile
+
+
+```python
+df['Income'].quantile(0.25)
+```
+
+
+
+
+33475.0
+
+
+
+
+```python
+df['Income'].quantile(0.75)
+```
+
+
+
+
+65400.0
+
+
+
+
+```python
+def percentile_f(df,percentile):
+ for col in df.columns:
+ if df[col].dtype != 'O':
+ sorted_data = sorted(df[col])
+ index = int(percentile*len(df[col]))
+ percentile_result = sorted_data[index]
+ print(f"{percentile} Percentile is : ",percentile_result)
+
+percentile_f(df,0.25)
+```
+
+0.25 Percentile is : 33000
+
+
+We have used the method of nearest rank to calculate percentile manually.
+
+Pandas uses linear interpolation of data to calculate percentiles.
+
+## Correlation and Covariance
+
+
+```python
+df = pd.read_csv('Iris.csv')
+df.head(5)
+```
+
+
+
+
+| | Id | SepalLengthCm | SepalWidthCm | PetalLengthCm | PetalWidthCm | Species |
+|---|----|---------------|--------------|---------------|--------------|-------------|
+| 0 | 1 | 5.1 | 3.5 | 1.4 | 0.2 | Iris-setosa |
+| 1 | 2 | 4.9 | 3.0 | 1.4 | 0.2 | Iris-setosa |
+| 2 | 3 | 4.7 | 3.2 | 1.3 | 0.2 | Iris-setosa |
+| 3 | 4 | 4.6 | 3.1 | 1.5 | 0.2 | Iris-setosa |
+| 4 | 5 | 5.0 | 3.6 | 1.4 | 0.2 | Iris-setosa |
+
+
+
+
+```python
+df.drop(['Id','Species'],axis=1,inplace= True)
+```
+
+### Covarience
+
+Covariance measures the degree to which two variables change together. If the covariance between two variables is positive, it means that they tend to increase or decrease together. If the covariance is negative, it means that as one variable increases, the other tends to decrease. However, covariance does not provide a standardized measure, making it difficult to interpret the strength of the relationship between variables, especially if the variables are measured in different units.
+
+$$ COV(X,Y) = \frac{\sum\limits_{i=1}^{n} (X_i - \overline{X}) (Y_i - \overline{Y})}{n - 1}$$
+
+**Explanation:**
+
+* $COV(X, Y)$ represents the covariance between variables X and Y.
+* $X_i$ and $Y_i$ represent the individual values for variables X and Y in the i-th observation.
+* $\overline{X}$ and $\overline{Y}$ represent the mean values for variables X and Y, respectively.
+* $n$ represents the total number of observations in the dataset.
+
+
+
+```python
+df.cov()
+```
+
+
+| | SepalLengthCm | SepalWidthCm | PetalLengthCm | PetalWidthCm |
+|-------------------|-------------- |---------------|-----------------|--------------|
+| **SepalLengthCm** | 0.685694 | -0.039268 | 1.273682 | 0.516904 |
+| **SepalWidthCm** | -0.039268 | 0.188004 | -0.321713 | -0.117981 |
+| **PetalLengthCm** | 1.273682 | -0.321713 | 3.113179 | 1.296387 |
+| **PetalWidthCm** | 0.516904 | -0.117981 | 1.296387 | 0.582414 |
+
+
+
+```python
+def cov_f(df):
+ for x in df.columns:
+ for y in df.columns:
+ mean_x = df[x].mean()
+ mean_y = df[y].mean()
+
+ sum = 0
+ n = len(df[x])
+
+ for val in range(n):
+ sum += (df[x].iloc[val] - mean_x)*(df[y].iloc[val] - mean_y)
+ print("Covariance of {} and {} is : {}".format(x,y, sum/(n-1)))
+ print()
+cov_f(df)
+```
+
+Covariance of SepalLengthCm and SepalLengthCm is : 0.6856935123042504 \
+Covariance of SepalLengthCm and SepalWidthCm is : -0.03926845637583892 \
+Covariance of SepalLengthCm and PetalLengthCm is : 1.2736823266219246 \
+Covariance of SepalLengthCm and PetalWidthCm is : 0.5169038031319911
+
+Covariance of SepalWidthCm and SepalLengthCm is : -0.03926845637583892 \
+Covariance of SepalWidthCm and SepalWidthCm is : 0.1880040268456377 \
+Covariance of SepalWidthCm and PetalLengthCm is : -0.32171275167785235 \
+Covariance of SepalWidthCm and PetalWidthCm is : -0.11798120805369115
+
+Covariance of PetalLengthCm and SepalLengthCm is : 1.2736823266219246 \
+Covariance of PetalLengthCm and SepalWidthCm is : -0.32171275167785235 \
+Covariance of PetalLengthCm and PetalLengthCm is : 3.113179418344519 \
+Covariance of PetalLengthCm and PetalWidthCm is : 1.2963874720357946
+
+Covariance of PetalWidthCm and SepalLengthCm is : 0.5169038031319911 \
+Covariance of PetalWidthCm and SepalWidthCm is : -0.11798120805369115 \
+Covariance of PetalWidthCm and PetalLengthCm is : 1.2963874720357946 \
+Covariance of PetalWidthCm and PetalWidthCm is : 0.5824143176733781
+
+
+
+### Correlation
+
+Correlation, on the other hand, standardizes the measure of relationship between two variables, making it easier to interpret. It measures both the strength and direction of the linear relationship between two variables. Correlation values range between -1 and 1, where:
+
+$$r = \frac{n(\sum xy) - (\sum x)(\sum y)}{\sqrt{n(\sum x^2) - (\sum x)^2} \cdot \sqrt{n(\sum y^2) - (\sum y)^2}}$$
+
+* r represents the correlation coefficient.
+* n is the number of data points.
+
+
+
+
+```python
+df.corr()
+```
+
+| | SepalLengthCm | SepalWidthCm | PetalLengthCm | PetalWidthCm |
+|-------------------|---------------|--------------|---------------|--------------|
+| **SepalLengthCm** | 1.000000 | -0.109369 | 0.871754 | 0.817954 |
+| **SepalWidthCm** | -0.109369 | 1.000000 | -0.420516 | -0.356544 |
+| **PetalLengthCm** | 0.871754 | -0.420516 | 1.000000 | 0.962757 |
+| **PetalWidthCm** | 0.817954 | -0.356544 | 0.962757 | 1.000000 |
+
+
+```python
+import math
+def corr_f(df):
+ for i in df.columns:
+ for j in df.columns:
+ n = len(df[i])
+
+ sumX = 0
+ for x in df[i]:
+ sumX += x
+ sumY = 0
+ for y in df[j]:
+ sumY += y
+
+ sumXY = 0
+ for xy in range(n):
+ sumXY += (df[i].iloc[xy] * df[j].iloc[xy])
+
+ sumX2 = 0
+ for x in df[i]:
+ sumX2 += (x**2)
+ sumY2 = 0
+ for y in df[j]:
+ sumY2 += (y**2)
+
+ NR = (n * sumXY) - (sumX*sumY)
+ DR = math.sqrt( ( (n * sumX2) - (sumX**2))*( (n * sumY2) - (sumY ** 2) ) )
+
+ print("Correlation of {} and {} :{}".format(i,j,NR/DR))
+ print()
+
+corr_f(df)
+```
+
+Correlation of SepalLengthCm and SepalLengthCm :1.0 \
+Correlation of SepalLengthCm and SepalWidthCm :-0.10936924995067286 \
+Correlation of SepalLengthCm and PetalLengthCm :0.8717541573048861 \
+Correlation of SepalLengthCm and PetalWidthCm :0.8179536333691775
+
+Correlation of SepalWidthCm and SepalLengthCm :-0.10936924995067286 \
+Correlation of SepalWidthCm and SepalWidthCm :1.0 \
+Correlation of SepalWidthCm and PetalLengthCm :-0.42051609640118826 \
+Correlation of SepalWidthCm and PetalWidthCm :-0.3565440896138223
+
+Correlation of PetalLengthCm and SepalLengthCm :0.8717541573048861 \
+Correlation of PetalLengthCm and SepalWidthCm :-0.42051609640118826 \
+Correlation of PetalLengthCm and PetalLengthCm :1.0 \
+Correlation of PetalLengthCm and PetalWidthCm :0.9627570970509656
+
+Correlation of PetalWidthCm and SepalLengthCm :0.8179536333691775 \
+Correlation of PetalWidthCm and SepalWidthCm :-0.3565440896138223 \
+Correlation of PetalWidthCm and PetalLengthCm :0.9627570970509656 \
+Correlation of PetalWidthCm and PetalWidthCm :1.0
+
+
diff --git a/contrib/pandas/index.md b/contrib/pandas/index.md
index 5c0f2b4..ae90788 100644
--- a/contrib/pandas/index.md
+++ b/contrib/pandas/index.md
@@ -1,3 +1,4 @@
# List of sections
- [Pandas Series Vs NumPy ndarray](pandas_series_vs_numpy_ndarray.md)
+- [Pandas Descriptive Statistics](Descriptive_Statistics.md)
From f322f740d2ed2fbb669733b07e6dfc939acb53a9 Mon Sep 17 00:00:00 2001
From: AmrutaJayanti <142327526+AmrutaJayanti@users.noreply.github.com>
Date: Sat, 18 May 2024 18:24:03 +0530
Subject: [PATCH 055/405] Update index.md
---
contrib/advanced-python/index.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/contrib/advanced-python/index.md b/contrib/advanced-python/index.md
index 5ea5081..6fe4a9f 100644
--- a/contrib/advanced-python/index.md
+++ b/contrib/advanced-python/index.md
@@ -1,3 +1,4 @@
# List of sections
- [Decorators/\*args/**kwargs](decorator-kwargs-args.md)
+- [OOPs](OOPs.md)
From 95c272e87edbdbce3593360d36bd1deae6e54432 Mon Sep 17 00:00:00 2001
From: AmrutaJayanti <142327526+AmrutaJayanti@users.noreply.github.com>
Date: Sat, 18 May 2024 18:24:30 +0530
Subject: [PATCH 056/405] Added OOPs
---
contrib/advanced-python/OOPs.md | 470 ++++++++++++++++++++++++++++++++
1 file changed, 470 insertions(+)
create mode 100644 contrib/advanced-python/OOPs.md
diff --git a/contrib/advanced-python/OOPs.md b/contrib/advanced-python/OOPs.md
new file mode 100644
index 0000000..7e355f2
--- /dev/null
+++ b/contrib/advanced-python/OOPs.md
@@ -0,0 +1,470 @@
+---
+jupyter:
+ colab:
+ kernelspec:
+ display_name: Python 3
+ name: python3
+ language_info:
+ name: python
+ nbformat: 4
+ nbformat_minor: 0
+---
+
+::: {.cell .markdown id="WpcHLEIgeEdz"}
+**PYTHON OOP CONCEPTS**
+:::
+
+::: {.cell .markdown id="3j1W5YpNeEmS"}
+In Python object-oriented Programming (OOPs) is a programming paradigm
+that uses objects and classes in programming. It aims to implement
+real-world entities like inheritance, polymorphisms, encapsulation, etc.
+in the programming. The main concept of object-oriented Programming
+(OOPs) or oops concepts in Python is to bind the data and the functions
+that work together as a single unit so that no other part of the code
+can access this data.
+
+**OOPs Concepts in Python**
+
+1. Class in Python
+
+2. Objects in Python
+
+3. Polymorphism in Python
+
+4. Encapsulation in Python
+
+5. Inheritance in Python
+
+6. Data Abstraction in Python
+ :::
+
+::: {.cell .markdown id="3KQXMPlVeEyT"}
+Python Class A class is a collection of objects. A class contains the
+blueprints or the prototype from which the objects are being created. It
+is a logical entity that contains some attributes and methods.
+:::
+
+::: {.cell .code execution_count="2" id="6CdZhHSMerae"}
+
+```python
+#Simple Class in Python
+class Dog:
+ pass
+```
+
+:::
+
+::: {.cell .markdown id="y5t7jyHAfAHl"}
+**Python Objects** In object oriented programming Python, The object is
+an entity that has a state and behavior associated with it. It may be
+any real-world object like a mouse, keyboard, chair, table, pen, etc.
+Integers, strings, floating-point numbers, even arrays, and
+dictionaries, are all objects.
+:::
+
+::: {.cell .code execution_count="3" id="u8Y0G-hse-lm"}
+
+```python
+obj = Dog()
+```
+
+:::
+
+::: {.cell .markdown id="\_FtRAPlNfLkb"}
+**The Python **init** Method **
+
+The **init** method is similar to constructors in C++ and Java. It is
+run as soon as an object of a class is instantiated. The method is
+useful to do any initialization you want to do with your object.
+:::
+
+::: {.cell .code execution_count="4" colab="{\"base_uri\":\"https://localhost:8080/\"}" id="aMmXUxLHfSz6" outputId="ed23bfbd-445a-4d02-ebba-c210471e0af2"}
+
+```python
+class Dog:
+
+ # class attribute
+ attr1 = "mammal"
+
+ # Instance attribute
+ def __init__(self, name):
+ self.name = name
+
+# Object instantiation
+Rodger = Dog("Rodger")
+Tommy = Dog("Tommy")
+
+# Accessing class attributes
+print("Rodger is a {}".format(Rodger.__class__.attr1))
+print("Tommy is also a {}".format(Tommy.__class__.attr1))
+
+# Accessing instance attributes
+print("My name is {}".format(Rodger.name))
+print("My name is {}".format(Tommy.name))
+```
+
+::: {.output .stream .stdout}
+Rodger is a mammal
+Tommy is also a mammal
+My name is Rodger
+My name is Tommy
+:::
+:::
+
+::: {.cell .markdown id="YFMnh417fZI6"}
+**Inheritance**
+
+In Python object oriented Programming, Inheritance is the capability of
+one class to derive or inherit the properties from another class. The
+class that derives properties is called the derived class or child class
+and the class from which the properties are being derived is called the
+base class or parent class.
+
+Types of Inheritances:
+
+- Single Inheritance
+
+- Multilevel Inheritance
+
+- Multiple Inheritance
+
+- Hierarchial Inheritance
+ :::
+
+::: {.cell .code execution_count="6" colab="{\"base_uri\":\"https://localhost:8080/\"}" id="PeQoseXogE2f" outputId="9b3a069e-c6f0-41b0-b5f3-704aa0f95160"}
+
+```python
+#Single Inheritance
+# Parent class
+class Animal:
+ def __init__(self, name, sound):
+ self.name = name
+ self.sound = sound
+
+ def make_sound(self):
+ print(f"{self.name} says {self.sound}")
+
+# Child class inheriting from Animal
+class Dog(Animal):
+ def __init__(self, name):
+ # Call the constructor of the parent class
+ super().__init__(name, "Woof")
+
+# Child class inheriting from Animal
+class Cat(Animal):
+ def __init__(self, name):
+ # Call the constructor of the parent class
+ super().__init__(name, "Meow")
+
+# Creating objects of the derived classes
+dog = Dog("Buddy")
+cat = Cat("Whiskers")
+
+# Accessing methods of the parent class
+dog.make_sound()
+cat.make_sound()
+```
+
+::: {.output .stream .stdout}
+Buddy says Woof
+Whiskers says Meow
+:::
+:::
+
+::: {.cell .code execution_count="7" colab="{\"base_uri\":\"https://localhost:8080/\"}" id="CKEMq39BgSu9" outputId="b252ac43-6116-4a88-9ac9-0475f54e63c0"}
+
+```python
+#Multilevel Inheritance
+# Parent class
+class Animal:
+ def __init__(self, name):
+ self.name = name
+
+ def speak(self):
+ print(f"{self.name} speaks")
+
+# Child class inheriting from Animal
+class Dog(Animal):
+ def bark(self):
+ print(f"{self.name} barks")
+
+# Grandchild class inheriting from Dog
+class GermanShepherd(Dog):
+ def guard(self):
+ print(f"{self.name} guards")
+
+# Creating objects of the derived classes
+german_shepherd = GermanShepherd("Rocky")
+
+# Accessing methods from all levels of inheritance
+german_shepherd.speak() # Accessing method from the Animal class
+german_shepherd.bark() # Accessing method from the Dog class
+german_shepherd.guard() # Accessing method from the GermanShepherd class
+```
+
+::: {.output .stream .stdout}
+Rocky speaks
+Rocky barks
+Rocky guards
+:::
+:::
+
+::: {.cell .code execution_count="8" colab="{\"base_uri\":\"https://localhost:8080/\"}" id="wZ5qxZXBgdQ6" outputId="cd1c9d75-790c-49b3-8040-3334b896d779"}
+
+```python
+#Hierarchial Inheritance
+# Parent class
+class Animal:
+ def __init__(self, name):
+ self.name = name
+
+ def speak(self):
+ print(f"{self.name} speaks")
+
+# Child class 1 inheriting from Animal
+class Dog(Animal):
+ def bark(self):
+ print(f"{self.name} barks")
+
+# Child class 2 inheriting from Animal
+class Cat(Animal):
+ def meow(self):
+ print(f"{self.name} meows")
+
+# Creating objects of the derived classes
+dog = Dog("Buddy")
+cat = Cat("Whiskers")
+
+# Accessing methods from the parent and child classes
+dog.speak() # Accessing method from the Animal class
+dog.bark() # Accessing method from the Dog class
+cat.speak() # Accessing method from the Animal class
+cat.meow() # Accessing method from the Cat class
+```
+
+::: {.output .stream .stdout}
+Buddy speaks
+Buddy barks
+Whiskers speaks
+Whiskers meows
+:::
+:::
+
+::: {.cell .code execution_count="9" colab="{\"base_uri\":\"https://localhost:8080/\"}" id="8nPMri12glO5" outputId="a3c93e8c-f10f-4cd7-c402-3500342c9e28"}
+
+```python
+#Multiple Inheritance
+# Parent class 1
+class Herbivore:
+ def eat_plants(self):
+ print("Eating plants")
+
+# Parent class 2
+class Carnivore:
+ def eat_meat(self):
+ print("Eating meat")
+
+# Child class inheriting from both Herbivore and Carnivore
+class Omnivore(Herbivore, Carnivore):
+ def eat(self):
+ print("Eating everything")
+
+# Creating an object of the Omnivore class
+omnivore = Omnivore()
+
+# Accessing methods from both parent classes
+omnivore.eat_plants() # Accessing method from Herbivore
+omnivore.eat_meat() # Accessing method from Carnivore
+omnivore.eat() # Accessing method from Omnivore
+```
+
+::: {.output .stream .stdout}
+Eating plants
+Eating meat
+Eating everything
+:::
+:::
+
+::: {.cell .markdown id="KSw-WMePgvCa"}
+**Polymorphism** In object oriented Programming Python, Polymorphism
+simply means having many forms
+:::
+
+::: {.cell .code execution_count="10" colab="{\"base_uri\":\"https://localhost:8080/\"}" id="cIYtM2_Pg8Ja" outputId="e887848d-060a-4317-a805-cfb0ca4e187f"}
+
+```python
+class Bird:
+
+ def intro(self):
+ print("There are many types of birds.")
+
+ def flight(self):
+ print("Most of the birds can fly but some cannot.")
+
+class sparrow(Bird):
+
+ def flight(self):
+ print("Sparrows can fly.")
+
+class ostrich(Bird):
+
+ def flight(self):
+ print("Ostriches cannot fly.")
+
+obj_bird = Bird()
+obj_spr = sparrow()
+obj_ost = ostrich()
+
+obj_bird.intro()
+obj_bird.flight()
+
+obj_spr.intro()
+obj_spr.flight()
+
+obj_ost.intro()
+obj_ost.flight()
+```
+
+::: {.output .stream .stdout}
+There are many types of birds.
+Most of the birds can fly but some cannot.
+There are many types of birds.
+Sparrows can fly.
+There are many types of birds.
+Ostriches cannot fly.
+:::
+:::
+
+::: {.cell .markdown id="NzsPIifmg-FI"}
+**Python Encapsulation**
+
+In Python object oriented programming, Encapsulation is one of the
+fundamental concepts in object-oriented programming (OOP). It describes
+the idea of wrapping data and the methods that work on data within one
+unit. This puts restrictions on accessing variables and methods directly
+and can prevent the accidental modification of data. To prevent
+accidental change, an object's variable can only be changed by an
+object's method. Those types of variables are known as private
+variables.
+:::
+
+::: {.cell .code execution_count="11" colab="{\"base_uri\":\"https://localhost:8080/\"}" id="etbhALMHhGb9" outputId="75f27d20-7cee-4c85-b722-b9beb5ffe2b8"}
+
+```python
+class Car:
+ def __init__(self, make, model, year):
+ self._make = make # Encapsulated attribute with single underscore
+ self._model = model # Encapsulated attribute with single underscore
+ self._year = year # Encapsulated attribute with single underscore
+ self._odometer_reading = 0 # Encapsulated attribute with single underscore
+
+ def get_make(self):
+ return self._make
+
+ def get_model(self):
+ return self._model
+
+ def get_year(self):
+ return self._year
+
+ def get_odometer_reading(self):
+ return self._odometer_reading
+
+ def update_odometer(self, mileage):
+ if mileage >= self._odometer_reading:
+ self._odometer_reading = mileage
+ else:
+ print("You can't roll back an odometer!")
+
+ def increment_odometer(self, miles):
+ self._odometer_reading += miles
+
+# Creating an instance of the Car class
+my_car = Car("Toyota", "Camry", 2021)
+
+# Accessing encapsulated attributes through methods
+print("Make:", my_car.get_make())
+print("Model:", my_car.get_model())
+print("Year:", my_car.get_year())
+
+# Modifying encapsulated attribute through method
+my_car.update_odometer(100)
+print("Odometer Reading:", my_car.get_odometer_reading())
+
+# Incrementing odometer reading
+my_car.increment_odometer(50)
+print("Odometer Reading after increment:", my_car.get_odometer_reading())
+```
+
+::: {.output .stream .stdout}
+Make: Toyota
+Model: Camry
+Year: 2021
+Odometer Reading: 100
+Odometer Reading after increment: 150
+:::
+:::
+
+::: {.cell .markdown id="hJkQ9Tn5hUEV"}
+**Data Abstraction** It hides unnecessary code details from the user.
+Also, when we do not want to give out sensitive parts of our code
+implementation and this is where data abstraction came.
+:::
+
+::: {.cell .code execution_count="12" colab="{\"base_uri\":\"https://localhost:8080/\"}" id="FoMRMWEEhc-Z" outputId="3a77fd0d-8116-4997-c35f-dfebfc786b72"}
+
+```python
+from abc import ABC, abstractmethod
+
+# Abstract class defining the interface for a Shape
+class Shape(ABC):
+ def __init__(self, name):
+ self.name = name
+
+ @abstractmethod
+ def area(self):
+ pass
+
+ @abstractmethod
+ def perimeter(self):
+ pass
+
+# Concrete class implementing the Shape interface for a Rectangle
+class Rectangle(Shape):
+ def __init__(self, name, length, width):
+ super().__init__(name)
+ self.length = length
+ self.width = width
+
+ def area(self):
+ return self.length * self.width
+
+ def perimeter(self):
+ return 2 * (self.length + self.width)
+
+# Concrete class implementing the Shape interface for a Circle
+class Circle(Shape):
+ def __init__(self, name, radius):
+ super().__init__(name)
+ self.radius = radius
+
+ def area(self):
+ return 3.14 * self.radius * self.radius
+
+ def perimeter(self):
+ return 2 * 3.14 * self.radius
+
+# Creating objects of the derived classes
+rectangle = Rectangle("Rectangle", 5, 4)
+circle = Circle("Circle", 3)
+
+# Accessing methods defined by the Shape interface
+print(f"{rectangle.name}: Area = {rectangle.area()}, Perimeter = {rectangle.perimeter()}")
+print(f"{circle.name}: Area = {circle.area()}, Perimeter = {circle.perimeter()}")
+```
+
+::: {.output .stream .stdout}
+Rectangle: Area = 20, Perimeter = 18
+Circle: Area = 28.259999999999998, Perimeter = 18.84
+:::
+:::
From dd8db2ea7cca92d35f0398c82b8f021e3ed6ae2c Mon Sep 17 00:00:00 2001
From: AmrutaJayanti <142327526+AmrutaJayanti@users.noreply.github.com>
Date: Sat, 18 May 2024 18:27:49 +0530
Subject: [PATCH 057/405] Update OOPs.md
---
contrib/advanced-python/OOPs.md | 107 +++-----------------------------
1 file changed, 7 insertions(+), 100 deletions(-)
diff --git a/contrib/advanced-python/OOPs.md b/contrib/advanced-python/OOPs.md
index 7e355f2..d6d1256 100644
--- a/contrib/advanced-python/OOPs.md
+++ b/contrib/advanced-python/OOPs.md
@@ -1,20 +1,4 @@
----
-jupyter:
- colab:
- kernelspec:
- display_name: Python 3
- name: python3
- language_info:
- name: python
- nbformat: 4
- nbformat_minor: 0
----
-::: {.cell .markdown id="WpcHLEIgeEdz"}
-**PYTHON OOP CONCEPTS**
-:::
-
-::: {.cell .markdown id="3j1W5YpNeEmS"}
In Python object-oriented Programming (OOPs) is a programming paradigm
that uses objects and classes in programming. It aims to implement
real-world entities like inheritance, polymorphisms, encapsulation, etc.
@@ -36,15 +20,15 @@ can access this data.
5. Inheritance in Python
6. Data Abstraction in Python
- :::
-::: {.cell .markdown id="3KQXMPlVeEyT"}
+
+
Python Class A class is a collection of objects. A class contains the
blueprints or the prototype from which the objects are being created. It
is a logical entity that contains some attributes and methods.
-:::
-::: {.cell .code execution_count="2" id="6CdZhHSMerae"}
+
+
```python
#Simple Class in Python
@@ -54,31 +38,25 @@ class Dog:
:::
-::: {.cell .markdown id="y5t7jyHAfAHl"}
+
**Python Objects** In object oriented programming Python, The object is
an entity that has a state and behavior associated with it. It may be
any real-world object like a mouse, keyboard, chair, table, pen, etc.
Integers, strings, floating-point numbers, even arrays, and
dictionaries, are all objects.
-:::
-::: {.cell .code execution_count="3" id="u8Y0G-hse-lm"}
```python
obj = Dog()
```
-:::
-::: {.cell .markdown id="\_FtRAPlNfLkb"}
**The Python **init** Method **
The **init** method is similar to constructors in C++ and Java. It is
run as soon as an object of a class is instantiated. The method is
useful to do any initialization you want to do with your object.
-:::
-::: {.cell .code execution_count="4" colab="{\"base_uri\":\"https://localhost:8080/\"}" id="aMmXUxLHfSz6" outputId="ed23bfbd-445a-4d02-ebba-c210471e0af2"}
```python
class Dog:
@@ -103,15 +81,7 @@ print("My name is {}".format(Rodger.name))
print("My name is {}".format(Tommy.name))
```
-::: {.output .stream .stdout}
-Rodger is a mammal
-Tommy is also a mammal
-My name is Rodger
-My name is Tommy
-:::
-:::
-::: {.cell .markdown id="YFMnh417fZI6"}
**Inheritance**
In Python object oriented Programming, Inheritance is the capability of
@@ -129,10 +99,7 @@ Types of Inheritances:
- Multiple Inheritance
- Hierarchial Inheritance
- :::
-
-::: {.cell .code execution_count="6" colab="{\"base_uri\":\"https://localhost:8080/\"}" id="PeQoseXogE2f" outputId="9b3a069e-c6f0-41b0-b5f3-704aa0f95160"}
-
+
```python
#Single Inheritance
# Parent class
@@ -165,13 +132,8 @@ dog.make_sound()
cat.make_sound()
```
-::: {.output .stream .stdout}
-Buddy says Woof
-Whiskers says Meow
-:::
-:::
-::: {.cell .code execution_count="7" colab="{\"base_uri\":\"https://localhost:8080/\"}" id="CKEMq39BgSu9" outputId="b252ac43-6116-4a88-9ac9-0475f54e63c0"}
+
```python
#Multilevel Inheritance
@@ -202,14 +164,7 @@ german_shepherd.bark() # Accessing method from the Dog class
german_shepherd.guard() # Accessing method from the GermanShepherd class
```
-::: {.output .stream .stdout}
-Rocky speaks
-Rocky barks
-Rocky guards
-:::
-:::
-::: {.cell .code execution_count="8" colab="{\"base_uri\":\"https://localhost:8080/\"}" id="wZ5qxZXBgdQ6" outputId="cd1c9d75-790c-49b3-8040-3334b896d779"}
```python
#Hierarchial Inheritance
@@ -242,15 +197,6 @@ cat.speak() # Accessing method from the Animal class
cat.meow() # Accessing method from the Cat class
```
-::: {.output .stream .stdout}
-Buddy speaks
-Buddy barks
-Whiskers speaks
-Whiskers meows
-:::
-:::
-
-::: {.cell .code execution_count="9" colab="{\"base_uri\":\"https://localhost:8080/\"}" id="8nPMri12glO5" outputId="a3c93e8c-f10f-4cd7-c402-3500342c9e28"}
```python
#Multiple Inheritance
@@ -278,19 +224,9 @@ omnivore.eat_meat() # Accessing method from Carnivore
omnivore.eat() # Accessing method from Omnivore
```
-::: {.output .stream .stdout}
-Eating plants
-Eating meat
-Eating everything
-:::
-:::
-::: {.cell .markdown id="KSw-WMePgvCa"}
**Polymorphism** In object oriented Programming Python, Polymorphism
simply means having many forms
-:::
-
-::: {.cell .code execution_count="10" colab="{\"base_uri\":\"https://localhost:8080/\"}" id="cIYtM2_Pg8Ja" outputId="e887848d-060a-4317-a805-cfb0ca4e187f"}
```python
class Bird:
@@ -325,17 +261,7 @@ obj_ost.intro()
obj_ost.flight()
```
-::: {.output .stream .stdout}
-There are many types of birds.
-Most of the birds can fly but some cannot.
-There are many types of birds.
-Sparrows can fly.
-There are many types of birds.
-Ostriches cannot fly.
-:::
-:::
-::: {.cell .markdown id="NzsPIifmg-FI"}
**Python Encapsulation**
In Python object oriented programming, Encapsulation is one of the
@@ -346,9 +272,7 @@ and can prevent the accidental modification of data. To prevent
accidental change, an object's variable can only be changed by an
object's method. Those types of variables are known as private
variables.
-:::
-::: {.cell .code execution_count="11" colab="{\"base_uri\":\"https://localhost:8080/\"}" id="etbhALMHhGb9" outputId="75f27d20-7cee-4c85-b722-b9beb5ffe2b8"}
```python
class Car:
@@ -396,22 +320,10 @@ my_car.increment_odometer(50)
print("Odometer Reading after increment:", my_car.get_odometer_reading())
```
-::: {.output .stream .stdout}
-Make: Toyota
-Model: Camry
-Year: 2021
-Odometer Reading: 100
-Odometer Reading after increment: 150
-:::
-:::
-::: {.cell .markdown id="hJkQ9Tn5hUEV"}
**Data Abstraction** It hides unnecessary code details from the user.
Also, when we do not want to give out sensitive parts of our code
implementation and this is where data abstraction came.
-:::
-
-::: {.cell .code execution_count="12" colab="{\"base_uri\":\"https://localhost:8080/\"}" id="FoMRMWEEhc-Z" outputId="3a77fd0d-8116-4997-c35f-dfebfc786b72"}
```python
from abc import ABC, abstractmethod
@@ -463,8 +375,3 @@ print(f"{rectangle.name}: Area = {rectangle.area()}, Perimeter = {rectangle.peri
print(f"{circle.name}: Area = {circle.area()}, Perimeter = {circle.perimeter()}")
```
-::: {.output .stream .stdout}
-Rectangle: Area = 20, Perimeter = 18
-Circle: Area = 28.259999999999998, Perimeter = 18.84
-:::
-:::
From c56bbb3d4733f0c6770a4bb5755ea03043778182 Mon Sep 17 00:00:00 2001
From: Aditi Bansal <142652964+Aditi22Bansal@users.noreply.github.com>
Date: Sat, 18 May 2024 18:51:39 +0530
Subject: [PATCH 058/405] Update index.md
---
contrib/mini-projects/index.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/contrib/mini-projects/index.md b/contrib/mini-projects/index.md
index 82596a2..0c76d72 100644
--- a/contrib/mini-projects/index.md
+++ b/contrib/mini-projects/index.md
@@ -1,3 +1,4 @@
# List of sections
- [Section title](filename.md)
+- [Hangman Game Based on Movies](hangman_game.md)
From 7375e91a255113141a9a6e729ceaa56e1898d5dd Mon Sep 17 00:00:00 2001
From: Yatharth
Date: Sat, 18 May 2024 18:56:11 +0530
Subject: [PATCH 059/405] removed html tags, removed weird color at line 70 and
117
---
contrib/advanced-python/json-module.md | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/contrib/advanced-python/json-module.md b/contrib/advanced-python/json-module.md
index 20a9408..47e1561 100644
--- a/contrib/advanced-python/json-module.md
+++ b/contrib/advanced-python/json-module.md
@@ -2,7 +2,7 @@
## What is JSON?
-- JSON (JavaScript Object Notation) is a format for structuring data.
+- [JSON]("https://www.json.org/json-en.html") (JavaScript Object Notation) is a format for structuring data.
- JSON is a lightweight, text-based data interchange format that is completely language-independent.
- Similar to XML, JSON is a format for structuring data commonly used by web applications to communicate with each other.
@@ -14,7 +14,7 @@
age = 21
```
-- When we use `age`, it gets replaced with `21`. However, age doesn't contain 21, it contains the address of the memory location where 21 is stored.
+- When we use `age`, it gets replaced with `21`. However, *age doesn't contain 21, it contains the address of the memory location where 21 is stored*.
- While this works locally, transferring this data, such as through an API, poses a challenge. Sending your computer’s entire memory with the addresses is impractical and insecure. This is where JSON comes to the rescue.
@@ -67,7 +67,7 @@ print(students_dict['name'])
- Ouput:
```json
-{'id': '01', 'name': 'Yatharth', 'department': 'Computer Science Engineering'}
+{"id": "01", "name": "Yatharth", "department": "Computer Science Engineering"}
Yatharth
```
@@ -114,16 +114,15 @@ f.close()
- Ouput
```json
-{'id': '01', 'name': 'Yatharth', 'department': 'Computer Science Engineering'}
-{'id': '02', 'name': 'Raj', 'department': 'Mechanical Engineering'}
+{"id": "01", "name": "Yatharth", "department": "Computer Science Engineering"}
+{"id": "02", "name": "Raj", "department": "Mechanical Engineering"}
```
- `json.load()`: Reads JSON data from a file object and deserializes it into a Python object.
- `json.loads()`: Deserializes JSON data from a string into a Python object.
-
-### Addtiotnal Context
+
+## Addtiotnal Context
Relation between python data types and json data types is given in table below.
-
| Python Object | JSON Object |
|-----------------|-------------|
@@ -288,7 +287,4 @@ write_json(y)
}
```
-
-
-
The Python json module simplifies the handling of JSON data, offering a bridge between Python data structures and JSON representations, vital for data exchange and storage in modern applications.
\ No newline at end of file
From bc5469772704fa51bae90feb259a2adbfcaa0563 Mon Sep 17 00:00:00 2001
From: Yatharth
Date: Sat, 18 May 2024 18:57:26 +0530
Subject: [PATCH 060/405] line error 71 removed
---
contrib/advanced-python/json-module.md | 1 -
1 file changed, 1 deletion(-)
diff --git a/contrib/advanced-python/json-module.md b/contrib/advanced-python/json-module.md
index 47e1561..eed0393 100644
--- a/contrib/advanced-python/json-module.md
+++ b/contrib/advanced-python/json-module.md
@@ -68,7 +68,6 @@ print(students_dict['name'])
```json
{"id": "01", "name": "Yatharth", "department": "Computer Science Engineering"}
-Yatharth
```
## 2. Python load JSON file.
From 6063f595bdfb82655580a13d0260d547b920cd1c Mon Sep 17 00:00:00 2001
From: Manmita Das <34617961+manmita@users.noreply.github.com>
Date: Sat, 18 May 2024 19:03:18 +0530
Subject: [PATCH 061/405] Create recursion.md
---
contrib/ds-algorithms/recursion.md | 107 +++++++++++++++++++++++++++++
1 file changed, 107 insertions(+)
create mode 100644 contrib/ds-algorithms/recursion.md
diff --git a/contrib/ds-algorithms/recursion.md b/contrib/ds-algorithms/recursion.md
new file mode 100644
index 0000000..7ab3136
--- /dev/null
+++ b/contrib/ds-algorithms/recursion.md
@@ -0,0 +1,107 @@
+# Introduction to Recursions
+
+When a function calls itself to solve smaller instances of the same problem until a specified condition is fulfilled is called recursion. It is used for tasks that can be divided into smaller sub-tasks.
+
+# How Recursion Works
+
+To solve a problem using recursion we must define:
+- Base condition :- The condition under which recursion ends.
+- Recursive case :- The part of function which calls itself to solve a smaller instance of problem.
+
+Steps of Recursion
+
+When a recursive function is called, the following sequence of events occurs:
+- Function Call: The function is invoked with a specific argument.
+- Base Condition Check: The function checks if the argument satisfies the base case.
+- Recursive Call: If the base case is not met, the function performs some operations and makes a recursive call with a modified argument.
+- Stack Management: Each recursive call is placed on the call stack. The stack keeps track of each function call, its argument, and the point to return to once the call completes.
+- Unwinding the Stack: When the base case is eventually met, the function returns a value, and the stack starts unwinding, returning values to previous function calls until the initial call is resolved.
+
+# What is Stack Overflow in Recursion
+
+Stack overflow is an error that occurs when the call stack memory limit is exceeded. During execution of recursion calls they are simultaneously stored in a recursion stack waiting for the recursive function to be completed. Without a base case, the function would call itself indefinitely, leading to a stack overflow.
+
+# Example
+
+- Factorial of a Number
+
+ The factorial of i natural numbers is nth integer multiplied by factorial of (i-1) numbers. The base case is if i=0 we return 1 as factorial of 0 is 1.
+
+```python
+def factorial(i):
+ #base case
+ if i==0 :
+ return 1
+ #recursive case
+ else :
+ return i * factorial(i-1)
+i = 6
+print("Factorial of i is :", factorial(i)) # Output- Factorial of i is :720
+```
+# What is Backtracking
+
+Backtracking is a recursive algorithmic technique used to solve problems by exploring all possible solutions and discarding those that do not meet the problem's constraints. It is particularly useful for problems involving combinations, permutations, and finding paths in a grid.
+
+# How Backtracking Works
+
+- Incremental Solution Building: Solutions are built one step at a time.
+- Feasibility Check: At each step, a check is made to see if the current partial solution is valid.
+- Backtracking: If a partial solution is found to be invalid, the algorithm backtracks by removing the last added part of the solution and trying the next possibility.
+- Exploration of All Possibilities: The process continues recursively, exploring all possible paths, until a solution is found or all possibilities are exhausted.
+
+# Example
+
+- Word Search
+
+ Given a 2D grid of characters and a word, determine if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cells, where "adjacent" cells are horizontally or vertically neighboring. The same letter cell may not be used more than once.
+
+Algorithm for Solving the Word Search Problem with Backtracking:
+- Start at each cell: Attempt to find the word starting from each cell.
+- Check all Directions: From each cell, try all four possible directions (up, down, left, right).
+- Mark Visited Cells: Use a temporary marker to indicate cells that are part of the current path to avoid revisiting.
+- Backtrack: If a path does not lead to a solution, backtrack by unmarking the visited cell and trying the next possibility.
+
+```python
+def exist(board, word):
+ rows, cols = len(board), len(board[0])
+
+ def backtrack(r, c, suffix):
+ if not suffix:
+ return True
+
+ if r < 0 or r >= rows or c < 0 or c >= cols or board[r][c] != suffix[0]:
+ return False
+
+ # Mark the cell as visited by replacing its character with a placeholder
+ ret = False
+ board[r][c], temp = '#', board[r][c]
+
+ # Explore the four possible directions
+ for row_offset, col_offset in [(0, 1), (1, 0), (0, -1), (-1, 0)]:
+ ret = backtrack(r + row_offset, c + col_offset, suffix[1:])
+ if ret:
+ break
+
+ # Restore the cell's original value
+ board[r][c] = temp
+ return ret
+
+ for row in range(rows):
+ for col in range(cols):
+ if backtrack(row, col, word):
+ return True
+
+ return False
+
+# Test case
+board = [
+ ['A','B','C','E'],
+ ['S','F','C','S'],
+ ['A','D','E','E']
+]
+word = "ABCES"
+print(exist(board, word)) # Output: True
+```
+
+
+
From 2c56f3ef278be8220a1a6a10499f21fc7e4be192 Mon Sep 17 00:00:00 2001
From: Manmita Das <34617961+manmita@users.noreply.github.com>
Date: Sat, 18 May 2024 19:05:51 +0530
Subject: [PATCH 062/405] Update index.md
---
contrib/ds-algorithms/index.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/contrib/ds-algorithms/index.md b/contrib/ds-algorithms/index.md
index 5b52155..ab16ebe 100644
--- a/contrib/ds-algorithms/index.md
+++ b/contrib/ds-algorithms/index.md
@@ -2,3 +2,4 @@
- [Section title](filename.md)
- [Sorting Algorithms](sorting-algorithms.md)
+- [Recursion and Backtracking](recursion.md)
From acf7acdd8f347a8d762ee0fc912de5ea85d34447 Mon Sep 17 00:00:00 2001
From: Aditi Bansal <142652964+Aditi22Bansal@users.noreply.github.com>
Date: Sat, 18 May 2024 19:10:19 +0530
Subject: [PATCH 063/405] Create hangman_game.md
This Hangman game script is a simple Python program designed to let players guess movie titles. It starts by importing the random module to select a movie from a predefined list. The game displays the movie title as underscores and reveals correctly guessed letters. Players have six attempts to guess the entire title, entering one letter at a time. The script checks if the input is valid, updates the list of guessed letters, and adjusts the number of attempts based on the correctness of the guess. The game continues until the player either guesses the title correctly or runs out of attempts. Upon completion, it congratulates the player for a correct guess or reveals the movie title if the attempts are exhausted. The main execution block ensures the game runs only when the script is executed directly.
---
contrib/mini-projects/hangman_game.md | 220 ++++++++++++++++++++++++++
1 file changed, 220 insertions(+)
create mode 100644 contrib/mini-projects/hangman_game.md
diff --git a/contrib/mini-projects/hangman_game.md b/contrib/mini-projects/hangman_game.md
new file mode 100644
index 0000000..d62db91
--- /dev/null
+++ b/contrib/mini-projects/hangman_game.md
@@ -0,0 +1,220 @@
+# Hangman - Movies Edition
+The Hangman game script is a simple Python program designed to let players guess movie titles. It starts by importing the random module to select a movie from a predefined list. The game displays the movie title as underscores and reveals correctly guessed letters. Players have six attempts to guess the entire title, entering one letter at a time. The script checks if the input is valid, updates the list of guessed letters, and adjusts the number of attempts based on the correctness of the guess. The game continues until the player either guesses the title correctly or runs out of attempts. Upon completion, it congratulates the player for a correct guess or reveals the movie title if the attempts are exhausted. The main execution block ensures the game runs only when the script is executed directly.Below is first the code and then an explanation of the code and its components.
+
+## Code
+
+```
+import random
+
+def choose_movie():
+ movies = ['avatar', 'titanic', 'inception', 'jurassicpark', 'thegodfather', 'forrestgump', 'interstellar', 'pulpfiction', 'shawshank']
+ return random.choice(movies)
+
+def display_word(movie, guessed_letters):
+ display = ""
+ for letter in movie:
+ if letter in guessed_letters:
+ display += letter + " "
+ else:
+ display += "_ "
+ return display
+
+def hangman_movies():
+ movie = choose_movie()
+ guessed_letters = []
+ attempts = 6
+
+ print("Welcome to Hangman - Movies Edition!")
+ print("Try to guess the name of the movie. You have 6 attempts.")
+
+ while attempts > 0:
+ print("\n" + display_word(movie, guessed_letters))
+ guess = input("Guess a letter: ").lower()
+
+ if len(guess) != 1 or not guess.isalpha():
+ print("Please enter a single letter.")
+ continue
+
+ if guess in guessed_letters:
+ print("You've already guessed that letter.")
+ continue
+
+ guessed_letters.append(guess)
+
+ if guess not in movie:
+ attempts -= 1
+ print(f"Sorry, '{guess}' is not in the movie name. You have {attempts} attempts left.")
+ else:
+ print(f"Good guess! '{guess}' is in the movie name.")
+
+ if "_" not in display_word(movie, guessed_letters):
+ print(f"\nCongratulations! You guessed the movie '{movie.capitalize()}' correctly!")
+ break
+
+ if attempts == 0:
+ print(f"\nSorry, you ran out of attempts. The movie was '{movie.capitalize()}'.")
+
+if __name__ == "__main__":
+ hangman_movies()
+```
+
+## Code Explanation
+
+### Importing the Random Module
+
+```python
+
+import random
+
+```
+
+The `random` module is imported to use the `choice` function, which will help in selecting a random movie from a predefined list.
+
+### Choosing a Movie
+
+```python
+
+def choose_movie():
+
+movies = ['avatar', 'titanic', 'inception', 'jurassicpark', 'thegodfather', 'forrestgump', 'interstellar', 'pulpfiction', 'shawshank']
+
+return random.choice(movies)
+
+```
+
+The `choose_movie` function returns a random movie title from the `movies` list.
+
+### Displaying the Word
+
+```python
+
+def display_word(movie, guessed_letters):
+
+display = ""
+
+for letter in movie:
+
+if letter in guessed_letters:
+
+display += letter + " "
+
+else:
+
+display += "_ "
+
+return display
+
+```
+
+The `display_word` function takes the movie title and a list of guessed letters as arguments. It constructs a string where correctly guessed letters are shown in their positions, and unknown letters are represented by underscores (`_`).
+
+### Hangman Game Logic
+
+```python
+
+def hangman_movies():
+
+movie = choose_movie()
+
+guessed_letters = []
+
+attempts = 6
+
+print("Welcome to Hangman - Movies Edition!")
+
+print("Try to guess the name of the movie. You have 6 attempts.")
+
+while attempts > 0:
+
+print("\n" + display_word(movie, guessed_letters))
+
+guess = input("Guess a letter: ").lower()
+
+if len(guess) != 1 or not guess.isalpha():
+
+print("Please enter a single letter.")
+
+continue
+
+if guess in guessed_letters:
+
+print("You've already guessed that letter.")
+
+continue
+
+guessed_letters.append(guess)
+
+if guess not in movie:
+
+attempts -= 1
+
+print(f"Sorry, '{guess}' is not in the movie name. You have {attempts} attempts left.")
+
+else:
+
+print(f"Good guess! '{guess}' is in the movie name.")
+
+if "_" not in display_word(movie, guessed_letters):
+
+print(f"\nCongratulations! You guessed the movie '{movie.capitalize()}' correctly!")
+
+break
+
+if attempts == 0:
+
+print(f"\nSorry, you ran out of attempts. The movie was '{movie.capitalize()}'.")
+
+```
+
+The `hangman_movies` function manages the game's flow:
+
+1. It selects a random movie title using `choose_movie`.
+
+2. Initializes an empty list `guessed_letters` and sets the number of attempts to 6.
+
+3. Prints a welcome message and the initial game state.
+
+4. Enters a loop that continues until the player runs out of attempts or guesses the movie title.
+
+5. Displays the current state of the movie title with guessed letters revealed.
+
+6. Prompts the player to guess a letter.
+
+7. Validates the player's input:
+
+- Ensures it is a single alphabetic character.
+
+- Checks if the letter has already been guessed.
+
+8. Adds the guessed letter to `guessed_letters`.
+
+9. Updates the number of attempts if the guessed letter is not in the movie title.
+
+10. Congratulates the player if they guess the movie correctly.
+
+11. Informs the player of the correct movie title if they run out of attempts.
+
+### Main Execution Block
+
+```python
+
+if __name__ == "__main__":
+
+hangman_movies()
+
+```
+## Conclusion
+This block ensures that the game runs only when the script is executed directly, not when it is imported as a module.
+
+## Output Screenshots:
+
+
+
+
+
+
+## Conclusion
+
+This script provides a simple yet entertaining Hangman game focused on guessing movie titles. It demonstrates the use of functions, loops, conditionals, and user input handling in Python.
+
+
From 391a0e591b6866c981e1e746473a2ad475b1315e Mon Sep 17 00:00:00 2001
From: Anshika Yadav <14anshika7yadav@gmail.com>
Date: Sat, 18 May 2024 19:54:24 +0530
Subject: [PATCH 064/405] Closes #294 - Mini Project : Password Strength
Checker
---
contrib/mini-projects/index.md | 1 +
.../password_strength_checker.md | 100 ++++++++++++++++++
2 files changed, 101 insertions(+)
create mode 100644 contrib/mini-projects/password_strength_checker.md
diff --git a/contrib/mini-projects/index.md b/contrib/mini-projects/index.md
index 82596a2..71908f8 100644
--- a/contrib/mini-projects/index.md
+++ b/contrib/mini-projects/index.md
@@ -1,3 +1,4 @@
# List of sections
- [Section title](filename.md)
+- [Password strength checker](password_strength_checker.md)
\ No newline at end of file
diff --git a/contrib/mini-projects/password_strength_checker.md b/contrib/mini-projects/password_strength_checker.md
new file mode 100644
index 0000000..ca65b8e
--- /dev/null
+++ b/contrib/mini-projects/password_strength_checker.md
@@ -0,0 +1,100 @@
+# about password strength
+
+> This code is a simple password strength checker.
+It evaluates the strength of a user's password based on the presence of
+uppercase letters, lowercase letters, digits, spaces, and special characters.
+
+### About the code:
+
+- The codebase is break down in two file `password_strength_checker.py` and `main.py`.
+
+`password_strength_checker.py` The function evaluates password strength based on character types (uppercase, lowercase, digits, spaces, special characters) and provides feedback on its security.
+and `main.py` contains basic code.
+
+```
+import string
+
+
+class password_checker:
+ def __init__(self, password):
+ self.password = password
+
+ def check_password_strength(self):
+ """This function prompts the user to enter a password and then evaluates its strength."""
+
+ password_strength = 0
+ upper_count = 0
+ lower_count = 0
+ num_count = 0
+ space_count = 0
+ specialcharacter_count = 0
+ review = ""
+
+ for char in list(password):
+ if char in string.ascii_uppercase:
+ upper_count += 1
+ elif char in string.ascii_lowercase:
+ lower_count += 1
+ elif char in string.digits:
+ num_count += 1
+ elif char == " ":
+ space_count += 1
+ else:
+ specialcharacter_count += 1
+
+ if upper_count >= 1:
+ password_strength += 1
+ if lower_count >= 1:
+ password_strength += 1
+ if num_count >= 1:
+ password_strength += 1
+ if space_count >= 1:
+ password_strength += 1
+ if specialcharacter_count >= 1:
+ password_strength += 1
+
+ if password_strength == 1:
+ review = "That's a very easy password, Not good for use"
+ elif password_strength == 2:
+ review = (
+ "That's a weak password, You should change it to some strong password."
+ )
+ elif password_strength == 3:
+ review = "Your password is just okay, you may change it."
+ elif password_strength == 4:
+ review = "Your password is hard to guess."
+ elif password_strength == 5:
+ review = "Its the strong password, No one can guess this password "
+
+ about_password = {
+ "uppercase_letters ": upper_count,
+ "lowercase_letters": lower_count,
+ "space_count": space_count,
+ "specialcharacter_count": specialcharacter_count,
+ "password_strength": password_strength,
+ "about_password_strength": review,
+ }
+ print(about_password)
+
+ def check_password():
+ """This function prompts the user to decide if they want to check their password strength."""
+
+ choice = input("Do you want to check your password's strength? (Y/N): ")
+ if choice.upper() == "Y":
+ return True
+ elif choice.upper() == "N":
+ return False
+ else:
+ print("Invalid input. Please enter 'Y' for Yes or 'N' for No.")
+ return password_checker.check_password()
+
+```
+### Here's the implementation of 'main.py'
+```
+import password_checker from password_strength_checker
+
+while password_checker.check_password():
+ password = input("Enter your password: ")
+ p = password_checker(password)
+ p.check_password_strength()
+```
\ No newline at end of file
From 07d7643c6a0283db1b03c69e518a006a9d646f99 Mon Sep 17 00:00:00 2001
From: AmrutaJayanti <142327526+AmrutaJayanti@users.noreply.github.com>
Date: Sat, 18 May 2024 20:01:02 +0530
Subject: [PATCH 065/405] Update OOPs.md
---
contrib/advanced-python/OOPs.md | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/contrib/advanced-python/OOPs.md b/contrib/advanced-python/OOPs.md
index d6d1256..0dbd855 100644
--- a/contrib/advanced-python/OOPs.md
+++ b/contrib/advanced-python/OOPs.md
@@ -36,7 +36,7 @@ class Dog:
pass
```
-:::
+
**Python Objects** In object oriented programming Python, The object is
@@ -49,9 +49,9 @@ dictionaries, are all objects.
```python
obj = Dog()
```
+This creates an instance for class Dog
-
-**The Python **init** Method **
+**The Python **init** Method**
The **init** method is similar to constructors in C++ and Java. It is
run as soon as an object of a class is instantiated. The method is
@@ -80,7 +80,7 @@ print("Tommy is also a {}".format(Tommy.__class__.attr1))
print("My name is {}".format(Rodger.name))
print("My name is {}".format(Tommy.name))
```
-
+In the above mentioned code, init method is used to initialize the name.
**Inheritance**
@@ -131,7 +131,7 @@ cat = Cat("Whiskers")
dog.make_sound()
cat.make_sound()
```
-
+The above code depicts the Single Inheritance, in case of single inheritance there's only a single base class and a derived class. Here, Dog and Cat are the derived classes with Animal as the parent class. They can access the methods of the base class or derive their own methods.
@@ -163,7 +163,7 @@ german_shepherd.speak() # Accessing method from the Animal class
german_shepherd.bark() # Accessing method from the Dog class
german_shepherd.guard() # Accessing method from the GermanShepherd class
```
-
+Multilevel inheritance is a concept in object-oriented programming where a class inherits properties and behaviors from another class, which itself may inherit from another class. In other words, it involves a chain of inheritance where a subclass inherits from a superclass, and that subclass can then become a superclass for another subclass.Its similar to GrandFather ,Father and Son .In the above code,Animal class is the superclass, Dog is derived from Animal and Dog is the parent of GermanShepherd. GermenShepherd is the child class of Dog. GermenShepherd can access methods of both Animal and Dog.
```python
@@ -196,7 +196,7 @@ dog.bark() # Accessing method from the Dog class
cat.speak() # Accessing method from the Animal class
cat.meow() # Accessing method from the Cat class
```
-
+Hierarchical inheritance is a type of inheritance in object-oriented programming where one class serves as a superclass for multiple subclasses. In this inheritance model, each subclass inherits properties and behaviors from the same superclass, creating a hierarchical tree-like structure.
```python
#Multiple Inheritance
@@ -223,7 +223,7 @@ omnivore.eat_plants() # Accessing method from Herbivore
omnivore.eat_meat() # Accessing method from Carnivore
omnivore.eat() # Accessing method from Omnivore
```
-
+Multiple inheritance is a concept in object-oriented programming where a class can inherit properties and behaviors from more than one parent class. This means that a subclass can have multiple immediate parent classes, allowing it to inherit features from each of them.
**Polymorphism** In object oriented Programming Python, Polymorphism
simply means having many forms
@@ -260,7 +260,7 @@ obj_spr.flight()
obj_ost.intro()
obj_ost.flight()
```
-
+Poly stands for 'many' and morphism for 'forms'. In the above code, method flight() has many forms.
**Python Encapsulation**
@@ -374,4 +374,6 @@ circle = Circle("Circle", 3)
print(f"{rectangle.name}: Area = {rectangle.area()}, Perimeter = {rectangle.perimeter()}")
print(f"{circle.name}: Area = {circle.area()}, Perimeter = {circle.perimeter()}")
```
-
+To implement Data Abstraction , we have to import abc . ABC stands for Abstract Base Class . All those classes which want to implement data abstraction have to inherit from ABC.
+@abstractmethod is a decorator provided by the abc module, which stands for "abstract method". It's used to define abstract methods within abstract base classes (ABCs). An abstract method is a method declared in a class, but it does not contain an implementation. Instead, it serves as a placeholder, and its concrete implementation must be provided by subclasses.
+Abstract methods can be implemented by the derived classes.
From 2af70910214b943fa5df5a1f542389dec104ac43 Mon Sep 17 00:00:00 2001
From: AritraCh2005 <153842880+AritraCh2005@users.noreply.github.com>
Date: Sat, 18 May 2024 20:28:17 +0530
Subject: [PATCH 066/405] Update index.md
---
contrib/numpy/index.md | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/contrib/numpy/index.md b/contrib/numpy/index.md
index db6f0eb..fb82485 100644
--- a/contrib/numpy/index.md
+++ b/contrib/numpy/index.md
@@ -1,12 +1,5 @@
# List of sections
-* [Basic Mathematics](#BasicMaths)
- * [What is a Matrix?](#Matrix-Intro)
- * [Scalars and Vectors](#Scalars-Vectors)
- * [Arrays in Python](#Arrays)
- * [What is a Tensor?](#Tensors)
- * [Addition and Subtraction in Matrices](#Arithmetic)
- * [Transpose of Matrices & Vectors](#Transpose)
- * [Dot Product](#DotProduct)
- * [Dot Product of Matrices](#DotMatrices)
+* [Basic Mathematics](basic_math.md)
+
From 2604ecd61a9911d1d73e764046ee09c78ab5fb05 Mon Sep 17 00:00:00 2001
From: rohit
Date: Sat, 18 May 2024 21:51:53 +0530
Subject: [PATCH 067/405] Added TensorFlow,md File
---
contrib/machine-learning/index.md | 2 +-
contrib/machine-learning/tensorFlow.md | 64 ++++++++++++++++++++++++++
2 files changed, 65 insertions(+), 1 deletion(-)
create mode 100644 contrib/machine-learning/tensorFlow.md
diff --git a/contrib/machine-learning/index.md b/contrib/machine-learning/index.md
index 82596a2..1abe707 100644
--- a/contrib/machine-learning/index.md
+++ b/contrib/machine-learning/index.md
@@ -1,3 +1,3 @@
# List of sections
-- [Section title](filename.md)
+- [TensorFlow.md](learn-python\contrib\machine-learning\tensorFlow.md)
diff --git a/contrib/machine-learning/tensorFlow.md b/contrib/machine-learning/tensorFlow.md
new file mode 100644
index 0000000..1d9357d
--- /dev/null
+++ b/contrib/machine-learning/tensorFlow.md
@@ -0,0 +1,64 @@
+# TensorFlow
+
+Developed by the Google Brain team, TensorFlow is an open-source library that provides a comprehensive ecosystem for building and deploying machine learning models. It supports deep learning and neural networks and offers tools for both beginners and experts.
+
+## Key Features
+
+- **Flexible and comprehensive ecosystem**
+- **Scalable for both production and research**
+- **Supports CPUs, GPUs, and TPUs**
+
+## Basic Example: Linear Regression
+
+Let's start with a simple linear regression example in TensorFlow.
+
+```python
+import tensorflow as tf
+import numpy as np
+import matplotlib.pyplot as plt
+
+# Generate synthetic data
+X = np.array([1, 2, 3, 4, 5], dtype=np.float32)
+Y = np.array([2, 4, 6, 8, 10], dtype=np.float32)
+
+# Define the model
+model = tf.keras.Sequential([
+ tf.keras.layers.Dense(units=1, input_shape=[1])
+])
+
+# Compile the model
+model.compile(optimizer='sgd', loss='mean_squared_error')
+
+# Train the model
+history = model.fit(X, Y, epochs=500)
+
+# Predict
+predictions = model.predict(X)
+
+# Plot the results
+plt.plot(X, Y, 'ro', label='Original data')
+plt.plot(X, predictions, 'b-', label='Fitted line')
+plt.legend()
+plt.show()
+```
+
+In this example:
+
+1. We define a simple dataset with a linear relationship.
+2. We build a sequential model with one dense layer (linear regression).
+3. We compile the model with stochastic gradient descent (SGD) optimizer and mean squared error loss.
+4. We train the model for 500 epochs and then plot the original data and the fitted line.
+
+## When to Use TensorFlow
+
+TensorFlow is a great choice if you:
+
+- **Need to deploy machine learning models in production:** TensorFlow’s robust deployment options, including TensorFlow Serving, TensorFlow Lite, and TensorFlow.js, make it ideal for production environments.
+- **Work on large-scale deep learning projects:** TensorFlow’s comprehensive ecosystem supports distributed training and has tools like TensorBoard for visualization.
+- **Require high performance and scalability:** TensorFlow is optimized for performance and can leverage GPUs and TPUs for accelerated computing.
+- **Want extensive support and documentation:** TensorFlow has a large community and extensive documentation, which can be very helpful for both beginners and advanced users.
+
+## Example Use Cases
+
+- Building and deploying complex neural networks for image recognition, natural language processing, or recommendation systems.
+- Developing models that need to be run on mobile or embedded devices.
\ No newline at end of file
From ba9abd57a77ccfeab63e89f28720a97fb13980ae Mon Sep 17 00:00:00 2001
From: Krishna Kaushik <131583096+kRiShNa-429407@users.noreply.github.com>
Date: Sat, 18 May 2024 22:11:38 +0530
Subject: [PATCH 068/405] Add files via upload
---
contrib/pandas/Titanic.csv | 1310 ++++++++++++++++++++++++++++++++++++
1 file changed, 1310 insertions(+)
create mode 100644 contrib/pandas/Titanic.csv
diff --git a/contrib/pandas/Titanic.csv b/contrib/pandas/Titanic.csv
new file mode 100644
index 0000000..f8d49dc
--- /dev/null
+++ b/contrib/pandas/Titanic.csv
@@ -0,0 +1,1310 @@
+"pclass","survived","name","sex","age","sibsp","parch","ticket","fare","cabin","embarked","boat","body","home.dest"
+1,1,"Allen, Miss. Elisabeth Walton","female",29,0,0,"24160",211.3375,"B5","S","2",,"St Louis, MO"
+1,1,"Allison, Master. Hudson Trevor","male",0.92,1,2,"113781",151.5500,"C22 C26","S","11",,"Montreal, PQ / Chesterville, ON"
+1,0,"Allison, Miss. Helen Loraine","female",2,1,2,"113781",151.5500,"C22 C26","S",,,"Montreal, PQ / Chesterville, ON"
+1,0,"Allison, Mr. Hudson Joshua Creighton","male",30,1,2,"113781",151.5500,"C22 C26","S",,"135","Montreal, PQ / Chesterville, ON"
+1,0,"Allison, Mrs. Hudson J C (Bessie Waldo Daniels)","female",25,1,2,"113781",151.5500,"C22 C26","S",,,"Montreal, PQ / Chesterville, ON"
+1,1,"Anderson, Mr. Harry","male",48,0,0,"19952",26.5500,"E12","S","3",,"New York, NY"
+1,1,"Andrews, Miss. Kornelia Theodosia","female",63,1,0,"13502",77.9583,"D7","S","10",,"Hudson, NY"
+1,0,"Andrews, Mr. Thomas Jr","male",39,0,0,"112050",0.0000,"A36","S",,,"Belfast, NI"
+1,1,"Appleton, Mrs. Edward Dale (Charlotte Lamson)","female",53,2,0,"11769",51.4792,"C101","S","D",,"Bayside, Queens, NY"
+1,0,"Artagaveytia, Mr. Ramon","male",71,0,0,"PC 17609",49.5042,,"C",,"22","Montevideo, Uruguay"
+1,0,"Astor, Col. John Jacob","male",47,1,0,"PC 17757",227.5250,"C62 C64","C",,"124","New York, NY"
+1,1,"Astor, Mrs. John Jacob (Madeleine Talmadge Force)","female",18,1,0,"PC 17757",227.5250,"C62 C64","C","4",,"New York, NY"
+1,1,"Aubart, Mme. Leontine Pauline","female",24,0,0,"PC 17477",69.3000,"B35","C","9",,"Paris, France"
+1,1,"Barber, Miss. Ellen ""Nellie""","female",26,0,0,"19877",78.8500,,"S","6",,
+1,1,"Barkworth, Mr. Algernon Henry Wilson","male",80,0,0,"27042",30.0000,"A23","S","B",,"Hessle, Yorks"
+1,0,"Baumann, Mr. John D","male",,0,0,"PC 17318",25.9250,,"S",,,"New York, NY"
+1,0,"Baxter, Mr. Quigg Edmond","male",24,0,1,"PC 17558",247.5208,"B58 B60","C",,,"Montreal, PQ"
+1,1,"Baxter, Mrs. James (Helene DeLaudeniere Chaput)","female",50,0,1,"PC 17558",247.5208,"B58 B60","C","6",,"Montreal, PQ"
+1,1,"Bazzani, Miss. Albina","female",32,0,0,"11813",76.2917,"D15","C","8",,
+1,0,"Beattie, Mr. Thomson","male",36,0,0,"13050",75.2417,"C6","C","A",,"Winnipeg, MN"
+1,1,"Beckwith, Mr. Richard Leonard","male",37,1,1,"11751",52.5542,"D35","S","5",,"New York, NY"
+1,1,"Beckwith, Mrs. Richard Leonard (Sallie Monypeny)","female",47,1,1,"11751",52.5542,"D35","S","5",,"New York, NY"
+1,1,"Behr, Mr. Karl Howell","male",26,0,0,"111369",30.0000,"C148","C","5",,"New York, NY"
+1,1,"Bidois, Miss. Rosalie","female",42,0,0,"PC 17757",227.5250,,"C","4",,
+1,1,"Bird, Miss. Ellen","female",29,0,0,"PC 17483",221.7792,"C97","S","8",,
+1,0,"Birnbaum, Mr. Jakob","male",25,0,0,"13905",26.0000,,"C",,"148","San Francisco, CA"
+1,1,"Bishop, Mr. Dickinson H","male",25,1,0,"11967",91.0792,"B49","C","7",,"Dowagiac, MI"
+1,1,"Bishop, Mrs. Dickinson H (Helen Walton)","female",19,1,0,"11967",91.0792,"B49","C","7",,"Dowagiac, MI"
+1,1,"Bissette, Miss. Amelia","female",35,0,0,"PC 17760",135.6333,"C99","S","8",,
+1,1,"Bjornstrom-Steffansson, Mr. Mauritz Hakan","male",28,0,0,"110564",26.5500,"C52","S","D",,"Stockholm, Sweden / Washington, DC"
+1,0,"Blackwell, Mr. Stephen Weart","male",45,0,0,"113784",35.5000,"T","S",,,"Trenton, NJ"
+1,1,"Blank, Mr. Henry","male",40,0,0,"112277",31.0000,"A31","C","7",,"Glen Ridge, NJ"
+1,1,"Bonnell, Miss. Caroline","female",30,0,0,"36928",164.8667,"C7","S","8",,"Youngstown, OH"
+1,1,"Bonnell, Miss. Elizabeth","female",58,0,0,"113783",26.5500,"C103","S","8",,"Birkdale, England Cleveland, Ohio"
+1,0,"Borebank, Mr. John James","male",42,0,0,"110489",26.5500,"D22","S",,,"London / Winnipeg, MB"
+1,1,"Bowen, Miss. Grace Scott","female",45,0,0,"PC 17608",262.3750,,"C","4",,"Cooperstown, NY"
+1,1,"Bowerman, Miss. Elsie Edith","female",22,0,1,"113505",55.0000,"E33","S","6",,"St Leonards-on-Sea, England Ohio"
+1,1,"Bradley, Mr. George (""George Arthur Brayton"")","male",,0,0,"111427",26.5500,,"S","9",,"Los Angeles, CA"
+1,0,"Brady, Mr. John Bertram","male",41,0,0,"113054",30.5000,"A21","S",,,"Pomeroy, WA"
+1,0,"Brandeis, Mr. Emil","male",48,0,0,"PC 17591",50.4958,"B10","C",,"208","Omaha, NE"
+1,0,"Brewe, Dr. Arthur Jackson","male",,0,0,"112379",39.6000,,"C",,,"Philadelphia, PA"
+1,1,"Brown, Mrs. James Joseph (Margaret Tobin)","female",44,0,0,"PC 17610",27.7208,"B4","C","6",,"Denver, CO"
+1,1,"Brown, Mrs. John Murray (Caroline Lane Lamson)","female",59,2,0,"11769",51.4792,"C101","S","D",,"Belmont, MA"
+1,1,"Bucknell, Mrs. William Robert (Emma Eliza Ward)","female",60,0,0,"11813",76.2917,"D15","C","8",,"Philadelphia, PA"
+1,1,"Burns, Miss. Elizabeth Margaret","female",41,0,0,"16966",134.5000,"E40","C","3",,
+1,0,"Butt, Major. Archibald Willingham","male",45,0,0,"113050",26.5500,"B38","S",,,"Washington, DC"
+1,0,"Cairns, Mr. Alexander","male",,0,0,"113798",31.0000,,"S",,,
+1,1,"Calderhead, Mr. Edward Pennington","male",42,0,0,"PC 17476",26.2875,"E24","S","5",,"New York, NY"
+1,1,"Candee, Mrs. Edward (Helen Churchill Hungerford)","female",53,0,0,"PC 17606",27.4458,,"C","6",,"Washington, DC"
+1,1,"Cardeza, Mr. Thomas Drake Martinez","male",36,0,1,"PC 17755",512.3292,"B51 B53 B55","C","3",,"Austria-Hungary / Germantown, Philadelphia, PA"
+1,1,"Cardeza, Mrs. James Warburton Martinez (Charlotte Wardle Drake)","female",58,0,1,"PC 17755",512.3292,"B51 B53 B55","C","3",,"Germantown, Philadelphia, PA"
+1,0,"Carlsson, Mr. Frans Olof","male",33,0,0,"695",5.0000,"B51 B53 B55","S",,,"New York, NY"
+1,0,"Carrau, Mr. Francisco M","male",28,0,0,"113059",47.1000,,"S",,,"Montevideo, Uruguay"
+1,0,"Carrau, Mr. Jose Pedro","male",17,0,0,"113059",47.1000,,"S",,,"Montevideo, Uruguay"
+1,1,"Carter, Master. William Thornton II","male",11,1,2,"113760",120.0000,"B96 B98","S","4",,"Bryn Mawr, PA"
+1,1,"Carter, Miss. Lucile Polk","female",14,1,2,"113760",120.0000,"B96 B98","S","4",,"Bryn Mawr, PA"
+1,1,"Carter, Mr. William Ernest","male",36,1,2,"113760",120.0000,"B96 B98","S","C",,"Bryn Mawr, PA"
+1,1,"Carter, Mrs. William Ernest (Lucile Polk)","female",36,1,2,"113760",120.0000,"B96 B98","S","4",,"Bryn Mawr, PA"
+1,0,"Case, Mr. Howard Brown","male",49,0,0,"19924",26.0000,,"S",,,"Ascot, Berkshire / Rochester, NY"
+1,1,"Cassebeer, Mrs. Henry Arthur Jr (Eleanor Genevieve Fosdick)","female",,0,0,"17770",27.7208,,"C","5",,"New York, NY"
+1,0,"Cavendish, Mr. Tyrell William","male",36,1,0,"19877",78.8500,"C46","S",,"172","Little Onn Hall, Staffs"
+1,1,"Cavendish, Mrs. Tyrell William (Julia Florence Siegel)","female",76,1,0,"19877",78.8500,"C46","S","6",,"Little Onn Hall, Staffs"
+1,0,"Chaffee, Mr. Herbert Fuller","male",46,1,0,"W.E.P. 5734",61.1750,"E31","S",,,"Amenia, ND"
+1,1,"Chaffee, Mrs. Herbert Fuller (Carrie Constance Toogood)","female",47,1,0,"W.E.P. 5734",61.1750,"E31","S","4",,"Amenia, ND"
+1,1,"Chambers, Mr. Norman Campbell","male",27,1,0,"113806",53.1000,"E8","S","5",,"New York, NY / Ithaca, NY"
+1,1,"Chambers, Mrs. Norman Campbell (Bertha Griggs)","female",33,1,0,"113806",53.1000,"E8","S","5",,"New York, NY / Ithaca, NY"
+1,1,"Chaudanson, Miss. Victorine","female",36,0,0,"PC 17608",262.3750,"B61","C","4",,
+1,1,"Cherry, Miss. Gladys","female",30,0,0,"110152",86.5000,"B77","S","8",,"London, England"
+1,1,"Chevre, Mr. Paul Romaine","male",45,0,0,"PC 17594",29.7000,"A9","C","7",,"Paris, France"
+1,1,"Chibnall, Mrs. (Edith Martha Bowerman)","female",,0,1,"113505",55.0000,"E33","S","6",,"St Leonards-on-Sea, England Ohio"
+1,0,"Chisholm, Mr. Roderick Robert Crispin","male",,0,0,"112051",0.0000,,"S",,,"Liverpool, England / Belfast"
+1,0,"Clark, Mr. Walter Miller","male",27,1,0,"13508",136.7792,"C89","C",,,"Los Angeles, CA"
+1,1,"Clark, Mrs. Walter Miller (Virginia McDowell)","female",26,1,0,"13508",136.7792,"C89","C","4",,"Los Angeles, CA"
+1,1,"Cleaver, Miss. Alice","female",22,0,0,"113781",151.5500,,"S","11",,
+1,0,"Clifford, Mr. George Quincy","male",,0,0,"110465",52.0000,"A14","S",,,"Stoughton, MA"
+1,0,"Colley, Mr. Edward Pomeroy","male",47,0,0,"5727",25.5875,"E58","S",,,"Victoria, BC"
+1,1,"Compton, Miss. Sara Rebecca","female",39,1,1,"PC 17756",83.1583,"E49","C","14",,"Lakewood, NJ"
+1,0,"Compton, Mr. Alexander Taylor Jr","male",37,1,1,"PC 17756",83.1583,"E52","C",,,"Lakewood, NJ"
+1,1,"Compton, Mrs. Alexander Taylor (Mary Eliza Ingersoll)","female",64,0,2,"PC 17756",83.1583,"E45","C","14",,"Lakewood, NJ"
+1,1,"Cornell, Mrs. Robert Clifford (Malvina Helen Lamson)","female",55,2,0,"11770",25.7000,"C101","S","2",,"New York, NY"
+1,0,"Crafton, Mr. John Bertram","male",,0,0,"113791",26.5500,,"S",,,"Roachdale, IN"
+1,0,"Crosby, Capt. Edward Gifford","male",70,1,1,"WE/P 5735",71.0000,"B22","S",,"269","Milwaukee, WI"
+1,1,"Crosby, Miss. Harriet R","female",36,0,2,"WE/P 5735",71.0000,"B22","S","7",,"Milwaukee, WI"
+1,1,"Crosby, Mrs. Edward Gifford (Catherine Elizabeth Halstead)","female",64,1,1,"112901",26.5500,"B26","S","7",,"Milwaukee, WI"
+1,0,"Cumings, Mr. John Bradley","male",39,1,0,"PC 17599",71.2833,"C85","C",,,"New York, NY"
+1,1,"Cumings, Mrs. John Bradley (Florence Briggs Thayer)","female",38,1,0,"PC 17599",71.2833,"C85","C","4",,"New York, NY"
+1,1,"Daly, Mr. Peter Denis ","male",51,0,0,"113055",26.5500,"E17","S","5 9",,"Lima, Peru"
+1,1,"Daniel, Mr. Robert Williams","male",27,0,0,"113804",30.5000,,"S","3",,"Philadelphia, PA"
+1,1,"Daniels, Miss. Sarah","female",33,0,0,"113781",151.5500,,"S","8",,
+1,0,"Davidson, Mr. Thornton","male",31,1,0,"F.C. 12750",52.0000,"B71","S",,,"Montreal, PQ"
+1,1,"Davidson, Mrs. Thornton (Orian Hays)","female",27,1,2,"F.C. 12750",52.0000,"B71","S","3",,"Montreal, PQ"
+1,1,"Dick, Mr. Albert Adrian","male",31,1,0,"17474",57.0000,"B20","S","3",,"Calgary, AB"
+1,1,"Dick, Mrs. Albert Adrian (Vera Gillespie)","female",17,1,0,"17474",57.0000,"B20","S","3",,"Calgary, AB"
+1,1,"Dodge, Dr. Washington","male",53,1,1,"33638",81.8583,"A34","S","13",,"San Francisco, CA"
+1,1,"Dodge, Master. Washington","male",4,0,2,"33638",81.8583,"A34","S","5",,"San Francisco, CA"
+1,1,"Dodge, Mrs. Washington (Ruth Vidaver)","female",54,1,1,"33638",81.8583,"A34","S","5",,"San Francisco, CA"
+1,0,"Douglas, Mr. Walter Donald","male",50,1,0,"PC 17761",106.4250,"C86","C",,"62","Deephaven, MN / Cedar Rapids, IA"
+1,1,"Douglas, Mrs. Frederick Charles (Mary Helene Baxter)","female",27,1,1,"PC 17558",247.5208,"B58 B60","C","6",,"Montreal, PQ"
+1,1,"Douglas, Mrs. Walter Donald (Mahala Dutton)","female",48,1,0,"PC 17761",106.4250,"C86","C","2",,"Deephaven, MN / Cedar Rapids, IA"
+1,1,"Duff Gordon, Lady. (Lucille Christiana Sutherland) (""Mrs Morgan"")","female",48,1,0,"11755",39.6000,"A16","C","1",,"London / Paris"
+1,1,"Duff Gordon, Sir. Cosmo Edmund (""Mr Morgan"")","male",49,1,0,"PC 17485",56.9292,"A20","C","1",,"London / Paris"
+1,0,"Dulles, Mr. William Crothers","male",39,0,0,"PC 17580",29.7000,"A18","C",,"133","Philadelphia, PA"
+1,1,"Earnshaw, Mrs. Boulton (Olive Potter)","female",23,0,1,"11767",83.1583,"C54","C","7",,"Mt Airy, Philadelphia, PA"
+1,1,"Endres, Miss. Caroline Louise","female",38,0,0,"PC 17757",227.5250,"C45","C","4",,"New York, NY"
+1,1,"Eustis, Miss. Elizabeth Mussey","female",54,1,0,"36947",78.2667,"D20","C","4",,"Brookline, MA"
+1,0,"Evans, Miss. Edith Corse","female",36,0,0,"PC 17531",31.6792,"A29","C",,,"New York, NY"
+1,0,"Farthing, Mr. John","male",,0,0,"PC 17483",221.7792,"C95","S",,,
+1,1,"Flegenheim, Mrs. Alfred (Antoinette)","female",,0,0,"PC 17598",31.6833,,"S","7",,"New York, NY"
+1,1,"Fleming, Miss. Margaret","female",,0,0,"17421",110.8833,,"C","4",,
+1,1,"Flynn, Mr. John Irwin (""Irving"")","male",36,0,0,"PC 17474",26.3875,"E25","S","5",,"Brooklyn, NY"
+1,0,"Foreman, Mr. Benjamin Laventall","male",30,0,0,"113051",27.7500,"C111","C",,,"New York, NY"
+1,1,"Fortune, Miss. Alice Elizabeth","female",24,3,2,"19950",263.0000,"C23 C25 C27","S","10",,"Winnipeg, MB"
+1,1,"Fortune, Miss. Ethel Flora","female",28,3,2,"19950",263.0000,"C23 C25 C27","S","10",,"Winnipeg, MB"
+1,1,"Fortune, Miss. Mabel Helen","female",23,3,2,"19950",263.0000,"C23 C25 C27","S","10",,"Winnipeg, MB"
+1,0,"Fortune, Mr. Charles Alexander","male",19,3,2,"19950",263.0000,"C23 C25 C27","S",,,"Winnipeg, MB"
+1,0,"Fortune, Mr. Mark","male",64,1,4,"19950",263.0000,"C23 C25 C27","S",,,"Winnipeg, MB"
+1,1,"Fortune, Mrs. Mark (Mary McDougald)","female",60,1,4,"19950",263.0000,"C23 C25 C27","S","10",,"Winnipeg, MB"
+1,1,"Francatelli, Miss. Laura Mabel","female",30,0,0,"PC 17485",56.9292,"E36","C","1",,
+1,0,"Franklin, Mr. Thomas Parham","male",,0,0,"113778",26.5500,"D34","S",,,"Westcliff-on-Sea, Essex"
+1,1,"Frauenthal, Dr. Henry William","male",50,2,0,"PC 17611",133.6500,,"S","5",,"New York, NY"
+1,1,"Frauenthal, Mr. Isaac Gerald","male",43,1,0,"17765",27.7208,"D40","C","5",,"New York, NY"
+1,1,"Frauenthal, Mrs. Henry William (Clara Heinsheimer)","female",,1,0,"PC 17611",133.6500,,"S","5",,"New York, NY"
+1,1,"Frolicher, Miss. Hedwig Margaritha","female",22,0,2,"13568",49.5000,"B39","C","5",,"Zurich, Switzerland"
+1,1,"Frolicher-Stehli, Mr. Maxmillian","male",60,1,1,"13567",79.2000,"B41","C","5",,"Zurich, Switzerland"
+1,1,"Frolicher-Stehli, Mrs. Maxmillian (Margaretha Emerentia Stehli)","female",48,1,1,"13567",79.2000,"B41","C","5",,"Zurich, Switzerland"
+1,0,"Fry, Mr. Richard","male",,0,0,"112058",0.0000,"B102","S",,,
+1,0,"Futrelle, Mr. Jacques Heath","male",37,1,0,"113803",53.1000,"C123","S",,,"Scituate, MA"
+1,1,"Futrelle, Mrs. Jacques Heath (Lily May Peel)","female",35,1,0,"113803",53.1000,"C123","S","D",,"Scituate, MA"
+1,0,"Gee, Mr. Arthur H","male",47,0,0,"111320",38.5000,"E63","S",,"275","St Anne's-on-Sea, Lancashire"
+1,1,"Geiger, Miss. Amalie","female",35,0,0,"113503",211.5000,"C130","C","4",,
+1,1,"Gibson, Miss. Dorothy Winifred","female",22,0,1,"112378",59.4000,,"C","7",,"New York, NY"
+1,1,"Gibson, Mrs. Leonard (Pauline C Boeson)","female",45,0,1,"112378",59.4000,,"C","7",,"New York, NY"
+1,0,"Giglio, Mr. Victor","male",24,0,0,"PC 17593",79.2000,"B86","C",,,
+1,1,"Goldenberg, Mr. Samuel L","male",49,1,0,"17453",89.1042,"C92","C","5",,"Paris, France / New York, NY"
+1,1,"Goldenberg, Mrs. Samuel L (Edwiga Grabowska)","female",,1,0,"17453",89.1042,"C92","C","5",,"Paris, France / New York, NY"
+1,0,"Goldschmidt, Mr. George B","male",71,0,0,"PC 17754",34.6542,"A5","C",,,"New York, NY"
+1,1,"Gracie, Col. Archibald IV","male",53,0,0,"113780",28.5000,"C51","C","B",,"Washington, DC"
+1,1,"Graham, Miss. Margaret Edith","female",19,0,0,"112053",30.0000,"B42","S","3",,"Greenwich, CT"
+1,0,"Graham, Mr. George Edward","male",38,0,1,"PC 17582",153.4625,"C91","S",,"147","Winnipeg, MB"
+1,1,"Graham, Mrs. William Thompson (Edith Junkins)","female",58,0,1,"PC 17582",153.4625,"C125","S","3",,"Greenwich, CT"
+1,1,"Greenfield, Mr. William Bertram","male",23,0,1,"PC 17759",63.3583,"D10 D12","C","7",,"New York, NY"
+1,1,"Greenfield, Mrs. Leo David (Blanche Strouse)","female",45,0,1,"PC 17759",63.3583,"D10 D12","C","7",,"New York, NY"
+1,0,"Guggenheim, Mr. Benjamin","male",46,0,0,"PC 17593",79.2000,"B82 B84","C",,,"New York, NY"
+1,1,"Harder, Mr. George Achilles","male",25,1,0,"11765",55.4417,"E50","C","5",,"Brooklyn, NY"
+1,1,"Harder, Mrs. George Achilles (Dorothy Annan)","female",25,1,0,"11765",55.4417,"E50","C","5",,"Brooklyn, NY"
+1,1,"Harper, Mr. Henry Sleeper","male",48,1,0,"PC 17572",76.7292,"D33","C","3",,"New York, NY"
+1,1,"Harper, Mrs. Henry Sleeper (Myna Haxtun)","female",49,1,0,"PC 17572",76.7292,"D33","C","3",,"New York, NY"
+1,0,"Harrington, Mr. Charles H","male",,0,0,"113796",42.4000,,"S",,,
+1,0,"Harris, Mr. Henry Birkhardt","male",45,1,0,"36973",83.4750,"C83","S",,,"New York, NY"
+1,1,"Harris, Mrs. Henry Birkhardt (Irene Wallach)","female",35,1,0,"36973",83.4750,"C83","S","D",,"New York, NY"
+1,0,"Harrison, Mr. William","male",40,0,0,"112059",0.0000,"B94","S",,"110",
+1,1,"Hassab, Mr. Hammad","male",27,0,0,"PC 17572",76.7292,"D49","C","3",,
+1,1,"Hawksford, Mr. Walter James","male",,0,0,"16988",30.0000,"D45","S","3",,"Kingston, Surrey"
+1,1,"Hays, Miss. Margaret Bechstein","female",24,0,0,"11767",83.1583,"C54","C","7",,"New York, NY"
+1,0,"Hays, Mr. Charles Melville","male",55,1,1,"12749",93.5000,"B69","S",,"307","Montreal, PQ"
+1,1,"Hays, Mrs. Charles Melville (Clara Jennings Gregg)","female",52,1,1,"12749",93.5000,"B69","S","3",,"Montreal, PQ"
+1,0,"Head, Mr. Christopher","male",42,0,0,"113038",42.5000,"B11","S",,,"London / Middlesex"
+1,0,"Hilliard, Mr. Herbert Henry","male",,0,0,"17463",51.8625,"E46","S",,,"Brighton, MA"
+1,0,"Hipkins, Mr. William Edward","male",55,0,0,"680",50.0000,"C39","S",,,"London / Birmingham"
+1,1,"Hippach, Miss. Jean Gertrude","female",16,0,1,"111361",57.9792,"B18","C","4",,"Chicago, IL"
+1,1,"Hippach, Mrs. Louis Albert (Ida Sophia Fischer)","female",44,0,1,"111361",57.9792,"B18","C","4",,"Chicago, IL"
+1,1,"Hogeboom, Mrs. John C (Anna Andrews)","female",51,1,0,"13502",77.9583,"D11","S","10",,"Hudson, NY"
+1,0,"Holverson, Mr. Alexander Oskar","male",42,1,0,"113789",52.0000,,"S",,"38","New York, NY"
+1,1,"Holverson, Mrs. Alexander Oskar (Mary Aline Towner)","female",35,1,0,"113789",52.0000,,"S","8",,"New York, NY"
+1,1,"Homer, Mr. Harry (""Mr E Haven"")","male",35,0,0,"111426",26.5500,,"C","15",,"Indianapolis, IN"
+1,1,"Hoyt, Mr. Frederick Maxfield","male",38,1,0,"19943",90.0000,"C93","S","D",,"New York, NY / Stamford CT"
+1,0,"Hoyt, Mr. William Fisher","male",,0,0,"PC 17600",30.6958,,"C","14",,"New York, NY"
+1,1,"Hoyt, Mrs. Frederick Maxfield (Jane Anne Forby)","female",35,1,0,"19943",90.0000,"C93","S","D",,"New York, NY / Stamford CT"
+1,1,"Icard, Miss. Amelie","female",38,0,0,"113572",80.0000,"B28",,"6",,
+1,0,"Isham, Miss. Ann Elizabeth","female",50,0,0,"PC 17595",28.7125,"C49","C",,,"Paris, France New York, NY"
+1,1,"Ismay, Mr. Joseph Bruce","male",49,0,0,"112058",0.0000,"B52 B54 B56","S","C",,"Liverpool"
+1,0,"Jones, Mr. Charles Cresson","male",46,0,0,"694",26.0000,,"S",,"80","Bennington, VT"
+1,0,"Julian, Mr. Henry Forbes","male",50,0,0,"113044",26.0000,"E60","S",,,"London"
+1,0,"Keeping, Mr. Edwin","male",32.5,0,0,"113503",211.5000,"C132","C",,"45",
+1,0,"Kent, Mr. Edward Austin","male",58,0,0,"11771",29.7000,"B37","C",,"258","Buffalo, NY"
+1,0,"Kenyon, Mr. Frederick R","male",41,1,0,"17464",51.8625,"D21","S",,,"Southington / Noank, CT"
+1,1,"Kenyon, Mrs. Frederick R (Marion)","female",,1,0,"17464",51.8625,"D21","S","8",,"Southington / Noank, CT"
+1,1,"Kimball, Mr. Edwin Nelson Jr","male",42,1,0,"11753",52.5542,"D19","S","5",,"Boston, MA"
+1,1,"Kimball, Mrs. Edwin Nelson Jr (Gertrude Parsons)","female",45,1,0,"11753",52.5542,"D19","S","5",,"Boston, MA"
+1,0,"Klaber, Mr. Herman","male",,0,0,"113028",26.5500,"C124","S",,,"Portland, OR"
+1,1,"Kreuchen, Miss. Emilie","female",39,0,0,"24160",211.3375,,"S","2",,
+1,1,"Leader, Dr. Alice (Farnham)","female",49,0,0,"17465",25.9292,"D17","S","8",,"New York, NY"
+1,1,"LeRoy, Miss. Bertha","female",30,0,0,"PC 17761",106.4250,,"C","2",,
+1,1,"Lesurer, Mr. Gustave J","male",35,0,0,"PC 17755",512.3292,"B101","C","3",,
+1,0,"Lewy, Mr. Ervin G","male",,0,0,"PC 17612",27.7208,,"C",,,"Chicago, IL"
+1,0,"Lindeberg-Lind, Mr. Erik Gustaf (""Mr Edward Lingrey"")","male",42,0,0,"17475",26.5500,,"S",,,"Stockholm, Sweden"
+1,1,"Lindstrom, Mrs. Carl Johan (Sigrid Posse)","female",55,0,0,"112377",27.7208,,"C","6",,"Stockholm, Sweden"
+1,1,"Lines, Miss. Mary Conover","female",16,0,1,"PC 17592",39.4000,"D28","S","9",,"Paris, France"
+1,1,"Lines, Mrs. Ernest H (Elizabeth Lindsey James)","female",51,0,1,"PC 17592",39.4000,"D28","S","9",,"Paris, France"
+1,0,"Long, Mr. Milton Clyde","male",29,0,0,"113501",30.0000,"D6","S",,"126","Springfield, MA"
+1,1,"Longley, Miss. Gretchen Fiske","female",21,0,0,"13502",77.9583,"D9","S","10",,"Hudson, NY"
+1,0,"Loring, Mr. Joseph Holland","male",30,0,0,"113801",45.5000,,"S",,,"London / New York, NY"
+1,1,"Lurette, Miss. Elise","female",58,0,0,"PC 17569",146.5208,"B80","C",,,
+1,1,"Madill, Miss. Georgette Alexandra","female",15,0,1,"24160",211.3375,"B5","S","2",,"St Louis, MO"
+1,0,"Maguire, Mr. John Edward","male",30,0,0,"110469",26.0000,"C106","S",,,"Brockton, MA"
+1,1,"Maioni, Miss. Roberta","female",16,0,0,"110152",86.5000,"B79","S","8",,
+1,1,"Marechal, Mr. Pierre","male",,0,0,"11774",29.7000,"C47","C","7",,"Paris, France"
+1,0,"Marvin, Mr. Daniel Warner","male",19,1,0,"113773",53.1000,"D30","S",,,"New York, NY"
+1,1,"Marvin, Mrs. Daniel Warner (Mary Graham Carmichael Farquarson)","female",18,1,0,"113773",53.1000,"D30","S","10",,"New York, NY"
+1,1,"Mayne, Mlle. Berthe Antonine (""Mrs de Villiers"")","female",24,0,0,"PC 17482",49.5042,"C90","C","6",,"Belgium Montreal, PQ"
+1,0,"McCaffry, Mr. Thomas Francis","male",46,0,0,"13050",75.2417,"C6","C",,"292","Vancouver, BC"
+1,0,"McCarthy, Mr. Timothy J","male",54,0,0,"17463",51.8625,"E46","S",,"175","Dorchester, MA"
+1,1,"McGough, Mr. James Robert","male",36,0,0,"PC 17473",26.2875,"E25","S","7",,"Philadelphia, PA"
+1,0,"Meyer, Mr. Edgar Joseph","male",28,1,0,"PC 17604",82.1708,,"C",,,"New York, NY"
+1,1,"Meyer, Mrs. Edgar Joseph (Leila Saks)","female",,1,0,"PC 17604",82.1708,,"C","6",,"New York, NY"
+1,0,"Millet, Mr. Francis Davis","male",65,0,0,"13509",26.5500,"E38","S",,"249","East Bridgewater, MA"
+1,0,"Minahan, Dr. William Edward","male",44,2,0,"19928",90.0000,"C78","Q",,"230","Fond du Lac, WI"
+1,1,"Minahan, Miss. Daisy E","female",33,1,0,"19928",90.0000,"C78","Q","14",,"Green Bay, WI"
+1,1,"Minahan, Mrs. William Edward (Lillian E Thorpe)","female",37,1,0,"19928",90.0000,"C78","Q","14",,"Fond du Lac, WI"
+1,1,"Mock, Mr. Philipp Edmund","male",30,1,0,"13236",57.7500,"C78","C","11",,"New York, NY"
+1,0,"Molson, Mr. Harry Markland","male",55,0,0,"113787",30.5000,"C30","S",,,"Montreal, PQ"
+1,0,"Moore, Mr. Clarence Bloomfield","male",47,0,0,"113796",42.4000,,"S",,,"Washington, DC"
+1,0,"Natsch, Mr. Charles H","male",37,0,1,"PC 17596",29.7000,"C118","C",,,"Brooklyn, NY"
+1,1,"Newell, Miss. Madeleine","female",31,1,0,"35273",113.2750,"D36","C","6",,"Lexington, MA"
+1,1,"Newell, Miss. Marjorie","female",23,1,0,"35273",113.2750,"D36","C","6",,"Lexington, MA"
+1,0,"Newell, Mr. Arthur Webster","male",58,0,2,"35273",113.2750,"D48","C",,"122","Lexington, MA"
+1,1,"Newsom, Miss. Helen Monypeny","female",19,0,2,"11752",26.2833,"D47","S","5",,"New York, NY"
+1,0,"Nicholson, Mr. Arthur Ernest","male",64,0,0,"693",26.0000,,"S",,"263","Isle of Wight, England"
+1,1,"Oliva y Ocana, Dona. Fermina","female",39,0,0,"PC 17758",108.9000,"C105","C","8",,
+1,1,"Omont, Mr. Alfred Fernand","male",,0,0,"F.C. 12998",25.7417,,"C","7",,"Paris, France"
+1,1,"Ostby, Miss. Helene Ragnhild","female",22,0,1,"113509",61.9792,"B36","C","5",,"Providence, RI"
+1,0,"Ostby, Mr. Engelhart Cornelius","male",65,0,1,"113509",61.9792,"B30","C",,"234","Providence, RI"
+1,0,"Ovies y Rodriguez, Mr. Servando","male",28.5,0,0,"PC 17562",27.7208,"D43","C",,"189","?Havana, Cuba"
+1,0,"Parr, Mr. William Henry Marsh","male",,0,0,"112052",0.0000,,"S",,,"Belfast"
+1,0,"Partner, Mr. Austen","male",45.5,0,0,"113043",28.5000,"C124","S",,"166","Surbiton Hill, Surrey"
+1,0,"Payne, Mr. Vivian Ponsonby","male",23,0,0,"12749",93.5000,"B24","S",,,"Montreal, PQ"
+1,0,"Pears, Mr. Thomas Clinton","male",29,1,0,"113776",66.6000,"C2","S",,,"Isleworth, England"
+1,1,"Pears, Mrs. Thomas (Edith Wearne)","female",22,1,0,"113776",66.6000,"C2","S","8",,"Isleworth, England"
+1,0,"Penasco y Castellana, Mr. Victor de Satode","male",18,1,0,"PC 17758",108.9000,"C65","C",,,"Madrid, Spain"
+1,1,"Penasco y Castellana, Mrs. Victor de Satode (Maria Josefa Perez de Soto y Vallejo)","female",17,1,0,"PC 17758",108.9000,"C65","C","8",,"Madrid, Spain"
+1,1,"Perreault, Miss. Anne","female",30,0,0,"12749",93.5000,"B73","S","3",,
+1,1,"Peuchen, Major. Arthur Godfrey","male",52,0,0,"113786",30.5000,"C104","S","6",,"Toronto, ON"
+1,0,"Porter, Mr. Walter Chamberlain","male",47,0,0,"110465",52.0000,"C110","S",,"207","Worcester, MA"
+1,1,"Potter, Mrs. Thomas Jr (Lily Alexenia Wilson)","female",56,0,1,"11767",83.1583,"C50","C","7",,"Mt Airy, Philadelphia, PA"
+1,0,"Reuchlin, Jonkheer. John George","male",38,0,0,"19972",0.0000,,"S",,,"Rotterdam, Netherlands"
+1,1,"Rheims, Mr. George Alexander Lucien","male",,0,0,"PC 17607",39.6000,,"S","A",,"Paris / New York, NY"
+1,0,"Ringhini, Mr. Sante","male",22,0,0,"PC 17760",135.6333,,"C",,"232",
+1,0,"Robbins, Mr. Victor","male",,0,0,"PC 17757",227.5250,,"C",,,
+1,1,"Robert, Mrs. Edward Scott (Elisabeth Walton McMillan)","female",43,0,1,"24160",211.3375,"B3","S","2",,"St Louis, MO"
+1,0,"Roebling, Mr. Washington Augustus II","male",31,0,0,"PC 17590",50.4958,"A24","S",,,"Trenton, NJ"
+1,1,"Romaine, Mr. Charles Hallace (""Mr C Rolmane"")","male",45,0,0,"111428",26.5500,,"S","9",,"New York, NY"
+1,0,"Rood, Mr. Hugh Roscoe","male",,0,0,"113767",50.0000,"A32","S",,,"Seattle, WA"
+1,1,"Rosenbaum, Miss. Edith Louise","female",33,0,0,"PC 17613",27.7208,"A11","C","11",,"Paris, France"
+1,0,"Rosenshine, Mr. George (""Mr George Thorne"")","male",46,0,0,"PC 17585",79.2000,,"C",,"16","New York, NY"
+1,0,"Ross, Mr. John Hugo","male",36,0,0,"13049",40.1250,"A10","C",,,"Winnipeg, MB"
+1,1,"Rothes, the Countess. of (Lucy Noel Martha Dyer-Edwards)","female",33,0,0,"110152",86.5000,"B77","S","8",,"London Vancouver, BC"
+1,0,"Rothschild, Mr. Martin","male",55,1,0,"PC 17603",59.4000,,"C",,,"New York, NY"
+1,1,"Rothschild, Mrs. Martin (Elizabeth L. Barrett)","female",54,1,0,"PC 17603",59.4000,,"C","6",,"New York, NY"
+1,0,"Rowe, Mr. Alfred G","male",33,0,0,"113790",26.5500,,"S",,"109","London"
+1,1,"Ryerson, Master. John Borie","male",13,2,2,"PC 17608",262.3750,"B57 B59 B63 B66","C","4",,"Haverford, PA / Cooperstown, NY"
+1,1,"Ryerson, Miss. Emily Borie","female",18,2,2,"PC 17608",262.3750,"B57 B59 B63 B66","C","4",,"Haverford, PA / Cooperstown, NY"
+1,1,"Ryerson, Miss. Susan Parker ""Suzette""","female",21,2,2,"PC 17608",262.3750,"B57 B59 B63 B66","C","4",,"Haverford, PA / Cooperstown, NY"
+1,0,"Ryerson, Mr. Arthur Larned","male",61,1,3,"PC 17608",262.3750,"B57 B59 B63 B66","C",,,"Haverford, PA / Cooperstown, NY"
+1,1,"Ryerson, Mrs. Arthur Larned (Emily Maria Borie)","female",48,1,3,"PC 17608",262.3750,"B57 B59 B63 B66","C","4",,"Haverford, PA / Cooperstown, NY"
+1,1,"Saalfeld, Mr. Adolphe","male",,0,0,"19988",30.5000,"C106","S","3",,"Manchester, England"
+1,1,"Sagesser, Mlle. Emma","female",24,0,0,"PC 17477",69.3000,"B35","C","9",,
+1,1,"Salomon, Mr. Abraham L","male",,0,0,"111163",26.0000,,"S","1",,"New York, NY"
+1,1,"Schabert, Mrs. Paul (Emma Mock)","female",35,1,0,"13236",57.7500,"C28","C","11",,"New York, NY"
+1,1,"Serepeca, Miss. Augusta","female",30,0,0,"113798",31.0000,,"C","4",,
+1,1,"Seward, Mr. Frederic Kimber","male",34,0,0,"113794",26.5500,,"S","7",,"New York, NY"
+1,1,"Shutes, Miss. Elizabeth W","female",40,0,0,"PC 17582",153.4625,"C125","S","3",,"New York, NY / Greenwich CT"
+1,1,"Silverthorne, Mr. Spencer Victor","male",35,0,0,"PC 17475",26.2875,"E24","S","5",,"St Louis, MO"
+1,0,"Silvey, Mr. William Baird","male",50,1,0,"13507",55.9000,"E44","S",,,"Duluth, MN"
+1,1,"Silvey, Mrs. William Baird (Alice Munger)","female",39,1,0,"13507",55.9000,"E44","S","11",,"Duluth, MN"
+1,1,"Simonius-Blumer, Col. Oberst Alfons","male",56,0,0,"13213",35.5000,"A26","C","3",,"Basel, Switzerland"
+1,1,"Sloper, Mr. William Thompson","male",28,0,0,"113788",35.5000,"A6","S","7",,"New Britain, CT"
+1,0,"Smart, Mr. John Montgomery","male",56,0,0,"113792",26.5500,,"S",,,"New York, NY"
+1,0,"Smith, Mr. James Clinch","male",56,0,0,"17764",30.6958,"A7","C",,,"St James, Long Island, NY"
+1,0,"Smith, Mr. Lucien Philip","male",24,1,0,"13695",60.0000,"C31","S",,,"Huntington, WV"
+1,0,"Smith, Mr. Richard William","male",,0,0,"113056",26.0000,"A19","S",,,"Streatham, Surrey"
+1,1,"Smith, Mrs. Lucien Philip (Mary Eloise Hughes)","female",18,1,0,"13695",60.0000,"C31","S","6",,"Huntington, WV"
+1,1,"Snyder, Mr. John Pillsbury","male",24,1,0,"21228",82.2667,"B45","S","7",,"Minneapolis, MN"
+1,1,"Snyder, Mrs. John Pillsbury (Nelle Stevenson)","female",23,1,0,"21228",82.2667,"B45","S","7",,"Minneapolis, MN"
+1,1,"Spedden, Master. Robert Douglas","male",6,0,2,"16966",134.5000,"E34","C","3",,"Tuxedo Park, NY"
+1,1,"Spedden, Mr. Frederic Oakley","male",45,1,1,"16966",134.5000,"E34","C","3",,"Tuxedo Park, NY"
+1,1,"Spedden, Mrs. Frederic Oakley (Margaretta Corning Stone)","female",40,1,1,"16966",134.5000,"E34","C","3",,"Tuxedo Park, NY"
+1,0,"Spencer, Mr. William Augustus","male",57,1,0,"PC 17569",146.5208,"B78","C",,,"Paris, France"
+1,1,"Spencer, Mrs. William Augustus (Marie Eugenie)","female",,1,0,"PC 17569",146.5208,"B78","C","6",,"Paris, France"
+1,1,"Stahelin-Maeglin, Dr. Max","male",32,0,0,"13214",30.5000,"B50","C","3",,"Basel, Switzerland"
+1,0,"Stead, Mr. William Thomas","male",62,0,0,"113514",26.5500,"C87","S",,,"Wimbledon Park, London / Hayling Island, Hants"
+1,1,"Stengel, Mr. Charles Emil Henry","male",54,1,0,"11778",55.4417,"C116","C","1",,"Newark, NJ"
+1,1,"Stengel, Mrs. Charles Emil Henry (Annie May Morris)","female",43,1,0,"11778",55.4417,"C116","C","5",,"Newark, NJ"
+1,1,"Stephenson, Mrs. Walter Bertram (Martha Eustis)","female",52,1,0,"36947",78.2667,"D20","C","4",,"Haverford, PA"
+1,0,"Stewart, Mr. Albert A","male",,0,0,"PC 17605",27.7208,,"C",,,"Gallipolis, Ohio / ? Paris / New York"
+1,1,"Stone, Mrs. George Nelson (Martha Evelyn)","female",62,0,0,"113572",80.0000,"B28",,"6",,"Cincinatti, OH"
+1,0,"Straus, Mr. Isidor","male",67,1,0,"PC 17483",221.7792,"C55 C57","S",,"96","New York, NY"
+1,0,"Straus, Mrs. Isidor (Rosalie Ida Blun)","female",63,1,0,"PC 17483",221.7792,"C55 C57","S",,,"New York, NY"
+1,0,"Sutton, Mr. Frederick","male",61,0,0,"36963",32.3208,"D50","S",,"46","Haddenfield, NJ"
+1,1,"Swift, Mrs. Frederick Joel (Margaret Welles Barron)","female",48,0,0,"17466",25.9292,"D17","S","8",,"Brooklyn, NY"
+1,1,"Taussig, Miss. Ruth","female",18,0,2,"110413",79.6500,"E68","S","8",,"New York, NY"
+1,0,"Taussig, Mr. Emil","male",52,1,1,"110413",79.6500,"E67","S",,,"New York, NY"
+1,1,"Taussig, Mrs. Emil (Tillie Mandelbaum)","female",39,1,1,"110413",79.6500,"E67","S","8",,"New York, NY"
+1,1,"Taylor, Mr. Elmer Zebley","male",48,1,0,"19996",52.0000,"C126","S","5 7",,"London / East Orange, NJ"
+1,1,"Taylor, Mrs. Elmer Zebley (Juliet Cummins Wright)","female",,1,0,"19996",52.0000,"C126","S","5 7",,"London / East Orange, NJ"
+1,0,"Thayer, Mr. John Borland","male",49,1,1,"17421",110.8833,"C68","C",,,"Haverford, PA"
+1,1,"Thayer, Mr. John Borland Jr","male",17,0,2,"17421",110.8833,"C70","C","B",,"Haverford, PA"
+1,1,"Thayer, Mrs. John Borland (Marian Longstreth Morris)","female",39,1,1,"17421",110.8833,"C68","C","4",,"Haverford, PA"
+1,1,"Thorne, Mrs. Gertrude Maybelle","female",,0,0,"PC 17585",79.2000,,"C","D",,"New York, NY"
+1,1,"Tucker, Mr. Gilbert Milligan Jr","male",31,0,0,"2543",28.5375,"C53","C","7",,"Albany, NY"
+1,0,"Uruchurtu, Don. Manuel E","male",40,0,0,"PC 17601",27.7208,,"C",,,"Mexico City, Mexico"
+1,0,"Van der hoef, Mr. Wyckoff","male",61,0,0,"111240",33.5000,"B19","S",,"245","Brooklyn, NY"
+1,0,"Walker, Mr. William Anderson","male",47,0,0,"36967",34.0208,"D46","S",,,"East Orange, NJ"
+1,1,"Ward, Miss. Anna","female",35,0,0,"PC 17755",512.3292,,"C","3",,
+1,0,"Warren, Mr. Frank Manley","male",64,1,0,"110813",75.2500,"D37","C",,,"Portland, OR"
+1,1,"Warren, Mrs. Frank Manley (Anna Sophia Atkinson)","female",60,1,0,"110813",75.2500,"D37","C","5",,"Portland, OR"
+1,0,"Weir, Col. John","male",60,0,0,"113800",26.5500,,"S",,,"England Salt Lake City, Utah"
+1,0,"White, Mr. Percival Wayland","male",54,0,1,"35281",77.2875,"D26","S",,,"Brunswick, ME"
+1,0,"White, Mr. Richard Frasar","male",21,0,1,"35281",77.2875,"D26","S",,"169","Brunswick, ME"
+1,1,"White, Mrs. John Stuart (Ella Holmes)","female",55,0,0,"PC 17760",135.6333,"C32","C","8",,"New York, NY / Briarcliff Manor NY"
+1,1,"Wick, Miss. Mary Natalie","female",31,0,2,"36928",164.8667,"C7","S","8",,"Youngstown, OH"
+1,0,"Wick, Mr. George Dennick","male",57,1,1,"36928",164.8667,,"S",,,"Youngstown, OH"
+1,1,"Wick, Mrs. George Dennick (Mary Hitchcock)","female",45,1,1,"36928",164.8667,,"S","8",,"Youngstown, OH"
+1,0,"Widener, Mr. George Dunton","male",50,1,1,"113503",211.5000,"C80","C",,,"Elkins Park, PA"
+1,0,"Widener, Mr. Harry Elkins","male",27,0,2,"113503",211.5000,"C82","C",,,"Elkins Park, PA"
+1,1,"Widener, Mrs. George Dunton (Eleanor Elkins)","female",50,1,1,"113503",211.5000,"C80","C","4",,"Elkins Park, PA"
+1,1,"Willard, Miss. Constance","female",21,0,0,"113795",26.5500,,"S","8 10",,"Duluth, MN"
+1,0,"Williams, Mr. Charles Duane","male",51,0,1,"PC 17597",61.3792,,"C",,,"Geneva, Switzerland / Radnor, PA"
+1,1,"Williams, Mr. Richard Norris II","male",21,0,1,"PC 17597",61.3792,,"C","A",,"Geneva, Switzerland / Radnor, PA"
+1,0,"Williams-Lambert, Mr. Fletcher Fellows","male",,0,0,"113510",35.0000,"C128","S",,,"London, England"
+1,1,"Wilson, Miss. Helen Alice","female",31,0,0,"16966",134.5000,"E39 E41","C","3",,
+1,1,"Woolner, Mr. Hugh","male",,0,0,"19947",35.5000,"C52","S","D",,"London, England"
+1,0,"Wright, Mr. George","male",62,0,0,"113807",26.5500,,"S",,,"Halifax, NS"
+1,1,"Young, Miss. Marie Grice","female",36,0,0,"PC 17760",135.6333,"C32","C","8",,"New York, NY / Washington, DC"
+2,0,"Abelson, Mr. Samuel","male",30,1,0,"P/PP 3381",24.0000,,"C",,,"Russia New York, NY"
+2,1,"Abelson, Mrs. Samuel (Hannah Wizosky)","female",28,1,0,"P/PP 3381",24.0000,,"C","10",,"Russia New York, NY"
+2,0,"Aldworth, Mr. Charles Augustus","male",30,0,0,"248744",13.0000,,"S",,,"Bryn Mawr, PA, USA"
+2,0,"Andrew, Mr. Edgardo Samuel","male",18,0,0,"231945",11.5000,,"S",,,"Buenos Aires, Argentina / New Jersey, NJ"
+2,0,"Andrew, Mr. Frank Thomas","male",25,0,0,"C.A. 34050",10.5000,,"S",,,"Cornwall, England Houghton, MI"
+2,0,"Angle, Mr. William A","male",34,1,0,"226875",26.0000,,"S",,,"Warwick, England"
+2,1,"Angle, Mrs. William A (Florence ""Mary"" Agnes Hughes)","female",36,1,0,"226875",26.0000,,"S","11",,"Warwick, England"
+2,0,"Ashby, Mr. John","male",57,0,0,"244346",13.0000,,"S",,,"West Hoboken, NJ"
+2,0,"Bailey, Mr. Percy Andrew","male",18,0,0,"29108",11.5000,,"S",,,"Penzance, Cornwall / Akron, OH"
+2,0,"Baimbrigge, Mr. Charles Robert","male",23,0,0,"C.A. 31030",10.5000,,"S",,,"Guernsey"
+2,1,"Ball, Mrs. (Ada E Hall)","female",36,0,0,"28551",13.0000,"D","S","10",,"Bristol, Avon / Jacksonville, FL"
+2,0,"Banfield, Mr. Frederick James","male",28,0,0,"C.A./SOTON 34068",10.5000,,"S",,,"Plymouth, Dorset / Houghton, MI"
+2,0,"Bateman, Rev. Robert James","male",51,0,0,"S.O.P. 1166",12.5250,,"S",,"174","Jacksonville, FL"
+2,1,"Beane, Mr. Edward","male",32,1,0,"2908",26.0000,,"S","13",,"Norwich / New York, NY"
+2,1,"Beane, Mrs. Edward (Ethel Clarke)","female",19,1,0,"2908",26.0000,,"S","13",,"Norwich / New York, NY"
+2,0,"Beauchamp, Mr. Henry James","male",28,0,0,"244358",26.0000,,"S",,,"England"
+2,1,"Becker, Master. Richard F","male",1,2,1,"230136",39.0000,"F4","S","11",,"Guntur, India / Benton Harbour, MI"
+2,1,"Becker, Miss. Marion Louise","female",4,2,1,"230136",39.0000,"F4","S","11",,"Guntur, India / Benton Harbour, MI"
+2,1,"Becker, Miss. Ruth Elizabeth","female",12,2,1,"230136",39.0000,"F4","S","13",,"Guntur, India / Benton Harbour, MI"
+2,1,"Becker, Mrs. Allen Oliver (Nellie E Baumgardner)","female",36,0,3,"230136",39.0000,"F4","S","11",,"Guntur, India / Benton Harbour, MI"
+2,1,"Beesley, Mr. Lawrence","male",34,0,0,"248698",13.0000,"D56","S","13",,"London"
+2,1,"Bentham, Miss. Lilian W","female",19,0,0,"28404",13.0000,,"S","12",,"Rochester, NY"
+2,0,"Berriman, Mr. William John","male",23,0,0,"28425",13.0000,,"S",,,"St Ives, Cornwall / Calumet, MI"
+2,0,"Botsford, Mr. William Hull","male",26,0,0,"237670",13.0000,,"S",,,"Elmira, NY / Orange, NJ"
+2,0,"Bowenur, Mr. Solomon","male",42,0,0,"211535",13.0000,,"S",,,"London"
+2,0,"Bracken, Mr. James H","male",27,0,0,"220367",13.0000,,"S",,,"Lake Arthur, Chavez County, NM"
+2,1,"Brown, Miss. Amelia ""Mildred""","female",24,0,0,"248733",13.0000,"F33","S","11",,"London / Montreal, PQ"
+2,1,"Brown, Miss. Edith Eileen","female",15,0,2,"29750",39.0000,,"S","14",,"Cape Town, South Africa / Seattle, WA"
+2,0,"Brown, Mr. Thomas William Solomon","male",60,1,1,"29750",39.0000,,"S",,,"Cape Town, South Africa / Seattle, WA"
+2,1,"Brown, Mrs. Thomas William Solomon (Elizabeth Catherine Ford)","female",40,1,1,"29750",39.0000,,"S","14",,"Cape Town, South Africa / Seattle, WA"
+2,1,"Bryhl, Miss. Dagmar Jenny Ingeborg ","female",20,1,0,"236853",26.0000,,"S","12",,"Skara, Sweden / Rockford, IL"
+2,0,"Bryhl, Mr. Kurt Arnold Gottfrid","male",25,1,0,"236853",26.0000,,"S",,,"Skara, Sweden / Rockford, IL"
+2,1,"Buss, Miss. Kate","female",36,0,0,"27849",13.0000,,"S","9",,"Sittingbourne, England / San Diego, CA"
+2,0,"Butler, Mr. Reginald Fenton","male",25,0,0,"234686",13.0000,,"S",,"97","Southsea, Hants"
+2,0,"Byles, Rev. Thomas Roussel Davids","male",42,0,0,"244310",13.0000,,"S",,,"London"
+2,1,"Bystrom, Mrs. (Karolina)","female",42,0,0,"236852",13.0000,,"S",,,"New York, NY"
+2,1,"Caldwell, Master. Alden Gates","male",0.83,0,2,"248738",29.0000,,"S","13",,"Bangkok, Thailand / Roseville, IL"
+2,1,"Caldwell, Mr. Albert Francis","male",26,1,1,"248738",29.0000,,"S","13",,"Bangkok, Thailand / Roseville, IL"
+2,1,"Caldwell, Mrs. Albert Francis (Sylvia Mae Harbaugh)","female",22,1,1,"248738",29.0000,,"S","13",,"Bangkok, Thailand / Roseville, IL"
+2,1,"Cameron, Miss. Clear Annie","female",35,0,0,"F.C.C. 13528",21.0000,,"S","14",,"Mamaroneck, NY"
+2,0,"Campbell, Mr. William","male",,0,0,"239853",0.0000,,"S",,,"Belfast"
+2,0,"Carbines, Mr. William","male",19,0,0,"28424",13.0000,,"S",,"18","St Ives, Cornwall / Calumet, MI"
+2,0,"Carter, Mrs. Ernest Courtenay (Lilian Hughes)","female",44,1,0,"244252",26.0000,,"S",,,"London"
+2,0,"Carter, Rev. Ernest Courtenay","male",54,1,0,"244252",26.0000,,"S",,,"London"
+2,0,"Chapman, Mr. Charles Henry","male",52,0,0,"248731",13.5000,,"S",,"130","Bronx, NY"
+2,0,"Chapman, Mr. John Henry","male",37,1,0,"SC/AH 29037",26.0000,,"S",,"17","Cornwall / Spokane, WA"
+2,0,"Chapman, Mrs. John Henry (Sara Elizabeth Lawry)","female",29,1,0,"SC/AH 29037",26.0000,,"S",,,"Cornwall / Spokane, WA"
+2,1,"Christy, Miss. Julie Rachel","female",25,1,1,"237789",30.0000,,"S","12",,"London"
+2,1,"Christy, Mrs. (Alice Frances)","female",45,0,2,"237789",30.0000,,"S","12",,"London"
+2,0,"Clarke, Mr. Charles Valentine","male",29,1,0,"2003",26.0000,,"S",,,"England / San Francisco, CA"
+2,1,"Clarke, Mrs. Charles V (Ada Maria Winfield)","female",28,1,0,"2003",26.0000,,"S","14",,"England / San Francisco, CA"
+2,0,"Coleridge, Mr. Reginald Charles","male",29,0,0,"W./C. 14263",10.5000,,"S",,,"Hartford, Huntingdonshire"
+2,0,"Collander, Mr. Erik Gustaf","male",28,0,0,"248740",13.0000,,"S",,,"Helsinki, Finland Ashtabula, Ohio"
+2,1,"Collett, Mr. Sidney C Stuart","male",24,0,0,"28034",10.5000,,"S","9",,"London / Fort Byron, NY"
+2,1,"Collyer, Miss. Marjorie ""Lottie""","female",8,0,2,"C.A. 31921",26.2500,,"S","14",,"Bishopstoke, Hants / Fayette Valley, ID"
+2,0,"Collyer, Mr. Harvey","male",31,1,1,"C.A. 31921",26.2500,,"S",,,"Bishopstoke, Hants / Fayette Valley, ID"
+2,1,"Collyer, Mrs. Harvey (Charlotte Annie Tate)","female",31,1,1,"C.A. 31921",26.2500,,"S","14",,"Bishopstoke, Hants / Fayette Valley, ID"
+2,1,"Cook, Mrs. (Selena Rogers)","female",22,0,0,"W./C. 14266",10.5000,"F33","S","14",,"Pennsylvania"
+2,0,"Corbett, Mrs. Walter H (Irene Colvin)","female",30,0,0,"237249",13.0000,,"S",,,"Provo, UT"
+2,0,"Corey, Mrs. Percy C (Mary Phyllis Elizabeth Miller)","female",,0,0,"F.C.C. 13534",21.0000,,"S",,,"Upper Burma, India Pittsburgh, PA"
+2,0,"Cotterill, Mr. Henry ""Harry""","male",21,0,0,"29107",11.5000,,"S",,,"Penzance, Cornwall / Akron, OH"
+2,0,"Cunningham, Mr. Alfred Fleming","male",,0,0,"239853",0.0000,,"S",,,"Belfast"
+2,1,"Davies, Master. John Morgan Jr","male",8,1,1,"C.A. 33112",36.7500,,"S","14",,"St Ives, Cornwall / Hancock, MI"
+2,0,"Davies, Mr. Charles Henry","male",18,0,0,"S.O.C. 14879",73.5000,,"S",,,"Lyndhurst, England"
+2,1,"Davies, Mrs. John Morgan (Elizabeth Agnes Mary White) ","female",48,0,2,"C.A. 33112",36.7500,,"S","14",,"St Ives, Cornwall / Hancock, MI"
+2,1,"Davis, Miss. Mary","female",28,0,0,"237668",13.0000,,"S","13",,"London / Staten Island, NY"
+2,0,"de Brito, Mr. Jose Joaquim","male",32,0,0,"244360",13.0000,,"S",,,"Portugal / Sau Paulo, Brazil"
+2,0,"Deacon, Mr. Percy William","male",17,0,0,"S.O.C. 14879",73.5000,,"S",,,
+2,0,"del Carlo, Mr. Sebastiano","male",29,1,0,"SC/PARIS 2167",27.7208,,"C",,"295","Lucca, Italy / California"
+2,1,"del Carlo, Mrs. Sebastiano (Argenia Genovesi)","female",24,1,0,"SC/PARIS 2167",27.7208,,"C","12",,"Lucca, Italy / California"
+2,0,"Denbury, Mr. Herbert","male",25,0,0,"C.A. 31029",31.5000,,"S",,,"Guernsey / Elizabeth, NJ"
+2,0,"Dibden, Mr. William","male",18,0,0,"S.O.C. 14879",73.5000,,"S",,,"New Forest, England"
+2,1,"Doling, Miss. Elsie","female",18,0,1,"231919",23.0000,,"S",,,"Southampton"
+2,1,"Doling, Mrs. John T (Ada Julia Bone)","female",34,0,1,"231919",23.0000,,"S",,,"Southampton"
+2,0,"Downton, Mr. William James","male",54,0,0,"28403",26.0000,,"S",,,"Holley, NY"
+2,1,"Drew, Master. Marshall Brines","male",8,0,2,"28220",32.5000,,"S","10",,"Greenport, NY"
+2,0,"Drew, Mr. James Vivian","male",42,1,1,"28220",32.5000,,"S",,,"Greenport, NY"
+2,1,"Drew, Mrs. James Vivian (Lulu Thorne Christian)","female",34,1,1,"28220",32.5000,,"S","10",,"Greenport, NY"
+2,1,"Duran y More, Miss. Asuncion","female",27,1,0,"SC/PARIS 2149",13.8583,,"C","12",,"Barcelona, Spain / Havana, Cuba"
+2,1,"Duran y More, Miss. Florentina","female",30,1,0,"SC/PARIS 2148",13.8583,,"C","12",,"Barcelona, Spain / Havana, Cuba"
+2,0,"Eitemiller, Mr. George Floyd","male",23,0,0,"29751",13.0000,,"S",,,"England / Detroit, MI"
+2,0,"Enander, Mr. Ingvar","male",21,0,0,"236854",13.0000,,"S",,,"Goteborg, Sweden / Rockford, IL"
+2,0,"Fahlstrom, Mr. Arne Jonas","male",18,0,0,"236171",13.0000,,"S",,,"Oslo, Norway Bayonne, NJ"
+2,0,"Faunthorpe, Mr. Harry","male",40,1,0,"2926",26.0000,,"S",,"286","England / Philadelphia, PA"
+2,1,"Faunthorpe, Mrs. Lizzie (Elizabeth Anne Wilkinson)","female",29,1,0,"2926",26.0000,,"S","16",,
+2,0,"Fillbrook, Mr. Joseph Charles","male",18,0,0,"C.A. 15185",10.5000,,"S",,,"Cornwall / Houghton, MI"
+2,0,"Fox, Mr. Stanley Hubert","male",36,0,0,"229236",13.0000,,"S",,"236","Rochester, NY"
+2,0,"Frost, Mr. Anthony Wood ""Archie""","male",,0,0,"239854",0.0000,,"S",,,"Belfast"
+2,0,"Funk, Miss. Annie Clemmer","female",38,0,0,"237671",13.0000,,"S",,,"Janjgir, India / Pennsylvania"
+2,0,"Fynney, Mr. Joseph J","male",35,0,0,"239865",26.0000,,"S",,"322","Liverpool / Montreal, PQ"
+2,0,"Gale, Mr. Harry","male",38,1,0,"28664",21.0000,,"S",,,"Cornwall / Clear Creek, CO"
+2,0,"Gale, Mr. Shadrach","male",34,1,0,"28664",21.0000,,"S",,,"Cornwall / Clear Creek, CO"
+2,1,"Garside, Miss. Ethel","female",34,0,0,"243880",13.0000,,"S","12",,"Brooklyn, NY"
+2,0,"Gaskell, Mr. Alfred","male",16,0,0,"239865",26.0000,,"S",,,"Liverpool / Montreal, PQ"
+2,0,"Gavey, Mr. Lawrence","male",26,0,0,"31028",10.5000,,"S",,,"Guernsey / Elizabeth, NJ"
+2,0,"Gilbert, Mr. William","male",47,0,0,"C.A. 30769",10.5000,,"S",,,"Cornwall"
+2,0,"Giles, Mr. Edgar","male",21,1,0,"28133",11.5000,,"S",,,"Cornwall / Camden, NJ"
+2,0,"Giles, Mr. Frederick Edward","male",21,1,0,"28134",11.5000,,"S",,,"Cornwall / Camden, NJ"
+2,0,"Giles, Mr. Ralph","male",24,0,0,"248726",13.5000,,"S",,"297","West Kensington, London"
+2,0,"Gill, Mr. John William","male",24,0,0,"233866",13.0000,,"S",,"155","Clevedon, England"
+2,0,"Gillespie, Mr. William Henry","male",34,0,0,"12233",13.0000,,"S",,,"Vancouver, BC"
+2,0,"Givard, Mr. Hans Kristensen","male",30,0,0,"250646",13.0000,,"S",,"305",
+2,0,"Greenberg, Mr. Samuel","male",52,0,0,"250647",13.0000,,"S",,"19","Bronx, NY"
+2,0,"Hale, Mr. Reginald","male",30,0,0,"250653",13.0000,,"S",,"75","Auburn, NY"
+2,1,"Hamalainen, Master. Viljo","male",0.67,1,1,"250649",14.5000,,"S","4",,"Detroit, MI"
+2,1,"Hamalainen, Mrs. William (Anna)","female",24,0,2,"250649",14.5000,,"S","4",,"Detroit, MI"
+2,0,"Harbeck, Mr. William H","male",44,0,0,"248746",13.0000,,"S",,"35","Seattle, WA / Toledo, OH"
+2,1,"Harper, Miss. Annie Jessie ""Nina""","female",6,0,1,"248727",33.0000,,"S","11",,"Denmark Hill, Surrey / Chicago"
+2,0,"Harper, Rev. John","male",28,0,1,"248727",33.0000,,"S",,,"Denmark Hill, Surrey / Chicago"
+2,1,"Harris, Mr. George","male",62,0,0,"S.W./PP 752",10.5000,,"S","15",,"London"
+2,0,"Harris, Mr. Walter","male",30,0,0,"W/C 14208",10.5000,,"S",,,"Walthamstow, England"
+2,1,"Hart, Miss. Eva Miriam","female",7,0,2,"F.C.C. 13529",26.2500,,"S","14",,"Ilford, Essex / Winnipeg, MB"
+2,0,"Hart, Mr. Benjamin","male",43,1,1,"F.C.C. 13529",26.2500,,"S",,,"Ilford, Essex / Winnipeg, MB"
+2,1,"Hart, Mrs. Benjamin (Esther Ada Bloomfield)","female",45,1,1,"F.C.C. 13529",26.2500,,"S","14",,"Ilford, Essex / Winnipeg, MB"
+2,1,"Herman, Miss. Alice","female",24,1,2,"220845",65.0000,,"S","9",,"Somerset / Bernardsville, NJ"
+2,1,"Herman, Miss. Kate","female",24,1,2,"220845",65.0000,,"S","9",,"Somerset / Bernardsville, NJ"
+2,0,"Herman, Mr. Samuel","male",49,1,2,"220845",65.0000,,"S",,,"Somerset / Bernardsville, NJ"
+2,1,"Herman, Mrs. Samuel (Jane Laver)","female",48,1,2,"220845",65.0000,,"S","9",,"Somerset / Bernardsville, NJ"
+2,1,"Hewlett, Mrs. (Mary D Kingcome) ","female",55,0,0,"248706",16.0000,,"S","13",,"India / Rapid City, SD"
+2,0,"Hickman, Mr. Leonard Mark","male",24,2,0,"S.O.C. 14879",73.5000,,"S",,,"West Hampstead, London / Neepawa, MB"
+2,0,"Hickman, Mr. Lewis","male",32,2,0,"S.O.C. 14879",73.5000,,"S",,"256","West Hampstead, London / Neepawa, MB"
+2,0,"Hickman, Mr. Stanley George","male",21,2,0,"S.O.C. 14879",73.5000,,"S",,,"West Hampstead, London / Neepawa, MB"
+2,0,"Hiltunen, Miss. Marta","female",18,1,1,"250650",13.0000,,"S",,,"Kontiolahti, Finland / Detroit, MI"
+2,1,"Hocking, Miss. Ellen ""Nellie""","female",20,2,1,"29105",23.0000,,"S","4",,"Cornwall / Akron, OH"
+2,0,"Hocking, Mr. Richard George","male",23,2,1,"29104",11.5000,,"S",,,"Cornwall / Akron, OH"
+2,0,"Hocking, Mr. Samuel James Metcalfe","male",36,0,0,"242963",13.0000,,"S",,,"Devonport, England"
+2,1,"Hocking, Mrs. Elizabeth (Eliza Needs)","female",54,1,3,"29105",23.0000,,"S","4",,"Cornwall / Akron, OH"
+2,0,"Hodges, Mr. Henry Price","male",50,0,0,"250643",13.0000,,"S",,"149","Southampton"
+2,0,"Hold, Mr. Stephen","male",44,1,0,"26707",26.0000,,"S",,,"England / Sacramento, CA"
+2,1,"Hold, Mrs. Stephen (Annie Margaret Hill)","female",29,1,0,"26707",26.0000,,"S","10",,"England / Sacramento, CA"
+2,0,"Hood, Mr. Ambrose Jr","male",21,0,0,"S.O.C. 14879",73.5000,,"S",,,"New Forest, England"
+2,1,"Hosono, Mr. Masabumi","male",42,0,0,"237798",13.0000,,"S","10",,"Tokyo, Japan"
+2,0,"Howard, Mr. Benjamin","male",63,1,0,"24065",26.0000,,"S",,,"Swindon, England"
+2,0,"Howard, Mrs. Benjamin (Ellen Truelove Arman)","female",60,1,0,"24065",26.0000,,"S",,,"Swindon, England"
+2,0,"Hunt, Mr. George Henry","male",33,0,0,"SCO/W 1585",12.2750,,"S",,,"Philadelphia, PA"
+2,1,"Ilett, Miss. Bertha","female",17,0,0,"SO/C 14885",10.5000,,"S",,,"Guernsey"
+2,0,"Jacobsohn, Mr. Sidney Samuel","male",42,1,0,"243847",27.0000,,"S",,,"London"
+2,1,"Jacobsohn, Mrs. Sidney Samuel (Amy Frances Christy)","female",24,2,1,"243847",27.0000,,"S","12",,"London"
+2,0,"Jarvis, Mr. John Denzil","male",47,0,0,"237565",15.0000,,"S",,,"North Evington, England"
+2,0,"Jefferys, Mr. Clifford Thomas","male",24,2,0,"C.A. 31029",31.5000,,"S",,,"Guernsey / Elizabeth, NJ"
+2,0,"Jefferys, Mr. Ernest Wilfred","male",22,2,0,"C.A. 31029",31.5000,,"S",,,"Guernsey / Elizabeth, NJ"
+2,0,"Jenkin, Mr. Stephen Curnow","male",32,0,0,"C.A. 33111",10.5000,,"S",,,"St Ives, Cornwall / Houghton, MI"
+2,1,"Jerwan, Mrs. Amin S (Marie Marthe Thuillard)","female",23,0,0,"SC/AH Basle 541",13.7917,"D","C","11",,"New York, NY"
+2,0,"Kantor, Mr. Sinai","male",34,1,0,"244367",26.0000,,"S",,"283","Moscow / Bronx, NY"
+2,1,"Kantor, Mrs. Sinai (Miriam Sternin)","female",24,1,0,"244367",26.0000,,"S","12",,"Moscow / Bronx, NY"
+2,0,"Karnes, Mrs. J Frank (Claire Bennett)","female",22,0,0,"F.C.C. 13534",21.0000,,"S",,,"India / Pittsburgh, PA"
+2,1,"Keane, Miss. Nora A","female",,0,0,"226593",12.3500,"E101","Q","10",,"Harrisburg, PA"
+2,0,"Keane, Mr. Daniel","male",35,0,0,"233734",12.3500,,"Q",,,
+2,1,"Kelly, Mrs. Florence ""Fannie""","female",45,0,0,"223596",13.5000,,"S","9",,"London / New York, NY"
+2,0,"Kirkland, Rev. Charles Leonard","male",57,0,0,"219533",12.3500,,"Q",,,"Glasgow / Bangor, ME"
+2,0,"Knight, Mr. Robert J","male",,0,0,"239855",0.0000,,"S",,,"Belfast"
+2,0,"Kvillner, Mr. Johan Henrik Johannesson","male",31,0,0,"C.A. 18723",10.5000,,"S",,"165","Sweden / Arlington, NJ"
+2,0,"Lahtinen, Mrs. William (Anna Sylfven)","female",26,1,1,"250651",26.0000,,"S",,,"Minneapolis, MN"
+2,0,"Lahtinen, Rev. William","male",30,1,1,"250651",26.0000,,"S",,,"Minneapolis, MN"
+2,0,"Lamb, Mr. John Joseph","male",,0,0,"240261",10.7083,,"Q",,,
+2,1,"Laroche, Miss. Louise","female",1,1,2,"SC/Paris 2123",41.5792,,"C","14",,"Paris / Haiti"
+2,1,"Laroche, Miss. Simonne Marie Anne Andree","female",3,1,2,"SC/Paris 2123",41.5792,,"C","14",,"Paris / Haiti"
+2,0,"Laroche, Mr. Joseph Philippe Lemercier","male",25,1,2,"SC/Paris 2123",41.5792,,"C",,,"Paris / Haiti"
+2,1,"Laroche, Mrs. Joseph (Juliette Marie Louise Lafargue)","female",22,1,2,"SC/Paris 2123",41.5792,,"C","14",,"Paris / Haiti"
+2,1,"Lehmann, Miss. Bertha","female",17,0,0,"SC 1748",12.0000,,"C","12",,"Berne, Switzerland / Central City, IA"
+2,1,"Leitch, Miss. Jessie Wills","female",,0,0,"248727",33.0000,,"S","11",,"London / Chicago, IL"
+2,1,"Lemore, Mrs. (Amelia Milley)","female",34,0,0,"C.A. 34260",10.5000,"F33","S","14",,"Chicago, IL"
+2,0,"Levy, Mr. Rene Jacques","male",36,0,0,"SC/Paris 2163",12.8750,"D","C",,,"Montreal, PQ"
+2,0,"Leyson, Mr. Robert William Norman","male",24,0,0,"C.A. 29566",10.5000,,"S",,"108",
+2,0,"Lingane, Mr. John","male",61,0,0,"235509",12.3500,,"Q",,,
+2,0,"Louch, Mr. Charles Alexander","male",50,1,0,"SC/AH 3085",26.0000,,"S",,"121","Weston-Super-Mare, Somerset"
+2,1,"Louch, Mrs. Charles Alexander (Alice Adelaide Slow)","female",42,1,0,"SC/AH 3085",26.0000,,"S",,,"Weston-Super-Mare, Somerset"
+2,0,"Mack, Mrs. (Mary)","female",57,0,0,"S.O./P.P. 3",10.5000,"E77","S",,"52","Southampton / New York, NY"
+2,0,"Malachard, Mr. Noel","male",,0,0,"237735",15.0458,"D","C",,,"Paris"
+2,1,"Mallet, Master. Andre","male",1,0,2,"S.C./PARIS 2079",37.0042,,"C","10",,"Paris / Montreal, PQ"
+2,0,"Mallet, Mr. Albert","male",31,1,1,"S.C./PARIS 2079",37.0042,,"C",,,"Paris / Montreal, PQ"
+2,1,"Mallet, Mrs. Albert (Antoinette Magnin)","female",24,1,1,"S.C./PARIS 2079",37.0042,,"C","10",,"Paris / Montreal, PQ"
+2,0,"Mangiavacchi, Mr. Serafino Emilio","male",,0,0,"SC/A.3 2861",15.5792,,"C",,,"New York, NY"
+2,0,"Matthews, Mr. William John","male",30,0,0,"28228",13.0000,,"S",,,"St Austall, Cornwall"
+2,0,"Maybery, Mr. Frank Hubert","male",40,0,0,"239059",16.0000,,"S",,,"Weston-Super-Mare / Moose Jaw, SK"
+2,0,"McCrae, Mr. Arthur Gordon","male",32,0,0,"237216",13.5000,,"S",,"209","Sydney, Australia"
+2,0,"McCrie, Mr. James Matthew","male",30,0,0,"233478",13.0000,,"S",,,"Sarnia, ON"
+2,0,"McKane, Mr. Peter David","male",46,0,0,"28403",26.0000,,"S",,,"Rochester, NY"
+2,1,"Mellinger, Miss. Madeleine Violet","female",13,0,1,"250644",19.5000,,"S","14",,"England / Bennington, VT"
+2,1,"Mellinger, Mrs. (Elizabeth Anne Maidment)","female",41,0,1,"250644",19.5000,,"S","14",,"England / Bennington, VT"
+2,1,"Mellors, Mr. William John","male",19,0,0,"SW/PP 751",10.5000,,"S","B",,"Chelsea, London"
+2,0,"Meyer, Mr. August","male",39,0,0,"248723",13.0000,,"S",,,"Harrow-on-the-Hill, Middlesex"
+2,0,"Milling, Mr. Jacob Christian","male",48,0,0,"234360",13.0000,,"S",,"271","Copenhagen, Denmark"
+2,0,"Mitchell, Mr. Henry Michael","male",70,0,0,"C.A. 24580",10.5000,,"S",,,"Guernsey / Montclair, NJ and/or Toledo, Ohio"
+2,0,"Montvila, Rev. Juozas","male",27,0,0,"211536",13.0000,,"S",,,"Worcester, MA"
+2,0,"Moraweck, Dr. Ernest","male",54,0,0,"29011",14.0000,,"S",,,"Frankfort, KY"
+2,0,"Morley, Mr. Henry Samuel (""Mr Henry Marshall"")","male",39,0,0,"250655",26.0000,,"S",,,
+2,0,"Mudd, Mr. Thomas Charles","male",16,0,0,"S.O./P.P. 3",10.5000,,"S",,,"Halesworth, England"
+2,0,"Myles, Mr. Thomas Francis","male",62,0,0,"240276",9.6875,,"Q",,,"Cambridge, MA"
+2,0,"Nasser, Mr. Nicholas","male",32.5,1,0,"237736",30.0708,,"C",,"43","New York, NY"
+2,1,"Nasser, Mrs. Nicholas (Adele Achem)","female",14,1,0,"237736",30.0708,,"C",,,"New York, NY"
+2,1,"Navratil, Master. Edmond Roger","male",2,1,1,"230080",26.0000,"F2","S","D",,"Nice, France"
+2,1,"Navratil, Master. Michel M","male",3,1,1,"230080",26.0000,"F2","S","D",,"Nice, France"
+2,0,"Navratil, Mr. Michel (""Louis M Hoffman"")","male",36.5,0,2,"230080",26.0000,"F2","S",,"15","Nice, France"
+2,0,"Nesson, Mr. Israel","male",26,0,0,"244368",13.0000,"F2","S",,,"Boston, MA"
+2,0,"Nicholls, Mr. Joseph Charles","male",19,1,1,"C.A. 33112",36.7500,,"S",,"101","Cornwall / Hancock, MI"
+2,0,"Norman, Mr. Robert Douglas","male",28,0,0,"218629",13.5000,,"S",,"287","Glasgow"
+2,1,"Nourney, Mr. Alfred (""Baron von Drachstedt"")","male",20,0,0,"SC/PARIS 2166",13.8625,"D38","C","7",,"Cologne, Germany"
+2,1,"Nye, Mrs. (Elizabeth Ramell)","female",29,0,0,"C.A. 29395",10.5000,"F33","S","11",,"Folkstone, Kent / New York, NY"
+2,0,"Otter, Mr. Richard","male",39,0,0,"28213",13.0000,,"S",,,"Middleburg Heights, OH"
+2,1,"Oxenham, Mr. Percy Thomas","male",22,0,0,"W./C. 14260",10.5000,,"S","13",,"Pondersend, England / New Durham, NJ"
+2,1,"Padro y Manent, Mr. Julian","male",,0,0,"SC/PARIS 2146",13.8625,,"C","9",,"Spain / Havana, Cuba"
+2,0,"Pain, Dr. Alfred","male",23,0,0,"244278",10.5000,,"S",,,"Hamilton, ON"
+2,1,"Pallas y Castello, Mr. Emilio","male",29,0,0,"SC/PARIS 2147",13.8583,,"C","9",,"Spain / Havana, Cuba"
+2,0,"Parker, Mr. Clifford Richard","male",28,0,0,"SC 14888",10.5000,,"S",,,"St Andrews, Guernsey"
+2,0,"Parkes, Mr. Francis ""Frank""","male",,0,0,"239853",0.0000,,"S",,,"Belfast"
+2,1,"Parrish, Mrs. (Lutie Davis)","female",50,0,1,"230433",26.0000,,"S","12",,"Woodford County, KY"
+2,0,"Pengelly, Mr. Frederick William","male",19,0,0,"28665",10.5000,,"S",,,"Gunnislake, England / Butte, MT"
+2,0,"Pernot, Mr. Rene","male",,0,0,"SC/PARIS 2131",15.0500,,"C",,,
+2,0,"Peruschitz, Rev. Joseph Maria","male",41,0,0,"237393",13.0000,,"S",,,
+2,1,"Phillips, Miss. Alice Frances Louisa","female",21,0,1,"S.O./P.P. 2",21.0000,,"S","12",,"Ilfracombe, Devon"
+2,1,"Phillips, Miss. Kate Florence (""Mrs Kate Louise Phillips Marshall"")","female",19,0,0,"250655",26.0000,,"S","11",,"Worcester, England"
+2,0,"Phillips, Mr. Escott Robert","male",43,0,1,"S.O./P.P. 2",21.0000,,"S",,,"Ilfracombe, Devon"
+2,1,"Pinsky, Mrs. (Rosa)","female",32,0,0,"234604",13.0000,,"S","9",,"Russia"
+2,0,"Ponesell, Mr. Martin","male",34,0,0,"250647",13.0000,,"S",,,"Denmark / New York, NY"
+2,1,"Portaluppi, Mr. Emilio Ilario Giuseppe","male",30,0,0,"C.A. 34644",12.7375,,"C","14",,"Milford, NH"
+2,0,"Pulbaum, Mr. Franz","male",27,0,0,"SC/PARIS 2168",15.0333,,"C",,,"Paris"
+2,1,"Quick, Miss. Phyllis May","female",2,1,1,"26360",26.0000,,"S","11",,"Plymouth, Devon / Detroit, MI"
+2,1,"Quick, Miss. Winifred Vera","female",8,1,1,"26360",26.0000,,"S","11",,"Plymouth, Devon / Detroit, MI"
+2,1,"Quick, Mrs. Frederick Charles (Jane Richards)","female",33,0,2,"26360",26.0000,,"S","11",,"Plymouth, Devon / Detroit, MI"
+2,0,"Reeves, Mr. David","male",36,0,0,"C.A. 17248",10.5000,,"S",,,"Brighton, Sussex"
+2,0,"Renouf, Mr. Peter Henry","male",34,1,0,"31027",21.0000,,"S","12",,"Elizabeth, NJ"
+2,1,"Renouf, Mrs. Peter Henry (Lillian Jefferys)","female",30,3,0,"31027",21.0000,,"S",,,"Elizabeth, NJ"
+2,1,"Reynaldo, Ms. Encarnacion","female",28,0,0,"230434",13.0000,,"S","9",,"Spain"
+2,0,"Richard, Mr. Emile","male",23,0,0,"SC/PARIS 2133",15.0458,,"C",,,"Paris / Montreal, PQ"
+2,1,"Richards, Master. George Sibley","male",0.83,1,1,"29106",18.7500,,"S","4",,"Cornwall / Akron, OH"
+2,1,"Richards, Master. William Rowe","male",3,1,1,"29106",18.7500,,"S","4",,"Cornwall / Akron, OH"
+2,1,"Richards, Mrs. Sidney (Emily Hocking)","female",24,2,3,"29106",18.7500,,"S","4",,"Cornwall / Akron, OH"
+2,1,"Ridsdale, Miss. Lucy","female",50,0,0,"W./C. 14258",10.5000,,"S","13",,"London, England / Marietta, Ohio and Milwaukee, WI"
+2,0,"Rogers, Mr. Reginald Harry","male",19,0,0,"28004",10.5000,,"S",,,
+2,1,"Rugg, Miss. Emily","female",21,0,0,"C.A. 31026",10.5000,,"S","12",,"Guernsey / Wilmington, DE"
+2,0,"Schmidt, Mr. August","male",26,0,0,"248659",13.0000,,"S",,,"Newark, NJ"
+2,0,"Sedgwick, Mr. Charles Frederick Waddington","male",25,0,0,"244361",13.0000,,"S",,,"Liverpool"
+2,0,"Sharp, Mr. Percival James R","male",27,0,0,"244358",26.0000,,"S",,,"Hornsey, England"
+2,1,"Shelley, Mrs. William (Imanita Parrish Hall)","female",25,0,1,"230433",26.0000,,"S","12",,"Deer Lodge, MT"
+2,1,"Silven, Miss. Lyyli Karoliina","female",18,0,2,"250652",13.0000,,"S","16",,"Finland / Minneapolis, MN"
+2,1,"Sincock, Miss. Maude","female",20,0,0,"C.A. 33112",36.7500,,"S","11",,"Cornwall / Hancock, MI"
+2,1,"Sinkkonen, Miss. Anna","female",30,0,0,"250648",13.0000,,"S","10",,"Finland / Washington, DC"
+2,0,"Sjostedt, Mr. Ernst Adolf","male",59,0,0,"237442",13.5000,,"S",,,"Sault St Marie, ON"
+2,1,"Slayter, Miss. Hilda Mary","female",30,0,0,"234818",12.3500,,"Q","13",,"Halifax, NS"
+2,0,"Slemen, Mr. Richard James","male",35,0,0,"28206",10.5000,,"S",,,"Cornwall"
+2,1,"Smith, Miss. Marion Elsie","female",40,0,0,"31418",13.0000,,"S","9",,
+2,0,"Sobey, Mr. Samuel James Hayden","male",25,0,0,"C.A. 29178",13.0000,,"S",,,"Cornwall / Houghton, MI"
+2,0,"Stanton, Mr. Samuel Ward","male",41,0,0,"237734",15.0458,,"C",,,"New York, NY"
+2,0,"Stokes, Mr. Philip Joseph","male",25,0,0,"F.C.C. 13540",10.5000,,"S",,"81","Catford, Kent / Detroit, MI"
+2,0,"Swane, Mr. George","male",18.5,0,0,"248734",13.0000,"F","S",,"294",
+2,0,"Sweet, Mr. George Frederick","male",14,0,0,"220845",65.0000,,"S",,,"Somerset / Bernardsville, NJ"
+2,1,"Toomey, Miss. Ellen","female",50,0,0,"F.C.C. 13531",10.5000,,"S","9",,"Indianapolis, IN"
+2,0,"Troupiansky, Mr. Moses Aaron","male",23,0,0,"233639",13.0000,,"S",,,
+2,1,"Trout, Mrs. William H (Jessie L)","female",28,0,0,"240929",12.6500,,"S",,,"Columbus, OH"
+2,1,"Troutt, Miss. Edwina Celia ""Winnie""","female",27,0,0,"34218",10.5000,"E101","S","16",,"Bath, England / Massachusetts"
+2,0,"Turpin, Mr. William John Robert","male",29,1,0,"11668",21.0000,,"S",,,"Plymouth, England"
+2,0,"Turpin, Mrs. William John Robert (Dorothy Ann Wonnacott)","female",27,1,0,"11668",21.0000,,"S",,,"Plymouth, England"
+2,0,"Veal, Mr. James","male",40,0,0,"28221",13.0000,,"S",,,"Barre, Co Washington, VT"
+2,1,"Walcroft, Miss. Nellie","female",31,0,0,"F.C.C. 13528",21.0000,,"S","14",,"Mamaroneck, NY"
+2,0,"Ware, Mr. John James","male",30,1,0,"CA 31352",21.0000,,"S",,,"Bristol, England / New Britain, CT"
+2,0,"Ware, Mr. William Jeffery","male",23,1,0,"28666",10.5000,,"S",,,
+2,1,"Ware, Mrs. John James (Florence Louise Long)","female",31,0,0,"CA 31352",21.0000,,"S","10",,"Bristol, England / New Britain, CT"
+2,0,"Watson, Mr. Ennis Hastings","male",,0,0,"239856",0.0000,,"S",,,"Belfast"
+2,1,"Watt, Miss. Bertha J","female",12,0,0,"C.A. 33595",15.7500,,"S","9",,"Aberdeen / Portland, OR"
+2,1,"Watt, Mrs. James (Elizabeth ""Bessie"" Inglis Milne)","female",40,0,0,"C.A. 33595",15.7500,,"S","9",,"Aberdeen / Portland, OR"
+2,1,"Webber, Miss. Susan","female",32.5,0,0,"27267",13.0000,"E101","S","12",,"England / Hartford, CT"
+2,0,"Weisz, Mr. Leopold","male",27,1,0,"228414",26.0000,,"S",,"293","Bromsgrove, England / Montreal, PQ"
+2,1,"Weisz, Mrs. Leopold (Mathilde Francoise Pede)","female",29,1,0,"228414",26.0000,,"S","10",,"Bromsgrove, England / Montreal, PQ"
+2,1,"Wells, Master. Ralph Lester","male",2,1,1,"29103",23.0000,,"S","14",,"Cornwall / Akron, OH"
+2,1,"Wells, Miss. Joan","female",4,1,1,"29103",23.0000,,"S","14",,"Cornwall / Akron, OH"
+2,1,"Wells, Mrs. Arthur Henry (""Addie"" Dart Trevaskis)","female",29,0,2,"29103",23.0000,,"S","14",,"Cornwall / Akron, OH"
+2,1,"West, Miss. Barbara J","female",0.92,1,2,"C.A. 34651",27.7500,,"S","10",,"Bournmouth, England"
+2,1,"West, Miss. Constance Mirium","female",5,1,2,"C.A. 34651",27.7500,,"S","10",,"Bournmouth, England"
+2,0,"West, Mr. Edwy Arthur","male",36,1,2,"C.A. 34651",27.7500,,"S",,,"Bournmouth, England"
+2,1,"West, Mrs. Edwy Arthur (Ada Mary Worth)","female",33,1,2,"C.A. 34651",27.7500,,"S","10",,"Bournmouth, England"
+2,0,"Wheadon, Mr. Edward H","male",66,0,0,"C.A. 24579",10.5000,,"S",,,"Guernsey, England / Edgewood, RI"
+2,0,"Wheeler, Mr. Edwin ""Frederick""","male",,0,0,"SC/PARIS 2159",12.8750,,"S",,,
+2,1,"Wilhelms, Mr. Charles","male",31,0,0,"244270",13.0000,,"S","9",,"London, England"
+2,1,"Williams, Mr. Charles Eugene","male",,0,0,"244373",13.0000,,"S","14",,"Harrow, England"
+2,1,"Wright, Miss. Marion","female",26,0,0,"220844",13.5000,,"S","9",,"Yoevil, England / Cottage Grove, OR"
+2,0,"Yrois, Miss. Henriette (""Mrs Harbeck"")","female",24,0,0,"248747",13.0000,,"S",,,"Paris"
+3,0,"Abbing, Mr. Anthony","male",42,0,0,"C.A. 5547",7.5500,,"S",,,
+3,0,"Abbott, Master. Eugene Joseph","male",13,0,2,"C.A. 2673",20.2500,,"S",,,"East Providence, RI"
+3,0,"Abbott, Mr. Rossmore Edward","male",16,1,1,"C.A. 2673",20.2500,,"S",,"190","East Providence, RI"
+3,1,"Abbott, Mrs. Stanton (Rosa Hunt)","female",35,1,1,"C.A. 2673",20.2500,,"S","A",,"East Providence, RI"
+3,1,"Abelseth, Miss. Karen Marie","female",16,0,0,"348125",7.6500,,"S","16",,"Norway Los Angeles, CA"
+3,1,"Abelseth, Mr. Olaus Jorgensen","male",25,0,0,"348122",7.6500,"F G63","S","A",,"Perkins County, SD"
+3,1,"Abrahamsson, Mr. Abraham August Johannes","male",20,0,0,"SOTON/O2 3101284",7.9250,,"S","15",,"Taalintehdas, Finland Hoboken, NJ"
+3,1,"Abrahim, Mrs. Joseph (Sophie Halaut Easu)","female",18,0,0,"2657",7.2292,,"C","C",,"Greensburg, PA"
+3,0,"Adahl, Mr. Mauritz Nils Martin","male",30,0,0,"C 7076",7.2500,,"S",,"72","Asarum, Sweden Brooklyn, NY"
+3,0,"Adams, Mr. John","male",26,0,0,"341826",8.0500,,"S",,"103","Bournemouth, England"
+3,0,"Ahlin, Mrs. Johan (Johanna Persdotter Larsson)","female",40,1,0,"7546",9.4750,,"S",,,"Sweden Akeley, MN"
+3,1,"Aks, Master. Philip Frank","male",0.83,0,1,"392091",9.3500,,"S","11",,"London, England Norfolk, VA"
+3,1,"Aks, Mrs. Sam (Leah Rosen)","female",18,0,1,"392091",9.3500,,"S","13",,"London, England Norfolk, VA"
+3,1,"Albimona, Mr. Nassef Cassem","male",26,0,0,"2699",18.7875,,"C","15",,"Syria Fredericksburg, VA"
+3,0,"Alexander, Mr. William","male",26,0,0,"3474",7.8875,,"S",,,"England Albion, NY"
+3,0,"Alhomaki, Mr. Ilmari Rudolf","male",20,0,0,"SOTON/O2 3101287",7.9250,,"S",,,"Salo, Finland Astoria, OR"
+3,0,"Ali, Mr. Ahmed","male",24,0,0,"SOTON/O.Q. 3101311",7.0500,,"S",,,
+3,0,"Ali, Mr. William","male",25,0,0,"SOTON/O.Q. 3101312",7.0500,,"S",,"79","Argentina"
+3,0,"Allen, Mr. William Henry","male",35,0,0,"373450",8.0500,,"S",,,"Lower Clapton, Middlesex or Erdington, Birmingham"
+3,0,"Allum, Mr. Owen George","male",18,0,0,"2223",8.3000,,"S",,"259","Windsor, England New York, NY"
+3,0,"Andersen, Mr. Albert Karvin","male",32,0,0,"C 4001",22.5250,,"S",,"260","Bergen, Norway"
+3,1,"Andersen-Jensen, Miss. Carla Christine Nielsine","female",19,1,0,"350046",7.8542,,"S","16",,
+3,0,"Andersson, Master. Sigvard Harald Elias","male",4,4,2,"347082",31.2750,,"S",,,"Sweden Winnipeg, MN"
+3,0,"Andersson, Miss. Ebba Iris Alfrida","female",6,4,2,"347082",31.2750,,"S",,,"Sweden Winnipeg, MN"
+3,0,"Andersson, Miss. Ellis Anna Maria","female",2,4,2,"347082",31.2750,,"S",,,"Sweden Winnipeg, MN"
+3,1,"Andersson, Miss. Erna Alexandra","female",17,4,2,"3101281",7.9250,,"S","D",,"Ruotsinphyhtaa, Finland New York, NY"
+3,0,"Andersson, Miss. Ida Augusta Margareta","female",38,4,2,"347091",7.7750,,"S",,,"Vadsbro, Sweden Ministee, MI"
+3,0,"Andersson, Miss. Ingeborg Constanzia","female",9,4,2,"347082",31.2750,,"S",,,"Sweden Winnipeg, MN"
+3,0,"Andersson, Miss. Sigrid Elisabeth","female",11,4,2,"347082",31.2750,,"S",,,"Sweden Winnipeg, MN"
+3,0,"Andersson, Mr. Anders Johan","male",39,1,5,"347082",31.2750,,"S",,,"Sweden Winnipeg, MN"
+3,1,"Andersson, Mr. August Edvard (""Wennerstrom"")","male",27,0,0,"350043",7.7958,,"S","A",,
+3,0,"Andersson, Mr. Johan Samuel","male",26,0,0,"347075",7.7750,,"S",,,"Hartford, CT"
+3,0,"Andersson, Mrs. Anders Johan (Alfrida Konstantia Brogren)","female",39,1,5,"347082",31.2750,,"S",,,"Sweden Winnipeg, MN"
+3,0,"Andreasson, Mr. Paul Edvin","male",20,0,0,"347466",7.8542,,"S",,,"Sweden Chicago, IL"
+3,0,"Angheloff, Mr. Minko","male",26,0,0,"349202",7.8958,,"S",,,"Bulgaria Chicago, IL"
+3,0,"Arnold-Franchi, Mr. Josef","male",25,1,0,"349237",17.8000,,"S",,,"Altdorf, Switzerland"
+3,0,"Arnold-Franchi, Mrs. Josef (Josefine Franchi)","female",18,1,0,"349237",17.8000,,"S",,,"Altdorf, Switzerland"
+3,0,"Aronsson, Mr. Ernst Axel Algot","male",24,0,0,"349911",7.7750,,"S",,,"Sweden Joliet, IL"
+3,0,"Asim, Mr. Adola","male",35,0,0,"SOTON/O.Q. 3101310",7.0500,,"S",,,
+3,0,"Asplund, Master. Carl Edgar","male",5,4,2,"347077",31.3875,,"S",,,"Sweden Worcester, MA"
+3,0,"Asplund, Master. Clarence Gustaf Hugo","male",9,4,2,"347077",31.3875,,"S",,,"Sweden Worcester, MA"
+3,1,"Asplund, Master. Edvin Rojj Felix","male",3,4,2,"347077",31.3875,,"S","15",,"Sweden Worcester, MA"
+3,0,"Asplund, Master. Filip Oscar","male",13,4,2,"347077",31.3875,,"S",,,"Sweden Worcester, MA"
+3,1,"Asplund, Miss. Lillian Gertrud","female",5,4,2,"347077",31.3875,,"S","15",,"Sweden Worcester, MA"
+3,0,"Asplund, Mr. Carl Oscar Vilhelm Gustafsson","male",40,1,5,"347077",31.3875,,"S",,"142","Sweden Worcester, MA"
+3,1,"Asplund, Mr. Johan Charles","male",23,0,0,"350054",7.7958,,"S","13",,"Oskarshamn, Sweden Minneapolis, MN"
+3,1,"Asplund, Mrs. Carl Oscar (Selma Augusta Emilia Johansson)","female",38,1,5,"347077",31.3875,,"S","15",,"Sweden Worcester, MA"
+3,1,"Assaf Khalil, Mrs. Mariana (""Miriam"")","female",45,0,0,"2696",7.2250,,"C","C",,"Ottawa, ON"
+3,0,"Assaf, Mr. Gerios","male",21,0,0,"2692",7.2250,,"C",,,"Ottawa, ON"
+3,0,"Assam, Mr. Ali","male",23,0,0,"SOTON/O.Q. 3101309",7.0500,,"S",,,
+3,0,"Attalah, Miss. Malake","female",17,0,0,"2627",14.4583,,"C",,,
+3,0,"Attalah, Mr. Sleiman","male",30,0,0,"2694",7.2250,,"C",,,"Ottawa, ON"
+3,0,"Augustsson, Mr. Albert","male",23,0,0,"347468",7.8542,,"S",,,"Krakoryd, Sweden Bloomington, IL"
+3,1,"Ayoub, Miss. Banoura","female",13,0,0,"2687",7.2292,,"C","C",,"Syria Youngstown, OH"
+3,0,"Baccos, Mr. Raffull","male",20,0,0,"2679",7.2250,,"C",,,
+3,0,"Backstrom, Mr. Karl Alfred","male",32,1,0,"3101278",15.8500,,"S","D",,"Ruotsinphytaa, Finland New York, NY"
+3,1,"Backstrom, Mrs. Karl Alfred (Maria Mathilda Gustafsson)","female",33,3,0,"3101278",15.8500,,"S",,,"Ruotsinphytaa, Finland New York, NY"
+3,1,"Baclini, Miss. Eugenie","female",0.75,2,1,"2666",19.2583,,"C","C",,"Syria New York, NY"
+3,1,"Baclini, Miss. Helene Barbara","female",0.75,2,1,"2666",19.2583,,"C","C",,"Syria New York, NY"
+3,1,"Baclini, Miss. Marie Catherine","female",5,2,1,"2666",19.2583,,"C","C",,"Syria New York, NY"
+3,1,"Baclini, Mrs. Solomon (Latifa Qurban)","female",24,0,3,"2666",19.2583,,"C","C",,"Syria New York, NY"
+3,1,"Badman, Miss. Emily Louisa","female",18,0,0,"A/4 31416",8.0500,,"S","C",,"London Skanteales, NY"
+3,0,"Badt, Mr. Mohamed","male",40,0,0,"2623",7.2250,,"C",,,
+3,0,"Balkic, Mr. Cerin","male",26,0,0,"349248",7.8958,,"S",,,
+3,1,"Barah, Mr. Hanna Assi","male",20,0,0,"2663",7.2292,,"C","15",,
+3,0,"Barbara, Miss. Saiide","female",18,0,1,"2691",14.4542,,"C",,,"Syria Ottawa, ON"
+3,0,"Barbara, Mrs. (Catherine David)","female",45,0,1,"2691",14.4542,,"C",,,"Syria Ottawa, ON"
+3,0,"Barry, Miss. Julia","female",27,0,0,"330844",7.8792,,"Q",,,"New York, NY"
+3,0,"Barton, Mr. David John","male",22,0,0,"324669",8.0500,,"S",,,"England New York, NY"
+3,0,"Beavan, Mr. William Thomas","male",19,0,0,"323951",8.0500,,"S",,,"England"
+3,0,"Bengtsson, Mr. John Viktor","male",26,0,0,"347068",7.7750,,"S",,,"Krakudden, Sweden Moune, IL"
+3,0,"Berglund, Mr. Karl Ivar Sven","male",22,0,0,"PP 4348",9.3500,,"S",,,"Tranvik, Finland New York"
+3,0,"Betros, Master. Seman","male",,0,0,"2622",7.2292,,"C",,,
+3,0,"Betros, Mr. Tannous","male",20,0,0,"2648",4.0125,,"C",,,"Syria"
+3,1,"Bing, Mr. Lee","male",32,0,0,"1601",56.4958,,"S","C",,"Hong Kong New York, NY"
+3,0,"Birkeland, Mr. Hans Martin Monsen","male",21,0,0,"312992",7.7750,,"S",,,"Brennes, Norway New York"
+3,0,"Bjorklund, Mr. Ernst Herbert","male",18,0,0,"347090",7.7500,,"S",,,"Stockholm, Sweden New York"
+3,0,"Bostandyeff, Mr. Guentcho","male",26,0,0,"349224",7.8958,,"S",,,"Bulgaria Chicago, IL"
+3,0,"Boulos, Master. Akar","male",6,1,1,"2678",15.2458,,"C",,,"Syria Kent, ON"
+3,0,"Boulos, Miss. Nourelain","female",9,1,1,"2678",15.2458,,"C",,,"Syria Kent, ON"
+3,0,"Boulos, Mr. Hanna","male",,0,0,"2664",7.2250,,"C",,,"Syria"
+3,0,"Boulos, Mrs. Joseph (Sultana)","female",,0,2,"2678",15.2458,,"C",,,"Syria Kent, ON"
+3,0,"Bourke, Miss. Mary","female",,0,2,"364848",7.7500,,"Q",,,"Ireland Chicago, IL"
+3,0,"Bourke, Mr. John","male",40,1,1,"364849",15.5000,,"Q",,,"Ireland Chicago, IL"
+3,0,"Bourke, Mrs. John (Catherine)","female",32,1,1,"364849",15.5000,,"Q",,,"Ireland Chicago, IL"
+3,0,"Bowen, Mr. David John ""Dai""","male",21,0,0,"54636",16.1000,,"S",,,"Treherbert, Cardiff, Wales"
+3,1,"Bradley, Miss. Bridget Delia","female",22,0,0,"334914",7.7250,,"Q","13",,"Kingwilliamstown, Co Cork, Ireland Glens Falls, NY"
+3,0,"Braf, Miss. Elin Ester Maria","female",20,0,0,"347471",7.8542,,"S",,,"Medeltorp, Sweden Chicago, IL"
+3,0,"Braund, Mr. Lewis Richard","male",29,1,0,"3460",7.0458,,"S",,,"Bridgerule, Devon"
+3,0,"Braund, Mr. Owen Harris","male",22,1,0,"A/5 21171",7.2500,,"S",,,"Bridgerule, Devon"
+3,0,"Brobeck, Mr. Karl Rudolf","male",22,0,0,"350045",7.7958,,"S",,,"Sweden Worcester, MA"
+3,0,"Brocklebank, Mr. William Alfred","male",35,0,0,"364512",8.0500,,"S",,,"Broomfield, Chelmsford, England"
+3,0,"Buckley, Miss. Katherine","female",18.5,0,0,"329944",7.2833,,"Q",,"299","Co Cork, Ireland Roxbury, MA"
+3,1,"Buckley, Mr. Daniel","male",21,0,0,"330920",7.8208,,"Q","13",,"Kingwilliamstown, Co Cork, Ireland New York, NY"
+3,0,"Burke, Mr. Jeremiah","male",19,0,0,"365222",6.7500,,"Q",,,"Co Cork, Ireland Charlestown, MA"
+3,0,"Burns, Miss. Mary Delia","female",18,0,0,"330963",7.8792,,"Q",,,"Co Sligo, Ireland New York, NY"
+3,0,"Cacic, Miss. Manda","female",21,0,0,"315087",8.6625,,"S",,,
+3,0,"Cacic, Miss. Marija","female",30,0,0,"315084",8.6625,,"S",,,
+3,0,"Cacic, Mr. Jego Grga","male",18,0,0,"315091",8.6625,,"S",,,
+3,0,"Cacic, Mr. Luka","male",38,0,0,"315089",8.6625,,"S",,,"Croatia"
+3,0,"Calic, Mr. Jovo","male",17,0,0,"315093",8.6625,,"S",,,
+3,0,"Calic, Mr. Petar","male",17,0,0,"315086",8.6625,,"S",,,
+3,0,"Canavan, Miss. Mary","female",21,0,0,"364846",7.7500,,"Q",,,
+3,0,"Canavan, Mr. Patrick","male",21,0,0,"364858",7.7500,,"Q",,,"Ireland Philadelphia, PA"
+3,0,"Cann, Mr. Ernest Charles","male",21,0,0,"A./5. 2152",8.0500,,"S",,,
+3,0,"Caram, Mr. Joseph","male",,1,0,"2689",14.4583,,"C",,,"Ottawa, ON"
+3,0,"Caram, Mrs. Joseph (Maria Elias)","female",,1,0,"2689",14.4583,,"C",,,"Ottawa, ON"
+3,0,"Carlsson, Mr. August Sigfrid","male",28,0,0,"350042",7.7958,,"S",,,"Dagsas, Sweden Fower, MN"
+3,0,"Carlsson, Mr. Carl Robert","male",24,0,0,"350409",7.8542,,"S",,,"Goteborg, Sweden Huntley, IL"
+3,1,"Carr, Miss. Helen ""Ellen""","female",16,0,0,"367231",7.7500,,"Q","16",,"Co Longford, Ireland New York, NY"
+3,0,"Carr, Miss. Jeannie","female",37,0,0,"368364",7.7500,,"Q",,,"Co Sligo, Ireland Hartford, CT"
+3,0,"Carver, Mr. Alfred John","male",28,0,0,"392095",7.2500,,"S",,,"St Denys, Southampton, Hants"
+3,0,"Celotti, Mr. Francesco","male",24,0,0,"343275",8.0500,,"S",,,"London"
+3,0,"Charters, Mr. David","male",21,0,0,"A/5. 13032",7.7333,,"Q",,,"Ireland New York, NY"
+3,1,"Chip, Mr. Chang","male",32,0,0,"1601",56.4958,,"S","C",,"Hong Kong New York, NY"
+3,0,"Christmann, Mr. Emil","male",29,0,0,"343276",8.0500,,"S",,,
+3,0,"Chronopoulos, Mr. Apostolos","male",26,1,0,"2680",14.4542,,"C",,,"Greece"
+3,0,"Chronopoulos, Mr. Demetrios","male",18,1,0,"2680",14.4542,,"C",,,"Greece"
+3,0,"Coelho, Mr. Domingos Fernandeo","male",20,0,0,"SOTON/O.Q. 3101307",7.0500,,"S",,,"Portugal"
+3,1,"Cohen, Mr. Gurshon ""Gus""","male",18,0,0,"A/5 3540",8.0500,,"S","12",,"London Brooklyn, NY"
+3,0,"Colbert, Mr. Patrick","male",24,0,0,"371109",7.2500,,"Q",,,"Co Limerick, Ireland Sherbrooke, PQ"
+3,0,"Coleff, Mr. Peju","male",36,0,0,"349210",7.4958,,"S",,,"Bulgaria Chicago, IL"
+3,0,"Coleff, Mr. Satio","male",24,0,0,"349209",7.4958,,"S",,,
+3,0,"Conlon, Mr. Thomas Henry","male",31,0,0,"21332",7.7333,,"Q",,,"Philadelphia, PA"
+3,0,"Connaghton, Mr. Michael","male",31,0,0,"335097",7.7500,,"Q",,,"Ireland Brooklyn, NY"
+3,1,"Connolly, Miss. Kate","female",22,0,0,"370373",7.7500,,"Q","13",,"Ireland"
+3,0,"Connolly, Miss. Kate","female",30,0,0,"330972",7.6292,,"Q",,,"Ireland"
+3,0,"Connors, Mr. Patrick","male",70.5,0,0,"370369",7.7500,,"Q",,"171",
+3,0,"Cook, Mr. Jacob","male",43,0,0,"A/5 3536",8.0500,,"S",,,
+3,0,"Cor, Mr. Bartol","male",35,0,0,"349230",7.8958,,"S",,,"Austria"
+3,0,"Cor, Mr. Ivan","male",27,0,0,"349229",7.8958,,"S",,,"Austria"
+3,0,"Cor, Mr. Liudevit","male",19,0,0,"349231",7.8958,,"S",,,"Austria"
+3,0,"Corn, Mr. Harry","male",30,0,0,"SOTON/OQ 392090",8.0500,,"S",,,"London"
+3,1,"Coutts, Master. Eden Leslie ""Neville""","male",9,1,1,"C.A. 37671",15.9000,,"S","2",,"England Brooklyn, NY"
+3,1,"Coutts, Master. William Loch ""William""","male",3,1,1,"C.A. 37671",15.9000,,"S","2",,"England Brooklyn, NY"
+3,1,"Coutts, Mrs. William (Winnie ""Minnie"" Treanor)","female",36,0,2,"C.A. 37671",15.9000,,"S","2",,"England Brooklyn, NY"
+3,0,"Coxon, Mr. Daniel","male",59,0,0,"364500",7.2500,,"S",,,"Merrill, WI"
+3,0,"Crease, Mr. Ernest James","male",19,0,0,"S.P. 3464",8.1583,,"S",,,"Bristol, England Cleveland, OH"
+3,1,"Cribb, Miss. Laura Alice","female",17,0,1,"371362",16.1000,,"S","12",,"Bournemouth, England Newark, NJ"
+3,0,"Cribb, Mr. John Hatfield","male",44,0,1,"371362",16.1000,,"S",,,"Bournemouth, England Newark, NJ"
+3,0,"Culumovic, Mr. Jeso","male",17,0,0,"315090",8.6625,,"S",,,"Austria-Hungary"
+3,0,"Daher, Mr. Shedid","male",22.5,0,0,"2698",7.2250,,"C",,"9",
+3,1,"Dahl, Mr. Karl Edwart","male",45,0,0,"7598",8.0500,,"S","15",,"Australia Fingal, ND"
+3,0,"Dahlberg, Miss. Gerda Ulrika","female",22,0,0,"7552",10.5167,,"S",,,"Norrlot, Sweden Chicago, IL"
+3,0,"Dakic, Mr. Branko","male",19,0,0,"349228",10.1708,,"S",,,"Austria"
+3,1,"Daly, Miss. Margaret Marcella ""Maggie""","female",30,0,0,"382650",6.9500,,"Q","15",,"Co Athlone, Ireland New York, NY"
+3,1,"Daly, Mr. Eugene Patrick","male",29,0,0,"382651",7.7500,,"Q","13 15 B",,"Co Athlone, Ireland New York, NY"
+3,0,"Danbom, Master. Gilbert Sigvard Emanuel","male",0.33,0,2,"347080",14.4000,,"S",,,"Stanton, IA"
+3,0,"Danbom, Mr. Ernst Gilbert","male",34,1,1,"347080",14.4000,,"S",,"197","Stanton, IA"
+3,0,"Danbom, Mrs. Ernst Gilbert (Anna Sigrid Maria Brogren)","female",28,1,1,"347080",14.4000,,"S",,,"Stanton, IA"
+3,0,"Danoff, Mr. Yoto","male",27,0,0,"349219",7.8958,,"S",,,"Bulgaria Chicago, IL"
+3,0,"Dantcheff, Mr. Ristiu","male",25,0,0,"349203",7.8958,,"S",,,"Bulgaria Chicago, IL"
+3,0,"Davies, Mr. Alfred J","male",24,2,0,"A/4 48871",24.1500,,"S",,,"West Bromwich, England Pontiac, MI"
+3,0,"Davies, Mr. Evan","male",22,0,0,"SC/A4 23568",8.0500,,"S",,,
+3,0,"Davies, Mr. John Samuel","male",21,2,0,"A/4 48871",24.1500,,"S",,,"West Bromwich, England Pontiac, MI"
+3,0,"Davies, Mr. Joseph","male",17,2,0,"A/4 48873",8.0500,,"S",,,"West Bromwich, England Pontiac, MI"
+3,0,"Davison, Mr. Thomas Henry","male",,1,0,"386525",16.1000,,"S",,,"Liverpool, England Bedford, OH"
+3,1,"Davison, Mrs. Thomas Henry (Mary E Finck)","female",,1,0,"386525",16.1000,,"S","16",,"Liverpool, England Bedford, OH"
+3,1,"de Messemaeker, Mr. Guillaume Joseph","male",36.5,1,0,"345572",17.4000,,"S","15",,"Tampico, MT"
+3,1,"de Messemaeker, Mrs. Guillaume Joseph (Emma)","female",36,1,0,"345572",17.4000,,"S","13",,"Tampico, MT"
+3,1,"de Mulder, Mr. Theodore","male",30,0,0,"345774",9.5000,,"S","11",,"Belgium Detroit, MI"
+3,0,"de Pelsmaeker, Mr. Alfons","male",16,0,0,"345778",9.5000,,"S",,,
+3,1,"Dean, Master. Bertram Vere","male",1,1,2,"C.A. 2315",20.5750,,"S","10",,"Devon, England Wichita, KS"
+3,1,"Dean, Miss. Elizabeth Gladys ""Millvina""","female",0.17,1,2,"C.A. 2315",20.5750,,"S","10",,"Devon, England Wichita, KS"
+3,0,"Dean, Mr. Bertram Frank","male",26,1,2,"C.A. 2315",20.5750,,"S",,,"Devon, England Wichita, KS"
+3,1,"Dean, Mrs. Bertram (Eva Georgetta Light)","female",33,1,2,"C.A. 2315",20.5750,,"S","10",,"Devon, England Wichita, KS"
+3,0,"Delalic, Mr. Redjo","male",25,0,0,"349250",7.8958,,"S",,,
+3,0,"Demetri, Mr. Marinko","male",,0,0,"349238",7.8958,,"S",,,
+3,0,"Denkoff, Mr. Mitto","male",,0,0,"349225",7.8958,,"S",,,"Bulgaria Coon Rapids, IA"
+3,0,"Dennis, Mr. Samuel","male",22,0,0,"A/5 21172",7.2500,,"S",,,
+3,0,"Dennis, Mr. William","male",36,0,0,"A/5 21175",7.2500,,"S",,,
+3,1,"Devaney, Miss. Margaret Delia","female",19,0,0,"330958",7.8792,,"Q","C",,"Kilmacowen, Co Sligo, Ireland New York, NY"
+3,0,"Dika, Mr. Mirko","male",17,0,0,"349232",7.8958,,"S",,,
+3,0,"Dimic, Mr. Jovan","male",42,0,0,"315088",8.6625,,"S",,,
+3,0,"Dintcheff, Mr. Valtcho","male",43,0,0,"349226",7.8958,,"S",,,
+3,0,"Doharr, Mr. Tannous","male",,0,0,"2686",7.2292,,"C",,,
+3,0,"Dooley, Mr. Patrick","male",32,0,0,"370376",7.7500,,"Q",,,"Ireland New York, NY"
+3,1,"Dorking, Mr. Edward Arthur","male",19,0,0,"A/5. 10482",8.0500,,"S","B",,"England Oglesby, IL"
+3,1,"Dowdell, Miss. Elizabeth","female",30,0,0,"364516",12.4750,,"S","13",,"Union Hill, NJ"
+3,0,"Doyle, Miss. Elizabeth","female",24,0,0,"368702",7.7500,,"Q",,,"Ireland New York, NY"
+3,1,"Drapkin, Miss. Jennie","female",23,0,0,"SOTON/OQ 392083",8.0500,,"S",,,"London New York, NY"
+3,0,"Drazenoic, Mr. Jozef","male",33,0,0,"349241",7.8958,,"C",,"51","Austria Niagara Falls, NY"
+3,0,"Duane, Mr. Frank","male",65,0,0,"336439",7.7500,,"Q",,,
+3,1,"Duquemin, Mr. Joseph","male",24,0,0,"S.O./P.P. 752",7.5500,,"S","D",,"England Albion, NY"
+3,0,"Dyker, Mr. Adolf Fredrik","male",23,1,0,"347072",13.9000,,"S",,,"West Haven, CT"
+3,1,"Dyker, Mrs. Adolf Fredrik (Anna Elisabeth Judith Andersson)","female",22,1,0,"347072",13.9000,,"S","16",,"West Haven, CT"
+3,0,"Edvardsson, Mr. Gustaf Hjalmar","male",18,0,0,"349912",7.7750,,"S",,,"Tofta, Sweden Joliet, IL"
+3,0,"Eklund, Mr. Hans Linus","male",16,0,0,"347074",7.7750,,"S",,,"Karberg, Sweden Jerome Junction, AZ"
+3,0,"Ekstrom, Mr. Johan","male",45,0,0,"347061",6.9750,,"S",,,"Effington Rut, SD"
+3,0,"Elias, Mr. Dibo","male",,0,0,"2674",7.2250,,"C",,,
+3,0,"Elias, Mr. Joseph","male",39,0,2,"2675",7.2292,,"C",,,"Syria Ottawa, ON"
+3,0,"Elias, Mr. Joseph Jr","male",17,1,1,"2690",7.2292,,"C",,,
+3,0,"Elias, Mr. Tannous","male",15,1,1,"2695",7.2292,,"C",,,"Syria"
+3,0,"Elsbury, Mr. William James","male",47,0,0,"A/5 3902",7.2500,,"S",,,"Illinois, USA"
+3,1,"Emanuel, Miss. Virginia Ethel","female",5,0,0,"364516",12.4750,,"S","13",,"New York, NY"
+3,0,"Emir, Mr. Farred Chehab","male",,0,0,"2631",7.2250,,"C",,,
+3,0,"Everett, Mr. Thomas James","male",40.5,0,0,"C.A. 6212",15.1000,,"S",,"187",
+3,0,"Farrell, Mr. James","male",40.5,0,0,"367232",7.7500,,"Q",,"68","Aughnacliff, Co Longford, Ireland New York, NY"
+3,1,"Finoli, Mr. Luigi","male",,0,0,"SOTON/O.Q. 3101308",7.0500,,"S","15",,"Italy Philadelphia, PA"
+3,0,"Fischer, Mr. Eberhard Thelander","male",18,0,0,"350036",7.7958,,"S",,,
+3,0,"Fleming, Miss. Honora","female",,0,0,"364859",7.7500,,"Q",,,
+3,0,"Flynn, Mr. James","male",,0,0,"364851",7.7500,,"Q",,,
+3,0,"Flynn, Mr. John","male",,0,0,"368323",6.9500,,"Q",,,
+3,0,"Foley, Mr. Joseph","male",26,0,0,"330910",7.8792,,"Q",,,"Ireland Chicago, IL"
+3,0,"Foley, Mr. William","male",,0,0,"365235",7.7500,,"Q",,,"Ireland"
+3,1,"Foo, Mr. Choong","male",,0,0,"1601",56.4958,,"S","13",,"Hong Kong New York, NY"
+3,0,"Ford, Miss. Doolina Margaret ""Daisy""","female",21,2,2,"W./C. 6608",34.3750,,"S",,,"Rotherfield, Sussex, England Essex Co, MA"
+3,0,"Ford, Miss. Robina Maggie ""Ruby""","female",9,2,2,"W./C. 6608",34.3750,,"S",,,"Rotherfield, Sussex, England Essex Co, MA"
+3,0,"Ford, Mr. Arthur","male",,0,0,"A/5 1478",8.0500,,"S",,,"Bridgwater, Somerset, England"
+3,0,"Ford, Mr. Edward Watson","male",18,2,2,"W./C. 6608",34.3750,,"S",,,"Rotherfield, Sussex, England Essex Co, MA"
+3,0,"Ford, Mr. William Neal","male",16,1,3,"W./C. 6608",34.3750,,"S",,,"Rotherfield, Sussex, England Essex Co, MA"
+3,0,"Ford, Mrs. Edward (Margaret Ann Watson)","female",48,1,3,"W./C. 6608",34.3750,,"S",,,"Rotherfield, Sussex, England Essex Co, MA"
+3,0,"Fox, Mr. Patrick","male",,0,0,"368573",7.7500,,"Q",,,"Ireland New York, NY"
+3,0,"Franklin, Mr. Charles (Charles Fardon)","male",,0,0,"SOTON/O.Q. 3101314",7.2500,,"S",,,
+3,0,"Gallagher, Mr. Martin","male",25,0,0,"36864",7.7417,,"Q",,,"New York, NY"
+3,0,"Garfirth, Mr. John","male",,0,0,"358585",14.5000,,"S",,,
+3,0,"Gheorgheff, Mr. Stanio","male",,0,0,"349254",7.8958,,"C",,,
+3,0,"Gilinski, Mr. Eliezer","male",22,0,0,"14973",8.0500,,"S",,"47",
+3,1,"Gilnagh, Miss. Katherine ""Katie""","female",16,0,0,"35851",7.7333,,"Q","16",,"Co Longford, Ireland New York, NY"
+3,1,"Glynn, Miss. Mary Agatha","female",,0,0,"335677",7.7500,,"Q","13",,"Co Clare, Ireland Washington, DC"
+3,1,"Goldsmith, Master. Frank John William ""Frankie""","male",9,0,2,"363291",20.5250,,"S","C D",,"Strood, Kent, England Detroit, MI"
+3,0,"Goldsmith, Mr. Frank John","male",33,1,1,"363291",20.5250,,"S",,,"Strood, Kent, England Detroit, MI"
+3,0,"Goldsmith, Mr. Nathan","male",41,0,0,"SOTON/O.Q. 3101263",7.8500,,"S",,,"Philadelphia, PA"
+3,1,"Goldsmith, Mrs. Frank John (Emily Alice Brown)","female",31,1,1,"363291",20.5250,,"S","C D",,"Strood, Kent, England Detroit, MI"
+3,0,"Goncalves, Mr. Manuel Estanslas","male",38,0,0,"SOTON/O.Q. 3101306",7.0500,,"S",,,"Portugal"
+3,0,"Goodwin, Master. Harold Victor","male",9,5,2,"CA 2144",46.9000,,"S",,,"Wiltshire, England Niagara Falls, NY"
+3,0,"Goodwin, Master. Sidney Leonard","male",1,5,2,"CA 2144",46.9000,,"S",,,"Wiltshire, England Niagara Falls, NY"
+3,0,"Goodwin, Master. William Frederick","male",11,5,2,"CA 2144",46.9000,,"S",,,"Wiltshire, England Niagara Falls, NY"
+3,0,"Goodwin, Miss. Jessie Allis","female",10,5,2,"CA 2144",46.9000,,"S",,,"Wiltshire, England Niagara Falls, NY"
+3,0,"Goodwin, Miss. Lillian Amy","female",16,5,2,"CA 2144",46.9000,,"S",,,"Wiltshire, England Niagara Falls, NY"
+3,0,"Goodwin, Mr. Charles Edward","male",14,5,2,"CA 2144",46.9000,,"S",,,"Wiltshire, England Niagara Falls, NY"
+3,0,"Goodwin, Mr. Charles Frederick","male",40,1,6,"CA 2144",46.9000,,"S",,,"Wiltshire, England Niagara Falls, NY"
+3,0,"Goodwin, Mrs. Frederick (Augusta Tyler)","female",43,1,6,"CA 2144",46.9000,,"S",,,"Wiltshire, England Niagara Falls, NY"
+3,0,"Green, Mr. George Henry","male",51,0,0,"21440",8.0500,,"S",,,"Dorking, Surrey, England"
+3,0,"Gronnestad, Mr. Daniel Danielsen","male",32,0,0,"8471",8.3625,,"S",,,"Foresvik, Norway Portland, ND"
+3,0,"Guest, Mr. Robert","male",,0,0,"376563",8.0500,,"S",,,
+3,0,"Gustafsson, Mr. Alfred Ossian","male",20,0,0,"7534",9.8458,,"S",,,"Waukegan, Chicago, IL"
+3,0,"Gustafsson, Mr. Anders Vilhelm","male",37,2,0,"3101276",7.9250,,"S",,"98","Ruotsinphytaa, Finland New York, NY"
+3,0,"Gustafsson, Mr. Johan Birger","male",28,2,0,"3101277",7.9250,,"S",,,"Ruotsinphytaa, Finland New York, NY"
+3,0,"Gustafsson, Mr. Karl Gideon","male",19,0,0,"347069",7.7750,,"S",,,"Myren, Sweden New York, NY"
+3,0,"Haas, Miss. Aloisia","female",24,0,0,"349236",8.8500,,"S",,,
+3,0,"Hagardon, Miss. Kate","female",17,0,0,"AQ/3. 30631",7.7333,,"Q",,,
+3,0,"Hagland, Mr. Ingvald Olai Olsen","male",,1,0,"65303",19.9667,,"S",,,
+3,0,"Hagland, Mr. Konrad Mathias Reiersen","male",,1,0,"65304",19.9667,,"S",,,
+3,0,"Hakkarainen, Mr. Pekka Pietari","male",28,1,0,"STON/O2. 3101279",15.8500,,"S",,,
+3,1,"Hakkarainen, Mrs. Pekka Pietari (Elin Matilda Dolck)","female",24,1,0,"STON/O2. 3101279",15.8500,,"S","15",,
+3,0,"Hampe, Mr. Leon","male",20,0,0,"345769",9.5000,,"S",,,
+3,0,"Hanna, Mr. Mansour","male",23.5,0,0,"2693",7.2292,,"C",,"188",
+3,0,"Hansen, Mr. Claus Peter","male",41,2,0,"350026",14.1083,,"S",,,
+3,0,"Hansen, Mr. Henrik Juul","male",26,1,0,"350025",7.8542,,"S",,,
+3,0,"Hansen, Mr. Henry Damsgaard","male",21,0,0,"350029",7.8542,,"S",,"69",
+3,1,"Hansen, Mrs. Claus Peter (Jennie L Howard)","female",45,1,0,"350026",14.1083,,"S","11",,
+3,0,"Harknett, Miss. Alice Phoebe","female",,0,0,"W./C. 6609",7.5500,,"S",,,
+3,0,"Harmer, Mr. Abraham (David Lishin)","male",25,0,0,"374887",7.2500,,"S","B",,
+3,0,"Hart, Mr. Henry","male",,0,0,"394140",6.8583,,"Q",,,
+3,0,"Hassan, Mr. Houssein G N","male",11,0,0,"2699",18.7875,,"C",,,
+3,1,"Healy, Miss. Hanora ""Nora""","female",,0,0,"370375",7.7500,,"Q","16",,
+3,1,"Hedman, Mr. Oskar Arvid","male",27,0,0,"347089",6.9750,,"S","15",,
+3,1,"Hee, Mr. Ling","male",,0,0,"1601",56.4958,,"S","C",,
+3,0,"Hegarty, Miss. Hanora ""Nora""","female",18,0,0,"365226",6.7500,,"Q",,,
+3,1,"Heikkinen, Miss. Laina","female",26,0,0,"STON/O2. 3101282",7.9250,,"S",,,
+3,0,"Heininen, Miss. Wendla Maria","female",23,0,0,"STON/O2. 3101290",7.9250,,"S",,,
+3,1,"Hellstrom, Miss. Hilda Maria","female",22,0,0,"7548",8.9625,,"S","C",,
+3,0,"Hendekovic, Mr. Ignjac","male",28,0,0,"349243",7.8958,,"S",,"306",
+3,0,"Henriksson, Miss. Jenny Lovisa","female",28,0,0,"347086",7.7750,,"S",,,
+3,0,"Henry, Miss. Delia","female",,0,0,"382649",7.7500,,"Q",,,
+3,1,"Hirvonen, Miss. Hildur E","female",2,0,1,"3101298",12.2875,,"S","15",,
+3,1,"Hirvonen, Mrs. Alexander (Helga E Lindqvist)","female",22,1,1,"3101298",12.2875,,"S","15",,
+3,0,"Holm, Mr. John Fredrik Alexander","male",43,0,0,"C 7075",6.4500,,"S",,,
+3,0,"Holthen, Mr. Johan Martin","male",28,0,0,"C 4001",22.5250,,"S",,,
+3,1,"Honkanen, Miss. Eliina","female",27,0,0,"STON/O2. 3101283",7.9250,,"S",,,
+3,0,"Horgan, Mr. John","male",,0,0,"370377",7.7500,,"Q",,,
+3,1,"Howard, Miss. May Elizabeth","female",,0,0,"A. 2. 39186",8.0500,,"S","C",,
+3,0,"Humblen, Mr. Adolf Mathias Nicolai Olsen","male",42,0,0,"348121",7.6500,"F G63","S",,"120",
+3,1,"Hyman, Mr. Abraham","male",,0,0,"3470",7.8875,,"S","C",,
+3,0,"Ibrahim Shawah, Mr. Yousseff","male",30,0,0,"2685",7.2292,,"C",,,
+3,0,"Ilieff, Mr. Ylio","male",,0,0,"349220",7.8958,,"S",,,
+3,0,"Ilmakangas, Miss. Ida Livija","female",27,1,0,"STON/O2. 3101270",7.9250,,"S",,,
+3,0,"Ilmakangas, Miss. Pieta Sofia","female",25,1,0,"STON/O2. 3101271",7.9250,,"S",,,
+3,0,"Ivanoff, Mr. Kanio","male",,0,0,"349201",7.8958,,"S",,,
+3,1,"Jalsevac, Mr. Ivan","male",29,0,0,"349240",7.8958,,"C","15",,
+3,1,"Jansson, Mr. Carl Olof","male",21,0,0,"350034",7.7958,,"S","A",,
+3,0,"Jardin, Mr. Jose Neto","male",,0,0,"SOTON/O.Q. 3101305",7.0500,,"S",,,
+3,0,"Jensen, Mr. Hans Peder","male",20,0,0,"350050",7.8542,,"S",,,
+3,0,"Jensen, Mr. Niels Peder","male",48,0,0,"350047",7.8542,,"S",,,
+3,0,"Jensen, Mr. Svend Lauritz","male",17,1,0,"350048",7.0542,,"S",,,
+3,1,"Jermyn, Miss. Annie","female",,0,0,"14313",7.7500,,"Q","D",,
+3,1,"Johannesen-Bratthammer, Mr. Bernt","male",,0,0,"65306",8.1125,,"S","13",,
+3,0,"Johanson, Mr. Jakob Alfred","male",34,0,0,"3101264",6.4958,,"S",,"143",
+3,1,"Johansson Palmquist, Mr. Oskar Leander","male",26,0,0,"347070",7.7750,,"S","15",,
+3,0,"Johansson, Mr. Erik","male",22,0,0,"350052",7.7958,,"S",,"156",
+3,0,"Johansson, Mr. Gustaf Joel","male",33,0,0,"7540",8.6542,,"S",,"285",
+3,0,"Johansson, Mr. Karl Johan","male",31,0,0,"347063",7.7750,,"S",,,
+3,0,"Johansson, Mr. Nils","male",29,0,0,"347467",7.8542,,"S",,,
+3,1,"Johnson, Master. Harold Theodor","male",4,1,1,"347742",11.1333,,"S","15",,
+3,1,"Johnson, Miss. Eleanor Ileen","female",1,1,1,"347742",11.1333,,"S","15",,
+3,0,"Johnson, Mr. Alfred","male",49,0,0,"LINE",0.0000,,"S",,,
+3,0,"Johnson, Mr. Malkolm Joackim","male",33,0,0,"347062",7.7750,,"S",,"37",
+3,0,"Johnson, Mr. William Cahoone Jr","male",19,0,0,"LINE",0.0000,,"S",,,
+3,1,"Johnson, Mrs. Oscar W (Elisabeth Vilhelmina Berg)","female",27,0,2,"347742",11.1333,,"S","15",,
+3,0,"Johnston, Master. William Arthur ""Willie""","male",,1,2,"W./C. 6607",23.4500,,"S",,,
+3,0,"Johnston, Miss. Catherine Helen ""Carrie""","female",,1,2,"W./C. 6607",23.4500,,"S",,,
+3,0,"Johnston, Mr. Andrew G","male",,1,2,"W./C. 6607",23.4500,,"S",,,
+3,0,"Johnston, Mrs. Andrew G (Elizabeth ""Lily"" Watson)","female",,1,2,"W./C. 6607",23.4500,,"S",,,
+3,0,"Jonkoff, Mr. Lalio","male",23,0,0,"349204",7.8958,,"S",,,
+3,1,"Jonsson, Mr. Carl","male",32,0,0,"350417",7.8542,,"S","15",,
+3,0,"Jonsson, Mr. Nils Hilding","male",27,0,0,"350408",7.8542,,"S",,,
+3,0,"Jussila, Miss. Katriina","female",20,1,0,"4136",9.8250,,"S",,,
+3,0,"Jussila, Miss. Mari Aina","female",21,1,0,"4137",9.8250,,"S",,,
+3,1,"Jussila, Mr. Eiriik","male",32,0,0,"STON/O 2. 3101286",7.9250,,"S","15",,
+3,0,"Kallio, Mr. Nikolai Erland","male",17,0,0,"STON/O 2. 3101274",7.1250,,"S",,,
+3,0,"Kalvik, Mr. Johannes Halvorsen","male",21,0,0,"8475",8.4333,,"S",,,
+3,0,"Karaic, Mr. Milan","male",30,0,0,"349246",7.8958,,"S",,,
+3,1,"Karlsson, Mr. Einar Gervasius","male",21,0,0,"350053",7.7958,,"S","13",,
+3,0,"Karlsson, Mr. Julius Konrad Eugen","male",33,0,0,"347465",7.8542,,"S",,,
+3,0,"Karlsson, Mr. Nils August","male",22,0,0,"350060",7.5208,,"S",,,
+3,1,"Karun, Miss. Manca","female",4,0,1,"349256",13.4167,,"C","15",,
+3,1,"Karun, Mr. Franz","male",39,0,1,"349256",13.4167,,"C","15",,
+3,0,"Kassem, Mr. Fared","male",,0,0,"2700",7.2292,,"C",,,
+3,0,"Katavelas, Mr. Vassilios (""Catavelas Vassilios"")","male",18.5,0,0,"2682",7.2292,,"C",,"58",
+3,0,"Keane, Mr. Andrew ""Andy""","male",,0,0,"12460",7.7500,,"Q",,,
+3,0,"Keefe, Mr. Arthur","male",,0,0,"323592",7.2500,,"S","A",,
+3,1,"Kelly, Miss. Anna Katherine ""Annie Kate""","female",,0,0,"9234",7.7500,,"Q","16",,
+3,1,"Kelly, Miss. Mary","female",,0,0,"14312",7.7500,,"Q","D",,
+3,0,"Kelly, Mr. James","male",34.5,0,0,"330911",7.8292,,"Q",,"70",
+3,0,"Kelly, Mr. James","male",44,0,0,"363592",8.0500,,"S",,,
+3,1,"Kennedy, Mr. John","male",,0,0,"368783",7.7500,,"Q",,,
+3,0,"Khalil, Mr. Betros","male",,1,0,"2660",14.4542,,"C",,,
+3,0,"Khalil, Mrs. Betros (Zahie ""Maria"" Elias)","female",,1,0,"2660",14.4542,,"C",,,
+3,0,"Kiernan, Mr. John","male",,1,0,"367227",7.7500,,"Q",,,
+3,0,"Kiernan, Mr. Philip","male",,1,0,"367229",7.7500,,"Q",,,
+3,0,"Kilgannon, Mr. Thomas J","male",,0,0,"36865",7.7375,,"Q",,,
+3,0,"Kink, Miss. Maria","female",22,2,0,"315152",8.6625,,"S",,,
+3,0,"Kink, Mr. Vincenz","male",26,2,0,"315151",8.6625,,"S",,,
+3,1,"Kink-Heilmann, Miss. Luise Gretchen","female",4,0,2,"315153",22.0250,,"S","2",,
+3,1,"Kink-Heilmann, Mr. Anton","male",29,3,1,"315153",22.0250,,"S","2",,
+3,1,"Kink-Heilmann, Mrs. Anton (Luise Heilmann)","female",26,1,1,"315153",22.0250,,"S","2",,
+3,0,"Klasen, Miss. Gertrud Emilia","female",1,1,1,"350405",12.1833,,"S",,,
+3,0,"Klasen, Mr. Klas Albin","male",18,1,1,"350404",7.8542,,"S",,,
+3,0,"Klasen, Mrs. (Hulda Kristina Eugenia Lofqvist)","female",36,0,2,"350405",12.1833,,"S",,,
+3,0,"Kraeff, Mr. Theodor","male",,0,0,"349253",7.8958,,"C",,,
+3,1,"Krekorian, Mr. Neshan","male",25,0,0,"2654",7.2292,"F E57","C","10",,
+3,0,"Lahoud, Mr. Sarkis","male",,0,0,"2624",7.2250,,"C",,,
+3,0,"Laitinen, Miss. Kristina Sofia","female",37,0,0,"4135",9.5875,,"S",,,
+3,0,"Laleff, Mr. Kristo","male",,0,0,"349217",7.8958,,"S",,,
+3,1,"Lam, Mr. Ali","male",,0,0,"1601",56.4958,,"S","C",,
+3,0,"Lam, Mr. Len","male",,0,0,"1601",56.4958,,"S",,,
+3,1,"Landergren, Miss. Aurora Adelia","female",22,0,0,"C 7077",7.2500,,"S","13",,
+3,0,"Lane, Mr. Patrick","male",,0,0,"7935",7.7500,,"Q",,,
+3,1,"Lang, Mr. Fang","male",26,0,0,"1601",56.4958,,"S","14",,
+3,0,"Larsson, Mr. August Viktor","male",29,0,0,"7545",9.4833,,"S",,,
+3,0,"Larsson, Mr. Bengt Edvin","male",29,0,0,"347067",7.7750,,"S",,,
+3,0,"Larsson-Rondberg, Mr. Edvard A","male",22,0,0,"347065",7.7750,,"S",,,
+3,1,"Leeni, Mr. Fahim (""Philip Zenni"")","male",22,0,0,"2620",7.2250,,"C","6",,
+3,0,"Lefebre, Master. Henry Forbes","male",,3,1,"4133",25.4667,,"S",,,
+3,0,"Lefebre, Miss. Ida","female",,3,1,"4133",25.4667,,"S",,,
+3,0,"Lefebre, Miss. Jeannie","female",,3,1,"4133",25.4667,,"S",,,
+3,0,"Lefebre, Miss. Mathilde","female",,3,1,"4133",25.4667,,"S",,,
+3,0,"Lefebre, Mrs. Frank (Frances)","female",,0,4,"4133",25.4667,,"S",,,
+3,0,"Leinonen, Mr. Antti Gustaf","male",32,0,0,"STON/O 2. 3101292",7.9250,,"S",,,
+3,0,"Lemberopolous, Mr. Peter L","male",34.5,0,0,"2683",6.4375,,"C",,"196",
+3,0,"Lennon, Miss. Mary","female",,1,0,"370371",15.5000,,"Q",,,
+3,0,"Lennon, Mr. Denis","male",,1,0,"370371",15.5000,,"Q",,,
+3,0,"Leonard, Mr. Lionel","male",36,0,0,"LINE",0.0000,,"S",,,
+3,0,"Lester, Mr. James","male",39,0,0,"A/4 48871",24.1500,,"S",,,
+3,0,"Lievens, Mr. Rene Aime","male",24,0,0,"345781",9.5000,,"S",,,
+3,0,"Lindahl, Miss. Agda Thorilda Viktoria","female",25,0,0,"347071",7.7750,,"S",,,
+3,0,"Lindblom, Miss. Augusta Charlotta","female",45,0,0,"347073",7.7500,,"S",,,
+3,0,"Lindell, Mr. Edvard Bengtsson","male",36,1,0,"349910",15.5500,,"S","A",,
+3,0,"Lindell, Mrs. Edvard Bengtsson (Elin Gerda Persson)","female",30,1,0,"349910",15.5500,,"S","A",,
+3,1,"Lindqvist, Mr. Eino William","male",20,1,0,"STON/O 2. 3101285",7.9250,,"S","15",,
+3,0,"Linehan, Mr. Michael","male",,0,0,"330971",7.8792,,"Q",,,
+3,0,"Ling, Mr. Lee","male",28,0,0,"1601",56.4958,,"S",,,
+3,0,"Lithman, Mr. Simon","male",,0,0,"S.O./P.P. 251",7.5500,,"S",,,
+3,0,"Lobb, Mr. William Arthur","male",30,1,0,"A/5. 3336",16.1000,,"S",,,
+3,0,"Lobb, Mrs. William Arthur (Cordelia K Stanlick)","female",26,1,0,"A/5. 3336",16.1000,,"S",,,
+3,0,"Lockyer, Mr. Edward","male",,0,0,"1222",7.8792,,"S",,"153",
+3,0,"Lovell, Mr. John Hall (""Henry"")","male",20.5,0,0,"A/5 21173",7.2500,,"S",,,
+3,1,"Lulic, Mr. Nikola","male",27,0,0,"315098",8.6625,,"S","15",,
+3,0,"Lundahl, Mr. Johan Svensson","male",51,0,0,"347743",7.0542,,"S",,,
+3,1,"Lundin, Miss. Olga Elida","female",23,0,0,"347469",7.8542,,"S","10",,
+3,1,"Lundstrom, Mr. Thure Edvin","male",32,0,0,"350403",7.5792,,"S","15",,
+3,0,"Lyntakoff, Mr. Stanko","male",,0,0,"349235",7.8958,,"S",,,
+3,0,"MacKay, Mr. George William","male",,0,0,"C.A. 42795",7.5500,,"S",,,
+3,1,"Madigan, Miss. Margaret ""Maggie""","female",,0,0,"370370",7.7500,,"Q","15",,
+3,1,"Madsen, Mr. Fridtjof Arne","male",24,0,0,"C 17369",7.1417,,"S","13",,
+3,0,"Maenpaa, Mr. Matti Alexanteri","male",22,0,0,"STON/O 2. 3101275",7.1250,,"S",,,
+3,0,"Mahon, Miss. Bridget Delia","female",,0,0,"330924",7.8792,,"Q",,,
+3,0,"Mahon, Mr. John","male",,0,0,"AQ/4 3130",7.7500,,"Q",,,
+3,0,"Maisner, Mr. Simon","male",,0,0,"A/S 2816",8.0500,,"S",,,
+3,0,"Makinen, Mr. Kalle Edvard","male",29,0,0,"STON/O 2. 3101268",7.9250,,"S",,,
+3,1,"Mamee, Mr. Hanna","male",,0,0,"2677",7.2292,,"C","15",,
+3,0,"Mangan, Miss. Mary","female",30.5,0,0,"364850",7.7500,,"Q",,"61",
+3,1,"Mannion, Miss. Margareth","female",,0,0,"36866",7.7375,,"Q","16",,
+3,0,"Mardirosian, Mr. Sarkis","male",,0,0,"2655",7.2292,"F E46","C",,,
+3,0,"Markoff, Mr. Marin","male",35,0,0,"349213",7.8958,,"C",,,
+3,0,"Markun, Mr. Johann","male",33,0,0,"349257",7.8958,,"S",,,
+3,1,"Masselmani, Mrs. Fatima","female",,0,0,"2649",7.2250,,"C","C",,
+3,0,"Matinoff, Mr. Nicola","male",,0,0,"349255",7.8958,,"C",,,
+3,1,"McCarthy, Miss. Catherine ""Katie""","female",,0,0,"383123",7.7500,,"Q","15 16",,
+3,1,"McCormack, Mr. Thomas Joseph","male",,0,0,"367228",7.7500,,"Q",,,
+3,1,"McCoy, Miss. Agnes","female",,2,0,"367226",23.2500,,"Q","16",,
+3,1,"McCoy, Miss. Alicia","female",,2,0,"367226",23.2500,,"Q","16",,
+3,1,"McCoy, Mr. Bernard","male",,2,0,"367226",23.2500,,"Q","16",,
+3,1,"McDermott, Miss. Brigdet Delia","female",,0,0,"330932",7.7875,,"Q","13",,
+3,0,"McEvoy, Mr. Michael","male",,0,0,"36568",15.5000,,"Q",,,
+3,1,"McGovern, Miss. Mary","female",,0,0,"330931",7.8792,,"Q","13",,
+3,1,"McGowan, Miss. Anna ""Annie""","female",15,0,0,"330923",8.0292,,"Q",,,
+3,0,"McGowan, Miss. Katherine","female",35,0,0,"9232",7.7500,,"Q",,,
+3,0,"McMahon, Mr. Martin","male",,0,0,"370372",7.7500,,"Q",,,
+3,0,"McNamee, Mr. Neal","male",24,1,0,"376566",16.1000,,"S",,,
+3,0,"McNamee, Mrs. Neal (Eileen O'Leary)","female",19,1,0,"376566",16.1000,,"S",,"53",
+3,0,"McNeill, Miss. Bridget","female",,0,0,"370368",7.7500,,"Q",,,
+3,0,"Meanwell, Miss. (Marion Ogden)","female",,0,0,"SOTON/O.Q. 392087",8.0500,,"S",,,
+3,0,"Meek, Mrs. Thomas (Annie Louise Rowley)","female",,0,0,"343095",8.0500,,"S",,,
+3,0,"Meo, Mr. Alfonzo","male",55.5,0,0,"A.5. 11206",8.0500,,"S",,"201",
+3,0,"Mernagh, Mr. Robert","male",,0,0,"368703",7.7500,,"Q",,,
+3,1,"Midtsjo, Mr. Karl Albert","male",21,0,0,"345501",7.7750,,"S","15",,
+3,0,"Miles, Mr. Frank","male",,0,0,"359306",8.0500,,"S",,,
+3,0,"Mineff, Mr. Ivan","male",24,0,0,"349233",7.8958,,"S",,,
+3,0,"Minkoff, Mr. Lazar","male",21,0,0,"349211",7.8958,,"S",,,
+3,0,"Mionoff, Mr. Stoytcho","male",28,0,0,"349207",7.8958,,"S",,,
+3,0,"Mitkoff, Mr. Mito","male",,0,0,"349221",7.8958,,"S",,,
+3,1,"Mockler, Miss. Helen Mary ""Ellie""","female",,0,0,"330980",7.8792,,"Q","16",,
+3,0,"Moen, Mr. Sigurd Hansen","male",25,0,0,"348123",7.6500,"F G73","S",,"309",
+3,1,"Moor, Master. Meier","male",6,0,1,"392096",12.4750,"E121","S","14",,
+3,1,"Moor, Mrs. (Beila)","female",27,0,1,"392096",12.4750,"E121","S","14",,
+3,0,"Moore, Mr. Leonard Charles","male",,0,0,"A4. 54510",8.0500,,"S",,,
+3,1,"Moran, Miss. Bertha","female",,1,0,"371110",24.1500,,"Q","16",,
+3,0,"Moran, Mr. Daniel J","male",,1,0,"371110",24.1500,,"Q",,,
+3,0,"Moran, Mr. James","male",,0,0,"330877",8.4583,,"Q",,,
+3,0,"Morley, Mr. William","male",34,0,0,"364506",8.0500,,"S",,,
+3,0,"Morrow, Mr. Thomas Rowan","male",,0,0,"372622",7.7500,,"Q",,,
+3,1,"Moss, Mr. Albert Johan","male",,0,0,"312991",7.7750,,"S","B",,
+3,1,"Moubarek, Master. Gerios","male",,1,1,"2661",15.2458,,"C","C",,
+3,1,"Moubarek, Master. Halim Gonios (""William George"")","male",,1,1,"2661",15.2458,,"C","C",,
+3,1,"Moubarek, Mrs. George (Omine ""Amenia"" Alexander)","female",,0,2,"2661",15.2458,,"C","C",,
+3,1,"Moussa, Mrs. (Mantoura Boulos)","female",,0,0,"2626",7.2292,,"C",,,
+3,0,"Moutal, Mr. Rahamin Haim","male",,0,0,"374746",8.0500,,"S",,,
+3,1,"Mullens, Miss. Katherine ""Katie""","female",,0,0,"35852",7.7333,,"Q","16",,
+3,1,"Mulvihill, Miss. Bertha E","female",24,0,0,"382653",7.7500,,"Q","15",,
+3,0,"Murdlin, Mr. Joseph","male",,0,0,"A./5. 3235",8.0500,,"S",,,
+3,1,"Murphy, Miss. Katherine ""Kate""","female",,1,0,"367230",15.5000,,"Q","16",,
+3,1,"Murphy, Miss. Margaret Jane","female",,1,0,"367230",15.5000,,"Q","16",,
+3,1,"Murphy, Miss. Nora","female",,0,0,"36568",15.5000,,"Q","16",,
+3,0,"Myhrman, Mr. Pehr Fabian Oliver Malkolm","male",18,0,0,"347078",7.7500,,"S",,,
+3,0,"Naidenoff, Mr. Penko","male",22,0,0,"349206",7.8958,,"S",,,
+3,1,"Najib, Miss. Adele Kiamie ""Jane""","female",15,0,0,"2667",7.2250,,"C","C",,
+3,1,"Nakid, Miss. Maria (""Mary"")","female",1,0,2,"2653",15.7417,,"C","C",,
+3,1,"Nakid, Mr. Sahid","male",20,1,1,"2653",15.7417,,"C","C",,
+3,1,"Nakid, Mrs. Said (Waika ""Mary"" Mowad)","female",19,1,1,"2653",15.7417,,"C","C",,
+3,0,"Nancarrow, Mr. William Henry","male",33,0,0,"A./5. 3338",8.0500,,"S",,,
+3,0,"Nankoff, Mr. Minko","male",,0,0,"349218",7.8958,,"S",,,
+3,0,"Nasr, Mr. Mustafa","male",,0,0,"2652",7.2292,,"C",,,
+3,0,"Naughton, Miss. Hannah","female",,0,0,"365237",7.7500,,"Q",,,
+3,0,"Nenkoff, Mr. Christo","male",,0,0,"349234",7.8958,,"S",,,
+3,1,"Nicola-Yarred, Master. Elias","male",12,1,0,"2651",11.2417,,"C","C",,
+3,1,"Nicola-Yarred, Miss. Jamila","female",14,1,0,"2651",11.2417,,"C","C",,
+3,0,"Nieminen, Miss. Manta Josefina","female",29,0,0,"3101297",7.9250,,"S",,,
+3,0,"Niklasson, Mr. Samuel","male",28,0,0,"363611",8.0500,,"S",,,
+3,1,"Nilsson, Miss. Berta Olivia","female",18,0,0,"347066",7.7750,,"S","D",,
+3,1,"Nilsson, Miss. Helmina Josefina","female",26,0,0,"347470",7.8542,,"S","13",,
+3,0,"Nilsson, Mr. August Ferdinand","male",21,0,0,"350410",7.8542,,"S",,,
+3,0,"Nirva, Mr. Iisakki Antino Aijo","male",41,0,0,"SOTON/O2 3101272",7.1250,,"S",,,"Finland Sudbury, ON"
+3,1,"Niskanen, Mr. Juha","male",39,0,0,"STON/O 2. 3101289",7.9250,,"S","9",,
+3,0,"Nosworthy, Mr. Richard Cater","male",21,0,0,"A/4. 39886",7.8000,,"S",,,
+3,0,"Novel, Mr. Mansouer","male",28.5,0,0,"2697",7.2292,,"C",,"181",
+3,1,"Nysten, Miss. Anna Sofia","female",22,0,0,"347081",7.7500,,"S","13",,
+3,0,"Nysveen, Mr. Johan Hansen","male",61,0,0,"345364",6.2375,,"S",,,
+3,0,"O'Brien, Mr. Thomas","male",,1,0,"370365",15.5000,,"Q",,,
+3,0,"O'Brien, Mr. Timothy","male",,0,0,"330979",7.8292,,"Q",,,
+3,1,"O'Brien, Mrs. Thomas (Johanna ""Hannah"" Godfrey)","female",,1,0,"370365",15.5000,,"Q",,,
+3,0,"O'Connell, Mr. Patrick D","male",,0,0,"334912",7.7333,,"Q",,,
+3,0,"O'Connor, Mr. Maurice","male",,0,0,"371060",7.7500,,"Q",,,
+3,0,"O'Connor, Mr. Patrick","male",,0,0,"366713",7.7500,,"Q",,,
+3,0,"Odahl, Mr. Nils Martin","male",23,0,0,"7267",9.2250,,"S",,,
+3,0,"O'Donoghue, Ms. Bridget","female",,0,0,"364856",7.7500,,"Q",,,
+3,1,"O'Driscoll, Miss. Bridget","female",,0,0,"14311",7.7500,,"Q","D",,
+3,1,"O'Dwyer, Miss. Ellen ""Nellie""","female",,0,0,"330959",7.8792,,"Q",,,
+3,1,"Ohman, Miss. Velin","female",22,0,0,"347085",7.7750,,"S","C",,
+3,1,"O'Keefe, Mr. Patrick","male",,0,0,"368402",7.7500,,"Q","B",,
+3,1,"O'Leary, Miss. Hanora ""Norah""","female",,0,0,"330919",7.8292,,"Q","13",,
+3,1,"Olsen, Master. Artur Karl","male",9,0,1,"C 17368",3.1708,,"S","13",,
+3,0,"Olsen, Mr. Henry Margido","male",28,0,0,"C 4001",22.5250,,"S",,"173",
+3,0,"Olsen, Mr. Karl Siegwart Andreas","male",42,0,1,"4579",8.4042,,"S",,,
+3,0,"Olsen, Mr. Ole Martin","male",,0,0,"Fa 265302",7.3125,,"S",,,
+3,0,"Olsson, Miss. Elina","female",31,0,0,"350407",7.8542,,"S",,,
+3,0,"Olsson, Mr. Nils Johan Goransson","male",28,0,0,"347464",7.8542,,"S",,,
+3,1,"Olsson, Mr. Oscar Wilhelm","male",32,0,0,"347079",7.7750,,"S","A",,
+3,0,"Olsvigen, Mr. Thor Anderson","male",20,0,0,"6563",9.2250,,"S",,"89","Oslo, Norway Cameron, WI"
+3,0,"Oreskovic, Miss. Jelka","female",23,0,0,"315085",8.6625,,"S",,,
+3,0,"Oreskovic, Miss. Marija","female",20,0,0,"315096",8.6625,,"S",,,
+3,0,"Oreskovic, Mr. Luka","male",20,0,0,"315094",8.6625,,"S",,,
+3,0,"Osen, Mr. Olaf Elon","male",16,0,0,"7534",9.2167,,"S",,,
+3,1,"Osman, Mrs. Mara","female",31,0,0,"349244",8.6833,,"S",,,
+3,0,"O'Sullivan, Miss. Bridget Mary","female",,0,0,"330909",7.6292,,"Q",,,
+3,0,"Palsson, Master. Gosta Leonard","male",2,3,1,"349909",21.0750,,"S",,"4",
+3,0,"Palsson, Master. Paul Folke","male",6,3,1,"349909",21.0750,,"S",,,
+3,0,"Palsson, Miss. Stina Viola","female",3,3,1,"349909",21.0750,,"S",,,
+3,0,"Palsson, Miss. Torborg Danira","female",8,3,1,"349909",21.0750,,"S",,,
+3,0,"Palsson, Mrs. Nils (Alma Cornelia Berglund)","female",29,0,4,"349909",21.0750,,"S",,"206",
+3,0,"Panula, Master. Eino Viljami","male",1,4,1,"3101295",39.6875,,"S",,,
+3,0,"Panula, Master. Juha Niilo","male",7,4,1,"3101295",39.6875,,"S",,,
+3,0,"Panula, Master. Urho Abraham","male",2,4,1,"3101295",39.6875,,"S",,,
+3,0,"Panula, Mr. Ernesti Arvid","male",16,4,1,"3101295",39.6875,,"S",,,
+3,0,"Panula, Mr. Jaako Arnold","male",14,4,1,"3101295",39.6875,,"S",,,
+3,0,"Panula, Mrs. Juha (Maria Emilia Ojala)","female",41,0,5,"3101295",39.6875,,"S",,,
+3,0,"Pasic, Mr. Jakob","male",21,0,0,"315097",8.6625,,"S",,,
+3,0,"Patchett, Mr. George","male",19,0,0,"358585",14.5000,,"S",,,
+3,0,"Paulner, Mr. Uscher","male",,0,0,"3411",8.7125,,"C",,,
+3,0,"Pavlovic, Mr. Stefo","male",32,0,0,"349242",7.8958,,"S",,,
+3,0,"Peacock, Master. Alfred Edward","male",0.75,1,1,"SOTON/O.Q. 3101315",13.7750,,"S",,,
+3,0,"Peacock, Miss. Treasteall","female",3,1,1,"SOTON/O.Q. 3101315",13.7750,,"S",,,
+3,0,"Peacock, Mrs. Benjamin (Edith Nile)","female",26,0,2,"SOTON/O.Q. 3101315",13.7750,,"S",,,
+3,0,"Pearce, Mr. Ernest","male",,0,0,"343271",7.0000,,"S",,,
+3,0,"Pedersen, Mr. Olaf","male",,0,0,"345498",7.7750,,"S",,,
+3,0,"Peduzzi, Mr. Joseph","male",,0,0,"A/5 2817",8.0500,,"S",,,
+3,0,"Pekoniemi, Mr. Edvard","male",21,0,0,"STON/O 2. 3101294",7.9250,,"S",,,
+3,0,"Peltomaki, Mr. Nikolai Johannes","male",25,0,0,"STON/O 2. 3101291",7.9250,,"S",,,
+3,0,"Perkin, Mr. John Henry","male",22,0,0,"A/5 21174",7.2500,,"S",,,
+3,1,"Persson, Mr. Ernst Ulrik","male",25,1,0,"347083",7.7750,,"S","15",,
+3,1,"Peter, Master. Michael J","male",,1,1,"2668",22.3583,,"C","C",,
+3,1,"Peter, Miss. Anna","female",,1,1,"2668",22.3583,"F E69","C","D",,
+3,1,"Peter, Mrs. Catherine (Catherine Rizk)","female",,0,2,"2668",22.3583,,"C","D",,
+3,0,"Peters, Miss. Katie","female",,0,0,"330935",8.1375,,"Q",,,
+3,0,"Petersen, Mr. Marius","male",24,0,0,"342441",8.0500,,"S",,,
+3,0,"Petranec, Miss. Matilda","female",28,0,0,"349245",7.8958,,"S",,,
+3,0,"Petroff, Mr. Nedelio","male",19,0,0,"349212",7.8958,,"S",,,
+3,0,"Petroff, Mr. Pastcho (""Pentcho"")","male",,0,0,"349215",7.8958,,"S",,,
+3,0,"Petterson, Mr. Johan Emil","male",25,1,0,"347076",7.7750,,"S",,,
+3,0,"Pettersson, Miss. Ellen Natalia","female",18,0,0,"347087",7.7750,,"S",,,
+3,1,"Pickard, Mr. Berk (Berk Trembisky)","male",32,0,0,"SOTON/O.Q. 392078",8.0500,"E10","S","9",,
+3,0,"Plotcharsky, Mr. Vasil","male",,0,0,"349227",7.8958,,"S",,,
+3,0,"Pokrnic, Mr. Mate","male",17,0,0,"315095",8.6625,,"S",,,
+3,0,"Pokrnic, Mr. Tome","male",24,0,0,"315092",8.6625,,"S",,,
+3,0,"Radeff, Mr. Alexander","male",,0,0,"349223",7.8958,,"S",,,
+3,0,"Rasmussen, Mrs. (Lena Jacobsen Solvang)","female",,0,0,"65305",8.1125,,"S",,,
+3,0,"Razi, Mr. Raihed","male",,0,0,"2629",7.2292,,"C",,,
+3,0,"Reed, Mr. James George","male",,0,0,"362316",7.2500,,"S",,,
+3,0,"Rekic, Mr. Tido","male",38,0,0,"349249",7.8958,,"S",,,
+3,0,"Reynolds, Mr. Harold J","male",21,0,0,"342684",8.0500,,"S",,,
+3,0,"Rice, Master. Albert","male",10,4,1,"382652",29.1250,,"Q",,,
+3,0,"Rice, Master. Arthur","male",4,4,1,"382652",29.1250,,"Q",,,
+3,0,"Rice, Master. Eric","male",7,4,1,"382652",29.1250,,"Q",,,
+3,0,"Rice, Master. Eugene","male",2,4,1,"382652",29.1250,,"Q",,,
+3,0,"Rice, Master. George Hugh","male",8,4,1,"382652",29.1250,,"Q",,,
+3,0,"Rice, Mrs. William (Margaret Norton)","female",39,0,5,"382652",29.1250,,"Q",,"327",
+3,0,"Riihivouri, Miss. Susanna Juhantytar ""Sanni""","female",22,0,0,"3101295",39.6875,,"S",,,
+3,0,"Rintamaki, Mr. Matti","male",35,0,0,"STON/O 2. 3101273",7.1250,,"S",,,
+3,1,"Riordan, Miss. Johanna ""Hannah""","female",,0,0,"334915",7.7208,,"Q","13",,
+3,0,"Risien, Mr. Samuel Beard","male",,0,0,"364498",14.5000,,"S",,,
+3,0,"Risien, Mrs. Samuel (Emma)","female",,0,0,"364498",14.5000,,"S",,,
+3,0,"Robins, Mr. Alexander A","male",50,1,0,"A/5. 3337",14.5000,,"S",,"119",
+3,0,"Robins, Mrs. Alexander A (Grace Charity Laury)","female",47,1,0,"A/5. 3337",14.5000,,"S",,"7",
+3,0,"Rogers, Mr. William John","male",,0,0,"S.C./A.4. 23567",8.0500,,"S",,,
+3,0,"Rommetvedt, Mr. Knud Paust","male",,0,0,"312993",7.7750,,"S",,,
+3,0,"Rosblom, Miss. Salli Helena","female",2,1,1,"370129",20.2125,,"S",,,
+3,0,"Rosblom, Mr. Viktor Richard","male",18,1,1,"370129",20.2125,,"S",,,
+3,0,"Rosblom, Mrs. Viktor (Helena Wilhelmina)","female",41,0,2,"370129",20.2125,,"S",,,
+3,1,"Roth, Miss. Sarah A","female",,0,0,"342712",8.0500,,"S","C",,
+3,0,"Rouse, Mr. Richard Henry","male",50,0,0,"A/5 3594",8.0500,,"S",,,
+3,0,"Rush, Mr. Alfred George John","male",16,0,0,"A/4. 20589",8.0500,,"S",,,
+3,1,"Ryan, Mr. Edward","male",,0,0,"383162",7.7500,,"Q","14",,
+3,0,"Ryan, Mr. Patrick","male",,0,0,"371110",24.1500,,"Q",,,
+3,0,"Saad, Mr. Amin","male",,0,0,"2671",7.2292,,"C",,,
+3,0,"Saad, Mr. Khalil","male",25,0,0,"2672",7.2250,,"C",,,
+3,0,"Saade, Mr. Jean Nassr","male",,0,0,"2676",7.2250,,"C",,,
+3,0,"Sadlier, Mr. Matthew","male",,0,0,"367655",7.7292,,"Q",,,
+3,0,"Sadowitz, Mr. Harry","male",,0,0,"LP 1588",7.5750,,"S",,,
+3,0,"Saether, Mr. Simon Sivertsen","male",38.5,0,0,"SOTON/O.Q. 3101262",7.2500,,"S",,"32",
+3,0,"Sage, Master. Thomas Henry","male",,8,2,"CA. 2343",69.5500,,"S",,,
+3,0,"Sage, Master. William Henry","male",14.5,8,2,"CA. 2343",69.5500,,"S",,"67",
+3,0,"Sage, Miss. Ada","female",,8,2,"CA. 2343",69.5500,,"S",,,
+3,0,"Sage, Miss. Constance Gladys","female",,8,2,"CA. 2343",69.5500,,"S",,,
+3,0,"Sage, Miss. Dorothy Edith ""Dolly""","female",,8,2,"CA. 2343",69.5500,,"S",,,
+3,0,"Sage, Miss. Stella Anna","female",,8,2,"CA. 2343",69.5500,,"S",,,
+3,0,"Sage, Mr. Douglas Bullen","male",,8,2,"CA. 2343",69.5500,,"S",,,
+3,0,"Sage, Mr. Frederick","male",,8,2,"CA. 2343",69.5500,,"S",,,
+3,0,"Sage, Mr. George John Jr","male",,8,2,"CA. 2343",69.5500,,"S",,,
+3,0,"Sage, Mr. John George","male",,1,9,"CA. 2343",69.5500,,"S",,,
+3,0,"Sage, Mrs. John (Annie Bullen)","female",,1,9,"CA. 2343",69.5500,,"S",,,
+3,0,"Salander, Mr. Karl Johan","male",24,0,0,"7266",9.3250,,"S",,,
+3,1,"Salkjelsvik, Miss. Anna Kristine","female",21,0,0,"343120",7.6500,,"S","C",,
+3,0,"Salonen, Mr. Johan Werner","male",39,0,0,"3101296",7.9250,,"S",,,
+3,0,"Samaan, Mr. Elias","male",,2,0,"2662",21.6792,,"C",,,
+3,0,"Samaan, Mr. Hanna","male",,2,0,"2662",21.6792,,"C",,,
+3,0,"Samaan, Mr. Youssef","male",,2,0,"2662",21.6792,,"C",,,
+3,1,"Sandstrom, Miss. Beatrice Irene","female",1,1,1,"PP 9549",16.7000,"G6","S","13",,
+3,1,"Sandstrom, Mrs. Hjalmar (Agnes Charlotta Bengtsson)","female",24,0,2,"PP 9549",16.7000,"G6","S","13",,
+3,1,"Sandstrom, Miss. Marguerite Rut","female",4,1,1,"PP 9549",16.7000,"G6","S","13",,
+3,1,"Sap, Mr. Julius","male",25,0,0,"345768",9.5000,,"S","11",,
+3,0,"Saundercock, Mr. William Henry","male",20,0,0,"A/5. 2151",8.0500,,"S",,,
+3,0,"Sawyer, Mr. Frederick Charles","male",24.5,0,0,"342826",8.0500,,"S",,"284",
+3,0,"Scanlan, Mr. James","male",,0,0,"36209",7.7250,,"Q",,,
+3,0,"Sdycoff, Mr. Todor","male",,0,0,"349222",7.8958,,"S",,,
+3,0,"Shaughnessy, Mr. Patrick","male",,0,0,"370374",7.7500,,"Q",,,
+3,1,"Sheerlinck, Mr. Jan Baptist","male",29,0,0,"345779",9.5000,,"S","11",,
+3,0,"Shellard, Mr. Frederick William","male",,0,0,"C.A. 6212",15.1000,,"S",,,
+3,1,"Shine, Miss. Ellen Natalia","female",,0,0,"330968",7.7792,,"Q",,,
+3,0,"Shorney, Mr. Charles Joseph","male",,0,0,"374910",8.0500,,"S",,,
+3,0,"Simmons, Mr. John","male",,0,0,"SOTON/OQ 392082",8.0500,,"S",,,
+3,0,"Sirayanian, Mr. Orsen","male",22,0,0,"2669",7.2292,,"C",,,
+3,0,"Sirota, Mr. Maurice","male",,0,0,"392092",8.0500,,"S",,,
+3,0,"Sivic, Mr. Husein","male",40,0,0,"349251",7.8958,,"S",,,
+3,0,"Sivola, Mr. Antti Wilhelm","male",21,0,0,"STON/O 2. 3101280",7.9250,,"S",,,
+3,1,"Sjoblom, Miss. Anna Sofia","female",18,0,0,"3101265",7.4958,,"S","16",,
+3,0,"Skoog, Master. Harald","male",4,3,2,"347088",27.9000,,"S",,,
+3,0,"Skoog, Master. Karl Thorsten","male",10,3,2,"347088",27.9000,,"S",,,
+3,0,"Skoog, Miss. Mabel","female",9,3,2,"347088",27.9000,,"S",,,
+3,0,"Skoog, Miss. Margit Elizabeth","female",2,3,2,"347088",27.9000,,"S",,,
+3,0,"Skoog, Mr. Wilhelm","male",40,1,4,"347088",27.9000,,"S",,,
+3,0,"Skoog, Mrs. William (Anna Bernhardina Karlsson)","female",45,1,4,"347088",27.9000,,"S",,,
+3,0,"Slabenoff, Mr. Petco","male",,0,0,"349214",7.8958,,"S",,,
+3,0,"Slocovski, Mr. Selman Francis","male",,0,0,"SOTON/OQ 392086",8.0500,,"S",,,
+3,0,"Smiljanic, Mr. Mile","male",,0,0,"315037",8.6625,,"S",,,
+3,0,"Smith, Mr. Thomas","male",,0,0,"384461",7.7500,,"Q",,,
+3,1,"Smyth, Miss. Julia","female",,0,0,"335432",7.7333,,"Q","13",,
+3,0,"Soholt, Mr. Peter Andreas Lauritz Andersen","male",19,0,0,"348124",7.6500,"F G73","S",,,
+3,0,"Somerton, Mr. Francis William","male",30,0,0,"A.5. 18509",8.0500,,"S",,,
+3,0,"Spector, Mr. Woolf","male",,0,0,"A.5. 3236",8.0500,,"S",,,
+3,0,"Spinner, Mr. Henry John","male",32,0,0,"STON/OQ. 369943",8.0500,,"S",,,
+3,0,"Staneff, Mr. Ivan","male",,0,0,"349208",7.8958,,"S",,,
+3,0,"Stankovic, Mr. Ivan","male",33,0,0,"349239",8.6625,,"C",,,
+3,1,"Stanley, Miss. Amy Zillah Elsie","female",23,0,0,"CA. 2314",7.5500,,"S","C",,
+3,0,"Stanley, Mr. Edward Roland","male",21,0,0,"A/4 45380",8.0500,,"S",,,
+3,0,"Storey, Mr. Thomas","male",60.5,0,0,"3701",,,"S",,"261",
+3,0,"Stoytcheff, Mr. Ilia","male",19,0,0,"349205",7.8958,,"S",,,
+3,0,"Strandberg, Miss. Ida Sofia","female",22,0,0,"7553",9.8375,,"S",,,
+3,1,"Stranden, Mr. Juho","male",31,0,0,"STON/O 2. 3101288",7.9250,,"S","9",,
+3,0,"Strilic, Mr. Ivan","male",27,0,0,"315083",8.6625,,"S",,,
+3,0,"Strom, Miss. Telma Matilda","female",2,0,1,"347054",10.4625,"G6","S",,,
+3,0,"Strom, Mrs. Wilhelm (Elna Matilda Persson)","female",29,1,1,"347054",10.4625,"G6","S",,,
+3,1,"Sunderland, Mr. Victor Francis","male",16,0,0,"SOTON/OQ 392089",8.0500,,"S","B",,
+3,1,"Sundman, Mr. Johan Julian","male",44,0,0,"STON/O 2. 3101269",7.9250,,"S","15",,
+3,0,"Sutehall, Mr. Henry Jr","male",25,0,0,"SOTON/OQ 392076",7.0500,,"S",,,
+3,0,"Svensson, Mr. Johan","male",74,0,0,"347060",7.7750,,"S",,,
+3,1,"Svensson, Mr. Johan Cervin","male",14,0,0,"7538",9.2250,,"S","13",,
+3,0,"Svensson, Mr. Olof","male",24,0,0,"350035",7.7958,,"S",,,
+3,1,"Tenglin, Mr. Gunnar Isidor","male",25,0,0,"350033",7.7958,,"S","13 15",,
+3,0,"Theobald, Mr. Thomas Leonard","male",34,0,0,"363294",8.0500,,"S",,"176",
+3,1,"Thomas, Master. Assad Alexander","male",0.42,0,1,"2625",8.5167,,"C","16",,
+3,0,"Thomas, Mr. Charles P","male",,1,0,"2621",6.4375,,"C",,,
+3,0,"Thomas, Mr. John","male",,0,0,"2681",6.4375,,"C",,,
+3,0,"Thomas, Mr. Tannous","male",,0,0,"2684",7.2250,,"C",,,
+3,1,"Thomas, Mrs. Alexander (Thamine ""Thelma"")","female",16,1,1,"2625",8.5167,,"C","14",,
+3,0,"Thomson, Mr. Alexander Morrison","male",,0,0,"32302",8.0500,,"S",,,
+3,0,"Thorneycroft, Mr. Percival","male",,1,0,"376564",16.1000,,"S",,,
+3,1,"Thorneycroft, Mrs. Percival (Florence Kate White)","female",,1,0,"376564",16.1000,,"S","10",,
+3,0,"Tikkanen, Mr. Juho","male",32,0,0,"STON/O 2. 3101293",7.9250,,"S",,,
+3,0,"Tobin, Mr. Roger","male",,0,0,"383121",7.7500,"F38","Q",,,
+3,0,"Todoroff, Mr. Lalio","male",,0,0,"349216",7.8958,,"S",,,
+3,0,"Tomlin, Mr. Ernest Portage","male",30.5,0,0,"364499",8.0500,,"S",,"50",
+3,0,"Torber, Mr. Ernst William","male",44,0,0,"364511",8.0500,,"S",,,
+3,0,"Torfa, Mr. Assad","male",,0,0,"2673",7.2292,,"C",,,
+3,1,"Tornquist, Mr. William Henry","male",25,0,0,"LINE",0.0000,,"S","15",,
+3,0,"Toufik, Mr. Nakli","male",,0,0,"2641",7.2292,,"C",,,
+3,1,"Touma, Master. Georges Youssef","male",7,1,1,"2650",15.2458,,"C","C",,
+3,1,"Touma, Miss. Maria Youssef","female",9,1,1,"2650",15.2458,,"C","C",,
+3,1,"Touma, Mrs. Darwis (Hanne Youssef Razi)","female",29,0,2,"2650",15.2458,,"C","C",,
+3,0,"Turcin, Mr. Stjepan","male",36,0,0,"349247",7.8958,,"S",,,
+3,1,"Turja, Miss. Anna Sofia","female",18,0,0,"4138",9.8417,,"S","15",,
+3,1,"Turkula, Mrs. (Hedwig)","female",63,0,0,"4134",9.5875,,"S","15",,
+3,0,"van Billiard, Master. James William","male",,1,1,"A/5. 851",14.5000,,"S",,,
+3,0,"van Billiard, Master. Walter John","male",11.5,1,1,"A/5. 851",14.5000,,"S",,"1",
+3,0,"van Billiard, Mr. Austin Blyler","male",40.5,0,2,"A/5. 851",14.5000,,"S",,"255",
+3,0,"Van Impe, Miss. Catharina","female",10,0,2,"345773",24.1500,,"S",,,
+3,0,"Van Impe, Mr. Jean Baptiste","male",36,1,1,"345773",24.1500,,"S",,,
+3,0,"Van Impe, Mrs. Jean Baptiste (Rosalie Paula Govaert)","female",30,1,1,"345773",24.1500,,"S",,,
+3,0,"van Melkebeke, Mr. Philemon","male",,0,0,"345777",9.5000,,"S",,,
+3,0,"Vande Velde, Mr. Johannes Joseph","male",33,0,0,"345780",9.5000,,"S",,,
+3,0,"Vande Walle, Mr. Nestor Cyriel","male",28,0,0,"345770",9.5000,,"S",,,
+3,0,"Vanden Steen, Mr. Leo Peter","male",28,0,0,"345783",9.5000,,"S",,,
+3,0,"Vander Cruyssen, Mr. Victor","male",47,0,0,"345765",9.0000,,"S",,,
+3,0,"Vander Planke, Miss. Augusta Maria","female",18,2,0,"345764",18.0000,,"S",,,
+3,0,"Vander Planke, Mr. Julius","male",31,3,0,"345763",18.0000,,"S",,,
+3,0,"Vander Planke, Mr. Leo Edmondus","male",16,2,0,"345764",18.0000,,"S",,,
+3,0,"Vander Planke, Mrs. Julius (Emelia Maria Vandemoortele)","female",31,1,0,"345763",18.0000,,"S",,,
+3,1,"Vartanian, Mr. David","male",22,0,0,"2658",7.2250,,"C","13 15",,
+3,0,"Vendel, Mr. Olof Edvin","male",20,0,0,"350416",7.8542,,"S",,,
+3,0,"Vestrom, Miss. Hulda Amanda Adolfina","female",14,0,0,"350406",7.8542,,"S",,,
+3,0,"Vovk, Mr. Janko","male",22,0,0,"349252",7.8958,,"S",,,
+3,0,"Waelens, Mr. Achille","male",22,0,0,"345767",9.0000,,"S",,,"Antwerp, Belgium / Stanton, OH"
+3,0,"Ware, Mr. Frederick","male",,0,0,"359309",8.0500,,"S",,,
+3,0,"Warren, Mr. Charles William","male",,0,0,"C.A. 49867",7.5500,,"S",,,
+3,0,"Webber, Mr. James","male",,0,0,"SOTON/OQ 3101316",8.0500,,"S",,,
+3,0,"Wenzel, Mr. Linhart","male",32.5,0,0,"345775",9.5000,,"S",,"298",
+3,1,"Whabee, Mrs. George Joseph (Shawneene Abi-Saab)","female",38,0,0,"2688",7.2292,,"C","C",,
+3,0,"Widegren, Mr. Carl/Charles Peter","male",51,0,0,"347064",7.7500,,"S",,,
+3,0,"Wiklund, Mr. Jakob Alfred","male",18,1,0,"3101267",6.4958,,"S",,"314",
+3,0,"Wiklund, Mr. Karl Johan","male",21,1,0,"3101266",6.4958,,"S",,,
+3,1,"Wilkes, Mrs. James (Ellen Needs)","female",47,1,0,"363272",7.0000,,"S",,,
+3,0,"Willer, Mr. Aaron (""Abi Weller"")","male",,0,0,"3410",8.7125,,"S",,,
+3,0,"Willey, Mr. Edward","male",,0,0,"S.O./P.P. 751",7.5500,,"S",,,
+3,0,"Williams, Mr. Howard Hugh ""Harry""","male",,0,0,"A/5 2466",8.0500,,"S",,,
+3,0,"Williams, Mr. Leslie","male",28.5,0,0,"54636",16.1000,,"S",,"14",
+3,0,"Windelov, Mr. Einar","male",21,0,0,"SOTON/OQ 3101317",7.2500,,"S",,,
+3,0,"Wirz, Mr. Albert","male",27,0,0,"315154",8.6625,,"S",,"131",
+3,0,"Wiseman, Mr. Phillippe","male",,0,0,"A/4. 34244",7.2500,,"S",,,
+3,0,"Wittevrongel, Mr. Camille","male",36,0,0,"345771",9.5000,,"S",,,
+3,0,"Yasbeck, Mr. Antoni","male",27,1,0,"2659",14.4542,,"C","C",,
+3,1,"Yasbeck, Mrs. Antoni (Selini Alexander)","female",15,1,0,"2659",14.4542,,"C",,,
+3,0,"Youseff, Mr. Gerious","male",45.5,0,0,"2628",7.2250,,"C",,"312",
+3,0,"Yousif, Mr. Wazli","male",,0,0,"2647",7.2250,,"C",,,
+3,0,"Yousseff, Mr. Gerious","male",,0,0,"2627",14.4583,,"C",,,
+3,0,"Zabour, Miss. Hileni","female",14.5,1,0,"2665",14.4542,,"C",,"328",
+3,0,"Zabour, Miss. Thamine","female",,1,0,"2665",14.4542,,"C",,,
+3,0,"Zakarian, Mr. Mapriededer","male",26.5,0,0,"2656",7.2250,,"C",,"304",
+3,0,"Zakarian, Mr. Ortin","male",27,0,0,"2670",7.2250,,"C",,,
+3,0,"Zimmerman, Mr. Leo","male",29,0,0,"315082",7.8750,,"S",,,
From d1e1fc5c9d637395e32235e45891698478929700 Mon Sep 17 00:00:00 2001
From: Krishna Kaushik <131583096+kRiShNa-429407@users.noreply.github.com>
Date: Sat, 18 May 2024 22:37:38 +0530
Subject: [PATCH 069/405] Add files via upload
---
.../Importing_and_Exporting_Data_in_Pandas.md | 291 ++++++++++++++++++
1 file changed, 291 insertions(+)
create mode 100644 contrib/pandas/Importing_and_Exporting_Data_in_Pandas.md
diff --git a/contrib/pandas/Importing_and_Exporting_Data_in_Pandas.md b/contrib/pandas/Importing_and_Exporting_Data_in_Pandas.md
new file mode 100644
index 0000000..a6949d2
--- /dev/null
+++ b/contrib/pandas/Importing_and_Exporting_Data_in_Pandas.md
@@ -0,0 +1,291 @@
+# Importing_and_Exporting_Data_in_Pandas
+
+>Created by Krishna Kaushik
+
+- **Now we're able to create `Series` and `DataFrames` in pandas, but we usually do not do this , in practice we import the data which is in the form of .csv (Comma Seperated Values) , a spreadsheet file or something similar.**
+
+- *Good news is that pandas allows for easy importing of data like this through functions such as ``pd.read_csv()`` and ``pd.read_excel()`` for Microsoft Excel files.*
+
+## 1. Importing from a Google sheet to a pandas dataframe
+
+*Let's say that you wanted to get the information from Google Sheet document into a pandas DataFrame.*.
+
+*You could export it as a .csv file and then import it using ``pd.read_csv()``.*
+
+*In this case, the exported .csv file is called `Titanic.csv`*
+
+
+```python
+## Importing Titanic Data set
+import pandas as pd
+
+titanic_df= pd.read_csv("https://raw.githubusercontent.com/kRiShNa-429407/learn-python/main/contrib/pandas/Titanic.csv")
+titanic_df
+```
+
+
+
+
+
+
+
+
+
+
+
pclass
+
survived
+
name
+
sex
+
age
+
sibsp
+
parch
+
ticket
+
fare
+
cabin
+
embarked
+
boat
+
body
+
home.dest
+
+
+
+
+
0
+
1
+
1
+
Allen, Miss. Elisabeth Walton
+
female
+
29.00
+
0
+
0
+
24160
+
211.3375
+
B5
+
S
+
2
+
NaN
+
St Louis, MO
+
+
+
1
+
1
+
1
+
Allison, Master. Hudson Trevor
+
male
+
0.92
+
1
+
2
+
113781
+
151.5500
+
C22 C26
+
S
+
11
+
NaN
+
Montreal, PQ / Chesterville, ON
+
+
+
2
+
1
+
0
+
Allison, Miss. Helen Loraine
+
female
+
2.00
+
1
+
2
+
113781
+
151.5500
+
C22 C26
+
S
+
NaN
+
NaN
+
Montreal, PQ / Chesterville, ON
+
+
+
3
+
1
+
0
+
Allison, Mr. Hudson Joshua Creighton
+
male
+
30.00
+
1
+
2
+
113781
+
151.5500
+
C22 C26
+
S
+
NaN
+
135.0
+
Montreal, PQ / Chesterville, ON
+
+
+
4
+
1
+
0
+
Allison, Mrs. Hudson J C (Bessie Waldo Daniels)
+
female
+
25.00
+
1
+
2
+
113781
+
151.5500
+
C22 C26
+
S
+
NaN
+
NaN
+
Montreal, PQ / Chesterville, ON
+
+
+
...
+
...
+
...
+
...
+
...
+
...
+
...
+
...
+
...
+
...
+
...
+
...
+
...
+
...
+
...
+
+
+
1304
+
3
+
0
+
Zabour, Miss. Hileni
+
female
+
14.50
+
1
+
0
+
2665
+
14.4542
+
NaN
+
C
+
NaN
+
328.0
+
NaN
+
+
+
1305
+
3
+
0
+
Zabour, Miss. Thamine
+
female
+
NaN
+
1
+
0
+
2665
+
14.4542
+
NaN
+
C
+
NaN
+
NaN
+
NaN
+
+
+
1306
+
3
+
0
+
Zakarian, Mr. Mapriededer
+
male
+
26.50
+
0
+
0
+
2656
+
7.2250
+
NaN
+
C
+
NaN
+
304.0
+
NaN
+
+
+
1307
+
3
+
0
+
Zakarian, Mr. Ortin
+
male
+
27.00
+
0
+
0
+
2670
+
7.2250
+
NaN
+
C
+
NaN
+
NaN
+
NaN
+
+
+
1308
+
3
+
0
+
Zimmerman, Mr. Leo
+
male
+
29.00
+
0
+
0
+
315082
+
7.8750
+
NaN
+
S
+
NaN
+
NaN
+
NaN
+
+
+
+
1309 rows × 14 columns
+
+
+
+
+The dataset I am using here for your reference is taken from the same repository i.e ``learn-python`` (https://raw.githubusercontent.com/kRiShNa-429407/learn-python/main/contrib/pandas/Titanic.csv) I uploaded it you can use it from there.
+
+**Now we've got the same data from the Google Spreadsheet , but now available as ``pandas DataFrame`` which means we can now apply all pandas functionality over it.**
+
+#### Note: The quiet important thing i am telling is that ``pd.read_csv()`` takes the location of the file (which is in your current working directory) or the hyperlink of the dataset from the other source.
+
+#### But if you want to import the data from Github you can't directly use its link , you have to first convert it to raw by clicking on the raw button present in the repo .
+
+#### Also you can't use the data directly from `Kaggle` you have to use ``kaggle API``
+
+## 2. The Anatomy of DataFrame
+
+**Different functions use different labels for different things, and can get a little confusing.**
+
+- Rows are refer as ``axis=0``
+- columns are refer as ``axis=1``
+
+## 3. Exporting Data
+
+**OK, so after you've made a few changes to your data, you might want to export it and save it so someone else can access the changes.**
+
+**pandas allows you to export ``DataFrame's`` to ``.csv`` format using ``.to_csv()``, or to a spreadsheet format using .to_excel().**
+
+### Exporting a dataframe to a CSV
+
+**We haven't made any changes yet to the ``titanic_df`` DataFrame but let's try to export it.**
+
+
+```python
+#Export the titanic_df DataFrame to csv
+titanic_df.to_csv("exported_titanic.csv")
+```
+
+Running this will save a file called ``exported_titanic.csv`` to the current folder.
From bf4dcff08b1c47b0f15a63634879390156d2f995 Mon Sep 17 00:00:00 2001
From: Krishna Kaushik <131583096+kRiShNa-429407@users.noreply.github.com>
Date: Sat, 18 May 2024 22:39:54 +0530
Subject: [PATCH 070/405] Update index.md
---
contrib/pandas/index.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/contrib/pandas/index.md b/contrib/pandas/index.md
index f2a3fa7..84871dd 100644
--- a/contrib/pandas/index.md
+++ b/contrib/pandas/index.md
@@ -2,3 +2,4 @@
- [Pandas Series Vs NumPy ndarray](pandas_series_vs_numpy_ndarray.md)
- [Pandas Introduction and Dataframes in Pandas](Introduction_to_Pandas_Library_and_DataFrames.md)
+- [Importing and Exportin data in pandas](Importing_and_Exporting_Data_in_Pandas.md)
From 849f5abc6e072a7f96aec848fb8d0c5658518be8 Mon Sep 17 00:00:00 2001
From: Krishna Kaushik <131583096+kRiShNa-429407@users.noreply.github.com>
Date: Sat, 18 May 2024 22:40:30 +0530
Subject: [PATCH 071/405] Update Importing_and_Exporting_Data_in_Pandas.md
---
.../Importing_and_Exporting_Data_in_Pandas.md | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/contrib/pandas/Importing_and_Exporting_Data_in_Pandas.md b/contrib/pandas/Importing_and_Exporting_Data_in_Pandas.md
index a6949d2..4d0ffad 100644
--- a/contrib/pandas/Importing_and_Exporting_Data_in_Pandas.md
+++ b/contrib/pandas/Importing_and_Exporting_Data_in_Pandas.md
@@ -22,24 +22,6 @@ import pandas as pd
titanic_df= pd.read_csv("https://raw.githubusercontent.com/kRiShNa-429407/learn-python/main/contrib/pandas/Titanic.csv")
titanic_df
```
-
-
-
-
-
-
From be8993b6164d12fab5d3ec6e94172b8da5deadef Mon Sep 17 00:00:00 2001
From: Vrisha Shah <74671946+Vrisha213@users.noreply.github.com>
Date: Sun, 19 May 2024 09:28:58 +0530
Subject: [PATCH 072/405] Create support-vector-machine.md
added conetnt on SVM
---
.../support-vector-machine.md | 52 +++++++++++++++++++
1 file changed, 52 insertions(+)
create mode 100644 contrib/machine-learning/support-vector-machine.md
diff --git a/contrib/machine-learning/support-vector-machine.md b/contrib/machine-learning/support-vector-machine.md
new file mode 100644
index 0000000..90ee922
--- /dev/null
+++ b/contrib/machine-learning/support-vector-machine.md
@@ -0,0 +1,52 @@
+Support Vector Machine or SVM is one of the most popular Supervised Learning algorithms, which is used for Classification as well as Regression problems. However, primarily, it is used for Classification problems in Machine Learning.
+SVM can be of two types -
+1. Linear SVM: Linear SVM is used for linearly separable data, which means if a dataset can be classified into two classes by using a single straight line, then such data is termed as linearly separable data, and classifier is used called as Linear SVM classifier.
+2. Non-linear SVM: Non-Linear SVM is used for non-linearly separated data, which means if a dataset cannot be classified by using a straight line, then such data is termed as non-linear data and classifier used is called as Non-linear SVM classifier.
+
+Working of SVM - The goal of SVM is to find a hyperplane that separates the data points into different classes. A hyperplane is a line in 2D space, a plane in 3D space, or a higher-dimensional surface in n-dimensional space. The hyperplane is chosen in such a way that it maximizes the margin, which is the distance between the hyperplane and the closest data points of each class. The closest data points are called the support vectors.
+The distance between the hyperplane and a data point "x" can be calculated using the formula −
+distance = (w . x + b) / ||w||
+where "w" is the weight vector, "b" is the bias term, and "||w||" is the Euclidean norm of the weight vector. The weight vector "w" is perpendicular to the hyperplane and determines its orientation, while the bias term "b" determines its position.
+The optimal hyperplane is found by solving an optimization problem, which is to maximize the margin subject to the constraint that all data points are correctly classified. In other words, we want to find the hyperplane that maximizes the margin between the two classes while ensuring that no data point is misclassified. This is a convex optimization problem that can be solved using quadratic programming. If the data points are not linearly separable, we can use a technique called kernel trick to map the data points into a higher-dimensional space where they become separable. The kernel function computes the inner product between the mapped data points without computing the mapping itself. This allows us to work with the data points in the higherdimensional space without incurring the computational cost of mapping them.
+
+1. Hyperplane:
+There can be multiple lines/decision boundaries to segregate the classes in n-dimensional space, but we need to find out the best decision boundary that helps to classify the data points. This best boundary is known as the hyperplane of SVM.
+The dimensions of the hyperplane depend on the features present in the dataset, which means if there are 2 features, then hyperplane will be a straight line. And if there are 3 features, then hyperplane will be a 2-dimension plane. We always create a hyperplane that has a maximum margin, which means the maximum distance between the data points.
+2. Support Vectors:
+The data points or vectors that are the closest to the hyperplane and which affect the position of the hyperplane are termed as Support Vector. Since these vectors support the hyperplane, hence called a Support vector.
+3. Margin:
+It may be defined as the gap between two lines on the closet data points of different classes. It can be calculated as the perpendicular distance from the line to the support vectors. Large margin is considered as a good margin and small margin is considered as a bad margin.
+
+We will use the famous Iris dataset, which contains the sepal length, sepal width, petal length, and petal width of three species of iris flowers: Iris setosa, Iris versicolor, and Iris virginica. The goal is to classify the flowers into their respective species based on these four features. We load the iris dataset using load_iris and split the data into training and testing sets using train_test_split. We use a test size of 0.2, which means that 20% of the data will be used for testing and 80% for training. We set the random state to 42 to ensure reproducibility of the results.
+
+# Implemetation of SVM in Python
+
+from sklearn.datasets import load_iris
+from sklearn.model_selection import train_test_split
+from sklearn.svm import SVC
+from sklearn.metrics import accuracy_score
+
+# load the iris dataset
+iris = load_iris()
+
+# split the data into training and testing sets
+X_train, X_test, y_train, y_test = train_test_split(iris.data,
+iris.target, test_size=0.2, random_state=42)
+
+# create an SVM classifier with a linear kernel
+svm = SVC(kernel='linear')
+
+# train the SVM classifier on the training set
+svm.fit(X_train, y_train)
+
+# make predictions on the testing set
+y_pred = svm.predict(X_test)
+
+# calculate the accuracy of the classifier
+accuracy = accuracy_score(y_test, y_pred)
+print("Accuracy:", accuracy)
+
+# Output
+Accuracy: 1
+
+
From 4be728eb4764637fa8072aeebcaa9965e619d578 Mon Sep 17 00:00:00 2001
From: Ananyagra24 <155280507+Ananyagra24@users.noreply.github.com>
Date: Sun, 19 May 2024 09:44:37 +0530
Subject: [PATCH 074/405] Update dice_roller.md
---
contrib/mini-projects/dice_roller.md | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/contrib/mini-projects/dice_roller.md b/contrib/mini-projects/dice_roller.md
index c083934..6e1b793 100644
--- a/contrib/mini-projects/dice_roller.md
+++ b/contrib/mini-projects/dice_roller.md
@@ -1,8 +1,15 @@
+Dice Roller
+
+The aim of this project is to replicate a dice and generate a random number from the numbers 1 to 6.
+For this first we will import the random library which will help make random choices.
```
import random
def dice():
dice_no = random.choice([1,2,3,4,5,6])
return "You got " + str(dice_no)
+```
+The above snippet of code defines a function called "dice( )" which makes the random choice and returns the number that is generated.
+```
def roll_dice():
print("Hey Guys, you will now roll a single dice using Python!")
while True:
@@ -17,3 +24,6 @@ def roll_dice():
print("Thanks for rolling the dice.")
roll_dice()
```
+The above code defines a function called "roll_dice( )" which interacts with the user.
+It prompts the user to give an input and if the input is k,the code proceeds further to generate a random number or gives the message of invalid input and asks the user to try again.
+After the dice has been rolled once, the function asks the user whether they want a reroll in the form of a yes or no question.The dice is rolled again if the user gives 'yes' as an answer and exits the code if the user replies with anything other than yes.
From 26053d5382c4f2e26160bba7ea1385b92c228c5c Mon Sep 17 00:00:00 2001
From: Eshparsi
Date: Sun, 19 May 2024 12:08:10 +0530
Subject: [PATCH 075/405] graph
---
contrib/Data-Structure-Graphs/graph.md | 220 +++++++++++++++++++++++++
contrib/Data-Structure-Graphs/index.md | 3 +
2 files changed, 223 insertions(+)
create mode 100644 contrib/Data-Structure-Graphs/graph.md
create mode 100644 contrib/Data-Structure-Graphs/index.md
diff --git a/contrib/Data-Structure-Graphs/graph.md b/contrib/Data-Structure-Graphs/graph.md
new file mode 100644
index 0000000..b9bd709
--- /dev/null
+++ b/contrib/Data-Structure-Graphs/graph.md
@@ -0,0 +1,220 @@
+# Graph Data Stucture
+
+Graph is a non-linear data structure consisting of vertices and edges. It is a powerful tool for representing and analyzing complex relationships between objects or entities.
+
+## Components of a Graph:
+
+**Vertices:** Vertices are the fundamental units of the graph. Sometimes, vertices are also known as vertex or nodes. Every node/vertex can be labeled or unlabeled.
+**Edges:** Edges are drawn or used to connect two nodes of the graph. It can be ordered pair of nodes in a directed graph. Edges can connect any two nodes in any possible way. There are no rules. very edge can be labelled/unlabelled.
+
+## Basic Operations on Graphs:
+- Insertion of Nodes/Edges in the graph
+- Deletion of Nodes/Edges in the graph
+- Searching on Graphs
+- Traversal of Graphs
+
+## Types of Graph ##
+
+
+**1.Undirected Graph:** In an undirected graph, edges have no direction, and they represent symmetric relationships between nodes. If there is an edge between node A and node B, you can travel from A to B and from B to A.
+
+**2. Directed Graph (Digraph):** In a directed graph, edges have a direction, indicating a one-way relationship between nodes. If there is an edge from node A to node B, you can travel from A to B but not necessarily from B to A.
+
+**3. Weighted Graph:** In a weighted graph, edges have associated weights or costs. These weights can represent various attributes such as distance, cost, or capacity. Weighted graphs are commonly used in applications like route planning or network optimization.
+
+**4. Cyclic Graph:** A cyclic graph contains at least one cycle, which is a path that starts and ends at the same node. In other words, you can traverse the graph and return to a previously visited node by following the edges.
+
+**5. Acyclic Graph:** An acyclic graph, as the name suggests, does not contain any cycles. This type of graph is often used in scenarios where a cycle would be nonsensical or undesirable, such as representing dependencies between tasks or events.
+
+**6. Tree:** A tree is a special type of acyclic graph where each node has a unique parent except for the root node, which has no parent. Trees have a hierarchical structure and are frequently used in data structures like binary trees or decision trees.
+
+## Representation of Graphs:##
+There are two ways to store a graph:
+
+**1. Adjacency Matrix**
+In this method, the graph is stored in the form of the 2D matrix where rows and columns denote vertices. Each entry in the matrix represents the weight of the edge between those vertices.
+
+```python
+def create_adjacency_matrix(graph):
+ num_vertices = len(graph)
+
+ adj_matrix = [[0] * num_vertices for _ in range(num_vertices)]
+
+ for i in range(num_vertices):
+ for j in range(num_vertices):
+ if graph[i][j] == 1:
+ adj_matrix[i][j] = 1
+ adj_matrix[j][i] = 1
+
+ return adj_matrix
+
+
+graph = [
+ [0, 1, 0, 0],
+ [1, 0, 1, 0],
+ [0, 1, 0, 1],
+ [0, 0, 1, 0]
+]
+
+adj_matrix = create_adjacency_matrix(graph)
+
+for row in adj_matrix:
+ print(' '.join(map(str, row)))
+
+```
+
+**2. Adjacency List**
+This graph is represented as a collection of linked lists. There is an array of pointer which points to the edges connected to that vertex.
+
+```python
+def create_adjacency_list(edges, num_vertices):
+ adj_list = [[] for _ in range(num_vertices)]
+
+ for u, v in edges:
+ adj_list[u].append(v)
+ adj_list[v].append(u)
+
+ return adj_list
+
+if __name__ == "__main__":
+ num_vertices = 4
+ edges = [(0, 1), (0, 2), (1, 2), (2, 3), (3, 1)]
+
+ adj_list = create_adjacency_list(edges, num_vertices)
+
+ for i in range(num_vertices):
+ print(f"{i} -> {' '.join(map(str, adj_list[i]))}")
+```
+`Output
+0 -> 1 2
+1 -> 0 2 3
+2 -> 0 1 3
+3 -> 2 1 `
+
+
+
+# Traversal Techniques #
+
+## Breadth First Search (BFS) ##
+- It is a graph traversal algorithm that explores all the vertices in a graph at the current depth before moving on to the vertices at the next depth level.
+- It starts at a specified vertex and visits all its neighbors before moving on to the next level of neighbors.
+BFS is commonly used in algorithms for pathfinding, connected components, and shortest path problems in graphs.
+
+**Steps of BFS algorithms**
+
+
+- **Step1:** Initially queue and visited arrays are empty.
+- **Step2:** Push node 0 into queue and mark it visited.
+- **Step 3:** Remove node 0 from the front of queue and visit the unvisited neighbours and push them into queue.
+- **Step 4:** Remove node 1 from the front of queue and visit the unvisited neighbours and push them into queue.
+- **Step 5:** Remove node 2 from the front of queue and visit the unvisited neighbours and push them into queue.
+- **Step 6:** Remove node 3 from the front of queue and visit the unvisited neighbours and push them into queue.
+- **Steps 7:** Remove node 4 from the front of queue and visit the unvisited neighbours and push them into queue.
+
+```python
+
+from collections import deque
+
+def bfs(adjList, startNode, visited):
+ q = deque()
+
+ visited[startNode] = True
+ q.append(startNode)
+
+ while q:
+ currentNode = q.popleft()
+ print(currentNode, end=" ")
+
+ for neighbor in adjList[currentNode]:
+ if not visited[neighbor]:
+ visited[neighbor] = True
+ q.append(neighbor)
+
+def addEdge(adjList, u, v):
+ adjList[u].append(v)
+
+def main():
+ vertices = 5
+
+ adjList = [[] for _ in range(vertices)]
+
+ addEdge(adjList, 0, 1)
+ addEdge(adjList, 0, 2)
+ addEdge(adjList, 1, 3)
+ addEdge(adjList, 1, 4)
+ addEdge(adjList, 2, 4)
+
+ visited = [False] * vertices
+
+ print("Breadth First Traversal", end=" ")
+ bfs(adjList, 0, visited)
+
+if __name__ == "__main__": #Output : Breadth First Traversal 0 1 2 3 4
+ main()
+
+```
+
+**Time Complexity:** `O(V+E)`, where V is the number of nodes and E is the number of edges.
+**Auxiliary Space:** `O(V)`
+
+
+## Depth-first search ##
+
+Depth-first search is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the root node (selecting some arbitrary node as the root node in the case of a graph) and explores as far as possible along each branch before backtracking.
+
+**Steps of DFS algorithms**
+- **Step1:** Initially stack and visited arrays are empty.
+- **Step 2:** Visit 0 and put its adjacent nodes which are not visited yet into the stack.
+- **Step 3:** Now, Node 1 at the top of the stack, so visit node 1 and pop it from the stack and put all of its adjacent nodes which are not visited in the stack.
+- **Step 4:** Now, Node 2 at the top of the stack, so visit node 2 and pop it from the stack and put all of its adjacent nodes which are not visited (i.e, 3, 4) in the stack.
+- **Step 5:** Now, Node 4 at the top of the stack, so visit node 4 and pop it from the stack and put all of its adjacent nodes which are not visited in the stack.
+- **Step 6:** Now, Node 3 at the top of the stack, so visit node 3 and pop it from the stack and put all of its adjacent nodes which are not visited in the stack.
+
+
+
+```python
+from collections import defaultdict
+
+class Graph:
+
+ def __init__(self):
+
+ self.graph = defaultdict(list)
+
+ def addEdge(self, u, v):
+ self.graph[u].append(v)
+
+ def DFSUtil(self, v, visited):
+
+ visited.add(v)
+ print(v, end=' ')
+
+ for neighbour in self.graph[v]:
+ if neighbour not in visited:
+ self.DFSUtil(neighbour, visited)
+
+ def DFS(self, v):
+
+ visited = set()
+
+ self.DFSUtil(v, visited)
+
+if __name__ == "__main__":
+ g = Graph()
+ g.addEdge(0, 1)
+ g.addEdge(0, 2)
+ g.addEdge(1, 2)
+ g.addEdge(2, 0)
+ g.addEdge(2, 3)
+ g.addEdge(3, 3)
+
+ print("Depth First Traversal (starting from vertex 2): ",g.DFS(2)) #Output: Depth First Traversal (starting from vertex 2): 2 0 1 3
+
+```
+
+**Time complexity:** `O(V + E)`, where V is the number of vertices and E is the number of edges in the graph.
+**Auxiliary Space:** `O(V + E)`, since an extra visited array of size V is required, And stack size for iterative call to DFS function.
+
+
+
+
diff --git a/contrib/Data-Structure-Graphs/index.md b/contrib/Data-Structure-Graphs/index.md
new file mode 100644
index 0000000..6471576
--- /dev/null
+++ b/contrib/Data-Structure-Graphs/index.md
@@ -0,0 +1,3 @@
+# List of sections
+
+- [Graphs](graph.md)
\ No newline at end of file
From 0db9cef68cc452409013ad9d94335d8e1e0c4124 Mon Sep 17 00:00:00 2001
From: Eshparsi
Date: Sun, 19 May 2024 12:21:46 +0530
Subject: [PATCH 076/405] g
---
contrib/Data-Structure-Graphs/graph.md | 61 +++++++++++++-------------
1 file changed, 30 insertions(+), 31 deletions(-)
diff --git a/contrib/Data-Structure-Graphs/graph.md b/contrib/Data-Structure-Graphs/graph.md
index b9bd709..9837896 100644
--- a/contrib/Data-Structure-Graphs/graph.md
+++ b/contrib/Data-Structure-Graphs/graph.md
@@ -2,21 +2,22 @@
Graph is a non-linear data structure consisting of vertices and edges. It is a powerful tool for representing and analyzing complex relationships between objects or entities.
-## Components of a Graph:
+## Components of a Graph
-**Vertices:** Vertices are the fundamental units of the graph. Sometimes, vertices are also known as vertex or nodes. Every node/vertex can be labeled or unlabeled.
-**Edges:** Edges are drawn or used to connect two nodes of the graph. It can be ordered pair of nodes in a directed graph. Edges can connect any two nodes in any possible way. There are no rules. very edge can be labelled/unlabelled.
+1. **Vertices:** Vertices are the fundamental units of the graph. Sometimes, vertices are also known as vertex or nodes. Every node/vertex can be labeled or unlabeled.
-## Basic Operations on Graphs:
+2. **Edges:** Edges are drawn or used to connect two nodes of the graph. It can be ordered pair of nodes in a directed graph. Edges can connect any two nodes in any possible way. There are no rules. very edge can be labelled/unlabelled.
+
+## Basic Operations on Graphs
- Insertion of Nodes/Edges in the graph
- Deletion of Nodes/Edges in the graph
- Searching on Graphs
- Traversal of Graphs
-## Types of Graph ##
+## Types of Graph
-**1.Undirected Graph:** In an undirected graph, edges have no direction, and they represent symmetric relationships between nodes. If there is an edge between node A and node B, you can travel from A to B and from B to A.
+**1. Undirected Graph:** In an undirected graph, edges have no direction, and they represent symmetric relationships between nodes. If there is an edge between node A and node B, you can travel from A to B and from B to A.
**2. Directed Graph (Digraph):** In a directed graph, edges have a direction, indicating a one-way relationship between nodes. If there is an edge from node A to node B, you can travel from A to B but not necessarily from B to A.
@@ -28,10 +29,10 @@ Graph is a non-linear data structure consisting of vertices and edges. It is a p
**6. Tree:** A tree is a special type of acyclic graph where each node has a unique parent except for the root node, which has no parent. Trees have a hierarchical structure and are frequently used in data structures like binary trees or decision trees.
-## Representation of Graphs:##
+## Representation of Graphs
There are two ways to store a graph:
-**1. Adjacency Matrix**
+1. **Adjacency Matrix**
In this method, the graph is stored in the form of the 2D matrix where rows and columns denote vertices. Each entry in the matrix represents the weight of the edge between those vertices.
```python
@@ -63,8 +64,8 @@ for row in adj_matrix:
```
-**2. Adjacency List**
-This graph is represented as a collection of linked lists. There is an array of pointer which points to the edges connected to that vertex.
+2. **Adjacency List**
+In this method, the graph is represented as a collection of linked lists. There is an array of pointer which points to the edges connected to that vertex.
```python
def create_adjacency_list(edges, num_vertices):
@@ -85,17 +86,17 @@ if __name__ == "__main__":
for i in range(num_vertices):
print(f"{i} -> {' '.join(map(str, adj_list[i]))}")
```
-`Output
-0 -> 1 2
-1 -> 0 2 3
-2 -> 0 1 3
-3 -> 2 1 `
+`Output`
+`0 -> 1 2`
+`1 -> 0 2 3`
+`2 -> 0 1 3`
+`3 -> 2 1 `
-# Traversal Techniques #
+# Traversal Techniques
-## Breadth First Search (BFS) ##
+## Breadth First Search (BFS)
- It is a graph traversal algorithm that explores all the vertices in a graph at the current depth before moving on to the vertices at the next depth level.
- It starts at a specified vertex and visits all its neighbors before moving on to the next level of neighbors.
BFS is commonly used in algorithms for pathfinding, connected components, and shortest path problems in graphs.
@@ -103,13 +104,13 @@ BFS is commonly used in algorithms for pathfinding, connected components, and sh
**Steps of BFS algorithms**
-- **Step1:** Initially queue and visited arrays are empty.
-- **Step2:** Push node 0 into queue and mark it visited.
+- **Step 1:** Initially queue and visited arrays are empty.
+- **Step 2:** Push node 0 into queue and mark it visited.
- **Step 3:** Remove node 0 from the front of queue and visit the unvisited neighbours and push them into queue.
- **Step 4:** Remove node 1 from the front of queue and visit the unvisited neighbours and push them into queue.
- **Step 5:** Remove node 2 from the front of queue and visit the unvisited neighbours and push them into queue.
- **Step 6:** Remove node 3 from the front of queue and visit the unvisited neighbours and push them into queue.
-- **Steps 7:** Remove node 4 from the front of queue and visit the unvisited neighbours and push them into queue.
+- **Step 7:** Remove node 4 from the front of queue and visit the unvisited neighbours and push them into queue.
```python
@@ -154,16 +155,17 @@ if __name__ == "__main__": #Output : Breadth First Traversal 0 1 2 3 4
```
-**Time Complexity:** `O(V+E)`, where V is the number of nodes and E is the number of edges.
-**Auxiliary Space:** `O(V)`
+- **Time Complexity:** `O(V+E)`, where V is the number of nodes and E is the number of edges.
+- **Auxiliary Space:** `O(V)`
-## Depth-first search ##
+## Depth-first search
Depth-first search is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the root node (selecting some arbitrary node as the root node in the case of a graph) and explores as far as possible along each branch before backtracking.
**Steps of DFS algorithms**
-- **Step1:** Initially stack and visited arrays are empty.
+
+- **Step 1:** Initially stack and visited arrays are empty.
- **Step 2:** Visit 0 and put its adjacent nodes which are not visited yet into the stack.
- **Step 3:** Now, Node 1 at the top of the stack, so visit node 1 and pop it from the stack and put all of its adjacent nodes which are not visited in the stack.
- **Step 4:** Now, Node 2 at the top of the stack, so visit node 2 and pop it from the stack and put all of its adjacent nodes which are not visited (i.e, 3, 4) in the stack.
@@ -178,14 +180,12 @@ from collections import defaultdict
class Graph:
def __init__(self):
-
self.graph = defaultdict(list)
def addEdge(self, u, v):
self.graph[u].append(v)
def DFSUtil(self, v, visited):
-
visited.add(v)
print(v, end=' ')
@@ -194,9 +194,7 @@ class Graph:
self.DFSUtil(neighbour, visited)
def DFS(self, v):
-
visited = set()
-
self.DFSUtil(v, visited)
if __name__ == "__main__":
@@ -208,12 +206,13 @@ if __name__ == "__main__":
g.addEdge(2, 3)
g.addEdge(3, 3)
- print("Depth First Traversal (starting from vertex 2): ",g.DFS(2)) #Output: Depth First Traversal (starting from vertex 2): 2 0 1 3
+ print("Depth First Traversal (starting from vertex 2): ",g.DFS(2))
```
+`Output: Depth First Traversal (starting from vertex 2): 2 0 1 3 `
-**Time complexity:** `O(V + E)`, where V is the number of vertices and E is the number of edges in the graph.
-**Auxiliary Space:** `O(V + E)`, since an extra visited array of size V is required, And stack size for iterative call to DFS function.
+- **Time complexity:** `O(V + E)`, where V is the number of vertices and E is the number of edges in the graph.
+- **Auxiliary Space:** `O(V + E)`, since an extra visited array of size V is required, And stack size for iterative call to DFS function.
From 05071b50871a74cfa03420c70014f6a6c16d96fd Mon Sep 17 00:00:00 2001
From: Eshparsi <112681516+Eshparsi@users.noreply.github.com>
Date: Sun, 19 May 2024 12:24:13 +0530
Subject: [PATCH 077/405] Update graph.md
---
contrib/Data-Structure-Graphs/graph.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/Data-Structure-Graphs/graph.md b/contrib/Data-Structure-Graphs/graph.md
index 9837896..517c90d 100644
--- a/contrib/Data-Structure-Graphs/graph.md
+++ b/contrib/Data-Structure-Graphs/graph.md
@@ -32,7 +32,7 @@ Graph is a non-linear data structure consisting of vertices and edges. It is a p
## Representation of Graphs
There are two ways to store a graph:
-1. **Adjacency Matrix**
+1. **Adjacency Matrix:**
In this method, the graph is stored in the form of the 2D matrix where rows and columns denote vertices. Each entry in the matrix represents the weight of the edge between those vertices.
```python
@@ -64,7 +64,7 @@ for row in adj_matrix:
```
-2. **Adjacency List**
+2. **Adjacency List:**
In this method, the graph is represented as a collection of linked lists. There is an array of pointer which points to the edges connected to that vertex.
```python
From 0b9c7823fac1eb920e4bda3cd7bb5667a7023601 Mon Sep 17 00:00:00 2001
From: Lingamuneni Santhosh Siddhardha
<103999924+Santhosh-Siddhardha@users.noreply.github.com>
Date: Sun, 19 May 2024 22:09:39 +0530
Subject: [PATCH 078/405] Create loading_arrays_from_files.md
Added Introduction
Added numpy.loadtxt method
Added numpy.genfromtxt method
Added numpy.fromfile method
Added numpy.load method
---
contrib/numpy/loading_arrays_from_files.md | 67 ++++++++++++++++++++++
1 file changed, 67 insertions(+)
create mode 100644 contrib/numpy/loading_arrays_from_files.md
diff --git a/contrib/numpy/loading_arrays_from_files.md b/contrib/numpy/loading_arrays_from_files.md
new file mode 100644
index 0000000..f1717c2
--- /dev/null
+++ b/contrib/numpy/loading_arrays_from_files.md
@@ -0,0 +1,67 @@
+# Loading Arrays From Files
+The ability to load data from various file formats is a critical feature for scientific computing and data analysis.
+NumPy provides several functions to read data from different file types and convert them into ndarrays.
+This section will cover how to load ndarrays from common file formats, including CSV, TSV, and binary files.
+
+### Here are the methods available:
+
+`numpy.loadtxt`: The loadtxt function allows you to load data from a text file.You can specify various parameters such as the file name, data type, delimiter,
+and more. It reads the file line by line, splits it at the specified delimiter, and converts the values into an array.
+
+- **Syntax:**
+ ```python
+ numpy.loadtxt(fname, dtype = float, delimiter=None, converters=None, skiprows=0, usecols=None)
+ ```
+
+ `fname` : Name of the file
+ `dtype` : Data type of the resulting array. (By default is float)
+ `delimiter`: String or character separating columns; default is any whitespace.
+ `converters`: Dictionary mapping column number to a function to convert that column's string to a float.
+ `skiprows`: Number of lines to skip at the beginning of the file.
+ `usecols`: Which columns to read starting from 0.
+
+- **Example for `loadtxt`:**
+
+ **example.txt**
+
+ 
+
+ **Code**
+ ```python
+ import numpy as np
+ arr = np.loadtxt("loadtxt.txt", dtype=int)
+ print(arr)
+ ```
+
+ **Output**
+ ```python
+ [1 2 3 4 5]
+ ```
+
+
+`numpy.genfromtxt`: The genfromtxt function is similar to loadtxt but provides more flexibility. It handles missing values (such as NaNs), allows custom converters
+for data parsing, and can handle different data types within the same file. It’s particularly useful for handling complex data formats.
+
+- **Syntax:**
+ ```python
+ numpy.genfromtxt(fname, dtype=float, delimiter=None, skip_header=0, skip_footer=0, converters=None, missing_values=None, filling_values=None, usecols=None)
+ ```
+
+ `fname` : Name of the file
+ `dtype` : Data type of the resulting array. (By default is float)
+ `delimiter`: String or character separating columns; default is any whitespace.
+ `skip_header`: Number of lines to skip at the beginning of the file.
+ `skip_footer`: Number of lines to skip at the end of the file.
+ `converters`: Dictionary mapping column number to a function to convert that column's string to a float.
+ `missing_values`: Set of strings corresponding to missing data.
+ `filling_values`: Value used to fill in missing data. Default is NaN.
+ `usecols`: Which columns to read starting from 0.
+
+- **Examples for `genfromtxt`:**
+
+
+`numpy.fromfile`: The fromfile function reads binary data directly from a file into a NumPy array. It doesn’t assume any specific format or delimiter;
+instead, it interprets the raw binary data according to the specified data type.
+
+`numpy.load`: Load arrays saved in NumPy’s native binary format (.npy or .npz). These files preserve the array structure, data types, and metadata.
+It’s an efficient way to store and load large arrays.
From 09ad3d5d88d79ea4d509cf5822d5ddbef4f05962 Mon Sep 17 00:00:00 2001
From: Anushka Mokashi
Date: Sun, 19 May 2024 22:12:47 +0530
Subject: [PATCH 079/405] GroupBy_Pandas
---
contrib/pandas/GroupBy_Functions_Pandas.md | 391 +++++++++++++++++++++
contrib/pandas/index.md | 2 +
2 files changed, 393 insertions(+)
create mode 100644 contrib/pandas/GroupBy_Functions_Pandas.md
diff --git a/contrib/pandas/GroupBy_Functions_Pandas.md b/contrib/pandas/GroupBy_Functions_Pandas.md
new file mode 100644
index 0000000..00bad79
--- /dev/null
+++ b/contrib/pandas/GroupBy_Functions_Pandas.md
@@ -0,0 +1,391 @@
+## Group By Functions
+
+GroupBy is a powerful function in pandas that allows you to split data into distinct groups based on one or more columns and perform operations on each group independently. It's a fundamental technique for data analysis and summarization.
+
+Here's a step-by-step breakdown of how groupby functions work in pandas:
+
+* __Splitting the Data:__ You can group your data based on one or more columns using the .groupby() method. This method takes a column name or a list of column names as input and splits the DataFrame into groups according to the values in those columns.
+
+* __Applying a Function:__ Once the data is grouped, you can apply various functions to each group. Pandas offers a variety of built-in aggregation functions like sum(), mean(), count(), etc., that can be used to summarize the data within each group. You can also use custom functions or lambda functions for more specific operations.
+
+* __Combining the Results:__ After applying the function to each group, the results are combined into a new DataFrame or Series, depending on the input data and the function used. This new data structure summarizes the data by group.
+
+
+```python
+import pandas as pd
+import seaborn as sns
+import numpy as np
+```
+
+
+```python
+iris_data = sns.load_dataset('iris')
+```
+
+This code loads the built-in Iris dataset from seaborn and stores it in a pandas DataFrame named iris_data. The Iris dataset contains measurements of flower sepal and petal dimensions for three Iris species (Setosa, Versicolor, Virginica).
+
+
+```python
+iris_data
+```
+
+| | sepal_length | sepal_width | petal_length | petal_width | species |
+|----|--------------|-------------|--------------|-------------|-----------|
+| 0 | 5.1 | 3.5 | 1.4 | 0.2 | setosa |
+| 1 | 4.9 | 3.0 | 1.4 | 0.2 | setosa |
+| 2 | 4.7 | 3.2 | 1.3 | 0.2 | setosa |
+| 3 | 4.6 | 3.1 | 1.5 | 0.2 | setosa |
+| 4 | 5.0 | 3.6 | 1.4 | 0.2 | setosa |
+| ...| ... | ... | ... | ... | ... |
+| 145| 6.7 | 3.0 | 5.2 | 2.3 | virginica |
+| 146| 6.3 | 2.5 | 5.0 | 1.9 | virginica |
+| 147| 6.5 | 3.0 | 5.2 | 2.0 | virginica |
+| 148| 6.2 | 3.4 | 5.4 | 2.3 | virginica |
+| 149| 5.9 | 3.0 | 5.1 | 1.8 | virginica |
+
+
+
+
+
+```python
+iris_data.groupby(['species']).count()
+```
+
+
+
+
+| species | sepal_length | sepal_width | petal_length | petal_width |
+|------------|--------------|-------------|--------------|-------------|
+| setosa | 50 | 50 | 50 | 50 |
+| versicolor | 50 | 50 | 50 | 50 |
+| virginica | 50 | 50 | 50 | 50 |
+
+
+
+
+* We group the data by the 'species' column.
+count() is applied to each group, which counts the number of occurrences (rows) in each species category.
+* The output (species_counts) is a DataFrame showing the count of each species in the dataset.
+
+
+```python
+iris_data.groupby(["species"])["sepal_length"].mean()
+```
+
+
+
+
+ species
+ setosa 5.006\
+ versicolor 5.936\
+ virginica 6.588\
+ Name: sepal_length, dtype: float64
+
+
+
+* This groups the data by 'species' and selects the 'sepal_length' column.
+mean() calculates the average sepal length for each species group.
+* The output (species_means) is a Series containing the mean sepal length for each species.
+
+
+```python
+iris_data.groupby(["species"])["sepal_length"].std()
+```
+
+
+
+
+ species
+ setosa 0.352490\
+ versicolor 0.516171\
+ virginica 0.635880\
+ Name: sepal_length, dtype: float64
+
+
+
+* Similar to the previous, this groups by 'species' and selects the 'sepal_length' column.
+However, it calculates the standard deviation (spread) of sepal length for each species group using std().
+* The output (species_std) is a Series containing the standard deviation of sepal length for each species
+
+
+```python
+iris_data.groupby(["species"])["sepal_length"].describe()
+```
+
+
+
+| species | count | mean | std | min | 25% | 50% | 75% | max |
+|------------|-------|-------|----------|------|--------|------|------|------|
+| setosa | 50.0 | 5.006 | 0.352490 | 4.3 | 4.800 | 5.0 | 5.2 | 5.8 |
+| versicolor | 50.0 | 5.936 | 0.516171 | 4.9 | 5.600 | 5.9 | 6.3 | 7.0 |
+| virginica | 50.0 | 6.588 | 0.635880 | 4.9 | 6.225 | 6.5 | 6.9 | 7.9 |
+
+
+
+
+* We have used describe() to generate a more comprehensive summary of sepal length for each species group.
+* It provides statistics like count, mean, standard deviation, minimum, maximum, percentiles, etc.
+The output (species_descriptions) is a DataFrame containing these descriptive statistics for each species.
+
+
+```python
+iris_data.groupby(["species"])["sepal_length"].quantile(q=0.25)
+```
+
+
+
+
+ species\
+ setosa 4.800\
+ versicolor 5.600\
+ virginica 6.225\
+ Name: sepal_length, dtype: float64
+
+
+
+
+```python
+iris_data.groupby(["species"])["sepal_length"].quantile(q=0.75)
+```
+
+
+
+
+ species\
+ setosa 5.2\
+ versicolor 6.3\
+ virginica 6.9\
+ Name: sepal_length, dtype: float64
+
+
+
+* To calculate the quartiles (25th percentile and 75th percentile) of sepal length for each species group.
+* quantile(q=0.25) gives the 25th percentile, which represents the value below which 25% of the data points lie.
+* quantile(q=0.75) gives the 75th percentile, which represents the value below which 75% of the data points lie.
+* The outputs (species_q1 and species_q3) are Series containing the respective quartile values for each species.
+
+## Custom Function For Group By
+
+
+```python
+nc = ['sepal_length', 'sepal_width', 'petal_length', 'petal_width','species']
+```
+
+
+```python
+nc
+```
+
+
+
+
+ ['sepal_length', 'sepal_width', 'petal_length', 'petal_width', 'species']
+
+
+
+
+```python
+nc = ['sepal_length', 'sepal_width', 'petal_length', 'petal_width']
+def species_stats(species_data,species_name):
+ print("Species Name: {}".format(species_name))
+ print()
+ print("Mean:\n",species_data[nc].mean())
+ print()
+ print("Median:\n",species_data[nc].median())
+ print()
+ print("std:\n",species_data[nc].std())
+ print()
+ print("25% percentile:\n",species_data[nc].quantile(0.25))
+ print()
+ print("75% percentile:\n",species_data[nc].quantile(0.75))
+ print()
+ print("Min:\n",species_data[nc].min())
+ print()
+ print("Max:\n",species_data[nc].max())
+ print()
+```
+
+
+```python
+setosa_data = iris_data[iris_data['species'] == 'setosa']
+```
+
+
+```python
+versicolor_data = iris_data[iris_data['species'] == 'versicolor']
+```
+
+
+```python
+virginica_data = iris_data[iris_data['species'] == 'virginica']
+```
+
+
+```python
+species_data_names = ['setosa_data','viginica_data','versicolor_data']
+for data in species_data_names:
+ print("************** Species name {} *****************".format(data))
+ species_stats(setosa_data,data)
+ print("------------------------------------")
+```
+
+ ************** Species name setosa_data *****************\
+ Species Name: setosa_data
+
+ Mean:\
+ sepal_length 5.006\
+ sepal_width 3.428\
+ petal_length 1.462\
+ petal_width 0.246\
+ dtype: float64
+
+ Median:\
+ sepal_length 5.0\
+ sepal_width 3.4\
+ petal_length 1.5\
+ petal_width 0.2\
+ dtype: float64
+
+ std:\
+ sepal_length 0.352490\
+ sepal_width 0.379064\
+ petal_length 0.173664\
+ petal_width 0.105386\
+ dtype: float64
+
+ 25% percentile:\
+ sepal_length 4.8\
+ sepal_width 3.2\
+ petal_length 1.4\
+ petal_width 0.2\
+ Name: 0.25, dtype: float64
+
+ 75% percentile:\
+ sepal_length 5.200\
+ sepal_width 3.675\
+ petal_length 1.575\
+ petal_width 0.300\
+ Name: 0.75, dtype: float64
+
+ Min:\
+ sepal_length 4.3\
+ sepal_width 2.3\
+ petal_length 1.0\
+ petal_width 0.1\
+ dtype: float64
+
+ Max:
+ sepal_length 5.8\
+ sepal_width 4.4\
+ petal_length 1.9\
+ petal_width 0.6\
+ dtype: float64
+
+ ------------------------------------\
+ ************** Species name viginica_data *****************\
+ Species Name: viginica_data
+
+ Mean:\
+ sepal_length 5.006\
+ sepal_width 3.428\
+ petal_length 1.462\
+ petal_width 0.246\
+ dtype: float64
+
+ Median:\
+ sepal_length 5.0\
+ sepal_width 3.4\
+ petal_length 1.5\
+ petal_width 0.2\
+ dtype: float64
+
+ std:\
+ sepal_length 0.352490\
+ sepal_width 0.379064\
+ petal_length 0.173664\
+ petal_width 0.105386\
+ dtype: float64
+
+ 25% percentile:\
+ sepal_length 4.8\
+ sepal_width 3.2\
+ petal_length 1.4\
+ petal_width 0.2\
+ Name: 0.25, dtype: float64
+
+ 75% percentile:\
+ sepal_length 5.200\
+ sepal_width 3.675\
+ petal_length 1.575\
+ petal_width 0.300\
+ Name: 0.75, dtype: float64
+
+ Min:\
+ sepal_length 4.3\
+ sepal_width 2.3\
+ petal_length 1.0\
+ petal_width 0.1\
+ dtype: float64
+
+ Max:
+ sepal_length 5.8
+ sepal_width 4.4
+ petal_length 1.9
+ petal_width 0.6
+ dtype: float64
+
+ ------------------------------------\
+ ************** Species name versicolor_data *****************\
+ Species Name: versicolor_data
+
+ Mean:\
+ sepal_length 5.006\
+ sepal_width 3.428\
+ petal_length 1.462\
+ petal_width 0.246\
+ dtype: float64
+
+ Median:\
+ sepal_length 5.0\
+ sepal_width 3.4\
+ petal_length 1.5\
+ petal_width 0.2\
+ dtype: float64
+
+ std:\
+ sepal_length 0.352490\
+ sepal_width 0.379064\
+ petal_length 0.173664\
+ petal_width 0.105386\
+ dtype: float64
+
+ 25% percentile:\
+ sepal_length 4.8\
+ sepal_width 3.2\
+ petal_length 1.4\
+ petal_width 0.2\
+ Name: 0.25, dtype: float64
+
+ 75% percentile:\
+ sepal_length 5.200\
+ sepal_width 3.675\
+ petal_length 1.575\
+ petal_width 0.300\
+ Name: 0.75, dtype: float64
+
+ Min:
+ sepal_length 4.3\
+ sepal_width 2.3\
+ petal_length 1.0\
+ petal_width 0.1\
+ dtype: float64
+
+ Max:\
+ sepal_length 5.8\
+ sepal_width 4.4\
+ petal_length 1.9\
+ petal_width 0.6\
+ dtype: float64
+
+ ------------------------------------
+
diff --git a/contrib/pandas/index.md b/contrib/pandas/index.md
index 5c0f2b4..e975b03 100644
--- a/contrib/pandas/index.md
+++ b/contrib/pandas/index.md
@@ -1,3 +1,5 @@
# List of sections
- [Pandas Series Vs NumPy ndarray](pandas_series_vs_numpy_ndarray.md)
+
+- [Group By Functions with Pandas](GroupBy_Functions_Pandas.md)
From 39ed0f3e85deb55d68897f41e20d998eb8963246 Mon Sep 17 00:00:00 2001
From: Mohammed Ahmed Majid <109688855+PilotAxis@users.noreply.github.com>
Date: Sun, 19 May 2024 22:59:32 +0530
Subject: [PATCH 080/405] Create Queues.md
Added Introduction, Real Life Examples, Operations.
---
contrib/ds-algorithms/Queues.md | 47 +++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
create mode 100644 contrib/ds-algorithms/Queues.md
diff --git a/contrib/ds-algorithms/Queues.md b/contrib/ds-algorithms/Queues.md
new file mode 100644
index 0000000..918c934
--- /dev/null
+++ b/contrib/ds-algorithms/Queues.md
@@ -0,0 +1,47 @@
+# Introduction to Queues
+
+A queue is a linear data structure where elements are added at the back (enqueue) and removed from the front (dequeue). Imagine a line at a coffee shop, the first in line (front) gets served first, and new customers join at the back. This FIFO approach ensures order and fairness in processing elements.
+
+Queues offer efficient implementations for various scenarios. They are often used in:
+- Task Scheduling - Operating systems utilize queues to manage processes waiting for CPU time.
+- Breadth-first search algorithms - Traversing a tree or graph involves exploring neighbouring nodes level by level, often achieved using a queue.
+- Message passing - Communication protocols leverage queues to buffer messages between applications for reliable delivery.
+
+
+
+
+
+
+## Real Life Examples of Queues
+- Customer Service - Consider how a customer service phone line works. Customers calling are put into a queue. The first customer to call is the first one to be served (FIFO). As more customers call, they are added to the end of the queue, and as customers are served, they are removed from the front. The entire process follows the queue data structure.
+
+- Printers - Printers operate using a queue to manage print jobs. When a user sends a document to the printer, the job is added to the queue (enqueue). Once a job completes printing, it's removed from the queue (dequeue), and the next job in line starts. This sequential order of handling tasks perfectly exhibits the queue data structure.
+
+- Computer Memory - Certain types of computer memory use a queue data structure to hold and process instructions. For example, in a computer's cache memory, the fetch-decode-execute cycle of an instruction follows a queue. The first instruction fetched is the first one to be decoded and executed, while new instructions fetched are added to the rear.
+
+
+
+# Important Terminologies in Queues
+
+Understanding these terms is crucial for working with queues:
+
+- Enqueue - Adding an element to the back of the queue.
+- Dequeue - Removing the element at the front of the queue.
+- Front - The first element in the queue, to be removed next.
+- Rear/Back - The last element in the queue, where new elements are added.
+- Empty Queue - A queue with no elements.
+- Overflow - Attempting to enqueue an element when the queue is full.
+- Underflow - Attempting to dequeue an element from an empty queue.
+
+
+
+# Operations on a Queue
+
+There are some key operations in a queue that include -
+
+- isFULL - This operation is used to check if a queue is full.
+- isEMPTY - This operation is used to check if a queue is empty.
+- Display - This operation is used to display the queue elements.
+- Peek - This operation is the process of getting the front value of a queue, without removing it. (i.e., Value at the front).
+
+
From 6c50c6e498bc3308fdd3a29c926ff76062744531 Mon Sep 17 00:00:00 2001
From: Mohammed Ahmed Majid <109688855+PilotAxis@users.noreply.github.com>
Date: Sun, 19 May 2024 23:01:28 +0530
Subject: [PATCH 081/405] Update Queues.md
---
contrib/ds-algorithms/Queues.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/ds-algorithms/Queues.md b/contrib/ds-algorithms/Queues.md
index 918c934..ead6ce4 100644
--- a/contrib/ds-algorithms/Queues.md
+++ b/contrib/ds-algorithms/Queues.md
@@ -9,7 +9,7 @@ Queues offer efficient implementations for various scenarios. They are often use
-
+
## Real Life Examples of Queues
From cbf87b0b5d9dc768dfdd8a03878789514cf75d4a Mon Sep 17 00:00:00 2001
From: Mohammed Ahmed Majid <109688855+PilotAxis@users.noreply.github.com>
Date: Sun, 19 May 2024 23:03:44 +0530
Subject: [PATCH 082/405] Update Queues.md
---
contrib/ds-algorithms/Queues.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/ds-algorithms/Queues.md b/contrib/ds-algorithms/Queues.md
index ead6ce4..8ba2ce3 100644
--- a/contrib/ds-algorithms/Queues.md
+++ b/contrib/ds-algorithms/Queues.md
@@ -9,7 +9,7 @@ Queues offer efficient implementations for various scenarios. They are often use
-
+
## Real Life Examples of Queues
From 811382bfca0d9097c78cff56b9e1fb10655b4088 Mon Sep 17 00:00:00 2001
From: Lingamuneni Santhosh Siddhardha
<103999924+Santhosh-Siddhardha@users.noreply.github.com>
Date: Sun, 19 May 2024 23:55:40 +0530
Subject: [PATCH 083/405] Update loading_arrays_from_files.md
Added syntax for all methods
Formatted Content
Added examples for all methods
Removed fromfile method
---
contrib/numpy/loading_arrays_from_files.md | 103 +++++++++++++++------
1 file changed, 75 insertions(+), 28 deletions(-)
diff --git a/contrib/numpy/loading_arrays_from_files.md b/contrib/numpy/loading_arrays_from_files.md
index f1717c2..bd3648f 100644
--- a/contrib/numpy/loading_arrays_from_files.md
+++ b/contrib/numpy/loading_arrays_from_files.md
@@ -1,26 +1,25 @@
# Loading Arrays From Files
-The ability to load data from various file formats is a critical feature for scientific computing and data analysis.
-NumPy provides several functions to read data from different file types and convert them into ndarrays.
-This section will cover how to load ndarrays from common file formats, including CSV, TSV, and binary files.
+Scientific computing and data analysis require the critical feature of being able to load data from different file formats. NumPy has several functionalities for reading data from various file types and converting them into arrays. This part of the content will show how one can load arrays from standard file formats.
-### Here are the methods available:
+## Here are the methods available:
-`numpy.loadtxt`: The loadtxt function allows you to load data from a text file.You can specify various parameters such as the file name, data type, delimiter,
+### 1. numpy.loadtxt():
+The loadtxt function allows you to load data from a text file.You can specify various parameters such as the file name, data type, delimiter,
and more. It reads the file line by line, splits it at the specified delimiter, and converts the values into an array.
-- **Syntax:**
+- #### Syntax:
```python
numpy.loadtxt(fname, dtype = float, delimiter=None, converters=None, skiprows=0, usecols=None)
```
- `fname` : Name of the file
- `dtype` : Data type of the resulting array. (By default is float)
- `delimiter`: String or character separating columns; default is any whitespace.
- `converters`: Dictionary mapping column number to a function to convert that column's string to a float.
- `skiprows`: Number of lines to skip at the beginning of the file.
- `usecols`: Which columns to read starting from 0.
+ **fname** : Name of the file
+ **dtype** : Data type of the resulting array. (By default is float)
+ **delimiter**: String or character separating columns; default is any whitespace.
+ **converters**: Dictionary mapping column number to a function to convert that column's string to a float.
+ **skiprows**: Number of lines to skip at the beginning of the file.
+ **usecols**: Which columns to read starting from 0.
-- **Example for `loadtxt`:**
+- #### Example for `loadtxt`:
**example.txt**
@@ -38,30 +37,78 @@ and more. It reads the file line by line, splits it at the specified delimiter,
[1 2 3 4 5]
```
+
-`numpy.genfromtxt`: The genfromtxt function is similar to loadtxt but provides more flexibility. It handles missing values (such as NaNs), allows custom converters
+### 2. numpy.genfromtxt:
+The `genfromtxt` function is similar to loadtxt but provides more flexibility. It handles missing values (such as NaNs), allows custom converters
for data parsing, and can handle different data types within the same file. It’s particularly useful for handling complex data formats.
-- **Syntax:**
+- #### Syntax:
```python
numpy.genfromtxt(fname, dtype=float, delimiter=None, skip_header=0, skip_footer=0, converters=None, missing_values=None, filling_values=None, usecols=None)
```
- `fname` : Name of the file
- `dtype` : Data type of the resulting array. (By default is float)
- `delimiter`: String or character separating columns; default is any whitespace.
- `skip_header`: Number of lines to skip at the beginning of the file.
- `skip_footer`: Number of lines to skip at the end of the file.
- `converters`: Dictionary mapping column number to a function to convert that column's string to a float.
- `missing_values`: Set of strings corresponding to missing data.
- `filling_values`: Value used to fill in missing data. Default is NaN.
- `usecols`: Which columns to read starting from 0.
+ **fname** : Name of the file
+ **dtype** : Data type of the resulting array. (By default is float)
+ **delimiter**: String or character separating columns; default is any whitespace.
+ **skip_header**: Number of lines to skip at the beginning of the file.
+ **skip_footer**: Number of lines to skip at the end of the file.
+ **converters**: Dictionary mapping column number to a function to convert that column's string to a float.
+ **missing_values**: Set of strings corresponding to missing data.
+ **filling_values**: Value used to fill in missing data. Default is NaN.
+ **usecols**: Which columns to read starting from 0.
-- **Examples for `genfromtxt`:**
+- #### Example for `genfromtxt`:
+
+ **example.txt**
+
+ 
-`numpy.fromfile`: The fromfile function reads binary data directly from a file into a NumPy array. It doesn’t assume any specific format or delimiter;
-instead, it interprets the raw binary data according to the specified data type.
+ **Code**
+ ```python
+ import numpy as np
+ arr = np.genfromtxt("example.txt", dtype='str', usecols=1)
+ print(arr)
+ ```
-`numpy.load`: Load arrays saved in NumPy’s native binary format (.npy or .npz). These files preserve the array structure, data types, and metadata.
+ **Output**
+ ```python
+ ['Name' 'Kohli' 'Dhoni' 'Rohit']
+ ```
+
+
+
+
+### 3. numpy.load
+`load` method is used to load arrays saved in NumPy’s native binary format (.npy or .npz). These files preserve the array structure, data types, and metadata.
It’s an efficient way to store and load large arrays.
+
+- #### Syntax:
+ ```python
+ numpy.load(fname, mmap_mode=None, encoding='ASCII')
+ ```
+
+ **fname** : Name of the file
+ **mmap_mode** : Memory-map the file using the given mode (r, r+, w+, c).(By Default None)
+ **encoding**:Encoding is used when reading Python2 strings only. (By Default ASCII)
+
+- #### Example for `load`:
+
+ **Code**
+ ```python
+ import numpy as np
+ arr = np.array(['a','b','c'])
+ np.savez('data.npz', array=arr)
+ # stores arr in data.npz in NumPy's native binary format
+ data = np.load('data.npz')
+ print(data['array'])
+ ```
+
+ **Output**
+ ```python
+ ['a' 'b' 'c']
+ ```
+
+
+These methods empower users to seamlessly integrate data into their scientific workflows, whether from text files or binary formats.
From efb68d962d83cda93705e6e2c35fefb7622d54a4 Mon Sep 17 00:00:00 2001
From: Lingamuneni Santhosh Siddhardha
<103999924+Santhosh-Siddhardha@users.noreply.github.com>
Date: Sun, 19 May 2024 23:57:34 +0530
Subject: [PATCH 084/405] Update index.md
Added Loading Arrays from Files Section
Linked it to its md file
---
contrib/numpy/index.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/numpy/index.md b/contrib/numpy/index.md
index 82596a2..5c8cfa6 100644
--- a/contrib/numpy/index.md
+++ b/contrib/numpy/index.md
@@ -1,3 +1,3 @@
# List of sections
-- [Section title](filename.md)
+- [Loading Arrays from Files](loading_arrays_from_files.md)
From 53269a5ad335eb89bb768ca26165f447a3f46d22 Mon Sep 17 00:00:00 2001
From: Lingamuneni Santhosh Siddhardha
<103999924+Santhosh-Siddhardha@users.noreply.github.com>
Date: Sun, 19 May 2024 23:58:31 +0530
Subject: [PATCH 085/405] Update loading_arrays_from_files.md
changed format
---
contrib/numpy/loading_arrays_from_files.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/numpy/loading_arrays_from_files.md b/contrib/numpy/loading_arrays_from_files.md
index bd3648f..85105a3 100644
--- a/contrib/numpy/loading_arrays_from_files.md
+++ b/contrib/numpy/loading_arrays_from_files.md
@@ -4,7 +4,7 @@ Scientific computing and data analysis require the critical feature of being abl
## Here are the methods available:
### 1. numpy.loadtxt():
-The loadtxt function allows you to load data from a text file.You can specify various parameters such as the file name, data type, delimiter,
+The `loadtxt` function allows you to load data from a text file.You can specify various parameters such as the file name, data type, delimiter,
and more. It reads the file line by line, splits it at the specified delimiter, and converts the values into an array.
- #### Syntax:
From cfc731c2acb0b85011b47f3a4b3fe3fc2ea0b91b Mon Sep 17 00:00:00 2001
From: Lingamuneni Santhosh Siddhardha
<103999924+Santhosh-Siddhardha@users.noreply.github.com>
Date: Mon, 20 May 2024 09:50:49 +0530
Subject: [PATCH 086/405] Update loading_arrays_from_files.md
Changed introduction content
formatted code
formatted content
---
contrib/numpy/loading_arrays_from_files.md | 27 +++++++++++-----------
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/contrib/numpy/loading_arrays_from_files.md b/contrib/numpy/loading_arrays_from_files.md
index 85105a3..c001121 100644
--- a/contrib/numpy/loading_arrays_from_files.md
+++ b/contrib/numpy/loading_arrays_from_files.md
@@ -14,7 +14,7 @@ and more. It reads the file line by line, splits it at the specified delimiter,
**fname** : Name of the file
**dtype** : Data type of the resulting array. (By default is float)
- **delimiter**: String or character separating columns; default is any whitespace.
+ **delimiter**: String or character separating columns. (By default is whitespace)
**converters**: Dictionary mapping column number to a function to convert that column's string to a float.
**skiprows**: Number of lines to skip at the beginning of the file.
**usecols**: Which columns to read starting from 0.
@@ -27,8 +27,9 @@ and more. It reads the file line by line, splits it at the specified delimiter,
**Code**
```python
- import numpy as np
- arr = np.loadtxt("loadtxt.txt", dtype=int)
+ import numpy as np
+
+ arr = np.loadtxt("example.txt", dtype=int)
print(arr)
```
@@ -39,20 +40,18 @@ and more. It reads the file line by line, splits it at the specified delimiter,
-### 2. numpy.genfromtxt:
+### 2. numpy.genfromtxt():
The `genfromtxt` function is similar to loadtxt but provides more flexibility. It handles missing values (such as NaNs), allows custom converters
for data parsing, and can handle different data types within the same file. It’s particularly useful for handling complex data formats.
- #### Syntax:
```python
- numpy.genfromtxt(fname, dtype=float, delimiter=None, skip_header=0, skip_footer=0, converters=None, missing_values=None, filling_values=None, usecols=None)
+ numpy.genfromtxt(fname, dtype=float, delimiter=None, converters=None, missing_values=None, filling_values=None, usecols=None)
```
**fname** : Name of the file
**dtype** : Data type of the resulting array. (By default is float)
**delimiter**: String or character separating columns; default is any whitespace.
- **skip_header**: Number of lines to skip at the beginning of the file.
- **skip_footer**: Number of lines to skip at the end of the file.
**converters**: Dictionary mapping column number to a function to convert that column's string to a float.
**missing_values**: Set of strings corresponding to missing data.
**filling_values**: Value used to fill in missing data. Default is NaN.
@@ -67,7 +66,8 @@ for data parsing, and can handle different data types within the same file. It
**Code**
```python
- import numpy as np
+ import numpy as np
+
arr = np.genfromtxt("example.txt", dtype='str', usecols=1)
print(arr)
```
@@ -80,7 +80,7 @@ for data parsing, and can handle different data types within the same file. It
-### 3. numpy.load
+### 3. numpy.load():
`load` method is used to load arrays saved in NumPy’s native binary format (.npy or .npz). These files preserve the array structure, data types, and metadata.
It’s an efficient way to store and load large arrays.
@@ -90,7 +90,7 @@ It’s an efficient way to store and load large arrays.
```
**fname** : Name of the file
- **mmap_mode** : Memory-map the file using the given mode (r, r+, w+, c).(By Default None)
+ **mmap_mode** : Memory-map the file using the given mode (r, r+, w+, c)(By Default None).Memory-mapping only works with arrays stored in a binary file on disk, not with compressed archives like .npz.
**encoding**:Encoding is used when reading Python2 strings only. (By Default ASCII)
- #### Example for `load`:
@@ -98,10 +98,11 @@ It’s an efficient way to store and load large arrays.
**Code**
```python
import numpy as np
+
arr = np.array(['a','b','c'])
- np.savez('data.npz', array=arr)
- # stores arr in data.npz in NumPy's native binary format
- data = np.load('data.npz')
+ np.savez('example.npz', array=arr) # stores arr in data.npz in NumPy's native binary format
+
+ data = np.load('example.npz')
print(data['array'])
```
From d314d760af6ddcabef554cf07f317a690bff51cb Mon Sep 17 00:00:00 2001
From: Rupa-Rd
Date: Mon, 20 May 2024 21:46:30 +0530
Subject: [PATCH 087/405] Datatypes.md file is added to the index.md
---
contrib/numpy/index.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/contrib/numpy/index.md b/contrib/numpy/index.md
index 82596a2..6d02025 100644
--- a/contrib/numpy/index.md
+++ b/contrib/numpy/index.md
@@ -1,3 +1,4 @@
# List of sections
- [Section title](filename.md)
+- [Numpy Datatypes](datatypes.md)
\ No newline at end of file
From 2e33a9b997189dc81f0dc73abd1f0c8ff8793cf0 Mon Sep 17 00:00:00 2001
From: Rupa-Rd
Date: Mon, 20 May 2024 21:47:17 +0530
Subject: [PATCH 088/405] NumPy datatypes list is added
---
contrib/numpy/datatypes.md | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
create mode 100644 contrib/numpy/datatypes.md
diff --git a/contrib/numpy/datatypes.md b/contrib/numpy/datatypes.md
new file mode 100644
index 0000000..768add1
--- /dev/null
+++ b/contrib/numpy/datatypes.md
@@ -0,0 +1,35 @@
+# Numpy Data Types
+In NumPy, data types play a crcial role in representing and manipulating numerical data.
+
+Numpy supports the following data types:
+
+- `i` - integer
+- `b` - boolean
+- `u` - unsigned integer
+- `f` - float
+- `c` - complex float
+- `m` - timedelta
+- `M` - datetime
+- `O` - object
+- `S` - string
+- `U` - unicode string
+
+## Example for integer type
+
+## Example for float type
+
+## Example for boolean type
+
+## Example for unsigned integer type
+
+## Example for complex type
+
+## Example for datetime type
+
+## Example for string type
+
+## Example for object type
+
+## Example for unicode string type
+
+## Example for timedelta type
From 68a2219c6830f8af7026853854ff6338d3ffbdbf Mon Sep 17 00:00:00 2001
From: Rithish S
Date: Mon, 20 May 2024 21:51:47 +0530
Subject: [PATCH 089/405] binomial distribution added
---
.../machine-learning/binomial_distribution.md | 123 ++++++++++++++++++
contrib/machine-learning/index.md | 1 +
2 files changed, 124 insertions(+)
create mode 100644 contrib/machine-learning/binomial_distribution.md
diff --git a/contrib/machine-learning/binomial_distribution.md b/contrib/machine-learning/binomial_distribution.md
new file mode 100644
index 0000000..2fddc31
--- /dev/null
+++ b/contrib/machine-learning/binomial_distribution.md
@@ -0,0 +1,123 @@
+# Binomial Distribution
+
+## Introduction
+
+The binomial distribution is a discrete probability distribution that describes the number of successes in a fixed number of independent Bernoulli trials, each with the same probability of success. It is commonly used in statistics and probability theory.
+
+### Key Characteristics
+
+- **Number of trials (n):** The number of independent experiments or trials.
+- **Probability of success (p):** The probability of success on an individual trial.
+- **Number of successes (k):** The number of successful outcomes in n trials.
+
+The binomial distribution is defined by the probability mass function (PMF):
+
+\[ P(X = k) = \binom{n}{k} p^k (1 - p)^{n - k} \]
+
+where:
+- \(\binom{n}{k}\) is the binomial coefficient, calculated as \(\frac{n!}{k!(n-k)!}\).
+
+## Properties of Binomial Distribution
+
+- **Mean:** \( \mu = np \)
+- **Variance:** \( \sigma^2 = np(1 - p) \)
+- **Standard Deviation:** \( \sigma = \sqrt{np(1 - p)} \)
+
+## Python Implementation
+
+Let's implement the binomial distribution using Python. We'll use the `scipy.stats` library to compute the binomial PMF and CDF, and `matplotlib` to visualize it.
+
+### Step-by-Step Implementation
+
+1. **Import necessary libraries:**
+
+ ```python
+ import numpy as np
+ import matplotlib.pyplot as plt
+ from scipy.stats import binom
+ ```
+
+2. **Define parameters:**
+
+ ```python
+ # Number of trials
+ n = 10
+ # Probability of success
+ p = 0.5
+ # Number of successes
+ k = np.arange(0, n + 1)
+ ```
+
+3. **Compute the PMF:**
+
+ ```python
+ pmf = binom.pmf(k, n, p)
+ ```
+
+4. **Plot the PMF:**
+
+ ```python
+ plt.bar(k, pmf, color='blue')
+ plt.xlabel('Number of Successes')
+ plt.ylabel('Probability')
+ plt.title('Binomial Distribution PMF')
+ plt.show()
+ ```
+
+5. **Compute the CDF:**
+
+ ```python
+ cdf = binom.cdf(k, n, p)
+ ```
+
+6. **Plot the CDF:**
+
+ ```python
+ plt.plot(k, cdf, marker='o', linestyle='--', color='blue')
+ plt.xlabel('Number of Successes')
+ plt.ylabel('Cumulative Probability')
+ plt.title('Binomial Distribution CDF')
+ plt.grid(True)
+ plt.show()
+ ```
+
+### Complete Code
+
+Here is the complete code for the binomial distribution implementation:
+
+```python
+import numpy as np
+import matplotlib.pyplot as plt
+from scipy.stats import binom
+
+# Parameters
+n = 10 # Number of trials
+p = 0.5 # Probability of success
+
+# Number of successes
+k = np.arange(0, n + 1)
+
+# Compute PMF
+pmf = binom.pmf(k, n, p)
+
+# Plot PMF
+plt.figure(figsize=(12, 6))
+plt.subplot(1, 2, 1)
+plt.bar(k, pmf, color='blue')
+plt.xlabel('Number of Successes')
+plt.ylabel('Probability')
+plt.title('Binomial Distribution PMF')
+
+# Compute CDF
+cdf = binom.cdf(k, n, p)
+
+# Plot CDF
+plt.subplot(1, 2, 2)
+plt.plot(k, cdf, marker='o', linestyle='--', color='blue')
+plt.xlabel('Number of Successes')
+plt.ylabel('Cumulative Probability')
+plt.title('Binomial Distribution CDF')
+plt.grid(True)
+
+plt.tight_layout()
+plt.show()
diff --git a/contrib/machine-learning/index.md b/contrib/machine-learning/index.md
index 82596a2..ec4dfc3 100644
--- a/contrib/machine-learning/index.md
+++ b/contrib/machine-learning/index.md
@@ -1,3 +1,4 @@
# List of sections
- [Section title](filename.md)
+- [Binomial Distribution](binomial_distribution.md)
From 3f731e7f211facfc725a08d455c90dc6c27b8df6 Mon Sep 17 00:00:00 2001
From: Rithish S <123345316+Rithish5513U@users.noreply.github.com>
Date: Mon, 20 May 2024 21:53:31 +0530
Subject: [PATCH 090/405] Update binomial_distribution.md
---
contrib/machine-learning/binomial_distribution.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/contrib/machine-learning/binomial_distribution.md b/contrib/machine-learning/binomial_distribution.md
index 2fddc31..94e4c41 100644
--- a/contrib/machine-learning/binomial_distribution.md
+++ b/contrib/machine-learning/binomial_distribution.md
@@ -1,3 +1,7 @@
+
+
# Binomial Distribution
## Introduction
From 92beeba6c21b6cb27242d91fb6f6bd4ed3b019ba Mon Sep 17 00:00:00 2001
From: Rupa-Rd
Date: Mon, 20 May 2024 21:54:39 +0530
Subject: [PATCH 091/405] dtype() definition and example is added
---
contrib/numpy/datatypes.md | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/contrib/numpy/datatypes.md b/contrib/numpy/datatypes.md
index 768add1..39dd46b 100644
--- a/contrib/numpy/datatypes.md
+++ b/contrib/numpy/datatypes.md
@@ -14,6 +14,17 @@ Numpy supports the following data types:
- `S` - string
- `U` - unicode string
+## dtype() Function
+The `dtype()` function returns the type of the NumPy array object.
+``` python
+ import numpy as np
+
+ arr = np.array([1, 2, 3, 4])
+
+ print(arr.dtype)
+
+ # Output: int64
+```
## Example for integer type
## Example for float type
@@ -33,3 +44,6 @@ Numpy supports the following data types:
## Example for unicode string type
## Example for timedelta type
+
+# Data Type Conversion
+
From 7d800d598046394c7409eab176750f0468198e5f Mon Sep 17 00:00:00 2001
From: Rithish S <123345316+Rithish5513U@users.noreply.github.com>
Date: Mon, 20 May 2024 21:57:32 +0530
Subject: [PATCH 092/405] Update binomial_distribution.md
---
contrib/machine-learning/binomial_distribution.md | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/contrib/machine-learning/binomial_distribution.md b/contrib/machine-learning/binomial_distribution.md
index 94e4c41..0d1d328 100644
--- a/contrib/machine-learning/binomial_distribution.md
+++ b/contrib/machine-learning/binomial_distribution.md
@@ -1,7 +1,3 @@
-
-
# Binomial Distribution
## Introduction
@@ -16,16 +12,16 @@ The binomial distribution is a discrete probability distribution that describes
The binomial distribution is defined by the probability mass function (PMF):
-\[ P(X = k) = \binom{n}{k} p^k (1 - p)^{n - k} \]
+P(X = k) = (n choose k) p^k (1 - p)^(n - k)
where:
-- \(\binom{n}{k}\) is the binomial coefficient, calculated as \(\frac{n!}{k!(n-k)!}\).
+- (n choose k) is the binomial coefficient, calculated as n! / (k!(n-k)!).
## Properties of Binomial Distribution
-- **Mean:** \( \mu = np \)
-- **Variance:** \( \sigma^2 = np(1 - p) \)
-- **Standard Deviation:** \( \sigma = \sqrt{np(1 - p)} \)
+- **Mean:** μ = np
+- **Variance:** σ² = np(1 - p)
+- **Standard Deviation:** σ = √(np(1 - p))
## Python Implementation
From 8c8544540948ec757d5b2cc97df09278fcaf9e61 Mon Sep 17 00:00:00 2001
From: Rupa-Rd
Date: Mon, 20 May 2024 22:08:40 +0530
Subject: [PATCH 093/405] Example for integer type is added
---
contrib/numpy/datatypes.md | 38 ++++++++++++++++++++++++++++++++++++--
1 file changed, 36 insertions(+), 2 deletions(-)
diff --git a/contrib/numpy/datatypes.md b/contrib/numpy/datatypes.md
index 39dd46b..c70e810 100644
--- a/contrib/numpy/datatypes.md
+++ b/contrib/numpy/datatypes.md
@@ -16,17 +16,51 @@ Numpy supports the following data types:
## dtype() Function
The `dtype()` function returns the type of the NumPy array object.
+
+Example 1
``` python
import numpy as np
arr = np.array([1, 2, 3, 4])
print(arr.dtype)
-
+
# Output: int64
```
-## Example for integer type
+Example 2
+``` python
+ import numpy as np
+
+ arr = np.array(['apple', 'banana', 'cherry'])
+
+ print(arr.dtype)
+
+ # Output:
Date: Mon, 20 May 2024 22:17:35 +0530
Subject: [PATCH 094/405] Example for float type is added
---
contrib/numpy/datatypes.md | 40 ++++++++++++++++++++++++++++++++++++--
1 file changed, 38 insertions(+), 2 deletions(-)
diff --git a/contrib/numpy/datatypes.md b/contrib/numpy/datatypes.md
index c70e810..1a355d2 100644
--- a/contrib/numpy/datatypes.md
+++ b/contrib/numpy/datatypes.md
@@ -46,8 +46,10 @@ Way 1: Using function `int_()`
import numpy as np
arr = np.int_([2,4,6])
-
+ # Size: int8, int16, int32, int64
+
print(arr.dtype())
+
# Output: int64
```
@@ -56,13 +58,47 @@ Way 2: Using `dtype()`
import numpy as np
arr = np.array([2,4,6], dtype='i4')
+ # Size: i1, i2, i4, i8
print(arr.dtype)
- # Output: int8
+ # Output: int32
```
+
## Example for float type
+Way 1: Using function `float_()`
+``` python
+ import numpy as np
+
+ arr = np.float_(1)
+ # Size: float8, float16, float32, float64
+
+ print(arr)
+ print(arr.dtype())
+
+ # Output:
+ # 1.0
+ # float64
+```
+
+Way 2: Using `dtype()`
+``` python
+ import numpy as np
+
+ arr = np.array([2,4,6], dtype='f4')
+ # Size: f1, f2, f4, f8
+
+ print(arr)
+ print(arr.dtype)
+
+ # Output:
+ # [1. 2. 3. 4.]
+ # float32
+```
+
+Note: `np.single()` has the same function as `float32()`.
+
## Example for boolean type
## Example for unsigned integer type
From c64b262eda0bc8a2e74fbb63f9ba9df5423a91a3 Mon Sep 17 00:00:00 2001
From: Rupa-Rd
Date: Mon, 20 May 2024 22:28:30 +0530
Subject: [PATCH 095/405] Example for unsigned integer type is added
---
contrib/numpy/datatypes.md | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/contrib/numpy/datatypes.md b/contrib/numpy/datatypes.md
index 1a355d2..ea9430b 100644
--- a/contrib/numpy/datatypes.md
+++ b/contrib/numpy/datatypes.md
@@ -65,6 +65,7 @@ Way 2: Using `dtype()`
# Output: int32
```
+Note: `np.intc()` has the same function as `int32()`.
## Example for float type
Way 1: Using function `float_()`
@@ -101,8 +102,32 @@ Note: `np.single()` has the same function as `float32()`.
## Example for boolean type
+``` python
+ import numpy as np
+
+ x = np.bool_(1)
+
+ print(x)
+ print(x.dtype)
+
+ # Output:
+ # True
+ # bool
+```
## Example for unsigned integer type
+``` python
+ import numpy as np
+
+ x = np.uintc(1)
+
+ print(x)
+ print(x.dtype)
+
+ # Output:
+ # 1
+ # uint32
+```
## Example for complex type
## Example for datetime type
From 092c550b67fb80bcd63cb813babe4d7bb4471547 Mon Sep 17 00:00:00 2001
From: Rupa-Rd
Date: Mon, 20 May 2024 22:32:10 +0530
Subject: [PATCH 096/405] Example for complex type is added
---
contrib/numpy/datatypes.md | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/contrib/numpy/datatypes.md b/contrib/numpy/datatypes.md
index ea9430b..8bf52ad 100644
--- a/contrib/numpy/datatypes.md
+++ b/contrib/numpy/datatypes.md
@@ -128,7 +128,22 @@ Note: `np.single()` has the same function as `float32()`.
# 1
# uint32
```
+
## Example for complex type
+Complex type is a combination of real number + imaginary number. The `complex_()` is used to define the complex type NumPy object.
+``` python
+ import numpy as np
+
+ x = np.complex_(1)
+ # Size: complex64, complex128
+
+ print(x)
+ print(x.dtype)
+
+ # Output:
+ # (1+0j)
+ # complex128
+```
## Example for datetime type
From 13c485e7dee1b7563c5c8b4e3f5e17343066d4f7 Mon Sep 17 00:00:00 2001
From: Rupa-Rd
Date: Mon, 20 May 2024 22:39:24 +0530
Subject: [PATCH 097/405] Example for datetime type is added
---
contrib/numpy/datatypes.md | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/contrib/numpy/datatypes.md b/contrib/numpy/datatypes.md
index 8bf52ad..bf18837 100644
--- a/contrib/numpy/datatypes.md
+++ b/contrib/numpy/datatypes.md
@@ -136,7 +136,7 @@ Complex type is a combination of real number + imaginary number. The `complex_()
x = np.complex_(1)
# Size: complex64, complex128
-
+
print(x)
print(x.dtype)
@@ -146,6 +146,24 @@ Complex type is a combination of real number + imaginary number. The `complex_()
```
## Example for datetime type
+The `datetime64()` is used to define the date, month and year.
+
+``` python
+ import numpy as np
+
+ x = np.datetime64('1970-05')
+ y = np.datetime64('2024-20-05')
+ z = np.datetime64('2024')
+
+ print(x,x.dtype)
+ print(y,y.dtype)
+ print(z,z.dtype)
+
+ # Output:
+ # 1970-05 datetime64[M]
+ # 1970-01-11 datetime64[D]
+ # 1970 datetime64[Y]
+```
## Example for string type
From 722d34de63e7ef058cd3275fdefcbc726dc60f35 Mon Sep 17 00:00:00 2001
From: Rupa-Rd
Date: Mon, 20 May 2024 22:46:00 +0530
Subject: [PATCH 098/405] Example for timedelta type is added
---
contrib/numpy/datatypes.md | 25 ++++++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/contrib/numpy/datatypes.md b/contrib/numpy/datatypes.md
index bf18837..616d6c3 100644
--- a/contrib/numpy/datatypes.md
+++ b/contrib/numpy/datatypes.md
@@ -151,8 +151,8 @@ The `datetime64()` is used to define the date, month and year.
``` python
import numpy as np
- x = np.datetime64('1970-05')
- y = np.datetime64('2024-20-05')
+ x = np.datetime64('2024-05')
+ y = np.datetime64('2024-05-20')
z = np.datetime64('2024')
print(x,x.dtype)
@@ -160,9 +160,9 @@ The `datetime64()` is used to define the date, month and year.
print(z,z.dtype)
# Output:
- # 1970-05 datetime64[M]
- # 1970-01-11 datetime64[D]
- # 1970 datetime64[Y]
+ # 2024-05 datetime64[M]
+ # 2024-20-05 datetime64[D]
+ # 2024 datetime64[Y]
```
## Example for string type
@@ -172,6 +172,21 @@ The `datetime64()` is used to define the date, month and year.
## Example for unicode string type
## Example for timedelta type
+The `timedelta64()` used to find the difference between the `datetime64()`. The arguments for timedelta64 are a number, to represent the number of units, and a date/time unit, such as (D)ay, (M)onth, (Y)ear, (h)ours, (m)inutes, or (s)econds. The timedelta64 data type also accepts the string “NAT” in place of the number for a “Not A Time” value.
+``` python
+ import numpy as np
+
+ x = np.datetime64('2024-05-20')
+ y = np.datetime64('2023-05-20')
+ res = x - y
+
+ print(res)
+ print(res.dtype)
+
+ # Output:
+ # 366 days
+ # timedelta64[D]
+```
# Data Type Conversion
From 26a0dc814d76da7c6fd9be4ed40d22ea1c0e04fc Mon Sep 17 00:00:00 2001
From: Rupa-Rd
Date: Mon, 20 May 2024 22:48:00 +0530
Subject: [PATCH 099/405] Example for object type is added
---
contrib/numpy/datatypes.md | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/contrib/numpy/datatypes.md b/contrib/numpy/datatypes.md
index 616d6c3..6107d8d 100644
--- a/contrib/numpy/datatypes.md
+++ b/contrib/numpy/datatypes.md
@@ -168,7 +168,18 @@ The `datetime64()` is used to define the date, month and year.
## Example for string type
## Example for object type
+``` python
+ import numpy as np
+ arr = np.object_([1, 2, 3, 4])
+
+ print(arr)
+ print(arr.dtype)
+
+ # Output:
+ # [1, 2, 3, 4]
+ # object
+```
## Example for unicode string type
## Example for timedelta type
From cf4a924c0eedfa9672377d967c6ea93efd25b146 Mon Sep 17 00:00:00 2001
From: Rupa-Rd
Date: Mon, 20 May 2024 22:56:17 +0530
Subject: [PATCH 100/405] Example for String type is added
---
contrib/numpy/datatypes.md | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/contrib/numpy/datatypes.md b/contrib/numpy/datatypes.md
index 6107d8d..d365623 100644
--- a/contrib/numpy/datatypes.md
+++ b/contrib/numpy/datatypes.md
@@ -166,6 +166,15 @@ The `datetime64()` is used to define the date, month and year.
```
## Example for string type
+``` python
+ import numpy as np
+
+ arr = np.str_("roopa")
+
+ print(arr.dtype)
+
+ # Output:
Date: Mon, 20 May 2024 23:03:59 +0530
Subject: [PATCH 101/405] Example type conversion is added
---
contrib/numpy/datatypes.md | 33 ++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
diff --git a/contrib/numpy/datatypes.md b/contrib/numpy/datatypes.md
index d365623..12690b9 100644
--- a/contrib/numpy/datatypes.md
+++ b/contrib/numpy/datatypes.md
@@ -216,4 +216,35 @@ The `timedelta64()` used to find the difference between the `datetime64()`. The
# 366 days
# timedelta64[D]
```
-# Data Type Conversion
\ No newline at end of file
+# Data Type Conversion
+`astype()` function is used to the NumPy object from one type to another type.
+
+It creates a copy of the array and allows to specify the data type of our choice.
+
+## Example 1
+
+``` python
+ import numpy as np
+
+ x = np.array([1.2, 3.4, 5.6])
+ y = x.astype(int)
+
+ print(y,y.dtype)
+
+ # Output:
+ # [1 3 5] int64
+```
+
+## Example 2
+
+``` python
+ import numpy as np
+
+ x = np.array([1, 3, 0])
+ y = x.astype(bool)
+
+ print(y,y.dtype)
+
+ # Output:
+ # [True True False] bool
+```
\ No newline at end of file
From 5effa72de84fae6d7ee5d4cbba07d0f7a4d2f8e6 Mon Sep 17 00:00:00 2001
From: Rupa-Rd
Date: Mon, 20 May 2024 23:08:12 +0530
Subject: [PATCH 102/405] index.md is modified
---
contrib/numpy/index.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/numpy/index.md b/contrib/numpy/index.md
index 6d02025..fa6ae9e 100644
--- a/contrib/numpy/index.md
+++ b/contrib/numpy/index.md
@@ -1,4 +1,4 @@
# List of sections
-- [Section title](filename.md)
-- [Numpy Datatypes](datatypes.md)
\ No newline at end of file
+- [NumPy Data Types](datatypes.md)
+- [Section title](filename.md)
\ No newline at end of file
From bfdd5dbc41e60d3193991d3687456515f1c17b39 Mon Sep 17 00:00:00 2001
From: Rupa-Rd
Date: Mon, 20 May 2024 23:14:25 +0530
Subject: [PATCH 103/405] Additional datatype longdouble is added
---
contrib/numpy/datatypes.md | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/contrib/numpy/datatypes.md b/contrib/numpy/datatypes.md
index 12690b9..f58cee5 100644
--- a/contrib/numpy/datatypes.md
+++ b/contrib/numpy/datatypes.md
@@ -216,6 +216,20 @@ The `timedelta64()` used to find the difference between the `datetime64()`. The
# 366 days
# timedelta64[D]
```
+## Additional Data Type (`longdouble`)
+`longdouble` is a data type that provides higher precision than the standard double-precision floating-point (`float64`) type.
+
+``` python
+ import numpy as np
+
+ arr = np.longdouble([1.222222, 4.44, 45.55])
+
+ print(arr, arr.dtype)
+
+ # Output:
+ # [1.222222 4.44 45.55] float128
+```
+
# Data Type Conversion
`astype()` function is used to the NumPy object from one type to another type.
From 4e36263a1cf3cf117f51af3643c1e75e2617e329 Mon Sep 17 00:00:00 2001
From: Rupa-Rd
Date: Mon, 20 May 2024 23:23:29 +0530
Subject: [PATCH 104/405] datatypes.md modified
---
contrib/numpy/datatypes.md | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/contrib/numpy/datatypes.md b/contrib/numpy/datatypes.md
index f58cee5..fb9df47 100644
--- a/contrib/numpy/datatypes.md
+++ b/contrib/numpy/datatypes.md
@@ -14,6 +14,9 @@ Numpy supports the following data types:
- `S` - string
- `U` - unicode string
+
+_Referred from: W3schools_
+
## dtype() Function
The `dtype()` function returns the type of the NumPy array object.
@@ -261,4 +264,4 @@ It creates a copy of the array and allows to specify the data type of our choice
# Output:
# [True True False] bool
-```
\ No newline at end of file
+```
From 749aa23485d565a52eee2ec025d3139d2e2b41f9 Mon Sep 17 00:00:00 2001
From: shivam navadiya
Date: Tue, 21 May 2024 18:17:04 +0530
Subject: [PATCH 105/405] Updated index.md
---
contrib/ds-algorithms/index.md | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/contrib/ds-algorithms/index.md b/contrib/ds-algorithms/index.md
index 5b52155..0e1f256 100644
--- a/contrib/ds-algorithms/index.md
+++ b/contrib/ds-algorithms/index.md
@@ -2,3 +2,8 @@
- [Section title](filename.md)
- [Sorting Algorithms](sorting-algorithms.md)
+- [Divide and Conquer Algorithm](divide-and-conquer-algorithm)
+- [Searching Algorithms](searching-algorithms.md)
+- [Greedy Algorithms](greedy-algorithms.md)
+- [Dynamic Programming](dynamic-programming.md)
+
From ec1e51c677b2a533352542d00ce34cc2579bf585 Mon Sep 17 00:00:00 2001
From: shivam navadiya
Date: Tue, 21 May 2024 18:20:05 +0530
Subject: [PATCH 106/405] Created Divide and Conquer Algorithm
---
.../divide-and-conquer-algorithm.md | 54 +++++++++++++++++++
1 file changed, 54 insertions(+)
create mode 100644 contrib/ds-algorithms/divide-and-conquer-algorithm.md
diff --git a/contrib/ds-algorithms/divide-and-conquer-algorithm.md b/contrib/ds-algorithms/divide-and-conquer-algorithm.md
new file mode 100644
index 0000000..b5a356e
--- /dev/null
+++ b/contrib/ds-algorithms/divide-and-conquer-algorithm.md
@@ -0,0 +1,54 @@
+# Divide and Conquer Algorithms
+
+Divide and Conquer is a paradigm for solving problems that involves breaking a problem into smaller sub-problems, solving the sub-problems recursively, and then combining their solutions to solve the original problem.
+
+## Merge Sort
+
+Merge Sort is a popular sorting algorithm that follows the divide and conquer strategy. It divides the input array into two halves, recursively sorts the halves, and then merges them.
+
+**Algorithm Overview:**
+- **Divide:** Divide the unsorted list into two sublists of about half the size.
+- **Conquer:** Recursively sort each sublist.
+- **Combine:** Merge the sorted sublists back into one sorted list.
+
+```python
+def merge_sort(arr):
+ if len(arr) > 1:
+ mid = len(arr) // 2
+ left_half = arr[:mid]
+ right_half = arr[mid:]
+
+ merge_sort(left_half)
+ merge_sort(right_half)
+
+ i = j = k = 0
+
+ while i < len(left_half) and j < len(right_half):
+ if left_half[i] < right_half[j]:
+ arr[k] = left_half[i]
+ i += 1
+ else:
+ arr[k] = right_half[j]
+ j += 1
+ k += 1
+
+ while i < len(left_half):
+ arr[k] = left_half[i]
+ i += 1
+ k += 1
+
+ while j < len(right_half):
+ arr[k] = right_half[j]
+ j += 1
+ k += 1
+
+arr = [12, 11, 13, 5, 6, 7]
+merge_sort(arr)
+print("Sorted array:", arr)
+```
+
+## Complexity Analysis
+- **Time Complexity:** O(n log n) in all cases
+- **Space Complexity:** O(n) additional space for the merge operation
+
+---
From bd2103dac33ccbc0fc5f4efa0c797fca1916879c Mon Sep 17 00:00:00 2001
From: shivam navadiya
Date: Tue, 21 May 2024 18:21:22 +0530
Subject: [PATCH 107/405] Created Searching Algorithms
---
contrib/ds-algorithms/searching-algorithms.md | 161 ++++++++++++++++++
1 file changed, 161 insertions(+)
create mode 100644 contrib/ds-algorithms/searching-algorithms.md
diff --git a/contrib/ds-algorithms/searching-algorithms.md b/contrib/ds-algorithms/searching-algorithms.md
new file mode 100644
index 0000000..78b86d1
--- /dev/null
+++ b/contrib/ds-algorithms/searching-algorithms.md
@@ -0,0 +1,161 @@
+# Searching Algorithms
+
+Searching algorithms are techniques used to locate specific items within a collection of data. These algorithms are fundamental in computer science and are employed in various applications, from databases to web search engines.
+
+## Real Life Example of Searching
+- Searching for a word in a dictionary
+- Searching for a specific book in a library
+- Searching for a contact in your phone's address book
+- Searching for a file on your computer, etc.
+
+# Some common searching techniques
+
+# 1. Linear Search
+
+Linear search, also known as sequential search, is a straightforward searching algorithm that checks each element in a collection until the target element is found or the entire collection has been traversed. It is simple to implement but becomes inefficient for large datasets.
+
+**Algorithm Overview:**
+- **Sequential Checking:** The algorithm iterates through each element in the collection, starting from the first element.
+- **Comparing Elements:** At each iteration, it compares the current element with the target element.
+- **Finding the Target:** If the current element matches the target, the search terminates, and the index of the element is returned.
+- **Completing the Search:** If the entire collection is traversed without finding the target, the algorithm indicates that the element is not present.
+
+## Linear Search Code in Python
+
+```python
+def linear_search(arr, target):
+ for i in range(len(arr)):
+ if arr[i] == target:
+ return i
+ return -1
+
+arr = [5, 3, 8, 1, 2]
+target = 8
+result = linear_search(arr, target)
+if result != -1:
+ print(f"Element {target} found at index {result}.")
+else:
+ print(f"Element {target} not found.")
+```
+
+## Complexity Analysis
+- **Time Complexity**: O(n)
+- **Space Complexity**: O(1)
+
+
+
+
+
+# 2. Binary Search
+
+Binary search is an efficient searching algorithm that works on sorted collections. It repeatedly divides the search interval in half until the target element is found or the interval is empty. Binary search is significantly faster than linear search but requires the collection to be sorted beforehand.
+
+**Algorithm Overview:**
+- **Initial State:** Binary search starts with the entire collection as the search interval.
+- **Divide and Conquer:** At each step, it calculates the middle element of the current interval and compares it with the target.
+- **Narrowing Down the Interval:** If the middle element is equal to the target, the search terminates successfully. Otherwise, it discards half of the search interval based on the comparison result.
+- **Repeating the Process:** The algorithm repeats this process on the remaining half of the interval until the target is found or the interval is empty.
+
+## Binary Search Code in Python (Iterative)
+
+```python
+def binary_search(arr, target):
+ low = 0
+ high = len(arr) - 1
+ while low <= high:
+ mid = (low + high) // 2
+ if arr[mid] == target:
+ return mid
+ elif arr[mid] < target:
+ low = mid + 1
+ else:
+ high = mid - 1
+ return -1
+
+arr = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]
+target = 13
+result = binary_search(arr, target)
+if result != -1:
+ print(f"Element {target} found at index {result}.")
+else:
+ print(f"Element {target} not found.")
+```
+
+## Binary Search Code in Python (Recursive)
+
+```python
+def binary_search_recursive(arr, target, low, high):
+ if low <= high:
+ mid = (low + high) // 2
+ if arr[mid] == target:
+ return mid
+ elif arr[mid] < target:
+ return binary_search_recursive(arr, target, mid + 1, high)
+ else:
+ return binary_search_recursive(arr, target, low, mid - 1)
+ else:
+ return -1
+
+arr = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]
+target = 13
+result = binary_search_recursive(arr, target, 0, len(arr) - 1)
+if result != -1:
+ print(f"Element {target} found at index {result}.")
+else:
+ print(f"Element {target} not found.")
+```
+
+## Complexity Analysis
+- **Time Complexity**: O(log n)
+- **Space Complexity**: O(1) (Iterative), O(log n) (Recursive)
+
+
+
+
+
+# 3. Interpolation Search
+
+Interpolation search is an improved version of binary search, especially useful when the elements in the collection are uniformly distributed. Instead of always dividing the search interval in half, interpolation search estimates the position of the target element based on its value and the values of the endpoints of the search interval.
+
+**Algorithm Overview:**
+- **Estimating Position:** Interpolation search calculates an approximate position of the target element within the search interval based on its value and the values of the endpoints.
+- **Refining the Estimate:** It adjusts the estimated position based on whether the target value is likely to be closer to the beginning or end of the search interval.
+- **Updating the Interval:** Using the refined estimate, it narrows down the search interval iteratively until the target is found or the interval becomes empty.
+
+## Interpolation Search Code in Python
+
+```python
+def interpolation_search(arr, target):
+ low = 0
+ high = len(arr) - 1
+ while low <= high and arr[low] <= target <= arr[high]:
+ if low == high:
+ if arr[low] == target:
+ return low
+ return -1
+ pos = low + ((target - arr[low]) * (high - low)) // (arr[high] - arr[low])
+ if arr[pos] == target:
+ return pos
+ elif arr[pos] < target:
+ low = pos + 1
+ else:
+ high = pos - 1
+ return -1
+
+arr = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
+target = 60
+result = interpolation_search(arr, target)
+if result != -1:
+ print(f"Element {target} found at index {result}.")
+else:
+ print(f"Element {target} not found.")
+```
+
+## Complexity Analysis
+- **Time Complexity**: O(log log n) (Average)
+- **Space Complexity**: O(1)
+
+
+
+
+
From dbd9fd9081ec04b13c2a2e33889a7ce18b8e5f94 Mon Sep 17 00:00:00 2001
From: shivam navadiya
Date: Tue, 21 May 2024 18:22:18 +0530
Subject: [PATCH 108/405] Created Greedy Algorithms
---
contrib/ds-algorithms/greedy-algorithms.md | 135 +++++++++++++++++++++
1 file changed, 135 insertions(+)
create mode 100644 contrib/ds-algorithms/greedy-algorithms.md
diff --git a/contrib/ds-algorithms/greedy-algorithms.md b/contrib/ds-algorithms/greedy-algorithms.md
new file mode 100644
index 0000000..c79ee99
--- /dev/null
+++ b/contrib/ds-algorithms/greedy-algorithms.md
@@ -0,0 +1,135 @@
+# Greedy Algorithms
+
+Greedy algorithms are simple, intuitive algorithms that make a sequence of choices at each step with the hope of finding a global optimum. They are called "greedy" because at each step, they choose the most advantageous option without considering the future consequences. Despite their simplicity, greedy algorithms are powerful tools for solving optimization problems, especially when the problem exhibits the greedy-choice property.
+
+## Real-Life Examples of Greedy Algorithms
+- **Coin Change:** Finding the minimum number of coins to make a certain amount of change.
+- **Job Scheduling:** Assigning tasks to machines to minimize completion time.
+- **Huffman Coding:** Constructing an optimal prefix-free binary code for data compression.
+- **Fractional Knapsack:** Selecting items to maximize the value within a weight limit.
+
+# Some Common Greedy Algorithms
+
+# 1. Coin Change Problem
+
+The coin change problem is a classic example of a greedy algorithm. Given a set of coin denominations and a target amount, the objective is to find the minimum number of coins required to make up that amount.
+
+**Algorithm Overview:**
+- **Greedy Strategy:** At each step, the algorithm selects the largest denomination coin that is less than or equal to the remaining amount.
+- **Repeat Until Amount is Zero:** The process continues until the remaining amount becomes zero.
+
+## Coin Change Code in Python
+
+```python
+def coin_change(coins, amount):
+ coins.sort(reverse=True)
+ num_coins = 0
+ for coin in coins:
+ num_coins += amount // coin
+ amount %= coin
+ if amount == 0:
+ return num_coins
+ else:
+ return -1
+
+coins = [1, 5, 10, 25]
+amount = 63
+result = coin_change(coins, amount)
+if result != -1:
+ print(f"Minimum number of coins required: {result}.")
+else:
+ print("It is not possible to make the amount with the given denominations.")
+```
+
+## Complexity Analysis
+- **Time Complexity**: O(n log n) for sorting (if not pre-sorted), O(n) for iteration
+- **Space Complexity**: O(1)
+
+
+
+
+
+# 2. Activity Selection Problem
+
+The activity selection problem involves selecting the maximum number of mutually compatible activities that can be performed by a single person or machine, assuming that a person can only work on one activity at a time.
+
+**Algorithm Overview:**
+- **Greedy Strategy:** Sort the activities based on their finish times.
+- **Selecting Activities:** Iterate through the sorted activities, selecting each activity if it doesn't conflict with the previously selected ones.
+
+## Activity Selection Code in Python
+
+```python
+def activity_selection(start, finish):
+ n = len(start)
+ activities = []
+ i = 0
+ activities.append(i)
+ for j in range(1, n):
+ if start[j] >= finish[i]:
+ activities.append(j)
+ i = j
+ return activities
+
+start = [1, 3, 0, 5, 8, 5]
+finish = [2, 4, 6, 7, 9, 9]
+selected_activities = activity_selection(start, finish)
+print("Selected activities:", selected_activities)
+```
+
+## Complexity Analysis
+- **Time Complexity**: O(n log n) for sorting (if not pre-sorted), O(n) for iteration
+- **Space Complexity**: O(1)
+
+
+
+
+
+# 3. Huffman Coding
+
+Huffman coding is a method of lossless data compression that efficiently represents characters or symbols in a file. It uses variable-length codes to represent characters, with shorter codes assigned to more frequent characters.
+
+**Algorithm Overview:**
+- **Frequency Analysis:** Determine the frequency of each character in the input data.
+- **Building the Huffman Tree:** Construct a binary tree where each leaf node represents a character and the path to the leaf node determines its code.
+- **Assigning Codes:** Traverse the Huffman tree to assign codes to each character, with shorter codes for more frequent characters.
+
+## Huffman Coding Code in Python
+
+```python
+from heapq import heappush, heappop, heapify
+from collections import defaultdict
+
+def huffman_coding(data):
+ frequency = defaultdict(int)
+ for char in data:
+ frequency[char] += 1
+
+ heap = [[weight, [symbol, ""]] for symbol, weight in frequency.items()]
+ heapify(heap)
+
+ while len(heap) > 1:
+ lo = heappop(heap)
+ hi = heappop(heap)
+ for pair in lo[1:]:
+ pair[1] = '0' + pair[1]
+ for pair in hi[1:]:
+ pair[1] = '1' + pair[1]
+ heappush(heap, [lo[0] + hi[0]] + lo[1:] + hi[1:])
+
+ return sorted(heappop(heap)[1:], key=lambda p: (len(p[-1]), p))
+
+data = "Huffman coding is a greedy algorithm"
+encoded_data = huffman_coding(data)
+print("Huffman Codes:")
+for symbol, code in encoded_data:
+ print(f"{symbol}: {code}")
+```
+
+## Complexity Analysis
+- **Time Complexity**: O(n log n) for heap operations, where n is the number of unique characters
+- **Space Complexity**: O(n) for the heap
+
+
+
+
From 20009b0e888e778a112ef18b96c322f1532ec1b8 Mon Sep 17 00:00:00 2001
From: shivam navadiya
Date: Tue, 21 May 2024 18:23:16 +0530
Subject: [PATCH 109/405] Created Dynamic Programming
---
contrib/ds-algorithms/dynamic-programming.md | 132 +++++++++++++++++++
1 file changed, 132 insertions(+)
create mode 100644 contrib/ds-algorithms/dynamic-programming.md
diff --git a/contrib/ds-algorithms/dynamic-programming.md b/contrib/ds-algorithms/dynamic-programming.md
new file mode 100644
index 0000000..43149f8
--- /dev/null
+++ b/contrib/ds-algorithms/dynamic-programming.md
@@ -0,0 +1,132 @@
+# Dynamic Programming
+
+Dynamic programming is a method for solving complex problems by breaking them down into simpler subproblems and solving each subproblem only once. It stores the solutions to subproblems to avoid redundant computations, making it particularly useful for optimization problems where the solution can be obtained by combining solutions to smaller subproblems.
+
+## Real-Life Examples of Dynamic Programming
+- **Fibonacci Sequence:** Computing the nth Fibonacci number efficiently.
+- **Shortest Path:** Finding the shortest path in a graph from a source to a destination.
+- **String Edit Distance:** Calculating the minimum number of operations required to transform one string into another.
+- **Knapsack Problem:** Maximizing the value of items in a knapsack without exceeding its weight capacity.
+
+# Some Common Dynamic Programming Techniques
+
+# 1. Fibonacci Sequence
+
+The Fibonacci sequence is a classic example used to illustrate dynamic programming. It is a series of numbers where each number is the sum of the two preceding ones, usually starting with 0 and 1.
+
+**Algorithm Overview:**
+- **Base Cases:** The first two numbers in the Fibonacci sequence are defined as 0 and 1.
+- **Memoization:** Store the results of previously computed Fibonacci numbers to avoid redundant computations.
+- **Recurrence Relation:** Compute each Fibonacci number by adding the two preceding numbers.
+
+## Fibonacci Sequence Code in Python (Top-Down Approach with Memoization)
+
+```python
+def fibonacci(n, memo={}):
+ if n in memo:
+ return memo[n]
+ if n <= 1:
+ return n
+ memo[n] = fibonacci(n-1, memo) + fibonacci(n-2, memo)
+ return memo[n]
+
+n = 10
+print(f"The {n}th Fibonacci number is: {fibonacci(n)}.")
+```
+
+## Fibonacci Sequence Code in Python (Bottom-Up Approach)
+
+```python
+def fibonacci(n):
+ fib = [0, 1]
+ for i in range(2, n + 1):
+ fib.append(fib[i - 1] + fib[i - 2])
+ return fib[n]
+
+n = 10
+print(f"The {n}th Fibonacci number is: {fibonacci(n)}.")
+```
+
+## Complexity Analysis
+- **Time Complexity**: O(n) for both approaches
+- **Space Complexity**: O(n) for the top-down approach (due to memoization), O(1) for the bottom-up approach
+
+
+
+
+
+# 2. Longest Common Subsequence
+
+The longest common subsequence (LCS) problem is to find the longest subsequence common to two sequences. A subsequence is a sequence that appears in the same relative order but not necessarily contiguous.
+
+**Algorithm Overview:**
+- **Base Cases:** If one of the sequences is empty, the LCS is empty.
+- **Memoization:** Store the results of previously computed LCS lengths to avoid redundant computations.
+- **Recurrence Relation:** Compute the LCS length by comparing characters of the sequences and making decisions based on whether they match.
+
+## Longest Common Subsequence Code in Python (Top-Down Approach with Memoization)
+
+```python
+def longest_common_subsequence(X, Y, m, n, memo={}):
+ if (m, n) in memo:
+ return memo[(m, n)]
+ if m == 0 or n == 0:
+ return 0
+ if X[m - 1] == Y[n - 1]:
+ memo[(m, n)] = 1 + longest_common_subsequence(X, Y, m - 1, n - 1, memo)
+ else:
+ memo[(m, n)] = max(longest_common_subsequence(X, Y, m, n - 1, memo),
+ longest_common_subsequence(X, Y, m - 1, n, memo))
+ return memo[(m, n)]
+
+X = "AGGTAB"
+Y = "GXTXAYB"
+print("Length of Longest Common Subsequence:", longest_common_subsequence(X, Y, len(X), len(Y)))
+```
+
+## Complexity Analysis
+- **Time Complexity**: O(m * n) for the top-down approach, where m and n are the lengths of the input sequences
+- **Space Complexity**: O(m * n) for the memoization table
+
+
+
+
+
+# 3. 0-1 Knapsack Problem
+
+The 0-1 knapsack problem is a classic optimization problem where the goal is to maximize the total value of items selected while keeping the total weight within a specified limit.
+
+**Algorithm Overview:**
+- **Base Cases:** If the capacity of the knapsack is 0 or there are no items to select, the total value is 0.
+- **Memoization:** Store the results of previously computed subproblems to avoid redundant computations.
+- **Recurrence Relation:** Compute the maximum value by considering whether to include the current item or not.
+
+## 0-1 Knapsack Problem Code in Python (Top-Down Approach with Memoization)
+
+```python
+def knapsack(weights, values, capacity, n, memo={}):
+ if (capacity, n) in memo:
+ return memo[(capacity, n)]
+ if n == 0 or capacity == 0:
+ return 0
+ if weights[n - 1] > capacity:
+ memo[(capacity, n)] = knapsack(weights, values, capacity, n - 1, memo)
+ else:
+ memo[(capacity, n)] = max(values[n - 1] + knapsack(weights, values, capacity - weights[n - 1], n - 1, memo),
+ knapsack(weights, values, capacity, n - 1, memo))
+ return memo[(capacity, n)]
+
+weights = [10, 20, 30]
+values = [60, 100, 120]
+capacity = 50
+n = len(weights)
+print("Maximum value that can be obtained:", knapsack(weights, values, capacity, n))
+```
+
+## Complexity Analysis
+- **Time Complexity**: O(n * W) for the top-down approach, where n is the number of items and W is the capacity of the knapsack
+- **Space Complexity**: O(n * W) for the memoization table
+
+
+
+
\ No newline at end of file
From a50c8c9a90a5f4c739a24fd752add4af8627afd0 Mon Sep 17 00:00:00 2001
From: Mohammed Ahmed Majid <109688855+PilotAxis@users.noreply.github.com>
Date: Tue, 21 May 2024 19:13:40 +0530
Subject: [PATCH 110/405] Update Queues.md
---
contrib/ds-algorithms/Queues.md | 131 ++++++++++++++++++++++++++------
1 file changed, 107 insertions(+), 24 deletions(-)
diff --git a/contrib/ds-algorithms/Queues.md b/contrib/ds-algorithms/Queues.md
index 8ba2ce3..2c5c0f0 100644
--- a/contrib/ds-algorithms/Queues.md
+++ b/contrib/ds-algorithms/Queues.md
@@ -1,23 +1,33 @@
-# Introduction to Queues
+# Queues in Python
A queue is a linear data structure where elements are added at the back (enqueue) and removed from the front (dequeue). Imagine a line at a coffee shop, the first in line (front) gets served first, and new customers join at the back. This FIFO approach ensures order and fairness in processing elements.
Queues offer efficient implementations for various scenarios. They are often used in:
-- Task Scheduling - Operating systems utilize queues to manage processes waiting for CPU time.
-- Breadth-first search algorithms - Traversing a tree or graph involves exploring neighbouring nodes level by level, often achieved using a queue.
-- Message passing - Communication protocols leverage queues to buffer messages between applications for reliable delivery.
+- **Task Scheduling** - Operating systems utilize queues to manage processes waiting for CPU time.
+- **Breadth-first search algorithms** - Traversing a tree or graph involves exploring neighbouring nodes level by level, often achieved using a queue.
+- **Message passing** - Communication protocols leverage queues to buffer messages between applications for reliable delivery.
-
+## Types of Queue
-
+A queue can be classified into 4 types -
+- **Simple Queue** - A simple queue is a queue, where we can only insert an element at the back and remove the element from the front of the queue, this type of queue follows the FIFO principle.
+- **Double-Ended Queue (Dequeue)** - In this type of queue, insertions and deletions of elements can be performed from both ends of the queue.
+Double-ended queues can be classified into 2 types ->
+ - **Input-Restricted Queue**
+ - **Output-Restricted Queue**
+- **Circular Queue** - It is a special type of queue where the back is connected to the front, where the operations follow the FIFO principle.
+- **Priority Queue** - In this type of queue, elements are accessed based on their priority in the queue.
+Priority queues are of 2 types ->
+ - **Ascending Priority Queue**
+ - **Descending Priority Queue**
## Real Life Examples of Queues
-- Customer Service - Consider how a customer service phone line works. Customers calling are put into a queue. The first customer to call is the first one to be served (FIFO). As more customers call, they are added to the end of the queue, and as customers are served, they are removed from the front. The entire process follows the queue data structure.
+- **Customer Service** - Consider how a customer service phone line works. Customers calling are put into a queue. The first customer to call is the first one to be served (FIFO). As more customers call, they are added to the end of the queue, and as customers are served, they are removed from the front. The entire process follows the queue data structure.
-- Printers - Printers operate using a queue to manage print jobs. When a user sends a document to the printer, the job is added to the queue (enqueue). Once a job completes printing, it's removed from the queue (dequeue), and the next job in line starts. This sequential order of handling tasks perfectly exhibits the queue data structure.
+- **Printers** - Printers operate using a queue to manage print jobs. When a user sends a document to the printer, the job is added to the queue (enqueue). Once a job completes printing, it's removed from the queue (dequeue), and the next job in line starts. This sequential order of handling tasks perfectly exhibits the queue data structure.
-- Computer Memory - Certain types of computer memory use a queue data structure to hold and process instructions. For example, in a computer's cache memory, the fetch-decode-execute cycle of an instruction follows a queue. The first instruction fetched is the first one to be decoded and executed, while new instructions fetched are added to the rear.
+- **Computer Memory** - Certain types of computer memory use a queue data structure to hold and process instructions. For example, in a computer's cache memory, the fetch-decode-execute cycle of an instruction follows a queue. The first instruction fetched is the first one to be decoded and executed, while new instructions fetched are added to the rear.
@@ -25,23 +35,96 @@ Queues offer efficient implementations for various scenarios. They are often use
Understanding these terms is crucial for working with queues:
-- Enqueue - Adding an element to the back of the queue.
-- Dequeue - Removing the element at the front of the queue.
-- Front - The first element in the queue, to be removed next.
-- Rear/Back - The last element in the queue, where new elements are added.
-- Empty Queue - A queue with no elements.
-- Overflow - Attempting to enqueue an element when the queue is full.
-- Underflow - Attempting to dequeue an element from an empty queue.
+- **Enqueue** - Adding an element to the back of the queue.
+- **Dequeue** - Removing the element at the front of the queue.
+- **Front** - The first element in the queue, to be removed next.
+- **Rear/Back** - The last element in the queue, where new elements are added.
+- **Empty Queue** - A queue with no elements.
+- **Overflow** - Attempting to enqueue an element when the queue is full.
+- **Underflow** - Attempting to dequeue an element from an empty queue.
-
-
-# Operations on a Queue
+## Operations on a Queue
There are some key operations in a queue that include -
-- isFULL - This operation is used to check if a queue is full.
-- isEMPTY - This operation is used to check if a queue is empty.
-- Display - This operation is used to display the queue elements.
-- Peek - This operation is the process of getting the front value of a queue, without removing it. (i.e., Value at the front).
+- **isFULL** - This operation checks if a queue is full.
+- **isEMPTY** - This operation checks if a queue is empty.
+- **Display** - This operation displays the queue elements.
+- **Peek** - This operation is the process of getting the front value of a queue, without removing it. (i.e., Value at the front).
-
+
+
+# Implementation of Queue
+
+```python
+def isEmpty(Qu):
+ if Qu == []:
+ return True
+ else:
+ return False
+
+def Enqueue(Qu, item) :
+ Qu.append(item)
+ if len(Qu) == 1:
+ front = rear = 0
+ else:
+ rear = len(Qu) - 1
+ print(item, "enqueued to queue")
+def Dequeue(Qu):
+ if isEmpty(Qu):
+ print("Underflow")
+ else:
+ item = Qu.pop(0)
+ if len(Qu) == 0: #if it was single-element queue
+ front = rear = None
+ print(item, "dequeued from queue")
+
+def Peek(Qu):
+ if isEmpty(Qu):
+ print("Underflow")
+ else:
+ front = 0
+ print("Frontmost item is :", Qu[front])
+
+def Display(Qu):
+ if isEmpty(Qu):
+ print("Queue Empty!")
+ elif len(Qu) == 1:
+ print(Qu[0], "<== front, rear")
+ else:
+ front = 0
+ rear = len(Qu) - 1
+ print(Qu[front], "<-front")
+ for a in range(1, rear):
+ print(Qu[a])
+ print(Qu[rear], "<-rear")
+
+queue = [] #initially queue is empty
+front = None
+
+# Example Usage
+Enqueue(queue, 1)
+Enqueue(queue, 2)
+Enqueue(queue, 3)
+Dequeue(queue)
+Peek(queue)
+Display(queue)
+```
+
+## Output
+
+```
+1 enqueued to queue
+2 enqueued to queue
+3 enqueued to queue
+1 dequeued from queue
+Frontmost item is : 2
+2 <-front
+3 <-rear
+```
+
+## Complexity Analysis
+
+- **Worst case**: `O(n^2)` This occurs when the code performs lots of display operations.
+- **Best case**: `O(n)` If the code mostly performs enqueue, dequeue and peek operations.
+- **Average case**: `O(n^2)` It occurs when the number of operations in display are more than the operations in enqueue, dequeue and peek.
From 0f0a658a61f9c90eb503ec575b11f1656e3436e9 Mon Sep 17 00:00:00 2001
From: Mohammed Ahmed Majid <109688855+PilotAxis@users.noreply.github.com>
Date: Tue, 21 May 2024 19:19:15 +0530
Subject: [PATCH 111/405] Update index.md
Added reference to the file Queues.md
---
contrib/ds-algorithms/index.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/contrib/ds-algorithms/index.md b/contrib/ds-algorithms/index.md
index 5b52155..e88fab1 100644
--- a/contrib/ds-algorithms/index.md
+++ b/contrib/ds-algorithms/index.md
@@ -2,3 +2,4 @@
- [Section title](filename.md)
- [Sorting Algorithms](sorting-algorithms.md)
+- [Queues in Python](Queues.md)
From 4ee5b32b8e217eac48799391a2f8182ac2abae35 Mon Sep 17 00:00:00 2001
From: Pradnya <116059908+PradnyaGaitonde@users.noreply.github.com>
Date: Tue, 21 May 2024 21:51:48 +0530
Subject: [PATCH 112/405] Create dates_and_times.md
Added content for Working with dates & times in python
---
contrib/advanced-python/dates_and_times.md | 129 +++++++++++++++++++++
1 file changed, 129 insertions(+)
create mode 100644 contrib/advanced-python/dates_and_times.md
diff --git a/contrib/advanced-python/dates_and_times.md b/contrib/advanced-python/dates_and_times.md
new file mode 100644
index 0000000..f599e26
--- /dev/null
+++ b/contrib/advanced-python/dates_and_times.md
@@ -0,0 +1,129 @@
+## Working with Dates and Times in Python
+Handling dates and times is an essential aspect of many programming tasks.
+Python provides robust modules to work with dates and times, making it easier to perform operations like formatting, parsing, and arithmetic.
+This guide provides an overview of these modules and their key functionalities.
+
+## 1. 'datetime' Module
+The datetime module supplies classes for manipulating dates and times. The main classes in the datetime module are:
+
+* date: Represents a date (year, month, day).
+* time: Represents a time (hour, minute, second, microsecond).
+* datetime: Combines date and time information.
+* timedelta: Represents the difference between two dates or times.
+* tzinfo: Provides time zone information objects.
+
+**Key Concepts:**
+
+* Naive vs. Aware: Naive datetime objects do not contain time zone information, while aware datetime objects do.
+* Immutability: date and time objects are immutable; once created, they cannot be changed.
+
+Example:
+```bash
+python
+Copy code
+import datetime
+# Get the current date and time
+now = datetime.datetime.now()
+print("Current date and time:", now)
+```
+
+## 2. Formatting Dates and Times
+Formatting involves converting datetime objects into human-readable strings. This is achieved using the strftime method, which stands for "string format time."
+You can specify various format codes to dictate how the output string should be structured.
+
+**Common Format Codes:**
+
+* %Y: Year with century (e.g., 2024)
+* %m: Month as a zero-padded decimal number (e.g., 01)
+* %d: Day of the month as a zero-padded decimal number (e.g., 15)
+* %H: Hour (24-hour clock) as a zero-padded decimal number (e.g., 13)
+* %M: Minute as a zero-padded decimal number (e.g., 45)
+* %S: Second as a zero-padded decimal number (e.g., 30)
+
+Example:
+```bash
+python
+Copy code
+import datetime
+
+now = datetime.datetime.now()
+formatted_now = now.strftime("%Y-%m-%d %H:%M:%S")
+print("Formatted current date and time:", formatted_now)
+```
+
+## 3. Parsing Dates and Times
+Parsing is the process of converting strings representing dates and times into datetime objects. The strptime method, which stands for "string parse time,"
+allows you to specify the format of the input string.
+
+Example:
+```bash
+python
+Copy code
+import datetime
+
+date_string = "2024-05-15 13:45:30"
+date_object = datetime.datetime.strptime(date_string, "%Y-%m-%d %H:%M:%S")
+print("Parsed date and time:", date_object)
+```
+
+## 4. Working with Time Differences
+The timedelta class is used to represent the difference between two datetime objects. This is useful for calculations involving durations, such as finding the
+number of days between two dates or adding a certain period to a date.
+
+Example:
+```bash
+python
+Copy code
+import datetime
+
+date1 = datetime.datetime(2024, 5, 15, 12, 0, 0)
+date2 = datetime.datetime(2024, 5, 20, 14, 30, 0)
+
+difference = date2 - date1
+print("Difference:", difference)
+print("Days:", difference.days)
+print("Total seconds:", difference.total_seconds())
+```
+
+## 5. Time Zones
+Time zone handling in Python is facilitated by the pytz library. It allows you to convert naive datetime objects into timezone-aware objects and perform
+operations across different time zones.
+
+**Key Concepts:**
+
+* Timezone-aware: A datetime object that includes timezone information.
+* Localization: The process of associating a naive datetime with a time zone.
+
+Example:
+```bash
+python
+Copy code
+import datetime
+import pytz
+
+# Define a timezone
+tz = pytz.timezone('Asia/Kolkata')
+
+# Get the current time in a specific timezone
+now = datetime.datetime.now(tz)
+print("Current time in Asia/Kolkata:", now)
+```
+
+## 6. Date Arithmetic
+Date arithmetic involves performing operations like addition or subtraction on date or datetime objects using timedelta. This is useful for calculating future
+or past dates based on a given date.
+
+Example:
+```bash
+python
+Copy code
+import datetime
+
+today = datetime.date.today()
+future_date = today + datetime.timedelta(days=10)
+print("Date after 10 days:", future_date)
+```
+
+## Summary
+Python’s datetime module and the pytz library provide comprehensive tools for working with dates, times, and time zones. They enable you to perform a wide range
+of operations, from basic date manipulations to complex time zone conversions.
From affc013943c380df51e90c08553573a6da46a143 Mon Sep 17 00:00:00 2001
From: Pradnya <116059908+PradnyaGaitonde@users.noreply.github.com>
Date: Tue, 21 May 2024 21:55:23 +0530
Subject: [PATCH 113/405] Update index.md
Added index for dates and times
---
contrib/advanced-python/index.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/contrib/advanced-python/index.md b/contrib/advanced-python/index.md
index 5ea5081..bf377fc 100644
--- a/contrib/advanced-python/index.md
+++ b/contrib/advanced-python/index.md
@@ -1,3 +1,4 @@
# List of sections
- [Decorators/\*args/**kwargs](decorator-kwargs-args.md)
+- [Working with Dates & Times in Python](dates_and_times.md)
From 2967206c16c69227da131aa560efe0831148bc12 Mon Sep 17 00:00:00 2001
From: Pradnya <116059908+PradnyaGaitonde@users.noreply.github.com>
Date: Tue, 21 May 2024 22:01:17 +0530
Subject: [PATCH 114/405] Create regular_expressions.md
Added content for regular expressions in python
---
.../advanced-python/regular_expressions.md | 96 +++++++++++++++++++
1 file changed, 96 insertions(+)
create mode 100644 contrib/advanced-python/regular_expressions.md
diff --git a/contrib/advanced-python/regular_expressions.md b/contrib/advanced-python/regular_expressions.md
new file mode 100644
index 0000000..65ff2c2
--- /dev/null
+++ b/contrib/advanced-python/regular_expressions.md
@@ -0,0 +1,96 @@
+## Regular Expressions in Python
+Regular expressions (regex) are a powerful tool for pattern matching and text manipulation.
+Python's re module provides comprehensive support for regular expressions, enabling efficient text processing and validation.
+
+## 1. Introduction to Regular Expressions
+A regular expression is a sequence of characters defining a search pattern. Common use cases include validating input, searching within text, and extracting
+specific patterns.
+
+## 2. Basic Syntax
+Literal Characters: Match exact characters (e.g., abc matches "abc").
+Metacharacters: Special characters like ., *, ?, +, ^, $, [ ], and | used to build patterns.
+
+**Common Metacharacters:**
+
+* .: Any character except newline.
+* ^: Start of the string.
+* $: End of the string.
+* *: 0 or more repetitions.
+* +: 1 or more repetitions.
+* ?: 0 or 1 repetition.
+* []: Any one character inside brackets (e.g., [a-z]).
+* |: Either the pattern before or after.
+
+## 3. Using the re Module
+
+**Key functions in the re module:**
+
+* re.match(): Checks for a match at the beginning of the string.
+* re.search(): Searches for a match anywhere in the string.
+* re.findall(): Returns a list of all matches.
+* re.sub(): Replaces matches with a specified string.
+
+Examples:
+```bash
+import re
+
+# Match at the beginning
+print(re.match(r'\d+', '123abc').group()) # Output: 123
+
+# Search anywhere
+print(re.search(r'\d+', 'abc123').group()) # Output: 123
+
+# Find all matches
+print(re.findall(r'\d+', 'abc123def456')) # Output: ['123', '456']
+
+# Substitute matches
+print(re.sub(r'\d+', '#', 'abc123def456')) # Output: abc#def#
+```
+
+## 4. Compiling Regular Expressions
+Compiling regular expressions improves performance for repeated use.
+
+Example:
+```bash
+import re
+
+pattern = re.compile(r'\d+')
+print(pattern.match('123abc').group()) # Output: 123
+print(pattern.search('abc123').group()) # Output: 123
+print(pattern.findall('abc123def456')) # Output: ['123', '456']
+```
+
+## 5. Groups and Capturing
+Parentheses () group and capture parts of the match.
+
+Example:
+```bash
+import re
+
+match = re.match(r'(\d{3})-(\d{2})-(\d{4})', '123-45-6789')
+if match:
+ print(match.group()) # Output: 123-45-6789
+ print(match.group(1)) # Output: 123
+ print(match.group(2)) # Output: 45
+ print(match.group(3)) # Output: 6789
+```
+
+## 6. Special Sequences
+Special sequences are shortcuts for common patterns:
+
+* \d: Any digit.
+* \D: Any non-digit.
+* \w: Any alphanumeric character.
+* \W: Any non-alphanumeric character.
+* \s: Any whitespace character.
+* \S: Any non-whitespace character.
+Example:
+```bash
+import re
+
+print(re.search(r'\w+@\w+\.\w+', 'Contact: support@example.com').group()) # Output: support@example.com
+```
+
+## Summary
+Regular expressions are a versatile tool for text processing in Python. The re module offers powerful functions and metacharacters for pattern matching,
+searching, and manipulation, making it an essential skill for handling complex text processing tasks.
From d44f8fc253ae6a74af3894ecd77ceb2ef5f01adf Mon Sep 17 00:00:00 2001
From: Pradnya <116059908+PradnyaGaitonde@users.noreply.github.com>
Date: Tue, 21 May 2024 22:03:27 +0530
Subject: [PATCH 115/405] Update index.md
added index for regular
---
contrib/advanced-python/index.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/contrib/advanced-python/index.md b/contrib/advanced-python/index.md
index 5ea5081..ebb567a 100644
--- a/contrib/advanced-python/index.md
+++ b/contrib/advanced-python/index.md
@@ -1,3 +1,4 @@
# List of sections
- [Decorators/\*args/**kwargs](decorator-kwargs-args.md)
+- [Regular Expressions in Python](regular_expressions.md)
From d7dc67b678124cd54a93c5b917af9d7a903fb82d Mon Sep 17 00:00:00 2001
From: Pradnya <116059908+PradnyaGaitonde@users.noreply.github.com>
Date: Tue, 21 May 2024 22:05:01 +0530
Subject: [PATCH 116/405] Update dates_and_times.md
---
contrib/advanced-python/dates_and_times.md | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/contrib/advanced-python/dates_and_times.md b/contrib/advanced-python/dates_and_times.md
index f599e26..983f6b2 100644
--- a/contrib/advanced-python/dates_and_times.md
+++ b/contrib/advanced-python/dates_and_times.md
@@ -19,8 +19,6 @@ The datetime module supplies classes for manipulating dates and times. The main
Example:
```bash
-python
-Copy code
import datetime
# Get the current date and time
now = datetime.datetime.now()
@@ -42,8 +40,6 @@ You can specify various format codes to dictate how the output string should be
Example:
```bash
-python
-Copy code
import datetime
now = datetime.datetime.now()
@@ -57,8 +53,6 @@ allows you to specify the format of the input string.
Example:
```bash
-python
-Copy code
import datetime
date_string = "2024-05-15 13:45:30"
@@ -72,8 +66,6 @@ number of days between two dates or adding a certain period to a date.
Example:
```bash
-python
-Copy code
import datetime
date1 = datetime.datetime(2024, 5, 15, 12, 0, 0)
@@ -96,8 +88,6 @@ operations across different time zones.
Example:
```bash
-python
-Copy code
import datetime
import pytz
@@ -115,8 +105,6 @@ or past dates based on a given date.
Example:
```bash
-python
-Copy code
import datetime
today = datetime.date.today()
From d443fba280e9f1271fd9c54168631f9ff306b8a5 Mon Sep 17 00:00:00 2001
From: Jaya-Prakash-17
Date: Wed, 22 May 2024 22:20:21 +0530
Subject: [PATCH 117/405] "Added Content Decision Trees"
---
contrib/machine-learning/Decision-Tree.md | 257 ++++++++++++++++++++++
contrib/machine-learning/index.md | 2 +-
2 files changed, 258 insertions(+), 1 deletion(-)
create mode 100644 contrib/machine-learning/Decision-Tree.md
diff --git a/contrib/machine-learning/Decision-Tree.md b/contrib/machine-learning/Decision-Tree.md
new file mode 100644
index 0000000..6563a22
--- /dev/null
+++ b/contrib/machine-learning/Decision-Tree.md
@@ -0,0 +1,257 @@
+# Decision Trees
+Decision trees are a type of supervised machine learning algorithm that is mostly used in classification problems. They work for both categorical and continuous input and output variables.
+
+It is also interpreted as acyclic graph that can be utilized for decision-making is called a decision tree. Every branching node in the graph looks at a particular feature (j) of the feature vector. The left branch is taken when the feature's value is less than a certain threshold; the right branch is taken when it is higher. The class to which the example belongs is decided upon as soon as the leaf node is reached.
+
+## Key Components of a Decision Tree
+**Root Node:** This is the decision tree's first node, and it symbolizes the whole population or sample.
+
+**Internal Nodes:** These are the nodes that make decisions and they stand in for the characteristics or features.
+
+**Leaf Nodes:** These are the nodes that make decisions and they stand in for the characteristics or features.
+
+**Branches:** These are the lines that connect the nodes, and they show how the choice was made depending on the feature value.
+
+### Example: Predicting Loan Approval
+
+In this example, we will use a decision tree to forecast the approval or denial of a loan application based on a number of features, including job status, credit score, and income.
+
+```
+ Root Node
+ (All Applications)
+ / \
+ Internal Node Internal Node
+ (Credit Score) (Employment Status)
+ / \ / \
+ Leaf Node Leaf Node Leaf Node Leaf Node
+(Approve Loan) (Deny Loan) (Approve Loan) (Deny Loan)
+```
+> There are various formulations of the decision tree learning algorithm. Here, we consider just one, called ID3.
+
+## Appropriate Problems For Decision Tree Learning
+In general, decision tree learning works best on issues that have the following characteristics:
+1. ***Instances*** are represented by ***key-value pairs***
+2. The ***output values of the target function are discrete***. Each sample is given a Boolean categorization (yes or no) by the decision tree. Learning functions with multiple possible output values can be effortlessly integrated into decision tree approaches.
+3. ***Disjunctive descriptions may be required***
+4. The ***training data may contain errors*** – ***Decision tree learning methods are robust to errors,*** both errors in classifications of the training examples and errors in the attribute
+values that describe these examples.
+5. ***Missing attribute values could be present in the training data.*** Using decision tree approaches is possible even in cases where some training examples have missing values.
+
+# Decision Tree Algorithm
+The decision tree method classifies the data according to a tree structure. The root node, that holds the complete dataset, is where it all begins. The algorithm then determines which feature, according to a certain criterion like information gain or Gini impurity, is appropriate for splitting the dataset. Subsets of the dataset are then created according to the values of the chosen feature. Until a halting condition is satisfied—for example, obtaining a minimal number of samples per leaf node or a maximum tree depth—this procedure is repeated recursively for every subset.
+
+
+### Which Attribute Is the Best Classifier?
+- The ID3 algorithm's primary idea is choose which characteristic to test at each tree node.
+- Information gain, a statistical feature that quantifies how well a certain attribute divides the training samples into groups based on the target classification.
+- When building the tree, ID3 chooses a candidate attribute using the information gain metric.
+
+## Entropy & Information
+
+**Entropy** is a metric that quantifies the level of impurity or uncertainty present in a given dataset. When it comes to decision trees, entropy measures how similar the target variable is within a specific node or subset of the data. It is utilized for assessing the quality of potential splits during the tree construction process.
+
+The entropy of a node is calculated as:
+__Entropy = -Σ(pi * log2(pi))__
+
+where `p``i` is the proportion of instances belonging to class `i` in the current node. The entropy is at its maximum when all classes are equally represented in the node, indicating maximum impurity or uncertainty.
+
+**Information Gain** is a measure used to estimate the possible reduction in entropy achieved by separating the data according to a certain attribute. It quantifies the projected decrease in impurity or uncertainty after the separation.
+
+The information gain for a feature `A` is calculated as:
+__Information Gain = Entropy(parent) - Σ(weight(child) * Entropy(child))__
+
+### Example of a Decision Tree
+Let us look at a basic decision tree example that predicts a person's likelihood of playing tennis based on climate conditions
+
+**Data Set:**
+---
+| Day | Outlook | Temperature | Humidity | Wind | PlayTennis |
+|-----|---------|-------------|----------|------|------------|
+| D1 | Sunny | Hot | High | Weak | No |
+| D2 | Sunny | Hot | High | Strong | No |
+| D3 | Overcast| Hot | High | Weak | Yes |
+| D4 | Rain | Mild | High | Weak | Yes |
+| D5 | Rain | Cool | Normal | Weak | Yes |
+| D6 | Rain | Cool | Normal | Strong | No |
+| D7 | Overcast| Cool | Normal | Strong | Yes |
+| D8 | Sunny | Mild | High | Weak | No |
+| D9 | Sunny | Cool | Normal | Weak | Yes |
+| D10 | Rain | Mild | Normal | Weak | Yes |
+| D11 | Sunny | Mild | Normal | Strong | Yes |
+| D12 | Overcast| Mild | High | Strong | Yes |
+| D13 | Overcast| Hot | Normal | Weak | Yes |
+| D14 | Rain | Mild | High | Strong | No |
+---
+
+
+1. Calculate the entropy of the entire dataset.
+2. For each feature, calculate the information gain by splitting the data based on that feature.
+3. Select the feature with the highest information gain to create the root node.
+4. Repeat steps 1-3 for each child node until a stopping criterion is met (e.g., all instances in a node belong to the same class, or the maximum depth is reached).
+
+Let's start with calculating the entropy of the entire dataset:
+Total instances: 14
+No instances: 5
+Yes instances: 9
+
+**Entropy** = -((5/14) * log2(5/14) + (9/14) * log2(9/14)) = 0.940
+
+Now, we'll calculate the information gain for each feature:
+
+**Outlook**:
+- Sunny: 2 No, 3 Yes (Entropy = 0.971)
+- Overcast: 0 No, 4 Yes (Entropy = 0)
+- Rain: 3 No, 2 Yes (Entropy = 0.971)
+
+Information Gain = 0.940 - ((5/14) * 0.971 + (4/14) * 0 + (5/14) * 0.971) = 0.246
+
+**Temperature**:
+- Hot: 2 No, 2 Yes (Entropy = 1)
+- Mild: 2 No, 4 Yes (Entropy = 0.811)
+- Cool: 1 No, 3 Yes (Entropy = 0.918)
+
+Information Gain = 0.940 - ((4/14) * 1 + (6/14) * 0.811 + (4/14) * 0.918) = 0.029
+
+**Humidity**:
+- High: 3 No, 4 Yes (Entropy = 0.985)
+- Normal: 2 No, 5 Yes (Entropy = 0.971)
+
+Information Gain = 0.940 - ((7/14) * 0.985 + (7/14) * 0.971) = 0.012
+
+**Wind**:
+- Weak: 2 No, 6 Yes (Entropy = 0.811)
+- Strong: 3 No, 3 Yes (Entropy = 1)
+
+Information Gain = 0.940 - ((8/14) * 0.811 + (6/14) * 1) = 0.048
+
+The feature with the highest information gain is Outlook, so we'll create the root node based on that.
+
+**Step 1: Root Node (Outlook)**
+```
+ Root Node (Outlook)
+ / | \
+ Sunny Overcast Rain
+ Entropy: 0.971 Entropy: 0 Entropy: 0.971
+ 5 instances 4 instances 5 instances
+
+```
+
+Now, we'll continue building the tree by recursively splitting the child nodes based on the feature with the highest information gain within each subset.
+
+**Step 2: Splitting Sunny and Rain Nodes**
+
+For the Sunny node:
+- Temperature:
+ - Hot: 2 No, 0 Yes (Entropy = 0)
+ - Mild: 0 No, 3 Yes (Entropy = 0)
+ - Cool: 0 No, 0 Yes (Entropy = 0)
+ Information Gain = 0.971
+
+- Humidity:
+ - High: 1 No, 2 Yes (Entropy = 0.918)
+ - Normal: 1 No, 1 Yes (Entropy = 1)
+ Information Gain = 0.153
+
+- Wind:
+ - Weak: 1 No, 2 Yes (Entropy = 0.918)
+ - Strong: 1 No, 1 Yes (Entropy = 1)
+ Information Gain = 0.153
+
+The highest information gain is achieved by splitting on Temperature, so we'll create child nodes for Sunny based on Temperature.
+
+For the Rain node:
+- Wind:
+ - Weak: 1 No, 3 Yes (Entropy = 0.918)
+ - Strong: 2 No, 0 Yes (Entropy = 0)
+ Information Gain = 0.153
+
+Since there is only one feature left (Wind), we'll create child nodes for Rain based on Wind.
+
+**Step 3: Updated Decision Tree**
+```
+ Root Node (Outlook)
+ / | \
+ Sunny Overcast Rain
+ / | \ Entropy: 0 / \
+ Hot Mild Cool 4 instances Weak Strong
+ Entropy: 0 Entropy: 0 Entropy: 0.918 Entropy: 0
+ 2 instances 3 instances 4 instances 1 instance
+```
+At this point, all leaf nodes are either pure (entropy = 0) or have instances belonging to a single class. Therefore, we can stop the tree construction process.
+
+**Step 4: Pruning the Decision Tree**
+
+The decision tree we constructed in the previous steps is a complete tree that perfectly classifies the training data. However, this can lead to overfitting, meaning the tree may perform poorly on new, unseen data due to its complexity and memorization of noise in the training set.
+
+To address this, we can prune the tree by removing some of the leaf nodes or branches that contribute little to the overall classification accuracy. Pruning helps to generalize the tree and improve its performance on unseen data.
+
+There are various pruning techniques, such as:
+
+1. **Pre-pruning**: Stopping the tree growth based on a pre-defined criterion (e.g., maximum depth, minimum instances in a node, etc.).
+2. **Post-pruning**: Growing the tree to its full depth and then removing subtrees or branches based on a pruning criterion.
+
+>We can observe that the "Cool" node under the "Sunny" branch has no instances in the training data. Removing this node will not affect the classification accuracy on the training set, and it may help generalize the tree better.
+
+**Step 5: Pruned Decision Tree**
+```
+ Root Node (Outlook)
+ / | \
+ / | \
+ Sunny Overcast Rain
+ / \ Entropy: 0 / \
+ Hot Mild 4 instances Weak Strong
+Entropy: 0 Entropy: 0.918 Entropy: 0 Entropy: 0
+ 2 instances 4 instances 3 instances 2 instances
+```
+
+**Step 6: Visualizing the Decision Tree**
+
+Decision trees can be visualized graphically to provide a clear representation of the hierarchical structure and the decision rules. This visualization can aid in understanding the tree's logic and interpreting the results.
+
+There are various tools and libraries available for visualizing decision trees. One popular library in Python is `graphviz`, which can create tree-like diagrams and visualizations.
+
+Here's an example of how to visualize our pruned decision tree using `graphviz` in Python:
+
+```python
+import graphviz
+from sklearn import tree
+
+# Create a decision tree classifier
+decision_tree_classifier = tree.DecisionTreeClassifier()
+
+# Train the classifier on the dataset X and labels y
+decision_tree_classifier.fit(X, y)
+
+# Visualize the decision tree
+tree_dot_data = tree.export_graphviz(decision_tree_classifier, out_file=None,
+ feature_names=['Outlook', 'Temperature', 'Humidity', 'Wind'],
+ class_names=['No', 'Yes'], filled=True, rounded=True, special_characters=True)
+
+# Create a graph from the DOT data
+graph = graphviz.Source(tree_dot_data)
+
+# Render and save the decision tree as an image file
+graph.render("decision_tree")
+
+```
+```
+ Outlook
+ / | \
+ Sunny Overcast Rain
+ / | / \
+ Humidity Yes Wind Wind
+ / \ / \
+High Normal Weak Strong
+ No Yes Yes No
+```
+
+The final decision tree classifies instances based on the following rules:
+
+- If Outlook is Overcast, PlayTennis is Yes
+- If Outlook is Sunny and Temperature is Hot, PlayTennis is No
+- If Outlook is Sunny and Temperature is Mild, PlayTennis is Yes
+- If Outlook is Sunny and Temperature is Cool, PlayTennis is Yes (no instances in the dataset)
+- If Outlook is Rain and Wind is Weak, PlayTennis is Yes
+- If Outlook is Rain and Wind is Strong, PlayTennis is No
+
+> Note that the calculated entropies and information gains may vary slightly depending on the specific implementation and rounding methods used.
\ No newline at end of file
diff --git a/contrib/machine-learning/index.md b/contrib/machine-learning/index.md
index 82596a2..971efaf 100644
--- a/contrib/machine-learning/index.md
+++ b/contrib/machine-learning/index.md
@@ -1,3 +1,3 @@
# List of sections
-- [Section title](filename.md)
+- [Decision Tree Learning](Decision-Tree.md)
From 5e95059765b6cb99498c1302b94f68c8d5ee482c Mon Sep 17 00:00:00 2001
From: Ankit Mahato
Date: Thu, 23 May 2024 02:57:11 +0530
Subject: [PATCH 118/405] Update dice_roller.md
---
contrib/mini-projects/dice_roller.md | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/contrib/mini-projects/dice_roller.md b/contrib/mini-projects/dice_roller.md
index 6e1b793..0f4e5f9 100644
--- a/contrib/mini-projects/dice_roller.md
+++ b/contrib/mini-projects/dice_roller.md
@@ -1,14 +1,18 @@
-Dice Roller
-
-The aim of this project is to replicate a dice and generate a random number from the numbers 1 to 6.
+## Dice Roller
+
+The aim of this project is to replicate a dice and generate a random number from the numbers 1 to 6.
+
For this first we will import the random library which will help make random choices.
+
```
import random
def dice():
dice_no = random.choice([1,2,3,4,5,6])
return "You got " + str(dice_no)
```
-The above snippet of code defines a function called "dice( )" which makes the random choice and returns the number that is generated.
+
+The above snippet of code defines a function called `dice()` which makes the random choice and returns the number that is generated.
+
```
def roll_dice():
print("Hey Guys, you will now roll a single dice using Python!")
@@ -24,6 +28,9 @@ def roll_dice():
print("Thanks for rolling the dice.")
roll_dice()
```
-The above code defines a function called "roll_dice( )" which interacts with the user.
-It prompts the user to give an input and if the input is k,the code proceeds further to generate a random number or gives the message of invalid input and asks the user to try again.
-After the dice has been rolled once, the function asks the user whether they want a reroll in the form of a yes or no question.The dice is rolled again if the user gives 'yes' as an answer and exits the code if the user replies with anything other than yes.
+
+The above code defines a function called `roll_dice()` which interacts with the user.
+
+It prompts the user to give an input and if the input is `k`,the code proceeds further to generate a random number or gives the message of invalid input and asks the user to try again.
+
+After the dice has been rolled once, the function asks the user whether they want a reroll in the form of a `yes` or `no` question. The dice is rolled again if the user gives `yes` as an answer and exits the code if the user replies with anything other than yes.
From 4d86a0af83d35990a71144e88c8979e5146529e8 Mon Sep 17 00:00:00 2001
From: Ankit Mahato
Date: Thu, 23 May 2024 04:15:56 +0530
Subject: [PATCH 119/405] Update index.md
---
contrib/machine-learning/index.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/contrib/machine-learning/index.md b/contrib/machine-learning/index.md
index 40a2237..44b39d4 100644
--- a/contrib/machine-learning/index.md
+++ b/contrib/machine-learning/index.md
@@ -1,4 +1,6 @@
# List of sections
+- [Section title](filename.md)
- [Confusion Matrix](confusion-matrix.md)
- [Support Vector Machine Algorithm](support-vector-machine.md)
+
From 428bd62cd219830b77dde615f5a0efb3432afbb1 Mon Sep 17 00:00:00 2001
From: Ankit Mahato
Date: Thu, 23 May 2024 04:20:12 +0530
Subject: [PATCH 120/405] Update confusion-matrix.md
---
contrib/machine-learning/confusion-matrix.md | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/contrib/machine-learning/confusion-matrix.md b/contrib/machine-learning/confusion-matrix.md
index ac5cd31..4bedf66 100644
--- a/contrib/machine-learning/confusion-matrix.md
+++ b/contrib/machine-learning/confusion-matrix.md
@@ -1,4 +1,6 @@
-Confusion Matrix - A confusion matrix is a fundamental performance evaluation tool used in machine learning to assess the accuracy of a classification model. It is an N x N matrix, where N represents the number of target classes.
+## Confusion Matrix
+
+A confusion matrix is a fundamental performance evaluation tool used in machine learning to assess the accuracy of a classification model. It is an N x N matrix, where N represents the number of target classes.
For binary classification, it results in a 2 x 2 matrix that outlines four key parameters:
1. True Positive (TP) - The predicted value matches the actual value, or the predicted class matches the actual class.
@@ -20,15 +22,18 @@ To implement the confusion matrix in Python, we can use the confusion_matrix() f
The function returns a 2D array that represents the confusion matrix.
We can also visualize the confusion matrix using a heatmap.
+```python
# Import necessary libraries
import numpy as np
-from sklearn.metrics import confusion_matrix,classification_report
+from sklearn.metrics import confusion_matrix, classification_report
import seaborn as sns
import matplotlib.pyplot as plt
# Create the NumPy array for actual and predicted labels
-actual = np.array(['Apple', 'Apple', 'Apple', 'Not Apple', 'Apple', 'Not Apple', 'Apple', 'Apple', 'Not Apple', 'Not Apple'])
-predicted = np.array(['Apple', 'Not Apple', 'Apple', 'Not Apple', 'Apple', 'Apple', 'Apple', 'Apple', 'Not Apple', 'Not Apple'])
+actual = np.array(['Apple', 'Apple', 'Apple', 'Not Apple', 'Apple',
+ 'Not Apple', 'Apple', 'Apple', 'Not Apple', 'Not Apple'])
+predicted = np.array(['Apple', 'Not Apple', 'Apple', 'Not Apple', 'Apple',
+ 'Apple', 'Apple', 'Apple', 'Not Apple', 'Not Apple'])
# Compute the confusion matrix
cm = confusion_matrix(actual,predicted)
@@ -46,8 +51,11 @@ plt.show()
# Classifications Report based on Confusion Metrics
print(classification_report(actual, predicted))
+```
-# Results
+### Results
+
+```
1. Confusion Matrix:
[[5 1]
[1 3]]
@@ -59,3 +67,4 @@ Not Apple 0.75 0.75 0.75 4
accuracy 0.80 10
macro avg 0.79 0.79 0.79 10
weighted avg 0.80 0.80 0.80 10
+```
From 34131322a2753f32d44630e1c127a6716b099fca Mon Sep 17 00:00:00 2001
From: Ankit Mahato
Date: Thu, 23 May 2024 04:22:17 +0530
Subject: [PATCH 121/405] Update support-vector-machine.md
---
.../support-vector-machine.md | 20 ++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/contrib/machine-learning/support-vector-machine.md b/contrib/machine-learning/support-vector-machine.md
index 90ee922..0117e9f 100644
--- a/contrib/machine-learning/support-vector-machine.md
+++ b/contrib/machine-learning/support-vector-machine.md
@@ -1,12 +1,19 @@
+## Support Vector Machine
+
Support Vector Machine or SVM is one of the most popular Supervised Learning algorithms, which is used for Classification as well as Regression problems. However, primarily, it is used for Classification problems in Machine Learning.
+
SVM can be of two types -
1. Linear SVM: Linear SVM is used for linearly separable data, which means if a dataset can be classified into two classes by using a single straight line, then such data is termed as linearly separable data, and classifier is used called as Linear SVM classifier.
2. Non-linear SVM: Non-Linear SVM is used for non-linearly separated data, which means if a dataset cannot be classified by using a straight line, then such data is termed as non-linear data and classifier used is called as Non-linear SVM classifier.
-Working of SVM - The goal of SVM is to find a hyperplane that separates the data points into different classes. A hyperplane is a line in 2D space, a plane in 3D space, or a higher-dimensional surface in n-dimensional space. The hyperplane is chosen in such a way that it maximizes the margin, which is the distance between the hyperplane and the closest data points of each class. The closest data points are called the support vectors.
-The distance between the hyperplane and a data point "x" can be calculated using the formula −
+Working of SVM - The goal of SVM is to find a hyperplane that separates the data points into different classes. A hyperplane is a line in 2D space, a plane in 3D space, or a higher-dimensional surface in n-dimensional space. The hyperplane is chosen in such a way that it maximizes the margin, which is the distance between the hyperplane and the closest data points of each class. The closest data points are called the support vectors.
+
+The distance between the hyperplane and a data point "x" can be calculated using the formula −
+```
distance = (w . x + b) / ||w||
+```
where "w" is the weight vector, "b" is the bias term, and "||w||" is the Euclidean norm of the weight vector. The weight vector "w" is perpendicular to the hyperplane and determines its orientation, while the bias term "b" determines its position.
+
The optimal hyperplane is found by solving an optimization problem, which is to maximize the margin subject to the constraint that all data points are correctly classified. In other words, we want to find the hyperplane that maximizes the margin between the two classes while ensuring that no data point is misclassified. This is a convex optimization problem that can be solved using quadratic programming. If the data points are not linearly separable, we can use a technique called kernel trick to map the data points into a higher-dimensional space where they become separable. The kernel function computes the inner product between the mapped data points without computing the mapping itself. This allows us to work with the data points in the higherdimensional space without incurring the computational cost of mapping them.
1. Hyperplane:
@@ -19,8 +26,9 @@ It may be defined as the gap between two lines on the closet data points of diff
We will use the famous Iris dataset, which contains the sepal length, sepal width, petal length, and petal width of three species of iris flowers: Iris setosa, Iris versicolor, and Iris virginica. The goal is to classify the flowers into their respective species based on these four features. We load the iris dataset using load_iris and split the data into training and testing sets using train_test_split. We use a test size of 0.2, which means that 20% of the data will be used for testing and 80% for training. We set the random state to 42 to ensure reproducibility of the results.
-# Implemetation of SVM in Python
+### Implemetation of SVM in Python
+```python
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.svm import SVC
@@ -45,8 +53,10 @@ y_pred = svm.predict(X_test)
# calculate the accuracy of the classifier
accuracy = accuracy_score(y_test, y_pred)
print("Accuracy:", accuracy)
+```
-# Output
+#### Output
+```
Accuracy: 1
-
+```
From 5b74a4be6581161649b2056588b93ac4702ba3d2 Mon Sep 17 00:00:00 2001
From: Ankit Mahato
Date: Thu, 23 May 2024 04:54:25 +0530
Subject: [PATCH 122/405] Update Descriptive_Statistics.md
---
contrib/pandas/Descriptive_Statistics.md | 190 ++++++++++-------------
1 file changed, 82 insertions(+), 108 deletions(-)
diff --git a/contrib/pandas/Descriptive_Statistics.md b/contrib/pandas/Descriptive_Statistics.md
index 7775965..abdb33b 100644
--- a/contrib/pandas/Descriptive_Statistics.md
+++ b/contrib/pandas/Descriptive_Statistics.md
@@ -10,13 +10,11 @@ Data scientists utilize descriptive statistics to uncover patterns, identify out
```python
import pandas as pd
import numpy as np
-```
-
-```python
df = pd.read_csv("Age-Income-Dataset.csv")
df
```
+
| | Age | Income |
| --- | ----------- | ------ |
| 0 | Young | 25000 |
@@ -70,14 +68,10 @@ df
| 48 | Young | 68400 |
| 49 | Middle Age | 51700 |
-
-
```python
df.describe()
```
-
-
| | Income |
|-------|-------------|
| count | 50.000000 |
@@ -101,18 +95,17 @@ $$ \overline{x} = \frac{\sum\limits_{i=1}^{n} x_i}{n} $$
* $\sum$ (sigma) represents the summation symbol, indicating we add up all the values from i=1 to n.
* $n$ represents the total number of values in the dataset.
-
-
```python
df['Income'].mean()
```
+#### Result
-
-
+```
50966.0
+```
-
+#### Without pandas
```python
@@ -131,12 +124,10 @@ def mean_f(df):
mean_f(df)
```
-Without pandas Library ->
-Average of Income is 50966.0
+Average of Income:
-With pandas Library ->
-50966.0
-
+- Without pandas Library -> 50966.0
+- With pandas Library -> 50966.0
### Median
@@ -163,21 +154,17 @@ $$ M = \frac{x_{n/2} + x_{(n/2)+1}}{2} $$
* n represents the total number of observations in the dataset.
* $x$ represents the individual value.
-
-
-
-
```python
df['Income'].median()
```
+#### Result
-
-
+```
46850.0
+```
-
-
+#### Without pandas
```python
def median_f(df):
@@ -198,18 +185,15 @@ def median_f(df):
median_f(df)
```
-Median without library ->
-Median of Income is 49850.0 \
-Median with library ->
-46850.0
-
+Median of Income:
+
+- Median without library -> 49850.0
+- Median with library -> 46850.0
### Mode
-
The mode is a measure of central tendency that represents the value or values that occur most frequently in a dataset. Unlike the mean and median, which focus on the average or middle value, the mode identifies the most common value(s) in the dataset.
-
```python
def mode_f(df):
for col in df.columns:
@@ -240,17 +224,17 @@ def mode_f(df):
mode_f(df)
```
+#### Result
+
+```
Column: Age
-Without pandas Library -> \
+Without pandas Library ->
Mode of Age is Old
-With pandas Library -> \
-0 Old \
+With pandas Library ->
+0 Old
Name: Age, dtype: object
-
-
-
-
+```
### Standard Deviation
@@ -264,18 +248,17 @@ $$s = \sqrt{\frac{\sum(x_i-\overline{x})^{2}}{n-1}}$$
* $\overline{x}$ (x bar) represents the mean value of the dataset.
* $n$ represents the total number of values in the dataset.
-
```python
df['Income'].std()
```
+#### Result
-
-
+```
21096.683267707253
+```
-
-
+#### Without pandas
```python
import math
@@ -304,17 +287,17 @@ With pandas library: ->
Std : 20884.6509187968
+### Count
```python
df['Income'].count()
```
+#### Result
-
-
+```
50
-
-
+```
### Minimum
@@ -323,13 +306,13 @@ df['Income'].count()
df['Income'].min()
```
+#### Result
-
-
+```
15000
+```
-
-
+#### Without pandas
```python
def min_f(df):
@@ -354,13 +337,13 @@ With pandas Library-> 15000
df['Income'].max()
```
+#### Result
-
-
+```
93000
+```
-
-
+#### Without pandas
```python
def max_f(df):
@@ -374,8 +357,8 @@ def max_f(df):
max_f(df)
```
- Without pandas Library-> 93000
- With pandas Library-> 93000
+Without pandas Library-> 93000
+With pandas Library-> 93000
### Percentile
@@ -385,25 +368,23 @@ max_f(df)
df['Income'].quantile(0.25)
```
+#### Result
-
-
+```
33475.0
-
-
-
+```
```python
df['Income'].quantile(0.75)
```
+#### Result
-
-
+```
65400.0
+```
-
-
+#### Without pandas
```python
def percentile_f(df,percentile):
@@ -432,9 +413,6 @@ df = pd.read_csv('Iris.csv')
df.head(5)
```
-
-
-
| | Id | SepalLengthCm | SepalWidthCm | PetalLengthCm | PetalWidthCm | Species |
|---|----|---------------|--------------|---------------|--------------|-------------|
| 0 | 1 | 5.1 | 3.5 | 1.4 | 0.2 | Iris-setosa |
@@ -443,9 +421,6 @@ df.head(5)
| 3 | 4 | 4.6 | 3.1 | 1.5 | 0.2 | Iris-setosa |
| 4 | 5 | 5.0 | 3.6 | 1.4 | 0.2 | Iris-setosa |
-
-
-
```python
df.drop(['Id','Species'],axis=1,inplace= True)
```
@@ -463,13 +438,10 @@ $$ COV(X,Y) = \frac{\sum\limits_{i=1}^{n} (X_i - \overline{X}) (Y_i - \overline{
* $\overline{X}$ and $\overline{Y}$ represent the mean values for variables X and Y, respectively.
* $n$ represents the total number of observations in the dataset.
-
-
```python
df.cov()
```
-
| | SepalLengthCm | SepalWidthCm | PetalLengthCm | PetalWidthCm |
|-------------------|-------------- |---------------|-----------------|--------------|
| **SepalLengthCm** | 0.685694 | -0.039268 | 1.273682 | 0.516904 |
@@ -477,7 +449,7 @@ df.cov()
| **PetalLengthCm** | 1.273682 | -0.321713 | 3.113179 | 1.296387 |
| **PetalWidthCm** | 0.516904 | -0.117981 | 1.296387 | 0.582414 |
-
+#### Without pandas
```python
def cov_f(df):
@@ -496,27 +468,29 @@ def cov_f(df):
cov_f(df)
```
-Covariance of SepalLengthCm and SepalLengthCm is : 0.6856935123042504 \
-Covariance of SepalLengthCm and SepalWidthCm is : -0.03926845637583892 \
-Covariance of SepalLengthCm and PetalLengthCm is : 1.2736823266219246 \
+#### Result
+
+```
+Covariance of SepalLengthCm and SepalLengthCm is : 0.6856935123042504
+Covariance of SepalLengthCm and SepalWidthCm is : -0.03926845637583892
+Covariance of SepalLengthCm and PetalLengthCm is : 1.2736823266219246
Covariance of SepalLengthCm and PetalWidthCm is : 0.5169038031319911
-Covariance of SepalWidthCm and SepalLengthCm is : -0.03926845637583892 \
-Covariance of SepalWidthCm and SepalWidthCm is : 0.1880040268456377 \
-Covariance of SepalWidthCm and PetalLengthCm is : -0.32171275167785235 \
+Covariance of SepalWidthCm and SepalLengthCm is : -0.03926845637583892
+Covariance of SepalWidthCm and SepalWidthCm is : 0.1880040268456377
+Covariance of SepalWidthCm and PetalLengthCm is : -0.32171275167785235
Covariance of SepalWidthCm and PetalWidthCm is : -0.11798120805369115
-Covariance of PetalLengthCm and SepalLengthCm is : 1.2736823266219246 \
-Covariance of PetalLengthCm and SepalWidthCm is : -0.32171275167785235 \
-Covariance of PetalLengthCm and PetalLengthCm is : 3.113179418344519 \
+Covariance of PetalLengthCm and SepalLengthCm is : 1.2736823266219246
+Covariance of PetalLengthCm and SepalWidthCm is : -0.32171275167785235
+Covariance of PetalLengthCm and PetalLengthCm is : 3.113179418344519
Covariance of PetalLengthCm and PetalWidthCm is : 1.2963874720357946
-Covariance of PetalWidthCm and SepalLengthCm is : 0.5169038031319911 \
-Covariance of PetalWidthCm and SepalWidthCm is : -0.11798120805369115 \
-Covariance of PetalWidthCm and PetalLengthCm is : 1.2963874720357946 \
+Covariance of PetalWidthCm and SepalLengthCm is : 0.5169038031319911
+Covariance of PetalWidthCm and SepalWidthCm is : -0.11798120805369115
+Covariance of PetalWidthCm and PetalLengthCm is : 1.2963874720357946
Covariance of PetalWidthCm and PetalWidthCm is : 0.5824143176733781
-
-
+````
### Correlation
@@ -527,9 +501,6 @@ $$r = \frac{n(\sum xy) - (\sum x)(\sum y)}{\sqrt{n(\sum x^2) - (\sum x)^2} \cdot
* r represents the correlation coefficient.
* n is the number of data points.
-
-
-
```python
df.corr()
```
@@ -541,6 +512,7 @@ df.corr()
| **PetalLengthCm** | 0.871754 | -0.420516 | 1.000000 | 0.962757 |
| **PetalWidthCm** | 0.817954 | -0.356544 | 0.962757 | 1.000000 |
+#### Without using pandas
```python
import math
@@ -576,24 +548,26 @@ def corr_f(df):
corr_f(df)
```
-Correlation of SepalLengthCm and SepalLengthCm :1.0 \
-Correlation of SepalLengthCm and SepalWidthCm :-0.10936924995067286 \
-Correlation of SepalLengthCm and PetalLengthCm :0.8717541573048861 \
+#### Result
+
+```
+Correlation of SepalLengthCm and SepalLengthCm :1.0
+Correlation of SepalLengthCm and SepalWidthCm :-0.10936924995067286
+Correlation of SepalLengthCm and PetalLengthCm :0.8717541573048861
Correlation of SepalLengthCm and PetalWidthCm :0.8179536333691775
-Correlation of SepalWidthCm and SepalLengthCm :-0.10936924995067286 \
-Correlation of SepalWidthCm and SepalWidthCm :1.0 \
-Correlation of SepalWidthCm and PetalLengthCm :-0.42051609640118826 \
+Correlation of SepalWidthCm and SepalLengthCm :-0.10936924995067286
+Correlation of SepalWidthCm and SepalWidthCm :1.0
+Correlation of SepalWidthCm and PetalLengthCm :-0.42051609640118826
Correlation of SepalWidthCm and PetalWidthCm :-0.3565440896138223
-Correlation of PetalLengthCm and SepalLengthCm :0.8717541573048861 \
-Correlation of PetalLengthCm and SepalWidthCm :-0.42051609640118826 \
-Correlation of PetalLengthCm and PetalLengthCm :1.0 \
+Correlation of PetalLengthCm and SepalLengthCm :0.8717541573048861
+Correlation of PetalLengthCm and SepalWidthCm :-0.42051609640118826
+Correlation of PetalLengthCm and PetalLengthCm :1.0
Correlation of PetalLengthCm and PetalWidthCm :0.9627570970509656
-Correlation of PetalWidthCm and SepalLengthCm :0.8179536333691775 \
-Correlation of PetalWidthCm and SepalWidthCm :-0.3565440896138223 \
-Correlation of PetalWidthCm and PetalLengthCm :0.9627570970509656 \
+Correlation of PetalWidthCm and SepalLengthCm :0.8179536333691775
+Correlation of PetalWidthCm and SepalWidthCm :-0.3565440896138223
+Correlation of PetalWidthCm and PetalLengthCm :0.9627570970509656
Correlation of PetalWidthCm and PetalWidthCm :1.0
-
-
+```
From 519a5052ec83364fc2f74b4345f65dab63650e1d Mon Sep 17 00:00:00 2001
From: Ankit Mahato
Date: Thu, 23 May 2024 05:10:19 +0530
Subject: [PATCH 123/405] Update index.md
---
contrib/machine-learning/index.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/machine-learning/index.md b/contrib/machine-learning/index.md
index 1abe707..7a247eb 100644
--- a/contrib/machine-learning/index.md
+++ b/contrib/machine-learning/index.md
@@ -1,3 +1,3 @@
# List of sections
-- [TensorFlow.md](learn-python\contrib\machine-learning\tensorFlow.md)
+- [TensorFlow.md](tensorFlow.md)
From eefc5d342a7b08a1bbad81ca802e2837b6735171 Mon Sep 17 00:00:00 2001
From: Yodha Sudarsi <101962069+Yodha-Sudarsi@users.noreply.github.com>
Date: Thu, 23 May 2024 05:36:06 +0530
Subject: [PATCH 124/405] Installing numpy (#463)
* Updated List of sections
* Updated index.md
Added info about how to install NumPy in a system.
* Added installing numpy.md file and updated the index.md
* Added installing-numpy.md file and updated the index.md
* Create installing-numpy.md for installation
* Update index.md
Added operations-on-arrays.md
* Create operations-on-arrays.md
* Update index.md
* Update index.md
* Rename installing-numpy.md to installing_numpy.md
* Rename operations-on-arrays.md to operations_on_arrays.md
* Update installing_numpy.md
* Update index.md
* Rename installing_numpy.md to installing-numpy.md
* Rename operations_on_arrays.md to operations-on-arrays.md
* Update operations-on-arrays.md
* Update operations-on-arrays.md
* Revert "Update operations-on-arrays.md"
* Delete contrib/numpy/operations-on-arrays.md
* Update index.md
---------
Co-authored-by: Ankit Mahato
---
contrib/numpy/index.md | 1 +
contrib/numpy/installing-numpy.md | 82 +++++++++++++++++++++++++++++++
2 files changed, 83 insertions(+)
create mode 100644 contrib/numpy/installing-numpy.md
diff --git a/contrib/numpy/index.md b/contrib/numpy/index.md
index 5d3f63b..ff0f25b 100644
--- a/contrib/numpy/index.md
+++ b/contrib/numpy/index.md
@@ -1,3 +1,4 @@
# List of sections
+- [Installing NumPy](installing-numpy.md)
- [Introduction](introduction.md)
diff --git a/contrib/numpy/installing-numpy.md b/contrib/numpy/installing-numpy.md
new file mode 100644
index 0000000..7339e8c
--- /dev/null
+++ b/contrib/numpy/installing-numpy.md
@@ -0,0 +1,82 @@
+# Installing NumPy
+
+NumPy is the fundamental package for scientific computing in Python.
+NumPy is used for working with arrays.
+
+The only prerequisite for installing NumPy is Python itself.
+#
+**Step 1: Check if PIP is Installed**
+
+Before installing NumPy, it's essential to ensure that PIP (Python Package Installer) is installed on your system. PIP is a package management system used to install and manage Python packages. You can verify if PIP is installed by running a simple command in your terminal or command prompt.
+
+```bash
+pip --version
+```
+
+If PIP is not currently installed on your system, you can install it by visiting the [pypi.org](https://pypi.org/project/pip/) webpage.
+
+#
+
+**Step 2: Installing PIP**
+
+**get-pip.py**
+
+This is a Python script that uses some bootstrapping logic to install pip.
+
+Open a terminal / command prompt and run:
+
+**Linux**
+```bash
+python get-pip.py
+```
+
+**Windows**
+```bash
+py get-pip.py
+```
+
+**MacOS**
+```bash
+python get-pip.py
+```
+
+#
+
+**Step 3: Installing NumPy**
+
+NumPy can be installed either through conda or pip.
+
+If you use pip, you can install NumPy with:
+
+```bash
+pip install numpy
+```
+
+If you use conda, you can install NumPy from the defaults or conda-forge channels:
+
+```
+# Best practice, use an environment rather than install in the base env
+conda create -n my-env
+conda activate my-env
+```
+
+```
+# If you want to install from conda-forge
+conda config --env --add channels conda-forge
+```
+
+```
+# The actual install command
+conda install numpy
+```
+
+You can find more information about how to install [NumPy](https://numpy.org/install/) on numpy.org.
+
+#
+
+**Step 4: Check if NumPy is Installed**
+
+We can utilize the "pip show" command not only to display the version but also to determine whether NumPy is installed on the system.
+```bash
+pip show numpy
+```
From aa0a00137b48b0251ff421602c46aa905fb3ef5c Mon Sep 17 00:00:00 2001
From: Yodha Sudarsi <101962069+Yodha-Sudarsi@users.noreply.github.com>
Date: Thu, 23 May 2024 05:56:34 +0530
Subject: [PATCH 125/405] Operation on numpy (#464)
* Updated List of sections
* Updated index.md
Added info about how to install NumPy in a system.
* Added installing numpy.md file and updated the index.md
* Added installing-numpy.md file and updated the index.md
* Create installing-numpy.md for installation
* Update index.md
Added operations-on-arrays.md
* Create operations-on-arrays.md
* Update index.md
* Update index.md
* Rename installing-numpy.md to installing_numpy.md
* Rename operations-on-arrays.md to operations_on_arrays.md
* Update installing_numpy.md
* Update index.md
* Rename installing_numpy.md to installing-numpy.md
* Rename operations_on_arrays.md to operations-on-arrays.md
* Update operations-on-arrays.md
* Update operations-on-arrays.md
* Revert "Update operations-on-arrays.md"
* Delete contrib/numpy/installing-numpy.md
* Update operations-on-arrays.md
---------
Co-authored-by: Ankit Mahato
---
contrib/numpy/index.md | 1 +
contrib/numpy/operations-on-arrays.md | 281 ++++++++++++++++++++++++++
2 files changed, 282 insertions(+)
create mode 100644 contrib/numpy/operations-on-arrays.md
diff --git a/contrib/numpy/index.md b/contrib/numpy/index.md
index b38006c..6ee2e9d 100644
--- a/contrib/numpy/index.md
+++ b/contrib/numpy/index.md
@@ -3,3 +3,4 @@
- [Installing NumPy](installing-numpy.md)
- [Introduction](introduction.md)
- [NumPy Data Types](datatypes.md)
+- [Operations on Arrays in NumPy](operations-on-arrays.md)
diff --git a/contrib/numpy/operations-on-arrays.md b/contrib/numpy/operations-on-arrays.md
new file mode 100644
index 0000000..e3966d2
--- /dev/null
+++ b/contrib/numpy/operations-on-arrays.md
@@ -0,0 +1,281 @@
+# Operations on Arrays
+
+## NumPy Arithmetic Operations
+
+NumPy offers a broad array of operations for arrays, including arithmetic functions.
+
+The arithmetic operations in NumPy are popular for their simplicity and efficiency in handling array calculations.
+
+**Addition**
+
+we can use the `+` operator to perform element-wise addition between two or more NumPy arrays.
+
+**Code**
+```python
+import numpy as np
+array_1 = np.array([9, 10, 11, 12])
+array_2 = np.array([1, 3, 5, 7])
+result_1 = array_1 + array_2
+print("Utilizing the + operator:", result_1)
+```
+
+**Output:**
+```
+Utilizing the + operator: [10 13 16 19]
+```
+
+**Subtraction**
+
+we can use the `-` operator to perform element-wise subtraction between two or more NumPy arrays.
+
+**Code**
+```python
+import numpy as np
+array_1 = np.array([9, 10, 11, 12])
+array_2 = np.array([1, 3, 5, 7])
+result_1 = array_1 - array_2
+print("Utilizing the - operator:", result_1)
+```
+
+**Output:**
+```
+Utilizing the - operator: [8 7 6 5]
+```
+
+**Multiplication**
+
+we can use the `*` operator to perform element-wise multiplication between two or more NumPy arrays.
+
+**Code**
+```python
+import numpy as np
+array_1 = np.array([9, 10, 11, 12])
+array_2 = np.array([1, 3, 5, 7])
+result_1 = array_1 * array_2
+print("Utilizing the * operator:", result_1)
+```
+
+**Output:**
+```
+Utilizing the * operator: [9 30 55 84]
+```
+
+**Division**
+
+we can use the `/` operator to perform element-wise division between two or more NumPy arrays.
+
+**Code**
+```python
+import numpy as np
+array_1 = np.array([9, 10, 11, 12])
+array_2 = np.array([1, 3, 5, 7])
+result_1 = array_1 / array_2
+print("Utilizing the / operator:", result_1)
+```
+
+**Output:**
+```
+Utilizing the / operator: [9. 3.33333333 2.2 1.71428571]
+```
+
+**Exponentiation**
+
+we can use the `**` operator to perform element-wise exponentiation between two or more NumPy arrays.
+
+**Code**
+```python
+import numpy as np
+array_1 = np.array([9, 10, 11, 12])
+array_2 = np.array([1, 3, 5, 7])
+result_1 = array_1 ** array_2
+print("Utilizing the ** operator:", result_1)
+```
+
+**Output:**
+```
+Utilizing the ** operator: [9 1000 161051 35831808]
+```
+
+**Modulus**
+
+We can use the `%` operator to perform element-wise modulus operations between two or more NumPy arrays.
+
+**Code**
+```python
+import numpy as np
+array_1 = np.array([9, 10, 11, 12])
+array_2 = np.array([1, 3, 5, 7])
+result_1 = array_1 % array_2
+print("Utilizing the % operator:", result_1)
+```
+
+**Output:**
+```
+Utilizing the % operator: [0 1 1 5]
+```
+
+
+
+## NumPy Comparision Operations
+
+
+
+NumPy provides various comparison operators that can compare elements across multiple NumPy arrays.
+
+**less than operator**
+
+The `<` operator returns `True` if the value of operand on left is less than the value of operand on right.
+
+**Code**
+```python
+import numpy as np
+array_1 = np.array([12,15,20])
+array_2 = np.array([20,15,12])
+result_1 = array_1 < array_2
+print("array_1 < array_2:",result_1)
+```
+**Output:**
+```
+array_1 < array_2 : [True False False]
+```
+
+**less than or equal to operator**
+
+The `<=` operator returns `True` if the value of operand on left is lesser than or equal to the value of operand on right.
+
+**Code**
+```python
+import numpy as np
+array_1 = np.array([12,15,20])
+array_2 = np.array([20,15,12])
+result_1 = array_1 <= array_2
+print("array_1 <= array_2:",result_1)
+```
+**Output:**
+```
+array_1 <= array_2: [True True False]
+```
+
+**greater than operator**
+
+The `>` operator returns `True` if the value of operand on left is greater than the value of operand on right.
+
+**Code**
+```python
+import numpy as np
+array_1 = np.array([12,15,20])
+array_2 = np.array([20,15,12])
+result_2 = array_1 > array_2
+print("array_1 > array_2:",result_2)
+```
+**Output:**
+```
+array_1 > array_2 : [False False True]
+```
+
+**greater than or equal to operator**
+
+The `>=` operator returns `True` if the value of operand on left is greater than or equal to the value of operand on right.
+
+**Code**
+```python
+import numpy as np
+array_1 = np.array([12,15,20])
+array_2 = np.array([20,15,12])
+result_2 = array_1 >= array_2
+print("array_1 >= array_2:",result_2)
+```
+**Output:**
+```
+array_1 >= array_2: [False True True]
+```
+
+**equal to operator**
+
+The `==` operator returns `True` if the value of operand on left is same as the value of operand on right.
+
+**Code**
+```python
+import numpy as np
+array_1 = np.array([12,15,20])
+array_2 = np.array([20,15,12])
+result_3 = array_1 == array_2
+print("array_1 == array_2:",result_3)
+```
+**Output:**
+```
+array_1 == array_2: [False True False]
+```
+
+**not equal to operator**
+
+The `!=` operator returns `True` if the value of operand on left is not equal to the value of operand on right.
+
+**Code**
+```python
+import numpy as np
+array_1 = np.array([12,15,20])
+array_2 = np.array([20,15,12])
+result_3 = array_1 != array_2
+print("array_1 != array_2:",result_3)
+```
+**Output:**
+```
+array_1 != array_2: [True False True]
+```
+
+
+
+## NumPy Logical Operations
+
+Logical operators perform Boolean algebra. A branch of algebra that deals with `True` and `False` statements.
+
+It illustrates the logical operations of AND, OR, and NOT using np.logical_and(), np.logical_or(), and np.logical_not() functions, respectively.
+
+**Logical AND**
+
+Evaluates the element-wise truth value of `array_1` AND `array_2`
+
+**Code**
+```python
+import numpy as np
+array_1 = np.array([True, False, True])
+array_2 = np.array([False, False, True])
+print(np.logical_and(array_1, array_2))
+```
+**Output:**
+```
+[False False True]
+```
+
+**Logical OR**
+
+Evaluates the element-wise truth value of `array_1` OR `array_2`
+
+**Code**
+```python
+import numpy as np
+array_1 = np.array([True, False, True])
+array_2 = np.array([False, False, True])
+print(np.logical_or(array_1, array_2))
+```
+**Output:**
+```
+[True False True]
+```
+
+**Logical NOT**
+
+Evaluates the element-wise truth value of `array_1` NOT `array_2`
+
+**Code**
+```python
+import numpy as np
+array_1 = np.array([True, False, True])
+array_2 = np.array([False, False, True])
+print(np.logical_not(array_1))
+```
+**Output:**
+```
+[False True False]
+```
From 1ed2c2f5d8566616b54563c2130d37dbee05569d Mon Sep 17 00:00:00 2001
From: Ankit Mahato
Date: Thu, 23 May 2024 06:18:13 +0530
Subject: [PATCH 126/405] Rename TIC_TAC_TOE_GAME.md to tic-tac-toe.md
---
contrib/mini-projects/{TIC_TAC_TOE_GAME.md => tic-tac-toe.md} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename contrib/mini-projects/{TIC_TAC_TOE_GAME.md => tic-tac-toe.md} (100%)
diff --git a/contrib/mini-projects/TIC_TAC_TOE_GAME.md b/contrib/mini-projects/tic-tac-toe.md
similarity index 100%
rename from contrib/mini-projects/TIC_TAC_TOE_GAME.md
rename to contrib/mini-projects/tic-tac-toe.md
From 7d98fe81f13817199ba58f2f2709423bebfe35b7 Mon Sep 17 00:00:00 2001
From: Eshparsi
Date: Thu, 23 May 2024 07:20:00 +0530
Subject: [PATCH 127/405] shifted content to ds-algorithms
---
contrib/Data-Structure-Graphs/index.md | 3 ---
contrib/{Data-Structure-Graphs => ds-algorithms}/graph.md | 0
contrib/ds-algorithms/index.md | 1 +
3 files changed, 1 insertion(+), 3 deletions(-)
delete mode 100644 contrib/Data-Structure-Graphs/index.md
rename contrib/{Data-Structure-Graphs => ds-algorithms}/graph.md (100%)
diff --git a/contrib/Data-Structure-Graphs/index.md b/contrib/Data-Structure-Graphs/index.md
deleted file mode 100644
index 6471576..0000000
--- a/contrib/Data-Structure-Graphs/index.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# List of sections
-
-- [Graphs](graph.md)
\ No newline at end of file
diff --git a/contrib/Data-Structure-Graphs/graph.md b/contrib/ds-algorithms/graph.md
similarity index 100%
rename from contrib/Data-Structure-Graphs/graph.md
rename to contrib/ds-algorithms/graph.md
diff --git a/contrib/ds-algorithms/index.md b/contrib/ds-algorithms/index.md
index 5b52155..347a9d0 100644
--- a/contrib/ds-algorithms/index.md
+++ b/contrib/ds-algorithms/index.md
@@ -2,3 +2,4 @@
- [Section title](filename.md)
- [Sorting Algorithms](sorting-algorithms.md)
+- [Graphs](graph.md)
From f52fa729cffddbeed121826024ca972ff97cd1a9 Mon Sep 17 00:00:00 2001
From: Eshparsi <112681516+Eshparsi@users.noreply.github.com>
Date: Thu, 23 May 2024 07:28:59 +0530
Subject: [PATCH 128/405] Update index.md
---
contrib/ds-algorithms/index.md | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/contrib/ds-algorithms/index.md b/contrib/ds-algorithms/index.md
index 347a9d0..adec6aa 100644
--- a/contrib/ds-algorithms/index.md
+++ b/contrib/ds-algorithms/index.md
@@ -1,5 +1,11 @@
# List of sections
-- [Section title](filename.md)
-- [Sorting Algorithms](sorting-algorithms.md)
+- [Queues in Python](Queues.md)
- [Graphs](graph.md)
+- [Sorting Algorithms](sorting-algorithms.md)
+- [Recursion and Backtracking](recursion.md)
+- [Divide and Conquer Algorithm](divide-and-conquer-algorithm.md)
+- [Searching Algorithms](searching-algorithms.md)
+- [Greedy Algorithms](greedy-algorithms.md)
+- [Dynamic Programming](dynamic-programming.md)
+
From bc18bfed040ddae6301112acda317672950291fa Mon Sep 17 00:00:00 2001
From: Eshparsi
Date: Thu, 23 May 2024 07:32:15 +0530
Subject: [PATCH 129/405] .
---
.../divide-and-conquer-algorithm.md | 54 ++++++
contrib/ds-algorithms/dynamic-programming.md | 132 ++++++++++++++
contrib/ds-algorithms/greedy-algorithms.md | 135 +++++++++++++++
contrib/ds-algorithms/recursion.md | 107 ++++++++++++
contrib/ds-algorithms/searching-algorithms.md | 161 ++++++++++++++++++
5 files changed, 589 insertions(+)
create mode 100644 contrib/ds-algorithms/divide-and-conquer-algorithm.md
create mode 100644 contrib/ds-algorithms/dynamic-programming.md
create mode 100644 contrib/ds-algorithms/greedy-algorithms.md
create mode 100644 contrib/ds-algorithms/recursion.md
create mode 100644 contrib/ds-algorithms/searching-algorithms.md
diff --git a/contrib/ds-algorithms/divide-and-conquer-algorithm.md b/contrib/ds-algorithms/divide-and-conquer-algorithm.md
new file mode 100644
index 0000000..b5a356e
--- /dev/null
+++ b/contrib/ds-algorithms/divide-and-conquer-algorithm.md
@@ -0,0 +1,54 @@
+# Divide and Conquer Algorithms
+
+Divide and Conquer is a paradigm for solving problems that involves breaking a problem into smaller sub-problems, solving the sub-problems recursively, and then combining their solutions to solve the original problem.
+
+## Merge Sort
+
+Merge Sort is a popular sorting algorithm that follows the divide and conquer strategy. It divides the input array into two halves, recursively sorts the halves, and then merges them.
+
+**Algorithm Overview:**
+- **Divide:** Divide the unsorted list into two sublists of about half the size.
+- **Conquer:** Recursively sort each sublist.
+- **Combine:** Merge the sorted sublists back into one sorted list.
+
+```python
+def merge_sort(arr):
+ if len(arr) > 1:
+ mid = len(arr) // 2
+ left_half = arr[:mid]
+ right_half = arr[mid:]
+
+ merge_sort(left_half)
+ merge_sort(right_half)
+
+ i = j = k = 0
+
+ while i < len(left_half) and j < len(right_half):
+ if left_half[i] < right_half[j]:
+ arr[k] = left_half[i]
+ i += 1
+ else:
+ arr[k] = right_half[j]
+ j += 1
+ k += 1
+
+ while i < len(left_half):
+ arr[k] = left_half[i]
+ i += 1
+ k += 1
+
+ while j < len(right_half):
+ arr[k] = right_half[j]
+ j += 1
+ k += 1
+
+arr = [12, 11, 13, 5, 6, 7]
+merge_sort(arr)
+print("Sorted array:", arr)
+```
+
+## Complexity Analysis
+- **Time Complexity:** O(n log n) in all cases
+- **Space Complexity:** O(n) additional space for the merge operation
+
+---
diff --git a/contrib/ds-algorithms/dynamic-programming.md b/contrib/ds-algorithms/dynamic-programming.md
new file mode 100644
index 0000000..43149f8
--- /dev/null
+++ b/contrib/ds-algorithms/dynamic-programming.md
@@ -0,0 +1,132 @@
+# Dynamic Programming
+
+Dynamic programming is a method for solving complex problems by breaking them down into simpler subproblems and solving each subproblem only once. It stores the solutions to subproblems to avoid redundant computations, making it particularly useful for optimization problems where the solution can be obtained by combining solutions to smaller subproblems.
+
+## Real-Life Examples of Dynamic Programming
+- **Fibonacci Sequence:** Computing the nth Fibonacci number efficiently.
+- **Shortest Path:** Finding the shortest path in a graph from a source to a destination.
+- **String Edit Distance:** Calculating the minimum number of operations required to transform one string into another.
+- **Knapsack Problem:** Maximizing the value of items in a knapsack without exceeding its weight capacity.
+
+# Some Common Dynamic Programming Techniques
+
+# 1. Fibonacci Sequence
+
+The Fibonacci sequence is a classic example used to illustrate dynamic programming. It is a series of numbers where each number is the sum of the two preceding ones, usually starting with 0 and 1.
+
+**Algorithm Overview:**
+- **Base Cases:** The first two numbers in the Fibonacci sequence are defined as 0 and 1.
+- **Memoization:** Store the results of previously computed Fibonacci numbers to avoid redundant computations.
+- **Recurrence Relation:** Compute each Fibonacci number by adding the two preceding numbers.
+
+## Fibonacci Sequence Code in Python (Top-Down Approach with Memoization)
+
+```python
+def fibonacci(n, memo={}):
+ if n in memo:
+ return memo[n]
+ if n <= 1:
+ return n
+ memo[n] = fibonacci(n-1, memo) + fibonacci(n-2, memo)
+ return memo[n]
+
+n = 10
+print(f"The {n}th Fibonacci number is: {fibonacci(n)}.")
+```
+
+## Fibonacci Sequence Code in Python (Bottom-Up Approach)
+
+```python
+def fibonacci(n):
+ fib = [0, 1]
+ for i in range(2, n + 1):
+ fib.append(fib[i - 1] + fib[i - 2])
+ return fib[n]
+
+n = 10
+print(f"The {n}th Fibonacci number is: {fibonacci(n)}.")
+```
+
+## Complexity Analysis
+- **Time Complexity**: O(n) for both approaches
+- **Space Complexity**: O(n) for the top-down approach (due to memoization), O(1) for the bottom-up approach
+
+
+
+
+
+# 2. Longest Common Subsequence
+
+The longest common subsequence (LCS) problem is to find the longest subsequence common to two sequences. A subsequence is a sequence that appears in the same relative order but not necessarily contiguous.
+
+**Algorithm Overview:**
+- **Base Cases:** If one of the sequences is empty, the LCS is empty.
+- **Memoization:** Store the results of previously computed LCS lengths to avoid redundant computations.
+- **Recurrence Relation:** Compute the LCS length by comparing characters of the sequences and making decisions based on whether they match.
+
+## Longest Common Subsequence Code in Python (Top-Down Approach with Memoization)
+
+```python
+def longest_common_subsequence(X, Y, m, n, memo={}):
+ if (m, n) in memo:
+ return memo[(m, n)]
+ if m == 0 or n == 0:
+ return 0
+ if X[m - 1] == Y[n - 1]:
+ memo[(m, n)] = 1 + longest_common_subsequence(X, Y, m - 1, n - 1, memo)
+ else:
+ memo[(m, n)] = max(longest_common_subsequence(X, Y, m, n - 1, memo),
+ longest_common_subsequence(X, Y, m - 1, n, memo))
+ return memo[(m, n)]
+
+X = "AGGTAB"
+Y = "GXTXAYB"
+print("Length of Longest Common Subsequence:", longest_common_subsequence(X, Y, len(X), len(Y)))
+```
+
+## Complexity Analysis
+- **Time Complexity**: O(m * n) for the top-down approach, where m and n are the lengths of the input sequences
+- **Space Complexity**: O(m * n) for the memoization table
+
+
+
+
+
+# 3. 0-1 Knapsack Problem
+
+The 0-1 knapsack problem is a classic optimization problem where the goal is to maximize the total value of items selected while keeping the total weight within a specified limit.
+
+**Algorithm Overview:**
+- **Base Cases:** If the capacity of the knapsack is 0 or there are no items to select, the total value is 0.
+- **Memoization:** Store the results of previously computed subproblems to avoid redundant computations.
+- **Recurrence Relation:** Compute the maximum value by considering whether to include the current item or not.
+
+## 0-1 Knapsack Problem Code in Python (Top-Down Approach with Memoization)
+
+```python
+def knapsack(weights, values, capacity, n, memo={}):
+ if (capacity, n) in memo:
+ return memo[(capacity, n)]
+ if n == 0 or capacity == 0:
+ return 0
+ if weights[n - 1] > capacity:
+ memo[(capacity, n)] = knapsack(weights, values, capacity, n - 1, memo)
+ else:
+ memo[(capacity, n)] = max(values[n - 1] + knapsack(weights, values, capacity - weights[n - 1], n - 1, memo),
+ knapsack(weights, values, capacity, n - 1, memo))
+ return memo[(capacity, n)]
+
+weights = [10, 20, 30]
+values = [60, 100, 120]
+capacity = 50
+n = len(weights)
+print("Maximum value that can be obtained:", knapsack(weights, values, capacity, n))
+```
+
+## Complexity Analysis
+- **Time Complexity**: O(n * W) for the top-down approach, where n is the number of items and W is the capacity of the knapsack
+- **Space Complexity**: O(n * W) for the memoization table
+
+
+
+
\ No newline at end of file
diff --git a/contrib/ds-algorithms/greedy-algorithms.md b/contrib/ds-algorithms/greedy-algorithms.md
new file mode 100644
index 0000000..c79ee99
--- /dev/null
+++ b/contrib/ds-algorithms/greedy-algorithms.md
@@ -0,0 +1,135 @@
+# Greedy Algorithms
+
+Greedy algorithms are simple, intuitive algorithms that make a sequence of choices at each step with the hope of finding a global optimum. They are called "greedy" because at each step, they choose the most advantageous option without considering the future consequences. Despite their simplicity, greedy algorithms are powerful tools for solving optimization problems, especially when the problem exhibits the greedy-choice property.
+
+## Real-Life Examples of Greedy Algorithms
+- **Coin Change:** Finding the minimum number of coins to make a certain amount of change.
+- **Job Scheduling:** Assigning tasks to machines to minimize completion time.
+- **Huffman Coding:** Constructing an optimal prefix-free binary code for data compression.
+- **Fractional Knapsack:** Selecting items to maximize the value within a weight limit.
+
+# Some Common Greedy Algorithms
+
+# 1. Coin Change Problem
+
+The coin change problem is a classic example of a greedy algorithm. Given a set of coin denominations and a target amount, the objective is to find the minimum number of coins required to make up that amount.
+
+**Algorithm Overview:**
+- **Greedy Strategy:** At each step, the algorithm selects the largest denomination coin that is less than or equal to the remaining amount.
+- **Repeat Until Amount is Zero:** The process continues until the remaining amount becomes zero.
+
+## Coin Change Code in Python
+
+```python
+def coin_change(coins, amount):
+ coins.sort(reverse=True)
+ num_coins = 0
+ for coin in coins:
+ num_coins += amount // coin
+ amount %= coin
+ if amount == 0:
+ return num_coins
+ else:
+ return -1
+
+coins = [1, 5, 10, 25]
+amount = 63
+result = coin_change(coins, amount)
+if result != -1:
+ print(f"Minimum number of coins required: {result}.")
+else:
+ print("It is not possible to make the amount with the given denominations.")
+```
+
+## Complexity Analysis
+- **Time Complexity**: O(n log n) for sorting (if not pre-sorted), O(n) for iteration
+- **Space Complexity**: O(1)
+
+
+
+
+
+# 2. Activity Selection Problem
+
+The activity selection problem involves selecting the maximum number of mutually compatible activities that can be performed by a single person or machine, assuming that a person can only work on one activity at a time.
+
+**Algorithm Overview:**
+- **Greedy Strategy:** Sort the activities based on their finish times.
+- **Selecting Activities:** Iterate through the sorted activities, selecting each activity if it doesn't conflict with the previously selected ones.
+
+## Activity Selection Code in Python
+
+```python
+def activity_selection(start, finish):
+ n = len(start)
+ activities = []
+ i = 0
+ activities.append(i)
+ for j in range(1, n):
+ if start[j] >= finish[i]:
+ activities.append(j)
+ i = j
+ return activities
+
+start = [1, 3, 0, 5, 8, 5]
+finish = [2, 4, 6, 7, 9, 9]
+selected_activities = activity_selection(start, finish)
+print("Selected activities:", selected_activities)
+```
+
+## Complexity Analysis
+- **Time Complexity**: O(n log n) for sorting (if not pre-sorted), O(n) for iteration
+- **Space Complexity**: O(1)
+
+
+
+
+
+# 3. Huffman Coding
+
+Huffman coding is a method of lossless data compression that efficiently represents characters or symbols in a file. It uses variable-length codes to represent characters, with shorter codes assigned to more frequent characters.
+
+**Algorithm Overview:**
+- **Frequency Analysis:** Determine the frequency of each character in the input data.
+- **Building the Huffman Tree:** Construct a binary tree where each leaf node represents a character and the path to the leaf node determines its code.
+- **Assigning Codes:** Traverse the Huffman tree to assign codes to each character, with shorter codes for more frequent characters.
+
+## Huffman Coding Code in Python
+
+```python
+from heapq import heappush, heappop, heapify
+from collections import defaultdict
+
+def huffman_coding(data):
+ frequency = defaultdict(int)
+ for char in data:
+ frequency[char] += 1
+
+ heap = [[weight, [symbol, ""]] for symbol, weight in frequency.items()]
+ heapify(heap)
+
+ while len(heap) > 1:
+ lo = heappop(heap)
+ hi = heappop(heap)
+ for pair in lo[1:]:
+ pair[1] = '0' + pair[1]
+ for pair in hi[1:]:
+ pair[1] = '1' + pair[1]
+ heappush(heap, [lo[0] + hi[0]] + lo[1:] + hi[1:])
+
+ return sorted(heappop(heap)[1:], key=lambda p: (len(p[-1]), p))
+
+data = "Huffman coding is a greedy algorithm"
+encoded_data = huffman_coding(data)
+print("Huffman Codes:")
+for symbol, code in encoded_data:
+ print(f"{symbol}: {code}")
+```
+
+## Complexity Analysis
+- **Time Complexity**: O(n log n) for heap operations, where n is the number of unique characters
+- **Space Complexity**: O(n) for the heap
+
+
+
+
diff --git a/contrib/ds-algorithms/recursion.md b/contrib/ds-algorithms/recursion.md
new file mode 100644
index 0000000..7ab3136
--- /dev/null
+++ b/contrib/ds-algorithms/recursion.md
@@ -0,0 +1,107 @@
+# Introduction to Recursions
+
+When a function calls itself to solve smaller instances of the same problem until a specified condition is fulfilled is called recursion. It is used for tasks that can be divided into smaller sub-tasks.
+
+# How Recursion Works
+
+To solve a problem using recursion we must define:
+- Base condition :- The condition under which recursion ends.
+- Recursive case :- The part of function which calls itself to solve a smaller instance of problem.
+
+Steps of Recursion
+
+When a recursive function is called, the following sequence of events occurs:
+- Function Call: The function is invoked with a specific argument.
+- Base Condition Check: The function checks if the argument satisfies the base case.
+- Recursive Call: If the base case is not met, the function performs some operations and makes a recursive call with a modified argument.
+- Stack Management: Each recursive call is placed on the call stack. The stack keeps track of each function call, its argument, and the point to return to once the call completes.
+- Unwinding the Stack: When the base case is eventually met, the function returns a value, and the stack starts unwinding, returning values to previous function calls until the initial call is resolved.
+
+# What is Stack Overflow in Recursion
+
+Stack overflow is an error that occurs when the call stack memory limit is exceeded. During execution of recursion calls they are simultaneously stored in a recursion stack waiting for the recursive function to be completed. Without a base case, the function would call itself indefinitely, leading to a stack overflow.
+
+# Example
+
+- Factorial of a Number
+
+ The factorial of i natural numbers is nth integer multiplied by factorial of (i-1) numbers. The base case is if i=0 we return 1 as factorial of 0 is 1.
+
+```python
+def factorial(i):
+ #base case
+ if i==0 :
+ return 1
+ #recursive case
+ else :
+ return i * factorial(i-1)
+i = 6
+print("Factorial of i is :", factorial(i)) # Output- Factorial of i is :720
+```
+# What is Backtracking
+
+Backtracking is a recursive algorithmic technique used to solve problems by exploring all possible solutions and discarding those that do not meet the problem's constraints. It is particularly useful for problems involving combinations, permutations, and finding paths in a grid.
+
+# How Backtracking Works
+
+- Incremental Solution Building: Solutions are built one step at a time.
+- Feasibility Check: At each step, a check is made to see if the current partial solution is valid.
+- Backtracking: If a partial solution is found to be invalid, the algorithm backtracks by removing the last added part of the solution and trying the next possibility.
+- Exploration of All Possibilities: The process continues recursively, exploring all possible paths, until a solution is found or all possibilities are exhausted.
+
+# Example
+
+- Word Search
+
+ Given a 2D grid of characters and a word, determine if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cells, where "adjacent" cells are horizontally or vertically neighboring. The same letter cell may not be used more than once.
+
+Algorithm for Solving the Word Search Problem with Backtracking:
+- Start at each cell: Attempt to find the word starting from each cell.
+- Check all Directions: From each cell, try all four possible directions (up, down, left, right).
+- Mark Visited Cells: Use a temporary marker to indicate cells that are part of the current path to avoid revisiting.
+- Backtrack: If a path does not lead to a solution, backtrack by unmarking the visited cell and trying the next possibility.
+
+```python
+def exist(board, word):
+ rows, cols = len(board), len(board[0])
+
+ def backtrack(r, c, suffix):
+ if not suffix:
+ return True
+
+ if r < 0 or r >= rows or c < 0 or c >= cols or board[r][c] != suffix[0]:
+ return False
+
+ # Mark the cell as visited by replacing its character with a placeholder
+ ret = False
+ board[r][c], temp = '#', board[r][c]
+
+ # Explore the four possible directions
+ for row_offset, col_offset in [(0, 1), (1, 0), (0, -1), (-1, 0)]:
+ ret = backtrack(r + row_offset, c + col_offset, suffix[1:])
+ if ret:
+ break
+
+ # Restore the cell's original value
+ board[r][c] = temp
+ return ret
+
+ for row in range(rows):
+ for col in range(cols):
+ if backtrack(row, col, word):
+ return True
+
+ return False
+
+# Test case
+board = [
+ ['A','B','C','E'],
+ ['S','F','C','S'],
+ ['A','D','E','E']
+]
+word = "ABCES"
+print(exist(board, word)) # Output: True
+```
+
+
+
diff --git a/contrib/ds-algorithms/searching-algorithms.md b/contrib/ds-algorithms/searching-algorithms.md
new file mode 100644
index 0000000..78b86d1
--- /dev/null
+++ b/contrib/ds-algorithms/searching-algorithms.md
@@ -0,0 +1,161 @@
+# Searching Algorithms
+
+Searching algorithms are techniques used to locate specific items within a collection of data. These algorithms are fundamental in computer science and are employed in various applications, from databases to web search engines.
+
+## Real Life Example of Searching
+- Searching for a word in a dictionary
+- Searching for a specific book in a library
+- Searching for a contact in your phone's address book
+- Searching for a file on your computer, etc.
+
+# Some common searching techniques
+
+# 1. Linear Search
+
+Linear search, also known as sequential search, is a straightforward searching algorithm that checks each element in a collection until the target element is found or the entire collection has been traversed. It is simple to implement but becomes inefficient for large datasets.
+
+**Algorithm Overview:**
+- **Sequential Checking:** The algorithm iterates through each element in the collection, starting from the first element.
+- **Comparing Elements:** At each iteration, it compares the current element with the target element.
+- **Finding the Target:** If the current element matches the target, the search terminates, and the index of the element is returned.
+- **Completing the Search:** If the entire collection is traversed without finding the target, the algorithm indicates that the element is not present.
+
+## Linear Search Code in Python
+
+```python
+def linear_search(arr, target):
+ for i in range(len(arr)):
+ if arr[i] == target:
+ return i
+ return -1
+
+arr = [5, 3, 8, 1, 2]
+target = 8
+result = linear_search(arr, target)
+if result != -1:
+ print(f"Element {target} found at index {result}.")
+else:
+ print(f"Element {target} not found.")
+```
+
+## Complexity Analysis
+- **Time Complexity**: O(n)
+- **Space Complexity**: O(1)
+
+
+
+
+
+# 2. Binary Search
+
+Binary search is an efficient searching algorithm that works on sorted collections. It repeatedly divides the search interval in half until the target element is found or the interval is empty. Binary search is significantly faster than linear search but requires the collection to be sorted beforehand.
+
+**Algorithm Overview:**
+- **Initial State:** Binary search starts with the entire collection as the search interval.
+- **Divide and Conquer:** At each step, it calculates the middle element of the current interval and compares it with the target.
+- **Narrowing Down the Interval:** If the middle element is equal to the target, the search terminates successfully. Otherwise, it discards half of the search interval based on the comparison result.
+- **Repeating the Process:** The algorithm repeats this process on the remaining half of the interval until the target is found or the interval is empty.
+
+## Binary Search Code in Python (Iterative)
+
+```python
+def binary_search(arr, target):
+ low = 0
+ high = len(arr) - 1
+ while low <= high:
+ mid = (low + high) // 2
+ if arr[mid] == target:
+ return mid
+ elif arr[mid] < target:
+ low = mid + 1
+ else:
+ high = mid - 1
+ return -1
+
+arr = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]
+target = 13
+result = binary_search(arr, target)
+if result != -1:
+ print(f"Element {target} found at index {result}.")
+else:
+ print(f"Element {target} not found.")
+```
+
+## Binary Search Code in Python (Recursive)
+
+```python
+def binary_search_recursive(arr, target, low, high):
+ if low <= high:
+ mid = (low + high) // 2
+ if arr[mid] == target:
+ return mid
+ elif arr[mid] < target:
+ return binary_search_recursive(arr, target, mid + 1, high)
+ else:
+ return binary_search_recursive(arr, target, low, mid - 1)
+ else:
+ return -1
+
+arr = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]
+target = 13
+result = binary_search_recursive(arr, target, 0, len(arr) - 1)
+if result != -1:
+ print(f"Element {target} found at index {result}.")
+else:
+ print(f"Element {target} not found.")
+```
+
+## Complexity Analysis
+- **Time Complexity**: O(log n)
+- **Space Complexity**: O(1) (Iterative), O(log n) (Recursive)
+
+
+
+
+
+# 3. Interpolation Search
+
+Interpolation search is an improved version of binary search, especially useful when the elements in the collection are uniformly distributed. Instead of always dividing the search interval in half, interpolation search estimates the position of the target element based on its value and the values of the endpoints of the search interval.
+
+**Algorithm Overview:**
+- **Estimating Position:** Interpolation search calculates an approximate position of the target element within the search interval based on its value and the values of the endpoints.
+- **Refining the Estimate:** It adjusts the estimated position based on whether the target value is likely to be closer to the beginning or end of the search interval.
+- **Updating the Interval:** Using the refined estimate, it narrows down the search interval iteratively until the target is found or the interval becomes empty.
+
+## Interpolation Search Code in Python
+
+```python
+def interpolation_search(arr, target):
+ low = 0
+ high = len(arr) - 1
+ while low <= high and arr[low] <= target <= arr[high]:
+ if low == high:
+ if arr[low] == target:
+ return low
+ return -1
+ pos = low + ((target - arr[low]) * (high - low)) // (arr[high] - arr[low])
+ if arr[pos] == target:
+ return pos
+ elif arr[pos] < target:
+ low = pos + 1
+ else:
+ high = pos - 1
+ return -1
+
+arr = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
+target = 60
+result = interpolation_search(arr, target)
+if result != -1:
+ print(f"Element {target} found at index {result}.")
+else:
+ print(f"Element {target} not found.")
+```
+
+## Complexity Analysis
+- **Time Complexity**: O(log log n) (Average)
+- **Space Complexity**: O(1)
+
+
+
+
+
From 8b11aa5ade20c585a25ff48e34e08af59742d34b Mon Sep 17 00:00:00 2001
From: Eshparsi
Date: Thu, 23 May 2024 07:34:09 +0530
Subject: [PATCH 130/405] .
---
contrib/ds-algorithms/index.md | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/contrib/ds-algorithms/index.md b/contrib/ds-algorithms/index.md
index 347a9d0..706729e 100644
--- a/contrib/ds-algorithms/index.md
+++ b/contrib/ds-algorithms/index.md
@@ -1,5 +1,10 @@
# List of sections
-- [Section title](filename.md)
-- [Sorting Algorithms](sorting-algorithms.md)
+- [Queues in Python](Queues.md)
- [Graphs](graph.md)
+- [Sorting Algorithms](sorting-algorithms.md)
+- [Recursion and Backtracking](recursion.md)
+- [Divide and Conquer Algorithm](divide-and-conquer-algorithm.md)
+- [Searching Algorithms](searching-algorithms.md)
+- [Greedy Algorithms](greedy-algorithms.md)
+- [Dynamic Programming](dynamic-programming.md)
\ No newline at end of file
From b39147fb12bb40ce2652dc03737d60e3ab3ce23d Mon Sep 17 00:00:00 2001
From: Niyonika Gaur <83643952+niyonikagaur@users.noreply.github.com>
Date: Thu, 23 May 2024 09:38:49 +0530
Subject: [PATCH 131/405] Delete Intro_SciPy.md
---
Intro_SciPy.md | 136 -------------------------------------------------
1 file changed, 136 deletions(-)
delete mode 100644 Intro_SciPy.md
diff --git a/Intro_SciPy.md b/Intro_SciPy.md
deleted file mode 100644
index afd8b3a..0000000
--- a/Intro_SciPy.md
+++ /dev/null
@@ -1,136 +0,0 @@
-# Introduction to SciPy
-#### Python has a powerful library known as SciPy that is used for scientific and technical computing. It functions by extending the capabilities of NumPy and providing numerous operations for numerical data. Although the same library, SciPy is divided into distinct sections meant for various scientific computations.
-## Installation of Scipy
-### Install using the command:
-#### C:\Users\Your Name>pip install scipy
- You can also use a Python distribution that already has Scipy installed like Anaconda or Spyder.
-### Importing SciPy
-#### from scipy import constants
-## Key Features of SciPy
-### 1. Numerical Integration
-#### It helps in computing definite or indefinite integrals of functions
-```
-from scipy import integrate
-
-#Define the function to integrate
-def f(x):
- return x**2
-
-#Compute definite integral of f from 0 to 1
-result, error = integrate.quad(f, 0, 1)
-print(result)
-```
-#### Output
-```
-0.33333333333333337
-```
-### 2. Optimization
-#### It can be used to minimize or maximize functions, here is an example of minimizing roots of an equation
-```
-from scipy.optimize import minimize
-
-# Define an objective function to minimize
-def objective(x):
- return x**2 + 10*np.sin(x)
-
-# Minimize the objective function starting from x=0
-result = minimize(objective, x0=0)
-print(result.x)
-```
-#### Output
-```
-array([-1.30644012])
-```
-### 3. Linear Algebra
-#### Solving Linear computations
-```
-from scipy import linalg
-import numpy as np
-
-# Define a square matrix
-A = np.array([[1, 2], [3, 4]])
-
-# Define a vector
-b = np.array([5, 6])
-
-# Solve Ax = b for x
-x = linalg.solve(A, b)
-print(x)
-```
-#### Output
-```
-array([-4. , 4.5])
-```
-### 4. Statistics
-#### Performing statistics functions, like here we'll be distributing the data
-```
-from scipy import stats
-import numpy as np
-
-# Generate random data from a normal distribution
-data = stats.norm.rvs(loc=0, scale=1, size=1000)
-
-# Fit a normal distribution to the data
-mean, std = stats.norm.fit(data)
-```
-### 5. Signal Processing
-#### To process spectral signals, like EEG or MEG
-```
-from scipy import signal
-import numpy as np
-
-# Create a signal (e.g., sine wave)
-t = np.linspace(0, 1, 1000)
-signal = np.sin(2 * np.pi * 5 * t) + 0.5 * np.random.randn(1000)
-
-# Apply a low-pass Butterworth filter
-b, a = signal.butter(4, 0.1, 'low')
-filtered_signal = signal.filtfilt(b, a, signal)
-```
-The various filters applied that are applied here, are a part of signal analysis at a deeper level.
-### 6. Sparse Matrix
-#### The word ' sparse 'means less, i.e., the data is mostly unused during some operation or analysis. So, to handle this data, a Sparse Matrix is created
-#### There are two types of Sparse Matrices:
-##### 1. CSC: Compressed Sparse Column, it is used for efficient math functions and for column slicing
-##### 2. CSR: Compressed Sparse Row, it is used for fast row slicing
-#### In CSC format
-```
-from scipy import sparse
-import numpy as np
-
-data = np.array([[0, 0], [0, 1], [2, 0]])
-
-row_indices = np.array([1, 2, 1])
-col_indices = np.array([1, 0, 2])
-values = np.array([1, 2, 1])
-
-sparse_matrix_csc = sparse.csc_matrix((values, (row_indices, col_indices)))
-```
-#### In CSR format
-```
-from scipy import sparse
-import numpy as np
-
-data = np.array([[0, 0], [0, 1], [2, 0]])
-sparse_matrix = sparse.csr_matrix(data)
-```
-### 7. Image Processing
-#### It is used to process the images, like changing dimensions or properties. For example, when you're doing a project on medical imaging, this library is mainly used.
-```
-from scipy import ndimage
-import matplotlib.pyplot as plt
-
-image = plt.imread('path/to/image.jpg')
-plt.imshow(image)
-plt.show()
-
-# Apply Gaussian blur to the image
-blurred_image = ndimage.gaussian_filter(image, sigma=1)
-plt.imshow(blurred_image)
-plt.show()
-```
-#### The gaussian blur is one of the properties of the ' ndimage ' package in SciPy libraries, it used for better understanding of the image.
-
-
-
-
From f012e8c481de8f98a8a32e822268602bfe93f6b6 Mon Sep 17 00:00:00 2001
From: Labqari
Date: Thu, 23 May 2024 15:38:35 +0530
Subject: [PATCH 132/405] adding flask
---
contrib/advanced-python/index.md | 1 +
...duction-to-flask-a-python-web-framework.md | 440 ++++++++++++++++++
2 files changed, 441 insertions(+)
create mode 100644 contrib/advanced-python/introduction-to-flask-a-python-web-framework.md
diff --git a/contrib/advanced-python/index.md b/contrib/advanced-python/index.md
index 5ea5081..027f989 100644
--- a/contrib/advanced-python/index.md
+++ b/contrib/advanced-python/index.md
@@ -1,3 +1,4 @@
# List of sections
- [Decorators/\*args/**kwargs](decorator-kwargs-args.md)
+- [Decorators/\*args/**kwargs](introduction-to-flask-a-python-web-framework.md)
diff --git a/contrib/advanced-python/introduction-to-flask-a-python-web-framework.md b/contrib/advanced-python/introduction-to-flask-a-python-web-framework.md
new file mode 100644
index 0000000..957f39b
--- /dev/null
+++ b/contrib/advanced-python/introduction-to-flask-a-python-web-framework.md
@@ -0,0 +1,440 @@
+Sure, here's the guide without Markdown formatting:
+
+---
+
+# Introduction to Flask: A Python Web Framework
+
+## Table of Contents
+1. Introduction
+2. Prerequisites
+3. Setting Up Your Environment
+4. Creating Your First Flask Application
+ - Project Structure
+ - Hello World Application
+5. Routing
+6. Templates and Static Files
+ - Jinja2 Templating Engine
+ - Serving Static Files
+7. Working with Forms
+ - Handling Form Data
+8. Database Integration
+ - Setting Up SQLAlchemy
+ - Performing CRUD Operations
+9. Error Handling
+10. Testing Your Application
+11. Deploying Your Flask Application
+ - Using Gunicorn
+ - Deploying to Render
+12. Conclusion
+13. Further Reading and Resources
+
+---
+
+## 1. Introduction
+Flask is a lightweight WSGI web application framework in Python. It is designed with simplicity and flexibility in mind, allowing developers to create web applications with minimal setup. Flask was created by Armin Ronacher as part of the Pocoo project and has gained popularity for its ease of use and extensive documentation.
+
+## 2. Prerequisites
+Before starting with Flask, ensure you have the following:
+- Basic knowledge of Python.
+- Understanding of web development concepts (HTML, CSS, JavaScript).
+- Python installed on your machine (version 3.6 or higher).
+- pip (Python package installer) installed.
+
+## 3. Setting Up Your Environment
+1. **Install Python**: Download and install Python from python.org.
+2. **Create a Virtual Environment**:
+ ```
+ python -m venv venv
+ ```
+3. **Activate the Virtual Environment**:
+ - On Windows:
+ ```
+ venv\Scripts\activate
+ ```
+ - On macOS/Linux:
+ ```
+ source venv/bin/activate
+ ```
+4. **Install Flask**:
+ ```
+ pip install Flask
+ ```
+
+## 4. Creating Your First Flask Application
+### Project Structure
+A typical Flask project structure might look like this:
+```
+my_flask_app/
+ app/
+ __init__.py
+ routes.py
+ templates/
+ static/
+ venv/
+ run.py
+```
+
+### Hello World Application
+1. **Create a Directory for Your Project**:
+ ```
+ mkdir my_flask_app
+ cd my_flask_app
+ ```
+2. **Initialize the Application**:
+ - Create `app/__init__.py`:
+ ```python
+ from flask import Flask
+
+ def create_app():
+ app = Flask(__name__)
+
+ with app.app_context():
+ from . import routes
+ return app
+ ```
+ - Create `run.py`:
+ ```python
+ from app import create_app
+
+ app = create_app()
+
+ if __name__ == "__main__":
+ app.run(debug=True)
+ ```
+ - Create `app/routes.py`:
+ ```python
+ from flask import current_app as app
+
+ @app.route('/')
+ def hello_world():
+ return 'Hello, World!'
+ ```
+
+3. **Run the Application**:
+ ```
+ python run.py
+ ```
+ Navigate to `http://127.0.0.1:5000` in your browser to see "Hello, World!".
+
+## 5. Routing
+In Flask, routes are defined using the `@app.route` decorator. Here's an example of different routes:
+
+```python
+from flask import Flask
+
+app = Flask(__name__)
+
+@app.route('/')
+def home():
+ return 'Home Page'
+
+@app.route('/about')
+def about():
+ return 'About Page'
+
+@app.route('/user/')
+def show_user_profile(username):
+ return f'User: {username}'
+```
+
+- **Explanation**:
+ - The `@app.route('/')` decorator binds the URL `'/'` to the `home` function, which returns 'Home Page'.
+ - The `@app.route('/about')` decorator binds the URL `/about` to the `about` function.
+ - The `@app.route('/user/')` decorator binds the URL `/user/` to the `show_user_profile` function, capturing the part of the URL as the `username` variable.
+
+## 6. Templates and Static Files
+### Jinja2 Templating Engine
+Jinja2 is Flask's templating engine. Templates are HTML files that can include dynamic content.
+
+- **Create a Template**:
+ - `app/templates/index.html`:
+ ```html
+
+
+
+ {{ title }}
+
+
+
{{ heading }}
+
{{ content }}
+
+
+ ```
+
+- **Render the Template**:
+ ```python
+ from flask import Flask, render_template
+
+ app = Flask(__name__)
+
+ @app.route('/')
+ def home():
+ return render_template('index.html', title='Home', heading='Welcome to Flask', content='This is a Flask application.')
+ ```
+
+### Serving Static Files
+Static files like CSS, JavaScript, and images are placed in the `static` directory.
+
+- **Create Static Files**:
+ - `app/static/style.css`:
+ ```css
+ body {
+ font-family: Arial, sans-serif;
+ }
+ ```
+
+- **Include Static Files in Templates**:
+ ```html
+
+
+
+ {{ title }}
+
+
+
+
{{ heading }}
+
{{ content }}
+
+
+ ```
+
+## 7. Working with Forms
+### Handling Form Data
+Forms are used to collect user input. Flask provides utilities to handle form submissions.
+
+- **Create a Form**:
+ - `app/templates/form.html`:
+ ```html
+
+
+
+ Form
+
+
+
+
+
+ ```
+
+- **Handle Form Submission**:
+ ```python
+ from flask import Flask, request, render_template
+
+ app = Flask(__name__)
+
+ @app.route('/form')
+ def form():
+ return render_template('form.html')
+
+ @app.route('/submit', methods=['POST'])
+ def submit():
+ name = request.form['name']
+ return f'Hello, {name}!'
+ ```
+
+- **Explanation**:
+ - The `@app.route('/form')` route renders the form.
+ - The `@app.route('/submit', methods=['POST'])` route handles the form submission and displays the input name.
+
+## 8. Database Integration
+### Setting Up SQLAlchemy
+SQLAlchemy is an ORM that allows you to interact with databases using Python objects.
+
+- **Install SQLAlchemy**:
+ ```
+ pip install flask_sqlalchemy
+ ```
+
+- **Configure SQLAlchemy**:
+ - `app/__init__.py`:
+ ```python
+ from flask import Flask
+ from flask_sqlalchemy import SQLAlchemy
+
+ db = SQLAlchemy()
+
+ def create_app():
+ app = Flask(__name__)
+ app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///site.db'
+ db.init_app(app)
+ return app
+ ```
+
+### Performing CRUD Operations
+Define models and perform CRUD operations.
+
+- **Define a Model**:
+ - `app/models.py`:
+ ```python
+ from app import db
+
+ class User(db.Model):
+ id = db.Column(db.Integer, primary key=True)
+ username = db.Column(db.String(80), unique=True, nullable=False)
+
+ def __repr__(self):
+ return f''
+ ```
+
+- **Create the Database**:
+ ```python
+ from app import create_app, db
+ from app.models import User
+
+ app = create_app()
+ with app.app_context():
+ db.create_all()
+ ```
+
+- **Perform CRUD Operations**:
+ ```python
+ from app import db
+ from app.models import User
+
+ # Create
+ new_user = User(username='new_user')
+ db.session.add(new_user)
+ db.session.commit()
+
+ # Read
+ user = User.query.first()
+
+ # Update
+ user.username = 'updated_user'
+ db.session.commit()
+
+ # Delete
+ db.session.delete(user)
+ db.session.commit()
+ ```
+
+## 9. Error Handling
+Error handling in Flask can be managed by defining error handlers for different HTTP status codes.
+
+- **Define an Error Handler**:
+ ```python
+ from flask import Flask, render_template
+
+ app = Flask(__name__)
+
+ @app.errorhandler(404)
+ def page_not_found(e):
+ return render_template('404.html'), 404
+
+ @app.errorhandler(500)
+ def internal_server_error(e):
+ return render_template('500.html'), 500
+ ```
+
+ - **Create Error Pages**:
+ `app/templates/404.html`:
+
+
+
+
+ Page Not Found
+
+
+
Something went wrong on our end. Please try again later.
+
+
+
+
+## 10. Testing Your Application
+Flask applications can be tested using Python's built-in `unittest` framework.
+
+- **Write a Test Case**:
+ - `tests/test_app.py`:
+ ```python
+ import unittest
+ from app import create_app
+
+ class BasicTestCase(unittest.TestCase):
+ def setUp(self):
+ self.app = create_app()
+ self.app.config['TESTING'] = True
+ self.client = self.app.test_client()
+
+ def test_home(self):
+ response = self.client.get('/')
+ self.assertEqual(response.status_code, 200)
+ self.assertIn(b'Hello, World!', response.data)
+
+ if __name__ == '__main__':
+ unittest.main()
+ ```
+
+ - **Run the Tests**:
+ ```
+ python -m unittest discover -s tests
+ ```
+
+## 11. Deploying Your Flask Application
+### Using Gunicorn
+Gunicorn is a Python WSGI HTTP Server for UNIX. It’s a pre-fork worker model, meaning that it forks multiple worker processes to handle requests.
+
+- **Install Gunicorn**:
+ ```
+ pip install gunicorn
+ ```
+
+- **Run Your Application with Gunicorn**:
+ ```
+ gunicorn -w 4 run:app
+ ```
+
+### Deploying to Render
+Render is a cloud platform for deploying web applications.
+
+- **Create a `requirements.txt` File**:
+ ```
+ Flask
+ gunicorn
+ flask_sqlalchemy
+ ```
+
+- **Create a `render.yaml` File**:
+ ```yaml
+ services:
+ - type: web
+ name: my-flask-app
+ env: python
+ plan: free
+ buildCommand: pip install -r requirements.txt
+ startCommand: gunicorn -w 4 run:app
+ ```
+
+- **Deploy Your Application**:
+ 1. Push your code to a Git repository.
+ 2. Sign in to Render and create a new Web Service.
+ 3. Connect your repository and select the branch to deploy.
+ 4. Render will automatically use the `render.yaml` file to configure and deploy your application.
+
+## 12. Conclusion
+Flask is a powerful and flexible framework for building web applications in Python. It offers simplicity and ease of use, making it a great choice for both beginners and experienced developers. This guide covered the basics of setting up a Flask application, routing, templating, working with forms, integrating databases, error handling, testing, and deployment.
+
+## 13. Further Reading and Resources
+- Flask Documentation: https://flask.palletsprojects.com/en/latest/
+- Jinja2 Documentation: https://jinja.palletsprojects.com/en/latest/
+- SQLAlchemy Documentation: https://docs.sqlalchemy.org/en/latest/
+- Render Documentation: https://render.com/docs
\ No newline at end of file
From 0a2ca67628da43f74aa1dda7278b11fbadc4a2ac Mon Sep 17 00:00:00 2001
From: Lingamuneni Santhosh Siddhardha
<103999924+Santhosh-Siddhardha@users.noreply.github.com>
Date: Thu, 23 May 2024 23:07:21 +0530
Subject: [PATCH 133/405] Create saving_numpy_arrays_to_files.md
Added introduction
Added save method
---
contrib/numpy/saving_numpy_arrays_to_files.md | 40 +++++++++++++++++++
1 file changed, 40 insertions(+)
create mode 100644 contrib/numpy/saving_numpy_arrays_to_files.md
diff --git a/contrib/numpy/saving_numpy_arrays_to_files.md b/contrib/numpy/saving_numpy_arrays_to_files.md
new file mode 100644
index 0000000..8856a0c
--- /dev/null
+++ b/contrib/numpy/saving_numpy_arrays_to_files.md
@@ -0,0 +1,40 @@
+# Saving NumPy Arrays to Files
+
+- Saving arrays in NumPy is important due to its efficiency in storage and speed, maintaining data integrity and precision, and offering convenience and interoperability.
+- NumPy provides several methods to save arrays efficiently, either in binary or text formats.
+- The primary methods are `save`, `savez`, and `savetxt`.
+
+### 1. numpy.save():
+
+The `np.save` function saves a single NumPy array to a binary file with a `.npy` extension. This format is efficient and preserves the array's data type and shape.
+
+#### Syntax :
+
+ ```python
+ numpy.save(file, arr, allow_pickle=True, fix_imports=True)
+ ```
+- **file** : Name of the file.
+- **arr** : Array to be saved.
+- **allow_pickle** : This is an Optional parameter, Allows saving object arrays using Python pickles.(By Default True)
+- **fix_imports** : This is an Optional parameter, Fixes issues for Python 2 to Python 3 compatibility.(By Default True)
+
+#### Example :
+
+```python
+import numpy as np
+
+arr = np.array([1,2,3,4,5])
+np.save("example.npy",arr) #saves arr into example.npy file in binary format
+```
+
+Inorder to load the array from example.npy
+
+```python
+arr1 = np.load("example.npy")
+print(arr1)
+```
+**Output** :
+
+```python
+[1,2,3,4,5]
+```
From e734ba6a3ef7eb4e6a3fa746be6b2211cf724380 Mon Sep 17 00:00:00 2001
From: Lingamuneni Santhosh Siddhardha
<103999924+Santhosh-Siddhardha@users.noreply.github.com>
Date: Fri, 24 May 2024 01:09:23 +0530
Subject: [PATCH 134/405] Update saving_numpy_arrays_to_files.md
Added savez method
---
contrib/numpy/saving_numpy_arrays_to_files.md | 54 +++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/contrib/numpy/saving_numpy_arrays_to_files.md b/contrib/numpy/saving_numpy_arrays_to_files.md
index 8856a0c..0d45e5d 100644
--- a/contrib/numpy/saving_numpy_arrays_to_files.md
+++ b/contrib/numpy/saving_numpy_arrays_to_files.md
@@ -38,3 +38,57 @@ print(arr1)
```python
[1,2,3,4,5]
```
+### 2. numpy.savez():
+
+The `np.savez` function saves multiple NumPy arrays into a single file with a `.npz` extension. Each array is stored with a unique name.
+
+#### Syntax :
+
+ ```python
+numpy.savez(file, *args, **kwds)
+ ```
+- **file** : Name of the file.
+- **args** : Arrays to be saved.( If arrays are unnamed, they are stored with default names like arr_0, arr_1, etc.)
+- **kwds** : Named arrays to be saved.
+
+#### Example :
+
+```python
+import numpy as np
+
+arr1 = np.array([1,2,3,4,5])
+arr2 = np.array(['a','b','c','d'])
+arr3 = np.array([1.2,3.4,5])
+np.savez('example.npz', a1=arr1, a2=arr2, a3 = arr3) #saves arrays in npz format
+
+```
+
+Inorder to load the array from example.npz
+
+```python
+
+arr = np.load('example.npz')
+print(arr['a1'])
+print(arr['a2'])
+print(arr['a3'])
+
+```
+**Output** :
+```python
+[1 2 3 4 5]
+['a' 'b' 'c' 'd']
+[1.2 3.4 5. ]
+```
+
+### 3. np.savetxt()
+
+The `np.savetxt` function saves a NumPy array to a text file, such as `.txt` or `.csv`. This format is human-readable and can be used for interoperability with other tools.
+
+#### Syntax :
+
+ ```python
+numpy.savetxt(fname, X, fmt='%.18e', delimiter=' ', newline='\n', header='', footer='', comments='# ', encoding=None)
+ ```
+- **fname** : Name of the file.
+- **X** : Array to be saved.
+- **kwds** : Named arrays to be saved.
From f715f2751c58659a254e7a18905e38c89e1558af Mon Sep 17 00:00:00 2001
From: Lingamuneni Santhosh Siddhardha
<103999924+Santhosh-Siddhardha@users.noreply.github.com>
Date: Fri, 24 May 2024 09:06:55 +0530
Subject: [PATCH 135/405] Update saving_numpy_arrays_to_files.md
Added examples
Added savetxt method
---
contrib/numpy/saving_numpy_arrays_to_files.md | 36 +++++++++++++++++--
1 file changed, 34 insertions(+), 2 deletions(-)
diff --git a/contrib/numpy/saving_numpy_arrays_to_files.md b/contrib/numpy/saving_numpy_arrays_to_files.md
index 0d45e5d..c8935b8 100644
--- a/contrib/numpy/saving_numpy_arrays_to_files.md
+++ b/contrib/numpy/saving_numpy_arrays_to_files.md
@@ -87,8 +87,40 @@ The `np.savetxt` function saves a NumPy array to a text file, such as `.txt` or
#### Syntax :
```python
-numpy.savetxt(fname, X, fmt='%.18e', delimiter=' ', newline='\n', header='', footer='', comments='# ', encoding=None)
+numpy.savetxt(fname, X, delimiter=' ', newline='\n', header='', footer='', encoding=None)
```
- **fname** : Name of the file.
- **X** : Array to be saved.
-- **kwds** : Named arrays to be saved.
+- **delimiter** : It is a Optional parameter,This is a character or string that is used to separate columns.(By Default it is " ")
+- **newline** : It is a Optional parameter, Character for seperating lines.(By Default it is "\n")
+- **header** : It is a Optional parameter, String that is written at beginning of the file.
+- **footer** : It is a Optional parameter, String that is written at ending of the file.
+- **encoding** : It is a Optional parameter, Encoding of the output file. (By Default it is None)
+
+#### Example :
+
+```python
+import numpy as np
+
+arr = np.array([1.1,2.2,3,4.4,5])
+np.savetxt("example.txt",arr) #saves the array in example.txt
+
+```
+
+Inorder to load the array from example.txt
+
+```python
+
+arr1 = np.loadtxt("example.txt")
+print(arr1)
+
+```
+**Output** :
+```python
+[1.1 2.2 3. 4.4 5. ]
+```
+
+
+By using these methods, you can efficiently save and load NumPy arrays in various formats suitable for your needs.
+
+
From 1306c8e37ec17ba45166587f781b9036b5e03b2b Mon Sep 17 00:00:00 2001
From: Lingamuneni Santhosh Siddhardha
<103999924+Santhosh-Siddhardha@users.noreply.github.com>
Date: Fri, 24 May 2024 09:19:01 +0530
Subject: [PATCH 136/405] Update index.md
Added saving numpy arrays into files section
---
contrib/numpy/index.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/contrib/numpy/index.md b/contrib/numpy/index.md
index f784798..18ed17a 100644
--- a/contrib/numpy/index.md
+++ b/contrib/numpy/index.md
@@ -6,3 +6,4 @@
- [Basic Mathematics](basic_math.md)
- [Operations on Arrays in NumPy](operations-on-arrays.md)
- [Loading Arrays from Files](loading_arrays_from_files.md)
+- [Saving Numpy Arrays into FIles](saving_numpy_arrays_to_files.md)
From 091a5daeda4ec4afb9d7c90ad249ad27fa0fdcf6 Mon Sep 17 00:00:00 2001
From: Ankit Mahato
Date: Fri, 24 May 2024 21:07:23 +0530
Subject: [PATCH 137/405] Rename Installation_of_Scipy_&_its_key_uses.md to
installation_features.md
---
...lation_of_Scipy_&_its_key_uses.md => installation_features.md} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename contrib/scipy/{Installation_of_Scipy_&_its_key_uses.md => installation_features.md} (100%)
diff --git a/contrib/scipy/Installation_of_Scipy_&_its_key_uses.md b/contrib/scipy/installation_features.md
similarity index 100%
rename from contrib/scipy/Installation_of_Scipy_&_its_key_uses.md
rename to contrib/scipy/installation_features.md
From bcf4df6d7d13627d33a1419178db4f42dca12581 Mon Sep 17 00:00:00 2001
From: Ankit Mahato
Date: Fri, 24 May 2024 21:08:03 +0530
Subject: [PATCH 138/405] Update index.md
---
contrib/scipy/index.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/scipy/index.md b/contrib/scipy/index.md
index abc2fb0..5737114 100644
--- a/contrib/scipy/index.md
+++ b/contrib/scipy/index.md
@@ -1,4 +1,4 @@
# List of sections
-- [Installation of Scipy and its key uses]( Installation_of_Scipy_&_its_key_uses.md)
+- [Installation of Scipy and its key uses](installation_features.md)
From cdb57900d40905a8cb0685bba807e4a6484475d2 Mon Sep 17 00:00:00 2001
From: Krishna Kaushik <131583096+kRiShNa-429407@users.noreply.github.com>
Date: Fri, 24 May 2024 21:11:33 +0530
Subject: [PATCH 139/405] Delete
contrib/pandas/Importing_and_Exporting_Data_in_Pandas.md
---
.../Importing_and_Exporting_Data_in_Pandas.md | 273 ------------------
1 file changed, 273 deletions(-)
delete mode 100644 contrib/pandas/Importing_and_Exporting_Data_in_Pandas.md
diff --git a/contrib/pandas/Importing_and_Exporting_Data_in_Pandas.md b/contrib/pandas/Importing_and_Exporting_Data_in_Pandas.md
deleted file mode 100644
index 4d0ffad..0000000
--- a/contrib/pandas/Importing_and_Exporting_Data_in_Pandas.md
+++ /dev/null
@@ -1,273 +0,0 @@
-# Importing_and_Exporting_Data_in_Pandas
-
->Created by Krishna Kaushik
-
-- **Now we're able to create `Series` and `DataFrames` in pandas, but we usually do not do this , in practice we import the data which is in the form of .csv (Comma Seperated Values) , a spreadsheet file or something similar.**
-
-- *Good news is that pandas allows for easy importing of data like this through functions such as ``pd.read_csv()`` and ``pd.read_excel()`` for Microsoft Excel files.*
-
-## 1. Importing from a Google sheet to a pandas dataframe
-
-*Let's say that you wanted to get the information from Google Sheet document into a pandas DataFrame.*.
-
-*You could export it as a .csv file and then import it using ``pd.read_csv()``.*
-
-*In this case, the exported .csv file is called `Titanic.csv`*
-
-
-```python
-## Importing Titanic Data set
-import pandas as pd
-
-titanic_df= pd.read_csv("https://raw.githubusercontent.com/kRiShNa-429407/learn-python/main/contrib/pandas/Titanic.csv")
-titanic_df
-```
-
-
-
-
-
pclass
-
survived
-
name
-
sex
-
age
-
sibsp
-
parch
-
ticket
-
fare
-
cabin
-
embarked
-
boat
-
body
-
home.dest
-
-
-
-
-
0
-
1
-
1
-
Allen, Miss. Elisabeth Walton
-
female
-
29.00
-
0
-
0
-
24160
-
211.3375
-
B5
-
S
-
2
-
NaN
-
St Louis, MO
-
-
-
1
-
1
-
1
-
Allison, Master. Hudson Trevor
-
male
-
0.92
-
1
-
2
-
113781
-
151.5500
-
C22 C26
-
S
-
11
-
NaN
-
Montreal, PQ / Chesterville, ON
-
-
-
2
-
1
-
0
-
Allison, Miss. Helen Loraine
-
female
-
2.00
-
1
-
2
-
113781
-
151.5500
-
C22 C26
-
S
-
NaN
-
NaN
-
Montreal, PQ / Chesterville, ON
-
-
-
3
-
1
-
0
-
Allison, Mr. Hudson Joshua Creighton
-
male
-
30.00
-
1
-
2
-
113781
-
151.5500
-
C22 C26
-
S
-
NaN
-
135.0
-
Montreal, PQ / Chesterville, ON
-
-
-
4
-
1
-
0
-
Allison, Mrs. Hudson J C (Bessie Waldo Daniels)
-
female
-
25.00
-
1
-
2
-
113781
-
151.5500
-
C22 C26
-
S
-
NaN
-
NaN
-
Montreal, PQ / Chesterville, ON
-
-
-
...
-
...
-
...
-
...
-
...
-
...
-
...
-
...
-
...
-
...
-
...
-
...
-
...
-
...
-
...
-
-
-
1304
-
3
-
0
-
Zabour, Miss. Hileni
-
female
-
14.50
-
1
-
0
-
2665
-
14.4542
-
NaN
-
C
-
NaN
-
328.0
-
NaN
-
-
-
1305
-
3
-
0
-
Zabour, Miss. Thamine
-
female
-
NaN
-
1
-
0
-
2665
-
14.4542
-
NaN
-
C
-
NaN
-
NaN
-
NaN
-
-
-
1306
-
3
-
0
-
Zakarian, Mr. Mapriededer
-
male
-
26.50
-
0
-
0
-
2656
-
7.2250
-
NaN
-
C
-
NaN
-
304.0
-
NaN
-
-
-
1307
-
3
-
0
-
Zakarian, Mr. Ortin
-
male
-
27.00
-
0
-
0
-
2670
-
7.2250
-
NaN
-
C
-
NaN
-
NaN
-
NaN
-
-
-
1308
-
3
-
0
-
Zimmerman, Mr. Leo
-
male
-
29.00
-
0
-
0
-
315082
-
7.8750
-
NaN
-
S
-
NaN
-
NaN
-
NaN
-
-
-
-
1309 rows × 14 columns
-
-
-
-
-The dataset I am using here for your reference is taken from the same repository i.e ``learn-python`` (https://raw.githubusercontent.com/kRiShNa-429407/learn-python/main/contrib/pandas/Titanic.csv) I uploaded it you can use it from there.
-
-**Now we've got the same data from the Google Spreadsheet , but now available as ``pandas DataFrame`` which means we can now apply all pandas functionality over it.**
-
-#### Note: The quiet important thing i am telling is that ``pd.read_csv()`` takes the location of the file (which is in your current working directory) or the hyperlink of the dataset from the other source.
-
-#### But if you want to import the data from Github you can't directly use its link , you have to first convert it to raw by clicking on the raw button present in the repo .
-
-#### Also you can't use the data directly from `Kaggle` you have to use ``kaggle API``
-
-## 2. The Anatomy of DataFrame
-
-**Different functions use different labels for different things, and can get a little confusing.**
-
-- Rows are refer as ``axis=0``
-- columns are refer as ``axis=1``
-
-## 3. Exporting Data
-
-**OK, so after you've made a few changes to your data, you might want to export it and save it so someone else can access the changes.**
-
-**pandas allows you to export ``DataFrame's`` to ``.csv`` format using ``.to_csv()``, or to a spreadsheet format using .to_excel().**
-
-### Exporting a dataframe to a CSV
-
-**We haven't made any changes yet to the ``titanic_df`` DataFrame but let's try to export it.**
-
-
-```python
-#Export the titanic_df DataFrame to csv
-titanic_df.to_csv("exported_titanic.csv")
-```
-
-Running this will save a file called ``exported_titanic.csv`` to the current folder.
From bd52a3a43bf558f158b3bf2880d8212a93ad8a83 Mon Sep 17 00:00:00 2001
From: Krishna Kaushik <131583096+kRiShNa-429407@users.noreply.github.com>
Date: Fri, 24 May 2024 21:12:23 +0530
Subject: [PATCH 140/405] Delete contrib/pandas/Titanic.csv
---
contrib/pandas/Titanic.csv | 1310 ------------------------------------
1 file changed, 1310 deletions(-)
delete mode 100644 contrib/pandas/Titanic.csv
diff --git a/contrib/pandas/Titanic.csv b/contrib/pandas/Titanic.csv
deleted file mode 100644
index f8d49dc..0000000
--- a/contrib/pandas/Titanic.csv
+++ /dev/null
@@ -1,1310 +0,0 @@
-"pclass","survived","name","sex","age","sibsp","parch","ticket","fare","cabin","embarked","boat","body","home.dest"
-1,1,"Allen, Miss. Elisabeth Walton","female",29,0,0,"24160",211.3375,"B5","S","2",,"St Louis, MO"
-1,1,"Allison, Master. Hudson Trevor","male",0.92,1,2,"113781",151.5500,"C22 C26","S","11",,"Montreal, PQ / Chesterville, ON"
-1,0,"Allison, Miss. Helen Loraine","female",2,1,2,"113781",151.5500,"C22 C26","S",,,"Montreal, PQ / Chesterville, ON"
-1,0,"Allison, Mr. Hudson Joshua Creighton","male",30,1,2,"113781",151.5500,"C22 C26","S",,"135","Montreal, PQ / Chesterville, ON"
-1,0,"Allison, Mrs. Hudson J C (Bessie Waldo Daniels)","female",25,1,2,"113781",151.5500,"C22 C26","S",,,"Montreal, PQ / Chesterville, ON"
-1,1,"Anderson, Mr. Harry","male",48,0,0,"19952",26.5500,"E12","S","3",,"New York, NY"
-1,1,"Andrews, Miss. Kornelia Theodosia","female",63,1,0,"13502",77.9583,"D7","S","10",,"Hudson, NY"
-1,0,"Andrews, Mr. Thomas Jr","male",39,0,0,"112050",0.0000,"A36","S",,,"Belfast, NI"
-1,1,"Appleton, Mrs. Edward Dale (Charlotte Lamson)","female",53,2,0,"11769",51.4792,"C101","S","D",,"Bayside, Queens, NY"
-1,0,"Artagaveytia, Mr. Ramon","male",71,0,0,"PC 17609",49.5042,,"C",,"22","Montevideo, Uruguay"
-1,0,"Astor, Col. John Jacob","male",47,1,0,"PC 17757",227.5250,"C62 C64","C",,"124","New York, NY"
-1,1,"Astor, Mrs. John Jacob (Madeleine Talmadge Force)","female",18,1,0,"PC 17757",227.5250,"C62 C64","C","4",,"New York, NY"
-1,1,"Aubart, Mme. Leontine Pauline","female",24,0,0,"PC 17477",69.3000,"B35","C","9",,"Paris, France"
-1,1,"Barber, Miss. Ellen ""Nellie""","female",26,0,0,"19877",78.8500,,"S","6",,
-1,1,"Barkworth, Mr. Algernon Henry Wilson","male",80,0,0,"27042",30.0000,"A23","S","B",,"Hessle, Yorks"
-1,0,"Baumann, Mr. John D","male",,0,0,"PC 17318",25.9250,,"S",,,"New York, NY"
-1,0,"Baxter, Mr. Quigg Edmond","male",24,0,1,"PC 17558",247.5208,"B58 B60","C",,,"Montreal, PQ"
-1,1,"Baxter, Mrs. James (Helene DeLaudeniere Chaput)","female",50,0,1,"PC 17558",247.5208,"B58 B60","C","6",,"Montreal, PQ"
-1,1,"Bazzani, Miss. Albina","female",32,0,0,"11813",76.2917,"D15","C","8",,
-1,0,"Beattie, Mr. Thomson","male",36,0,0,"13050",75.2417,"C6","C","A",,"Winnipeg, MN"
-1,1,"Beckwith, Mr. Richard Leonard","male",37,1,1,"11751",52.5542,"D35","S","5",,"New York, NY"
-1,1,"Beckwith, Mrs. Richard Leonard (Sallie Monypeny)","female",47,1,1,"11751",52.5542,"D35","S","5",,"New York, NY"
-1,1,"Behr, Mr. Karl Howell","male",26,0,0,"111369",30.0000,"C148","C","5",,"New York, NY"
-1,1,"Bidois, Miss. Rosalie","female",42,0,0,"PC 17757",227.5250,,"C","4",,
-1,1,"Bird, Miss. Ellen","female",29,0,0,"PC 17483",221.7792,"C97","S","8",,
-1,0,"Birnbaum, Mr. Jakob","male",25,0,0,"13905",26.0000,,"C",,"148","San Francisco, CA"
-1,1,"Bishop, Mr. Dickinson H","male",25,1,0,"11967",91.0792,"B49","C","7",,"Dowagiac, MI"
-1,1,"Bishop, Mrs. Dickinson H (Helen Walton)","female",19,1,0,"11967",91.0792,"B49","C","7",,"Dowagiac, MI"
-1,1,"Bissette, Miss. Amelia","female",35,0,0,"PC 17760",135.6333,"C99","S","8",,
-1,1,"Bjornstrom-Steffansson, Mr. Mauritz Hakan","male",28,0,0,"110564",26.5500,"C52","S","D",,"Stockholm, Sweden / Washington, DC"
-1,0,"Blackwell, Mr. Stephen Weart","male",45,0,0,"113784",35.5000,"T","S",,,"Trenton, NJ"
-1,1,"Blank, Mr. Henry","male",40,0,0,"112277",31.0000,"A31","C","7",,"Glen Ridge, NJ"
-1,1,"Bonnell, Miss. Caroline","female",30,0,0,"36928",164.8667,"C7","S","8",,"Youngstown, OH"
-1,1,"Bonnell, Miss. Elizabeth","female",58,0,0,"113783",26.5500,"C103","S","8",,"Birkdale, England Cleveland, Ohio"
-1,0,"Borebank, Mr. John James","male",42,0,0,"110489",26.5500,"D22","S",,,"London / Winnipeg, MB"
-1,1,"Bowen, Miss. Grace Scott","female",45,0,0,"PC 17608",262.3750,,"C","4",,"Cooperstown, NY"
-1,1,"Bowerman, Miss. Elsie Edith","female",22,0,1,"113505",55.0000,"E33","S","6",,"St Leonards-on-Sea, England Ohio"
-1,1,"Bradley, Mr. George (""George Arthur Brayton"")","male",,0,0,"111427",26.5500,,"S","9",,"Los Angeles, CA"
-1,0,"Brady, Mr. John Bertram","male",41,0,0,"113054",30.5000,"A21","S",,,"Pomeroy, WA"
-1,0,"Brandeis, Mr. Emil","male",48,0,0,"PC 17591",50.4958,"B10","C",,"208","Omaha, NE"
-1,0,"Brewe, Dr. Arthur Jackson","male",,0,0,"112379",39.6000,,"C",,,"Philadelphia, PA"
-1,1,"Brown, Mrs. James Joseph (Margaret Tobin)","female",44,0,0,"PC 17610",27.7208,"B4","C","6",,"Denver, CO"
-1,1,"Brown, Mrs. John Murray (Caroline Lane Lamson)","female",59,2,0,"11769",51.4792,"C101","S","D",,"Belmont, MA"
-1,1,"Bucknell, Mrs. William Robert (Emma Eliza Ward)","female",60,0,0,"11813",76.2917,"D15","C","8",,"Philadelphia, PA"
-1,1,"Burns, Miss. Elizabeth Margaret","female",41,0,0,"16966",134.5000,"E40","C","3",,
-1,0,"Butt, Major. Archibald Willingham","male",45,0,0,"113050",26.5500,"B38","S",,,"Washington, DC"
-1,0,"Cairns, Mr. Alexander","male",,0,0,"113798",31.0000,,"S",,,
-1,1,"Calderhead, Mr. Edward Pennington","male",42,0,0,"PC 17476",26.2875,"E24","S","5",,"New York, NY"
-1,1,"Candee, Mrs. Edward (Helen Churchill Hungerford)","female",53,0,0,"PC 17606",27.4458,,"C","6",,"Washington, DC"
-1,1,"Cardeza, Mr. Thomas Drake Martinez","male",36,0,1,"PC 17755",512.3292,"B51 B53 B55","C","3",,"Austria-Hungary / Germantown, Philadelphia, PA"
-1,1,"Cardeza, Mrs. James Warburton Martinez (Charlotte Wardle Drake)","female",58,0,1,"PC 17755",512.3292,"B51 B53 B55","C","3",,"Germantown, Philadelphia, PA"
-1,0,"Carlsson, Mr. Frans Olof","male",33,0,0,"695",5.0000,"B51 B53 B55","S",,,"New York, NY"
-1,0,"Carrau, Mr. Francisco M","male",28,0,0,"113059",47.1000,,"S",,,"Montevideo, Uruguay"
-1,0,"Carrau, Mr. Jose Pedro","male",17,0,0,"113059",47.1000,,"S",,,"Montevideo, Uruguay"
-1,1,"Carter, Master. William Thornton II","male",11,1,2,"113760",120.0000,"B96 B98","S","4",,"Bryn Mawr, PA"
-1,1,"Carter, Miss. Lucile Polk","female",14,1,2,"113760",120.0000,"B96 B98","S","4",,"Bryn Mawr, PA"
-1,1,"Carter, Mr. William Ernest","male",36,1,2,"113760",120.0000,"B96 B98","S","C",,"Bryn Mawr, PA"
-1,1,"Carter, Mrs. William Ernest (Lucile Polk)","female",36,1,2,"113760",120.0000,"B96 B98","S","4",,"Bryn Mawr, PA"
-1,0,"Case, Mr. Howard Brown","male",49,0,0,"19924",26.0000,,"S",,,"Ascot, Berkshire / Rochester, NY"
-1,1,"Cassebeer, Mrs. Henry Arthur Jr (Eleanor Genevieve Fosdick)","female",,0,0,"17770",27.7208,,"C","5",,"New York, NY"
-1,0,"Cavendish, Mr. Tyrell William","male",36,1,0,"19877",78.8500,"C46","S",,"172","Little Onn Hall, Staffs"
-1,1,"Cavendish, Mrs. Tyrell William (Julia Florence Siegel)","female",76,1,0,"19877",78.8500,"C46","S","6",,"Little Onn Hall, Staffs"
-1,0,"Chaffee, Mr. Herbert Fuller","male",46,1,0,"W.E.P. 5734",61.1750,"E31","S",,,"Amenia, ND"
-1,1,"Chaffee, Mrs. Herbert Fuller (Carrie Constance Toogood)","female",47,1,0,"W.E.P. 5734",61.1750,"E31","S","4",,"Amenia, ND"
-1,1,"Chambers, Mr. Norman Campbell","male",27,1,0,"113806",53.1000,"E8","S","5",,"New York, NY / Ithaca, NY"
-1,1,"Chambers, Mrs. Norman Campbell (Bertha Griggs)","female",33,1,0,"113806",53.1000,"E8","S","5",,"New York, NY / Ithaca, NY"
-1,1,"Chaudanson, Miss. Victorine","female",36,0,0,"PC 17608",262.3750,"B61","C","4",,
-1,1,"Cherry, Miss. Gladys","female",30,0,0,"110152",86.5000,"B77","S","8",,"London, England"
-1,1,"Chevre, Mr. Paul Romaine","male",45,0,0,"PC 17594",29.7000,"A9","C","7",,"Paris, France"
-1,1,"Chibnall, Mrs. (Edith Martha Bowerman)","female",,0,1,"113505",55.0000,"E33","S","6",,"St Leonards-on-Sea, England Ohio"
-1,0,"Chisholm, Mr. Roderick Robert Crispin","male",,0,0,"112051",0.0000,,"S",,,"Liverpool, England / Belfast"
-1,0,"Clark, Mr. Walter Miller","male",27,1,0,"13508",136.7792,"C89","C",,,"Los Angeles, CA"
-1,1,"Clark, Mrs. Walter Miller (Virginia McDowell)","female",26,1,0,"13508",136.7792,"C89","C","4",,"Los Angeles, CA"
-1,1,"Cleaver, Miss. Alice","female",22,0,0,"113781",151.5500,,"S","11",,
-1,0,"Clifford, Mr. George Quincy","male",,0,0,"110465",52.0000,"A14","S",,,"Stoughton, MA"
-1,0,"Colley, Mr. Edward Pomeroy","male",47,0,0,"5727",25.5875,"E58","S",,,"Victoria, BC"
-1,1,"Compton, Miss. Sara Rebecca","female",39,1,1,"PC 17756",83.1583,"E49","C","14",,"Lakewood, NJ"
-1,0,"Compton, Mr. Alexander Taylor Jr","male",37,1,1,"PC 17756",83.1583,"E52","C",,,"Lakewood, NJ"
-1,1,"Compton, Mrs. Alexander Taylor (Mary Eliza Ingersoll)","female",64,0,2,"PC 17756",83.1583,"E45","C","14",,"Lakewood, NJ"
-1,1,"Cornell, Mrs. Robert Clifford (Malvina Helen Lamson)","female",55,2,0,"11770",25.7000,"C101","S","2",,"New York, NY"
-1,0,"Crafton, Mr. John Bertram","male",,0,0,"113791",26.5500,,"S",,,"Roachdale, IN"
-1,0,"Crosby, Capt. Edward Gifford","male",70,1,1,"WE/P 5735",71.0000,"B22","S",,"269","Milwaukee, WI"
-1,1,"Crosby, Miss. Harriet R","female",36,0,2,"WE/P 5735",71.0000,"B22","S","7",,"Milwaukee, WI"
-1,1,"Crosby, Mrs. Edward Gifford (Catherine Elizabeth Halstead)","female",64,1,1,"112901",26.5500,"B26","S","7",,"Milwaukee, WI"
-1,0,"Cumings, Mr. John Bradley","male",39,1,0,"PC 17599",71.2833,"C85","C",,,"New York, NY"
-1,1,"Cumings, Mrs. John Bradley (Florence Briggs Thayer)","female",38,1,0,"PC 17599",71.2833,"C85","C","4",,"New York, NY"
-1,1,"Daly, Mr. Peter Denis ","male",51,0,0,"113055",26.5500,"E17","S","5 9",,"Lima, Peru"
-1,1,"Daniel, Mr. Robert Williams","male",27,0,0,"113804",30.5000,,"S","3",,"Philadelphia, PA"
-1,1,"Daniels, Miss. Sarah","female",33,0,0,"113781",151.5500,,"S","8",,
-1,0,"Davidson, Mr. Thornton","male",31,1,0,"F.C. 12750",52.0000,"B71","S",,,"Montreal, PQ"
-1,1,"Davidson, Mrs. Thornton (Orian Hays)","female",27,1,2,"F.C. 12750",52.0000,"B71","S","3",,"Montreal, PQ"
-1,1,"Dick, Mr. Albert Adrian","male",31,1,0,"17474",57.0000,"B20","S","3",,"Calgary, AB"
-1,1,"Dick, Mrs. Albert Adrian (Vera Gillespie)","female",17,1,0,"17474",57.0000,"B20","S","3",,"Calgary, AB"
-1,1,"Dodge, Dr. Washington","male",53,1,1,"33638",81.8583,"A34","S","13",,"San Francisco, CA"
-1,1,"Dodge, Master. Washington","male",4,0,2,"33638",81.8583,"A34","S","5",,"San Francisco, CA"
-1,1,"Dodge, Mrs. Washington (Ruth Vidaver)","female",54,1,1,"33638",81.8583,"A34","S","5",,"San Francisco, CA"
-1,0,"Douglas, Mr. Walter Donald","male",50,1,0,"PC 17761",106.4250,"C86","C",,"62","Deephaven, MN / Cedar Rapids, IA"
-1,1,"Douglas, Mrs. Frederick Charles (Mary Helene Baxter)","female",27,1,1,"PC 17558",247.5208,"B58 B60","C","6",,"Montreal, PQ"
-1,1,"Douglas, Mrs. Walter Donald (Mahala Dutton)","female",48,1,0,"PC 17761",106.4250,"C86","C","2",,"Deephaven, MN / Cedar Rapids, IA"
-1,1,"Duff Gordon, Lady. (Lucille Christiana Sutherland) (""Mrs Morgan"")","female",48,1,0,"11755",39.6000,"A16","C","1",,"London / Paris"
-1,1,"Duff Gordon, Sir. Cosmo Edmund (""Mr Morgan"")","male",49,1,0,"PC 17485",56.9292,"A20","C","1",,"London / Paris"
-1,0,"Dulles, Mr. William Crothers","male",39,0,0,"PC 17580",29.7000,"A18","C",,"133","Philadelphia, PA"
-1,1,"Earnshaw, Mrs. Boulton (Olive Potter)","female",23,0,1,"11767",83.1583,"C54","C","7",,"Mt Airy, Philadelphia, PA"
-1,1,"Endres, Miss. Caroline Louise","female",38,0,0,"PC 17757",227.5250,"C45","C","4",,"New York, NY"
-1,1,"Eustis, Miss. Elizabeth Mussey","female",54,1,0,"36947",78.2667,"D20","C","4",,"Brookline, MA"
-1,0,"Evans, Miss. Edith Corse","female",36,0,0,"PC 17531",31.6792,"A29","C",,,"New York, NY"
-1,0,"Farthing, Mr. John","male",,0,0,"PC 17483",221.7792,"C95","S",,,
-1,1,"Flegenheim, Mrs. Alfred (Antoinette)","female",,0,0,"PC 17598",31.6833,,"S","7",,"New York, NY"
-1,1,"Fleming, Miss. Margaret","female",,0,0,"17421",110.8833,,"C","4",,
-1,1,"Flynn, Mr. John Irwin (""Irving"")","male",36,0,0,"PC 17474",26.3875,"E25","S","5",,"Brooklyn, NY"
-1,0,"Foreman, Mr. Benjamin Laventall","male",30,0,0,"113051",27.7500,"C111","C",,,"New York, NY"
-1,1,"Fortune, Miss. Alice Elizabeth","female",24,3,2,"19950",263.0000,"C23 C25 C27","S","10",,"Winnipeg, MB"
-1,1,"Fortune, Miss. Ethel Flora","female",28,3,2,"19950",263.0000,"C23 C25 C27","S","10",,"Winnipeg, MB"
-1,1,"Fortune, Miss. Mabel Helen","female",23,3,2,"19950",263.0000,"C23 C25 C27","S","10",,"Winnipeg, MB"
-1,0,"Fortune, Mr. Charles Alexander","male",19,3,2,"19950",263.0000,"C23 C25 C27","S",,,"Winnipeg, MB"
-1,0,"Fortune, Mr. Mark","male",64,1,4,"19950",263.0000,"C23 C25 C27","S",,,"Winnipeg, MB"
-1,1,"Fortune, Mrs. Mark (Mary McDougald)","female",60,1,4,"19950",263.0000,"C23 C25 C27","S","10",,"Winnipeg, MB"
-1,1,"Francatelli, Miss. Laura Mabel","female",30,0,0,"PC 17485",56.9292,"E36","C","1",,
-1,0,"Franklin, Mr. Thomas Parham","male",,0,0,"113778",26.5500,"D34","S",,,"Westcliff-on-Sea, Essex"
-1,1,"Frauenthal, Dr. Henry William","male",50,2,0,"PC 17611",133.6500,,"S","5",,"New York, NY"
-1,1,"Frauenthal, Mr. Isaac Gerald","male",43,1,0,"17765",27.7208,"D40","C","5",,"New York, NY"
-1,1,"Frauenthal, Mrs. Henry William (Clara Heinsheimer)","female",,1,0,"PC 17611",133.6500,,"S","5",,"New York, NY"
-1,1,"Frolicher, Miss. Hedwig Margaritha","female",22,0,2,"13568",49.5000,"B39","C","5",,"Zurich, Switzerland"
-1,1,"Frolicher-Stehli, Mr. Maxmillian","male",60,1,1,"13567",79.2000,"B41","C","5",,"Zurich, Switzerland"
-1,1,"Frolicher-Stehli, Mrs. Maxmillian (Margaretha Emerentia Stehli)","female",48,1,1,"13567",79.2000,"B41","C","5",,"Zurich, Switzerland"
-1,0,"Fry, Mr. Richard","male",,0,0,"112058",0.0000,"B102","S",,,
-1,0,"Futrelle, Mr. Jacques Heath","male",37,1,0,"113803",53.1000,"C123","S",,,"Scituate, MA"
-1,1,"Futrelle, Mrs. Jacques Heath (Lily May Peel)","female",35,1,0,"113803",53.1000,"C123","S","D",,"Scituate, MA"
-1,0,"Gee, Mr. Arthur H","male",47,0,0,"111320",38.5000,"E63","S",,"275","St Anne's-on-Sea, Lancashire"
-1,1,"Geiger, Miss. Amalie","female",35,0,0,"113503",211.5000,"C130","C","4",,
-1,1,"Gibson, Miss. Dorothy Winifred","female",22,0,1,"112378",59.4000,,"C","7",,"New York, NY"
-1,1,"Gibson, Mrs. Leonard (Pauline C Boeson)","female",45,0,1,"112378",59.4000,,"C","7",,"New York, NY"
-1,0,"Giglio, Mr. Victor","male",24,0,0,"PC 17593",79.2000,"B86","C",,,
-1,1,"Goldenberg, Mr. Samuel L","male",49,1,0,"17453",89.1042,"C92","C","5",,"Paris, France / New York, NY"
-1,1,"Goldenberg, Mrs. Samuel L (Edwiga Grabowska)","female",,1,0,"17453",89.1042,"C92","C","5",,"Paris, France / New York, NY"
-1,0,"Goldschmidt, Mr. George B","male",71,0,0,"PC 17754",34.6542,"A5","C",,,"New York, NY"
-1,1,"Gracie, Col. Archibald IV","male",53,0,0,"113780",28.5000,"C51","C","B",,"Washington, DC"
-1,1,"Graham, Miss. Margaret Edith","female",19,0,0,"112053",30.0000,"B42","S","3",,"Greenwich, CT"
-1,0,"Graham, Mr. George Edward","male",38,0,1,"PC 17582",153.4625,"C91","S",,"147","Winnipeg, MB"
-1,1,"Graham, Mrs. William Thompson (Edith Junkins)","female",58,0,1,"PC 17582",153.4625,"C125","S","3",,"Greenwich, CT"
-1,1,"Greenfield, Mr. William Bertram","male",23,0,1,"PC 17759",63.3583,"D10 D12","C","7",,"New York, NY"
-1,1,"Greenfield, Mrs. Leo David (Blanche Strouse)","female",45,0,1,"PC 17759",63.3583,"D10 D12","C","7",,"New York, NY"
-1,0,"Guggenheim, Mr. Benjamin","male",46,0,0,"PC 17593",79.2000,"B82 B84","C",,,"New York, NY"
-1,1,"Harder, Mr. George Achilles","male",25,1,0,"11765",55.4417,"E50","C","5",,"Brooklyn, NY"
-1,1,"Harder, Mrs. George Achilles (Dorothy Annan)","female",25,1,0,"11765",55.4417,"E50","C","5",,"Brooklyn, NY"
-1,1,"Harper, Mr. Henry Sleeper","male",48,1,0,"PC 17572",76.7292,"D33","C","3",,"New York, NY"
-1,1,"Harper, Mrs. Henry Sleeper (Myna Haxtun)","female",49,1,0,"PC 17572",76.7292,"D33","C","3",,"New York, NY"
-1,0,"Harrington, Mr. Charles H","male",,0,0,"113796",42.4000,,"S",,,
-1,0,"Harris, Mr. Henry Birkhardt","male",45,1,0,"36973",83.4750,"C83","S",,,"New York, NY"
-1,1,"Harris, Mrs. Henry Birkhardt (Irene Wallach)","female",35,1,0,"36973",83.4750,"C83","S","D",,"New York, NY"
-1,0,"Harrison, Mr. William","male",40,0,0,"112059",0.0000,"B94","S",,"110",
-1,1,"Hassab, Mr. Hammad","male",27,0,0,"PC 17572",76.7292,"D49","C","3",,
-1,1,"Hawksford, Mr. Walter James","male",,0,0,"16988",30.0000,"D45","S","3",,"Kingston, Surrey"
-1,1,"Hays, Miss. Margaret Bechstein","female",24,0,0,"11767",83.1583,"C54","C","7",,"New York, NY"
-1,0,"Hays, Mr. Charles Melville","male",55,1,1,"12749",93.5000,"B69","S",,"307","Montreal, PQ"
-1,1,"Hays, Mrs. Charles Melville (Clara Jennings Gregg)","female",52,1,1,"12749",93.5000,"B69","S","3",,"Montreal, PQ"
-1,0,"Head, Mr. Christopher","male",42,0,0,"113038",42.5000,"B11","S",,,"London / Middlesex"
-1,0,"Hilliard, Mr. Herbert Henry","male",,0,0,"17463",51.8625,"E46","S",,,"Brighton, MA"
-1,0,"Hipkins, Mr. William Edward","male",55,0,0,"680",50.0000,"C39","S",,,"London / Birmingham"
-1,1,"Hippach, Miss. Jean Gertrude","female",16,0,1,"111361",57.9792,"B18","C","4",,"Chicago, IL"
-1,1,"Hippach, Mrs. Louis Albert (Ida Sophia Fischer)","female",44,0,1,"111361",57.9792,"B18","C","4",,"Chicago, IL"
-1,1,"Hogeboom, Mrs. John C (Anna Andrews)","female",51,1,0,"13502",77.9583,"D11","S","10",,"Hudson, NY"
-1,0,"Holverson, Mr. Alexander Oskar","male",42,1,0,"113789",52.0000,,"S",,"38","New York, NY"
-1,1,"Holverson, Mrs. Alexander Oskar (Mary Aline Towner)","female",35,1,0,"113789",52.0000,,"S","8",,"New York, NY"
-1,1,"Homer, Mr. Harry (""Mr E Haven"")","male",35,0,0,"111426",26.5500,,"C","15",,"Indianapolis, IN"
-1,1,"Hoyt, Mr. Frederick Maxfield","male",38,1,0,"19943",90.0000,"C93","S","D",,"New York, NY / Stamford CT"
-1,0,"Hoyt, Mr. William Fisher","male",,0,0,"PC 17600",30.6958,,"C","14",,"New York, NY"
-1,1,"Hoyt, Mrs. Frederick Maxfield (Jane Anne Forby)","female",35,1,0,"19943",90.0000,"C93","S","D",,"New York, NY / Stamford CT"
-1,1,"Icard, Miss. Amelie","female",38,0,0,"113572",80.0000,"B28",,"6",,
-1,0,"Isham, Miss. Ann Elizabeth","female",50,0,0,"PC 17595",28.7125,"C49","C",,,"Paris, France New York, NY"
-1,1,"Ismay, Mr. Joseph Bruce","male",49,0,0,"112058",0.0000,"B52 B54 B56","S","C",,"Liverpool"
-1,0,"Jones, Mr. Charles Cresson","male",46,0,0,"694",26.0000,,"S",,"80","Bennington, VT"
-1,0,"Julian, Mr. Henry Forbes","male",50,0,0,"113044",26.0000,"E60","S",,,"London"
-1,0,"Keeping, Mr. Edwin","male",32.5,0,0,"113503",211.5000,"C132","C",,"45",
-1,0,"Kent, Mr. Edward Austin","male",58,0,0,"11771",29.7000,"B37","C",,"258","Buffalo, NY"
-1,0,"Kenyon, Mr. Frederick R","male",41,1,0,"17464",51.8625,"D21","S",,,"Southington / Noank, CT"
-1,1,"Kenyon, Mrs. Frederick R (Marion)","female",,1,0,"17464",51.8625,"D21","S","8",,"Southington / Noank, CT"
-1,1,"Kimball, Mr. Edwin Nelson Jr","male",42,1,0,"11753",52.5542,"D19","S","5",,"Boston, MA"
-1,1,"Kimball, Mrs. Edwin Nelson Jr (Gertrude Parsons)","female",45,1,0,"11753",52.5542,"D19","S","5",,"Boston, MA"
-1,0,"Klaber, Mr. Herman","male",,0,0,"113028",26.5500,"C124","S",,,"Portland, OR"
-1,1,"Kreuchen, Miss. Emilie","female",39,0,0,"24160",211.3375,,"S","2",,
-1,1,"Leader, Dr. Alice (Farnham)","female",49,0,0,"17465",25.9292,"D17","S","8",,"New York, NY"
-1,1,"LeRoy, Miss. Bertha","female",30,0,0,"PC 17761",106.4250,,"C","2",,
-1,1,"Lesurer, Mr. Gustave J","male",35,0,0,"PC 17755",512.3292,"B101","C","3",,
-1,0,"Lewy, Mr. Ervin G","male",,0,0,"PC 17612",27.7208,,"C",,,"Chicago, IL"
-1,0,"Lindeberg-Lind, Mr. Erik Gustaf (""Mr Edward Lingrey"")","male",42,0,0,"17475",26.5500,,"S",,,"Stockholm, Sweden"
-1,1,"Lindstrom, Mrs. Carl Johan (Sigrid Posse)","female",55,0,0,"112377",27.7208,,"C","6",,"Stockholm, Sweden"
-1,1,"Lines, Miss. Mary Conover","female",16,0,1,"PC 17592",39.4000,"D28","S","9",,"Paris, France"
-1,1,"Lines, Mrs. Ernest H (Elizabeth Lindsey James)","female",51,0,1,"PC 17592",39.4000,"D28","S","9",,"Paris, France"
-1,0,"Long, Mr. Milton Clyde","male",29,0,0,"113501",30.0000,"D6","S",,"126","Springfield, MA"
-1,1,"Longley, Miss. Gretchen Fiske","female",21,0,0,"13502",77.9583,"D9","S","10",,"Hudson, NY"
-1,0,"Loring, Mr. Joseph Holland","male",30,0,0,"113801",45.5000,,"S",,,"London / New York, NY"
-1,1,"Lurette, Miss. Elise","female",58,0,0,"PC 17569",146.5208,"B80","C",,,
-1,1,"Madill, Miss. Georgette Alexandra","female",15,0,1,"24160",211.3375,"B5","S","2",,"St Louis, MO"
-1,0,"Maguire, Mr. John Edward","male",30,0,0,"110469",26.0000,"C106","S",,,"Brockton, MA"
-1,1,"Maioni, Miss. Roberta","female",16,0,0,"110152",86.5000,"B79","S","8",,
-1,1,"Marechal, Mr. Pierre","male",,0,0,"11774",29.7000,"C47","C","7",,"Paris, France"
-1,0,"Marvin, Mr. Daniel Warner","male",19,1,0,"113773",53.1000,"D30","S",,,"New York, NY"
-1,1,"Marvin, Mrs. Daniel Warner (Mary Graham Carmichael Farquarson)","female",18,1,0,"113773",53.1000,"D30","S","10",,"New York, NY"
-1,1,"Mayne, Mlle. Berthe Antonine (""Mrs de Villiers"")","female",24,0,0,"PC 17482",49.5042,"C90","C","6",,"Belgium Montreal, PQ"
-1,0,"McCaffry, Mr. Thomas Francis","male",46,0,0,"13050",75.2417,"C6","C",,"292","Vancouver, BC"
-1,0,"McCarthy, Mr. Timothy J","male",54,0,0,"17463",51.8625,"E46","S",,"175","Dorchester, MA"
-1,1,"McGough, Mr. James Robert","male",36,0,0,"PC 17473",26.2875,"E25","S","7",,"Philadelphia, PA"
-1,0,"Meyer, Mr. Edgar Joseph","male",28,1,0,"PC 17604",82.1708,,"C",,,"New York, NY"
-1,1,"Meyer, Mrs. Edgar Joseph (Leila Saks)","female",,1,0,"PC 17604",82.1708,,"C","6",,"New York, NY"
-1,0,"Millet, Mr. Francis Davis","male",65,0,0,"13509",26.5500,"E38","S",,"249","East Bridgewater, MA"
-1,0,"Minahan, Dr. William Edward","male",44,2,0,"19928",90.0000,"C78","Q",,"230","Fond du Lac, WI"
-1,1,"Minahan, Miss. Daisy E","female",33,1,0,"19928",90.0000,"C78","Q","14",,"Green Bay, WI"
-1,1,"Minahan, Mrs. William Edward (Lillian E Thorpe)","female",37,1,0,"19928",90.0000,"C78","Q","14",,"Fond du Lac, WI"
-1,1,"Mock, Mr. Philipp Edmund","male",30,1,0,"13236",57.7500,"C78","C","11",,"New York, NY"
-1,0,"Molson, Mr. Harry Markland","male",55,0,0,"113787",30.5000,"C30","S",,,"Montreal, PQ"
-1,0,"Moore, Mr. Clarence Bloomfield","male",47,0,0,"113796",42.4000,,"S",,,"Washington, DC"
-1,0,"Natsch, Mr. Charles H","male",37,0,1,"PC 17596",29.7000,"C118","C",,,"Brooklyn, NY"
-1,1,"Newell, Miss. Madeleine","female",31,1,0,"35273",113.2750,"D36","C","6",,"Lexington, MA"
-1,1,"Newell, Miss. Marjorie","female",23,1,0,"35273",113.2750,"D36","C","6",,"Lexington, MA"
-1,0,"Newell, Mr. Arthur Webster","male",58,0,2,"35273",113.2750,"D48","C",,"122","Lexington, MA"
-1,1,"Newsom, Miss. Helen Monypeny","female",19,0,2,"11752",26.2833,"D47","S","5",,"New York, NY"
-1,0,"Nicholson, Mr. Arthur Ernest","male",64,0,0,"693",26.0000,,"S",,"263","Isle of Wight, England"
-1,1,"Oliva y Ocana, Dona. Fermina","female",39,0,0,"PC 17758",108.9000,"C105","C","8",,
-1,1,"Omont, Mr. Alfred Fernand","male",,0,0,"F.C. 12998",25.7417,,"C","7",,"Paris, France"
-1,1,"Ostby, Miss. Helene Ragnhild","female",22,0,1,"113509",61.9792,"B36","C","5",,"Providence, RI"
-1,0,"Ostby, Mr. Engelhart Cornelius","male",65,0,1,"113509",61.9792,"B30","C",,"234","Providence, RI"
-1,0,"Ovies y Rodriguez, Mr. Servando","male",28.5,0,0,"PC 17562",27.7208,"D43","C",,"189","?Havana, Cuba"
-1,0,"Parr, Mr. William Henry Marsh","male",,0,0,"112052",0.0000,,"S",,,"Belfast"
-1,0,"Partner, Mr. Austen","male",45.5,0,0,"113043",28.5000,"C124","S",,"166","Surbiton Hill, Surrey"
-1,0,"Payne, Mr. Vivian Ponsonby","male",23,0,0,"12749",93.5000,"B24","S",,,"Montreal, PQ"
-1,0,"Pears, Mr. Thomas Clinton","male",29,1,0,"113776",66.6000,"C2","S",,,"Isleworth, England"
-1,1,"Pears, Mrs. Thomas (Edith Wearne)","female",22,1,0,"113776",66.6000,"C2","S","8",,"Isleworth, England"
-1,0,"Penasco y Castellana, Mr. Victor de Satode","male",18,1,0,"PC 17758",108.9000,"C65","C",,,"Madrid, Spain"
-1,1,"Penasco y Castellana, Mrs. Victor de Satode (Maria Josefa Perez de Soto y Vallejo)","female",17,1,0,"PC 17758",108.9000,"C65","C","8",,"Madrid, Spain"
-1,1,"Perreault, Miss. Anne","female",30,0,0,"12749",93.5000,"B73","S","3",,
-1,1,"Peuchen, Major. Arthur Godfrey","male",52,0,0,"113786",30.5000,"C104","S","6",,"Toronto, ON"
-1,0,"Porter, Mr. Walter Chamberlain","male",47,0,0,"110465",52.0000,"C110","S",,"207","Worcester, MA"
-1,1,"Potter, Mrs. Thomas Jr (Lily Alexenia Wilson)","female",56,0,1,"11767",83.1583,"C50","C","7",,"Mt Airy, Philadelphia, PA"
-1,0,"Reuchlin, Jonkheer. John George","male",38,0,0,"19972",0.0000,,"S",,,"Rotterdam, Netherlands"
-1,1,"Rheims, Mr. George Alexander Lucien","male",,0,0,"PC 17607",39.6000,,"S","A",,"Paris / New York, NY"
-1,0,"Ringhini, Mr. Sante","male",22,0,0,"PC 17760",135.6333,,"C",,"232",
-1,0,"Robbins, Mr. Victor","male",,0,0,"PC 17757",227.5250,,"C",,,
-1,1,"Robert, Mrs. Edward Scott (Elisabeth Walton McMillan)","female",43,0,1,"24160",211.3375,"B3","S","2",,"St Louis, MO"
-1,0,"Roebling, Mr. Washington Augustus II","male",31,0,0,"PC 17590",50.4958,"A24","S",,,"Trenton, NJ"
-1,1,"Romaine, Mr. Charles Hallace (""Mr C Rolmane"")","male",45,0,0,"111428",26.5500,,"S","9",,"New York, NY"
-1,0,"Rood, Mr. Hugh Roscoe","male",,0,0,"113767",50.0000,"A32","S",,,"Seattle, WA"
-1,1,"Rosenbaum, Miss. Edith Louise","female",33,0,0,"PC 17613",27.7208,"A11","C","11",,"Paris, France"
-1,0,"Rosenshine, Mr. George (""Mr George Thorne"")","male",46,0,0,"PC 17585",79.2000,,"C",,"16","New York, NY"
-1,0,"Ross, Mr. John Hugo","male",36,0,0,"13049",40.1250,"A10","C",,,"Winnipeg, MB"
-1,1,"Rothes, the Countess. of (Lucy Noel Martha Dyer-Edwards)","female",33,0,0,"110152",86.5000,"B77","S","8",,"London Vancouver, BC"
-1,0,"Rothschild, Mr. Martin","male",55,1,0,"PC 17603",59.4000,,"C",,,"New York, NY"
-1,1,"Rothschild, Mrs. Martin (Elizabeth L. Barrett)","female",54,1,0,"PC 17603",59.4000,,"C","6",,"New York, NY"
-1,0,"Rowe, Mr. Alfred G","male",33,0,0,"113790",26.5500,,"S",,"109","London"
-1,1,"Ryerson, Master. John Borie","male",13,2,2,"PC 17608",262.3750,"B57 B59 B63 B66","C","4",,"Haverford, PA / Cooperstown, NY"
-1,1,"Ryerson, Miss. Emily Borie","female",18,2,2,"PC 17608",262.3750,"B57 B59 B63 B66","C","4",,"Haverford, PA / Cooperstown, NY"
-1,1,"Ryerson, Miss. Susan Parker ""Suzette""","female",21,2,2,"PC 17608",262.3750,"B57 B59 B63 B66","C","4",,"Haverford, PA / Cooperstown, NY"
-1,0,"Ryerson, Mr. Arthur Larned","male",61,1,3,"PC 17608",262.3750,"B57 B59 B63 B66","C",,,"Haverford, PA / Cooperstown, NY"
-1,1,"Ryerson, Mrs. Arthur Larned (Emily Maria Borie)","female",48,1,3,"PC 17608",262.3750,"B57 B59 B63 B66","C","4",,"Haverford, PA / Cooperstown, NY"
-1,1,"Saalfeld, Mr. Adolphe","male",,0,0,"19988",30.5000,"C106","S","3",,"Manchester, England"
-1,1,"Sagesser, Mlle. Emma","female",24,0,0,"PC 17477",69.3000,"B35","C","9",,
-1,1,"Salomon, Mr. Abraham L","male",,0,0,"111163",26.0000,,"S","1",,"New York, NY"
-1,1,"Schabert, Mrs. Paul (Emma Mock)","female",35,1,0,"13236",57.7500,"C28","C","11",,"New York, NY"
-1,1,"Serepeca, Miss. Augusta","female",30,0,0,"113798",31.0000,,"C","4",,
-1,1,"Seward, Mr. Frederic Kimber","male",34,0,0,"113794",26.5500,,"S","7",,"New York, NY"
-1,1,"Shutes, Miss. Elizabeth W","female",40,0,0,"PC 17582",153.4625,"C125","S","3",,"New York, NY / Greenwich CT"
-1,1,"Silverthorne, Mr. Spencer Victor","male",35,0,0,"PC 17475",26.2875,"E24","S","5",,"St Louis, MO"
-1,0,"Silvey, Mr. William Baird","male",50,1,0,"13507",55.9000,"E44","S",,,"Duluth, MN"
-1,1,"Silvey, Mrs. William Baird (Alice Munger)","female",39,1,0,"13507",55.9000,"E44","S","11",,"Duluth, MN"
-1,1,"Simonius-Blumer, Col. Oberst Alfons","male",56,0,0,"13213",35.5000,"A26","C","3",,"Basel, Switzerland"
-1,1,"Sloper, Mr. William Thompson","male",28,0,0,"113788",35.5000,"A6","S","7",,"New Britain, CT"
-1,0,"Smart, Mr. John Montgomery","male",56,0,0,"113792",26.5500,,"S",,,"New York, NY"
-1,0,"Smith, Mr. James Clinch","male",56,0,0,"17764",30.6958,"A7","C",,,"St James, Long Island, NY"
-1,0,"Smith, Mr. Lucien Philip","male",24,1,0,"13695",60.0000,"C31","S",,,"Huntington, WV"
-1,0,"Smith, Mr. Richard William","male",,0,0,"113056",26.0000,"A19","S",,,"Streatham, Surrey"
-1,1,"Smith, Mrs. Lucien Philip (Mary Eloise Hughes)","female",18,1,0,"13695",60.0000,"C31","S","6",,"Huntington, WV"
-1,1,"Snyder, Mr. John Pillsbury","male",24,1,0,"21228",82.2667,"B45","S","7",,"Minneapolis, MN"
-1,1,"Snyder, Mrs. John Pillsbury (Nelle Stevenson)","female",23,1,0,"21228",82.2667,"B45","S","7",,"Minneapolis, MN"
-1,1,"Spedden, Master. Robert Douglas","male",6,0,2,"16966",134.5000,"E34","C","3",,"Tuxedo Park, NY"
-1,1,"Spedden, Mr. Frederic Oakley","male",45,1,1,"16966",134.5000,"E34","C","3",,"Tuxedo Park, NY"
-1,1,"Spedden, Mrs. Frederic Oakley (Margaretta Corning Stone)","female",40,1,1,"16966",134.5000,"E34","C","3",,"Tuxedo Park, NY"
-1,0,"Spencer, Mr. William Augustus","male",57,1,0,"PC 17569",146.5208,"B78","C",,,"Paris, France"
-1,1,"Spencer, Mrs. William Augustus (Marie Eugenie)","female",,1,0,"PC 17569",146.5208,"B78","C","6",,"Paris, France"
-1,1,"Stahelin-Maeglin, Dr. Max","male",32,0,0,"13214",30.5000,"B50","C","3",,"Basel, Switzerland"
-1,0,"Stead, Mr. William Thomas","male",62,0,0,"113514",26.5500,"C87","S",,,"Wimbledon Park, London / Hayling Island, Hants"
-1,1,"Stengel, Mr. Charles Emil Henry","male",54,1,0,"11778",55.4417,"C116","C","1",,"Newark, NJ"
-1,1,"Stengel, Mrs. Charles Emil Henry (Annie May Morris)","female",43,1,0,"11778",55.4417,"C116","C","5",,"Newark, NJ"
-1,1,"Stephenson, Mrs. Walter Bertram (Martha Eustis)","female",52,1,0,"36947",78.2667,"D20","C","4",,"Haverford, PA"
-1,0,"Stewart, Mr. Albert A","male",,0,0,"PC 17605",27.7208,,"C",,,"Gallipolis, Ohio / ? Paris / New York"
-1,1,"Stone, Mrs. George Nelson (Martha Evelyn)","female",62,0,0,"113572",80.0000,"B28",,"6",,"Cincinatti, OH"
-1,0,"Straus, Mr. Isidor","male",67,1,0,"PC 17483",221.7792,"C55 C57","S",,"96","New York, NY"
-1,0,"Straus, Mrs. Isidor (Rosalie Ida Blun)","female",63,1,0,"PC 17483",221.7792,"C55 C57","S",,,"New York, NY"
-1,0,"Sutton, Mr. Frederick","male",61,0,0,"36963",32.3208,"D50","S",,"46","Haddenfield, NJ"
-1,1,"Swift, Mrs. Frederick Joel (Margaret Welles Barron)","female",48,0,0,"17466",25.9292,"D17","S","8",,"Brooklyn, NY"
-1,1,"Taussig, Miss. Ruth","female",18,0,2,"110413",79.6500,"E68","S","8",,"New York, NY"
-1,0,"Taussig, Mr. Emil","male",52,1,1,"110413",79.6500,"E67","S",,,"New York, NY"
-1,1,"Taussig, Mrs. Emil (Tillie Mandelbaum)","female",39,1,1,"110413",79.6500,"E67","S","8",,"New York, NY"
-1,1,"Taylor, Mr. Elmer Zebley","male",48,1,0,"19996",52.0000,"C126","S","5 7",,"London / East Orange, NJ"
-1,1,"Taylor, Mrs. Elmer Zebley (Juliet Cummins Wright)","female",,1,0,"19996",52.0000,"C126","S","5 7",,"London / East Orange, NJ"
-1,0,"Thayer, Mr. John Borland","male",49,1,1,"17421",110.8833,"C68","C",,,"Haverford, PA"
-1,1,"Thayer, Mr. John Borland Jr","male",17,0,2,"17421",110.8833,"C70","C","B",,"Haverford, PA"
-1,1,"Thayer, Mrs. John Borland (Marian Longstreth Morris)","female",39,1,1,"17421",110.8833,"C68","C","4",,"Haverford, PA"
-1,1,"Thorne, Mrs. Gertrude Maybelle","female",,0,0,"PC 17585",79.2000,,"C","D",,"New York, NY"
-1,1,"Tucker, Mr. Gilbert Milligan Jr","male",31,0,0,"2543",28.5375,"C53","C","7",,"Albany, NY"
-1,0,"Uruchurtu, Don. Manuel E","male",40,0,0,"PC 17601",27.7208,,"C",,,"Mexico City, Mexico"
-1,0,"Van der hoef, Mr. Wyckoff","male",61,0,0,"111240",33.5000,"B19","S",,"245","Brooklyn, NY"
-1,0,"Walker, Mr. William Anderson","male",47,0,0,"36967",34.0208,"D46","S",,,"East Orange, NJ"
-1,1,"Ward, Miss. Anna","female",35,0,0,"PC 17755",512.3292,,"C","3",,
-1,0,"Warren, Mr. Frank Manley","male",64,1,0,"110813",75.2500,"D37","C",,,"Portland, OR"
-1,1,"Warren, Mrs. Frank Manley (Anna Sophia Atkinson)","female",60,1,0,"110813",75.2500,"D37","C","5",,"Portland, OR"
-1,0,"Weir, Col. John","male",60,0,0,"113800",26.5500,,"S",,,"England Salt Lake City, Utah"
-1,0,"White, Mr. Percival Wayland","male",54,0,1,"35281",77.2875,"D26","S",,,"Brunswick, ME"
-1,0,"White, Mr. Richard Frasar","male",21,0,1,"35281",77.2875,"D26","S",,"169","Brunswick, ME"
-1,1,"White, Mrs. John Stuart (Ella Holmes)","female",55,0,0,"PC 17760",135.6333,"C32","C","8",,"New York, NY / Briarcliff Manor NY"
-1,1,"Wick, Miss. Mary Natalie","female",31,0,2,"36928",164.8667,"C7","S","8",,"Youngstown, OH"
-1,0,"Wick, Mr. George Dennick","male",57,1,1,"36928",164.8667,,"S",,,"Youngstown, OH"
-1,1,"Wick, Mrs. George Dennick (Mary Hitchcock)","female",45,1,1,"36928",164.8667,,"S","8",,"Youngstown, OH"
-1,0,"Widener, Mr. George Dunton","male",50,1,1,"113503",211.5000,"C80","C",,,"Elkins Park, PA"
-1,0,"Widener, Mr. Harry Elkins","male",27,0,2,"113503",211.5000,"C82","C",,,"Elkins Park, PA"
-1,1,"Widener, Mrs. George Dunton (Eleanor Elkins)","female",50,1,1,"113503",211.5000,"C80","C","4",,"Elkins Park, PA"
-1,1,"Willard, Miss. Constance","female",21,0,0,"113795",26.5500,,"S","8 10",,"Duluth, MN"
-1,0,"Williams, Mr. Charles Duane","male",51,0,1,"PC 17597",61.3792,,"C",,,"Geneva, Switzerland / Radnor, PA"
-1,1,"Williams, Mr. Richard Norris II","male",21,0,1,"PC 17597",61.3792,,"C","A",,"Geneva, Switzerland / Radnor, PA"
-1,0,"Williams-Lambert, Mr. Fletcher Fellows","male",,0,0,"113510",35.0000,"C128","S",,,"London, England"
-1,1,"Wilson, Miss. Helen Alice","female",31,0,0,"16966",134.5000,"E39 E41","C","3",,
-1,1,"Woolner, Mr. Hugh","male",,0,0,"19947",35.5000,"C52","S","D",,"London, England"
-1,0,"Wright, Mr. George","male",62,0,0,"113807",26.5500,,"S",,,"Halifax, NS"
-1,1,"Young, Miss. Marie Grice","female",36,0,0,"PC 17760",135.6333,"C32","C","8",,"New York, NY / Washington, DC"
-2,0,"Abelson, Mr. Samuel","male",30,1,0,"P/PP 3381",24.0000,,"C",,,"Russia New York, NY"
-2,1,"Abelson, Mrs. Samuel (Hannah Wizosky)","female",28,1,0,"P/PP 3381",24.0000,,"C","10",,"Russia New York, NY"
-2,0,"Aldworth, Mr. Charles Augustus","male",30,0,0,"248744",13.0000,,"S",,,"Bryn Mawr, PA, USA"
-2,0,"Andrew, Mr. Edgardo Samuel","male",18,0,0,"231945",11.5000,,"S",,,"Buenos Aires, Argentina / New Jersey, NJ"
-2,0,"Andrew, Mr. Frank Thomas","male",25,0,0,"C.A. 34050",10.5000,,"S",,,"Cornwall, England Houghton, MI"
-2,0,"Angle, Mr. William A","male",34,1,0,"226875",26.0000,,"S",,,"Warwick, England"
-2,1,"Angle, Mrs. William A (Florence ""Mary"" Agnes Hughes)","female",36,1,0,"226875",26.0000,,"S","11",,"Warwick, England"
-2,0,"Ashby, Mr. John","male",57,0,0,"244346",13.0000,,"S",,,"West Hoboken, NJ"
-2,0,"Bailey, Mr. Percy Andrew","male",18,0,0,"29108",11.5000,,"S",,,"Penzance, Cornwall / Akron, OH"
-2,0,"Baimbrigge, Mr. Charles Robert","male",23,0,0,"C.A. 31030",10.5000,,"S",,,"Guernsey"
-2,1,"Ball, Mrs. (Ada E Hall)","female",36,0,0,"28551",13.0000,"D","S","10",,"Bristol, Avon / Jacksonville, FL"
-2,0,"Banfield, Mr. Frederick James","male",28,0,0,"C.A./SOTON 34068",10.5000,,"S",,,"Plymouth, Dorset / Houghton, MI"
-2,0,"Bateman, Rev. Robert James","male",51,0,0,"S.O.P. 1166",12.5250,,"S",,"174","Jacksonville, FL"
-2,1,"Beane, Mr. Edward","male",32,1,0,"2908",26.0000,,"S","13",,"Norwich / New York, NY"
-2,1,"Beane, Mrs. Edward (Ethel Clarke)","female",19,1,0,"2908",26.0000,,"S","13",,"Norwich / New York, NY"
-2,0,"Beauchamp, Mr. Henry James","male",28,0,0,"244358",26.0000,,"S",,,"England"
-2,1,"Becker, Master. Richard F","male",1,2,1,"230136",39.0000,"F4","S","11",,"Guntur, India / Benton Harbour, MI"
-2,1,"Becker, Miss. Marion Louise","female",4,2,1,"230136",39.0000,"F4","S","11",,"Guntur, India / Benton Harbour, MI"
-2,1,"Becker, Miss. Ruth Elizabeth","female",12,2,1,"230136",39.0000,"F4","S","13",,"Guntur, India / Benton Harbour, MI"
-2,1,"Becker, Mrs. Allen Oliver (Nellie E Baumgardner)","female",36,0,3,"230136",39.0000,"F4","S","11",,"Guntur, India / Benton Harbour, MI"
-2,1,"Beesley, Mr. Lawrence","male",34,0,0,"248698",13.0000,"D56","S","13",,"London"
-2,1,"Bentham, Miss. Lilian W","female",19,0,0,"28404",13.0000,,"S","12",,"Rochester, NY"
-2,0,"Berriman, Mr. William John","male",23,0,0,"28425",13.0000,,"S",,,"St Ives, Cornwall / Calumet, MI"
-2,0,"Botsford, Mr. William Hull","male",26,0,0,"237670",13.0000,,"S",,,"Elmira, NY / Orange, NJ"
-2,0,"Bowenur, Mr. Solomon","male",42,0,0,"211535",13.0000,,"S",,,"London"
-2,0,"Bracken, Mr. James H","male",27,0,0,"220367",13.0000,,"S",,,"Lake Arthur, Chavez County, NM"
-2,1,"Brown, Miss. Amelia ""Mildred""","female",24,0,0,"248733",13.0000,"F33","S","11",,"London / Montreal, PQ"
-2,1,"Brown, Miss. Edith Eileen","female",15,0,2,"29750",39.0000,,"S","14",,"Cape Town, South Africa / Seattle, WA"
-2,0,"Brown, Mr. Thomas William Solomon","male",60,1,1,"29750",39.0000,,"S",,,"Cape Town, South Africa / Seattle, WA"
-2,1,"Brown, Mrs. Thomas William Solomon (Elizabeth Catherine Ford)","female",40,1,1,"29750",39.0000,,"S","14",,"Cape Town, South Africa / Seattle, WA"
-2,1,"Bryhl, Miss. Dagmar Jenny Ingeborg ","female",20,1,0,"236853",26.0000,,"S","12",,"Skara, Sweden / Rockford, IL"
-2,0,"Bryhl, Mr. Kurt Arnold Gottfrid","male",25,1,0,"236853",26.0000,,"S",,,"Skara, Sweden / Rockford, IL"
-2,1,"Buss, Miss. Kate","female",36,0,0,"27849",13.0000,,"S","9",,"Sittingbourne, England / San Diego, CA"
-2,0,"Butler, Mr. Reginald Fenton","male",25,0,0,"234686",13.0000,,"S",,"97","Southsea, Hants"
-2,0,"Byles, Rev. Thomas Roussel Davids","male",42,0,0,"244310",13.0000,,"S",,,"London"
-2,1,"Bystrom, Mrs. (Karolina)","female",42,0,0,"236852",13.0000,,"S",,,"New York, NY"
-2,1,"Caldwell, Master. Alden Gates","male",0.83,0,2,"248738",29.0000,,"S","13",,"Bangkok, Thailand / Roseville, IL"
-2,1,"Caldwell, Mr. Albert Francis","male",26,1,1,"248738",29.0000,,"S","13",,"Bangkok, Thailand / Roseville, IL"
-2,1,"Caldwell, Mrs. Albert Francis (Sylvia Mae Harbaugh)","female",22,1,1,"248738",29.0000,,"S","13",,"Bangkok, Thailand / Roseville, IL"
-2,1,"Cameron, Miss. Clear Annie","female",35,0,0,"F.C.C. 13528",21.0000,,"S","14",,"Mamaroneck, NY"
-2,0,"Campbell, Mr. William","male",,0,0,"239853",0.0000,,"S",,,"Belfast"
-2,0,"Carbines, Mr. William","male",19,0,0,"28424",13.0000,,"S",,"18","St Ives, Cornwall / Calumet, MI"
-2,0,"Carter, Mrs. Ernest Courtenay (Lilian Hughes)","female",44,1,0,"244252",26.0000,,"S",,,"London"
-2,0,"Carter, Rev. Ernest Courtenay","male",54,1,0,"244252",26.0000,,"S",,,"London"
-2,0,"Chapman, Mr. Charles Henry","male",52,0,0,"248731",13.5000,,"S",,"130","Bronx, NY"
-2,0,"Chapman, Mr. John Henry","male",37,1,0,"SC/AH 29037",26.0000,,"S",,"17","Cornwall / Spokane, WA"
-2,0,"Chapman, Mrs. John Henry (Sara Elizabeth Lawry)","female",29,1,0,"SC/AH 29037",26.0000,,"S",,,"Cornwall / Spokane, WA"
-2,1,"Christy, Miss. Julie Rachel","female",25,1,1,"237789",30.0000,,"S","12",,"London"
-2,1,"Christy, Mrs. (Alice Frances)","female",45,0,2,"237789",30.0000,,"S","12",,"London"
-2,0,"Clarke, Mr. Charles Valentine","male",29,1,0,"2003",26.0000,,"S",,,"England / San Francisco, CA"
-2,1,"Clarke, Mrs. Charles V (Ada Maria Winfield)","female",28,1,0,"2003",26.0000,,"S","14",,"England / San Francisco, CA"
-2,0,"Coleridge, Mr. Reginald Charles","male",29,0,0,"W./C. 14263",10.5000,,"S",,,"Hartford, Huntingdonshire"
-2,0,"Collander, Mr. Erik Gustaf","male",28,0,0,"248740",13.0000,,"S",,,"Helsinki, Finland Ashtabula, Ohio"
-2,1,"Collett, Mr. Sidney C Stuart","male",24,0,0,"28034",10.5000,,"S","9",,"London / Fort Byron, NY"
-2,1,"Collyer, Miss. Marjorie ""Lottie""","female",8,0,2,"C.A. 31921",26.2500,,"S","14",,"Bishopstoke, Hants / Fayette Valley, ID"
-2,0,"Collyer, Mr. Harvey","male",31,1,1,"C.A. 31921",26.2500,,"S",,,"Bishopstoke, Hants / Fayette Valley, ID"
-2,1,"Collyer, Mrs. Harvey (Charlotte Annie Tate)","female",31,1,1,"C.A. 31921",26.2500,,"S","14",,"Bishopstoke, Hants / Fayette Valley, ID"
-2,1,"Cook, Mrs. (Selena Rogers)","female",22,0,0,"W./C. 14266",10.5000,"F33","S","14",,"Pennsylvania"
-2,0,"Corbett, Mrs. Walter H (Irene Colvin)","female",30,0,0,"237249",13.0000,,"S",,,"Provo, UT"
-2,0,"Corey, Mrs. Percy C (Mary Phyllis Elizabeth Miller)","female",,0,0,"F.C.C. 13534",21.0000,,"S",,,"Upper Burma, India Pittsburgh, PA"
-2,0,"Cotterill, Mr. Henry ""Harry""","male",21,0,0,"29107",11.5000,,"S",,,"Penzance, Cornwall / Akron, OH"
-2,0,"Cunningham, Mr. Alfred Fleming","male",,0,0,"239853",0.0000,,"S",,,"Belfast"
-2,1,"Davies, Master. John Morgan Jr","male",8,1,1,"C.A. 33112",36.7500,,"S","14",,"St Ives, Cornwall / Hancock, MI"
-2,0,"Davies, Mr. Charles Henry","male",18,0,0,"S.O.C. 14879",73.5000,,"S",,,"Lyndhurst, England"
-2,1,"Davies, Mrs. John Morgan (Elizabeth Agnes Mary White) ","female",48,0,2,"C.A. 33112",36.7500,,"S","14",,"St Ives, Cornwall / Hancock, MI"
-2,1,"Davis, Miss. Mary","female",28,0,0,"237668",13.0000,,"S","13",,"London / Staten Island, NY"
-2,0,"de Brito, Mr. Jose Joaquim","male",32,0,0,"244360",13.0000,,"S",,,"Portugal / Sau Paulo, Brazil"
-2,0,"Deacon, Mr. Percy William","male",17,0,0,"S.O.C. 14879",73.5000,,"S",,,
-2,0,"del Carlo, Mr. Sebastiano","male",29,1,0,"SC/PARIS 2167",27.7208,,"C",,"295","Lucca, Italy / California"
-2,1,"del Carlo, Mrs. Sebastiano (Argenia Genovesi)","female",24,1,0,"SC/PARIS 2167",27.7208,,"C","12",,"Lucca, Italy / California"
-2,0,"Denbury, Mr. Herbert","male",25,0,0,"C.A. 31029",31.5000,,"S",,,"Guernsey / Elizabeth, NJ"
-2,0,"Dibden, Mr. William","male",18,0,0,"S.O.C. 14879",73.5000,,"S",,,"New Forest, England"
-2,1,"Doling, Miss. Elsie","female",18,0,1,"231919",23.0000,,"S",,,"Southampton"
-2,1,"Doling, Mrs. John T (Ada Julia Bone)","female",34,0,1,"231919",23.0000,,"S",,,"Southampton"
-2,0,"Downton, Mr. William James","male",54,0,0,"28403",26.0000,,"S",,,"Holley, NY"
-2,1,"Drew, Master. Marshall Brines","male",8,0,2,"28220",32.5000,,"S","10",,"Greenport, NY"
-2,0,"Drew, Mr. James Vivian","male",42,1,1,"28220",32.5000,,"S",,,"Greenport, NY"
-2,1,"Drew, Mrs. James Vivian (Lulu Thorne Christian)","female",34,1,1,"28220",32.5000,,"S","10",,"Greenport, NY"
-2,1,"Duran y More, Miss. Asuncion","female",27,1,0,"SC/PARIS 2149",13.8583,,"C","12",,"Barcelona, Spain / Havana, Cuba"
-2,1,"Duran y More, Miss. Florentina","female",30,1,0,"SC/PARIS 2148",13.8583,,"C","12",,"Barcelona, Spain / Havana, Cuba"
-2,0,"Eitemiller, Mr. George Floyd","male",23,0,0,"29751",13.0000,,"S",,,"England / Detroit, MI"
-2,0,"Enander, Mr. Ingvar","male",21,0,0,"236854",13.0000,,"S",,,"Goteborg, Sweden / Rockford, IL"
-2,0,"Fahlstrom, Mr. Arne Jonas","male",18,0,0,"236171",13.0000,,"S",,,"Oslo, Norway Bayonne, NJ"
-2,0,"Faunthorpe, Mr. Harry","male",40,1,0,"2926",26.0000,,"S",,"286","England / Philadelphia, PA"
-2,1,"Faunthorpe, Mrs. Lizzie (Elizabeth Anne Wilkinson)","female",29,1,0,"2926",26.0000,,"S","16",,
-2,0,"Fillbrook, Mr. Joseph Charles","male",18,0,0,"C.A. 15185",10.5000,,"S",,,"Cornwall / Houghton, MI"
-2,0,"Fox, Mr. Stanley Hubert","male",36,0,0,"229236",13.0000,,"S",,"236","Rochester, NY"
-2,0,"Frost, Mr. Anthony Wood ""Archie""","male",,0,0,"239854",0.0000,,"S",,,"Belfast"
-2,0,"Funk, Miss. Annie Clemmer","female",38,0,0,"237671",13.0000,,"S",,,"Janjgir, India / Pennsylvania"
-2,0,"Fynney, Mr. Joseph J","male",35,0,0,"239865",26.0000,,"S",,"322","Liverpool / Montreal, PQ"
-2,0,"Gale, Mr. Harry","male",38,1,0,"28664",21.0000,,"S",,,"Cornwall / Clear Creek, CO"
-2,0,"Gale, Mr. Shadrach","male",34,1,0,"28664",21.0000,,"S",,,"Cornwall / Clear Creek, CO"
-2,1,"Garside, Miss. Ethel","female",34,0,0,"243880",13.0000,,"S","12",,"Brooklyn, NY"
-2,0,"Gaskell, Mr. Alfred","male",16,0,0,"239865",26.0000,,"S",,,"Liverpool / Montreal, PQ"
-2,0,"Gavey, Mr. Lawrence","male",26,0,0,"31028",10.5000,,"S",,,"Guernsey / Elizabeth, NJ"
-2,0,"Gilbert, Mr. William","male",47,0,0,"C.A. 30769",10.5000,,"S",,,"Cornwall"
-2,0,"Giles, Mr. Edgar","male",21,1,0,"28133",11.5000,,"S",,,"Cornwall / Camden, NJ"
-2,0,"Giles, Mr. Frederick Edward","male",21,1,0,"28134",11.5000,,"S",,,"Cornwall / Camden, NJ"
-2,0,"Giles, Mr. Ralph","male",24,0,0,"248726",13.5000,,"S",,"297","West Kensington, London"
-2,0,"Gill, Mr. John William","male",24,0,0,"233866",13.0000,,"S",,"155","Clevedon, England"
-2,0,"Gillespie, Mr. William Henry","male",34,0,0,"12233",13.0000,,"S",,,"Vancouver, BC"
-2,0,"Givard, Mr. Hans Kristensen","male",30,0,0,"250646",13.0000,,"S",,"305",
-2,0,"Greenberg, Mr. Samuel","male",52,0,0,"250647",13.0000,,"S",,"19","Bronx, NY"
-2,0,"Hale, Mr. Reginald","male",30,0,0,"250653",13.0000,,"S",,"75","Auburn, NY"
-2,1,"Hamalainen, Master. Viljo","male",0.67,1,1,"250649",14.5000,,"S","4",,"Detroit, MI"
-2,1,"Hamalainen, Mrs. William (Anna)","female",24,0,2,"250649",14.5000,,"S","4",,"Detroit, MI"
-2,0,"Harbeck, Mr. William H","male",44,0,0,"248746",13.0000,,"S",,"35","Seattle, WA / Toledo, OH"
-2,1,"Harper, Miss. Annie Jessie ""Nina""","female",6,0,1,"248727",33.0000,,"S","11",,"Denmark Hill, Surrey / Chicago"
-2,0,"Harper, Rev. John","male",28,0,1,"248727",33.0000,,"S",,,"Denmark Hill, Surrey / Chicago"
-2,1,"Harris, Mr. George","male",62,0,0,"S.W./PP 752",10.5000,,"S","15",,"London"
-2,0,"Harris, Mr. Walter","male",30,0,0,"W/C 14208",10.5000,,"S",,,"Walthamstow, England"
-2,1,"Hart, Miss. Eva Miriam","female",7,0,2,"F.C.C. 13529",26.2500,,"S","14",,"Ilford, Essex / Winnipeg, MB"
-2,0,"Hart, Mr. Benjamin","male",43,1,1,"F.C.C. 13529",26.2500,,"S",,,"Ilford, Essex / Winnipeg, MB"
-2,1,"Hart, Mrs. Benjamin (Esther Ada Bloomfield)","female",45,1,1,"F.C.C. 13529",26.2500,,"S","14",,"Ilford, Essex / Winnipeg, MB"
-2,1,"Herman, Miss. Alice","female",24,1,2,"220845",65.0000,,"S","9",,"Somerset / Bernardsville, NJ"
-2,1,"Herman, Miss. Kate","female",24,1,2,"220845",65.0000,,"S","9",,"Somerset / Bernardsville, NJ"
-2,0,"Herman, Mr. Samuel","male",49,1,2,"220845",65.0000,,"S",,,"Somerset / Bernardsville, NJ"
-2,1,"Herman, Mrs. Samuel (Jane Laver)","female",48,1,2,"220845",65.0000,,"S","9",,"Somerset / Bernardsville, NJ"
-2,1,"Hewlett, Mrs. (Mary D Kingcome) ","female",55,0,0,"248706",16.0000,,"S","13",,"India / Rapid City, SD"
-2,0,"Hickman, Mr. Leonard Mark","male",24,2,0,"S.O.C. 14879",73.5000,,"S",,,"West Hampstead, London / Neepawa, MB"
-2,0,"Hickman, Mr. Lewis","male",32,2,0,"S.O.C. 14879",73.5000,,"S",,"256","West Hampstead, London / Neepawa, MB"
-2,0,"Hickman, Mr. Stanley George","male",21,2,0,"S.O.C. 14879",73.5000,,"S",,,"West Hampstead, London / Neepawa, MB"
-2,0,"Hiltunen, Miss. Marta","female",18,1,1,"250650",13.0000,,"S",,,"Kontiolahti, Finland / Detroit, MI"
-2,1,"Hocking, Miss. Ellen ""Nellie""","female",20,2,1,"29105",23.0000,,"S","4",,"Cornwall / Akron, OH"
-2,0,"Hocking, Mr. Richard George","male",23,2,1,"29104",11.5000,,"S",,,"Cornwall / Akron, OH"
-2,0,"Hocking, Mr. Samuel James Metcalfe","male",36,0,0,"242963",13.0000,,"S",,,"Devonport, England"
-2,1,"Hocking, Mrs. Elizabeth (Eliza Needs)","female",54,1,3,"29105",23.0000,,"S","4",,"Cornwall / Akron, OH"
-2,0,"Hodges, Mr. Henry Price","male",50,0,0,"250643",13.0000,,"S",,"149","Southampton"
-2,0,"Hold, Mr. Stephen","male",44,1,0,"26707",26.0000,,"S",,,"England / Sacramento, CA"
-2,1,"Hold, Mrs. Stephen (Annie Margaret Hill)","female",29,1,0,"26707",26.0000,,"S","10",,"England / Sacramento, CA"
-2,0,"Hood, Mr. Ambrose Jr","male",21,0,0,"S.O.C. 14879",73.5000,,"S",,,"New Forest, England"
-2,1,"Hosono, Mr. Masabumi","male",42,0,0,"237798",13.0000,,"S","10",,"Tokyo, Japan"
-2,0,"Howard, Mr. Benjamin","male",63,1,0,"24065",26.0000,,"S",,,"Swindon, England"
-2,0,"Howard, Mrs. Benjamin (Ellen Truelove Arman)","female",60,1,0,"24065",26.0000,,"S",,,"Swindon, England"
-2,0,"Hunt, Mr. George Henry","male",33,0,0,"SCO/W 1585",12.2750,,"S",,,"Philadelphia, PA"
-2,1,"Ilett, Miss. Bertha","female",17,0,0,"SO/C 14885",10.5000,,"S",,,"Guernsey"
-2,0,"Jacobsohn, Mr. Sidney Samuel","male",42,1,0,"243847",27.0000,,"S",,,"London"
-2,1,"Jacobsohn, Mrs. Sidney Samuel (Amy Frances Christy)","female",24,2,1,"243847",27.0000,,"S","12",,"London"
-2,0,"Jarvis, Mr. John Denzil","male",47,0,0,"237565",15.0000,,"S",,,"North Evington, England"
-2,0,"Jefferys, Mr. Clifford Thomas","male",24,2,0,"C.A. 31029",31.5000,,"S",,,"Guernsey / Elizabeth, NJ"
-2,0,"Jefferys, Mr. Ernest Wilfred","male",22,2,0,"C.A. 31029",31.5000,,"S",,,"Guernsey / Elizabeth, NJ"
-2,0,"Jenkin, Mr. Stephen Curnow","male",32,0,0,"C.A. 33111",10.5000,,"S",,,"St Ives, Cornwall / Houghton, MI"
-2,1,"Jerwan, Mrs. Amin S (Marie Marthe Thuillard)","female",23,0,0,"SC/AH Basle 541",13.7917,"D","C","11",,"New York, NY"
-2,0,"Kantor, Mr. Sinai","male",34,1,0,"244367",26.0000,,"S",,"283","Moscow / Bronx, NY"
-2,1,"Kantor, Mrs. Sinai (Miriam Sternin)","female",24,1,0,"244367",26.0000,,"S","12",,"Moscow / Bronx, NY"
-2,0,"Karnes, Mrs. J Frank (Claire Bennett)","female",22,0,0,"F.C.C. 13534",21.0000,,"S",,,"India / Pittsburgh, PA"
-2,1,"Keane, Miss. Nora A","female",,0,0,"226593",12.3500,"E101","Q","10",,"Harrisburg, PA"
-2,0,"Keane, Mr. Daniel","male",35,0,0,"233734",12.3500,,"Q",,,
-2,1,"Kelly, Mrs. Florence ""Fannie""","female",45,0,0,"223596",13.5000,,"S","9",,"London / New York, NY"
-2,0,"Kirkland, Rev. Charles Leonard","male",57,0,0,"219533",12.3500,,"Q",,,"Glasgow / Bangor, ME"
-2,0,"Knight, Mr. Robert J","male",,0,0,"239855",0.0000,,"S",,,"Belfast"
-2,0,"Kvillner, Mr. Johan Henrik Johannesson","male",31,0,0,"C.A. 18723",10.5000,,"S",,"165","Sweden / Arlington, NJ"
-2,0,"Lahtinen, Mrs. William (Anna Sylfven)","female",26,1,1,"250651",26.0000,,"S",,,"Minneapolis, MN"
-2,0,"Lahtinen, Rev. William","male",30,1,1,"250651",26.0000,,"S",,,"Minneapolis, MN"
-2,0,"Lamb, Mr. John Joseph","male",,0,0,"240261",10.7083,,"Q",,,
-2,1,"Laroche, Miss. Louise","female",1,1,2,"SC/Paris 2123",41.5792,,"C","14",,"Paris / Haiti"
-2,1,"Laroche, Miss. Simonne Marie Anne Andree","female",3,1,2,"SC/Paris 2123",41.5792,,"C","14",,"Paris / Haiti"
-2,0,"Laroche, Mr. Joseph Philippe Lemercier","male",25,1,2,"SC/Paris 2123",41.5792,,"C",,,"Paris / Haiti"
-2,1,"Laroche, Mrs. Joseph (Juliette Marie Louise Lafargue)","female",22,1,2,"SC/Paris 2123",41.5792,,"C","14",,"Paris / Haiti"
-2,1,"Lehmann, Miss. Bertha","female",17,0,0,"SC 1748",12.0000,,"C","12",,"Berne, Switzerland / Central City, IA"
-2,1,"Leitch, Miss. Jessie Wills","female",,0,0,"248727",33.0000,,"S","11",,"London / Chicago, IL"
-2,1,"Lemore, Mrs. (Amelia Milley)","female",34,0,0,"C.A. 34260",10.5000,"F33","S","14",,"Chicago, IL"
-2,0,"Levy, Mr. Rene Jacques","male",36,0,0,"SC/Paris 2163",12.8750,"D","C",,,"Montreal, PQ"
-2,0,"Leyson, Mr. Robert William Norman","male",24,0,0,"C.A. 29566",10.5000,,"S",,"108",
-2,0,"Lingane, Mr. John","male",61,0,0,"235509",12.3500,,"Q",,,
-2,0,"Louch, Mr. Charles Alexander","male",50,1,0,"SC/AH 3085",26.0000,,"S",,"121","Weston-Super-Mare, Somerset"
-2,1,"Louch, Mrs. Charles Alexander (Alice Adelaide Slow)","female",42,1,0,"SC/AH 3085",26.0000,,"S",,,"Weston-Super-Mare, Somerset"
-2,0,"Mack, Mrs. (Mary)","female",57,0,0,"S.O./P.P. 3",10.5000,"E77","S",,"52","Southampton / New York, NY"
-2,0,"Malachard, Mr. Noel","male",,0,0,"237735",15.0458,"D","C",,,"Paris"
-2,1,"Mallet, Master. Andre","male",1,0,2,"S.C./PARIS 2079",37.0042,,"C","10",,"Paris / Montreal, PQ"
-2,0,"Mallet, Mr. Albert","male",31,1,1,"S.C./PARIS 2079",37.0042,,"C",,,"Paris / Montreal, PQ"
-2,1,"Mallet, Mrs. Albert (Antoinette Magnin)","female",24,1,1,"S.C./PARIS 2079",37.0042,,"C","10",,"Paris / Montreal, PQ"
-2,0,"Mangiavacchi, Mr. Serafino Emilio","male",,0,0,"SC/A.3 2861",15.5792,,"C",,,"New York, NY"
-2,0,"Matthews, Mr. William John","male",30,0,0,"28228",13.0000,,"S",,,"St Austall, Cornwall"
-2,0,"Maybery, Mr. Frank Hubert","male",40,0,0,"239059",16.0000,,"S",,,"Weston-Super-Mare / Moose Jaw, SK"
-2,0,"McCrae, Mr. Arthur Gordon","male",32,0,0,"237216",13.5000,,"S",,"209","Sydney, Australia"
-2,0,"McCrie, Mr. James Matthew","male",30,0,0,"233478",13.0000,,"S",,,"Sarnia, ON"
-2,0,"McKane, Mr. Peter David","male",46,0,0,"28403",26.0000,,"S",,,"Rochester, NY"
-2,1,"Mellinger, Miss. Madeleine Violet","female",13,0,1,"250644",19.5000,,"S","14",,"England / Bennington, VT"
-2,1,"Mellinger, Mrs. (Elizabeth Anne Maidment)","female",41,0,1,"250644",19.5000,,"S","14",,"England / Bennington, VT"
-2,1,"Mellors, Mr. William John","male",19,0,0,"SW/PP 751",10.5000,,"S","B",,"Chelsea, London"
-2,0,"Meyer, Mr. August","male",39,0,0,"248723",13.0000,,"S",,,"Harrow-on-the-Hill, Middlesex"
-2,0,"Milling, Mr. Jacob Christian","male",48,0,0,"234360",13.0000,,"S",,"271","Copenhagen, Denmark"
-2,0,"Mitchell, Mr. Henry Michael","male",70,0,0,"C.A. 24580",10.5000,,"S",,,"Guernsey / Montclair, NJ and/or Toledo, Ohio"
-2,0,"Montvila, Rev. Juozas","male",27,0,0,"211536",13.0000,,"S",,,"Worcester, MA"
-2,0,"Moraweck, Dr. Ernest","male",54,0,0,"29011",14.0000,,"S",,,"Frankfort, KY"
-2,0,"Morley, Mr. Henry Samuel (""Mr Henry Marshall"")","male",39,0,0,"250655",26.0000,,"S",,,
-2,0,"Mudd, Mr. Thomas Charles","male",16,0,0,"S.O./P.P. 3",10.5000,,"S",,,"Halesworth, England"
-2,0,"Myles, Mr. Thomas Francis","male",62,0,0,"240276",9.6875,,"Q",,,"Cambridge, MA"
-2,0,"Nasser, Mr. Nicholas","male",32.5,1,0,"237736",30.0708,,"C",,"43","New York, NY"
-2,1,"Nasser, Mrs. Nicholas (Adele Achem)","female",14,1,0,"237736",30.0708,,"C",,,"New York, NY"
-2,1,"Navratil, Master. Edmond Roger","male",2,1,1,"230080",26.0000,"F2","S","D",,"Nice, France"
-2,1,"Navratil, Master. Michel M","male",3,1,1,"230080",26.0000,"F2","S","D",,"Nice, France"
-2,0,"Navratil, Mr. Michel (""Louis M Hoffman"")","male",36.5,0,2,"230080",26.0000,"F2","S",,"15","Nice, France"
-2,0,"Nesson, Mr. Israel","male",26,0,0,"244368",13.0000,"F2","S",,,"Boston, MA"
-2,0,"Nicholls, Mr. Joseph Charles","male",19,1,1,"C.A. 33112",36.7500,,"S",,"101","Cornwall / Hancock, MI"
-2,0,"Norman, Mr. Robert Douglas","male",28,0,0,"218629",13.5000,,"S",,"287","Glasgow"
-2,1,"Nourney, Mr. Alfred (""Baron von Drachstedt"")","male",20,0,0,"SC/PARIS 2166",13.8625,"D38","C","7",,"Cologne, Germany"
-2,1,"Nye, Mrs. (Elizabeth Ramell)","female",29,0,0,"C.A. 29395",10.5000,"F33","S","11",,"Folkstone, Kent / New York, NY"
-2,0,"Otter, Mr. Richard","male",39,0,0,"28213",13.0000,,"S",,,"Middleburg Heights, OH"
-2,1,"Oxenham, Mr. Percy Thomas","male",22,0,0,"W./C. 14260",10.5000,,"S","13",,"Pondersend, England / New Durham, NJ"
-2,1,"Padro y Manent, Mr. Julian","male",,0,0,"SC/PARIS 2146",13.8625,,"C","9",,"Spain / Havana, Cuba"
-2,0,"Pain, Dr. Alfred","male",23,0,0,"244278",10.5000,,"S",,,"Hamilton, ON"
-2,1,"Pallas y Castello, Mr. Emilio","male",29,0,0,"SC/PARIS 2147",13.8583,,"C","9",,"Spain / Havana, Cuba"
-2,0,"Parker, Mr. Clifford Richard","male",28,0,0,"SC 14888",10.5000,,"S",,,"St Andrews, Guernsey"
-2,0,"Parkes, Mr. Francis ""Frank""","male",,0,0,"239853",0.0000,,"S",,,"Belfast"
-2,1,"Parrish, Mrs. (Lutie Davis)","female",50,0,1,"230433",26.0000,,"S","12",,"Woodford County, KY"
-2,0,"Pengelly, Mr. Frederick William","male",19,0,0,"28665",10.5000,,"S",,,"Gunnislake, England / Butte, MT"
-2,0,"Pernot, Mr. Rene","male",,0,0,"SC/PARIS 2131",15.0500,,"C",,,
-2,0,"Peruschitz, Rev. Joseph Maria","male",41,0,0,"237393",13.0000,,"S",,,
-2,1,"Phillips, Miss. Alice Frances Louisa","female",21,0,1,"S.O./P.P. 2",21.0000,,"S","12",,"Ilfracombe, Devon"
-2,1,"Phillips, Miss. Kate Florence (""Mrs Kate Louise Phillips Marshall"")","female",19,0,0,"250655",26.0000,,"S","11",,"Worcester, England"
-2,0,"Phillips, Mr. Escott Robert","male",43,0,1,"S.O./P.P. 2",21.0000,,"S",,,"Ilfracombe, Devon"
-2,1,"Pinsky, Mrs. (Rosa)","female",32,0,0,"234604",13.0000,,"S","9",,"Russia"
-2,0,"Ponesell, Mr. Martin","male",34,0,0,"250647",13.0000,,"S",,,"Denmark / New York, NY"
-2,1,"Portaluppi, Mr. Emilio Ilario Giuseppe","male",30,0,0,"C.A. 34644",12.7375,,"C","14",,"Milford, NH"
-2,0,"Pulbaum, Mr. Franz","male",27,0,0,"SC/PARIS 2168",15.0333,,"C",,,"Paris"
-2,1,"Quick, Miss. Phyllis May","female",2,1,1,"26360",26.0000,,"S","11",,"Plymouth, Devon / Detroit, MI"
-2,1,"Quick, Miss. Winifred Vera","female",8,1,1,"26360",26.0000,,"S","11",,"Plymouth, Devon / Detroit, MI"
-2,1,"Quick, Mrs. Frederick Charles (Jane Richards)","female",33,0,2,"26360",26.0000,,"S","11",,"Plymouth, Devon / Detroit, MI"
-2,0,"Reeves, Mr. David","male",36,0,0,"C.A. 17248",10.5000,,"S",,,"Brighton, Sussex"
-2,0,"Renouf, Mr. Peter Henry","male",34,1,0,"31027",21.0000,,"S","12",,"Elizabeth, NJ"
-2,1,"Renouf, Mrs. Peter Henry (Lillian Jefferys)","female",30,3,0,"31027",21.0000,,"S",,,"Elizabeth, NJ"
-2,1,"Reynaldo, Ms. Encarnacion","female",28,0,0,"230434",13.0000,,"S","9",,"Spain"
-2,0,"Richard, Mr. Emile","male",23,0,0,"SC/PARIS 2133",15.0458,,"C",,,"Paris / Montreal, PQ"
-2,1,"Richards, Master. George Sibley","male",0.83,1,1,"29106",18.7500,,"S","4",,"Cornwall / Akron, OH"
-2,1,"Richards, Master. William Rowe","male",3,1,1,"29106",18.7500,,"S","4",,"Cornwall / Akron, OH"
-2,1,"Richards, Mrs. Sidney (Emily Hocking)","female",24,2,3,"29106",18.7500,,"S","4",,"Cornwall / Akron, OH"
-2,1,"Ridsdale, Miss. Lucy","female",50,0,0,"W./C. 14258",10.5000,,"S","13",,"London, England / Marietta, Ohio and Milwaukee, WI"
-2,0,"Rogers, Mr. Reginald Harry","male",19,0,0,"28004",10.5000,,"S",,,
-2,1,"Rugg, Miss. Emily","female",21,0,0,"C.A. 31026",10.5000,,"S","12",,"Guernsey / Wilmington, DE"
-2,0,"Schmidt, Mr. August","male",26,0,0,"248659",13.0000,,"S",,,"Newark, NJ"
-2,0,"Sedgwick, Mr. Charles Frederick Waddington","male",25,0,0,"244361",13.0000,,"S",,,"Liverpool"
-2,0,"Sharp, Mr. Percival James R","male",27,0,0,"244358",26.0000,,"S",,,"Hornsey, England"
-2,1,"Shelley, Mrs. William (Imanita Parrish Hall)","female",25,0,1,"230433",26.0000,,"S","12",,"Deer Lodge, MT"
-2,1,"Silven, Miss. Lyyli Karoliina","female",18,0,2,"250652",13.0000,,"S","16",,"Finland / Minneapolis, MN"
-2,1,"Sincock, Miss. Maude","female",20,0,0,"C.A. 33112",36.7500,,"S","11",,"Cornwall / Hancock, MI"
-2,1,"Sinkkonen, Miss. Anna","female",30,0,0,"250648",13.0000,,"S","10",,"Finland / Washington, DC"
-2,0,"Sjostedt, Mr. Ernst Adolf","male",59,0,0,"237442",13.5000,,"S",,,"Sault St Marie, ON"
-2,1,"Slayter, Miss. Hilda Mary","female",30,0,0,"234818",12.3500,,"Q","13",,"Halifax, NS"
-2,0,"Slemen, Mr. Richard James","male",35,0,0,"28206",10.5000,,"S",,,"Cornwall"
-2,1,"Smith, Miss. Marion Elsie","female",40,0,0,"31418",13.0000,,"S","9",,
-2,0,"Sobey, Mr. Samuel James Hayden","male",25,0,0,"C.A. 29178",13.0000,,"S",,,"Cornwall / Houghton, MI"
-2,0,"Stanton, Mr. Samuel Ward","male",41,0,0,"237734",15.0458,,"C",,,"New York, NY"
-2,0,"Stokes, Mr. Philip Joseph","male",25,0,0,"F.C.C. 13540",10.5000,,"S",,"81","Catford, Kent / Detroit, MI"
-2,0,"Swane, Mr. George","male",18.5,0,0,"248734",13.0000,"F","S",,"294",
-2,0,"Sweet, Mr. George Frederick","male",14,0,0,"220845",65.0000,,"S",,,"Somerset / Bernardsville, NJ"
-2,1,"Toomey, Miss. Ellen","female",50,0,0,"F.C.C. 13531",10.5000,,"S","9",,"Indianapolis, IN"
-2,0,"Troupiansky, Mr. Moses Aaron","male",23,0,0,"233639",13.0000,,"S",,,
-2,1,"Trout, Mrs. William H (Jessie L)","female",28,0,0,"240929",12.6500,,"S",,,"Columbus, OH"
-2,1,"Troutt, Miss. Edwina Celia ""Winnie""","female",27,0,0,"34218",10.5000,"E101","S","16",,"Bath, England / Massachusetts"
-2,0,"Turpin, Mr. William John Robert","male",29,1,0,"11668",21.0000,,"S",,,"Plymouth, England"
-2,0,"Turpin, Mrs. William John Robert (Dorothy Ann Wonnacott)","female",27,1,0,"11668",21.0000,,"S",,,"Plymouth, England"
-2,0,"Veal, Mr. James","male",40,0,0,"28221",13.0000,,"S",,,"Barre, Co Washington, VT"
-2,1,"Walcroft, Miss. Nellie","female",31,0,0,"F.C.C. 13528",21.0000,,"S","14",,"Mamaroneck, NY"
-2,0,"Ware, Mr. John James","male",30,1,0,"CA 31352",21.0000,,"S",,,"Bristol, England / New Britain, CT"
-2,0,"Ware, Mr. William Jeffery","male",23,1,0,"28666",10.5000,,"S",,,
-2,1,"Ware, Mrs. John James (Florence Louise Long)","female",31,0,0,"CA 31352",21.0000,,"S","10",,"Bristol, England / New Britain, CT"
-2,0,"Watson, Mr. Ennis Hastings","male",,0,0,"239856",0.0000,,"S",,,"Belfast"
-2,1,"Watt, Miss. Bertha J","female",12,0,0,"C.A. 33595",15.7500,,"S","9",,"Aberdeen / Portland, OR"
-2,1,"Watt, Mrs. James (Elizabeth ""Bessie"" Inglis Milne)","female",40,0,0,"C.A. 33595",15.7500,,"S","9",,"Aberdeen / Portland, OR"
-2,1,"Webber, Miss. Susan","female",32.5,0,0,"27267",13.0000,"E101","S","12",,"England / Hartford, CT"
-2,0,"Weisz, Mr. Leopold","male",27,1,0,"228414",26.0000,,"S",,"293","Bromsgrove, England / Montreal, PQ"
-2,1,"Weisz, Mrs. Leopold (Mathilde Francoise Pede)","female",29,1,0,"228414",26.0000,,"S","10",,"Bromsgrove, England / Montreal, PQ"
-2,1,"Wells, Master. Ralph Lester","male",2,1,1,"29103",23.0000,,"S","14",,"Cornwall / Akron, OH"
-2,1,"Wells, Miss. Joan","female",4,1,1,"29103",23.0000,,"S","14",,"Cornwall / Akron, OH"
-2,1,"Wells, Mrs. Arthur Henry (""Addie"" Dart Trevaskis)","female",29,0,2,"29103",23.0000,,"S","14",,"Cornwall / Akron, OH"
-2,1,"West, Miss. Barbara J","female",0.92,1,2,"C.A. 34651",27.7500,,"S","10",,"Bournmouth, England"
-2,1,"West, Miss. Constance Mirium","female",5,1,2,"C.A. 34651",27.7500,,"S","10",,"Bournmouth, England"
-2,0,"West, Mr. Edwy Arthur","male",36,1,2,"C.A. 34651",27.7500,,"S",,,"Bournmouth, England"
-2,1,"West, Mrs. Edwy Arthur (Ada Mary Worth)","female",33,1,2,"C.A. 34651",27.7500,,"S","10",,"Bournmouth, England"
-2,0,"Wheadon, Mr. Edward H","male",66,0,0,"C.A. 24579",10.5000,,"S",,,"Guernsey, England / Edgewood, RI"
-2,0,"Wheeler, Mr. Edwin ""Frederick""","male",,0,0,"SC/PARIS 2159",12.8750,,"S",,,
-2,1,"Wilhelms, Mr. Charles","male",31,0,0,"244270",13.0000,,"S","9",,"London, England"
-2,1,"Williams, Mr. Charles Eugene","male",,0,0,"244373",13.0000,,"S","14",,"Harrow, England"
-2,1,"Wright, Miss. Marion","female",26,0,0,"220844",13.5000,,"S","9",,"Yoevil, England / Cottage Grove, OR"
-2,0,"Yrois, Miss. Henriette (""Mrs Harbeck"")","female",24,0,0,"248747",13.0000,,"S",,,"Paris"
-3,0,"Abbing, Mr. Anthony","male",42,0,0,"C.A. 5547",7.5500,,"S",,,
-3,0,"Abbott, Master. Eugene Joseph","male",13,0,2,"C.A. 2673",20.2500,,"S",,,"East Providence, RI"
-3,0,"Abbott, Mr. Rossmore Edward","male",16,1,1,"C.A. 2673",20.2500,,"S",,"190","East Providence, RI"
-3,1,"Abbott, Mrs. Stanton (Rosa Hunt)","female",35,1,1,"C.A. 2673",20.2500,,"S","A",,"East Providence, RI"
-3,1,"Abelseth, Miss. Karen Marie","female",16,0,0,"348125",7.6500,,"S","16",,"Norway Los Angeles, CA"
-3,1,"Abelseth, Mr. Olaus Jorgensen","male",25,0,0,"348122",7.6500,"F G63","S","A",,"Perkins County, SD"
-3,1,"Abrahamsson, Mr. Abraham August Johannes","male",20,0,0,"SOTON/O2 3101284",7.9250,,"S","15",,"Taalintehdas, Finland Hoboken, NJ"
-3,1,"Abrahim, Mrs. Joseph (Sophie Halaut Easu)","female",18,0,0,"2657",7.2292,,"C","C",,"Greensburg, PA"
-3,0,"Adahl, Mr. Mauritz Nils Martin","male",30,0,0,"C 7076",7.2500,,"S",,"72","Asarum, Sweden Brooklyn, NY"
-3,0,"Adams, Mr. John","male",26,0,0,"341826",8.0500,,"S",,"103","Bournemouth, England"
-3,0,"Ahlin, Mrs. Johan (Johanna Persdotter Larsson)","female",40,1,0,"7546",9.4750,,"S",,,"Sweden Akeley, MN"
-3,1,"Aks, Master. Philip Frank","male",0.83,0,1,"392091",9.3500,,"S","11",,"London, England Norfolk, VA"
-3,1,"Aks, Mrs. Sam (Leah Rosen)","female",18,0,1,"392091",9.3500,,"S","13",,"London, England Norfolk, VA"
-3,1,"Albimona, Mr. Nassef Cassem","male",26,0,0,"2699",18.7875,,"C","15",,"Syria Fredericksburg, VA"
-3,0,"Alexander, Mr. William","male",26,0,0,"3474",7.8875,,"S",,,"England Albion, NY"
-3,0,"Alhomaki, Mr. Ilmari Rudolf","male",20,0,0,"SOTON/O2 3101287",7.9250,,"S",,,"Salo, Finland Astoria, OR"
-3,0,"Ali, Mr. Ahmed","male",24,0,0,"SOTON/O.Q. 3101311",7.0500,,"S",,,
-3,0,"Ali, Mr. William","male",25,0,0,"SOTON/O.Q. 3101312",7.0500,,"S",,"79","Argentina"
-3,0,"Allen, Mr. William Henry","male",35,0,0,"373450",8.0500,,"S",,,"Lower Clapton, Middlesex or Erdington, Birmingham"
-3,0,"Allum, Mr. Owen George","male",18,0,0,"2223",8.3000,,"S",,"259","Windsor, England New York, NY"
-3,0,"Andersen, Mr. Albert Karvin","male",32,0,0,"C 4001",22.5250,,"S",,"260","Bergen, Norway"
-3,1,"Andersen-Jensen, Miss. Carla Christine Nielsine","female",19,1,0,"350046",7.8542,,"S","16",,
-3,0,"Andersson, Master. Sigvard Harald Elias","male",4,4,2,"347082",31.2750,,"S",,,"Sweden Winnipeg, MN"
-3,0,"Andersson, Miss. Ebba Iris Alfrida","female",6,4,2,"347082",31.2750,,"S",,,"Sweden Winnipeg, MN"
-3,0,"Andersson, Miss. Ellis Anna Maria","female",2,4,2,"347082",31.2750,,"S",,,"Sweden Winnipeg, MN"
-3,1,"Andersson, Miss. Erna Alexandra","female",17,4,2,"3101281",7.9250,,"S","D",,"Ruotsinphyhtaa, Finland New York, NY"
-3,0,"Andersson, Miss. Ida Augusta Margareta","female",38,4,2,"347091",7.7750,,"S",,,"Vadsbro, Sweden Ministee, MI"
-3,0,"Andersson, Miss. Ingeborg Constanzia","female",9,4,2,"347082",31.2750,,"S",,,"Sweden Winnipeg, MN"
-3,0,"Andersson, Miss. Sigrid Elisabeth","female",11,4,2,"347082",31.2750,,"S",,,"Sweden Winnipeg, MN"
-3,0,"Andersson, Mr. Anders Johan","male",39,1,5,"347082",31.2750,,"S",,,"Sweden Winnipeg, MN"
-3,1,"Andersson, Mr. August Edvard (""Wennerstrom"")","male",27,0,0,"350043",7.7958,,"S","A",,
-3,0,"Andersson, Mr. Johan Samuel","male",26,0,0,"347075",7.7750,,"S",,,"Hartford, CT"
-3,0,"Andersson, Mrs. Anders Johan (Alfrida Konstantia Brogren)","female",39,1,5,"347082",31.2750,,"S",,,"Sweden Winnipeg, MN"
-3,0,"Andreasson, Mr. Paul Edvin","male",20,0,0,"347466",7.8542,,"S",,,"Sweden Chicago, IL"
-3,0,"Angheloff, Mr. Minko","male",26,0,0,"349202",7.8958,,"S",,,"Bulgaria Chicago, IL"
-3,0,"Arnold-Franchi, Mr. Josef","male",25,1,0,"349237",17.8000,,"S",,,"Altdorf, Switzerland"
-3,0,"Arnold-Franchi, Mrs. Josef (Josefine Franchi)","female",18,1,0,"349237",17.8000,,"S",,,"Altdorf, Switzerland"
-3,0,"Aronsson, Mr. Ernst Axel Algot","male",24,0,0,"349911",7.7750,,"S",,,"Sweden Joliet, IL"
-3,0,"Asim, Mr. Adola","male",35,0,0,"SOTON/O.Q. 3101310",7.0500,,"S",,,
-3,0,"Asplund, Master. Carl Edgar","male",5,4,2,"347077",31.3875,,"S",,,"Sweden Worcester, MA"
-3,0,"Asplund, Master. Clarence Gustaf Hugo","male",9,4,2,"347077",31.3875,,"S",,,"Sweden Worcester, MA"
-3,1,"Asplund, Master. Edvin Rojj Felix","male",3,4,2,"347077",31.3875,,"S","15",,"Sweden Worcester, MA"
-3,0,"Asplund, Master. Filip Oscar","male",13,4,2,"347077",31.3875,,"S",,,"Sweden Worcester, MA"
-3,1,"Asplund, Miss. Lillian Gertrud","female",5,4,2,"347077",31.3875,,"S","15",,"Sweden Worcester, MA"
-3,0,"Asplund, Mr. Carl Oscar Vilhelm Gustafsson","male",40,1,5,"347077",31.3875,,"S",,"142","Sweden Worcester, MA"
-3,1,"Asplund, Mr. Johan Charles","male",23,0,0,"350054",7.7958,,"S","13",,"Oskarshamn, Sweden Minneapolis, MN"
-3,1,"Asplund, Mrs. Carl Oscar (Selma Augusta Emilia Johansson)","female",38,1,5,"347077",31.3875,,"S","15",,"Sweden Worcester, MA"
-3,1,"Assaf Khalil, Mrs. Mariana (""Miriam"")","female",45,0,0,"2696",7.2250,,"C","C",,"Ottawa, ON"
-3,0,"Assaf, Mr. Gerios","male",21,0,0,"2692",7.2250,,"C",,,"Ottawa, ON"
-3,0,"Assam, Mr. Ali","male",23,0,0,"SOTON/O.Q. 3101309",7.0500,,"S",,,
-3,0,"Attalah, Miss. Malake","female",17,0,0,"2627",14.4583,,"C",,,
-3,0,"Attalah, Mr. Sleiman","male",30,0,0,"2694",7.2250,,"C",,,"Ottawa, ON"
-3,0,"Augustsson, Mr. Albert","male",23,0,0,"347468",7.8542,,"S",,,"Krakoryd, Sweden Bloomington, IL"
-3,1,"Ayoub, Miss. Banoura","female",13,0,0,"2687",7.2292,,"C","C",,"Syria Youngstown, OH"
-3,0,"Baccos, Mr. Raffull","male",20,0,0,"2679",7.2250,,"C",,,
-3,0,"Backstrom, Mr. Karl Alfred","male",32,1,0,"3101278",15.8500,,"S","D",,"Ruotsinphytaa, Finland New York, NY"
-3,1,"Backstrom, Mrs. Karl Alfred (Maria Mathilda Gustafsson)","female",33,3,0,"3101278",15.8500,,"S",,,"Ruotsinphytaa, Finland New York, NY"
-3,1,"Baclini, Miss. Eugenie","female",0.75,2,1,"2666",19.2583,,"C","C",,"Syria New York, NY"
-3,1,"Baclini, Miss. Helene Barbara","female",0.75,2,1,"2666",19.2583,,"C","C",,"Syria New York, NY"
-3,1,"Baclini, Miss. Marie Catherine","female",5,2,1,"2666",19.2583,,"C","C",,"Syria New York, NY"
-3,1,"Baclini, Mrs. Solomon (Latifa Qurban)","female",24,0,3,"2666",19.2583,,"C","C",,"Syria New York, NY"
-3,1,"Badman, Miss. Emily Louisa","female",18,0,0,"A/4 31416",8.0500,,"S","C",,"London Skanteales, NY"
-3,0,"Badt, Mr. Mohamed","male",40,0,0,"2623",7.2250,,"C",,,
-3,0,"Balkic, Mr. Cerin","male",26,0,0,"349248",7.8958,,"S",,,
-3,1,"Barah, Mr. Hanna Assi","male",20,0,0,"2663",7.2292,,"C","15",,
-3,0,"Barbara, Miss. Saiide","female",18,0,1,"2691",14.4542,,"C",,,"Syria Ottawa, ON"
-3,0,"Barbara, Mrs. (Catherine David)","female",45,0,1,"2691",14.4542,,"C",,,"Syria Ottawa, ON"
-3,0,"Barry, Miss. Julia","female",27,0,0,"330844",7.8792,,"Q",,,"New York, NY"
-3,0,"Barton, Mr. David John","male",22,0,0,"324669",8.0500,,"S",,,"England New York, NY"
-3,0,"Beavan, Mr. William Thomas","male",19,0,0,"323951",8.0500,,"S",,,"England"
-3,0,"Bengtsson, Mr. John Viktor","male",26,0,0,"347068",7.7750,,"S",,,"Krakudden, Sweden Moune, IL"
-3,0,"Berglund, Mr. Karl Ivar Sven","male",22,0,0,"PP 4348",9.3500,,"S",,,"Tranvik, Finland New York"
-3,0,"Betros, Master. Seman","male",,0,0,"2622",7.2292,,"C",,,
-3,0,"Betros, Mr. Tannous","male",20,0,0,"2648",4.0125,,"C",,,"Syria"
-3,1,"Bing, Mr. Lee","male",32,0,0,"1601",56.4958,,"S","C",,"Hong Kong New York, NY"
-3,0,"Birkeland, Mr. Hans Martin Monsen","male",21,0,0,"312992",7.7750,,"S",,,"Brennes, Norway New York"
-3,0,"Bjorklund, Mr. Ernst Herbert","male",18,0,0,"347090",7.7500,,"S",,,"Stockholm, Sweden New York"
-3,0,"Bostandyeff, Mr. Guentcho","male",26,0,0,"349224",7.8958,,"S",,,"Bulgaria Chicago, IL"
-3,0,"Boulos, Master. Akar","male",6,1,1,"2678",15.2458,,"C",,,"Syria Kent, ON"
-3,0,"Boulos, Miss. Nourelain","female",9,1,1,"2678",15.2458,,"C",,,"Syria Kent, ON"
-3,0,"Boulos, Mr. Hanna","male",,0,0,"2664",7.2250,,"C",,,"Syria"
-3,0,"Boulos, Mrs. Joseph (Sultana)","female",,0,2,"2678",15.2458,,"C",,,"Syria Kent, ON"
-3,0,"Bourke, Miss. Mary","female",,0,2,"364848",7.7500,,"Q",,,"Ireland Chicago, IL"
-3,0,"Bourke, Mr. John","male",40,1,1,"364849",15.5000,,"Q",,,"Ireland Chicago, IL"
-3,0,"Bourke, Mrs. John (Catherine)","female",32,1,1,"364849",15.5000,,"Q",,,"Ireland Chicago, IL"
-3,0,"Bowen, Mr. David John ""Dai""","male",21,0,0,"54636",16.1000,,"S",,,"Treherbert, Cardiff, Wales"
-3,1,"Bradley, Miss. Bridget Delia","female",22,0,0,"334914",7.7250,,"Q","13",,"Kingwilliamstown, Co Cork, Ireland Glens Falls, NY"
-3,0,"Braf, Miss. Elin Ester Maria","female",20,0,0,"347471",7.8542,,"S",,,"Medeltorp, Sweden Chicago, IL"
-3,0,"Braund, Mr. Lewis Richard","male",29,1,0,"3460",7.0458,,"S",,,"Bridgerule, Devon"
-3,0,"Braund, Mr. Owen Harris","male",22,1,0,"A/5 21171",7.2500,,"S",,,"Bridgerule, Devon"
-3,0,"Brobeck, Mr. Karl Rudolf","male",22,0,0,"350045",7.7958,,"S",,,"Sweden Worcester, MA"
-3,0,"Brocklebank, Mr. William Alfred","male",35,0,0,"364512",8.0500,,"S",,,"Broomfield, Chelmsford, England"
-3,0,"Buckley, Miss. Katherine","female",18.5,0,0,"329944",7.2833,,"Q",,"299","Co Cork, Ireland Roxbury, MA"
-3,1,"Buckley, Mr. Daniel","male",21,0,0,"330920",7.8208,,"Q","13",,"Kingwilliamstown, Co Cork, Ireland New York, NY"
-3,0,"Burke, Mr. Jeremiah","male",19,0,0,"365222",6.7500,,"Q",,,"Co Cork, Ireland Charlestown, MA"
-3,0,"Burns, Miss. Mary Delia","female",18,0,0,"330963",7.8792,,"Q",,,"Co Sligo, Ireland New York, NY"
-3,0,"Cacic, Miss. Manda","female",21,0,0,"315087",8.6625,,"S",,,
-3,0,"Cacic, Miss. Marija","female",30,0,0,"315084",8.6625,,"S",,,
-3,0,"Cacic, Mr. Jego Grga","male",18,0,0,"315091",8.6625,,"S",,,
-3,0,"Cacic, Mr. Luka","male",38,0,0,"315089",8.6625,,"S",,,"Croatia"
-3,0,"Calic, Mr. Jovo","male",17,0,0,"315093",8.6625,,"S",,,
-3,0,"Calic, Mr. Petar","male",17,0,0,"315086",8.6625,,"S",,,
-3,0,"Canavan, Miss. Mary","female",21,0,0,"364846",7.7500,,"Q",,,
-3,0,"Canavan, Mr. Patrick","male",21,0,0,"364858",7.7500,,"Q",,,"Ireland Philadelphia, PA"
-3,0,"Cann, Mr. Ernest Charles","male",21,0,0,"A./5. 2152",8.0500,,"S",,,
-3,0,"Caram, Mr. Joseph","male",,1,0,"2689",14.4583,,"C",,,"Ottawa, ON"
-3,0,"Caram, Mrs. Joseph (Maria Elias)","female",,1,0,"2689",14.4583,,"C",,,"Ottawa, ON"
-3,0,"Carlsson, Mr. August Sigfrid","male",28,0,0,"350042",7.7958,,"S",,,"Dagsas, Sweden Fower, MN"
-3,0,"Carlsson, Mr. Carl Robert","male",24,0,0,"350409",7.8542,,"S",,,"Goteborg, Sweden Huntley, IL"
-3,1,"Carr, Miss. Helen ""Ellen""","female",16,0,0,"367231",7.7500,,"Q","16",,"Co Longford, Ireland New York, NY"
-3,0,"Carr, Miss. Jeannie","female",37,0,0,"368364",7.7500,,"Q",,,"Co Sligo, Ireland Hartford, CT"
-3,0,"Carver, Mr. Alfred John","male",28,0,0,"392095",7.2500,,"S",,,"St Denys, Southampton, Hants"
-3,0,"Celotti, Mr. Francesco","male",24,0,0,"343275",8.0500,,"S",,,"London"
-3,0,"Charters, Mr. David","male",21,0,0,"A/5. 13032",7.7333,,"Q",,,"Ireland New York, NY"
-3,1,"Chip, Mr. Chang","male",32,0,0,"1601",56.4958,,"S","C",,"Hong Kong New York, NY"
-3,0,"Christmann, Mr. Emil","male",29,0,0,"343276",8.0500,,"S",,,
-3,0,"Chronopoulos, Mr. Apostolos","male",26,1,0,"2680",14.4542,,"C",,,"Greece"
-3,0,"Chronopoulos, Mr. Demetrios","male",18,1,0,"2680",14.4542,,"C",,,"Greece"
-3,0,"Coelho, Mr. Domingos Fernandeo","male",20,0,0,"SOTON/O.Q. 3101307",7.0500,,"S",,,"Portugal"
-3,1,"Cohen, Mr. Gurshon ""Gus""","male",18,0,0,"A/5 3540",8.0500,,"S","12",,"London Brooklyn, NY"
-3,0,"Colbert, Mr. Patrick","male",24,0,0,"371109",7.2500,,"Q",,,"Co Limerick, Ireland Sherbrooke, PQ"
-3,0,"Coleff, Mr. Peju","male",36,0,0,"349210",7.4958,,"S",,,"Bulgaria Chicago, IL"
-3,0,"Coleff, Mr. Satio","male",24,0,0,"349209",7.4958,,"S",,,
-3,0,"Conlon, Mr. Thomas Henry","male",31,0,0,"21332",7.7333,,"Q",,,"Philadelphia, PA"
-3,0,"Connaghton, Mr. Michael","male",31,0,0,"335097",7.7500,,"Q",,,"Ireland Brooklyn, NY"
-3,1,"Connolly, Miss. Kate","female",22,0,0,"370373",7.7500,,"Q","13",,"Ireland"
-3,0,"Connolly, Miss. Kate","female",30,0,0,"330972",7.6292,,"Q",,,"Ireland"
-3,0,"Connors, Mr. Patrick","male",70.5,0,0,"370369",7.7500,,"Q",,"171",
-3,0,"Cook, Mr. Jacob","male",43,0,0,"A/5 3536",8.0500,,"S",,,
-3,0,"Cor, Mr. Bartol","male",35,0,0,"349230",7.8958,,"S",,,"Austria"
-3,0,"Cor, Mr. Ivan","male",27,0,0,"349229",7.8958,,"S",,,"Austria"
-3,0,"Cor, Mr. Liudevit","male",19,0,0,"349231",7.8958,,"S",,,"Austria"
-3,0,"Corn, Mr. Harry","male",30,0,0,"SOTON/OQ 392090",8.0500,,"S",,,"London"
-3,1,"Coutts, Master. Eden Leslie ""Neville""","male",9,1,1,"C.A. 37671",15.9000,,"S","2",,"England Brooklyn, NY"
-3,1,"Coutts, Master. William Loch ""William""","male",3,1,1,"C.A. 37671",15.9000,,"S","2",,"England Brooklyn, NY"
-3,1,"Coutts, Mrs. William (Winnie ""Minnie"" Treanor)","female",36,0,2,"C.A. 37671",15.9000,,"S","2",,"England Brooklyn, NY"
-3,0,"Coxon, Mr. Daniel","male",59,0,0,"364500",7.2500,,"S",,,"Merrill, WI"
-3,0,"Crease, Mr. Ernest James","male",19,0,0,"S.P. 3464",8.1583,,"S",,,"Bristol, England Cleveland, OH"
-3,1,"Cribb, Miss. Laura Alice","female",17,0,1,"371362",16.1000,,"S","12",,"Bournemouth, England Newark, NJ"
-3,0,"Cribb, Mr. John Hatfield","male",44,0,1,"371362",16.1000,,"S",,,"Bournemouth, England Newark, NJ"
-3,0,"Culumovic, Mr. Jeso","male",17,0,0,"315090",8.6625,,"S",,,"Austria-Hungary"
-3,0,"Daher, Mr. Shedid","male",22.5,0,0,"2698",7.2250,,"C",,"9",
-3,1,"Dahl, Mr. Karl Edwart","male",45,0,0,"7598",8.0500,,"S","15",,"Australia Fingal, ND"
-3,0,"Dahlberg, Miss. Gerda Ulrika","female",22,0,0,"7552",10.5167,,"S",,,"Norrlot, Sweden Chicago, IL"
-3,0,"Dakic, Mr. Branko","male",19,0,0,"349228",10.1708,,"S",,,"Austria"
-3,1,"Daly, Miss. Margaret Marcella ""Maggie""","female",30,0,0,"382650",6.9500,,"Q","15",,"Co Athlone, Ireland New York, NY"
-3,1,"Daly, Mr. Eugene Patrick","male",29,0,0,"382651",7.7500,,"Q","13 15 B",,"Co Athlone, Ireland New York, NY"
-3,0,"Danbom, Master. Gilbert Sigvard Emanuel","male",0.33,0,2,"347080",14.4000,,"S",,,"Stanton, IA"
-3,0,"Danbom, Mr. Ernst Gilbert","male",34,1,1,"347080",14.4000,,"S",,"197","Stanton, IA"
-3,0,"Danbom, Mrs. Ernst Gilbert (Anna Sigrid Maria Brogren)","female",28,1,1,"347080",14.4000,,"S",,,"Stanton, IA"
-3,0,"Danoff, Mr. Yoto","male",27,0,0,"349219",7.8958,,"S",,,"Bulgaria Chicago, IL"
-3,0,"Dantcheff, Mr. Ristiu","male",25,0,0,"349203",7.8958,,"S",,,"Bulgaria Chicago, IL"
-3,0,"Davies, Mr. Alfred J","male",24,2,0,"A/4 48871",24.1500,,"S",,,"West Bromwich, England Pontiac, MI"
-3,0,"Davies, Mr. Evan","male",22,0,0,"SC/A4 23568",8.0500,,"S",,,
-3,0,"Davies, Mr. John Samuel","male",21,2,0,"A/4 48871",24.1500,,"S",,,"West Bromwich, England Pontiac, MI"
-3,0,"Davies, Mr. Joseph","male",17,2,0,"A/4 48873",8.0500,,"S",,,"West Bromwich, England Pontiac, MI"
-3,0,"Davison, Mr. Thomas Henry","male",,1,0,"386525",16.1000,,"S",,,"Liverpool, England Bedford, OH"
-3,1,"Davison, Mrs. Thomas Henry (Mary E Finck)","female",,1,0,"386525",16.1000,,"S","16",,"Liverpool, England Bedford, OH"
-3,1,"de Messemaeker, Mr. Guillaume Joseph","male",36.5,1,0,"345572",17.4000,,"S","15",,"Tampico, MT"
-3,1,"de Messemaeker, Mrs. Guillaume Joseph (Emma)","female",36,1,0,"345572",17.4000,,"S","13",,"Tampico, MT"
-3,1,"de Mulder, Mr. Theodore","male",30,0,0,"345774",9.5000,,"S","11",,"Belgium Detroit, MI"
-3,0,"de Pelsmaeker, Mr. Alfons","male",16,0,0,"345778",9.5000,,"S",,,
-3,1,"Dean, Master. Bertram Vere","male",1,1,2,"C.A. 2315",20.5750,,"S","10",,"Devon, England Wichita, KS"
-3,1,"Dean, Miss. Elizabeth Gladys ""Millvina""","female",0.17,1,2,"C.A. 2315",20.5750,,"S","10",,"Devon, England Wichita, KS"
-3,0,"Dean, Mr. Bertram Frank","male",26,1,2,"C.A. 2315",20.5750,,"S",,,"Devon, England Wichita, KS"
-3,1,"Dean, Mrs. Bertram (Eva Georgetta Light)","female",33,1,2,"C.A. 2315",20.5750,,"S","10",,"Devon, England Wichita, KS"
-3,0,"Delalic, Mr. Redjo","male",25,0,0,"349250",7.8958,,"S",,,
-3,0,"Demetri, Mr. Marinko","male",,0,0,"349238",7.8958,,"S",,,
-3,0,"Denkoff, Mr. Mitto","male",,0,0,"349225",7.8958,,"S",,,"Bulgaria Coon Rapids, IA"
-3,0,"Dennis, Mr. Samuel","male",22,0,0,"A/5 21172",7.2500,,"S",,,
-3,0,"Dennis, Mr. William","male",36,0,0,"A/5 21175",7.2500,,"S",,,
-3,1,"Devaney, Miss. Margaret Delia","female",19,0,0,"330958",7.8792,,"Q","C",,"Kilmacowen, Co Sligo, Ireland New York, NY"
-3,0,"Dika, Mr. Mirko","male",17,0,0,"349232",7.8958,,"S",,,
-3,0,"Dimic, Mr. Jovan","male",42,0,0,"315088",8.6625,,"S",,,
-3,0,"Dintcheff, Mr. Valtcho","male",43,0,0,"349226",7.8958,,"S",,,
-3,0,"Doharr, Mr. Tannous","male",,0,0,"2686",7.2292,,"C",,,
-3,0,"Dooley, Mr. Patrick","male",32,0,0,"370376",7.7500,,"Q",,,"Ireland New York, NY"
-3,1,"Dorking, Mr. Edward Arthur","male",19,0,0,"A/5. 10482",8.0500,,"S","B",,"England Oglesby, IL"
-3,1,"Dowdell, Miss. Elizabeth","female",30,0,0,"364516",12.4750,,"S","13",,"Union Hill, NJ"
-3,0,"Doyle, Miss. Elizabeth","female",24,0,0,"368702",7.7500,,"Q",,,"Ireland New York, NY"
-3,1,"Drapkin, Miss. Jennie","female",23,0,0,"SOTON/OQ 392083",8.0500,,"S",,,"London New York, NY"
-3,0,"Drazenoic, Mr. Jozef","male",33,0,0,"349241",7.8958,,"C",,"51","Austria Niagara Falls, NY"
-3,0,"Duane, Mr. Frank","male",65,0,0,"336439",7.7500,,"Q",,,
-3,1,"Duquemin, Mr. Joseph","male",24,0,0,"S.O./P.P. 752",7.5500,,"S","D",,"England Albion, NY"
-3,0,"Dyker, Mr. Adolf Fredrik","male",23,1,0,"347072",13.9000,,"S",,,"West Haven, CT"
-3,1,"Dyker, Mrs. Adolf Fredrik (Anna Elisabeth Judith Andersson)","female",22,1,0,"347072",13.9000,,"S","16",,"West Haven, CT"
-3,0,"Edvardsson, Mr. Gustaf Hjalmar","male",18,0,0,"349912",7.7750,,"S",,,"Tofta, Sweden Joliet, IL"
-3,0,"Eklund, Mr. Hans Linus","male",16,0,0,"347074",7.7750,,"S",,,"Karberg, Sweden Jerome Junction, AZ"
-3,0,"Ekstrom, Mr. Johan","male",45,0,0,"347061",6.9750,,"S",,,"Effington Rut, SD"
-3,0,"Elias, Mr. Dibo","male",,0,0,"2674",7.2250,,"C",,,
-3,0,"Elias, Mr. Joseph","male",39,0,2,"2675",7.2292,,"C",,,"Syria Ottawa, ON"
-3,0,"Elias, Mr. Joseph Jr","male",17,1,1,"2690",7.2292,,"C",,,
-3,0,"Elias, Mr. Tannous","male",15,1,1,"2695",7.2292,,"C",,,"Syria"
-3,0,"Elsbury, Mr. William James","male",47,0,0,"A/5 3902",7.2500,,"S",,,"Illinois, USA"
-3,1,"Emanuel, Miss. Virginia Ethel","female",5,0,0,"364516",12.4750,,"S","13",,"New York, NY"
-3,0,"Emir, Mr. Farred Chehab","male",,0,0,"2631",7.2250,,"C",,,
-3,0,"Everett, Mr. Thomas James","male",40.5,0,0,"C.A. 6212",15.1000,,"S",,"187",
-3,0,"Farrell, Mr. James","male",40.5,0,0,"367232",7.7500,,"Q",,"68","Aughnacliff, Co Longford, Ireland New York, NY"
-3,1,"Finoli, Mr. Luigi","male",,0,0,"SOTON/O.Q. 3101308",7.0500,,"S","15",,"Italy Philadelphia, PA"
-3,0,"Fischer, Mr. Eberhard Thelander","male",18,0,0,"350036",7.7958,,"S",,,
-3,0,"Fleming, Miss. Honora","female",,0,0,"364859",7.7500,,"Q",,,
-3,0,"Flynn, Mr. James","male",,0,0,"364851",7.7500,,"Q",,,
-3,0,"Flynn, Mr. John","male",,0,0,"368323",6.9500,,"Q",,,
-3,0,"Foley, Mr. Joseph","male",26,0,0,"330910",7.8792,,"Q",,,"Ireland Chicago, IL"
-3,0,"Foley, Mr. William","male",,0,0,"365235",7.7500,,"Q",,,"Ireland"
-3,1,"Foo, Mr. Choong","male",,0,0,"1601",56.4958,,"S","13",,"Hong Kong New York, NY"
-3,0,"Ford, Miss. Doolina Margaret ""Daisy""","female",21,2,2,"W./C. 6608",34.3750,,"S",,,"Rotherfield, Sussex, England Essex Co, MA"
-3,0,"Ford, Miss. Robina Maggie ""Ruby""","female",9,2,2,"W./C. 6608",34.3750,,"S",,,"Rotherfield, Sussex, England Essex Co, MA"
-3,0,"Ford, Mr. Arthur","male",,0,0,"A/5 1478",8.0500,,"S",,,"Bridgwater, Somerset, England"
-3,0,"Ford, Mr. Edward Watson","male",18,2,2,"W./C. 6608",34.3750,,"S",,,"Rotherfield, Sussex, England Essex Co, MA"
-3,0,"Ford, Mr. William Neal","male",16,1,3,"W./C. 6608",34.3750,,"S",,,"Rotherfield, Sussex, England Essex Co, MA"
-3,0,"Ford, Mrs. Edward (Margaret Ann Watson)","female",48,1,3,"W./C. 6608",34.3750,,"S",,,"Rotherfield, Sussex, England Essex Co, MA"
-3,0,"Fox, Mr. Patrick","male",,0,0,"368573",7.7500,,"Q",,,"Ireland New York, NY"
-3,0,"Franklin, Mr. Charles (Charles Fardon)","male",,0,0,"SOTON/O.Q. 3101314",7.2500,,"S",,,
-3,0,"Gallagher, Mr. Martin","male",25,0,0,"36864",7.7417,,"Q",,,"New York, NY"
-3,0,"Garfirth, Mr. John","male",,0,0,"358585",14.5000,,"S",,,
-3,0,"Gheorgheff, Mr. Stanio","male",,0,0,"349254",7.8958,,"C",,,
-3,0,"Gilinski, Mr. Eliezer","male",22,0,0,"14973",8.0500,,"S",,"47",
-3,1,"Gilnagh, Miss. Katherine ""Katie""","female",16,0,0,"35851",7.7333,,"Q","16",,"Co Longford, Ireland New York, NY"
-3,1,"Glynn, Miss. Mary Agatha","female",,0,0,"335677",7.7500,,"Q","13",,"Co Clare, Ireland Washington, DC"
-3,1,"Goldsmith, Master. Frank John William ""Frankie""","male",9,0,2,"363291",20.5250,,"S","C D",,"Strood, Kent, England Detroit, MI"
-3,0,"Goldsmith, Mr. Frank John","male",33,1,1,"363291",20.5250,,"S",,,"Strood, Kent, England Detroit, MI"
-3,0,"Goldsmith, Mr. Nathan","male",41,0,0,"SOTON/O.Q. 3101263",7.8500,,"S",,,"Philadelphia, PA"
-3,1,"Goldsmith, Mrs. Frank John (Emily Alice Brown)","female",31,1,1,"363291",20.5250,,"S","C D",,"Strood, Kent, England Detroit, MI"
-3,0,"Goncalves, Mr. Manuel Estanslas","male",38,0,0,"SOTON/O.Q. 3101306",7.0500,,"S",,,"Portugal"
-3,0,"Goodwin, Master. Harold Victor","male",9,5,2,"CA 2144",46.9000,,"S",,,"Wiltshire, England Niagara Falls, NY"
-3,0,"Goodwin, Master. Sidney Leonard","male",1,5,2,"CA 2144",46.9000,,"S",,,"Wiltshire, England Niagara Falls, NY"
-3,0,"Goodwin, Master. William Frederick","male",11,5,2,"CA 2144",46.9000,,"S",,,"Wiltshire, England Niagara Falls, NY"
-3,0,"Goodwin, Miss. Jessie Allis","female",10,5,2,"CA 2144",46.9000,,"S",,,"Wiltshire, England Niagara Falls, NY"
-3,0,"Goodwin, Miss. Lillian Amy","female",16,5,2,"CA 2144",46.9000,,"S",,,"Wiltshire, England Niagara Falls, NY"
-3,0,"Goodwin, Mr. Charles Edward","male",14,5,2,"CA 2144",46.9000,,"S",,,"Wiltshire, England Niagara Falls, NY"
-3,0,"Goodwin, Mr. Charles Frederick","male",40,1,6,"CA 2144",46.9000,,"S",,,"Wiltshire, England Niagara Falls, NY"
-3,0,"Goodwin, Mrs. Frederick (Augusta Tyler)","female",43,1,6,"CA 2144",46.9000,,"S",,,"Wiltshire, England Niagara Falls, NY"
-3,0,"Green, Mr. George Henry","male",51,0,0,"21440",8.0500,,"S",,,"Dorking, Surrey, England"
-3,0,"Gronnestad, Mr. Daniel Danielsen","male",32,0,0,"8471",8.3625,,"S",,,"Foresvik, Norway Portland, ND"
-3,0,"Guest, Mr. Robert","male",,0,0,"376563",8.0500,,"S",,,
-3,0,"Gustafsson, Mr. Alfred Ossian","male",20,0,0,"7534",9.8458,,"S",,,"Waukegan, Chicago, IL"
-3,0,"Gustafsson, Mr. Anders Vilhelm","male",37,2,0,"3101276",7.9250,,"S",,"98","Ruotsinphytaa, Finland New York, NY"
-3,0,"Gustafsson, Mr. Johan Birger","male",28,2,0,"3101277",7.9250,,"S",,,"Ruotsinphytaa, Finland New York, NY"
-3,0,"Gustafsson, Mr. Karl Gideon","male",19,0,0,"347069",7.7750,,"S",,,"Myren, Sweden New York, NY"
-3,0,"Haas, Miss. Aloisia","female",24,0,0,"349236",8.8500,,"S",,,
-3,0,"Hagardon, Miss. Kate","female",17,0,0,"AQ/3. 30631",7.7333,,"Q",,,
-3,0,"Hagland, Mr. Ingvald Olai Olsen","male",,1,0,"65303",19.9667,,"S",,,
-3,0,"Hagland, Mr. Konrad Mathias Reiersen","male",,1,0,"65304",19.9667,,"S",,,
-3,0,"Hakkarainen, Mr. Pekka Pietari","male",28,1,0,"STON/O2. 3101279",15.8500,,"S",,,
-3,1,"Hakkarainen, Mrs. Pekka Pietari (Elin Matilda Dolck)","female",24,1,0,"STON/O2. 3101279",15.8500,,"S","15",,
-3,0,"Hampe, Mr. Leon","male",20,0,0,"345769",9.5000,,"S",,,
-3,0,"Hanna, Mr. Mansour","male",23.5,0,0,"2693",7.2292,,"C",,"188",
-3,0,"Hansen, Mr. Claus Peter","male",41,2,0,"350026",14.1083,,"S",,,
-3,0,"Hansen, Mr. Henrik Juul","male",26,1,0,"350025",7.8542,,"S",,,
-3,0,"Hansen, Mr. Henry Damsgaard","male",21,0,0,"350029",7.8542,,"S",,"69",
-3,1,"Hansen, Mrs. Claus Peter (Jennie L Howard)","female",45,1,0,"350026",14.1083,,"S","11",,
-3,0,"Harknett, Miss. Alice Phoebe","female",,0,0,"W./C. 6609",7.5500,,"S",,,
-3,0,"Harmer, Mr. Abraham (David Lishin)","male",25,0,0,"374887",7.2500,,"S","B",,
-3,0,"Hart, Mr. Henry","male",,0,0,"394140",6.8583,,"Q",,,
-3,0,"Hassan, Mr. Houssein G N","male",11,0,0,"2699",18.7875,,"C",,,
-3,1,"Healy, Miss. Hanora ""Nora""","female",,0,0,"370375",7.7500,,"Q","16",,
-3,1,"Hedman, Mr. Oskar Arvid","male",27,0,0,"347089",6.9750,,"S","15",,
-3,1,"Hee, Mr. Ling","male",,0,0,"1601",56.4958,,"S","C",,
-3,0,"Hegarty, Miss. Hanora ""Nora""","female",18,0,0,"365226",6.7500,,"Q",,,
-3,1,"Heikkinen, Miss. Laina","female",26,0,0,"STON/O2. 3101282",7.9250,,"S",,,
-3,0,"Heininen, Miss. Wendla Maria","female",23,0,0,"STON/O2. 3101290",7.9250,,"S",,,
-3,1,"Hellstrom, Miss. Hilda Maria","female",22,0,0,"7548",8.9625,,"S","C",,
-3,0,"Hendekovic, Mr. Ignjac","male",28,0,0,"349243",7.8958,,"S",,"306",
-3,0,"Henriksson, Miss. Jenny Lovisa","female",28,0,0,"347086",7.7750,,"S",,,
-3,0,"Henry, Miss. Delia","female",,0,0,"382649",7.7500,,"Q",,,
-3,1,"Hirvonen, Miss. Hildur E","female",2,0,1,"3101298",12.2875,,"S","15",,
-3,1,"Hirvonen, Mrs. Alexander (Helga E Lindqvist)","female",22,1,1,"3101298",12.2875,,"S","15",,
-3,0,"Holm, Mr. John Fredrik Alexander","male",43,0,0,"C 7075",6.4500,,"S",,,
-3,0,"Holthen, Mr. Johan Martin","male",28,0,0,"C 4001",22.5250,,"S",,,
-3,1,"Honkanen, Miss. Eliina","female",27,0,0,"STON/O2. 3101283",7.9250,,"S",,,
-3,0,"Horgan, Mr. John","male",,0,0,"370377",7.7500,,"Q",,,
-3,1,"Howard, Miss. May Elizabeth","female",,0,0,"A. 2. 39186",8.0500,,"S","C",,
-3,0,"Humblen, Mr. Adolf Mathias Nicolai Olsen","male",42,0,0,"348121",7.6500,"F G63","S",,"120",
-3,1,"Hyman, Mr. Abraham","male",,0,0,"3470",7.8875,,"S","C",,
-3,0,"Ibrahim Shawah, Mr. Yousseff","male",30,0,0,"2685",7.2292,,"C",,,
-3,0,"Ilieff, Mr. Ylio","male",,0,0,"349220",7.8958,,"S",,,
-3,0,"Ilmakangas, Miss. Ida Livija","female",27,1,0,"STON/O2. 3101270",7.9250,,"S",,,
-3,0,"Ilmakangas, Miss. Pieta Sofia","female",25,1,0,"STON/O2. 3101271",7.9250,,"S",,,
-3,0,"Ivanoff, Mr. Kanio","male",,0,0,"349201",7.8958,,"S",,,
-3,1,"Jalsevac, Mr. Ivan","male",29,0,0,"349240",7.8958,,"C","15",,
-3,1,"Jansson, Mr. Carl Olof","male",21,0,0,"350034",7.7958,,"S","A",,
-3,0,"Jardin, Mr. Jose Neto","male",,0,0,"SOTON/O.Q. 3101305",7.0500,,"S",,,
-3,0,"Jensen, Mr. Hans Peder","male",20,0,0,"350050",7.8542,,"S",,,
-3,0,"Jensen, Mr. Niels Peder","male",48,0,0,"350047",7.8542,,"S",,,
-3,0,"Jensen, Mr. Svend Lauritz","male",17,1,0,"350048",7.0542,,"S",,,
-3,1,"Jermyn, Miss. Annie","female",,0,0,"14313",7.7500,,"Q","D",,
-3,1,"Johannesen-Bratthammer, Mr. Bernt","male",,0,0,"65306",8.1125,,"S","13",,
-3,0,"Johanson, Mr. Jakob Alfred","male",34,0,0,"3101264",6.4958,,"S",,"143",
-3,1,"Johansson Palmquist, Mr. Oskar Leander","male",26,0,0,"347070",7.7750,,"S","15",,
-3,0,"Johansson, Mr. Erik","male",22,0,0,"350052",7.7958,,"S",,"156",
-3,0,"Johansson, Mr. Gustaf Joel","male",33,0,0,"7540",8.6542,,"S",,"285",
-3,0,"Johansson, Mr. Karl Johan","male",31,0,0,"347063",7.7750,,"S",,,
-3,0,"Johansson, Mr. Nils","male",29,0,0,"347467",7.8542,,"S",,,
-3,1,"Johnson, Master. Harold Theodor","male",4,1,1,"347742",11.1333,,"S","15",,
-3,1,"Johnson, Miss. Eleanor Ileen","female",1,1,1,"347742",11.1333,,"S","15",,
-3,0,"Johnson, Mr. Alfred","male",49,0,0,"LINE",0.0000,,"S",,,
-3,0,"Johnson, Mr. Malkolm Joackim","male",33,0,0,"347062",7.7750,,"S",,"37",
-3,0,"Johnson, Mr. William Cahoone Jr","male",19,0,0,"LINE",0.0000,,"S",,,
-3,1,"Johnson, Mrs. Oscar W (Elisabeth Vilhelmina Berg)","female",27,0,2,"347742",11.1333,,"S","15",,
-3,0,"Johnston, Master. William Arthur ""Willie""","male",,1,2,"W./C. 6607",23.4500,,"S",,,
-3,0,"Johnston, Miss. Catherine Helen ""Carrie""","female",,1,2,"W./C. 6607",23.4500,,"S",,,
-3,0,"Johnston, Mr. Andrew G","male",,1,2,"W./C. 6607",23.4500,,"S",,,
-3,0,"Johnston, Mrs. Andrew G (Elizabeth ""Lily"" Watson)","female",,1,2,"W./C. 6607",23.4500,,"S",,,
-3,0,"Jonkoff, Mr. Lalio","male",23,0,0,"349204",7.8958,,"S",,,
-3,1,"Jonsson, Mr. Carl","male",32,0,0,"350417",7.8542,,"S","15",,
-3,0,"Jonsson, Mr. Nils Hilding","male",27,0,0,"350408",7.8542,,"S",,,
-3,0,"Jussila, Miss. Katriina","female",20,1,0,"4136",9.8250,,"S",,,
-3,0,"Jussila, Miss. Mari Aina","female",21,1,0,"4137",9.8250,,"S",,,
-3,1,"Jussila, Mr. Eiriik","male",32,0,0,"STON/O 2. 3101286",7.9250,,"S","15",,
-3,0,"Kallio, Mr. Nikolai Erland","male",17,0,0,"STON/O 2. 3101274",7.1250,,"S",,,
-3,0,"Kalvik, Mr. Johannes Halvorsen","male",21,0,0,"8475",8.4333,,"S",,,
-3,0,"Karaic, Mr. Milan","male",30,0,0,"349246",7.8958,,"S",,,
-3,1,"Karlsson, Mr. Einar Gervasius","male",21,0,0,"350053",7.7958,,"S","13",,
-3,0,"Karlsson, Mr. Julius Konrad Eugen","male",33,0,0,"347465",7.8542,,"S",,,
-3,0,"Karlsson, Mr. Nils August","male",22,0,0,"350060",7.5208,,"S",,,
-3,1,"Karun, Miss. Manca","female",4,0,1,"349256",13.4167,,"C","15",,
-3,1,"Karun, Mr. Franz","male",39,0,1,"349256",13.4167,,"C","15",,
-3,0,"Kassem, Mr. Fared","male",,0,0,"2700",7.2292,,"C",,,
-3,0,"Katavelas, Mr. Vassilios (""Catavelas Vassilios"")","male",18.5,0,0,"2682",7.2292,,"C",,"58",
-3,0,"Keane, Mr. Andrew ""Andy""","male",,0,0,"12460",7.7500,,"Q",,,
-3,0,"Keefe, Mr. Arthur","male",,0,0,"323592",7.2500,,"S","A",,
-3,1,"Kelly, Miss. Anna Katherine ""Annie Kate""","female",,0,0,"9234",7.7500,,"Q","16",,
-3,1,"Kelly, Miss. Mary","female",,0,0,"14312",7.7500,,"Q","D",,
-3,0,"Kelly, Mr. James","male",34.5,0,0,"330911",7.8292,,"Q",,"70",
-3,0,"Kelly, Mr. James","male",44,0,0,"363592",8.0500,,"S",,,
-3,1,"Kennedy, Mr. John","male",,0,0,"368783",7.7500,,"Q",,,
-3,0,"Khalil, Mr. Betros","male",,1,0,"2660",14.4542,,"C",,,
-3,0,"Khalil, Mrs. Betros (Zahie ""Maria"" Elias)","female",,1,0,"2660",14.4542,,"C",,,
-3,0,"Kiernan, Mr. John","male",,1,0,"367227",7.7500,,"Q",,,
-3,0,"Kiernan, Mr. Philip","male",,1,0,"367229",7.7500,,"Q",,,
-3,0,"Kilgannon, Mr. Thomas J","male",,0,0,"36865",7.7375,,"Q",,,
-3,0,"Kink, Miss. Maria","female",22,2,0,"315152",8.6625,,"S",,,
-3,0,"Kink, Mr. Vincenz","male",26,2,0,"315151",8.6625,,"S",,,
-3,1,"Kink-Heilmann, Miss. Luise Gretchen","female",4,0,2,"315153",22.0250,,"S","2",,
-3,1,"Kink-Heilmann, Mr. Anton","male",29,3,1,"315153",22.0250,,"S","2",,
-3,1,"Kink-Heilmann, Mrs. Anton (Luise Heilmann)","female",26,1,1,"315153",22.0250,,"S","2",,
-3,0,"Klasen, Miss. Gertrud Emilia","female",1,1,1,"350405",12.1833,,"S",,,
-3,0,"Klasen, Mr. Klas Albin","male",18,1,1,"350404",7.8542,,"S",,,
-3,0,"Klasen, Mrs. (Hulda Kristina Eugenia Lofqvist)","female",36,0,2,"350405",12.1833,,"S",,,
-3,0,"Kraeff, Mr. Theodor","male",,0,0,"349253",7.8958,,"C",,,
-3,1,"Krekorian, Mr. Neshan","male",25,0,0,"2654",7.2292,"F E57","C","10",,
-3,0,"Lahoud, Mr. Sarkis","male",,0,0,"2624",7.2250,,"C",,,
-3,0,"Laitinen, Miss. Kristina Sofia","female",37,0,0,"4135",9.5875,,"S",,,
-3,0,"Laleff, Mr. Kristo","male",,0,0,"349217",7.8958,,"S",,,
-3,1,"Lam, Mr. Ali","male",,0,0,"1601",56.4958,,"S","C",,
-3,0,"Lam, Mr. Len","male",,0,0,"1601",56.4958,,"S",,,
-3,1,"Landergren, Miss. Aurora Adelia","female",22,0,0,"C 7077",7.2500,,"S","13",,
-3,0,"Lane, Mr. Patrick","male",,0,0,"7935",7.7500,,"Q",,,
-3,1,"Lang, Mr. Fang","male",26,0,0,"1601",56.4958,,"S","14",,
-3,0,"Larsson, Mr. August Viktor","male",29,0,0,"7545",9.4833,,"S",,,
-3,0,"Larsson, Mr. Bengt Edvin","male",29,0,0,"347067",7.7750,,"S",,,
-3,0,"Larsson-Rondberg, Mr. Edvard A","male",22,0,0,"347065",7.7750,,"S",,,
-3,1,"Leeni, Mr. Fahim (""Philip Zenni"")","male",22,0,0,"2620",7.2250,,"C","6",,
-3,0,"Lefebre, Master. Henry Forbes","male",,3,1,"4133",25.4667,,"S",,,
-3,0,"Lefebre, Miss. Ida","female",,3,1,"4133",25.4667,,"S",,,
-3,0,"Lefebre, Miss. Jeannie","female",,3,1,"4133",25.4667,,"S",,,
-3,0,"Lefebre, Miss. Mathilde","female",,3,1,"4133",25.4667,,"S",,,
-3,0,"Lefebre, Mrs. Frank (Frances)","female",,0,4,"4133",25.4667,,"S",,,
-3,0,"Leinonen, Mr. Antti Gustaf","male",32,0,0,"STON/O 2. 3101292",7.9250,,"S",,,
-3,0,"Lemberopolous, Mr. Peter L","male",34.5,0,0,"2683",6.4375,,"C",,"196",
-3,0,"Lennon, Miss. Mary","female",,1,0,"370371",15.5000,,"Q",,,
-3,0,"Lennon, Mr. Denis","male",,1,0,"370371",15.5000,,"Q",,,
-3,0,"Leonard, Mr. Lionel","male",36,0,0,"LINE",0.0000,,"S",,,
-3,0,"Lester, Mr. James","male",39,0,0,"A/4 48871",24.1500,,"S",,,
-3,0,"Lievens, Mr. Rene Aime","male",24,0,0,"345781",9.5000,,"S",,,
-3,0,"Lindahl, Miss. Agda Thorilda Viktoria","female",25,0,0,"347071",7.7750,,"S",,,
-3,0,"Lindblom, Miss. Augusta Charlotta","female",45,0,0,"347073",7.7500,,"S",,,
-3,0,"Lindell, Mr. Edvard Bengtsson","male",36,1,0,"349910",15.5500,,"S","A",,
-3,0,"Lindell, Mrs. Edvard Bengtsson (Elin Gerda Persson)","female",30,1,0,"349910",15.5500,,"S","A",,
-3,1,"Lindqvist, Mr. Eino William","male",20,1,0,"STON/O 2. 3101285",7.9250,,"S","15",,
-3,0,"Linehan, Mr. Michael","male",,0,0,"330971",7.8792,,"Q",,,
-3,0,"Ling, Mr. Lee","male",28,0,0,"1601",56.4958,,"S",,,
-3,0,"Lithman, Mr. Simon","male",,0,0,"S.O./P.P. 251",7.5500,,"S",,,
-3,0,"Lobb, Mr. William Arthur","male",30,1,0,"A/5. 3336",16.1000,,"S",,,
-3,0,"Lobb, Mrs. William Arthur (Cordelia K Stanlick)","female",26,1,0,"A/5. 3336",16.1000,,"S",,,
-3,0,"Lockyer, Mr. Edward","male",,0,0,"1222",7.8792,,"S",,"153",
-3,0,"Lovell, Mr. John Hall (""Henry"")","male",20.5,0,0,"A/5 21173",7.2500,,"S",,,
-3,1,"Lulic, Mr. Nikola","male",27,0,0,"315098",8.6625,,"S","15",,
-3,0,"Lundahl, Mr. Johan Svensson","male",51,0,0,"347743",7.0542,,"S",,,
-3,1,"Lundin, Miss. Olga Elida","female",23,0,0,"347469",7.8542,,"S","10",,
-3,1,"Lundstrom, Mr. Thure Edvin","male",32,0,0,"350403",7.5792,,"S","15",,
-3,0,"Lyntakoff, Mr. Stanko","male",,0,0,"349235",7.8958,,"S",,,
-3,0,"MacKay, Mr. George William","male",,0,0,"C.A. 42795",7.5500,,"S",,,
-3,1,"Madigan, Miss. Margaret ""Maggie""","female",,0,0,"370370",7.7500,,"Q","15",,
-3,1,"Madsen, Mr. Fridtjof Arne","male",24,0,0,"C 17369",7.1417,,"S","13",,
-3,0,"Maenpaa, Mr. Matti Alexanteri","male",22,0,0,"STON/O 2. 3101275",7.1250,,"S",,,
-3,0,"Mahon, Miss. Bridget Delia","female",,0,0,"330924",7.8792,,"Q",,,
-3,0,"Mahon, Mr. John","male",,0,0,"AQ/4 3130",7.7500,,"Q",,,
-3,0,"Maisner, Mr. Simon","male",,0,0,"A/S 2816",8.0500,,"S",,,
-3,0,"Makinen, Mr. Kalle Edvard","male",29,0,0,"STON/O 2. 3101268",7.9250,,"S",,,
-3,1,"Mamee, Mr. Hanna","male",,0,0,"2677",7.2292,,"C","15",,
-3,0,"Mangan, Miss. Mary","female",30.5,0,0,"364850",7.7500,,"Q",,"61",
-3,1,"Mannion, Miss. Margareth","female",,0,0,"36866",7.7375,,"Q","16",,
-3,0,"Mardirosian, Mr. Sarkis","male",,0,0,"2655",7.2292,"F E46","C",,,
-3,0,"Markoff, Mr. Marin","male",35,0,0,"349213",7.8958,,"C",,,
-3,0,"Markun, Mr. Johann","male",33,0,0,"349257",7.8958,,"S",,,
-3,1,"Masselmani, Mrs. Fatima","female",,0,0,"2649",7.2250,,"C","C",,
-3,0,"Matinoff, Mr. Nicola","male",,0,0,"349255",7.8958,,"C",,,
-3,1,"McCarthy, Miss. Catherine ""Katie""","female",,0,0,"383123",7.7500,,"Q","15 16",,
-3,1,"McCormack, Mr. Thomas Joseph","male",,0,0,"367228",7.7500,,"Q",,,
-3,1,"McCoy, Miss. Agnes","female",,2,0,"367226",23.2500,,"Q","16",,
-3,1,"McCoy, Miss. Alicia","female",,2,0,"367226",23.2500,,"Q","16",,
-3,1,"McCoy, Mr. Bernard","male",,2,0,"367226",23.2500,,"Q","16",,
-3,1,"McDermott, Miss. Brigdet Delia","female",,0,0,"330932",7.7875,,"Q","13",,
-3,0,"McEvoy, Mr. Michael","male",,0,0,"36568",15.5000,,"Q",,,
-3,1,"McGovern, Miss. Mary","female",,0,0,"330931",7.8792,,"Q","13",,
-3,1,"McGowan, Miss. Anna ""Annie""","female",15,0,0,"330923",8.0292,,"Q",,,
-3,0,"McGowan, Miss. Katherine","female",35,0,0,"9232",7.7500,,"Q",,,
-3,0,"McMahon, Mr. Martin","male",,0,0,"370372",7.7500,,"Q",,,
-3,0,"McNamee, Mr. Neal","male",24,1,0,"376566",16.1000,,"S",,,
-3,0,"McNamee, Mrs. Neal (Eileen O'Leary)","female",19,1,0,"376566",16.1000,,"S",,"53",
-3,0,"McNeill, Miss. Bridget","female",,0,0,"370368",7.7500,,"Q",,,
-3,0,"Meanwell, Miss. (Marion Ogden)","female",,0,0,"SOTON/O.Q. 392087",8.0500,,"S",,,
-3,0,"Meek, Mrs. Thomas (Annie Louise Rowley)","female",,0,0,"343095",8.0500,,"S",,,
-3,0,"Meo, Mr. Alfonzo","male",55.5,0,0,"A.5. 11206",8.0500,,"S",,"201",
-3,0,"Mernagh, Mr. Robert","male",,0,0,"368703",7.7500,,"Q",,,
-3,1,"Midtsjo, Mr. Karl Albert","male",21,0,0,"345501",7.7750,,"S","15",,
-3,0,"Miles, Mr. Frank","male",,0,0,"359306",8.0500,,"S",,,
-3,0,"Mineff, Mr. Ivan","male",24,0,0,"349233",7.8958,,"S",,,
-3,0,"Minkoff, Mr. Lazar","male",21,0,0,"349211",7.8958,,"S",,,
-3,0,"Mionoff, Mr. Stoytcho","male",28,0,0,"349207",7.8958,,"S",,,
-3,0,"Mitkoff, Mr. Mito","male",,0,0,"349221",7.8958,,"S",,,
-3,1,"Mockler, Miss. Helen Mary ""Ellie""","female",,0,0,"330980",7.8792,,"Q","16",,
-3,0,"Moen, Mr. Sigurd Hansen","male",25,0,0,"348123",7.6500,"F G73","S",,"309",
-3,1,"Moor, Master. Meier","male",6,0,1,"392096",12.4750,"E121","S","14",,
-3,1,"Moor, Mrs. (Beila)","female",27,0,1,"392096",12.4750,"E121","S","14",,
-3,0,"Moore, Mr. Leonard Charles","male",,0,0,"A4. 54510",8.0500,,"S",,,
-3,1,"Moran, Miss. Bertha","female",,1,0,"371110",24.1500,,"Q","16",,
-3,0,"Moran, Mr. Daniel J","male",,1,0,"371110",24.1500,,"Q",,,
-3,0,"Moran, Mr. James","male",,0,0,"330877",8.4583,,"Q",,,
-3,0,"Morley, Mr. William","male",34,0,0,"364506",8.0500,,"S",,,
-3,0,"Morrow, Mr. Thomas Rowan","male",,0,0,"372622",7.7500,,"Q",,,
-3,1,"Moss, Mr. Albert Johan","male",,0,0,"312991",7.7750,,"S","B",,
-3,1,"Moubarek, Master. Gerios","male",,1,1,"2661",15.2458,,"C","C",,
-3,1,"Moubarek, Master. Halim Gonios (""William George"")","male",,1,1,"2661",15.2458,,"C","C",,
-3,1,"Moubarek, Mrs. George (Omine ""Amenia"" Alexander)","female",,0,2,"2661",15.2458,,"C","C",,
-3,1,"Moussa, Mrs. (Mantoura Boulos)","female",,0,0,"2626",7.2292,,"C",,,
-3,0,"Moutal, Mr. Rahamin Haim","male",,0,0,"374746",8.0500,,"S",,,
-3,1,"Mullens, Miss. Katherine ""Katie""","female",,0,0,"35852",7.7333,,"Q","16",,
-3,1,"Mulvihill, Miss. Bertha E","female",24,0,0,"382653",7.7500,,"Q","15",,
-3,0,"Murdlin, Mr. Joseph","male",,0,0,"A./5. 3235",8.0500,,"S",,,
-3,1,"Murphy, Miss. Katherine ""Kate""","female",,1,0,"367230",15.5000,,"Q","16",,
-3,1,"Murphy, Miss. Margaret Jane","female",,1,0,"367230",15.5000,,"Q","16",,
-3,1,"Murphy, Miss. Nora","female",,0,0,"36568",15.5000,,"Q","16",,
-3,0,"Myhrman, Mr. Pehr Fabian Oliver Malkolm","male",18,0,0,"347078",7.7500,,"S",,,
-3,0,"Naidenoff, Mr. Penko","male",22,0,0,"349206",7.8958,,"S",,,
-3,1,"Najib, Miss. Adele Kiamie ""Jane""","female",15,0,0,"2667",7.2250,,"C","C",,
-3,1,"Nakid, Miss. Maria (""Mary"")","female",1,0,2,"2653",15.7417,,"C","C",,
-3,1,"Nakid, Mr. Sahid","male",20,1,1,"2653",15.7417,,"C","C",,
-3,1,"Nakid, Mrs. Said (Waika ""Mary"" Mowad)","female",19,1,1,"2653",15.7417,,"C","C",,
-3,0,"Nancarrow, Mr. William Henry","male",33,0,0,"A./5. 3338",8.0500,,"S",,,
-3,0,"Nankoff, Mr. Minko","male",,0,0,"349218",7.8958,,"S",,,
-3,0,"Nasr, Mr. Mustafa","male",,0,0,"2652",7.2292,,"C",,,
-3,0,"Naughton, Miss. Hannah","female",,0,0,"365237",7.7500,,"Q",,,
-3,0,"Nenkoff, Mr. Christo","male",,0,0,"349234",7.8958,,"S",,,
-3,1,"Nicola-Yarred, Master. Elias","male",12,1,0,"2651",11.2417,,"C","C",,
-3,1,"Nicola-Yarred, Miss. Jamila","female",14,1,0,"2651",11.2417,,"C","C",,
-3,0,"Nieminen, Miss. Manta Josefina","female",29,0,0,"3101297",7.9250,,"S",,,
-3,0,"Niklasson, Mr. Samuel","male",28,0,0,"363611",8.0500,,"S",,,
-3,1,"Nilsson, Miss. Berta Olivia","female",18,0,0,"347066",7.7750,,"S","D",,
-3,1,"Nilsson, Miss. Helmina Josefina","female",26,0,0,"347470",7.8542,,"S","13",,
-3,0,"Nilsson, Mr. August Ferdinand","male",21,0,0,"350410",7.8542,,"S",,,
-3,0,"Nirva, Mr. Iisakki Antino Aijo","male",41,0,0,"SOTON/O2 3101272",7.1250,,"S",,,"Finland Sudbury, ON"
-3,1,"Niskanen, Mr. Juha","male",39,0,0,"STON/O 2. 3101289",7.9250,,"S","9",,
-3,0,"Nosworthy, Mr. Richard Cater","male",21,0,0,"A/4. 39886",7.8000,,"S",,,
-3,0,"Novel, Mr. Mansouer","male",28.5,0,0,"2697",7.2292,,"C",,"181",
-3,1,"Nysten, Miss. Anna Sofia","female",22,0,0,"347081",7.7500,,"S","13",,
-3,0,"Nysveen, Mr. Johan Hansen","male",61,0,0,"345364",6.2375,,"S",,,
-3,0,"O'Brien, Mr. Thomas","male",,1,0,"370365",15.5000,,"Q",,,
-3,0,"O'Brien, Mr. Timothy","male",,0,0,"330979",7.8292,,"Q",,,
-3,1,"O'Brien, Mrs. Thomas (Johanna ""Hannah"" Godfrey)","female",,1,0,"370365",15.5000,,"Q",,,
-3,0,"O'Connell, Mr. Patrick D","male",,0,0,"334912",7.7333,,"Q",,,
-3,0,"O'Connor, Mr. Maurice","male",,0,0,"371060",7.7500,,"Q",,,
-3,0,"O'Connor, Mr. Patrick","male",,0,0,"366713",7.7500,,"Q",,,
-3,0,"Odahl, Mr. Nils Martin","male",23,0,0,"7267",9.2250,,"S",,,
-3,0,"O'Donoghue, Ms. Bridget","female",,0,0,"364856",7.7500,,"Q",,,
-3,1,"O'Driscoll, Miss. Bridget","female",,0,0,"14311",7.7500,,"Q","D",,
-3,1,"O'Dwyer, Miss. Ellen ""Nellie""","female",,0,0,"330959",7.8792,,"Q",,,
-3,1,"Ohman, Miss. Velin","female",22,0,0,"347085",7.7750,,"S","C",,
-3,1,"O'Keefe, Mr. Patrick","male",,0,0,"368402",7.7500,,"Q","B",,
-3,1,"O'Leary, Miss. Hanora ""Norah""","female",,0,0,"330919",7.8292,,"Q","13",,
-3,1,"Olsen, Master. Artur Karl","male",9,0,1,"C 17368",3.1708,,"S","13",,
-3,0,"Olsen, Mr. Henry Margido","male",28,0,0,"C 4001",22.5250,,"S",,"173",
-3,0,"Olsen, Mr. Karl Siegwart Andreas","male",42,0,1,"4579",8.4042,,"S",,,
-3,0,"Olsen, Mr. Ole Martin","male",,0,0,"Fa 265302",7.3125,,"S",,,
-3,0,"Olsson, Miss. Elina","female",31,0,0,"350407",7.8542,,"S",,,
-3,0,"Olsson, Mr. Nils Johan Goransson","male",28,0,0,"347464",7.8542,,"S",,,
-3,1,"Olsson, Mr. Oscar Wilhelm","male",32,0,0,"347079",7.7750,,"S","A",,
-3,0,"Olsvigen, Mr. Thor Anderson","male",20,0,0,"6563",9.2250,,"S",,"89","Oslo, Norway Cameron, WI"
-3,0,"Oreskovic, Miss. Jelka","female",23,0,0,"315085",8.6625,,"S",,,
-3,0,"Oreskovic, Miss. Marija","female",20,0,0,"315096",8.6625,,"S",,,
-3,0,"Oreskovic, Mr. Luka","male",20,0,0,"315094",8.6625,,"S",,,
-3,0,"Osen, Mr. Olaf Elon","male",16,0,0,"7534",9.2167,,"S",,,
-3,1,"Osman, Mrs. Mara","female",31,0,0,"349244",8.6833,,"S",,,
-3,0,"O'Sullivan, Miss. Bridget Mary","female",,0,0,"330909",7.6292,,"Q",,,
-3,0,"Palsson, Master. Gosta Leonard","male",2,3,1,"349909",21.0750,,"S",,"4",
-3,0,"Palsson, Master. Paul Folke","male",6,3,1,"349909",21.0750,,"S",,,
-3,0,"Palsson, Miss. Stina Viola","female",3,3,1,"349909",21.0750,,"S",,,
-3,0,"Palsson, Miss. Torborg Danira","female",8,3,1,"349909",21.0750,,"S",,,
-3,0,"Palsson, Mrs. Nils (Alma Cornelia Berglund)","female",29,0,4,"349909",21.0750,,"S",,"206",
-3,0,"Panula, Master. Eino Viljami","male",1,4,1,"3101295",39.6875,,"S",,,
-3,0,"Panula, Master. Juha Niilo","male",7,4,1,"3101295",39.6875,,"S",,,
-3,0,"Panula, Master. Urho Abraham","male",2,4,1,"3101295",39.6875,,"S",,,
-3,0,"Panula, Mr. Ernesti Arvid","male",16,4,1,"3101295",39.6875,,"S",,,
-3,0,"Panula, Mr. Jaako Arnold","male",14,4,1,"3101295",39.6875,,"S",,,
-3,0,"Panula, Mrs. Juha (Maria Emilia Ojala)","female",41,0,5,"3101295",39.6875,,"S",,,
-3,0,"Pasic, Mr. Jakob","male",21,0,0,"315097",8.6625,,"S",,,
-3,0,"Patchett, Mr. George","male",19,0,0,"358585",14.5000,,"S",,,
-3,0,"Paulner, Mr. Uscher","male",,0,0,"3411",8.7125,,"C",,,
-3,0,"Pavlovic, Mr. Stefo","male",32,0,0,"349242",7.8958,,"S",,,
-3,0,"Peacock, Master. Alfred Edward","male",0.75,1,1,"SOTON/O.Q. 3101315",13.7750,,"S",,,
-3,0,"Peacock, Miss. Treasteall","female",3,1,1,"SOTON/O.Q. 3101315",13.7750,,"S",,,
-3,0,"Peacock, Mrs. Benjamin (Edith Nile)","female",26,0,2,"SOTON/O.Q. 3101315",13.7750,,"S",,,
-3,0,"Pearce, Mr. Ernest","male",,0,0,"343271",7.0000,,"S",,,
-3,0,"Pedersen, Mr. Olaf","male",,0,0,"345498",7.7750,,"S",,,
-3,0,"Peduzzi, Mr. Joseph","male",,0,0,"A/5 2817",8.0500,,"S",,,
-3,0,"Pekoniemi, Mr. Edvard","male",21,0,0,"STON/O 2. 3101294",7.9250,,"S",,,
-3,0,"Peltomaki, Mr. Nikolai Johannes","male",25,0,0,"STON/O 2. 3101291",7.9250,,"S",,,
-3,0,"Perkin, Mr. John Henry","male",22,0,0,"A/5 21174",7.2500,,"S",,,
-3,1,"Persson, Mr. Ernst Ulrik","male",25,1,0,"347083",7.7750,,"S","15",,
-3,1,"Peter, Master. Michael J","male",,1,1,"2668",22.3583,,"C","C",,
-3,1,"Peter, Miss. Anna","female",,1,1,"2668",22.3583,"F E69","C","D",,
-3,1,"Peter, Mrs. Catherine (Catherine Rizk)","female",,0,2,"2668",22.3583,,"C","D",,
-3,0,"Peters, Miss. Katie","female",,0,0,"330935",8.1375,,"Q",,,
-3,0,"Petersen, Mr. Marius","male",24,0,0,"342441",8.0500,,"S",,,
-3,0,"Petranec, Miss. Matilda","female",28,0,0,"349245",7.8958,,"S",,,
-3,0,"Petroff, Mr. Nedelio","male",19,0,0,"349212",7.8958,,"S",,,
-3,0,"Petroff, Mr. Pastcho (""Pentcho"")","male",,0,0,"349215",7.8958,,"S",,,
-3,0,"Petterson, Mr. Johan Emil","male",25,1,0,"347076",7.7750,,"S",,,
-3,0,"Pettersson, Miss. Ellen Natalia","female",18,0,0,"347087",7.7750,,"S",,,
-3,1,"Pickard, Mr. Berk (Berk Trembisky)","male",32,0,0,"SOTON/O.Q. 392078",8.0500,"E10","S","9",,
-3,0,"Plotcharsky, Mr. Vasil","male",,0,0,"349227",7.8958,,"S",,,
-3,0,"Pokrnic, Mr. Mate","male",17,0,0,"315095",8.6625,,"S",,,
-3,0,"Pokrnic, Mr. Tome","male",24,0,0,"315092",8.6625,,"S",,,
-3,0,"Radeff, Mr. Alexander","male",,0,0,"349223",7.8958,,"S",,,
-3,0,"Rasmussen, Mrs. (Lena Jacobsen Solvang)","female",,0,0,"65305",8.1125,,"S",,,
-3,0,"Razi, Mr. Raihed","male",,0,0,"2629",7.2292,,"C",,,
-3,0,"Reed, Mr. James George","male",,0,0,"362316",7.2500,,"S",,,
-3,0,"Rekic, Mr. Tido","male",38,0,0,"349249",7.8958,,"S",,,
-3,0,"Reynolds, Mr. Harold J","male",21,0,0,"342684",8.0500,,"S",,,
-3,0,"Rice, Master. Albert","male",10,4,1,"382652",29.1250,,"Q",,,
-3,0,"Rice, Master. Arthur","male",4,4,1,"382652",29.1250,,"Q",,,
-3,0,"Rice, Master. Eric","male",7,4,1,"382652",29.1250,,"Q",,,
-3,0,"Rice, Master. Eugene","male",2,4,1,"382652",29.1250,,"Q",,,
-3,0,"Rice, Master. George Hugh","male",8,4,1,"382652",29.1250,,"Q",,,
-3,0,"Rice, Mrs. William (Margaret Norton)","female",39,0,5,"382652",29.1250,,"Q",,"327",
-3,0,"Riihivouri, Miss. Susanna Juhantytar ""Sanni""","female",22,0,0,"3101295",39.6875,,"S",,,
-3,0,"Rintamaki, Mr. Matti","male",35,0,0,"STON/O 2. 3101273",7.1250,,"S",,,
-3,1,"Riordan, Miss. Johanna ""Hannah""","female",,0,0,"334915",7.7208,,"Q","13",,
-3,0,"Risien, Mr. Samuel Beard","male",,0,0,"364498",14.5000,,"S",,,
-3,0,"Risien, Mrs. Samuel (Emma)","female",,0,0,"364498",14.5000,,"S",,,
-3,0,"Robins, Mr. Alexander A","male",50,1,0,"A/5. 3337",14.5000,,"S",,"119",
-3,0,"Robins, Mrs. Alexander A (Grace Charity Laury)","female",47,1,0,"A/5. 3337",14.5000,,"S",,"7",
-3,0,"Rogers, Mr. William John","male",,0,0,"S.C./A.4. 23567",8.0500,,"S",,,
-3,0,"Rommetvedt, Mr. Knud Paust","male",,0,0,"312993",7.7750,,"S",,,
-3,0,"Rosblom, Miss. Salli Helena","female",2,1,1,"370129",20.2125,,"S",,,
-3,0,"Rosblom, Mr. Viktor Richard","male",18,1,1,"370129",20.2125,,"S",,,
-3,0,"Rosblom, Mrs. Viktor (Helena Wilhelmina)","female",41,0,2,"370129",20.2125,,"S",,,
-3,1,"Roth, Miss. Sarah A","female",,0,0,"342712",8.0500,,"S","C",,
-3,0,"Rouse, Mr. Richard Henry","male",50,0,0,"A/5 3594",8.0500,,"S",,,
-3,0,"Rush, Mr. Alfred George John","male",16,0,0,"A/4. 20589",8.0500,,"S",,,
-3,1,"Ryan, Mr. Edward","male",,0,0,"383162",7.7500,,"Q","14",,
-3,0,"Ryan, Mr. Patrick","male",,0,0,"371110",24.1500,,"Q",,,
-3,0,"Saad, Mr. Amin","male",,0,0,"2671",7.2292,,"C",,,
-3,0,"Saad, Mr. Khalil","male",25,0,0,"2672",7.2250,,"C",,,
-3,0,"Saade, Mr. Jean Nassr","male",,0,0,"2676",7.2250,,"C",,,
-3,0,"Sadlier, Mr. Matthew","male",,0,0,"367655",7.7292,,"Q",,,
-3,0,"Sadowitz, Mr. Harry","male",,0,0,"LP 1588",7.5750,,"S",,,
-3,0,"Saether, Mr. Simon Sivertsen","male",38.5,0,0,"SOTON/O.Q. 3101262",7.2500,,"S",,"32",
-3,0,"Sage, Master. Thomas Henry","male",,8,2,"CA. 2343",69.5500,,"S",,,
-3,0,"Sage, Master. William Henry","male",14.5,8,2,"CA. 2343",69.5500,,"S",,"67",
-3,0,"Sage, Miss. Ada","female",,8,2,"CA. 2343",69.5500,,"S",,,
-3,0,"Sage, Miss. Constance Gladys","female",,8,2,"CA. 2343",69.5500,,"S",,,
-3,0,"Sage, Miss. Dorothy Edith ""Dolly""","female",,8,2,"CA. 2343",69.5500,,"S",,,
-3,0,"Sage, Miss. Stella Anna","female",,8,2,"CA. 2343",69.5500,,"S",,,
-3,0,"Sage, Mr. Douglas Bullen","male",,8,2,"CA. 2343",69.5500,,"S",,,
-3,0,"Sage, Mr. Frederick","male",,8,2,"CA. 2343",69.5500,,"S",,,
-3,0,"Sage, Mr. George John Jr","male",,8,2,"CA. 2343",69.5500,,"S",,,
-3,0,"Sage, Mr. John George","male",,1,9,"CA. 2343",69.5500,,"S",,,
-3,0,"Sage, Mrs. John (Annie Bullen)","female",,1,9,"CA. 2343",69.5500,,"S",,,
-3,0,"Salander, Mr. Karl Johan","male",24,0,0,"7266",9.3250,,"S",,,
-3,1,"Salkjelsvik, Miss. Anna Kristine","female",21,0,0,"343120",7.6500,,"S","C",,
-3,0,"Salonen, Mr. Johan Werner","male",39,0,0,"3101296",7.9250,,"S",,,
-3,0,"Samaan, Mr. Elias","male",,2,0,"2662",21.6792,,"C",,,
-3,0,"Samaan, Mr. Hanna","male",,2,0,"2662",21.6792,,"C",,,
-3,0,"Samaan, Mr. Youssef","male",,2,0,"2662",21.6792,,"C",,,
-3,1,"Sandstrom, Miss. Beatrice Irene","female",1,1,1,"PP 9549",16.7000,"G6","S","13",,
-3,1,"Sandstrom, Mrs. Hjalmar (Agnes Charlotta Bengtsson)","female",24,0,2,"PP 9549",16.7000,"G6","S","13",,
-3,1,"Sandstrom, Miss. Marguerite Rut","female",4,1,1,"PP 9549",16.7000,"G6","S","13",,
-3,1,"Sap, Mr. Julius","male",25,0,0,"345768",9.5000,,"S","11",,
-3,0,"Saundercock, Mr. William Henry","male",20,0,0,"A/5. 2151",8.0500,,"S",,,
-3,0,"Sawyer, Mr. Frederick Charles","male",24.5,0,0,"342826",8.0500,,"S",,"284",
-3,0,"Scanlan, Mr. James","male",,0,0,"36209",7.7250,,"Q",,,
-3,0,"Sdycoff, Mr. Todor","male",,0,0,"349222",7.8958,,"S",,,
-3,0,"Shaughnessy, Mr. Patrick","male",,0,0,"370374",7.7500,,"Q",,,
-3,1,"Sheerlinck, Mr. Jan Baptist","male",29,0,0,"345779",9.5000,,"S","11",,
-3,0,"Shellard, Mr. Frederick William","male",,0,0,"C.A. 6212",15.1000,,"S",,,
-3,1,"Shine, Miss. Ellen Natalia","female",,0,0,"330968",7.7792,,"Q",,,
-3,0,"Shorney, Mr. Charles Joseph","male",,0,0,"374910",8.0500,,"S",,,
-3,0,"Simmons, Mr. John","male",,0,0,"SOTON/OQ 392082",8.0500,,"S",,,
-3,0,"Sirayanian, Mr. Orsen","male",22,0,0,"2669",7.2292,,"C",,,
-3,0,"Sirota, Mr. Maurice","male",,0,0,"392092",8.0500,,"S",,,
-3,0,"Sivic, Mr. Husein","male",40,0,0,"349251",7.8958,,"S",,,
-3,0,"Sivola, Mr. Antti Wilhelm","male",21,0,0,"STON/O 2. 3101280",7.9250,,"S",,,
-3,1,"Sjoblom, Miss. Anna Sofia","female",18,0,0,"3101265",7.4958,,"S","16",,
-3,0,"Skoog, Master. Harald","male",4,3,2,"347088",27.9000,,"S",,,
-3,0,"Skoog, Master. Karl Thorsten","male",10,3,2,"347088",27.9000,,"S",,,
-3,0,"Skoog, Miss. Mabel","female",9,3,2,"347088",27.9000,,"S",,,
-3,0,"Skoog, Miss. Margit Elizabeth","female",2,3,2,"347088",27.9000,,"S",,,
-3,0,"Skoog, Mr. Wilhelm","male",40,1,4,"347088",27.9000,,"S",,,
-3,0,"Skoog, Mrs. William (Anna Bernhardina Karlsson)","female",45,1,4,"347088",27.9000,,"S",,,
-3,0,"Slabenoff, Mr. Petco","male",,0,0,"349214",7.8958,,"S",,,
-3,0,"Slocovski, Mr. Selman Francis","male",,0,0,"SOTON/OQ 392086",8.0500,,"S",,,
-3,0,"Smiljanic, Mr. Mile","male",,0,0,"315037",8.6625,,"S",,,
-3,0,"Smith, Mr. Thomas","male",,0,0,"384461",7.7500,,"Q",,,
-3,1,"Smyth, Miss. Julia","female",,0,0,"335432",7.7333,,"Q","13",,
-3,0,"Soholt, Mr. Peter Andreas Lauritz Andersen","male",19,0,0,"348124",7.6500,"F G73","S",,,
-3,0,"Somerton, Mr. Francis William","male",30,0,0,"A.5. 18509",8.0500,,"S",,,
-3,0,"Spector, Mr. Woolf","male",,0,0,"A.5. 3236",8.0500,,"S",,,
-3,0,"Spinner, Mr. Henry John","male",32,0,0,"STON/OQ. 369943",8.0500,,"S",,,
-3,0,"Staneff, Mr. Ivan","male",,0,0,"349208",7.8958,,"S",,,
-3,0,"Stankovic, Mr. Ivan","male",33,0,0,"349239",8.6625,,"C",,,
-3,1,"Stanley, Miss. Amy Zillah Elsie","female",23,0,0,"CA. 2314",7.5500,,"S","C",,
-3,0,"Stanley, Mr. Edward Roland","male",21,0,0,"A/4 45380",8.0500,,"S",,,
-3,0,"Storey, Mr. Thomas","male",60.5,0,0,"3701",,,"S",,"261",
-3,0,"Stoytcheff, Mr. Ilia","male",19,0,0,"349205",7.8958,,"S",,,
-3,0,"Strandberg, Miss. Ida Sofia","female",22,0,0,"7553",9.8375,,"S",,,
-3,1,"Stranden, Mr. Juho","male",31,0,0,"STON/O 2. 3101288",7.9250,,"S","9",,
-3,0,"Strilic, Mr. Ivan","male",27,0,0,"315083",8.6625,,"S",,,
-3,0,"Strom, Miss. Telma Matilda","female",2,0,1,"347054",10.4625,"G6","S",,,
-3,0,"Strom, Mrs. Wilhelm (Elna Matilda Persson)","female",29,1,1,"347054",10.4625,"G6","S",,,
-3,1,"Sunderland, Mr. Victor Francis","male",16,0,0,"SOTON/OQ 392089",8.0500,,"S","B",,
-3,1,"Sundman, Mr. Johan Julian","male",44,0,0,"STON/O 2. 3101269",7.9250,,"S","15",,
-3,0,"Sutehall, Mr. Henry Jr","male",25,0,0,"SOTON/OQ 392076",7.0500,,"S",,,
-3,0,"Svensson, Mr. Johan","male",74,0,0,"347060",7.7750,,"S",,,
-3,1,"Svensson, Mr. Johan Cervin","male",14,0,0,"7538",9.2250,,"S","13",,
-3,0,"Svensson, Mr. Olof","male",24,0,0,"350035",7.7958,,"S",,,
-3,1,"Tenglin, Mr. Gunnar Isidor","male",25,0,0,"350033",7.7958,,"S","13 15",,
-3,0,"Theobald, Mr. Thomas Leonard","male",34,0,0,"363294",8.0500,,"S",,"176",
-3,1,"Thomas, Master. Assad Alexander","male",0.42,0,1,"2625",8.5167,,"C","16",,
-3,0,"Thomas, Mr. Charles P","male",,1,0,"2621",6.4375,,"C",,,
-3,0,"Thomas, Mr. John","male",,0,0,"2681",6.4375,,"C",,,
-3,0,"Thomas, Mr. Tannous","male",,0,0,"2684",7.2250,,"C",,,
-3,1,"Thomas, Mrs. Alexander (Thamine ""Thelma"")","female",16,1,1,"2625",8.5167,,"C","14",,
-3,0,"Thomson, Mr. Alexander Morrison","male",,0,0,"32302",8.0500,,"S",,,
-3,0,"Thorneycroft, Mr. Percival","male",,1,0,"376564",16.1000,,"S",,,
-3,1,"Thorneycroft, Mrs. Percival (Florence Kate White)","female",,1,0,"376564",16.1000,,"S","10",,
-3,0,"Tikkanen, Mr. Juho","male",32,0,0,"STON/O 2. 3101293",7.9250,,"S",,,
-3,0,"Tobin, Mr. Roger","male",,0,0,"383121",7.7500,"F38","Q",,,
-3,0,"Todoroff, Mr. Lalio","male",,0,0,"349216",7.8958,,"S",,,
-3,0,"Tomlin, Mr. Ernest Portage","male",30.5,0,0,"364499",8.0500,,"S",,"50",
-3,0,"Torber, Mr. Ernst William","male",44,0,0,"364511",8.0500,,"S",,,
-3,0,"Torfa, Mr. Assad","male",,0,0,"2673",7.2292,,"C",,,
-3,1,"Tornquist, Mr. William Henry","male",25,0,0,"LINE",0.0000,,"S","15",,
-3,0,"Toufik, Mr. Nakli","male",,0,0,"2641",7.2292,,"C",,,
-3,1,"Touma, Master. Georges Youssef","male",7,1,1,"2650",15.2458,,"C","C",,
-3,1,"Touma, Miss. Maria Youssef","female",9,1,1,"2650",15.2458,,"C","C",,
-3,1,"Touma, Mrs. Darwis (Hanne Youssef Razi)","female",29,0,2,"2650",15.2458,,"C","C",,
-3,0,"Turcin, Mr. Stjepan","male",36,0,0,"349247",7.8958,,"S",,,
-3,1,"Turja, Miss. Anna Sofia","female",18,0,0,"4138",9.8417,,"S","15",,
-3,1,"Turkula, Mrs. (Hedwig)","female",63,0,0,"4134",9.5875,,"S","15",,
-3,0,"van Billiard, Master. James William","male",,1,1,"A/5. 851",14.5000,,"S",,,
-3,0,"van Billiard, Master. Walter John","male",11.5,1,1,"A/5. 851",14.5000,,"S",,"1",
-3,0,"van Billiard, Mr. Austin Blyler","male",40.5,0,2,"A/5. 851",14.5000,,"S",,"255",
-3,0,"Van Impe, Miss. Catharina","female",10,0,2,"345773",24.1500,,"S",,,
-3,0,"Van Impe, Mr. Jean Baptiste","male",36,1,1,"345773",24.1500,,"S",,,
-3,0,"Van Impe, Mrs. Jean Baptiste (Rosalie Paula Govaert)","female",30,1,1,"345773",24.1500,,"S",,,
-3,0,"van Melkebeke, Mr. Philemon","male",,0,0,"345777",9.5000,,"S",,,
-3,0,"Vande Velde, Mr. Johannes Joseph","male",33,0,0,"345780",9.5000,,"S",,,
-3,0,"Vande Walle, Mr. Nestor Cyriel","male",28,0,0,"345770",9.5000,,"S",,,
-3,0,"Vanden Steen, Mr. Leo Peter","male",28,0,0,"345783",9.5000,,"S",,,
-3,0,"Vander Cruyssen, Mr. Victor","male",47,0,0,"345765",9.0000,,"S",,,
-3,0,"Vander Planke, Miss. Augusta Maria","female",18,2,0,"345764",18.0000,,"S",,,
-3,0,"Vander Planke, Mr. Julius","male",31,3,0,"345763",18.0000,,"S",,,
-3,0,"Vander Planke, Mr. Leo Edmondus","male",16,2,0,"345764",18.0000,,"S",,,
-3,0,"Vander Planke, Mrs. Julius (Emelia Maria Vandemoortele)","female",31,1,0,"345763",18.0000,,"S",,,
-3,1,"Vartanian, Mr. David","male",22,0,0,"2658",7.2250,,"C","13 15",,
-3,0,"Vendel, Mr. Olof Edvin","male",20,0,0,"350416",7.8542,,"S",,,
-3,0,"Vestrom, Miss. Hulda Amanda Adolfina","female",14,0,0,"350406",7.8542,,"S",,,
-3,0,"Vovk, Mr. Janko","male",22,0,0,"349252",7.8958,,"S",,,
-3,0,"Waelens, Mr. Achille","male",22,0,0,"345767",9.0000,,"S",,,"Antwerp, Belgium / Stanton, OH"
-3,0,"Ware, Mr. Frederick","male",,0,0,"359309",8.0500,,"S",,,
-3,0,"Warren, Mr. Charles William","male",,0,0,"C.A. 49867",7.5500,,"S",,,
-3,0,"Webber, Mr. James","male",,0,0,"SOTON/OQ 3101316",8.0500,,"S",,,
-3,0,"Wenzel, Mr. Linhart","male",32.5,0,0,"345775",9.5000,,"S",,"298",
-3,1,"Whabee, Mrs. George Joseph (Shawneene Abi-Saab)","female",38,0,0,"2688",7.2292,,"C","C",,
-3,0,"Widegren, Mr. Carl/Charles Peter","male",51,0,0,"347064",7.7500,,"S",,,
-3,0,"Wiklund, Mr. Jakob Alfred","male",18,1,0,"3101267",6.4958,,"S",,"314",
-3,0,"Wiklund, Mr. Karl Johan","male",21,1,0,"3101266",6.4958,,"S",,,
-3,1,"Wilkes, Mrs. James (Ellen Needs)","female",47,1,0,"363272",7.0000,,"S",,,
-3,0,"Willer, Mr. Aaron (""Abi Weller"")","male",,0,0,"3410",8.7125,,"S",,,
-3,0,"Willey, Mr. Edward","male",,0,0,"S.O./P.P. 751",7.5500,,"S",,,
-3,0,"Williams, Mr. Howard Hugh ""Harry""","male",,0,0,"A/5 2466",8.0500,,"S",,,
-3,0,"Williams, Mr. Leslie","male",28.5,0,0,"54636",16.1000,,"S",,"14",
-3,0,"Windelov, Mr. Einar","male",21,0,0,"SOTON/OQ 3101317",7.2500,,"S",,,
-3,0,"Wirz, Mr. Albert","male",27,0,0,"315154",8.6625,,"S",,"131",
-3,0,"Wiseman, Mr. Phillippe","male",,0,0,"A/4. 34244",7.2500,,"S",,,
-3,0,"Wittevrongel, Mr. Camille","male",36,0,0,"345771",9.5000,,"S",,,
-3,0,"Yasbeck, Mr. Antoni","male",27,1,0,"2659",14.4542,,"C","C",,
-3,1,"Yasbeck, Mrs. Antoni (Selini Alexander)","female",15,1,0,"2659",14.4542,,"C",,,
-3,0,"Youseff, Mr. Gerious","male",45.5,0,0,"2628",7.2250,,"C",,"312",
-3,0,"Yousif, Mr. Wazli","male",,0,0,"2647",7.2250,,"C",,,
-3,0,"Yousseff, Mr. Gerious","male",,0,0,"2627",14.4583,,"C",,,
-3,0,"Zabour, Miss. Hileni","female",14.5,1,0,"2665",14.4542,,"C",,"328",
-3,0,"Zabour, Miss. Thamine","female",,1,0,"2665",14.4542,,"C",,,
-3,0,"Zakarian, Mr. Mapriededer","male",26.5,0,0,"2656",7.2250,,"C",,"304",
-3,0,"Zakarian, Mr. Ortin","male",27,0,0,"2670",7.2250,,"C",,,
-3,0,"Zimmerman, Mr. Leo","male",29,0,0,"315082",7.8750,,"S",,,
From f8f8686d6e127743dcfcc017422a2d701b5abe12 Mon Sep 17 00:00:00 2001
From: Krishna Kaushik <131583096+kRiShNa-429407@users.noreply.github.com>
Date: Fri, 24 May 2024 21:12:48 +0530
Subject: [PATCH 141/405] Update index.md
---
contrib/pandas/index.md | 1 -
1 file changed, 1 deletion(-)
diff --git a/contrib/pandas/index.md b/contrib/pandas/index.md
index d194bfa..c578ade 100644
--- a/contrib/pandas/index.md
+++ b/contrib/pandas/index.md
@@ -2,7 +2,6 @@
- [Pandas Series Vs NumPy ndarray](pandas_series_vs_numpy_ndarray.md)
- [Pandas Introduction and Dataframes in Pandas](Introduction_to_Pandas_Library_and_DataFrames.md)
-- [Importing and Exportin data in pandas](Importing_and_Exporting_Data_in_Pandas.md)
- [Pandas Descriptive Statistics](Descriptive_Statistics.md)
- [Group By Functions with Pandas](GroupBy_Functions_Pandas.md)
- [Excel using Pandas DataFrame](excel_with_pandas.md)
From e6a7ceee0cf230f7d8377f5f19b96a20ac1bfadd Mon Sep 17 00:00:00 2001
From: Ankit Mahato
Date: Fri, 24 May 2024 21:12:54 +0530
Subject: [PATCH 142/405] Update installation_features.md
---
contrib/scipy/installation_features.md | 89 +++++++++++++++++++-------
1 file changed, 66 insertions(+), 23 deletions(-)
diff --git a/contrib/scipy/installation_features.md b/contrib/scipy/installation_features.md
index 33232dc..d541086 100644
--- a/contrib/scipy/installation_features.md
+++ b/contrib/scipy/installation_features.md
@@ -1,13 +1,25 @@
## Installation of Scipy
-### Install using the command:
-#### C:\Users\Your Name>pip install scipy
- You can also use a Python distribution that already has Scipy installed like Anaconda, or Spyder.
+
+You can install scipy using the command:
+
+```
+$ pip install scipy
+```
+
+You can also use a Python distribution that already has Scipy installed like Anaconda, or Spyder.
+
### Importing SciPy
-#### from scipy import constants
+
+```python
+from scipy import constants
+```
+
## Key Features of SciPy
### 1. Numerical Integration
-#### It helps in computing definite or indefinite integrals of functions
-```
+
+It helps in computing definite or indefinite integrals of functions
+
+```python
from scipy import integrate
#Define the function to integrate
@@ -18,13 +30,18 @@ def f(x):
result, error = integrate.quad(f, 0, 1)
print(result)
```
+
#### Output
+
```
0.33333333333333337
```
+
### 2. Optimization
-#### It can be used to minimize or maximize functions, here is an example of minimizing roots of an equation
-```
+
+It can be used to minimize or maximize functions, here is an example of minimizing roots of an equation
+
+```python
from scipy.optimize import minimize
# Define an objective function to minimize
@@ -35,13 +52,18 @@ def objective(x):
result = minimize(objective, x0=0)
print(result.x)
```
+
#### Output
+
```
array([-1.30644012])
```
+
### 3. Linear Algebra
-#### Solving Linear computations
-```
+
+Solving Linear computations
+
+```python
from scipy import linalg
import numpy as np
@@ -55,13 +77,18 @@ b = np.array([5, 6])
x = linalg.solve(A, b)
print(x)
```
+
#### Output
+
```
array([-4. , 4.5])
```
+
### 4. Statistics
-#### Performing statistics functions, like here we'll be distributing the data
-```
+
+Performing statistics functions, like here we'll be distributing the data
+
+```python
from scipy import stats
import numpy as np
@@ -71,9 +98,12 @@ data = stats.norm.rvs(loc=0, scale=1, size=1000)
# Fit a normal distribution to the data
mean, std = stats.norm.fit(data)
```
+
### 5. Signal Processing
-#### To process spectral signals, like EEG or MEG
-```
+
+To process spectral signals, like EEG or MEG
+
+```python
from scipy import signal
import numpy as np
@@ -85,14 +115,21 @@ signal = np.sin(2 * np.pi * 5 * t) + 0.5 * np.random.randn(1000)
b, a = signal.butter(4, 0.1, 'low')
filtered_signal = signal.filtfilt(b, a, signal)
```
+
The various filters applied that are applied here, are a part of signal analysis at a deeper level.
+
### 6. Sparse Matrix
-#### The word ' sparse 'means less, i.e., the data is mostly unused during some operation or analysis. So, to handle this data, a Sparse Matrix is created
-#### There are two types of Sparse Matrices:
-##### 1. CSC: Compressed Sparse Column, it is used for efficient math functions and for column slicing
-##### 2. CSR: Compressed Sparse Row, it is used for fast row slicing
+
+The word ' sparse 'means less, i.e., the data is mostly unused during some operation or analysis. So, to handle this data, a Sparse Matrix is created
+
+There are two types of Sparse Matrices:
+
+1. CSC: Compressed Sparse Column, it is used for efficient math functions and for column slicing
+2. CSR: Compressed Sparse Row, it is used for fast row slicing
+
#### In CSC format
-```
+
+```python
from scipy import sparse
import numpy as np
@@ -104,17 +141,22 @@ values = np.array([1, 2, 1])
sparse_matrix_csc = sparse.csc_matrix((values, (row_indices, col_indices)))
```
+
#### In CSR format
-```
+
+```python
from scipy import sparse
import numpy as np
data = np.array([[0, 0], [0, 1], [2, 0]])
sparse_matrix = sparse.csr_matrix(data)
```
+
### 7. Image Processing
-#### It is used to process the images, like changing dimensions or properties. For example, when you're doing a project on medical imaging, this library is mainly used.
-```
+
+It is used to process the images, like changing dimensions or properties. For example, when you're doing a project on medical imaging, this library is mainly used.
+
+```python
from scipy import ndimage
import matplotlib.pyplot as plt
@@ -127,4 +169,5 @@ blurred_image = ndimage.gaussian_filter(image, sigma=1)
plt.imshow(blurred_image)
plt.show()
```
-#### The gaussian blur is one of the properties of the ' ndimage ' package in SciPy libraries, it used for better understanding of the image.
+
+The gaussian blur is one of the properties of the ' ndimage ' package in SciPy libraries, it used for better understanding of the image.
From ab6428fd59dfae627ff94613cc55b19472b6c500 Mon Sep 17 00:00:00 2001
From: Krishna Kaushik <131583096+kRiShNa-429407@users.noreply.github.com>
Date: Fri, 24 May 2024 21:40:43 +0530
Subject: [PATCH 143/405] Update
Introduction_to_Pandas_Library_and_DataFrames.md
---
...uction_to_Pandas_Library_and_DataFrames.md | 147 +++---------------
1 file changed, 25 insertions(+), 122 deletions(-)
diff --git a/contrib/pandas/Introduction_to_Pandas_Library_and_DataFrames.md b/contrib/pandas/Introduction_to_Pandas_Library_and_DataFrames.md
index 809a155..3552437 100644
--- a/contrib/pandas/Introduction_to_Pandas_Library_and_DataFrames.md
+++ b/contrib/pandas/Introduction_to_Pandas_Library_and_DataFrames.md
@@ -1,8 +1,5 @@
# Introduction_to_Pandas_Library_and_DataFrames
-
-> Content Creator - Krishna Kaushik
-
**As you have learnt Python Programming , now it's time for some applications.**
- Machine Learning and Data Science is the emerging field of today's time , to work in this this field your first step should be `Data Science` as Machine Learning is all about data.
@@ -110,42 +107,15 @@ You can also create a DataFrame by using `pd.DataFrame()` and passing it a Pytho
# Let's create
cars_with_colours = pd.DataFrame({"Cars" : ["BMW","Audi","Thar","Honda"],
"Colour" : ["Black","White","Red","Green"]})
-cars_with_colours
+print(cars_with_colours)
```
-
-
-
-
-
Cars
-
Colour
-
-
-
-
-
0
-
BMW
-
Black
-
-
-
1
-
Audi
-
White
-
-
-
2
-
Thar
-
Red
-
-
-
3
-
Honda
-
Green
-
-
-
-
-
+ Cars Colour
+ 0 BMW Black
+ 1 Audi White
+ 2 Thar Red
+ 3 Honda Green
+
The dictionary key is the `column name` and value are the `column data`.
@@ -194,42 +164,15 @@ age
record = pd.DataFrame({"Student_Name":students ,
"Age" :age})
-record
+print(record)
```
-
-
-
-
-
Student_Name
-
Age
-
-
-
-
-
0
-
Ram
-
19
-
-
-
1
-
Mohan
-
20
-
-
-
2
-
Krishna
-
21
-
-
-
3
-
Shivam
-
24
-
-
-
-
-
+ Student_Name Age
+ 0 Ram 19
+ 1 Mohan 20
+ 2 Krishna 21
+ 3 Shivam 24
+
```python
@@ -269,53 +212,19 @@ record.dtypes
```python
-record.describe() # It only display the results for numeric data
+print(record.describe()) # It only display the results for numeric data
```
-