|
1 | 1 | # 🔢 NumPy Workshop |
2 | 2 |
|
3 | | -[](https://github.com/mr-pylin/numpy-workshop/blob/main/LICENSE) |
4 | | -[](https://www.python.org/downloads/release/python-3123/) |
| 3 | +[](https://github.com/mr-pylin/numpy-workshop/blob/main/LICENSE) |
| 4 | +[](https://www.python.org/downloads/release/python-3128/) |
5 | 5 | [](https://app.codacy.com/gh/mr-pylin/numpy-workshop/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) |
6 | | -[](https://github.com/psf/black) |
7 | | - |
8 | | - |
9 | | -[](https://github.com/mr-pylin/numpy-workshop/pulls) |
| 6 | +[](https://github.com/psf/black) |
| 7 | + |
| 8 | + |
| 9 | +[](https://github.com/mr-pylin/numpy-workshop/pulls) |
10 | 10 |
|
11 | 11 | An in-depth guide to mastering **NumPy**, covering fundamental to advanced array operations for **data science** and **numerical computing**. |
12 | 12 |
|
@@ -72,36 +72,91 @@ An in-depth guide to mastering **NumPy**, covering fundamental to advanced array |
72 | 72 |
|
73 | 73 | ## ⚙️ Setup |
74 | 74 |
|
75 | | -This project requires Python **v3.10** or higher. It was developed and tested using Python **v3.12.3**. If you encounter issues running the specified version of dependencies, consider using this version of Python. |
| 75 | +This project requires Python **v3.10** or higher. It was developed and tested using Python **v3.12.8**. If you encounter issues running the specified version of dependencies, consider using this version of Python. |
76 | 76 |
|
77 | 77 | ### 📝 List of Dependencies |
78 | 78 |
|
79 | | -Installing **matplotlib** and **pandas** is **OPTIONAL**. They are used exclusively in the [**Looking Ahead Notebook**](./code/21-looking-ahead.ipynb) to show an application of using them. |
| 79 | +Installing `matplotlib` and `pandas` is **OPTIONAL**. They are used exclusively in the [**Looking Ahead Notebook**](./code/21-looking-ahead.ipynb) to show an application of using them. |
80 | 80 |
|
81 | | -[](https://pypi.org/project/numpy/2.1.3/) |
82 | | -[](https://pypi.org/project/matplotlib/3.9.1/) |
83 | | -[](https://pypi.org/project/pandas/2.2.2/) |
| 81 | +[](https://pypi.org/project/ipykernel/6.29.5/) |
| 82 | +[](https://pypi.org/project/ipywidgets/8.1.5/) |
| 83 | +[](https://pypi.org/project/matplotlib/3.10.0/) |
| 84 | +[](https://pypi.org/project/numpy/2.2.1/) |
| 85 | +[](https://pypi.org/project/pandas/2.2.3/) |
84 | 86 |
|
85 | | -### 📦 Installing Dependencies |
| 87 | +### 📦 Install Dependencies |
86 | 88 |
|
87 | | -You can install all dependencies listed in [**requirements.txt**](./requirements.txt) using [**pip**](https://pip.pypa.io/en/stable/installation/): |
| 89 | +#### 📦 Method 1: Poetry (Recommended) |
| 90 | + |
| 91 | +Use [**Poetry**](https://python-poetry.org/) for dependency management. It handles dependencies, virtual environments, and locking versions more efficiently than pip. To install dependencies using Poetry: |
| 92 | + |
| 93 | +- **Option 1 [Recommended]**: Install exact dependency versions specified in [**poetry.lock**](./poetry.lock) for consistent environments: |
| 94 | + |
| 95 | + ```bash |
| 96 | + poetry install |
| 97 | + ``` |
| 98 | + |
| 99 | +- **Option 2**: Install the latest compatible dependency versions from [**pyproject.toml**](./pyproject.toml) and regenerate the [**poetry.lock**](./poetry.lock) file: |
| 100 | + |
| 101 | + ```bash |
| 102 | + poetry install --no-root |
| 103 | + ``` |
| 104 | + |
| 105 | +#### 📦 Method 2: Pip |
| 106 | + |
| 107 | +Install all dependencies listed in [**requirements.txt**](./requirements.txt) using [**pip**](https://pip.pypa.io/en/stable/installation/): |
88 | 108 |
|
89 | 109 | ```bash |
90 | 110 | pip install -r requirements.txt |
91 | 111 | ``` |
92 | 112 |
|
| 113 | +#### 🌐 Connection Issues |
| 114 | + |
| 115 | +If you encounter connection issues during installation, you can try extending the **timeout** and increasing the number of **retries** with the following: |
| 116 | + |
| 117 | +- **For Poetry**: Use the following command to set the retries and timeout directly in the terminal **before running the install**: |
| 118 | + - **Windows**: |
| 119 | + - **PowerShell**: |
| 120 | + |
| 121 | + ```bash |
| 122 | + $env:POETRY_HTTP_TIMEOUT=300 |
| 123 | + $env:POETRY_HTTP_RETRIES=10 |
| 124 | + ``` |
| 125 | + |
| 126 | + - **Command Prompt**: |
| 127 | + |
| 128 | + ```bash |
| 129 | + set POETRY_HTTP_TIMEOUT=300 |
| 130 | + set POETRY_HTTP_RETRIES=10 |
| 131 | + ``` |
| 132 | + |
| 133 | + - **Linux/macOS**: |
| 134 | + - **Terminal**: |
| 135 | + |
| 136 | + ```bash |
| 137 | + export POETRY_HTTP_TIMEOUT=300 |
| 138 | + export POETRY_HTTP_RETRIES=10 |
| 139 | + ``` |
| 140 | + |
| 141 | +- **For Pip**: Use the `--retries` and `--timeout` flags directly in your pip command: |
| 142 | + |
| 143 | + ```bash |
| 144 | + pip install -r requirements.txt --retries 10 --timeout 300 |
| 145 | + ``` |
| 146 | + |
93 | 147 | ### 🛠️ Usage Instructions |
94 | 148 |
|
95 | | -1. Open the root folder with [**VS Code**](https://code.visualstudio.com/): |
96 | | - - **Windows/Linux**: `Ctrl + K` followed by `Ctrl + O` |
97 | | - - **macOS**: `Cmd + K` followed by `Cmd + O` |
98 | | -1. Open `.ipynb` files using [**Jupyter extension**](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter) integrated with **VS Code**. |
99 | | -1. Allow **VS Code** to install any **recommended dependencies** for working with Jupyter Notebooks. |
| 149 | +1. Open the root folder with [**VS Code**](https://code.visualstudio.com/) (`Ctrl/Cmd + K` followed by `Ctrl/Cmd + O`). |
| 150 | +1. Open `.ipynb` files using the [**Jupyter extension**](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter) integrated with **VS Code**. |
| 151 | +1. Select the correct Python kernel and virtual environment where the dependencies were installed. |
| 152 | +1. Allow **VS Code** to install any recommended dependencies for working with Jupyter Notebooks. |
100 | 153 |
|
101 | 154 | ✍️ **Notes**: |
102 | 155 |
|
103 | | -- The **table of contents** embedded in the **notebooks** is not fully functional on **GitHub**! |
104 | | -- To navigate the **table of contents** effectively, open the notebooks **locally** or view them via [**nbviewer**](https://nbviewer.org/github/mr-pylin/pytorch-workshop) for a better experience. |
| 156 | +- It is **highly recommended** to stick with the exact dependency versions specified in [**poetry.lock**](./poetry.lock) or [**requirements.txt**](./requirements.txt) rather than using the latest package versions. The repository has been **tested** on these versions to ensure **compatibility** and **stability**. |
| 157 | +- This repository is **actively maintained**, and dependencies are **updated regularly** to the latest **stable** versions. |
| 158 | +- The **table of contents** embedded in the **notebooks** may not function correctly on **GitHub**. |
| 159 | +- For an improved experience, open the notebooks **locally** or view them via [**nbviewer**](https://nbviewer.org/github/mr-pylin/numpy-workshop). |
105 | 160 |
|
106 | 161 | ## 🔗 Useful Links |
107 | 162 |
|
|
0 commit comments