How to use sauter method in SeleniumBase

Best Python code snippet using SeleniumBase

constants.py

Source:constants.py Github

copy

Full Screen

1parameters_name = ['sauter.EY6AS680.Commande ventilation',2 'sauter.EY6AS680.Commande pompe P14',3 'sauter.EY6AS680.Etat pompe P14',4 'sauter.EY6AS680.Cons Tmp enclenchement aerotherme chaud',5 'sauter.EY6AS680.Commande ventilateur soufflage',6 'sauter.EY6AS680.Commande pompe P16',7 'sauter.EY6AS680.Etat pompe P16',8 'sauter.EY6AS680.Commande aerotherme chaud',9 'sauter.EY6AS680.Etat pompe aerotherme P4 CoP7CH',10 'sauter.EY6AS680.Commande pompe aerotherme P5 (CoP6Vf)',11 'sauter.EY6AS680.Commande aerotherme froid',12 'sauter.EY6AS680.Etat pompe aerotherme P5 CoP6Vf',13 'sauter.EY6AS680.Autorisation Aerothermes',14 'sauter.EY6AS680.Alarme bruleur',15 'sauter.EY6AS680.Alarme niveau bas granule',16 'sauter.EY6AS680.Alarme pompe P15',17 "sauter.EY6AS680.Alarme manque d'eau",18 'sauter.EY6AS680.Securite temperature de depart',19 'sauter.EY6AS680.Autorisation circuit plancher chauffant',20 'sauter.EY6AS680.Energie circuit',21 'sauter.EY6AS680.Puissance circuit',22 'sauter.EY6AS680.Debit circuit',23 'sauter.EY6AS680.Tmp depart circuit',24 'sauter.EY6AS680.Tmp retour circuit',25 'sauter.EY6AS680.Commande bruleur',26 'sauter.EY6AS680.Commande pompe P15b',27 "sauter.EY6AS680.Commande vanne d'orientation vers ballon 3WV11",28 "sauter.EY6AS680.Commande vanne d'orientation vers GFA 3WV11",29 "sauter.EY6AS680.Commande vanne d'orientation retour vers ballon 3WV13",30 "sauter.EY6AS680.Commande vanne d'orientation retour vers GFA 3WV13",31 'sauter.EY6AS680.Etat bruleur',32 'sauter.EY6AS680.Etat pompe P15',33 'sauter.EY6AS680.Temperature basse bouteille melange',34 'sauter.EY6AS680.Temperature haute bouteille melange',35 'sauter.EY6AS680.Temperature depart secondaire',36 'sauter.EY6AS680.Commande ouverture vanne de regulation 3WV12',37 'sauter.EY6AS680.Signal V3V',38 'sauter.EY6AS680.Signal vanne circuit plancher chauffant',39 'sauter.EY6AS680.Cons Tmp depart ',40 'sauter.EY6AS680.Cons Tmp ext arret chauffage',41 'sauter.EY6AS680.Cons Tmp maxi depart',42 'sauter.EY6AS680.Cons Tmp calcul pour plancher chauffant',43 'sauter.EY6AS680.Choix orientation distribution',44 'sauter.EY6AS680.Commande pompe aerotherme P4 (CoP7CH)',45 'sauter.EY6AS680.Autorisation circuit plafond refarichissant',46 'sauter.EY6AS680.Horaire occupation',47 'sauter.EY6AS680.Signal V3V Froid',48 'sauter.EY6AS680.Signal vanne circuit plancher chauffant Froid',49 'sauter.EY6AS680.Cons Tmp occupation',50 'sauter.EY6AS680.Cons Tmp inoccupation',51 'sauter.EY6AS680.Cons Tmp ext arret refroidissement',52 'sauter.EY6AS680.Cons Tmp mini depart',53 'sauter.EY6AS680.Cons Tmp maxi depart froid',54 'sauter.EY6AS680.Cons Tmp calcul pour plafond refroidissant',55 'sauter.EY6AS680.Autorisation circuit plancher chauffant chauff',56 'sauter.EY6AS680.Commande pompe P2 (CoPPLC)',57 'sauter.EY6AS680.Temperature depart W02 (TdepPLC)',58 'sauter.EY6AS680.Commande vanne de regulation 3WV4 (VaPLF)',59 'sauter.EY6AS680.Horaire occupation chauff',60 'sauter.EY6AS680.Signal V3V chauff',61 'sauter.EY6AS680.Signal vanne circuit plancher chauffant chauff',62 'sauter.EY6AS680.Cons pente chauffage',63 'sauter.EY6AS680.Cons Tmp occupation chauff',64 'sauter.EY6AS680.Cons Tmp inoccupation chauff',65 'sauter.EY6AS680.Cons Tmp hors gel',66 'sauter.EY6AS680.Cons Tmp ext arret chauffage chauff',67 'sauter.EY6AS680.Cons Tmp mini depart chauff',68 'sauter.EY6AS680.Cons Tmp maxi depart chauff',69 'sauter.EY6AS680.Cons Tmp calcul pour plancher chauffant chauff',70 'sauter.EY6AS680.Etat machine cogeneration',71 'sauter.EY6AS680.Comptage gaz entree cogeneration Ccogegaz',72 'sauter.EY6AS680.Compteur electrique Cclimetec Cogenerateur',73 'sauter.EY6AS680.Compteur energie produit par cogeneration',74 'sauter.EY6AS680.Compteur electrique general',75 'sauter.EY6AS680.Compteur energie aerothermes chauds (ComAEROchaud)',76 'sauter.EY6AS680.Compteur energie plancher chaud (ComPLC)',77 'sauter.EY6AS680.Compteur energie plafond froid (ComPLF)',78 'sauter.EY6AS680.Compteur energie chaudiere granule a bois',79 'sauter.EY6AS680.Temperature exterieure',80 'sauter.EY6AS680.Temperature exterieure moyenne sur 8h',81 'sauter.EY6AS680.Energie depart installation',82 'sauter.EY6AS680.Puissance depart installation',83 'sauter.EY6AS680.Debit depart installation',84 'sauter.EY6AS680.Tmp entree CQ3-ME04',85 'sauter.EY6AS680.Tmp sortie CQ3-ME05',86 'sauter.EY6AS680.Energie depart installation CQ2-ME01',87 'sauter.EY6AS680.Puissance depart installation CQ2-ME02',88 'sauter.EY6AS680.Debit depart installation CQ2-ME03',89 'sauter.EY6AS680.Tmp entree CQ2-ME04',90 'sauter.EY6AS680.Tmp sortie CQ2-ME05',91 'sauter.EY6AS680.Energie depart installation CQ4--ME01',92 'sauter.EY6AS680.Puissance depart installation CQ4--ME02',93 'sauter.EY6AS680.Debit depart installation CQ4--ME03 ',94 'sauter.EY6AS680.Tmp entree CQ4--ME04 ',95 'sauter.EY6AS680.Tmp sortie CQ4--ME05',96 'sauter.EY6AS680.Energie circuit CQM02--ME01 ',97 'sauter.EY6AS680.Puissance circuit CQM02--ME02',98 'sauter.EY6AS680.Debit circuit',99 'sauter.EY6AS680.Tmp depart circuit CQM02--ME04 ',100 'sauter.EY6AS680.Tmp retour circuit CQM02--ME05',101 'sauter.EY6AS680.Energie circuit CQM03-ME01 ',102 'sauter.EY6AS680.Puissance circuit CQM03-ME02',103 'sauter.EY6AS680.Debit circuit CQM03-ME03 ',104 'sauter.EY6AS680.Tmp depart circuit CQM03-ME04',105 'sauter.EY6AS680.Tmp retour circuit CQM03-ME05',106 'sauter.EY6AS680.Energie circuit CQM04-ME01',107 'sauter.EY6AS680.Puissance circuit CQM04-ME02 ',108 'sauter.EY6AS680.Debit circuit CQM04-ME03',109 'sauter.EY6AS680.Tmp depart circuit CQM04-ME04',110 'sauter.EY6AS680.Tmp retour circuit CQM04-ME05',111 'sauter.EY6AS680.Cons Tmp enclenchement GFA sur Tmp ballon',112 'sauter.EY6AS680.Commande pompe generateur P7 (CoP2)',113 'sauter.EY6AS680.Commande pompe condenseur P9 (CoP4)',114 'sauter.EY6AS680.Demande refroidissement GFA',115 'sauter.EY6AS680.Commande pompe condenseur P8 (CoP3)',116 'sauter.EY6AS680.Commande machine a adsorption (CoAd)',117 'sauter.EY6AS680.Etat pompe generateur P7 CoP2',118 'sauter.EY6AS680.Etat pompe generateur P9 CoP4',119 'sauter.EY6AS680.Etat pompe generateur P10 CoP5',120 'sauter.EY6AS680.Etat pompe generateur P8 CoP3',121 'sauter.EY6AS680.Etat machine a adsorption (CoAd)',122 'sauter.EY6AS680.Teg',123 'sauter.EY6AS680.Tsg',124 'sauter.EY6AS680.Tec',125 'sauter.EY6AS680.Tsc',126 'sauter.EY6AS680.Teev',127 'sauter.EY6AS680.Tsev',128 'sauter.EY6AS680.Commande pompe P3 (CoP7PLF)',129 'sauter.EY6AS680.Temperature depart W02 (TdepPLF)',130 'sauter.EY6AS680.Commande vanne de regulation 3WV3 (VaPLF)',131 'sauter.EY6AS680.Etat pompe P3 (CoP7PLF)',132 'sauter.EY6AS680.Etat pompe P2 (CoPPLC)',133 'sauter.EY6AS680.Temperature ambiante 1 (cote machine)',134 'sauter.EY6AS680.Temperature ambiante 2 (cote couloir)',135 'sauter.EY6AS680.Temperature ambiante 3 (cote table)',136 'sauter.EY6AS680.Temperature ambiante 4 (fenetres)',137 'sauter.EY6AS680.Temperature ambiante 5 (interieure chambre PLC)',138 'sauter.EY6AS680.Temperature ambiante 6 (interieure chambre RAD)',139 'sauter.EY6AS680.Synthese defaut',140 'sauter.EY6AS680.Energie circuit CQM01--ME01',141 'sauter.EY6AS680.Puissance circuit CQM01--ME02 ',142 'sauter.EY6AS680.Debit circuit CQM01--ME03 ',143 'sauter.EY6AS680.Tmp depart circuit CQM01--ME04',144 'sauter.EY6AS680.Tmp retour circuit CQM01--ME05',145 'sauter.EY6AS680.Commande autorisation de marche',146 'sauter.EY6AS680.Choix rejection',147 'sauter.EY6AS680.Dde GFA',148 'sauter.EY6AS680.Etat Marche / Arret',149 'sauter.EY6AS680.Fin de course ouverture V3V orientation PAC / Machine adsoption 3WV6',150 'sauter.EY6AS680.FDC fermeture V3V orientation PAC / Machine adsoption 3WV6',151 'sauter.EY6AS680.Etat pompe P12 reinjection',152 'sauter.EY6AS680.Etat pompe P11 PAC / reinjection',153 "sauter.EY6AS680.Debit d'eau circuit condenseur Q05 (D5)",154 'sauter.EY6AS680.Autorisation production solaire',155 'sauter.EY6AS680.Energie depart installation CQT-ME01',156 'sauter.EY6AS680.Puissance depart installation CQT-ME02',157 'sauter.EY6AS680.Debit depart installation CQT-ME03',158 'sauter.EY6AS680.Tmp entree CQT-ME04',159 'sauter.EY6AS680.Tmp sortie CQT-ME05',160 'sauter.EY6AS680.Etat pompe primaire P1',161 'sauter.EY6AS680.Etat pompe ballon 2',162 'sauter.EY6AS680.Tc1',163 'sauter.EY6AS680.Tc2',164 'sauter.EY6AS680.Tc3',165 'sauter.EY6AS680.Tc4',166 'sauter.EY6AS680.Tb1',167 'sauter.EY6AS680.Tb2',168 'sauter.EY6AS680.Tb3',169 'sauter.EY6AS680.Tb4',170 'sauter.EY6AS680.Teb',171 'sauter.EY6AS680.Tsb',172 'sauter.EY6AS680.Cons Delta T enclenchement P1',173 'sauter.EY6AS680.Cons Delta T declenchement P1',174 'sauter.EY6AS680.Cons Delta T enclenchement vanne haut ballon',175 'sauter.EY6AS680.Cons Delta T declenchement vanne haut ballon',176 'sauter.EY6AS680.Choix PAC / GFA',177 'sauter.EY6AS680.Commande pompe primaire P1 (CoP1)',178 'sauter.EY6AS680.Commande ouv V3V orientation M 3WV7 (CoSol)',179 'sauter.EY6AS680.Commande fer V3V orientation M 3WV7 (CoSol)',180 'sauter.EY6AS680.Fin de course V3V orientation ballon 3WV13',181 'sauter.EY6AS680.Fin de course V3V orientation GFA 3WV13',182 'sauter.EY6AS680.Fin de course V3V orientation ballon 3WV11',183 'sauter.EY6AS680.Fin de course V3V orientation GFA 3WV11',184 'sauter.EY6AS680.Autorisation VMC',185 'sauter.EY6AS680.Commande VMC double flux']186BS =[ "https://stackpath.bootstrapcdn.com/bootstrap/4.5.1/css/bootstrap.min.css",187 {188 'href': 'https://use.fontawesome.com/releases/v5.8.1/css/all.css',189 'rel': 'stylesheet',190 'integrity': 'sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf',191 'crossorigin': 'anonymous'192 }193]194extra_data_list = ['General Ref Point',195 'Mass de Bois', 'Volume gaz', 'Vitesse de rotation', 'Puissance Thermique',196 'Puissance Electrique', 'CO', 'CO2', 'NO', 'NOX', 'Temperature de Fumée'...

Full Screen

Full Screen

particle_statistics.py

Source:particle_statistics.py Github

copy

Full Screen

1#######################################################################################2# The purpose of this module is to collect a set of useful statistics functions that3# can be used to analyze lagrangian particle data.4#5# Author: Christopher Neal6#7# Date: 11-20-20158# Updated: 07-21-20199#10#######################################################################################11import logging12import numpy as np13logger = logging.getLogger(__name__)14class SauterMeanDiameterCalculatorFactory(object):15 def __init__(self, bin_flag):16 self.bin_flag = bin_flag17 def get_sauter_mean_diameter_class(self):18 if self.bin_flag == 0: #No diameter bins19 logger.debug('Sauter Mean Diameter being computed with no diameter bins')20 return SauterMeanDiameterCalculatorNoBins()21 if self.bin_flag == 1: #Use diameter bins to compute sauter mean diameter22 logger.debug('Sauter Mean Diameter being computed with diameter bins')23 return SauterMeanDiameterCalculatorDiameterBins()24class SauterMeanDiameterCalculator(object):25 def __init__(self):26 pass27 def compute_sauter_mean_diameter(self, particle_bin_cell):28 raise NotImplementedError29 30 def IQR(self, data):31 """32 data is the form of a list of information such as observations of an experiment.33 """34 q75, q25 = np.percentile(data, [75 ,25])35 return q75 - q2536class SauterMeanDiameterCalculatorNoBins(SauterMeanDiameterCalculator):37 def __init__(self):38 super(SauterMeanDiameterCalculatorNoBins, self).__init__()39 40 def compute_sauter_mean_diameter(self, particle_bin_cell):41 if particle_bin_cell.num_parcels == 0:42 logger.debug("No Particles in Bin. Nothing will be output for this data set")43 smd = 0 44 return smd 45 46 numerator = 047 denominator = 048 for parcel in particle_bin_cell.parcels:49 numerator += parcel['particles_per_parcel'] * parcel['diameter']**350 denominator += parcel['particles_per_parcel'] * parcel['diameter']**251 52 smd = numerator/denominator53 return smd54class SauterMeanDiameterCalculatorDiameterBins(SauterMeanDiameterCalculator):55 def __init__(self):56 super(SauterMeanDiameterCalculatorDiameterBins, self).__init__()57 58 def compute_diameter_bins(self, diameters):59 """60 Takes in a list of diameters and returns a list of bin61 min and max coordinates for creating a histogram of62 the diameter data.63 """64 #Freedman-Diaconis bin size estimation65 h = 2 * self.IQR(diameters) * len(diameters)**(-1.0/3.0)66 logger.debug("Diameter Bin size(based on %d samples) is: %10.2E"%(len(diameters), h))67 d_min = np.amin(diameters)68 d_max = np.amax(diameters)69 logger.debug("Minimum Particle Diameter: %10.2E"%(d_min))70 logger.debug("Maximum Particle Diameter: %10.2E"%(d_max))71 72 num_bins = 173 d_bins = [d_min]74 d_start = d_min75 all_bins_found = False76 while all_bins_found == False:77 d_bins.append(d_bins[-1] + h)78 if d_bins[-1] <= d_max:79 num_bins += 180 else:81 all_bins_found = True82 logger.debug("Number of diameter bins is: %d"%(num_bins))83 #Create vector of particle diameter bin coordinates84 bin_coords = [{'d_min': d_min, 'd_max': d_min + h}]85 for i in range(1, num_bins):86 entry = {'d_min': bin_coords[-1]['d_max'] , 'd_max': bin_coords[-1]['d_max'] + h}87 bin_coords.append(entry) 88 for i, bin_coord in enumerate(bin_coords):89 logger.debug("Diameter Bin %d \t%10.2E\t%10.2E\n"%(i + 1, bin_coord['d_min'], bin_coord['d_max']))90 91 return bin_coords92 93 def compute_sauter_mean_diameter(self, particle_bin_cell):94 if particle_bin_cell.num_parcels == 0:95 logger.debug("No Particles in Bin. Nothing will be output for this data set")96 smd = 0 97 return smd 98 99 particle_diameters = [parcel['diameter'] for parcel in particle_bin_cell.parcels]100 logger.debug('Parcel Diameters')101 logger.debug(particle_diameters)102 diameter_bin_coords = self.compute_diameter_bins(particle_diameters)103 #Sort the particles into Bins104 logger.debug('Sorting parcels into diameter bins')105 dia_bin_counts = np.zeros(len(diameter_bin_coords))106 for parcel in particle_bin_cell.parcels:107 for i, dia_bin in enumerate(diameter_bin_coords):108 if parcel['diameter'] <= dia_bin['d_max'] and parcel['diameter'] >= dia_bin['d_min']:109 dia_bin_counts[i] += 1110 111 logger.debug("Bin Counts:")112 logger.debug(dia_bin_counts)113 logger.debug("Sum of particles in bins: %d\n"%(np.sum(dia_bin_counts)))114 #Now tha the bins are constructed we compute the Sauter mean diameter using the bins115 #we use the mean diameter in the bin as the representative value of the diameter for all particles in a bin.116 numerator = 0117 denominator = 0118 for i, dia_bin in enumerate(diameter_bin_coords):119 numerator += dia_bin_counts[i] * (0.5 * (dia_bin['d_max'] + dia_bin['d_min']))**3120 denominator += dia_bin_counts[i] * (0.5 * (dia_bin['d_max'] + dia_bin['d_min']))**2121 smd = numerator/denominator122 ...

Full Screen

Full Screen

module1pierre.py

Source:module1pierre.py Github

copy

Full Screen

1# Créé par boivin, le 20/03/2017 en Python 3.22import pygame3from pygame.locals import *45pygame.init()67horloge = pygame.time.Clock()8fenetre = pygame.display.set_mode((640, 480))9ouvert= True10sauter = 01112fond = pygame.image.load("background.jpg").convert()13fenetre.blit (fond, (0, 0))14151617perso = pygame.image.load("perso.png").convert_alpha()18position_perso = perso.get_rect()19fenetre.blit(perso, position_perso)2021saut = -2022saut2 = -202324pygame.display.flip()25pygame.key.set_repeat(400, 30)26while ouvert :27 horloge.tick(60)28 for event in pygame.event.get():29 if event.type == QUIT or (event.type == KEYUP and event.key == K_ESCAPE):30 ouvert = False31 if event.type == KEYDOWN :32 if event.key == K_s :33 position_perso = position_perso.move(0,10)34 if event.key == K_d :35 position_perso = position_perso.move(10,0)36 if event.key == K_a :37 position_perso = position_perso.move(-10, 0)38 if sauter <=1 and event.key == K_SPACE :39 sauter = sauter+140 if sauter == 2 and saut < 0:41 saut = -saut4243444546 if sauter==1 and saut2==-20:47 position_perso = position_perso.move(0, saut)48 saut = saut+149 if saut > 20 :50 sauter = 051 saut = -2052 if sauter ==2:53 position_perso = position_perso.move (0, saut2)54 saut2=saut2+155 if saut2>20:56 sauter=sauter-157 saut2 = -20585960 fenetre.blit (fond, (0, 0))61 fenetre.blit(perso, position_perso)62 pygame.display.flip()63 ...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run SeleniumBase automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful