Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions finance_dashboard/README.md
Original file line number Diff line number Diff line change
@@ -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
24 changes: 24 additions & 0 deletions finance_dashboard/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
##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("""
<h1>Finance Dashboard</h1>
<p><b>Total Spending:</b> ${{ total }}</p>
<p><b>Categories:</b> {{ categories }}</p>
""", total=total, categories=categories)

if __name__ == "__main__":
app.run(debug=True)
2 changes: 2 additions & 0 deletions finance_dashboard/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
flask
matplotlib
153 changes: 153 additions & 0 deletions student_management/app.py
Original file line number Diff line number Diff line change
@@ -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()
1 change: 1 addition & 0 deletions student_management/students.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Roll No,Name,Address,DOB
6 changes: 6 additions & 0 deletions todo_list/README.md
Original file line number Diff line number Diff line change
@@ -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
44 changes: 44 additions & 0 deletions todo_list/todo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# todo_app.py
"""
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():
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")


def sync_with_google_calendar():
# Placeholder function for Google Calendar API integration
print("Syncing with Google Calendar (placeholder)")
Empty file added word_frequency/README.md
Empty file.
Empty file.
11 changes: 11 additions & 0 deletions word_frequency/word_frequency_counter.py
Original file line number Diff line number Diff line change
@@ -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")