Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
adega
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Odair M.
adega
Commits
e33d176a
Commit
e33d176a
authored
6 years ago
by
Odair Mario
Browse files
Options
Downloads
Patches
Plain Diff
fix diretório da cache disciplina
parent
2de8e121
No related branches found
No related tags found
1 merge request
!1
WIP: Development
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/script/analysis/course_analysis.py
+3
-13
3 additions, 13 deletions
src/script/analysis/course_analysis.py
src/script/build_cache.py
+10
-7
10 additions, 7 deletions
src/script/build_cache.py
src/script/main.py
+1
-2
1 addition, 2 deletions
src/script/main.py
with
14 additions
and
22 deletions
src/script/analysis/course_analysis.py
+
3
−
13
View file @
e33d176a
...
...
@@ -285,7 +285,7 @@ def listagem_disciplina(df,lista_disciplinas):
reprovacao_media
=
np
.
mean
(
trancamento_np
)
reprovacao_desvio
=
np
.
std
(
trancamento_np
)
#verifica se o resultado final não é nan
#verifica
r
se o resultado final não é nan
listagem
=
{
"
cache
"
:
cache
,
"
compara_aprov
"
:
compara_aprov
,
...
...
@@ -296,15 +296,5 @@ def listagem_disciplina(df,lista_disciplinas):
"
taxa_reprovacao
"
:[
float
(
reprovacao_media
),
float
(
reprovacao_desvio
)]
,
"
nota
"
:
[
float
(
nota_media
),
float
(
nota_desvio
)]
}
with
open
(
"
cache/disciplinas.json
"
,
'
w
'
)
as
f
:
f
.
write
(
json
.
dumps
(
listagem
,
indent
=
4
))
# [ ] ->media_disc
# [ ] compara_aprov
def
analises_disciplinas
(
df
):
lista_disciplinas
=
{}
informacoes_gerais
(
df
,
lista_disciplinas
)
analises_gerais
(
df
,
lista_disciplinas
)
analises_semestrais
(
df
,
lista_disciplinas
)
transforma_json
(
lista_disciplinas
)
listagem_disciplina
(
df
,
lista_disciplinas
)
return
listagem
This diff is collapsed.
Click to expand it.
src/script/build_cache.py
+
10
−
7
View file @
e33d176a
...
...
@@ -26,8 +26,7 @@ def build_cache(dataframe):
#generate_student_list(path)
#generate_admission_data(path)
#generate_admission_list(path)
#generate_course_data(path)
#generate_course_general_data(path)
generate_course_data
(
path
)
def
generate_degree_data
(
path
,
dataframe
):
ensure_path_exists
(
path
)
...
...
@@ -145,8 +144,12 @@ def generate_admission_data(path,df):
def
generate_admission_list
(
path
):
pass
def
generate_course_data
(
path
):
pass
def
generate_course_general_data
(
path
):
pass
def
generate_course_data
(
path
,
df
):
informacoes_gerais
(
df
,
lista_disciplinas
)
analises_gerais
(
df
,
lista_disciplinas
)
analises_semestrais
(
df
,
lista_disciplinas
)
for
disciplina
in
lista_disciplinas
.
keys
():
save_json
(
path
+
disciplina
+
'
.json
'
,
lista_disciplinas
[
disciplina
])
disciplinas
=
listagem_disciplina
(
df
,
lista_disciplinas
)
save_json
(
path
+
'
diciplinas.json
'
,
disciplinas
)
This diff is collapsed.
Click to expand it.
src/script/main.py
+
1
−
2
View file @
e33d176a
...
...
@@ -30,11 +30,10 @@ def main():
start_time
=
time
.
clock
()
start_time_exec
=
time
.
time
()
dataframe
=
load_dataframes
(
os
.
getcwd
()
+
'
/script/
'
+
'
base
'
)
dataframe
=
load_dataframes
(
os
.
getcwd
()
+
'
/script/
'
+
'
base
/21A/1/
'
)
build_cache
(
dataframe
)
cpu_time
=
timedelta
(
seconds
=
round
(
time
.
clock
()
-
start_time
))
analises_disciplinas
(
dataframe
)
run_time
=
timedelta
(
seconds
=
round
(
time
.
time
()
-
start_time_exec
))
print
(
"
--- Tempo de CPU: {} ---
"
.
format
(
cpu_time
))
print
(
"
--- Tempo total: {} ---
"
.
format
(
run_time
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment