Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Pariksha
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Roshan Rabinarayan
Pariksha
Commits
b1937448
Commit
b1937448
authored
Nov 13, 2020
by
Samarth Joshi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.cse.iitb.ac.in/sroshan/Pariksha
parents
722eeced
d528b51a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
2 deletions
+16
-2
QuizSystem/__pycache__/urls.cpython-38.pyc
QuizSystem/__pycache__/urls.cpython-38.pyc
+0
-0
db.sqlite3
db.sqlite3
+0
-0
quiz/__pycache__/views.cpython-38.pyc
quiz/__pycache__/views.cpython-38.pyc
+0
-0
quiz/views.py
quiz/views.py
+16
-2
No files found.
QuizSystem/__pycache__/urls.cpython-38.pyc
View file @
b1937448
No preview for this file type
db.sqlite3
View file @
b1937448
No preview for this file type
quiz/__pycache__/views.cpython-38.pyc
View file @
b1937448
No preview for this file type
quiz/views.py
View file @
b1937448
...
...
@@ -14,6 +14,7 @@ from django.shortcuts import redirect
from
.models
import
result
as
results
from
.models
import
cribs
as
crib
from
.models
import
Permission
import
collections
from
django.db
import
connection
,
transaction
import
numpy
as
np
import
math
...
...
@@ -162,14 +163,27 @@ def instructor(request):
allStudents
.
append
(
student
[
'studentId'
])
std
=
np
.
std
(
allMarks
)
mean
=
np
.
mean
(
allMarks
)
ax
.
hist
(
allMarks
,
allStudents
)
html_graph
=
mpld3
.
fig_to_html
(
fig
)
data
=
allMarks
c
=
collections
.
Counter
(
data
)
c
=
sorted
(
c
.
items
())
months_num
=
[
i
[
0
]
for
i
in
c
]
freq
=
[
i
[
1
]
for
i
in
c
]
plt
.
barh
(
months_num
,
freq
)
plt
.
title
(
"Score V/S N.O of Students"
)
plt
.
xlabel
(
"N.O of Students"
)
plt
.
ylabel
(
"Scores"
)
ax
.
set_xticks
(
range
(
1
,
len
(
allMarks
)
+
1
))
#ax.set_xticklabels(months)
html_graph
=
mpld3
.
fig_to_html
(
fig
)
fig1
,
ax1
=
plt
.
subplots
()
mu
=
mean
variance
=
np
.
std
(
allMarks
)
sigma
=
math
.
sqrt
(
variance
)
x
=
np
.
linspace
(
mu
-
3
*
sigma
,
mu
+
3
*
sigma
,
100
)
ax1
.
plot
(
x
,
stats
.
norm
.
pdf
(
x
,
mu
,
sigma
))
ax1
.
set_title
(
'Normal Distribution for Scores to Students'
)
ax1
.
set_xlabel
(
'Score'
)
ax1
.
set_ylabel
(
'PDF'
)
html_graph1
=
mpld3
.
fig_to_html
(
fig1
)
quizDone
=
False
if
quizInstance
.
end_datetime
<
datetime
.
now
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment