├── 07_cpython └── readme.md ├── 01_python_fundamentals ├── 07_operators │ └── main.py ├── common_utils │ ├── __init__.py │ └── helper.py ├── 22_scope │ ├── example.txt │ └── main.py ├── 23_modules │ ├── 04_module_search_path │ │ ├── mypackage │ │ │ ├── __init__.py │ │ │ └── my_module.py │ │ ├── 01_extend_module │ │ │ ├── modules │ │ │ │ ├── __init__.py │ │ │ │ ├── main.py │ │ │ │ └── user.py │ │ │ └── common_utils │ │ │ │ ├── __init__.py │ │ │ │ └── helper.py │ │ └── main.py │ ├── 07_module_coding_basic │ │ ├── main.py │ │ └── module1.py │ ├── 01_import_and_attributes │ │ ├── c.py │ │ ├── main.py │ │ └── b.py │ ├── 08_module_namespace │ │ ├── module2.py │ │ ├── module_example.py │ │ └── main.py │ ├── 05_configuring_the_search_path │ │ └── main.py │ ├── 06_sys_path │ │ └── main.py │ ├── 09_reloading_modules │ │ └── changer.py │ └── 03_byte_code │ │ └── my_module.py ├── 03_character_sets │ └── main.py ├── 25_advance_module │ ├── 02_data_hiding_in_modules │ │ ├── underscore_example.py │ │ ├── module.py │ │ └── main.py │ ├── 05_changig_the_module_search │ │ └── main.py │ ├── 03_enable_future_feature │ │ └── main.py │ └── 04_mixed_usage_modes │ │ ├── main.py │ │ ├── greetings.py │ │ └── calculator.py ├── 24_modules_packages │ └── 01_package_import_basic │ │ ├── web_scraper │ │ ├── __init__.py │ │ ├── crawler │ │ │ ├── page_parser.py │ │ │ └── __init__.py │ │ └── utils │ │ │ ├── helper.py │ │ │ └── __init__.py │ │ └── main.py ├── 08_delimiters │ └── main.py ├── 04_tokens │ └── main.py ├── 21_working_with_files │ ├── logs.txt │ ├── logs_backup.txt │ └── main.py ├── 13_iterations │ └── main.py ├── 27_virtual_environment │ ├── Pipfile │ └── pyproject.toml ├── 26_testing_your_code │ ├── name_function.py │ ├── name.py │ ├── test_name_function.py │ ├── survey_program.py │ ├── survey.py │ └── test_survey.py ├── 20_regular_expressions │ └── 01_basic_regular_expressions │ │ ├── problem1.2.py │ │ ├── problem2.6.py │ │ ├── problem2.4.py │ │ ├── problem2.0.py │ │ ├── problem1.1.py │ │ ├── problem2.3.py │ │ ├── problem3.0.py │ │ ├── problem3.1.py │ │ ├── problem2.9.py │ │ ├── problem2.5.py │ │ ├── problem2.7.py │ │ ├── problem1.6.py │ │ ├── problem1.8.py │ │ ├── problem2.8.py │ │ ├── problem1.4.py │ │ ├── problem3.2.py │ │ ├── problem1.9.py │ │ ├── problem2.1.py │ │ ├── problem1.3.py │ │ ├── problem2.2.py │ │ ├── problem1.7.py │ │ └── problem1.5.py ├── 05_identifiers │ └── main.py ├── 02_lines_and_indentation │ └── main.py ├── 09_literals │ └── main.py ├── 18_dict │ └── exercise.md ├── 11_variables_as_references │ └── main.py ├── 17_set │ └── exercise.md └── 12_decisions_statements │ └── main.py ├── 02_object_oriented_programming ├── 08_lambda_expression │ ├── cart │ │ ├── __init__.py │ │ ├── models.py │ │ ├── tests.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── urls.py │ │ ├── views.py │ │ ├── static │ │ │ └── styles.css │ │ └── templates │ │ │ └── product.html │ ├── ecommerce │ │ ├── __init__.py │ │ ├── asgi.py │ │ ├── wsgi.py │ │ └── urls.py │ └── manage.py ├── 04_interfaces │ ├── 06_Project_Video │ │ └── readme.md │ ├── 01_tightly_coupled_code │ │ └── main.py │ ├── 02_creating_an_interface │ │ └── main.py │ └── 04_what_is_dependency_injection │ │ ├── 01_constructor_injection │ │ └── main.py │ │ ├── 03_method_injection │ │ └── main.py │ │ └── 02_setter_injection │ │ └── main.py ├── 13_customizing_typechecker │ ├── mypy.ini │ └── 01_configuring_type_checker │ │ └── main.py ├── 10_python_types │ ├── 01_typing_system_in_python │ │ ├── script.js │ │ └── main.py │ ├── main.py │ └── 02_understanding_ducky_typing │ │ └── main.py ├── 15_async_programming │ ├── 05_event_loop │ │ └── main.py │ ├── 08_async_generators │ │ └── main.py │ ├── 09_async_comprehensions │ │ └── main.py │ ├── 04_coroutine │ │ └── main.py │ ├── 02_async_walk │ │ └── main.py │ ├── 01_truth_about_threads │ │ ├── main.py │ │ ├── file1.txt │ │ ├── file2.txt │ │ └── file3.txt │ └── 07_async_iterators │ │ └── main.py ├── 14_defining_our_own_type │ ├── 03_user_defined_classes │ │ └── hashim_transcript.pdf │ ├── 02_advance_anums │ │ └── main.py │ ├── 10_decorator │ │ └── main.py │ └── 11_pydantic │ │ └── main.py ├── 02_inheritance │ ├── 09_abstract_classes_and_methods │ │ ├── example.py │ │ └── main.py │ ├── 08_polymorphism │ │ ├── data.csv │ │ ├── data.json │ │ └── data.xml │ ├── 03_constructors_and_inheritance │ │ └── main.py │ ├── 04_overriding_methods │ │ └── main.py │ ├── 02_the_object_class │ │ └── main.py │ ├── 01_inheritance │ │ └── main.py │ └── 10_callable_object │ │ └── main.py ├── 11_type_annotations │ ├── 02_benefits_of_type_annotations │ │ └── main.py │ ├── 04_optional_type │ │ ├── failure.py │ │ ├── main.py │ │ ├── user.py │ │ └── pizza_making_with_return.py │ ├── 06_literals │ │ └── main.py │ ├── 05_union_type │ │ └── main.py │ ├── 09_final │ │ └── main.py │ ├── 07_annotated │ │ └── main.py │ ├── 01_type_annotations │ │ └── main.py │ └── 08_newtype │ │ └── main.py ├── 01_Classes │ ├── 02_creating_a_class │ │ └── main.py │ ├── 05_encapsulation │ │ └── main.py │ ├── 04_procedural_programming │ │ └── main.py │ ├── 07_abstraction │ │ ├── 02_coupling │ │ │ └── main.py │ │ ├── 01_coupling │ │ │ └── main.py │ │ └── 03_abstraction │ │ │ └── main.py │ ├── 01_what_is_classes │ │ └── main.py │ ├── 06_getter_and_setter │ │ └── main.py │ ├── 08_constructor │ │ └── main.py │ ├── 10_constructor_overloading │ │ └── main.py │ └── 09_default_arguments │ │ └── main.py └── 12_collection_types │ ├── 01_annotated_collections │ └── main.py │ └── 03_typed_dict │ ├── main.py │ └── typedict.py ├── 06_python_projects_for_beginners └── readme.md ├── 05_design_patterns ├── 02_solid_principles │ ├── 01_single_responsible_principle │ │ ├── report.txt │ │ └── main.py │ ├── 03_liskov_substitution_principle │ │ └── main.py │ ├── 05_dependency_inversion_principle │ │ └── main.py │ ├── 02_open_closed_principle │ │ └── main.py │ ├── 04_interface_segregation_principle │ │ └── main.py │ └── readme.md ├── 01_foundation_design_principles │ ├── 03_interface_not_implemented_principle │ │ ├── log.txt │ │ ├── interfaces_bis.py │ │ └── interfaces.py │ ├── 02_composition_over_inheritance_principle │ │ ├── composition.py │ │ └── computer_composition.py │ ├── 01_encapsulate_principle │ │ ├── encapsulate.py │ │ └── encapsulate_bis.py │ └── 04_loose_coupling_principle │ │ └── loose_coupling.py └── 03_creational_design_patterns │ └── 01_factory_design_pattern │ ├── factory_method.py │ └── movies.json ├── assests ├── python-logo.png └── python-logo-white-bg.png ├── 04_algorithms ├── 07_searching │ ├── images │ │ ├── 01.jpg │ │ ├── 02.jpg │ │ └── 03.jpg │ ├── unordered_linear_search.py │ └── search_ordered_list.py ├── 01_introducing_algorithm │ └── images │ │ └── 01.jpg ├── 02_analysis_of_an_algorithm │ └── images │ │ ├── 01.jpg │ │ ├── 02.jpg │ │ └── 03.jpg └── 06_alogorithm_design_techniques_and_strategies │ ├── 05_greedy_algorithm │ └── images │ │ ├── 01.jpg │ │ ├── 02.jpg │ │ ├── 03.jpg │ │ ├── 04.jpg │ │ ├── 05.jpg │ │ ├── 06.jpg │ │ ├── 07.jpg │ │ ├── 08.jpg │ │ ├── 09.jpg │ │ └── 10.jpg │ ├── 02_recursion_algorithm │ └── diagram │ │ ├── 01.jpg │ │ └── 02.png │ ├── 03_divide_and_conquer │ └── diagrams │ │ ├── 01.jpg │ │ ├── 02.jpg │ │ ├── 03.jpg │ │ └── 04.jpg │ └── 04_dynamic_programming_technique │ └── images │ ├── 01.jpg │ ├── 02.jpg │ └── 03.jpg ├── .gitignore ├── 03_data_structures ├── 02_linked_list │ ├── 01_array │ │ └── images │ │ │ └── 01.jpg │ └── 02_linked_list │ │ ├── images │ │ ├── 01.jpg │ │ ├── 02.jpg │ │ ├── 03.jpg │ │ └── 04.jpg │ │ ├── 01_singly_linked_list │ │ └── images │ │ │ ├── 01.jpg │ │ │ ├── 02.jpg │ │ │ ├── 03.jpg │ │ │ ├── 04.jpg │ │ │ ├── 05.jpg │ │ │ ├── 06.jpg │ │ │ ├── 07.jpg │ │ │ ├── 08.jpg │ │ │ └── 09.jpg │ │ ├── 02_doubly_linked_list │ │ └── images │ │ │ ├── 01.jpg │ │ │ ├── 02.jpg │ │ │ ├── 03.jpg │ │ │ ├── 04.jpg │ │ │ ├── 05.jpg │ │ │ ├── 06.jpg │ │ │ ├── 07.jpg │ │ │ ├── 08.jpg │ │ │ ├── 09.jpg │ │ │ ├── 10.jpg │ │ │ └── 11.jpg │ │ └── 03_circular_linked_list │ │ └── images │ │ ├── 01.jpg │ │ ├── 02.jpg │ │ ├── circular_doubly │ │ ├── 01.jpg │ │ ├── 02.png │ │ └── 03.png │ │ └── circular_singly │ │ ├── 01.jpg │ │ ├── 02.jpg │ │ ├── 03.jpg │ │ ├── 04.jpg │ │ └── 05.jpg ├── 04_trees │ ├── 02_binary_trees │ │ ├── images │ │ │ ├── 01.jpg │ │ │ ├── 02.jpg │ │ │ ├── 03.jpg │ │ │ ├── 04.jpg │ │ │ ├── 05.jpg │ │ │ ├── 06.jpg │ │ │ ├── 07.jpg │ │ │ ├── 08.jpg │ │ │ ├── 09.jpg │ │ │ ├── 10.jpg │ │ │ ├── 11.jpg │ │ │ ├── 12.jpg │ │ │ ├── 13.jpg │ │ │ ├── 14.jpg │ │ │ ├── 15.jpg │ │ │ ├── 16.jpg │ │ │ ├── 17.jpg │ │ │ ├── 18.jpg │ │ │ └── 19.jpg │ │ ├── postfix-expression-tree.py │ │ └── prefix-expression-tree.py │ ├── 03_binary_search_tree │ │ └── images │ │ │ ├── 01.jpg │ │ │ ├── 02.jpg │ │ │ ├── 03.jpg │ │ │ ├── 04.jpg │ │ │ ├── 05.jpg │ │ │ ├── 06.jpg │ │ │ ├── 07.jpg │ │ │ ├── 08.jpg │ │ │ ├── 09.jpg │ │ │ ├── 10.jpg │ │ │ ├── 11.jpg │ │ │ ├── 12.jpg │ │ │ ├── 13.jpg │ │ │ ├── 14.jpg │ │ │ ├── 15.jpg │ │ │ └── 16.jpg │ ├── 01_terminology_of_trees │ │ └── images │ │ │ └── 01.jpg │ └── readme.md ├── 03_stack_and_queues │ ├── 01_stack │ │ ├── images │ │ │ ├── 01.jpg │ │ │ ├── 02.jpg │ │ │ ├── 03.jpg │ │ │ ├── 04.jpg │ │ │ ├── 05.jpg │ │ │ ├── 06.jpg │ │ │ ├── 07.jpg │ │ │ ├── 08.jpg │ │ │ ├── 09.jpg │ │ │ └── 10.jpg │ │ ├── array-base-stack.py │ │ └── linkedlist-base-stack.py │ └── 03_queues │ │ └── images │ │ ├── 01.jpg │ │ ├── 02.jpg │ │ ├── 03.jpg │ │ ├── 04.jpg │ │ ├── 05.jpg │ │ ├── 06.jpg │ │ ├── 07.jpg │ │ ├── 08.jpg │ │ ├── 09.jpg │ │ ├── 10.jpg │ │ ├── 11.jpg │ │ ├── 12.jpg │ │ ├── 13.jpg │ │ ├── 14.jpg │ │ └── 15.jpg ├── 00_datatype_and_object_in_python │ └── images │ │ ├── 01.jpg │ │ ├── 02.jpg │ │ └── 03.jpg ├── 07_graphs_and_algorithms │ ├── graphs │ │ ├── images │ │ │ ├── 01.jpg │ │ │ ├── 02.jpg │ │ │ ├── 03.jpg │ │ │ ├── 04.jpg │ │ │ ├── 05.jpg │ │ │ ├── 06.jpg │ │ │ ├── 07.jpg │ │ │ ├── 08.jpg │ │ │ ├── 09.jpg │ │ │ ├── 10.jpg │ │ │ ├── 11.jpg │ │ │ ├── 12.jpg │ │ │ ├── 13.jpg │ │ │ ├── 14.jpg │ │ │ ├── 15.jpg │ │ │ ├── 16.jpg │ │ │ ├── 17.jpg │ │ │ ├── 18.jpg │ │ │ ├── 19.jpg │ │ │ ├── 20.jpg │ │ │ ├── 21.jpg │ │ │ ├── 22.jpg │ │ │ ├── 23.jpg │ │ │ ├── 24.jpg │ │ │ ├── 25.jpg │ │ │ ├── 26.jpg │ │ │ ├── 27.jpg │ │ │ ├── 28.jpg │ │ │ ├── 29.jpg │ │ │ ├── 30.jpg │ │ │ ├── 31.jpg │ │ │ ├── 32.jpg │ │ │ ├── 33.jpg │ │ │ ├── 34.jpg │ │ │ ├── 35.jpg │ │ │ ├── 36.jpg │ │ │ ├── 37.jpg │ │ │ └── 38.jpg │ │ ├── breadth_first_search.py │ │ ├── graph.py │ │ └── depth-first-search.py │ └── readme.md ├── 05_heaps_and_periority_queues │ ├── 01_heaps │ │ └── images │ │ │ ├── 01.jpg │ │ │ ├── 02.jpg │ │ │ ├── 03.jpg │ │ │ ├── 04.jpg │ │ │ ├── 05.jpg │ │ │ ├── 06.jpg │ │ │ ├── 07.jpg │ │ │ ├── 09.jpg │ │ │ ├── 10.jpg │ │ │ ├── 11.jpg │ │ │ ├── 12.jpg │ │ │ ├── 13.jpg │ │ │ ├── 14.jpg │ │ │ ├── 15.jpg │ │ │ ├── 16.jpg │ │ │ ├── 17.jpg │ │ │ ├── 18.jpg │ │ │ └── 19.jpg │ ├── 02_priority_queues │ │ ├── images │ │ │ ├── 00.jpg │ │ │ ├── 01.jpg │ │ │ └── 03.png │ │ ├── priority-queue-heap.py │ │ └── main.py │ └── readme.md └── 06_hash_tables │ └── 01_Introducing_hash_tables │ ├── images │ ├── 01.png │ ├── 02.jpg │ ├── 03.jpg │ ├── 04.jpg │ ├── 05.jpg │ ├── 06.jpg │ ├── 07.jpg │ ├── 08.jpg │ ├── 09.jpg │ ├── 10.jpg │ ├── 11.jpg │ ├── 12.jpg │ ├── 13.jpg │ └── 14.jpg │ └── main.py └── LICENSE /07_cpython/readme.md: -------------------------------------------------------------------------------- 1 | # Cpython -------------------------------------------------------------------------------- /01_python_fundamentals/07_operators/main.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /01_python_fundamentals/common_utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /01_python_fundamentals/22_scope/example.txt: -------------------------------------------------------------------------------- 1 | This is safe! -------------------------------------------------------------------------------- /02_object_oriented_programming/08_lambda_expression/cart/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /02_object_oriented_programming/08_lambda_expression/ecommerce/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /06_python_projects_for_beginners/readme.md: -------------------------------------------------------------------------------- 1 | # Python Projects For Beginners -------------------------------------------------------------------------------- /01_python_fundamentals/23_modules/04_module_search_path/mypackage/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /01_python_fundamentals/03_character_sets/main.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | print("こんにちは, 世界!") 3 | -------------------------------------------------------------------------------- /01_python_fundamentals/23_modules/04_module_search_path/01_extend_module/modules/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /01_python_fundamentals/23_modules/04_module_search_path/01_extend_module/common_utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /05_design_patterns/02_solid_principles/01_single_responsible_principle/report.txt: -------------------------------------------------------------------------------- 1 | This is the content. -------------------------------------------------------------------------------- /01_python_fundamentals/25_advance_module/02_data_hiding_in_modules/underscore_example.py: -------------------------------------------------------------------------------- 1 | a, _b, c, _d = 1, 2, 3, 4 -------------------------------------------------------------------------------- /01_python_fundamentals/25_advance_module/05_changig_the_module_search/main.py: -------------------------------------------------------------------------------- 1 | import sys 2 | print(sys.path) 3 | -------------------------------------------------------------------------------- /01_python_fundamentals/25_advance_module/03_enable_future_feature/main.py: -------------------------------------------------------------------------------- 1 | import __future__ 2 | print(dir(__future__)) -------------------------------------------------------------------------------- /assests/python-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/assests/python-logo.png -------------------------------------------------------------------------------- /01_python_fundamentals/23_modules/07_module_coding_basic/main.py: -------------------------------------------------------------------------------- 1 | import module1 2 | module1.printer("Hello world!") 3 | -------------------------------------------------------------------------------- /05_design_patterns/01_foundation_design_principles/03_interface_not_implemented_principle/log.txt: -------------------------------------------------------------------------------- 1 | File: A file log. 2 | -------------------------------------------------------------------------------- /01_python_fundamentals/23_modules/01_import_and_attributes/c.py: -------------------------------------------------------------------------------- 1 | # File: c.py 2 | 3 | def ham(text): 4 | print(f"{text} ham") 5 | -------------------------------------------------------------------------------- /01_python_fundamentals/23_modules/07_module_coding_basic/module1.py: -------------------------------------------------------------------------------- 1 | # File: module1.py 2 | 3 | def printer(x): 4 | print(x) 5 | -------------------------------------------------------------------------------- /01_python_fundamentals/23_modules/08_module_namespace/module2.py: -------------------------------------------------------------------------------- 1 | # File: module2.py 2 | name = "Muhammad Hashim" 3 | age = 24 4 | -------------------------------------------------------------------------------- /01_python_fundamentals/common_utils/helper.py: -------------------------------------------------------------------------------- 1 | # File: utils/helper.py 2 | 3 | def get_name(): 4 | return "Muhammad Hashim" 5 | -------------------------------------------------------------------------------- /01_python_fundamentals/23_modules/05_configuring_the_search_path/main.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | for path in sys.path: 4 | print(path) 5 | -------------------------------------------------------------------------------- /02_object_oriented_programming/08_lambda_expression/cart/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /02_object_oriented_programming/08_lambda_expression/cart/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /assests/python-logo-white-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/assests/python-logo-white-bg.png -------------------------------------------------------------------------------- /01_python_fundamentals/23_modules/04_module_search_path/01_extend_module/common_utils/helper.py: -------------------------------------------------------------------------------- 1 | def get_name(): 2 | return "Muhammad Hashim" -------------------------------------------------------------------------------- /02_object_oriented_programming/08_lambda_expression/cart/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /02_object_oriented_programming/04_interfaces/06_Project_Video/readme.md: -------------------------------------------------------------------------------- 1 | # Project Video Platform 2 | 3 | We will start to decouple to avoid dependencies -------------------------------------------------------------------------------- /04_algorithms/07_searching/images/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/04_algorithms/07_searching/images/01.jpg -------------------------------------------------------------------------------- /04_algorithms/07_searching/images/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/04_algorithms/07_searching/images/02.jpg -------------------------------------------------------------------------------- /04_algorithms/07_searching/images/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/04_algorithms/07_searching/images/03.jpg -------------------------------------------------------------------------------- /01_python_fundamentals/23_modules/06_sys_path/main.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | # Print out each path in sys.path 4 | for path in sys.path: 5 | print(path) 6 | -------------------------------------------------------------------------------- /01_python_fundamentals/25_advance_module/02_data_hiding_in_modules/module.py: -------------------------------------------------------------------------------- 1 | # __all__ = ['a', '_b'] 2 | 3 | a = 10 4 | _b = 20 5 | c = 30 6 | d = 40 7 | 8 | -------------------------------------------------------------------------------- /01_python_fundamentals/24_modules_packages/01_package_import_basic/web_scraper/__init__.py: -------------------------------------------------------------------------------- 1 | from web_scraper.crawler import parse_page 2 | 3 | __all__ = ["parse_page"] -------------------------------------------------------------------------------- /02_object_oriented_programming/13_customizing_typechecker/mypy.ini: -------------------------------------------------------------------------------- 1 | [mypy] 2 | python_version = 3.12 3 | warn_return_any = True 4 | disallow_untyped_defs = True 5 | 6 | -------------------------------------------------------------------------------- /01_python_fundamentals/23_modules/01_import_and_attributes/main.py: -------------------------------------------------------------------------------- 1 | # File: main.py 2 | 3 | import b 4 | 5 | b.spam("Muhammad Hashim") 6 | print(b.version) # Outputs: 1.0 7 | -------------------------------------------------------------------------------- /01_python_fundamentals/23_modules/09_reloading_modules/changer.py: -------------------------------------------------------------------------------- 1 | # File: changer.py 2 | message = "After editing" 3 | 4 | def printer(): 5 | print("reloaded:", message) 6 | -------------------------------------------------------------------------------- /04_algorithms/01_introducing_algorithm/images/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/04_algorithms/01_introducing_algorithm/images/01.jpg -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vscode/ 3 | __pycache__/ 4 | migrations/ 5 | *.bak 6 | *.dat 7 | *.dir 8 | .mypy_cache/ 9 | .pytest_cache/ 10 | envs/ 11 | db.sqlite3 12 | readme.txt -------------------------------------------------------------------------------- /02_object_oriented_programming/10_python_types/01_typing_system_in_python/script.js: -------------------------------------------------------------------------------- 1 | console.log([] + {}); // Output: "[object Object]" 2 | console.log({} + []); // Output: 0 3 | -------------------------------------------------------------------------------- /04_algorithms/02_analysis_of_an_algorithm/images/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/04_algorithms/02_analysis_of_an_algorithm/images/01.jpg -------------------------------------------------------------------------------- /04_algorithms/02_analysis_of_an_algorithm/images/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/04_algorithms/02_analysis_of_an_algorithm/images/02.jpg -------------------------------------------------------------------------------- /04_algorithms/02_analysis_of_an_algorithm/images/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/04_algorithms/02_analysis_of_an_algorithm/images/03.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/01_array/images/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/01_array/images/01.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/02_binary_trees/images/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/02_binary_trees/images/01.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/02_binary_trees/images/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/02_binary_trees/images/02.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/02_binary_trees/images/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/02_binary_trees/images/03.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/02_binary_trees/images/04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/02_binary_trees/images/04.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/02_binary_trees/images/05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/02_binary_trees/images/05.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/02_binary_trees/images/06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/02_binary_trees/images/06.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/02_binary_trees/images/07.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/02_binary_trees/images/07.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/02_binary_trees/images/08.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/02_binary_trees/images/08.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/02_binary_trees/images/09.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/02_binary_trees/images/09.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/02_binary_trees/images/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/02_binary_trees/images/10.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/02_binary_trees/images/11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/02_binary_trees/images/11.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/02_binary_trees/images/12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/02_binary_trees/images/12.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/02_binary_trees/images/13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/02_binary_trees/images/13.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/02_binary_trees/images/14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/02_binary_trees/images/14.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/02_binary_trees/images/15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/02_binary_trees/images/15.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/02_binary_trees/images/16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/02_binary_trees/images/16.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/02_binary_trees/images/17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/02_binary_trees/images/17.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/02_binary_trees/images/18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/02_binary_trees/images/18.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/02_binary_trees/images/19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/02_binary_trees/images/19.jpg -------------------------------------------------------------------------------- /01_python_fundamentals/23_modules/08_module_namespace/module_example.py: -------------------------------------------------------------------------------- 1 | # module_example.py 2 | print("Module is loading...") 3 | x = 5 4 | y = [1, 2, 3] 5 | print("Module is ended.") 6 | 7 | -------------------------------------------------------------------------------- /01_python_fundamentals/08_delimiters/main.py: -------------------------------------------------------------------------------- 1 | # This is a comment 2 | 3 | text = "Hello, World!" # Double quotes for string 4 | path = 'C:\\Users\\Hashim\\Documents' # Escape character in string -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/images/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/images/01.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/images/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/images/02.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/images/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/images/03.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/images/04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/images/04.jpg -------------------------------------------------------------------------------- /03_data_structures/03_stack_and_queues/01_stack/images/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/03_stack_and_queues/01_stack/images/01.jpg -------------------------------------------------------------------------------- /03_data_structures/03_stack_and_queues/01_stack/images/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/03_stack_and_queues/01_stack/images/02.jpg -------------------------------------------------------------------------------- /03_data_structures/03_stack_and_queues/01_stack/images/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/03_stack_and_queues/01_stack/images/03.jpg -------------------------------------------------------------------------------- /03_data_structures/03_stack_and_queues/01_stack/images/04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/03_stack_and_queues/01_stack/images/04.jpg -------------------------------------------------------------------------------- /03_data_structures/03_stack_and_queues/01_stack/images/05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/03_stack_and_queues/01_stack/images/05.jpg -------------------------------------------------------------------------------- /03_data_structures/03_stack_and_queues/01_stack/images/06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/03_stack_and_queues/01_stack/images/06.jpg -------------------------------------------------------------------------------- /03_data_structures/03_stack_and_queues/01_stack/images/07.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/03_stack_and_queues/01_stack/images/07.jpg -------------------------------------------------------------------------------- /03_data_structures/03_stack_and_queues/01_stack/images/08.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/03_stack_and_queues/01_stack/images/08.jpg -------------------------------------------------------------------------------- /03_data_structures/03_stack_and_queues/01_stack/images/09.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/03_stack_and_queues/01_stack/images/09.jpg -------------------------------------------------------------------------------- /03_data_structures/03_stack_and_queues/01_stack/images/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/03_stack_and_queues/01_stack/images/10.jpg -------------------------------------------------------------------------------- /03_data_structures/03_stack_and_queues/03_queues/images/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/03_stack_and_queues/03_queues/images/01.jpg -------------------------------------------------------------------------------- /03_data_structures/03_stack_and_queues/03_queues/images/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/03_stack_and_queues/03_queues/images/02.jpg -------------------------------------------------------------------------------- /03_data_structures/03_stack_and_queues/03_queues/images/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/03_stack_and_queues/03_queues/images/03.jpg -------------------------------------------------------------------------------- /03_data_structures/03_stack_and_queues/03_queues/images/04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/03_stack_and_queues/03_queues/images/04.jpg -------------------------------------------------------------------------------- /03_data_structures/03_stack_and_queues/03_queues/images/05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/03_stack_and_queues/03_queues/images/05.jpg -------------------------------------------------------------------------------- /03_data_structures/03_stack_and_queues/03_queues/images/06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/03_stack_and_queues/03_queues/images/06.jpg -------------------------------------------------------------------------------- /03_data_structures/03_stack_and_queues/03_queues/images/07.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/03_stack_and_queues/03_queues/images/07.jpg -------------------------------------------------------------------------------- /03_data_structures/03_stack_and_queues/03_queues/images/08.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/03_stack_and_queues/03_queues/images/08.jpg -------------------------------------------------------------------------------- /03_data_structures/03_stack_and_queues/03_queues/images/09.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/03_stack_and_queues/03_queues/images/09.jpg -------------------------------------------------------------------------------- /03_data_structures/03_stack_and_queues/03_queues/images/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/03_stack_and_queues/03_queues/images/10.jpg -------------------------------------------------------------------------------- /03_data_structures/03_stack_and_queues/03_queues/images/11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/03_stack_and_queues/03_queues/images/11.jpg -------------------------------------------------------------------------------- /03_data_structures/03_stack_and_queues/03_queues/images/12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/03_stack_and_queues/03_queues/images/12.jpg -------------------------------------------------------------------------------- /03_data_structures/03_stack_and_queues/03_queues/images/13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/03_stack_and_queues/03_queues/images/13.jpg -------------------------------------------------------------------------------- /03_data_structures/03_stack_and_queues/03_queues/images/14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/03_stack_and_queues/03_queues/images/14.jpg -------------------------------------------------------------------------------- /03_data_structures/03_stack_and_queues/03_queues/images/15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/03_stack_and_queues/03_queues/images/15.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/03_binary_search_tree/images/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/03_binary_search_tree/images/01.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/03_binary_search_tree/images/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/03_binary_search_tree/images/02.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/03_binary_search_tree/images/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/03_binary_search_tree/images/03.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/03_binary_search_tree/images/04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/03_binary_search_tree/images/04.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/03_binary_search_tree/images/05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/03_binary_search_tree/images/05.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/03_binary_search_tree/images/06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/03_binary_search_tree/images/06.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/03_binary_search_tree/images/07.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/03_binary_search_tree/images/07.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/03_binary_search_tree/images/08.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/03_binary_search_tree/images/08.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/03_binary_search_tree/images/09.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/03_binary_search_tree/images/09.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/03_binary_search_tree/images/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/03_binary_search_tree/images/10.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/03_binary_search_tree/images/11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/03_binary_search_tree/images/11.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/03_binary_search_tree/images/12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/03_binary_search_tree/images/12.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/03_binary_search_tree/images/13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/03_binary_search_tree/images/13.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/03_binary_search_tree/images/14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/03_binary_search_tree/images/14.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/03_binary_search_tree/images/15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/03_binary_search_tree/images/15.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/03_binary_search_tree/images/16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/03_binary_search_tree/images/16.jpg -------------------------------------------------------------------------------- /03_data_structures/00_datatype_and_object_in_python/images/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/00_datatype_and_object_in_python/images/01.jpg -------------------------------------------------------------------------------- /03_data_structures/00_datatype_and_object_in_python/images/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/00_datatype_and_object_in_python/images/02.jpg -------------------------------------------------------------------------------- /03_data_structures/00_datatype_and_object_in_python/images/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/00_datatype_and_object_in_python/images/03.jpg -------------------------------------------------------------------------------- /03_data_structures/04_trees/01_terminology_of_trees/images/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/04_trees/01_terminology_of_trees/images/01.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/01.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/02.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/03.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/04.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/05.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/06.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/07.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/07.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/08.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/08.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/09.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/09.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/10.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/11.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/12.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/13.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/14.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/15.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/16.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/17.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/18.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/19.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/20.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/20.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/21.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/21.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/22.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/22.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/23.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/23.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/24.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/24.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/25.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/25.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/26.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/26.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/27.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/27.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/28.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/28.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/29.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/29.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/30.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/30.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/31.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/31.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/32.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/32.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/33.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/33.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/34.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/34.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/35.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/35.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/36.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/36.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/37.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/37.jpg -------------------------------------------------------------------------------- /03_data_structures/07_graphs_and_algorithms/graphs/images/38.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/07_graphs_and_algorithms/graphs/images/38.jpg -------------------------------------------------------------------------------- /02_object_oriented_programming/15_async_programming/05_event_loop/main.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | 3 | def get_loop(): 4 | loop = asyncio.get_event_loop() 5 | print(f"Event loop: {loop}") 6 | 7 | get_loop() 8 | -------------------------------------------------------------------------------- /03_data_structures/05_heaps_and_periority_queues/01_heaps/images/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/05_heaps_and_periority_queues/01_heaps/images/01.jpg -------------------------------------------------------------------------------- /03_data_structures/05_heaps_and_periority_queues/01_heaps/images/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/05_heaps_and_periority_queues/01_heaps/images/02.jpg -------------------------------------------------------------------------------- /03_data_structures/05_heaps_and_periority_queues/01_heaps/images/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/05_heaps_and_periority_queues/01_heaps/images/03.jpg -------------------------------------------------------------------------------- /03_data_structures/05_heaps_and_periority_queues/01_heaps/images/04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/05_heaps_and_periority_queues/01_heaps/images/04.jpg -------------------------------------------------------------------------------- /03_data_structures/05_heaps_and_periority_queues/01_heaps/images/05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/05_heaps_and_periority_queues/01_heaps/images/05.jpg -------------------------------------------------------------------------------- /03_data_structures/05_heaps_and_periority_queues/01_heaps/images/06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/05_heaps_and_periority_queues/01_heaps/images/06.jpg -------------------------------------------------------------------------------- /03_data_structures/05_heaps_and_periority_queues/01_heaps/images/07.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/05_heaps_and_periority_queues/01_heaps/images/07.jpg -------------------------------------------------------------------------------- /03_data_structures/05_heaps_and_periority_queues/01_heaps/images/09.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/05_heaps_and_periority_queues/01_heaps/images/09.jpg -------------------------------------------------------------------------------- /03_data_structures/05_heaps_and_periority_queues/01_heaps/images/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/05_heaps_and_periority_queues/01_heaps/images/10.jpg -------------------------------------------------------------------------------- /03_data_structures/05_heaps_and_periority_queues/01_heaps/images/11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/05_heaps_and_periority_queues/01_heaps/images/11.jpg -------------------------------------------------------------------------------- /03_data_structures/05_heaps_and_periority_queues/01_heaps/images/12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/05_heaps_and_periority_queues/01_heaps/images/12.jpg -------------------------------------------------------------------------------- /03_data_structures/05_heaps_and_periority_queues/01_heaps/images/13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/05_heaps_and_periority_queues/01_heaps/images/13.jpg -------------------------------------------------------------------------------- /03_data_structures/05_heaps_and_periority_queues/01_heaps/images/14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/05_heaps_and_periority_queues/01_heaps/images/14.jpg -------------------------------------------------------------------------------- /03_data_structures/05_heaps_and_periority_queues/01_heaps/images/15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/05_heaps_and_periority_queues/01_heaps/images/15.jpg -------------------------------------------------------------------------------- /03_data_structures/05_heaps_and_periority_queues/01_heaps/images/16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/05_heaps_and_periority_queues/01_heaps/images/16.jpg -------------------------------------------------------------------------------- /03_data_structures/05_heaps_and_periority_queues/01_heaps/images/17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/05_heaps_and_periority_queues/01_heaps/images/17.jpg -------------------------------------------------------------------------------- /03_data_structures/05_heaps_and_periority_queues/01_heaps/images/18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/05_heaps_and_periority_queues/01_heaps/images/18.jpg -------------------------------------------------------------------------------- /03_data_structures/05_heaps_and_periority_queues/01_heaps/images/19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/05_heaps_and_periority_queues/01_heaps/images/19.jpg -------------------------------------------------------------------------------- /01_python_fundamentals/04_tokens/main.py: -------------------------------------------------------------------------------- 1 | # Incorrect: Python would parse 'ifx' as a single identifier 2 | ifx = 10 3 | 4 | # Correct: Adding whitespace to separate 'if' and 'x' 5 | # if x == 10: 6 | # print("x is 10") -------------------------------------------------------------------------------- /03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/01.png -------------------------------------------------------------------------------- /03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/02.jpg -------------------------------------------------------------------------------- /03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/03.jpg -------------------------------------------------------------------------------- /03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/04.jpg -------------------------------------------------------------------------------- /03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/05.jpg -------------------------------------------------------------------------------- /03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/06.jpg -------------------------------------------------------------------------------- /03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/07.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/07.jpg -------------------------------------------------------------------------------- /03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/08.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/08.jpg -------------------------------------------------------------------------------- /03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/09.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/09.jpg -------------------------------------------------------------------------------- /03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/10.jpg -------------------------------------------------------------------------------- /03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/11.jpg -------------------------------------------------------------------------------- /03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/12.jpg -------------------------------------------------------------------------------- /03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/13.jpg -------------------------------------------------------------------------------- /03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/06_hash_tables/01_Introducing_hash_tables/images/14.jpg -------------------------------------------------------------------------------- /01_python_fundamentals/24_modules_packages/01_package_import_basic/web_scraper/crawler/page_parser.py: -------------------------------------------------------------------------------- 1 | # File: web_scraper/crawler/page_parser.py 2 | 3 | def parse_page(html): 4 | return f"Parsed content from: {html}" 5 | -------------------------------------------------------------------------------- /01_python_fundamentals/25_advance_module/04_mixed_usage_modes/main.py: -------------------------------------------------------------------------------- 1 | import greetings 2 | 3 | # Another script or interactive shell 4 | from calculator import add 5 | 6 | result = add(7, 3) 7 | print("7 + 3 =", result) 8 | -------------------------------------------------------------------------------- /02_object_oriented_programming/08_lambda_expression/cart/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class CartConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'cart' 7 | -------------------------------------------------------------------------------- /01_python_fundamentals/21_working_with_files/logs.txt: -------------------------------------------------------------------------------- 1 | [2024-10-08 12:00:00] System started 2 | [2024-10-08 12:05:00] User logged in 3 | [2024-10-08 12:10:30] User accessed settings 4 | [2024-10-08 12:15:45] User logged out 5 | 6 | -------------------------------------------------------------------------------- /02_object_oriented_programming/13_customizing_typechecker/01_configuring_type_checker/main.py: -------------------------------------------------------------------------------- 1 | def add_numbers(a, b): 2 | return a + b 3 | 4 | result = add_numbers(5, 10) # Ab yeh sirf integers accept karega 5 | print(result) 6 | -------------------------------------------------------------------------------- /03_data_structures/05_heaps_and_periority_queues/02_priority_queues/images/00.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/05_heaps_and_periority_queues/02_priority_queues/images/00.jpg -------------------------------------------------------------------------------- /03_data_structures/05_heaps_and_periority_queues/02_priority_queues/images/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/05_heaps_and_periority_queues/02_priority_queues/images/01.jpg -------------------------------------------------------------------------------- /03_data_structures/05_heaps_and_periority_queues/02_priority_queues/images/03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/05_heaps_and_periority_queues/02_priority_queues/images/03.png -------------------------------------------------------------------------------- /01_python_fundamentals/23_modules/03_byte_code/my_module.py: -------------------------------------------------------------------------------- 1 | # File: my_module.py 2 | 3 | def greet(name): 4 | print(f"Hello, {name}! Welcome to Python 3.12.") 5 | 6 | # Example usage (uncomment to test) 7 | # greet("Muhammad Hashim") 8 | -------------------------------------------------------------------------------- /01_python_fundamentals/25_advance_module/02_data_hiding_in_modules/main.py: -------------------------------------------------------------------------------- 1 | from module import * 2 | from underscore_example import * 3 | print(a, c) # Outputs: 1 3 4 | print(_b) # Raises NameError 5 | print(a) # Works 6 | # print(_b) -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/01_singly_linked_list/images/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/01_singly_linked_list/images/01.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/01_singly_linked_list/images/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/01_singly_linked_list/images/02.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/01_singly_linked_list/images/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/01_singly_linked_list/images/03.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/01_singly_linked_list/images/04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/01_singly_linked_list/images/04.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/01_singly_linked_list/images/05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/01_singly_linked_list/images/05.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/01_singly_linked_list/images/06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/01_singly_linked_list/images/06.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/01_singly_linked_list/images/07.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/01_singly_linked_list/images/07.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/01_singly_linked_list/images/08.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/01_singly_linked_list/images/08.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/01_singly_linked_list/images/09.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/01_singly_linked_list/images/09.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/02_doubly_linked_list/images/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/02_doubly_linked_list/images/01.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/02_doubly_linked_list/images/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/02_doubly_linked_list/images/02.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/02_doubly_linked_list/images/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/02_doubly_linked_list/images/03.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/02_doubly_linked_list/images/04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/02_doubly_linked_list/images/04.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/02_doubly_linked_list/images/05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/02_doubly_linked_list/images/05.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/02_doubly_linked_list/images/06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/02_doubly_linked_list/images/06.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/02_doubly_linked_list/images/07.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/02_doubly_linked_list/images/07.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/02_doubly_linked_list/images/08.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/02_doubly_linked_list/images/08.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/02_doubly_linked_list/images/09.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/02_doubly_linked_list/images/09.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/02_doubly_linked_list/images/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/02_doubly_linked_list/images/10.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/02_doubly_linked_list/images/11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/02_doubly_linked_list/images/11.jpg -------------------------------------------------------------------------------- /01_python_fundamentals/23_modules/01_import_and_attributes/b.py: -------------------------------------------------------------------------------- 1 | # File: b.py 2 | import c 3 | 4 | 5 | version = "1.0" 6 | 7 | def spam(text): 8 | print(f"{text} spam") 9 | 10 | 11 | def spam(text): 12 | c.ham(text) 13 | -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/03_circular_linked_list/images/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/03_circular_linked_list/images/01.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/03_circular_linked_list/images/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/03_circular_linked_list/images/02.jpg -------------------------------------------------------------------------------- /01_python_fundamentals/24_modules_packages/01_package_import_basic/web_scraper/utils/helper.py: -------------------------------------------------------------------------------- 1 | # File: web_scraper/utils/helper.py 2 | 3 | def clean_html(html): 4 | return html.strip() 5 | 6 | def format_url(url): 7 | return url.lower() 8 | -------------------------------------------------------------------------------- /04_algorithms/06_alogorithm_design_techniques_and_strategies/05_greedy_algorithm/images/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/04_algorithms/06_alogorithm_design_techniques_and_strategies/05_greedy_algorithm/images/01.jpg -------------------------------------------------------------------------------- /04_algorithms/06_alogorithm_design_techniques_and_strategies/05_greedy_algorithm/images/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/04_algorithms/06_alogorithm_design_techniques_and_strategies/05_greedy_algorithm/images/02.jpg -------------------------------------------------------------------------------- /04_algorithms/06_alogorithm_design_techniques_and_strategies/05_greedy_algorithm/images/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/04_algorithms/06_alogorithm_design_techniques_and_strategies/05_greedy_algorithm/images/03.jpg -------------------------------------------------------------------------------- /04_algorithms/06_alogorithm_design_techniques_and_strategies/05_greedy_algorithm/images/04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/04_algorithms/06_alogorithm_design_techniques_and_strategies/05_greedy_algorithm/images/04.jpg -------------------------------------------------------------------------------- /04_algorithms/06_alogorithm_design_techniques_and_strategies/05_greedy_algorithm/images/05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/04_algorithms/06_alogorithm_design_techniques_and_strategies/05_greedy_algorithm/images/05.jpg -------------------------------------------------------------------------------- /04_algorithms/06_alogorithm_design_techniques_and_strategies/05_greedy_algorithm/images/06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/04_algorithms/06_alogorithm_design_techniques_and_strategies/05_greedy_algorithm/images/06.jpg -------------------------------------------------------------------------------- /04_algorithms/06_alogorithm_design_techniques_and_strategies/05_greedy_algorithm/images/07.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/04_algorithms/06_alogorithm_design_techniques_and_strategies/05_greedy_algorithm/images/07.jpg -------------------------------------------------------------------------------- /04_algorithms/06_alogorithm_design_techniques_and_strategies/05_greedy_algorithm/images/08.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/04_algorithms/06_alogorithm_design_techniques_and_strategies/05_greedy_algorithm/images/08.jpg -------------------------------------------------------------------------------- /04_algorithms/06_alogorithm_design_techniques_and_strategies/05_greedy_algorithm/images/09.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/04_algorithms/06_alogorithm_design_techniques_and_strategies/05_greedy_algorithm/images/09.jpg -------------------------------------------------------------------------------- /04_algorithms/06_alogorithm_design_techniques_and_strategies/05_greedy_algorithm/images/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/04_algorithms/06_alogorithm_design_techniques_and_strategies/05_greedy_algorithm/images/10.jpg -------------------------------------------------------------------------------- /04_algorithms/06_alogorithm_design_techniques_and_strategies/02_recursion_algorithm/diagram/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/04_algorithms/06_alogorithm_design_techniques_and_strategies/02_recursion_algorithm/diagram/01.jpg -------------------------------------------------------------------------------- /04_algorithms/06_alogorithm_design_techniques_and_strategies/02_recursion_algorithm/diagram/02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/04_algorithms/06_alogorithm_design_techniques_and_strategies/02_recursion_algorithm/diagram/02.png -------------------------------------------------------------------------------- /04_algorithms/06_alogorithm_design_techniques_and_strategies/03_divide_and_conquer/diagrams/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/04_algorithms/06_alogorithm_design_techniques_and_strategies/03_divide_and_conquer/diagrams/01.jpg -------------------------------------------------------------------------------- /04_algorithms/06_alogorithm_design_techniques_and_strategies/03_divide_and_conquer/diagrams/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/04_algorithms/06_alogorithm_design_techniques_and_strategies/03_divide_and_conquer/diagrams/02.jpg -------------------------------------------------------------------------------- /04_algorithms/06_alogorithm_design_techniques_and_strategies/03_divide_and_conquer/diagrams/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/04_algorithms/06_alogorithm_design_techniques_and_strategies/03_divide_and_conquer/diagrams/03.jpg -------------------------------------------------------------------------------- /04_algorithms/06_alogorithm_design_techniques_and_strategies/03_divide_and_conquer/diagrams/04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/04_algorithms/06_alogorithm_design_techniques_and_strategies/03_divide_and_conquer/diagrams/04.jpg -------------------------------------------------------------------------------- /01_python_fundamentals/23_modules/04_module_search_path/mypackage/my_module.py: -------------------------------------------------------------------------------- 1 | # File: mypackage/my_module.py 2 | 3 | def greet(name): 4 | print(f"Hello, {name}! Welcome to Python modules.") 5 | 6 | def farewell(name): 7 | print(f"Goodbye, {name}! Happy coding.") 8 | -------------------------------------------------------------------------------- /01_python_fundamentals/25_advance_module/04_mixed_usage_modes/greetings.py: -------------------------------------------------------------------------------- 1 | # File: greetings.py 2 | 3 | def say_hello(): 4 | print("Hello, World!") 5 | 6 | if __name__ == "__main__": 7 | # This will only run if the script is executed directly 8 | say_hello() 9 | -------------------------------------------------------------------------------- /02_object_oriented_programming/14_defining_our_own_type/03_user_defined_classes/hashim_transcript.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/02_object_oriented_programming/14_defining_our_own_type/03_user_defined_classes/hashim_transcript.pdf -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/03_circular_linked_list/images/circular_doubly/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/03_circular_linked_list/images/circular_doubly/01.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/03_circular_linked_list/images/circular_doubly/02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/03_circular_linked_list/images/circular_doubly/02.png -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/03_circular_linked_list/images/circular_doubly/03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/03_circular_linked_list/images/circular_doubly/03.png -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/03_circular_linked_list/images/circular_singly/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/03_circular_linked_list/images/circular_singly/01.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/03_circular_linked_list/images/circular_singly/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/03_circular_linked_list/images/circular_singly/02.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/03_circular_linked_list/images/circular_singly/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/03_circular_linked_list/images/circular_singly/03.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/03_circular_linked_list/images/circular_singly/04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/03_circular_linked_list/images/circular_singly/04.jpg -------------------------------------------------------------------------------- /03_data_structures/02_linked_list/02_linked_list/03_circular_linked_list/images/circular_singly/05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/03_data_structures/02_linked_list/02_linked_list/03_circular_linked_list/images/circular_singly/05.jpg -------------------------------------------------------------------------------- /01_python_fundamentals/23_modules/04_module_search_path/01_extend_module/modules/main.py: -------------------------------------------------------------------------------- 1 | import user 2 | import sys 3 | 4 | for path in sys.path: 5 | print(path) 6 | 7 | 8 | import helper 9 | name = helper.get_name() 10 | myname = user.username(name) 11 | print(myname) -------------------------------------------------------------------------------- /04_algorithms/06_alogorithm_design_techniques_and_strategies/04_dynamic_programming_technique/images/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/04_algorithms/06_alogorithm_design_techniques_and_strategies/04_dynamic_programming_technique/images/01.jpg -------------------------------------------------------------------------------- /04_algorithms/06_alogorithm_design_techniques_and_strategies/04_dynamic_programming_technique/images/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/04_algorithms/06_alogorithm_design_techniques_and_strategies/04_dynamic_programming_technique/images/02.jpg -------------------------------------------------------------------------------- /04_algorithms/06_alogorithm_design_techniques_and_strategies/04_dynamic_programming_technique/images/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HashimThePassionate/Python-Deep-Dive/HEAD/04_algorithms/06_alogorithm_design_techniques_and_strategies/04_dynamic_programming_technique/images/03.jpg -------------------------------------------------------------------------------- /01_python_fundamentals/24_modules_packages/01_package_import_basic/web_scraper/utils/__init__.py: -------------------------------------------------------------------------------- 1 | # File: web_scraper/utils/__init__.py 2 | 3 | from .helper import clean_html, format_url 4 | 5 | __all__ = ["clean_html", "format_url"] # Defines what can be imported using 'from utils import *' 6 | -------------------------------------------------------------------------------- /02_object_oriented_programming/08_lambda_expression/cart/urls.py: -------------------------------------------------------------------------------- 1 | # urls.py 2 | from django.urls import path 3 | from . import views 4 | 5 | urlpatterns = [ 6 | path('', views.products_view, name='products'), 7 | path('calculate_total/', views.calculate_total, name='calculate_total'), 8 | ] 9 | -------------------------------------------------------------------------------- /01_python_fundamentals/13_iterations/main.py: -------------------------------------------------------------------------------- 1 | no = int(input("Please Enter Table no: ")) 2 | i = 1 3 | print(f'{no} x {i} = {no * i}') 4 | i += 1 5 | print(f'{no} x {i} = {no * i}') 6 | i += 1 7 | print(f'{no} x {i} = {no * i}') 8 | i += 1 9 | print(f'{no} x {i} = {no * i}') 10 | i += 1 11 | -------------------------------------------------------------------------------- /01_python_fundamentals/21_working_with_files/logs_backup.txt: -------------------------------------------------------------------------------- 1 | [2024-10-08 12:00:00] System started 2 | [2024-10-08 12:05:00] User logged in 3 | [2024-10-08 12:10:30] User accessed settings 4 | [2024-10-08 12:15:45] User logged out 5 | [2024-10-10 14:48:36] User logged in 6 | [2024-10-10 14:48:36] User updated settings 7 | -------------------------------------------------------------------------------- /01_python_fundamentals/23_modules/08_module_namespace/main.py: -------------------------------------------------------------------------------- 1 | import module2, module_example 2 | print(module2.name) # Outputs: Muhammad Hashim 3 | print(module2.age) # Outputs: 24 4 | 5 | print(dir(module2)) 6 | print(module2.__dict__.keys()) 7 | 8 | 9 | print(module_example.x) 10 | print(module_example.y) -------------------------------------------------------------------------------- /01_python_fundamentals/27_virtual_environment/Pipfile: -------------------------------------------------------------------------------- 1 | [[source]] 2 | url = "https://pypi.org/simple" 3 | verify_ssl = true 4 | name = "pypi" 5 | 6 | [packages] 7 | django = "==5.2" 8 | asgiref = "*" 9 | sqlparse = "*" 10 | tzdata = "*" 11 | 12 | [dev-packages] 13 | 14 | [requires] 15 | python_version = "3.12" 16 | -------------------------------------------------------------------------------- /01_python_fundamentals/24_modules_packages/01_package_import_basic/web_scraper/crawler/__init__.py: -------------------------------------------------------------------------------- 1 | # File: web_scraper/crawler/__init__.py 2 | 3 | from .page_parser import parse_page 4 | 5 | 6 | __all__ = ["parse_page"] 7 | 8 | # Initialize any settings needed for the crawler package 9 | print("Crawler package loaded!") 10 | -------------------------------------------------------------------------------- /01_python_fundamentals/26_testing_your_code/name_function.py: -------------------------------------------------------------------------------- 1 | # name_function.py 2 | 3 | def get_formatted_name(first, last, middle=''): 4 | """Generate a neatly formatted full name.""" 5 | if middle: 6 | full_name = f"{first} {middle} {last}" 7 | else: 8 | full_name = f"{first} {last}" 9 | return full_name.title() -------------------------------------------------------------------------------- /01_python_fundamentals/22_scope/main.py: -------------------------------------------------------------------------------- 1 | import builtins 2 | 3 | # Safely using built-ins after overriding 4 | open = "Overridden Open" # Overrides the built-in open 5 | print(open) # Prints the string 6 | 7 | # Access the original built-in open 8 | with builtins.open("example.txt", "w") as file: 9 | file.write("This is safe!") 10 | -------------------------------------------------------------------------------- /02_object_oriented_programming/02_inheritance/09_abstract_classes_and_methods/example.py: -------------------------------------------------------------------------------- 1 | from abc import ABCMeta, abstractmethod 2 | 3 | class MyABC(metaclass=ABCMeta): 4 | @abstractmethod 5 | def my_abstract_method(self): 6 | pass 7 | 8 | 9 | my = MyABC() # TypeError: Can't instantiate abstract class MyABC with abstract methods -------------------------------------------------------------------------------- /01_python_fundamentals/20_regular_expressions/01_basic_regular_expressions/problem1.2.py: -------------------------------------------------------------------------------- 1 | import re 2 | nonprintable_string = "\a\x1B\f\n\r\t\v" 3 | pattern = r"\a\x1B\f\n\r\t\v" 4 | if re.fullmatch(pattern, nonprintable_string): 5 | print("The text matches the pattern exactly! ✅") 6 | else: 7 | print("The text does not match the pattern. ❌") 8 | -------------------------------------------------------------------------------- /02_object_oriented_programming/02_inheritance/08_polymorphism/data.csv: -------------------------------------------------------------------------------- 1 | name,age,city,hobbies,passion,career 2 | Muhammad Hashim,24,Islamabad,"Coffee, Mountain trips","Software Engineering","Python Instructor" 3 | Ibrahim,23,Islamabad,"Reading, Fitness","Finance","Financial Analyst" 4 | Hafiz,23,Lahore,"Gaming, Travel","Mechanical Engineering","Engineer" 5 | -------------------------------------------------------------------------------- /01_python_fundamentals/20_regular_expressions/01_basic_regular_expressions/problem2.6.py: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | # Sample text with bold tags 4 | text = "My cat is furry" 5 | 6 | # Regex pattern with lookbehind and lookahead 7 | regex_pattern = r"(?<=)\w+(?=)" 8 | 9 | # Find matches 10 | matches = re.findall(regex_pattern, text) 11 | print("Matches:", matches) -------------------------------------------------------------------------------- /02_object_oriented_programming/10_python_types/main.py: -------------------------------------------------------------------------------- 1 | from ctypes import string_at 2 | from sys import getsizeof 3 | from binascii import hexlify 4 | 5 | a = 0b01010000_01000001_01010100 # Binary number 6 | print(a) # Output: 5259604 7 | 8 | text = "PAT" 9 | print(string_at(id(text), getsizeof(text))) 10 | print(hexlify(string_at(id(text), getsizeof(text)))) 11 | -------------------------------------------------------------------------------- /02_object_oriented_programming/11_type_annotations/02_benefits_of_type_annotations/main.py: -------------------------------------------------------------------------------- 1 | # Function to double values and add to the list 2 | def add_doubled_values(my_list: list[int]) -> None: 3 | my_list.update([x * 2 for x in my_list]) # Correct method: extend 4 | 5 | # Function call 6 | numbers = [1, 2, 3] 7 | add_doubled_values(numbers) 8 | print(numbers) # Output: [1, 2, 3, 2, 4, 6] 9 | -------------------------------------------------------------------------------- /02_object_oriented_programming/14_defining_our_own_type/02_advance_anums/main.py: -------------------------------------------------------------------------------- 1 | from enum import Enum, auto 2 | 3 | class MotherSauce(Enum): 4 | BECHAMEL = auto() 5 | VELOUTE = auto() 6 | ESPAGNOLE = auto() 7 | TOMATO = auto() 8 | HOLLANDAISE = auto() 9 | # Intentional alias 10 | BECHAMEL_ALIAS = BECHAMEL 11 | 12 | # Usage 13 | print(list(MotherSauce)) 14 | -------------------------------------------------------------------------------- /02_object_oriented_programming/11_type_annotations/04_optional_type/failure.py: -------------------------------------------------------------------------------- 1 | def get_user_age(name): 2 | user_data = database_lookup(name) 3 | return user_data.age # What if user_data is None? 4 | 5 | 6 | def database_lookup(name): 7 | return None # Simulate a database lookup failure 8 | 9 | 10 | get_user_age("Alice") # AttributeError: 'NoneType' object has no attribute 'age' -------------------------------------------------------------------------------- /01_python_fundamentals/25_advance_module/04_mixed_usage_modes/calculator.py: -------------------------------------------------------------------------------- 1 | # File: calculator.py 2 | 3 | def add(a, b): 4 | return a + b 5 | 6 | def subtract(a, b): 7 | return a - b 8 | 9 | if __name__ == "__main__": 10 | # Run tests when executed directly 11 | print("Testing calculator functions:") 12 | print("3 + 5 =", add(3, 5)) 13 | print("10 - 4 =", subtract(10, 4)) 14 | -------------------------------------------------------------------------------- /02_object_oriented_programming/01_Classes/02_creating_a_class/main.py: -------------------------------------------------------------------------------- 1 | class TextBox: 2 | def __init__(self): 3 | self.text = "" 4 | 5 | def set_text(self, text): 6 | self.text = text 7 | 8 | def clear(self): 9 | self.text = "" 10 | 11 | textbox = TextBox() 12 | textbox.set_text("Hello, Python!") 13 | print(textbox.text) 14 | textbox.clear() 15 | print(textbox.text) -------------------------------------------------------------------------------- /02_object_oriented_programming/11_type_annotations/06_literals/main.py: -------------------------------------------------------------------------------- 1 | from typing import Literal 2 | def process_payment(method: Literal["Credit Card", "PayPal", "Crypto"]) -> str: 3 | return f"Processing {method} payment." 4 | 5 | # Valid Examples 6 | print(process_payment("Credit Card")) # ✅ 7 | print(process_payment("PayPal")) # ✅ 8 | 9 | # Invalid Example 10 | print(process_payment("Cash")) # ❌ Type error 11 | -------------------------------------------------------------------------------- /01_python_fundamentals/23_modules/04_module_search_path/01_extend_module/modules/user.py: -------------------------------------------------------------------------------- 1 | user_data = 'User Details' 2 | 3 | def get_user_info(**user_data): 4 | return f''' 5 | User name is {user_data['name']} 6 | User age is {user_data['age']} 7 | User profession is {user_data['profession']} 8 | User hobbies are {', '.join(user_data['hobbies'])} 9 | ''' 10 | 11 | def username(name): 12 | return f'User name is {name}' -------------------------------------------------------------------------------- /01_python_fundamentals/05_identifiers/main.py: -------------------------------------------------------------------------------- 1 | my_variable = 10 # Valid identifier 2 | MyVariable = 20 # Another valid identifier (different from the first due to case sensitivity) 3 | # 1stVariable = 30 # Invalid identifier (cannot start with a digit) 4 | नंबर१ = 5 5 | نمبر۲ = 10 6 | # Perform addition 7 | result = नंबर१ + نمبر۲ 8 | print(result) # In Python v3, Unicode characters classified as digits or combining marks are also allowed. 9 | 10 | -------------------------------------------------------------------------------- /01_python_fundamentals/26_testing_your_code/name.py: -------------------------------------------------------------------------------- 1 | from name_function import get_formatted_name 2 | 3 | print("Enter 'q' at any time to quit.") 4 | 5 | while True: 6 | first = input("\nPlease give me a first name: ") 7 | if first == 'q': 8 | break 9 | last = input("Please give me a last name: ") 10 | if last == 'q': 11 | break 12 | 13 | formatted_name = get_formatted_name(first, last) 14 | print(f"\tNeatly formatted name: {formatted_name}.") -------------------------------------------------------------------------------- /01_python_fundamentals/20_regular_expressions/01_basic_regular_expressions/problem2.4.py: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | # Example text with numbers and letters 4 | text = "123abc 456" 5 | 6 | # Greedy quantifier example 7 | regex_greedy = r'\b\d+\b' 8 | matches_greedy = re.findall(regex_greedy, text) 9 | print("Greedy Matches:", matches_greedy) 10 | 11 | # Lazy quantifier example 12 | regex_lazy = r'\b\d+?\b' 13 | matches_lazy = re.findall(regex_lazy, text) 14 | print("Lazy Matches:", matches_lazy) -------------------------------------------------------------------------------- /05_design_patterns/01_foundation_design_principles/02_composition_over_inheritance_principle/composition.py: -------------------------------------------------------------------------------- 1 | class Engine: 2 | def start(self) -> None: 3 | print("Engine started") 4 | 5 | class Car: 6 | def __init__(self) -> None: 7 | self.engine: Engine = Engine() 8 | 9 | def start(self) -> None: 10 | self.engine.start() 11 | print("Car started") 12 | 13 | if __name__ == "__main__": 14 | my_car: Car = Car() 15 | my_car.start() 16 | -------------------------------------------------------------------------------- /01_python_fundamentals/20_regular_expressions/01_basic_regular_expressions/problem2.0.py: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | # Regex to match "magical" dates in yyyy-mm-dd format 4 | regex_magical_date = r'\b\d\d(\d\d)-\1-\1\b' 5 | 6 | # Example text containing dates 7 | text_dates = "Here are some dates: 2008-08-08, 1999-12-12, 2024-09-12, and 2011-11-11, 2010-10-10." 8 | 9 | # Find all magical dates 10 | matches_magical_dates = re.findall(regex_magical_date, text_dates) 11 | print("Magical Dates:", matches_magical_dates) -------------------------------------------------------------------------------- /01_python_fundamentals/20_regular_expressions/01_basic_regular_expressions/problem1.1.py: -------------------------------------------------------------------------------- 1 | import re 2 | text_to_match = """The punctuation characters in the ASCII table are: !"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~.""" 3 | pattern = r"The punctuation characters in the ASCII table are: !\"#\$%&'\(\)\*\+,-\./:;<=>\?@\[\\\]\^_`\{\|}~\." 4 | if re.fullmatch(pattern, text_to_match): 5 | print("The text matches the pattern exactly! ✅") 6 | else: 7 | print("The text does not match the pattern. ❌") 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /02_object_oriented_programming/01_Classes/05_encapsulation/main.py: -------------------------------------------------------------------------------- 1 | class Employee: 2 | def __init__(self): 3 | self.base_salary = 0 4 | self.hourly_rate = 0 5 | 6 | def calculate_wage(self, extra_hours): 7 | return self.base_salary + (self.hourly_rate * extra_hours) 8 | 9 | 10 | if __name__ == "__main__": 11 | employee = Employee() 12 | employee.base_salary = 50000 13 | employee.hourly_rate = 20 14 | wage = employee.calculate_wage(20) 15 | print(wage) 16 | -------------------------------------------------------------------------------- /01_python_fundamentals/27_virtual_environment/pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "django-project" 3 | version = "0.1.0" 4 | description = "Poetry For Django" 5 | authors = [ 6 | {name = "Muhammad Hashim",email = "hashiimtahir@gmail.com"} 7 | ] 8 | license = {text = "MIT"} 9 | readme = "README.md" 10 | requires-python = ">=3.12" 11 | dependencies = [ 12 | "django (>=5.2,<6.0)" 13 | ] 14 | 15 | 16 | [build-system] 17 | requires = ["poetry-core>=2.0.0,<3.0.0"] 18 | build-backend = "poetry.core.masonry.api" 19 | -------------------------------------------------------------------------------- /02_object_oriented_programming/01_Classes/04_procedural_programming/main.py: -------------------------------------------------------------------------------- 1 | def create_employee(base_salary, hourly_rate): 2 | return { 3 | "base_salary": base_salary, 4 | "hourly_rate": hourly_rate 5 | } 6 | 7 | def calculate_wage(employee, extra_hours): 8 | return employee["base_salary"] + (employee["hourly_rate"] * extra_hours) 9 | 10 | if __name__ == "__main__": 11 | employee = create_employee(50000, 20) 12 | wage = calculate_wage(employee, 20) 13 | print(wage) 14 | 15 | 16 | -------------------------------------------------------------------------------- /02_object_oriented_programming/08_lambda_expression/ecommerce/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for ecommerce project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.1/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ecommerce.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /02_object_oriented_programming/08_lambda_expression/ecommerce/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for ecommerce project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.1/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ecommerce.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /01_python_fundamentals/20_regular_expressions/01_basic_regular_expressions/problem2.3.py: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | # Correct regex to match text between
and
tags 4 | regex_lazy = r'.*?
' 5 | 6 | text = """ 7 |8 | The very first task is to find the beginning of a paragraph. 9 |
10 |11 | Then you have to find the end of the paragraph 12 |
13 | """ 14 | 15 | # Find all matches for text betweenand
tags 16 | matches = re.findall(regex_lazy, text, re.DOTALL) 17 | print("Matched Paragraphs:", matches) -------------------------------------------------------------------------------- /01_python_fundamentals/26_testing_your_code/test_name_function.py: -------------------------------------------------------------------------------- 1 | from name_function import get_formatted_name 2 | 3 | def test_first_last_name(): 4 | """Do names like 'muhammad hashim' work?""" 5 | formatted_name = get_formatted_name('muhammad', 'hashim') 6 | assert formatted_name == 'Muhammad Hashim' 7 | 8 | def test_first_last_middle_name(): 9 | """Do names like 'Wolfgang Amadeus Mozart' work?""" 10 | formatted_name = get_formatted_name('wolfgang', 'mozart', 'amadeus') 11 | assert formatted_name == 'Wolfgang Amadeus Mozart' -------------------------------------------------------------------------------- /02_object_oriented_programming/11_type_annotations/05_union_type/main.py: -------------------------------------------------------------------------------- 1 | from typing import Union 2 | 3 | def parse_user_input(value: str) -> int | str: 4 | if value.isdigit(): 5 | return int(value) 6 | return value 7 | 8 | result1: Union[int, str] = parse_user_input("hello") 9 | print(f'Result1 type is {type(result1)} and its value is {result1}') # Output: "hello" (as a str) 10 | result2: Union[int, str] = parse_user_input("42") 11 | print(f'Result2 type is {type(result2)} and its value is {result2}') # Output: "hello" (as a str) -------------------------------------------------------------------------------- /01_python_fundamentals/20_regular_expressions/01_basic_regular_expressions/problem3.0.py: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | # Sample text where we want to wrap matches in tags 4 | text = "Visit example.com for more info." 5 | 6 | # Regex pattern to match words (simple example) 7 | regex_pattern = r"\b\w+\b" 8 | 9 | # Replacement text: wrap the entire match (group 0) with an tag 10 | replacement_text = r'\g<0>' 11 | 12 | # Perform search-and-replace 13 | result = re.sub(regex_pattern, replacement_text, text) 14 | 15 | print("Result after replacement:", result) -------------------------------------------------------------------------------- /01_python_fundamentals/20_regular_expressions/01_basic_regular_expressions/problem3.1.py: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | # Sample text containing a 10-digit number 4 | text = "My number is 1234567890, please call me!" 5 | 6 | # Regex pattern to match a 10-digit phone number 7 | regex_pattern = r"\b(\d{3})(\d{3})(\d{4})\b" 8 | 9 | # Replacement pattern to format the matched phone number 10 | replacement_text = r"(\1) \2-\3" 11 | 12 | # Perform search-and-replace using re.sub() 13 | formatted_text = re.sub(regex_pattern, replacement_text, text) 14 | 15 | print("Formatted text:", formatted_text) -------------------------------------------------------------------------------- /02_object_oriented_programming/11_type_annotations/09_final/main.py: -------------------------------------------------------------------------------- 1 | from typing import Final, Tuple 2 | 3 | DB_HOST: Final = "localhost" 4 | 5 | 6 | 7 | def connect_to_test_database(): 8 | global DB_HOST 9 | DB_HOST = "test-db.example.com" # Accidentally reassigning DB_HOST for a test database 10 | # Proceed with test connection... 11 | 12 | # CONFIG: Final[Tuple[str, str]] = ("debug_mode_off", "version_1.0") 13 | 14 | # Attempting to change CONFIG or its content will raise an error with `mypy` 15 | # CONFIG[0] = "debug_mode_on" # Type error: Tuples are immutable -------------------------------------------------------------------------------- /02_object_oriented_programming/11_type_annotations/04_optional_type/main.py: -------------------------------------------------------------------------------- 1 | def parse_integer(s: str) -> int | None: 2 | try: 3 | return int(s) 4 | except ValueError: 5 | return None 6 | 7 | def process_number(s: str) -> None: 8 | number = parse_integer(s) 9 | if number is not None: 10 | print(f"The number multiplied by 2 is {number * 2}") 11 | else: 12 | print(f"Invalid integer: '{s}'") 13 | 14 | if __name__ == "__main__": 15 | process_number("42") # Valid integer 16 | process_number("not a number") # Invalid integer -------------------------------------------------------------------------------- /01_python_fundamentals/20_regular_expressions/01_basic_regular_expressions/problem2.9.py: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | # Sample text to perform search-and-replace 4 | text = "This is a test: 123-456." 5 | 6 | # Regex pattern to match any three-digit number 7 | regex_pattern = r"\d{3}" 8 | 9 | # Replacement text: insert literal text including backreferences 10 | replacement_text = r"$%\*$1\\1" 11 | 12 | # Perform search-and-replace 13 | # `re.sub` is used to substitute matches with replacement text 14 | result = re.sub(regex_pattern, replacement_text, text) 15 | 16 | print("Result after replacement:", result) -------------------------------------------------------------------------------- /02_object_oriented_programming/15_async_programming/08_async_generators/main.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | 3 | async def get_user_info(user_id): 4 | await asyncio.sleep(1) # Simulate API call delay 5 | return {"id": user_id, "name": f"User{user_id}"} 6 | 7 | async def user_info_generator(user_ids): 8 | for uid in user_ids: 9 | user_info = await get_user_info(uid) 10 | yield user_info 11 | 12 | async def main(): 13 | user_ids = [101, 102, 103] 14 | async for user in user_info_generator(user_ids): 15 | print(f"👤 Retrieved User: {user}") 16 | 17 | asyncio.run(main()) -------------------------------------------------------------------------------- /01_python_fundamentals/20_regular_expressions/01_basic_regular_expressions/problem2.5.py: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | # Sample HTML text where there is content after