Best Python code snippet using autotest_python
plot_data.py
Source: plot_data.py
...101 if selection == "annotations":102 obj._add_annotations(plot_data)103 continue104 if not obj._add_label(plot_data, selection):105 obj._add_additional_data(obj, plot_data, selection)106 obj.annotations["events"] = AnnotationData()107 obj._add_events(getattr(plot_data, "events", None))108 return obj109 @staticmethod110 def _add_additional_data(obj, plot_data, selection):111 if not obj.additional_data:112 obj.additional_data = {}113 obj.additional_data[selection] = plot_data[selection]114 def _add_annotations(self, plot_data: Dict):115 if not plot_data.get("annotations", None):116 return117 for label in plot_data["annotations"].keys():118 self._add_label(plot_data, label)119 def _add_events(self, events: pd.DataFrame):120 if not events:121 return122 global_labels = [label for label in self.parent().global_data.labels if label.name in self.annotations]123 for _, event in events.iterrows():124 for label in global_labels:...
sensor_info_item.py
Source: sensor_info_item.py
...35 self._check_columns(data)36 if not self._key:37 self._add_first_data(data)38 else:39 return self._add_additional_data(data)40 return self._key41 def _add_first_data(self, data):42 self._key = self.get_key(data)43 self._data = data44 self._add_info(data)45 def _add_additional_data(self, data):46 if self.get_key(data) != self._key:47 return False48 self._add_info(data)49 return self._key50 def _add_info(self, data):51 self._set_valid_from(data)52 self._set_valid_to(data)53 self._add_calibration_date(data)54 def _set_valid_from(self, data):55 if not self._valid_from:56 self._valid_from = self._get_time_object(data['TIME'])57 else:58 self._valid_from = min(self._valid_from, self._get_time_object(data['TIME']))59 def _set_valid_to(self, data):...
metrocaller.py
Source: metrocaller.py
...21 if _anormal_status_lines_pdf.size > 0:22 return [str(x) for x in _anormal_status_lines_pdf['metro_line'].values]23 else:24 return []25 def _add_additional_data(self):26 for key in self.data_dict.keys():27 self.data_dict[key].loc[:, self._db_tablename + '_date'] \28 = datetime.now().strftime('%Y-%m-%d %H:%M:%S')29 return self.data_dict30 def _clean_decoded_API_data(self, json_data):31 _metro_data_pdf = pd.json_normalize(json_data['result']['metros'])32 _metro_data_pdf.columns = ['metro_line','slug','title','metro_message']33 _metro_data_pdf.loc[:,'metro_line'] = _metro_data_pdf.loc[:,'metro_line'].astype('string')34 _lines = json.loads(os.getenv('METRO_LINES'))35 _lines = [str(x) for x in _lines]36 _metro_data_pdf = _metro_data_pdf[_metro_data_pdf['metro_line'].isin(_lines)]37 # old treatment in old metro.py file38 self.data_dict = {39 'metro_status': _metro_data_pdf...
Check out the latest blogs from LambdaTest on this topic:
Before we discuss Scala testing, let us understand the fundamentals of Scala and how this programming language is a preferred choice for your development requirements.The popularity and usage of Scala are rapidly rising, evident by the ever-increasing open positions for Scala developers.
So, now that the first installment of this two fold article has been published (hence you might have an idea of what Agile Testing is not in my opinion), I’ve started feeling the pressure to explain what Agile Testing actually means to me.
Did you know that according to Statista, the number of smartphone users will reach 18.22 billion by 2025? Let’s face it, digital transformation is skyrocketing and will continue to do so. This swamps the mobile app development market with various options and gives rise to the need for the best mobile app testing tools
As a developer, checking the cross browser compatibility of your CSS properties is of utmost importance when building your website. I have often found myself excited to use a CSS feature only to discover that it’s still not supported on all browsers. Even if it is supported, the feature might be experimental and not work consistently across all browsers. Ask any front-end developer about using a CSS feature whose support is still in the experimental phase in most prominent web browsers. ????
The count of mobile users is on a steep rise. According to the research, by 2025, it is expected to reach 7.49 billion users worldwide. 70% of all US digital media time comes from mobile apps, and to your surprise, the average smartphone owner uses ten apps per day and 30 apps each month.
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.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!