Validation 19/03/22 - 10h21

master
ChérifBALDE 2022-03-19 11:54:37 +01:00 committed by cherif
parent a8a14b426e
commit c70ef33e42
4 changed files with 30 additions and 104 deletions

View File

@ -139,7 +139,7 @@ def add_class(diction):
if ("duree_formation" in diction.keys()):
if diction['duree_formation']:
mydata['duree_formation'] = diction['duree_formation']
mydata['duree_formation'] = int(str(diction['duree_formation']))
@ -1169,7 +1169,7 @@ def add_class_mass(file=None, Folder=None, diction=None):
mydata['institut_formation'] = str(df['institut_formation'].values[n])
mydata['distantiel'] = str(df['presentiel'].values[n])
mydata['url'] = str(df['url'].values[n])
mydata['duree_formation'] = str(df['duree_formation'].values[n])
mydata['duree_formation'] = int(str(df['duree_formation'].values[n]))
mydata['plus_produit'] = str(df['plus_produit'].values[n])
mydata['mots_cle'] = str(df['mots_cle'].values[n])
'''

View File

@ -1,86 +1,9 @@
,index,mots,occurence,moyenne,id_formation,source_field
0,0,publiquel,1,0.01,8866,default
1,1,transmiss,1,0.01,8866,default
2,2,apre,1,0.01,8866,default
3,3,liquid,1,0.01,8866,default
4,4,budgetl,1,0.01,8866,default
5,5,2,1,0.01,8866,default
6,6,toutavantun,1,0.01,8866,default
7,7,5,1,0.01,8866,default
8,8,vot,1,0.01,8866,default
9,9,present,1,0.01,8866,default
10,10,cot,2,0.02,8866,default
11,11,autoris,2,0.02,8866,default
12,12,suiv,2,0.02,8866,default
13,13,engag,1,0.01,8866,default
14,14,mis,1,0.01,8866,default
15,15,recouvr,1,0.01,8866,default
16,16,recettesconstat,1,0.01,8866,default
17,17,execu,2,0.02,8866,default
18,18,emiss,1,0.01,8866,default
19,19,financ,1,0.01,8866,default
20,20,cred,2,0.02,8866,default
21,21,ap,1,0.01,8866,default
22,22,cle,1,0.01,8866,default
23,23,structurel,1,0.01,8866,default
24,24,servic,1,0.01,8866,default
25,25,ordon,1,0.01,8866,default
26,26,programm,3,0.03,8866,default
27,27,p503,1,0.01,8866,default
28,28,different,1,0.01,8866,default
29,29,ordonnanc,1,0.01,8866,default
30,30,travailun,1,0.01,8866,default
31,31,amort,1,0.01,8866,default
32,32,processus,1,0.01,8866,default
33,33,pai,3,0.03,8866,default
34,34,autodiagnostic,1,0.01,8866,default
35,35,bp,1,0.01,8866,default
36,36,formationreduir,1,0.01,8866,default
37,37,del,1,0.01,8866,default
38,38,fondamental,1,0.01,8866,default
39,39,trait,1,0.01,8866,default
40,40,dgp,1,0.01,8866,default
41,41,princip,1,0.01,8866,default
42,42,charg,2,0.02,8866,default
43,43,oper,2,0.02,8866,default
44,44,rest,1,0.01,8866,default
45,45,toutdevelopp,1,0.01,8866,default
46,46,groupe1,1,0.01,8866,default
47,47,creanc,1,0.01,8866,default
48,48,realis,1,0.01,8866,default
49,49,titr,1,0.01,8866,default
50,50,cp,1,0.01,8866,default
51,51,situat,1,0.01,8866,default
52,52,4,1,0.01,8866,default
53,53,produit,1,0.01,8866,default
54,54,lois,1,0.01,8866,default
55,55,elabor,1,0.01,8866,default
56,56,publiqu,1,0.01,8866,default
57,57,pris,1,0.01,8866,default
58,58,provis,1,0.01,8866,default
59,59,depensesl,1,0.01,8866,default
60,60,comptabl,1,0.01,8866,default
61,61,primit,1,0.01,8866,default
62,62,def,1,0.01,8866,default
63,63,modif,1,0.01,8866,default
64,64,vir,1,0.01,8866,default
65,65,global,1,0.01,8866,default
66,66,valid,1,0.01,8866,default
67,67,budgetair,1,0.01,8866,default
68,68,3,1,0.01,8866,default
69,69,budget,4,0.04,8866,default
70,70,comptabilit,2,0.02,8866,default
71,71,semain,2,0.02,8866,default
72,72,decis,1,0.01,8866,default
73,73,general,1,0.01,8866,default
74,74,control,1,0.01,8866,default
75,75,rapport,1,0.01,8866,default
76,76,renforc,1,0.01,8866,default
77,77,7,1,0.01,8866,default
78,78,cloturel,1,0.01,8866,default
79,79,rectif,1,0.01,8866,default
80,80,separ,1,0.01,8866,default
81,81,orient,1,0.01,8866,default
82,82,notion,2,0.02,8866,default
83,83,ordre,1,0.01,8866,default
84,84,oeuvr,1,0.01,8866,default
0,0,renforc,1,0.11,8866,default
1,1,comptabilit,1,0.11,8866,default
2,2,fondamental,1,0.11,8866,default
3,3,semain,2,0.22,8866,default
4,4,programm,1,0.11,8866,default
5,5,def,1,0.11,8866,default
6,6,7,1,0.11,8866,default
7,7,publiqu,1,0.11,8866,default

1 index mots occurence moyenne id_formation source_field
2 0 0 publiquel renforc 1 0.01 0.11 8866 default
3 1 1 transmiss comptabilit 1 0.01 0.11 8866 default
4 2 2 apre fondamental 1 0.01 0.11 8866 default
5 3 3 liquid semain 1 2 0.01 0.22 8866 default
6 4 4 budgetl programm 1 0.01 0.11 8866 default
7 5 5 2 def 1 0.01 0.11 8866 default
8 6 6 toutavantun 7 1 0.01 0.11 8866 default
9 7 7 5 publiqu 1 0.01 0.11 8866 default
8 8 vot 1 0.01 8866 default
9 9 present 1 0.01 8866 default
10 10 cot 2 0.02 8866 default
11 11 autoris 2 0.02 8866 default
12 12 suiv 2 0.02 8866 default
13 13 engag 1 0.01 8866 default
14 14 mis 1 0.01 8866 default
15 15 recouvr 1 0.01 8866 default
16 16 recettesconstat 1 0.01 8866 default
17 17 execu 2 0.02 8866 default
18 18 emiss 1 0.01 8866 default
19 19 financ 1 0.01 8866 default
20 20 cred 2 0.02 8866 default
21 21 ap 1 0.01 8866 default
22 22 cle 1 0.01 8866 default
23 23 structurel 1 0.01 8866 default
24 24 servic 1 0.01 8866 default
25 25 ordon 1 0.01 8866 default
26 26 programm 3 0.03 8866 default
27 27 p503 1 0.01 8866 default
28 28 different 1 0.01 8866 default
29 29 ordonnanc 1 0.01 8866 default
30 30 travailun 1 0.01 8866 default
31 31 amort 1 0.01 8866 default
32 32 processus 1 0.01 8866 default
33 33 pai 3 0.03 8866 default
34 34 autodiagnostic 1 0.01 8866 default
35 35 bp 1 0.01 8866 default
36 36 formationreduir 1 0.01 8866 default
37 37 del 1 0.01 8866 default
38 38 fondamental 1 0.01 8866 default
39 39 trait 1 0.01 8866 default
40 40 dgp 1 0.01 8866 default
41 41 princip 1 0.01 8866 default
42 42 charg 2 0.02 8866 default
43 43 oper 2 0.02 8866 default
44 44 rest 1 0.01 8866 default
45 45 toutdevelopp 1 0.01 8866 default
46 46 groupe1 1 0.01 8866 default
47 47 creanc 1 0.01 8866 default
48 48 realis 1 0.01 8866 default
49 49 titr 1 0.01 8866 default
50 50 cp 1 0.01 8866 default
51 51 situat 1 0.01 8866 default
52 52 4 1 0.01 8866 default
53 53 produit 1 0.01 8866 default
54 54 lois 1 0.01 8866 default
55 55 elabor 1 0.01 8866 default
56 56 publiqu 1 0.01 8866 default
57 57 pris 1 0.01 8866 default
58 58 provis 1 0.01 8866 default
59 59 depensesl 1 0.01 8866 default
60 60 comptabl 1 0.01 8866 default
61 61 primit 1 0.01 8866 default
62 62 def 1 0.01 8866 default
63 63 modif 1 0.01 8866 default
64 64 vir 1 0.01 8866 default
65 65 global 1 0.01 8866 default
66 66 valid 1 0.01 8866 default
67 67 budgetair 1 0.01 8866 default
68 68 3 1 0.01 8866 default
69 69 budget 4 0.04 8866 default
70 70 comptabilit 2 0.02 8866 default
71 71 semain 2 0.02 8866 default
72 72 decis 1 0.01 8866 default
73 73 general 1 0.01 8866 default
74 74 control 1 0.01 8866 default
75 75 rapport 1 0.01 8866 default
76 76 renforc 1 0.01 8866 default
77 77 7 1 0.01 8866 default
78 78 cloturel 1 0.01 8866 default
79 79 rectif 1 0.01 8866 default
80 80 separ 1 0.01 8866 default
81 81 orient 1 0.01 8866 default
82 82 notion 2 0.02 8866 default
83 83 ordre 1 0.01 8866 default
84 84 oeuvr 1 0.01 8866 default

View File

@ -1,14 +1,9 @@
mots occurence moyenne id_formation source_field
0 publiquel 1 0.01 8866 default
1 transmiss 1 0.01 8866 default
2 apre 1 0.01 8866 default
3 liquid 1 0.01 8866 default
4 budgetl 1 0.01 8866 default
.. ... ... ... ... ...
80 separ 1 0.01 8866 default
81 orient 1 0.01 8866 default
82 notion 2 0.02 8866 default
83 ordre 1 0.01 8866 default
84 oeuvr 1 0.01 8866 default
[85 rows x 5 columns]
mots occurence moyenne id_formation source_field
0 renforc 1 0.11 8866 default
1 comptabilit 1 0.11 8866 default
2 fondamental 1 0.11 8866 default
3 semain 2 0.22 8866 default
4 programm 1 0.11 8866 default
5 def 1 0.11 8866 default
6 7 1 0.11 8866 default
7 publiqu 1 0.11 8866 default

View File

@ -127,7 +127,7 @@ def get_all_class(diction):
# Dictionnaire des champs utilisables
field_list = ['token', 'user_ip', 'user_country_code', 'user_country_name', 'user_city',
'user_postal', 'user_latitude', 'user_longitude', 'user_state', 'search_text', 'certif',
'support', 'type', 'lang', 'price', 'distance']
'support', 'type', 'lang', 'price', 'distance', 'duration']
incom_keys = diction.keys()
@ -223,7 +223,7 @@ def recherche_text_simple(diction):
'''
field_list = ['token', 'user_ip', 'user_country_code', 'user_country_name', 'user_city',
'user_postal', 'user_latitude', 'user_longitude', 'user_state', 'search_text', 'certif',
'support', 'type', 'lang', 'price', 'distance']
'support', 'type', 'lang', 'price', 'distance', 'duration']
incom_keys = diction.keys()
for val in incom_keys:
if val not in field_list:
@ -316,6 +316,14 @@ def recherche_text_simple(diction):
distance_crit['distance'] = diction['distance']
new_diction['distance'] = diction['distance']
duration_crit = {}
if ("duration" in diction.keys()):
if diction['duration']:
if (str(diction['duration']) != "0"):
duration_crit['duration'] = diction['duration']
new_diction['duration'] = diction['duration']
'''
/!\ Important : si le token est vide, alors c'est une recherche faite en mode non-connecté.
on doit l'accepter.
@ -596,7 +604,7 @@ def store_recherche(diction, user_recid=""):
field_list = ['token', 'user_ip', 'user_country_code', 'user_country_name', 'user_city',
'user_postal', 'user_latitude', 'user_longitude', 'user_state', 'search_text', 'certif',
'support', 'type', 'lang', 'price', 'distance']
'support', 'type', 'lang', 'price', 'distance', 'duration']
incom_keys = diction.keys()
for val in incom_keys:
if val not in field_list: