├── Break Week 1 └── Theory Practical │ ├── for_loops.py │ ├── hello_world.py │ └── while_loops.py ├── Break Week 2 ├── Open Class │ ├── open_class1.py │ └── open_class2.py └── Theory Practical │ ├── dictionaries.py │ ├── list_2d.py │ ├── lists.py │ └── strings.py ├── Foundational Sessions ├── Learning Objectives │ ├── Computer Science Foundations.pdf │ └── Mathematics Foundation Learning Objectives.pdf ├── Recap Week │ └── Consolidation Lecture.pdf ├── Week 1 │ ├── GPT Example.png │ └── Lecture 1_ Sets, Functions and Variables.pdf ├── Week 10 │ ├── Lecture 10 Hash Tables.pdf │ └── Lecture 10_ Source Code │ │ ├── HashTable.py │ │ └── MemoryCache.py ├── Week 11 │ ├── Lecture 11 Trees.pdf │ └── Lesson 11 Source Code │ │ ├── BST.py │ │ ├── BTree.py │ │ ├── IterativeHeap.py │ │ ├── RecursiveHeap.py │ │ ├── Rose.py │ │ └── experiment.py ├── Week 12 │ ├── Lecture 12_ Graphs.pdf │ └── Session 12 Code │ │ ├── GraphNetworkx.py │ │ ├── UnweightedGraph.py │ │ ├── WeightedGraphOOP.py │ │ ├── demo.py │ │ ├── graph_theory.py │ │ └── social_network.py ├── Week 13 │ ├── Lecture 13_ The Stack and The Heap.pdf │ └── Session13.py ├── Week 2 │ ├── Lecture 2_ Linear Algebra.pdf │ └── Lecture2.py ├── Week 3 │ ├── Lecture 3_ Probability.pdf │ ├── Lecture3SE.py │ └── Lecture3SE_final.py ├── Week 4 │ ├── Lecture 4_ Combinations and Permutations.pdf │ └── Session4.py ├── Week 5 │ └── Lecture 5_ Differentiation.pdf ├── Week 6 │ ├── Lecture 6_ Order Complexity.pdf │ └── Session6Demo.py ├── Week 7 │ ├── Lecture 7_ Diagrams(Rough).pdf │ ├── Lecture 7_ Linear Data Structures.pdf │ └── Session7.py ├── Week 8 │ ├── Lecture 8_ Stacks and Queues.pdf │ └── Session8 │ │ ├── PriorityQueue.py │ │ ├── PriorityQueue_List.py │ │ ├── Queue.py │ │ ├── SimpleScheduler_PQ.py │ │ ├── SimpleScheduler_Stack.py │ │ └── Stack.py └── Week 9 │ ├── Lecture 9 Strings.pdf │ ├── Session9Application.py │ ├── Session9Demonstration.py │ ├── StringBuilder.py │ └── vizOverTime.ipynb ├── Recap Week ├── Open Class │ ├── open_class.py │ ├── open_class2.py │ └── open_class3.py ├── Tech Talk │ ├── Tech Talk_ OOP.pdf │ └── oop.py ├── Theory and Practical │ ├── Python Basics.pdf │ ├── Sequences.pdf │ ├── basics.py │ ├── dictionaries.py │ ├── lists.py │ └── strings.py └── Tutorial │ └── student_editor.py ├── Tech Talk ├── 1. Week 1, Getting Started with Game Development │ └── Tech Talk - Game Dev.pdf ├── 10. Week 15 - Introduction to Data Engineering │ └── Tech Talk - Data Engineering.pdf ├── 11. Week 16 - Introduction to Web Development │ ├── Code Files │ │ ├── images │ │ │ └── avatar.png │ │ ├── resume │ │ │ ├── resume.css │ │ │ └── resume.html │ │ ├── scripts │ │ │ └── tutorial.js │ │ ├── tutorial.css │ │ └── tutorial.html │ └── TechTalk_ Intro to WD.pdf ├── 2. Week 7 - OOP 2.0 │ ├── 1. oop_principles.ipynb │ ├── 1. oop_principles.pdf │ ├── 2. understanding_classes.ipynb │ ├── 2. understanding_classes.pdf │ ├── 3. model_class.ipynb │ ├── 3. model_class.pdf │ ├── 4. module_class.ipynb │ └── 4. module_class.pdf ├── 3. Week 8 - OOP │ ├── finance_app │ │ ├── data │ │ │ ├── transactions copy.json │ │ │ └── transactions.json │ │ ├── main.py │ │ ├── models │ │ │ └── transaction_model.py │ │ ├── readme.md │ │ ├── repositories │ │ │ ├── finance_repository.py │ │ │ └── transaction_repository.py │ │ └── services │ │ │ ├── data_connection.py │ │ │ ├── json.py │ │ │ └── sqlite.py │ └── walkthrough │ │ ├── 1. OOP Principles.ipynb │ │ ├── 2. Understanding Classes.ipynb │ │ ├── 3. Model Class.ipynb │ │ └── 4. Module Class.ipynb ├── 4. Week 9 - Cyber Security │ └── Tech Talk on CyberSecurity.pdf ├── 5. Week 10 - Intro to APIs │ ├── analysis │ │ └── main.ipynb │ ├── application │ │ ├── main.py │ │ ├── models │ │ │ ├── __pycache__ │ │ │ │ ├── short_url_details.cpython-311.pyc │ │ │ │ └── short_url_details.cpython-39.pyc │ │ │ └── short_url_details.py │ │ ├── services │ │ │ ├── __pycache__ │ │ │ │ ├── json_service.cpython-311.pyc │ │ │ │ ├── url_shortener_service.cpython-311.pyc │ │ │ │ └── url_shortener_service.cpython-39.pyc │ │ │ ├── json_service.py │ │ │ └── url_shortener_service.py │ │ └── short_links.json │ ├── readme.md │ └── slides-export.pdf ├── 6. Week 11 - Working with SQL in Python │ ├── working-with-database.ipynb │ └── working_with_sql_in_python.pdf ├── 7. Week 12 - Querying Data in SQL │ └── Getting Data in SQL.pdf ├── 8. Week 13 - Getting Data in SQL - Part 2 │ ├── 1. analysis_notebook.ipynb │ ├── 2. dashboard_notebook_scripts.ipynb │ ├── 3. visualization.ipynb │ ├── Getting Data in SQL - Part 2.pdf │ └── Set up database │ │ ├── __init__.py │ │ ├── config.json │ │ ├── final │ │ ├── actor.csv │ │ ├── address.csv │ │ ├── category.csv │ │ ├── customer.csv │ │ ├── film.csv │ │ ├── film_actor.csv │ │ ├── inventory.csv │ │ ├── language.csv │ │ ├── payment.csv │ │ └── rental.csv │ │ ├── models │ │ ├── __init__.py │ │ ├── ms_sql_model.py │ │ ├── my_sql_model.py │ │ └── postgres_model.py │ │ ├── readme.md │ │ ├── requirements.txt │ │ ├── scripts │ │ └── create.sql │ │ ├── services │ │ ├── __init__.py │ │ ├── database_connection.py │ │ ├── database_connection_factory.py │ │ └── input_handler.py │ │ └── setup.py ├── 9. Week 14 - Building APIs │ ├── Slides.pdf │ └── shopping_api │ │ ├── data │ │ ├── database_scripts.sql │ │ ├── load_data.py │ │ └── product.sql │ │ ├── dockerfile │ │ ├── main.py │ │ ├── readme.md │ │ ├── requirements.txt │ │ ├── resources │ │ └── store.db │ │ └── src │ │ ├── controllers │ │ ├── __init__.py │ │ ├── product_controller.py │ │ ├── user_auth_controller.py │ │ └── user_controller.py │ │ ├── enum │ │ └── roles.py │ │ ├── models │ │ ├── __init__.py │ │ ├── access_token_model.py │ │ ├── api_token_model.py │ │ ├── product.py │ │ ├── user.py │ │ ├── user_auth.py │ │ └── user_auth_request_model.py │ │ ├── repository │ │ ├── __init__.py │ │ └── database_repository.py │ │ ├── routers │ │ ├── __init__.py │ │ ├── product_router.py │ │ ├── user_auth_router.py │ │ └── user_router.py │ │ └── services │ │ ├── api_token_service.py │ │ ├── auth_service.py │ │ ├── product_service.py │ │ └── user_service.py └── README.md ├── Week 1 ├── Strings.py ├── [New] Conditional Statements.pdf ├── [New] Hello World.pdf ├── conditional.py ├── operators.py ├── readme.md └── variables.py ├── Week 10 ├── 1 - Theory and Practical │ ├── 1 - Monday │ │ ├── W10D1- Higher Order Functions.pdf │ │ └── w10d1_hof_demo.py │ └── 4 - Thursday │ │ ├── Functions Recap.pdf │ │ └── functions.py ├── 2 - Open Class │ ├── 2 - Tuesday │ │ ├── W10D2 - Open Session.pdf │ │ └── w10d2_os_demo.py │ └── 5 - Friday │ │ ├── hello_world.py │ │ ├── new.py │ │ └── open_class.py ├── 3 - Tutorial │ └── 2 - Tuesday │ │ ├── Example - Basic │ │ ├── my_library.py │ │ └── my_main_code.py │ │ ├── Example - MathOps │ │ ├── math_operations.py │ │ ├── my_calculator.py │ │ └── operation_log.txt │ │ └── W10D2_SE - Tut Session.pdf └── 4 - Portfolio │ └── 3 - Wednesday │ ├── SE Portfolio Session 9_ Fitness Program.pdf │ └── fitness.py ├── Week 11 ├── 1 - Theory and Practical │ ├── 1 - Monday │ │ ├── Object Oriented Progamming.pdf │ │ └── classes_and_objects.py │ └── 4 - Thursday │ │ ├── OOP - Best Practices.pdf │ │ └── w11d4_class_practices_demo.py ├── 2 - Open Class │ ├── 2 - Tuesday │ │ └── open_class.py │ └── 5 - Friday │ │ ├── W11D5 - Open Session.pdf │ │ └── w11d5_open_class_demo.py ├── 3 - Tutorial │ └── 2 - Tuesday │ │ ├── contacts.py │ │ ├── contacts.txt │ │ └── main.py └── 4 - Portfolio │ └── 3 - Wednesday │ ├── SE Portfolo Session 10 - ZooWonders.pdf │ └── portfolio_s10_demo.py ├── Week 12 ├── 1 - Theory and Practical │ ├── 1 - Monday │ │ ├── OOP - Inheritance.pdf │ │ ├── OOP - Inheritance.pptx │ │ └── w12d1_oop_inheritance_demo.py │ └── 4 - Thursday │ │ ├── Special Methods.pdf │ │ └── special_methods.py ├── 2 - Open Class │ ├── 2 - Tuesday │ │ ├── W12D2 - Open Session.pdf │ │ └── w12d2_open_class_demo.py │ └── 5 - Friday │ │ ├── open_class.py │ │ └── tasks.txt ├── 3 - Tutorial │ └── 2 - Tuesday │ │ ├── W12D2 - Tutorial Session.pdf │ │ └── w12d2_tutorial_class_demo.py ├── 4 - Portfolio │ └── 3 - Wednesday │ │ ├── SE Portfolio Session 11_ Quest for Lost Relics.pdf │ │ └── game.py └── 5 - Foundational │ └── pass.txt ├── Week 13 ├── 1 - Theory and Practical │ ├── 1 - Monday │ │ ├── Polymorphism and The SOLID Principles.pdf │ │ ├── SOLID.py │ │ └── polymorphism.py │ └── 4 - Thursday │ │ ├── W13D4 - OOP Revision.pdf │ │ └── w13d4_oop_revision_demo.py ├── 2 - Open Class │ ├── 2 - Tuesday │ │ ├── data.txt │ │ └── open_class.py │ └── 5 - Friday │ │ └── w13d5_open_demo_taskman.py ├── 3 - Tutorial │ └── 2 - Tuesday │ │ ├── Updated Game │ │ ├── characters.py │ │ ├── game.py │ │ ├── items.py │ │ └── world.py │ │ └── game.py └── 4 - Portfolio │ └── 3 - Wednesday │ ├── Detective Story │ ├── detectives.txt │ ├── interactive_story.py │ ├── miss_marple_intro.txt │ ├── plot_points_mystery.txt │ ├── poirot_intro.txt │ ├── sherlock_examine.txt │ ├── sherlock_intro.txt │ └── sherlock_question.txt │ ├── SE Portfolio Session 12 - Interactive Odyssey.pdf │ ├── Session 12 - Case Study.docx │ └── portfolio_s12_demo.py ├── Week 14 ├── 1 - Theory and Practical │ ├── 1 - Monday │ │ ├── W14D1 - Git Instructions.txt │ │ └── W14D1 - Intro to Version Control and Git.pdf │ └── 4 - Thursday │ │ ├── Error Handling.pdf │ │ ├── error_types.py │ │ ├── error_types_demo.py │ │ └── errors.py ├── 2 - Open Class │ ├── 2 - Tuesday │ │ └── w14d2_os_demo.txt │ └── 5 - Friday │ │ └── pass.txt ├── 3 - Tutorial │ └── 2 - Tuesday │ │ ├── W14D2 - Tutorial Session.pdf │ │ ├── w14d2_tut_demo.py │ │ └── w14d2_tut_minesweep.py └── 4 - Portfolio │ └── 3 - Wednesday │ └── Portfolio_ Git & GitHub.pdf ├── Week 15 ├── 1 - Theory and Practical │ ├── 1 - Monday │ │ ├── Examples │ │ │ ├── assets │ │ │ │ ├── football.jpg │ │ │ │ ├── golf.jpg │ │ │ │ ├── image.jpg │ │ │ │ ├── rugby.jpg │ │ │ │ ├── tennis.jpg │ │ │ │ └── track.jpg │ │ │ ├── basics.html │ │ │ ├── login.html │ │ │ ├── login_nobootstrap.html │ │ │ ├── login_nostyle.html │ │ │ ├── register.html │ │ │ ├── style │ │ │ │ ├── login_style.css │ │ │ │ └── mainPage.css │ │ │ └── welcome.html │ │ └── HTML and CSS.pdf │ └── 4 - Thursday │ │ ├── W15D4-SE-Sequences-Revision.pdf │ │ └── w15d4_se_sequences_demo.py ├── 2 - Open Class │ ├── 2 - Tuesday │ │ ├── new_data.txt │ │ └── open_class.py │ └── 5 - Friday │ │ └── w15d5_open_session_demo.py ├── 3 - Tutorial │ └── 2 - Tuesday │ │ ├── books.py │ │ ├── library.py │ │ ├── main.py │ │ └── members.py └── 4 - Portfolio │ └── 3 - Wednesday │ └── Portfolio-Demo-Links.txt ├── Week 16 ├── 1 - Theory and Practical │ ├── 1 - Monday │ │ ├── W16D1-SE-SQL-and-Sqlite.pdf │ │ └── w16d1_se_sql_demo.py │ ├── 4 - Thursday │ │ ├── Functions Recap.pdf │ │ └── functions.py │ └── 7 - Sunday │ │ ├── my_library.py │ │ └── w16d7_theory_demo.py ├── 2 - Open Class │ ├── 2 - Tuesday │ │ ├── W16D2 - Open Session.pdf │ │ ├── sqlite_queries_students.txt │ │ └── w16d2_se_open_demo.py │ └── 5 - Friday │ │ └── pass.txt ├── 3 - Tutorial │ └── 2 - Tuesday │ │ ├── W16D2 - Tutorial Session.pdf │ │ ├── ebookstore_db │ │ ├── inventory_reset.txt │ │ └── w16d2_se_tutorial_demo.py ├── 4 - Portfolio │ └── 3 - Wednesday │ │ └── pass.txt └── SE-Session-Links.txt ├── Week 17 ├── 1 - Theory and Practical │ ├── 1 - Monday │ │ ├── Django.pdf │ │ └── Project │ │ │ ├── ReadMe.md │ │ │ ├── my_project │ │ │ ├── db.sqlite3 │ │ │ ├── manage.py │ │ │ ├── my_app │ │ │ │ ├── __init__.py │ │ │ │ ├── __pycache__ │ │ │ │ │ ├── __init__.cpython-312.pyc │ │ │ │ │ ├── admin.cpython-312.pyc │ │ │ │ │ ├── apps.cpython-312.pyc │ │ │ │ │ ├── models.cpython-312.pyc │ │ │ │ │ ├── urls.cpython-312.pyc │ │ │ │ │ └── views.cpython-312.pyc │ │ │ │ ├── admin.py │ │ │ │ ├── apps.py │ │ │ │ ├── migrations │ │ │ │ │ ├── 0001_initial.py │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── __pycache__ │ │ │ │ │ │ ├── 0001_initial.cpython-312.pyc │ │ │ │ │ │ └── __init__.cpython-312.pyc │ │ │ │ ├── models.py │ │ │ │ ├── static │ │ │ │ │ └── style │ │ │ │ │ │ └── style.css │ │ │ │ ├── templates │ │ │ │ │ ├── main.html │ │ │ │ │ └── welcome.html │ │ │ │ ├── tests.py │ │ │ │ ├── urls.py │ │ │ │ └── views.py │ │ │ └── my_project │ │ │ │ ├── __init__.py │ │ │ │ ├── __pycache__ │ │ │ │ ├── __init__.cpython-312.pyc │ │ │ │ ├── settings.cpython-312.pyc │ │ │ │ ├── urls.cpython-312.pyc │ │ │ │ └── wsgi.cpython-312.pyc │ │ │ │ ├── asgi.py │ │ │ │ ├── settings.py │ │ │ │ ├── urls.py │ │ │ │ └── wsgi.py │ │ │ └── requirements.txt │ └── 4 - Thursday │ │ ├── W17D4 - OOP Revision.pdf │ │ └── w17d4_theory2_demo.py ├── 2 - Open Class │ ├── 2 - Tuesday │ │ └── pass.txt │ └── 4 - Thursday │ │ ├── W17D4 - Open Session.pdf │ │ └── w17d4_open_demo.py ├── 3 - Tutorial │ └── 2 - Tuesday │ │ ├── my_project │ │ ├── db.sqlite3 │ │ ├── manage.py │ │ ├── my_app │ │ │ ├── __init__.py │ │ │ ├── __pycache__ │ │ │ │ ├── __init__.cpython-311.pyc │ │ │ │ ├── admin.cpython-311.pyc │ │ │ │ ├── apps.cpython-311.pyc │ │ │ │ ├── models.cpython-311.pyc │ │ │ │ ├── urls.cpython-311.pyc │ │ │ │ └── views.cpython-311.pyc │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ ├── __init__.py │ │ │ │ └── __pycache__ │ │ │ │ │ ├── 0001_initial.cpython-311.pyc │ │ │ │ │ └── __init__.cpython-311.pyc │ │ │ ├── models.py │ │ │ ├── static │ │ │ │ ├── assets │ │ │ │ │ ├── Banner.jpg │ │ │ │ │ └── Banner.png │ │ │ │ └── style │ │ │ │ │ └── welcome.css │ │ │ ├── templates │ │ │ │ ├── header.html │ │ │ │ ├── home.html │ │ │ │ ├── index.html │ │ │ │ └── register.html │ │ │ ├── tests.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ └── my_project │ │ │ ├── __init__.py │ │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-311.pyc │ │ │ ├── settings.cpython-311.pyc │ │ │ ├── urls.cpython-311.pyc │ │ │ └── wsgi.cpython-311.pyc │ │ │ ├── asgi.py │ │ │ ├── settings.py │ │ │ ├── urls.py │ │ │ └── wsgi.py │ │ └── shop_project │ │ ├── db.sqlite3 │ │ ├── manage.py │ │ ├── shop_app │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-312.pyc │ │ │ ├── admin.cpython-312.pyc │ │ │ ├── apps.cpython-312.pyc │ │ │ ├── models.cpython-312.pyc │ │ │ ├── urls.cpython-312.pyc │ │ │ └── views.cpython-312.pyc │ │ ├── admin.py │ │ ├── apps.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_rename_items_item.py │ │ │ ├── __init__.py │ │ │ └── __pycache__ │ │ │ │ ├── 0001_initial.cpython-312.pyc │ │ │ │ ├── 0002_rename_items_item.cpython-312.pyc │ │ │ │ └── __init__.cpython-312.pyc │ │ ├── models.py │ │ ├── static │ │ │ └── style │ │ │ │ └── style.css │ │ ├── templates │ │ │ ├── shop.html │ │ │ └── shop1.html │ │ ├── tests.py │ │ ├── urls.py │ │ └── views.py │ │ └── shop_project │ │ ├── __init__.py │ │ ├── __pycache__ │ │ ├── __init__.cpython-312.pyc │ │ ├── settings.cpython-312.pyc │ │ ├── urls.cpython-312.pyc │ │ └── wsgi.cpython-312.pyc │ │ ├── asgi.py │ │ ├── settings.py │ │ ├── urls.py │ │ └── wsgi.py ├── 4 - Portfolio │ └── 3 - Wednesday │ │ ├── pass.txt │ │ └── portfolio_links.txt └── SE-Session-Links.txt ├── Week 2 ├── Open Class │ ├── open_class.py │ └── open_class2.py ├── Portfolio │ ├── SE Portfolio Session 1_ Shopping Cart.pdf │ ├── SE Portfolio Session 1_ Shopping Cart_List_Version.pdf │ └── SE Week 1 Case Study.pdf ├── Theory and Practical │ ├── For Loops.pdf │ ├── While loops.pdf │ ├── for_examples.py │ ├── while_examples.py │ └── while_examples_extended.py └── Tutorial │ └── tutorial.py ├── Week 3 ├── Open Class │ ├── (1) - open_class_scratch_pad.py │ ├── (2) - open_live_code.py │ ├── (3) - open_live_code.py │ └── sunday_open_class.py ├── Portfolio │ ├── SE Portfolio Session 2_ Paws n Cart Part 2.pdf │ └── live_code.py ├── Theory and Practical │ ├── Error Types.pdf │ ├── Errors.py │ ├── Extended_Errors_and_Code_Challenge.py │ ├── Try - Except Blocks (Updated).pdf │ ├── Try - Except Blocks.pdf │ ├── try_except + Live Code.py │ └── try_except.py └── Tutorial │ ├── Intro to Git (Updated).pdf │ ├── README.md │ ├── SWTM-2088_Atlassian-Git-Cheatsheet.pdf │ └── git-cheat-sheet-education.pdf ├── Week 5 ├── Open Session │ ├── open_1.py │ └── open_2.py ├── Portfolio │ ├── SE Portfolio Session 4_ Sequences.pdf │ ├── Style.py │ └── scribe.pdf ├── Tech Talk │ ├── Tech Talk_ Functions.pdf │ ├── functions.py │ ├── shop.py │ └── shop_with_functions.py ├── Theory and Practical │ ├── 2D-ListComp(MondayEvening).py │ ├── 2D_&_list_comprehension.py │ ├── Dictionaries.pdf │ ├── List Comprehension & 2D Lists.pdf │ ├── dictionaries.py │ └── dictionaries_2.py └── Tutorial │ ├── Minesweeper.py │ └── Minesweeper_2.py ├── Week 7 ├── 1 - Open Class │ ├── 7 - Sunday │ │ ├── Open Session.pdf │ │ ├── W7D7_SE - Lecture Replay Link.txt │ │ ├── session_code_0.py │ │ ├── temp_text.txt │ │ └── temp_text_1.txt │ ├── example.txt │ ├── open_session2.py │ ├── open_session3.py │ ├── pass.txt.txt │ ├── seek.txt │ ├── test.txt │ └── test_copy.txt ├── 2 - Theory and Practical │ ├── 1 - Monday │ │ ├── IO Operations Input_1.pdf │ │ ├── W7D1_SE - Lecture Replay Link.txt.txt │ │ └── session_workspace │ │ │ ├── list_of_cats.txt │ │ │ ├── randomOtherFolder │ │ │ └── cat_names.txt │ │ │ ├── random_names.txt │ │ │ ├── session_code_0.py │ │ │ ├── session_code_1.py │ │ │ └── session_code_2.py │ ├── 4 - Thursday │ │ ├── IO Operations Input_2.pdf │ │ ├── W7D4_SE - Lecture Replay Link.txt.txt │ │ ├── list_of_cats.txt │ │ ├── random_names.txt │ │ ├── serge_manifesto.txt │ │ ├── session_code_0.py │ │ └── session_code_1.py │ ├── 6 - Saturday │ │ ├── IO Operations Input_1.pdf │ │ ├── W7D6_SE - Lecture Replay Link.txt │ │ └── session code │ │ │ ├── list_of_cats.txt │ │ │ ├── random_names.txt │ │ │ ├── session_code_0.py │ │ │ ├── session_code_1.py │ │ │ └── sub_folder │ │ │ ├── external_file.py │ │ │ └── list_of_birds.txt │ └── 7 - Sunday │ │ ├── IO Operations Input_2.pdf │ │ ├── W7D7_SE - Lecture Replay Link.txt │ │ └── session code │ │ ├── django_settings_file.py │ │ ├── latin_1_file.txt │ │ ├── random_utf-8_csv.csv │ │ ├── session_code_0.py │ │ ├── session_code_1.py │ │ └── utf_8_file.txt ├── 3 - Portfolio │ ├── 7 - Sunday │ │ ├── SE Portfolio Session 6_ Log Management Tool.pdf │ │ ├── W7D7_SE - Lecture Replay Link.txt │ │ ├── Week 7 - Case Study.pdf │ │ ├── dummy_data.txt │ │ └── example_code.py │ ├── SE Portfolio Session 6_ Log Management Tool.pdf │ └── pass.txt.txt └── 4 - Tutorial │ ├── 6 - Saturday │ ├── W7D6_SE - Lecture Replay Link.txt │ ├── Week 7 Tutorial Session.pdf │ └── session code │ │ ├── comic_char.txt │ │ ├── list_of_cats.txt │ │ ├── list_of_planets.txt │ │ ├── message_to_NASA │ │ ├── pika.json │ │ ├── poke_stats.csv │ │ ├── random_names.txt │ │ ├── session_code_0.py │ │ ├── session_code_1.py │ │ ├── session_code_2.py │ │ ├── session_code_3.py │ │ └── sub_folder │ │ ├── external_file.py │ │ └── list_of_birds.txt │ ├── csv_files.py │ ├── example.csv │ ├── example.txt │ ├── pass.txt.txt │ └── read_write.py ├── Week 8 ├── 1 - Open Class │ ├── 6 - Saturday │ │ ├── Open Session.pdf │ │ ├── W8D6_SE - Lecture Replay Link.txt │ │ └── session code │ │ │ ├── ash_poke_stat.txt │ │ │ ├── poke_users.txt │ │ │ ├── session_code_0.py │ │ │ ├── session_code_1.py │ │ │ └── todo.md │ ├── open_session.py │ └── pass.txt.txt ├── 2 - Theory and Practical │ ├── 1 - Monday │ │ ├── User Defined Functions (updated).pdf │ │ ├── W8D1_SE - Lecture Replay Link.txt.txt │ │ └── session code │ │ │ ├── __pycache__ │ │ │ └── my_custom_library.cpython-311.pyc │ │ │ ├── my_custom_library.py │ │ │ ├── session_code_0.py │ │ │ ├── session_code_1.py │ │ │ └── session_code_2.py │ ├── 4 - Thursday │ │ ├── IO Operations Out_1.pdf │ │ ├── W8D4_SE - Lecture Replay Link.txt │ │ └── session code │ │ │ ├── dummy_data.txt │ │ │ ├── jedi.txt │ │ │ ├── jedi_new.txt │ │ │ ├── planets.txt │ │ │ ├── secret_secret_pokemon.txt │ │ │ ├── secret_secret_secret_pokemon.txt │ │ │ ├── session_code_0.py │ │ │ ├── session_code_1.py │ │ │ ├── session_code_2.py │ │ │ └── sub-folder │ │ │ ├── cat_names.txt │ │ │ └── jedi_new.txt │ └── pass.txt ├── 3 - Portfolio │ ├── SE Portfolio Session 7_ Gaming System (1).pdf │ └── pass.txt.txt ├── 4 - Tutorial │ ├── SE Copy [Tutorial] Working with SQL.pdf │ ├── pass.txt.txt │ └── sql.txt └── Tech Talk │ └── Tech Talk on CyberSecurity.pdf ├── Week 9 ├── 1 - Open Class │ ├── Friday │ │ ├── W9D5 - Open Session.pdf │ │ └── w9d5_se_os_demo.py │ └── open_class.py ├── 2 - Theory and Practical │ ├── Monday │ │ ├── Best Practices and Documentation Pt 1.pdf │ │ ├── best_practices.py │ │ └── my_logs.log │ └── Thursday │ │ ├── Best Practices and Documentation Pt 2.pdf │ │ ├── best_practices_pt_2.py │ │ └── practices_demo_2.py ├── 3 - Portfolio │ ├── Portfolio Session 8 - Case Study.pdf │ ├── SE Portfolio Session 8_ Vehicle Dashboard.pdf │ └── portfolio_s8_demo.py ├── 4 - Tutorial │ ├── calculator.py │ ├── calculator_refactored.py │ ├── party_planner.py │ ├── party_planner2.py │ └── pass.txt.txt └── Tech Talk │ └── pass.txt.txt ├── readme.md └── week 4 ├── Open Class ├── Sunday Open Class │ └── open.py ├── open_class.py ├── open_class2.py └── open_class3.py ├── Portfolio └── SE Portfolio Session 3_ CareerCrafter.pdf ├── Tech Talk Code └── variables-lists.py ├── Theory and Practical ├── (Sunday)lists.py ├── Lists.pdf ├── Strings.pdf ├── lists.py └── string_examples.py └── Tutorial ├── Tutorial_ Debugging.pdf ├── debug.py ├── debug2.py ├── debug_fixed.py └── open.py /Break Week 1/Theory Practical/for_loops.py: -------------------------------------------------------------------------------- 1 | # for i in range(10): 2 | # print(i) 3 | 4 | 5 | 6 | 7 | 8 | 9 | # total = 0 10 | # start = 1 11 | # stop = 20 12 | # for num in range(start, stop): 13 | # total += num 14 | # print("Sum:", total) 15 | 16 | 17 | # for _ in range(3): 18 | # user_input = input("Please enter a number: ") 19 | # print(user_input) 20 | 21 | 22 | # my_str = "Hello, world!" 23 | # for letter in my_str: 24 | # print(letter, end=" ") 25 | 26 | 27 | # fruits = ['apple', 'banana', 'cherry', "Pear"] 28 | # for fruit in fruits: 29 | # if fruit in ["apple", "banana"]: 30 | # print(fruit) 31 | 32 | 33 | # fruits = ['apple', 'banana', 'cherry'] 34 | # for i, fruit in enumerate(fruits, 1): # ((1, "apple"), (2, "banana"), (3, "cherry")) 35 | # print(i, fruit) 36 | 37 | 38 | # for i in range(1, 6): 39 | # if i == 4: 40 | # break 41 | # print(i) 42 | 43 | 44 | for i in range(1,6): 45 | if i == 4: 46 | continue 47 | print(i) 48 | else: 49 | print("Loop ended") 50 | -------------------------------------------------------------------------------- /Break Week 1/Theory Practical/while_loops.py: -------------------------------------------------------------------------------- 1 | # count = 1 2 | # if count <= 5: 3 | # print(count) 4 | 5 | 6 | count = 1 7 | while count <= 5: 8 | print(count) 9 | count += 1 10 | else: 11 | print("End of loop!") 12 | 13 | 14 | # total = 0 15 | # num = 1 16 | # while total < 10: 17 | # total += num 18 | # num += 1 19 | # print("Sum:", total) 20 | 21 | 22 | # user_input = '' 23 | # while user_input.lower() != 'yes': 24 | # user_input = input("Do you want to continue? (yes/no): ") 25 | 26 | # menu = """Please select an option below: 27 | # 1: Option 1 28 | # 2: Option 2 29 | # 3: Option 3 30 | # 4: Quit 31 | # """ 32 | # user_input = '' 33 | # while True: 34 | # user_input = input(menu) 35 | # if not user_input: 36 | # print("No input provided.") 37 | # continue 38 | # if user_input == "1": 39 | # print("Option 1 chosen") 40 | # elif user_input == "2": 41 | # print("Option 2 chosen") 42 | # elif user_input == "3": 43 | # print("Option 3 chosen") 44 | # elif user_input == "4": 45 | # print("Goodbye.") 46 | # break 47 | 48 | 49 | -------------------------------------------------------------------------------- /Break Week 2/Open Class/open_class1.py: -------------------------------------------------------------------------------- 1 | 2 | # animals.append("Parrot") 3 | # animals.insert(1, "Parrot") 4 | 5 | 6 | 7 | # animals = ["Dog", "Cat", "Gecko", "Goldfish", "Ball Python"] 8 | 9 | # new_animals = animals.copy() 10 | # new_animals.append("Chameleon") 11 | # print(new_animals) 12 | # print(animals) 13 | 14 | 15 | 16 | 17 | 18 | 19 | # squares = [] 20 | # for x in range(10): 21 | # squares.append(x**2) 22 | 23 | # squares = [x**2 for x in range(10)] 24 | # print(squares) 25 | 26 | 27 | even_nums = [] 28 | # print(list(range(50))) 29 | # for i in range(50): 30 | # if i%2 == 0: 31 | # even_nums.append(i) 32 | 33 | # even_nums = [i for i in range(50) if i%2 == 0] 34 | # print(even_nums) 35 | 36 | # print(list(zip(names, surnames, "abcdefg", [1,2,3,4,5]))) 37 | 38 | 39 | names = ["David", "Peter", "Michelle", "Kayla", "Anita"] 40 | surnames = ["Jackson", "Graham", "Cook", "Carty"] 41 | 42 | new_list = [] 43 | for name, surname in zip(names, surnames): 44 | new_list.append((name, surname)) 45 | print(new_list) 46 | 47 | names_surnames = [(name, surname) for name, surname in zip(names, surnames)] 48 | # print(names_surnames) 49 | 50 | # name, surname, age = ("David", "Jackson", 25) 51 | # print(name, surname, age) 52 | 53 | # my_print = print 54 | # my_print("Hello world!") -------------------------------------------------------------------------------- /Break Week 2/Theory Practical/list_2d.py: -------------------------------------------------------------------------------- 1 | 2 | # for inner_list in list_2d: 3 | # inner_list.sort(reverse=True) 4 | # print(inner_list) 5 | 6 | 7 | # print(list_2d[1]) 8 | 9 | # list_2d[1][2] = 10 10 | 11 | # print(list_2d) 12 | 13 | # print(list_2d) 14 | # for inner_list in list_2d: 15 | # for num in inner_list: 16 | # print(num, end=" ") 17 | # print() 18 | 19 | from copy import deepcopy 20 | list_2d = [[1,2,3], [4,5,6], [7,8,9]] 21 | 22 | new_list = deepcopy(list_2d) 23 | new_list[0][0] = 50 24 | print(new_list) 25 | 26 | list_2d[0] = [3,4,5] 27 | print(list_2d) 28 | -------------------------------------------------------------------------------- /Break Week 2/Theory Practical/strings.py: -------------------------------------------------------------------------------- 1 | # Creating strings 2 | 3 | single = 'Hello World!' 4 | double = "This is a string!" 5 | triple = """This is a 6 | multi-line string!""" 7 | 8 | # Some useful string methods 9 | 10 | # print(test_str) 11 | # # print(test_str.capitalize()) 12 | # print(test_str.upper()) 13 | # # test_str = test_str.upper() 14 | # print(test_str.replace("l", "*")) 15 | # print(test_str.strip("*")) 16 | # print(test_str.split("-")) 17 | 18 | # print(" : ".join(["This", "is", "how", "use", "join!"])) 19 | 20 | 21 | # Get character index 22 | # print(test_str.find("o")) 23 | # print(test_str.index("o")) 24 | 25 | 26 | # String checks 27 | # print(test_str.isnumeric()) 28 | # print(test_str.isalpha()) 29 | # print(test_str.islower()) 30 | 31 | 32 | # Indexing 33 | # print(test_str[0]) 34 | # print(test_str[3]) 35 | # print(test_str[-1]) 36 | # print(test_str[-4]) 37 | 38 | 39 | # Strings are immutable 40 | # test_str[3] = "*" 41 | 42 | 43 | # Slicing strings 44 | # print(test_str[1:3]) 45 | # print(test_str[:2]) 46 | # print(test_str[4:]) 47 | 48 | test_str = "Hello world!" 49 | # Negative slicing 50 | # print(test_str[-3:-1]) 51 | # print(test_str[-5:]) 52 | # print(test_str[:-2]) 53 | 54 | 55 | # Looping over strings 56 | # for i in range(len(test_str)): 57 | # print(test_str[i]) 58 | 59 | # for letter in test_str: 60 | # print(letter.upper()) -------------------------------------------------------------------------------- /Foundational Sessions/Learning Objectives/Computer Science Foundations.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Foundational Sessions/Learning Objectives/Computer Science Foundations.pdf -------------------------------------------------------------------------------- /Foundational Sessions/Learning Objectives/Mathematics Foundation Learning Objectives.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Foundational Sessions/Learning Objectives/Mathematics Foundation Learning Objectives.pdf -------------------------------------------------------------------------------- /Foundational Sessions/Recap Week/Consolidation Lecture.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Foundational Sessions/Recap Week/Consolidation Lecture.pdf -------------------------------------------------------------------------------- /Foundational Sessions/Week 1/GPT Example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Foundational Sessions/Week 1/GPT Example.png -------------------------------------------------------------------------------- /Foundational Sessions/Week 1/Lecture 1_ Sets, Functions and Variables.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Foundational Sessions/Week 1/Lecture 1_ Sets, Functions and Variables.pdf -------------------------------------------------------------------------------- /Foundational Sessions/Week 10/Lecture 10 Hash Tables.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Foundational Sessions/Week 10/Lecture 10 Hash Tables.pdf -------------------------------------------------------------------------------- /Foundational Sessions/Week 11/Lecture 11 Trees.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Foundational Sessions/Week 11/Lecture 11 Trees.pdf -------------------------------------------------------------------------------- /Foundational Sessions/Week 11/Lesson 11 Source Code/Rose.py: -------------------------------------------------------------------------------- 1 | class RoseTreeNode: 2 | def __init__(self, value): 3 | self.value = value 4 | self.children = [] 5 | 6 | class RoseTree: 7 | def insert(self, parent, child_value): 8 | child = RoseTreeNode(child_value) 9 | parent.children.append(child) 10 | return child 11 | 12 | def search(self, node, key): 13 | if node.value == key: 14 | return node 15 | for child in node.children: 16 | found = self.search(child, key) 17 | if found: 18 | return found 19 | return None 20 | 21 | # Example usage 22 | root = RoseTreeNode('Project A') 23 | rose_tree = RoseTree() 24 | task1 = rose_tree.insert(root, 'Task 1') 25 | rose_tree.insert(task1, 'Subtask 1') 26 | print("Found" if rose_tree.search(root, 'Subtask 1') else "Not Found") 27 | -------------------------------------------------------------------------------- /Foundational Sessions/Week 11/Lesson 11 Source Code/experiment.py: -------------------------------------------------------------------------------- 1 | import random 2 | import time 3 | import matplotlib.pyplot as plt 4 | from RecursiveHeap import RecursiveHeap 5 | from IterativeHeap import IterativeHeap 6 | 7 | sizes = [10, 100, 1000, 10000, 50000, 100000, 500000, 1000000] 8 | recursive_times = [] 9 | iterative_times = [] 10 | 11 | for size in sizes: 12 | elements = [random.randint(1, 1000) for _ in range(size)] 13 | 14 | # Test RecursiveHeap 15 | rh = RecursiveHeap() 16 | start_time = time.time() 17 | for el in elements: 18 | rh.insert(el) 19 | while rh.retrieve() is not None: 20 | pass 21 | recursive_times.append(time.time() - start_time) 22 | 23 | # Test IterativeHeap 24 | ih = IterativeHeap() 25 | start_time = time.time() 26 | for el in elements: 27 | ih.insert(el) 28 | while ih.retrieve() is not None: 29 | pass 30 | iterative_times.append(time.time() - start_time) 31 | 32 | # Plot the results 33 | plt.figure(figsize=(10, 6)) 34 | plt.plot(sizes, recursive_times, label='Recursive Heap', marker='o') 35 | plt.plot(sizes, iterative_times, label='Iterative Heap', marker='x') 36 | plt.xlabel('Number of Elements') 37 | plt.ylabel('Time (seconds)') 38 | plt.title('Recursive vs Iterative Heap Performance') 39 | plt.legend() 40 | # plt.xscale('log') 41 | # plt.yscale('log') 42 | plt.grid(True) 43 | plt.show() 44 | -------------------------------------------------------------------------------- /Foundational Sessions/Week 12/Lecture 12_ Graphs.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Foundational Sessions/Week 12/Lecture 12_ Graphs.pdf -------------------------------------------------------------------------------- /Foundational Sessions/Week 12/Session 12 Code/UnweightedGraph.py: -------------------------------------------------------------------------------- 1 | # Example of an Unweighted, Directed/Undirected Graph 2 | eg_graph = {"a": ["b", "c"], 3 | "b": ["d"], 4 | "c": []} 5 | 6 | -------------------------------------------------------------------------------- /Foundational Sessions/Week 13/Lecture 13_ The Stack and The Heap.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Foundational Sessions/Week 13/Lecture 13_ The Stack and The Heap.pdf -------------------------------------------------------------------------------- /Foundational Sessions/Week 2/Lecture 2_ Linear Algebra.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Foundational Sessions/Week 2/Lecture 2_ Linear Algebra.pdf -------------------------------------------------------------------------------- /Foundational Sessions/Week 3/Lecture 3_ Probability.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Foundational Sessions/Week 3/Lecture 3_ Probability.pdf -------------------------------------------------------------------------------- /Foundational Sessions/Week 3/Lecture3SE.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | # Define a simple feature flagging function using probabilities 4 | def feature_flag(user_id, feature_probability): 5 | # Generate a random number between 0 and 1 6 | # This simulates the random nature of whether a user sees a feature. 7 | random_threshold = np.random.rand() 8 | 9 | # If the random number is less than the feature probability, enable the feature 10 | # This is a basic probability check. 11 | if random_threshold < feature_probability: 12 | return True # Feature is enabled for this user 13 | else: 14 | return False # Feature is disabled for this user 15 | 16 | # Probability of enabling a new feature (50% chance) 17 | feature_probability = 0.5 18 | 19 | # Simulate feature flagging for a set of users 20 | user_ids = [101, 102, 103, 104, 105] 21 | for user_id in user_ids: 22 | # Check if the feature should be enabled for the user 23 | feature_enabled = feature_flag(user_id, feature_probability) 24 | print(f"Feature enabled for user {user_id}: {feature_enabled}") 25 | -------------------------------------------------------------------------------- /Foundational Sessions/Week 3/Lecture3SE_final.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | # Probability of enabling a new feature (50% chance) 4 | feature_probability = 0.5 5 | 6 | # Simulate feature flagging for a set of users 7 | user_ids = [101, 102, 103, 104, 105] 8 | for user_id in user_ids: 9 | # Generate a random number between 0 and 1 10 | # This simulates the random nature of whether a user sees a feature. 11 | random_threshold = np.random.rand() 12 | 13 | # If the random number is less than the feature probability, enable the feature 14 | # This is a basic probability check. 15 | if random_threshold < feature_probability: 16 | feature_enabled = True # Feature is enabled for this user 17 | else: 18 | feature_enabled = False # Feature is disabled for this user 19 | 20 | print(f"Feature enabled for user {user_id}: {feature_enabled}") -------------------------------------------------------------------------------- /Foundational Sessions/Week 4/Lecture 4_ Combinations and Permutations.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Foundational Sessions/Week 4/Lecture 4_ Combinations and Permutations.pdf -------------------------------------------------------------------------------- /Foundational Sessions/Week 5/Lecture 5_ Differentiation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Foundational Sessions/Week 5/Lecture 5_ Differentiation.pdf -------------------------------------------------------------------------------- /Foundational Sessions/Week 6/Lecture 6_ Order Complexity.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Foundational Sessions/Week 6/Lecture 6_ Order Complexity.pdf -------------------------------------------------------------------------------- /Foundational Sessions/Week 7/Lecture 7_ Diagrams(Rough).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Foundational Sessions/Week 7/Lecture 7_ Diagrams(Rough).pdf -------------------------------------------------------------------------------- /Foundational Sessions/Week 7/Lecture 7_ Linear Data Structures.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Foundational Sessions/Week 7/Lecture 7_ Linear Data Structures.pdf -------------------------------------------------------------------------------- /Foundational Sessions/Week 8/Lecture 8_ Stacks and Queues.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Foundational Sessions/Week 8/Lecture 8_ Stacks and Queues.pdf -------------------------------------------------------------------------------- /Foundational Sessions/Week 8/Session8/PriorityQueue.py: -------------------------------------------------------------------------------- 1 | # Simple priority queue class which uses the queue module 2 | import queue 3 | 4 | class PriorityQueue: 5 | # Initialise the PQ with an instance of the PQ class 6 | # A PQ of fixed length can be created as well 7 | def __init__(self): 8 | self.pqueue = queue.PriorityQueue() 9 | 10 | # Insert an element into the PQ based on its priority 11 | # This PQ gives the lowest values the highest priority 12 | # We change the sign of the priorities to fit our need 13 | def enqueue(self, value, priority): 14 | self.pqueue.put((-1*priority, value)) 15 | 16 | # Remove the element with the highest priority 17 | def dequeue(self): 18 | if self.pqueue.qsize() == 0: 19 | print("Error: Priority Queue Underflow!") 20 | return None 21 | else: 22 | return self.pqueue.get()[1] 23 | 24 | # Create a PQ to test the class 25 | pqueue = PriorityQueue() 26 | 27 | # Check underflow error 28 | pqueue.dequeue() 29 | 30 | # Add some elements to the PQ 31 | pqueue.enqueue(1, 90) 32 | pqueue.enqueue(2, 100) 33 | pqueue.enqueue(945, 95) 34 | 35 | # Remove an element from the PQ 36 | popped = pqueue.dequeue() 37 | print("Dequeued element: {}".format(popped)) -------------------------------------------------------------------------------- /Foundational Sessions/Week 8/Session8/PriorityQueue_List.py: -------------------------------------------------------------------------------- 1 | # Simple priority queue class which uses a list 2 | 3 | class PriorityQueue: 4 | # Initialise the queue by creating an empty list 5 | # Each element will be a pair of values (tuple) 6 | def __init__(self): 7 | self.pqueue = [] 8 | 9 | # Add an element to the end of the queue 10 | # Sort by priority to queue by priority 11 | def enqueue(self, value, priority): 12 | self.pqueue.append((priority, value)) 13 | self.pqueue.sort() 14 | 15 | # Remove the element with the highest priority 16 | # The element would be at the end of list but 17 | # the beginning of our queue 18 | def dequeue(self): 19 | if len(self.pqueue) == 0: 20 | print("Error: Priority Queue Underflow!") 21 | return None 22 | else: 23 | return self.pqueue.pop()[1] 24 | 25 | 26 | # Create a priority queue to test the class 27 | pqueue = PriorityQueue() 28 | 29 | # Check underflow error 30 | pqueue.dequeue() 31 | 32 | # Add some elements to the priority queue 33 | pqueue.enqueue(1, 90) 34 | pqueue.enqueue(2, 100) 35 | pqueue.enqueue(945, 95) 36 | 37 | # Remove an element from the priority queue 38 | popped = pqueue.dequeue() 39 | print("Dequeued element: {}".format(popped)) 40 | -------------------------------------------------------------------------------- /Foundational Sessions/Week 8/Session8/Queue.py: -------------------------------------------------------------------------------- 1 | # Simple queue class using deque to define operations 2 | from collections import deque 3 | 4 | class Queue: 5 | # Initialise the queue by creating a deque 6 | # A queue can be created of fixed length as well 7 | def __init__(self): 8 | self.queue = deque() 9 | 10 | # Add an element to the end of the queue 11 | def enqueue(self, value): 12 | self.queue.append(value) 13 | 14 | # Remove an element from the front of the queue 15 | def dequeue(self): 16 | if len(self.queue) == 0: 17 | print("Error: Queue Underflow!") 18 | return None 19 | else: 20 | return self.queue.popleft() 21 | 22 | # Create a queue to test the class 23 | queue = Queue() 24 | 25 | # Check underflow error 26 | queue.dequeue() 27 | 28 | # Add some elements to the queue 29 | queue.enqueue(1) 30 | queue.enqueue(2) 31 | queue.enqueue(945) 32 | 33 | # Remove an element from the queue 34 | popped = queue.dequeue() 35 | print("Dequeued element: {}".format(popped)) 36 | -------------------------------------------------------------------------------- /Foundational Sessions/Week 8/Session8/Stack.py: -------------------------------------------------------------------------------- 1 | # Simple stack class with the push and pop functions defined 2 | class Stack: 3 | # Initialise the stack by creating an array of fixed size 4 | # and a top pointer 5 | def __init__(self, max): 6 | self.max_size = max 7 | self.stack = [None] * max 8 | self.top = -1 9 | 10 | # Push an element to the stack 11 | # Display a stack overflow error if the stack is full 12 | def push(self, value): 13 | if self.top == self.max_size-1: 14 | print("Error: Stack Overflow!") 15 | return 16 | 17 | self.top += 1 18 | self.stack[self.top] = value 19 | 20 | # Pop an element from the stack 21 | # Display a stack underflow error if the stack is empty 22 | def pop(self): 23 | if self.top == -1: 24 | print("Error: Stack Underflow!") 25 | return 26 | 27 | removed = self.stack[self.top] 28 | self.top -= 1 29 | return removed 30 | 31 | 32 | # Create a stack to test the class 33 | stack = Stack(10) 34 | 35 | # Test the underflow error 36 | stack.pop() 37 | 38 | # Add some elements to the stack 39 | stack.push(2) 40 | stack.push(13) 41 | 42 | # Remove an element from the stack 43 | stack.pop() 44 | -------------------------------------------------------------------------------- /Foundational Sessions/Week 9/Lecture 9 Strings.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Foundational Sessions/Week 9/Lecture 9 Strings.pdf -------------------------------------------------------------------------------- /Foundational Sessions/Week 9/Session9Application.py: -------------------------------------------------------------------------------- 1 | # Unicode Implementation 2 | # Sample strings with non-Latin characters and emojis 3 | data = ["Data analysis 📊", "데이터 분석", "Análisis de datos"] 4 | 5 | # Ensuring correct Unicode encoding 6 | 7 | 8 | encoded_data = [str.encode('utf-8') for str in data] 9 | 10 | 11 | print("Encoded Data:", encoded_data) 12 | 13 | # Efficient Concatenation using 'join()' 14 | report_parts = ["Section 1: Introduction\n", "Section 2: Analysis\n", "Section 3: Conclusion\n"] 15 | report = ''.join(report_parts) 16 | print("Concatenated Report:", report) 17 | 18 | # Large Text Construction using String Builder Pattern 19 | def string_builder(strings): 20 | return ''.join(strings) 21 | 22 | # Building a large report 23 | large_report = string_builder(["Paragraph " + str(i) + "\n" for i in range(1, 101)]) 24 | print("Large Report (First 100 chars):", large_report[:100]) 25 | -------------------------------------------------------------------------------- /Foundational Sessions/Week 9/StringBuilder.py: -------------------------------------------------------------------------------- 1 | class StringBuilder: 2 | def __init__(self): 3 | self._strings = [] 4 | 5 | def add(self, string): 6 | """Adds a new string to the StringBuilder.""" 7 | self._strings.append(string) 8 | 9 | def build(self): 10 | """Constructs the final string using 'join()'.""" 11 | return ''.join(self._strings) 12 | 13 | def clear(self): 14 | """Clears the accumulated strings.""" 15 | self._strings = [] 16 | 17 | def __str__(self): 18 | """Returns the current state of the string being built.""" 19 | return self.build() 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Recap Week/Open Class/open_class3.py: -------------------------------------------------------------------------------- 1 | """ 2 | 3 | What does invalid literal for int with base 10 mean 4 | when user chooses something other than 1, 2 , 3 , 4. 5 | How do I defend against this? 6 | 7 | """ 8 | 9 | user_input = input("Enter value:") 10 | 11 | # if numeric: 12 | # cast/convert to int/float 13 | # else: 14 | # print error 15 | # prompt again 16 | 17 | # update = int(user_input) 18 | # print(update) 19 | 20 | 21 | 22 | """ 23 | Second question[2, 4,5] i want to join these but 24 | getting error expected str instance, int found. 25 | I used "\n".join(item_quantity)' 26 | """ 27 | 28 | item_quantity = [2, 4, 5] 29 | # Iterate over item_quan: 30 | # for every item: 31 | # add a str intance of this item to new list 32 | 33 | joined = "\n".join(item_quantity) 34 | 35 | print(joined) -------------------------------------------------------------------------------- /Recap Week/Tech Talk/Tech Talk_ OOP.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Recap Week/Tech Talk/Tech Talk_ OOP.pdf -------------------------------------------------------------------------------- /Recap Week/Theory and Practical/Python Basics.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Recap Week/Theory and Practical/Python Basics.pdf -------------------------------------------------------------------------------- /Recap Week/Theory and Practical/Sequences.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Recap Week/Theory and Practical/Sequences.pdf -------------------------------------------------------------------------------- /Tech Talk/1. Week 1, Getting Started with Game Development/Tech Talk - Game Dev.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/1. Week 1, Getting Started with Game Development/Tech Talk - Game Dev.pdf -------------------------------------------------------------------------------- /Tech Talk/10. Week 15 - Introduction to Data Engineering/Tech Talk - Data Engineering.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/10. Week 15 - Introduction to Data Engineering/Tech Talk - Data Engineering.pdf -------------------------------------------------------------------------------- /Tech Talk/11. Week 16 - Introduction to Web Development/Code Files/images/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/11. Week 16 - Introduction to Web Development/Code Files/images/avatar.png -------------------------------------------------------------------------------- /Tech Talk/11. Week 16 - Introduction to Web Development/Code Files/scripts/tutorial.js: -------------------------------------------------------------------------------- 1 | // This is how you make a variable in javascript 2 | // This is a numerical data type 3 | // let numberOfCats = 9; 4 | // console.log("Number of cats: ", numberOfCats); 5 | 6 | // let distance = 9.6; 7 | // console.log("Distance: ", distance); 8 | 9 | // This is a string data type 10 | // let fullName = "John Doe"; 11 | // console.log("Name: ", fullName); 12 | 13 | // This is how you make a boolean data type 14 | // Remembe: A boolean data type can be either true or false 15 | // let doorOpen = true; 16 | // console.log("doorOpen is a boolean data type: ", doorOpen); 17 | 18 | // let numbers = [1, 2, 3, 4, 5, 6]; 19 | // console.log("Numbers array: ", numbers); 20 | // let items = ["Charlie", 6, true, 9, 4, 6, 5, 3]; 21 | // console.log("Items array: ", items); 22 | 23 | // let car = { 24 | // numberofWheels: 4, 25 | // modelName: "Model T", 26 | // manufacturerName: "Tesla", 27 | // }; 28 | 29 | // console.log("Car object: ", car); 30 | 31 | // const PI = 3.14; 32 | // PI = 2.2; 33 | -------------------------------------------------------------------------------- /Tech Talk/11. Week 16 - Introduction to Web Development/TechTalk_ Intro to WD.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/11. Week 16 - Introduction to Web Development/TechTalk_ Intro to WD.pdf -------------------------------------------------------------------------------- /Tech Talk/2. Week 7 - OOP 2.0/1. oop_principles.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/2. Week 7 - OOP 2.0/1. oop_principles.pdf -------------------------------------------------------------------------------- /Tech Talk/2. Week 7 - OOP 2.0/2. understanding_classes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/2. Week 7 - OOP 2.0/2. understanding_classes.pdf -------------------------------------------------------------------------------- /Tech Talk/2. Week 7 - OOP 2.0/3. model_class.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/2. Week 7 - OOP 2.0/3. model_class.pdf -------------------------------------------------------------------------------- /Tech Talk/2. Week 7 - OOP 2.0/4. module_class.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/2. Week 7 - OOP 2.0/4. module_class.pdf -------------------------------------------------------------------------------- /Tech Talk/3. Week 8 - OOP/finance_app/services/sqlite.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/3. Week 8 - OOP/finance_app/services/sqlite.py -------------------------------------------------------------------------------- /Tech Talk/4. Week 9 - Cyber Security/Tech Talk on CyberSecurity.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/4. Week 9 - Cyber Security/Tech Talk on CyberSecurity.pdf -------------------------------------------------------------------------------- /Tech Talk/5. Week 10 - Intro to APIs/application/models/__pycache__/short_url_details.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/5. Week 10 - Intro to APIs/application/models/__pycache__/short_url_details.cpython-311.pyc -------------------------------------------------------------------------------- /Tech Talk/5. Week 10 - Intro to APIs/application/models/__pycache__/short_url_details.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/5. Week 10 - Intro to APIs/application/models/__pycache__/short_url_details.cpython-39.pyc -------------------------------------------------------------------------------- /Tech Talk/5. Week 10 - Intro to APIs/application/models/short_url_details.py: -------------------------------------------------------------------------------- 1 | class ShortUrlDetails(): 2 | def __init__(self, url: str, key: str, ttl: int, link_url: str): 3 | self.url = url 4 | self.key = key 5 | self.ttl = ttl 6 | self.link_url = link_url 7 | 8 | def __str__(self) -> str: 9 | output = f"URL: {self.url}\n" 10 | output += f"Key: {self.key}\n" 11 | output += f"TTL: {self.ttl}\n" 12 | output += f"Link URL: {self.link_url}\n" 13 | return output 14 | -------------------------------------------------------------------------------- /Tech Talk/5. Week 10 - Intro to APIs/application/services/__pycache__/json_service.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/5. Week 10 - Intro to APIs/application/services/__pycache__/json_service.cpython-311.pyc -------------------------------------------------------------------------------- /Tech Talk/5. Week 10 - Intro to APIs/application/services/__pycache__/url_shortener_service.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/5. Week 10 - Intro to APIs/application/services/__pycache__/url_shortener_service.cpython-311.pyc -------------------------------------------------------------------------------- /Tech Talk/5. Week 10 - Intro to APIs/application/services/__pycache__/url_shortener_service.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/5. Week 10 - Intro to APIs/application/services/__pycache__/url_shortener_service.cpython-39.pyc -------------------------------------------------------------------------------- /Tech Talk/5. Week 10 - Intro to APIs/application/services/url_shortener_service.py: -------------------------------------------------------------------------------- 1 | from models.short_url_details import ShortUrlDetails 2 | import requests 3 | 4 | class UrlShortenerService(): 5 | __BASE_URL = "https://url.api.stdlib.com/temporary@0.3.0/" 6 | __CREATE_URL = "create" 7 | __DESTROY_URL = "destroy" 8 | 9 | def create(self, link: str, ttl: int) -> ShortUrlDetails: 10 | url = self.__BASE_URL + self.__CREATE_URL 11 | 12 | r = requests.get(url, params={"url": link, "ttl": ttl}) 13 | 14 | if r.status_code != 200: 15 | return None 16 | 17 | results = r.json() 18 | 19 | return ShortUrlDetails(**results) 20 | 21 | 22 | def destroy(self, key: str): 23 | url = self.__BASE_URL + self.__DESTROY_URL 24 | 25 | r = requests.post(url, json={"key": key}) 26 | 27 | if r.status_code != 200: 28 | return False 29 | 30 | return True 31 | -------------------------------------------------------------------------------- /Tech Talk/5. Week 10 - Intro to APIs/application/short_links.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /Tech Talk/5. Week 10 - Intro to APIs/readme.md: -------------------------------------------------------------------------------- 1 | ### Application API link 2 | [URL Shortener](https://autocode.com/url/api/temporary/0.3.0/create/) 3 | 4 | ### Analysis API link 5 | [NBA Data](https://documenter.getpostman.com/view/24232555/2s93shzpR3#941df14e-8d1c-4a02-8c2d-a003dbe2a03b) 6 | -------------------------------------------------------------------------------- /Tech Talk/5. Week 10 - Intro to APIs/slides-export.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/5. Week 10 - Intro to APIs/slides-export.pdf -------------------------------------------------------------------------------- /Tech Talk/6. Week 11 - Working with SQL in Python/working_with_sql_in_python.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/6. Week 11 - Working with SQL in Python/working_with_sql_in_python.pdf -------------------------------------------------------------------------------- /Tech Talk/7. Week 12 - Querying Data in SQL/Getting Data in SQL.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/7. Week 12 - Querying Data in SQL/Getting Data in SQL.pdf -------------------------------------------------------------------------------- /Tech Talk/8. Week 13 - Getting Data in SQL - Part 2/Getting Data in SQL - Part 2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/8. Week 13 - Getting Data in SQL - Part 2/Getting Data in SQL - Part 2.pdf -------------------------------------------------------------------------------- /Tech Talk/8. Week 13 - Getting Data in SQL - Part 2/Set up database/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/8. Week 13 - Getting Data in SQL - Part 2/Set up database/__init__.py -------------------------------------------------------------------------------- /Tech Talk/8. Week 13 - Getting Data in SQL - Part 2/Set up database/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "service": "postgres", 3 | "connection_string": { 4 | "username": "postgres", 5 | "password": "superstrongpassword", 6 | "database": "postgres" 7 | } 8 | } -------------------------------------------------------------------------------- /Tech Talk/8. Week 13 - Getting Data in SQL - Part 2/Set up database/final/language.csv: -------------------------------------------------------------------------------- 1 | language_id,name,last_update 2 | 1,English,2017-02-15 3 | 2,Italian,2017-02-15 4 | 3,Japanese,2017-02-15 5 | 4,Mandarin,2017-02-15 6 | 5,French,2017-02-15 7 | 6,German,2017-02-15 8 | -------------------------------------------------------------------------------- /Tech Talk/8. Week 13 - Getting Data in SQL - Part 2/Set up database/models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/8. Week 13 - Getting Data in SQL - Part 2/Set up database/models/__init__.py -------------------------------------------------------------------------------- /Tech Talk/8. Week 13 - Getting Data in SQL - Part 2/Set up database/models/ms_sql_model.py: -------------------------------------------------------------------------------- 1 | """ 2 | WARNING: DO NOT MAKE ANY CHANGES TO THE CODE, 3 | PLEASE FOLLOW THE INSTRUCTIONS IN THE README FILE TO SET EVERYTHING UP 4 | """ 5 | from pydantic import BaseModel, Field 6 | 7 | class SQLServer(BaseModel): 8 | user: str = Field(default="") 9 | password: str = Field(default="") 10 | server: str = Field(default="localhost") 11 | driver: str = Field(default="SQL Server Native Client 11.0") 12 | database: str 13 | 14 | def __str__(self) -> str: 15 | credentials = ":".join([self.user, self.password, "@"]) if self.user and self.password else "" 16 | return f'mssql+pyodbc://{credentials}{self.server}/{self.database}?driver={self.driver}' -------------------------------------------------------------------------------- /Tech Talk/8. Week 13 - Getting Data in SQL - Part 2/Set up database/models/my_sql_model.py: -------------------------------------------------------------------------------- 1 | """ 2 | WARNING: DO NOT MAKE ANY CHANGES TO THE CODE, 3 | PLEASE FOLLOW THE INSTRUCTIONS IN THE README FILE TO SET EVERYTHING UP 4 | """ 5 | from pydantic import BaseModel, Field 6 | 7 | class MySQL(BaseModel): 8 | user: str = Field(default="") 9 | password: str = Field(default="") 10 | server: str = Field(default="locahost") 11 | port: int = Field(default=3306) 12 | database: str 13 | 14 | def __str__(self) -> str: 15 | credentials = ":".join([self.user, self.password, '@']) if self.user and self.password else "" 16 | 17 | return f'mysql+pymysql://{credentials}{self.server}:{self.port}/{self.database}' -------------------------------------------------------------------------------- /Tech Talk/8. Week 13 - Getting Data in SQL - Part 2/Set up database/models/postgres_model.py: -------------------------------------------------------------------------------- 1 | """ 2 | WARNING: DO NOT MAKE ANY CHANGES TO THE CODE, 3 | PLEASE FOLLOW THE INSTRUCTIONS IN THE README FILE TO SET EVERYTHING UP 4 | """ 5 | from pydantic import BaseModel, Field 6 | 7 | class Postgres(BaseModel): 8 | user: str = Field(default="postgres") 9 | password: str = Field(default="postgres") 10 | server: str = Field(default="localhost") 11 | port: int = Field(default=5432) 12 | database: str 13 | 14 | def __str__(self) -> str: 15 | credentials = ":".join([self.user, self.password]) if self.user and self.password else "" 16 | 17 | return f"postgresql://{credentials}@{self.server}:{self.port}/{self.database}" -------------------------------------------------------------------------------- /Tech Talk/8. Week 13 - Getting Data in SQL - Part 2/Set up database/requirements.txt: -------------------------------------------------------------------------------- 1 | pandas 2 | sqlalchemy 3 | pydantic 4 | -------------------------------------------------------------------------------- /Tech Talk/8. Week 13 - Getting Data in SQL - Part 2/Set up database/services/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/8. Week 13 - Getting Data in SQL - Part 2/Set up database/services/__init__.py -------------------------------------------------------------------------------- /Tech Talk/8. Week 13 - Getting Data in SQL - Part 2/Set up database/services/database_connection_factory.py: -------------------------------------------------------------------------------- 1 | """ 2 | WARNING: DO NOT MAKE ANY CHANGES TO THE CODE, 3 | PLEASE FOLLOW THE INSTRUCTIONS IN THE README FILE TO SET EVERYTHING UP 4 | """ 5 | 6 | from models.ms_sql_model import SQLServer 7 | from models.postgres_model import Postgres 8 | from models.my_sql_model import MySQL 9 | 10 | def get_database_model(service: str, config_data: dict[str]): 11 | try: 12 | return __get_connection_from_service(service, config_data) 13 | except Exception as e: 14 | print(f'Error: {e}') 15 | return None 16 | 17 | 18 | def __get_connection_from_service(service: str, config_data: dict[str]): 19 | if service == 'ms_sql_server': 20 | return SQLServer(**config_data) 21 | elif service == 'postgres': 22 | return Postgres(**config_data) 23 | elif service == 'mysql': 24 | return MySQL(**config_data) 25 | else: 26 | None -------------------------------------------------------------------------------- /Tech Talk/9. Week 14 - Building APIs/Slides.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/9. Week 14 - Building APIs/Slides.pdf -------------------------------------------------------------------------------- /Tech Talk/9. Week 14 - Building APIs/shopping_api/data/database_scripts.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE user ( 2 | id VARCHAR(255) PRIMARY KEY, 3 | role INT, 4 | first_name VARCHAR(255), 5 | last_name VARCHAR(255), 6 | email VARCHAR(255) 7 | ); 8 | 9 | CREATE TABLE user_auth ( 10 | user_id VARCHAR(255), 11 | email VARCHAR(255), 12 | password_hash TEXT 13 | ); 14 | 15 | CREATE TABLE product ( 16 | id VARCHAR(255) PRIMARY KEY, 17 | name VARCHAR(255), 18 | price NUMERIC 19 | ); 20 | 21 | CREATE TABLE wishlist ( 22 | id VARCHAR(255) PRIMARY KEY, 23 | user_id VARCHAR(255), 24 | product_id VARCHAR(255), 25 | FOREIGN KEY (user_id) REFERENCES user(id), 26 | FOREIGN KEY (product_id) REFERENCES product(id) 27 | ); 28 | 29 | CREATE TABLE cart ( 30 | id VARCHAR(255) PRIMARY KEY, 31 | user_id VARCHAR(255), 32 | product_id VARCHAR(255), 33 | FOREIGN KEY (user_id) REFERENCES user(id), 34 | FOREIGN KEY (product_id) REFERENCES product(id) 35 | ); 36 | 37 | CREATE TABLE api_token ( 38 | token TEXT PRIMARY KEY, 39 | is_active BOOLEAN, 40 | expires DATE 41 | ); 42 | -------------------------------------------------------------------------------- /Tech Talk/9. Week 14 - Building APIs/shopping_api/data/load_data.py: -------------------------------------------------------------------------------- 1 | import sqlite3 2 | 3 | conn = sqlite3.connect('resources/store.db') 4 | 5 | with open('data/database_scripts.sql', 'r') as f: 6 | conn.cursor().executescript(f.read()) 7 | 8 | 9 | with open('data/product.sql', 'r') as f: 10 | conn.cursor().executescript(f.read()) 11 | 12 | -------------------------------------------------------------------------------- /Tech Talk/9. Week 14 - Building APIs/shopping_api/dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.11 2 | WORKDIR /app 3 | COPY . /app 4 | RUN pip install -r requirements.txt 5 | CMD ["python", "main.py"] 6 | -------------------------------------------------------------------------------- /Tech Talk/9. Week 14 - Building APIs/shopping_api/main.py: -------------------------------------------------------------------------------- 1 | # Import system dependencies 2 | import os 3 | from dotenv import load_dotenv 4 | 5 | # Import FastAPI dependencies 6 | import uvicorn 7 | from fastapi.middleware.cors import CORSMiddleware 8 | from fastapi import FastAPI 9 | from fastapi import APIRouter 10 | 11 | # Import routers 12 | from src.routers import product_router , user_auth_router , user_router 13 | 14 | # Load the environment variables 15 | load_dotenv() 16 | 17 | app = FastAPI() 18 | 19 | # Configure middleware 20 | app.add_middleware( 21 | CORSMiddleware, 22 | allow_origins=['*'], 23 | allow_credentials=True, 24 | allow_methods=['*'], 25 | allow_headers=['*'] 26 | ) 27 | 28 | 29 | # Configure routers 30 | app.include_router(product_router.router) 31 | app.include_router(user_auth_router.router) 32 | app.include_router(user_router.router) 33 | 34 | if __name__ == "__main__": 35 | uvicorn.run('main:app', host=os.getenv("HOST"), port=int(os.getenv("PORT")), 36 | reload=os.getenv("REOLOAD")) -------------------------------------------------------------------------------- /Tech Talk/9. Week 14 - Building APIs/shopping_api/readme.md: -------------------------------------------------------------------------------- 1 | # Shopping API 2 | This is a basic API that simulates an online store where a user can create an account and add items to their wishlist and shopping cart. 3 | 4 | Admin users are able to update and add products. 5 | 6 | Anyone with an API key is able to view the products. 7 | 8 | # Quick Start 9 | 10 | ### Set up virtual environment 11 | 12 | ```shell 13 | python -m venv .venv 14 | ``` 15 | 16 | *windows* 17 | ```shell 18 | source .venv/Script/activate 19 | ``` 20 | 21 | *mac/linux* 22 | ```shell 23 | source .venv/bin/activate 24 | ``` 25 | 26 | ### Installation 27 | 28 | To install all of the dependencies run: 29 | 30 | *windows* 31 | ```shell 32 | pip install -r requirements.txt 33 | ``` 34 | 35 | *mac/linux* 36 | ```shell 37 | pip3 install -r requirements.txt 38 | ``` 39 | 40 | ### Set up .env 41 | 42 | 1. Create the `.env` file in the main directory 43 | 2. Add the following values to the `.env` file 44 | 45 | ```yaml 46 | HOST=localhost 47 | PORT=8080 48 | RELOAD=True 49 | SECRET_KEY=09d25e094faa6ca2556c818166b7a9563b93f7099f6f0f4caa6cf63b88e8d3e7 50 | ``` 51 | 52 | ### Create SQLite database and add data 53 | In your terminal run the following command 54 | 55 | ```shell 56 | python data/load_data.sql 57 | ``` -------------------------------------------------------------------------------- /Tech Talk/9. Week 14 - Building APIs/shopping_api/requirements.txt: -------------------------------------------------------------------------------- 1 | annotated-types==0.6.0 2 | anyio==4.3.0 3 | bcrypt==4.1.2 4 | cffi==1.16.0 5 | click==8.1.7 6 | colorama==0.4.6 7 | cryptography==42.0.5 8 | ecdsa==0.18.0 9 | fastapi==0.110.0 10 | greenlet==3.0.3 11 | h11==0.14.0 12 | idna==3.6 13 | passlib==1.7.4 14 | pyasn1==0.5.1 15 | pycparser==2.21 16 | pydantic==2.6.3 17 | pydantic_core==2.16.3 18 | python-dotenv==1.0.1 19 | python-jose==3.3.0 20 | python-multipart==0.0.9 21 | rsa==4.9 22 | six==1.16.0 23 | sniffio==1.3.1 24 | SQLAlchemy==2.0.27 25 | starlette==0.36.3 26 | typing_extensions==4.10.0 27 | uvicorn==0.27.1 28 | -------------------------------------------------------------------------------- /Tech Talk/9. Week 14 - Building APIs/shopping_api/resources/store.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/9. Week 14 - Building APIs/shopping_api/resources/store.db -------------------------------------------------------------------------------- /Tech Talk/9. Week 14 - Building APIs/shopping_api/src/controllers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/9. Week 14 - Building APIs/shopping_api/src/controllers/__init__.py -------------------------------------------------------------------------------- /Tech Talk/9. Week 14 - Building APIs/shopping_api/src/controllers/product_controller.py: -------------------------------------------------------------------------------- 1 | from src.models.product import Product 2 | from src.services.product_service import ProductService 3 | from src.services.user_service import UserService 4 | 5 | class ProductController(): 6 | TABLE_NAME = "products" 7 | COLUMNS = ["id", "name", "price"] 8 | 9 | def __init__(self, connection_string: str): 10 | self.__service = ProductService(connection_string) 11 | self.__user_service = UserService(connection_string) 12 | 13 | 14 | def create(self, product: Product): 15 | return self.__service.create(product) 16 | 17 | def get_all(self): 18 | return self.__service.get_all() 19 | 20 | def get(self, id: str): 21 | return self.__service.get(id) 22 | 23 | def update(self, product: Product): 24 | return self.__service.update(product) 25 | 26 | def delete(self, id: str): 27 | return self.__service.delete(id) 28 | 29 | def is_admin(self, user_id): 30 | return self.__user_service.is_admin(user_id) 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /Tech Talk/9. Week 14 - Building APIs/shopping_api/src/controllers/user_auth_controller.py: -------------------------------------------------------------------------------- 1 | from src.models.user_auth_request_model import UserAuthRequest 2 | from src.services.api_token_service import ApiTokenService 3 | 4 | from src.services.auth_service import AuthService 5 | 6 | 7 | 8 | class UserAuthController(): 9 | TABLE_NAME = "user_auth" 10 | ALGORITHM = "HS256" 11 | 12 | def __init__(self, connection_string: str): 13 | self.__api_token_service = ApiTokenService(connection_string) 14 | self.__auth_service = AuthService(connection_string) 15 | 16 | def create_user(self, user: UserAuthRequest): 17 | return self.__auth_service.create_user(user) 18 | 19 | def generate_api_token(self): 20 | return self.__api_token_service.generate_token() 21 | 22 | def is_valid_token(self, token: str): 23 | return self.__api_token_service.is_valid_token(token) 24 | 25 | def authenticate_user(self, email: str, password: str): 26 | return self.__auth_service.authenticate_user(email, password) 27 | 28 | def create_access_token(self, user_id: str): 29 | return self.__auth_service.create_access_token(user_id) -------------------------------------------------------------------------------- /Tech Talk/9. Week 14 - Building APIs/shopping_api/src/controllers/user_controller.py: -------------------------------------------------------------------------------- 1 | from src.models.user import User 2 | from src.services.user_service import UserService 3 | 4 | class UserController(): 5 | TABLE_NAME = "user" 6 | COLUMNS = ['user_id', 'role', 'first_name', 7 | 'last_name', 'email', 'cart', 'wishlist'] 8 | 9 | def __init__(self, connection_string): 10 | self.__service = UserService(connection_string) 11 | 12 | def update(self, user: User): 13 | return self.__service.update(user) 14 | 15 | 16 | def get_user(self, user_id: str): 17 | return self.__service.get_user(user_id) 18 | 19 | def add_to_cart(self, user_id: str, product_id: str): 20 | return self.__service.add_to_cart(user_id, product_id) 21 | 22 | 23 | def add_to_wishlist(self, user_id: str, product_id: str): 24 | return self.__service.add_to_wishlist(user_id, product_id) 25 | 26 | def is_admin(self, user_id): 27 | return self.__service.is_admin(user_id) 28 | -------------------------------------------------------------------------------- /Tech Talk/9. Week 14 - Building APIs/shopping_api/src/enum/roles.py: -------------------------------------------------------------------------------- 1 | from enum import Enum 2 | 3 | class Role(Enum): 4 | admin = 1 5 | customer = 2 6 | 7 | -------------------------------------------------------------------------------- /Tech Talk/9. Week 14 - Building APIs/shopping_api/src/models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/9. Week 14 - Building APIs/shopping_api/src/models/__init__.py -------------------------------------------------------------------------------- /Tech Talk/9. Week 14 - Building APIs/shopping_api/src/models/access_token_model.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel 2 | 3 | class AccessToken: 4 | access_token: str 5 | token_type: str -------------------------------------------------------------------------------- /Tech Talk/9. Week 14 - Building APIs/shopping_api/src/models/api_token_model.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel 2 | from datetime import datetime 3 | 4 | class ApiToken(BaseModel): 5 | token: str 6 | is_active: bool 7 | expires: datetime -------------------------------------------------------------------------------- /Tech Talk/9. Week 14 - Building APIs/shopping_api/src/models/product.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel 2 | 3 | class Product(BaseModel): 4 | id: str 5 | name: str 6 | price: float 7 | -------------------------------------------------------------------------------- /Tech Talk/9. Week 14 - Building APIs/shopping_api/src/models/user.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel, Field 2 | from src.enum.roles import Role 3 | 4 | class User(BaseModel): 5 | id: str 6 | role: int 7 | first_name: str = Field(default=None) 8 | last_name: str = Field(default=None) 9 | email: str 10 | cart: list[str] = Field(default=[]) # Contains a list of product Ids 11 | wishlist: list[str] = Field(default=[]) # Contains a list of product Ids 12 | 13 | -------------------------------------------------------------------------------- /Tech Talk/9. Week 14 - Building APIs/shopping_api/src/models/user_auth.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel 2 | 3 | class UserAuth(BaseModel): 4 | user_id: str 5 | email: str 6 | password_hash: str -------------------------------------------------------------------------------- /Tech Talk/9. Week 14 - Building APIs/shopping_api/src/models/user_auth_request_model.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel 2 | 3 | class UserAuthRequest(BaseModel): 4 | email: str 5 | password: str -------------------------------------------------------------------------------- /Tech Talk/9. Week 14 - Building APIs/shopping_api/src/repository/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/9. Week 14 - Building APIs/shopping_api/src/repository/__init__.py -------------------------------------------------------------------------------- /Tech Talk/9. Week 14 - Building APIs/shopping_api/src/routers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Tech Talk/9. Week 14 - Building APIs/shopping_api/src/routers/__init__.py -------------------------------------------------------------------------------- /Tech Talk/9. Week 14 - Building APIs/shopping_api/src/services/product_service.py: -------------------------------------------------------------------------------- 1 | from src.repository.database_repository import DatabaseRepository 2 | from src.models.product import Product 3 | 4 | class ProductService(): 5 | TABLE_NAME = "product" 6 | COLUMNS = ["id", "name", "price"] 7 | 8 | 9 | def __init__(self, connection_string: str) -> None: 10 | self.__db_repo = DatabaseRepository(connection_string) 11 | 12 | def create(self, product: Product): 13 | return self.__db_repo.create(self.TABLE_NAME, product.model_dump()) 14 | 15 | def get_all(self): 16 | result = self.__db_repo.get_all(self.TABLE_NAME) 17 | result = [dict(zip(self.COLUMNS, value)) for value in result] 18 | return result 19 | 20 | def get(self, id: str): 21 | result = self.__db_repo.get(self.TABLE_NAME, id) 22 | 23 | return dict(zip(self.COLUMNS, result)) 24 | 25 | def update(self, product: Product): 26 | product = product.model_dump() 27 | id = product.pop("id") 28 | 29 | return self.__db_repo.update(self.TABLE_NAME, id, product.model_dump()) 30 | 31 | def delete(self, id: str): 32 | return self.__db_repo.delete(self.TABLE_NAME, id) -------------------------------------------------------------------------------- /Tech Talk/README.md: -------------------------------------------------------------------------------- 1 | # Tech-Talks-Backpack 2 | Repository containing the resources relevant to our Tech Talk sessions. 3 | Kindly find these resources in their relevant directories/sub-directories above. 4 | -------------------------------------------------------------------------------- /Week 1/Strings.py: -------------------------------------------------------------------------------- 1 | double_quote = "The quick brown fox jumps over the lazy dog" 2 | single_quote = 'A' 3 | 4 | # Assigning a string to a variable 5 | name = "Miles" 6 | surname = "Morales" 7 | 8 | # Assigning the result of two concatenated strings to a variable called 'full_name' 9 | full_name = name + surname 10 | print(full_name) 11 | 12 | full_name = name + " " + surname 13 | print(full_name) 14 | 15 | # BONUS ALERT!!! --> Using formatted-strings :) 16 | full_name = f"{name} {surname}" 17 | 18 | # Printing whatever is stored in the full_name variable to the terminal 19 | print(full_name) 20 | -------------------------------------------------------------------------------- /Week 1/[New] Conditional Statements.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 1/[New] Conditional Statements.pdf -------------------------------------------------------------------------------- /Week 1/[New] Hello World.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 1/[New] Hello World.pdf -------------------------------------------------------------------------------- /Week 1/conditional.py: -------------------------------------------------------------------------------- 1 | # # Example 1: Basic if statement 2 | age = 17 3 | 4 | if age >= 18: 5 | print("You are eligible to vote.") 6 | else: 7 | print("Sorry, you are not eligible to vote yet.") 8 | 9 | # Example 2 [Challenge]: if-elif-else chain 10 | grade = 84 11 | 12 | if grade > 90: 13 | print("A grade") 14 | elif grade > 70: 15 | print("C grade") 16 | elif grade > 80: 17 | print("B grade") 18 | else: 19 | print("You need improvement.") 20 | 21 | # Example 4: Nested if statements 22 | is_weekend = input("Is it the Weekend? (yes/no)" ) 23 | is_sunny = input("Is is sunny or rainy? (sunny/rainy) ") 24 | good_mood = "no" 25 | 26 | 27 | if is_weekend == "yes": 28 | if is_sunny == "sunny": 29 | if good_mood == "yes": 30 | print("Visit the beach!") 31 | else: 32 | print("Take a nap") 33 | else: 34 | print("Relax at home.") 35 | else: 36 | print("It's a weekday, focus on work or study.") 37 | -------------------------------------------------------------------------------- /Week 1/readme.md: -------------------------------------------------------------------------------- 1 | #### Week 1 2 | 3 | To locate the desired content please have a look in the folder with the corresponding name as the session type. For example the content for the practical sessions will be located in the Practical folder. -------------------------------------------------------------------------------- /Week 1/variables.py: -------------------------------------------------------------------------------- 1 | """ 2 | Define a greeting variable 3 | 4 | Get name from user through input 5 | 6 | Concatenate the user entered name to greeting 7 | 8 | print our greeting 9 | """ 10 | 11 | greeting = "Hello" 12 | 13 | name = input("Please enter your name: ") 14 | 15 | full_greeting = f"{greeting} {name}" 16 | 17 | print(full_greeting) 18 | 19 | 20 | """ 21 | Get a number from user through input 22 | 23 | multiply user number with 15 24 | 25 | print the result 26 | """ 27 | 28 | user_number = input("Please enter a number of your choice: ") 29 | 30 | user_number = int(user_number) 31 | added_number = user_number + 15 32 | 33 | print(added_number) 34 | 35 | print("-"*80) -------------------------------------------------------------------------------- /Week 10/1 - Theory and Practical/1 - Monday/W10D1- Higher Order Functions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 10/1 - Theory and Practical/1 - Monday/W10D1- Higher Order Functions.pdf -------------------------------------------------------------------------------- /Week 10/1 - Theory and Practical/4 - Thursday/Functions Recap.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 10/1 - Theory and Practical/4 - Thursday/Functions Recap.pdf -------------------------------------------------------------------------------- /Week 10/2 - Open Class/2 - Tuesday/W10D2 - Open Session.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 10/2 - Open Class/2 - Tuesday/W10D2 - Open Session.pdf -------------------------------------------------------------------------------- /Week 10/2 - Open Class/5 - Friday/hello_world.py: -------------------------------------------------------------------------------- 1 | """Function Decorators""" 2 | def positives_only(func): 3 | def wrapper(values): 4 | values = [i for i in values if i >= 0] 5 | return func(values) 6 | return wrapper 7 | 8 | @positives_only 9 | def average(numbers): 10 | return sum(numbers)/len(numbers) 11 | 12 | 13 | def main(): 14 | print("Hello") 15 | print("Hello") 16 | print("Hello") 17 | 18 | if __name__ == "__main__": 19 | main() -------------------------------------------------------------------------------- /Week 10/2 - Open Class/5 - Friday/new.py: -------------------------------------------------------------------------------- 1 | from hello_world import average 2 | 3 | print(average([1,2,3,4,5,-2,-4,-2])) 4 | -------------------------------------------------------------------------------- /Week 10/3 - Tutorial/2 - Tuesday/Example - Basic/my_library.py: -------------------------------------------------------------------------------- 1 | # Example: my_library.py 2 | def my_function(): 3 | return "Hello you have found where I am hiding!" 4 | -------------------------------------------------------------------------------- /Week 10/3 - Tutorial/2 - Tuesday/Example - Basic/my_main_code.py: -------------------------------------------------------------------------------- 1 | # Example: my_main_code.py 2 | """ 3 | Here is a summary of the directory structure: 4 | 5 | Main Project: my_main_code.py 6 | | 7 | |-> my_library.py 8 | : my_function 9 | : another_function 10 | """ 11 | 12 | # Import libraries ---- 13 | # from my_library import * 14 | import my_library 15 | 16 | # Declare functions 17 | def my_favourite_function(): 18 | print("Yippee") 19 | 20 | 21 | # Main code 22 | result = my_library.my_function() 23 | print(result) 24 | 25 | # How is "import library" different to "import library*" ? 26 | 27 | # import my_library 28 | # from my_library import * -------------------------------------------------------------------------------- /Week 10/3 - Tutorial/2 - Tuesday/Example - MathOps/math_operations.py: -------------------------------------------------------------------------------- 1 | # math_operations.py 2 | 3 | def add(a, b): 4 | """Addition""" 5 | return a + b 6 | 7 | def subtract(a, b): 8 | """Subtraction""" 9 | return a - b 10 | 11 | def multiply(a, b): 12 | """Multiplication""" 13 | return a * b 14 | 15 | def divide(a, b): 16 | """Division""" 17 | if b != 0: 18 | return a / b 19 | else: 20 | return "Cannot divide by zero" 21 | 22 | def power(a, b): 23 | """Exponentiation""" 24 | return a ** b -------------------------------------------------------------------------------- /Week 10/3 - Tutorial/2 - Tuesday/Example - MathOps/operation_log.txt: -------------------------------------------------------------------------------- 1 | 2.0 + 3.0 = 5.0 2 | 20.0 - 5.0 = 15.0 3 | 3.0 * 4.0 = 12.0 4 | 20.0 / 5.0 = 4.0 5 | 3.0 ^ 4.0 = 81.0 6 | 3.0 * 4.0 = 12.0 7 | 3.0 + 4.0 = 7.0 8 | 4.0 * 3.0 = 12.0 9 | 3.0 ^ 4.0 = 81.0 10 | 6.0 / 0.0 = Cannot divide by zero 11 | -------------------------------------------------------------------------------- /Week 10/3 - Tutorial/2 - Tuesday/W10D2_SE - Tut Session.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 10/3 - Tutorial/2 - Tuesday/W10D2_SE - Tut Session.pdf -------------------------------------------------------------------------------- /Week 10/4 - Portfolio/3 - Wednesday/SE Portfolio Session 9_ Fitness Program.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 10/4 - Portfolio/3 - Wednesday/SE Portfolio Session 9_ Fitness Program.pdf -------------------------------------------------------------------------------- /Week 11/1 - Theory and Practical/1 - Monday/Object Oriented Progamming.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 11/1 - Theory and Practical/1 - Monday/Object Oriented Progamming.pdf -------------------------------------------------------------------------------- /Week 11/1 - Theory and Practical/4 - Thursday/OOP - Best Practices.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 11/1 - Theory and Practical/4 - Thursday/OOP - Best Practices.pdf -------------------------------------------------------------------------------- /Week 11/2 - Open Class/2 - Tuesday/open_class.py: -------------------------------------------------------------------------------- 1 | class Worker: 2 | department = "Engineering" 3 | 4 | def __init__(self, name): 5 | self.name = name 6 | 7 | def change_name(self, name): 8 | self.name = name 9 | 10 | worker1 = Worker("James") 11 | worker1.change_name("Peter") 12 | Worker.department = "IT" 13 | worker2 = Worker("David") 14 | 15 | # print(worker1.name) 16 | # print(worker1.department) 17 | # print(worker2.name) 18 | # print(worker2.department) 19 | 20 | from tabulate import tabulate 21 | 22 | workers = [worker1, worker2] 23 | headers = ["", "Employee", "Department"] 24 | worker_data = [[i, worker.name, worker.department] for i, worker in enumerate(workers, 1)] 25 | print(tabulate(worker_data, headers=headers)) 26 | 27 | 28 | def print_name(name): 29 | print(name) 30 | return name 31 | 32 | name = print_name("Armand") 33 | print(name) -------------------------------------------------------------------------------- /Week 11/2 - Open Class/5 - Friday/W11D5 - Open Session.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 11/2 - Open Class/5 - Friday/W11D5 - Open Session.pdf -------------------------------------------------------------------------------- /Week 11/3 - Tutorial/2 - Tuesday/contacts.txt: -------------------------------------------------------------------------------- 1 | Adrian,asdasdasd,4654654 2 | James,asd,654564 3 | Michelle,asdasd,5465456 4 | -------------------------------------------------------------------------------- /Week 11/4 - Portfolio/3 - Wednesday/SE Portfolo Session 10 - ZooWonders.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 11/4 - Portfolio/3 - Wednesday/SE Portfolo Session 10 - ZooWonders.pdf -------------------------------------------------------------------------------- /Week 12/1 - Theory and Practical/1 - Monday/OOP - Inheritance.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 12/1 - Theory and Practical/1 - Monday/OOP - Inheritance.pdf -------------------------------------------------------------------------------- /Week 12/1 - Theory and Practical/1 - Monday/OOP - Inheritance.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 12/1 - Theory and Practical/1 - Monday/OOP - Inheritance.pptx -------------------------------------------------------------------------------- /Week 12/1 - Theory and Practical/4 - Thursday/Special Methods.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 12/1 - Theory and Practical/4 - Thursday/Special Methods.pdf -------------------------------------------------------------------------------- /Week 12/2 - Open Class/2 - Tuesday/W12D2 - Open Session.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 12/2 - Open Class/2 - Tuesday/W12D2 - Open Session.pdf -------------------------------------------------------------------------------- /Week 12/2 - Open Class/5 - Friday/tasks.txt: -------------------------------------------------------------------------------- 1 | UserA,Todo1,A task 1,2024-06-06 2 | UserB,Todo2,A task 2,2024-03-05 3 | UserA,Todo3,A task 3,2024-06-06 4 | -------------------------------------------------------------------------------- /Week 12/3 - Tutorial/2 - Tuesday/W12D2 - Tutorial Session.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 12/3 - Tutorial/2 - Tuesday/W12D2 - Tutorial Session.pdf -------------------------------------------------------------------------------- /Week 12/4 - Portfolio/3 - Wednesday/SE Portfolio Session 11_ Quest for Lost Relics.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 12/4 - Portfolio/3 - Wednesday/SE Portfolio Session 11_ Quest for Lost Relics.pdf -------------------------------------------------------------------------------- /Week 12/5 - Foundational/pass.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 12/5 - Foundational/pass.txt -------------------------------------------------------------------------------- /Week 13/1 - Theory and Practical/1 - Monday/Polymorphism and The SOLID Principles.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 13/1 - Theory and Practical/1 - Monday/Polymorphism and The SOLID Principles.pdf -------------------------------------------------------------------------------- /Week 13/1 - Theory and Practical/4 - Thursday/W13D4 - OOP Revision.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 13/1 - Theory and Practical/4 - Thursday/W13D4 - OOP Revision.pdf -------------------------------------------------------------------------------- /Week 13/2 - Open Class/2 - Tuesday/data.txt: -------------------------------------------------------------------------------- 1 | user, task title, task desc, 14 Apr 2024, no -------------------------------------------------------------------------------- /Week 13/2 - Open Class/2 - Tuesday/open_class.py: -------------------------------------------------------------------------------- 1 | from datetime import datetime 2 | 3 | date = "2024 10 Apr" 4 | date_obj = datetime.strptime(date, "%Y %d %b").date() 5 | # print(date_obj) 6 | 7 | # now = datetime.now().date() 8 | # print(now) 9 | 10 | # if date_obj > now: 11 | # print(f"{date_obj} is after {now}.") 12 | 13 | # date_obj = datetime.strptime(t[due_date], "%Y %d %b").date() 14 | # today > date_obj 15 | 16 | # task_data = [t for t in task_data if t != ""] 17 | 18 | tasks = [] 19 | with open("data.txt", "r") as file: 20 | for line in file: 21 | tasks.append(line.strip().split(", ")) 22 | 23 | print(tasks[0]) 24 | print(", ".join(tasks[0])) 25 | 26 | # for user in users: 27 | 28 | # for task in tasks: 29 | # date = datetime.strptime(task[3], "%d %b %Y").date() 30 | # print(date) 31 | 32 | 33 | x, y, z = 3, 5, 6 -------------------------------------------------------------------------------- /Week 13/3 - Tutorial/2 - Tuesday/Updated Game/game.py: -------------------------------------------------------------------------------- 1 | from world import World 2 | 3 | def main(): 4 | 5 | world = World(3) 6 | 7 | user_choice = input("Please select a class below:\n1. Warrior\n2. Archer\n:") 8 | if user_choice == "1": 9 | world.set_player("w") 10 | elif user_choice == "2": 11 | world.set_player("a") 12 | 13 | while world.current_level < world.max_level: 14 | world.next_level() 15 | print("Please select a room to enter:") 16 | world.display_rooms() 17 | user_choice = int(input(":")) 18 | if not world.enter_room(user_choice): 19 | break 20 | world.get_player().display_stats() 21 | else: 22 | print("Well done! You have beat the game.") 23 | 24 | 25 | if __name__ == "__main__": 26 | main() 27 | -------------------------------------------------------------------------------- /Week 13/3 - Tutorial/2 - Tuesday/Updated Game/items.py: -------------------------------------------------------------------------------- 1 | from random import randint 2 | 3 | class Item: 4 | """Abstract class representing an item a player can pick up.""" 5 | def apply_effect(self, other): 6 | """Apply the effect attached to item.""" 7 | pass 8 | 9 | class Health(Item): 10 | """Applies health to player upon pick up.""" 11 | def apply_effect(self, other): 12 | other.add_health(randint(10, 15)) 13 | print("Player has received health.") 14 | 15 | def __str__(self): 16 | return "Health item" 17 | 18 | class HeartBox(Item): 19 | """Increases maximum and current health of teh player upon pick up.""" 20 | def apply_effect(self, other): 21 | other.increase_max_health(15) 22 | other.add_health(15) 23 | print("Player's max health has increased!") 24 | 25 | def __str__(self): 26 | return "Heart Box" 27 | -------------------------------------------------------------------------------- /Week 13/4 - Portfolio/3 - Wednesday/Detective Story/detectives.txt: -------------------------------------------------------------------------------- 1 | Sherlock, sherlock_intro.txt 2 | MissMarple, miss_marple_intro.txt 3 | Poirot, poirot_intro.txt 4 | -------------------------------------------------------------------------------- /Week 13/4 - Portfolio/3 - Wednesday/Detective Story/miss_marple_intro.txt: -------------------------------------------------------------------------------- 1 | I am Miss Marple, the keen observer of human nature. 2 | -------------------------------------------------------------------------------- /Week 13/4 - Portfolio/3 - Wednesday/Detective Story/plot_points_mystery.txt: -------------------------------------------------------------------------------- 1 | A mysterious murder occurs in the library. 2 | Suspicious footprints lead to the garden. 3 | A hidden message is discovered in the victim's room. 4 | -------------------------------------------------------------------------------- /Week 13/4 - Portfolio/3 - Wednesday/Detective Story/poirot_intro.txt: -------------------------------------------------------------------------------- 1 | I am Hercule Poirot, the brilliant Belgian detective. 2 | -------------------------------------------------------------------------------- /Week 13/4 - Portfolio/3 - Wednesday/Detective Story/sherlock_examine.txt: -------------------------------------------------------------------------------- 1 | Sherlock carefully examines the crime scene and discovers a hidden clue. 2 | -------------------------------------------------------------------------------- /Week 13/4 - Portfolio/3 - Wednesday/Detective Story/sherlock_intro.txt: -------------------------------------------------------------------------------- 1 | I am Sherlock Holmes, the world's greatest detective. 2 | -------------------------------------------------------------------------------- /Week 13/4 - Portfolio/3 - Wednesday/Detective Story/sherlock_question.txt: -------------------------------------------------------------------------------- 1 | Sherlock interrogates the witnesses and uncovers valuable information. 2 | -------------------------------------------------------------------------------- /Week 13/4 - Portfolio/3 - Wednesday/SE Portfolio Session 12 - Interactive Odyssey.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 13/4 - Portfolio/3 - Wednesday/SE Portfolio Session 12 - Interactive Odyssey.pdf -------------------------------------------------------------------------------- /Week 13/4 - Portfolio/3 - Wednesday/Session 12 - Case Study.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 13/4 - Portfolio/3 - Wednesday/Session 12 - Case Study.docx -------------------------------------------------------------------------------- /Week 14/1 - Theory and Practical/1 - Monday/W14D1 - Intro to Version Control and Git.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 14/1 - Theory and Practical/1 - Monday/W14D1 - Intro to Version Control and Git.pdf -------------------------------------------------------------------------------- /Week 14/1 - Theory and Practical/4 - Thursday/Error Handling.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 14/1 - Theory and Practical/4 - Thursday/Error Handling.pdf -------------------------------------------------------------------------------- /Week 14/1 - Theory and Practical/4 - Thursday/error_types.py: -------------------------------------------------------------------------------- 1 | # Syntax Errors 2 | 3 | # if True print("This is true!") 4 | 5 | # while True: 6 | # print("Endless print") 7 | 8 | # my_dict = {1: "one" 9 | # 2: "two" 10 | # 3: "three"} 11 | 12 | 13 | # Runtime Errors 14 | 15 | print("Runtime proof") 16 | 17 | # add_nums = "1" + 1 18 | 19 | # split_str = "Hello World".split_string(" ") 20 | 21 | # file = open("RandomFile.txt", "r") 22 | 23 | 24 | # Logical Errors 25 | 26 | sum_squares = 0 27 | for num in range(10): 28 | squared_num = num**2 29 | sum_squares += squared_num 30 | print(sum_squares) 31 | 32 | 33 | nums = 0 34 | for num in range(10): 35 | num += num 36 | print(nums) -------------------------------------------------------------------------------- /Week 14/2 - Open Class/5 - Friday/pass.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 14/2 - Open Class/5 - Friday/pass.txt -------------------------------------------------------------------------------- /Week 14/3 - Tutorial/2 - Tuesday/W14D2 - Tutorial Session.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 14/3 - Tutorial/2 - Tuesday/W14D2 - Tutorial Session.pdf -------------------------------------------------------------------------------- /Week 14/3 - Tutorial/2 - Tuesday/w14d2_tut_demo.py: -------------------------------------------------------------------------------- 1 | """ 2 | Using del to remove values from a list 3 | """ 4 | 5 | my_list = [1, 2, 3, 4, 5] 6 | 7 | # Remove the value from the list at index 2 8 | del my_list[2] # Note the square brackets 9 | print(my_list) 10 | 11 | """ 12 | Using remove() to remove values from a list 13 | """ 14 | my_list = [1, 2, 3, 4, 5] 15 | 16 | # Remove the value 3 from the list regardless of the index position 17 | my_list.remove(3) # Note the round brackets 18 | print(my_list) 19 | -------------------------------------------------------------------------------- /Week 14/4 - Portfolio/3 - Wednesday/Portfolio_ Git & GitHub.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 14/4 - Portfolio/3 - Wednesday/Portfolio_ Git & GitHub.pdf -------------------------------------------------------------------------------- /Week 15/1 - Theory and Practical/1 - Monday/Examples/assets/football.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 15/1 - Theory and Practical/1 - Monday/Examples/assets/football.jpg -------------------------------------------------------------------------------- /Week 15/1 - Theory and Practical/1 - Monday/Examples/assets/golf.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 15/1 - Theory and Practical/1 - Monday/Examples/assets/golf.jpg -------------------------------------------------------------------------------- /Week 15/1 - Theory and Practical/1 - Monday/Examples/assets/image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 15/1 - Theory and Practical/1 - Monday/Examples/assets/image.jpg -------------------------------------------------------------------------------- /Week 15/1 - Theory and Practical/1 - Monday/Examples/assets/rugby.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 15/1 - Theory and Practical/1 - Monday/Examples/assets/rugby.jpg -------------------------------------------------------------------------------- /Week 15/1 - Theory and Practical/1 - Monday/Examples/assets/tennis.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 15/1 - Theory and Practical/1 - Monday/Examples/assets/tennis.jpg -------------------------------------------------------------------------------- /Week 15/1 - Theory and Practical/1 - Monday/Examples/assets/track.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 15/1 - Theory and Practical/1 - Monday/Examples/assets/track.jpg -------------------------------------------------------------------------------- /Week 15/1 - Theory and Practical/1 - Monday/Examples/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Login Form 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Login

18 |
19 |
20 | 21 | 22 |
23 |
24 | 25 | 26 |
27 | 28 |
29 |
30 |
31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /Week 15/1 - Theory and Practical/1 - Monday/Examples/login_nobootstrap.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Login Form 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 |

Login

16 |
17 |
18 | 19 | 20 |
21 |
22 | 23 | 24 |
25 | 26 |
27 |
28 |
29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /Week 15/1 - Theory and Practical/1 - Monday/Examples/login_nostyle.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Login Form 7 | 8 | 9 | 10 |
11 |
12 |

Login

13 |
14 |
15 | 16 | 17 |
18 |
19 | 20 | 21 |
22 | 23 |
24 |
25 |
26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Week 15/1 - Theory and Practical/1 - Monday/Examples/style/login_style.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #f8f9fa; 3 | } 4 | 5 | .login-form { 6 | max-width: 400px; 7 | margin: 0 auto; 8 | padding: 20px; 9 | background-color: #ffffff; 10 | border: 1px solid #dee2e6; 11 | border-radius: 5px; 12 | box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); 13 | } 14 | 15 | .login-form h2 { 16 | text-align: center; 17 | } 18 | 19 | .form-group { 20 | margin-bottom: 20px; 21 | } 22 | 23 | .form-group label { 24 | font-weight: bold; 25 | } 26 | 27 | .form-control { 28 | border: 1px solid #ced4da; 29 | border-radius: 5px; 30 | } 31 | 32 | .btn-login { 33 | background-color: #007bff; 34 | color: #fff; 35 | } -------------------------------------------------------------------------------- /Week 15/1 - Theory and Practical/1 - Monday/Examples/style/mainPage.css: -------------------------------------------------------------------------------- 1 | .p1 { 2 | color: red; 3 | font-family: Arial, Helvetica; 4 | background-color: black; 5 | } 6 | 7 | #mainHeading { 8 | font-family: Courier; 9 | } 10 | 11 | #lists { 12 | display: grid; 13 | } 14 | 15 | ul li { 16 | list-style: square; 17 | } 18 | 19 | ol{ 20 | grid-column: 1/6; 21 | grid-row: 3; 22 | } 23 | ul{ 24 | grid-column: 6/13; 25 | grid-row: 3; 26 | } -------------------------------------------------------------------------------- /Week 15/1 - Theory and Practical/1 - Monday/HTML and CSS.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 15/1 - Theory and Practical/1 - Monday/HTML and CSS.pdf -------------------------------------------------------------------------------- /Week 15/1 - Theory and Practical/4 - Thursday/W15D4-SE-Sequences-Revision.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 15/1 - Theory and Practical/4 - Thursday/W15D4-SE-Sequences-Revision.pdf -------------------------------------------------------------------------------- /Week 15/2 - Open Class/2 - Tuesday/new_data.txt: -------------------------------------------------------------------------------- 1 | Name,Surname,Age,ID 2 | Tina,Brown,20,1234 3 | Michelle,Jackson,22,5678 4 | Jason,Jason,24,5432 5 | Peter,Peterson,26,8574 6 | -------------------------------------------------------------------------------- /Week 15/3 - Tutorial/2 - Tuesday/library.py: -------------------------------------------------------------------------------- 1 | class Library: 2 | 3 | def __init__(self, member_list): 4 | self.__member_list = member_list 5 | self.__books = [] 6 | 7 | def add_book(self, book): 8 | self.__books.append(book) 9 | 10 | def remove_book(self, book): 11 | self.__books.remove(book) 12 | 13 | def remove_book_by_index(self, index): 14 | self.__books.pop(index) 15 | 16 | def view_books(self): 17 | for i, book in enumerate(self.__books): 18 | print(i, book) 19 | 20 | def search_book(self, book_title): 21 | for book in self.__books: 22 | if book.get_title() == book_title: 23 | return book 24 | else: 25 | print(f"{book_title} not found!") 26 | 27 | def __getitem__(self, index): 28 | return self.__books[index] 29 | 30 | def get_members_list(self): 31 | return self.__member_list 32 | 33 | -------------------------------------------------------------------------------- /Week 15/4 - Portfolio/3 - Wednesday/Portfolio-Demo-Links.txt: -------------------------------------------------------------------------------- 1 | You can have a look at the below projects, by 2 | * creating a folder on you pc with >mkdir 3 | * go into that folder with >cd 4 | * clone the project with >git clone 5 | * enter the cloned project folder 6 | 7 | ==> Demo 1 8 | https://github.com/Exxotelis/Generate-Invoices.git 9 | 10 | ==> Demo 2 11 | https://github.com/IrisWintermute/File-System.git 12 | 13 | ==> Potential Commerce example as requested by learner 14 | https://github.com/Exxotelis/shop.git -------------------------------------------------------------------------------- /Week 16/1 - Theory and Practical/1 - Monday/W16D1-SE-SQL-and-Sqlite.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 16/1 - Theory and Practical/1 - Monday/W16D1-SE-SQL-and-Sqlite.pdf -------------------------------------------------------------------------------- /Week 16/1 - Theory and Practical/4 - Thursday/Functions Recap.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 16/1 - Theory and Practical/4 - Thursday/Functions Recap.pdf -------------------------------------------------------------------------------- /Week 16/1 - Theory and Practical/7 - Sunday/my_library.py: -------------------------------------------------------------------------------- 1 | def print_name(): 2 | print("John Papenfus") 3 | 4 | def print_address(): 5 | print("13 Oak Avenue") 6 | 7 | def print_location(): 8 | print("London") 9 | 10 | def print_mobile(): 11 | print("+21 72 007 7777") 12 | -------------------------------------------------------------------------------- /Week 16/2 - Open Class/2 - Tuesday/W16D2 - Open Session.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 16/2 - Open Class/2 - Tuesday/W16D2 - Open Session.pdf -------------------------------------------------------------------------------- /Week 16/2 - Open Class/2 - Tuesday/w16d2_se_open_demo.py: -------------------------------------------------------------------------------- 1 | # Use `fetchone` method to get a single tuple from the result 2 | id = 12 3 | 4 | # Note the , in (id,) when only 1 ? in query 5 | cursor.execute("SELECT * FROM students WHERE id = ?", (id,)) 6 | student = cursor.fetchone() 7 | 8 | print(student) 9 | 10 | # Use `fetchall` method to get all of the results that match our query. 11 | cursor.execute("SELECT name, grade FROM students") 12 | students = cursor.fetchall() 13 | 14 | for row in students: 15 | print(f"Name: {row[0]}, Surname: {row[1]}") 16 | 17 | print(students) 18 | 19 | # Just like file handling, we can 20 | # use the `with` statement to handle the state of the db connection for us. 21 | try: 22 | # Open database connection using context manager 23 | with sqlite3.connect('students_db.db') as db: 24 | cursor = db.cursor() 25 | 26 | # Execute some SQL queries that may raise an error 27 | cursor.execute('SELECT * FROM non_existing_table') 28 | rows = cursor.fetchall() 29 | 30 | except sqlite3.OperationalError as e: 31 | print("An error occurred:", e) 32 | 33 | # The database connection is automatically closed even if an error occurred 34 | -------------------------------------------------------------------------------- /Week 16/2 - Open Class/5 - Friday/pass.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 16/2 - Open Class/5 - Friday/pass.txt -------------------------------------------------------------------------------- /Week 16/3 - Tutorial/2 - Tuesday/W16D2 - Tutorial Session.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 16/3 - Tutorial/2 - Tuesday/W16D2 - Tutorial Session.pdf -------------------------------------------------------------------------------- /Week 16/3 - Tutorial/2 - Tuesday/ebookstore_db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 16/3 - Tutorial/2 - Tuesday/ebookstore_db -------------------------------------------------------------------------------- /Week 16/3 - Tutorial/2 - Tuesday/inventory_reset.txt: -------------------------------------------------------------------------------- 1 | id; title; author; qty 2 | 3001; A Tale of Two Cities; Charles Dickens; 30 3 | 3002; Harry Potter and the Philosopher's Stone; J.K. Rowling; 40 4 | 3003; The Lion, the Witch and the Wardrobe; C.S. Lewis; 25 5 | 3004; The Lord of the Rings; J.R.R Tolkien; 37 6 | 3005; Alice in Wonderland; Lewis Carroll; 12 7 | 3006; Normal People; Sally Rooney; 16 8 | 3007; Before I Go; Colleen Oakley; 27 9 | 3008; Letting Go; Philip Roth; 9 -------------------------------------------------------------------------------- /Week 16/4 - Portfolio/3 - Wednesday/pass.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 16/4 - Portfolio/3 - Wednesday/pass.txt -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Django.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/1 - Theory and Practical/1 - Monday/Django.pdf -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/ReadMe.md: -------------------------------------------------------------------------------- 1 | ### Basic Django Project 2 | 3 | Welcome to the basic Django project. This is intended to show the very basics of the MVT-Architecture. You can use this project to make yourself a little more familiar with Django. 4 | 5 | Please follow the steps below to run the project. 6 | 7 | #### Create a Virtual Environment 8 | Windows: python -m venv your_venv_name
9 | Linux/Mac: python3 -m venv your_venv_name 10 | 11 | #### Activating Your Virtual Environment 12 | Windows: your_venv_name/Scripts/activate 13 | Linux/Mac: source your_venv_name/bin/activate 14 | 15 | #### Dependencies
16 | Run the following command to install all dependencies for the project: 17 | - pip install -r requirements.txt 18 | 19 | #### Running Server 20 | To run the server use the following comand in the roject directory. 21 | - python manage.py runserver -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/db.sqlite3 -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | """Run administrative tasks.""" 9 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'my_project.settings') 10 | try: 11 | from django.core.management import execute_from_command_line 12 | except ImportError as exc: 13 | raise ImportError( 14 | "Couldn't import Django. Are you sure it's installed and " 15 | "available on your PYTHONPATH environment variable? Did you " 16 | "forget to activate a virtual environment?" 17 | ) from exc 18 | execute_from_command_line(sys.argv) 19 | 20 | 21 | if __name__ == '__main__': 22 | main() 23 | -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/__init__.py -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/__pycache__/admin.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/__pycache__/admin.cpython-312.pyc -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/__pycache__/apps.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/__pycache__/apps.cpython-312.pyc -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/__pycache__/models.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/__pycache__/models.cpython-312.pyc -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/__pycache__/views.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/__pycache__/views.cpython-312.pyc -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class MyAppConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'my_app' 7 | -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.3 on 2024-03-25 21:04 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | initial = True 9 | 10 | dependencies = [ 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='User', 16 | fields=[ 17 | ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 18 | ('name', models.CharField(max_length=25)), 19 | ('surname', models.CharField(max_length=25)), 20 | ], 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/migrations/__init__.py -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/migrations/__pycache__/0001_initial.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/migrations/__pycache__/0001_initial.cpython-312.pyc -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/migrations/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/migrations/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | class User(models.Model): 5 | 6 | name = models.CharField(max_length=25) 7 | surname = models.CharField(max_length=25) 8 | 9 | def __str__(self): 10 | return f"{self.name} {self.surname}" -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/static/style/style.css: -------------------------------------------------------------------------------- 1 | .heading{ 2 | background-color: yellowgreen; 3 | } 4 | .grid { 5 | display: grid; 6 | column-gap: 10px; 7 | } 8 | 9 | .i1 { 10 | grid-column-start: 1; 11 | grid-column-end: 1; 12 | } 13 | .i2 { 14 | grid-column-start: 2; 15 | grid-column-end: 2; 16 | } 17 | .i3 { 18 | grid-column-start: 3; 19 | grid-column-end: 13; 20 | } 21 | -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/templates/main.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 7 | Welcome 8 | 9 | 10 | 11 | 12 |
13 |

Welcome

14 |

Welcome to my web app!

15 |
16 | 17 |
18 |
19 | 20 |
21 | 22 |
23 |
24 | 25 |
26 |
27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/templates/welcome.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 7 | Home 8 | 9 | 10 | 11 | 12 |
13 |

Welcome

14 |

Welcome to my website {{ name }} {{ surname }}!

15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from . import views 3 | 4 | urlpatterns = [ 5 | path("", views.index), 6 | path("welcome/", views.welcome) 7 | ] -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_app/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render, HttpResponse 2 | from .models import User 3 | 4 | # Create your views here. 5 | def index(request): 6 | return render(request, 'main.html') 7 | 8 | def welcome(request): 9 | name = request.GET.get("name") 10 | surname = request.GET.get("surname") 11 | user = User() 12 | user.name = name 13 | user.surname = surname 14 | user.save() 15 | return render(request, "welcome.html", {"name": name, "surname": surname}) -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_project/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_project/__init__.py -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_project/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_project/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_project/__pycache__/settings.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_project/__pycache__/settings.cpython-312.pyc -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_project/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_project/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_project/__pycache__/wsgi.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_project/__pycache__/wsgi.cpython-312.pyc -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_project/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for my_project 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.0/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', 'my_project.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_project/urls.py: -------------------------------------------------------------------------------- 1 | """ 2 | URL configuration for my_project project. 3 | 4 | The `urlpatterns` list routes URLs to views. For more information please see: 5 | https://docs.djangoproject.com/en/5.0/topics/http/urls/ 6 | Examples: 7 | Function views 8 | 1. Add an import: from my_app import views 9 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 10 | Class-based views 11 | 1. Add an import: from other_app.views import Home 12 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 13 | Including another URLconf 14 | 1. Import the include() function: from django.urls import include, path 15 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 16 | """ 17 | from django.contrib import admin 18 | from django.urls import path, include 19 | 20 | urlpatterns = [ 21 | path('admin/', admin.site.urls), 22 | path("my_app/", include("my_app.urls")) 23 | ] 24 | -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/my_project/my_project/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for my_project 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.0/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', 'my_project.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/1 - Monday/Project/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/1 - Theory and Practical/1 - Monday/Project/requirements.txt -------------------------------------------------------------------------------- /Week 17/1 - Theory and Practical/4 - Thursday/W17D4 - OOP Revision.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/1 - Theory and Practical/4 - Thursday/W17D4 - OOP Revision.pdf -------------------------------------------------------------------------------- /Week 17/2 - Open Class/2 - Tuesday/pass.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/2 - Open Class/2 - Tuesday/pass.txt -------------------------------------------------------------------------------- /Week 17/2 - Open Class/4 - Thursday/W17D4 - Open Session.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/2 - Open Class/4 - Thursday/W17D4 - Open Session.pdf -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/my_project/db.sqlite3 -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | """Run administrative tasks.""" 9 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'my_project.settings') 10 | try: 11 | from django.core.management import execute_from_command_line 12 | except ImportError as exc: 13 | raise ImportError( 14 | "Couldn't import Django. Are you sure it's installed and " 15 | "available on your PYTHONPATH environment variable? Did you " 16 | "forget to activate a virtual environment?" 17 | ) from exc 18 | execute_from_command_line(sys.argv) 19 | 20 | 21 | if __name__ == '__main__': 22 | main() 23 | -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/__init__.py -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/__pycache__/__init__.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/__pycache__/__init__.cpython-311.pyc -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/__pycache__/admin.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/__pycache__/admin.cpython-311.pyc -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/__pycache__/apps.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/__pycache__/apps.cpython-311.pyc -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/__pycache__/models.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/__pycache__/models.cpython-311.pyc -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/__pycache__/urls.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/__pycache__/urls.cpython-311.pyc -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/__pycache__/views.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/__pycache__/views.cpython-311.pyc -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class MyAppConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'my_app' 7 | -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2.4 on 2023-09-01 12:53 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | initial = True 9 | 10 | dependencies = [ 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='Users', 16 | fields=[ 17 | ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 18 | ('username', models.CharField(max_length=25)), 19 | ('sport', models.CharField(max_length=30)), 20 | ('date_registered', models.DateField(auto_now_add=True)), 21 | ], 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/migrations/__init__.py -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/migrations/__pycache__/0001_initial.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/migrations/__pycache__/0001_initial.cpython-311.pyc -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/migrations/__pycache__/__init__.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/migrations/__pycache__/__init__.cpython-311.pyc -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | class Users(models.Model): 5 | username = models.CharField(max_length=25) 6 | sport = models.CharField(max_length=30) 7 | date_registered = models.DateField(auto_now_add=True) 8 | 9 | def __str__(self) -> str: 10 | return f"{self.username} : {self.sport}" -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/static/assets/Banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/static/assets/Banner.jpg -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/static/assets/Banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/static/assets/Banner.png -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/static/style/welcome.css: -------------------------------------------------------------------------------- 1 | .welcome { 2 | color: forestgreen; 3 | font-family: 'Courier New', Courier, monospace; 4 | } 5 | 6 | .userTable { 7 | border-collapse: collapse; 8 | border-left: 1px solid black; 9 | border-right: 1px solid black; 10 | } 11 | 12 | tr:nth-child(even) { 13 | background-color: #4dd5d5; 14 | border-top: 1px rgb(15, 14, 14); 15 | border-bottom: 1px rgb(15, 14, 14); 16 | } 17 | 18 | td { 19 | border-top: 1px solid black; 20 | border-bottom: 1px solid black; 21 | padding: 10px; 22 | } 23 | 24 | .first { 25 | border-right: 1px solid black; 26 | } 27 | 28 | th { 29 | width: 150px; 30 | } -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/templates/header.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | Sports 7 | 8 | 9 | {% block content %} 10 | {% endblock %} 11 | 12 | -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/templates/home.html: -------------------------------------------------------------------------------- 1 | {% extends 'header.html' %} 2 | {% block content %} 3 |

Welcome!

4 |

Please register for a sport:

5 |
6 |
7 | {% endblock %} -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/templates/index.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | User list 7 | 8 | 9 | 10 | 11 | Website Banner. 12 |

Here is the list of registered users with their sport selections:


13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | {% for user in users %} 21 | 22 | 23 | 24 | 25 | 26 | {% endfor %} 27 |
UsernameSportDate Registered
{{ user.username }}{{ user.sport }}{{ user.date_registered | date:"d-m-y" }}
28 | 29 | 30 |
31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/templates/register.html: -------------------------------------------------------------------------------- 1 | {% extends 'header.html' %} 2 | {% block content %} 3 |
4 | 5 | 6 | 12 | 13 |
14 | {% endblock %} -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path, include 2 | from . import views 3 | 4 | urlpatterns = [ 5 | path('', views.home), 6 | path('users/', views.index), 7 | path('register/', views.register), 8 | path('register/register_user', views.register_user), 9 | ] -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_app/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render, redirect 2 | from django.http import HttpResponse 3 | from django.views.decorators.csrf import csrf_exempt 4 | from .models import Users 5 | 6 | sports = {"Rugby", "Cricker", "Tennis", "Soccer", "Hockey"} 7 | 8 | # Create your views here. 9 | def index(request): 10 | users = Users.objects.all().order_by("-date_registered") 11 | return render(request, 'index.html', {'users':users}) 12 | 13 | def home(request): 14 | return render(request, 'home.html') 15 | 16 | def register(request): 17 | return render(request, 'register.html', {'sports': sports}) 18 | 19 | @csrf_exempt 20 | def register_user(request): 21 | user = Users() 22 | user.username = request.POST['username'] 23 | user.sport = request.POST['sport'] 24 | user.save() 25 | return redirect('/my_app/') -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_project/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/my_project/my_project/__init__.py -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_project/__pycache__/__init__.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/my_project/my_project/__pycache__/__init__.cpython-311.pyc -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_project/__pycache__/settings.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/my_project/my_project/__pycache__/settings.cpython-311.pyc -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_project/__pycache__/urls.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/my_project/my_project/__pycache__/urls.cpython-311.pyc -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_project/__pycache__/wsgi.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/my_project/my_project/__pycache__/wsgi.cpython-311.pyc -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_project/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for my_project 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/4.2/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', 'my_project.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_project/urls.py: -------------------------------------------------------------------------------- 1 | """ 2 | URL configuration for my_project project. 3 | 4 | The `urlpatterns` list routes URLs to views. For more information please see: 5 | https://docs.djangoproject.com/en/4.2/topics/http/urls/ 6 | Examples: 7 | Function views 8 | 1. Add an import: from my_app import views 9 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 10 | Class-based views 11 | 1. Add an import: from other_app.views import Home 12 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 13 | Including another URLconf 14 | 1. Import the include() function: from django.urls import include, path 15 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 16 | """ 17 | from django.contrib import admin 18 | from django.urls import path, include 19 | 20 | urlpatterns = [ 21 | path('admin/', admin.site.urls), 22 | path('my_app/', include('my_app.urls')) 23 | ] 24 | -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/my_project/my_project/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for my_project 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/4.2/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', 'my_project.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/shop_project/db.sqlite3 -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | """Run administrative tasks.""" 9 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'shop_project.settings') 10 | try: 11 | from django.core.management import execute_from_command_line 12 | except ImportError as exc: 13 | raise ImportError( 14 | "Couldn't import Django. Are you sure it's installed and " 15 | "available on your PYTHONPATH environment variable? Did you " 16 | "forget to activate a virtual environment?" 17 | ) from exc 18 | execute_from_command_line(sys.argv) 19 | 20 | 21 | if __name__ == '__main__': 22 | main() 23 | -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/__init__.py -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/__pycache__/admin.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/__pycache__/admin.cpython-312.pyc -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/__pycache__/apps.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/__pycache__/apps.cpython-312.pyc -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/__pycache__/models.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/__pycache__/models.cpython-312.pyc -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/__pycache__/views.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/__pycache__/views.cpython-312.pyc -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import Item 3 | 4 | 5 | # Register your models here. 6 | admin.site.register(Item) -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class ShopAppConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'shop_app' 7 | -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.3 on 2024-03-26 11:33 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | initial = True 9 | 10 | dependencies = [ 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='Items', 16 | fields=[ 17 | ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 18 | ('title', models.CharField(max_length=15)), 19 | ('price', models.FloatField()), 20 | ('image_source', models.CharField(max_length=15)), 21 | ], 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/migrations/0002_rename_items_item.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.3 on 2024-03-26 11:37 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('shop_app', '0001_initial'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RenameModel( 14 | old_name='Items', 15 | new_name='Item', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/migrations/__init__.py -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/migrations/__pycache__/0001_initial.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/migrations/__pycache__/0001_initial.cpython-312.pyc -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/migrations/__pycache__/0002_rename_items_item.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/migrations/__pycache__/0002_rename_items_item.cpython-312.pyc -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/migrations/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/migrations/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | class Item(models.Model): 5 | 6 | title = models.CharField(max_length = 15) 7 | price = models.FloatField() 8 | image_source = models.CharField(max_length = 15) 9 | 10 | 11 | -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/static/style/style.css: -------------------------------------------------------------------------------- 1 | .item { 2 | text-align: center; 3 | padding: 20px; 4 | border: 1px solid #ccc; 5 | border-radius: 5px; 6 | margin-bottom: 20px; 7 | } 8 | .item img { 9 | max-width: 100%; 10 | height: auto; 11 | } 12 | .item-title { 13 | font-weight: bold; 14 | margin-top: 10px; 15 | } 16 | .item-price { 17 | color: green; 18 | margin-top: 5px; 19 | } -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/templates/shop.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Shop Items 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | {% if items %} 18 | {% for item in items %} 19 |
20 |
21 | Item 1 22 |
{{ item.title }}
23 |
${{ item.price }}
24 | 25 |
26 |
27 | {% endfor %} 28 | {% endif %} 29 |
30 |
31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from . import views 3 | 4 | urlpatterns = [ 5 | 6 | path("", views.view_products) 7 | 8 | ] -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_app/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | from .models import Item 3 | 4 | # Create your views here. 5 | def view_products(request): 6 | items = Item.objects.all() 7 | return render(request, 'shop.html', {"items": items}) -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_project/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_project/__init__.py -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_project/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_project/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_project/__pycache__/settings.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_project/__pycache__/settings.cpython-312.pyc -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_project/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_project/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_project/__pycache__/wsgi.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_project/__pycache__/wsgi.cpython-312.pyc -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_project/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for shop_project 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.0/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', 'shop_project.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_project/urls.py: -------------------------------------------------------------------------------- 1 | """ 2 | URL configuration for shop_project project. 3 | 4 | The `urlpatterns` list routes URLs to views. For more information please see: 5 | https://docs.djangoproject.com/en/5.0/topics/http/urls/ 6 | Examples: 7 | Function views 8 | 1. Add an import: from my_app import views 9 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 10 | Class-based views 11 | 1. Add an import: from other_app.views import Home 12 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 13 | Including another URLconf 14 | 1. Import the include() function: from django.urls import include, path 15 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 16 | """ 17 | from django.contrib import admin 18 | from django.urls import path, include 19 | 20 | urlpatterns = [ 21 | path('admin/', admin.site.urls), 22 | path('shop/', include('shop_app.urls')), 23 | ] 24 | -------------------------------------------------------------------------------- /Week 17/3 - Tutorial/2 - Tuesday/shop_project/shop_project/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for shop_project 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.0/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', 'shop_project.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /Week 17/4 - Portfolio/3 - Wednesday/pass.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 17/4 - Portfolio/3 - Wednesday/pass.txt -------------------------------------------------------------------------------- /Week 17/4 - Portfolio/3 - Wednesday/portfolio_links.txt: -------------------------------------------------------------------------------- 1 | Here are the portfolios we had a look at. 2 | 3 | https://github.com/jason-erasmus/flask-sqlalchemy-top-10-movies JE23110010872 Jason Erasmus 4 | https://github.com/3le81/python_course/tree/master/gaming_system EP23120011930 Elena Pagano 5 | https://github.com/3le81/python_course/tree/master/contact_book_task EP23120011930 Elena Pagano -------------------------------------------------------------------------------- /Week 2/Open Class/open_class2.py: -------------------------------------------------------------------------------- 1 | # # print("Hello") 2 | # # print("Hello") 3 | # # print("Hello") 4 | # # print("Hello") 5 | # # print("Hello") 6 | 7 | # # for i in range(5): 8 | # # print("Hello") 9 | 10 | # # new_string = "Hello world!" 11 | 12 | # # for letter in new_string: 13 | # # if letter == "l": 14 | # # continue 15 | # # print(letter) 16 | 17 | 18 | 19 | # # my_string = "Hello" 20 | # # new_string = "" 21 | # # end_index = len(my_string)-1 22 | 23 | # # for i in range(end_index, -1, -1): 24 | # # new_string += my_string[i] 25 | 26 | # # print(new_string) 27 | 28 | 29 | 30 | 31 | # my_string = "Hello" 32 | # new_string = "" 33 | 34 | # for letter in my_string: 35 | # if letter == 'l': 36 | # new_string += letter.upper() 37 | # continue 38 | # new_string += letter 39 | 40 | # print(new_string) 41 | 42 | 43 | # # for i in range(5): 44 | # # for j in range(3): 45 | # # print(i, j) 46 | 47 | 48 | # # for i in range(1, 6): 49 | # # print("@"*i) 50 | 51 | 52 | # for i in range(5): 53 | # print(i) 54 | 55 | for i in range(5): 56 | if i == 3: 57 | continue 58 | print(i) 59 | 60 | print("done") 61 | 62 | counter = 0 63 | 64 | for i in range(10): 65 | if counter == 5: 66 | break 67 | print(counter) 68 | counter += 1 69 | 70 | -------------------------------------------------------------------------------- /Week 2/Portfolio/SE Portfolio Session 1_ Shopping Cart.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 2/Portfolio/SE Portfolio Session 1_ Shopping Cart.pdf -------------------------------------------------------------------------------- /Week 2/Portfolio/SE Portfolio Session 1_ Shopping Cart_List_Version.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 2/Portfolio/SE Portfolio Session 1_ Shopping Cart_List_Version.pdf -------------------------------------------------------------------------------- /Week 2/Portfolio/SE Week 1 Case Study.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 2/Portfolio/SE Week 1 Case Study.pdf -------------------------------------------------------------------------------- /Week 2/Theory and Practical/For Loops.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 2/Theory and Practical/For Loops.pdf -------------------------------------------------------------------------------- /Week 2/Theory and Practical/While loops.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 2/Theory and Practical/While loops.pdf -------------------------------------------------------------------------------- /Week 2/Theory and Practical/for_examples.py: -------------------------------------------------------------------------------- 1 | """FOR LOOPS""" 2 | 3 | # Example 1: Print numbers from 1 to 5 4 | for i in range(1, 6): 5 | print(i) 6 | 7 | # Example 2: Iterate over elements in a list 8 | fruits = ['apple', 'banana', 'cherry'] 9 | for fruit in fruits: 10 | print(fruit) 11 | 12 | # Example 3: Calculate the sum of numbers in a range 13 | total = 0 14 | for num in range(1, 6): 15 | total += num 16 | print("Sum:", total) 17 | 18 | # Example 4: Iterate over characters in a string. 19 | my_str = "Hello, world!" 20 | for letter in my_str: 21 | print(letter) 22 | 23 | # Example 5: Stop a for loop early using 'break' 24 | for i in range(1, 6): 25 | if i == 4: 26 | break 27 | print(i) 28 | 29 | 30 | # Example 6: Start next iteration using 'continue' 31 | for i in range(1,6): 32 | if i == 4: 33 | continue 34 | print(i) 35 | 36 | # Example 7: Asking a user to enter a value mulitple times 37 | for i in range(3): 38 | user_input = input("Please enter a number") 39 | print(user_input) -------------------------------------------------------------------------------- /Week 2/Tutorial/tutorial.py: -------------------------------------------------------------------------------- 1 | 2 | # for i in range(1,6): 3 | # for _ in range(i): 4 | # print(">", end="") 5 | # print() 6 | 7 | # num = 5 8 | 9 | # for i in range(10): 10 | # if i == 5: 11 | # print("Your num is 5") 12 | # else: 13 | # print("Your num is not 5") 14 | 15 | 16 | """ 17 | ask the user to press enter or enter the word "stop" 18 | while the user has not entered "stop" 19 | print "Hello" 20 | ask the user to press enter or enter the word "stop" 21 | """ 22 | 23 | # user_input = input("Please press enter or enter the word 'stop': ") 24 | 25 | 26 | while user_input.upper() not in ["STOP", "EXIT", "END"]: 27 | print("Hello") 28 | user_input = input("Please press enter or enter the word 'stop': ") 29 | 30 | print() 31 | 32 | 33 | num1 = 10 34 | num2 = 20 35 | 36 | ave = (num1 + num2) / 2 37 | print(ave) 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Week 3/Open Class/(1) - open_class_scratch_pad.py: -------------------------------------------------------------------------------- 1 | # Control: Loop -> While Loop :) 2 | 3 | # total = 0 # Sum of the values 4 | # counter = 0 # The amount of values entered by user 5 | 6 | # for i in range(5): 7 | # user_input = int(input("Please enter a number: \ ")) 8 | # counter += 1 9 | # total += user_input 10 | 11 | 12 | # print(total) 13 | 14 | # password = "LianO_123" 15 | 16 | 17 | # if user_input.upper() != password.upper(): 18 | # print("Password Invalid.") 19 | # else: 20 | # print("Welcome") 21 | 22 | 23 | 24 | # print("He said: \"This is how it looks\" ") 25 | 26 | 27 | 28 | 29 | 30 | user_input = input("Enter a password: ") 31 | print(user_input != "123") 32 | 33 | while user_input != "123": 34 | user_input = input("Enter a password: ") 35 | 36 | print("Welcome") 37 | 38 | while True: 39 | # Within the scope of the while loop. (Local Scope) 40 | if user_input == "exit": 41 | break 42 | 43 | # Global Scope 44 | if user_input == "123": 45 | print("Valid") 46 | -------------------------------------------------------------------------------- /Week 3/Open Class/(2) - open_live_code.py: -------------------------------------------------------------------------------- 1 | # For inside of a while 2 | 3 | # Infinite Loop 4 | # while True: 5 | # user_input = input("Enter any word: ") 6 | 7 | # if user_input == "exit": 8 | # break 9 | 10 | # new_word = "" 11 | # for i in range(len(user_input)): 12 | 13 | # if user_input[i] == user_input[i].lower(): 14 | # new_word += user_input[i].upper() 15 | # else: 16 | # new_word += user_input[i].lower() 17 | 18 | # print(new_word) 19 | 20 | 21 | # Join and Split :) 22 | 23 | name = ["Liano", "Naidoo"] 24 | list_element = name[0] 25 | char_of_string_element = list_element[0] 26 | 27 | # print(name[0][0]) 28 | # print(type(True)) 29 | 30 | 31 | # text = "123456" 32 | 33 | # text = " ".join(text) 34 | # # 1 2 3 4 5 6 35 | 36 | # csv = "Liano, Naidoo, @gmail, 082" 37 | # csv = csv.split(", ") 38 | 39 | # print(f"Hello {csv[0]} {csv[1]}!") 40 | 41 | 42 | 43 | 44 | # print("Before Splitting: ", text) 45 | # splitted = text.split() 46 | # print("After Splitting: ", splitted) 47 | 48 | # print(splitted) 49 | 50 | # for i in range(len(splitted)): 51 | # splitted[i] = int(splitted[i]) 52 | 53 | # print(splitted) 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /Week 3/Open Class/(3) - open_live_code.py: -------------------------------------------------------------------------------- 1 | # Try-Except 2 | 3 | # '+' '-' '*' '/' 4 | # Arithmetic Errors 5 | # ZeroDivisionError 6 | 7 | 8 | 9 | # operation = input("What would you like to do with these values?\ 10 | # '+' '-' '*' '/' ") 11 | 12 | # error = True 13 | # while error: 14 | # num_1 = input("Enter a number: ") 15 | # num_2 = input("Enter another number: ") 16 | # try: 17 | # result = int(num_1) / int(num_2) 18 | # print(f"Result: {result}") 19 | # error = False 20 | # except ZeroDivisionError: 21 | # print("Oops, you cannot divide by 0.") 22 | # finally: 23 | # print("Thank you for using our calculator.") 24 | 25 | # While there is an error: 26 | # run the code again 27 | 28 | # counter = 10 29 | # while True: 30 | # counter -= 1 31 | # if counter == 0: 32 | # break 33 | # else: 34 | # print(counter) 35 | 36 | 37 | age = int(input("Enter your age: ")) 38 | if age < 0: 39 | # Manually raising an exception: 40 | raise Exception("Your age can't be less than 0! ") 41 | -------------------------------------------------------------------------------- /Week 3/Open Class/sunday_open_class.py: -------------------------------------------------------------------------------- 1 | """ 2 | We want to divide two numbers 3 | 4 | Get 2 numbers from user.(validate input) 5 | 6 | divide the first number with the second 7 | 8 | output result 9 | 10 | """ 11 | while True: 12 | num1 = input("Please enter the first number: ") 13 | if not num1.replace("-", "", 1).isnumeric(): 14 | print("Non numerical values entered!") 15 | else: 16 | break 17 | 18 | while True: 19 | num2 = input("Please enter the second number: ") 20 | if not num2.replace("-", "", 1).isnumeric(): 21 | print("Non numerical values entered!") 22 | elif num2 == "0": 23 | print("Cannot divide by ZERO!") 24 | else: 25 | break 26 | 27 | num1 = int(num1) 28 | num2 = int(num2) 29 | result = num1/num2 30 | 31 | print(f"The result of {num1}/{num2} is {result}") 32 | 33 | 34 | my_str = "-54" 35 | new_str = my_str.replace("-", "", 1) 36 | 37 | # if my_str.isnumeric(): 38 | print(my_str) 39 | print(new_str) 40 | -------------------------------------------------------------------------------- /Week 3/Portfolio/SE Portfolio Session 2_ Paws n Cart Part 2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 3/Portfolio/SE Portfolio Session 2_ Paws n Cart Part 2.pdf -------------------------------------------------------------------------------- /Week 3/Portfolio/live_code.py: -------------------------------------------------------------------------------- 1 | """ 2 | Start 3 | 4 | Display a menu with options related to shopping cart 5 | Implement While loop to keep the menu running (after user has selcted options) 6 | Provide the user with the option to end the program (Break out of while) 7 | 8 | End 9 | """ 10 | 11 | # print("Welcome to my shop!\n") 12 | # while True: 13 | # menu = input(" Select one of the following:\n\ 14 | # 1. Add Item \n\ 15 | # 2. Remove Item \n\ 16 | # 3. Update Item \n\ 17 | # 4. Exit Cart\n\ 18 | # :\t") 19 | 20 | # if menu == "1": 21 | # print("Added Item") 22 | # elif menu == "2": 23 | # print("Item removed") 24 | # elif menu == "3": 25 | # print("Item updated") 26 | # elif menu == "4": 27 | # print("Have a good day!") 28 | # break 29 | # else: 30 | # print("Invalid option") 31 | 32 | 33 | # Add 1 to this variable for every iteration (Increment by 1) 34 | counter = 0 35 | 36 | # Looping 3 times (Iterating 3 times) 37 | for i in range(3): 38 | # Incrementing counter variable by 1 39 | counter += 1 40 | 41 | # Printing updated counter variable 42 | print(counter) -------------------------------------------------------------------------------- /Week 3/Theory and Practical/Error Types.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 3/Theory and Practical/Error Types.pdf -------------------------------------------------------------------------------- /Week 3/Theory and Practical/Errors.py: -------------------------------------------------------------------------------- 1 | # Error Types Example 2 | 3 | # Syntax Error 4 | # Uncomment the line below to see a syntax error 5 | # print("Hello, World!" 6 | 7 | # NameError 8 | # Uncomment the line below to see a NameError 9 | # print(undefined_variable) 10 | 11 | # TypeError 12 | # Uncomment the line below to see a TypeError 13 | # result = "5" + 3 14 | 15 | # IndexError 16 | # Uncomment the line below to see an IndexError 17 | # numbers = [1, 2, 3] 18 | # print(numbers[3]) 19 | 20 | # FileNotFoundError 21 | # Uncomment the line below to see a FileNotFoundError 22 | # with open("nonexistent_file.txt", "r") as file: 23 | # content = file.read() 24 | -------------------------------------------------------------------------------- /Week 3/Theory and Practical/Try - Except Blocks (Updated).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 3/Theory and Practical/Try - Except Blocks (Updated).pdf -------------------------------------------------------------------------------- /Week 3/Theory and Practical/Try - Except Blocks.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 3/Theory and Practical/Try - Except Blocks.pdf -------------------------------------------------------------------------------- /Week 3/Theory and Practical/try_except + Live Code.py: -------------------------------------------------------------------------------- 1 | # Try-Except Example 2 | 3 | a = "5" # String 4 | b = 5 # Integer 5 | c = False # Boolean 6 | d = 1.5 # Float 7 | 8 | ## Runnning without Exception Handling: 9 | # result = a / b 10 | # print("Result:", result) 11 | 12 | try: 13 | result = a / b 14 | print(f"Result: {result}") 15 | except (ZeroDivisionError, TypeError): 16 | print("Error: Cannot divide by zero or wrong data type.") 17 | # except TypeError: 18 | # print("Error: Invalid data type for division.") 19 | except Exception as e: 20 | print("An unexpected error occurred:", e) 21 | finally: 22 | print("This block always executes, regardless of exceptions.") 23 | 24 | user_input = int(input("Enter a value greater 10: ")) 25 | if user_input < 10: 26 | raise Exception("Please provide a value greater than 10!") 27 | print("Please provide a value greater than 10!") 28 | 29 | 30 | # Raise in try-except 31 | try: 32 | age = int(input("Please enter your age: ")) 33 | if age < 0: 34 | # raise a ValueError with a custom error message 35 | raise ValueError("Age cannot be negative.") 36 | except ValueError as error: 37 | # Catch the raised ValueError and print the error message 38 | print("An error occurred: ", error) -------------------------------------------------------------------------------- /Week 3/Theory and Practical/try_except.py: -------------------------------------------------------------------------------- 1 | # Try-Except Example 2 | 3 | a = 0 4 | b = 0 5 | 6 | try: # Try this: 7 | result = a / b 8 | print("Result:", result) 9 | except ZeroDivisionError: 10 | print("Error: Cannot divide by zero.") 11 | except TypeError: 12 | print("Error: Invalid data type for division.") 13 | except Exception as e: 14 | print("An unexpected error occurred:", e) 15 | finally: 16 | print("This block always executes, regardless of exceptions.") 17 | 18 | 19 | # Raise in try-except 20 | try: 21 | age = int(input("Please enter your age: ")) 22 | if age < 0: 23 | # raise a ValueError with a custom error message 24 | raise ValueError("Age cannot be negative.") 25 | except ValueError as raised_error: 26 | # Catch the raised ValueError and print the error message 27 | print("An error occurred: ", raised_error) -------------------------------------------------------------------------------- /Week 3/Tutorial/Intro to Git (Updated).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 3/Tutorial/Intro to Git (Updated).pdf -------------------------------------------------------------------------------- /Week 3/Tutorial/README.md: -------------------------------------------------------------------------------- 1 | ## Tutorial URL's 2 | 3 | * [GitHub Quickstart Guide](https://docs.github.com/en/get-started/quickstart/set-up-git) 4 | 5 | * [Learn Bash](https://www.learnshell.org/) 6 | 7 | Please note that this file may be updated with additional URLs. 8 | -------------------------------------------------------------------------------- /Week 3/Tutorial/SWTM-2088_Atlassian-Git-Cheatsheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 3/Tutorial/SWTM-2088_Atlassian-Git-Cheatsheet.pdf -------------------------------------------------------------------------------- /Week 3/Tutorial/git-cheat-sheet-education.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 3/Tutorial/git-cheat-sheet-education.pdf -------------------------------------------------------------------------------- /Week 5/Portfolio/SE Portfolio Session 4_ Sequences.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 5/Portfolio/SE Portfolio Session 4_ Sequences.pdf -------------------------------------------------------------------------------- /Week 5/Portfolio/Style.py: -------------------------------------------------------------------------------- 1 | # Text attributes 2 | OFF = '\033[0m' 3 | BOLD = '\033[1m' 4 | ITALIC = '\033[3m' # Forgot To add Italic, but here it is! :) Also, apparently Ghost White is a darker form of white? 5 | UNDERSCORE = '\033[4m' 6 | BLINK = '\033[5m' 7 | REVERSE = '\033[7m' 8 | CONCEALED = '\033[7m' 9 | 10 | # Foreground colors 11 | FG_BLACK = '\033[30m' 12 | FG_RED = '\033[31m' 13 | FG_GREEN = '\033[32m' 14 | FG_YELLOW = '\033[33m' 15 | FG_BLUE = '\033[34m' 16 | FG_MAGENTA = '\033[35m' 17 | FG_CYAN = '\033[36m' 18 | FG_WHITE = '\033[37m' 19 | 20 | # Background colors 21 | BG_BLACK = '\033[40m' 22 | BG_RED = '\033[41m' 23 | BG_GREEN = '\033[42m' 24 | BG_YELLOW = '\033[43m' 25 | BG_BLUE = '\033[44m' 26 | BG_MAGENTA = '\033[45m' 27 | BG_CYAN = '\033[46m' 28 | BG_WHITE = '\033[47m' 29 | 30 | # \ 033 [ 31 | print("\033[42;34;4m Bold (1) green (32) text on a black background(40)") 32 | 33 | # Different order of attributes/colors 34 | print(f"{FG_YELLOW} This is the= \n formatted/styled text =) {OFF}") 35 | # ls =[1, 2, 3] 36 | 37 | # for i in range(len(ls))= 38 | # print(i) 39 | 40 | # Menu 41 | 42 | # - Return text bold 43 | # - Color 44 | # - -------------------------------------------------------------------------------- /Week 5/Portfolio/scribe.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 5/Portfolio/scribe.pdf -------------------------------------------------------------------------------- /Week 5/Tech Talk/Tech Talk_ Functions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 5/Tech Talk/Tech Talk_ Functions.pdf -------------------------------------------------------------------------------- /Week 5/Tech Talk/shop.py: -------------------------------------------------------------------------------- 1 | shopping_list = [] 2 | 3 | while True: 4 | # Ask user to select an option form the menu 5 | menu = input("Please select an option below:\n1: Add item\n2: View List"\ 6 | "\n3: Delete item\n4: Sort List\n0: Exit\n") 7 | 8 | if menu == "1": 9 | # Ask user to enter an item and add the item to shopping list 10 | new_item = input("Please enter the name of the item you would like to add:") 11 | shopping_list.append(new_item) 12 | 13 | elif menu == "2": 14 | # View all items in shopping list 15 | for i, item in enumerate(shopping_list, 1): 16 | print(i, item) 17 | 18 | elif menu == "3": 19 | # Ask user to choose an index of an item to remove and remove item 20 | for i, item in enumerate(shopping_list, 1): 21 | print(i, item) 22 | index = input("Please enter the index of the item you would like to remove:\n") 23 | index = int(index)-1 24 | item = shopping_list[index] 25 | shopping_list.pop(index) 26 | print(f'{item} removed!') 27 | 28 | elif menu == "4": 29 | # Sort shopping list 30 | shopping_list.sort() 31 | print("List sorted!") 32 | 33 | elif menu == "0": 34 | # Exit program 35 | print("Goodbye!") 36 | break 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /Week 5/Theory and Practical/Dictionaries.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 5/Theory and Practical/Dictionaries.pdf -------------------------------------------------------------------------------- /Week 5/Theory and Practical/List Comprehension & 2D Lists.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 5/Theory and Practical/List Comprehension & 2D Lists.pdf -------------------------------------------------------------------------------- /Week 7/1 - Open Class/7 - Sunday/Open Session.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 7/1 - Open Class/7 - Sunday/Open Session.pdf -------------------------------------------------------------------------------- /Week 7/1 - Open Class/7 - Sunday/W7D7_SE - Lecture Replay Link.txt: -------------------------------------------------------------------------------- 1 | https://app.livestorm.co/hyperion-development/skills-bootcamp-c5-c6-software-engineering-recommended-academic-sessions-part-2/live?s=026d680d-9c15-41a0-a7de-2d45d6fc0b79#/qa -------------------------------------------------------------------------------- /Week 7/1 - Open Class/7 - Sunday/temp_text.txt: -------------------------------------------------------------------------------- 1 | This a text file. 2 | This is a line underneath the line stating that this is a text file. 3 | This is the final line. 4 | Or is it 5 | No. -------------------------------------------------------------------------------- /Week 7/1 - Open Class/7 - Sunday/temp_text_1.txt: -------------------------------------------------------------------------------- 1 | "pika": 78, "squirtle": 87, "psyduck": 66 2 | "pika": 45, "squirtle": 56, "psyduck": 68 -------------------------------------------------------------------------------- /Week 7/1 - Open Class/example.txt: -------------------------------------------------------------------------------- 1 | My name is Liano 2 | My name is Bongani 3 | My name is Jax -------------------------------------------------------------------------------- /Week 7/1 - Open Class/pass.txt.txt: -------------------------------------------------------------------------------- 1 | placeholder file 2 | -------------------------------------------------------------------------------- /Week 7/1 - Open Class/seek.txt: -------------------------------------------------------------------------------- 1 | This is line 1 of seek.txt 2 | This is line 2 3 | And this is line 3 -------------------------------------------------------------------------------- /Week 7/1 - Open Class/test.txt: -------------------------------------------------------------------------------- 1 | This is line 1 of seek.txt 2 | This is line 2 of seek.txt 3 | And this is line 3This is line 1 of seek.txt of seek.txt 4 | This is line 2 of seek.txt of seek.txt 5 | And this is line 3 of seek.txt of seek.txt 6 | -------------------------------------------------------------------------------- /Week 7/1 - Open Class/test_copy.txt: -------------------------------------------------------------------------------- 1 | This is line 1 2 | This is line 2 -------------------------------------------------------------------------------- /Week 7/2 - Theory and Practical/1 - Monday/IO Operations Input_1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 7/2 - Theory and Practical/1 - Monday/IO Operations Input_1.pdf -------------------------------------------------------------------------------- /Week 7/2 - Theory and Practical/1 - Monday/W7D1_SE - Lecture Replay Link.txt.txt: -------------------------------------------------------------------------------- 1 | https://app.livestorm.co/hyperion-development/skills-bootcamp-c5-c6-software-engineering-prescribed-academic-sessions-part-2/live?s=69769c69-d6ba-4b95-9f4a-84f92a64d96f#/qa -------------------------------------------------------------------------------- /Week 7/2 - Theory and Practical/1 - Monday/session_workspace/list_of_cats.txt: -------------------------------------------------------------------------------- 1 | bartholomeow 2 | beans 3 | sally 4 | bob 5 | tangy 6 | garfield 7 | tart 8 | kit 9 | kurochan 10 | teddy -------------------------------------------------------------------------------- /Week 7/2 - Theory and Practical/1 - Monday/session_workspace/randomOtherFolder/cat_names.txt: -------------------------------------------------------------------------------- 1 | doraemon 2 | happy 3 | slinky 4 | mog 5 | bazona 6 | lucky -------------------------------------------------------------------------------- /Week 7/2 - Theory and Practical/1 - Monday/session_workspace/random_names.txt: -------------------------------------------------------------------------------- 1 | ashoka 2 | kenobi 3 | anakin 4 | luke 5 | yoda 6 | cal 7 | r2d2 8 | mace -------------------------------------------------------------------------------- /Week 7/2 - Theory and Practical/1 - Monday/session_workspace/session_code_0.py: -------------------------------------------------------------------------------- 1 | # hello everyone 2 | # absolute path - C:\Users\smugh\Desktop\HypeDev Lecture Backpack\Week 7\session_workspace\session_code.py 3 | # relative path - "session_code" 4 | 5 | # Open() - load in file as an object 6 | # Access Modes - 'r' ; 'w' ; 'a' ; '+' 7 | 8 | # traditional method 9 | """ 10 | file_object = open("randomOtherFolder\cats.txt", "r") 11 | # process file logic 12 | file_object.close() 13 | """ 14 | 15 | # context manager 16 | """ 17 | with open("cats.txt", "r") as file_object: 18 | # process your logic 19 | """ 20 | -------------------------------------------------------------------------------- /Week 7/2 - Theory and Practical/1 - Monday/session_workspace/session_code_2.py: -------------------------------------------------------------------------------- 1 | # Iterating Over a file 2 | with open("random_names.txt", 'r') as file: 3 | file_contents = file.readlines() 4 | # print(file_contents) 5 | for line in file.readlines(): 6 | print(line) 7 | 8 | # Exception Handling 9 | # FileNotFound 10 | # IOError 11 | 12 | # The code is using exception handling to handle potential errors that may occur when opening and 13 | # reading a file. 14 | try: 15 | with open("random_names.txt", 'r') as file: 16 | file_contents = file.readlines() 17 | except FileNotFoundError: 18 | print("File not found! ") 19 | except IOError as e: 20 | print(f"Error reading the file: {e}") 21 | 22 | 23 | # Exceptin handling with traditional approach 24 | random_names = open("random_names.txt", 'r') 25 | try: 26 | content = random_names.read() 27 | finally: 28 | file.close() 29 | -------------------------------------------------------------------------------- /Week 7/2 - Theory and Practical/4 - Thursday/IO Operations Input_2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 7/2 - Theory and Practical/4 - Thursday/IO Operations Input_2.pdf -------------------------------------------------------------------------------- /Week 7/2 - Theory and Practical/4 - Thursday/W7D4_SE - Lecture Replay Link.txt.txt: -------------------------------------------------------------------------------- 1 | https://app.livestorm.co/hyperion-development/skills-bootcamp-c5-c6-software-engineering-prescribed-academic-sessions-part-2/live?s=2550dfea-011f-4026-a09a-f58684ce25ae#/qa -------------------------------------------------------------------------------- /Week 7/2 - Theory and Practical/4 - Thursday/list_of_cats.txt: -------------------------------------------------------------------------------- 1 | bartholomeow 2 | beans 3 | sally 4 | bob 5 | tangy 6 | Garfield 7 | tart 8 | kit 9 | Kuro-chan 10 | teddy 11 | Mr boo 12 | Mr boo 13 | Mr boo 14 | Mr boo -------------------------------------------------------------------------------- /Week 7/2 - Theory and Practical/4 - Thursday/random_names.txt: -------------------------------------------------------------------------------- 1 | ashoka 2 | kenobi 3 | anakin 4 | luke 5 | yoda 6 | cal 7 | r2d2 8 | mace -------------------------------------------------------------------------------- /Week 7/2 - Theory and Practical/4 - Thursday/serge_manifesto.txt: -------------------------------------------------------------------------------- 1 | pluto is a planet let's remember that 2 | 3 | 4 | 5 | 6 | pluto is a planet let's remember that in our hearts -------------------------------------------------------------------------------- /Week 7/2 - Theory and Practical/4 - Thursday/session_code_1.py: -------------------------------------------------------------------------------- 1 | # Writing to files 2 | 3 | # Example 1 4 | with open("list_of_cats.txt", 'a') as file: 5 | file.write('\nMr boo') 6 | 7 | 8 | # Example 2 9 | lines_I_write = ["pluto", "is", "a", "planet", "let's", "remember", "that", "in", "our", "hearts"] 10 | # with open("serge_manifesto.txt", "w+") as file: 11 | # new_sent = " ".join(lines_I_write) 12 | # file.writelines(new_sent) 13 | 14 | # Example 3 15 | with open("serge_manifesto.txt", "a+") as file: 16 | new_sent = " ".join(lines_I_write) 17 | file.seek(5) 18 | file.write(new_sent) -------------------------------------------------------------------------------- /Week 7/2 - Theory and Practical/6 - Saturday/IO Operations Input_1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 7/2 - Theory and Practical/6 - Saturday/IO Operations Input_1.pdf -------------------------------------------------------------------------------- /Week 7/2 - Theory and Practical/6 - Saturday/W7D6_SE - Lecture Replay Link.txt: -------------------------------------------------------------------------------- 1 | https://app.livestorm.co/hyperion-development/skills-bootcamp-c5-c6-software-engineering-prescribed-academic-sessions-part-2/live?s=10dd0c9d-5d0b-4121-a2c1-9a522616c3a1#/qa -------------------------------------------------------------------------------- /Week 7/2 - Theory and Practical/6 - Saturday/session code/list_of_cats.txt: -------------------------------------------------------------------------------- 1 | bartholomeow 2 | beans 3 | sally 4 | bob 5 | tangy 6 | garfield 7 | tart 8 | kit 9 | kurochan 10 | teddy -------------------------------------------------------------------------------- /Week 7/2 - Theory and Practical/6 - Saturday/session code/random_names.txt: -------------------------------------------------------------------------------- 1 | ahsoka 2 | kenobi 3 | anakin 4 | luke 5 | yoda 6 | cal 7 | r2d2 8 | mace 9 | bartholomeow 10 | -------------------------------------------------------------------------------- /Week 7/2 - Theory and Practical/6 - Saturday/session code/session_code_0.py: -------------------------------------------------------------------------------- 1 | # File Paths 2 | 3 | # open() - read in file content as file object 4 | 5 | # Absolute Path 6 | # C:\Users\smugh\Desktop\HypeDev Lecture Backpack\Week 7\sat_session_workspace\list_of_cats.txt 7 | 8 | # Relative Path 9 | # subFolder\list_of_cats.txt 10 | 11 | # Open up files 12 | 13 | # Approach 1 14 | file_object = open("sub_folder\list_of_birds.txt", 'r') 15 | 16 | # return reference in memory 17 | print(file_object) 18 | 19 | # read file 20 | print(file_object.read()) 21 | 22 | # closing the file 23 | file_object.close() 24 | 25 | # Approach 2 - Best Practice 26 | with open("list_of_cats.txt", 'r') as file_object: 27 | print(file_object.read()) -------------------------------------------------------------------------------- /Week 7/2 - Theory and Practical/6 - Saturday/session code/sub_folder/external_file.py: -------------------------------------------------------------------------------- 1 | # accessing from an external file 2 | 3 | with open("list_of_cats.txt", 'r') as file: 4 | content = file.read() 5 | print(content) -------------------------------------------------------------------------------- /Week 7/2 - Theory and Practical/6 - Saturday/session code/sub_folder/list_of_birds.txt: -------------------------------------------------------------------------------- 1 | birb 2 | feline 3 | jerry 4 | solo 5 | hunter -------------------------------------------------------------------------------- /Week 7/2 - Theory and Practical/7 - Sunday/IO Operations Input_2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 7/2 - Theory and Practical/7 - Sunday/IO Operations Input_2.pdf -------------------------------------------------------------------------------- /Week 7/2 - Theory and Practical/7 - Sunday/W7D7_SE - Lecture Replay Link.txt: -------------------------------------------------------------------------------- 1 | https://app.livestorm.co/hyperion-development/skills-bootcamp-c5-c6-software-engineering-prescribed-academic-sessions-part-2/live?s=b0bb4b1d-4ce0-4083-82f5-0f77872fbe85#/qa -------------------------------------------------------------------------------- /Week 7/2 - Theory and Practical/7 - Sunday/session code/latin_1_file.txt: -------------------------------------------------------------------------------- 1 | This is a french word: caf� -------------------------------------------------------------------------------- /Week 7/2 - Theory and Practical/7 - Sunday/session code/random_utf-8_csv.csv: -------------------------------------------------------------------------------- 1 | name,age,city 2 | serge,456,pluto-metropolitan 3 | pika,34,antarctica 4 | -------------------------------------------------------------------------------- /Week 7/2 - Theory and Practical/7 - Sunday/session code/session_code_1.py: -------------------------------------------------------------------------------- 1 | import csv 2 | 3 | # Example 1 - UTF-8 4 | content = "UTF-8 Encoded Text. This is the japanese word for pluto: 冥王星" 5 | 6 | with open("utf_8_file.txt", 'w', encoding='utf-8') as file: 7 | file.write(content) 8 | 9 | # Example 2 - Latin-1 10 | content = "This is a french word: café" 11 | with open("latin_1_file.txt", 'w', encoding='latin-1') as file: 12 | file.write(content) 13 | # Note - In VsCode the file can be opened with the Central European (Windows 1250) encoding 14 | 15 | # Example 3 - Different file format 16 | twod_list_to_write = [ 17 | ["name", "age", "city"], 18 | ["serge", "456", "pluto-metropolitan"], 19 | ["pika", "34", "antarctica"] 20 | ] 21 | 22 | with open('random_utf-8_csv.csv', 'w', newline='', encoding='utf-8' ) as file: 23 | writer_instance = csv.writer(file) 24 | writer_instance.writerows(twod_list_to_write) 25 | -------------------------------------------------------------------------------- /Week 7/2 - Theory and Practical/7 - Sunday/session code/utf_8_file.txt: -------------------------------------------------------------------------------- 1 | UTF-8 Encoded Text. This is the japanese word for pluto: 冥王星 -------------------------------------------------------------------------------- /Week 7/3 - Portfolio/7 - Sunday/SE Portfolio Session 6_ Log Management Tool.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 7/3 - Portfolio/7 - Sunday/SE Portfolio Session 6_ Log Management Tool.pdf -------------------------------------------------------------------------------- /Week 7/3 - Portfolio/7 - Sunday/W7D7_SE - Lecture Replay Link.txt: -------------------------------------------------------------------------------- 1 | https://app.livestorm.co/hyperion-development/skills-bootcamp-c5-c6-software-engineering-recommended-academic-sessions-part-2/live?s=42260e68-c087-464b-a8a5-89714ce2b18a#/qa -------------------------------------------------------------------------------- /Week 7/3 - Portfolio/7 - Sunday/Week 7 - Case Study.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 7/3 - Portfolio/7 - Sunday/Week 7 - Case Study.pdf -------------------------------------------------------------------------------- /Week 7/3 - Portfolio/7 - Sunday/dummy_data.txt: -------------------------------------------------------------------------------- 1 | 11/12/2023 12:30 | Order Placed | 512458 | London | Electronics 2 | 16/10/2023 12:30 | Order Placed | 512459 | London | Electronics 3 | 10/12/2023 12:30 | Order Placed | 512460 | London | Electronics -------------------------------------------------------------------------------- /Week 7/3 - Portfolio/SE Portfolio Session 6_ Log Management Tool.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 7/3 - Portfolio/SE Portfolio Session 6_ Log Management Tool.pdf -------------------------------------------------------------------------------- /Week 7/3 - Portfolio/pass.txt.txt: -------------------------------------------------------------------------------- 1 | placeholder file 2 | -------------------------------------------------------------------------------- /Week 7/4 - Tutorial/6 - Saturday/W7D6_SE - Lecture Replay Link.txt: -------------------------------------------------------------------------------- 1 | https://app.livestorm.co/hyperion-development/skills-bootcamp-c5-c6-software-engineering-prescribed-academic-sessions-part-2/live?s=ad153161-a8af-4817-be14-200824b76477#/qa -------------------------------------------------------------------------------- /Week 7/4 - Tutorial/6 - Saturday/Week 7 Tutorial Session.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 7/4 - Tutorial/6 - Saturday/Week 7 Tutorial Session.pdf -------------------------------------------------------------------------------- /Week 7/4 - Tutorial/6 - Saturday/session code/comic_char.txt: -------------------------------------------------------------------------------- 1 | thor 2 | hulk 3 | wonder woman 4 | deadpool 5 | professor x 6 | barney the dinosaur 7 | aang 8 | cabbage man -------------------------------------------------------------------------------- /Week 7/4 - Tutorial/6 - Saturday/session code/list_of_cats.txt: -------------------------------------------------------------------------------- 1 | bartholomeow 2 | beans 3 | sally 4 | bob 5 | tangy 6 | garfield 7 | tart 8 | kit 9 | Kuro-chan 10 | teddy -------------------------------------------------------------------------------- /Week 7/4 - Tutorial/6 - Saturday/session code/list_of_planets.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 7/4 - Tutorial/6 - Saturday/session code/list_of_planets.txt -------------------------------------------------------------------------------- /Week 7/4 - Tutorial/6 - Saturday/session code/message_to_NASA: -------------------------------------------------------------------------------- 1 | Pluto is a planet NASA, stop being mean -------------------------------------------------------------------------------- /Week 7/4 - Tutorial/6 - Saturday/session code/pika.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Pikachu", 3 | "Field Work Score": 85, 4 | "Combat Score": 83, 5 | "Mathematics Score": 56 6 | } -------------------------------------------------------------------------------- /Week 7/4 - Tutorial/6 - Saturday/session code/poke_stats.csv: -------------------------------------------------------------------------------- 1 | Name,Field Work Score,Combat Score,Mathematics Score 2 | Pikachu,85,83,56 3 | Squirtle,90,75,70 4 | Psyduck,70,50,97 5 | -------------------------------------------------------------------------------- /Week 7/4 - Tutorial/6 - Saturday/session code/random_names.txt: -------------------------------------------------------------------------------- 1 | ahsoka 2 | kenobi 3 | anakin 4 | luke 5 | yoda 6 | cal 7 | r2d2 8 | mace 9 | bartholomeow 10 | -------------------------------------------------------------------------------- /Week 7/4 - Tutorial/6 - Saturday/session code/session_code_0.py: -------------------------------------------------------------------------------- 1 | import os 2 | # Best Practices 3 | 4 | # 1. Always use the with() statement 5 | with open("random_names.txt", 'r') as file_object: 6 | content = file_object.read() 7 | # print(content) 8 | 9 | # 2. Handle exceptions try/except 10 | ## Error Handling 11 | try: 12 | with open("random_names.txt", 'r') as file_object: 13 | content = file_object.read() 14 | except FileNotFoundError: 15 | print("File not found!") 16 | except IOError as e: 17 | print(f"Error encountered: {e}") 18 | 19 | ## File Existence using OS library 20 | file_path = "random.txt" 21 | 22 | if os.path.exists(file_path): 23 | with open("random_names.txt", 'r') as file_object: 24 | content = file_object.read() 25 | else: 26 | print(f"File '{file_path}' does not exist!") 27 | 28 | # 3. Specify Encoding 29 | with open("sub_folder/list_of_birds.txt", 'r', encoding='utf-8') as file_object: 30 | content = file_object.read() 31 | print(content) 32 | 33 | # 4. Dynamic Paths 34 | file_path = "sub_folder/list_of_birds.txt" 35 | 36 | with open(file_path, 'r', encoding='utf-8') as file_object: 37 | content = file_object.read() 38 | print(content) 39 | 40 | # using the os library 41 | file_path = os.path.join("your directory", "name of the file") 42 | -------------------------------------------------------------------------------- /Week 7/4 - Tutorial/6 - Saturday/session code/session_code_1.py: -------------------------------------------------------------------------------- 1 | file_path_cats = "list_of_cats.txt" 2 | file_path_birds = "sub_folder/list_of_birds.txt" 3 | 4 | # Example 1 - iterating over file 5 | with open(file_path_cats, 'r') as file: 6 | file_content = file.readlines() 7 | for line in file_content: 8 | print(line.strip()) 9 | 10 | 11 | # Example 2 - cat count 12 | with open(file_path_cats, 'r') as file: 13 | file_content = file.readlines() 14 | cat_count = len(file_content) 15 | 16 | print(f"Number of cats: {cat_count}") 17 | 18 | # Example 3 19 | with open(file_path_cats, 'r') as file: 20 | file_content = file.readlines() 21 | 22 | for pos, line in enumerate(file_content, 1): 23 | print(pos, line.strip()) 24 | 25 | # Example 4 26 | with open(file_path_cats, 'r') as cat_file, open(file_path_birds, 'r') as bird_file: 27 | print("Cats in daycare: ") 28 | for line in cat_file.readlines(): 29 | print(line.strip()) 30 | 31 | print("\nBirds in daycare: ") 32 | for line in bird_file.readlines(): 33 | print(line.strip()) 34 | -------------------------------------------------------------------------------- /Week 7/4 - Tutorial/6 - Saturday/session code/sub_folder/external_file.py: -------------------------------------------------------------------------------- 1 | # accessing from an external file 2 | 3 | with open("list_of_cats.txt", 'r') as file: 4 | content = file.read() 5 | print(content) -------------------------------------------------------------------------------- /Week 7/4 - Tutorial/6 - Saturday/session code/sub_folder/list_of_birds.txt: -------------------------------------------------------------------------------- 1 | birb 2 | feline 3 | jerry 4 | solo 5 | hunter -------------------------------------------------------------------------------- /Week 7/4 - Tutorial/example.csv: -------------------------------------------------------------------------------- 1 | Name,Age,City 2 | Alice,25,London 3 | Bob,30,Manchester 4 | Charlie,22,Edinburgh 5 | -------------------------------------------------------------------------------- /Week 7/4 - Tutorial/example.txt: -------------------------------------------------------------------------------- 1 | This is the first line. 2 | Python is amazing! 3 | Learning file handling is cool!. 4 | -------------------------------------------------------------------------------- /Week 7/4 - Tutorial/pass.txt.txt: -------------------------------------------------------------------------------- 1 | placeholder file 2 | -------------------------------------------------------------------------------- /Week 8/1 - Open Class/6 - Saturday/Open Session.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 8/1 - Open Class/6 - Saturday/Open Session.pdf -------------------------------------------------------------------------------- /Week 8/1 - Open Class/6 - Saturday/W8D6_SE - Lecture Replay Link.txt: -------------------------------------------------------------------------------- 1 | https://app.livestorm.co/hyperion-development/skills-bootcamp-c5-c6-software-engineering-recommended-academic-sessions-part-2/live?s=232a317c-7b45-449c-b47d-6e604cb0d106#/qa -------------------------------------------------------------------------------- /Week 8/1 - Open Class/6 - Saturday/session code/ash_poke_stat.txt: -------------------------------------------------------------------------------- 1 | pika, electric, 12, 34 2 | psyduck, water, 45, 23 3 | bulbasuar, grass, 90, 1200 4 | sunflora, grass, 45, 12 5 | -------------------------------------------------------------------------------- /Week 8/1 - Open Class/6 - Saturday/session code/poke_users.txt: -------------------------------------------------------------------------------- 1 | ash 2 | misty 3 | brock 4 | Tracey -------------------------------------------------------------------------------- /Week 8/1 - Open Class/6 - Saturday/session code/session_code_1.py: -------------------------------------------------------------------------------- 1 | # Task 15 outline 2 | """ 3 | open the file you are working with 4 | for loop based of number of students registering 5 | prompt the user for an id 6 | write the id to the file. 7 | """ 8 | 9 | -------------------------------------------------------------------------------- /Week 8/1 - Open Class/6 - Saturday/session code/todo.md: -------------------------------------------------------------------------------- 1 | ### Part 1 2 | * function 3 | * login 4 | * add 5 | * view 6 | * main loop 7 | 8 | ### Part 2 9 | * login (trainer) 10 | * Pokemon addition 11 | 12 | ### part 3 13 | * Viewing 14 | * logout 15 | 16 | ## CRUD 17 | * Create 18 | * Read 19 | * Update 20 | * Delete -------------------------------------------------------------------------------- /Week 8/1 - Open Class/pass.txt.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 8/1 - Open Class/pass.txt.txt -------------------------------------------------------------------------------- /Week 8/2 - Theory and Practical/1 - Monday/User Defined Functions (updated).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 8/2 - Theory and Practical/1 - Monday/User Defined Functions (updated).pdf -------------------------------------------------------------------------------- /Week 8/2 - Theory and Practical/1 - Monday/W8D1_SE - Lecture Replay Link.txt.txt: -------------------------------------------------------------------------------- 1 | https://app.livestorm.co/hyperion-development/skills-bootcamp-c5-c6-software-engineering-prescribed-academic-sessions-part-2/live?s=80e431b0-84a1-4c43-8c29-38981eb84d16#/qa -------------------------------------------------------------------------------- /Week 8/2 - Theory and Practical/1 - Monday/session code/__pycache__/my_custom_library.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 8/2 - Theory and Practical/1 - Monday/session code/__pycache__/my_custom_library.cpython-311.pyc -------------------------------------------------------------------------------- /Week 8/2 - Theory and Practical/1 - Monday/session code/my_custom_library.py: -------------------------------------------------------------------------------- 1 | # creating our custom library (my_custom_library.py) 2 | def custom_greeting(): 3 | print("Hello fellow plutonians, we are all citizens of pluto!") 4 | 5 | 6 | def obi_wan_greeting(): 7 | print("Well, of course I know him. He's me!") 8 | 9 | def dumbledore_said(user_input): 10 | print(f"{user_input}, Dumbledore said calmly") 11 | -------------------------------------------------------------------------------- /Week 8/2 - Theory and Practical/1 - Monday/session code/session_code_0.py: -------------------------------------------------------------------------------- 1 | from my_custom_library import custom_greeting 2 | 3 | 4 | # def hello_world(): 5 | # print("hello world") 6 | 7 | 8 | # hello_world() 9 | 10 | 11 | # # parameters vs arguments 12 | # def plus_one(value_one): # parameter 13 | # pass 14 | 15 | 16 | # plus_one(789) # argument 17 | 18 | # # print vs return 19 | # # return example 20 | # def plus_one_return(value_one): 21 | # return value_one + 1 22 | 23 | 24 | # # print example 25 | # def plus_one_print(value_one): 26 | # print(value_one + 1) 27 | 28 | # # print - will simply display the data you are working with and not store it in memory 29 | # # return - return the data and store it in memory but not display unless specified 30 | 31 | 32 | # print(plus_one_print(5)) 33 | # # print(plus_one_return(10)) 34 | 35 | custom_greeting() -------------------------------------------------------------------------------- /Week 8/2 - Theory and Practical/1 - Monday/session code/session_code_1.py: -------------------------------------------------------------------------------- 1 | # User Defined Functions 2 | def greet(user_name): 3 | print(f"Hello {user_name}!") 4 | 5 | 6 | # Getting user input 7 | user_input = input("Enter your name: ") 8 | 9 | # greet() function calls 10 | greet(user_input) 11 | greet("Obi-wan") 12 | greet("Pluto") 13 | 14 | # Parameters and arguments 15 | def add(x, y): # these are your parameters 16 | return x + y 17 | 18 | 19 | # function call, the user values will be arguments 20 | result_of_add_function = add(50, 3) # 50 and 3 are our arguments 21 | 22 | # Return and Print 23 | # greet("Serge") # displays result but does not store it 24 | # result_of_add_function = add(50, 3) # return the results to variable 25 | 26 | # print(result_of_add_function) 27 | 28 | 29 | # Docstrings 30 | def subtract(x, y): 31 | """ 32 | subtract two numbers 33 | 34 | parameters: 35 | - x: first number 36 | - y: second number 37 | 38 | Returns: 39 | The difference of x and y 40 | """ 41 | print(f"Result of {x} - {y} = {x - y}") 42 | return x - y 43 | 44 | # subtract function call 45 | subtract(40, 3) 46 | result_of_subtraction = subtract(50, 2) 47 | print(result_of_subtraction * 5) -------------------------------------------------------------------------------- /Week 8/2 - Theory and Practical/1 - Monday/session code/session_code_2.py: -------------------------------------------------------------------------------- 1 | # Libraries 2 | import math 3 | 4 | result = math.sqrt(25) 5 | 6 | print(result) 7 | 8 | # different import ways 9 | 10 | # importing the entire library 11 | import math 12 | 13 | # import the specific function from library 14 | from math import sqrt 15 | 16 | 17 | # Example of datetime library 18 | from datetime import datetime 19 | 20 | current_time = datetime.now() 21 | 22 | print(current_time) 23 | 24 | 25 | # using custom library 26 | from my_custom_library import custom_greeting 27 | # custom_greeting() 28 | 29 | import my_custom_library 30 | 31 | user_statement = input("What did dumbledore say ? ") 32 | 33 | my_custom_library.dumbledore_said(user_statement) 34 | 35 | # Benefits of User-defined functions 36 | """ 37 | 1. Modularity - breaking down into smaller pieces 38 | 2. Abstraction - Function hide the implementation details. 39 | 3. Extension - libraries extend the capabilities of our programs 40 | """ 41 | -------------------------------------------------------------------------------- /Week 8/2 - Theory and Practical/4 - Thursday/IO Operations Out_1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 8/2 - Theory and Practical/4 - Thursday/IO Operations Out_1.pdf -------------------------------------------------------------------------------- /Week 8/2 - Theory and Practical/4 - Thursday/W8D4_SE - Lecture Replay Link.txt: -------------------------------------------------------------------------------- 1 | https://app.livestorm.co/hyperion-development/skills-bootcamp-c5-c6-software-engineering-prescribed-academic-sessions-part-2/live?s=44281b14-a335-4d3f-a13d-33943e321329#/qa -------------------------------------------------------------------------------- /Week 8/2 - Theory and Practical/4 - Thursday/session code/dummy_data.txt: -------------------------------------------------------------------------------- 1 | pika, electric, 12, 34 2 | psyduck, water, 45, 23 3 | bulbasuar, grass, 90, 12 4 | sunflora, grass, 45, 12 5 | -------------------------------------------------------------------------------- /Week 8/2 - Theory and Practical/4 - Thursday/session code/jedi.txt: -------------------------------------------------------------------------------- 1 | ashoka 2 | kenobi 3 | anakin 4 | luke 5 | yoda 6 | cal 7 | r2d2 8 | mace 9 | beans 10 | beans 11 | beans 12 | beans 13 | beans 14 | beans 15 | bartholomeow -------------------------------------------------------------------------------- /Week 8/2 - Theory and Practical/4 - Thursday/session code/jedi_new.txt: -------------------------------------------------------------------------------- 1 | Monty -------------------------------------------------------------------------------- /Week 8/2 - Theory and Practical/4 - Thursday/session code/planets.txt: -------------------------------------------------------------------------------- 1 | Mercury 2 | Venus 3 | Liano 4 | Earth 5 | Mars 6 | Jupiter 7 | Saturn 8 | Uranus 9 | Neptune 10 | PLUTO 11 | -------------------------------------------------------------------------------- /Week 8/2 - Theory and Practical/4 - Thursday/session code/secret_secret_pokemon.txt: -------------------------------------------------------------------------------- 1 | mewtwo 2 | Raikou 3 | Entei 4 | Raikou 5 | -------------------------------------------------------------------------------- /Week 8/2 - Theory and Practical/4 - Thursday/session code/secret_secret_secret_pokemon.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 8/2 - Theory and Practical/4 - Thursday/session code/secret_secret_secret_pokemon.txt -------------------------------------------------------------------------------- /Week 8/2 - Theory and Practical/4 - Thursday/session code/session_code_1.py: -------------------------------------------------------------------------------- 1 | # Can we show an error message if 2 | # there is a white space line in the text file? 3 | 4 | with open("secret_secret_pokemon.txt", 'r') as file: 5 | content = file.readlines() 6 | 7 | print(content) 8 | 9 | 10 | -------------------------------------------------------------------------------- /Week 8/2 - Theory and Practical/4 - Thursday/session code/sub-folder/cat_names.txt: -------------------------------------------------------------------------------- 1 | beans 2 | bartholomeow 3 | scratch 4 | tigger 5 | garfield 6 | thor 7 | beans is a tabby cat 8 | beans is a tabby cat -------------------------------------------------------------------------------- /Week 8/2 - Theory and Practical/4 - Thursday/session code/sub-folder/jedi_new.txt: -------------------------------------------------------------------------------- 1 | MontySergePlutoBeans -------------------------------------------------------------------------------- /Week 8/2 - Theory and Practical/pass.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Week 8/3 - Portfolio/SE Portfolio Session 7_ Gaming System (1).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 8/3 - Portfolio/SE Portfolio Session 7_ Gaming System (1).pdf -------------------------------------------------------------------------------- /Week 8/3 - Portfolio/pass.txt.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 8/3 - Portfolio/pass.txt.txt -------------------------------------------------------------------------------- /Week 8/4 - Tutorial/SE Copy [Tutorial] Working with SQL.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 8/4 - Tutorial/SE Copy [Tutorial] Working with SQL.pdf -------------------------------------------------------------------------------- /Week 8/4 - Tutorial/pass.txt.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 8/4 - Tutorial/pass.txt.txt -------------------------------------------------------------------------------- /Week 8/Tech Talk/Tech Talk on CyberSecurity.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 8/Tech Talk/Tech Talk on CyberSecurity.pdf -------------------------------------------------------------------------------- /Week 9/1 - Open Class/Friday/W9D5 - Open Session.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 9/1 - Open Class/Friday/W9D5 - Open Session.pdf -------------------------------------------------------------------------------- /Week 9/1 - Open Class/open_class.py: -------------------------------------------------------------------------------- 1 | # from functions import print_name 2 | 3 | # print_name("James") 4 | 5 | def print_line(length=80, symbol="-"): 6 | print(symbol*length) 7 | 8 | print_line(length=20, symbol="~") 9 | 10 | 11 | def random_calculation(num1, num2, num3): 12 | try: 13 | result = (num1 ** num2) + num3 14 | return result 15 | except: 16 | return None 17 | 18 | # try: 19 | # random_calculation("3", "4", "5") 20 | # except: 21 | # print("Invalid values") 22 | 23 | # print(random_calculation(10,3,6)) 24 | 25 | # def print_lines(): 26 | # for i in range(10): 27 | # print_line(30, "@") 28 | 29 | 30 | # print(print_line()) 31 | 32 | # if 10 > 5: 33 | # print() 34 | 35 | 36 | def add_values(values): 37 | if len(values) == 1: 38 | return values[0] 39 | else: 40 | return values[0] + add_values(values[1:]) 41 | 42 | print(add_values([1,2,3,4,5])) 43 | -------------------------------------------------------------------------------- /Week 9/2 - Theory and Practical/Monday/Best Practices and Documentation Pt 1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 9/2 - Theory and Practical/Monday/Best Practices and Documentation Pt 1.pdf -------------------------------------------------------------------------------- /Week 9/2 - Theory and Practical/Monday/my_logs.log: -------------------------------------------------------------------------------- 1 | INFO:root:Calling file_opener @ line 118 2 | ERROR:root:The not_here.txt file was not found :( (line 117)) 3 | ERROR:root:Log file does not exist 4 | -------------------------------------------------------------------------------- /Week 9/2 - Theory and Practical/Thursday/Best Practices and Documentation Pt 2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 9/2 - Theory and Practical/Thursday/Best Practices and Documentation Pt 2.pdf -------------------------------------------------------------------------------- /Week 9/3 - Portfolio/Portfolio Session 8 - Case Study.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 9/3 - Portfolio/Portfolio Session 8 - Case Study.pdf -------------------------------------------------------------------------------- /Week 9/3 - Portfolio/SE Portfolio Session 8_ Vehicle Dashboard.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 9/3 - Portfolio/SE Portfolio Session 8_ Vehicle Dashboard.pdf -------------------------------------------------------------------------------- /Week 9/4 - Tutorial/calculator.py: -------------------------------------------------------------------------------- 1 | print("***** BASIC CALCULATOR *****") 2 | 3 | while True: 4 | while True: 5 | num1 = input("Please enter a number: ") 6 | if num1.isnumeric(): 7 | num1 = int(num1) 8 | break 9 | print("Please use numbers only!") 10 | while True: 11 | num2 = input("Please enter another number: ") 12 | if num2.isnumeric(): 13 | num2 = int(num2) 14 | break 15 | print("Please use numbers only!") 16 | while True: 17 | operator = input("Please select an operation(+,-,*,/): ") 18 | if operator in ["+", "-", "*", "/"]: 19 | break 20 | print("The only available operators are +, -, *, /.") 21 | 22 | if operator == "+": 23 | result = num1 + num2 24 | elif operator == "-": 25 | result = num1 - num2 26 | elif operator == "*": 27 | result = num1 * num2 28 | elif operator == "/": 29 | result = num1 / num2 30 | 31 | print(f"{num1} {operator} {num2} = {result}") 32 | 33 | if input("Press enter to do another equation or type anything to quit."): 34 | break 35 | -------------------------------------------------------------------------------- /Week 9/4 - Tutorial/pass.txt.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 9/4 - Tutorial/pass.txt.txt -------------------------------------------------------------------------------- /Week 9/Tech Talk/pass.txt.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/Week 9/Tech Talk/pass.txt.txt -------------------------------------------------------------------------------- /week 4/Open Class/Sunday Open Class/open.py: -------------------------------------------------------------------------------- 1 | # Block comment: 2 | # i' can be thought of as the iterator (inline). 3 | # Simple for loop that prints values from 0-10 4 | 5 | 6 | # # This is a block comment (I refer to the code following me :) ) 7 | # print("Read my block comment ^") 8 | 9 | # Multi-Line comment 10 | """ 11 | Simple for loop that prints values from 0-10. 12 | i' can be thought of as the iterator (inline). 13 | """ 14 | 15 | # # Inline comment: 16 | # for i in range(10): 17 | # print(i)# 'i' can be thought of as the iterator (inline). 18 | # if i > 5: 19 | # print("The quick brown fox jumps over the lazy dog.", "The quick brown fox jumps over the lazy dog.", sep="\n") 20 | 21 | # print("The quick brown fox jumps over the lazy dog.", 22 | # "The quick brown fox jumps over the lazy dog.", 23 | # sep="\n") 24 | 25 | 26 | 27 | 28 | # print("A", "B", "C", sep="-") 29 | 30 | 31 | # print( 32 | # "A", 33 | # "B", 34 | # sep="\n") 35 | 36 | # Enumerate Example 37 | stock = ["tea", "milk", "sugar"] 38 | # print(stock[0]) 39 | 40 | enumerated_stock = enumerate(stock) 41 | visible_stock = list(enumerated_stock) 42 | 43 | [(0, 'tea'), (1, 'milk'), (2, 'sugar')] 44 | 45 | 46 | print(list(enumerate(stock))) 47 | 48 | -------------------------------------------------------------------------------- /week 4/Open Class/open_class2.py: -------------------------------------------------------------------------------- 1 | # my_str = "Welcome" 2 | # # 0123456 3 | 4 | # new_str = my_str[-2:] 5 | 6 | # print(new_str) 7 | 8 | 9 | # my_str = "Welcome" 10 | 11 | # my_list = ["Welcome", "to", "the", "open", "class!"] 12 | 13 | # joined_string = " ".join([my_list[0], my_list[-1]]) 14 | 15 | # print(joined_string) 16 | 17 | # split_string = joined_string.split() 18 | 19 | # print(split_string) 20 | 21 | 22 | 23 | loop_string = "This is for a loop!" 24 | # 0123456789 25 | # print(len(loop_string)) 26 | 27 | to_find = "o" 28 | 29 | # for i in range(len(loop_string)): # (0,1,2,3,4,5,6,7,8) 30 | # if loop_string[i] == to_find: 31 | # index = i 32 | # break 33 | # print(loop_string.find("o")) 34 | 35 | # for i in range(0, 101, 2): 36 | # print(i) 37 | 38 | # has_letter = False 39 | # for letter in loop_string: 40 | # if letter == to_find: 41 | # has_letter = True 42 | 43 | # if "o" in loop_string: 44 | # print(True) 45 | 46 | # print(f"Index of {to_find} is {index}") 47 | # print(loop_string[9]) 48 | 49 | # my_int = 4 50 | # my_float = 4.1 51 | 52 | # if my_int < my_float: 53 | # print("Int is smaller than float") 54 | 55 | my_str = "This is our new string!" 56 | my_list = ["Item1", "Item2", "Item3"] 57 | 58 | for i, item in enumerate(my_list, 1): 59 | print(i, item, sep=": ") 60 | 61 | print(str(my_list)) 62 | -------------------------------------------------------------------------------- /week 4/Open Class/open_class3.py: -------------------------------------------------------------------------------- 1 | # my_str = "Jason, Jackson, 17" 2 | 3 | # split_string = my_str.split(", ") 4 | 5 | # print(split_string) 6 | 7 | 8 | # print(split_string) 9 | 10 | # split_string[1] = "was" 11 | 12 | # print(split_string) 13 | 14 | # my_str = " ".join(split_string) 15 | 16 | # print(my_str) 17 | 18 | 19 | # my_list = ['This', 'is', 'our', 'open', 'class', 'string!'] 20 | 21 | # for i, word in enumerate(my_list, 1): 22 | # print(i, word, sep=": ") 23 | 24 | # user_choice = int(input("Please select a word by index: "))-1 25 | 26 | # if 0 <= user_choice < len(my_list): 27 | # print(f"You chose the word: {my_list[user_choice]}") 28 | # else: 29 | # print("Invalid index!") 30 | 31 | 32 | # lst1 = ["Hello"] 33 | 34 | # lst1.append("Goodbye") 35 | 36 | # print(lst1) 37 | 38 | my_str = "Jason, Jackson, 17" 39 | 40 | if "Jack" in my_str: 41 | my_str = my_str.replace("Jason", "") 42 | print(my_str) 43 | -------------------------------------------------------------------------------- /week 4/Portfolio/SE Portfolio Session 3_ CareerCrafter.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/week 4/Portfolio/SE Portfolio Session 3_ CareerCrafter.pdf -------------------------------------------------------------------------------- /week 4/Theory and Practical/Lists.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/week 4/Theory and Practical/Lists.pdf -------------------------------------------------------------------------------- /week 4/Theory and Practical/Strings.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/week 4/Theory and Practical/Strings.pdf -------------------------------------------------------------------------------- /week 4/Tutorial/Tutorial_ Debugging.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skills-cogrammar/C5-Software-Engineering-Lecture-Backpack/a71b06ad597af5689abc427f35ed7e239fc51fa5/week 4/Tutorial/Tutorial_ Debugging.pdf -------------------------------------------------------------------------------- /week 4/Tutorial/open.py: -------------------------------------------------------------------------------- 1 | # Block comment: 2 | # i' can be thought of as the iterator (inline). 3 | # Simple for loop that prints values from 0-10 4 | 5 | 6 | # # This is a block comment (I refer to the code following me :) ) 7 | # print("Read my block comment ^") 8 | 9 | # Multi-Line comment 10 | """ 11 | Simple for loop that prints values from 0-10. 12 | i' can be thought of as the iterator (inline). 13 | """ 14 | 15 | # # Inline comment: 16 | # for i in range(10): 17 | # print(i)# 'i' can be thought of as the iterator (inline). 18 | # if i > 5: 19 | # print("The quick brown fox jumps over the lazy dog.", "The quick brown fox jumps over the lazy dog.", sep="\n") 20 | 21 | # print("The quick brown fox jumps over the lazy dog.", 22 | # "The quick brown fox jumps over the lazy dog.", 23 | # sep="\n") 24 | 25 | 26 | 27 | 28 | # print("A", "B", "C", sep="-") 29 | 30 | 31 | # print( 32 | # "A", 33 | # "B", 34 | # sep="\n") 35 | 36 | # Enumerate Example 37 | stock = ["tea", "milk", "sugar"] 38 | # print(stock[0]) 39 | 40 | enumerated_stock = enumerate(stock) 41 | visible_stock = list(enumerated_stock) 42 | 43 | [(0, 'tea'), (1, 'milk'), (2, 'sugar')] 44 | 45 | 46 | print(list(enumerate(stock))) 47 | 48 | --------------------------------------------------------------------------------