Skip to content

Commit

Permalink
deploy: 716473d
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Aug 18, 2024
1 parent 01a6336 commit ac496e0
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 57 deletions.
2 changes: 1 addition & 1 deletion _sources/book/about/instructor.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "daa7fc19",
"id": "7281a93b",
"metadata": {},
"source": [
"## Instructor\n",
Expand Down
2 changes: 1 addition & 1 deletion _sources/book/about/schedule.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "0bd39b97",
"id": "0d85e559",
"metadata": {},
"source": [
"# Schedule\n",
Expand Down
2 changes: 1 addition & 1 deletion _sources/book/about/syllabus.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "e9fe9e20",
"id": "a52768a9",
"metadata": {},
"source": [
"# Syllabus\n",
Expand Down
24 changes: 12 additions & 12 deletions _sources/book/python/05_looping.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "91ffda66",
"id": "0",
"metadata": {},
"source": [
"# Looping and Control Statements\n",
Expand All @@ -12,7 +12,7 @@
},
{
"cell_type": "markdown",
"id": "9213dfda",
"id": "1",
"metadata": {},
"source": [
"## For Loops\n",
Expand All @@ -23,7 +23,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "34de8cdc",
"id": "2",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -39,7 +39,7 @@
},
{
"cell_type": "markdown",
"id": "bc327139",
"id": "3",
"metadata": {},
"source": [
"## While Loops\n",
Expand All @@ -50,7 +50,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "6c1320d7",
"id": "4",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -63,7 +63,7 @@
},
{
"cell_type": "markdown",
"id": "112a434e",
"id": "5",
"metadata": {},
"source": [
"## Control Statements: if, elif, else\n",
Expand All @@ -74,7 +74,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "3c27e773",
"id": "6",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -89,7 +89,7 @@
},
{
"cell_type": "markdown",
"id": "2afbaf30",
"id": "7",
"metadata": {},
"source": [
"## Combining Loops and Control Statements\n",
Expand All @@ -100,7 +100,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "228a8ab4",
"id": "8",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -113,7 +113,7 @@
},
{
"cell_type": "markdown",
"id": "6055fce9",
"id": "9",
"metadata": {},
"source": [
"## Exercises\n",
Expand All @@ -127,7 +127,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "6f41b987",
"id": "10",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -136,7 +136,7 @@
},
{
"cell_type": "markdown",
"id": "1f86a36d",
"id": "11",
"metadata": {},
"source": [
"## Conclusion\n",
Expand Down
20 changes: 10 additions & 10 deletions _sources/book/python/06_functions_classes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "25fc002b",
"id": "0",
"metadata": {},
"source": [
"# Functions and Classes\n",
Expand All @@ -12,7 +12,7 @@
},
{
"cell_type": "markdown",
"id": "7eb049f7",
"id": "1",
"metadata": {},
"source": [
"## Functions\n",
Expand All @@ -25,7 +25,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "1e54592b",
"id": "2",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -52,7 +52,7 @@
},
{
"cell_type": "markdown",
"id": "ecdbab4d",
"id": "3",
"metadata": {},
"source": [
"## Classes\n",
Expand All @@ -65,7 +65,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "711b828d",
"id": "4",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -95,7 +95,7 @@
},
{
"cell_type": "markdown",
"id": "ee39b496",
"id": "5",
"metadata": {},
"source": [
"## Combining Functions and Classes\n",
Expand All @@ -106,7 +106,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "fcb4083d",
"id": "6",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -137,7 +137,7 @@
},
{
"cell_type": "markdown",
"id": "6fd20754",
"id": "7",
"metadata": {},
"source": [
"## Exercises\n",
Expand All @@ -150,7 +150,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "64862cb4",
"id": "8",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -159,7 +159,7 @@
},
{
"cell_type": "markdown",
"id": "754f6aad",
"id": "9",
"metadata": {},
"source": [
"## Conclusion\n",
Expand Down
38 changes: 19 additions & 19 deletions _sources/book/python/07_files.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "bd9281e8",
"id": "0",
"metadata": {},
"source": [
"# Files and Exception Handling\n",
Expand All @@ -12,7 +12,7 @@
},
{
"cell_type": "markdown",
"id": "4688fd0c",
"id": "1",
"metadata": {},
"source": [
"## Working with Files\n",
Expand All @@ -23,21 +23,21 @@
{
"cell_type": "code",
"execution_count": null,
"id": "99f49bf3",
"id": "2",
"metadata": {},
"outputs": [],
"source": [
"# Example of reading coordinates from a file and writing to another file\n",
"input_file = 'coordinates.txt'\n",
"output_file = 'output_coordinates.txt'\n",
"input_file = \"coordinates.txt\"\n",
"output_file = \"output_coordinates.txt\"\n",
"\n",
"try:\n",
" with open(input_file, 'r') as infile:\n",
" with open(input_file, \"r\") as infile:\n",
" coordinates = infile.readlines()\n",
"\n",
" with open(output_file, 'w') as outfile:\n",
" with open(output_file, \"w\") as outfile:\n",
" for line in coordinates:\n",
" lat, lon = line.strip().split(',')\n",
" lat, lon = line.strip().split(\",\")\n",
" outfile.write(f\"Latitude: {lat}, Longitude: {lon}\\n\")\n",
"\n",
" print(f\"Coordinates have been written to {output_file}\")\n",
Expand All @@ -47,7 +47,7 @@
},
{
"cell_type": "markdown",
"id": "9b45f27a",
"id": "3",
"metadata": {},
"source": [
"## Exception Handling\n",
Expand All @@ -60,14 +60,14 @@
{
"cell_type": "code",
"execution_count": null,
"id": "28667722",
"id": "4",
"metadata": {},
"outputs": [],
"source": [
"# Example of exception handling when parsing coordinates\n",
"def parse_coordinates(line):\n",
" try:\n",
" lat, lon = line.strip().split(',')\n",
" lat, lon = line.strip().split(\",\")\n",
" lat = float(lat)\n",
" lon = float(lon)\n",
" return lat, lon\n",
Expand All @@ -80,15 +80,15 @@
"\n",
"\n",
"# Example usage\n",
"line = 'invalid data'\n",
"line = \"invalid data\"\n",
"coordinates = parse_coordinates(line)\n",
"if coordinates:\n",
" print(f\"Parsed coordinates: {coordinates}\")"
]
},
{
"cell_type": "markdown",
"id": "ddaae43c",
"id": "5",
"metadata": {},
"source": [
"## Combining File Handling and Exception Handling\n",
Expand All @@ -99,14 +99,14 @@
{
"cell_type": "code",
"execution_count": null,
"id": "1c7b2f02",
"id": "6",
"metadata": {},
"outputs": [],
"source": [
"# Example of robust file handling with exceptions\n",
"def process_geospatial_file(input_file):\n",
" try:\n",
" with open(input_file, 'r') as infile:\n",
" with open(input_file, \"r\") as infile:\n",
" for line in infile:\n",
" coordinates = parse_coordinates(line)\n",
" if coordinates:\n",
Expand All @@ -120,12 +120,12 @@
"\n",
"\n",
"# Example usage\n",
"process_geospatial_file('coordinates.txt')"
"process_geospatial_file(\"coordinates.txt\")"
]
},
{
"cell_type": "markdown",
"id": "e4dd10c0",
"id": "7",
"metadata": {},
"source": [
"## Exercises\n",
Expand All @@ -138,7 +138,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "834a4ace",
"id": "8",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -147,7 +147,7 @@
},
{
"cell_type": "markdown",
"id": "ec3ddcea",
"id": "9",
"metadata": {},
"source": [
"## Conclusion\n",
Expand Down
2 changes: 1 addition & 1 deletion _sources/book/software/miniconda.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "fa64132c",
"id": "21aa2614",
"metadata": {},
"source": [
"# Miniconda\n",
Expand Down
2 changes: 1 addition & 1 deletion _sources/book/software/overview.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "7c334ad9",
"id": "3bf85fb0",
"metadata": {},
"source": [
"# Overview\n",
Expand Down
Loading

0 comments on commit ac496e0

Please sign in to comment.