From c66ad4faa7243c7cdb4f6b1569f3b2c6add224eb Mon Sep 17 00:00:00 2001 From: giumas Date: Sun, 22 Aug 2021 16:59:46 +0200 Subject: [PATCH 01/11] Fixed a typo and added Python 2 end of life info. --- 000_Welcome_on_Board.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/000_Welcome_on_Board.ipynb b/000_Welcome_on_Board.ipynb index 445b996..769e934 100644 --- a/000_Welcome_on_Board.ipynb +++ b/000_Welcome_on_Board.ipynb @@ -155,7 +155,7 @@ "source": [ "\n", "\n", - "Python has being constantly improved in the part years. These notebooks **only** use the latest version of the language: **Python 3**. The past version of the language, [**Python 2**](https://pythonclock.org/), will *retire* soon and no longer be maintained! Thus, when searching online for help, make sure the results refer to **Python 3**." + "Python has being constantly improved in the past years. These notebooks **only** use the latest version of the language: **Python 3**. As of January 1st, 2020, [**Python 2**](https://www.python.org/doc/sunset-python-2/) has officially reached the end of life and will no longer receive security updates, bug fixes, or other improvements going forward! Thus, when searching online for help, make sure the results refer to **Python 3**." ] }, { From 5f3cb77d96d3d950ee05c35315acca7390422021 Mon Sep 17 00:00:00 2001 From: giumas Date: Sun, 22 Aug 2021 17:23:22 +0200 Subject: [PATCH 02/11] bumped year --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 7bc4908..7ee1e48 100644 --- a/README.rst +++ b/README.rst @@ -32,4 +32,4 @@ Text License Copyright Notice ---------------- -Copyright (c) 2019, University of New Hampshire, Center for Coastal and Ocean Mapping. All rights reserved. +Copyright (c) 2021, University of New Hampshire, Center for Coastal and Ocean Mapping. All rights reserved. From 693223efc4cc4a2f90e30cfb7d83b450690a0c43 Mon Sep 17 00:00:00 2001 From: giumas Date: Sun, 13 Mar 2022 22:13:36 +0100 Subject: [PATCH 03/11] updated article about Python popularity --- 000_Welcome_on_Board.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/000_Welcome_on_Board.ipynb b/000_Welcome_on_Board.ipynb index 769e934..8b6e6fe 100644 --- a/000_Welcome_on_Board.ipynb +++ b/000_Welcome_on_Board.ipynb @@ -114,7 +114,7 @@ "source": [ "\n", "\n", - "[Python](http://www.python.org/) is a [very popular](https://www.economist.com/graphic-detail/2018/07/26/python-is-becoming-the-worlds-most-popular-coding-language) programming language with applications [across different fields](https://www.python.org/about/apps/)." + "[Python](http://www.python.org/) is a [very popular](https://spectrum.ieee.org/top-programming-languages-2021) programming language with applications [across different fields](https://www.python.org/about/apps/)." ] }, { From 212a55e08b5ef6845d3a97d85ff40e6f7b9f0a2c Mon Sep 17 00:00:00 2001 From: giumas Date: Sun, 13 Mar 2022 22:44:28 +0100 Subject: [PATCH 04/11] Removed broken links --- 000_Welcome_on_Board.ipynb | 2 -- 1 file changed, 2 deletions(-) diff --git a/000_Welcome_on_Board.ipynb b/000_Welcome_on_Board.ipynb index 8b6e6fe..ed82c2a 100644 --- a/000_Welcome_on_Board.ipynb +++ b/000_Welcome_on_Board.ipynb @@ -758,8 +758,6 @@ "source": [ "- [The Python website](http://www.python.org/)\n", "- [PEP8 -- Style Guide for Python Code](https://www.python.org/dev/peps/pep-0008/)\n", - "- [Python 2 End of Life Clock](https://pythonclock.org/)\n", - "- [The official introductory notebooks for Jupyter Notebooks](https://nbviewer.jupyter.org/github/jupyter/notebook/tree/master/docs/source/examples/Notebook/)\n", "- [The Jupyter Notebook manual](https://jupyter-notebook.readthedocs.io/en/stable/notebook.html)\n", "\n", " - [Browser compatibility](https://jupyter-notebook.readthedocs.io/en/stable/notebook.html#browser-compatibility)\n", From 6772c4dbd81afed7060b7903b64dd9eddaa51327 Mon Sep 17 00:00:00 2001 From: giumas Date: Sun, 13 Mar 2022 22:47:50 +0100 Subject: [PATCH 05/11] updated version --- index.ipynb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/index.ipynb b/index.ipynb index 67da2a0..deae9d8 100644 --- a/index.ipynb +++ b/index.ipynb @@ -74,8 +74,6 @@ "\n", "* [Semme Dijkstra](mailto:semmed@ccom.unh.edu>)\n", "\n", - "* [Jordan Chadwick](mailto:jordan.chadwick@gmail.com>)\n", - "\n", "* [Tyanne Faulkes](mailto:tyanne.faulkes@noaa.gov>)" ] }, @@ -91,7 +89,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Version: 1.1.2" + "Version: 2.0.0" ] }, { From de5578808ba63a4c4089e0c58053b6f2b7be321f Mon Sep 17 00:00:00 2001 From: giumas Date: Sun, 13 Mar 2022 22:52:39 +0100 Subject: [PATCH 06/11] updates to Python version and year --- 001_Variables_and_Types.ipynb | 8 ++++---- SUP_Python_is_Dynamically_and_Strongly_Typed.ipynb | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/001_Variables_and_Types.ipynb b/001_Variables_and_Types.ipynb index 33ffe84..56832bc 100644 --- a/001_Variables_and_Types.ipynb +++ b/001_Variables_and_Types.ipynb @@ -50,10 +50,10 @@ "metadata": {}, "source": [ "For instance:\n", - "- `ocean_mapping_2019` is a valid variable name.\n", - "- `Ocean_mapping_2019` is a valid variable, but does not follow the convention because it starts with an uppercase `O`.\n", - "- `ocean_mapping_2019` and `Ocean_mapping_2019` are **different** variables that are both valid. However, it is a bad habit to have variables that are only different in the letter case.\n", - "- `2019_ocean_mapping` will **not** work because it has `2` as first character. " + "- `ocean_mapping_2022` is a valid variable name.\n", + "- `Ocean_mapping_2022` is a valid variable, but does not follow the convention because it starts with an uppercase `O`.\n", + "- `ocean_mapping_2022` and `Ocean_mapping_2022` are **different** variables that are both valid. However, it is a bad habit to have variables that are only different in the letter case.\n", + "- `2022_ocean_mapping` will **not** work because it has `2` as first character. " ] }, { diff --git a/SUP_Python_is_Dynamically_and_Strongly_Typed.ipynb b/SUP_Python_is_Dynamically_and_Strongly_Typed.ipynb index efeb8c1..b725edf 100644 --- a/SUP_Python_is_Dynamically_and_Strongly_Typed.ipynb +++ b/SUP_Python_is_Dynamically_and_Strongly_Typed.ipynb @@ -116,7 +116,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)\n", + "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)\n", "* [Why is Python a dynamic language and also a strongly typed language](https://wiki.python.org/moin/Why%20is%20Python%20a%20dynamic%20language%20and%20also%20a%20strongly%20typed%20language)" ] }, From 441206503f5113e92d7800043c28bfe212b7e898 Mon Sep 17 00:00:00 2001 From: giumas Date: Sun, 13 Mar 2022 22:56:47 +0100 Subject: [PATCH 07/11] updated python version --- 001_Variables_and_Types.ipynb | 4 +-- 003_Conditional_Execution.ipynb | 26 +++++++++---------- 004_Loops.ipynb | 6 ++--- 005_Write_Your_Own_Functions.ipynb | 12 ++++----- 006_Read_and_Write_Text_Files.ipynb | 10 +++---- 007_Dictionaries_and_Metadata.ipynb | 6 ++--- 008_A_Class_as_a_Data_Container.ipynb | 6 ++--- 009_Summing-Up.ipynb | 8 +++--- ...on_is_Dynamically_and_Strongly_Typed.ipynb | 2 +- congrats.ipynb | 2 +- empty.ipynb | 4 +-- index.ipynb | 2 +- requirements.txt | 2 +- 13 files changed, 45 insertions(+), 45 deletions(-) diff --git a/001_Variables_and_Types.ipynb b/001_Variables_and_Types.ipynb index 56832bc..1324ad0 100644 --- a/001_Variables_and_Types.ipynb +++ b/001_Variables_and_Types.ipynb @@ -213,7 +213,7 @@ "source": [ "\n", "\n", - "An extensive documentation explains the functions in the Python standard library. For instance, follow [this link](https://docs.python.org/3.6/library/functions.html?#type) to learn more about the `type()` function. " + "An extensive documentation explains the functions in the Python standard library. For instance, follow [this link](https://docs.python.org/3.9/library/functions.html?#type) to learn more about the `type()` function. " ] }, { @@ -562,7 +562,7 @@ "source": [ "\n", "\n", - "You can read more about operator precedence in the official [Python documentation](https://docs.python.org/3.6/reference/expressions.html#operator-precedence)." + "You can read more about operator precedence in the official [Python documentation](https://docs.python.org/3.9/reference/expressions.html#operator-precedence)." ] }, { diff --git a/003_Conditional_Execution.ipynb b/003_Conditional_Execution.ipynb index 504deb9..490fd4d 100644 --- a/003_Conditional_Execution.ipynb +++ b/003_Conditional_Execution.ipynb @@ -96,7 +96,7 @@ "source": [ "\n", "\n", - "A boolean expression usually has (at least) one **[relational operators](https://docs.python.org/3.6/reference/expressions.html?#value-comparisons)** that verifies a relation between two variables." + "A boolean expression usually has (at least) one **[relational operators](https://docs.python.org/3.9/reference/expressions.html?#value-comparisons)** that verifies a relation between two variables." ] }, { @@ -194,7 +194,7 @@ "source": [ "\n", "\n", - "It is possible to combine pairs of boolean expressions (**operands**) into a single one using **[logical operators](https://docs.python.org/3.6/reference/expressions.html?#boolean-operations)** such as `and` and `or`. " + "It is possible to combine pairs of boolean expressions (**operands**) into a single one using **[logical operators](https://docs.python.org/3.9/reference/expressions.html?#boolean-operations)** such as `and` and `or`. " ] }, { @@ -230,7 +230,7 @@ "source": [ "\n", "\n", - "When a statement contains multiple operators, Python follows a well-defined [order of precedence](https://docs.python.org/3.6/reference/expressions.html#operator-precedence)." + "When a statement contains multiple operators, Python follows a well-defined [order of precedence](https://docs.python.org/3.9/reference/expressions.html#operator-precedence)." ] }, { @@ -429,7 +429,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Conditional statements like [`if`](https://docs.python.org/3.6/reference/compound_stmts.html#the-if-statement), [`elif`](https://docs.python.org/3.6/reference/compound_stmts.html#the-if-statement), and [`else`](https://docs.python.org/3.6/reference/compound_stmts.html#the-if-statement) provide you with the ability to check whether specific conditions apply and change the behavior of your program accordingly." + "Conditional statements like [`if`](https://docs.python.org/3.9/reference/compound_stmts.html#the-if-statement), [`elif`](https://docs.python.org/3.9/reference/compound_stmts.html#the-if-statement), and [`else`](https://docs.python.org/3.9/reference/compound_stmts.html#the-if-statement) provide you with the ability to check whether specific conditions apply and change the behavior of your program accordingly." ] }, { @@ -480,7 +480,7 @@ "source": [ "\n", "\n", - "Proper [indentation](https://docs.python.org/3.6/reference/lexical_analysis.html#indentation) is a key requirement in Python." + "Proper [indentation](https://docs.python.org/3.9/reference/lexical_analysis.html#indentation) is a key requirement in Python." ] }, { @@ -789,13 +789,13 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)\n", - " * [The bool type](https://docs.python.org/3.6/library/functions.html?#bool)\n", - " * [Indentation](https://docs.python.org/3.6/reference/lexical_analysis.html#indentation)\n", - " * [Relational Operators](https://docs.python.org/3.6/reference/expressions.html?#value-comparisons)\n", - " * [Logical Operators](https://docs.python.org/3.6/reference/expressions.html?#boolean-operations)\n", - " * [Order of Precedence for Operators](https://docs.python.org/3.6/reference/expressions.html#operator-precedence)\n", - " * [The `if` statement](https://docs.python.org/3.6/reference/compound_stmts.html#the-if-statement)\n", + "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)\n", + " * [The bool type](https://docs.python.org/3.9/library/functions.html?#bool)\n", + " * [Indentation](https://docs.python.org/3.9/reference/lexical_analysis.html#indentation)\n", + " * [Relational Operators](https://docs.python.org/3.9/reference/expressions.html?#value-comparisons)\n", + " * [Logical Operators](https://docs.python.org/3.9/reference/expressions.html?#boolean-operations)\n", + " * [Order of Precedence for Operators](https://docs.python.org/3.9/reference/expressions.html#operator-precedence)\n", + " * [The `if` statement](https://docs.python.org/3.9/reference/compound_stmts.html#the-if-statement)\n", "* [Sediment Grain Size](https://en.wikipedia.org/wiki/Grain_size)" ] }, @@ -833,7 +833,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.7" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/004_Loops.ipynb b/004_Loops.ipynb index 2785e43..7ad7004 100644 --- a/004_Loops.ipynb +++ b/004_Loops.ipynb @@ -480,8 +480,8 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)\n", - " * [Lists](https://docs.python.org/3.6/library/stdtypes.html?highlight=list#lists)\n", + "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)\n", + " * [Lists](https://docs.python.org/3.9/library/stdtypes.html?highlight=list#lists)\n", "* [The Python Wiki](https://wiki.python.org/moin/FrontPage)\n", " * [For loops](https://wiki.python.org/moin/ForLoop)\n", " * [While loops](https://wiki.python.org/moin/WhileLoop)" @@ -521,7 +521,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.7" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/005_Write_Your_Own_Functions.ipynb b/005_Write_Your_Own_Functions.ipynb index 4f16532..8f4bc11 100644 --- a/005_Write_Your_Own_Functions.ipynb +++ b/005_Write_Your_Own_Functions.ipynb @@ -19,7 +19,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We have met (and used) several of the many [built-in functions](https://docs.python.org/3.6/library/functions.html) that are shipped with Python: [`print()`](000_Welcome_on_Board.ipynb#What-is-a-Code-cell?), [`type()`](001_Variables_and_Types.ipynb#Dynamic-Nature-of-a-Variable-Type), [`len()`](002_Lists_of_Variables.ipynb#Creation-of-a-List:-Approach-#1), [`dir()`](002_Lists_of_Variables.ipynb#List's-Methods)." + "We have met (and used) several of the many [built-in functions](https://docs.python.org/3.9/library/functions.html) that are shipped with Python: [`print()`](000_Welcome_on_Board.ipynb#What-is-a-Code-cell?), [`type()`](001_Variables_and_Types.ipynb#Dynamic-Nature-of-a-Variable-Type), [`len()`](002_Lists_of_Variables.ipynb#Creation-of-a-List:-Approach-#1), [`dir()`](002_Lists_of_Variables.ipynb#List's-Methods)." ] }, { @@ -421,7 +421,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "By default, a function provides back (**returns**) a special Python object: [`None`](https://docs.python.org/3.6/c-api/none.html?highlight=none#the-none-object)." + "By default, a function provides back (**returns**) a special Python object: [`None`](https://docs.python.org/3.9/c-api/none.html?highlight=none#the-none-object)." ] }, { @@ -717,9 +717,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)\n", - " * [Built-in functions](https://docs.python.org/3.6/library/functions.html)\n", - " * [None](https://docs.python.org/3.6/c-api/none.html?highlight=none#the-none-object)\n", + "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)\n", + " * [Built-in functions](https://docs.python.org/3.9/library/functions.html)\n", + " * [None](https://docs.python.org/3.9/c-api/none.html?highlight=none#the-none-object)\n", "* [Flattening](https://en.wikipedia.org/wiki/Flattening)" ] }, @@ -757,7 +757,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.7" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/006_Read_and_Write_Text_Files.ipynb b/006_Read_and_Write_Text_Files.ipynb index 50704a8..5e9d076 100644 --- a/006_Read_and_Write_Text_Files.ipynb +++ b/006_Read_and_Write_Text_Files.ipynb @@ -69,7 +69,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We will first introduce some file management capabilities of the `os.path` [Python module](https://docs.python.org/3.6/tutorial/modules.html#modules), then we will use the functions that Python provides for [reading and writing the content of a text file](https://docs.python.org/3.6/tutorial/inputoutput.html)." + "We will first introduce some file management capabilities of the `os.path` [Python module](https://docs.python.org/3.9/tutorial/modules.html#modules), then we will use the functions that Python provides for [reading and writing the content of a text file](https://docs.python.org/3.9/tutorial/inputoutput.html)." ] }, { @@ -193,7 +193,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "In case that the `data` sub-folder does not exist, we raise an error using the [`raise`](https://docs.python.org/3.6/tutorial/errors.html#raising-exceptions) keyword." + "In case that the `data` sub-folder does not exist, we raise an error using the [`raise`](https://docs.python.org/3.9/tutorial/errors.html#raising-exceptions) keyword." ] }, { @@ -235,7 +235,7 @@ "source": [ "\n", "\n", - "If you want to know more about error handing and exceptions, read [Errors and Exceptions](https://docs.python.org/3.6/tutorial/errors.html)." + "If you want to know more about error handing and exceptions, read [Errors and Exceptions](https://docs.python.org/3.9/tutorial/errors.html)." ] }, { @@ -291,7 +291,7 @@ "source": [ "\n", "\n", - "You do not need to remember all the names of the available Python functions, but you need to learn how to search for them. The [official Python documentation](https://docs.python.org/3.6/index.html) is a good place to start. You can also get a list of the functions in the `os.path` module by entering `dir(os.path)` in a code cell." + "You do not need to remember all the names of the available Python functions, but you need to learn how to search for them. The [official Python documentation](https://docs.python.org/3.9/index.html) is a good place to start. You can also get a list of the functions in the `os.path` module by entering `dir(os.path)` in a code cell." ] }, { @@ -349,7 +349,7 @@ "source": [ "\n", "\n", - "The Python `open()` function takes the name of the file (as a parameter) and returns a [file object](https://docs.python.org/3.6/glossary.html#term-file-object).
The `close()` function closes the open file." + "The Python `open()` function takes the name of the file (as a parameter) and returns a [file object](https://docs.python.org/3.9/glossary.html#term-file-object).
The `close()` function closes the open file." ] }, { diff --git a/007_Dictionaries_and_Metadata.ipynb b/007_Dictionaries_and_Metadata.ipynb index 53c4045..f951561 100644 --- a/007_Dictionaries_and_Metadata.ipynb +++ b/007_Dictionaries_and_Metadata.ipynb @@ -147,7 +147,7 @@ "source": [ "\n", "\n", - "A `dict` is an **unordered** container. The order of items insertion is not preserved. If you need to preserve the items order, Python provides a special dictionary called [`OrderedDict`](https://docs.python.org/3.6/library/collections.html?highlight=ordereddict#ordereddict-objects)." + "A `dict` is an **unordered** container. The order of items insertion is not preserved. If you need to preserve the items order, Python provides a special dictionary called [`OrderedDict`](https://docs.python.org/3.9/library/collections.html?highlight=ordereddict#ordereddict-objects)." ] }, { @@ -240,7 +240,7 @@ "source": [ "\n", "\n", - "In the table above, the *\"(almost) any type\"* for `dict` indexing is because the type must be [hashable](https://docs.python.org/3.6/glossary.html). For now you do not have to worry what this means as it is outside the scope of this notebook. If, however, you want to learn about the hash function go [here](https://en.wikipedia.org/wiki/Hash_function)." + "In the table above, the *\"(almost) any type\"* for `dict` indexing is because the type must be [hashable](https://docs.python.org/3.9/glossary.html). For now you do not have to worry what this means as it is outside the scope of this notebook. If, however, you want to learn about the hash function go [here](https://en.wikipedia.org/wiki/Hash_function)." ] }, { @@ -327,7 +327,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "This is the first time that we use the [`datetime`](https://docs.python.org/3.6/library/datetime.html?#module-datetime) type." + "This is the first time that we use the [`datetime`](https://docs.python.org/3.9/library/datetime.html?#module-datetime) type." ] }, { diff --git a/008_A_Class_as_a_Data_Container.ipynb b/008_A_Class_as_a_Data_Container.ipynb index 24eb6b1..a845a44 100644 --- a/008_A_Class_as_a_Data_Container.ipynb +++ b/008_A_Class_as_a_Data_Container.ipynb @@ -372,8 +372,8 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)\n", - " * [Classes](https://docs.python.org/3.6/tutorial/classes.html)\n", + "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)\n", + " * [Classes](https://docs.python.org/3.9/tutorial/classes.html)\n", "* [Foundations of Ocean Data Science](https://www.hydroffice.org/manuals/epom/foundations_of_ocean_data_science.html)" ] }, @@ -411,7 +411,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.7" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/009_Summing-Up.ipynb b/009_Summing-Up.ipynb index 94ae105..5ea52a8 100644 --- a/009_Summing-Up.ipynb +++ b/009_Summing-Up.ipynb @@ -190,7 +190,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "In the above code we use the [`str.split()`](https://docs.python.org/3.6/library/stdtypes.html?#str.split) method. \n", + "In the above code we use the [`str.split()`](https://docs.python.org/3.9/library/stdtypes.html?#str.split) method. \n", "\n", "This method returns a list of the words in a string by splitting it using a delimiter (e.g., `\":\"`) passed as a parameter. " ] @@ -256,7 +256,7 @@ "source": [ "The data are now **loaded in memory**. \n", "\n", - "We can check the success of this operation by printing depths and sound speed values. We will do this by accessing the values by index with the help of the [`range()`](https://docs.python.org/3.6/library/stdtypes.html?#range) type.\n", + "We can check the success of this operation by printing depths and sound speed values. We will do this by accessing the values by index with the help of the [`range()`](https://docs.python.org/3.9/library/stdtypes.html?#range) type.\n", "\n", "A `range()` with an integer value as single parameter represents a sequence of numbers ranging from 0 up to (but not including) the value passed as a parameter. In the code below, we use `range` with `10`:" ] @@ -317,7 +317,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)\n", + "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)\n", "* [CTD instrument](https://en.wikipedia.org/wiki/CTD_(instrument))" ] }, @@ -355,7 +355,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.7" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/SUP_Python_is_Dynamically_and_Strongly_Typed.ipynb b/SUP_Python_is_Dynamically_and_Strongly_Typed.ipynb index b725edf..1693b66 100644 --- a/SUP_Python_is_Dynamically_and_Strongly_Typed.ipynb +++ b/SUP_Python_is_Dynamically_and_Strongly_Typed.ipynb @@ -154,7 +154,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.7" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/congrats.ipynb b/congrats.ipynb index b8068f5..d17c541 100644 --- a/congrats.ipynb +++ b/congrats.ipynb @@ -81,7 +81,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.7" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/empty.ipynb b/empty.ipynb index 4c1c4e5..8a6cb58 100644 --- a/empty.ipynb +++ b/empty.ipynb @@ -81,7 +81,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)" + "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)" ] }, { @@ -118,7 +118,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.7" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/index.ipynb b/index.ipynb index deae9d8..c5293a5 100644 --- a/index.ipynb +++ b/index.ipynb @@ -139,7 +139,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.7" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/requirements.txt b/requirements.txt index 50b32ba..ff58348 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,6 +3,6 @@ gdal jupyterhub numpy -python=3.6.5 +python=3.9.5 matplotlib nbgitpuller From ebce4184db81b12dad97399340a1a2c710c49cc0 Mon Sep 17 00:00:00 2001 From: giumas Date: Sun, 13 Mar 2022 22:56:47 +0100 Subject: [PATCH 08/11] updated python version --- 000_Welcome_on_Board.ipynb | 2 +- 001_Variables_and_Types.ipynb | 16 ++++++------ 002_Lists_of_Variables.ipynb | 16 ++++++------ 003_Conditional_Execution.ipynb | 26 +++++++++---------- 004_Loops.ipynb | 6 ++--- 005_Write_Your_Own_Functions.ipynb | 12 ++++----- 006_Read_and_Write_Text_Files.ipynb | 20 +++++++------- 007_Dictionaries_and_Metadata.ipynb | 26 +++++++++---------- 008_A_Class_as_a_Data_Container.ipynb | 6 ++--- 009_Summing-Up.ipynb | 8 +++--- ...on_is_Dynamically_and_Strongly_Typed.ipynb | 2 +- congrats.ipynb | 2 +- empty.ipynb | 4 +-- index.ipynb | 2 +- requirements.txt | 2 +- 15 files changed, 75 insertions(+), 75 deletions(-) diff --git a/000_Welcome_on_Board.ipynb b/000_Welcome_on_Board.ipynb index ed82c2a..66e22f7 100644 --- a/000_Welcome_on_Board.ipynb +++ b/000_Welcome_on_Board.ipynb @@ -803,7 +803,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.7" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/001_Variables_and_Types.ipynb b/001_Variables_and_Types.ipynb index 56832bc..3adf6cc 100644 --- a/001_Variables_and_Types.ipynb +++ b/001_Variables_and_Types.ipynb @@ -213,7 +213,7 @@ "source": [ "\n", "\n", - "An extensive documentation explains the functions in the Python standard library. For instance, follow [this link](https://docs.python.org/3.6/library/functions.html?#type) to learn more about the `type()` function. " + "An extensive documentation explains the functions in the Python standard library. For instance, follow [this link](https://docs.python.org/3.9/library/functions.html?#type) to learn more about the `type()` function. " ] }, { @@ -562,7 +562,7 @@ "source": [ "\n", "\n", - "You can read more about operator precedence in the official [Python documentation](https://docs.python.org/3.6/reference/expressions.html#operator-precedence)." + "You can read more about operator precedence in the official [Python documentation](https://docs.python.org/3.9/reference/expressions.html#operator-precedence)." ] }, { @@ -857,7 +857,7 @@ "source": [ "\n", "\n", - "Create a `cur_year` variable of type `int`. Use `cur_year` to create a string variable, then display: `The current year is 2019`." + "Create a `cur_year` variable of type `int`. Use `cur_year` to create a string variable, then display: `The current year is 2022`." ] }, { @@ -868,7 +868,7 @@ }, "outputs": [], "source": [ - "cur_year = 2019\n", + "cur_year = 2022\n", "cur_year_str = \"The current year is \" + str(cur_year)\n", "print(cur_year_str)" ] @@ -1019,9 +1019,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)\n", - " * [Python Built-in Types](https://docs.python.org/3.6/library/stdtypes.html)\n", - " * [Order of Precedence for Operators](https://docs.python.org/3.6/reference/expressions.html#operator-precedence)\n", + "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)\n", + " * [Python Built-in Types](https://docs.python.org/3.9/library/stdtypes.html)\n", + " * [Order of Precedence for Operators](https://docs.python.org/3.9/reference/expressions.html#operator-precedence)\n", "* [Euclidean division](https://en.wikipedia.org/wiki/Euclidean_division)\n", "* [PEMDAS mathematical convention](https://en.wikipedia.org/wiki/Order_of_operations)" ] @@ -1060,7 +1060,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.7" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/002_Lists_of_Variables.ipynb b/002_Lists_of_Variables.ipynb index 30627ed..1f4d155 100644 --- a/002_Lists_of_Variables.ipynb +++ b/002_Lists_of_Variables.ipynb @@ -607,7 +607,7 @@ "source": [ "\n", "\n", - "The [`dir()`](https://docs.python.org/3.6/library/functions.html#dir) function can be used to explore the methods available for a variable." + "The [`dir()`](https://docs.python.org/3.9/library/functions.html#dir) function can be used to explore the methods available for a variable." ] }, { @@ -764,8 +764,8 @@ "source": [ "\n", "\n", - "A `list` implements all of the so-called [*common*](https://docs.python.org/3.6/library/stdtypes.html?#typesseq-common) and [*mutable sequence operations*](https://docs.python.org/3.6/library/stdtypes.html?#mutable-sequence-types).\n", - "If you are curious to know more about the methods available for a `list`, look at this [section](https://docs.python.org/3.6/library/stdtypes.html?highlight=list#lists) of the official Python documentation." + "A `list` implements all of the so-called [*common*](https://docs.python.org/3.9/library/stdtypes.html?#typesseq-common) and [*mutable sequence operations*](https://docs.python.org/3.9/library/stdtypes.html?#mutable-sequence-types).\n", + "If you are curious to know more about the methods available for a `list`, look at this [section](https://docs.python.org/3.9/library/stdtypes.html?highlight=list#lists) of the official Python documentation." ] }, { @@ -788,10 +788,10 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)\n", - " * [Common Sequence Operations](https://docs.python.org/3.6/library/stdtypes.html?#typesseq-common)\n", - " * [Mutable Sequence Operations](https://docs.python.org/3.6/library/stdtypes.html?#mutable-sequence-types)\n", - " * [Lists](https://docs.python.org/3.6/library/stdtypes.html?highlight=list#lists)\n", + "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)\n", + " * [Common Sequence Operations](https://docs.python.org/3.9/library/stdtypes.html?#typesseq-common)\n", + " * [Mutable Sequence Operations](https://docs.python.org/3.9/library/stdtypes.html?#mutable-sequence-types)\n", + " * [Lists](https://docs.python.org/3.9/library/stdtypes.html?highlight=list#lists)\n", "* [Zero-based numbering](https://en.wikipedia.org/wiki/Zero-based_numbering)" ] }, @@ -829,7 +829,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.7" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/003_Conditional_Execution.ipynb b/003_Conditional_Execution.ipynb index 504deb9..490fd4d 100644 --- a/003_Conditional_Execution.ipynb +++ b/003_Conditional_Execution.ipynb @@ -96,7 +96,7 @@ "source": [ "\n", "\n", - "A boolean expression usually has (at least) one **[relational operators](https://docs.python.org/3.6/reference/expressions.html?#value-comparisons)** that verifies a relation between two variables." + "A boolean expression usually has (at least) one **[relational operators](https://docs.python.org/3.9/reference/expressions.html?#value-comparisons)** that verifies a relation between two variables." ] }, { @@ -194,7 +194,7 @@ "source": [ "\n", "\n", - "It is possible to combine pairs of boolean expressions (**operands**) into a single one using **[logical operators](https://docs.python.org/3.6/reference/expressions.html?#boolean-operations)** such as `and` and `or`. " + "It is possible to combine pairs of boolean expressions (**operands**) into a single one using **[logical operators](https://docs.python.org/3.9/reference/expressions.html?#boolean-operations)** such as `and` and `or`. " ] }, { @@ -230,7 +230,7 @@ "source": [ "\n", "\n", - "When a statement contains multiple operators, Python follows a well-defined [order of precedence](https://docs.python.org/3.6/reference/expressions.html#operator-precedence)." + "When a statement contains multiple operators, Python follows a well-defined [order of precedence](https://docs.python.org/3.9/reference/expressions.html#operator-precedence)." ] }, { @@ -429,7 +429,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Conditional statements like [`if`](https://docs.python.org/3.6/reference/compound_stmts.html#the-if-statement), [`elif`](https://docs.python.org/3.6/reference/compound_stmts.html#the-if-statement), and [`else`](https://docs.python.org/3.6/reference/compound_stmts.html#the-if-statement) provide you with the ability to check whether specific conditions apply and change the behavior of your program accordingly." + "Conditional statements like [`if`](https://docs.python.org/3.9/reference/compound_stmts.html#the-if-statement), [`elif`](https://docs.python.org/3.9/reference/compound_stmts.html#the-if-statement), and [`else`](https://docs.python.org/3.9/reference/compound_stmts.html#the-if-statement) provide you with the ability to check whether specific conditions apply and change the behavior of your program accordingly." ] }, { @@ -480,7 +480,7 @@ "source": [ "\n", "\n", - "Proper [indentation](https://docs.python.org/3.6/reference/lexical_analysis.html#indentation) is a key requirement in Python." + "Proper [indentation](https://docs.python.org/3.9/reference/lexical_analysis.html#indentation) is a key requirement in Python." ] }, { @@ -789,13 +789,13 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)\n", - " * [The bool type](https://docs.python.org/3.6/library/functions.html?#bool)\n", - " * [Indentation](https://docs.python.org/3.6/reference/lexical_analysis.html#indentation)\n", - " * [Relational Operators](https://docs.python.org/3.6/reference/expressions.html?#value-comparisons)\n", - " * [Logical Operators](https://docs.python.org/3.6/reference/expressions.html?#boolean-operations)\n", - " * [Order of Precedence for Operators](https://docs.python.org/3.6/reference/expressions.html#operator-precedence)\n", - " * [The `if` statement](https://docs.python.org/3.6/reference/compound_stmts.html#the-if-statement)\n", + "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)\n", + " * [The bool type](https://docs.python.org/3.9/library/functions.html?#bool)\n", + " * [Indentation](https://docs.python.org/3.9/reference/lexical_analysis.html#indentation)\n", + " * [Relational Operators](https://docs.python.org/3.9/reference/expressions.html?#value-comparisons)\n", + " * [Logical Operators](https://docs.python.org/3.9/reference/expressions.html?#boolean-operations)\n", + " * [Order of Precedence for Operators](https://docs.python.org/3.9/reference/expressions.html#operator-precedence)\n", + " * [The `if` statement](https://docs.python.org/3.9/reference/compound_stmts.html#the-if-statement)\n", "* [Sediment Grain Size](https://en.wikipedia.org/wiki/Grain_size)" ] }, @@ -833,7 +833,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.7" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/004_Loops.ipynb b/004_Loops.ipynb index 2785e43..7ad7004 100644 --- a/004_Loops.ipynb +++ b/004_Loops.ipynb @@ -480,8 +480,8 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)\n", - " * [Lists](https://docs.python.org/3.6/library/stdtypes.html?highlight=list#lists)\n", + "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)\n", + " * [Lists](https://docs.python.org/3.9/library/stdtypes.html?highlight=list#lists)\n", "* [The Python Wiki](https://wiki.python.org/moin/FrontPage)\n", " * [For loops](https://wiki.python.org/moin/ForLoop)\n", " * [While loops](https://wiki.python.org/moin/WhileLoop)" @@ -521,7 +521,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.7" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/005_Write_Your_Own_Functions.ipynb b/005_Write_Your_Own_Functions.ipynb index 4f16532..8f4bc11 100644 --- a/005_Write_Your_Own_Functions.ipynb +++ b/005_Write_Your_Own_Functions.ipynb @@ -19,7 +19,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We have met (and used) several of the many [built-in functions](https://docs.python.org/3.6/library/functions.html) that are shipped with Python: [`print()`](000_Welcome_on_Board.ipynb#What-is-a-Code-cell?), [`type()`](001_Variables_and_Types.ipynb#Dynamic-Nature-of-a-Variable-Type), [`len()`](002_Lists_of_Variables.ipynb#Creation-of-a-List:-Approach-#1), [`dir()`](002_Lists_of_Variables.ipynb#List's-Methods)." + "We have met (and used) several of the many [built-in functions](https://docs.python.org/3.9/library/functions.html) that are shipped with Python: [`print()`](000_Welcome_on_Board.ipynb#What-is-a-Code-cell?), [`type()`](001_Variables_and_Types.ipynb#Dynamic-Nature-of-a-Variable-Type), [`len()`](002_Lists_of_Variables.ipynb#Creation-of-a-List:-Approach-#1), [`dir()`](002_Lists_of_Variables.ipynb#List's-Methods)." ] }, { @@ -421,7 +421,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "By default, a function provides back (**returns**) a special Python object: [`None`](https://docs.python.org/3.6/c-api/none.html?highlight=none#the-none-object)." + "By default, a function provides back (**returns**) a special Python object: [`None`](https://docs.python.org/3.9/c-api/none.html?highlight=none#the-none-object)." ] }, { @@ -717,9 +717,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)\n", - " * [Built-in functions](https://docs.python.org/3.6/library/functions.html)\n", - " * [None](https://docs.python.org/3.6/c-api/none.html?highlight=none#the-none-object)\n", + "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)\n", + " * [Built-in functions](https://docs.python.org/3.9/library/functions.html)\n", + " * [None](https://docs.python.org/3.9/c-api/none.html?highlight=none#the-none-object)\n", "* [Flattening](https://en.wikipedia.org/wiki/Flattening)" ] }, @@ -757,7 +757,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.7" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/006_Read_and_Write_Text_Files.ipynb b/006_Read_and_Write_Text_Files.ipynb index 50704a8..e587c79 100644 --- a/006_Read_and_Write_Text_Files.ipynb +++ b/006_Read_and_Write_Text_Files.ipynb @@ -69,7 +69,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We will first introduce some file management capabilities of the `os.path` [Python module](https://docs.python.org/3.6/tutorial/modules.html#modules), then we will use the functions that Python provides for [reading and writing the content of a text file](https://docs.python.org/3.6/tutorial/inputoutput.html)." + "We will first introduce some file management capabilities of the `os.path` [Python module](https://docs.python.org/3.9/tutorial/modules.html#modules), then we will use the functions that Python provides for [reading and writing the content of a text file](https://docs.python.org/3.9/tutorial/inputoutput.html)." ] }, { @@ -193,7 +193,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "In case that the `data` sub-folder does not exist, we raise an error using the [`raise`](https://docs.python.org/3.6/tutorial/errors.html#raising-exceptions) keyword." + "In case that the `data` sub-folder does not exist, we raise an error using the [`raise`](https://docs.python.org/3.9/tutorial/errors.html#raising-exceptions) keyword." ] }, { @@ -235,7 +235,7 @@ "source": [ "\n", "\n", - "If you want to know more about error handing and exceptions, read [Errors and Exceptions](https://docs.python.org/3.6/tutorial/errors.html)." + "If you want to know more about error handing and exceptions, read [Errors and Exceptions](https://docs.python.org/3.9/tutorial/errors.html)." ] }, { @@ -291,7 +291,7 @@ "source": [ "\n", "\n", - "You do not need to remember all the names of the available Python functions, but you need to learn how to search for them. The [official Python documentation](https://docs.python.org/3.6/index.html) is a good place to start. You can also get a list of the functions in the `os.path` module by entering `dir(os.path)` in a code cell." + "You do not need to remember all the names of the available Python functions, but you need to learn how to search for them. The [official Python documentation](https://docs.python.org/3.9/index.html) is a good place to start. You can also get a list of the functions in the `os.path` module by entering `dir(os.path)` in a code cell." ] }, { @@ -349,7 +349,7 @@ "source": [ "\n", "\n", - "The Python `open()` function takes the name of the file (as a parameter) and returns a [file object](https://docs.python.org/3.6/glossary.html#term-file-object).
The `close()` function closes the open file." + "The Python `open()` function takes the name of the file (as a parameter) and returns a [file object](https://docs.python.org/3.9/glossary.html#term-file-object).
The `close()` function closes the open file." ] }, { @@ -620,7 +620,7 @@ "source": [ "\n", "\n", - "You may learn about other modes for opening a file from the official [Python documentation](https://docs.python.org/3.6/library/functions.html?#open)." + "You may learn about other modes for opening a file from the official [Python documentation](https://docs.python.org/3.9/library/functions.html?#open)." ] }, { @@ -737,9 +737,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)\n", - " * [The os module](https://docs.python.org/3.6/library/os.html)\n", - " * [Input and Output](https://docs.python.org/3.6/tutorial/inputoutput.html)\n", + "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)\n", + " * [The os module](https://docs.python.org/3.9/library/os.html)\n", + " * [Input and Output](https://docs.python.org/3.9/tutorial/inputoutput.html)\n", "* [Cross-platform software](https://en.wikipedia.org/wiki/Cross-platform_software)\n", "* [Computer file](https://en.wikipedia.org/wiki/Computer_file)\n", " * [Text file](https://en.wikipedia.org/wiki/Text_file)\n", @@ -782,7 +782,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.7" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/007_Dictionaries_and_Metadata.ipynb b/007_Dictionaries_and_Metadata.ipynb index 53c4045..28b22ea 100644 --- a/007_Dictionaries_and_Metadata.ipynb +++ b/007_Dictionaries_and_Metadata.ipynb @@ -147,7 +147,7 @@ "source": [ "\n", "\n", - "A `dict` is an **unordered** container. The order of items insertion is not preserved. If you need to preserve the items order, Python provides a special dictionary called [`OrderedDict`](https://docs.python.org/3.6/library/collections.html?highlight=ordereddict#ordereddict-objects)." + "A `dict` is an **unordered** container. The order of items insertion is not preserved. If you need to preserve the items order, Python provides a special dictionary called [`OrderedDict`](https://docs.python.org/3.9/library/collections.html?highlight=ordereddict#ordereddict-objects)." ] }, { @@ -240,7 +240,7 @@ "source": [ "\n", "\n", - "In the table above, the *\"(almost) any type\"* for `dict` indexing is because the type must be [hashable](https://docs.python.org/3.6/glossary.html). For now you do not have to worry what this means as it is outside the scope of this notebook. If, however, you want to learn about the hash function go [here](https://en.wikipedia.org/wiki/Hash_function)." + "In the table above, the *\"(almost) any type\"* for `dict` indexing is because the type must be [hashable](https://docs.python.org/3.9/glossary.html). For now you do not have to worry what this means as it is outside the scope of this notebook. If, however, you want to learn about the hash function go [here](https://en.wikipedia.org/wiki/Hash_function)." ] }, { @@ -327,7 +327,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "This is the first time that we use the [`datetime`](https://docs.python.org/3.6/library/datetime.html?#module-datetime) type." + "This is the first time that we use the [`datetime`](https://docs.python.org/3.9/library/datetime.html?#module-datetime) type." ] }, { @@ -352,7 +352,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The `datetime` constructor is part of the `datetime` module (they have the same name; see the [Python documentation](https://docs.python.org/3.6/library/datetime.html?#datetime-objects)) It takes several parameters: \n", + "The `datetime` constructor is part of the `datetime` module (they have the same name; see the [Python documentation](https://docs.python.org/3.9/library/datetime.html?#datetime-objects)) It takes several parameters: \n", "\n", "- `datetime(year, month, day, hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0)` \n", "\n", @@ -558,7 +558,7 @@ "source": [ "\n", "\n", - "In the above code, the values inside the rounded brackets after the `%` operator create a so-called [`tuple`](https://docs.python.org/3.6/library/stdtypes.html?#tuples).
\n", + "In the above code, the values inside the rounded brackets after the `%` operator create a so-called [`tuple`](https://docs.python.org/3.9/library/stdtypes.html?#tuples).
\n", "A `tuple` is a Python container similar to a list except that you cannot modify the content after creation (an **immutable sequence**)." ] }, @@ -566,7 +566,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "String formatting using the `%` operator provides [additional printing options](https://docs.python.org/3.6/library/stdtypes.html#printf-style-string-formatting). One of these options is to define how many decimal digits to print for a `float` value. \n", + "String formatting using the `%` operator provides [additional printing options](https://docs.python.org/3.9/library/stdtypes.html#printf-style-string-formatting). One of these options is to define how many decimal digits to print for a `float` value. \n", "\n", "For instance, by using `%.4f` as a placeholder, Python will print **only** the first four decimal digits: " ] @@ -647,12 +647,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)\n", - " * [Glossary](https://docs.python.org/3.6/glossary.html)\n", - " * [Mapping Types - dict](https://docs.python.org/3.6/library/stdtypes.html#mapping-types-dict)\n", - " * [Collections - OrderedDict](https://docs.python.org/3.6/library/collections.html?highlight=ordereddict#ordereddict-objects)\n", - " * [`datetime`](https://docs.python.org/3.6/library/datetime.html?#module-datetime) \n", - " * [`tuple`](https://docs.python.org/3.6/library/stdtypes.html?#tuples)\n", + "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)\n", + " * [Glossary](https://docs.python.org/3.9/glossary.html)\n", + " * [Mapping Types - dict](https://docs.python.org/3.9/library/stdtypes.html#mapping-types-dict)\n", + " * [Collections - OrderedDict](https://docs.python.org/3.9/library/collections.html?highlight=ordereddict#ordereddict-objects)\n", + " * [`datetime`](https://docs.python.org/3.9/library/datetime.html?#module-datetime) \n", + " * [`tuple`](https://docs.python.org/3.9/library/stdtypes.html?#tuples)\n", "* [Hash function](https://en.wikipedia.org/wiki/Hash_function)\n", "* [Metadata](https://en.wikipedia.org/wiki/Metadata)" ] @@ -691,7 +691,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.7" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/008_A_Class_as_a_Data_Container.ipynb b/008_A_Class_as_a_Data_Container.ipynb index 24eb6b1..a845a44 100644 --- a/008_A_Class_as_a_Data_Container.ipynb +++ b/008_A_Class_as_a_Data_Container.ipynb @@ -372,8 +372,8 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)\n", - " * [Classes](https://docs.python.org/3.6/tutorial/classes.html)\n", + "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)\n", + " * [Classes](https://docs.python.org/3.9/tutorial/classes.html)\n", "* [Foundations of Ocean Data Science](https://www.hydroffice.org/manuals/epom/foundations_of_ocean_data_science.html)" ] }, @@ -411,7 +411,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.7" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/009_Summing-Up.ipynb b/009_Summing-Up.ipynb index 94ae105..5ea52a8 100644 --- a/009_Summing-Up.ipynb +++ b/009_Summing-Up.ipynb @@ -190,7 +190,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "In the above code we use the [`str.split()`](https://docs.python.org/3.6/library/stdtypes.html?#str.split) method. \n", + "In the above code we use the [`str.split()`](https://docs.python.org/3.9/library/stdtypes.html?#str.split) method. \n", "\n", "This method returns a list of the words in a string by splitting it using a delimiter (e.g., `\":\"`) passed as a parameter. " ] @@ -256,7 +256,7 @@ "source": [ "The data are now **loaded in memory**. \n", "\n", - "We can check the success of this operation by printing depths and sound speed values. We will do this by accessing the values by index with the help of the [`range()`](https://docs.python.org/3.6/library/stdtypes.html?#range) type.\n", + "We can check the success of this operation by printing depths and sound speed values. We will do this by accessing the values by index with the help of the [`range()`](https://docs.python.org/3.9/library/stdtypes.html?#range) type.\n", "\n", "A `range()` with an integer value as single parameter represents a sequence of numbers ranging from 0 up to (but not including) the value passed as a parameter. In the code below, we use `range` with `10`:" ] @@ -317,7 +317,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)\n", + "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)\n", "* [CTD instrument](https://en.wikipedia.org/wiki/CTD_(instrument))" ] }, @@ -355,7 +355,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.7" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/SUP_Python_is_Dynamically_and_Strongly_Typed.ipynb b/SUP_Python_is_Dynamically_and_Strongly_Typed.ipynb index b725edf..1693b66 100644 --- a/SUP_Python_is_Dynamically_and_Strongly_Typed.ipynb +++ b/SUP_Python_is_Dynamically_and_Strongly_Typed.ipynb @@ -154,7 +154,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.7" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/congrats.ipynb b/congrats.ipynb index b8068f5..d17c541 100644 --- a/congrats.ipynb +++ b/congrats.ipynb @@ -81,7 +81,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.7" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/empty.ipynb b/empty.ipynb index 4c1c4e5..8a6cb58 100644 --- a/empty.ipynb +++ b/empty.ipynb @@ -81,7 +81,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)" + "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)" ] }, { @@ -118,7 +118,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.7" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/index.ipynb b/index.ipynb index deae9d8..c5293a5 100644 --- a/index.ipynb +++ b/index.ipynb @@ -139,7 +139,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.7" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/requirements.txt b/requirements.txt index 50b32ba..ff58348 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,6 +3,6 @@ gdal jupyterhub numpy -python=3.6.5 +python=3.9.5 matplotlib nbgitpuller From 25b8b4ebed17301779a90ac7d2f90a01e856e6d2 Mon Sep 17 00:00:00 2001 From: giumas Date: Thu, 17 Mar 2022 22:43:47 +0100 Subject: [PATCH 09/11] updated year in example --- 007_Dictionaries_and_Metadata.ipynb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/007_Dictionaries_and_Metadata.ipynb b/007_Dictionaries_and_Metadata.ipynb index 28b22ea..69d81be 100644 --- a/007_Dictionaries_and_Metadata.ipynb +++ b/007_Dictionaries_and_Metadata.ipynb @@ -374,7 +374,7 @@ "source": [ "from datetime import datetime # imports only the datetime constructor from the datetime module\n", "\n", - "example_timestamp = datetime(2019, 2, 22, 12, 32, 40)\n", + "example_timestamp = datetime(2022, 2, 22, 12, 32, 40)\n", "print(str(example_timestamp))" ] }, @@ -396,8 +396,8 @@ "metadata[\"last_name\"] = \"Doe\"\n", "metadata[\"latitude\"] = 43.135555\n", "metadata[\"longitude\"] = -70.939534\n", - "metadata[\"start_timestamp\"] = datetime(2019, 2, 22, 12, 32, 40)\n", - "metadata[\"end_timestamp\"] = datetime(2019, 2, 22, 12, 34, 14)\n", + "metadata[\"start_timestamp\"] = datetime(2022, 2, 22, 12, 32, 40)\n", + "metadata[\"end_timestamp\"] = datetime(2022, 2, 22, 12, 34, 14)\n", "\n", "print(metadata)" ] @@ -431,8 +431,8 @@ "source": [ "metadata = dict()\n", "metadata[\"username\"] = \"jdoe\"\n", - "metadata[\"begin_time\"] = datetime(2019, 2, 22, 12, 34, 20)\n", - "metadata[\"end_time\"] = datetime(2019, 2, 22, 12, 34, 21)\n", + "metadata[\"begin_time\"] = datetime(2022, 2, 22, 12, 34, 20)\n", + "metadata[\"end_time\"] = datetime(2022, 2, 22, 12, 34, 21)\n", "\n", "print(metadata)" ] @@ -500,7 +500,7 @@ "metadata = dict()\n", "metadata[\"latitude\"] = 43.135555\n", "metadata[\"longitude\"] = -70.939534\n", - "metadata[\"start_timestamp\"] = datetime(2019, 2, 22, 12, 32, 40)\n", + "metadata[\"start_timestamp\"] = datetime(2022, 2, 22, 12, 32, 40)\n", "\n", "print(\"The position is: \" + str(metadata[\"latitude\"]) + \", \" + str(metadata[\"longitude\"]))\n", "print(\"Start time: \" + str(metadata[\"start_timestamp\"]))" @@ -536,7 +536,7 @@ "metadata = dict()\n", "metadata[\"latitude\"] = 43.135558\n", "metadata[\"longitude\"] = -70.939534\n", - "metadata[\"start_timestamp\"] = datetime(2019, 2, 22, 12, 32, 40)\n", + "metadata[\"start_timestamp\"] = datetime(2022, 2, 22, 12, 32, 40)\n", "\n", "print(\"The position is: %s, %s\" % (metadata[\"latitude\"], metadata[\"longitude\"]))\n", "print(\"Start time: %s\" % (metadata[\"start_timestamp\"]))" From 78a2d8fbfd3d3ded8d68d61ed0307106295ab60b Mon Sep 17 00:00:00 2001 From: giumas Date: Mon, 21 Mar 2022 20:12:35 +0100 Subject: [PATCH 10/11] removed piazza urls --- 000_Welcome_on_Board.ipynb | 70 +------------------ 001_Variables_and_Types.ipynb | 3 +- 002_Lists_of_Variables.ipynb | 3 +- 003_Conditional_Execution.ipynb | 3 +- 004_Loops.ipynb | 3 +- 005_Write_Your_Own_Functions.ipynb | 3 +- 006_Read_and_Write_Text_Files.ipynb | 3 +- 007_Dictionaries_and_Metadata.ipynb | 3 +- 008_A_Class_as_a_Data_Container.ipynb | 3 +- 009_Summing-Up.ipynb | 3 +- ...on_is_Dynamically_and_Strongly_Typed.ipynb | 3 +- congrats.ipynb | 2 +- empty.ipynb | 3 +- index.ipynb | 4 +- 14 files changed, 15 insertions(+), 94 deletions(-) diff --git a/000_Welcome_on_Board.ipynb b/000_Welcome_on_Board.ipynb index 66e22f7..843b766 100644 --- a/000_Welcome_on_Board.ipynb +++ b/000_Welcome_on_Board.ipynb @@ -11,7 +11,6 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "\"ePOM\"\n", "# Welcome on Board!" ] }, @@ -658,73 +657,6 @@ "* The next notebook (when available)." ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "***" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Questions or Comments?" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "These notebooks have a virtual gathering place on [Piazza.com](https://piazza.com/class/js5dnu0q39n6qe) where you can ask (but also answer!) questions to instructors and fellow students." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\"Piazza.com\\\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n", - "\n", - "A red megaphone at the top-right corner of each notebook provides a link to [Piazza.com](https://piazza.com/class/js5dnu0q39n6qe). " - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "You can learn more about Piazza.com by watching [this video](https://www.youtube.com/watch?v=2jLSiN8E18w)." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "If you click on this [Piazza.com](https://piazza.com/class/js5dnu0q39n6qe) link, you can register yourself as a student to access the virtual gathering place.\n", - "\n", - "Once registered, what about introducing yourself to the community?" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "solution2": "hidden", - "solution2_first": true - }, - "source": [ - "\n", - "\n", - "Add a note containing your self-introduction in the \"community\" folder on [Piazza.com](https://piazza.com/class/js5dnu0q39n6qe). The following image shows how to do it in eight steps. Feel free to customize the text in the note as you prefer!\n", - "

\n", - "![Seven steps for a self-introduction note](images/000_250_eight_steps.png)" - ] - }, { "cell_type": "markdown", "metadata": { @@ -803,7 +735,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.7" + "version": "3.6.7" } }, "nbformat": 4, diff --git a/001_Variables_and_Types.ipynb b/001_Variables_and_Types.ipynb index 3adf6cc..373db70 100644 --- a/001_Variables_and_Types.ipynb +++ b/001_Variables_and_Types.ipynb @@ -11,7 +11,6 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "\"ePOM\"\n", "# Variables and Types" ] }, @@ -1060,7 +1059,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.7" + "version": "3.6.7" } }, "nbformat": 4, diff --git a/002_Lists_of_Variables.ipynb b/002_Lists_of_Variables.ipynb index 1f4d155..208a477 100644 --- a/002_Lists_of_Variables.ipynb +++ b/002_Lists_of_Variables.ipynb @@ -11,7 +11,6 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "\"ePOM\"\n", "# Lists of Variables" ] }, @@ -829,7 +828,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.7" + "version": "3.6.7" } }, "nbformat": 4, diff --git a/003_Conditional_Execution.ipynb b/003_Conditional_Execution.ipynb index 490fd4d..2662dce 100644 --- a/003_Conditional_Execution.ipynb +++ b/003_Conditional_Execution.ipynb @@ -11,7 +11,6 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "\"ePOM\"\n", "# Conditional Execution" ] }, @@ -833,7 +832,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.7" + "version": "3.6.7" } }, "nbformat": 4, diff --git a/004_Loops.ipynb b/004_Loops.ipynb index 7ad7004..d7ffa24 100644 --- a/004_Loops.ipynb +++ b/004_Loops.ipynb @@ -11,7 +11,6 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "\"ePOM\"\n", "# Loops" ] }, @@ -521,7 +520,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.7" + "version": "3.6.7" } }, "nbformat": 4, diff --git a/005_Write_Your_Own_Functions.ipynb b/005_Write_Your_Own_Functions.ipynb index 8f4bc11..d95805c 100644 --- a/005_Write_Your_Own_Functions.ipynb +++ b/005_Write_Your_Own_Functions.ipynb @@ -11,7 +11,6 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "\"ePOM\"\n", "# Functions" ] }, @@ -757,7 +756,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.7" + "version": "3.6.7" } }, "nbformat": 4, diff --git a/006_Read_and_Write_Text_Files.ipynb b/006_Read_and_Write_Text_Files.ipynb index e587c79..2c82ad2 100644 --- a/006_Read_and_Write_Text_Files.ipynb +++ b/006_Read_and_Write_Text_Files.ipynb @@ -11,7 +11,6 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "\"ePOM\"\n", "# Read and Write Text Files" ] }, @@ -782,7 +781,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.7" + "version": "3.6.7" } }, "nbformat": 4, diff --git a/007_Dictionaries_and_Metadata.ipynb b/007_Dictionaries_and_Metadata.ipynb index 69d81be..6292146 100644 --- a/007_Dictionaries_and_Metadata.ipynb +++ b/007_Dictionaries_and_Metadata.ipynb @@ -11,7 +11,6 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "\"ePOM\"\n", "# Dictionaries" ] }, @@ -691,7 +690,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.7" + "version": "3.6.7" } }, "nbformat": 4, diff --git a/008_A_Class_as_a_Data_Container.ipynb b/008_A_Class_as_a_Data_Container.ipynb index a845a44..133493f 100644 --- a/008_A_Class_as_a_Data_Container.ipynb +++ b/008_A_Class_as_a_Data_Container.ipynb @@ -11,7 +11,6 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "\"ePOM\"\n", "# A Class as a Data Container" ] }, @@ -411,7 +410,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.7" + "version": "3.6.7" } }, "nbformat": 4, diff --git a/009_Summing-Up.ipynb b/009_Summing-Up.ipynb index 5ea52a8..9c6ac2a 100644 --- a/009_Summing-Up.ipynb +++ b/009_Summing-Up.ipynb @@ -11,7 +11,6 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "\"ePOM\"\n", "# Summing-Up" ] }, @@ -355,7 +354,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.7" + "version": "3.6.7" } }, "nbformat": 4, diff --git a/SUP_Python_is_Dynamically_and_Strongly_Typed.ipynb b/SUP_Python_is_Dynamically_and_Strongly_Typed.ipynb index 1693b66..3c6934d 100644 --- a/SUP_Python_is_Dynamically_and_Strongly_Typed.ipynb +++ b/SUP_Python_is_Dynamically_and_Strongly_Typed.ipynb @@ -11,7 +11,6 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "\"ePOM\"\n", "# Python is Dynamically and Strongly Typed" ] }, @@ -154,7 +153,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.7" + "version": "3.6.7" } }, "nbformat": 4, diff --git a/congrats.ipynb b/congrats.ipynb index d17c541..b8068f5 100644 --- a/congrats.ipynb +++ b/congrats.ipynb @@ -81,7 +81,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.7" + "version": "3.6.7" } }, "nbformat": 4, diff --git a/empty.ipynb b/empty.ipynb index 8a6cb58..f30c3bd 100644 --- a/empty.ipynb +++ b/empty.ipynb @@ -11,7 +11,6 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "\"ePOM\"\n", "# Title" ] }, @@ -118,7 +117,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.7" + "version": "3.6.7" } }, "nbformat": 4, diff --git a/index.ipynb b/index.ipynb index c5293a5..f8e8659 100644 --- a/index.ipynb +++ b/index.ipynb @@ -96,7 +96,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "GitHub repository: [https://github.com/hydroffice/python_basics](https://github.com/hydroffice/python_basics)" + "GitHub repository: [https://github.com/hydroffice/python_basics/tree/epom2022](https://github.com/hydroffice/python_basics/tree/epom2022)" ] }, { @@ -139,7 +139,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.7" + "version": "3.6.7" } }, "nbformat": 4, From 3e0a74d4ee3ddd07c02b517be357b2447e3a1e36 Mon Sep 17 00:00:00 2001 From: giumas Date: Mon, 21 Mar 2022 20:14:29 +0100 Subject: [PATCH 11/11] removed left-over piazza stuff --- 000_Welcome_on_Board.ipynb | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/000_Welcome_on_Board.ipynb b/000_Welcome_on_Board.ipynb index 843b766..b81099c 100644 --- a/000_Welcome_on_Board.ipynb +++ b/000_Welcome_on_Board.ipynb @@ -657,17 +657,6 @@ "* The next notebook (when available)." ] }, - { - "cell_type": "markdown", - "metadata": { - "solution2": "hidden" - }, - "source": [ - "If you follow the eight steps, the result will be a note similar to the following one (but with your specific details):\n", - "\n", - "![Note example](images/000_280_note_example.png)" - ] - }, { "cell_type": "markdown", "metadata": {},