From f3f475c80e3ca8d27335364104de3a8cc25643eb Mon Sep 17 00:00:00 2001 From: Jules Huisman Date: Sun, 23 Oct 2022 12:15:30 +0200 Subject: [PATCH 1/9] Added a comment --- main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.py b/main.py index 28a4ad9..05bafd0 100644 --- a/main.py +++ b/main.py @@ -1,3 +1,5 @@ +# This was made in development + from urllib.request import Request, urlopen def fetch_random_dad_joke() -> str: From a7a28f253d587a8306e8c301e9a49d2a35814cd9 Mon Sep 17 00:00:00 2001 From: Jules Huisman Date: Sun, 23 Oct 2022 12:18:14 +0200 Subject: [PATCH 2/9] Added notebook --- main.ipynb | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 main.ipynb diff --git a/main.ipynb b/main.ipynb new file mode 100644 index 0000000..9234601 --- /dev/null +++ b/main.ipynb @@ -0,0 +1,60 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import os" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'c:\\\\Users\\\\huism\\\\Documents\\\\git-workshop'" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "os.getcwd()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3.10.8 64-bit (microsoft store)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.8" + }, + "orig_nbformat": 4, + "vscode": { + "interpreter": { + "hash": "83185f904897ba398cabf996449e08b720a5f34331c59dae0cfb0e190b83f831" + } + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} From 1db87b6fb667b501fac4375a00c5fcf196c7c230 Mon Sep 17 00:00:00 2001 From: Jules Huisman Date: Sun, 23 Oct 2022 12:19:20 +0200 Subject: [PATCH 3/9] Delete notebook --- main.ipynb | 60 ------------------------------------------------------ 1 file changed, 60 deletions(-) delete mode 100644 main.ipynb diff --git a/main.ipynb b/main.ipynb deleted file mode 100644 index 9234601..0000000 --- a/main.ipynb +++ /dev/null @@ -1,60 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "import os" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'c:\\\\Users\\\\huism\\\\Documents\\\\git-workshop'" - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "os.getcwd()" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3.10.8 64-bit (microsoft store)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.8" - }, - "orig_nbformat": 4, - "vscode": { - "interpreter": { - "hash": "83185f904897ba398cabf996449e08b720a5f34331c59dae0cfb0e190b83f831" - } - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} From f1893a63956f3036261e7efb47a41e9c5d925da5 Mon Sep 17 00:00:00 2001 From: Jules Huisman Date: Sun, 23 Oct 2022 12:15:30 +0200 Subject: [PATCH 4/9] Added a comment --- main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.py b/main.py index 4b8ec79..9effcc7 100644 --- a/main.py +++ b/main.py @@ -1,3 +1,5 @@ +# This was made in development + from urllib.request import Request, urlopen def fetch_random_dad_joke() -> str: From 8cdfbd92e1cc1615970d3a73a14ae3c592c17161 Mon Sep 17 00:00:00 2001 From: Jules Huisman Date: Sun, 23 Oct 2022 12:18:14 +0200 Subject: [PATCH 5/9] Added notebook --- main.ipynb | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 main.ipynb diff --git a/main.ipynb b/main.ipynb new file mode 100644 index 0000000..9234601 --- /dev/null +++ b/main.ipynb @@ -0,0 +1,60 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import os" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'c:\\\\Users\\\\huism\\\\Documents\\\\git-workshop'" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "os.getcwd()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3.10.8 64-bit (microsoft store)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.8" + }, + "orig_nbformat": 4, + "vscode": { + "interpreter": { + "hash": "83185f904897ba398cabf996449e08b720a5f34331c59dae0cfb0e190b83f831" + } + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} From 94dc569991ddcf4704a82533011c8e61c10f9b26 Mon Sep 17 00:00:00 2001 From: Jules Huisman Date: Sun, 23 Oct 2022 12:19:20 +0200 Subject: [PATCH 6/9] Delete notebook --- main.ipynb | 60 ------------------------------------------------------ 1 file changed, 60 deletions(-) delete mode 100644 main.ipynb diff --git a/main.ipynb b/main.ipynb deleted file mode 100644 index 9234601..0000000 --- a/main.ipynb +++ /dev/null @@ -1,60 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "import os" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'c:\\\\Users\\\\huism\\\\Documents\\\\git-workshop'" - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "os.getcwd()" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3.10.8 64-bit (microsoft store)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.8" - }, - "orig_nbformat": 4, - "vscode": { - "interpreter": { - "hash": "83185f904897ba398cabf996449e08b720a5f34331c59dae0cfb0e190b83f831" - } - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} From dac161fdbbe89b32e6cdae49c78f270436eac335 Mon Sep 17 00:00:00 2001 From: Jules Huisman Date: Sun, 23 Oct 2022 12:26:42 +0200 Subject: [PATCH 7/9] Added a docstring --- main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 9effcc7..28a4ad9 100644 --- a/main.py +++ b/main.py @@ -1,8 +1,9 @@ -# This was made in development - from urllib.request import Request, urlopen def fetch_random_dad_joke() -> str: + """ + Fetch a random dad joke. + """ req = Request( url="https://icanhazdadjoke.com/", headers={ From 321db7fe559eb5207258cfdb3f521711d9df7ed6 Mon Sep 17 00:00:00 2001 From: Bernard Wezeman Date: Sun, 23 Oct 2022 21:11:43 +0200 Subject: [PATCH 8/9] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 435339b..31325af 100644 --- a/README.md +++ b/README.md @@ -14,4 +14,6 @@ def fetch_random_dad_joke() -> str: return urlopen(req).read().decode("utf-8") print(fetch_random_dad_joke()) -``` \ No newline at end of file +``` + +Authored by Jules Huisman From 3cd8a39f874c2ffefa558ad315a2e707345a5c46 Mon Sep 17 00:00:00 2001 From: Bernard Wezeman Date: Sun, 23 Oct 2022 22:05:56 +0200 Subject: [PATCH 9/9] Create main.py --- .github/workflows/main.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .github/workflows/main.py diff --git a/.github/workflows/main.py b/.github/workflows/main.py new file mode 100644 index 0000000..ebdb4bc --- /dev/null +++ b/.github/workflows/main.py @@ -0,0 +1,7 @@ +name: Test repo code +on: [pull_request] +jobs: + test-our-code: + runs-on: ubuntu-latest + steps: + - run: echo "🎉 Our code works flawelessly."