From 040a65c76f8524e8fb7223a40f3df824c10dbfec Mon Sep 17 00:00:00 2001 From: jcon7654 Date: Sat, 16 Aug 2025 16:19:36 -0700 Subject: [PATCH 1/8] Update readme --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9d6f60d..00de995 100644 --- a/README.md +++ b/README.md @@ -1 +1,4 @@ -# python_bootcamp \ No newline at end of file +# python_bootcamp +> Attempt to use Github instead of Jupyter for python bootcamp coding + +Let's go!! \ No newline at end of file From 8b7090961452c277ef945d9b1e530bcfb5edbb87 Mon Sep 17 00:00:00 2001 From: jcon7654 Date: Thu, 21 Aug 2025 08:15:11 -0700 Subject: [PATCH 2/8] Add python workflow --- .github/workflows/python_run.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/python_run.yml diff --git a/.github/workflows/python_run.yml b/.github/workflows/python_run.yml new file mode 100644 index 0000000..7e37db8 --- /dev/null +++ b/.github/workflows/python_run.yml @@ -0,0 +1,16 @@ +name: Python Workflow +on: pull_request +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Check out repo + uses: actions/checkout@v4 + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: '3.13' + - run: ./week02/week02.py + + + From d731645afa46f100e6c7cf59a759189ac1698f89 Mon Sep 17 00:00:00 2001 From: jcon7654 Date: Thu, 21 Aug 2025 08:15:30 -0700 Subject: [PATCH 3/8] Add week02 python code --- week02/week02.py | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 week02/week02.py diff --git a/week02/week02.py b/week02/week02.py new file mode 100644 index 0000000..ec63a8a --- /dev/null +++ b/week02/week02.py @@ -0,0 +1,58 @@ +# Week02 Stuff +## Receipts +# create a product and price for 3 items +p1_name, p1_price = "Books", 49.95 +p2_name, p2_price = "Computer", 579.99 +p3_name, p3_price = "Monitor", 124.89 + +# create a company name and info +company_name = "coding temple, inc." +company_address = "283 Franklin St." +company_city = "Boston, MA" + +# declare ending message +message = "Yo, thank you and come again!!" + +# create a top border +print("*" * 50) + +# print company information first, using format +#print( "\t\t{ }".format(company_name.title()) ) +print( "*\t\t{}".format(company_name.title()), "\t\t *") +print( "*\t\t{}".format(company_address), "\t\t *" ) +print( "*\t\t{}".format(company_city), "\t\t\t *" ) + +# print line between sections +print("=" * 50) + +# print product details +print( "*\t{}\t\t${}".format(p1_name.title(), p1_price), "\t\t\t *" ) +print( "*\t{}\t${}".format(p2_name.title(), p2_price), "\t\t *" ) +print( "*\t{}\t\t${}".format(p3_name.title(), p3_price), "\t\t *" ) +print("=" * 50) + +# print out header for section of total +total = p1_price + p2_price + p3_price +print( "*\t\t\t${}".format(total), "\t\t *" ) + +print("=" * 50) +print( "*", " " * 46, "*\n*\t", message.title(), "\t *\n*", " " * 46, "*" ) +print("*" * 50) + +var_hello = "Hello" +var_hello_len_count = int(len(var_hello)) +print(var_hello_len_count) +var_hello_rev = "" +print(var_hello) +# print(var_hello[len(var_hello) -1]) +#var_hello_len_count = var_hello_len_count -1 +#var_hello_rev = var_hello_rev + var_hello[var_hello_len_count] +#print(var_hello_rev) +#var_hello_len_count = var_hello_len_count -1 +#var_hello_rev = var_hello_rev + var_hello[var_hello_len_count] +print(var_hello_rev) +while (var_hello_len_count > 0): + var_hello_len_count = var_hello_len_count - 1 + var_hello_rev = var_hello_rev + var_hello[var_hello_len_count] +print(var_hello_rev) +print(var_hello[::-1]) \ No newline at end of file From 8b88d02aa5631d25df07e488fa9c4915de3c7328 Mon Sep 17 00:00:00 2001 From: jcon7654 Date: Thu, 21 Aug 2025 11:04:07 -0700 Subject: [PATCH 4/8] Add permissions --- .github/workflows/python_run.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/python_run.yml b/.github/workflows/python_run.yml index 7e37db8..79cf950 100644 --- a/.github/workflows/python_run.yml +++ b/.github/workflows/python_run.yml @@ -1,5 +1,8 @@ name: Python Workflow on: pull_request +permissions: + contents: read + id-token: write jobs: build: runs-on: ubuntu-latest From f0a3a693e7fde8779904b5f120adeb90c95295e8 Mon Sep 17 00:00:00 2001 From: jcon7654 Date: Thu, 21 Aug 2025 12:45:20 -0700 Subject: [PATCH 5/8] Setup on WSL --- .github/workflows/python_run.yml | 38 +++++------ README.md | 6 +- week02/week02.py | 114 +++++++++++++++---------------- 3 files changed, 79 insertions(+), 79 deletions(-) diff --git a/.github/workflows/python_run.yml b/.github/workflows/python_run.yml index 79cf950..9a1ec7a 100644 --- a/.github/workflows/python_run.yml +++ b/.github/workflows/python_run.yml @@ -1,19 +1,19 @@ -name: Python Workflow -on: pull_request -permissions: - contents: read - id-token: write -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Check out repo - uses: actions/checkout@v4 - - name: Install Python - uses: actions/setup-python@v5 - with: - python-version: '3.13' - - run: ./week02/week02.py - - - +name: Python Workflow +on: pull_request +permissions: + contents: read + id-token: write +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Check out repo + uses: actions/checkout@v4 + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: '3.13' + - run: ./week02/week02.py + + + diff --git a/README.md b/README.md index 00de995..0924e3a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# python_bootcamp -> Attempt to use Github instead of Jupyter for python bootcamp coding - +# python_bootcamp +> Attempt to use Github instead of Jupyter for python bootcamp coding + Let's go!! \ No newline at end of file diff --git a/week02/week02.py b/week02/week02.py index ec63a8a..93b962f 100644 --- a/week02/week02.py +++ b/week02/week02.py @@ -1,58 +1,58 @@ -# Week02 Stuff -## Receipts -# create a product and price for 3 items -p1_name, p1_price = "Books", 49.95 -p2_name, p2_price = "Computer", 579.99 -p3_name, p3_price = "Monitor", 124.89 - -# create a company name and info -company_name = "coding temple, inc." -company_address = "283 Franklin St." -company_city = "Boston, MA" - -# declare ending message -message = "Yo, thank you and come again!!" - -# create a top border -print("*" * 50) - -# print company information first, using format -#print( "\t\t{ }".format(company_name.title()) ) -print( "*\t\t{}".format(company_name.title()), "\t\t *") -print( "*\t\t{}".format(company_address), "\t\t *" ) -print( "*\t\t{}".format(company_city), "\t\t\t *" ) - -# print line between sections -print("=" * 50) - -# print product details -print( "*\t{}\t\t${}".format(p1_name.title(), p1_price), "\t\t\t *" ) -print( "*\t{}\t${}".format(p2_name.title(), p2_price), "\t\t *" ) -print( "*\t{}\t\t${}".format(p3_name.title(), p3_price), "\t\t *" ) -print("=" * 50) - -# print out header for section of total -total = p1_price + p2_price + p3_price -print( "*\t\t\t${}".format(total), "\t\t *" ) - -print("=" * 50) -print( "*", " " * 46, "*\n*\t", message.title(), "\t *\n*", " " * 46, "*" ) -print("*" * 50) - -var_hello = "Hello" -var_hello_len_count = int(len(var_hello)) -print(var_hello_len_count) -var_hello_rev = "" -print(var_hello) -# print(var_hello[len(var_hello) -1]) -#var_hello_len_count = var_hello_len_count -1 -#var_hello_rev = var_hello_rev + var_hello[var_hello_len_count] -#print(var_hello_rev) -#var_hello_len_count = var_hello_len_count -1 -#var_hello_rev = var_hello_rev + var_hello[var_hello_len_count] -print(var_hello_rev) -while (var_hello_len_count > 0): - var_hello_len_count = var_hello_len_count - 1 - var_hello_rev = var_hello_rev + var_hello[var_hello_len_count] -print(var_hello_rev) +# Week02 Stuff +## Receipts +# create a product and price for 3 items +p1_name, p1_price = "Books", 49.95 +p2_name, p2_price = "Computer", 579.99 +p3_name, p3_price = "Monitor", 124.89 + +# create a company name and info +company_name = "coding temple, inc." +company_address = "283 Franklin St." +company_city = "Boston, MA" + +# declare ending message +message = "Yo, thank you and come again!!" + +# create a top border +print("*" * 50) + +# print company information first, using format +#print( "\t\t{ }".format(company_name.title()) ) +print( "*\t\t{}".format(company_name.title()), "\t\t *") +print( "*\t\t{}".format(company_address), "\t\t *" ) +print( "*\t\t{}".format(company_city), "\t\t\t *" ) + +# print line between sections +print("=" * 50) + +# print product details +print( "*\t{}\t\t${}".format(p1_name.title(), p1_price), "\t\t\t *" ) +print( "*\t{}\t${}".format(p2_name.title(), p2_price), "\t\t *" ) +print( "*\t{}\t\t${}".format(p3_name.title(), p3_price), "\t\t *" ) +print("=" * 50) + +# print out header for section of total +total = p1_price + p2_price + p3_price +print( "*\t\t\t${}".format(total), "\t\t *" ) + +print("=" * 50) +print( "*", " " * 46, "*\n*\t", message.title(), "\t *\n*", " " * 46, "*" ) +print("*" * 50) + +var_hello = "Hello" +var_hello_len_count = int(len(var_hello)) +print(var_hello_len_count) +var_hello_rev = "" +print(var_hello) +# print(var_hello[len(var_hello) -1]) +#var_hello_len_count = var_hello_len_count -1 +#var_hello_rev = var_hello_rev + var_hello[var_hello_len_count] +#print(var_hello_rev) +#var_hello_len_count = var_hello_len_count -1 +#var_hello_rev = var_hello_rev + var_hello[var_hello_len_count] +print(var_hello_rev) +while (var_hello_len_count > 0): + var_hello_len_count = var_hello_len_count - 1 + var_hello_rev = var_hello_rev + var_hello[var_hello_len_count] +print(var_hello_rev) print(var_hello[::-1]) \ No newline at end of file From c9444610fcf4fbcb91601317cca35c8676718223 Mon Sep 17 00:00:00 2001 From: jcon7654 Date: Thu, 21 Aug 2025 12:48:12 -0700 Subject: [PATCH 6/8] Removing unneeded lines --- week02/week02.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/week02/week02.py b/week02/week02.py index 93b962f..ebaff1c 100644 --- a/week02/week02.py +++ b/week02/week02.py @@ -44,12 +44,6 @@ print(var_hello_len_count) var_hello_rev = "" print(var_hello) -# print(var_hello[len(var_hello) -1]) -#var_hello_len_count = var_hello_len_count -1 -#var_hello_rev = var_hello_rev + var_hello[var_hello_len_count] -#print(var_hello_rev) -#var_hello_len_count = var_hello_len_count -1 -#var_hello_rev = var_hello_rev + var_hello[var_hello_len_count] print(var_hello_rev) while (var_hello_len_count > 0): var_hello_len_count = var_hello_len_count - 1 From 1d8f957f1399b4ae6749e8242ea190192877a933 Mon Sep 17 00:00:00 2001 From: jcon7654 Date: Thu, 21 Aug 2025 22:44:33 -0700 Subject: [PATCH 7/8] Adding python command --- .github/workflows/python_run.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python_run.yml b/.github/workflows/python_run.yml index 9a1ec7a..b0846f1 100644 --- a/.github/workflows/python_run.yml +++ b/.github/workflows/python_run.yml @@ -13,7 +13,7 @@ jobs: uses: actions/setup-python@v5 with: python-version: '3.13' - - run: ./week02/week02.py + - run: python ./week02/week02.py From 7c2e4a6c653b9efb37d4b27fd5edbe6073b20dca Mon Sep 17 00:00:00 2001 From: jcon7654 Date: Thu, 21 Aug 2025 22:47:50 -0700 Subject: [PATCH 8/8] Update job and step names --- .github/workflows/python_run.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python_run.yml b/.github/workflows/python_run.yml index b0846f1..f6afe8c 100644 --- a/.github/workflows/python_run.yml +++ b/.github/workflows/python_run.yml @@ -4,7 +4,7 @@ permissions: contents: read id-token: write jobs: - build: + Python-Run: runs-on: ubuntu-latest steps: - name: Check out repo @@ -13,7 +13,8 @@ jobs: uses: actions/setup-python@v5 with: python-version: '3.13' - - run: python ./week02/week02.py + - name: Run Python + run: python ./week02/week02.py