From 9f29d25cacc045a2125d7ee278bbe9a6a1c17307 Mon Sep 17 00:00:00 2001 From: Ram Basnet Date: Fri, 16 Aug 2024 15:01:30 -0600 Subject: [PATCH] moved notebooks into a folder and added script to generate pdfs --- README.md | 10 ++++++++-- countdown.py => demos/countdown.py | 0 generatepdfs.sh | 12 ++++++++++++ integers.txt | 10 ---------- .../Ch00-IntroCourseTableOfContents.ipynb | 0 .../Ch01-Introduction.ipynb | 0 .../Ch02-1-Data-Variables-StdIO.ipynb | 0 .../Ch02-2-BitwiseOperators.ipynb | 0 .../Ch03-1-Functions-Built-in.ipynb | 0 .../Ch03-2-Functions-Library.ipynb | 0 .../Ch03-3-Functions-UserDefined.ipynb | 0 .../Ch03-4-UnittestingFunctions.ipynb | 0 .../Ch03-5-NamespaceModulesRefactoring.ipynb | 0 .../Ch03-6-Functions-Advanced.ipynb | 0 .../Ch04-Conditionals.ipynb | 0 .../Ch05-Iterations.ipynb | 0 Ch06-Strings.ipynb => notebooks/Ch06-Strings.ipynb | 0 Ch07-Tuples.ipynb => notebooks/Ch07-Tuples.ipynb | 0 Ch08-1-Lists.ipynb => notebooks/Ch08-1-Lists.ipynb | 0 .../Ch08-2-Lists-Advanced.ipynb | 0 .../Ch09-1-Dictionaries.ipynb | 0 .../Ch09-2-Built-in-DataStructures.ipynb | 0 Ch10-1-Files.ipynb => notebooks/Ch10-1-Files.ipynb | 0 .../Ch10-2-Files-Advanced.ipynb | 0 .../Ch11-Turtles-Events.ipynb | 0 .../Ch12-ModulesAndPackages.ipynb | 0 .../Ch13-Recursion.ipynb | 0 Ch14-OOP.ipynb => notebooks/Ch14-OOP.ipynb | 0 .../Ch15-Overloading-Polymorphism.ipynb | 0 .../Ch16-Exceptions.ipynb | 0 Ch17-PyGame.ipynb => notebooks/Ch17-PyGame.ipynb | 0 .../Ch18-Inheritance.ipynb | 0 Ch19-UnitTest.ipynb => notebooks/Ch19-UnitTest.ipynb | 0 .../Ch20-LinkedLists.ipynb | 0 Ch21-Stacks.ipynb => notebooks/Ch21-Stacks.ipynb | 0 Ch22-Queues.ipynb => notebooks/Ch22-Queues.ipynb | 0 Ch23-Trees.ipynb => notebooks/Ch23-Trees.ipynb | 0 .../Ch24-CodeOptimization-ExecutionTime.ipynb | 0 .../Ch25-DynamicProgramming.ipynb | 0 Ch26-SqliteDB.ipynb => notebooks/Ch26-SqliteDB.ipynb | 0 test | 0 test1.txt | 7 ------- words.txt | 8 -------- words1.txt | 7 ------- 44 files changed, 20 insertions(+), 34 deletions(-) rename countdown.py => demos/countdown.py (100%) create mode 100644 generatepdfs.sh delete mode 100644 integers.txt rename Ch00-IntroCourseTableOfContents.ipynb => notebooks/Ch00-IntroCourseTableOfContents.ipynb (100%) rename Ch01-Introduction.ipynb => notebooks/Ch01-Introduction.ipynb (100%) rename Ch02-1-Data-Variables-StdIO.ipynb => notebooks/Ch02-1-Data-Variables-StdIO.ipynb (100%) rename Ch02-2-BitwiseOperators.ipynb => notebooks/Ch02-2-BitwiseOperators.ipynb (100%) rename Ch03-1-Functions-Built-in.ipynb => notebooks/Ch03-1-Functions-Built-in.ipynb (100%) rename Ch03-2-Functions-Library.ipynb => notebooks/Ch03-2-Functions-Library.ipynb (100%) rename Ch03-3-Functions-UserDefined.ipynb => notebooks/Ch03-3-Functions-UserDefined.ipynb (100%) rename Ch03-4-UnittestingFunctions.ipynb => notebooks/Ch03-4-UnittestingFunctions.ipynb (100%) rename Ch03-5-NamespaceModulesRefactoring.ipynb => notebooks/Ch03-5-NamespaceModulesRefactoring.ipynb (100%) rename Ch03-6-Functions-Advanced.ipynb => notebooks/Ch03-6-Functions-Advanced.ipynb (100%) rename Ch04-Conditionals.ipynb => notebooks/Ch04-Conditionals.ipynb (100%) rename Ch05-Iterations.ipynb => notebooks/Ch05-Iterations.ipynb (100%) rename Ch06-Strings.ipynb => notebooks/Ch06-Strings.ipynb (100%) rename Ch07-Tuples.ipynb => notebooks/Ch07-Tuples.ipynb (100%) rename Ch08-1-Lists.ipynb => notebooks/Ch08-1-Lists.ipynb (100%) rename Ch08-2-Lists-Advanced.ipynb => notebooks/Ch08-2-Lists-Advanced.ipynb (100%) rename Ch09-1-Dictionaries.ipynb => notebooks/Ch09-1-Dictionaries.ipynb (100%) rename Ch09-2-Built-in-DataStructures.ipynb => notebooks/Ch09-2-Built-in-DataStructures.ipynb (100%) rename Ch10-1-Files.ipynb => notebooks/Ch10-1-Files.ipynb (100%) rename Ch10-2-Files-Advanced.ipynb => notebooks/Ch10-2-Files-Advanced.ipynb (100%) rename Ch11-Turtles-Events.ipynb => notebooks/Ch11-Turtles-Events.ipynb (100%) rename Ch12-ModulesAndPackages.ipynb => notebooks/Ch12-ModulesAndPackages.ipynb (100%) rename Ch13-Recursion.ipynb => notebooks/Ch13-Recursion.ipynb (100%) rename Ch14-OOP.ipynb => notebooks/Ch14-OOP.ipynb (100%) rename Ch15-Overloading-Polymorphism.ipynb => notebooks/Ch15-Overloading-Polymorphism.ipynb (100%) rename Ch16-Exceptions.ipynb => notebooks/Ch16-Exceptions.ipynb (100%) rename Ch17-PyGame.ipynb => notebooks/Ch17-PyGame.ipynb (100%) rename Ch18-Inheritance.ipynb => notebooks/Ch18-Inheritance.ipynb (100%) rename Ch19-UnitTest.ipynb => notebooks/Ch19-UnitTest.ipynb (100%) rename Ch20-LinkedLists.ipynb => notebooks/Ch20-LinkedLists.ipynb (100%) rename Ch21-Stacks.ipynb => notebooks/Ch21-Stacks.ipynb (100%) rename Ch22-Queues.ipynb => notebooks/Ch22-Queues.ipynb (100%) rename Ch23-Trees.ipynb => notebooks/Ch23-Trees.ipynb (100%) rename Ch24-CodeOptimization-ExecutionTime.ipynb => notebooks/Ch24-CodeOptimization-ExecutionTime.ipynb (100%) rename Ch25-DynamicProgramming.ipynb => notebooks/Ch25-DynamicProgramming.ipynb (100%) rename Ch26-SqliteDB.ipynb => notebooks/Ch26-SqliteDB.ipynb (100%) delete mode 100644 test delete mode 100644 test1.txt delete mode 100644 words.txt delete mode 100644 words1.txt diff --git a/README.md b/README.md index 241e18b..bf196ad 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ See [paper.md](paper.md) file for statement of need. ## Notebook mapping with corresponding book chapter -Note: If book chapter is missing, texbook doesn't provide one on the topic +Note: If book chapter is missing, texbook doesn't provide one on the topic; all the notebooks are in **notebooks** folder | Notebook -> | Think Python3 Textbook | | --------- | ---------- | @@ -48,7 +48,12 @@ Note: If book chapter is missing, texbook doesn't provide one on the topic ## PDF Format -- pdf version of all the notebooks can be found in [pdfs](https://github.com/rambasnet/Python-Notebooks/tree/master/pdfs) folder +- pdf version of all the notebooks can be generated using the following script from a Terminal on Linux system +- PDF file for each notebook file will be generated and stored in ./pdfs folder + +```bash +bash generatepdfs.sh +``` ## Who can use these notebooks @@ -118,3 +123,4 @@ Contributions are accepted via pull requests. You can also open issues on bugs, © 2019 Ram Basnet and T. Doleck. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation. See LICENSE file for details. + diff --git a/countdown.py b/demos/countdown.py similarity index 100% rename from countdown.py rename to demos/countdown.py diff --git a/generatepdfs.sh b/generatepdfs.sh new file mode 100644 index 0000000..f144e99 --- /dev/null +++ b/generatepdfs.sh @@ -0,0 +1,12 @@ +#! /bin/bash + +# Script to convert jupyter notebooks to PDF files. The pdfs are saved in ./pdfs folder + +sudo apt update +sudo apt install -y pandoc texlive texlive-xetex > /dev/null + +files=$(find . -name '*.ipynb') +for f in $files; do + echo Converting: $f + jupyter nbconvert --log-level=0 --output-dir='./pdfs' --to pdf $f > /dev/null +done diff --git a/integers.txt b/integers.txt deleted file mode 100644 index c2069b5..0000000 --- a/integers.txt +++ /dev/null @@ -1,10 +0,0 @@ -462 -298 -188 -560 -431 -279 -488 -173 -160 -502 diff --git a/Ch00-IntroCourseTableOfContents.ipynb b/notebooks/Ch00-IntroCourseTableOfContents.ipynb similarity index 100% rename from Ch00-IntroCourseTableOfContents.ipynb rename to notebooks/Ch00-IntroCourseTableOfContents.ipynb diff --git a/Ch01-Introduction.ipynb b/notebooks/Ch01-Introduction.ipynb similarity index 100% rename from Ch01-Introduction.ipynb rename to notebooks/Ch01-Introduction.ipynb diff --git a/Ch02-1-Data-Variables-StdIO.ipynb b/notebooks/Ch02-1-Data-Variables-StdIO.ipynb similarity index 100% rename from Ch02-1-Data-Variables-StdIO.ipynb rename to notebooks/Ch02-1-Data-Variables-StdIO.ipynb diff --git a/Ch02-2-BitwiseOperators.ipynb b/notebooks/Ch02-2-BitwiseOperators.ipynb similarity index 100% rename from Ch02-2-BitwiseOperators.ipynb rename to notebooks/Ch02-2-BitwiseOperators.ipynb diff --git a/Ch03-1-Functions-Built-in.ipynb b/notebooks/Ch03-1-Functions-Built-in.ipynb similarity index 100% rename from Ch03-1-Functions-Built-in.ipynb rename to notebooks/Ch03-1-Functions-Built-in.ipynb diff --git a/Ch03-2-Functions-Library.ipynb b/notebooks/Ch03-2-Functions-Library.ipynb similarity index 100% rename from Ch03-2-Functions-Library.ipynb rename to notebooks/Ch03-2-Functions-Library.ipynb diff --git a/Ch03-3-Functions-UserDefined.ipynb b/notebooks/Ch03-3-Functions-UserDefined.ipynb similarity index 100% rename from Ch03-3-Functions-UserDefined.ipynb rename to notebooks/Ch03-3-Functions-UserDefined.ipynb diff --git a/Ch03-4-UnittestingFunctions.ipynb b/notebooks/Ch03-4-UnittestingFunctions.ipynb similarity index 100% rename from Ch03-4-UnittestingFunctions.ipynb rename to notebooks/Ch03-4-UnittestingFunctions.ipynb diff --git a/Ch03-5-NamespaceModulesRefactoring.ipynb b/notebooks/Ch03-5-NamespaceModulesRefactoring.ipynb similarity index 100% rename from Ch03-5-NamespaceModulesRefactoring.ipynb rename to notebooks/Ch03-5-NamespaceModulesRefactoring.ipynb diff --git a/Ch03-6-Functions-Advanced.ipynb b/notebooks/Ch03-6-Functions-Advanced.ipynb similarity index 100% rename from Ch03-6-Functions-Advanced.ipynb rename to notebooks/Ch03-6-Functions-Advanced.ipynb diff --git a/Ch04-Conditionals.ipynb b/notebooks/Ch04-Conditionals.ipynb similarity index 100% rename from Ch04-Conditionals.ipynb rename to notebooks/Ch04-Conditionals.ipynb diff --git a/Ch05-Iterations.ipynb b/notebooks/Ch05-Iterations.ipynb similarity index 100% rename from Ch05-Iterations.ipynb rename to notebooks/Ch05-Iterations.ipynb diff --git a/Ch06-Strings.ipynb b/notebooks/Ch06-Strings.ipynb similarity index 100% rename from Ch06-Strings.ipynb rename to notebooks/Ch06-Strings.ipynb diff --git a/Ch07-Tuples.ipynb b/notebooks/Ch07-Tuples.ipynb similarity index 100% rename from Ch07-Tuples.ipynb rename to notebooks/Ch07-Tuples.ipynb diff --git a/Ch08-1-Lists.ipynb b/notebooks/Ch08-1-Lists.ipynb similarity index 100% rename from Ch08-1-Lists.ipynb rename to notebooks/Ch08-1-Lists.ipynb diff --git a/Ch08-2-Lists-Advanced.ipynb b/notebooks/Ch08-2-Lists-Advanced.ipynb similarity index 100% rename from Ch08-2-Lists-Advanced.ipynb rename to notebooks/Ch08-2-Lists-Advanced.ipynb diff --git a/Ch09-1-Dictionaries.ipynb b/notebooks/Ch09-1-Dictionaries.ipynb similarity index 100% rename from Ch09-1-Dictionaries.ipynb rename to notebooks/Ch09-1-Dictionaries.ipynb diff --git a/Ch09-2-Built-in-DataStructures.ipynb b/notebooks/Ch09-2-Built-in-DataStructures.ipynb similarity index 100% rename from Ch09-2-Built-in-DataStructures.ipynb rename to notebooks/Ch09-2-Built-in-DataStructures.ipynb diff --git a/Ch10-1-Files.ipynb b/notebooks/Ch10-1-Files.ipynb similarity index 100% rename from Ch10-1-Files.ipynb rename to notebooks/Ch10-1-Files.ipynb diff --git a/Ch10-2-Files-Advanced.ipynb b/notebooks/Ch10-2-Files-Advanced.ipynb similarity index 100% rename from Ch10-2-Files-Advanced.ipynb rename to notebooks/Ch10-2-Files-Advanced.ipynb diff --git a/Ch11-Turtles-Events.ipynb b/notebooks/Ch11-Turtles-Events.ipynb similarity index 100% rename from Ch11-Turtles-Events.ipynb rename to notebooks/Ch11-Turtles-Events.ipynb diff --git a/Ch12-ModulesAndPackages.ipynb b/notebooks/Ch12-ModulesAndPackages.ipynb similarity index 100% rename from Ch12-ModulesAndPackages.ipynb rename to notebooks/Ch12-ModulesAndPackages.ipynb diff --git a/Ch13-Recursion.ipynb b/notebooks/Ch13-Recursion.ipynb similarity index 100% rename from Ch13-Recursion.ipynb rename to notebooks/Ch13-Recursion.ipynb diff --git a/Ch14-OOP.ipynb b/notebooks/Ch14-OOP.ipynb similarity index 100% rename from Ch14-OOP.ipynb rename to notebooks/Ch14-OOP.ipynb diff --git a/Ch15-Overloading-Polymorphism.ipynb b/notebooks/Ch15-Overloading-Polymorphism.ipynb similarity index 100% rename from Ch15-Overloading-Polymorphism.ipynb rename to notebooks/Ch15-Overloading-Polymorphism.ipynb diff --git a/Ch16-Exceptions.ipynb b/notebooks/Ch16-Exceptions.ipynb similarity index 100% rename from Ch16-Exceptions.ipynb rename to notebooks/Ch16-Exceptions.ipynb diff --git a/Ch17-PyGame.ipynb b/notebooks/Ch17-PyGame.ipynb similarity index 100% rename from Ch17-PyGame.ipynb rename to notebooks/Ch17-PyGame.ipynb diff --git a/Ch18-Inheritance.ipynb b/notebooks/Ch18-Inheritance.ipynb similarity index 100% rename from Ch18-Inheritance.ipynb rename to notebooks/Ch18-Inheritance.ipynb diff --git a/Ch19-UnitTest.ipynb b/notebooks/Ch19-UnitTest.ipynb similarity index 100% rename from Ch19-UnitTest.ipynb rename to notebooks/Ch19-UnitTest.ipynb diff --git a/Ch20-LinkedLists.ipynb b/notebooks/Ch20-LinkedLists.ipynb similarity index 100% rename from Ch20-LinkedLists.ipynb rename to notebooks/Ch20-LinkedLists.ipynb diff --git a/Ch21-Stacks.ipynb b/notebooks/Ch21-Stacks.ipynb similarity index 100% rename from Ch21-Stacks.ipynb rename to notebooks/Ch21-Stacks.ipynb diff --git a/Ch22-Queues.ipynb b/notebooks/Ch22-Queues.ipynb similarity index 100% rename from Ch22-Queues.ipynb rename to notebooks/Ch22-Queues.ipynb diff --git a/Ch23-Trees.ipynb b/notebooks/Ch23-Trees.ipynb similarity index 100% rename from Ch23-Trees.ipynb rename to notebooks/Ch23-Trees.ipynb diff --git a/Ch24-CodeOptimization-ExecutionTime.ipynb b/notebooks/Ch24-CodeOptimization-ExecutionTime.ipynb similarity index 100% rename from Ch24-CodeOptimization-ExecutionTime.ipynb rename to notebooks/Ch24-CodeOptimization-ExecutionTime.ipynb diff --git a/Ch25-DynamicProgramming.ipynb b/notebooks/Ch25-DynamicProgramming.ipynb similarity index 100% rename from Ch25-DynamicProgramming.ipynb rename to notebooks/Ch25-DynamicProgramming.ipynb diff --git a/Ch26-SqliteDB.ipynb b/notebooks/Ch26-SqliteDB.ipynb similarity index 100% rename from Ch26-SqliteDB.ipynb rename to notebooks/Ch26-SqliteDB.ipynb diff --git a/test b/test deleted file mode 100644 index e69de29..0000000 diff --git a/test1.txt b/test1.txt deleted file mode 100644 index 8f48a1d..0000000 --- a/test1.txt +++ /dev/null @@ -1,7 +0,0 @@ -words -===== -apple -ball -cat -dog -zebra diff --git a/words.txt b/words.txt deleted file mode 100644 index a982667..0000000 --- a/words.txt +++ /dev/null @@ -1,8 +0,0 @@ -apple -ball -cat -dog -elephant -zebra -1 -[1, 2, 3] \ No newline at end of file diff --git a/words1.txt b/words1.txt deleted file mode 100644 index 0338983..0000000 --- a/words1.txt +++ /dev/null @@ -1,7 +0,0 @@ -1 -[1, 2, 3]apple -ball -cat -dog -elephant -zebra