Skip to content

Commit 8ab91ee

Browse files
committed
Merge branch 'issue/5'
2 parents 06113d3 + 30a2f94 commit 8ab91ee

File tree

162 files changed

+59527
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+59527
-0
lines changed

.DS_Store

8 KB
Binary file not shown.
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Object Oriented Programming & Design Patterns
2+
3+
![Test](https://github.com/rambasnet/Python-Object-Oriented-Programming/actions/workflows/ci-test.yml/badge.svg)
4+
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/rambasnet/Python-Object-Oriented-Programming/HEAD)
5+
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/rambasnet/Python-Object-Oriented-Programming)
6+
![Python](https://img.shields.io/badge/Python-3.10-blue)
7+
![License](https://img.shields.io/badge/License-MIT-green)
8+
9+
- Jupyter notebooks for Object Oriented Programming and Design Patterns using Python
10+
11+
## Text: Python Object Oriented Programming
12+
13+
- Fourth Edition by Steven F. Lott and Dusty Phillips
14+
15+
## How to use the notebooks
16+
17+
### Important
18+
19+
In order to learn coding, it's very important to actually type code on your own from scratch and NOT copy paste! You can run provided cells to see the output, follow along and learn from it. However, it's very important that you either start a new notebook or add cells and write your own code from scratch to practice the concepts covered with many similar examples and solve the exercises provided for self assessment.
20+
21+
### Online services
22+
23+
You can launch an interactive session of this project using online Binder service:
24+
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/badge_logo.svg) or Google Colab. Each chapter, where applicable, provides [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com) to simply click and run the notebook in Google's Colab environment.
25+
26+
### On a local system
27+
28+
To run these notebooks interactively and save your work locally, you need [Python 3](https://www.python.org/) and [Jupyter Notebook](http://jupyter.org/) -- an interactive web-based editor that allows you to create and share documents that contain live code and data. [Anaconda or Miniconda](https://www.anaconda.com/products/distribution) is the recommended way to install Python and other packages on all modern platforms.
29+
30+
#### Using Docker
31+
32+
- Install Docker on your system: [https://docs.docker.com/get-docker/](https://docs.docker.com/get-docker/)
33+
34+
- Dockerfile is provided to build a container image with all the necessary packages and dependencies to run the notebooks. You can build the image and run the container using the provided bash scripts.
35+
36+
- Clone this repo and run the following command from the root of the repo
37+
- Use git-bash Terminal on Windows to run bash scripts
38+
39+
```bash
40+
git clone https://github.com/rambasnet/Python-Object-Oriented-Programming.git
41+
curl -o setup.sh https://raw.githubusercontent.com/rambasnet/course-container/main/setup.sh
42+
bash setup.sh
43+
bash run.sh # run interactive Debian Shell in the container
44+
bash run-jupyter.sh # run jupyter notebook server in the container
45+
```
46+
47+
- jupyter notebooks are inside the notebooks folder
48+
- start from the OO-Table-of-Contents.ipynb
49+
50+
#### Installing via Anaconda or Miniconda
51+
52+
Anaconda or Miniconda has Python 3 and many other packages that you can easily install on any platform (Windows, Linux, and Mac). First, install Anaconda: [http://docs.continuum.io/anaconda/install/](http://docs.continuum.io/anaconda/install/) or Miniconda [https://conda.io/docs/user-guide/install/index.html](https://conda.io/docs/user-guide/install/index.html) for Python 3.
53+
54+
After installing anaconda or miniconda, open a terminal or cmd prompt and run the following commands:
55+
56+
```bash
57+
conda update conda
58+
conda env list # list current environments
59+
conda env remove -n <environment_name> # remove existing environment
60+
conda create -n oop python=3.10 # create a new virtual environment named py
61+
conda activate oop
62+
conda install notebook # or
63+
conda install -c conda-forge retrolab # uses notebook
64+
conda install mypy # type checker
65+
python -m pip install hypothesis # test data generator
66+
```
67+
68+
#### Running the notebooks in VS Code
69+
70+
- Python notebooks can be run natively in VS Code. Simply open the notebook file with extension .ipynb in VS Code and run each cell; add new cell, etc. right from VS Code.
71+
72+
#### Running the notebooks using jupyter notebook server
73+
74+
Once Python 3 and Jupyter Notebook are installed, open a terminal change working directory using cd command to go into the folder where this repo is cloned and run the notebook from there. Use notebook or retro.
75+
76+
```bash
77+
cd <directory where this repo is cloned>
78+
jupyter notebook # or
79+
jupyter retro
80+
```
81+
82+
This will start a Jupyter session in your browser. Open any chapter and start coding...
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
pytest
2+
pytest-cov
3+
ipykernel
4+
jupyterlab
5+
notebook
6+
pymongo[srv]
7+
mypy
8+
hypothesis
9+
flake8
10+
autopep8
11+
lxml
12+
requests
13+
pdoc
14+
kattis-cli
15+
pickleshare
16+
BeautifulSoup
6 KB
Binary file not shown.

demo-assignments/A0-OOP/hello/htmlcov/.gitignore

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo-assignments/A0-OOP/hello/htmlcov/class_index.html

Lines changed: 179 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)