From a4f27ded39c480fb9e7ebae894c7065d37053ed2 Mon Sep 17 00:00:00 2001 From: Chloe White Date: Sun, 21 Sep 2025 19:13:02 -0500 Subject: [PATCH 1/3] added needed files --- finance_dashboard/README.md | 0 finance_dashboard/app.py | 1 + finance_dashboard/requirements.txt | 0 3 files changed, 1 insertion(+) create mode 100644 finance_dashboard/README.md create mode 100644 finance_dashboard/app.py create mode 100644 finance_dashboard/requirements.txt diff --git a/finance_dashboard/README.md b/finance_dashboard/README.md new file mode 100644 index 0000000..e69de29 diff --git a/finance_dashboard/app.py b/finance_dashboard/app.py new file mode 100644 index 0000000..4ebb4dc --- /dev/null +++ b/finance_dashboard/app.py @@ -0,0 +1 @@ +##finance dashboard issue :] \ No newline at end of file diff --git a/finance_dashboard/requirements.txt b/finance_dashboard/requirements.txt new file mode 100644 index 0000000..e69de29 From 09163f1d3fc6c3307c4ae12eac20e3c4ed810b82 Mon Sep 17 00:00:00 2001 From: Chloe White Date: Sun, 21 Sep 2025 19:24:13 -0500 Subject: [PATCH 2/3] implemented a simple finance dashboard setup --- finance_dashboard/README.md | 9 +++++++++ finance_dashboard/app.py | 25 ++++++++++++++++++++++++- finance_dashboard/requirements.txt | 2 ++ 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/finance_dashboard/README.md b/finance_dashboard/README.md index e69de29..bcd6045 100644 --- a/finance_dashboard/README.md +++ b/finance_dashboard/README.md @@ -0,0 +1,9 @@ +# Finance Dashboard + +This is a beginner-friendly finance dashboard built with Flask. +It allows users to track expenses and view total spending. + +## Setup +1. Install requirements: + ```bash + pip install -r requirements.txt diff --git a/finance_dashboard/app.py b/finance_dashboard/app.py index 4ebb4dc..29a94a5 100644 --- a/finance_dashboard/app.py +++ b/finance_dashboard/app.py @@ -1 +1,24 @@ -##finance dashboard issue :] \ No newline at end of file +##finance dashboard issue :] +from flask import Flask, render_template_string + +app = Flask(__name__) + +# Sample expense data +expenses = [ + {"category": "Food", "amount": 120}, + {"category": "Rent", "amount": 800}, + {"category": "Transport", "amount": 60}, +] + +@app.route("/") +def dashboard(): + total = sum(e["amount"] for e in expenses) + categories = ", ".join(e["category"] for e in expenses) + return render_template_string(""" +

Finance Dashboard

+

Total Spending: ${{ total }}

+

Categories: {{ categories }}

+ """, total=total, categories=categories) + +if __name__ == "__main__": + app.run(debug=True) diff --git a/finance_dashboard/requirements.txt b/finance_dashboard/requirements.txt index e69de29..685627a 100644 --- a/finance_dashboard/requirements.txt +++ b/finance_dashboard/requirements.txt @@ -0,0 +1,2 @@ +flask +matplotlib From d10914fa77308306c05b6f6039acd574843f8bdf Mon Sep 17 00:00:00 2001 From: Chloe White Date: Sun, 21 Sep 2025 19:35:10 -0500 Subject: [PATCH 3/3] added sample.txt file for my word frequency code as well as a README --- word_frequency/README.md | 0 word_frequency/counter_sample.txt | 0 word_frequency/word_frequency_counter.py | 11 +++++++++++ 3 files changed, 11 insertions(+) create mode 100644 word_frequency/README.md create mode 100644 word_frequency/counter_sample.txt create mode 100644 word_frequency/word_frequency_counter.py diff --git a/word_frequency/README.md b/word_frequency/README.md new file mode 100644 index 0000000..e69de29 diff --git a/word_frequency/counter_sample.txt b/word_frequency/counter_sample.txt new file mode 100644 index 0000000..e69de29 diff --git a/word_frequency/word_frequency_counter.py b/word_frequency/word_frequency_counter.py new file mode 100644 index 0000000..7d11f54 --- /dev/null +++ b/word_frequency/word_frequency_counter.py @@ -0,0 +1,11 @@ +from collections import Counter + +def count_words(filename): + with open(filename, "r", encoding="utf-8") as f: + text = f.read().lower().split() + word_counts = Counter(text) + for word, count in word_counts.most_common(10): + print(f"{word}: {count}") + +if __name__ == "__main__": + count_words("counter_sample.txt")