Giter Club home page Giter Club logo

python_tutorials_notebook's Introduction

Python Tutorials Notebook

This repository contains python ๐Ÿ notebooks ๐Ÿ““ for education and data science purposes.

Contents

NOTE: Over the course of time, I will keep on adding more contents in this repo.

Python

I will be covering the conceptual understanding of Python by dividing it into 3 stages. The contents are as follows:

Beginner

  • What is Python, Why do we need it, Applications
  • Numerical and Boolean Operations
  • Datatypes and Type Conversion
  • Variables and object
  • Importing modules
  • String, String Operation and String formatting
  • Useful pythonic functions (string: join, replace; numeric: max, sum, abs)
  • User Input
  • User Defined Function

Intermediate

Part 1

  • Data Structures
    • List, Tuple, Set, Dictionary and its operations
    • List slicing
    • List, set and dictionary comprehension
  • Conditional statements, range, loops
  • Useful pythonic functions for iterables (any, all, enumerate)

Part 2

  • File I/O
  • Exception Handling
  • Lambda
  • First-class Function - Map, Filter, Reduce

Advanced

Part 1

  • Class
  • Iterator and Iterables
  • Generator
  • Decorator

Part 2

  • Multithreading & Multiprocessing
  • Unit Test Cases

Libraries for Data Science 101

  • Pandas
  • NumPy

Installation

All these installations are performed in Linux ๐Ÿง (Ubuntu 18.04), and I am not providing the same for Windows because, frnakly, coding and development should NOT be done ๐Ÿ‘Ž in Windows.

There are 2 ways to access Python and its libraries:

  • Approach 1: Installing Python in admin (sudo) level and using pip to install libraries
  • Approach 2: Installing Anaconda (latest version, as of June 2020, has Python 3.7 in-built), activating conda base and using conda to install libraries

NOTE: A good practise while working on multiple projects is to create virtual environments. This can be done in both of the approaches mentioned above. We will write about it later.

As of now, I am covering the Approach 1.

Approach 1

Install Python 3.6

In order to install Python 3.6 on your Ubuntu 18.04 system, you first need to update and upgrade your system to pull the latest available version of Python 3. In your terminal, run the following commands:

sudo apt update
sudo apt upgrade -y

There are a few more packages and development tools to install using the following command:

sudo apt install build-essential libssl-dev libffi-dev python3-dev

Once done, you need to install pip, which is the official tool that allows you to install Python packages from PyPI, using the following command:

sudo apt install -y python3-pip

Install Jupyter Notebook

Run the following command to install Jupyter Notebook:

sudo python3 -m pip install ipykernel
sudo python3 -m ipykernel install --user
sudo pip3 install -U jupyter ipython

To get the list of available kernels, type:

jupyter kernelspec list

and you should see an output like this.

Available kernels:
python3 /home/info/.local/share/jupyter/kernels/python3

Now, this final step is optional. Check if the kernel.json file with the correct location pointers to python executable is available or not.

cd /usr/local/share/jupyter/kernels/python3/kernel.json

If this command fails to execute, then it means that python3 folder was not created for some reason. Now, run these commands:

cd /usr/local/share/jupyter/kernels/
sudo mkdir python3
sudo nano kernel.json

Once done, place the following location pointers.

{
  "display_name": "Python 3",
  "language": "python",
  "argv": [
    "/usr/bin/python3",
    "-m",
    "ipykernel_launcher",
    "-f",
    "{connection_file}"
  ]
}

REQUIRED: You can install nbextensions to get more features in your notebook. You just need to run the following commands to get it done:

sudo pip3 install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
jupyter nbextension enable codefolding/main

Now, you need to launch jupyter notebook from the terminal using the following command:

jupyter notebook

Now, when the tab in your browser opens, you will notice these 4 tabs (considering everything worked perfectly):

You can see that Nbextension is also appearing. Click on that tab and select the following recommended extensions:

  • Highlight selected word
  • Table of Contents 2
  • ExecuteTime
  • table_beautifier
  • spellchecker

๐ŸŽ‰ Voila, ladies and gentlemen. Now, start coding!

python_tutorials_notebook's People

Contributors

tamoghna-saha avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.