Ilyas KHIAT commited on
Commit
6bccd8a
1 Parent(s): e3e0021

new version

Browse files
Files changed (2) hide show
  1. emissions.csv +3 -1
  2. empreinte_carbone.py +6 -3
emissions.csv CHANGED
@@ -2013,4 +2013,6 @@ N,1.0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2013
  2024-09-03T22:34:13,codecarbon,cfb26c96-cd2c-4730-be56-e9e2d85446f9,0.0390017032623291,1.8160302623281019e-07,4.656284496380356e-06,42.5,160.66647389009725,5.86829710006714,4.486320747269525e-07,1.6533346559946538e-06,3.758517531887644e-08,2.1395519060404827e-06,France,FRA,nouvelle-aquitaine,,,Windows-11-10.0.22631-SP0,3.12.3,2.5.0,16.0,12th Gen Intel(R) Core(TM) i5-12500H,1,1 x NVIDIA GeForce RTX 4050 Laptop GPU,-0.6455,44.8152,15.648792266845703,machine,N,1.0
2014
  2024-09-04T08:51:38,codecarbon,2b053ea7-7802-4341-8f5a-bb5ad7c14df2,0.0597562789916992,6.627027956068078e-07,1.1090094744668829e-05,42.5,499.4000350587218,5.86829710006714,6.979099578327603e-07,7.053616754008896e-06,5.6091139532744215e-08,7.8076178513744e-06,France,FRA,nouvelle-aquitaine,,,Windows-11-10.0.22631-SP0,3.12.3,2.5.0,16.0,12th Gen Intel(R) Core(TM) i5-12500H,1,1 x NVIDIA GeForce RTX 4050 Laptop GPU,-0.6455,44.8152,15.648792266845703,machine,N,1.0
2015
  2024-09-05T12:02:04,codecarbon,72eb6959-6558-4d0e-8c12-5fa0b294c843,0.2689521312713623,1.4629914065235269e-06,5.439597744058868e-06,42.5,188.3749261213956,5.86829710006714,3.1397377451260887e-06,1.3706955410000728e-05,3.8950668845672e-07,1.7236199843583534e-05,France,FRA,nouvelle-aquitaine,,,Windows-11-10.0.22631-SP0,3.12.3,2.5.0,16.0,12th Gen Intel(R) Core(TM) i5-12500H,1,1 x NVIDIA GeForce RTX 4050 Laptop GPU,-0.6455,44.8152,15.648792266845703,machine,N,1.0
2016
- 2024-09-05T12:02:57,codecarbon,61ef8a99-002f-4935-8e79-81987cd7be4b,0.16689229011535645,1.9317984413896042e-07,1.1575120936109986e-06,42.5,6.708094876142317,5.86829710006714,1.934847732385e-06,3.0166690800133983e-07,3.942928141952962e-08,2.2759439218058693e-06,France,FRA,nouvelle-aquitaine,,,Windows-11-10.0.22631-SP0,3.12.3,2.5.0,16.0,12th Gen Intel(R) Core(TM) i5-12500H,1,1 x NVIDIA GeForce RTX 4050 Laptop GPU,-0.6455,44.8152,15.648792266845703,machine,N,1.0
 
 
 
2013
  2024-09-03T22:34:13,codecarbon,cfb26c96-cd2c-4730-be56-e9e2d85446f9,0.0390017032623291,1.8160302623281019e-07,4.656284496380356e-06,42.5,160.66647389009725,5.86829710006714,4.486320747269525e-07,1.6533346559946538e-06,3.758517531887644e-08,2.1395519060404827e-06,France,FRA,nouvelle-aquitaine,,,Windows-11-10.0.22631-SP0,3.12.3,2.5.0,16.0,12th Gen Intel(R) Core(TM) i5-12500H,1,1 x NVIDIA GeForce RTX 4050 Laptop GPU,-0.6455,44.8152,15.648792266845703,machine,N,1.0
2014
  2024-09-04T08:51:38,codecarbon,2b053ea7-7802-4341-8f5a-bb5ad7c14df2,0.0597562789916992,6.627027956068078e-07,1.1090094744668829e-05,42.5,499.4000350587218,5.86829710006714,6.979099578327603e-07,7.053616754008896e-06,5.6091139532744215e-08,7.8076178513744e-06,France,FRA,nouvelle-aquitaine,,,Windows-11-10.0.22631-SP0,3.12.3,2.5.0,16.0,12th Gen Intel(R) Core(TM) i5-12500H,1,1 x NVIDIA GeForce RTX 4050 Laptop GPU,-0.6455,44.8152,15.648792266845703,machine,N,1.0
2015
  2024-09-05T12:02:04,codecarbon,72eb6959-6558-4d0e-8c12-5fa0b294c843,0.2689521312713623,1.4629914065235269e-06,5.439597744058868e-06,42.5,188.3749261213956,5.86829710006714,3.1397377451260887e-06,1.3706955410000728e-05,3.8950668845672e-07,1.7236199843583534e-05,France,FRA,nouvelle-aquitaine,,,Windows-11-10.0.22631-SP0,3.12.3,2.5.0,16.0,12th Gen Intel(R) Core(TM) i5-12500H,1,1 x NVIDIA GeForce RTX 4050 Laptop GPU,-0.6455,44.8152,15.648792266845703,machine,N,1.0
2016
+ 2024-09-05T12:02:57,codecarbon,61ef8a99-002f-4935-8e79-81987cd7be4b,0.1668922901153564,1.9317984413896042e-07,1.1575120936109986e-06,42.5,6.708094876142317,5.86829710006714,1.934847732385e-06,3.0166690800133983e-07,3.942928141952962e-08,2.2759439218058693e-06,France,FRA,nouvelle-aquitaine,,,Windows-11-10.0.22631-SP0,3.12.3,2.5.0,16.0,12th Gen Intel(R) Core(TM) i5-12500H,1,1 x NVIDIA GeForce RTX 4050 Laptop GPU,-0.6455,44.8152,15.648792266845703,machine,N,1.0
2017
+ 2024-09-05T14:13:04,codecarbon,eb1b64f8-7f35-45ec-8d23-e3537ce18532,0.04872727394104,5.1577938682970944e-08,1.058502446604754e-06,42.5,0.0,5.86829710006714,5.634562836752998e-07,0.0,4.4208022960863986e-08,6.076643066361637e-07,France,FRA,nouvelle-aquitaine,,,Windows-11-10.0.22631-SP0,3.12.3,2.5.0,16.0,12th Gen Intel(R) Core(TM) i5-12500H,1,1 x NVIDIA GeForce RTX 4050 Laptop GPU,-0.6455,44.8152,15.648792266845703,machine,N,1.0
2018
+ 2024-09-05T14:20:24,codecarbon,600b9588-d16a-4fd4-bd2f-201461245acf,0.03897356986999512,3.716335214403317e-08,9.535526837289905e-07,42.5,0.0,5.86829710006714,4.182815551757813e-07,0.0,1.9557629357886223e-08,4.378391845336675e-07,France,FRA,nouvelle-aquitaine,,,Windows-11-10.0.22631-SP0,3.12.3,2.5.0,16.0,12th Gen Intel(R) Core(TM) i5-12500H,1,1 x NVIDIA GeForce RTX 4050 Laptop GPU,-0.6455,44.8152,15.648792266845703,machine,N,1.0
empreinte_carbone.py CHANGED
@@ -46,9 +46,12 @@ def display_cf_comparison(stm: st):
46
  emission_api = 0
47
  total_emission = serveur_emission + emission_api
48
 
49
- pourcentage_api = emission_api / total_emission
50
-
51
- pourcentage_serveur = serveur_emission / total_emission
 
 
 
52
 
53
 
54
 
 
46
  emission_api = 0
47
  total_emission = serveur_emission + emission_api
48
 
49
+ if total_emission == 0:
50
+ pourcentage_api = 0
51
+ pourcentage_serveur = 0
52
+ else:
53
+ pourcentage_api = emission_api / total_emission
54
+ pourcentage_serveur = serveur_emission / total_emission
55
 
56
 
57