{"cells":[{"metadata":{"_uuid":"59b0c358c1b970465030634a7830ad5863371f89"},"cell_type":"markdown","source":"# Data Science with Python - Awesome Tutorials and Fuel Efficiency Prediction with Regression using The Auto MPG dataset\n\n    This kernel contains Prediction of Fuel Efficiency - Regression using The Auto MPG dataset and a curated list of Python tutorials for Data Science, NLP and Machine Learning.\n\n> #### **Credits**: Thanks to **TensorFlow Team**, **Ujjwal Karn** and other contributers for such wonderful curated collections!\n\n### Here are some of *my kernel notebooks* for **Machine Learning and Data Science** as follows, ***Upvote*** them if you *like* them\n\n> * [Awesome Deep Learning Basics and Resources](https://www.kaggle.com/arunkumarramanan/awesome-deep-learning-resources)\n> * [Data Science with R - Awesome Tutorials](https://www.kaggle.com/arunkumarramanan/data-science-with-r-awesome-tutorials)\n> * [Data Science and Machine Learning Cheetcheets](https://www.kaggle.com/arunkumarramanan/data-science-and-machine-learning-cheatsheets)\n> * [Awesome ML Frameworks and MNIST Classification](https://www.kaggle.com/arunkumarramanan/awesome-machine-learning-ml-frameworks)\n> * [Awesome Data Science for Beginners with Titanic Exploration](https://kaggle.com/arunkumarramanan/awesome-data-science-for-beginners)\n> * [Tensorflow Tutorial and House Price Prediction](https://www.kaggle.com/arunkumarramanan/tensorflow-tutorial-and-examples)\n> * [Practical Machine Learning with PyTorch](https://www.kaggle.com/arunkumarramanan/practical-machine-learning-with-pytorch)\n> * [Data Scientist's Toolkits - Awesome Data Science Resources](https://www.kaggle.com/arunkumarramanan/data-scientist-s-toolkits-awesome-ds-resources)\n> * [Awesome Computer Vision Resources (TBU)](https://www.kaggle.com/arunkumarramanan/awesome-computer-vision-resources-to-be-updated)\n> * [Machine Learning Engineer's Toolkit with Roadmap](https://www.kaggle.com/arunkumarramanan/machine-learning-engineer-s-toolkit-with-roadmap) \n> * [Awesome TensorFlow and PyTorch Resources](https://www.kaggle.com/arunkumarramanan/awesome-tensorflow-and-pytorch-resources)\n> * [Hands-on ML with scikit-learn and TensorFlow](https://www.kaggle.com/arunkumarramanan/hands-on-ml-with-scikit-learn-and-tensorflow)\n> * [Awesome Data Science IPython Notebooks](https://www.kaggle.com/arunkumarramanan/awesome-data-science-ipython-notebooks)\n> * [Machine Learning and Deep Learning - Awesome Tutorials](https://www.kaggle.com/arunkumarramanan/awesome-deep-learning-ml-tutorials)\n> * [Data Science with Python - Awesome Tutorials](https://www.kaggle.com/arunkumarramanan/data-science-with-python-awesome-tutorials)"},{"metadata":{"_uuid":"c9a7082d6a3ac88ec3ea2323006916f638cc739c"},"cell_type":"markdown","source":"# Fuel Efficiency Prediction - Regression using The Auto MPG dataset\n\nIn a *regression* problem, we aim to predict the output of a continuous value, like a price or a probability. Contrast this with a *classification* problem, where we aim to select a class from a list of classes (for example, where a picture contains an apple or an orange, recognizing which fruit is in the picture).\n\nThis notebook uses the classic [Auto MPG](https://archive.ics.uci.edu/ml/datasets/auto+mpg) Dataset and builds a model to predict the fuel efficiency of late-1970s and early 1980s automobiles. To do this, we'll provide the model with a description of many automobiles from that time period. This description includes attributes like: cylinders, displacement, horsepower, and weight.\n\nThis example uses the `tf.keras` API, see [this guide](https://www.tensorflow.org/guide/keras) for details."},{"metadata":{"trusted":true,"_uuid":"b79a4df29be88fd555411988f39356550f22c78b"},"cell_type":"code","source":"# Use seaborn for pairplot\n!pip install seaborn","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"57dff06676df6531663476fe8abe73a6416dd4ab"},"cell_type":"code","source":"from __future__ import absolute_import, division, print_function\n\nimport pathlib\n\nimport matplotlib.pyplot as plt\nimport pandas as pd\nimport seaborn as sns\n\nimport tensorflow as tf\nfrom tensorflow import keras\nfrom tensorflow.keras import layers\n\nprint(tf.__version__)","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"440bf09d1ea90c3c5eec073f5181eb0ef659c02a"},"cell_type":"markdown","source":"## The Auto MPG dataset\n\nThe dataset is available from the [UCI Machine Learning Repository](https://archive.ics.uci.edu/ml/).\n\n"},{"metadata":{"_uuid":"5324af50cfee7229188e022697507afa51e29d54"},"cell_type":"markdown","source":"### Get the data\nFirst download the dataset."},{"metadata":{"trusted":true,"_uuid":"28381f5c1f618e32b86640c5ca9869f9d3b81c71"},"cell_type":"code","source":"dataset_path = keras.utils.get_file(\"auto-mpg.data\", \"https://archive.ics.uci.edu/ml/machine-learning-databases/auto-mpg/auto-mpg.data\")\ndataset_path","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"047f2854387f15f2c2cccaeb8ca6e88308a12c1f"},"cell_type":"markdown","source":"Import it using pandas"},{"metadata":{"trusted":true,"_uuid":"a5301c80c0556872ca4e1c644471b1abfea36af0"},"cell_type":"code","source":"column_names = ['MPG','Cylinders','Displacement','Horsepower','Weight',\n                'Acceleration', 'Model Year', 'Origin'] \nraw_dataset = pd.read_csv(dataset_path, names=column_names,\n                      na_values = \"?\", comment='\\t',\n                      sep=\" \", skipinitialspace=True)\n\ndataset = raw_dataset.copy()\ndataset.tail()","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"17634257775015ef92b056738aee673f6e036c20"},"cell_type":"markdown","source":"### Clean the data\n\nThe dataset contains a few unknown values. "},{"metadata":{"trusted":true,"_uuid":"4a9975e6e7b454863575ca5f6d9d2e332675caa6"},"cell_type":"code","source":"dataset.isna().sum()","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"0793cc2038d8dcc9be1ef649bd8706e14187a97f"},"cell_type":"markdown","source":"To keep this initial tutorial simple drop those rows. "},{"metadata":{"trusted":true,"_uuid":"073249107d9bd407d82e9bb098d8ee62ebd8cc11"},"cell_type":"code","source":"dataset = dataset.dropna()","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"fcb3fa5830ff78ab45b9cd73e206620f348e068b"},"cell_type":"markdown","source":"The `\"Origin\"` column is really categorical, not numeric. So convert that to a one-hot:"},{"metadata":{"trusted":true,"_uuid":"89bf252c196d31067dbdd5461dc45d9b35242e7c"},"cell_type":"code","source":"origin = dataset.pop('Origin')","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"8b3e5b9f527d22e2f71e80efed6a9fc14db7d022"},"cell_type":"code","source":"dataset['USA'] = (origin == 1)*1.0\ndataset['Europe'] = (origin == 2)*1.0\ndataset['Japan'] = (origin == 3)*1.0\ndataset.tail()","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"9dbf360f32196ce48a671d1cbbca8a42073c59b7"},"cell_type":"markdown","source":"### Split the data into train and test\n\nNow split the dataset into a training set and a test set.\n\nWe will use the test set in the final evaluation of our model."},{"metadata":{"trusted":true,"_uuid":"98d8b1ab383c0b3589e0590d724f5746e218e47e"},"cell_type":"code","source":"train_dataset = dataset.sample(frac=0.8,random_state=0)\ntest_dataset = dataset.drop(train_dataset.index)","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"f298a16b406377d00ad2aa865189b078b0a85b0e"},"cell_type":"markdown","source":"### Inspect the data\n\nHave a quick look at the joint distribution of a few pairs of columns from the training set."},{"metadata":{"trusted":true,"_uuid":"8ab335106c5363342d200001f5c4dcccddf7691a"},"cell_type":"code","source":"sns.pairplot(train_dataset[[\"MPG\", \"Cylinders\", \"Displacement\", \"Weight\"]], diag_kind=\"kde\")","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"ef1b2b6a9b5106f6ec934dd89a2c1ee02c9333fa"},"cell_type":"markdown","source":"Also look at the overall statistics:"},{"metadata":{"trusted":true,"_uuid":"829409b156f0f4a0c2effc1beedd590cea5eced2"},"cell_type":"code","source":"train_stats = train_dataset.describe()\ntrain_stats.pop(\"MPG\")\ntrain_stats = train_stats.transpose()\ntrain_stats","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"02c015e4759f6c3a6f0c3ddc8e32e84b08170a46"},"cell_type":"markdown","source":"### Split features from labels\n\nSeparate the target value, or \"label\", from the features. This label is the value that you will train the model to predict."},{"metadata":{"trusted":true,"_uuid":"2075f67902510379075b04915c0c384299ea186a"},"cell_type":"code","source":"train_labels = train_dataset.pop('MPG')\ntest_labels = test_dataset.pop('MPG')","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"038fe2f410ecdfe7e7a84c99b50b5b1c62ae1510"},"cell_type":"markdown","source":"### Normalize the data\n\nLook again at the `train_stats` block above and note how different the ranges of each feature are."},{"metadata":{"_uuid":"70233601abd4c87f24557619081771ece04a216c"},"cell_type":"markdown","source":"It is good practice to normalize features that use different scales and ranges. Although the model *might* converge without feature normalization, it makes training more difficult, and it makes the resulting model dependent on the choice of units used in the input. \n\nNote: Although we intentionally generate these statistics from only the training dataset, these statistics will also be used to normalize the test dataset. We need to do that to project the test dataset into the same distribution that the model has been trained on."},{"metadata":{"trusted":true,"_uuid":"04e2505336d8ed3b0bf078cd8f472e508bd054f0"},"cell_type":"code","source":"def norm(x):\n  return (x - train_stats['mean']) / train_stats['std']\nnormed_train_data = norm(train_dataset)\nnormed_test_data = norm(test_dataset)","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"af41691bfe49f74b7e08d6b6d7d0014833594167"},"cell_type":"markdown","source":"This normalized data is what we will use to train the model.\n\nCaution: The statistics used to normalize the inputs here (mean and standard deviation) need to be applied to any other data that is fed to the model, along with the one-hot encoding that we did earlier.  That includes the test set as well as live data when the model is used in production."},{"metadata":{"_uuid":"30b94b259fb74b518cca5e856c0a032fa30e0748"},"cell_type":"markdown","source":"## The model\n\n### Build the model\n\nLet's build our model. Here, we'll use a `Sequential` model with two densely connected hidden layers, and an output layer that returns a single, continuous value. The model building steps are wrapped in a function, `build_model`, since we'll create a second model, later on."},{"metadata":{"trusted":true,"_uuid":"d00971d89f3935eef894b74cd358046d30f7feaf"},"cell_type":"code","source":"def build_model():\n  model = keras.Sequential([\n    layers.Dense(64, activation=tf.nn.relu, input_shape=[len(train_dataset.keys())]),\n    layers.Dense(64, activation=tf.nn.relu),\n    layers.Dense(1)\n  ])\n\n  optimizer = tf.keras.optimizers.RMSprop(0.001)\n\n  model.compile(loss='mean_squared_error',\n                optimizer=optimizer,\n                metrics=['mean_absolute_error', 'mean_squared_error'])\n  return model","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"2f5f41213406c477a69869960b79d5fc829d0930"},"cell_type":"code","source":"model = build_model()","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"c7fdc42aa82006520cb6df9a4e910ecb295ef31e"},"cell_type":"markdown","source":"### Inspect the model\n\nUse the `.summary` method to print a simple description of the model"},{"metadata":{"trusted":true,"_uuid":"c95eaa77059ce243d37faa1b20668355d911039b"},"cell_type":"code","source":"model.summary()","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"9091b47d58229be47056c9201bd895c4acaab5b4"},"cell_type":"markdown","source":"\nNow try out the model. Take a batch of `10` examples from the training data and call `model.predict` on it."},{"metadata":{"trusted":true,"_uuid":"17633c91ccfb3e5e69ba5f872232a941f1cac609"},"cell_type":"code","source":"example_batch = normed_train_data[:10]\nexample_result = model.predict(example_batch)\nexample_result","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"397bafb5b96bf166fbda5f53c5e52acc6b868d7a"},"cell_type":"markdown","source":"It seems to be working, and it produces a result of the expected shape and type."},{"metadata":{"_uuid":"38b32fc76133ffe88de56195a8de000cd3afd836"},"cell_type":"markdown","source":"### Train the model\n\nTrain the model for 1000 epochs, and record the training and validation accuracy in the `history` object."},{"metadata":{"trusted":true,"_uuid":"bb853dbd4263a17ef0d2208c63ab9a1e6bc57bac"},"cell_type":"code","source":"# Display training progress by printing a single dot for each completed epoch\nclass PrintDot(keras.callbacks.Callback):\n  def on_epoch_end(self, epoch, logs):\n    if epoch % 100 == 0: print('')\n    print('.', end='')\n\nEPOCHS = 1000\n\nhistory = model.fit(\n  normed_train_data, train_labels,\n  epochs=EPOCHS, validation_split = 0.2, verbose=0,\n  callbacks=[PrintDot()])","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"0337ba25d5cf56879dca639345ad0d6ab3f98a43"},"cell_type":"markdown","source":"Visualize the model's training progress using the stats stored in the `history` object."},{"metadata":{"trusted":true,"_uuid":"171a7335ceb6c0302c6235bb61b036c51f0a6117"},"cell_type":"code","source":"hist = pd.DataFrame(history.history)\nhist['epoch'] = history.epoch\nhist.tail()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"93a599f0e333949a29f480e9ea6c1ded277e928d"},"cell_type":"code","source":"def plot_history(history):\n  hist = pd.DataFrame(history.history)\n  hist['epoch'] = history.epoch\n  \n  plt.figure()\n  plt.xlabel('Epoch')\n  plt.ylabel('Mean Abs Error [MPG]')\n  plt.plot(hist['epoch'], hist['mean_absolute_error'],\n           label='Train Error')\n  plt.plot(hist['epoch'], hist['val_mean_absolute_error'],\n           label = 'Val Error')\n  plt.ylim([0,5])\n  plt.legend()\n  \n  plt.figure()\n  plt.xlabel('Epoch')\n  plt.ylabel('Mean Square Error [$MPG^2$]')\n  plt.plot(hist['epoch'], hist['mean_squared_error'],\n           label='Train Error')\n  plt.plot(hist['epoch'], hist['val_mean_squared_error'],\n           label = 'Val Error')\n  plt.ylim([0,20])\n  plt.legend()\n  plt.show()\n\n\nplot_history(history)","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"d488b81d6659c1f5693350b2019eef6f79e06337"},"cell_type":"markdown","source":"This graph shows little improvement, or even degradation in the validation error after about 100 epochs. Let's update the `model.fit` call to automatically stop training when the validation score doesn't improve. We'll use an *EarlyStopping callback* that tests a training condition for  every epoch. If a set amount of epochs elapses without showing improvement, then automatically stop the training.\n\nYou can learn more about this callback [here](https://www.tensorflow.org/versions/master/api_docs/python/tf/keras/callbacks/EarlyStopping)."},{"metadata":{"trusted":true,"_uuid":"1634ffbfa5214a475c39e86c6d0e50904aae6af4"},"cell_type":"code","source":"model = build_model()\n\n# The patience parameter is the amount of epochs to check for improvement\nearly_stop = keras.callbacks.EarlyStopping(monitor='val_loss', patience=10)\n\nhistory = model.fit(normed_train_data, train_labels, epochs=EPOCHS,\n                    validation_split = 0.2, verbose=0, callbacks=[early_stop, PrintDot()])\n\nplot_history(history)","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"e52d6edc9499ff444ab8cd45ea2b2bc14400ef3c"},"cell_type":"markdown","source":"The graph shows that on the validation set, the average error is usually around +/- 2 MPG. Is this good? We'll leave that decision up to you.\n\nLet's see how well the model generalizes by using the **test** set, which we did not use when training the model.  This tells us how well we can expect the model to predict when we use it in the real world."},{"metadata":{"trusted":true,"_uuid":"a1757c407f9abea4dfa2944bcd740066e6ae4c1f"},"cell_type":"code","source":"loss, mae, mse = model.evaluate(normed_test_data, test_labels, verbose=0)\n\nprint(\"Testing set Mean Abs Error: {:5.2f} MPG\".format(mae))","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"0c657fc34b981ba0c063274e56e4f580aab41a5b"},"cell_type":"markdown","source":"### Make predictions\n\nFinally, predict MPG values using data in the testing set:"},{"metadata":{"trusted":true,"_uuid":"6560d123b205db1b03fedae5f425c082a2cdc024"},"cell_type":"code","source":"test_predictions = model.predict(normed_test_data).flatten()\n\nplt.scatter(test_labels, test_predictions)\nplt.xlabel('True Values [MPG]')\nplt.ylabel('Predictions [MPG]')\nplt.axis('equal')\nplt.axis('square')\nplt.xlim([0,plt.xlim()[1]])\nplt.ylim([0,plt.ylim()[1]])\n_ = plt.plot([-100, 100], [-100, 100])\n","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"f14fcdfc13acfc3915db24449a0dfecab6ae519f"},"cell_type":"markdown","source":"It looks like our model predicts reasonably well. Let's take a look at the error distribution."},{"metadata":{"trusted":true,"_uuid":"86ad9d438070eec9206fe1594dee88ef064e12e0"},"cell_type":"code","source":"error = test_predictions - test_labels\nplt.hist(error, bins = 25)\nplt.xlabel(\"Prediction Error [MPG]\")\n_ = plt.ylabel(\"Count\")","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"233eef7c666946c035a740fcd2931a1590c50658"},"cell_type":"markdown","source":"It's not quite gaussian, but we might expect that because the number of samples is very small."},{"metadata":{"_uuid":"616e33d9038130caf812a213272a10b6d74caa62"},"cell_type":"markdown","source":"## Conclusion\n\nThis notebook introduced a few techniques to handle a regression problem.\n\n* Mean Squared Error (MSE) is a common loss function used for regression problems (different loss functions are used for classification problems).\n* Similarly, evaluation metrics used for regression differ from classification. A common regression metric is Mean Absolute Error (MAE).\n* When numeric input data features have values with different ranges, each feature should be scaled independently to the same range.\n* If there is not much training data, one technique is to prefer a small network with few hidden layers to avoid overfitting.\n* Early stopping is a useful technique to prevent overfitting."},{"metadata":{"_uuid":"c717300687a36078300dbc9bb4e1cb51495a2be2"},"cell_type":"markdown","source":"## License\n\n##### Copyright 2018 The TensorFlow Authors."},{"metadata":{"trusted":true,"_uuid":"c3b0768bb8ac823ae3c29e5ade25ae92395cde32"},"cell_type":"code","source":"#@title Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"599181443c59db212ac8c7dc520500717382de87"},"cell_type":"code","source":"#@title MIT License\n#\n# Copyright (c) 2017 François Chollet\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the \"Software\"),\n# to deal in the Software without restriction, including without limitation\n# the rights to use, copy, modify, merge, publish, distribute, sublicense,\n# and/or sell copies of the Software, and to permit persons to whom the\n# Software is furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n# DEALINGS IN THE SOFTWARE.","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true},"cell_type":"markdown","source":"# Awesome Tutorials for Data Science with Python (TBU)\n    Common Data analysis and Machine learning tasks using Python\n\n## The Python Language\n- [Python 3 in one picture](https://fossbytes.com/wp-content/uploads/2015/09/python-3-in-one-pic.png)\n- [**Awesome Python**](https://github.com/vinta/awesome-python)\n- [**Jargon from the functional programming world in simple terms!**](https://github.com/hemanth/functional-programming-jargon)\n- [**Dive Into Python**](http://www.diveintopython.net/index.html)\n- [Learn Python Wiki on Reddit](https://www.reddit.com/r/learnpython/wiki/index)\n- [Learn 90% of Python in 90 Minutes](https://www.slideshare.net/MattHarrison4/learn-90)\n- [Highest Voted Python Questions](http://stackoverflow.com/questions/tagged/python?sort=votes&pageSize=50)\n- [Python Basic Concepts](https://github.com/gumption/Python_for_Data_Science/blob/master/3_Python_Basic_Concepts.ipynb)\n- [Quick Reference to Python](http://www.dataschool.io/python-quick-reference/)\n- [The Elements of Python Style](https://github.com/amontalenti/elements-of-python-style)\n- [**What does the yield keyword do in Python?**](http://stackoverflow.com/questions/231767/what-does-the-yield-keyword-do-in-python)\n- [Parsing values from a JSON file in Python](http://stackoverflow.com/questions/2835559/parsing-values-from-a-json-file-in-python)\n- [**Python Quora FAQs**](https://www.quora.com/topic/Python-programming-language-1)\n- [time-complexity of various operations - list/dict - in current CPython](https://wiki.python.org/moin/TimeComplexity)\n- Scripting in Python\n    - [Python Scripting Tutorial](http://www.dreamsyssoft.com/python-scripting-tutorial/intro-tutorial.php)\n    - [Scripting with Python](https://www.schrodinger.com//AcrobatFile.php?type=supportdocs&type2=&ident=404)\n    - [**Can I use Python as a bash replacement?**](http://stackoverflow.com/questions/209470/can-i-use-python-as-a-bash-replacement)\n\n## Useful Online Courses\n- [Learn Python (Codecademy)](https://www.codecademy.com/learn/python#)\n- [Free Interactive Course: Intro to Python for Data Science (DataCamp)](https://www.datacamp.com/courses/intro-to-python-for-data-science)\n- [Introduction to Computer Science and Programming Using Python (MIT)](https://www.edx.org/course/introduction-computer-science-mitx-6-00-1x-11)\n- [Python for Everybody](https://www.coursera.org/learn/python)\n- [Python Programming Essentials](https://www.coursera.org/learn/python-programming)\n\n## Data Science with Python\n- [**Data Science IPython Notebooks**](https://github.com/donnemartin/data-science-ipython-notebooks)\n- [Awesome Python - Data Analysis](https://github.com/vinta/awesome-python#science-and-data-analysis)\n- Statistics\n  - [Statistics and Data Science](https://github.com/svaksha/pythonidae/blob/master/Statistics.md)\n- [**An Introduction to Scientific Python (and a Bit of the Maths Behind It) – NumPy**](http://www.kdnuggets.com/2016/06/intro-scientific-python-numpy.html)\n- [Data Analysis and IPython Notebooks](https://github.com/kirang89/pycrumbs#data-analysis)\n- [Python for Data Science: Basic Concepts](https://github.com/gumption/Python_for_Data_Science/blob/master/2_Data_Science_Basic_Concepts.ipynb)\n- [Pycon India 2015 Notes](http://www.analyticsvidhya.com/blog/2015/10/notes-impressions-experience-excitement-pycon-india-2015/)\n- [**5 important Python Data Science advancements of 2015**](https://medium.com/@elgehelge/the-5-most-important-python-data-science-advancements-of-2015-a136482da89b#.sp2c1la9z)\n- [Data Exploration with Numpy cheat sheet](http://www.analyticsvidhya.com/blog/2015/07/11-steps-perform-data-analysis-pandas-python)\n- [Querying Craiglist with Python](http://chrisholdgraf.com/querying-craigslist-with-python/?imm_mid=0d8940&cmp=em-data-na-na-newsltr_20150916)\n- [**An introduction to Numpy and Scipy**](http://www.engr.ucsb.edu/~shell/che210d/numpy.pdf)\n- [Create NBA Shot Charts](http://savvastjortjoglou.com/nba-shot-sharts.html)\n- [PythoR- Python meets R](http://nipunbatra.github.io/2016/01/pythor/)\n- [**How do I learn data analysis with Python?**](https://www.quora.com/How-do-I-learn-data-analysis-with-Python?redirected_qid=2464720)\n- [What are some interesting things to do with Python?](https://www.quora.com/Python-programming-language-What-are-some-interesting-things-to-do-with-Python?redirected_qid=2324227)\n- [**Which is better for data analysis: R or Python?**](https://www.quora.com/Which-is-better-for-data-analysis-R-or-Python)\n- [**Web scraping in Python**](https://github.com/ujjwalkarn/Web-Scraping)\n- [The Guide to Learning Python for Data Science](http://www.datasciencecentral.com/profiles/blogs/the-guide-to-learning-python-for-data-science-2)\n- [Python For Data Science - A Cheat Sheet For Beginners](https://www.datacamp.com/community/tutorials/python-data-science-cheat-sheet-basics)\n- [Top voted Python data science questions](http://datascience.stackexchange.com/questions/tagged/python)\n- [Awesome Python - Data Visualization](https://github.com/vinta/awesome-python#data-visualization)\n- [Awesome Python - Map Reduce](https://github.com/vinta/awesome-python#mapreduce)\n\n## Pandas Library in Python\n- [Intro to pandas data structures](http://www.gregreda.com/2013/10/26/intro-to-pandas-data-structures/)\n- [Useful Pandas Cheatsheet](https://github.com/pandas-dev/pandas/blob/master/doc/cheatsheet/Pandas_Cheat_Sheet.pdf)\n- [An Introduction to Scientific Python – Pandas](http://www.datadependence.com/2016/05/scientific-python-pandas/)\n- [10 minutes to Pandas](http://pandas.pydata.org/pandas-docs/stable/10min.html)\n- [Useful Pandas Snippets](http://www.swegler.com/becky/blog/2014/08/06/useful-pandas-snippets/)\n- [Timeseries analysis using Pandas](http://nbviewer.jupyter.org/github/twiecki/financial-analysis-python-tutorial/blob/master/1.%20Pandas%20Basics.ipynb)\n- [Pandas Exercises - Practice your Pandas skills](https://github.com/guipsamora/pandas_exercises)\n- [Grouping in Pandas](http://blog.yhat.com/posts/grouping-pandas.html)\n- [**“Large data” work flows using pandas**](http://stackoverflow.com/questions/14262433/large-data-work-flows-using-pandas)\n- [Easier data analysis with pandas (video series)](http://www.dataschool.io/easier-data-analysis-with-pandas/)\n- [Pandas Basics Cheat Sheet](https://www.datacamp.com/community/blog/python-pandas-cheat-sheet)\n- Quick Operations on a Pandas DataFrame\n    - [Renaming Columns in Pandas](http://stackoverflow.com/questions/11346283/renaming-columns-in-pandas) ([video](https://www.youtube.com/watch?v=0uBirYFhizE&list=PL5-da3qGB5ICCsgW1MxlZ0Hq8LL5U3u9y&index=5))\n    - [Deleting Columns from pandas DataFrame](http://stackoverflow.com/questions/13411544/delete-column-from-pandas-dataframe) ([video](https://www.youtube.com/watch?v=gnUKkS964WQ&list=PL5-da3qGB5ICCsgW1MxlZ0Hq8LL5U3u9y&index=6))\n    - [Adding new Column to existing DataFrame](http://stackoverflow.com/questions/12555323/adding-new-column-to-existing-dataframe-in-python-pandas)\n    - [Add one Row in a pandas.DataFrame](http://stackoverflow.com/questions/10715965/add-one-row-in-a-pandas-dataframe)\n    - [Changing the order of DataFrame Columns](http://stackoverflow.com/questions/13148429/how-to-change-the-order-of-dataframe-columns)\n    - [Changing data type of Columns](http://stackoverflow.com/questions/15891038/pandas-change-data-type-of-columns) ([video](https://www.youtube.com/watch?v=V0AWyzVMf54&list=PL5-da3qGB5ICCsgW1MxlZ0Hq8LL5U3u9y&index=13))\n    - [Getting a list of the column headers from a DataFrame](http://stackoverflow.com/questions/19482970/get-list-from-pandas-dataframe-column-headers)\n    - [Converting list of dictionaries to Dataframe](http://stackoverflow.com/questions/20638006/convert-list-of-dictionaries-to-dataframe)\n    - [Getting row count of pandas DataFrame](http://stackoverflow.com/questions/15943769/how-to-get-row-count-of-pandas-dataframe)\n    - [Most efficient way to loop through DataFrames](http://stackoverflow.com/questions/7837722/what-is-the-most-efficient-way-to-loop-through-dataframes-with-pandas)\n    - [Deleting DataFrame row based on column value](http://stackoverflow.com/questions/18172851/deleting-dataframe-row-in-pandas-based-on-column-value)\n    - [Dropping a list of rows from Pandas DataFrame](http://stackoverflow.com/questions/14661701/how-to-drop-a-list-of-rows-from-pandas-dataframe)\n    - [Sorting a DataFrame or a single column](https://www.youtube.com/watch?v=zY4doF6xSxY&list=PL5-da3qGB5ICCsgW1MxlZ0Hq8LL5U3u9y&index=7)\n    - [Filtering DataFrame rows by column value](https://www.youtube.com/watch?v=2AFGPdNn4FM&list=PL5-da3qGB5ICCsgW1MxlZ0Hq8LL5U3u9y&index=8)\n    - [Filtering DataFrame rows using multiple criteria](https://www.youtube.com/watch?v=YPItfQ87qjM&list=PL5-da3qGB5ICCsgW1MxlZ0Hq8LL5U3u9y&index=9)\n    - [Dropping all non-numeric columns from a DataFrame](https://youtu.be/B-r9VuK80dk?t=4m31s)\n    - [Counting and removing missing values](https://www.youtube.com/watch?v=fCMrO_VzeL8&list=PL5-da3qGB5ICCsgW1MxlZ0Hq8LL5U3u9y&index=16)\n    - [Selecting multiple rows and columns from a DataFrame](https://www.youtube.com/watch?v=xvpNA7bC8cs&list=PL5-da3qGB5ICCsgW1MxlZ0Hq8LL5U3u9y&index=19)\n    - [Reducing the size of a DataFrame](https://www.youtube.com/watch?v=wDYDYGyN_cw&list=PL5-da3qGB5ICCsgW1MxlZ0Hq8LL5U3u9y&index=21)\n\n## Machine Learning with Python\n- [AI, ML Related List](https://github.com/svaksha/pythonidae/blob/master/AI.md)\n- [Data Normalization in Python](http://blog.yhat.com/posts/data-normalization-in-python.html)\n- [**Python Machine Learning Book**](https://github.com/rasbt/python-machine-learning-book)\n- [Table of Contents and Code Notebooks](https://github.com/rasbt/python-machine-learning-book/blob/master/README.md#table-of-contents-and-code-notebooks)\n- [Machine Learning with scikit learn](http://www.dataschool.io/machine-learning-with-scikit-learn/)\n- [Machine Learning Algorithms Cheatsheet](http://www.analyticsvidhya.com/blog/2015/09/full-cheatsheet-machine-learning-algorithms/)\n- [**How to compute precision, recall, accuracy and f1-score for the multiclass case with scikit learn?**](http://stackoverflow.com/questions/31421413/how-to-compute-precision-recall-accuracy-and-f1-score-for-the-multiclass-case)\n- [One Hot Encoding for Machine learning in Python](http://stackoverflow.com/questions/17469835/one-hot-encoding-for-machine-learning)\n- [**Building a (semi) Autonomous Drone with Python**](http://blog.yhat.com/posts/autonomous-droning-with-python.html)\n- [Awesome Python - Machine Learning](https://github.com/vinta/awesome-python#machine-learning)\n- Computer Vision\n  - [Awesome Python - Computer Vision](https://github.com/vinta/awesome-python#computer-vision)\n\n## Scikit Learn\n- [scikit learn on Wikipedia](https://en.wikipedia.org/wiki/Scikit-learn)\n- [**Introduction to machine learning with scikit-learn**](https://github.com/justmarkham/scikit-learn-videos), [**Videos!**](http://blog.kaggle.com/author/kevin-markham/)\n- [**A Gentle Introduction to Scikit-Learn: A Python Machine Learning Library**](http://machinelearningmastery.com/a-gentle-introduction-to-scikit-learn-a-python-machine-learning-library/)\n- [**PyData Seattle 2015 Scikit-learn Tutorial**](https://github.com/jakevdp/sklearn_pydata2015), [sklearn_scipy2013](https://github.com/jakevdp/sklearn_scipy2013)\n- [SKLEARN BENCHMARKS: A centralized repository to report scikit-learn model performance across a variety of parameter settings and data sets](https://github.com/rhiever/sklearn-benchmarks), [Report results of sklearn benchmarks at openml.org](http://www.openml.org/)\n- [How to get most informative features for scikit-learn classifiers?](http://stackoverflow.com/questions/11116697/how-to-get-most-informative-features-for-scikit-learn-classifiers)\n- [**Code example to predict prices of Airbnb vacation rentals, using scikit-learn on Spark**](https://github.com/mapr-demos/spark-sklearn-airbnb-predict)\n- [**Machine Learning with scikit learn tutorial**](http://amueller.github.io/sklearn_tutorial/)\n- [Parallel and Large Scale Machine Learning with scikit-learn](https://speakerdeck.com/ogrisel/parallel-and-large-scale-machine-learning-with-scikit-learn), [Meetup](http://datasciencelondon.org/machine-learning-python-scikit-learn-ipython-dsldn-data-science-london-kaggle/)\n- [Saving classifier to disk in scikit-learn](http://stackoverflow.com/questions/10592605/save-classifier-to-disk-in-scikit-learn)\n\n\n## Linear Regression in Python\n- [Linear Regression in Python](http://nbviewer.ipython.org/github/justmarkham/DAT4/blob/master/notebooks/08_linear_regression.ipynb), [Blog Post](http://www.dataschool.io/linear-regression-in-python/)\n- [Linear Regression using Scikit Learn](http://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LinearRegression.html)\n- [A friendly introduction to linear regression (using Python)](http://www.dataschool.io/linear-regression-in-python/)\n- [Linear Regression Example in Python](http://scipy-cookbook.readthedocs.io/items/LinearRegression.html)\n- [Regression analysis using Python StatsModels package](http://www.turingfinance.com/regression-analysis-using-python-statsmodels-and-quandl/)\n- [Run an OLS regression with Pandas Data Frame](http://stackoverflow.com/questions/19991445/run-an-ols-regression-with-pandas-data-frame)\n\n## Logistic Regression in Python\n- [Logistic Regression with scikit learn](http://www.dataschool.io/logistic-regression-in-python-using-scikit-learn/)\n- [Logistic Regression in Python](http://blog.yhat.com/posts/logistic-regression-and-python.html)\n- [Implementing the softmax function in Python](http://stackoverflow.com/questions/34968722/softmax-function-python)\n- [**What is the inverse of regularization strength in Logistic Regression? How should it affect my code?**](http://stackoverflow.com/questions/22851316/what-is-the-inverse-of-regularization-strength-in-logistic-regression-how-shoul)\n- [The Yhat Blog: Logistic Regression in Python](http://blog.yhat.com/posts/logistic-regression-and-python.html)\n- [Example of logistic regression in Python using scikit-learn](http://www.dataschool.io/logistic-regression-in-python-using-scikit-learn/)\n- [TUTORIAL ON LOGISTIC REGRESSION AND OPTIMIZATION IN PYTHON](https://learningwithdata.wordpress.com/2015/04/30/tutorial-on-logistic-regression-and-optimization-in-python/)\n- [Using Logistic Regression in Python for Data Science](http://www.dummies.com/how-to/content/using-logistic-regression-in-python-for-data-scien.html)\n\n## k Nearest Neighbours in Python\n- [A good tutorial on implementing K Nearest Neighbors using scikit learn](http://scikit-learn.org/stable/modules/neighbors.html)\n- [**Is it possible to specify your own distance function using scikit-learn K-Means Clustering?**](http://stackoverflow.com/questions/5529625/is-it-possible-to-specify-your-own-distance-function-using-scikit-learn-k-means)\n- [Tutorial To Implement k-Nearest Neighbors in Python From Scratch](http://machinelearningmastery.com/tutorial-to-implement-k-nearest-neighbors-in-python-from-scratch/)\n- [Implementing your own k-nearest neighbour algorithm using Python](https://blog.cambridgecoding.com/2016/01/16/machine-learning-under-the-hood-writing-your-own-k-nearest-neighbour-algorithm/)\n- [knn Python implementation on StackOverflow](http://stackoverflow.com/questions/5565935/k-nearest-neighbour-in-python)\n- [kNN with big sparse matrices in Python](http://stackoverflow.com/questions/20333092/knn-with-big-sparse-matrices-in-python)\n- [Sklearn kNN usage with a user defined metric](http://stackoverflow.com/questions/21052509/sklearn-knn-usage-with-a-user-defined-metric)\n\n\n## Neural Networks in Python\n- [Implementing a Neural Network from scratch in Python](http://www.wildml.com/2015/09/implementing-a-neural-network-from-scratch/), [Code](https://github.com/dennybritz/nn-from-scratch)\n- [A Neural Network in 11 lines of Python](http://iamtrask.github.io/2015/07/12/basic-python-network/)\n- [Speeding up your Neural Network with Theano and the gpu](http://www.wildml.com/2015/09/speeding-up-your-neural-network-with-theano-and-the-gpu/), [Code](https://github.com/dennybritz/nn-theano)\n- [What is the best neural network library for Python?](https://www.quora.com/What-is-the-best-neural-network-library-for-Python)\n- [Recurrent Neural Net Tutorial in Python Part 1](http://www.wildml.com/2015/09/recurrent-neural-networks-tutorial-part-1-introduction-to-rnns/), [Part 2](http://www.wildml.com/2015/09/recurrent-neural-networks-tutorial-part-2-implementing-a-language-model-rnn-with-python-numpy-and-theano/), [Code](https://github.com/dennybritz/rnn-tutorial-rnnlm/)\n- [PyBrain: modular Machine Learning Library for Python](http://pybrain.org/)\n- [Neural Networks Tutorial – a Pathway to Deep Learning](http://www.adventuresinmachinelearning.com/neural-networks-tutorial/)\n\n\n## Decision Trees in Python\n- [How to extract the decision rules from scikit-learn decision-tree?](http://stackoverflow.com/questions/20224526/how-to-extract-the-decision-rules-from-scikit-learn-decision-tree)\n- [**How do I find which attributes my tree splits on, when using scikit-learn?**](http://stackoverflow.com/questions/20156951/how-do-i-find-which-attributes-my-tree-splits-on-when-using-scikit-learn)\n- [Quora: What is a good Python library for decision trees?](https://www.quora.com/What-is-a-good-Python-library-for-decision-trees), [StackOverflow](http://stackoverflow.com/questions/3127922/what-is-a-good-python-library-for-decision-trees) \n- [Building Decision Trees in Python](http://www.onlamp.com/pub/a/python/2006/02/09/ai_decision_trees.html?page=1)\n- [Pure Python Decision Trees](http://kldavenport.com/pure-python-decision-trees/)\n- [Building a decision tree from scratch in Python - a beginner's tutorial](http://www.patricklamle.com/Tutorials/Decision%20tree%20python/tuto_decision%20tree.html)\n- [Using Python to Build and Use a Simple Decision Tree Classifier](https://github.com/gumption/Python_for_Data_Science/blob/master/4_Python_Simple_Decision_Tree.ipynb)\n- [Decision trees in python with scikit-learn and pandas](http://chrisstrelioff.ws/sandbox/2015/06/08/decision_trees_in_python_with_scikit_learn_and_pandas.html)\n- [Code for simple decision tree in Python](https://github.com/gumption/Python_for_Data_Science/blob/master/simple_decision_tree.py)\n- [Lesson notebook: Regression and Classification Trees](http://nbviewer.jupyter.org/github/justmarkham/DAT8/blob/master/notebooks/17_decision_trees.ipynb)\n- [Discover structure behind data with decision trees](http://vooban.com/en/tips-articles-geek-stuff/discover-structure-behind-data-with-decision-trees/)\n\n## Random Forest with Python\n- [Getting Started with Random Forests: Titanic Competition on Kaggle](https://www.kaggle.com/c/titanic/details/getting-started-with-random-forests), [Python sample code](https://www.kaggle.com/c/digit-recognizer/forums/t/2299/getting-started-python-sample-code-random-forest)\n- [RandomForestClassifier vs ExtraTreesClassifier in scikit learn](http://stackoverflow.com/questions/22409855/randomforestclassifier-vs-extratreesclassifier-in-scikit-learn)\n- [Powerful Guide to learn Random Forest](http://www.analyticsvidhya.com/blog/2015/09/random-forest-algorithm-multiple-challenges/)\n- [How are Feature Importances in RandomForestClassifier determined?](http://stackoverflow.com/questions/15810339/how-are-feature-importances-in-randomforestclassifier-determined)\n- [Random forest interpretation with scikit-learn](http://blog.datadive.net/random-forest-interpretation-with-scikit-learn/)\n- [Random Forests in Python Tutorial](http://blog.yhat.com/posts/random-forests-in-python.html)\n- [Unbalanced classification using RandomForestClassifier in sklearn](http://stackoverflow.com/questions/20082674/unbalanced-classification-using-randomforestclassifier-in-sklearn)\n- [Random Forest with categorical features in sklearn](http://stackoverflow.com/questions/24715230/random-forest-with-categorical-features-in-sklearn)\n- [How to output RandomForest Classifier from python?](http://stackoverflow.com/questions/23000693/how-to-output-randomforest-classifier-from-python)\n- [Lesson notebook: Ensembling, Bagging, and Random Forests](http://nbviewer.jupyter.org/github/justmarkham/DAT8/blob/master/notebooks/18_ensembling.ipynb)\n\n## Support Vector Machine in Python\n- [Fastest SVM implementation usable in Python](http://stackoverflow.com/questions/9299346/fastest-svm-implementation-usable-in-python)\n- [An example using python bindings for SVM library, LIBSVM](http://stackoverflow.com/questions/4214868/an-example-using-python-bindings-for-svm-library-libsvm)\n- [What is the best SVM library usable from Python?](https://www.quora.com/What-is-the-best-SVM-library-usable-from-Python)\n- [How does sklearn.svm.svc's function predict_proba() work internally?](http://stackoverflow.com/questions/15111408/how-does-sklearn-svm-svcs-function-predict-proba-work-internally)\n- [Support vector machine in Python using libsvm example of features](http://stackoverflow.com/questions/30991592/support-vector-machine-in-python-using-libsvm-example-of-features)\n- [Linear SVC Machine learning SVM example with Python](https://pythonprogramming.net/linear-svc-example-scikit-learn-svm-python/)\n- [Understanding Support Vector Machine algorithm from examples (along with code)](http://www.analyticsvidhya.com/blog/2015/10/understaing-support-vector-machine-example-code/)\n\n## NLP / Text Mining in Python\n- [**NLP with Python ORiley Book**](http://www.nltk.org/book_1ed/), [Python 3](http://www.nltk.org/book/)\n- [Awesome Python - NLP](https://github.com/vinta/awesome-python#natural-language-processing)\n- [Awesome Python - Text Processing](https://github.com/vinta/awesome-python#text-processing)\n- [Text Analytics : Intro and Tokenization](http://a4analytics.blogspot.sg/2015/03/text-mining-post-1.html)\n- [NLTK BOOK](http://www.nltk.org/book/ch01.html)\n- [Elegant N-gram Generation in Python](http://locallyoptimal.com/blog/2013/01/20/elegant-n-gram-generation-in-python/)\n- [**Computing N Grams using Python**](http://stackoverflow.com/questions/13423919/computing-n-grams-using-python)\n- [N-grams: Explanation + 2 applications](http://stackoverflow.com/questions/1032288/n-grams-explanation-2-applications)\n- [NLP Tutorial with Python](http://www.datasciencecentral.com/profiles/blogs/python-nlp-tools)\n\n## Sentiment Analysis with Python\n- [A Comprehensive Guide to Sentiment Analysis](https://monkeylearn.com/sentiment-analysis/)\n- [Twitter-Sentiment-Analysis](https://github.com/ujjwalkarn/Twitter-Sentiment-Analysis)\n- [Basic Sentiment Analysis with Python](http://fjavieralba.com/basic-sentiment-analysis-with-python.html)\n- [What is the best way to do Sentiment Analysis with Python?](https://www.quora.com/What-is-the-best-way-to-do-Sentiment-Analysis-with-Python-1)\n- [How to Calculate Twitter Sentiment Using AlchemyAPI with Python](http://www.alchemyapi.com/developers/getting-started-guide/twitter-sentiment-analysis)\n- [Second Try: Sentiment Analysis in Python](http://andybromberg.com/sentiment-analysis-python/)\n- [Sentiment Analysis with Python NLTK Text Classification](http://text-processing.com/demo/sentiment/)\n- Codes and Explanation\n    - [**Sentiment Analysis with bag-of-words**](http://ataspinar.com/2016/01/21/sentiment-analysis-with-bag-of-words/)\n    - [**Sentiment Analysis with Naive Bayes**](http://ataspinar.com/2016/02/15/sentiment-analysis-with-the-naive-bayes-classifier/)\n\n## Pickle: convert a python object into a character stream\n- [Python serialization - Why pickle?](http://stackoverflow.com/questions/8968884/python-serialization-why-pickle)\n- [**Serializing Python Objects**](http://www.diveinto.org/python3/serializing.html), [**Binary Files**](http://www.diveinto.org/python3/files.html#binary)\n- [What is Pickle in python ?](https://pythontips.com/2013/08/02/what-is-pickle-in-python/)\n- [How to cPickle dump and load separate dictionaries to the same file?](http://stackoverflow.com/questions/11641493/how-to-cpickle-dump-and-load-separate-dictionaries-to-the-same-file)\n- [**Understanding Pickling in Python**](http://stackoverflow.com/questions/7501947/understanding-pickling-in-python)\n\n## AutoML\n- [TPOT: A Python tool for automating data science](http://www.randalolson.com/2016/05/08/tpot-a-python-tool-for-automating-data-science/), [GitHub repo](https://github.com/rhiever/tpot)\n\n## Regex Related\n- [RegExr](http://regexr.com/)\n- [Regex101](https://regex101.com/)\n- [Pythex](http://pythex.org/)\n- [How to use Regular Expressions (Regex) in Microsoft Excel both in-cell and loops](http://stackoverflow.com/questions/22542834/how-to-use-regular-expressions-regex-in-microsoft-excel-both-in-cell-and-loops)\n- [Advanced Filters: Excel’s Amazing Alternative To Regex](http://searchengineland.com/advanced-filters-excels-amazing-alternative-to-regex-143680)\n\n## Shell Scripting\n- [**Calling an external command in Python**](http://stackoverflow.com/questions/89228/calling-an-external-command-in-python)\n- [**Running shell command from Python and capturing the output**](http://stackoverflow.com/questions/4760215/running-shell-command-from-python-and-capturing-the-output)\n- [**Can I use Python as a bash replacement?**](http://stackoverflow.com/questions/209470/can-i-use-python-as-a-bash-replacement)\n- [Python Scripts as a Replacement for Bash Utility Scripts](http://www.linuxjournal.com/content/python-scripts-replacement-bash-utility-scripts)\n- [How to Write a Shell Script using Bash Shell in Ubuntu](https://www.youtube.com/watch?v=He-5BpUGSag)\n- Red Hat Magazine | Python for Bash scripters: A well-kept secret\n- [Embed bash in python](http://stackoverflow.com/questions/2651874/embed-bash-in-python)\n- [Bash2py: A Bash to Python Translator](https://cs.uwaterloo.ca/~ijdavis/bash2py-final.pdf)\n- [Beginners/BashScripting](https://help.ubuntu.com/community/Beginners/BashScripting)\n- [The Beginner’s Guide to Shell Scripting: The Basics](http://www.howtogeek.com/67469/the-beginners-guide-to-shell-scripting-the-basics/)\n- [Linux Shell Scripting Tutorial v1.05r3 A Beginner's handbook](http://www.freeos.com/guides/lsst/)\n\n## Other good lists\n- [pycrumbs - Bits and bytes of Python from the Internet](https://github.com/kirang89/pycrumbs)\n- [python github projects - Collect and classify python projects on Github](https://github.com/checkcheckzz/python-github-projects)\n- [python reference - Useful functions, tutorials, and other Python-related things](https://github.com/rasbt/python_reference)\n- [pythonidae - Curated decibans of scientific programming resources in Python](https://github.com/svaksha/pythonidae)\n"},{"metadata":{"_uuid":"ac1c0b874e3de78172d43bc38d70c5d6752f2dbe"},"cell_type":"markdown","source":""},{"metadata":{"_cell_guid":"79c7e3d0-c299-4dcb-8224-4455121ee9b0","collapsed":true,"_uuid":"d629ff2d2480ee46fbb7e2d37f6b5fab8052498a","trusted":false},"cell_type":"markdown","source":"## Credits (Reference)\n\n> * [Regression: predict fuel efficiency](https://www.tensorflow.org/tutorials/keras/basic_regression)\n> * [Ujjwal Karn](https://github.com/ujjwalkarn/DataSciencePython)\n> * [GitHub Awesome Lists Topic](https://github.com/topics/awesome)\n\n## License\n\n[![CC0](http://mirrors.creativecommons.org/presskit/buttons/88x31/svg/cc-zero.svg)](https://creativecommons.org/publicdomain/zero/1.0/)\n\n### Please ***UPVOTE*** my kernel if you like it or wanna fork it.\n\n##### Feedback: If you have any ideas or you want any other content to be added to this curated list, please feel free to make any comments to make it better.\n#### I am open to have your *feedback* for improving this ***kernel***\n###### Hope you enjoyed this kernel!\n\n### Thanks for visiting my *Kernel* and please *UPVOTE* to stay connected and follow up the *further updates!*"}],"metadata":{"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"name":"python","version":"3.6.6","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"}},"nbformat":4,"nbformat_minor":1}