Skip to content

Commit

Permalink
file structure reorgaized
Browse files Browse the repository at this point in the history
  • Loading branch information
naidukarthi2193 committed Apr 6, 2020
1 parent 07c7a59 commit a3ed693
Show file tree
Hide file tree
Showing 79 changed files with 2,821,163 additions and 26,209 deletions.
3 changes: 2 additions & 1 deletion student_analysis/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
__pycache__
__pycache__
.vscode
37 changes: 29 additions & 8 deletions student_analysis/README.MD
Original file line number Diff line number Diff line change
@@ -1,23 +1,44 @@
# Student Performance Analysis

## About
This Flask website is a dashboard for keeping track of personal progress on http://arena.siesgst.ac.in/
This project gives a coder analysis on the submissions made by him and recommends Problems to him according to Topics solved/unsolved
<br>
<br>
<b>For Unsolved Topics</b>
<br>
System provides problems in increasing difficulty
<br>
<b>For Solved Topics</b>
<br>
System provides top 5 problems of Higher difficulty which has not been solved yet

#### This project has been deployed on https://arena-siesgst-dashboard.herokuapp.com/

![](demo.gif)
#### This project has been deployed on https://arena-siesgst-dashboard.herokuapp.com/

To execute application on Local Machine
## Installation

### Install Dependencies
> pip install -r requirements.txt
### Initial Setup
>python setup.py
> <b>pip</b>: pip install -r requirements.txt
> <br>
<b>conda</b>: conda install --yes --file requirements.txt
### Execute Code
>python main.py
### To view Dashboard (in Browser) goto following link once server starts
>http://localhost:5000/
#### Layouts are visible properly at 67% zoom in browser
#### Layouts are visible properly at 67% zoom in browser

## Dataset
The Data collected from Databases are stored inside Data folder in the following files <br>
>users.json
<br>
>submissions.json
<br>
>problems.json

## Results
![](images/demo.gif)
76 changes: 76 additions & 0 deletions student_analysis/data/README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
## Data Structure for files

### Users

```json
[
{
"_id":{"$oid":"5b5c89298114180020d4bcb0"},
"notifications":{
"updates":true,
"activities":true
},
"name":"User Name",
"username":"username",
"email":"email@siesgst.ac.in",
"about":"about",
"ratings":0.0,
"createdAt":{"$date":"2018-07-28T15:18:01.849Z"},
"updatedAt":{"$date":"2019-01-29T06:23:34.352Z"},
"__v":0,
"topics":["graphs","dp","geometry","webdev","ml","dl","android","opensource"]
}
]
```


### Submissions

```json
[
{
"_id":{"$oid":"5b608157e228ec0020a1fcf5"},
"userId":{"$oid":"5b5d756037392f89933e7514"},
"problemId":{"$oid":"5b5c8cd7276e2200208fed62"},
"contestId":{"$oid":"5b5c89ef30db8a0020962414"},
"language":"C++14",
"fileContent":"fileContentURL",
"time":"0s",
"memory":"3452KB",
"output":"outputURL",
"status":"Accepted",
"points":0,
"createdAt":{"$date":"2018-07-31T15:33:43.362Z"},
"updatedAt":{"$date":"2018-11-11T11:51:18.721Z"},
"__v":0,
"duringContest":true
}
]

```

### Problems

```json
[
{
"_id":{"$oid":"5b5c8cd7276e2200208fed62"},
"code":"UNI01",
"points":0,
"name":"Problem Name",
"description":"Problem Description",
"explainInput":"Input Explain",
"explainOutput":"Output Explain",
"example":"Input Data Output Data",
"explanation":"",
"tags":["adhoc"],
"outputFile":"outputFileURL",
"inputFile":"inputFileURL",
"contestCode":"UNIVERSE",
"createdAt":{"$date":"2018-07-28T15:33:43.03Z"},
"updatedAt":{"$date":"2018-11-11T14:18:53.641Z"},
"__v":0,
"constraints":"ConstraintData"
}
]
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 11 additions & 11 deletions student_analysis/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,16 @@ def get_topic_ratings(personal,users,problems,submissions):
personal_topics = personal_merged.drop(['_id_x', 'userId', 'problemId', 'contestId', 'language', 'time',
'memory', 'status', 'points_x', '_id_y', 'code', 'points_y', 'name'],axis=1)
l = dict()
unexp=list()
unexplored=list()
for x in personal_topics.columns:
count = personal_topics[x].loc[personal_topics[x]==1].count()
if count!=0:
l[x]= count
else:
unexp.append(x)
unexplored.append(x)
srt = sorted(l, key=l.get)
b=np.array_split(np.asarray(srt) , 2)
return unexp,list(b[0]),list(b[1])
return unexplored,list(b[0]),list(b[1])

def n_high_submission(personal,problems,users,submissions):
personal_submissions = pd.merge(personal,preprocess_problem(problems),
Expand Down Expand Up @@ -143,19 +143,19 @@ def get_user_details(users,email,problems,submissions):
except:
return 0

def get_recommendation(problems,unexp,good,personal_merged,best):
def get_recommendation(problems,unexplored,good,personal_merged,best):
p = preprocess_problem(problems)
unexp_d=dict()
if len(unexp) > 0:
for tops in unexp:
unexplored_d=dict()
if len(unexplored) > 0:
for tops in unexplored:
sums = list(p.loc[p[tops]==1]['code'].to_dict().values())
l=dict()

for su in sums:
l[su] = list(p.loc[p['code']==su]['points'].to_dict().values())[0]
srt = sorted(l, key=l.get)
unexp_d[tops]=srt[0:5]
prac_d=dict()
unexplored_d[tops]=srt[0:5]
practice_d=dict()
if len(good)>0:
for tops in good:
# print(tops)
Expand All @@ -168,7 +168,7 @@ def get_recommendation(problems,unexp,good,personal_merged,best):
srt = set(srt) - set(personal_merged['code'])
srt = list(srt)
if len(srt)>0:
prac_d[tops]=srt[0:5]
practice_d[tops]=srt[0:5]


best_d=dict()
Expand All @@ -186,5 +186,5 @@ def get_recommendation(problems,unexp,good,personal_merged,best):
if len(srt)>0:
best_d[tops]=srt[0:5]

return unexp_d,prac_d,best_d
return unexplored_d,practice_d,best_d

File renamed without changes
12 changes: 6 additions & 6 deletions student_analysis/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
import json
import functions

with open('users.json', 'r', errors='ignore') as f:
with open('data/users.json', 'r', errors='ignore') as f:
data = json.load(f)
users = pd.DataFrame(data)
with open('problems.json', 'r', errors='ignore') as f:
with open('data/problems.json', 'r', errors='ignore') as f:
data = json.load(f)
problems = pd.DataFrame(data)

with open('submissions.json', 'r', errors='ignore') as f:
with open('data/submissions.json', 'r', errors='ignore') as f:
data = json.load(f)
submissions = pd.DataFrame(data)

Expand All @@ -36,7 +36,7 @@ def email():
bad,good,best = functions.get_topic_ratings(personal,users,problems,submissions)
nHighest,json_n_highest_submissions = functions.n_high_submission(personal,problems,users,submissions)

unexp_d,prac_d ,best_d= functions.get_recommendation(problems,bad,good,personal_merged,best)
unexplored_d,practice_d ,best_d= functions.get_recommendation(problems,bad,good,personal_merged,best)

return render_template("index.html",
json_verdict=json_verdict,
Expand All @@ -46,8 +46,8 @@ def email():
json_n_highest_submissions=json_n_highest_submissions,
num_sub=num_sub,
nHighest=nHighest,
unexp_d=unexp_d,
prac_d=prac_d,
unexplored_d=unexplored_d,
practice_d=practice_d,
best_d=best_d
)

Expand Down
Binary file added student_analysis/nltk_data/corpora/wordnet.zip
Binary file not shown.
31 changes: 31 additions & 0 deletions student_analysis/nltk_data/corpora/wordnet/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
WordNet Release 3.0

This software and database is being provided to you, the LICENSEE, by
Princeton University under the following license. By obtaining, using
and/or copying this software and database, you agree that you have
read, understood, and will comply with these terms and conditions.:

Permission to use, copy, modify and distribute this software and
database and its documentation for any purpose and without fee or
royalty is hereby granted, provided that you agree to comply with
the following copyright notice and statements, including the disclaimer,
and that the same appear on ALL copies of the software, database and
documentation, including modifications that you make for internal
use or for distribution.

WordNet 3.0 Copyright 2006 by Princeton University. All rights reserved.

THIS SOFTWARE AND DATABASE IS PROVIDED "AS IS" AND PRINCETON
UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PRINCETON
UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES OF MERCHANT-
ABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE
OF THE LICENSED SOFTWARE, DATABASE OR DOCUMENTATION WILL NOT
INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR
OTHER RIGHTS.

The name of Princeton University or Princeton may not be used in
advertising or publicity pertaining to distribution of the software
and/or database. Title to copyright in this software, database and
any associated documentation shall at all times remain with
Princeton University and LICENSEE agrees to preserve same.
101 changes: 101 additions & 0 deletions student_analysis/nltk_data/corpora/wordnet/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@

This is the README file for WordNet 3.0

1. About WordNet

WordNet was developed at Princeton University's Cognitive Science
Laboratory under the direction of George Miller, James S. McDonnell
Distinguished University Professor of Psychology, Emeritus. Over the
years many linguists, lexicographers, students, and software engineers
have contributed to the project.

WordNet is an online lexical reference system. Word forms in WordNet
are represented in their familiar orthography; word meanings are
represented by synonym sets (synsets) - lists of synonymous word forms
that are interchangeable in some context. Two kinds of relations are
recognized: lexical and semantic. Lexical relations hold between word
forms; semantic relations hold between word meanings.

To learn more about WordNet, the book "WordNet: An Electronic Lexical
Database," containing an updated version of "Five Papers on WordNet"
and additional papers by WordNet users, is available from MIT Press:

http://mitpress.mit.edu/book-home.tcl?isbn=026206197X

2. The WordNet Web Site

We maintain a Web site at:

http://wordnet.princeton.edu

Information about WordNet, access to our online interface, and the
various WordNet packages that you can download are available from our
web site. All of the software documentation is available online, as
well as a FAQ. On this site we also have information about other
applications that use WordNet. If you have an application that you
would like included, please send e-mail to the above address.

3. Contacting Us

Ongoing deveopment work and WordNet related projects are done by a
small group of researchers, lexicographers, and systems programmers.
Since our resources are VERY limited, we request that you please
confine correspondence to WordNet topics only. Please check the
documentation, FAQ, and other resources for the answer to your
question or problem before contacting us.

If you have trouble installing or downloading WordNet, have a bug to
report, or any other problem, please refer to the online FAQ file
first. If you can heal thyself, please do so. The FAQ will be
updated over time. And if you do find a previously unreported
problem, please use our Bug Report Form:

http://wordnet.princeton.edu/cgi-bin/bugsubmit.pl

When reporting a problem, please be as specific as possible, stating
the computer platform you are using, which interface you are using,
and the exact error. The more details you can provide, the more
likely it is that you will get an answer.

There is a WordNet user discussion group mailing list that we invite
our users to join. Users use this list to ask questions of one
another, announce extensions to WordNet that they've developed, and
other topics of general usefulness to the user community.

Information on joining the user discussion list, reporting bugs and other
contact information is in found on our website at:

http://wordnet.princeton.edu/contact

4. Current Release

WordNet Version 3.0 is the latest version available for download. Two
basic database packages are available - one for Windows and one for
Unix platforms (including Mac OS X). See the file ChangeLog (Unix) or
CHANGES.txt (Windows) for a list of changes from previous versions.

WordNet packages can either be downloaded from our web site via:

http://wordnet.princeton.edu/obtain

The Windows package is a self-extracting archive that installs itself
when you double-click on it.

Beginning with Version 2.1, we changed the Unix package to a GNU Autotools
package. The WordNet browser makes use of the open source Tcl and Tk
packages. Many systems come with either or both pre-installed. If
your system doesn't (some systems have Tcl installed, but not Tk)
Tcl/Tk can be downloaded from:

http://www.tcl.tk/

Tcl and Tk must be installed BEFORE you compile WordNet. You must also
have a C compiler before installing Tcl/Tk or WordNet. WordNet has
been built and tested with the GNU gcc compiler. This is
pre-installed on most Unix systems, and can be downloaded from:

http://gcc.gnu.org/

See the file INSTALL for detailed WordNet installation instructions.


Loading

0 comments on commit a3ed693

Please sign in to comment.