From f11c72accbf934258f9d7cf6758b89e78f0c59e5 Mon Sep 17 00:00:00 2001 From: dev-javedali Date: Mon, 7 Sep 2026 02:28:52 +0500 Subject: [PATCH 1/7] Complete the subplots example to actually show two subplots The second subplot call was commented out along with a leftover line that called set_title() on a plain list, which isn't valid. Uncommented and fixed the expense subplot, added titles for both, and added tight_layout so they don't overlap. --- matpltlib/10_subplots.ipynb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/matpltlib/10_subplots.ipynb b/matpltlib/10_subplots.ipynb index d6d2accb..594a4a6c 100644 --- a/matpltlib/10_subplots.ipynb +++ b/matpltlib/10_subplots.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "

Matplotlib Tutorial: Subplots

" + "

Matplotlib Tutorial: Subplots

" ] }, { @@ -53,12 +53,14 @@ "expense=[2800,3000,2800,3400]\n", "\n", "plt.subplot(2,1,1)\n", - "# income.set_title('Income')\n", "plt.bar(year,income)\n", + "plt.title('Income')\n", "\n", + "plt.subplot(2,1,2)\n", + "plt.bar(year,expense,color='green')\n", + "plt.title('Expense')\n", "\n", - "# plt.subplot(2,1,2)\n", - "# plt.bar(year,expense,color='green')" + "plt.tight_layout()\n" ] } ], From 3a4f3b8398d3ed13f811006a922e8f0bb0a8039a Mon Sep 17 00:00:00 2001 From: dev-javedali Date: Mon, 7 Sep 2026 02:29:47 +0500 Subject: [PATCH 2/7] Fix duplicate blood sugar range in diabetic classification list 80-100 was listed for both Normal and Diabetic. Based on the bins used later in the notebook ([80,100,125,150]), the diabetic range should be 125-150. --- matpltlib/5_histogram/5_histogram.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matpltlib/5_histogram/5_histogram.ipynb b/matpltlib/5_histogram/5_histogram.ipynb index d6f63ee6..d3837753 100644 --- a/matpltlib/5_histogram/5_histogram.ipynb +++ b/matpltlib/5_histogram/5_histogram.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "

Matplotlib Tutorial: Histogram

" + "

Matplotlib Tutorial: Histogram

" ] }, { @@ -122,7 +122,7 @@ "" ] }, From e4c4fdd8281ff12315b448b6680234759850d5f9 Mon Sep 17 00:00:00 2001 From: dev-javedali Date: Mon, 7 Sep 2026 02:30:03 +0500 Subject: [PATCH 3/7] Fix typo and unclosed tag in bar chart notebook Title read 'US Technolog Stocks' (missing y), and the horizontal bar chart heading closed with

instead of

. --- matpltlib/4_bar_chart/4_bar_chart.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/matpltlib/4_bar_chart/4_bar_chart.ipynb b/matpltlib/4_bar_chart/4_bar_chart.ipynb index 201741b3..6126a315 100644 --- a/matpltlib/4_bar_chart/4_bar_chart.ipynb +++ b/matpltlib/4_bar_chart/4_bar_chart.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "

Matplotlib Tutorial: Bar Chart

" + "

Matplotlib Tutorial: Bar Chart

" ] }, { @@ -155,7 +155,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "

Horizontal bar chart using barh function

" + "

Horizontal bar chart using barh function

" ] }, { @@ -189,7 +189,7 @@ "\n", "plt.yticks(xpos,company)\n", "plt.ylabel(\"Revenue(Bln)\")\n", - "plt.title('US Technolog Stocks')\n", + "plt.title('US Technology Stocks')\n", "plt.legend()" ] } From c7ef3dabb862ea3f46247d0f9b73e63793040bf9 Mon Sep 17 00:00:00 2001 From: dev-javedali Date: Mon, 7 Sep 2026 02:30:22 +0500 Subject: [PATCH 4/7] Remove stray comma in h1 tags across tutorial notebooks Several notebooks had align=center, style=... with an invalid comma between attributes, inconsistent with the other notebooks in the repo that don't have it. --- matpltlib/6_pie_chart/6_pie_chart.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matpltlib/6_pie_chart/6_pie_chart.ipynb b/matpltlib/6_pie_chart/6_pie_chart.ipynb index 645fb955..efac2881 100644 --- a/matpltlib/6_pie_chart/6_pie_chart.ipynb +++ b/matpltlib/6_pie_chart/6_pie_chart.ipynb @@ -6,7 +6,7 @@ "collapsed": true }, "source": [ - "

Matplotlib Tutorial: Pie Charts

" + "

Matplotlib Tutorial: Pie Charts

" ] }, { From 55eab2856fab51a5a262445cf70ba717714076e6 Mon Sep 17 00:00:00 2001 From: dev-javedali Date: Wed, 9 Sep 2026 19:18:07 +0500 Subject: [PATCH 5/7] Rename numpy_tutorail_2.py to numpy_tutorial_2.py Fixed a typo in the filename (tutorail -> tutorial) and added PEP8 spacing around the array elements. --- numpy/numpy_tutorail_2.py | 3 --- numpy/numpy_tutorial_2.py | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 numpy/numpy_tutorail_2.py create mode 100644 numpy/numpy_tutorial_2.py diff --git a/numpy/numpy_tutorail_2.py b/numpy/numpy_tutorail_2.py deleted file mode 100644 index 4a674fa7..00000000 --- a/numpy/numpy_tutorail_2.py +++ /dev/null @@ -1,3 +0,0 @@ -import numpy as np - -a=np.array([[1,2,3],[4,5,6]]) diff --git a/numpy/numpy_tutorial_2.py b/numpy/numpy_tutorial_2.py new file mode 100644 index 00000000..900e418d --- /dev/null +++ b/numpy/numpy_tutorial_2.py @@ -0,0 +1,3 @@ +import numpy as np + +a = np.array([[1, 2, 3], [4, 5, 6]]) From 633a5948fd2ab94b31dfdb7a2b8c95efe3d76f7b Mon Sep 17 00:00:00 2001 From: dev-javedali Date: Wed, 9 Sep 2026 19:18:07 +0500 Subject: [PATCH 6/7] Clean up numpy_tutorial.py formatting and remove unused import Removed the unused 'import sys' statement and added PEP8 spacing around operators, commas, and assignments (e.g. a1=np.arange -> a1 = np.arange, x+y -> x + y). --- numpy/numpy_tutorial.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/numpy/numpy_tutorial.py b/numpy/numpy_tutorial.py index f92f2f85..ae816ebb 100644 --- a/numpy/numpy_tutorial.py +++ b/numpy/numpy_tutorial.py @@ -1,19 +1,16 @@ import numpy as np import time -import sys SIZE = 1000000 l1 = range(SIZE) l2 = range(SIZE) -a1=np.arange(SIZE) -a2=np.arange(SIZE) +a1 = np.arange(SIZE) +a2 = np.arange(SIZE) # python list start = time.time() -result = [(x+y) for x,y in zip(l1,l2)] -print("python list took: ",(time.time()-start)*1000) +result = [(x + y) for x, y in zip(l1, l2)] +print("python list took: ", (time.time() - start) * 1000) # numpy array -start= time.time() +start = time.time() result = a1 + a2 -print("numpy took: ", (time.time()-start)*1000) - - +print("numpy took: ", (time.time() - start) * 1000) From 122645987f65266c16f5093764bb5535866d08a7 Mon Sep 17 00:00:00 2001 From: dev-javedali Date: Wed, 9 Sep 2026 19:18:08 +0500 Subject: [PATCH 7/7] Fix Fortran typo in nditer notebook heading Heading read 'Fortan style ordering', missing the 'r'. Corrected to 'Fortran style ordering'. --- numpy/nditer.ipynb | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/numpy/nditer.ipynb b/numpy/nditer.ipynb index 3d554676..2d0f4e48 100644 --- a/numpy/nditer.ipynb +++ b/numpy/nditer.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "

Numpy tutorial: iterate numpy array using nditer

" + "

Numpy tutorial: iterate numpy array using nditer

" ] }, { @@ -38,10 +38,7 @@ "output_type": "execute_result" } ], - "source": [ - "a = np.arange(12).reshape(3,4)\n", - "a" - ] + "source": "a = np.arange(12).reshape(3, 4)\na" }, { "cell_type": "markdown", @@ -167,7 +164,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "

Fortan style ordering

" + "

Fortran style ordering

" ] }, { @@ -226,10 +223,7 @@ ] } ], - "source": [ - "for x in np.nditer(a, flags=['external_loop'],order='F'):\n", - " print(x)" - ] + "source": "for x in np.nditer(a, flags=['external_loop'], order='F'):\n print(x)" }, { "cell_type": "markdown", @@ -299,10 +293,7 @@ "output_type": "execute_result" } ], - "source": [ - "b = np.arange(3, 15, 4).reshape(3,1)\n", - "b" - ] + "source": "b = np.arange(3, 15, 4).reshape(3, 1)\nb" }, { "cell_type": "code", @@ -328,10 +319,7 @@ ] } ], - "source": [ - "for x, y in np.nditer([a,b]):\n", - " print (x,y)" - ] + "source": "for x, y in np.nditer([a, b]):\n print(x, y)" } ], "metadata": { @@ -355,4 +343,4 @@ }, "nbformat": 4, "nbformat_minor": 2 -} +} \ No newline at end of file