Python Basics (2023-05-15 - 2023-05-17) ======================================= .. contents:: :local: .. toctree:: :hidden: agenda notebook-wrapper .. sidebar:: **Original Agenda** * :doc:`agenda` **Notebook** * Structure: :doc:`notebook-wrapper` * Entire notebook: :download:`notebook.ipynb` **Github Repository** * `https://github.com/jfasch/2023-05-15 `__ **Material** * :doc:`/trainings/material/soup/python/group` Day 1 ----- Setup ..... * :doc:`/trainings/material/soup/python/basics/installation` * :doc:`/trainings/material/soup/python/misc/vscode` Basics ...... Datatypes ````````` * :doc:`/trainings/material/soup/python/basics/python_0110_blahblah/topic` * :doc:`/trainings/material/soup/python/basics/python_0120_helloworld/topic` * :doc:`/trainings/material/soup/python/basics/python_0125_running/topic` * :doc:`/trainings/material/soup/python/basics/python_0130_syntax_etc/topic` * :doc:`/trainings/material/soup/python/basics/python_0139_commandline_argv/topic` * :doc:`/trainings/material/soup/python/basics/python_0140_variables/topic` * :doc:`/trainings/material/soup/python/basics/python_0150_datatypes_overview/topic` * :doc:`/trainings/material/soup/python/basics/python_0150_datatypes_overview_compound/topic` * :doc:`/trainings/material/soup/python/basics/python_0160_boolean/topic` * :doc:`/trainings/material/soup/python/exercises/legacy/mixed_list_interactive` * :doc:`/trainings/material/soup/python/exercises/legacy/mixed_list_executable` * :doc:`/trainings/material/soup/python/exercises/legacy/cmdline_digit` (solution: `digit.py `__) Control Flow, Sequences, *Iteration* ```````````````````````````````````` * :doc:`/trainings/material/soup/python/basics/python_0170_if/topic` * :doc:`/trainings/material/soup/python/exercises/legacy/max_numbers` (solution: `maximum.py `__) * :doc:`/trainings/material/soup/python/basics/python_0193_while/topic` * :doc:`/trainings/material/soup/python/exercises/legacy/while_primeness` (solution: `prime-while.py `__) * :doc:`/trainings/material/soup/python/basics/python_0220_for/topic` * :doc:`/trainings/material/soup/python/basics/python_0225_range/topic` * :doc:`/trainings/material/soup/python/exercises/legacy/for_primeness` (solution: `prime-for.py `__) More Datatypes `````````````` * :doc:`/trainings/material/soup/python/basics/python_0200_sequential_types/topic` * :doc:`/trainings/material/soup/python/basics/python_0210_indexing_slicing/topic` * :doc:`/trainings/material/soup/python/basics/python_0250_refs_flat_deep_copy/topic` * :doc:`/trainings/material/soup/python/basics/python_0270_functions/topic` Day 2 ----- Morning Awakening ................. Generators `````````` * :doc:`/trainings/material/soup/python/advanced/iteration-generation/python_1010_generators_yield/topic` * Generating infinitely many Fibonacci numbers: `fibonacci.py `__ * Generating a sine wave: `sine.py `__ * Watching a directory for new files (by *iterating*): `watch-dir.py `__ A Bit Of ``venv``, A Bit Of ``pip`` ``````````````````````````````````` From :doc:`/trainings/material/soup/python/swdev/group` * :doc:`/trainings/material/soup/python/swdev/venv/topic` * :doc:`/trainings/material/soup/python/swdev/pip/topic` Basics ...... More Datatypes `````````````` * :doc:`/trainings/material/soup/python/exercises/legacy/primeness_function` (solution: `prime-function.py `__) * :doc:`/trainings/material/soup/python/basics/python_0300_strings/topic` * :doc:`/trainings/material/soup/python/basics/python_0320_strings_methods/topic` * :doc:`/trainings/material/soup/python/basics/python_0400_lists/topic` * :doc:`/trainings/material/soup/python/basics/python_0450_dictionaries/topic` * :doc:`/trainings/material/soup/python/basics/python_0460_sets/topic` * :doc:`/trainings/material/soup/python/exercises/legacy/uniq_function` * :doc:`/trainings/material/soup/python/exercises/legacy/uniq_generator` * :doc:`/trainings/material/soup/python/advanced/comprehensions/topic` * :doc:`/trainings/material/soup/python/misc/encoding/topic` * :doc:`/trainings/material/soup/python/basics/python_0500_files/topic` Exercise Series: CSV Files .......................... * :doc:`/trainings/material/soup/python/misc/csv/topic` * :doc:`/trainings/material/soup/python/exercises/userdb/csvreader` (solution: `read-userdb-noheader.py `__) * :doc:`/trainings/material/soup/python/exercises/userdb/csvdictreader` (solution: `read-userdb-header.py `__) * :doc:`/trainings/material/soup/python/exercises/userdb/csvreader-function` (solution: `read-userdb-noheader-func.py `__) * :doc:`/trainings/material/soup/python/exercises/userdb/csvdictreader-function` (solution: `read-userdb-header-func.py `__) * :doc:`/trainings/material/soup/python/exercises/userdb/userdb_csv` (solution: `userdb_csv.py `__ (module), `read-userdb-noheader-mod.py `__, `read-userdb-header-mod.py `__) Day 3 ----- Object Oriented Programming ........................... From :doc:`/trainings/material/soup/python/advanced/oo/group` * :doc:`/trainings/material/soup/python/advanced/oo/classes-and-dicts/topic` * :doc:`/trainings/material/soup/python/advanced/oo/constructor/topic` * :doc:`/trainings/material/soup/python/advanced/oo/namedtuple/topic` * :doc:`/trainings/material/soup/python/advanced/oo/methods/topic` * :doc:`/trainings/material/soup/python/advanced/oo/str-repr/topic` * :doc:`/trainings/material/soup/python/advanced/oo/properties/topic` (livehacked in `oo.py `__) Interleaved by a ``pytest`` installation into a virtual environment: * :doc:`/trainings/material/soup/python/swdev/venv/topic` * :doc:`/trainings/material/soup/python/swdev/pip/topic` * :doc:`/trainings/material/soup/python/swdev/pytest/intro` Followed by an exercise ... * :doc:`/trainings/material/soup/python/exercises/userdb/user-class-person` OO, cont'd ... * :doc:`/trainings/material/soup/python/advanced/oo/inheritance/topic` * :doc:`/trainings/material/soup/python/advanced/exceptions/topic` (see also `oo.py `__) Advanced Language Features .......................... * :doc:`/trainings/material/soup/python/advanced/context-mgr/topic` (livehacked - though the topic is a better read - in `context-manager.py `__) Links ----- Beginner ........ * `Python Tutorial for Beginners 4: Lists, Tuples, and Sets `__, by `Corey Schafer `__ .. raw:: html * `Python Tutorial for Beginners 5: Dictionaries - Working with Key-Value Pairs `__, by `Corey Schafer `__ .. raw:: html * `10 Python Tips and Tricks For Writing Better Code `__, by `Corey Schafer `__ .. raw:: html * `Python Tutorial: Using Try/Except Blocks for Error Handling `__, by `Corey Schafer `__ .. raw:: html Modules from Standard Library ............................. * `Python Tutorial: OS Module - Use Underlying Operating System Functionality `__, by `Corey Schafer `__ .. raw:: html * `Python Tutorial: Calling External Commands Using the Subprocess Module `__, by `Corey Schafer `__ .. raw:: html * `Python Tutorial: re Module - How to Write and Match Regular Expressions (Regex) `__, by `Corey Schafer `__ .. raw:: html * `Python Tutorial: CSV Module - How to Read, Parse, and Write CSV Files `__, by `Corey Schafer `__ .. raw:: html Advanced ........ * `Transforming Code into Beautiful, Idiomatic Python `__, by **Raymond Hettinger** .. raw:: html * `Python Tutorial: Duck Typing and Asking Forgiveness, Not Permission (EAFP) `__, by `Corey Schafer `__ .. raw:: html NumPy and Data Science Tutorials ................................ * `Complete Python NumPy Tutorial (Creating Arrays, Indexing, Math, Statistics, Reshaping) `__, by `Keith Galli `__ .. raw:: html * `Solving real world data science tasks with Python Pandas! `__, by `Keith Galli `__ .. raw:: html * `Intro to Data Visualization in Python with Matplotlib! (line graph, bar chart, title, labels, size) `__, by `Keith Galli `__ .. raw:: html Conference Talks ................ * `Built in Super Heroes `__. `David Beazley `__ in an entertaining keynote to the "PyData Chicago 2016" conference. He has a number of very good and entertaining (and very advanced) videos. You have to spend an entire evening with him though. .. raw:: html * `Keynote - David Beazley `__. `David Beazley `__ live coding a Web Assembly interpreter. PyCon India 2019. .. raw:: html * `David Beazley: Generators: The Final Frontier - PyCon 2014 `__: `David Beazley `__ again a bit (a whopping four hours) more precise on that topic. .. raw:: html