Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
208 commits
Select commit Hold shift + click to select a range
c93df90
aff dossier godbox
tcatonet Oct 9, 2021
3495c9f
first commit
tcatonet Oct 9, 2021
6d8d867
img godbox
tcatonet Oct 9, 2021
a6831a8
img godbox
tcatonet Oct 9, 2021
2d374a9
img godbox
tcatonet Oct 9, 2021
0ab1df4
img godbox
tcatonet Oct 9, 2021
8283dfe
img godbox
tcatonet Oct 9, 2021
3c285fc
img godbox
tcatonet Oct 9, 2021
e792f0c
img godbox
tcatonet Oct 9, 2021
16d35c3
img godbox
tcatonet Oct 9, 2021
9ae491f
img godbox
tcatonet Oct 9, 2021
0a28e06
img godbox
tcatonet Oct 9, 2021
249408f
img godbox
tcatonet Oct 9, 2021
48c0e39
img godbox
tcatonet Oct 9, 2021
4184b16
img godbox
tcatonet Oct 9, 2021
88641a4
img godbox
tcatonet Oct 9, 2021
c4fa6c7
img godbox
tcatonet Oct 9, 2021
e893c3b
logs node
tcatonet Oct 9, 2021
a8cfaab
logs node
tcatonet Oct 9, 2021
db12e8a
logs node
tcatonet Oct 9, 2021
90c4890
logs node
tcatonet Oct 9, 2021
e4f9887
logs node
tcatonet Oct 9, 2021
e6700bd
logs node
tcatonet Oct 9, 2021
f48d08b
logs node
tcatonet Oct 9, 2021
945ec76
logs node
tcatonet Oct 9, 2021
b451835
logs node
tcatonet Oct 9, 2021
3c5f546
logs node
tcatonet Oct 9, 2021
c0f6865
logs node
tcatonet Oct 9, 2021
d04b508
logs node
tcatonet Oct 9, 2021
f082c64
logs node2
tcatonet Oct 9, 2021
a7e20ca
logs node2
tcatonet Oct 9, 2021
d9011fe
logs node2
tcatonet Oct 9, 2021
5a38826
logs node2
tcatonet Oct 9, 2021
40f9e87
logs node2
tcatonet Oct 9, 2021
c4691e3
logs node2
tcatonet Oct 9, 2021
5e307ee
logs node2
tcatonet Oct 9, 2021
e59b990
logs node2
tcatonet Oct 9, 2021
03f90be
logs node2
tcatonet Oct 9, 2021
ebe0ad3
logs node2
tcatonet Oct 9, 2021
07e844e
logs node2
tcatonet Oct 9, 2021
9687712
logs node2
tcatonet Oct 9, 2021
3b077f9
logs node2
tcatonet Oct 9, 2021
d58a073
logs node2
tcatonet Oct 9, 2021
67a1803
logs node2
tcatonet Oct 9, 2021
3c8fbfd
logs node2
tcatonet Oct 9, 2021
fb1469f
logs node2
tcatonet Oct 9, 2021
67a6466
logs node2
tcatonet Oct 9, 2021
58939bd
logs node2
tcatonet Oct 10, 2021
09845c8
logs node2
tcatonet Oct 10, 2021
8746c3a
logs node2
tcatonet Oct 10, 2021
74df93a
logs node2
tcatonet Oct 10, 2021
b214bb7
logs node2
tcatonet Oct 10, 2021
323988a
logs node2
tcatonet Oct 10, 2021
a019548
logs node2
tcatonet Oct 10, 2021
65cc586
logs node2
tcatonet Oct 10, 2021
4adcc66
logs node2
tcatonet Oct 10, 2021
e78f1c1
logs node2
tcatonet Oct 10, 2021
26ed872
logs node2
tcatonet Oct 10, 2021
9699165
logs node2
tcatonet Oct 10, 2021
992d161
logs node2
tcatonet Oct 10, 2021
572e054
logs node2
tcatonet Oct 10, 2021
6cc985d
logs node2
tcatonet Oct 10, 2021
21d083c
logs node2
tcatonet Oct 10, 2021
7fdd7d5
logs node2
tcatonet Oct 10, 2021
9c84e90
logs node2
tcatonet Oct 10, 2021
23faf25
logs node2
tcatonet Oct 10, 2021
f7b3cce
logs node2
tcatonet Oct 10, 2021
45ae96d
logs node2
tcatonet Oct 10, 2021
b944769
logs node2
tcatonet Oct 10, 2021
b5f29c0
logs node2
tcatonet Oct 10, 2021
bf6df7c
logs node2
tcatonet Oct 10, 2021
6d435ff
logs node2
tcatonet Oct 10, 2021
ce3554b
logs node2
tcatonet Oct 10, 2021
f9ddcf1
logs node2
tcatonet Oct 10, 2021
0d2b8b9
logs node2
tcatonet Oct 10, 2021
cff5f24
logs node2
tcatonet Oct 10, 2021
95f02cd
logs node2
tcatonet Oct 10, 2021
4bd068c
logs node2
tcatonet Oct 10, 2021
56008cf
logs node2
tcatonet Oct 10, 2021
43fcb5c
fix bug image
tcatonet Oct 10, 2021
3c81f56
fix bug image
tcatonet Oct 10, 2021
e9cae78
test intégration algo :1
tcatonet Oct 10, 2021
634e76b
update algo eval code
tcatonet Oct 10, 2021
0ae6e8c
update algo eval code
tcatonet Oct 10, 2021
cc7d414
update algo eval code
tcatonet Oct 10, 2021
796d92b
update algo eval code
tcatonet Oct 10, 2021
03ad591
update algo eval code
tcatonet Oct 10, 2021
9081593
update algo eval code
tcatonet Oct 10, 2021
3b594ac
update algo eval code
tcatonet Oct 10, 2021
5b24252
update algo eval code
tcatonet Oct 10, 2021
d9d15ca
update algo eval code
tcatonet Oct 10, 2021
1f8badf
update algo eval code
tcatonet Oct 10, 2021
500b432
update algo eval code
tcatonet Oct 10, 2021
57ee72c
update algo eval code
tcatonet Oct 10, 2021
07b3f58
update algo eval code
tcatonet Oct 10, 2021
f8d7880
update algo eval code
tcatonet Oct 10, 2021
d8cacbd
update algo eval code
tcatonet Oct 10, 2021
5c2bb0e
update algo eval code
tcatonet Oct 10, 2021
e7e1485
update algo eval code
tcatonet Oct 10, 2021
e98cac7
update algo eval code
tcatonet Oct 10, 2021
10b42e7
update algo eval code
tcatonet Oct 10, 2021
dd2d11b
update algo eval code
tcatonet Oct 10, 2021
1620ff6
update algo eval code
tcatonet Oct 10, 2021
68029f5
update algo eval code
tcatonet Oct 10, 2021
eec25da
update algo eval code
tcatonet Oct 10, 2021
0c2dd31
update algo eval code
tcatonet Oct 10, 2021
30ae0dc
update algo eval code
tcatonet Oct 10, 2021
cb95eed
update algo eval code
tcatonet Oct 10, 2021
a7cd67a
update algo eval code
tcatonet Oct 10, 2021
624436b
update algo eval code
tcatonet Oct 10, 2021
a3b2d42
update algo eval code
tcatonet Oct 10, 2021
35df4d4
update algo eval code
tcatonet Oct 10, 2021
1ed6a0b
update algo eval code
tcatonet Oct 10, 2021
0497418
update algo eval code
tcatonet Oct 10, 2021
add4419
update algo eval code
tcatonet Oct 10, 2021
4b5c045
update algo eval code
tcatonet Oct 10, 2021
9668c81
update algo eval code
tcatonet Oct 10, 2021
532d3a7
update algo eval code
tcatonet Oct 10, 2021
31c0fc9
update algo eval code
tcatonet Oct 10, 2021
d1c68b2
update algo eval code
tcatonet Oct 10, 2021
03474e1
update algo eval code
tcatonet Oct 10, 2021
d0e31e3
update algo eval code
tcatonet Oct 10, 2021
381d5d2
update algo eval code
tcatonet Oct 10, 2021
34b68a2
update algo eval code
tcatonet Oct 11, 2021
125ad9a
update algo eval code
tcatonet Oct 11, 2021
0082c1d
correction erreur dépendance python
tcatonet Oct 11, 2021
8011182
correction erreur dépendance python
tcatonet Oct 11, 2021
f4f2a1a
correction erreur algoNameVar
tcatonet Oct 11, 2021
7c4fa84
correction erreur algoNameVar
tcatonet Oct 11, 2021
8d67beb
correction erreur algoNameVar
tcatonet Oct 11, 2021
e901d85
correction erreur algoNameVar
tcatonet Oct 11, 2021
0a64e0e
correction erreur algoNameVar
tcatonet Oct 11, 2021
19442d8
aff resule algo
tcatonet Oct 11, 2021
0a386f7
test imtégration plagiat
tcatonet Oct 15, 2021
3a41609
test imtégration plagiat
tcatonet Oct 15, 2021
ae1c679
test imtégration plagiat
tcatonet Oct 15, 2021
8f17b69
test imtégration plagiat
tcatonet Oct 15, 2021
c8311c1
test imtégration plagiat
tcatonet Oct 15, 2021
c45ed80
test imtégration plagiat
tcatonet Oct 15, 2021
99f6229
test imtégration plagiat
tcatonet Oct 15, 2021
e120d5f
test imtégration plagiat
tcatonet Oct 15, 2021
2a3d422
test imtégration plagiat
tcatonet Oct 15, 2021
02ac0b1
test imtégration plagiat
tcatonet Oct 15, 2021
7346efc
test imtégration plagiat
tcatonet Oct 15, 2021
487cf51
test imtégration plagiat
tcatonet Oct 15, 2021
9e67501
test imtégration plagiat
tcatonet Oct 15, 2021
12dd653
ajout schema plagiat
tcatonet Oct 15, 2021
da5da34
ajout schema plagiat
tcatonet Oct 15, 2021
c038a4b
log stat user
tcatonet Oct 15, 2021
cbe3ce4
log stat user
tcatonet Oct 15, 2021
a144e42
log stat user
tcatonet Oct 15, 2021
a365c33
log stat user
tcatonet Oct 15, 2021
38b10ad
log stat user
tcatonet Oct 15, 2021
adfd8b3
log stat user
tcatonet Oct 15, 2021
f666eb2
log stat user
tcatonet Oct 15, 2021
b300d49
log stat user
tcatonet Oct 15, 2021
f4f2d8e
ajout CodePlagiat table
tcatonet Oct 15, 2021
64530d4
ajout CodePlagiat table
tcatonet Oct 15, 2021
213afb7
ajout CodePlagiat table
tcatonet Oct 15, 2021
15af92b
ajout CodePlagiat table
tcatonet Oct 15, 2021
bf870b3
ajout CodePlagiat table
tcatonet Oct 15, 2021
3384aa0
ajout CodePlagiat table
tcatonet Oct 15, 2021
95baccf
ajout CodePlagiat table
tcatonet Oct 15, 2021
01cc6d2
ajout CodePlagiat table
tcatonet Oct 15, 2021
adad233
ajout CodePlagiat table
tcatonet Oct 15, 2021
385e8f0
ajout CodePlagiat table
tcatonet Oct 15, 2021
45e4dac
try add codeplagiat table
tcatonet Oct 16, 2021
94e5d32
try add codeplagiat table
tcatonet Oct 16, 2021
1ec7f28
try add codeplagiat table
tcatonet Oct 16, 2021
d6223c4
try add codeplagiat table
tcatonet Oct 16, 2021
b52d21b
try add codeplagiat table
tcatonet Oct 16, 2021
ad8049b
try add codeplagiat table
tcatonet Oct 16, 2021
7363dd6
try add codeplagiat table
tcatonet Oct 16, 2021
5f3ba3e
try add codeplagiat table
tcatonet Oct 16, 2021
f3d8411
try add codeplagiat table
tcatonet Oct 16, 2021
b658442
try add codeplagiat table
tcatonet Oct 16, 2021
d7e7a41
try add codeplagiat table
tcatonet Oct 16, 2021
672c09e
try add codeplagiat table
tcatonet Oct 16, 2021
c5daa39
try add codeplagiat table
tcatonet Oct 16, 2021
2deaac0
add evalPlagiat table
tcatonet Oct 17, 2021
efce4ee
add evalPlagiat table
tcatonet Oct 17, 2021
d2b4f92
add evalPlagiat table
tcatonet Oct 17, 2021
9c0a5f1
add evalPlagiat table
tcatonet Oct 17, 2021
f1cc742
add evalPlagiat table
tcatonet Oct 17, 2021
10419b2
update attemp service for eval code
tcatonet Oct 17, 2021
87b2ac7
update attemp service for eval code
tcatonet Oct 17, 2021
9ae5ebe
update attemp service for eval code
tcatonet Oct 17, 2021
7e81c5f
update attemp service for eval code
tcatonet Oct 17, 2021
da79742
update attemp service for eval code
tcatonet Oct 17, 2021
097400c
update attemp service for eval code
tcatonet Oct 17, 2021
e802d78
update attemp service for eval code
tcatonet Oct 17, 2021
f8adf5e
update attemp service for eval code
tcatonet Oct 17, 2021
6ceab79
update attemp service for eval code
tcatonet Oct 17, 2021
cacc108
update attemp service for eval code
tcatonet Oct 17, 2021
d08064f
update attemp service for eval code
tcatonet Oct 17, 2021
b138d60
update attemp service for eval code
tcatonet Oct 17, 2021
497ded7
update attemp service for eval code
tcatonet Oct 17, 2021
40f0437
update attemp service for eval code
tcatonet Oct 17, 2021
3c1082f
update attemp service for eval code
tcatonet Oct 17, 2021
3c908d0
update attemp service for eval code
tcatonet Oct 17, 2021
25182ba
update attemp service for eval code
tcatonet Oct 17, 2021
1567154
update attemp service for eval code
tcatonet Oct 17, 2021
dbe085f
update attemp service for eval code
tcatonet Oct 17, 2021
188c3c7
update attemp service for eval code
tcatonet Oct 17, 2021
57f8f8d
update lib.cpp
tcatonet Oct 17, 2021
9d9faf1
update lib.cpp
tcatonet Oct 18, 2021
48f6b76
update lib.cpp
tcatonet Oct 18, 2021
a78132c
Merge branch 'main' into integration_algo_evaluatio_code
tcatonet Oct 20, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion heroku_deploy/api/Dockerfile.api
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ WORKDIR /usr/src/app
COPY --from=builder /usr/src/app/package*.json /usr/src/app/
COPY --from=builder /usr/src/app/dist/ /usr/src/app/

ENV LIBS_DIR=/usr/src/app/libs
ENV LIBS_DIR=/usr/src/app/
ENV ALGO_DIR=/usr/src/app/evaluation_code

COPY ./libs ${LIBS_DIR}
COPY ./evaluation_code ${ALGO_DIR}

COPY ./conf /usr/src/app/conf

Expand Down
1 change: 1 addition & 0 deletions heroku_deploy/api/evaluation_code/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"# Algo-valuation-code"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
38 changes: 38 additions & 0 deletions heroku_deploy/api/evaluation_code/cpp/evalCommentaire.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
def excecEvalCommentaire(lignes):

scopeCodeUser = False

nbLigne = 0
nbComment = 0
longComment = False

for ligne in lignes:


if ligne != "":
nbLigne += 1

if '//' in ligne and not longComment:
nbComment +=1

if '/*' in ligne:
longComment = True

if '*/' in ligne:
longComment = False

if longComment:
nbComment += 1


res = ""
if nbLigne >0:

if (nbComment/nbLigne)*100 >= 10:
res = "ok"
else:
res = "error"
else:
res = "ok"

return res
149 changes: 149 additions & 0 deletions heroku_deploy/api/evaluation_code/cpp/evalNbLigneFonction.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
import re

PATERN_VARIABLE = [
r'[A-Za-z0-9_]{1,}\s{1,}[A-Za-z0-9_]{1,}\s*',
r'[A-Za-z0-9_]{1,}\s{0,}<[A-Za-z0-9_]{1,}>\s{0,}[A-Za-z0-9_]{1,}',
r'[A-Za-z0-9_]{1,}\s{1,}[A-Za-z0-9_]{1,}\s{1,}[A-Za-z0-9_]{1,}',

r'[A-Za-z0-9_]{1,}\s{1,}[A-Za-z0-9_]{1,}\s{0,};',
r'[A-Za-z0-9_]{1,}\s*<[A-Za-z0-9_]{1,}>\s*[A-Za-z0-9_]{0,};',
r'[A-Za-z0-9_]{1,}\s{1,}[A-Za-z0-9_]{1,}\s{1,}[A-Za-z0-9_]{0,};',
]



def find_function(line):
"""
:param: line: représente le code à analyser
:return retourne les différents blocks représentant ce code (fonction while for if ..)
"""

blockCodes = []
i = 0
cptAcollade = 0
newBlock=""
addAblock = False

while i < len(line):

if line[i] == "{":

cptAcollade += 1
newBlock += line[i]
addAblock = True
i +=1

while cptAcollade != 0 and newBlock != "" and i < len(line):

if line[i] == "{":
cptAcollade += 1

elif line[i] == "}":
cptAcollade -= 1

if addAblock:
newBlock += line[i]

if cptAcollade == 0:

blockCodes.append(newBlock)
newBlock = ""
i +=1

i +=1

return blockCodes











def remove_comentary(lignes):
"""
:param liste_variable: représente la liste des variables du code
:return: retourne la liste des variables après avoir ajouté un espace après le type de la variable. Permet de différencier les types Matrice et collection<Matrice>
"""
long_comment = False
code_without_comentary = []

for ligne in lignes:

if "//" in ligne:
tab_line = ligne.split("//")
code_without_comentary.append(tab_line[0])

elif "/*" in ligne and "*/" in ligne:
tab_line1 = ligne.split("/*")
tab_line2 = ligne.split("*/")
new_line = tab_line1[0] + tab_line2[len(tab_line2)-1]
code_without_comentary.append(new_line)

elif "/*" in ligne:
tab_line = ligne.split("/*")
code_without_comentary.append(tab_line[0])
long_comment = True

elif "*/" in ligne:
tab_line = ligne.split("*/")
code_without_comentary.append(tab_line[len(tab_line)-1])
long_comment = False


elif not long_comment:
code_without_comentary.append(ligne)



return code_without_comentary


def excecEvalNbLigneFonction(lignes):

listFunction = []
listVariableRename = []
lastListVariableRename = []

listVarBlock = []

scopeCodeUser = False
firstInsert = False
long_comment = False

lignesCompacte = ""
newBlock = []
functionCode = ""

lignes = remove_comentary(lignes)

for ligne in lignes:

if "#include" not in ligne and "using namespace" not in ligne:
lignesCompacte +=ligne


listFunctionCode = find_function(lignesCompacte)

cpt_error = 0
for function in listFunctionCode:
function = function.replace(" ","")
cpt_ligne = function.count('\n')-1


table_rm = function.split('\n')
cpt_rm = 0

for ligne in table_rm:
ligne = ligne.replace(" ","")
if len(ligne) ==0:
cpt_rm +=1

if cpt_ligne-cpt_rm > 30:
cpt_error+=1

return cpt_error
Loading