Skip to content

Commit ecfa4f2

Browse files
committed
Working state backup
1 parent 52de544 commit ecfa4f2

File tree

10 files changed

+344
-2
lines changed

10 files changed

+344
-2
lines changed

Password Manager/main.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This is a sample Python script.
2+
3+
# Press Shift+F10 to execute it or replace it with your code.
4+
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
5+
6+
7+
def print_hi(name):
8+
# Use a breakpoint in the code line below to debug your script.
9+
print(f'Hi, {name}') # Press Ctrl+F8 to toggle the breakpoint.
10+
11+
12+
# Press the green button in the gutter to run the script.
13+
if __name__ == '__main__':
14+
print_hi('PyCharm')
15+
16+
# See PyCharm help at https://www.jetbrains.com/help/pycharm/

Timer Project/.idea/Timer Project.iml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Timer Project/main.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This is a sample Python script.
2+
3+
# Press Shift+F10 to execute it or replace it with your code.
4+
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
5+
6+
7+
def print_hi(name):
8+
# Use a breakpoint in the code line below to debug your script.
9+
print(f'Hi, {name}') # Press Ctrl+F8 to toggle the breakpoint.
10+
11+
12+
# Press the green button in the gutter to run the script.
13+
if __name__ == '__main__':
14+
print_hi('PyCharm')
15+
16+
# See PyCharm help at https://www.jetbrains.com/help/pycharm/
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Qodana
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
qodana:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
checks: write
16+
steps:
17+
- uses: actions/checkout@v3
18+
with:
19+
ref: ${{ github.event.pull_request.head.sha }}
20+
fetch-depth: 0
21+
- name: 'Qodana Scan'
22+
uses: JetBrains/qodana-action@v2024.3
23+
env:
24+
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
25+
with:
26+
args: --baseline,qodana.sarif.json

student mangement/.idea/student mangement.iml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

student mangement/data.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"ssssssss": {
3+
"email": "ssssssssss",
4+
"password": "WQ$rU3eZ5oQ#",
5+
"Roll Number:": "ssssssssss",
6+
"Subject_name": "ssssssssssss"
7+
},
8+
"raj": {
9+
"email": "srnwda",
10+
"password": "O#*XvOV78vbV3#c",
11+
"Roll Number:": "eeee",
12+
"Subject_name": "eeeeeee"
13+
},
14+
"shubham": {
15+
"email": "sr",
16+
"password": "7x#8Vo1Qie8Aj#$N",
17+
"Roll Number:": "ddddde",
18+
"Subject_name": "ddddddddddd"
19+
},
20+
"poonam": {
21+
"email": "abc@gmail.com",
22+
"password": "65454343",
23+
"Roll Number:": "101",
24+
"Subject_name": "cse"
25+
},
26+
"shubham RAj": {
27+
"email": "shubhamraj@gmail.com",
28+
"password": "2yL8Edd!cqz05&Zshubham",
29+
"Roll Number:": "08210cs22110.6",
30+
"Subject_name": "cse"
31+
},
32+
"himanshu": {
33+
"email": "srnwda@",
34+
"password": "W$$T6N7AOn7M2&%w",
35+
"Roll Number:": "shubham",
36+
"Subject_name": "cse"
37+
}
38+
}

student mangement/main.py

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
import pandas as pd
2+
from tkinter import *
3+
from tkinter import ttk
4+
5+
6+
data=pd.read_csv("student.csv")
7+
8+
# Color Configuration
9+
PINK = "#e2979c"
10+
RED = "#e7305b"
11+
GREEN = "#9bdeac"
12+
YELLOW = "#f7f5dd"
13+
14+
# Window Configuration
15+
password_manager = Tk()
16+
password_manager.configure(bg=YELLOW)
17+
password_manager.title("Student Management")
18+
password_manager.config(pady=100,padx=100)
19+
20+
# set up the lock_image
21+
canvas=Canvas(width=200,height=200,highlightthickness=0)
22+
image_set=PhotoImage(file="student.png")
23+
canvas.create_image(100,100,image=image_set)
24+
canvas.grid(row=0,column=1)
25+
26+
# label
27+
label_pop=Label(text="Enter Your Name",font=("Arial", 16, "bold"))
28+
label_pop.grid(row=1,column=0,columnspan=2)
29+
30+
label_pop=Label(text="Select Subject",font=("Arial", 16, "bold"))
31+
label_pop.grid(row=3,column=0,columnspan=2)
32+
33+
# Name Entry Section
34+
35+
name_entry=Entry(width=35)
36+
name_entry.grid(row=2,column=1,columnspan=2)
37+
# name_entry.insert(0,"Enter Your Name")
38+
39+
40+
states = data.name.to_list()
41+
42+
print(states)
43+
44+
option=[
45+
"iwt",
46+
"dsa"
47+
]
48+
49+
# # datatype of menu text
50+
# clicked = StringVar()
51+
#
52+
# # initial menu text
53+
# clicked.set( "Subject" )
54+
55+
drop = ttk.Combobox( password_manager ,textvariable= StringVar() )
56+
drop["values"]=option
57+
drop.grid(row=4,column=1,columnspan=2)
58+
59+
# print(data[hey])
60+
61+
def button_func():
62+
gather_info = name_entry.get()
63+
# hey = drop.get()
64+
if gather_info in states:
65+
coordinates = data[data.name == gather_info]
66+
a = coordinates.coa.item()
67+
print(a)
68+
69+
70+
check_button=Button(text="Check",command=button_func)
71+
check_button.grid(row=5,column=1,columnspan=2)
72+
73+
74+
password_manager.mainloop()
75+
76+

student mangement/student.csv

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
name,iwt,coa
2+
shubham,50,75
3+
raj,55,85
4+
balam,60,65

student mangement/student.png

5.99 KB
Loading

student mangement/student.py

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
from tkinter import *
2+
from tkinter import messagebox
3+
from random import choice,randint,shuffle
4+
import pyperclip
5+
import json
6+
7+
8+
9+
# ---------------------------- PASSWORD GENERATOR ------------------------------- #
10+
11+
12+
13+
def generate_password():
14+
letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u',
15+
'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
16+
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
17+
numbers = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
18+
symbols = ['!', '#', '$', '%', '&', '*', '+']
19+
20+
password_letters = [choice(letters) for char in range(randint(8, 10))]
21+
22+
password_symbols = [choice(symbols) for char_1 in range(randint(2, 4))]
23+
24+
password_numbers = [choice(numbers) for char_2 in range(randint(2, 4))]
25+
26+
password_list = password_letters + password_symbols + password_numbers
27+
shuffle(password_list)
28+
29+
password = "".join(password_list)
30+
31+
print(f"Your password is: {password}")
32+
33+
# in entry password entered
34+
password_entry.insert(0, password)
35+
36+
# password copy
37+
pyperclip.copy(password)
38+
# ---------------------------- SAVE PASSWORD ------------------------------- #
39+
40+
def student_info():
41+
student_argument = student_name.get()
42+
email_argument = email_entry.get()
43+
password_argument = password_entry.get()
44+
Roll_number_argument=Roll_number_entry.get()
45+
Subject_argument=Subject_entry.get()
46+
new_datas={
47+
student_argument:{
48+
"email":email_argument,
49+
"password":password_argument,
50+
"Roll Number:":Roll_number_argument,
51+
"Subject_name":Subject_argument
52+
}
53+
}
54+
55+
if len(student_argument)==0 or len(email_argument)==0 or len(password_argument)==0:
56+
messagebox.showinfo(title="Alert!!", message="You Left Some Credential Entry")
57+
else:
58+
is_ok =messagebox.askokcancel(title=student_argument,message=f"Saved Information \n \nEmail: {email_argument}"f"\n \n Password: {password_argument}")
59+
60+
if is_ok:
61+
try:
62+
with open("data.json","r") as filemanger:
63+
# filemanger.write(f"{website_argument}| {email_argument}|{password_argument} \n")
64+
65+
# Reading old data
66+
data = json.load(filemanger)
67+
except FileNotFoundError:
68+
with open("data.json" ,"w") as filemanger:
69+
# saving updating data
70+
json.dump(new_datas, filemanger,indent=4)
71+
72+
else:
73+
# updating old data with new data
74+
data.update(new_datas)
75+
with open("data.json" ,"w") as filemanger:
76+
# saving updating data
77+
json.dump(data, filemanger, indent=4)
78+
79+
finally:
80+
student_name.delete(0,END)
81+
password_entry.delete(0,END)
82+
email_entry.delete(0,END)
83+
84+
85+
def find_password():
86+
website=student_name.get()
87+
try:
88+
with open("data.json") as data_file:
89+
data=json.load(data_file)
90+
91+
except FileNotFoundError:
92+
messagebox.showinfo(title="error",message="no data found in file")
93+
94+
else:
95+
if website in data:
96+
email=data[website]["email"]
97+
password=data[website]["password"]
98+
messagebox.showinfo(title=website,message=f"Email:{email} \n Password:{password}")
99+
else:
100+
messagebox.showinfo(title="Error",message=f"No data found in file {website}.")
101+
102+
103+
104+
# ---------------------------- UI SETUP ------------------------------- #
105+
106+
107+
student_manager = Tk()
108+
student_manager.title("Student Manager ")
109+
110+
111+
student_manager.config(pady=50,padx=50)
112+
113+
# set up the image
114+
canvas=Canvas(width=200,height=200,highlightthickness=0)
115+
image_set=PhotoImage(file="student.png")
116+
canvas.create_image(100,100,image=image_set)
117+
canvas.grid(row=0,column=1)
118+
119+
# website icon setup
120+
student_name=Label(text="Name:")
121+
student_name.grid(row=1,column=0)
122+
123+
student_name=Entry(width=21)
124+
student_name.grid(row=1,column=1)
125+
126+
# website_entry.insert(0,"abc.com")
127+
128+
# email icon setup
129+
Email_name=Label(text="Email/Username:")
130+
Email_name.grid(row=2,column=0)
131+
132+
email_entry=Entry(width=39)
133+
email_entry.grid(row=2,column=1,columnspan=2)
134+
135+
136+
# password icon setup
137+
password_name=Label(text="Password:")
138+
password_name.grid(row=3,column=0)
139+
140+
password_entry=Entry(width=21)
141+
password_entry.grid(row=3,column=1)
142+
143+
Roll_number=Label(text="Roll Number")
144+
Roll_number.grid(row=4,column=0)
145+
146+
Roll_number_entry=Entry(width=39)
147+
Roll_number_entry.grid(row=4,column=1,columnspan=2)
148+
149+
# button work
150+
generate_password_button=Button(text="Generate Password",command=generate_password)
151+
generate_password_button.grid(row=3,column=2)
152+
153+
Subject_name=Label(text="Department Name:")
154+
Subject_name.grid(row=5,column=0)
155+
156+
Subject_entry=Entry(width=39)
157+
Subject_entry.grid(row=5,column=1,columnspan=2)
158+
159+
add_button=Button(text="Add",width=30,command=student_info)
160+
add_button.grid(row=6,column=1,columnspan=2)
161+
162+
# search button
163+
search_button=Button(text="Search",command=find_password)
164+
search_button.grid(row=1,column=2)
165+
166+
student_manager.mainloop()

0 commit comments

Comments
 (0)