├── .gitignore ├── 1_Python Core ├── .ipynb_checkpoints │ ├── 10_Searching and Sorting-checkpoint.ipynb │ ├── 11_Swapping Sorting Binary Search-checkpoint.ipynb │ ├── 12_Strings-checkpoint.ipynb │ ├── 13_For Loop-checkpoint.ipynb │ ├── 14_Functions-checkpoint.ipynb │ ├── 15_Functions Part 2-checkpoint.ipynb │ ├── 16_Functions Part 3-checkpoint.ipynb │ ├── 17_Dictionary-checkpoint.ipynb │ ├── 18_Dictionary Part 2-checkpoint.ipynb │ ├── 19_Tuple-checkpoint.ipynb │ ├── 1_Python Basics-checkpoint.ipynb │ ├── 20_Set-checkpoint.ipynb │ ├── 21_Object Orientation-checkpoint.ipynb │ ├── 22_Object Orientation -checkpoint.ipynb │ ├── 23_Object Orientation-checkpoint.ipynb │ ├── 24_Object Orientation-checkpoint.ipynb │ ├── 25_Object Orientation-checkpoint.ipynb │ ├── 27_File Handling-checkpoint.ipynb │ ├── 2_Python Operators-checkpoint.ipynb │ ├── 3_Python Conditional Statements-checkpoint.ipynb │ ├── 4_While Loop-checkpoint.ipynb │ ├── 5_While Loop-checkpoint.ipynb │ ├── 6_While Loop-checkpoint.ipynb │ ├── 7_Git and GitHub-checkpoint.ipynb │ ├── 8_Python Lists-checkpoint.ipynb │ ├── 9_Python Lists Part 2-checkpoint.ipynb │ └── Exception Handling-checkpoint.ipynb ├── 10_Searching and Sorting.ipynb ├── 11_Swapping Sorting Binary Search.ipynb ├── 12_Strings.ipynb ├── 13_For Loop.ipynb ├── 14_Functions.ipynb ├── 15_Functions Part 2.ipynb ├── 16_Functions Part 3.ipynb ├── 17_Dictionary.ipynb ├── 18_Dictionary Part 2.ipynb ├── 19_Tuple.ipynb ├── 1_Python Basics.ipynb ├── 20_Set.ipynb ├── 21_Object Orientation.ipynb ├── 22_Object Orientation .ipynb ├── 23_Object Orientation.ipynb ├── 24_Object Orientation.ipynb ├── 25_Object Orientation.ipynb ├── 26_Exception Handling.ipynb ├── 27_File Handling.ipynb ├── 2_Python Operators.ipynb ├── 3_Python Conditional Statements.ipynb ├── 4_While Loop.ipynb ├── 5_While Loop.ipynb ├── 6_While Loop.ipynb ├── 7_Git and GitHub.ipynb ├── 8_Python Lists.ipynb ├── 9_Python Lists Part 2.ipynb ├── HTML Files │ ├── 10_Searching and Sorting.html │ ├── 11_Swapping Sorting Binary Search.html │ ├── 12_Strings.html │ ├── 13_For Loop.html │ ├── 14_Functions.html │ ├── 15_Functions Part 2.html │ ├── 1_Python Basics.html │ ├── 2_Python Operators.html │ ├── 3_Python Conditional Statements.html │ ├── 4_While Loop.html │ ├── 5_While Loop.html │ ├── 6_While Loop.html │ ├── 8_Python Lists.html │ └── 9_Python Lists Part 2.html ├── indore.txt └── student.txt ├── 2_Data Structures ├── .ipynb_checkpoints │ ├── 28_Stack-checkpoint.ipynb │ └── 29_Queue-checkpoint.ipynb ├── 28_Stack.ipynb └── 29_Queue.ipynb ├── 3_NumPy ├── .ipynb_checkpoints │ ├── 30_NumPy-checkpoint.ipynb │ ├── 31_NumPy-checkpoint.ipynb │ └── 32_NumPy-checkpoint.ipynb ├── 30_NumPy.ipynb ├── 31_NumPy.ipynb ├── 32_NumPy.ipynb └── NumPy Resources │ ├── NumPy Books │ └── NumPy Cookbook, Second Edition.pdf │ ├── NumPy Cheat Sheet │ ├── Numpy_Python_Cheat_Sheet.pdf │ ├── numpy-cheat-sheet.pdf │ └── numpy.pdf │ ├── NumPy Practice Questions │ ├── 1-100 NumPy Exercises for Data Analysis.pdf │ ├── 2-NumPy Exercise 90 Questions.pdf │ ├── 3-Extras From Python to Numpy.pdf │ └── 4-Advance Numpy Python.pdf │ ├── NumPy Reference or Documentation │ ├── NumPy Reference 1.pdf │ └── NumPy Reference 2.pdf │ ├── Reading Assignment-Beyond Numpy Arrays in Python.pdf │ └── Reading Assignment-NumPy project governance.pdf ├── 4_Pandas ├── .ipynb_checkpoints │ ├── 1_Pandas-checkpoint.ipynb │ ├── 2_Pandas-checkpoint.ipynb │ ├── 3_Pandas-checkpoint.ipynb │ └── 4_Pandas-checkpoint.ipynb ├── 33_Pandas.ipynb ├── 34_Pandas.ipynb ├── 35_Pandas.ipynb ├── 36_Pandas.ipynb ├── Data Cleaning With Pandas │ ├── Data Cleaning with Python and Pandas_ Detecting Missing Values.html │ └── Data Cleaning with Python and Pandas_ Detecting Missing Values_files │ │ ├── 144d9ce1fa244416b1fe639df3479279.png │ │ ├── 1944f6f01966afc2a4220ff38af03551.png │ │ ├── 1dd988f3450e97d38b7ee4ce59b13a7b.png │ │ ├── 1f609.svg │ │ ├── 6da3594192d99292b8af9ec579aa679b.jpeg │ │ ├── analytics.js.download │ │ ├── b40769083d3425e5078c130d2b325bc9.png │ │ ├── comment-reply.min.js.download │ │ ├── common.js.download │ │ ├── css │ │ ├── css(1) │ │ ├── css(2) │ │ ├── custom.js(1).download │ │ ├── custom.js.download │ │ ├── custom.min.js.download │ │ ├── d39a6434355dad80f2866382a86826f9.png │ │ ├── d97d7498df8b21e9c62d4df17a6a8e35.png │ │ ├── dashicons.min.css │ │ ├── data-cleaning-from-ibm-analytics.jpg │ │ ├── data-cleaning-with-python-1024x588.jpg │ │ ├── dataoptimal-logo.jpg │ │ ├── ea55ae210aab4775c88a4b3c3a6ee401.jpeg │ │ ├── et-core-unified-15528570293702.min.css │ │ ├── form.js.download │ │ ├── frontend.min.js.download │ │ ├── idle-timer.min.js(1).download │ │ ├── idle-timer.min.js.download │ │ ├── jquery-migrate.min.js.download │ │ ├── jquery.js.download │ │ ├── jquery.uniform.min.js.download │ │ ├── linkid.js.download │ │ ├── non-standard-missing-values.jpg │ │ ├── premade-image-03.png │ │ ├── premade-image-16.png │ │ ├── prism-css.min.css │ │ ├── prism-js.min.js.download │ │ ├── real-estate-data.jpg │ │ ├── standard-missing-values.jpg │ │ ├── style(1).css │ │ ├── style(2).css │ │ ├── style(3).css │ │ ├── style.css │ │ ├── style.min.css │ │ ├── unexpected-missing-values.jpg │ │ ├── wp-embed.min.js.download │ │ └── wp-emoji-release.min.js.download ├── Pandas Books │ ├── Learning pandas.pdf │ └── Mastering Pandas.pdf ├── goa.xlsx ├── indore.csv ├── nyc_weather.csv ├── stock_data.csv ├── stocks_weather.xlsx ├── weather_by_cities.csv ├── weather_data.csv ├── weather_data.xlsx ├── weather_data2.csv └── weather_datamissing.csv ├── 5_Matplotlib ├── .ipynb_checkpoints │ └── 37_Matplotlib-checkpoint.ipynb └── 37_Matplotlib.ipynb ├── 6_Statistics ├── .ipynb_checkpoints │ ├── 38_Statistics-checkpoint.ipynb │ ├── 39_Statistics-checkpoint.ipynb │ ├── 40_Statistics-checkpoint.ipynb │ ├── 41_Statistics -checkpoint.ipynb │ └── 42_Statistics Probability-checkpoint.ipynb ├── 38_Statistics.ipynb ├── 39_Statistics.ipynb ├── 40_Statistics.ipynb ├── 41_Statistics .ipynb ├── 42_Statistics Probability.ipynb ├── README.md └── datasets │ ├── .DS_Store │ ├── Birthweight_reduced_kg_R.csv │ ├── CarPrice_Assignment.csv │ ├── Crime_R.csv │ ├── SP_500_1987.csv │ ├── data_loan.csv │ └── forbes.csv ├── 7_Machine Learning ├── 1_Linear Regression │ ├── .ipynb_checkpoints │ │ ├── 44_Linear Regression with One Variable-checkpoint.ipynb │ │ └── 45_Boston House Price Prediction-checkpoint.ipynb │ ├── 44_Linear Regression with One Variable.ipynb │ ├── 45_Boston House Price Prediction.ipynb │ ├── Linear Regression Complete │ │ ├── .ipynb_checkpoints │ │ │ ├── 47_48_Linear Regression Complete-checkpoint.ipynb │ │ │ └── Regression Analysis on Wine-checkpoint.ipynb │ │ ├── 47_48_Linear Regression Complete.ipynb │ │ ├── MBASSData.csv │ │ ├── Regression Analysis on Wine.ipynb │ │ ├── e.png │ │ ├── five.png │ │ ├── four.png │ │ ├── one.png │ │ ├── q.png │ │ ├── r.png │ │ ├── seven.png │ │ ├── six.png │ │ ├── t.png │ │ ├── three.png │ │ ├── two.png │ │ ├── w.png │ │ └── winequality-red.csv │ ├── Multiple Linear Regression │ │ ├── .ipynb_checkpoints │ │ │ └── 49_50_Multiple Linear Regression-checkpoint.ipynb │ │ ├── 49_50_Multiple Linear Regression.ipynb │ │ ├── IPL IMB381IPL2013.csv │ │ ├── e.png │ │ ├── ee.png │ │ ├── q.png │ │ ├── rr.png │ │ └── w.png │ ├── areas.csv │ ├── different_lines.JPG │ ├── equation.PNG │ ├── error_equation.jpg │ ├── homeprices.csv │ ├── homepricetable.JPG │ ├── linear_equation.png │ └── scatterplot.JPG ├── 2_Logistic Regression │ ├── .ipynb_checkpoints │ │ ├── 51_Insurance Prediction using Logistic Regression-checkpoint.ipynb │ │ └── 51_Iris Flower category prediction using Logistic Regression-checkpoint.ipynb │ ├── 51_Insurance Prediction using Logistic Regression.ipynb │ ├── 51_Iris Flower category prediction using Logistic Regression.ipynb │ ├── 52-53-titanic-survival-prediction.ipynb │ ├── 54-multiclass-logistic-regression.ipynb │ ├── insurance_data.csv │ └── iris_petal_sepal.png ├── 3_Decision Tree │ ├── .ipynb_checkpoints │ │ └── 55_Decision Tree basics-checkpoint.ipynb │ ├── 55_Decision Tree basics.ipynb │ ├── 56-57-decision-tree-income-prediction.ipynb │ ├── 56-decision-tree-income-prediction.ipynb │ ├── adult_dataset.csv │ ├── dt.png │ └── salaries.csv ├── 4_Perceptron │ ├── .ipynb_checkpoints │ │ └── 58_Perceptron from scratch-checkpoint.ipynb │ ├── 58_Perceptron from scratch.ipynb │ ├── biologicalperceptron.png │ └── singlelayerper.png ├── 5_Gradient Descent │ ├── .ipynb_checkpoints │ │ ├── 68_Gradient Descent-checkpoint.ipynb │ │ └── 69_70_Gradient Descent-checkpoint.ipynb │ ├── 69_70_Gradient Descent.ipynb │ ├── Housing.csv │ ├── gd.png │ ├── gd1.png │ └── gd2.png └── 6_Naive Bayes Classifier │ ├── .ipynb_checkpoints │ └── 71_Naive Bayes -checkpoint.ipynb │ └── 71_Naive Bayes .ipynb ├── 8_Major Project ├── .ipynb_checkpoints │ └── 59_60_61_62_63_Major Project Basics-checkpoint.ipynb ├── 59_60_61_62_63_Major Project Basics.ipynb └── yolo │ ├── cfg │ └── yolov3.cfg │ ├── darknet.py │ ├── something.txt │ └── util.py ├── Data Science & ML Full Stack Roadmap.pdf ├── README.md ├── images ├── Data-Science-and-ML-Batch.jpeg └── a-robot-with-lights-on-jx5pkvw0.jpeg └── projects └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | /.ipynb_checkpoints 2 | no 3 | -------------------------------------------------------------------------------- /1_Python Core/.ipynb_checkpoints/10_Searching and Sorting-checkpoint.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "b208e81b", 6 | "metadata": {}, 7 | "source": [ 8 | "# Linear Search" 9 | ] 10 | }, 11 | { 12 | "cell_type": "code", 13 | "execution_count": 1, 14 | "id": "e4a0d649", 15 | "metadata": {}, 16 | "outputs": [ 17 | { 18 | "name": "stdout", 19 | "output_type": "stream", 20 | "text": [ 21 | "Enter a number to be searched: 5\n", 22 | "Fail\n" 23 | ] 24 | } 25 | ], 26 | "source": [ 27 | "l = [1,25,12,4,6,8,74,3]\n", 28 | "\n", 29 | "n = int(input(\"Enter a number to be searched: \"))\n", 30 | "i = 0\n", 31 | "\n", 32 | "f = 0 # flag bit variable\n", 33 | "\n", 34 | "# 8\n", 35 | "while i < len(l):\n", 36 | " if n == l[i]:\n", 37 | " f = 1\n", 38 | " break\n", 39 | " i += 1\n", 40 | "\n", 41 | "if f == 1:\n", 42 | " print(\"Search Success\")\n", 43 | "else:\n", 44 | " print(\"Fail\")" 45 | ] 46 | }, 47 | { 48 | "cell_type": "markdown", 49 | "id": "7bf556b8", 50 | "metadata": {}, 51 | "source": [ 52 | "# Swapping" 53 | ] 54 | }, 55 | { 56 | "cell_type": "code", 57 | "execution_count": 2, 58 | "id": "8d86b212", 59 | "metadata": {}, 60 | "outputs": [ 61 | { 62 | "name": "stdout", 63 | "output_type": "stream", 64 | "text": [ 65 | "20\n", 66 | "10\n" 67 | ] 68 | } 69 | ], 70 | "source": [ 71 | "a = 10\n", 72 | "b = 20\n", 73 | "\n", 74 | "c = a\n", 75 | "a = b\n", 76 | "b = c\n", 77 | "\n", 78 | "print(a)\n", 79 | "print(b)" 80 | ] 81 | }, 82 | { 83 | "cell_type": "markdown", 84 | "id": "38b6058c", 85 | "metadata": {}, 86 | "source": [ 87 | "#### without using 3rd variable" 88 | ] 89 | }, 90 | { 91 | "cell_type": "code", 92 | "execution_count": 3, 93 | "id": "aa12c802", 94 | "metadata": {}, 95 | "outputs": [ 96 | { 97 | "name": "stdout", 98 | "output_type": "stream", 99 | "text": [ 100 | "20\n", 101 | "10\n" 102 | ] 103 | } 104 | ], 105 | "source": [ 106 | "a = 10 #10, 30\n", 107 | "b = 20 #20, 10\n", 108 | "\n", 109 | "a = a + b\n", 110 | "b = a - b\n", 111 | "a = a - b\n", 112 | "\n", 113 | "print(a)\n", 114 | "print(b)" 115 | ] 116 | }, 117 | { 118 | "cell_type": "code", 119 | "execution_count": 5, 120 | "id": "9e822db4", 121 | "metadata": {}, 122 | "outputs": [ 123 | { 124 | "name": "stdout", 125 | "output_type": "stream", 126 | "text": [ 127 | "1\n", 128 | "2\n", 129 | "3\n" 130 | ] 131 | } 132 | ], 133 | "source": [ 134 | "a,b,c = 1,2,3\n", 135 | "print(a)\n", 136 | "print(b)\n", 137 | "print(c)" 138 | ] 139 | }, 140 | { 141 | "cell_type": "code", 142 | "execution_count": 6, 143 | "id": "86dba683", 144 | "metadata": {}, 145 | "outputs": [ 146 | { 147 | "ename": "ValueError", 148 | "evalue": "too many values to unpack (expected 2)", 149 | "output_type": "error", 150 | "traceback": [ 151 | "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", 152 | "\u001b[1;31mValueError\u001b[0m Traceback (most recent call last)", 153 | "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0ma\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mb\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;36m1\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m3\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 2\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0ma\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 3\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mb\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mc\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", 154 | "\u001b[1;31mValueError\u001b[0m: too many values to unpack (expected 2)" 155 | ] 156 | } 157 | ], 158 | "source": [ 159 | "a,b = 1,2,3\n", 160 | "print(a)\n", 161 | "print(b)\n", 162 | "print(c)" 163 | ] 164 | }, 165 | { 166 | "cell_type": "code", 167 | "execution_count": 7, 168 | "id": "811a4fb3", 169 | "metadata": {}, 170 | "outputs": [ 171 | { 172 | "name": "stdout", 173 | "output_type": "stream", 174 | "text": [ 175 | "20\n", 176 | "10\n" 177 | ] 178 | } 179 | ], 180 | "source": [ 181 | "a = 10\n", 182 | "b = 20\n", 183 | "\n", 184 | "a,b = b,a\n", 185 | "# 20,10\n", 186 | "\n", 187 | "print(a)\n", 188 | "print(b)" 189 | ] 190 | }, 191 | { 192 | "cell_type": "markdown", 193 | "id": "bfd3ef2b", 194 | "metadata": {}, 195 | "source": [ 196 | "# Sorting" 197 | ] 198 | }, 199 | { 200 | "cell_type": "code", 201 | "execution_count": 8, 202 | "id": "97cb1162", 203 | "metadata": {}, 204 | "outputs": [ 205 | { 206 | "name": "stdout", 207 | "output_type": "stream", 208 | "text": [ 209 | "[2, 4, 10, 11, 20, 65, 76]\n" 210 | ] 211 | } 212 | ], 213 | "source": [ 214 | "n = [10,20,11,4,2,65,76]\n", 215 | "n.sort()\n", 216 | "print(n)" 217 | ] 218 | }, 219 | { 220 | "cell_type": "code", 221 | "execution_count": null, 222 | "id": "f6ce7898", 223 | "metadata": {}, 224 | "outputs": [], 225 | "source": [ 226 | "n = [50,40,10,20,30]\n", 227 | "# i j" 228 | ] 229 | }, 230 | { 231 | "cell_type": "code", 232 | "execution_count": 9, 233 | "id": "4ac45977", 234 | "metadata": {}, 235 | "outputs": [ 236 | { 237 | "name": "stdout", 238 | "output_type": "stream", 239 | "text": [ 240 | "[10, 20, 30, 40, 50]\n" 241 | ] 242 | } 243 | ], 244 | "source": [ 245 | "n = [10,20,30,40,50]\n", 246 | "# 0 1 2 3 4\n", 247 | "# i j\n", 248 | "\n", 249 | "i = 0\n", 250 | "# 4\n", 251 | "while i < len(n) - 1:\n", 252 | " j = i + 1\n", 253 | " while j < len(n):\n", 254 | " if n[i] > n[j]:\n", 255 | " temp = n[i]\n", 256 | " n[i] = n[j]\n", 257 | " n[j] = temp\n", 258 | " j += 1\n", 259 | " i += 1\n", 260 | "\n", 261 | "print(n)" 262 | ] 263 | }, 264 | { 265 | "cell_type": "markdown", 266 | "id": "4bb7b62b", 267 | "metadata": {}, 268 | "source": [ 269 | "# Binary Search" 270 | ] 271 | }, 272 | { 273 | "cell_type": "code", 274 | "execution_count": null, 275 | "id": "bc1713b8", 276 | "metadata": {}, 277 | "outputs": [], 278 | "source": [ 279 | "a = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]\n", 280 | "\n", 281 | "n = 70\n", 282 | "\n" 283 | ] 284 | } 285 | ], 286 | "metadata": { 287 | "kernelspec": { 288 | "display_name": "Python 3", 289 | "language": "python", 290 | "name": "python3" 291 | }, 292 | "language_info": { 293 | "codemirror_mode": { 294 | "name": "ipython", 295 | "version": 3 296 | }, 297 | "file_extension": ".py", 298 | "mimetype": "text/x-python", 299 | "name": "python", 300 | "nbconvert_exporter": "python", 301 | "pygments_lexer": "ipython3", 302 | "version": "3.8.10" 303 | } 304 | }, 305 | "nbformat": 4, 306 | "nbformat_minor": 5 307 | } 308 | -------------------------------------------------------------------------------- /1_Python Core/.ipynb_checkpoints/11_Swapping Sorting Binary Search-checkpoint.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "7bf556b8", 6 | "metadata": {}, 7 | "source": [ 8 | "# Swapping" 9 | ] 10 | }, 11 | { 12 | "cell_type": "code", 13 | "execution_count": 2, 14 | "id": "8d86b212", 15 | "metadata": {}, 16 | "outputs": [ 17 | { 18 | "name": "stdout", 19 | "output_type": "stream", 20 | "text": [ 21 | "20\n", 22 | "10\n" 23 | ] 24 | } 25 | ], 26 | "source": [ 27 | "a = 10\n", 28 | "b = 20\n", 29 | "\n", 30 | "c = a\n", 31 | "a = b\n", 32 | "b = c\n", 33 | "\n", 34 | "print(a)\n", 35 | "print(b)" 36 | ] 37 | }, 38 | { 39 | "cell_type": "markdown", 40 | "id": "38b6058c", 41 | "metadata": {}, 42 | "source": [ 43 | "#### without using 3rd variable" 44 | ] 45 | }, 46 | { 47 | "cell_type": "code", 48 | "execution_count": 3, 49 | "id": "aa12c802", 50 | "metadata": {}, 51 | "outputs": [ 52 | { 53 | "name": "stdout", 54 | "output_type": "stream", 55 | "text": [ 56 | "20\n", 57 | "10\n" 58 | ] 59 | } 60 | ], 61 | "source": [ 62 | "a = 10 #10, 30\n", 63 | "b = 20 #20, 10\n", 64 | "\n", 65 | "a = a + b\n", 66 | "b = a - b\n", 67 | "a = a - b\n", 68 | "\n", 69 | "print(a)\n", 70 | "print(b)" 71 | ] 72 | }, 73 | { 74 | "cell_type": "code", 75 | "execution_count": 5, 76 | "id": "9e822db4", 77 | "metadata": {}, 78 | "outputs": [ 79 | { 80 | "name": "stdout", 81 | "output_type": "stream", 82 | "text": [ 83 | "1\n", 84 | "2\n", 85 | "3\n" 86 | ] 87 | } 88 | ], 89 | "source": [ 90 | "a,b,c = 1,2,3\n", 91 | "print(a)\n", 92 | "print(b)\n", 93 | "print(c)" 94 | ] 95 | }, 96 | { 97 | "cell_type": "code", 98 | "execution_count": 6, 99 | "id": "86dba683", 100 | "metadata": {}, 101 | "outputs": [ 102 | { 103 | "ename": "ValueError", 104 | "evalue": "too many values to unpack (expected 2)", 105 | "output_type": "error", 106 | "traceback": [ 107 | "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", 108 | "\u001b[1;31mValueError\u001b[0m Traceback (most recent call last)", 109 | "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0ma\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mb\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;36m1\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m3\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 2\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0ma\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 3\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mb\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mc\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", 110 | "\u001b[1;31mValueError\u001b[0m: too many values to unpack (expected 2)" 111 | ] 112 | } 113 | ], 114 | "source": [ 115 | "a,b = 1,2,3\n", 116 | "print(a)\n", 117 | "print(b)\n", 118 | "print(c)" 119 | ] 120 | }, 121 | { 122 | "cell_type": "code", 123 | "execution_count": 7, 124 | "id": "811a4fb3", 125 | "metadata": {}, 126 | "outputs": [ 127 | { 128 | "name": "stdout", 129 | "output_type": "stream", 130 | "text": [ 131 | "20\n", 132 | "10\n" 133 | ] 134 | } 135 | ], 136 | "source": [ 137 | "a = 10\n", 138 | "b = 20\n", 139 | "\n", 140 | "a,b = b,a\n", 141 | "# 20,10\n", 142 | "\n", 143 | "print(a)\n", 144 | "print(b)" 145 | ] 146 | }, 147 | { 148 | "cell_type": "markdown", 149 | "id": "bfd3ef2b", 150 | "metadata": {}, 151 | "source": [ 152 | "# Sorting" 153 | ] 154 | }, 155 | { 156 | "cell_type": "code", 157 | "execution_count": 8, 158 | "id": "97cb1162", 159 | "metadata": {}, 160 | "outputs": [ 161 | { 162 | "name": "stdout", 163 | "output_type": "stream", 164 | "text": [ 165 | "[2, 4, 10, 11, 20, 65, 76]\n" 166 | ] 167 | } 168 | ], 169 | "source": [ 170 | "n = [10,20,11,4,2,65,76]\n", 171 | "n.sort()\n", 172 | "print(n)" 173 | ] 174 | }, 175 | { 176 | "cell_type": "code", 177 | "execution_count": null, 178 | "id": "f6ce7898", 179 | "metadata": {}, 180 | "outputs": [], 181 | "source": [ 182 | "n = [50,40,10,20,30]\n", 183 | "# i j" 184 | ] 185 | }, 186 | { 187 | "cell_type": "code", 188 | "execution_count": 9, 189 | "id": "4ac45977", 190 | "metadata": {}, 191 | "outputs": [ 192 | { 193 | "name": "stdout", 194 | "output_type": "stream", 195 | "text": [ 196 | "[10, 20, 30, 40, 50]\n" 197 | ] 198 | } 199 | ], 200 | "source": [ 201 | "n = [10,20,30,40,50]\n", 202 | "# 0 1 2 3 4\n", 203 | "# i j\n", 204 | "\n", 205 | "i = 0\n", 206 | "# 4\n", 207 | "while i < len(n) - 1:\n", 208 | " j = i + 1\n", 209 | " while j < len(n):\n", 210 | " if n[i] > n[j]:\n", 211 | " temp = n[i]\n", 212 | " n[i] = n[j]\n", 213 | " n[j] = temp\n", 214 | " j += 1\n", 215 | " i += 1\n", 216 | "\n", 217 | "print(n)" 218 | ] 219 | }, 220 | { 221 | "cell_type": "markdown", 222 | "id": "4bb7b62b", 223 | "metadata": {}, 224 | "source": [ 225 | "# Binary Search" 226 | ] 227 | }, 228 | { 229 | "cell_type": "code", 230 | "execution_count": 1, 231 | "id": "bc1713b8", 232 | "metadata": {}, 233 | "outputs": [ 234 | { 235 | "name": "stdout", 236 | "output_type": "stream", 237 | "text": [ 238 | "Search Success\n" 239 | ] 240 | } 241 | ], 242 | "source": [ 243 | "# mid\n", 244 | "# low\n", 245 | "# high \n", 246 | "a = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]\n", 247 | "# 0 1 2 3 4 5 6 7 8 9\n", 248 | "n = 70\n", 249 | "\n", 250 | "low = 0\n", 251 | "high = len(a) - 1\n", 252 | "f = 0\n", 253 | "\n", 254 | "while low <= high: # low = 0,5,6 high = 9, 6\n", 255 | " mid = (low + high)//2 # mid = 4, 7, 5, 6\n", 256 | " if a[mid] == n: \n", 257 | " f = 1\n", 258 | " break\n", 259 | " elif n < a[mid]:\n", 260 | " high = mid - 1\n", 261 | " else:\n", 262 | " low = mid + 1\n", 263 | "\n", 264 | "if f == 1:\n", 265 | " print(\"Search Success\")\n", 266 | "else:\n", 267 | " print(\"Fail\")" 268 | ] 269 | }, 270 | { 271 | "cell_type": "markdown", 272 | "id": "18ebb4e0", 273 | "metadata": {}, 274 | "source": [ 275 | "1 - 10\n", 276 | "\n", 277 | "3 5 /\n", 278 | "\n", 279 | "3 + 5 + 6 + 9 + 10 = 33\n", 280 | "\n", 281 | "1 - 1000\n", 282 | "\n", 283 | "3 5 sum?\n", 284 | "\n", 285 | "15 - 3 and 5 X\n", 286 | "\n" 287 | ] 288 | }, 289 | { 290 | "cell_type": "code", 291 | "execution_count": null, 292 | "id": "c55d27b6", 293 | "metadata": {}, 294 | "outputs": [], 295 | "source": [] 296 | }, 297 | { 298 | "cell_type": "markdown", 299 | "id": "ac81ad82", 300 | "metadata": {}, 301 | "source": [ 302 | "2520\n", 303 | "\n", 304 | "1 - 10 /\n", 305 | "\n", 306 | "\n", 307 | "?\n", 308 | "\n", 309 | "1 - 20 /" 310 | ] 311 | }, 312 | { 313 | "cell_type": "code", 314 | "execution_count": null, 315 | "id": "7aff2ccc", 316 | "metadata": {}, 317 | "outputs": [], 318 | "source": [] 319 | } 320 | ], 321 | "metadata": { 322 | "kernelspec": { 323 | "display_name": "Python 3", 324 | "language": "python", 325 | "name": "python3" 326 | }, 327 | "language_info": { 328 | "codemirror_mode": { 329 | "name": "ipython", 330 | "version": 3 331 | }, 332 | "file_extension": ".py", 333 | "mimetype": "text/x-python", 334 | "name": "python", 335 | "nbconvert_exporter": "python", 336 | "pygments_lexer": "ipython3", 337 | "version": "3.8.10" 338 | } 339 | }, 340 | "nbformat": 4, 341 | "nbformat_minor": 5 342 | } 343 | -------------------------------------------------------------------------------- /1_Python Core/.ipynb_checkpoints/21_Object Orientation-checkpoint.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f7f4e8c4", 6 | "metadata": {}, 7 | "source": [ 8 | "# Object Orientated Programming" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "e4ad2708", 14 | "metadata": {}, 15 | "source": [ 16 | "7 properties of OOPs\n", 17 | "\n", 18 | "1. Class\n", 19 | " Updated version of structure\n", 20 | " Collection of variables and methods.\n", 21 | " Class is a blueprint.\n", 22 | "\n", 23 | "2. Object\n", 24 | " Run time or real time entity.\n", 25 | " hash code - id\n", 26 | " \n", 27 | "3. Abstraction and Encapsulation\n", 28 | " Abstraction - Showing only essential features without showing any background details.\n", 29 | " Encapsulation - wrapping up of data in a single unit.\n", 30 | "\n", 31 | "4. Inheritance\n", 32 | " Acquiring Properties of one class into another.\n", 33 | " Code reuse.\n", 34 | " - Single Level\n", 35 | " - Multi Level\n", 36 | " - Hierarchical\n", 37 | " - Multiple\n", 38 | " - Hybrid\n", 39 | "\n", 40 | "5. Polymorphism\n", 41 | " same name multiple fuctionalities.\n", 42 | " - Method Overloading\n", 43 | " - Method Overriding\n", 44 | " add()\n", 45 | " add(x,y)\n", 46 | " add(a,b,c)\n", 47 | " add()\n", 48 | "\n", 49 | "6. Dynamic Memory Allocation\n", 50 | " Run time memory allocation\n", 51 | " \n", 52 | " \n", 53 | "7. Message passing\n", 54 | " Communication between objects" 55 | ] 56 | }, 57 | { 58 | "cell_type": "code", 59 | "execution_count": null, 60 | "id": "d29fcaf6", 61 | "metadata": {}, 62 | "outputs": [], 63 | "source": [ 64 | "int a = 10;\n", 65 | "\n", 66 | "struct student{\n", 67 | " int a;\n", 68 | " float p;\n", 69 | " char f;\n", 70 | "}\n", 71 | "\n", 72 | "struct student s1;\n", 73 | " int a;" 74 | ] 75 | }, 76 | { 77 | "cell_type": "code", 78 | "execution_count": null, 79 | "id": "0a1d53fd", 80 | "metadata": {}, 81 | "outputs": [], 82 | "source": [] 83 | }, 84 | { 85 | "cell_type": "code", 86 | "execution_count": null, 87 | "id": "0b19b42b", 88 | "metadata": {}, 89 | "outputs": [], 90 | "source": [] 91 | } 92 | ], 93 | "metadata": { 94 | "kernelspec": { 95 | "display_name": "Python 3", 96 | "language": "python", 97 | "name": "python3" 98 | }, 99 | "language_info": { 100 | "codemirror_mode": { 101 | "name": "ipython", 102 | "version": 3 103 | }, 104 | "file_extension": ".py", 105 | "mimetype": "text/x-python", 106 | "name": "python", 107 | "nbconvert_exporter": "python", 108 | "pygments_lexer": "ipython3", 109 | "version": "3.8.10" 110 | } 111 | }, 112 | "nbformat": 4, 113 | "nbformat_minor": 5 114 | } 115 | -------------------------------------------------------------------------------- /1_Python Core/.ipynb_checkpoints/22_Object Orientation -checkpoint.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f7f4e8c4", 6 | "metadata": {}, 7 | "source": [ 8 | "# Object Orientated Programming" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "e4ad2708", 14 | "metadata": {}, 15 | "source": [ 16 | "7 properties of OOPs\n", 17 | "\n", 18 | "1. Class\n", 19 | " Updated version of structure\n", 20 | " Collection of variables and methods.\n", 21 | " Class is a blueprint.\n", 22 | "\n", 23 | "2. Object\n", 24 | " Run time or real time entity.\n", 25 | " hash code - id\n", 26 | " \n", 27 | "3. Abstraction and Encapsulation\n", 28 | " Abstraction - Showing only essential features without showing any background details.\n", 29 | " Encapsulation - wrapping up of data in a single unit.\n", 30 | "\n", 31 | "4. Inheritance\n", 32 | " Acquiring Properties of one class into another.\n", 33 | " Code reuse.\n", 34 | " - Single Level\n", 35 | " - Multi Level\n", 36 | " - Hierarchical\n", 37 | " - Multiple\n", 38 | " - Hybrid\n", 39 | "\n", 40 | "5. Polymorphism\n", 41 | " same name multiple fuctionalities.\n", 42 | " - Method Overloading\n", 43 | " - Method Overriding\n", 44 | " add()\n", 45 | " add(x,y)\n", 46 | " add(a,b,c)\n", 47 | " add()\n", 48 | "\n", 49 | "6. Dynamic Memory Allocation\n", 50 | " Run time memory allocation\n", 51 | " \n", 52 | " \n", 53 | "7. Message passing\n", 54 | " Communication between objects" 55 | ] 56 | }, 57 | { 58 | "cell_type": "code", 59 | "execution_count": null, 60 | "id": "d29fcaf6", 61 | "metadata": {}, 62 | "outputs": [], 63 | "source": [ 64 | "int a = 10;\n", 65 | "\n", 66 | "struct student{\n", 67 | " int a;\n", 68 | " float p;\n", 69 | " char f;\n", 70 | "}\n", 71 | "\n", 72 | "struct student s1;\n", 73 | " int a;" 74 | ] 75 | }, 76 | { 77 | "cell_type": "code", 78 | "execution_count": 1, 79 | "id": "0b19b42b", 80 | "metadata": {}, 81 | "outputs": [], 82 | "source": [ 83 | "class Cricket:\n", 84 | " \n", 85 | " def bat():\n", 86 | " print(\"Batting\")\n" 87 | ] 88 | }, 89 | { 90 | "cell_type": "code", 91 | "execution_count": 2, 92 | "id": "060506e6", 93 | "metadata": {}, 94 | "outputs": [ 95 | { 96 | "ename": "NameError", 97 | "evalue": "name 'bat' is not defined", 98 | "output_type": "error", 99 | "traceback": [ 100 | "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", 101 | "\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)", 102 | "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mbat\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m", 103 | "\u001b[1;31mNameError\u001b[0m: name 'bat' is not defined" 104 | ] 105 | } 106 | ], 107 | "source": [ 108 | "bat()" 109 | ] 110 | }, 111 | { 112 | "cell_type": "code", 113 | "execution_count": null, 114 | "id": "a9c9d4c4", 115 | "metadata": {}, 116 | "outputs": [], 117 | "source": [ 118 | "# self ---> current object" 119 | ] 120 | }, 121 | { 122 | "cell_type": "code", 123 | "execution_count": 5, 124 | "id": "d0bd3233", 125 | "metadata": {}, 126 | "outputs": [], 127 | "source": [ 128 | "class Cricket:\n", 129 | " \n", 130 | " def bat(self):\n", 131 | " print(\"Batting\")\n", 132 | "\n", 133 | "x = Cricket()" 134 | ] 135 | }, 136 | { 137 | "cell_type": "code", 138 | "execution_count": 6, 139 | "id": "5053586c", 140 | "metadata": {}, 141 | "outputs": [ 142 | { 143 | "name": "stdout", 144 | "output_type": "stream", 145 | "text": [ 146 | "Batting\n" 147 | ] 148 | } 149 | ], 150 | "source": [ 151 | "x.bat()" 152 | ] 153 | }, 154 | { 155 | "cell_type": "code", 156 | "execution_count": 7, 157 | "id": "682cc8f4", 158 | "metadata": {}, 159 | "outputs": [ 160 | { 161 | "name": "stdout", 162 | "output_type": "stream", 163 | "text": [ 164 | "<__main__.Cricket object at 0x000002631117DA60>\n" 165 | ] 166 | } 167 | ], 168 | "source": [ 169 | "print(x)" 170 | ] 171 | }, 172 | { 173 | "cell_type": "code", 174 | "execution_count": 8, 175 | "id": "2e033926", 176 | "metadata": {}, 177 | "outputs": [ 178 | { 179 | "name": "stdout", 180 | "output_type": "stream", 181 | "text": [ 182 | "2624511793760\n" 183 | ] 184 | } 185 | ], 186 | "source": [ 187 | "print(id(x))" 188 | ] 189 | }, 190 | { 191 | "cell_type": "code", 192 | "execution_count": 9, 193 | "id": "ef206783", 194 | "metadata": {}, 195 | "outputs": [ 196 | { 197 | "name": "stdout", 198 | "output_type": "stream", 199 | "text": [ 200 | "<__main__.Cricket object at 0x0000026311187550>\n" 201 | ] 202 | } 203 | ], 204 | "source": [ 205 | "print(Cricket())" 206 | ] 207 | }, 208 | { 209 | "cell_type": "code", 210 | "execution_count": null, 211 | "id": "235f27d2", 212 | "metadata": {}, 213 | "outputs": [], 214 | "source": [ 215 | "x = Cricket()" 216 | ] 217 | }, 218 | { 219 | "cell_type": "code", 220 | "execution_count": null, 221 | "id": "0ff38837", 222 | "metadata": {}, 223 | "outputs": [], 224 | "source": [ 225 | "TV blueprint - class\n", 226 | "- smart tv\n", 227 | "- colors\n", 228 | "- usb\n", 229 | "- hdmi\n", 230 | "\n", 231 | "Actual TV - object\n", 232 | "\n", 233 | "Remote - reference" 234 | ] 235 | } 236 | ], 237 | "metadata": { 238 | "kernelspec": { 239 | "display_name": "Python 3", 240 | "language": "python", 241 | "name": "python3" 242 | }, 243 | "language_info": { 244 | "codemirror_mode": { 245 | "name": "ipython", 246 | "version": 3 247 | }, 248 | "file_extension": ".py", 249 | "mimetype": "text/x-python", 250 | "name": "python", 251 | "nbconvert_exporter": "python", 252 | "pygments_lexer": "ipython3", 253 | "version": "3.8.10" 254 | } 255 | }, 256 | "nbformat": 4, 257 | "nbformat_minor": 5 258 | } 259 | -------------------------------------------------------------------------------- /1_Python Core/.ipynb_checkpoints/27_File Handling-checkpoint.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "a12234db", 6 | "metadata": {}, 7 | "source": [ 8 | "# File Handling" 9 | ] 10 | }, 11 | { 12 | "cell_type": "code", 13 | "execution_count": null, 14 | "id": "7076b706", 15 | "metadata": {}, 16 | "outputs": [], 17 | "source": [ 18 | "txt\n", 19 | "png\n", 20 | "mp3\n", 21 | "mp4\n", 22 | "csv\n", 23 | "xlsv" 24 | ] 25 | }, 26 | { 27 | "cell_type": "code", 28 | "execution_count": null, 29 | "id": "39d9c964", 30 | "metadata": {}, 31 | "outputs": [], 32 | "source": [ 33 | "mode\n", 34 | "r - read\n", 35 | "a - append\n", 36 | "w - write" 37 | ] 38 | }, 39 | { 40 | "cell_type": "code", 41 | "execution_count": 1, 42 | "id": "580b97b1", 43 | "metadata": {}, 44 | "outputs": [ 45 | { 46 | "name": "stdout", 47 | "output_type": "stream", 48 | "text": [ 49 | "<_io.TextIOWrapper name='student.txt' mode='r' encoding='cp1252'>\n" 50 | ] 51 | } 52 | ], 53 | "source": [ 54 | "f = open(\"student.txt\",'r')\n", 55 | "print(f)" 56 | ] 57 | }, 58 | { 59 | "cell_type": "code", 60 | "execution_count": 2, 61 | "id": "922f2144", 62 | "metadata": {}, 63 | "outputs": [ 64 | { 65 | "name": "stdout", 66 | "output_type": "stream", 67 | "text": [ 68 | "this is the best file handling session.\n" 69 | ] 70 | } 71 | ], 72 | "source": [ 73 | "print(f.read())" 74 | ] 75 | }, 76 | { 77 | "cell_type": "code", 78 | "execution_count": 3, 79 | "id": "a09c4bfa", 80 | "metadata": {}, 81 | "outputs": [], 82 | "source": [ 83 | "f.close()" 84 | ] 85 | }, 86 | { 87 | "cell_type": "code", 88 | "execution_count": 10, 89 | "id": "7998c4a4", 90 | "metadata": {}, 91 | "outputs": [ 92 | { 93 | "data": { 94 | "text/plain": [ 95 | "'this is the best file handling session.\\n'" 96 | ] 97 | }, 98 | "execution_count": 10, 99 | "metadata": {}, 100 | "output_type": "execute_result" 101 | } 102 | ], 103 | "source": [ 104 | "f = open(\"student.txt\",'r')\n", 105 | "f.readline()" 106 | ] 107 | }, 108 | { 109 | "cell_type": "code", 110 | "execution_count": 12, 111 | "id": "30ffb1e3", 112 | "metadata": {}, 113 | "outputs": [ 114 | { 115 | "data": { 116 | "text/plain": [ 117 | "['this is the best file handling session.\\n',\n", 118 | " 'we are the best.\\n',\n", 119 | " 'This is india.']" 120 | ] 121 | }, 122 | "execution_count": 12, 123 | "metadata": {}, 124 | "output_type": "execute_result" 125 | } 126 | ], 127 | "source": [ 128 | "f = open(\"student.txt\",'r')\n", 129 | "\n", 130 | "f.readlines()" 131 | ] 132 | }, 133 | { 134 | "cell_type": "markdown", 135 | "id": "6d59f414", 136 | "metadata": {}, 137 | "source": [ 138 | "### write a file" 139 | ] 140 | }, 141 | { 142 | "cell_type": "code", 143 | "execution_count": 13, 144 | "id": "c5c40717", 145 | "metadata": {}, 146 | "outputs": [], 147 | "source": [ 148 | "f = open(\"indore.txt\",'w')\n", 149 | "\n", 150 | "f.write(\"hello from india.\")\n", 151 | "f.close()" 152 | ] 153 | }, 154 | { 155 | "cell_type": "code", 156 | "execution_count": 14, 157 | "id": "9a63ee11", 158 | "metadata": {}, 159 | "outputs": [ 160 | { 161 | "data": { 162 | "text/plain": [ 163 | "'hello from india.'" 164 | ] 165 | }, 166 | "execution_count": 14, 167 | "metadata": {}, 168 | "output_type": "execute_result" 169 | } 170 | ], 171 | "source": [ 172 | "f = open(\"indore.txt\",'r')\n", 173 | "\n", 174 | "f.read()" 175 | ] 176 | }, 177 | { 178 | "cell_type": "markdown", 179 | "id": "0274bad8", 180 | "metadata": {}, 181 | "source": [ 182 | "### append a file" 183 | ] 184 | }, 185 | { 186 | "cell_type": "code", 187 | "execution_count": 18, 188 | "id": "6dec8f6a", 189 | "metadata": {}, 190 | "outputs": [], 191 | "source": [ 192 | "f = open(\"student.txt\", 'a')\n", 193 | "\n", 194 | "f.write(\"string from append mode\")\n", 195 | "\n", 196 | "f.close()" 197 | ] 198 | }, 199 | { 200 | "cell_type": "code", 201 | "execution_count": 19, 202 | "id": "2a229b65", 203 | "metadata": {}, 204 | "outputs": [ 205 | { 206 | "name": "stdout", 207 | "output_type": "stream", 208 | "text": [ 209 | "this is the best file handling session.\n", 210 | "we are the best.\n", 211 | "This is india.\n", 212 | "string from append modestring from append mode\n" 213 | ] 214 | } 215 | ], 216 | "source": [ 217 | "f = open(\"student.txt\", 'r')\n", 218 | "\n", 219 | "print(f.read())" 220 | ] 221 | }, 222 | { 223 | "cell_type": "code", 224 | "execution_count": null, 225 | "id": "904e1668", 226 | "metadata": {}, 227 | "outputs": [], 228 | "source": [] 229 | } 230 | ], 231 | "metadata": { 232 | "kernelspec": { 233 | "display_name": "Python 3", 234 | "language": "python", 235 | "name": "python3" 236 | }, 237 | "language_info": { 238 | "codemirror_mode": { 239 | "name": "ipython", 240 | "version": 3 241 | }, 242 | "file_extension": ".py", 243 | "mimetype": "text/x-python", 244 | "name": "python", 245 | "nbconvert_exporter": "python", 246 | "pygments_lexer": "ipython3", 247 | "version": "3.8.10" 248 | } 249 | }, 250 | "nbformat": 4, 251 | "nbformat_minor": 5 252 | } 253 | -------------------------------------------------------------------------------- /1_Python Core/.ipynb_checkpoints/7_Git and GitHub-checkpoint.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [], 3 | "metadata": {}, 4 | "nbformat": 4, 5 | "nbformat_minor": 5 6 | } 7 | -------------------------------------------------------------------------------- /1_Python Core/10_Searching and Sorting.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "b208e81b", 6 | "metadata": {}, 7 | "source": [ 8 | "# Linear Search" 9 | ] 10 | }, 11 | { 12 | "cell_type": "code", 13 | "execution_count": 1, 14 | "id": "e4a0d649", 15 | "metadata": {}, 16 | "outputs": [ 17 | { 18 | "name": "stdout", 19 | "output_type": "stream", 20 | "text": [ 21 | "Enter a number to be searched: 5\n", 22 | "Fail\n" 23 | ] 24 | } 25 | ], 26 | "source": [ 27 | "l = [1,25,12,4,6,8,74,3]\n", 28 | "\n", 29 | "n = int(input(\"Enter a number to be searched: \"))\n", 30 | "i = 0\n", 31 | "\n", 32 | "f = 0 # flag bit variable\n", 33 | "\n", 34 | "# 8\n", 35 | "while i < len(l):\n", 36 | " if n == l[i]:\n", 37 | " f = 1\n", 38 | " break\n", 39 | " i += 1\n", 40 | "\n", 41 | "if f == 1:\n", 42 | " print(\"Search Success\")\n", 43 | "else:\n", 44 | " print(\"Fail\")" 45 | ] 46 | }, 47 | { 48 | "cell_type": "markdown", 49 | "id": "7bf556b8", 50 | "metadata": {}, 51 | "source": [ 52 | "# Swapping" 53 | ] 54 | }, 55 | { 56 | "cell_type": "code", 57 | "execution_count": 2, 58 | "id": "8d86b212", 59 | "metadata": {}, 60 | "outputs": [ 61 | { 62 | "name": "stdout", 63 | "output_type": "stream", 64 | "text": [ 65 | "20\n", 66 | "10\n" 67 | ] 68 | } 69 | ], 70 | "source": [ 71 | "a = 10\n", 72 | "b = 20\n", 73 | "\n", 74 | "c = a\n", 75 | "a = b\n", 76 | "b = c\n", 77 | "\n", 78 | "print(a)\n", 79 | "print(b)" 80 | ] 81 | }, 82 | { 83 | "cell_type": "markdown", 84 | "id": "38b6058c", 85 | "metadata": {}, 86 | "source": [ 87 | "#### without using 3rd variable" 88 | ] 89 | }, 90 | { 91 | "cell_type": "code", 92 | "execution_count": 3, 93 | "id": "aa12c802", 94 | "metadata": {}, 95 | "outputs": [ 96 | { 97 | "name": "stdout", 98 | "output_type": "stream", 99 | "text": [ 100 | "20\n", 101 | "10\n" 102 | ] 103 | } 104 | ], 105 | "source": [ 106 | "a = 10 #10, 30\n", 107 | "b = 20 #20, 10\n", 108 | "\n", 109 | "a = a + b\n", 110 | "b = a - b\n", 111 | "a = a - b\n", 112 | "\n", 113 | "print(a)\n", 114 | "print(b)" 115 | ] 116 | }, 117 | { 118 | "cell_type": "code", 119 | "execution_count": 5, 120 | "id": "9e822db4", 121 | "metadata": {}, 122 | "outputs": [ 123 | { 124 | "name": "stdout", 125 | "output_type": "stream", 126 | "text": [ 127 | "1\n", 128 | "2\n", 129 | "3\n" 130 | ] 131 | } 132 | ], 133 | "source": [ 134 | "a,b,c = 1,2,3\n", 135 | "print(a)\n", 136 | "print(b)\n", 137 | "print(c)" 138 | ] 139 | }, 140 | { 141 | "cell_type": "code", 142 | "execution_count": 6, 143 | "id": "86dba683", 144 | "metadata": {}, 145 | "outputs": [ 146 | { 147 | "ename": "ValueError", 148 | "evalue": "too many values to unpack (expected 2)", 149 | "output_type": "error", 150 | "traceback": [ 151 | "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", 152 | "\u001b[1;31mValueError\u001b[0m Traceback (most recent call last)", 153 | "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0ma\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mb\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;36m1\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m3\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 2\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0ma\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 3\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mb\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mc\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", 154 | "\u001b[1;31mValueError\u001b[0m: too many values to unpack (expected 2)" 155 | ] 156 | } 157 | ], 158 | "source": [ 159 | "a,b = 1,2,3\n", 160 | "print(a)\n", 161 | "print(b)\n", 162 | "print(c)" 163 | ] 164 | }, 165 | { 166 | "cell_type": "code", 167 | "execution_count": 7, 168 | "id": "811a4fb3", 169 | "metadata": {}, 170 | "outputs": [ 171 | { 172 | "name": "stdout", 173 | "output_type": "stream", 174 | "text": [ 175 | "20\n", 176 | "10\n" 177 | ] 178 | } 179 | ], 180 | "source": [ 181 | "a = 10\n", 182 | "b = 20\n", 183 | "\n", 184 | "a,b = b,a\n", 185 | "# 20,10\n", 186 | "\n", 187 | "print(a)\n", 188 | "print(b)" 189 | ] 190 | }, 191 | { 192 | "cell_type": "markdown", 193 | "id": "bfd3ef2b", 194 | "metadata": {}, 195 | "source": [ 196 | "# Sorting" 197 | ] 198 | }, 199 | { 200 | "cell_type": "code", 201 | "execution_count": 8, 202 | "id": "97cb1162", 203 | "metadata": {}, 204 | "outputs": [ 205 | { 206 | "name": "stdout", 207 | "output_type": "stream", 208 | "text": [ 209 | "[2, 4, 10, 11, 20, 65, 76]\n" 210 | ] 211 | } 212 | ], 213 | "source": [ 214 | "n = [10,20,11,4,2,65,76]\n", 215 | "n.sort()\n", 216 | "print(n)" 217 | ] 218 | }, 219 | { 220 | "cell_type": "code", 221 | "execution_count": null, 222 | "id": "f6ce7898", 223 | "metadata": {}, 224 | "outputs": [], 225 | "source": [ 226 | "n = [50,40,10,20,30]\n", 227 | "# i j" 228 | ] 229 | }, 230 | { 231 | "cell_type": "code", 232 | "execution_count": 9, 233 | "id": "4ac45977", 234 | "metadata": {}, 235 | "outputs": [ 236 | { 237 | "name": "stdout", 238 | "output_type": "stream", 239 | "text": [ 240 | "[10, 20, 30, 40, 50]\n" 241 | ] 242 | } 243 | ], 244 | "source": [ 245 | "n = [10,20,30,40,50]\n", 246 | "# 0 1 2 3 4\n", 247 | "# i j\n", 248 | "\n", 249 | "i = 0\n", 250 | "# 4\n", 251 | "while i < len(n) - 1:\n", 252 | " j = i + 1\n", 253 | " while j < len(n):\n", 254 | " if n[i] > n[j]:\n", 255 | " temp = n[i]\n", 256 | " n[i] = n[j]\n", 257 | " n[j] = temp\n", 258 | " j += 1\n", 259 | " i += 1\n", 260 | "\n", 261 | "print(n)" 262 | ] 263 | }, 264 | { 265 | "cell_type": "markdown", 266 | "id": "4bb7b62b", 267 | "metadata": {}, 268 | "source": [ 269 | "# Binary Search" 270 | ] 271 | }, 272 | { 273 | "cell_type": "code", 274 | "execution_count": null, 275 | "id": "bc1713b8", 276 | "metadata": {}, 277 | "outputs": [], 278 | "source": [ 279 | "a = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]\n", 280 | "\n", 281 | "n = 70\n", 282 | "\n" 283 | ] 284 | } 285 | ], 286 | "metadata": { 287 | "kernelspec": { 288 | "display_name": "Python 3", 289 | "language": "python", 290 | "name": "python3" 291 | }, 292 | "language_info": { 293 | "codemirror_mode": { 294 | "name": "ipython", 295 | "version": 3 296 | }, 297 | "file_extension": ".py", 298 | "mimetype": "text/x-python", 299 | "name": "python", 300 | "nbconvert_exporter": "python", 301 | "pygments_lexer": "ipython3", 302 | "version": "3.8.10" 303 | } 304 | }, 305 | "nbformat": 4, 306 | "nbformat_minor": 5 307 | } 308 | -------------------------------------------------------------------------------- /1_Python Core/11_Swapping Sorting Binary Search.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "7bf556b8", 6 | "metadata": {}, 7 | "source": [ 8 | "# Swapping" 9 | ] 10 | }, 11 | { 12 | "cell_type": "code", 13 | "execution_count": 2, 14 | "id": "8d86b212", 15 | "metadata": {}, 16 | "outputs": [ 17 | { 18 | "name": "stdout", 19 | "output_type": "stream", 20 | "text": [ 21 | "20\n", 22 | "10\n" 23 | ] 24 | } 25 | ], 26 | "source": [ 27 | "a = 10\n", 28 | "b = 20\n", 29 | "\n", 30 | "c = a\n", 31 | "a = b\n", 32 | "b = c\n", 33 | "\n", 34 | "print(a)\n", 35 | "print(b)" 36 | ] 37 | }, 38 | { 39 | "cell_type": "markdown", 40 | "id": "38b6058c", 41 | "metadata": {}, 42 | "source": [ 43 | "#### without using 3rd variable" 44 | ] 45 | }, 46 | { 47 | "cell_type": "code", 48 | "execution_count": 3, 49 | "id": "aa12c802", 50 | "metadata": {}, 51 | "outputs": [ 52 | { 53 | "name": "stdout", 54 | "output_type": "stream", 55 | "text": [ 56 | "20\n", 57 | "10\n" 58 | ] 59 | } 60 | ], 61 | "source": [ 62 | "a = 10 #10, 30\n", 63 | "b = 20 #20, 10\n", 64 | "\n", 65 | "a = a + b\n", 66 | "b = a - b\n", 67 | "a = a - b\n", 68 | "\n", 69 | "print(a)\n", 70 | "print(b)" 71 | ] 72 | }, 73 | { 74 | "cell_type": "code", 75 | "execution_count": 5, 76 | "id": "9e822db4", 77 | "metadata": {}, 78 | "outputs": [ 79 | { 80 | "name": "stdout", 81 | "output_type": "stream", 82 | "text": [ 83 | "1\n", 84 | "2\n", 85 | "3\n" 86 | ] 87 | } 88 | ], 89 | "source": [ 90 | "a,b,c = 1,2,3\n", 91 | "print(a)\n", 92 | "print(b)\n", 93 | "print(c)" 94 | ] 95 | }, 96 | { 97 | "cell_type": "code", 98 | "execution_count": 6, 99 | "id": "86dba683", 100 | "metadata": {}, 101 | "outputs": [ 102 | { 103 | "ename": "ValueError", 104 | "evalue": "too many values to unpack (expected 2)", 105 | "output_type": "error", 106 | "traceback": [ 107 | "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", 108 | "\u001b[1;31mValueError\u001b[0m Traceback (most recent call last)", 109 | "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0ma\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mb\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;36m1\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m3\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 2\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0ma\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 3\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mb\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mc\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", 110 | "\u001b[1;31mValueError\u001b[0m: too many values to unpack (expected 2)" 111 | ] 112 | } 113 | ], 114 | "source": [ 115 | "a,b = 1,2,3\n", 116 | "print(a)\n", 117 | "print(b)\n", 118 | "print(c)" 119 | ] 120 | }, 121 | { 122 | "cell_type": "code", 123 | "execution_count": 7, 124 | "id": "811a4fb3", 125 | "metadata": {}, 126 | "outputs": [ 127 | { 128 | "name": "stdout", 129 | "output_type": "stream", 130 | "text": [ 131 | "20\n", 132 | "10\n" 133 | ] 134 | } 135 | ], 136 | "source": [ 137 | "a = 10\n", 138 | "b = 20\n", 139 | "\n", 140 | "a,b = b,a\n", 141 | "# 20,10\n", 142 | "\n", 143 | "print(a)\n", 144 | "print(b)" 145 | ] 146 | }, 147 | { 148 | "cell_type": "markdown", 149 | "id": "bfd3ef2b", 150 | "metadata": {}, 151 | "source": [ 152 | "# Sorting" 153 | ] 154 | }, 155 | { 156 | "cell_type": "code", 157 | "execution_count": 8, 158 | "id": "97cb1162", 159 | "metadata": {}, 160 | "outputs": [ 161 | { 162 | "name": "stdout", 163 | "output_type": "stream", 164 | "text": [ 165 | "[2, 4, 10, 11, 20, 65, 76]\n" 166 | ] 167 | } 168 | ], 169 | "source": [ 170 | "n = [10,20,11,4,2,65,76]\n", 171 | "n.sort()\n", 172 | "print(n)" 173 | ] 174 | }, 175 | { 176 | "cell_type": "code", 177 | "execution_count": null, 178 | "id": "f6ce7898", 179 | "metadata": {}, 180 | "outputs": [], 181 | "source": [ 182 | "n = [50,40,10,20,30]\n", 183 | "# i j" 184 | ] 185 | }, 186 | { 187 | "cell_type": "code", 188 | "execution_count": 9, 189 | "id": "4ac45977", 190 | "metadata": {}, 191 | "outputs": [ 192 | { 193 | "name": "stdout", 194 | "output_type": "stream", 195 | "text": [ 196 | "[10, 20, 30, 40, 50]\n" 197 | ] 198 | } 199 | ], 200 | "source": [ 201 | "n = [10,20,30,40,50]\n", 202 | "# 0 1 2 3 4\n", 203 | "# i j\n", 204 | "\n", 205 | "i = 0\n", 206 | "# 4\n", 207 | "while i < len(n) - 1:\n", 208 | " j = i + 1\n", 209 | " while j < len(n):\n", 210 | " if n[i] > n[j]:\n", 211 | " temp = n[i]\n", 212 | " n[i] = n[j]\n", 213 | " n[j] = temp\n", 214 | " j += 1\n", 215 | " i += 1\n", 216 | "\n", 217 | "print(n)" 218 | ] 219 | }, 220 | { 221 | "cell_type": "markdown", 222 | "id": "4bb7b62b", 223 | "metadata": {}, 224 | "source": [ 225 | "# Binary Search" 226 | ] 227 | }, 228 | { 229 | "cell_type": "code", 230 | "execution_count": 1, 231 | "id": "bc1713b8", 232 | "metadata": {}, 233 | "outputs": [ 234 | { 235 | "name": "stdout", 236 | "output_type": "stream", 237 | "text": [ 238 | "Search Success\n" 239 | ] 240 | } 241 | ], 242 | "source": [ 243 | "# mid\n", 244 | "# low\n", 245 | "# high \n", 246 | "a = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]\n", 247 | "# 0 1 2 3 4 5 6 7 8 9\n", 248 | "n = 70\n", 249 | "\n", 250 | "low = 0\n", 251 | "high = len(a) - 1\n", 252 | "f = 0\n", 253 | "\n", 254 | "while low <= high: # low = 0,5,6 high = 9, 6\n", 255 | " mid = (low + high)//2 # mid = 4, 7, 5, 6\n", 256 | " if a[mid] == n: \n", 257 | " f = 1\n", 258 | " break\n", 259 | " elif n < a[mid]:\n", 260 | " high = mid - 1\n", 261 | " else:\n", 262 | " low = mid + 1\n", 263 | "\n", 264 | "if f == 1:\n", 265 | " print(\"Search Success\")\n", 266 | "else:\n", 267 | " print(\"Fail\")" 268 | ] 269 | }, 270 | { 271 | "cell_type": "markdown", 272 | "id": "18ebb4e0", 273 | "metadata": {}, 274 | "source": [ 275 | "1 - 10\n", 276 | "\n", 277 | "3 5 /\n", 278 | "\n", 279 | "3 + 5 + 6 + 9 + 10 = 33\n", 280 | "\n", 281 | "1 - 1000\n", 282 | "\n", 283 | "3 5 sum?\n", 284 | "\n", 285 | "15 - 3 and 5 X\n", 286 | "\n" 287 | ] 288 | }, 289 | { 290 | "cell_type": "code", 291 | "execution_count": null, 292 | "id": "c55d27b6", 293 | "metadata": {}, 294 | "outputs": [], 295 | "source": [] 296 | }, 297 | { 298 | "cell_type": "markdown", 299 | "id": "ac81ad82", 300 | "metadata": {}, 301 | "source": [ 302 | "2520\n", 303 | "\n", 304 | "1 - 10 /\n", 305 | "\n", 306 | "\n", 307 | "?\n", 308 | "\n", 309 | "1 - 20 /" 310 | ] 311 | }, 312 | { 313 | "cell_type": "code", 314 | "execution_count": 2, 315 | "id": "7aff2ccc", 316 | "metadata": {}, 317 | "outputs": [ 318 | { 319 | "name": "stdout", 320 | "output_type": "stream", 321 | "text": [ 322 | "2520\n" 323 | ] 324 | } 325 | ], 326 | "source": [ 327 | "i = 1\n", 328 | "\n", 329 | "while True:\n", 330 | " if i%2==0 and i%3==0 and i%4==0 and i%5==0 and i%6==0 and i%7==0 and i%8==0 and i%9==0 and i%10==0:\n", 331 | " print(i)\n", 332 | " break\n", 333 | " i += 1" 334 | ] 335 | }, 336 | { 337 | "cell_type": "code", 338 | "execution_count": null, 339 | "id": "b6edc29d", 340 | "metadata": {}, 341 | "outputs": [], 342 | "source": [] 343 | } 344 | ], 345 | "metadata": { 346 | "kernelspec": { 347 | "display_name": "Python 3", 348 | "language": "python", 349 | "name": "python3" 350 | }, 351 | "language_info": { 352 | "codemirror_mode": { 353 | "name": "ipython", 354 | "version": 3 355 | }, 356 | "file_extension": ".py", 357 | "mimetype": "text/x-python", 358 | "name": "python", 359 | "nbconvert_exporter": "python", 360 | "pygments_lexer": "ipython3", 361 | "version": "3.8.10" 362 | } 363 | }, 364 | "nbformat": 4, 365 | "nbformat_minor": 5 366 | } 367 | -------------------------------------------------------------------------------- /1_Python Core/21_Object Orientation.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f7f4e8c4", 6 | "metadata": {}, 7 | "source": [ 8 | "# Object Orientated Programming" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "e4ad2708", 14 | "metadata": {}, 15 | "source": [ 16 | "7 properties of OOPs\n", 17 | "\n", 18 | "1. Class\n", 19 | " Updated version of structure\n", 20 | " Collection of variables and methods.\n", 21 | " Class is a blueprint.\n", 22 | "\n", 23 | "2. Object\n", 24 | " Run time or real time entity.\n", 25 | " hash code - id\n", 26 | " \n", 27 | "3. Abstraction and Encapsulation\n", 28 | " Abstraction - Showing only essential features without showing any background details.\n", 29 | " Encapsulation - wrapping up of data in a single unit.\n", 30 | "\n", 31 | "4. Inheritance\n", 32 | " Acquiring Properties of one class into another.\n", 33 | " Code reuse.\n", 34 | " - Single Level\n", 35 | " - Multi Level\n", 36 | " - Hierarchical\n", 37 | " - Multiple\n", 38 | " - Hybrid\n", 39 | "\n", 40 | "5. Polymorphism\n", 41 | " same name multiple fuctionalities.\n", 42 | " - Method Overloading\n", 43 | " - Method Overriding\n", 44 | " add()\n", 45 | " add(x,y)\n", 46 | " add(a,b,c)\n", 47 | " add()\n", 48 | "\n", 49 | "6. Dynamic Memory Allocation\n", 50 | " Run time memory allocation\n", 51 | " \n", 52 | " \n", 53 | "7. Message passing\n", 54 | " Communication between objects" 55 | ] 56 | }, 57 | { 58 | "cell_type": "code", 59 | "execution_count": null, 60 | "id": "d29fcaf6", 61 | "metadata": {}, 62 | "outputs": [], 63 | "source": [ 64 | "int a = 10;\n", 65 | "\n", 66 | "struct student{\n", 67 | " int a;\n", 68 | " float p;\n", 69 | " char f;\n", 70 | "}\n", 71 | "\n", 72 | "struct student s1;\n", 73 | " int a;" 74 | ] 75 | }, 76 | { 77 | "cell_type": "code", 78 | "execution_count": null, 79 | "id": "0a1d53fd", 80 | "metadata": {}, 81 | "outputs": [], 82 | "source": [] 83 | }, 84 | { 85 | "cell_type": "code", 86 | "execution_count": null, 87 | "id": "0b19b42b", 88 | "metadata": {}, 89 | "outputs": [], 90 | "source": [] 91 | } 92 | ], 93 | "metadata": { 94 | "kernelspec": { 95 | "display_name": "Python 3", 96 | "language": "python", 97 | "name": "python3" 98 | }, 99 | "language_info": { 100 | "codemirror_mode": { 101 | "name": "ipython", 102 | "version": 3 103 | }, 104 | "file_extension": ".py", 105 | "mimetype": "text/x-python", 106 | "name": "python", 107 | "nbconvert_exporter": "python", 108 | "pygments_lexer": "ipython3", 109 | "version": "3.8.10" 110 | } 111 | }, 112 | "nbformat": 4, 113 | "nbformat_minor": 5 114 | } 115 | -------------------------------------------------------------------------------- /1_Python Core/22_Object Orientation .ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f7f4e8c4", 6 | "metadata": {}, 7 | "source": [ 8 | "# Object Orientated Programming" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "e4ad2708", 14 | "metadata": {}, 15 | "source": [ 16 | "7 properties of OOPs\n", 17 | "\n", 18 | "1. Class\n", 19 | " Updated version of structure\n", 20 | " Collection of variables and methods.\n", 21 | " Class is a blueprint.\n", 22 | "\n", 23 | "2. Object\n", 24 | " Run time or real time entity.\n", 25 | " hash code - id\n", 26 | " \n", 27 | "3. Abstraction and Encapsulation\n", 28 | " Abstraction - Showing only essential features without showing any background details.\n", 29 | " Encapsulation - wrapping up of data in a single unit.\n", 30 | "\n", 31 | "4. Inheritance\n", 32 | " Acquiring Properties of one class into another.\n", 33 | " Code reuse.\n", 34 | " - Single Level\n", 35 | " - Multi Level\n", 36 | " - Hierarchical\n", 37 | " - Multiple\n", 38 | " - Hybrid\n", 39 | "\n", 40 | "5. Polymorphism\n", 41 | " same name multiple fuctionalities.\n", 42 | " - Method Overloading\n", 43 | " - Method Overriding\n", 44 | " add()\n", 45 | " add(x,y)\n", 46 | " add(a,b,c)\n", 47 | " add()\n", 48 | "\n", 49 | "6. Dynamic Memory Allocation\n", 50 | " Run time memory allocation\n", 51 | " \n", 52 | " \n", 53 | "7. Message passing\n", 54 | " Communication between objects" 55 | ] 56 | }, 57 | { 58 | "cell_type": "code", 59 | "execution_count": null, 60 | "id": "d29fcaf6", 61 | "metadata": {}, 62 | "outputs": [], 63 | "source": [ 64 | "int a = 10;\n", 65 | "\n", 66 | "struct student{\n", 67 | " int a;\n", 68 | " float p;\n", 69 | " char f;\n", 70 | "}\n", 71 | "\n", 72 | "struct student s1;\n", 73 | " int a;" 74 | ] 75 | }, 76 | { 77 | "cell_type": "code", 78 | "execution_count": 1, 79 | "id": "0b19b42b", 80 | "metadata": {}, 81 | "outputs": [], 82 | "source": [ 83 | "class Cricket:\n", 84 | " \n", 85 | " def bat():\n", 86 | " print(\"Batting\")\n" 87 | ] 88 | }, 89 | { 90 | "cell_type": "code", 91 | "execution_count": 2, 92 | "id": "060506e6", 93 | "metadata": {}, 94 | "outputs": [ 95 | { 96 | "ename": "NameError", 97 | "evalue": "name 'bat' is not defined", 98 | "output_type": "error", 99 | "traceback": [ 100 | "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", 101 | "\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)", 102 | "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mbat\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m", 103 | "\u001b[1;31mNameError\u001b[0m: name 'bat' is not defined" 104 | ] 105 | } 106 | ], 107 | "source": [ 108 | "bat()" 109 | ] 110 | }, 111 | { 112 | "cell_type": "code", 113 | "execution_count": null, 114 | "id": "a9c9d4c4", 115 | "metadata": {}, 116 | "outputs": [], 117 | "source": [ 118 | "# self ---> current object" 119 | ] 120 | }, 121 | { 122 | "cell_type": "code", 123 | "execution_count": 5, 124 | "id": "d0bd3233", 125 | "metadata": {}, 126 | "outputs": [], 127 | "source": [ 128 | "class Cricket:\n", 129 | " \n", 130 | " def bat(self):\n", 131 | " print(\"Batting\")\n", 132 | "\n", 133 | "x = Cricket()" 134 | ] 135 | }, 136 | { 137 | "cell_type": "code", 138 | "execution_count": 6, 139 | "id": "5053586c", 140 | "metadata": {}, 141 | "outputs": [ 142 | { 143 | "name": "stdout", 144 | "output_type": "stream", 145 | "text": [ 146 | "Batting\n" 147 | ] 148 | } 149 | ], 150 | "source": [ 151 | "x.bat()" 152 | ] 153 | }, 154 | { 155 | "cell_type": "code", 156 | "execution_count": 7, 157 | "id": "682cc8f4", 158 | "metadata": {}, 159 | "outputs": [ 160 | { 161 | "name": "stdout", 162 | "output_type": "stream", 163 | "text": [ 164 | "<__main__.Cricket object at 0x000002631117DA60>\n" 165 | ] 166 | } 167 | ], 168 | "source": [ 169 | "print(x)" 170 | ] 171 | }, 172 | { 173 | "cell_type": "code", 174 | "execution_count": 8, 175 | "id": "2e033926", 176 | "metadata": {}, 177 | "outputs": [ 178 | { 179 | "name": "stdout", 180 | "output_type": "stream", 181 | "text": [ 182 | "2624511793760\n" 183 | ] 184 | } 185 | ], 186 | "source": [ 187 | "print(id(x))" 188 | ] 189 | }, 190 | { 191 | "cell_type": "code", 192 | "execution_count": 9, 193 | "id": "ef206783", 194 | "metadata": {}, 195 | "outputs": [ 196 | { 197 | "name": "stdout", 198 | "output_type": "stream", 199 | "text": [ 200 | "<__main__.Cricket object at 0x0000026311187550>\n" 201 | ] 202 | } 203 | ], 204 | "source": [ 205 | "print(Cricket())" 206 | ] 207 | }, 208 | { 209 | "cell_type": "code", 210 | "execution_count": null, 211 | "id": "235f27d2", 212 | "metadata": {}, 213 | "outputs": [], 214 | "source": [ 215 | "x = Cricket()" 216 | ] 217 | }, 218 | { 219 | "cell_type": "code", 220 | "execution_count": null, 221 | "id": "0ff38837", 222 | "metadata": {}, 223 | "outputs": [], 224 | "source": [ 225 | "TV blueprint - class\n", 226 | "- smart tv\n", 227 | "- colors\n", 228 | "- usb\n", 229 | "- hdmi\n", 230 | "\n", 231 | "Actual TV - object\n", 232 | "\n", 233 | "Remote - reference" 234 | ] 235 | } 236 | ], 237 | "metadata": { 238 | "kernelspec": { 239 | "display_name": "Python 3", 240 | "language": "python", 241 | "name": "python3" 242 | }, 243 | "language_info": { 244 | "codemirror_mode": { 245 | "name": "ipython", 246 | "version": 3 247 | }, 248 | "file_extension": ".py", 249 | "mimetype": "text/x-python", 250 | "name": "python", 251 | "nbconvert_exporter": "python", 252 | "pygments_lexer": "ipython3", 253 | "version": "3.8.10" 254 | } 255 | }, 256 | "nbformat": 4, 257 | "nbformat_minor": 5 258 | } 259 | -------------------------------------------------------------------------------- /1_Python Core/27_File Handling.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "a12234db", 6 | "metadata": {}, 7 | "source": [ 8 | "# File Handling" 9 | ] 10 | }, 11 | { 12 | "cell_type": "code", 13 | "execution_count": null, 14 | "id": "7076b706", 15 | "metadata": {}, 16 | "outputs": [], 17 | "source": [ 18 | "txt\n", 19 | "png\n", 20 | "mp3\n", 21 | "mp4\n", 22 | "csv\n", 23 | "xlsv" 24 | ] 25 | }, 26 | { 27 | "cell_type": "code", 28 | "execution_count": null, 29 | "id": "39d9c964", 30 | "metadata": {}, 31 | "outputs": [], 32 | "source": [ 33 | "mode\n", 34 | "r - read\n", 35 | "a - append\n", 36 | "w - write" 37 | ] 38 | }, 39 | { 40 | "cell_type": "code", 41 | "execution_count": 1, 42 | "id": "580b97b1", 43 | "metadata": {}, 44 | "outputs": [ 45 | { 46 | "name": "stdout", 47 | "output_type": "stream", 48 | "text": [ 49 | "<_io.TextIOWrapper name='student.txt' mode='r' encoding='cp1252'>\n" 50 | ] 51 | } 52 | ], 53 | "source": [ 54 | "f = open(\"student.txt\",'r')\n", 55 | "print(f)" 56 | ] 57 | }, 58 | { 59 | "cell_type": "code", 60 | "execution_count": 2, 61 | "id": "922f2144", 62 | "metadata": {}, 63 | "outputs": [ 64 | { 65 | "name": "stdout", 66 | "output_type": "stream", 67 | "text": [ 68 | "this is the best file handling session.\n" 69 | ] 70 | } 71 | ], 72 | "source": [ 73 | "print(f.read())" 74 | ] 75 | }, 76 | { 77 | "cell_type": "code", 78 | "execution_count": 3, 79 | "id": "a09c4bfa", 80 | "metadata": {}, 81 | "outputs": [], 82 | "source": [ 83 | "f.close()" 84 | ] 85 | }, 86 | { 87 | "cell_type": "code", 88 | "execution_count": 10, 89 | "id": "7998c4a4", 90 | "metadata": {}, 91 | "outputs": [ 92 | { 93 | "data": { 94 | "text/plain": [ 95 | "'this is the best file handling session.\\n'" 96 | ] 97 | }, 98 | "execution_count": 10, 99 | "metadata": {}, 100 | "output_type": "execute_result" 101 | } 102 | ], 103 | "source": [ 104 | "f = open(\"student.txt\",'r')\n", 105 | "f.readline()" 106 | ] 107 | }, 108 | { 109 | "cell_type": "code", 110 | "execution_count": 12, 111 | "id": "30ffb1e3", 112 | "metadata": {}, 113 | "outputs": [ 114 | { 115 | "data": { 116 | "text/plain": [ 117 | "['this is the best file handling session.\\n',\n", 118 | " 'we are the best.\\n',\n", 119 | " 'This is india.']" 120 | ] 121 | }, 122 | "execution_count": 12, 123 | "metadata": {}, 124 | "output_type": "execute_result" 125 | } 126 | ], 127 | "source": [ 128 | "f = open(\"student.txt\",'r')\n", 129 | "\n", 130 | "f.readlines()" 131 | ] 132 | }, 133 | { 134 | "cell_type": "markdown", 135 | "id": "6d59f414", 136 | "metadata": {}, 137 | "source": [ 138 | "### write a file" 139 | ] 140 | }, 141 | { 142 | "cell_type": "code", 143 | "execution_count": 13, 144 | "id": "c5c40717", 145 | "metadata": {}, 146 | "outputs": [], 147 | "source": [ 148 | "f = open(\"indore.txt\",'w')\n", 149 | "\n", 150 | "f.write(\"hello from india.\")\n", 151 | "f.close()" 152 | ] 153 | }, 154 | { 155 | "cell_type": "code", 156 | "execution_count": 14, 157 | "id": "9a63ee11", 158 | "metadata": {}, 159 | "outputs": [ 160 | { 161 | "data": { 162 | "text/plain": [ 163 | "'hello from india.'" 164 | ] 165 | }, 166 | "execution_count": 14, 167 | "metadata": {}, 168 | "output_type": "execute_result" 169 | } 170 | ], 171 | "source": [ 172 | "f = open(\"indore.txt\",'r')\n", 173 | "\n", 174 | "f.read()" 175 | ] 176 | }, 177 | { 178 | "cell_type": "markdown", 179 | "id": "0274bad8", 180 | "metadata": {}, 181 | "source": [ 182 | "### append a file" 183 | ] 184 | }, 185 | { 186 | "cell_type": "code", 187 | "execution_count": 18, 188 | "id": "6dec8f6a", 189 | "metadata": {}, 190 | "outputs": [], 191 | "source": [ 192 | "f = open(\"student.txt\", 'a')\n", 193 | "\n", 194 | "f.write(\"string from append mode\")\n", 195 | "\n", 196 | "f.close()" 197 | ] 198 | }, 199 | { 200 | "cell_type": "code", 201 | "execution_count": 19, 202 | "id": "2a229b65", 203 | "metadata": {}, 204 | "outputs": [ 205 | { 206 | "name": "stdout", 207 | "output_type": "stream", 208 | "text": [ 209 | "this is the best file handling session.\n", 210 | "we are the best.\n", 211 | "This is india.\n", 212 | "string from append modestring from append mode\n" 213 | ] 214 | } 215 | ], 216 | "source": [ 217 | "f = open(\"student.txt\", 'r')\n", 218 | "\n", 219 | "print(f.read())" 220 | ] 221 | }, 222 | { 223 | "cell_type": "code", 224 | "execution_count": null, 225 | "id": "904e1668", 226 | "metadata": {}, 227 | "outputs": [], 228 | "source": [] 229 | } 230 | ], 231 | "metadata": { 232 | "kernelspec": { 233 | "display_name": "Python 3", 234 | "language": "python", 235 | "name": "python3" 236 | }, 237 | "language_info": { 238 | "codemirror_mode": { 239 | "name": "ipython", 240 | "version": 3 241 | }, 242 | "file_extension": ".py", 243 | "mimetype": "text/x-python", 244 | "name": "python", 245 | "nbconvert_exporter": "python", 246 | "pygments_lexer": "ipython3", 247 | "version": "3.8.10" 248 | } 249 | }, 250 | "nbformat": 4, 251 | "nbformat_minor": 5 252 | } 253 | -------------------------------------------------------------------------------- /1_Python Core/7_Git and GitHub.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [], 3 | "metadata": {}, 4 | "nbformat": 4, 5 | "nbformat_minor": 5 6 | } 7 | -------------------------------------------------------------------------------- /1_Python Core/indore.txt: -------------------------------------------------------------------------------- 1 | hello from india. -------------------------------------------------------------------------------- /1_Python Core/student.txt: -------------------------------------------------------------------------------- 1 | this is the best file handling session. 2 | we are the best. 3 | This is india. 4 | string from append modestring from append mode -------------------------------------------------------------------------------- /2_Data Structures/29_Queue.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "ba6583a8", 6 | "metadata": {}, 7 | "source": [ 8 | "# Queue\n", 9 | "\n", 10 | "FIFO (First In First Out)" 11 | ] 12 | }, 13 | { 14 | "cell_type": "code", 15 | "execution_count": null, 16 | "id": "1bda9d7d", 17 | "metadata": {}, 18 | "outputs": [], 19 | "source": [ 20 | " 30 40 70 80\n", 21 | " rare front" 22 | ] 23 | }, 24 | { 25 | "cell_type": "code", 26 | "execution_count": null, 27 | "id": "a911f913", 28 | "metadata": {}, 29 | "outputs": [], 30 | "source": [ 31 | "10 20 30\n", 32 | "rare\n", 33 | " front" 34 | ] 35 | }, 36 | { 37 | "cell_type": "code", 38 | "execution_count": null, 39 | "id": "875e84c0", 40 | "metadata": {}, 41 | "outputs": [], 42 | "source": [ 43 | "enqueue - insert an element\n", 44 | "\n", 45 | "dequeue - delete an element\n", 46 | "\n", 47 | "display" 48 | ] 49 | }, 50 | { 51 | "cell_type": "code", 52 | "execution_count": 2, 53 | "id": "79b539f8", 54 | "metadata": {}, 55 | "outputs": [ 56 | { 57 | "name": "stdout", 58 | "output_type": "stream", 59 | "text": [ 60 | "[None, None, None, None, None]\n" 61 | ] 62 | } 63 | ], 64 | "source": [ 65 | "l = [None]*5\n", 66 | "\n", 67 | "print(l)" 68 | ] 69 | }, 70 | { 71 | "cell_type": "code", 72 | "execution_count": null, 73 | "id": "f70d7302", 74 | "metadata": {}, 75 | "outputs": [], 76 | "source": [ 77 | " None 20 30 40\n", 78 | " 0 1 2 3\n", 79 | " rare\n", 80 | " front" 81 | ] 82 | }, 83 | { 84 | "cell_type": "code", 85 | "execution_count": 18, 86 | "id": "13cd2f6e", 87 | "metadata": {}, 88 | "outputs": [], 89 | "source": [ 90 | "class Queue:\n", 91 | " \n", 92 | " DEAFULT_CAPACITY = 10\n", 93 | " \n", 94 | " def __init__(self):\n", 95 | " self.data = [None] * Queue.DEAFULT_CAPACITY\n", 96 | " self.size = 0\n", 97 | " self.front = 0\n", 98 | " self.rare = 0\n", 99 | " \n", 100 | " def __len__(self):\n", 101 | " return self.size\n", 102 | " \n", 103 | " def is_empty(self):\n", 104 | " return self.size == 0\n", 105 | " \n", 106 | " def first(self):\n", 107 | " if self.is_empty():\n", 108 | " raise \"Queue is Empty\"\n", 109 | " return self.data[self.front]\n", 110 | " \n", 111 | " def enqueue(self, element):\n", 112 | " if self.is_empty():\n", 113 | " self.data[self.front] = element\n", 114 | " self.size += 1\n", 115 | " elif self.size == Queue.DEAFULT_CAPACITY:\n", 116 | " raise \"Queue is overflow\"\n", 117 | " else:\n", 118 | " self.front += 1\n", 119 | " self.data[self.front] = element\n", 120 | " self.size += 1\n", 121 | " \n", 122 | " def dequeue(self):\n", 123 | " if self.is_empty():\n", 124 | " raise \"Queue is Underflow\"\n", 125 | " \n", 126 | " result = self.data[self.rare]\n", 127 | " self.data[self.rare] = None\n", 128 | " self.rare += 1\n", 129 | " self.size -= 1\n", 130 | " return result\n", 131 | " \n", 132 | " def display(self):\n", 133 | " if self.is_empty():\n", 134 | " raise \"Queue is Empty\"\n", 135 | " \n", 136 | " for i in range(self.rare, self.front + 1):\n", 137 | " print(self.data[i])" 138 | ] 139 | }, 140 | { 141 | "cell_type": "code", 142 | "execution_count": 19, 143 | "id": "e1faae7d", 144 | "metadata": {}, 145 | "outputs": [], 146 | "source": [ 147 | "q = Queue()" 148 | ] 149 | }, 150 | { 151 | "cell_type": "code", 152 | "execution_count": 20, 153 | "id": "8605ee62", 154 | "metadata": {}, 155 | "outputs": [ 156 | { 157 | "data": { 158 | "text/plain": [ 159 | "[None, None, None, None, None, None, None, None, None, None]" 160 | ] 161 | }, 162 | "execution_count": 20, 163 | "metadata": {}, 164 | "output_type": "execute_result" 165 | } 166 | ], 167 | "source": [ 168 | "q.data" 169 | ] 170 | }, 171 | { 172 | "cell_type": "code", 173 | "execution_count": 21, 174 | "id": "b5f5a477", 175 | "metadata": {}, 176 | "outputs": [ 177 | { 178 | "data": { 179 | "text/plain": [ 180 | "0" 181 | ] 182 | }, 183 | "execution_count": 21, 184 | "metadata": {}, 185 | "output_type": "execute_result" 186 | } 187 | ], 188 | "source": [ 189 | "q.__len__()" 190 | ] 191 | }, 192 | { 193 | "cell_type": "code", 194 | "execution_count": 22, 195 | "id": "bb30ab49", 196 | "metadata": {}, 197 | "outputs": [ 198 | { 199 | "ename": "TypeError", 200 | "evalue": "exceptions must derive from BaseException", 201 | "output_type": "error", 202 | "traceback": [ 203 | "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", 204 | "\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)", 205 | "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mq\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdisplay\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m", 206 | "\u001b[1;32m\u001b[0m in \u001b[0;36mdisplay\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 43\u001b[0m \u001b[1;32mdef\u001b[0m \u001b[0mdisplay\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 44\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mis_empty\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 45\u001b[1;33m \u001b[1;32mraise\u001b[0m \u001b[1;34m\"Queue is Empty\"\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 46\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 47\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0mi\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mrare\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mfront\u001b[0m \u001b[1;33m+\u001b[0m \u001b[1;36m1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", 207 | "\u001b[1;31mTypeError\u001b[0m: exceptions must derive from BaseException" 208 | ] 209 | } 210 | ], 211 | "source": [ 212 | "q.display()" 213 | ] 214 | }, 215 | { 216 | "cell_type": "code", 217 | "execution_count": 23, 218 | "id": "119e60bc", 219 | "metadata": {}, 220 | "outputs": [ 221 | { 222 | "data": { 223 | "text/plain": [ 224 | "True" 225 | ] 226 | }, 227 | "execution_count": 23, 228 | "metadata": {}, 229 | "output_type": "execute_result" 230 | } 231 | ], 232 | "source": [ 233 | "q.is_empty()" 234 | ] 235 | }, 236 | { 237 | "cell_type": "code", 238 | "execution_count": 24, 239 | "id": "b81309f3", 240 | "metadata": {}, 241 | "outputs": [], 242 | "source": [ 243 | "q.enqueue(10)\n", 244 | "q.enqueue(20)\n", 245 | "q.enqueue(30)\n", 246 | "q.enqueue(40)\n" 247 | ] 248 | }, 249 | { 250 | "cell_type": "code", 251 | "execution_count": 25, 252 | "id": "3cd4b501", 253 | "metadata": {}, 254 | "outputs": [ 255 | { 256 | "name": "stdout", 257 | "output_type": "stream", 258 | "text": [ 259 | "10\n", 260 | "20\n", 261 | "30\n", 262 | "40\n" 263 | ] 264 | } 265 | ], 266 | "source": [ 267 | "q.display()" 268 | ] 269 | }, 270 | { 271 | "cell_type": "code", 272 | "execution_count": 26, 273 | "id": "b6ccc07d", 274 | "metadata": {}, 275 | "outputs": [ 276 | { 277 | "data": { 278 | "text/plain": [ 279 | "10" 280 | ] 281 | }, 282 | "execution_count": 26, 283 | "metadata": {}, 284 | "output_type": "execute_result" 285 | } 286 | ], 287 | "source": [ 288 | "q.dequeue()" 289 | ] 290 | }, 291 | { 292 | "cell_type": "code", 293 | "execution_count": 27, 294 | "id": "9eb5173f", 295 | "metadata": {}, 296 | "outputs": [ 297 | { 298 | "name": "stdout", 299 | "output_type": "stream", 300 | "text": [ 301 | "20\n", 302 | "30\n", 303 | "40\n" 304 | ] 305 | } 306 | ], 307 | "source": [ 308 | "q.display()" 309 | ] 310 | }, 311 | { 312 | "cell_type": "code", 313 | "execution_count": 28, 314 | "id": "3e57847c", 315 | "metadata": {}, 316 | "outputs": [ 317 | { 318 | "data": { 319 | "text/plain": [ 320 | "40" 321 | ] 322 | }, 323 | "execution_count": 28, 324 | "metadata": {}, 325 | "output_type": "execute_result" 326 | } 327 | ], 328 | "source": [ 329 | "q.first()" 330 | ] 331 | }, 332 | { 333 | "cell_type": "code", 334 | "execution_count": null, 335 | "id": "1ca0c90f", 336 | "metadata": {}, 337 | "outputs": [], 338 | "source": [] 339 | } 340 | ], 341 | "metadata": { 342 | "kernelspec": { 343 | "display_name": "Python 3", 344 | "language": "python", 345 | "name": "python3" 346 | }, 347 | "language_info": { 348 | "codemirror_mode": { 349 | "name": "ipython", 350 | "version": 3 351 | }, 352 | "file_extension": ".py", 353 | "mimetype": "text/x-python", 354 | "name": "python", 355 | "nbconvert_exporter": "python", 356 | "pygments_lexer": "ipython3", 357 | "version": "3.8.10" 358 | } 359 | }, 360 | "nbformat": 4, 361 | "nbformat_minor": 5 362 | } 363 | -------------------------------------------------------------------------------- /3_NumPy/.ipynb_checkpoints/30_NumPy-checkpoint.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "336294bc", 6 | "metadata": {}, 7 | "source": [ 8 | "# Numpy\n", 9 | "\n", 10 | "Numeric Python\n" 11 | ] 12 | }, 13 | { 14 | "cell_type": "code", 15 | "execution_count": 1, 16 | "id": "f12e034c", 17 | "metadata": {}, 18 | "outputs": [ 19 | { 20 | "name": "stdout", 21 | "output_type": "stream", 22 | "text": [ 23 | "Requirement already satisfied: numpy in c:\\users\\admin\\anaconda3\\envs\\pytorch\\lib\\site-packages (1.21.0)\n" 24 | ] 25 | } 26 | ], 27 | "source": [ 28 | "!pip install numpy" 29 | ] 30 | }, 31 | { 32 | "cell_type": "markdown", 33 | "id": "beffdb98", 34 | "metadata": {}, 35 | "source": [ 36 | "# Creating a Vector" 37 | ] 38 | }, 39 | { 40 | "cell_type": "code", 41 | "execution_count": 2, 42 | "id": "450b2699", 43 | "metadata": {}, 44 | "outputs": [], 45 | "source": [ 46 | "import numpy as np" 47 | ] 48 | }, 49 | { 50 | "cell_type": "code", 51 | "execution_count": 3, 52 | "id": "daa0c249", 53 | "metadata": {}, 54 | "outputs": [], 55 | "source": [ 56 | "np.array?" 57 | ] 58 | }, 59 | { 60 | "cell_type": "code", 61 | "execution_count": 4, 62 | "id": "fbcfa191", 63 | "metadata": {}, 64 | "outputs": [ 65 | { 66 | "data": { 67 | "text/plain": [ 68 | "array([1, 2, 3, 4])" 69 | ] 70 | }, 71 | "execution_count": 4, 72 | "metadata": {}, 73 | "output_type": "execute_result" 74 | } 75 | ], 76 | "source": [ 77 | "v = np.array([1,2,3,4])\n", 78 | "v" 79 | ] 80 | }, 81 | { 82 | "cell_type": "code", 83 | "execution_count": 5, 84 | "id": "243b8a6e", 85 | "metadata": {}, 86 | "outputs": [ 87 | { 88 | "name": "stdout", 89 | "output_type": "stream", 90 | "text": [ 91 | "[1 2 3 4]\n" 92 | ] 93 | } 94 | ], 95 | "source": [ 96 | "print(v)" 97 | ] 98 | }, 99 | { 100 | "cell_type": "code", 101 | "execution_count": 6, 102 | "id": "ec07abeb", 103 | "metadata": {}, 104 | "outputs": [ 105 | { 106 | "data": { 107 | "text/plain": [ 108 | "array([[1],\n", 109 | " [2],\n", 110 | " [3]])" 111 | ] 112 | }, 113 | "execution_count": 6, 114 | "metadata": {}, 115 | "output_type": "execute_result" 116 | } 117 | ], 118 | "source": [ 119 | "c = np.array([[1],[2],[3]])\n", 120 | "c" 121 | ] 122 | }, 123 | { 124 | "cell_type": "markdown", 125 | "id": "94e76be5", 126 | "metadata": {}, 127 | "source": [ 128 | "# Creating a Matrix" 129 | ] 130 | }, 131 | { 132 | "cell_type": "code", 133 | "execution_count": 7, 134 | "id": "5af4c21d", 135 | "metadata": {}, 136 | "outputs": [ 137 | { 138 | "data": { 139 | "text/plain": [ 140 | "array([[1, 2, 3],\n", 141 | " [4, 5, 6],\n", 142 | " [7, 8, 9]])" 143 | ] 144 | }, 145 | "execution_count": 7, 146 | "metadata": {}, 147 | "output_type": "execute_result" 148 | } 149 | ], 150 | "source": [ 151 | "matrix = np.array([[1,2,3],[4,5,6],[7,8,9]])\n", 152 | "matrix" 153 | ] 154 | }, 155 | { 156 | "cell_type": "code", 157 | "execution_count": 8, 158 | "id": "a3ccc1b7", 159 | "metadata": {}, 160 | "outputs": [ 161 | { 162 | "name": "stdout", 163 | "output_type": "stream", 164 | "text": [ 165 | "[[1 2 3]\n", 166 | " [4 5 6]\n", 167 | " [7 8 9]]\n" 168 | ] 169 | } 170 | ], 171 | "source": [ 172 | "print(matrix)" 173 | ] 174 | }, 175 | { 176 | "cell_type": "code", 177 | "execution_count": null, 178 | "id": "1c0724ac", 179 | "metadata": {}, 180 | "outputs": [], 181 | "source": [ 182 | "0th dimension ---> .\n", 183 | "1st dimension ---> .______.\n", 184 | "\n", 185 | "2nd dimension ---> .___|___.\n", 186 | "\n", 187 | "3rd dimension ---> .___|___.\n", 188 | " /\n", 189 | " \n", 190 | "4th dimension\n", 191 | "|\n", 192 | "|\n", 193 | "|\n", 194 | "nth dimensions" 195 | ] 196 | }, 197 | { 198 | "cell_type": "code", 199 | "execution_count": null, 200 | "id": "615e419b", 201 | "metadata": {}, 202 | "outputs": [], 203 | "source": [] 204 | } 205 | ], 206 | "metadata": { 207 | "kernelspec": { 208 | "display_name": "Python 3", 209 | "language": "python", 210 | "name": "python3" 211 | }, 212 | "language_info": { 213 | "codemirror_mode": { 214 | "name": "ipython", 215 | "version": 3 216 | }, 217 | "file_extension": ".py", 218 | "mimetype": "text/x-python", 219 | "name": "python", 220 | "nbconvert_exporter": "python", 221 | "pygments_lexer": "ipython3", 222 | "version": "3.8.10" 223 | } 224 | }, 225 | "nbformat": 4, 226 | "nbformat_minor": 5 227 | } 228 | -------------------------------------------------------------------------------- /3_NumPy/30_NumPy.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "336294bc", 6 | "metadata": {}, 7 | "source": [ 8 | "# Numpy\n", 9 | "\n", 10 | "Numeric Python\n" 11 | ] 12 | }, 13 | { 14 | "cell_type": "code", 15 | "execution_count": 1, 16 | "id": "f12e034c", 17 | "metadata": {}, 18 | "outputs": [ 19 | { 20 | "name": "stdout", 21 | "output_type": "stream", 22 | "text": [ 23 | "Requirement already satisfied: numpy in c:\\users\\admin\\anaconda3\\envs\\pytorch\\lib\\site-packages (1.21.0)\n" 24 | ] 25 | } 26 | ], 27 | "source": [ 28 | "!pip install numpy" 29 | ] 30 | }, 31 | { 32 | "cell_type": "markdown", 33 | "id": "beffdb98", 34 | "metadata": {}, 35 | "source": [ 36 | "# Creating a Vector" 37 | ] 38 | }, 39 | { 40 | "cell_type": "code", 41 | "execution_count": 2, 42 | "id": "450b2699", 43 | "metadata": {}, 44 | "outputs": [], 45 | "source": [ 46 | "import numpy as np" 47 | ] 48 | }, 49 | { 50 | "cell_type": "code", 51 | "execution_count": 3, 52 | "id": "daa0c249", 53 | "metadata": {}, 54 | "outputs": [], 55 | "source": [ 56 | "np.array?" 57 | ] 58 | }, 59 | { 60 | "cell_type": "code", 61 | "execution_count": 4, 62 | "id": "fbcfa191", 63 | "metadata": {}, 64 | "outputs": [ 65 | { 66 | "data": { 67 | "text/plain": [ 68 | "array([1, 2, 3, 4])" 69 | ] 70 | }, 71 | "execution_count": 4, 72 | "metadata": {}, 73 | "output_type": "execute_result" 74 | } 75 | ], 76 | "source": [ 77 | "v = np.array([1,2,3,4])\n", 78 | "v" 79 | ] 80 | }, 81 | { 82 | "cell_type": "code", 83 | "execution_count": 5, 84 | "id": "243b8a6e", 85 | "metadata": {}, 86 | "outputs": [ 87 | { 88 | "name": "stdout", 89 | "output_type": "stream", 90 | "text": [ 91 | "[1 2 3 4]\n" 92 | ] 93 | } 94 | ], 95 | "source": [ 96 | "print(v)" 97 | ] 98 | }, 99 | { 100 | "cell_type": "code", 101 | "execution_count": 6, 102 | "id": "ec07abeb", 103 | "metadata": {}, 104 | "outputs": [ 105 | { 106 | "data": { 107 | "text/plain": [ 108 | "array([[1],\n", 109 | " [2],\n", 110 | " [3]])" 111 | ] 112 | }, 113 | "execution_count": 6, 114 | "metadata": {}, 115 | "output_type": "execute_result" 116 | } 117 | ], 118 | "source": [ 119 | "c = np.array([[1],[2],[3]])\n", 120 | "c" 121 | ] 122 | }, 123 | { 124 | "cell_type": "markdown", 125 | "id": "94e76be5", 126 | "metadata": {}, 127 | "source": [ 128 | "# Creating a Matrix" 129 | ] 130 | }, 131 | { 132 | "cell_type": "code", 133 | "execution_count": 7, 134 | "id": "5af4c21d", 135 | "metadata": {}, 136 | "outputs": [ 137 | { 138 | "data": { 139 | "text/plain": [ 140 | "array([[1, 2, 3],\n", 141 | " [4, 5, 6],\n", 142 | " [7, 8, 9]])" 143 | ] 144 | }, 145 | "execution_count": 7, 146 | "metadata": {}, 147 | "output_type": "execute_result" 148 | } 149 | ], 150 | "source": [ 151 | "matrix = np.array([[1,2,3],[4,5,6],[7,8,9]])\n", 152 | "matrix" 153 | ] 154 | }, 155 | { 156 | "cell_type": "code", 157 | "execution_count": 8, 158 | "id": "a3ccc1b7", 159 | "metadata": {}, 160 | "outputs": [ 161 | { 162 | "name": "stdout", 163 | "output_type": "stream", 164 | "text": [ 165 | "[[1 2 3]\n", 166 | " [4 5 6]\n", 167 | " [7 8 9]]\n" 168 | ] 169 | } 170 | ], 171 | "source": [ 172 | "print(matrix)" 173 | ] 174 | }, 175 | { 176 | "cell_type": "code", 177 | "execution_count": null, 178 | "id": "1c0724ac", 179 | "metadata": {}, 180 | "outputs": [], 181 | "source": [ 182 | "0th dimension ---> .\n", 183 | "1st dimension ---> .______.\n", 184 | "\n", 185 | "2nd dimension ---> .___|___.\n", 186 | "\n", 187 | "3rd dimension ---> .___|___.\n", 188 | " /\n", 189 | " \n", 190 | "4th dimension\n", 191 | "|\n", 192 | "|\n", 193 | "|\n", 194 | "nth dimensions" 195 | ] 196 | }, 197 | { 198 | "cell_type": "code", 199 | "execution_count": null, 200 | "id": "615e419b", 201 | "metadata": {}, 202 | "outputs": [], 203 | "source": [] 204 | } 205 | ], 206 | "metadata": { 207 | "kernelspec": { 208 | "display_name": "Python 3", 209 | "language": "python", 210 | "name": "python3" 211 | }, 212 | "language_info": { 213 | "codemirror_mode": { 214 | "name": "ipython", 215 | "version": 3 216 | }, 217 | "file_extension": ".py", 218 | "mimetype": "text/x-python", 219 | "name": "python", 220 | "nbconvert_exporter": "python", 221 | "pygments_lexer": "ipython3", 222 | "version": "3.8.10" 223 | } 224 | }, 225 | "nbformat": 4, 226 | "nbformat_minor": 5 227 | } 228 | -------------------------------------------------------------------------------- /3_NumPy/NumPy Resources/NumPy Books/NumPy Cookbook, Second Edition.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/3_NumPy/NumPy Resources/NumPy Books/NumPy Cookbook, Second Edition.pdf -------------------------------------------------------------------------------- /3_NumPy/NumPy Resources/NumPy Cheat Sheet/Numpy_Python_Cheat_Sheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/3_NumPy/NumPy Resources/NumPy Cheat Sheet/Numpy_Python_Cheat_Sheet.pdf -------------------------------------------------------------------------------- /3_NumPy/NumPy Resources/NumPy Cheat Sheet/numpy-cheat-sheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/3_NumPy/NumPy Resources/NumPy Cheat Sheet/numpy-cheat-sheet.pdf -------------------------------------------------------------------------------- /3_NumPy/NumPy Resources/NumPy Cheat Sheet/numpy.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/3_NumPy/NumPy Resources/NumPy Cheat Sheet/numpy.pdf -------------------------------------------------------------------------------- /3_NumPy/NumPy Resources/NumPy Practice Questions/1-100 NumPy Exercises for Data Analysis.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/3_NumPy/NumPy Resources/NumPy Practice Questions/1-100 NumPy Exercises for Data Analysis.pdf -------------------------------------------------------------------------------- /3_NumPy/NumPy Resources/NumPy Practice Questions/2-NumPy Exercise 90 Questions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/3_NumPy/NumPy Resources/NumPy Practice Questions/2-NumPy Exercise 90 Questions.pdf -------------------------------------------------------------------------------- /3_NumPy/NumPy Resources/NumPy Practice Questions/3-Extras From Python to Numpy.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/3_NumPy/NumPy Resources/NumPy Practice Questions/3-Extras From Python to Numpy.pdf -------------------------------------------------------------------------------- /3_NumPy/NumPy Resources/NumPy Practice Questions/4-Advance Numpy Python.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/3_NumPy/NumPy Resources/NumPy Practice Questions/4-Advance Numpy Python.pdf -------------------------------------------------------------------------------- /3_NumPy/NumPy Resources/NumPy Reference or Documentation/NumPy Reference 1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/3_NumPy/NumPy Resources/NumPy Reference or Documentation/NumPy Reference 1.pdf -------------------------------------------------------------------------------- /3_NumPy/NumPy Resources/NumPy Reference or Documentation/NumPy Reference 2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/3_NumPy/NumPy Resources/NumPy Reference or Documentation/NumPy Reference 2.pdf -------------------------------------------------------------------------------- /3_NumPy/NumPy Resources/Reading Assignment-Beyond Numpy Arrays in Python.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/3_NumPy/NumPy Resources/Reading Assignment-Beyond Numpy Arrays in Python.pdf -------------------------------------------------------------------------------- /3_NumPy/NumPy Resources/Reading Assignment-NumPy project governance.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/3_NumPy/NumPy Resources/Reading Assignment-NumPy project governance.pdf -------------------------------------------------------------------------------- /4_Pandas/Data Cleaning With Pandas/Data Cleaning with Python and Pandas_ Detecting Missing Values_files/144d9ce1fa244416b1fe639df3479279.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/4_Pandas/Data Cleaning With Pandas/Data Cleaning with Python and Pandas_ Detecting Missing Values_files/144d9ce1fa244416b1fe639df3479279.png -------------------------------------------------------------------------------- /4_Pandas/Data Cleaning With Pandas/Data Cleaning with Python and Pandas_ Detecting Missing Values_files/1944f6f01966afc2a4220ff38af03551.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/4_Pandas/Data Cleaning With Pandas/Data Cleaning with Python and Pandas_ Detecting Missing Values_files/1944f6f01966afc2a4220ff38af03551.png -------------------------------------------------------------------------------- /4_Pandas/Data Cleaning With Pandas/Data Cleaning with Python and Pandas_ Detecting Missing Values_files/1dd988f3450e97d38b7ee4ce59b13a7b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/4_Pandas/Data Cleaning With Pandas/Data Cleaning with Python and Pandas_ Detecting Missing Values_files/1dd988f3450e97d38b7ee4ce59b13a7b.png -------------------------------------------------------------------------------- /4_Pandas/Data Cleaning With Pandas/Data Cleaning with Python and Pandas_ Detecting Missing Values_files/1f609.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /4_Pandas/Data Cleaning With Pandas/Data Cleaning with Python and Pandas_ Detecting Missing Values_files/6da3594192d99292b8af9ec579aa679b.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/4_Pandas/Data Cleaning With Pandas/Data Cleaning with Python and Pandas_ Detecting Missing Values_files/6da3594192d99292b8af9ec579aa679b.jpeg -------------------------------------------------------------------------------- /4_Pandas/Data Cleaning With Pandas/Data Cleaning with Python and Pandas_ Detecting Missing Values_files/b40769083d3425e5078c130d2b325bc9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/4_Pandas/Data Cleaning With Pandas/Data Cleaning with Python and Pandas_ Detecting Missing Values_files/b40769083d3425e5078c130d2b325bc9.png -------------------------------------------------------------------------------- /4_Pandas/Data Cleaning With Pandas/Data Cleaning with Python and Pandas_ Detecting Missing Values_files/comment-reply.min.js.download: -------------------------------------------------------------------------------- 1 | window.addComment=function(a){function b(){c(),g()}function c(a){if(t&&(m=j(r.cancelReplyId),n=j(r.commentFormId),m)){m.addEventListener("touchstart",e),m.addEventListener("click",e);for(var b,c=d(a),g=0,h=c.length;g 0 ) { 27 | children[0].appendChild( ak_js ); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /4_Pandas/Data Cleaning With Pandas/Data Cleaning with Python and Pandas_ Detecting Missing Values_files/frontend.min.js.download: -------------------------------------------------------------------------------- 1 | ;var MonsterInsights=function(){var t=[],a='';this.setLastClicked=function(e,n,i){e=typeof e!=='undefined'?e:[];n=typeof n!=='undefined'?n:[];i=typeof i!=='undefined'?i:!1;t.valuesArray=e;t.fieldsArray=n};this.getLastClicked=function(){return t};this.setInternalAsOutboundCategory=function(e){a=e};this.getInternalAsOutboundCategory=function(){return a};function s(){if(window.monsterinsights_debug_mode){return!0} 2 | else{return!1}};function e(e,n){e=typeof e!=='undefined'?e:[];n=typeof n!=='undefined'?n:{};__gaTracker('send',n);t.valuesArray=e;t.fieldsArray=n;t.tracked=!0;i('Tracked: '+e.type);i(t)};function n(e){e=typeof e!=='undefined'?e:[];t.valuesArray=e;t.fieldsArray=[];t.tracked=!1;i('Not Tracked: '+e.exit);i(t)};function i(e){if(s()){console.dir(e)}};function r(e){return e.replace(/^\s+|\s+$/gm,'')};function f(){var n=0,e=document.domain,i=e.split('.'),t='_gd'+(new Date()).getTime();while(n<(i.length-1)&&document.cookie.indexOf(t+'='+t)==-1){e=i.slice(-1-(++n)).join('.');document.cookie=t+'='+t+';domain='+e+';'};document.cookie=t+'=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain='+e+';';return e};function h(e){e=e.toString();e=e.substring(0,(e.indexOf('#')==-1)?e.length:e.indexOf('#'));e=e.substring(0,(e.indexOf('?')==-1)?e.length:e.indexOf('?'));e=e.substring(e.lastIndexOf('/')+1,e.length);if(e.length>0&&e.indexOf('.')!==-1){e=e.substring(e.indexOf('.')+1);return e} 3 | else{return''}};function u(){return typeof(__gaTracker)!=='undefined'&&__gaTracker&&__gaTracker.hasOwnProperty('loaded')&&__gaTracker.loaded==!0};function p(e){return e.which==1||e.which==2||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey};function c(){var e=[];if(typeof monsterinsights_frontend.download_extensions=='string'){e=monsterinsights_frontend.download_extensions.split(',')};return e};function d(){var e=[];if(typeof monsterinsights_frontend.inbound_paths=='string'){e=JSON.parse(monsterinsights_frontend.inbound_paths)};return e};function y(e){if(e.which==1){return'event.which=1'} 4 | else if(e.which==2){return'event.which=2'} 5 | else if(e.metaKey){return'metaKey'} 6 | else if(e.ctrlKey){return'ctrlKey'} 7 | else if(e.shiftKey){return'shiftKey'} 8 | else if(e.altKey){return'altKey'} 9 | else{return''}};function m(e){var s=c(),o=d(),t='unknown',u=e.href,g=h(e.href),v=f(),l=e.hostname,i=e.protocol,p=e.pathname;u=u.toString();var n,y,m=e.getAttribute('data-vars-ga-category');if(m){return m};if(u.match(/^javascript\:/i)){t='internal'} 10 | else if(i&&i.length>0&&(r(i)=='tel'||r(i)=='tel:')){t='tel'} 11 | else if(i&&i.length>0&&(r(i)=='mailto'||r(i)=='mailto:')){t='mailto'} 12 | else if(l&&v&&l.length>0&&v.length>0&&!l.endsWith(v)){t='external'} 13 | else if(p&&JSON.stringify(o)!='{}'&&p.length>0){for(n in o){if(o[n].path.length>0&&o[n].label.length>0&&p.startsWith(o[n].path)){t='internal-as-outbound';a='outbound-link-'+o[n].label;break}}} 14 | else if(l&&window.monsterinsights_experimental_mode&&l.length>0&&document.domain.length>0&&l!==document.domain){t='cross-hostname'};if(g&&(t==='unknown'||'external'===t)&&s.length>0&&g.length>0){for(n=0,y=s.length;n0&&(u.endsWith(s[n])||s[n]==g)){t='download';break}}};if(t==='unknown'){t='internal'};return t};function b(e,t){var n=(e.target&&!e.target.match(/^_(self|parent|top)$/i))?e.target:!1;if(t.ctrlKey||t.shiftKey||t.metaKey||t.which==2){n='_blank'};return n};function g(i){var r=i.srcElement||i.target,t=[],l;t.el=r;t.ga_loaded=u();t.click_type=y(i);if(!u()||!p(i)){t.exit='loaded';n(t);return} 15 | while(r&&(typeof r.tagName=='undefined'||r.tagName.toLowerCase()!='a'||!r.href)){r=r.parentNode};if(r&&r.href&&!r.hasAttribute('xlink:href')){var g=r.href,O=h(r.href),K=c(),E=d(),D=monsterinsights_frontend.home_url,I=f(),o=m(r),T=b(r,i),v=r.getAttribute('data-vars-ga-action'),w=r.getAttribute('data-vars-ga-label');t.el=r;t.el_href=r.href;t.el_protocol=r.protocol;t.el_hostname=r.hostname;t.el_port=r.port;t.el_pathname=r.pathname;t.el_search=r.search;t.el_hash=r.hash;t.el_host=r.host;t.debug_mode=s();t.download_extensions=K;t.inbound_paths=E;t.home_url=D;t.link=g;t.extension=O;t.type=o;t.target=T;t.title=r.title||r.textContent||r.innerText;if(o!=='internal'&&o!=='javascript'){var x=!1,k=function(){if(x){return};x=!0;window.location.href=g},A=function(){t.exit='external';n(t)},C=function(){t.exit='internal-as-outbound';n(t)},L=function(){t.exit='cross-hostname';n(t)};if(T||o=='mailto'||o=='tel'){if(o=='download'){l={hitType:'event',eventCategory:'download',eventAction:v||g,eventLabel:w||t.title,};e(t,l)} 16 | else if(o=='tel'){l={hitType:'event',eventCategory:'tel',eventAction:v||g,eventLabel:w||t.title.replace('tel:',''),};e(t,l)} 17 | else if(o=='mailto'){l={hitType:'event',eventCategory:'mailto',eventAction:v||g,eventLabel:w||t.title.replace('mailto:',''),};e(t,l)} 18 | else if(o=='internal-as-outbound'){l={hitType:'event',eventCategory:a,eventAction:v||g,eventLabel:w||t.title,};e(t,l)} 19 | else if(o=='external'){l={hitType:'event',eventCategory:'outbound-link',eventAction:v||g,eventLabel:w||t.title,};e(t,l)} 20 | else if(o=='cross-hostname'){l={hitType:'event',eventCategory:'cross-hostname',eventAction:v||g,eventLabel:w||t.title,};e(t,l)} 21 | else{if(o&&o!='internal'){l={hitType:'event',eventCategory:o,eventAction:v||g,eventLabel:w||t.title,};e(t,l)} 22 | else{t.exit='type';n(t)}}} 23 | else{if(o!='cross-hostname'&&o!='external'&&o!='internal-as-outbound'){if(!i.defaultPrevented){if(i.preventDefault){i.preventDefault()} 24 | else{i.returnValue=!1}}};if(o=='download'){l={hitType:'event',eventCategory:'download',eventAction:v||g,eventLabel:w||t.title,hitCallback:k,};e(t,l)} 25 | else if(o=='internal-as-outbound'){window.onbeforeunload=function(n){if(!i.defaultPrevented){if(i.preventDefault){i.preventDefault()} 26 | else{i.returnValue=!1}};l={hitType:'event',eventCategory:a,eventAction:v||g,eventLabel:w||t.title,hitCallback:k,};if(navigator.sendBeacon){l.transport='beacon'};e(t,l);setTimeout(k,1000)}} 27 | else if(o=='external'){window.onbeforeunload=function(n){if(!i.defaultPrevented){if(i.preventDefault){i.preventDefault()} 28 | else{i.returnValue=!1}};l={hitType:'event',eventCategory:'outbound-link',eventAction:v||g,eventLabel:w||t.title,hitCallback:k,};if(navigator.sendBeacon){l.transport='beacon'};e(t,l);setTimeout(k,1000)}} 29 | else if(o=='cross-hostname'){window.onbeforeunload=function(n){if(!i.defaultPrevented){if(i.preventDefault){i.preventDefault()} 30 | else{i.returnValue=!1}};l={hitType:'event',eventCategory:'cross-hostname',eventAction:v||g,eventLabel:w||t.title,hitCallback:k,};if(navigator.sendBeacon){l.transport='beacon'};e(t,l);setTimeout(k,1000)}} 31 | else{if(o&&o!=='internal'){l={hitType:'event',eventCategory:o,eventAction:v||g,eventLabel:w||t.title,hitCallback:k,};e(t,l)} 32 | else{t.exit='type';n(t)}};if(o!='external'&&o!='cross-hostname'&&o!='internal-as-outbound'){setTimeout(k,1000)} 33 | else{if(o=='external'){setTimeout(A,1100)} 34 | else if(o=='cross-hostname'){setTimeout(L,1100)} 35 | else{setTimeout(C,1100)}}}} 36 | else{t.exit='internal';n(t)}} 37 | else{t.exit='notlink';n(t)}};var l=window.location.hash;function v(){if(monsterinsights_frontend.hash_tracking==='true'&&l!=window.location.hash){l=window.location.hash;__gaTracker('set','page',location.pathname+location.search+location.hash);__gaTracker('send','pageview');i('Hash change to: '+location.pathname+location.search+location.hash)} 38 | else{i('Hash change to (untracked): '+location.pathname+location.search+location.hash)}};var o=window;if(o.addEventListener){o.addEventListener('load',function(){document.body.addEventListener('click',g,!1)},!1);window.addEventListener('hashchange',v,!1)} 39 | else{if(o.attachEvent){o.attachEvent('onload',function(){document.body.attachEvent('onclick',g)});window.attachEvent('onhashchange',v)}};if(typeof String.prototype.endsWith!=='function'){String.prototype.endsWith=function(e){return this.indexOf(e,this.length-e.length)!==-1}};if(typeof String.prototype.startsWith!=='function'){String.prototype.startsWith=function(e){return this.indexOf(e)===0}};if(typeof Array.prototype.lastIndexOf!=='function'){Array.prototype.lastIndexOf=function(e){'use strict';if(this===void 0||this===null){throw new TypeError()};var t,n,a=Object(this),i=a.length>>>0;if(i===0){return-1};t=i-1;if(arguments.length>1){t=Number(arguments[1]);if(t!=t){t=0} 40 | else if(t!=0&&t!=(1/0)&&t!=-(1/0)){t=(t>0||-1)*Math.floor(Math.abs(t))}};for(n=t>=0?Math.min(t,i-1):i-Math.abs(t);n>=0;n--){if(n in a&&a[n]===e){return n}};return-1}}},MonsterInsightsObject=new MonsterInsights(); -------------------------------------------------------------------------------- /4_Pandas/Data Cleaning With Pandas/Data Cleaning with Python and Pandas_ Detecting Missing Values_files/idle-timer.min.js(1).download: -------------------------------------------------------------------------------- 1 | /*! Idle Timer v1.0.1 2014-03-21 | https://github.com/thorst/jquery-idletimer | (c) 2014 Paul Irish | Licensed MIT */ 2 | !function(a){a.idleTimer=function(b,c){var d;"object"==typeof b?(d=b,b=null):"number"==typeof b&&(d={timeout:b},b=null),c=c||document,d=a.extend({idle:!1,timeout:3e4,events:"mousemove keydown wheel DOMMouseScroll mousewheel mousedown touchstart touchmove MSPointerDown MSPointerMove"},d);var e=a(c),f=e.data("idleTimerObj")||{},g=function(b){var d=a.data(c,"idleTimerObj")||{};d.idle=!d.idle,d.olddate=+new Date;var e=a.Event((d.idle?"idle":"active")+".idleTimer");a(c).trigger(e,[c,a.extend({},d),b])},h=function(b){var d=a.data(c,"idleTimerObj")||{};if(null==d.remaining){if("mousemove"===b.type){if(b.pageX===d.pageX&&b.pageY===d.pageY)return;if("undefined"==typeof b.pageX&&"undefined"==typeof b.pageY)return;var e=+new Date-d.olddate;if(200>e)return}clearTimeout(d.tId),d.idle&&g(b),d.lastActive=+new Date,d.pageX=b.pageX,d.pageY=b.pageY,d.tId=setTimeout(g,d.timeout)}},i=function(){var b=a.data(c,"idleTimerObj")||{};b.idle=b.idleBackup,b.olddate=+new Date,b.lastActive=b.olddate,b.remaining=null,clearTimeout(b.tId),b.idle||(b.tId=setTimeout(g,b.timeout))},j=function(){var b=a.data(c,"idleTimerObj")||{};null==b.remaining&&(b.remaining=b.timeout-(+new Date-b.olddate),clearTimeout(b.tId))},k=function(){var b=a.data(c,"idleTimerObj")||{};null!=b.remaining&&(b.idle||(b.tId=setTimeout(g,b.remaining)),b.remaining=null)},l=function(){var b=a.data(c,"idleTimerObj")||{};clearTimeout(b.tId),e.removeData("idleTimerObj"),e.off("._idleTimer")},m=function(){var b=a.data(c,"idleTimerObj")||{};if(b.idle)return 0;if(null!=b.remaining)return b.remaining;var d=b.timeout-(+new Date-b.lastActive);return 0>d&&(d=0),d};if(null===b&&"undefined"!=typeof f.idle)return i(),e;if(null===b);else{if(null!==b&&"undefined"==typeof f.idle)return!1;if("destroy"===b)return l(),e;if("pause"===b)return j(),e;if("resume"===b)return k(),e;if("reset"===b)return i(),e;if("getRemainingTime"===b)return m();if("getElapsedTime"===b)return+new Date-f.olddate;if("getLastActiveTime"===b)return f.lastActive;if("isIdle"===b)return f.idle}return e.on(a.trim((d.events+" ").split(" ").join("._idleTimer ")),function(a){h(a)}),f=a.extend({},{olddate:+new Date,lastActive:+new Date,idle:d.idle,idleBackup:d.idle,timeout:d.timeout,remaining:null,tId:null,pageX:null,pageY:null}),f.idle||(f.tId=setTimeout(g,f.timeout)),a.data(c,"idleTimerObj",f),e},a.fn.idleTimer=function(b){return this[0]?a.idleTimer(b,this[0]):this}}(jQuery); -------------------------------------------------------------------------------- /4_Pandas/Data Cleaning With Pandas/Data Cleaning with Python and Pandas_ Detecting Missing Values_files/idle-timer.min.js.download: -------------------------------------------------------------------------------- 1 | /*! Idle Timer v1.0.1 2014-03-21 | https://github.com/thorst/jquery-idletimer | (c) 2014 Paul Irish | Licensed MIT */ 2 | !function(a){a.idleTimer=function(b,c){var d;"object"==typeof b?(d=b,b=null):"number"==typeof b&&(d={timeout:b},b=null),c=c||document,d=a.extend({idle:!1,timeout:3e4,events:"mousemove keydown wheel DOMMouseScroll mousewheel mousedown touchstart touchmove MSPointerDown MSPointerMove"},d);var e=a(c),f=e.data("idleTimerObj")||{},g=function(b){var d=a.data(c,"idleTimerObj")||{};d.idle=!d.idle,d.olddate=+new Date;var e=a.Event((d.idle?"idle":"active")+".idleTimer");a(c).trigger(e,[c,a.extend({},d),b])},h=function(b){var d=a.data(c,"idleTimerObj")||{};if(null==d.remaining){if("mousemove"===b.type){if(b.pageX===d.pageX&&b.pageY===d.pageY)return;if("undefined"==typeof b.pageX&&"undefined"==typeof b.pageY)return;var e=+new Date-d.olddate;if(200>e)return}clearTimeout(d.tId),d.idle&&g(b),d.lastActive=+new Date,d.pageX=b.pageX,d.pageY=b.pageY,d.tId=setTimeout(g,d.timeout)}},i=function(){var b=a.data(c,"idleTimerObj")||{};b.idle=b.idleBackup,b.olddate=+new Date,b.lastActive=b.olddate,b.remaining=null,clearTimeout(b.tId),b.idle||(b.tId=setTimeout(g,b.timeout))},j=function(){var b=a.data(c,"idleTimerObj")||{};null==b.remaining&&(b.remaining=b.timeout-(+new Date-b.olddate),clearTimeout(b.tId))},k=function(){var b=a.data(c,"idleTimerObj")||{};null!=b.remaining&&(b.idle||(b.tId=setTimeout(g,b.remaining)),b.remaining=null)},l=function(){var b=a.data(c,"idleTimerObj")||{};clearTimeout(b.tId),e.removeData("idleTimerObj"),e.off("._idleTimer")},m=function(){var b=a.data(c,"idleTimerObj")||{};if(b.idle)return 0;if(null!=b.remaining)return b.remaining;var d=b.timeout-(+new Date-b.lastActive);return 0>d&&(d=0),d};if(null===b&&"undefined"!=typeof f.idle)return i(),e;if(null===b);else{if(null!==b&&"undefined"==typeof f.idle)return!1;if("destroy"===b)return l(),e;if("pause"===b)return j(),e;if("resume"===b)return k(),e;if("reset"===b)return i(),e;if("getRemainingTime"===b)return m();if("getElapsedTime"===b)return+new Date-f.olddate;if("getLastActiveTime"===b)return f.lastActive;if("isIdle"===b)return f.idle}return e.on(a.trim((d.events+" ").split(" ").join("._idleTimer ")),function(a){h(a)}),f=a.extend({},{olddate:+new Date,lastActive:+new Date,idle:d.idle,idleBackup:d.idle,timeout:d.timeout,remaining:null,tId:null,pageX:null,pageY:null}),f.idle||(f.tId=setTimeout(g,f.timeout)),a.data(c,"idleTimerObj",f),e},a.fn.idleTimer=function(b){return this[0]?a.idleTimer(b,this[0]):this}}(jQuery); -------------------------------------------------------------------------------- /4_Pandas/Data Cleaning With Pandas/Data Cleaning with Python and Pandas_ Detecting Missing Values_files/jquery-migrate.min.js.download: -------------------------------------------------------------------------------- 1 | /*! jQuery Migrate v1.4.1 | (c) jQuery Foundation and other contributors | jquery.org/license */ 2 | "undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(a,b,c){function d(c){var d=b.console;f[c]||(f[c]=!0,a.migrateWarnings.push(c),d&&d.warn&&!a.migrateMute&&(d.warn("JQMIGRATE: "+c),a.migrateTrace&&d.trace&&d.trace()))}function e(b,c,e,f){if(Object.defineProperty)try{return void Object.defineProperty(b,c,{configurable:!0,enumerable:!0,get:function(){return d(f),e},set:function(a){d(f),e=a}})}catch(g){}a._definePropertyBroken=!0,b[c]=e}a.migrateVersion="1.4.1";var f={};a.migrateWarnings=[],b.console&&b.console.log&&b.console.log("JQMIGRATE: Migrate is installed"+(a.migrateMute?"":" with logging active")+", version "+a.migrateVersion),a.migrateTrace===c&&(a.migrateTrace=!0),a.migrateReset=function(){f={},a.migrateWarnings.length=0},"BackCompat"===document.compatMode&&d("jQuery is not compatible with Quirks Mode");var g=a("",{size:1}).attr("size")&&a.attrFn,h=a.attr,i=a.attrHooks.value&&a.attrHooks.value.get||function(){return null},j=a.attrHooks.value&&a.attrHooks.value.set||function(){return c},k=/^(?:input|button)$/i,l=/^[238]$/,m=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,n=/^(?:checked|selected)$/i;e(a,"attrFn",g||{},"jQuery.attrFn is deprecated"),a.attr=function(b,e,f,i){var j=e.toLowerCase(),o=b&&b.nodeType;return i&&(h.length<4&&d("jQuery.fn.attr( props, pass ) is deprecated"),b&&!l.test(o)&&(g?e in g:a.isFunction(a.fn[e])))?a(b)[e](f):("type"===e&&f!==c&&k.test(b.nodeName)&&b.parentNode&&d("Can't change the 'type' of an input or button in IE 6/7/8"),!a.attrHooks[j]&&m.test(j)&&(a.attrHooks[j]={get:function(b,d){var e,f=a.prop(b,d);return f===!0||"boolean"!=typeof f&&(e=b.getAttributeNode(d))&&e.nodeValue!==!1?d.toLowerCase():c},set:function(b,c,d){var e;return c===!1?a.removeAttr(b,d):(e=a.propFix[d]||d,e in b&&(b[e]=!0),b.setAttribute(d,d.toLowerCase())),d}},n.test(j)&&d("jQuery.fn.attr('"+j+"') might use property instead of attribute")),h.call(a,b,e,f))},a.attrHooks.value={get:function(a,b){var c=(a.nodeName||"").toLowerCase();return"button"===c?i.apply(this,arguments):("input"!==c&&"option"!==c&&d("jQuery.fn.attr('value') no longer gets properties"),b in a?a.value:null)},set:function(a,b){var c=(a.nodeName||"").toLowerCase();return"button"===c?j.apply(this,arguments):("input"!==c&&"option"!==c&&d("jQuery.fn.attr('value', val) no longer sets properties"),void(a.value=b))}};var o,p,q=a.fn.init,r=a.find,s=a.parseJSON,t=/^\s*)([^>]*)$/;a.fn.init=function(b,e,f){var g,h;return b&&"string"==typeof b&&!a.isPlainObject(e)&&(g=w.exec(a.trim(b)))&&g[0]&&(t.test(b)||d("$(html) HTML strings must start with '<' character"),g[3]&&d("$(html) HTML text after last tag is ignored"),"#"===g[0].charAt(0)&&(d("HTML string cannot start with a '#' character"),a.error("JQMIGRATE: Invalid selector string (XSS)")),e&&e.context&&e.context.nodeType&&(e=e.context),a.parseHTML)?q.call(this,a.parseHTML(g[2],e&&e.ownerDocument||e||document,!0),e,f):(h=q.apply(this,arguments),b&&b.selector!==c?(h.selector=b.selector,h.context=b.context):(h.selector="string"==typeof b?b:"",b&&(h.context=b.nodeType?b:e||document)),h)},a.fn.init.prototype=a.fn,a.find=function(a){var b=Array.prototype.slice.call(arguments);if("string"==typeof a&&u.test(a))try{document.querySelector(a)}catch(c){a=a.replace(v,function(a,b,c,d){return"["+b+c+'"'+d+'"]'});try{document.querySelector(a),d("Attribute selector with '#' must be quoted: "+b[0]),b[0]=a}catch(e){d("Attribute selector with '#' was not fixed: "+b[0])}}return r.apply(this,b)};var x;for(x in r)Object.prototype.hasOwnProperty.call(r,x)&&(a.find[x]=r[x]);a.parseJSON=function(a){return a?s.apply(this,arguments):(d("jQuery.parseJSON requires a valid JSON string"),null)},a.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a.browser||(o=a.uaMatch(navigator.userAgent),p={},o.browser&&(p[o.browser]=!0,p.version=o.version),p.chrome?p.webkit=!0:p.webkit&&(p.safari=!0),a.browser=p),e(a,"browser",a.browser,"jQuery.browser is deprecated"),a.boxModel=a.support.boxModel="CSS1Compat"===document.compatMode,e(a,"boxModel",a.boxModel,"jQuery.boxModel is deprecated"),e(a.support,"boxModel",a.support.boxModel,"jQuery.support.boxModel is deprecated"),a.sub=function(){function b(a,c){return new b.fn.init(a,c)}a.extend(!0,b,this),b.superclass=this,b.fn=b.prototype=this(),b.fn.constructor=b,b.sub=this.sub,b.fn.init=function(d,e){var f=a.fn.init.call(this,d,e,c);return f instanceof b?f:b(f)},b.fn.init.prototype=b.fn;var c=b(document);return d("jQuery.sub() is deprecated"),b},a.fn.size=function(){return d("jQuery.fn.size() is deprecated; use the .length property"),this.length};var y=!1;a.swap&&a.each(["height","width","reliableMarginRight"],function(b,c){var d=a.cssHooks[c]&&a.cssHooks[c].get;d&&(a.cssHooks[c].get=function(){var a;return y=!0,a=d.apply(this,arguments),y=!1,a})}),a.swap=function(a,b,c,e){var f,g,h={};y||d("jQuery.swap() is undocumented and deprecated");for(g in b)h[g]=a.style[g],a.style[g]=b[g];f=c.apply(a,e||[]);for(g in b)a.style[g]=h[g];return f},a.ajaxSetup({converters:{"text json":a.parseJSON}});var z=a.fn.data;a.fn.data=function(b){var e,f,g=this[0];return!g||"events"!==b||1!==arguments.length||(e=a.data(g,b),f=a._data(g,b),e!==c&&e!==f||f===c)?z.apply(this,arguments):(d("Use of jQuery.fn.data('events') is deprecated"),f)};var A=/\/(java|ecma)script/i;a.clean||(a.clean=function(b,c,e,f){c=c||document,c=!c.nodeType&&c[0]||c,c=c.ownerDocument||c,d("jQuery.clean() is deprecated");var g,h,i,j,k=[];if(a.merge(k,a.buildFragment(b,c).childNodes),e)for(i=function(a){return!a.type||A.test(a.type)?f?f.push(a.parentNode?a.parentNode.removeChild(a):a):e.appendChild(a):void 0},g=0;null!=(h=k[g]);g++)a.nodeName(h,"script")&&i(h)||(e.appendChild(h),"undefined"!=typeof h.getElementsByTagName&&(j=a.grep(a.merge([],h.getElementsByTagName("script")),i),k.splice.apply(k,[g+1,0].concat(j)),g+=j.length));return k});var B=a.event.add,C=a.event.remove,D=a.event.trigger,E=a.fn.toggle,F=a.fn.live,G=a.fn.die,H=a.fn.load,I="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",J=new RegExp("\\b(?:"+I+")\\b"),K=/(?:^|\s)hover(\.\S+|)\b/,L=function(b){return"string"!=typeof b||a.event.special.hover?b:(K.test(b)&&d("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),b&&b.replace(K,"mouseenter$1 mouseleave$1"))};a.event.props&&"attrChange"!==a.event.props[0]&&a.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),a.event.dispatch&&e(a.event,"handle",a.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),a.event.add=function(a,b,c,e,f){a!==document&&J.test(b)&&d("AJAX events should be attached to document: "+b),B.call(this,a,L(b||""),c,e,f)},a.event.remove=function(a,b,c,d,e){C.call(this,a,L(b)||"",c,d,e)},a.each(["load","unload","error"],function(b,c){a.fn[c]=function(){var a=Array.prototype.slice.call(arguments,0);return"load"===c&&"string"==typeof a[0]?H.apply(this,a):(d("jQuery.fn."+c+"() is deprecated"),a.splice(0,0,c),arguments.length?this.bind.apply(this,a):(this.triggerHandler.apply(this,a),this))}}),a.fn.toggle=function(b,c){if(!a.isFunction(b)||!a.isFunction(c))return E.apply(this,arguments);d("jQuery.fn.toggle(handler, handler...) is deprecated");var e=arguments,f=b.guid||a.guid++,g=0,h=function(c){var d=(a._data(this,"lastToggle"+b.guid)||0)%g;return a._data(this,"lastToggle"+b.guid,d+1),c.preventDefault(),e[d].apply(this,arguments)||!1};for(h.guid=f;g"),r=e(""),s.autoHide&&t.is(":hidden")&&"none"===t.css("display")&&i.hide(),a.divClass&&i.addClass(a.divClass),s.wrapperClass&&i.addClass(s.wrapperClass),a.spanClass&&r.addClass(a.spanClass),l=n(t,"id"),s.useID&&l&&n(i,"id",s.idPrefix+"-"+l),a.spanHtml&&r.html(a.spanHtml),i=o(t,i,a.divWrap),r=o(t,r,a.spanWrap),u(i,t,s),{div:i,span:r}}function d(t,n){var s;return n.wrapperClass?(s=e("").addClass(n.wrapperClass),s=o(t,s,"wrap")):null}function f(){var t,n,s,a;return a="rgb(120,2,153)",n=e('
'),e("body").append(n),s=n.get(0),t=window.getComputedStyle?window.getComputedStyle(s,"").color:(s.currentStyle||s.style||{}).color,n.remove(),t.replace(/ /g,"")!==a}function p(t){return t?e("").text(t).html():""}function m(){return navigator.cpuClass&&!navigator.product}function v(){return window.XMLHttpRequest!==void 0?!0:!1}function h(e){var t;return e[0].multiple?!0:(t=n(e,"size"),!t||1>=t?!1:!0)}function C(){return!1}function w(e,t){var n="none";s(e,t,{"selectstart dragstart mousedown":C}),e.css({MozUserSelect:n,msUserSelect:n,webkitUserSelect:n,userSelect:n})}function b(e,t,n){var s=e.val();""===s?s=n.fileDefaultHtml:(s=s.split(/[\/\\]+/),s=s[s.length-1]),t.text(s)}function y(e,t,n){var s,a;for(s=[],e.each(function(){var e;for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&(s.push({el:this,name:e,old:this.style[e]}),this.style[e]=t[e])}),n();s.length;)a=s.pop(),a.el.style[a.name]=a.old}function g(e,t){var n;n=e.parents(),n.push(e[0]),n=n.not(":visible"),y(n,{visibility:"hidden",display:"block",position:"absolute"},t)}function k(e,t){return function(){e.unwrap().unwrap().unbind(t.eventNamespace)}}var H=!0,x=!1,A=[{match:function(e){return e.is("a, button, :submit, :reset, input[type='button']")},apply:function(e,t){var r,l,o,d,f;return l=t.submitDefaultHtml,e.is(":reset")&&(l=t.resetDefaultHtml),d=e.is("a, button")?function(){return e.html()||l}:function(){return p(n(e,"value"))||l},o=c(e,t,{divClass:t.buttonClass,spanHtml:d()}),r=o.div,a(e,r,t),f=!1,s(r,t,{"click touchend":function(){var t,s,a,i;f||e.is(":disabled")||(f=!0,e[0].dispatchEvent?(t=document.createEvent("MouseEvents"),t.initEvent("click",!0,!0),s=e[0].dispatchEvent(t),e.is("a")&&s&&(a=n(e,"target"),i=n(e,"href"),a&&"_self"!==a?window.open(i,a):document.location.href=i)):e.click(),f=!1)}}),w(r,t),{remove:function(){return r.after(e),r.remove(),e.unbind(t.eventNamespace),e},update:function(){i(r,t),u(r,e,t),e.detach(),o.span.html(d()).append(e)}}}},{match:function(e){return e.is(":checkbox")},apply:function(e,t){var n,r,o;return n=c(e,t,{divClass:t.checkboxClass}),r=n.div,o=n.span,a(e,r,t),s(e,t,{"click touchend":function(){l(o,e,t)}}),l(o,e,t),{remove:k(e,t),update:function(){i(r,t),o.removeClass(t.checkedClass),l(o,e,t),u(r,e,t)}}}},{match:function(e){return e.is(":file")},apply:function(t,r){function l(){b(t,p,r)}var d,f,p,v;return d=c(t,r,{divClass:r.fileClass,spanClass:r.fileButtonClass,spanHtml:r.fileButtonHtml,spanWrap:"after"}),f=d.div,v=d.span,p=e("").html(r.fileDefaultHtml),p.addClass(r.filenameClass),p=o(t,p,"after"),n(t,"size")||n(t,"size",f.width()/10),a(t,f,r),l(),m()?s(t,r,{click:function(){t.trigger("change"),setTimeout(l,0)}}):s(t,r,{change:l}),w(p,r),w(v,r),{remove:function(){return p.remove(),v.remove(),t.unwrap().unbind(r.eventNamespace)},update:function(){i(f,r),b(t,p,r),u(f,t,r)}}}},{match:function(e){if(e.is("input")){var t=(" "+n(e,"type")+" ").toLowerCase(),s=" color date datetime datetime-local email month number password search tel text time url week ";return s.indexOf(t)>=0}return!1},apply:function(e,t){var s,i;return s=n(e,"type"),e.addClass(t.inputClass),i=d(e,t),a(e,e,t),t.inputAddTypeAsClass&&e.addClass(s),{remove:function(){e.removeClass(t.inputClass),t.inputAddTypeAsClass&&e.removeClass(s),i&&e.unwrap()},update:C}}},{match:function(e){return e.is(":radio")},apply:function(t,r){var o,d,f;return o=c(t,r,{divClass:r.radioClass}),d=o.div,f=o.span,a(t,d,r),s(t,r,{"click touchend":function(){e.uniform.update(e(':radio[name="'+n(t,"name")+'"]'))}}),l(f,t,r),{remove:k(t,r),update:function(){i(d,r),l(f,t,r),u(d,t,r)}}}},{match:function(e){return e.is("select")&&!h(e)?!0:!1},apply:function(t,n){var r,l,o,d;return n.selectAutoWidth&&g(t,function(){d=t.width()}),r=c(t,n,{divClass:n.selectClass,spanHtml:(t.find(":selected:first")||t.find("option:first")).html(),spanWrap:"before"}),l=r.div,o=r.span,n.selectAutoWidth?g(t,function(){y(e([o[0],l[0]]),{display:"block"},function(){var e;e=o.outerWidth()-o.width(),l.width(d+e),o.width(d)})}):l.addClass("fixedWidth"),a(t,l,n),s(t,n,{change:function(){o.html(t.find(":selected").html()),l.removeClass(n.activeClass)},"click touchend":function(){var e=t.find(":selected").html();o.html()!==e&&t.trigger("change")},keyup:function(){o.html(t.find(":selected").html())}}),w(o,n),{remove:function(){return o.remove(),t.unwrap().unbind(n.eventNamespace),t},update:function(){n.selectAutoWidth?(e.uniform.restore(t),t.uniform(n)):(i(l,n),o.html(t.find(":selected").html()),u(l,t,n))}}}},{match:function(e){return e.is("select")&&h(e)?!0:!1},apply:function(e,t){var n;return e.addClass(t.selectMultiClass),n=d(e,t),a(e,e,t),{remove:function(){e.removeClass(t.selectMultiClass),n&&e.unwrap()},update:C}}},{match:function(e){return e.is("textarea")},apply:function(e,t){var n;return e.addClass(t.textareaClass),n=d(e,t),a(e,e,t),{remove:function(){e.removeClass(t.textareaClass),n&&e.unwrap()},update:C}}}];m()&&!v()&&(H=!1),e.uniform={defaults:{activeClass:"active",autoHide:!0,buttonClass:"button",checkboxClass:"checker",checkedClass:"checked",disabledClass:"disabled",eventNamespace:".uniform",fileButtonClass:"action",fileButtonHtml:"Choose File",fileClass:"uploader",fileDefaultHtml:"No file selected",filenameClass:"filename",focusClass:"focus",hoverClass:"hover",idPrefix:"uniform",inputAddTypeAsClass:!0,inputClass:"uniform-input",radioClass:"radio",resetDefaultHtml:"Reset",resetSelector:!1,selectAutoWidth:!0,selectClass:"selector",selectMultiClass:"uniform-multiselect",submitDefaultHtml:"Submit",textareaClass:"uniform",useID:!0,wrapperClass:null},elements:[]},e.fn.uniform=function(t){var n=this;return t=e.extend({},e.uniform.defaults,t),x||(x=!0,f()&&(H=!1)),H?(t.resetSelector&&e(t.resetSelector).mouseup(function(){window.setTimeout(function(){e.uniform.update(n)},10)}),this.each(function(){var n,s,a,i=e(this);if(i.data("uniformed"))return e.uniform.update(i),void 0;for(n=0;A.length>n;n+=1)if(s=A[n],s.match(i,t))return a=s.apply(i,t),i.data("uniformed",a),e.uniform.elements.push(i.get(0)),void 0})):this},e.uniform.restore=e.fn.uniform.restore=function(n){n===t&&(n=e.uniform.elements),e(n).each(function(){var t,n,s=e(this);n=s.data("uniformed"),n&&(n.remove(),t=e.inArray(this,e.uniform.elements),t>=0&&e.uniform.elements.splice(t,1),s.removeData("uniformed"))})},e.uniform.update=e.fn.uniform.update=function(n){n===t&&(n=e.uniform.elements),e(n).each(function(){var t,n=e(this);t=n.data("uniformed"),t&&t.update(n,t.options)})}})(jQuery); -------------------------------------------------------------------------------- /4_Pandas/Data Cleaning With Pandas/Data Cleaning with Python and Pandas_ Detecting Missing Values_files/linkid.js.download: -------------------------------------------------------------------------------- 1 | (function(){var e=window,h=document,k="replace";var m=function(a,c,d,b,g){c=encodeURIComponent(c)[k](/\(/g,"%28")[k](/\)/g,"%29");a=a+"="+c+"; path="+(d||"/")+"; ";g&&(a+="expires="+(new Date((new Date).getTime()+g)).toGMTString()+"; ");b&&"none"!=b&&(a+="domain="+b+";");b=h.cookie;h.cookie=a;return b!=h.cookie},p=function(a){var c=h.body;try{c.addEventListener?c.addEventListener("click",a,!1):c.attachEvent&&c.attachEvent("onclick",a)}catch(d){}};var q=function(a,c,d,b){this.get=function(){for(var b=void 0,c=[],d=h.cookie.split(";"),l=new RegExp("^\\s*"+a+"=\\s*(.*?)\\s*$"),f=0;f code[class*="language-"],pre[class*="language-"]{background: #272822}:not(pre) > code[class*="language-"]{padding: .1em;border-radius: .3em;white-space: normal}.token.comment,.token.prolog,.token.doctype,.token.cdata{color: slategray}.token.punctuation{color: #f8f8f2}.namespace{opacity: .7}.token.property,.token.tag,.token.constant,.token.symbol,.token.deleted{color: #f92672}.token.boolean,.token.number{color: #ae81ff}.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin,.token.inserted{color: #a6e22e}.token.operator,.token.entity,.token.url,.language-css .token.string,.style .token.string,.token.variable{color: #f8f8f2}.token.atrule,.token.attr-value,.token.function{color: #e6db74}.token.keyword{color: #66d9ef}.token.regex,.token.important{color: #fd971f}.token.important,.token.bold{font-weight: bold}.token.italic{font-style: italic}.token.entity{cursor: help}pre.code-toolbar{position: relative}pre.code-toolbar > .toolbar{position: absolute;top: .3em;right: .2em;transition: opacity 0.3s ease-in-out;opacity: 0}pre.code-toolbar:hover > .toolbar{opacity: 1}pre.code-toolbar > .toolbar .toolbar-item{display: inline-block}pre.code-toolbar > .toolbar a{cursor: pointer}pre.code-toolbar > .toolbar button{background: none;border: 0;color: inherit;font: inherit;line-height: normal;overflow: visible;padding: 0;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none}pre.code-toolbar > .toolbar a,pre.code-toolbar > .toolbar button,pre.code-toolbar > .toolbar span{color: #bbb;font-size: .8em;padding: 0 .5em;background: #f5f2f0;background: rgba(224, 224, 224, 0.2);box-shadow: 0 2px 0 0 rgba(0,0,0,0.2);border-radius: .5em}pre.code-toolbar > .toolbar a:hover,pre.code-toolbar > .toolbar a:focus,pre.code-toolbar > .toolbar button:hover,pre.code-toolbar > .toolbar button:focus,pre.code-toolbar > .toolbar span:hover,pre.code-toolbar > .toolbar span:focus{color: inherit;text-decoration: none} -------------------------------------------------------------------------------- /4_Pandas/Data Cleaning With Pandas/Data Cleaning with Python and Pandas_ Detecting Missing Values_files/real-estate-data.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/4_Pandas/Data Cleaning With Pandas/Data Cleaning with Python and Pandas_ Detecting Missing Values_files/real-estate-data.jpg -------------------------------------------------------------------------------- /4_Pandas/Data Cleaning With Pandas/Data Cleaning with Python and Pandas_ Detecting Missing Values_files/standard-missing-values.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/4_Pandas/Data Cleaning With Pandas/Data Cleaning with Python and Pandas_ Detecting Missing Values_files/standard-missing-values.jpg -------------------------------------------------------------------------------- /4_Pandas/Data Cleaning With Pandas/Data Cleaning with Python and Pandas_ Detecting Missing Values_files/style(2).css: -------------------------------------------------------------------------------- 1 | /* 2 | Theme Name: Divi Child theme of Divi 3 | Theme URI: 4 | Description: Child theme of Divi theme for the Divi theme 5 | Author: Elegant Themes 6 | Author URI: 7 | Template: Divi 8 | Version: 3.0.106 9 | */ 10 | 11 | /* Generated by Orbisius Child Theme Creator (http://orbisius.com/products/wordpress-plugins/orbisius-child-theme-creator/) on Sat, 12 May 2018 11:31:54 +0000 */ 12 | /* The plugin now uses the recommended approach for loading the css files.*/ 13 | 14 | -------------------------------------------------------------------------------- /4_Pandas/Data Cleaning With Pandas/Data Cleaning with Python and Pandas_ Detecting Missing Values_files/unexpected-missing-values.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/4_Pandas/Data Cleaning With Pandas/Data Cleaning with Python and Pandas_ Detecting Missing Values_files/unexpected-missing-values.jpg -------------------------------------------------------------------------------- /4_Pandas/Data Cleaning With Pandas/Data Cleaning with Python and Pandas_ Detecting Missing Values_files/wp-embed.min.js.download: -------------------------------------------------------------------------------- 1 | !function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c1e3)g=1e3;else if(~~g<200)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document); -------------------------------------------------------------------------------- /4_Pandas/Pandas Books/Learning pandas.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/4_Pandas/Pandas Books/Learning pandas.pdf -------------------------------------------------------------------------------- /4_Pandas/Pandas Books/Mastering Pandas.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/4_Pandas/Pandas Books/Mastering Pandas.pdf -------------------------------------------------------------------------------- /4_Pandas/goa.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/4_Pandas/goa.xlsx -------------------------------------------------------------------------------- /4_Pandas/indore.csv: -------------------------------------------------------------------------------- 1 | ,day,temperature,windspeed,event 2 | 0,1/1/2021,32,6,Rain 3 | 1,1/2/2021,31,4,Snow 4 | 2,1/3/2021,32,6,Rain 5 | -------------------------------------------------------------------------------- /4_Pandas/nyc_weather.csv: -------------------------------------------------------------------------------- 1 | EST,Temperature,DewPoint,Humidity,Sea Level PressureIn,VisibilityMiles,WindSpeedMPH,PrecipitationIn,CloudCover,Events,WindDirDegrees 2 | 1/1/2016,38,23,52,30.03,10,8,0,5,,281 3 | 1/2/2016,36,18,46,30.02,10,7,0,3,,275 4 | 1/3/2016,40,21,47,29.86,10,8,0,1,,277 5 | 1/4/2016,25,9,44,30.05,10,9,0,3,,345 6 | 1/5/2016,20,-3,41,30.57,10,5,0,0,,333 7 | 1/6/2016,33,4,35,30.5,10,4,0,0,,259 8 | 1/7/2016,39,11,33,30.28,10,2,0,3,,293 9 | 1/8/2016,39,29,64,30.2,10,4,0,8,,79 10 | 1/9/2016,44,38,77,30.16,9,8,T,8,Rain,76 11 | 1/10/2016,50,46,71,29.59,4,,1.8,7,Rain,109 12 | 1/11/2016,33,8,37,29.92,10,,0,1,,289 13 | 1/12/2016,35,15,53,29.85,10,6,T,4,,235 14 | 1/13/2016,26,4,42,29.94,10,10,0,0,,284 15 | 1/14/2016,30,12,47,29.95,10,5,T,7,,266 16 | 1/15/2016,43,31,62,29.82,9,5,T,2,,101 17 | 1/16/2016,47,37,70,29.52,8,7,0.24,7,Rain,340 18 | 1/17/2016,36,23,66,29.78,8,6,0.05,6,Fog-Snow,345 19 | 1/18/2016,25,6,53,29.83,9,12,T,2,Snow,293 20 | 1/19/2016,22,3,42,30.03,10,11,0,1,,293 21 | 1/20/2016,32,15,49,30.13,10,6,0,2,,302 22 | 1/21/2016,31,11,45,30.15,10,6,0,1,,312 23 | 1/22/2016,26,6,41,30.21,9,,0.01,3,Snow,34 24 | 1/23/2016,26,21,78,29.77,1,16,2.31,8,Fog-Snow,42 25 | 1/24/2016,28,11,53,29.92,8,6,T,3,Snow,327 26 | 1/25/2016,34,18,54,30.25,10,3,0,2,,286 27 | 1/26/2016,43,29,56,30.03,10,7,0,2,,244 28 | 1/27/2016,41,22,45,30.03,10,7,T,3,Rain,311 29 | 1/28/2016,37,20,51,29.9,10,5,0,1,,234 30 | 1/29/2016,36,21,50,29.58,10,8,0,4,,298 31 | 1/30/2016,34,16,46,30.01,10,7,0,0,,257 32 | 1/31/2016,46,28,52,29.9,10,5,0,0,,241 33 | -------------------------------------------------------------------------------- /4_Pandas/stock_data.csv: -------------------------------------------------------------------------------- 1 | tickers,eps,revenue,price,people 2 | GOOGL,27.82,87,845,larry page 3 | WMT,4.61,484,65,n.a. 4 | MSFT,-1,85,64,bill gates 5 | RIL ,not available,50,1023,mukesh ambani 6 | TATA,5.6,-1,n.a.,ratan tata 7 | -------------------------------------------------------------------------------- /4_Pandas/stocks_weather.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/4_Pandas/stocks_weather.xlsx -------------------------------------------------------------------------------- /4_Pandas/weather_by_cities.csv: -------------------------------------------------------------------------------- 1 | day,city,temperature,windspeed,event 2 | 1/1/2017,new york,32,6,Rain 3 | 1/2/2017,new york,36,7,Sunny 4 | 1/3/2017,new york,28,12,Snow 5 | 1/4/2017,new york,33,7,Sunny 6 | 1/1/2017,mumbai,90,5,Sunny 7 | 1/2/2017,mumbai,85,12,Fog 8 | 1/3/2017,mumbai,87,15,Fog 9 | 1/4/2017,mumbai,92,5,Rain 10 | 1/1/2017,paris,45,20,Sunny 11 | 1/2/2017,paris,50,13,Cloudy 12 | 1/3/2017,paris,54,8,Cloudy 13 | 1/4/2017,paris,42,10,Cloudy 14 | -------------------------------------------------------------------------------- /4_Pandas/weather_data.csv: -------------------------------------------------------------------------------- 1 | day,temperature,windspeed,event 2 | 1/1/2017,32,6,Rain 3 | 1/2/2017,35,7,Sunny 4 | 1/3/2017,28,2,Snow 5 | 1/4/2017,24,7,Snow 6 | 1/5/2017,32,4,Rain 7 | 1/6/2017,31,2,Sunny 8 | -------------------------------------------------------------------------------- /4_Pandas/weather_data.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/4_Pandas/weather_data.xlsx -------------------------------------------------------------------------------- /4_Pandas/weather_data2.csv: -------------------------------------------------------------------------------- 1 | day,temperature,windspeed,event 2 | 1/1/2017,32,6,Rain 3 | 1/4/2017,,9,Sunny 4 | 1/5/2017,28,,Snow 5 | 1/6/2017,,7, 6 | 1/7/2017,32,,Rain 7 | 1/8/2017,,,Sunny 8 | 1/9/2017,,, 9 | 1/10/2017,34,8,Cloudy 10 | 1/11/2017,40,12,Sunny 11 | -------------------------------------------------------------------------------- /4_Pandas/weather_datamissing.csv: -------------------------------------------------------------------------------- 1 | day,temperature,windspeed,event 2 | 1/1/2017,32,6,Rain 3 | 1/2/2017,-99999,7,Sunny 4 | 1/3/2017,28,-99999,Snow 5 | 1/4/2017,-99999,7,0 6 | 1/5/2017,32,-99999,Rain 7 | 1/6/2017,31,2,Sunny 8 | 1/6/2017,34,5,0 9 | -------------------------------------------------------------------------------- /6_Statistics/.ipynb_checkpoints/38_Statistics-checkpoint.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [], 3 | "metadata": {}, 4 | "nbformat": 4, 5 | "nbformat_minor": 5 6 | } 7 | -------------------------------------------------------------------------------- /6_Statistics/38_Statistics.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "32cf531b", 6 | "metadata": {}, 7 | "source": [ 8 | "# Statistics" 9 | ] 10 | }, 11 | { 12 | "cell_type": "code", 13 | "execution_count": null, 14 | "id": "22001a19", 15 | "metadata": {}, 16 | "outputs": [], 17 | "source": [ 18 | "Data Science -> Software Development + Statistics" 19 | ] 20 | }, 21 | { 22 | "cell_type": "code", 23 | "execution_count": null, 24 | "id": "5ee3b181", 25 | "metadata": {}, 26 | "outputs": [], 27 | "source": [ 28 | " Statistics\n", 29 | " Descriptive Inferential\n", 30 | " Univariate Hypothesis Testing\n", 31 | " Bivariate Model Fitting\n", 32 | " Multivariate" 33 | ] 34 | }, 35 | { 36 | "cell_type": "code", 37 | "execution_count": null, 38 | "id": "16606cb3", 39 | "metadata": {}, 40 | "outputs": [], 41 | "source": [ 42 | " Descriptive\n", 43 | " Univariate Bivariate Multivariate" 44 | ] 45 | }, 46 | { 47 | "cell_type": "code", 48 | "execution_count": null, 49 | "id": "f211dd9f", 50 | "metadata": {}, 51 | "outputs": [], 52 | "source": [ 53 | "Univariate\n", 54 | "\n", 55 | "1. Measure of Frequency\n", 56 | "2. Central Tendency - mean, median, mode\n", 57 | " - Geometric mean } ratio or rates\n", 58 | " - Harmonic Mean\n", 59 | "3. Despersion\n", 60 | " - Range (max - min) - sensitive to outliers\n", 61 | " - Inter Quartile Range - (75th percentile - 25th percentile)\n", 62 | " - Variance\n", 63 | " - Standard Deviation\n", 64 | " " 65 | ] 66 | }, 67 | { 68 | "cell_type": "code", 69 | "execution_count": null, 70 | "id": "3dce0754", 71 | "metadata": {}, 72 | "outputs": [], 73 | "source": [ 74 | "Mean\n", 75 | "\n", 76 | "- It best represents the data.\n", 77 | "- It consider each and every point in the data.\n", 78 | "- Discrete data and Continuous data\n", 79 | "\n", 80 | "- It is extremly sensitive to the presence of outlier." 81 | ] 82 | }, 83 | { 84 | "cell_type": "code", 85 | "execution_count": null, 86 | "id": "5409e8ac", 87 | "metadata": {}, 88 | "outputs": [], 89 | "source": [ 90 | " Data\n", 91 | " Qualitative Quantitative\n", 92 | " \"I am from indore\" - Discrete (6 boys) category\n", 93 | " (ratings)\n", 94 | " \n", 95 | " - Continuous 6.5" 96 | ] 97 | }, 98 | { 99 | "cell_type": "code", 100 | "execution_count": null, 101 | "id": "d57d4345", 102 | "metadata": {}, 103 | "outputs": [], 104 | "source": [ 105 | "Median\n", 106 | "\n", 107 | "- It is less sensitive by the outlier.\n", 108 | "- 50% of the data is either side of it.\n", 109 | "- Median does not consider each point like mean." 110 | ] 111 | }, 112 | { 113 | "cell_type": "code", 114 | "execution_count": null, 115 | "id": "201fc493", 116 | "metadata": {}, 117 | "outputs": [], 118 | "source": [ 119 | "Mode\n", 120 | "\n", 121 | "- the value that occured most in the data.\n", 122 | "- casting vote in an election\n", 123 | "- mode is not good for continuous data.\n" 124 | ] 125 | }, 126 | { 127 | "cell_type": "code", 128 | "execution_count": null, 129 | "id": "f2e020bb", 130 | "metadata": {}, 131 | "outputs": [], 132 | "source": [] 133 | }, 134 | { 135 | "cell_type": "code", 136 | "execution_count": null, 137 | "id": "4e3ed2a8", 138 | "metadata": {}, 139 | "outputs": [], 140 | "source": [] 141 | } 142 | ], 143 | "metadata": { 144 | "kernelspec": { 145 | "display_name": "Python 3", 146 | "language": "python", 147 | "name": "python3" 148 | }, 149 | "language_info": { 150 | "codemirror_mode": { 151 | "name": "ipython", 152 | "version": 3 153 | }, 154 | "file_extension": ".py", 155 | "mimetype": "text/x-python", 156 | "name": "python", 157 | "nbconvert_exporter": "python", 158 | "pygments_lexer": "ipython3", 159 | "version": "3.8.10" 160 | } 161 | }, 162 | "nbformat": 4, 163 | "nbformat_minor": 5 164 | } 165 | -------------------------------------------------------------------------------- /6_Statistics/README.md: -------------------------------------------------------------------------------- 1 | # Statistics 2 | 3 | There are 2 sets of tools for statistics: 4 | 1. Descriptive Statistics: It is used to identify important elements in a dataset and describe the dataset. 5 | 2. Inferential Statistics: It explain those relationships via other elements. 6 | 7 | ```python 8 | Statistics 9 | Descriptive Inferential 10 | Univariate Hypothesis Testing 11 | Bivariate Model Fitting 12 | Multivariate 13 | 14 | ``` 15 | 16 | Descriptive statistics help us summarize the data. 17 | - It is the first step in exploratory data analysis. 18 | - It helps us understand the data. 19 | - It help you detect outlier. 20 | - Plan to prepare data. 21 | - It also helps us in feature engineering. 22 | 23 | ```python 24 | Descriptive 25 | Univariate Bivariate Multivariate 26 | 27 | 28 | ``` 29 | 30 | Univariate: It involves single variable. 31 | 32 | Bivariate: It involves 2 variables, examples: correlation and covariance. 33 | 34 | Multivariate: It includes multiple variables, examples: corrilation matrix and covariance matrix. 35 | 36 | ### Lets understand Univariate Statistics 37 | 38 | It is divided into 3 parts: 39 | 40 | 1. Measures of Frequency 41 | - How often a particular value occur in data. 42 | - It includes frequency tables and histogram. 43 | - A histogram is a visualization where we plot the values, bucketized if needed on the x-axis and on the y-axis we have count of record. 44 | 45 | 2. Central Tendency 46 | - Measure of central tendency for a variable try to determine one value that best represents your data. 47 | - Common measures include average or the mean of your data, the median value and the mode. 48 | 49 | Other measures of central tendency 50 | - Geomatric mean 51 | - Harmonic mean 52 | 53 | They are used with ratios or rates 54 | 55 | ### Mean 56 | 57 | - It is the single best value to represent your data. It not actually be the data point itself. 58 | - It considers every point available in your data. 59 | - It can be computed on discrete data as well as continuous data. 60 | 61 | Discrete data can be numeric value that take on values from a predetermine subset such as star ratings. 62 | 63 | Continuous data can take on any value in a range. 64 | 65 | #### Mean is extremly sensitive to the presence of outlier. 66 | 67 | 68 | ### Median 69 | 70 | - It is less influenced by the outlier. 71 | - The median is that value in your data such that 50% of the dataset is either side of it. 72 | - For calculating mean you have to sort the data in ascending or decending order and then use the middle element. 73 | - It the data points are even then average the middle 2. 74 | - The median might be the better measure of central tendency than the mean because it is much more robust to the presence of outliers. 75 | - Like mean, Median does not consider very data point available in the dataset. 76 | - The median can be computed on ordinal data, data that is not numeric but can be sorted like rating like good bad ugly very ugly. 77 | 78 | 79 | ### Mode 80 | 81 | - The value that occurs most frequently in the data, if you plot a histogram, the highest bar represents the mode. 82 | - Examples - casting votes in an election 83 | - It is used with catagorical data, variables that take on a fixed set of values from a predetermined range, examples of catagorical data includes, days of a week, month of the year, makes of cars. 84 | - Mode dont need to be unique. 85 | - Mode is not great for continuous data that can take on any value within the range. 86 | 87 | - Contiuous data needs to be descretized before you can perform mode computation. 88 | 89 | 3. Dispersion 90 | 91 | It tells you how your dataset is spread out. 92 | 93 | - Range(max-min) of your variable. It is sensitive to outliers. 94 | - Range completely ignores the mean, thats why variance comes in. 95 | 96 | - Inter Quartile range: Difference between the values at the 75th percentile of your data and the 25th percentile of your data. 97 | - Standard deviation and variance 98 | 99 | #### Variance 100 | 101 | - Not only tells us how the numbers jumps around but also understands where your numbers are clustered. 102 | - It also considers the mean. 103 | - Variance is the second most important number to summarize your datapoints. 104 | - Variance of the data is simply the sum of the squares of the mean deviations divided by the number of data points you have in your data. 105 | 106 | Bessels Correction - put n-1 in the denominator while computing variance 107 | 108 | -------------------------------------------------------------------------------- /6_Statistics/datasets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/6_Statistics/datasets/.DS_Store -------------------------------------------------------------------------------- /6_Statistics/datasets/Birthweight_reduced_kg_R.csv: -------------------------------------------------------------------------------- 1 | ID,Length,Birthweight,Headcirc,Gestation,smoker,mage,mnocig,mheight,mppwt,fage,fedyrs,fnocig,fheight,lowbwt,mage35 2 | 1360,56,4.55,34,44,0,20,0,162,57,23,10,35,179,0,0 3 | 1016,53,4.32,36,40,0,19,0,171,62,19,12,0,183,0,0 4 | 462,58,4.1,39,41,0,35,0,172,58,31,16,25,185,0,1 5 | 1187,53,4.07,38,44,0,20,0,174,68,26,14,25,189,0,0 6 | 553,54,3.94,37,42,0,24,0,175,66,30,12,0,184,0,0 7 | 1636,51,3.93,38,38,0,29,0,165,61,31,16,0,180,0,0 8 | 820,52,3.77,34,40,0,24,0,157,50,31,16,0,173,0,0 9 | 1191,53,3.65,33,42,0,21,0,165,61,21,10,25,185,0,0 10 | 1081,54,3.63,38,38,0,18,0,172,50,20,12,7,172,0,0 11 | 822,50,3.42,35,38,0,20,0,157,48,22,14,0,179,0,0 12 | 1683,53,3.35,33,41,0,27,0,164,62,37,14,0,170,0,0 13 | 1088,51,3.27,36,40,0,24,0,168,53,29,16,0,181,0,0 14 | 1107,52,3.23,36,38,0,31,0,164,57,35,16,0,183,0,0 15 | 755,53,3.2,33,41,0,21,0,155,55,25,14,25,183,0,0 16 | 1058,53,3.15,34,40,0,29,0,167,60,30,16,25,182,0,0 17 | 321,48,3.11,33,37,0,28,0,158,54,39,10,0,171,0,0 18 | 697,48,3.03,35,39,0,27,0,162,62,27,14,0,178,0,0 19 | 808,48,2.92,33,34,0,26,0,167,64,25,12,25,175,0,0 20 | 1600,53,2.9,34,39,0,19,0,165,57,23,14,2,193,0,0 21 | 1313,43,2.65,32,33,0,24,0,149,45,26,16,0,169,1,0 22 | 792,53,3.64,38,40,1,20,2,170,59,24,12,12,185,0,0 23 | 1388,51,3.14,33,41,1,22,7,160,53,24,16,12,176,0,0 24 | 575,50,2.78,30,37,1,19,7,165,60,20,14,0,183,0,0 25 | 569,50,2.51,35,39,1,22,7,159,52,23,14,25,200,1,0 26 | 1363,48,2.37,30,37,1,20,7,163,47,20,10,35,185,1,0 27 | 300,46,2.05,32,35,1,41,7,166,57,37,14,25,173,1,1 28 | 431,48,1.92,30,33,1,20,7,161,50,20,10,35,180,1,0 29 | 1764,58,4.57,39,41,1,32,12,173,70,38,14,25,180,0,0 30 | 532,53,3.59,34,40,1,31,12,163,49,41,12,50,191,0,0 31 | 752,49,3.32,36,40,1,27,12,152,48,37,12,25,170,0,0 32 | 1023,52,3,35,38,1,30,12,165,64,38,14,50,180,0,0 33 | 57,51,3.32,38,39,1,23,17,157,48,32,12,25,169,0,0 34 | 1522,50,2.74,33,39,1,21,17,156,53,24,12,7,179,0,0 35 | 223,50,3.87,33,45,1,28,25,163,54,30,16,0,183,0,0 36 | 272,52,3.86,36,39,1,30,25,170,78,40,16,50,178,0,0 37 | 27,53,3.55,37,41,1,37,25,161,66,46,16,0,175,0,1 38 | 365,52,3.53,37,40,1,26,25,170,62,30,10,25,181,0,0 39 | 619,52,3.41,33,39,1,23,25,181,69,23,16,2,181,0,0 40 | 1369,49,3.18,34,38,1,31,25,162,57,32,16,50,194,0,0 41 | 1262,53,3.19,34,41,1,27,35,163,51,31,16,25,185,0,0 42 | 516,47,2.66,33,35,1,20,35,170,57,23,12,50,186,1,0 43 | 1272,53,2.75,32,40,1,37,50,168,61,31,16,0,173,0,1 44 | -------------------------------------------------------------------------------- /6_Statistics/datasets/Crime_R.csv: -------------------------------------------------------------------------------- 1 | CrimeRate,Youth,Southern,Education,ExpenditureYear0,LabourForce,Males,MoreMales,StateSize,YouthUnemployment,MatureUnemployment,HighYouthUnemploy,Wage,BelowWage,CrimeRate10,Youth10,Education10,ExpenditureYear10,LabourForce10,Males10,MoreMales10,StateSize10,YouthUnemploy10,MatureUnemploy10,HighYouthUnemploy10,Wage10,BelowWage10 2 | 45.5,135,0,12.4,69,540,965,0,6,80,22,1,564,139,26.5,135,12.5,71,564,974,0,6,82,20,1,632,142 3 | 52.3,140,0,10.9,55,535,1045,1,6,135,40,1,453,200,35.9,135,10.9,54,540,1039,1,7,138,39,1,521,210 4 | 56.6,157,1,11.2,47,512,962,0,22,97,34,0,288,276,37.1,153,11,44,529,959,0,24,98,33,0,359,256 5 | 60.3,139,1,11.9,46,480,968,0,19,135,53,0,457,249,42.7,139,11.8,41,497,983,0,20,131,50,0,510,235 6 | 64.2,126,0,12.2,106,599,989,0,40,78,25,1,593,171,46.7,125,12.2,97,602,989,0,42,79,24,1,660,162 7 | 67.6,128,0,13.5,67,624,972,0,28,77,25,1,507,206,47.9,128,13.8,60,621,983,0,28,81,24,1,571,199 8 | 70.5,130,0,14.1,63,641,984,0,14,70,21,1,486,196,50.6,153,14.1,57,641,993,0,14,71,23,1,556,176 9 | 73.2,143,0,12.9,66,537,977,0,10,114,35,1,487,166,55.9,143,13,63,549,973,0,11,119,36,1,561,168 10 | 75,141,0,12.9,56,523,968,0,4,107,37,0,489,170,61.8,153,12.9,54,538,968,0,5,110,36,1,550,126 11 | 78.1,133,0,11.4,51,599,1024,1,7,99,27,1,425,225,65.4,134,11.2,47,600,1024,1,7,97,28,1,499,215 12 | 79.8,142,1,12.9,45,533,969,0,18,94,33,0,318,250,71.4,142,13.1,44,552,969,0,19,93,36,0,378,247 13 | 82.3,123,0,12.5,97,526,948,0,113,124,50,0,572,158,75.4,134,12.4,87,529,949,0,117,125,49,0,639,146 14 | 83.1,135,0,13.6,62,595,986,0,22,77,27,0,529,190,77.3,137,13.7,61,599,993,0,23,80,28,0,591,189 15 | 84.9,121,0,13.2,118,547,964,0,25,84,29,0,689,126,78.6,132,13.3,115,538,968,0,25,82,30,0,742,127 16 | 85.6,166,1,11.4,58,521,973,0,46,72,26,0,396,237,80.6,153,11.2,54,543,983,0,47,76,25,1,568,246 17 | 88,140,0,12.9,71,632,1029,1,7,100,24,1,526,174,82.2,130,12.9,68,620,1024,1,8,104,25,1,570,182 18 | 92.3,126,0,12.7,74,602,984,0,34,102,33,1,557,195,87.5,134,12.9,67,599,982,0,33,107,34,1,621,199 19 | 94.3,130,0,13.3,128,536,934,0,51,78,34,0,627,135,92.9,127,13.3,128,530,949,0,52,79,33,0,692,140 20 | 95.3,125,0,12,90,586,964,0,97,105,43,0,617,163,94.1,134,11.9,81,571,971,0,99,106,41,0,679,162 21 | 96.8,151,1,10,58,510,950,0,33,108,41,0,394,261,96.2,161,10.1,56,515,1001,1,32,110,40,0,465,254 22 | 97.4,152,1,10.8,57,530,986,0,30,92,43,0,405,264,97.8,152,11,53,541,989,0,30,92,41,0,470,243 23 | 98.7,162,1,12.1,75,522,996,0,40,73,27,0,496,224,99.9,162,12,70,533,992,0,41,80,28,0,562,229 24 | 99.9,149,1,10.7,61,515,953,0,36,86,35,0,395,251,101.4,150,10.7,54,520,952,0,35,84,32,0,476,249 25 | 103,177,1,11,58,638,974,0,24,76,28,0,382,254,103.5,164,10.9,56,638,978,0,25,79,28,0,456,257 26 | 104.3,134,0,12.5,75,595,972,0,47,83,31,0,580,172,104.5,133,12.7,71,599,982,0,50,87,32,0,649,182 27 | 105.9,130,0,13.4,90,623,1049,1,3,113,40,0,588,160,106.4,153,13.4,91,622,1050,1,3,119,41,0,649,159 28 | 106.6,157,1,11.1,65,553,955,0,39,81,28,0,421,239,107.8,156,11.2,62,562,956,0,39,85,29,0,499,243 29 | 107.2,148,0,13.7,72,601,998,0,9,84,20,1,590,144,110.1,134,13.9,66,602,999,0,9,87,15,0,656,151 30 | 108.3,126,0,13.8,97,542,990,0,18,102,35,0,589,166,110.5,126,13.8,97,549,993,0,19,103,34,1,659,160 31 | 109.4,135,1,11.4,123,537,978,0,31,89,34,0,631,165,113.5,134,11.3,115,529,978,0,32,93,35,0,703,175 32 | 112.1,142,1,10.9,81,497,956,0,33,116,47,0,427,247,116.3,147,10.7,77,501,962,0,33,117,44,0,500,256 33 | 114.3,127,1,12.8,82,519,982,0,4,97,38,0,620,168,119.7,125,12.9,79,510,945,0,4,99,39,0,696,170 34 | 115.1,131,0,13.7,78,574,1038,1,7,142,42,1,540,176,124.5,134,13.6,73,581,1029,1,7,143,41,1,615,177 35 | 117.2,136,0,12.9,95,574,1012,1,29,111,37,1,622,162,127.8,140,13,96,581,1011,1,29,115,36,1,691,169 36 | 119.7,119,0,11.9,166,521,938,0,168,92,36,0,637,154,129.8,120,11.9,157,524,935,0,180,93,27,1,698,169 37 | 121.6,147,1,13.9,63,560,972,0,23,76,24,1,462,233,130.7,139,14,64,571,970,0,24,78,24,1,511,220 38 | 123.4,145,1,11.7,82,560,981,0,96,88,31,0,488,228,132.5,154,11.8,74,563,980,0,99,89,29,1,550,230 39 | 127.2,132,0,10.4,87,564,953,0,43,83,32,0,513,227,134.6,135,10.2,83,560,948,0,44,83,32,0,589,234 40 | 132.4,152,0,12,82,571,1018,1,10,103,28,1,537,215,137.5,151,12.1,76,567,1079,1,11,105,27,1,617,204 41 | 135.5,125,0,12.5,113,567,985,0,78,130,58,0,626,166,140.5,140,12.5,105,571,993,0,77,131,59,0,684,174 42 | 137.8,141,0,14.2,109,591,985,0,18,91,20,1,578,174,145.7,142,14.2,101,590,987,0,19,94,19,1,649,180 43 | 140.8,150,0,12,109,531,964,0,9,87,38,0,559,153,150.6,153,12,98,539,982,0,10,88,36,0,635,151 44 | 145.4,131,1,12.2,115,542,969,0,50,79,35,0,472,206,157.3,131,12.1,109,548,976,0,52,82,34,0,539,219 45 | 149.3,143,0,12.3,103,583,1012,1,13,96,36,0,557,194,162.7,142,12.2,95,612,1003,1,13,97,36,0,625,196 46 | 154.3,124,0,12.3,121,580,966,0,101,77,35,0,657,170,169.6,134,12.2,116,580,987,0,104,79,36,0,719,172 47 | 157.7,136,0,15.1,149,577,994,0,157,102,39,0,673,167,177.2,140,15.2,141,578,995,0,160,110,40,0,739,169 48 | 161.8,131,0,13.2,160,631,1071,1,3,102,41,0,674,152,178.2,132,13.2,143,632,1058,1,4,100,40,0,748,150 49 | -------------------------------------------------------------------------------- /7_Machine Learning/1_Linear Regression/Linear Regression Complete/MBASSData.csv: -------------------------------------------------------------------------------- 1 | age,sex,gmat_tot,gmat_qpc,gmat_vpc,gmat_tpc,s_avg,f_avg,quarter,work_yrs,frstlang,salary,satis 23,2,620,77,87,87,3.4,3,1,2,1,0,7 24,1,610,90,71,87,3.5,4,1,2,1,0,6 24,1,670,99,78,95,3.3,3.25,1,2,1,0,6 24,1,570,56,81,75,3.3,2.67,1,1,1,0,7 24,2,710,93,98,98,3.6,3.75,1,2,1,999,5 24,1,640,82,89,91,3.9,3.75,1,2,1,0,6 25,1,610,89,74,87,3.4,3.5,1,2,1,0,5 25,2,650,88,89,92,3.3,3.75,1,2,1,0,6 25,1,630,79,91,89,3.3,3.25,1,2,2,999,4 25,1,680,99,81,96,3.45,3.67,1,2,1,998,998 26,1,740,99,98,99,3.56,4,1,2,1,998,998 26,2,610,75,87,86,3.4,3.75,1,2,1,998,998 26,1,710,95,95,98,3.5,3.5,1,3,1,998,998 26,1,720,97,97,99,3.4,4,1,2,1,998,998 26,2,660,84,93,94,3.3,3.25,1,4,1,998,998 26,2,640,67,98,92,4,4,1,2,1,998,998 27,2,660,71,99,95,3.5,4,1,4,1,998,998 27,1,600,77,78,84,3.3,3.5,1,3,2,998,998 27,1,630,79,89,89,3.5,4,1,2,1,998,998 27,1,600,91,58,83,3.4,3.25,1,4,1,998,998 27,2,570,65,82,77,3.3,3.25,1,4,1,999,4 27,1,740,99,96,99,3.5,3.5,1,3,1,0,6 27,1,750,99,98,99,3.4,3.5,1,1,2,0,5 28,2,540,75,50,65,3.6,4,1,5,1,0,5 29,1,580,56,87,78,3.64,3.33,1,3,1,0,5 30,1,620,82,84,87,3.4,2.8,1,5,1,999,6 31,2,560,60,78,72,3.3,3.75,1,10,1,0,7 32,1,760,99,99,99,3.4,3,1,5,1,0,5 32,1,640,79,91,91,3.6,3.75,1,7,1,0,6 32,1,570,71,71,0,3.5,3.5,1,4,1,999,4 34,2,620,75,89,87,3.3,3,1,7,1,0,6 37,2,560,43,87,72,3.4,3.5,1,9,1,0,6 42,2,650,75,98,93,3.38,3,1,13,1,0,5 48,1,590,84,62,81,3.8,4,1,22,1,0,6 22,2,660,90,92,94,3.5,3.75,1,1,1,85000,5 27,2,700,94,98,98,3.3,3.25,1,2,1,85000,6 25,2,680,87,96,96,3.5,2.67,1,2,1,86000,5 25,2,650,82,91,93,3.4,3.25,1,3,1,88000,7 27,1,710,96,96,98,3.3,3.5,1,2,1,92000,6 28,2,620,52,98,87,3.4,3.75,1,5,1,93000,5 24,1,670,84,96,95,3.3,3.25,1,0,1,95000,4 25,2,560,52,81,72,3.3,3.5,1,1,1,95000,5 25,2,530,50,62,61,3.6,3.67,1,3,1,95000,3 25,1,650,79,93,93,3.3,3.5,1,1,1,96000,7 26,2,590,56,89,81,3.3,3.25,1,4,1,96000,5 23,2,650,93,81,93,3.4,3,1,2,1,100000,7 24,1,560,81,50,71,3.4,3.67,1,2,1,100000,6 27,1,610,72,84,86,3.3,3.5,1,6,1,100000,6 25,1,650,95,84,93,3.3,3,1,2,1,105000,7 25,1,550,74,50,68,3.5,3.5,1,3,1,105000,6 26,1,570,68,74,75,3.8,3.5,1,3,1,105000,6 26,1,580,79,71,78,3.45,3.5,1,2,1,105000,5 30,1,600,60,91,83,3.3,3.25,1,5,1,105000,6 31,1,570,72,71,75,3.6,3.5,1,6,1,105000,6 30,1,620,60,96,87,3.5,3,1,8,1,106000,7 30,2,680,96,87,96,3.7,3.6,1,6,1,106000,6 27,1,630,93,75,91,3.3,3.25,1,3,1,107500,5 25,1,600,82,74,83,3.5,3.25,1,3,1,108000,6 28,2,640,89,81,91,3.6,3.5,1,6,1,110000,5 39,1,600,72,81,83,3.6,3.5,1,16,1,112000,7 27,1,570,95,33,75,3.7,4,1,4,1,115000,5 27,1,710,95,98,98,3.6,3.5,1,1,1,115000,5 33,1,620,72,89,87,3.5,3.5,1,10,2,118000,7 27,1,600,67,84,83,3.5,3,1,3,1,120000,5 28,1,700,95,95,98,3.8,4,1,5,1,120000,5 30,1,600,77,81,84,3.5,3.25,1,5,1,120000,6 30,2,670,87,95,95,3.3,3.25,1,8,1,120000,6 40,1,630,71,95,91,4,0,1,15,1,146000,6 25,1,700,98,93,98,3.6,3.75,1,1,1,162000,5 22,1,600,95,54,83,3,3,2,1,1,0,5 23,1,640,89,87,92,3,3,2,2,1,0,7 24,1,550,73,63,69,3.1,3,2,0,2,0,5 24,1,570,82,58,75,3.09,3.5,2,2,1,0,6 24,1,620,82,84,87,3.1,3.5,2,1,1,0,5 25,2,570,61,81,76,3,3.25,2,3,1,0,4 25,1,660,94,84,94,3.27,3.75,2,2,1,0,5 25,1,680,94,92,97,3.17,3.5,2,2,1,0,6 25,1,690,87,98,98,3,3,2,3,1,999,5 25,2,670,99,85,96,3,3.25,2,2,2,998,998 25,1,690,94,95,98,3,2.75,2,2,1,998,998 25,2,630,83,89,90,3,2.75,2,3,1,998,998 25,1,670,99,74,96,3.18,3.25,2,2,2,998,998 25,1,680,91,95,97,3,3,2,2,1,998,998 25,1,690,96,89,97,3,3,2,3,1,998,998 25,1,670,97,81,95,3.1,3.25,2,2,1,998,998 25,1,580,79,71,78,3.1,2.33,2,2,1,998,998 26,1,680,92,93,97,3,3,2,3,1,999,1 26,2,560,64,71,72,3.2,3.25,2,3,1,0,6 26,1,560,87,41,72,3,3,2,3,1,0,6 26,1,530,68,54,62,3.09,3.17,2,4,2,0,5 27,1,740,99,98,99,3.1,3.5,2,2,1,999,4 27,1,720,99,95,99,3.1,3.25,2,5,1,0,5 27,1,590,60,87,81,3,2.75,2,3,1,0,6 27,1,630,87,84,89,3.2,3,2,4,1,998,998 27,1,560,60,71,72,3.2,3,2,4,1,998,998 28,2,450,49,22,44,3.1,3.75,2,4,2,998,998 28,1,620,81,90,89,3.2,3,2,4,1,0,6 28,2,610,85,78,86,3.1,3,2,5,1,0,6 28,1,660,95,85,96,3.1,3.25,2,4,1,999,3 29,1,660,94,87,94,3,3,2,1,1,0,6 29,1,580,91,50,80,3.1,2.67,2,4,2,999,4 29,1,510,57,50,55,3.27,3.4,2,5,1,0,5 29,2,640,90,84,92,3.2,3,2,3,1,0,5 29,1,610,91,62,86,3.1,3.67,2,7,1,0,5 29,1,590,68,84,81,3.1,3,2,6,1,999,5 29,1,580,79,67,78,3,3.25,2,4,1,0,6 30,1,680,97,87,96,3,3,2,4,1,0,5 31,1,670,83,98,96,3.2,3.4,2,4,1,999,6 32,2,610,64,89,86,3.25,0,2,11,1,0,7 35,1,540,43,78,65,3.2,3.25,2,8,1,0,5 35,1,630,66,95,90,3.08,3.25,2,12,1,0,5 36,2,530,48,71,62,3,2.5,2,7,1,0,5 36,1,650,87,89,93,3,3.2,2,18,1,0,6 43,1,630,82,87,89,3.1,3,2,16,1,0,5 26,2,670,87,95,95,3.1,3.33,2,1,1,82000,7 25,2,620,89,74,87,3.1,3.5,2,2,1,92000,5 31,1,540,60,62,65,3.1,3,2,8,1,93000,6 25,1,670,95,89,95,3.2,3.5,2,2,1,95000,6 25,1,610,87,71,86,3.27,3.25,2,3,1,95000,6 24,1,560,52,81,72,3.2,3.25,2,2,1,96000,7 24,1,500,78,30,52,3,2.75,2,2,1,96500,6 23,1,590,72,81,81,3.2,3.25,2,2,1,98000,6 24,1,570,82,58,75,3.2,3.25,2,2,1,98000,6 26,2,570,93,37,75,3,2.75,2,3,2,98000,5 28,2,580,83,58,79,3.1,3,2,5,2,99000,6 24,2,580,72,71,78,3,3.25,2,2,1,100000,5 31,1,560,68,67,72,3.09,3,2,4,1,100000,6 25,2,620,89,74,87,3.1,3.5,2,2,1,101000,5 27,1,620,97,63,88,3.2,3,2,3,1,103000,6 28,1,560,75,58,72,3.2,3.25,2,4,1,104000,5 26,1,680,84,96,96,3.2,3.25,2,3,1,105000,6 27,1,620,81,87,89,3,3,2,3,1,105000,5 34,1,550,72,58,69,3,3,2,16,1,105000,5 26,1,600,84,67,83,3.09,3.5,2,2,1,107000,5 29,1,670,91,93,95,3.1,3,2,6,1,112000,6 24,1,620,84,81,87,3,3.25,2,1,1,115000,6 27,1,630,72,95,89,3.2,3,2,4,1,115000,6 26,1,650,89,87,93,3.2,3.25,2,4,1,130000,7 24,1,620,88,74,87,3.1,3,2,2,1,145800,6 23,1,720,95,98,99,2.8,2.5,3,1,1,0,5 24,2,640,94,78,92,2.9,3.25,3,2,2,0,4 24,1,710,96,97,99,2.8,2.75,3,2,1,0,7 24,1,670,94,89,96,2.7,3,3,2,1,0,7 24,2,710,97,97,99,2.8,3,3,2,1,0,7 24,1,650,89,84,93,2.7,3.25,3,1,1,999,5 24,1,600,89,62,83,2.9,3,3,1,1,0,6 24,2,640,96,71,91,2.7,2.5,3,2,1,0,6 25,1,600,89,62,83,2.7,3.25,3,4,1,998,998 25,1,630,79,91,89,2.7,2.75,3,2,1,998,998 25,1,550,72,58,69,2.9,3,3,3,1,0,6 25,1,710,99,91,98,2.9,3.25,3,1,1,0,6 25,1,660,95,84,94,2.7,3,3,3,1,999,6 25,1,630,93,71,89,2.9,3.25,3,3,2,998,998 25,1,560,79,58,72,2.73,3.17,3,2,2,998,998 26,1,670,97,81,96,2.7,2.5,3,4,1,998,998 26,1,660,88,93,94,2.9,2.75,3,3,2,998,998 26,1,630,83,87,90,2.7,3,3,3,1,998,998 26,1,640,87,84,91,2.7,3.2,3,4,1,999,5 26,1,560,56,81,72,2.8,3.25,3,4,1,0,6 26,1,540,52,71,65,2.7,2.75,3,2,1,0,6 26,1,600,97,45,83,2.7,3,3,4,2,999,6 26,2,570,48,89,75,2.82,2.5,3,3,1,0,5 26,1,610,82,81,86,2.9,2.75,3,3,1,0,6 27,1,650,89,84,93,2.9,3,3,2,1,0,6 27,2,550,66,63,69,2.9,3,3,3,1,0,4 27,1,730,95,99,99,2.9,3.33,3,0,1,999,5 27,1,610,97,45,86,2.7,2.5,3,4,2,0,5 27,2,630,82,89,89,2.7,3.25,3,5,1,0,6 27,2,560,61,74,73,2.8,3.25,3,5,1,0,6 27,2,620,97,54,87,2.7,2.75,3,2,2,999,2 27,1,600,68,87,83,2.9,3.25,3,3,1,998,998 27,1,650,79,95,93,2.7,3.25,3,3,1,998,998 27,1,560,52,81,72,2.7,2.75,3,2,1,998,998 27,1,610,48,98,86,2.7,3,3,4,1,998,998 27,1,600,77,81,84,2.7,3,3,3,1,998,998 28,1,460,66,16,37,2.7,2.5,3,4,1,998,998 28,1,650,99,63,93,2.9,3,3,4,2,998,998 28,2,610,64,93,86,2.8,3.25,3,4,1,998,998 28,1,500,46,54,52,2.9,2.75,3,9,1,999,6 29,1,590,92,58,81,2.8,2.75,3,3,2,0,5 29,1,560,57,74,73,2.8,3,3,4,1,999,5 32,1,550,52,78,71,2.7,2.75,3,7,1,0,6 34,1,610,79,81,86,2.8,3,3,11,1,0,6 34,1,610,82,78,86,2.7,3,3,12,1,0,5 43,1,480,49,41,45,2.9,3.25,3,22,1,0,5 23,2,520,43,67,58,2.9,2.75,3,1,1,78256,5 27,1,620,87,74,87,2.7,2.75,3,3,1,88500,6 25,1,580,78,67,80,2.9,3.25,3,2,1,90000,7 25,1,630,75,93,89,2.7,2.5,3,2,1,90000,5 25,1,610,89,74,87,2.7,2.75,3,4,1,93000,6 29,2,560,64,71,72,2.9,3,3,5,1,95000,7 27,1,620,79,87,88,2.9,2.75,3,4,1,97000,7 28,1,580,72,71,78,2.8,3,3,3,1,97000,6 24,2,670,83,98,96,2.9,3.25,3,2,1,98000,7 25,2,560,39,91,72,2.9,3,3,2,1,98000,7 25,2,580,72,71,78,2.8,3.25,3,2,1,98000,6 27,1,680,97,90,97,2.9,2.75,3,2,2,98000,6 28,1,610,89,67,86,2.7,3,3,4,1,98000,7 29,1,710,93,98,99,2.9,3.25,3,7,1,98000,5 24,1,710,99,92,99,2.9,3,3,3,1,100000,6 25,2,630,84,87,89,2.8,2.75,3,2,1,100000,6 24,2,600,89,67,85,2.8,3,3,2,1,101000,6 29,1,660,91,90,95,2.8,3,3,8,1,101100,6 30,1,670,83,97,96,2.8,2.75,3,6,1,102500,5 24,1,580,89,54,78,2.91,2.83,3,2,1,105000,5 29,1,680,79,99,96,2.9,3,3,6,1,106000,6 32,1,660,83,95,94,2.9,3.5,3,2,2,107300,7 28,1,570,56,84,75,2.9,3,3,4,1,108000,6 24,1,680,96,87,97,2.8,2.75,3,2,1,112000,6 24,1,610,82,81,86,2.5,2.75,4,2,1,998,998 24,1,640,93,78,91,2.4,2.5,4,1,1,998,998 25,1,600,53,95,84,2.5,3,4,2,1,999,4 25,1,730,98,96,99,2.4,2.75,4,2,1,0,6 25,2,650,87,91,93,2.5,2.5,4,3,1,999,7 25,1,640,79,93,91,2.67,0,4,1,1,998,998 25,1,590,68,81,81,2.6,2.75,4,3,1,998,998 25,1,590,97,41,81,2.5,2.75,4,2,2,999,4 25,1,700,99,87,98,2,2,4,1,1,0,7 26,1,660,93,87,95,2.6,2,4,2,1,0,5 26,1,450,28,46,34,2.1,2,4,4,1,0,6 26,1,560,87,45,72,2.6,3,4,3,2,999,3 26,1,600,75,78,83,2.2,2.25,4,2,1,0,6 26,1,570,82,58,75,2.5,2.75,4,3,1,999,6 26,1,590,89,58,81,2.5,2.25,4,3,1,998,998 26,2,670,98,81,95,2.6,2.5,4,3,1,998,998 27,1,660,97,81,94,2.5,2.5,4,4,1,999,4 27,2,560,59,74,73,2.4,2.5,4,2,1,0,5 27,1,790,99,99,99,2.4,2.5,4,4,1,999,6 27,1,630,93,78,91,2.1,2.5,4,4,1,0,5 27,1,580,84,58,78,2.7,2.75,4,1,1,0,5 27,1,620,85,85,89,3.3,3,4,1,1,999,5 27,1,670,89,91,95,3.6,3.25,4,5,1,0,6 27,1,580,74,70,78,3.4,3.25,4,3,1,0,6 28,1,560,74,67,73,3.6,3.6,4,5,1,0,5 28,1,620,93,71,87,2.4,2.75,4,3,1,999,4 28,1,710,94,98,99,3.4,3.75,4,6,1,0,6 28,1,570,69,71,0,2.3,2.5,4,5,1,0,5 29,1,530,35,81,62,3.3,2.75,4,6,1,0,7 29,1,690,99,87,97,2.3,2.25,4,7,1,999,5 29,1,630,87,84,89,2.9,2.8,4,3,1,999,4 29,1,670,91,91,95,3.3,3.25,4,3,1,0,5 29,1,630,99,50,89,2.9,3.25,4,1,2,0,4 29,2,680,89,96,96,2.8,3,4,4,1,0,5 30,1,650,88,92,93,3.45,3.83,4,2,1,0,6 30,1,550,79,45,69,2.45,2.75,4,5,2,999,4 30,2,600,99,46,86,2.8,3,4,6,2,999,4 30,1,630,82,87,89,3.8,3.5,4,7,1,998,998 31,1,580,83,67,79,3,3.25,4,6,1,998,998 31,1,740,99,98,99,2.2,3,4,8,1,998,998 31,1,570,75,62,75,2.8,3,4,1,1,0,6 31,1,640,79,92,92,2.7,2.75,4,7,1,999,3 32,1,570,89,41,75,2.6,2.5,4,4,2,999,3 32,1,510,79,22,54,2.3,2.25,4,5,2,0,5 35,1,570,72,71,75,3.3,4,4,8,1,0,6 39,2,700,89,98,98,3.3,3.25,4,5,1,0,5 24,2,560,55,78,71,3.5,3.25,4,2,1,64000,7 23,1,660,81,98,95,2.5,3,4,2,1,77000,6 25,2,720,96,98,99,3.5,3.6,4,3,1,85000,6 26,1,620,78,87,89,2.4,2,4,2,1,85000,6 26,2,630,85,81,90,2.9,3.25,4,3,1,86000,5 27,1,650,89,89,93,2.4,2.25,4,5,1,90000,5 25,1,660,99,71,95,3.4,3.25,4,2,1,92000,7 25,1,610,83,81,86,2.4,2.75,4,2,1,95000,7 26,1,600,87,62,83,2.5,2.5,4,2,1,96000,6 24,1,570,75,62,75,2.3,2.5,4,2,1,98000,6 24,2,600,77,78,84,2.6,3,4,2,1,100000,6 26,2,650,91,84,93,2.6,3,4,2,1,100000,7 29,1,630,72,95,89,2.6,2.5,4,3,1,100400,7 26,1,630,96,71,91,2.6,2.75,4,3,1,101600,6 31,1,530,75,45,62,2.4,2.75,4,4,2,104000,6 23,1,580,64,81,78,2.2,2,4,2,1,105000,6 25,1,540,79,45,65,2.6,2.5,4,3,1,115000,5 26,1,550,72,58,69,2.6,2.75,4,3,1,126710,6 40,2,500,60,45,51,2.5,2.75,4,15,2,220000,6 -------------------------------------------------------------------------------- /7_Machine Learning/1_Linear Regression/Linear Regression Complete/e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/1_Linear Regression/Linear Regression Complete/e.png -------------------------------------------------------------------------------- /7_Machine Learning/1_Linear Regression/Linear Regression Complete/five.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/1_Linear Regression/Linear Regression Complete/five.png -------------------------------------------------------------------------------- /7_Machine Learning/1_Linear Regression/Linear Regression Complete/four.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/1_Linear Regression/Linear Regression Complete/four.png -------------------------------------------------------------------------------- /7_Machine Learning/1_Linear Regression/Linear Regression Complete/one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/1_Linear Regression/Linear Regression Complete/one.png -------------------------------------------------------------------------------- /7_Machine Learning/1_Linear Regression/Linear Regression Complete/q.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/1_Linear Regression/Linear Regression Complete/q.png -------------------------------------------------------------------------------- /7_Machine Learning/1_Linear Regression/Linear Regression Complete/r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/1_Linear Regression/Linear Regression Complete/r.png -------------------------------------------------------------------------------- /7_Machine Learning/1_Linear Regression/Linear Regression Complete/seven.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/1_Linear Regression/Linear Regression Complete/seven.png -------------------------------------------------------------------------------- /7_Machine Learning/1_Linear Regression/Linear Regression Complete/six.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/1_Linear Regression/Linear Regression Complete/six.png -------------------------------------------------------------------------------- /7_Machine Learning/1_Linear Regression/Linear Regression Complete/t.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/1_Linear Regression/Linear Regression Complete/t.png -------------------------------------------------------------------------------- /7_Machine Learning/1_Linear Regression/Linear Regression Complete/three.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/1_Linear Regression/Linear Regression Complete/three.png -------------------------------------------------------------------------------- /7_Machine Learning/1_Linear Regression/Linear Regression Complete/two.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/1_Linear Regression/Linear Regression Complete/two.png -------------------------------------------------------------------------------- /7_Machine Learning/1_Linear Regression/Linear Regression Complete/w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/1_Linear Regression/Linear Regression Complete/w.png -------------------------------------------------------------------------------- /7_Machine Learning/1_Linear Regression/Multiple Linear Regression/e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/1_Linear Regression/Multiple Linear Regression/e.png -------------------------------------------------------------------------------- /7_Machine Learning/1_Linear Regression/Multiple Linear Regression/ee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/1_Linear Regression/Multiple Linear Regression/ee.png -------------------------------------------------------------------------------- /7_Machine Learning/1_Linear Regression/Multiple Linear Regression/q.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/1_Linear Regression/Multiple Linear Regression/q.png -------------------------------------------------------------------------------- /7_Machine Learning/1_Linear Regression/Multiple Linear Regression/rr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/1_Linear Regression/Multiple Linear Regression/rr.png -------------------------------------------------------------------------------- /7_Machine Learning/1_Linear Regression/Multiple Linear Regression/w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/1_Linear Regression/Multiple Linear Regression/w.png -------------------------------------------------------------------------------- /7_Machine Learning/1_Linear Regression/areas.csv: -------------------------------------------------------------------------------- 1 | area 2 | 1000 3 | 1500 4 | 2300 5 | 3540 6 | 4120 7 | 4560 8 | 5490 9 | 3460 10 | 4750 11 | 2300 12 | 9000 13 | 8600 14 | 7100 15 | -------------------------------------------------------------------------------- /7_Machine Learning/1_Linear Regression/different_lines.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/1_Linear Regression/different_lines.JPG -------------------------------------------------------------------------------- /7_Machine Learning/1_Linear Regression/equation.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/1_Linear Regression/equation.PNG -------------------------------------------------------------------------------- /7_Machine Learning/1_Linear Regression/error_equation.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/1_Linear Regression/error_equation.jpg -------------------------------------------------------------------------------- /7_Machine Learning/1_Linear Regression/homeprices.csv: -------------------------------------------------------------------------------- 1 | area,price 2 | 2600,550000 3 | 3000,565000 4 | 3200,610000 5 | 3600,680000 6 | 4000,725000 7 | -------------------------------------------------------------------------------- /7_Machine Learning/1_Linear Regression/homepricetable.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/1_Linear Regression/homepricetable.JPG -------------------------------------------------------------------------------- /7_Machine Learning/1_Linear Regression/linear_equation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/1_Linear Regression/linear_equation.png -------------------------------------------------------------------------------- /7_Machine Learning/1_Linear Regression/scatterplot.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/1_Linear Regression/scatterplot.JPG -------------------------------------------------------------------------------- /7_Machine Learning/2_Logistic Regression/54-multiclass-logistic-regression.ipynb: -------------------------------------------------------------------------------- 1 | {"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.7.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n for filename in filenames:\n print(os.path.join(dirname, filename))\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2022-05-25T15:40:31.770358Z","iopub.execute_input":"2022-05-25T15:40:31.772987Z","iopub.status.idle":"2022-05-25T15:40:31.803381Z","shell.execute_reply.started":"2022-05-25T15:40:31.772850Z","shell.execute_reply":"2022-05-25T15:40:31.802551Z"},"trusted":true},"execution_count":1,"outputs":[]},{"cell_type":"markdown","source":"# Multi class Classification using Logistic Regression\n\n## Digit dataset","metadata":{}},{"cell_type":"code","source":"from sklearn.datasets import load_digits\n\nimport matplotlib.pyplot as plt\nimport seaborn as sns","metadata":{"execution":{"iopub.status.busy":"2022-05-25T15:43:46.468492Z","iopub.execute_input":"2022-05-25T15:43:46.469028Z","iopub.status.idle":"2022-05-25T15:43:47.254161Z","shell.execute_reply.started":"2022-05-25T15:43:46.468983Z","shell.execute_reply":"2022-05-25T15:43:47.253245Z"},"trusted":true},"execution_count":2,"outputs":[]},{"cell_type":"code","source":"digits = load_digits()","metadata":{"execution":{"iopub.status.busy":"2022-05-25T15:44:23.273468Z","iopub.execute_input":"2022-05-25T15:44:23.273864Z","iopub.status.idle":"2022-05-25T15:44:23.378159Z","shell.execute_reply.started":"2022-05-25T15:44:23.273828Z","shell.execute_reply":"2022-05-25T15:44:23.377122Z"},"trusted":true},"execution_count":3,"outputs":[]},{"cell_type":"code","source":"digits.data.shape","metadata":{"execution":{"iopub.status.busy":"2022-05-25T15:44:46.988404Z","iopub.execute_input":"2022-05-25T15:44:46.988777Z","iopub.status.idle":"2022-05-25T15:44:46.997118Z","shell.execute_reply.started":"2022-05-25T15:44:46.988746Z","shell.execute_reply":"2022-05-25T15:44:46.996227Z"},"trusted":true},"execution_count":4,"outputs":[]},{"cell_type":"code","source":"digits.target.shape","metadata":{"execution":{"iopub.status.busy":"2022-05-25T15:49:48.708329Z","iopub.execute_input":"2022-05-25T15:49:48.708722Z","iopub.status.idle":"2022-05-25T15:49:48.714940Z","shell.execute_reply.started":"2022-05-25T15:49:48.708686Z","shell.execute_reply":"2022-05-25T15:49:48.713947Z"},"trusted":true},"execution_count":5,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(20,4))\n\nfor index, (image, label) in enumerate(zip(digits.data[0:5], digits.target[0:5])):\n plt.subplot(1,5, index + 1)\n plt.imshow(np.reshape(image, (8,8)), cmap=plt.cm.gray)\n plt.title('%i\\n' %label, fontsize=20)","metadata":{"execution":{"iopub.status.busy":"2022-05-25T15:56:33.768352Z","iopub.execute_input":"2022-05-25T15:56:33.768754Z","iopub.status.idle":"2022-05-25T15:56:34.365760Z","shell.execute_reply.started":"2022-05-25T15:56:33.768715Z","shell.execute_reply":"2022-05-25T15:56:34.364700Z"},"trusted":true},"execution_count":6,"outputs":[]},{"cell_type":"code","source":"from sklearn.model_selection import train_test_split\n\nxtrain, xtest, ytrain, ytest = train_test_split(digits.data, \n digits.target, \n test_size=0.25, \n random_state=101)","metadata":{"execution":{"iopub.status.busy":"2022-05-25T15:59:51.621088Z","iopub.execute_input":"2022-05-25T15:59:51.621458Z","iopub.status.idle":"2022-05-25T15:59:51.679512Z","shell.execute_reply.started":"2022-05-25T15:59:51.621428Z","shell.execute_reply":"2022-05-25T15:59:51.678789Z"},"trusted":true},"execution_count":7,"outputs":[]},{"cell_type":"markdown","source":"# Logistic regression model","metadata":{}},{"cell_type":"code","source":"from sklearn.linear_model import LogisticRegression\n\nmodel = LogisticRegression()","metadata":{"execution":{"iopub.status.busy":"2022-05-25T16:01:05.168065Z","iopub.execute_input":"2022-05-25T16:01:05.168857Z","iopub.status.idle":"2022-05-25T16:01:05.245562Z","shell.execute_reply.started":"2022-05-25T16:01:05.168816Z","shell.execute_reply":"2022-05-25T16:01:05.244433Z"},"trusted":true},"execution_count":8,"outputs":[]},{"cell_type":"code","source":"model.fit(xtrain,ytrain)","metadata":{"execution":{"iopub.status.busy":"2022-05-25T16:01:23.717704Z","iopub.execute_input":"2022-05-25T16:01:23.718134Z","iopub.status.idle":"2022-05-25T16:01:23.980592Z","shell.execute_reply.started":"2022-05-25T16:01:23.718100Z","shell.execute_reply":"2022-05-25T16:01:23.979584Z"},"trusted":true},"execution_count":9,"outputs":[]},{"cell_type":"code","source":"model.predict(xtest[0].reshape(1,-1))","metadata":{"execution":{"iopub.status.busy":"2022-05-25T16:02:27.921559Z","iopub.execute_input":"2022-05-25T16:02:27.922006Z","iopub.status.idle":"2022-05-25T16:02:27.929006Z","shell.execute_reply.started":"2022-05-25T16:02:27.921972Z","shell.execute_reply":"2022-05-25T16:02:27.928265Z"},"trusted":true},"execution_count":10,"outputs":[]},{"cell_type":"code","source":"model.predict(xtest[0:10])","metadata":{"execution":{"iopub.status.busy":"2022-05-25T16:03:55.677449Z","iopub.execute_input":"2022-05-25T16:03:55.677845Z","iopub.status.idle":"2022-05-25T16:03:55.685210Z","shell.execute_reply.started":"2022-05-25T16:03:55.677814Z","shell.execute_reply":"2022-05-25T16:03:55.684499Z"},"trusted":true},"execution_count":11,"outputs":[]},{"cell_type":"code","source":"predictions = model.predict(xtest)\n\npredictions.shape","metadata":{"execution":{"iopub.status.busy":"2022-05-25T16:04:34.954786Z","iopub.execute_input":"2022-05-25T16:04:34.955317Z","iopub.status.idle":"2022-05-25T16:04:34.976783Z","shell.execute_reply.started":"2022-05-25T16:04:34.955268Z","shell.execute_reply":"2022-05-25T16:04:34.975508Z"},"trusted":true},"execution_count":12,"outputs":[]},{"cell_type":"code","source":"model.score(xtest,ytest)","metadata":{"execution":{"iopub.status.busy":"2022-05-25T16:06:07.522903Z","iopub.execute_input":"2022-05-25T16:06:07.523306Z","iopub.status.idle":"2022-05-25T16:06:07.532236Z","shell.execute_reply.started":"2022-05-25T16:06:07.523272Z","shell.execute_reply":"2022-05-25T16:06:07.531269Z"},"trusted":true},"execution_count":13,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]} -------------------------------------------------------------------------------- /7_Machine Learning/2_Logistic Regression/insurance_data.csv: -------------------------------------------------------------------------------- 1 | age,bought_insurance 2 | 22,0 3 | 25,0 4 | 47,1 5 | 52,0 6 | 46,1 7 | 56,1 8 | 55,0 9 | 60,1 10 | 62,1 11 | 61,1 12 | 18,0 13 | 28,0 14 | 27,0 15 | 29,0 16 | 49,1 17 | 55,1 18 | 25,1 19 | 58,1 20 | 19,0 21 | 18,0 22 | 21,0 23 | 26,0 24 | 40,1 25 | 45,1 26 | 50,1 27 | 54,1 28 | 23,0 -------------------------------------------------------------------------------- /7_Machine Learning/2_Logistic Regression/iris_petal_sepal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/2_Logistic Regression/iris_petal_sepal.png -------------------------------------------------------------------------------- /7_Machine Learning/3_Decision Tree/dt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/3_Decision Tree/dt.png -------------------------------------------------------------------------------- /7_Machine Learning/3_Decision Tree/salaries.csv: -------------------------------------------------------------------------------- 1 | company,job,degree,salary_more_then_100k 2 | google,sales executive,bachelors,0 3 | google,sales executive,masters,0 4 | google,business manager,bachelors,1 5 | google,business manager,masters,1 6 | google,computer programmer,bachelors,0 7 | google,computer programmer,masters,1 8 | abc pharma,sales executive,masters,0 9 | abc pharma,computer programmer,bachelors,0 10 | abc pharma,business manager,bachelors,0 11 | abc pharma,business manager,masters,1 12 | facebook,sales executive,bachelors,1 13 | facebook,sales executive,masters,1 14 | facebook,business manager,bachelors,1 15 | facebook,business manager,masters,1 16 | facebook,computer programmer,bachelors,1 17 | facebook,computer programmer,masters,1 -------------------------------------------------------------------------------- /7_Machine Learning/4_Perceptron/.ipynb_checkpoints/58_Perceptron from scratch-checkpoint.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Perceptron\n", 8 | "\n", 9 | "" 10 | ] 11 | }, 12 | { 13 | "cell_type": "markdown", 14 | "metadata": {}, 15 | "source": [ 16 | "# Mathematically\n", 17 | "\n", 18 | "" 19 | ] 20 | }, 21 | { 22 | "cell_type": "code", 23 | "execution_count": 4, 24 | "metadata": {}, 25 | "outputs": [], 26 | "source": [ 27 | "import numpy as np\n", 28 | "\n", 29 | "class Perceptron:\n", 30 | " \n", 31 | " # init - initialize perceptron function values\n", 32 | " def __init__(self, learning_rate=0.01, n_iters=1000):\n", 33 | " self.learning_rate = learning_rate\n", 34 | " self.n_iters = n_iters\n", 35 | " self.activation_function = self.unit_step_function\n", 36 | " self.weights = None\n", 37 | " self.bias = None\n", 38 | " \n", 39 | " # fit\n", 40 | " def fit(self, x, y):\n", 41 | " n_samples, n_features = x.shape\n", 42 | " \n", 43 | " # initialize parameters\n", 44 | " self.weights = np.zeros(n_features)\n", 45 | " self.bias = 0\n", 46 | " \n", 47 | " y_ = np.array([1 if i > 0 else 0 for i in y])\n", 48 | " \n", 49 | " for _ in range(self.n_iters):\n", 50 | " \n", 51 | " for idx, x_i in enumerate(x):\n", 52 | " \n", 53 | " # implement linear equation\n", 54 | " linear_output = np.dot(x_i, self.weights) + self.bias\n", 55 | " # pass it into activation function\n", 56 | " yprediction = self.activation_function(linear_output)\n", 57 | " \n", 58 | " # perceptron update rule\n", 59 | " update = self.learning_rate * (y_[idx] - yprediction)\n", 60 | " \n", 61 | " self.weights = update * x_i\n", 62 | " self.bias += update\n", 63 | " \n", 64 | " # predict\n", 65 | " def predict(self, x):\n", 66 | " linear_output = np.dot(x, self.weights) + self.bias\n", 67 | " yprediction = self.activation_function(linear_output)\n", 68 | " \n", 69 | " return yprediction\n", 70 | " \n", 71 | " # activation function - unit step\n", 72 | " def unit_step_function(self, x):\n", 73 | " return np.where(x>=0, 1, 0)" 74 | ] 75 | }, 76 | { 77 | "cell_type": "code", 78 | "execution_count": 1, 79 | "metadata": {}, 80 | "outputs": [ 81 | { 82 | "name": "stdout", 83 | "output_type": "stream", 84 | "text": [ 85 | "[0. 0. 0.]\n" 86 | ] 87 | } 88 | ], 89 | "source": [ 90 | "import numpy as np\n", 91 | "\n", 92 | "print(np.zeros(3))" 93 | ] 94 | }, 95 | { 96 | "cell_type": "code", 97 | "execution_count": 5, 98 | "metadata": {}, 99 | "outputs": [], 100 | "source": [ 101 | "p = Perceptron()" 102 | ] 103 | }, 104 | { 105 | "cell_type": "code", 106 | "execution_count": null, 107 | "metadata": {}, 108 | "outputs": [], 109 | "source": [] 110 | } 111 | ], 112 | "metadata": { 113 | "kernelspec": { 114 | "display_name": "Python 3", 115 | "language": "python", 116 | "name": "python3" 117 | }, 118 | "language_info": { 119 | "codemirror_mode": { 120 | "name": "ipython", 121 | "version": 3 122 | }, 123 | "file_extension": ".py", 124 | "mimetype": "text/x-python", 125 | "name": "python", 126 | "nbconvert_exporter": "python", 127 | "pygments_lexer": "ipython3", 128 | "version": "3.7.6" 129 | } 130 | }, 131 | "nbformat": 4, 132 | "nbformat_minor": 4 133 | } 134 | -------------------------------------------------------------------------------- /7_Machine Learning/4_Perceptron/58_Perceptron from scratch.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Perceptron\n", 8 | "\n", 9 | "" 10 | ] 11 | }, 12 | { 13 | "cell_type": "markdown", 14 | "metadata": {}, 15 | "source": [ 16 | "# Mathematically\n", 17 | "\n", 18 | "" 19 | ] 20 | }, 21 | { 22 | "cell_type": "code", 23 | "execution_count": 4, 24 | "metadata": {}, 25 | "outputs": [], 26 | "source": [ 27 | "import numpy as np\n", 28 | "\n", 29 | "class Perceptron:\n", 30 | " \n", 31 | " # init - initialize perceptron function values\n", 32 | " def __init__(self, learning_rate=0.01, n_iters=1000):\n", 33 | " self.learning_rate = learning_rate\n", 34 | " self.n_iters = n_iters\n", 35 | " self.activation_function = self.unit_step_function\n", 36 | " self.weights = None\n", 37 | " self.bias = None\n", 38 | " \n", 39 | " # fit\n", 40 | " def fit(self, x, y):\n", 41 | " n_samples, n_features = x.shape\n", 42 | " \n", 43 | " # initialize parameters\n", 44 | " self.weights = np.zeros(n_features)\n", 45 | " self.bias = 0\n", 46 | " \n", 47 | " y_ = np.array([1 if i > 0 else 0 for i in y])\n", 48 | " \n", 49 | " for _ in range(self.n_iters):\n", 50 | " \n", 51 | " for idx, x_i in enumerate(x):\n", 52 | " \n", 53 | " # implement linear equation\n", 54 | " linear_output = np.dot(x_i, self.weights) + self.bias\n", 55 | " # pass it into activation function\n", 56 | " yprediction = self.activation_function(linear_output)\n", 57 | " \n", 58 | " # perceptron update rule\n", 59 | " update = self.learning_rate * (y_[idx] - yprediction)\n", 60 | " \n", 61 | " self.weights = update * x_i\n", 62 | " self.bias += update\n", 63 | " \n", 64 | " # predict\n", 65 | " def predict(self, x):\n", 66 | " linear_output = np.dot(x, self.weights) + self.bias\n", 67 | " yprediction = self.activation_function(linear_output)\n", 68 | " \n", 69 | " return yprediction\n", 70 | " \n", 71 | " # activation function - unit step\n", 72 | " def unit_step_function(self, x):\n", 73 | " return np.where(x>=0, 1, 0)" 74 | ] 75 | }, 76 | { 77 | "cell_type": "code", 78 | "execution_count": 1, 79 | "metadata": {}, 80 | "outputs": [ 81 | { 82 | "name": "stdout", 83 | "output_type": "stream", 84 | "text": [ 85 | "[0. 0. 0.]\n" 86 | ] 87 | } 88 | ], 89 | "source": [ 90 | "import numpy as np\n", 91 | "\n", 92 | "print(np.zeros(3))" 93 | ] 94 | }, 95 | { 96 | "cell_type": "code", 97 | "execution_count": 5, 98 | "metadata": {}, 99 | "outputs": [], 100 | "source": [ 101 | "p = Perceptron()" 102 | ] 103 | }, 104 | { 105 | "cell_type": "code", 106 | "execution_count": null, 107 | "metadata": {}, 108 | "outputs": [], 109 | "source": [] 110 | } 111 | ], 112 | "metadata": { 113 | "kernelspec": { 114 | "display_name": "Python 3", 115 | "language": "python", 116 | "name": "python3" 117 | }, 118 | "language_info": { 119 | "codemirror_mode": { 120 | "name": "ipython", 121 | "version": 3 122 | }, 123 | "file_extension": ".py", 124 | "mimetype": "text/x-python", 125 | "name": "python", 126 | "nbconvert_exporter": "python", 127 | "pygments_lexer": "ipython3", 128 | "version": "3.7.6" 129 | } 130 | }, 131 | "nbformat": 4, 132 | "nbformat_minor": 4 133 | } 134 | -------------------------------------------------------------------------------- /7_Machine Learning/4_Perceptron/biologicalperceptron.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/4_Perceptron/biologicalperceptron.png -------------------------------------------------------------------------------- /7_Machine Learning/4_Perceptron/singlelayerper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/4_Perceptron/singlelayerper.png -------------------------------------------------------------------------------- /7_Machine Learning/5_Gradient Descent/gd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/5_Gradient Descent/gd.png -------------------------------------------------------------------------------- /7_Machine Learning/5_Gradient Descent/gd1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/5_Gradient Descent/gd1.png -------------------------------------------------------------------------------- /7_Machine Learning/5_Gradient Descent/gd2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/7_Machine Learning/5_Gradient Descent/gd2.png -------------------------------------------------------------------------------- /8_Major Project/.ipynb_checkpoints/59_60_61_62_63_Major Project Basics-checkpoint.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Yolo Object Detection from scratch\n", 8 | "\n", 9 | "#### Deep Learning Algorithms\n", 10 | "\n", 11 | "#### Computer Vision" 12 | ] 13 | }, 14 | { 15 | "cell_type": "markdown", 16 | "metadata": {}, 17 | "source": [ 18 | "Residual Blocks\n", 19 | "\n", 20 | "Skip connections\n", 21 | "\n", 22 | "Upsampling\n", 23 | "\n", 24 | "Object detection\n", 25 | "\n", 26 | "Bounding box Regression\n", 27 | "\n", 28 | "IoU - Intersection Over Union\n", 29 | "\n", 30 | "Non-maximum suppression\n" 31 | ] 32 | }, 33 | { 34 | "cell_type": "code", 35 | "execution_count": null, 36 | "metadata": {}, 37 | "outputs": [], 38 | "source": [ 39 | "Basic PyTorch usage" 40 | ] 41 | }, 42 | { 43 | "cell_type": "code", 44 | "execution_count": null, 45 | "metadata": {}, 46 | "outputs": [], 47 | "source": [ 48 | "day 60 \n", 49 | "\n", 50 | "working on yolo folder\n" 51 | ] 52 | }, 53 | { 54 | "cell_type": "code", 55 | "execution_count": null, 56 | "metadata": {}, 57 | "outputs": [], 58 | "source": [ 59 | "day 61\n", 60 | "\n", 61 | "extracting information from config file\n" 62 | ] 63 | }, 64 | { 65 | "cell_type": "code", 66 | "execution_count": null, 67 | "metadata": {}, 68 | "outputs": [], 69 | "source": [ 70 | "day 62\n", 71 | "\n", 72 | "creating all layers and add them in modules list\n", 73 | "\n", 74 | "test the code" 75 | ] 76 | }, 77 | { 78 | "cell_type": "code", 79 | "execution_count": null, 80 | "metadata": {}, 81 | "outputs": [], 82 | "source": [ 83 | "day 63\n", 84 | "\n", 85 | "implement the network architecture of yolo\n", 86 | "\n", 87 | "defining a network\n", 88 | "\n", 89 | "forward pass\n", 90 | "1. calulate the output\n", 91 | "2. transform the output detection feature maps\n", 92 | "\n" 93 | ] 94 | } 95 | ], 96 | "metadata": { 97 | "kernelspec": { 98 | "display_name": "Python 3", 99 | "language": "python", 100 | "name": "python3" 101 | }, 102 | "language_info": { 103 | "codemirror_mode": { 104 | "name": "ipython", 105 | "version": 3 106 | }, 107 | "file_extension": ".py", 108 | "mimetype": "text/x-python", 109 | "name": "python", 110 | "nbconvert_exporter": "python", 111 | "pygments_lexer": "ipython3", 112 | "version": "3.7.6" 113 | } 114 | }, 115 | "nbformat": 4, 116 | "nbformat_minor": 4 117 | } 118 | -------------------------------------------------------------------------------- /8_Major Project/59_60_61_62_63_Major Project Basics.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Yolo Object Detection from scratch\n", 8 | "\n", 9 | "#### Deep Learning Algorithms\n", 10 | "\n", 11 | "#### Computer Vision" 12 | ] 13 | }, 14 | { 15 | "cell_type": "markdown", 16 | "metadata": {}, 17 | "source": [ 18 | "Residual Blocks\n", 19 | "\n", 20 | "Skip connections\n", 21 | "\n", 22 | "Upsampling\n", 23 | "\n", 24 | "Object detection\n", 25 | "\n", 26 | "Bounding box Regression\n", 27 | "\n", 28 | "IoU - Intersection Over Union\n", 29 | "\n", 30 | "Non-maximum suppression\n" 31 | ] 32 | }, 33 | { 34 | "cell_type": "code", 35 | "execution_count": null, 36 | "metadata": {}, 37 | "outputs": [], 38 | "source": [ 39 | "Basic PyTorch usage" 40 | ] 41 | }, 42 | { 43 | "cell_type": "code", 44 | "execution_count": null, 45 | "metadata": {}, 46 | "outputs": [], 47 | "source": [ 48 | "day 60 \n", 49 | "\n", 50 | "working on yolo folder\n" 51 | ] 52 | }, 53 | { 54 | "cell_type": "code", 55 | "execution_count": null, 56 | "metadata": {}, 57 | "outputs": [], 58 | "source": [ 59 | "day 61\n", 60 | "\n", 61 | "extracting information from config file\n" 62 | ] 63 | }, 64 | { 65 | "cell_type": "code", 66 | "execution_count": null, 67 | "metadata": {}, 68 | "outputs": [], 69 | "source": [ 70 | "day 62\n", 71 | "\n", 72 | "creating all layers and add them in modules list\n", 73 | "\n", 74 | "test the code" 75 | ] 76 | }, 77 | { 78 | "cell_type": "code", 79 | "execution_count": null, 80 | "metadata": {}, 81 | "outputs": [], 82 | "source": [ 83 | "day 63\n", 84 | "\n", 85 | "implement the network architecture of yolo\n", 86 | "\n", 87 | "defining a network\n", 88 | "\n", 89 | "forward pass\n", 90 | "1. calulate the output\n", 91 | "2. transform the output detection feature maps\n", 92 | "\n" 93 | ] 94 | } 95 | ], 96 | "metadata": { 97 | "kernelspec": { 98 | "display_name": "Python 3", 99 | "language": "python", 100 | "name": "python3" 101 | }, 102 | "language_info": { 103 | "codemirror_mode": { 104 | "name": "ipython", 105 | "version": 3 106 | }, 107 | "file_extension": ".py", 108 | "mimetype": "text/x-python", 109 | "name": "python", 110 | "nbconvert_exporter": "python", 111 | "pygments_lexer": "ipython3", 112 | "version": "3.7.6" 113 | } 114 | }, 115 | "nbformat": 4, 116 | "nbformat_minor": 4 117 | } 118 | -------------------------------------------------------------------------------- /8_Major Project/yolo/darknet.py: -------------------------------------------------------------------------------- 1 | from __future__ import division 2 | from queue import Empty 3 | 4 | import torch 5 | import torch.nn as nn 6 | import torch.nn.functional as F 7 | from torch.autograd import Variable 8 | import numpy as np 9 | 10 | # second section 11 | 12 | class Darknet(nn.Module): 13 | def __init__(self, cfgfile): 14 | super(Darknet, self).__init__() 15 | self.blocks = parse_cfg(cfgfile) 16 | self.net_info, self.module_list = create_modules(self.blocks) 17 | 18 | def forward(self, x, CUDA): 19 | modules = self.blocks[1:] 20 | outputs = {} # cache the output for the route layer 21 | 22 | write = 0 23 | for i, module in enumerate(modules): 24 | module_type = (module['type']) 25 | 26 | if module_type == 'convolutional' or module_type == 'upsample': 27 | x = self.module_list[i](x) 28 | elif module_type == 'route': 29 | layers = module['layers'] 30 | layers = [int(a) for a in layers] 31 | 32 | if (layers[0] > 0): 33 | layers[0] = layers[0] - i 34 | 35 | if len(layers) == 1: 36 | x = outputs[i + (layers[0])] 37 | else: 38 | if (layers[1] > 0): 39 | layers[1] = layers[1] - i 40 | 41 | map1 = outputs[i + layers[0]] 42 | map2 = outputs[i + layers[1]] 43 | 44 | x = torch.cat((map1, map2), 1) 45 | elif module_type == 'shortcut': 46 | from_ = int(module['from']) 47 | x = outputs[i-1] + outputs[i + from_] 48 | 49 | 50 | 51 | 52 | 53 | # first section 54 | class EmptyLayer(nn.Module): 55 | def __init__(self): 56 | super(EmptyLayer, self).__init__() 57 | 58 | class DetectionLayer(nn.Module): 59 | def __init__(self, anchors): 60 | super(DetectionLayer, self).__init__() 61 | self.anchors = anchors 62 | 63 | # funtion for configurtion file 64 | 65 | def parse_cfg(cfgfile): 66 | 67 | file=open(cfgfile, 'r') 68 | lines = file.read().split('\n') 69 | lines = [x for x in lines if len(x) > 0] 70 | 71 | lines = [x for x in lines if x[0] != '#'] 72 | lines = [x.rstrip().lstrip() for x in lines] 73 | 74 | block = {} 75 | blocks = [] 76 | 77 | for line in lines: 78 | if line[0] == '[': 79 | if len(block) != 0: 80 | blocks.append(block) 81 | block = {} 82 | block['type'] = line[1:-1].rstrip() 83 | else: 84 | key, value = line.split('=') 85 | block[key.rstrip()] = value.lstrip() 86 | blocks.append(block) 87 | 88 | return blocks 89 | 90 | # creating building blocks 91 | 92 | def create_modules(blocks): 93 | net_info = blocks[0] # get the information about the input and preprocess it 94 | module_list = nn.ModuleList() 95 | 96 | prev_filters = 3 # rgb channels 97 | output_filters = [] # append all the numbers of output filters of each block 98 | 99 | for index, x in enumerate(blocks[1:]): 100 | module = nn.Sequential() # it executes a number of nn.module objects sequentially 101 | 102 | if (x['type'] == 'convolutional'): 103 | activation = x['activation'] 104 | 105 | try: 106 | batch_normalize = int(x['batch_normalize']) 107 | bias = False 108 | except: 109 | batch_normalize = 0 110 | bias = True 111 | 112 | filters = int(x['filters']) 113 | padding = int(x['pad']) 114 | kernel_size = int(x['size']) 115 | stride = int(x['stride']) 116 | 117 | if padding: 118 | pad = (kernel_size - 1) // 2 119 | else: 120 | pad = 0 121 | 122 | # adding a convolutional layer 123 | 124 | conv = nn.Conv2d(prev_filters, filters, kernel_size, stride, bias = bias) 125 | module.add_module("Conv_{0}".format(index), conv) 126 | 127 | # adding a batch norm layer 128 | if batch_normalize: 129 | bn = nn.BatchNorm2d(filters) 130 | module.add_module("Batch_norm_{0}".format(index), bn) 131 | 132 | # check activation function 133 | # linear or leakyrelu 134 | if activation == 'leaky': 135 | activn = nn.LeakyReLU(0.1, inplace=True) 136 | module.add_module("leaky_{0}".format(index), activn) 137 | 138 | # check if it is upsample 139 | # we will use bilinear2dUpsample 140 | elif (x['type'] == 'upsample'): 141 | stride = int(x['stride']) 142 | upsample = nn.Upsample(scale_factor= 2, mode='bilinear') 143 | module.add_module("upsample_{0}".format(index), upsample) 144 | 145 | # if it is a route layer 146 | elif (x['type'] == 'route'): 147 | x['layers'] = x['layers'].split(',') 148 | 149 | #start of route 150 | start = int(x['layers'][0]) 151 | 152 | #end 153 | try: 154 | end = int(x['layers'][1]) 155 | except: 156 | end = 0 157 | 158 | # positive annotations 159 | if start > 0: 160 | start = start - index 161 | if end > 0: 162 | end = end - index 163 | 164 | route = EmptyLayer() 165 | module.add_module("route_{0}".format(index), route) 166 | 167 | if end < 0: 168 | filters = output_filters[index + start] + output_filters[index + end] 169 | else: 170 | filters = output_filters[index + start] 171 | 172 | # shortcut corresponds to skip connection 173 | 174 | elif (x['type'] == 'shortcut'): 175 | shortcut = EmptyLayer() 176 | module.add_module('shortcut_{0}'.format(index), shortcut) 177 | 178 | # yolo is the detection layer 179 | elif (x['type'] == 'yolo'): 180 | mask = x['mask'].split(',') 181 | mask = [int(x) for x in mask] 182 | 183 | anchors = x['anchors'].split(',') 184 | anchors = [int(a) for a in anchors] 185 | 186 | anchors = [(anchors[i], anchors[i+1]) for i in range(0, len(anchors), 2)] 187 | anchors = [anchors[i] for i in mask] 188 | 189 | detection = DetectionLayer(anchors) 190 | module.add_module("detection_{0}".format(index), detection) 191 | 192 | module_list.append(module) 193 | prev_filters = filters 194 | output_filters.append(filters) 195 | 196 | return (net_info, module_list) 197 | 198 | blocks = parse_cfg('cfg/yolov3.cfg') 199 | 200 | print(create_modules(blocks)) 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | -------------------------------------------------------------------------------- /8_Major Project/yolo/something.txt: -------------------------------------------------------------------------------- 1 | cfg folder 2 | wget https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/yolov3.cfg 3 | 4 | # create a file name darknet.py 5 | darknet is the name of the architecture of yolo. 6 | 7 | 8 | cfg file 9 | 10 | 5 types of layers are there in yolo 11 | 12 | epoch 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /8_Major Project/yolo/util.py: -------------------------------------------------------------------------------- 1 | from __future__ import division 2 | 3 | import torch 4 | import torch.nn as nn 5 | import torch.nn.functional as F 6 | from torch.autograd import Variable 7 | import numpy as np 8 | import cv2 9 | 10 | def predict_transform(prediction, inp_dim, anchors, num_classes, CUDA=True): 11 | batch_size = prediction.size(0) 12 | stride = inp_dim // prediction.size(2) 13 | grid_size = inp_dim // stride 14 | bbox_attrs = 5 + num_classes 15 | num_anchors = len(anchors) 16 | 17 | prediction = 18 | -------------------------------------------------------------------------------- /Data Science & ML Full Stack Roadmap.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/Data Science & ML Full Stack Roadmap.pdf -------------------------------------------------------------------------------- /images/Data-Science-and-ML-Batch.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/images/Data-Science-and-ML-Batch.jpeg -------------------------------------------------------------------------------- /images/a-robot-with-lights-on-jx5pkvw0.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishpatel26/Data-Science-ML-Full-Stack/17287c5da16df9f11edf41f9ef6c368650738674/images/a-robot-with-lights-on-jx5pkvw0.jpeg --------------------------------------------------------------------------------