-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
170 changed files
with
50,256 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
# Grade-Point-Average-Analyzer | ||
# Grade-Point-Average-Analyzer | ||
|
||
- |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,93 @@ | ||
from flask import Flask, render_template, request, url_for | ||
from flask import Flask, render_template, request, url_for, redirect | ||
from flaskext.mysql import MySQL | ||
|
||
app = Flask("GPA Calculator") | ||
app.config['MYSQL_DATABASE_USER'] = 'root' | ||
app.config['MYSQL_DATABASE_PASSWORD'] = 'justafolk' | ||
app.config['MYSQL_DATABASE_DB'] = 'gpa' | ||
|
||
mysql = MySQL() | ||
mysql.init_app(app) | ||
conn = mysql.connect() | ||
class Course: | ||
def __init__(self, name, credits, faculty = "NONE", course_type="BSC"): | ||
self.name = name | ||
self.credits = credits | ||
self.faculty = faculty | ||
self.course_type = course_type | ||
|
||
app = Flask(__name__) | ||
|
||
@app.route('/') | ||
def mainapp(): | ||
return render_template('index.html') | ||
return render_template('index.html', title="Home") | ||
|
||
@app.route('/semester/view', methods=['GET']) | ||
def viewsemester(): | ||
return render_template('index.html', title="Home") | ||
|
||
@app.route('/onboarding') | ||
@app.route('/semester/create') | ||
def onboarding(): | ||
return render_template('onboarding.html') | ||
return render_template('semesterform.html', title="Onboarding") | ||
|
||
@app.route('/login') | ||
def login(): | ||
return render_template('login.html', title="Login") | ||
|
||
@app.route('/signup') | ||
def signup(): | ||
return render_template('signup.html', title="Signup") | ||
|
||
@app.route('/registeruser', methods=['POST']) | ||
def registeruser(): | ||
username = request.form['username'] | ||
clgname = request.form['clgname'] | ||
misno = request.form['misno'] | ||
userbranch= request.form['userbranch'] | ||
useremail = request.form['useremail'] | ||
upass = request.form['pass'] | ||
sql = "INSERT INTO users (name, department, MIS, email, password, login_method) VALUES ('{}', '{}', '{}', '{}', '{}', '{}')".format(username, userbranch, misno, useremail, upass, "email") | ||
|
||
|
||
cursor = conn.cursor() | ||
cursor.execute(sql) | ||
conn.commit() | ||
cursor.close() | ||
|
||
return redirect('/') | ||
|
||
|
||
|
||
@app.route('/course/create', methods=['GET', 'POST']) | ||
def createcourse(): | ||
return render_template('create_course.html', title="Create Course") | ||
|
||
@app.route('/api/v1/createcourse', methods=['POST']) | ||
def createcourseapi(): | ||
name = request.form['name'] | ||
credits = request.form['credits'] | ||
faculty = request.form['faculty'] | ||
course_type = request.form['course_type'] | ||
new_course = course(name, credits, faculty, course_type) | ||
return redirect('/course/list') | ||
|
||
@app.route('/course/list', methods=['GET']) | ||
def course_list(): | ||
if(request.method == 'GET'): | ||
print("GET") | ||
coursename = request.args.get('name') | ||
|
||
cursor =conn.cursor() | ||
cursor.execute("SELECT * from courses") | ||
data = cursor.fetchone() | ||
print((data.__dict__), "chaltay") | ||
course = [Course("BSCS", 3), Course("BSCss", 2), Course("sslSCS", 1)] | ||
|
||
return render_template('course_list.html', title="Course List", courses=course, coursename=coursename ) | ||
|
||
|
||
@app.route('/home') | ||
def home(): | ||
return render_template('home.html') | ||
|
||
if __name__ == '__main__': | ||
app.run(host="0.0.0.0", port=8080, debug=True) | ||
app.run( debug=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
class Course: | ||
def __init__(self, name, credits, faculty, marks_distribution=0, seniors_advice = 0, friends_advice = 0, experience = 0, num_units = 0): | ||
self.name = name | ||
self.credits = credits | ||
self.faculty = faculty | ||
self.marks_distribution = marks_distribution | ||
self.seniors_advice = seniors_advice | ||
self.friends_advice = friends_advice | ||
self.experience = experience | ||
self.num_units = num_units | ||
|
||
|
||
class Semester: | ||
def __init__(self, name, duration, total_credits): | ||
self.name = name | ||
self.duration = duration | ||
self.total_credits = total_credits | ||
self.courses = dict() | ||
|
||
def addcourse(self, course, credits): | ||
self.courses[course.name] = credits | ||
|
||
def removecourse(self, course): | ||
self.courses.pop(course.name) | ||
|
||
|
||
|
||
class User: | ||
def __init__(self, name, current_year, department, MIS, birthday=None, login_method=None): | ||
self.name = name | ||
self.current_year = current_year | ||
self.department = department | ||
self.MIS = MIS | ||
self.birthday = birthday | ||
self.login_method = login_method | ||
self.semesters = set() | ||
|
||
def addsemester(self, semester): | ||
|
||
self.semesters.insert(semester) | ||
|
||
def rmsemester(self, semester): | ||
self.semesters.pop(semester) | ||
|
||
|
||
|
||
class Analyzer: | ||
def __init__(self, generosity): | ||
self.generosity = generosity | ||
|
||
def average_grades(self): | ||
# calculates the average grades based on the advices and experience | ||
grades = self.generosity | ||
return grades | ||
|
||
def assign_grades(self, totalmarks): | ||
# assigns grades based on the calculated average grades | ||
|
||
# generosity ranges from 1 to 10, 1 being not generous and 10 being generous | ||
# totalmarks ranges from 0 to 100 | ||
# create a if / switch case logic to assign grades based on the generosity | ||
marks = [90, 80, 70, 60, 50, 40, 30, 20, 10, 0] | ||
|
||
if self.generosity == 1: | ||
if totalmarks > 60: | ||
return 'AA' | ||
elif totalmarks > 50: | ||
return 'AB' | ||
elif totalmarks > 40: | ||
|
||
|
||
pass | ||
elif self.generosity == 2: | ||
|
||
|
||
pass | ||
|
||
def plot_grades(self): | ||
# plots the grades of each subject | ||
pass | ||
|
||
def plot_growth(self): | ||
# plots the growth throughout semesters | ||
pass | ||
|
||
def plot_credit_distribution(self): | ||
# plots a pie chart for credit distribution | ||
pass | ||
|
||
def plot_goal_met(self): | ||
# plots a graph showing if goals are met | ||
pass | ||
|
||
def assign_goals(self): | ||
# auto assigns goals for each subject with respect to given gpa goals | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+946 Bytes
static/css/.sass-cache/372217ca08acb8166e0e0c0b8d239f03bb38e978/_all.sassc
Binary file not shown.
Binary file added
BIN
+150 KB
static/css/.sass-cache/372217ca08acb8166e0e0c0b8d239f03bb38e978/columns.sassc
Binary file not shown.
Binary file added
BIN
+11 KB
static/css/.sass-cache/372217ca08acb8166e0e0c0b8d239f03bb38e978/tiles.sassc
Binary file not shown.
Binary file added
BIN
+1.34 KB
static/css/.sass-cache/400827b26a132263f9b9a01088e5516b58067e59/_all.sassc
Binary file not shown.
Binary file added
BIN
+6.08 KB
static/css/.sass-cache/400827b26a132263f9b9a01088e5516b58067e59/checkbox-radio.sassc
Binary file not shown.
Binary file added
BIN
+48.2 KB
static/css/.sass-cache/400827b26a132263f9b9a01088e5516b58067e59/file.sassc
Binary file not shown.
Binary file added
BIN
+16.1 KB
static/css/.sass-cache/400827b26a132263f9b9a01088e5516b58067e59/input-textarea.sassc
Binary file not shown.
Binary file added
BIN
+23.4 KB
static/css/.sass-cache/400827b26a132263f9b9a01088e5516b58067e59/select.sassc
Binary file not shown.
Binary file added
BIN
+13.5 KB
static/css/.sass-cache/400827b26a132263f9b9a01088e5516b58067e59/shared.sassc
Binary file not shown.
Binary file added
BIN
+52.6 KB
static/css/.sass-cache/400827b26a132263f9b9a01088e5516b58067e59/tools.sassc
Binary file not shown.
Binary file added
BIN
+1.03 KB
static/css/.sass-cache/6f5eea21b69dc4185f9945328878a56d8e31e0f6/_all.sassc
Binary file not shown.
Binary file added
BIN
+3.73 KB
static/css/.sass-cache/6f5eea21b69dc4185f9945328878a56d8e31e0f6/footer.sassc
Binary file not shown.
Binary file added
BIN
+40.7 KB
static/css/.sass-cache/6f5eea21b69dc4185f9945328878a56d8e31e0f6/hero.sassc
Binary file not shown.
Binary file added
BIN
+4.81 KB
static/css/.sass-cache/6f5eea21b69dc4185f9945328878a56d8e31e0f6/section.sassc
Binary file not shown.
Binary file added
BIN
+1.92 KB
static/css/.sass-cache/c4a9356c0c024da0f4cb2129d8bd83c440de1d25/_all.sassc
Binary file not shown.
Binary file added
BIN
+19.2 KB
static/css/.sass-cache/c4a9356c0c024da0f4cb2129d8bd83c440de1d25/breadcrumb.sassc
Binary file not shown.
Binary file added
BIN
+23.1 KB
static/css/.sass-cache/c4a9356c0c024da0f4cb2129d8bd83c440de1d25/card.sassc
Binary file not shown.
Binary file added
BIN
+19.5 KB
static/css/.sass-cache/c4a9356c0c024da0f4cb2129d8bd83c440de1d25/dropdown.sassc
Binary file not shown.
Binary file added
BIN
+17.4 KB
static/css/.sass-cache/c4a9356c0c024da0f4cb2129d8bd83c440de1d25/level.sassc
Binary file not shown.
Binary file added
BIN
+14.9 KB
static/css/.sass-cache/c4a9356c0c024da0f4cb2129d8bd83c440de1d25/media.sassc
Binary file not shown.
Binary file added
BIN
+14.6 KB
static/css/.sass-cache/c4a9356c0c024da0f4cb2129d8bd83c440de1d25/menu.sassc
Binary file not shown.
Binary file added
BIN
+29.3 KB
static/css/.sass-cache/c4a9356c0c024da0f4cb2129d8bd83c440de1d25/message.sassc
Binary file not shown.
Binary file added
BIN
+25.7 KB
static/css/.sass-cache/c4a9356c0c024da0f4cb2129d8bd83c440de1d25/modal.sassc
Binary file not shown.
Binary file added
BIN
+117 KB
static/css/.sass-cache/c4a9356c0c024da0f4cb2129d8bd83c440de1d25/navbar.sassc
Binary file not shown.
Binary file added
BIN
+36.3 KB
static/css/.sass-cache/c4a9356c0c024da0f4cb2129d8bd83c440de1d25/pagination.sassc
Binary file not shown.
Binary file added
BIN
+29.1 KB
static/css/.sass-cache/c4a9356c0c024da0f4cb2129d8bd83c440de1d25/panel.sassc
Binary file not shown.
Binary file added
BIN
+45.6 KB
static/css/.sass-cache/c4a9356c0c024da0f4cb2129d8bd83c440de1d25/tabs.sassc
Binary file not shown.
Binary file added
BIN
+1.91 KB
static/css/.sass-cache/d6de92e3d3fe0e4bd6bbb4d39355bea682ac004b/_all.sassc
Binary file not shown.
Binary file added
BIN
+8.48 KB
static/css/.sass-cache/d6de92e3d3fe0e4bd6bbb4d39355bea682ac004b/box.sassc
Binary file not shown.
Binary file added
BIN
+102 KB
static/css/.sass-cache/d6de92e3d3fe0e4bd6bbb4d39355bea682ac004b/button.sassc
Binary file not shown.
Binary file added
BIN
+10 KB
static/css/.sass-cache/d6de92e3d3fe0e4bd6bbb4d39355bea682ac004b/container.sassc
Binary file not shown.
Binary file added
BIN
+40.6 KB
static/css/.sass-cache/d6de92e3d3fe0e4bd6bbb4d39355bea682ac004b/content.sassc
Binary file not shown.
Binary file added
BIN
+11 KB
static/css/.sass-cache/d6de92e3d3fe0e4bd6bbb4d39355bea682ac004b/icon.sassc
Binary file not shown.
Binary file added
BIN
+17.6 KB
static/css/.sass-cache/d6de92e3d3fe0e4bd6bbb4d39355bea682ac004b/image.sassc
Binary file not shown.
Binary file added
BIN
+15.4 KB
static/css/.sass-cache/d6de92e3d3fe0e4bd6bbb4d39355bea682ac004b/notification.sassc
Binary file not shown.
Binary file added
BIN
+7.01 KB
static/css/.sass-cache/d6de92e3d3fe0e4bd6bbb4d39355bea682ac004b/other.sassc
Binary file not shown.
Binary file added
BIN
+20.4 KB
static/css/.sass-cache/d6de92e3d3fe0e4bd6bbb4d39355bea682ac004b/progress.sassc
Binary file not shown.
Binary file added
BIN
+32 KB
static/css/.sass-cache/d6de92e3d3fe0e4bd6bbb4d39355bea682ac004b/table.sassc
Binary file not shown.
Binary file added
BIN
+38.8 KB
static/css/.sass-cache/d6de92e3d3fe0e4bd6bbb4d39355bea682ac004b/tag.sassc
Binary file not shown.
Binary file added
BIN
+17.1 KB
static/css/.sass-cache/d6de92e3d3fe0e4bd6bbb4d39355bea682ac004b/title.sassc
Binary file not shown.
Binary file added
BIN
+1.04 KB
static/css/.sass-cache/e9145153d4f4190f397ae7f71cbdd539dcbc9352/_all.sassc
Binary file not shown.
Binary file added
BIN
+2.19 KB
static/css/.sass-cache/e9145153d4f4190f397ae7f71cbdd539dcbc9352/animations.sassc
Binary file not shown.
Binary file added
BIN
+27.7 KB
static/css/.sass-cache/e9145153d4f4190f397ae7f71cbdd539dcbc9352/generic.sassc
Binary file not shown.
Binary file added
BIN
+12.7 KB
static/css/.sass-cache/e9145153d4f4190f397ae7f71cbdd539dcbc9352/minireset.sassc
Binary file not shown.
Binary file added
BIN
+34.6 KB
static/css/.sass-cache/e95fb93bbd759eb478d958b78f9534b441d43f7b/block-list.scssc
Binary file not shown.
Binary file added
BIN
+70.5 KB
static/css/.sass-cache/e95fb93bbd759eb478d958b78f9534b441d43f7b/main.scssc
Binary file not shown.
Binary file added
BIN
+1.64 KB
static/css/.sass-cache/ef20647e613b9af0fd70bf7b9d0b2717abb7f288/_all.sassc
Binary file not shown.
Binary file added
BIN
+14.4 KB
static/css/.sass-cache/ef20647e613b9af0fd70bf7b9d0b2717abb7f288/color.sassc
Binary file not shown.
Binary file added
BIN
+13.1 KB
static/css/.sass-cache/ef20647e613b9af0fd70bf7b9d0b2717abb7f288/flexbox.sassc
Binary file not shown.
Binary file added
BIN
+2.68 KB
static/css/.sass-cache/ef20647e613b9af0fd70bf7b9d0b2717abb7f288/float.sassc
Binary file not shown.
Binary file added
BIN
+3.85 KB
static/css/.sass-cache/ef20647e613b9af0fd70bf7b9d0b2717abb7f288/other.sassc
Binary file not shown.
Binary file added
BIN
+1.52 KB
static/css/.sass-cache/ef20647e613b9af0fd70bf7b9d0b2717abb7f288/overflow.sassc
Binary file not shown.
Binary file added
BIN
+2.07 KB
static/css/.sass-cache/ef20647e613b9af0fd70bf7b9d0b2717abb7f288/position.sassc
Binary file not shown.
Binary file added
BIN
+15.6 KB
static/css/.sass-cache/ef20647e613b9af0fd70bf7b9d0b2717abb7f288/spacing.sassc
Binary file not shown.
Binary file added
BIN
+24.8 KB
static/css/.sass-cache/ef20647e613b9af0fd70bf7b9d0b2717abb7f288/typography.sassc
Binary file not shown.
Binary file added
BIN
+28.2 KB
static/css/.sass-cache/ef20647e613b9af0fd70bf7b9d0b2717abb7f288/visibility.sassc
Binary file not shown.
Binary file added
BIN
+1.75 KB
static/css/.sass-cache/f3193aaaa55614fdeb08febcfc771e05a608160e/bulma.sassc
Binary file not shown.
Binary file added
BIN
+1.38 KB
static/css/.sass-cache/ff52bcce2219495e9e7964da8386485bd4b4bbb1/_all.sassc
Binary file not shown.
Binary file added
BIN
+11.6 KB
static/css/.sass-cache/ff52bcce2219495e9e7964da8386485bd4b4bbb1/controls.sassc
Binary file not shown.
Binary file added
BIN
+27.7 KB
static/css/.sass-cache/ff52bcce2219495e9e7964da8386485bd4b4bbb1/derived-variables.sassc
Binary file not shown.
Binary file added
BIN
+3.09 KB
static/css/.sass-cache/ff52bcce2219495e9e7964da8386485bd4b4bbb1/extends.sassc
Binary file not shown.
Binary file added
BIN
+55.7 KB
static/css/.sass-cache/ff52bcce2219495e9e7964da8386485bd4b4bbb1/functions.sassc
Binary file not shown.
Binary file added
BIN
+23.5 KB
static/css/.sass-cache/ff52bcce2219495e9e7964da8386485bd4b4bbb1/initial-variables.sassc
Binary file not shown.
Binary file added
BIN
+80.4 KB
static/css/.sass-cache/ff52bcce2219495e9e7964da8386485bd4b4bbb1/mixins.sassc
Binary file not shown.
Oops, something went wrong.