From a4f27ded39c480fb9e7ebae894c7065d37053ed2 Mon Sep 17 00:00:00 2001 From: Chloe White Date: Sun, 21 Sep 2025 19:13:02 -0500 Subject: [PATCH 1/9] 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/9] 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/9] 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") From ba0ad8ee11f83c0b6fbed794b5ae934739aebd0b Mon Sep 17 00:00:00 2001 From: Chloe White Date: Sun, 21 Sep 2025 19:49:35 -0500 Subject: [PATCH 4/9] tkinter gui for student management --- student_management/app.py | 153 ++++++++++++++++++++++++++++++++ student_management/students.csv | 0 2 files changed, 153 insertions(+) create mode 100644 student_management/app.py create mode 100644 student_management/students.csv diff --git a/student_management/app.py b/student_management/app.py new file mode 100644 index 0000000..a49b107 --- /dev/null +++ b/student_management/app.py @@ -0,0 +1,153 @@ +import tkinter as tk +from tkinter import messagebox, simpledialog +import pandas as pd +import os + +# ============================== +# Hardcoded admin credentials +# ============================== +USERNAME = "admin" +PASSWORD = "password123" + +# File to store student data +DATA_FILE = "students.csv" + +# Ensure CSV exists +if not os.path.exists(DATA_FILE): + df = pd.DataFrame(columns=["Roll No", "Name", "Address", "DOB"]) + df.to_csv(DATA_FILE, index=False) + +# ============================== +# Helper functions +# ============================== +def get_students(): + return pd.read_csv(DATA_FILE) + +def save_students(df): + df.to_csv(DATA_FILE, index=False) + +def generate_roll_no(): + df = get_students() + if df.empty: + return 1 + else: + return df["Roll No"].max() + 1 + +# ============================== +# Student operations +# ============================== +def add_student(): + name = simpledialog.askstring("Input", "Enter student name:") + address = simpledialog.askstring("Input", "Enter student address:") + dob = simpledialog.askstring("Input", "Enter student DOB (YYYY-MM-DD):") + + if name and address and dob: + roll_no = generate_roll_no() + df = get_students() + df.loc[len(df)] = [roll_no, name, address, dob] + save_students(df) + messagebox.showinfo("Success", f"Student {name} added with Roll No {roll_no}") + else: + messagebox.showwarning("Input Error", "All fields are required!") + +def update_student(): + roll_no = simpledialog.askinteger("Input", "Enter roll number to update:") + df = get_students() + + if roll_no in df["Roll No"].values: + name = simpledialog.askstring("Input", "Enter new name (leave blank to keep same):") + address = simpledialog.askstring("Input", "Enter new address (leave blank to keep same):") + dob = simpledialog.askstring("Input", "Enter new DOB (leave blank to keep same):") + + idx = df.index[df["Roll No"] == roll_no][0] + + if name: + df.at[idx, "Name"] = name + if address: + df.at[idx, "Address"] = address + if dob: + df.at[idx, "DOB"] = dob + + save_students(df) + messagebox.showinfo("Success", f"Student with Roll No {roll_no} updated!") + else: + messagebox.showerror("Error", "Roll number not found!") + +def delete_student(): + roll_no = simpledialog.askinteger("Input", "Enter roll number to delete:") + df = get_students() + + if roll_no in df["Roll No"].values: + df = df[df["Roll No"] != roll_no] + save_students(df) + messagebox.showinfo("Deleted", f"Student with Roll No {roll_no} deleted!") + else: + messagebox.showerror("Error", "Roll number not found!") + +def search_student(): + choice = simpledialog.askstring("Search", "Search by 'roll' or 'name'?").lower() + df = get_students() + + if choice == "roll": + roll_no = simpledialog.askinteger("Input", "Enter roll number:") + result = df[df["Roll No"] == roll_no] + elif choice == "name": + name = simpledialog.askstring("Input", "Enter name:") + result = df[df["Name"].str.contains(name, case=False, na=False)] + else: + messagebox.showerror("Error", "Invalid choice!") + return + + if not result.empty: + messagebox.showinfo("Result", result.to_string(index=False)) + else: + messagebox.showinfo("Result", "No matching student found.") + +# ============================== +# Login + Dashboard +# ============================== +def login(): + entered_username = username_entry.get() + entered_password = password_entry.get() + + if entered_username == USERNAME and entered_password == PASSWORD: + messagebox.showinfo("Login Success", "Welcome, Admin!") + root.destroy() + open_dashboard() + else: + messagebox.showerror("Login Failed", "Invalid username or password") + +def open_dashboard(): + dashboard = tk.Tk() + dashboard.title("Student Management System") + dashboard.geometry("400x400") + + tk.Label(dashboard, text="Student Management System", + font=("Arial", 14, "bold")).pack(pady=15) + + tk.Button(dashboard, text="Add Student", command=add_student, width=25).pack(pady=5) + tk.Button(dashboard, text="Update Student", command=update_student, width=25).pack(pady=5) + tk.Button(dashboard, text="Delete Student", command=delete_student, width=25).pack(pady=5) + tk.Button(dashboard, text="Search Student", command=search_student, width=25).pack(pady=5) + tk.Button(dashboard, text="Exit", command=dashboard.quit, width=25).pack(pady=10) + + dashboard.mainloop() + +# ============================== +# Main Login Window +# ============================== +root = tk.Tk() +root.title("Admin Login") +root.geometry("300x200") + +tk.Label(root, text="Username:").pack(pady=5) +username_entry = tk.Entry(root) +username_entry.pack(pady=5) + +tk.Label(root, text="Password:").pack(pady=5) +password_entry = tk.Entry(root, show="*") +password_entry.pack(pady=5) + +tk.Button(root, text="Login", command=login).pack(pady=20) + +root.mainloop() diff --git a/student_management/students.csv b/student_management/students.csv new file mode 100644 index 0000000..e69de29 From 0bfc5d34b34e8d02499b4b33886e4ca3a2c732aa Mon Sep 17 00:00:00 2001 From: Chloe White Date: Sun, 21 Sep 2025 19:56:27 -0500 Subject: [PATCH 5/9] edited students.csv file --- student_management/students.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/student_management/students.csv b/student_management/students.csv index e69de29..5859a58 100644 --- a/student_management/students.csv +++ b/student_management/students.csv @@ -0,0 +1 @@ +Roll No,Name,Address,DOB From 4936aaba65cb4fdd785ff2b0c01f839051628c07 Mon Sep 17 00:00:00 2001 From: Chloe White Date: Sun, 21 Sep 2025 20:46:28 -0500 Subject: [PATCH 6/9] added basic tkinter app skeleton --- todo_list/todo.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 todo_list/todo.py diff --git a/todo_list/todo.py b/todo_list/todo.py new file mode 100644 index 0000000..e69de29 From 357308d4f24278bbbc550ed61dd4793da2c00da7 Mon Sep 17 00:00:00 2001 From: Chloe White Date: Sun, 21 Sep 2025 20:49:23 -0500 Subject: [PATCH 7/9] added placeholder functions and buttons for tasks --- todo_list/todo.py | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/todo_list/todo.py b/todo_list/todo.py index e69de29..8ed1cfc 100644 --- a/todo_list/todo.py +++ b/todo_list/todo.py @@ -0,0 +1,40 @@ +# todo_app.py +""" +A simple To-Do List app skeleton using Tkinter. +Google Calendar API integration will be added later. +""" +import tkinter as tk + +def main(): + root = tk.Tk() + root.title("To-Do List") + root.geometry("400x400") + label = tk.Label(root, text="To-Do List App Skeleton") + label.pack(pady=20) + root.mainloop() + +if __name__ == "__main__": + main() + + +tasks = [] +def add_task(task): + tasks.append(task) + print(f"Task added: {task}") + + def remove_task(task): + if task in tasks: + tasks.remove(task) + print(f"Task removed: {task}") + else: + print(f"Task not found: {task}") + + print("Remove task function") + + add_button = tk.Button(root, text="Add Task", command=lambda: add_task("Sample Task")) + add_button.pack(pady=10) + remove_button = tk.Button(root, text="Remove Task", command=lambda: remove_task("Sample Task")) + remove_button.pack(pady=10) + print("Add task function") + + \ No newline at end of file From 8206ab91392f0cae7ff74934ab93bb36166b8e33 Mon Sep 17 00:00:00 2001 From: Chloe White Date: Sun, 21 Sep 2025 20:50:45 -0500 Subject: [PATCH 8/9] added a README for this issue --- todo_list/README.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 todo_list/README.md diff --git a/todo_list/README.md b/todo_list/README.md new file mode 100644 index 0000000..2cc69bf --- /dev/null +++ b/todo_list/README.md @@ -0,0 +1,6 @@ +# To-Do List Application + +This is a simple To-Do List app skeleton using Tkinter. +Planned features: +- Add and remove tasks +- Google Calendar API integration for syncing tasks From be99875b9271a204740f9a21ea75a71268e9f867 Mon Sep 17 00:00:00 2001 From: Chloe White Date: Sun, 21 Sep 2025 20:55:22 -0500 Subject: [PATCH 9/9] function for google calendar api sync --- todo_list/todo.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/todo_list/todo.py b/todo_list/todo.py index 8ed1cfc..aa9b1cf 100644 --- a/todo_list/todo.py +++ b/todo_list/todo.py @@ -3,6 +3,7 @@ A simple To-Do List app skeleton using Tkinter. Google Calendar API integration will be added later. """ +from logging import root import tkinter as tk def main(): @@ -37,4 +38,7 @@ def remove_task(task): remove_button.pack(pady=10) print("Add task function") - \ No newline at end of file + + def sync_with_google_calendar(): + # Placeholder function for Google Calendar API integration + print("Syncing with Google Calendar (placeholder)")