bharatmakhija / Python

If you want to learn python, coming from a java paradigm and have more of java coding style in your blood! You have just landed on right page. Here a folder structure is followed to handle different use-cases one struggles through like how classes are created, how to achive inheritance and create abstract classes, what are generators and why we should use them, some best practices etc. All of these things are folder names only. Go inside the topic you want to learn , there is a readme prepared specifically for that topic to boost up your learning then if you feel like you can check out the code as well. Happy Learning!!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Welcome to Python

If you want to learn python, coming from a java paradigm and have more of java coding style in your blood! You have just landed on right page :-).

  • Here a folder structure is followed to handle different use-cases one struggles through like how classes are created, how to achive inheritance and create abstract classes, what are generators and why we should use them, some best practices etc etc.
  • All of these things are folder names only. Go inside the topic you want to learn , there is a readme prepared specifically for that topic to boost up your learning then if you feel like you can check out the code as well. Happy Learning!!

What this is not?

- This is not a beginners to advanced type of tutorials. This is basically a topic wise tutorial which can be a folder name, this can be a best practice or some "how to" or some boiler plate which can be another folder name and so on. - I have intentionally kept the design open as many topics can depend on one another and some things should go together to make sense out of it.

A note for you :)

I add content in this in my free time(mostly weekends) or sometimes in weekdays when i am early from office. This is still in progress and lots of things are yet to be added. Please feel free to fork and add back something valuable, will really appretiate that!! Meanwhile I will keep adding and updating the content.

Some basics to keep here:

Popular Python runtimes

CPython Jython IronPython PyPy

  • computers come with multiple versions of standard CPython pre-installed.

Check python version:

$python --version

Python3 verison:

python3 --version

Creating virtual environment:

python3 -m venv myenv
  • here myenv is the name of virtual environment, we can give any name.

  • Then activate the virtual environment

source myenv/bin/activate

#After this command, virtual env should start reflecting in 
#terminal like this

# (myenv) at the leftmost corner
  • Deactivating a virtual environment:
deactivate

Install requirements in virtual environment using pip

  • before this upgrade pip using following command:
pip install --upgrade pip
  • After this install requirements from requirements.txt file:
  • make sure your virtual env is activated.
pip install -r requirements.txt
  • here -r is for recursive.

Once requirements are installed, we are good to go.

Creating requirements.txt file

  • on the go if we change requirements or add new dependencies we need to keep modifying this file.

  • we can generate this file from venv directly using following command:

pip freeze > requirements.txt
  • make sure venv is active so that dependencies are being picked from there only rather than global python packages.

Quick Links

A

Abstract Class
Attributes

B

Best Practice: Return exception than None

C

Comprehension
Closures
Class Methods
counters
Collection Modules
Class to Dictionary converter
Class Creation
Container classes

D

Decorators
Datetime in python
Download file from url

E

Empty String handling
Exceptions raising
Returning Exceptions

F

Functions
File Handling

G

Generators

H

I

Iterators
Inheritance

J

K

L

M

MixInClasses
custom map-reduce

N

Non Zero empty string handling

O

OOP Basic
Optional Parameters
OS Package python

P

Public vs Private attributes

Q

R

Rest-API Basics
Random Number generator

S

Strings
Sorting
Splitwise: Python App
SSH with Python
StandardMethodResolutionOrder
SendingEmails using smtplib

T

Multi-Threading

U

V

W

X

Y

Z

References

Tutorial Points: Database Access using python 3
Multi-Threading

About

If you want to learn python, coming from a java paradigm and have more of java coding style in your blood! You have just landed on right page. Here a folder structure is followed to handle different use-cases one struggles through like how classes are created, how to achive inheritance and create abstract classes, what are generators and why we should use them, some best practices etc. All of these things are folder names only. Go inside the topic you want to learn , there is a readme prepared specifically for that topic to boost up your learning then if you feel like you can check out the code as well. Happy Learning!!

License:MIT License


Languages

Language:Python 51.8%Language:Jupyter Notebook 48.2%