How to use class_name method in Slash

Best Python code snippet using slash

sql_parser.py

Source:sql_parser.py Github

copy

Full Screen

1import re2import json3import itertools as it4import numpy as np5sql_json = {6 "0": {"name": "abc", "tpm": 45, "selectable": True, "query": "return all from User, Person A as s, Person A as b"},7 "1": {"name": "query", "tpm": 35, "selectable": True, "query": "Update User Set Person A"},8 "2": {"name": "query", "tpm": 35, "selectable": True, "query": "Insert into Person A where count(all)= ?"},9 "3": {"name": "query", "tpm": 35, "selectable": True, "query": "Delete User where all= ?"},10 "4": {"name": "query", "tpm": 35, "selectable": True, "query": "CONNECT Person A, User WHERE name = ? "11 "and title = ? SET REL=actor"}}12uml_j = {"class": "GraphLinksModel",13 "copiesArrays": True,14 "copiesArrayObjects": True,15 "linkKeyProperty": "key",16 "linkLabelKeysProperty": "labelKeys",17 "modelData": {"position": "-209 -431.83671875"},18 "nodeDataArray": [19 {"type": "Class", "name": "Class", "properties": [], "methods": [], "key": -1, "loc": "-20 -80"},20 {"type": "Class", "name": "Bss", "properties": [], "methods": [], "key": -2, "loc": "-120 10"},21 {"type": "Class", "name": "User", "properties": [], "methods": [], "key": -3, "loc": "-20 -80"},22 {"type": "Class", "name": "Person A", "properties": [], "methods": [], "key": -4, "loc": "-120 10"}23 ],24 "linkDataArray": [25 {"category": "Linkble", "name": "association", "RoleFrom": "from", "RoleTo": "to", "MultiFrom": "0",26 "MultiTo": "1", "toArrow": "",27 "points": [4.84765625, -80, 14.84765625, -80, 14.84765625, -50.83671874999999, -2.576171875,28 -50.83671874999999, -20, -50.83671874999999, -20, -60.83671874999999], "from": -3, "to": -4,29 "labelKeys": [], "key": -1},30 {"name": "generalization", "toArrow": "Triangle",31 "points": [-120, 29.16328125, -120, 39.16328125, -93.82421875, 39.16328125, -93.82421875, -19.16328125,32 -120, -19.16328125, -120, -9.16328125], "from": -2, "to": -2, "labelKeys": [], "key": -2}33 ]}34class SQLParser:35 def __init__(self):36 pass37 @staticmethod38 def increment_matrix_table_cell(matrix, class_from, class_to, increase):39 i = max(class_from[1], class_to[1])40 j = min(class_from[1], class_to[1])41 matrix[i][j] += increase42 @staticmethod43 def get_classes_return_query(query_arr, classes_names):44 query_classes = {}45 index = -146 try:47 index = next(i for i, v in enumerate(query_arr) if v.lower() == 'from')48 except StopIteration:49 return {}50 idx = index + 151 while idx < len(query_arr) and query_arr[idx].lower() != 'where':52 if query_arr[idx] == '':53 idx += 154 continue55 class_name = None56 tmp_idx = idx57 exist = False58 for i in range(tmp_idx, tmp_idx + 4):59 if i >= len(query_arr) or query_arr[i].lower() == 'where':60 break61 if class_name is None:62 class_name = query_arr[i]63 else:64 class_name += " " + query_arr[i]65 if class_name in classes_names:66 if class_name in query_classes:67 query_classes[class_name] += 168 else:69 query_classes[class_name] = 170 idx = i71 exist = True72 break73 else:74 idx += 175 if not exist:76 if class_name in classes_names:77 if class_name in query_classes:78 query_classes[class_name] += 179 else:80 query_classes[class_name] = 181 if idx + 1 < len(query_arr) and query_arr[idx + 1].lower() == "as":82 idx += 283 idx += 184 return query_classes85 @staticmethod86 def get_classes_update_query(query_arr, classes_names):87 query_classes = {}88 idx = 189 while idx < len(query_arr) and query_arr[idx].lower() != 'set':90 if query_arr[idx] == '':91 idx += 192 continue93 class_name = None94 while idx < len(query_arr) and query_arr[idx].lower() != "set" and query_arr[idx][-1] != ',':95 if query_arr[idx] == '':96 idx += 197 continue98 if class_name is None:99 class_name = query_arr[idx]100 else:101 class_name += " " + query_arr[idx]102 idx += 1103 if idx >= len(query_arr) or query_arr[idx].lower() == "set":104 if class_name in classes_names:105 if class_name in query_classes:106 query_classes[class_name] += 1107 else:108 query_classes[class_name] = 1109 break110 else:111 if class_name is None:112 class_name = query_arr[idx][:-1]113 else:114 class_name += " " + query_arr[idx][:-1]115 if class_name in classes_names:116 if class_name in query_classes:117 query_classes[class_name] += 1118 else:119 query_classes[class_name] = 1120 idx += 1121 if idx < len(query_arr) and query_arr[idx].lower() == 'set':122 idx += 1123 while idx < len(query_arr) and query_arr[idx].lower() != 'where':124 if query_arr[idx] == '':125 idx += 1126 continue127 class_name = None128 while idx < len(query_arr) and query_arr[idx].lower() != "where" and query_arr[idx][-1] != ',':129 if query_arr[idx] == '':130 idx += 1131 continue132 if class_name is None:133 class_name = query_arr[idx]134 else:135 class_name += " " + query_arr[idx]136 idx += 1137 if idx >= len(query_arr) or query_arr[idx].lower() == "where":138 if class_name in classes_names:139 if class_name in query_classes:140 query_classes[class_name] += 1141 else:142 query_classes[class_name] = 1143 break144 else:145 if class_name is None:146 class_name = query_arr[idx][:-1]147 else:148 class_name += " " + query_arr[idx][:-1]149 if class_name in classes_names:150 if class_name in query_classes:151 query_classes[class_name] += 1152 else:153 query_classes[class_name] = 1154 idx += 1155 return query_classes156 @staticmethod157 def get_classes_insert_query(query_arr, classes_names):158 query_classes = {}159 idx = 2160 class_name = None161 while idx < len(query_arr) and query_arr[idx].lower() != 'where':162 if query_arr[idx] == '':163 idx += 1164 continue165 if class_name is None:166 class_name = query_arr[idx]167 else:168 class_name += " " + query_arr[idx]169 idx += 1170 if class_name in classes_names:171 if class_name in query_classes:172 query_classes[class_name] += 1173 else:174 query_classes[class_name] = 1175 return query_classes176 @staticmethod177 def get_classes_delete_query(query_arr, classes_names):178 query_classes = {}179 idx = 1180 class_name = None181 while idx < len(query_arr) and query_arr[idx].lower() != 'where':182 if query_arr[idx] == '':183 idx += 1184 continue185 if class_name is None:186 class_name = query_arr[idx]187 else:188 class_name += " " + query_arr[idx]189 idx += 1190 if class_name in classes_names:191 if class_name in query_classes:192 query_classes[class_name] += 1193 else:194 query_classes[class_name] = 1195 return query_classes196 @staticmethod197 def get_classes_connect_query(query_arr, classes_names):198 query_classes = {}199 idx = 1200 while idx < len(query_arr) and query_arr[idx].lower() != 'where':201 if query_arr[idx] == '':202 idx += 1203 continue204 class_name = None205 tmp_idx = idx206 exist = False207 for i in range(tmp_idx, tmp_idx + 4):208 if i >= len(query_arr) or query_arr[i].lower() == 'where':209 break210 if class_name is None:211 class_name = query_arr[i]212 else:213 class_name += " " + query_arr[i]214 if class_name in classes_names:215 if class_name in query_classes:216 query_classes[class_name] += 1217 else:218 query_classes[class_name] = 1219 idx = i220 exist = True221 break222 else:223 idx += 1224 if not exist:225 if class_name in classes_names:226 if class_name in query_classes:227 query_classes[class_name] += 1228 else:229 query_classes[class_name] = 1230 if idx + 1 < len(query_arr) and query_arr[idx + 1].lower() == "as":231 idx += 2232 idx += 1233 return query_classes234 @staticmethod235 def update_sql_matrix(matrix_classes, query_classes, classes, classes_names):236 for class_name in query_classes:237 if query_classes[class_name] > 1:238 class_key = classes_names[class_name]239 SQLParser.increment_matrix_table_cell(matrix_classes, classes[class_key], classes[class_key],240 query_classes[class_name] - 1)241 classes_combinations = list(it.combinations(query_classes.keys(), 2))242 for class_comb in classes_combinations:243 first_class = class_comb[0]244 second_class = class_comb[1]245 first_class_key = classes_names[first_class]246 second_class_key = classes_names[second_class]247 increase = max(query_classes[first_class], query_classes[second_class])248 SQLParser.increment_matrix_table_cell(matrix_classes, classes[first_class_key], classes[second_class_key], increase)249 @staticmethod250 def calculate_query_complexity(uml_json, query_classes, classes_names, query):251 classes_indexes = set()252 for class_name in query_classes:253 if query_classes[class_name] > 1:254 return 5255 classes_indexes.add(classes_names[class_name])256 query_lower = query.lower()257 if 'path' in query_lower:258 return 5259 links_array = uml_json["linkDataArray"]260 for link in links_array:261 to_node = link["to"]262 from_node = link["from"]263 if to_node in classes_indexes and from_node in classes_indexes:264 return 4265 operators = ["min", "max", "count", "type", "math"]266 if any(s in query_lower for s in operators):267 return 3268 if 'where' in query_lower:269 return 2270 return 1271 @staticmethod272 def parse(sql_json, uml_json):273 classes = {}274 classes_names = {}275 query_classes = {}276 queries_complexity = {}277 idx = 0 # index of class in matrix278 for node in uml_json["nodeDataArray"]:279 if "type" in node and (node["type"] == "Class" or node["type"] == "Association Class"):280 classes[node["key"]] = [node["name"], idx]281 classes_names[node["name"]] = node["key"]282 idx += 1283 matrix_classes = np.zeros((idx, idx))284 for key in sql_json:285 if sql_json[key]['selectable']:286 query = sql_json[key]['query']287 _RE_COMBINE_WHITESPACE = re.compile(r"\s+")288 query = _RE_COMBINE_WHITESPACE.sub(" ", query).strip()289 query_arr = re.split("[, ]", query)290 if query_arr[0].lower() == 'return':291 query_classes = SQLParser.get_classes_return_query(query_arr, classes_names)292 elif query_arr[0].lower() == 'update':293 query = query.replace(",", ", ")294 query = query.replace(" ,", ",")295 query = _RE_COMBINE_WHITESPACE.sub(" ", query).strip()296 query_arr = query.split(" ")297 query_classes = SQLParser.get_classes_update_query(query_arr, classes_names)298 elif query_arr[0].lower() == 'insert':299 query_classes = SQLParser.get_classes_insert_query(query_arr, classes_names)300 elif query_arr[0].lower() == 'delete':301 query_classes = SQLParser.get_classes_delete_query(query_arr, classes_names)302 elif query_arr[0].lower() == 'connect':303 query_classes = SQLParser.get_classes_connect_query(query_arr, classes_names)304 else:305 continue306 SQLParser.update_sql_matrix(matrix_classes, query_classes, classes, classes_names)307 complexity = SQLParser.calculate_query_complexity(uml_json, query_classes, classes_names, query)308 queries_complexity[key] = complexity309 res = {310 'classes': json.dumps(classes),311 'matrix_classes': json.dumps(dict(enumerate(matrix_classes.flatten(), 1))),312 'shape': matrix_classes.shape[0],313 'queries_complexity': queries_complexity314 }...

Full Screen

Full Screen

training_utils.py

Source:training_utils.py Github

copy

Full Screen

1import itertools2import random3import logging4from collections import defaultdict5from enum import Enum6from pathlib import Path7from typing import List8from flair.data import Dictionary, Sentence9from functools import reduce10class Metric(object):11 def __init__(self, name):12 self.name = name13 self._tps = defaultdict(int)14 self._fps = defaultdict(int)15 self._tns = defaultdict(int)16 self._fns = defaultdict(int)17 def add_tp(self, class_name):18 self._tps[class_name] += 119 def add_tn(self, class_name):20 self._tns[class_name] += 121 def add_fp(self, class_name):22 self._fps[class_name] += 123 def add_fn(self, class_name):24 self._fns[class_name] += 125 def get_tp(self, class_name=None):26 if class_name is None:27 return sum([self._tps[class_name] for class_name in self.get_classes()])28 return self._tps[class_name]29 def get_tn(self, class_name=None):30 if class_name is None:31 return sum([self._tns[class_name] for class_name in self.get_classes()])32 return self._tns[class_name]33 def get_fp(self, class_name=None):34 if class_name is None:35 return sum([self._fps[class_name] for class_name in self.get_classes()])36 return self._fps[class_name]37 def get_fn(self, class_name=None):38 if class_name is None:39 return sum([self._fns[class_name] for class_name in self.get_classes()])40 return self._fns[class_name]41 def precision(self, class_name=None):42 if self.get_tp(class_name) + self.get_fp(class_name) > 0:43 return round(self.get_tp(class_name) / (self.get_tp(class_name) + self.get_fp(class_name)), 4)44 return 0.045 def recall(self, class_name=None):46 if self.get_tp(class_name) + self.get_fn(class_name) > 0:47 return round(self.get_tp(class_name) / (self.get_tp(class_name) + self.get_fn(class_name)), 4)48 return 0.049 def f_score(self, class_name=None):50 if self.precision(class_name) + self.recall(class_name) > 0:51 return round(2 * (self.precision(class_name) * self.recall(class_name))52 / (self.precision(class_name) + self.recall(class_name)), 4)53 return 0.054 def accuracy(self, class_name=None):55 if self.get_tp(class_name) + self.get_fp(class_name) + self.get_fn(class_name) > 0:56 return round(57 (self.get_tp(class_name))58 / (self.get_tp(class_name) + self.get_fp(class_name) + self.get_fn(class_name)),59 4)60 return 0.061 def micro_avg_f_score(self):62 return self.f_score(None)63 def macro_avg_f_score(self):64 class_f_scores = [self.f_score(class_name) for class_name in self.get_classes()]65 macro_f_score = sum(class_f_scores) / len(class_f_scores)66 return macro_f_score67 def micro_avg_accuracy(self):68 return self.accuracy(None)69 def macro_avg_accuracy(self):70 class_accuracy = [self.accuracy(class_name) for class_name in self.get_classes()]71 if len(class_accuracy) > 0:72 return round(sum(class_accuracy) / len(class_accuracy), 4)73 return 0.074 def get_classes(self) -> List:75 all_classes = set(itertools.chain(*[list(keys) for keys76 in [self._tps.keys(), self._fps.keys(), self._tns.keys(),77 self._fns.keys()]]))78 all_classes = [class_name for class_name in all_classes if class_name is not None]79 all_classes.sort()80 return all_classes81 def to_tsv(self):82 return '{}\t{}\t{}\t{}'.format(83 self.precision(),84 self.recall(),85 self.accuracy(),86 self.micro_avg_f_score(),87 )88 @staticmethod89 def tsv_header(prefix=None):90 if prefix:91 return '{0}_PRECISION\t{0}_RECALL\t{0}_ACCURACY\t{0}_F-SCORE'.format(92 prefix)93 return 'PRECISION\tRECALL\tACCURACY\tF-SCORE'94 @staticmethod95 def to_empty_tsv():96 return '\t_\t_\t_\t_'97 def __str__(self):98 all_classes = self.get_classes()99 all_classes = [None] + all_classes100 all_lines = [101 '{0:<10}\ttp: {1} - fp: {2} - fn: {3} - tn: {4} - precision: {5:.4f} - recall: {6:.4f} - accuracy: {7:.4f} - f1-score: {8:.4f}'.format(102 self.name if class_name is None else class_name,103 self.get_tp(class_name), self.get_fp(class_name), self.get_fn(class_name), self.get_tn(class_name),104 self.precision(class_name), self.recall(class_name), self.accuracy(class_name),105 self.f_score(class_name))106 for class_name in all_classes]107 return '\n'.join(all_lines)108class EvaluationMetric(Enum):109 MICRO_ACCURACY = 'micro-average accuracy'110 MICRO_F1_SCORE = 'micro-average f1-score'111 MACRO_ACCURACY = 'macro-average accuracy'112 MACRO_F1_SCORE = 'macro-average f1-score'113class WeightExtractor(object):114 def __init__(self, directory: Path, number_of_weights: int = 10):115 self.weights_file = init_output_file(directory, 'weights.txt')116 self.weights_dict = defaultdict(lambda: defaultdict(lambda: list()))117 self.number_of_weights = number_of_weights118 def extract_weights(self, state_dict, iteration):119 for key in state_dict.keys():120 vec = state_dict[key]121 weights_to_watch = min(self.number_of_weights, reduce(lambda x, y: x * y, list(vec.size())))122 if key not in self.weights_dict:123 self._init_weights_index(key, state_dict, weights_to_watch)124 for i in range(weights_to_watch):125 vec = state_dict[key]126 for index in self.weights_dict[key][i]:127 vec = vec[index]128 value = vec.item()129 with open(self.weights_file, 'a') as f:130 f.write('{}\t{}\t{}\t{}\n'.format(iteration, key, i, float(value)))131 def _init_weights_index(self, key, state_dict, weights_to_watch):132 indices = {}133 i = 0134 while len(indices) < weights_to_watch:135 vec = state_dict[key]136 cur_indices = []137 for x in range(len(vec.size())):138 index = random.randint(0, len(vec) - 1)139 vec = vec[index]140 cur_indices.append(index)141 if cur_indices not in list(indices.values()):142 indices[i] = cur_indices143 i += 1144 self.weights_dict[key] = indices145def clear_embeddings(sentences: List[Sentence], also_clear_word_embeddings=False):146 """147 Clears the embeddings from all given sentences.148 :param sentences: list of sentences149 """150 for sentence in sentences:151 sentence.clear_embeddings(also_clear_word_embeddings=also_clear_word_embeddings)152def init_output_file(base_path: Path, file_name: str) -> Path:153 """154 Creates a local file.155 :param base_path: the path to the directory156 :param file_name: the file name157 :return: the created file158 """159 base_path.mkdir(parents=True, exist_ok=True)160 file = base_path / file_name161 open(file, "w", encoding='utf-8').close()162 return file163def convert_labels_to_one_hot(label_list: List[List[str]], label_dict: Dictionary) -> List[List[int]]:164 """165 Convert list of labels (strings) to a one hot list.166 :param label_list: list of labels167 :param label_dict: label dictionary168 :return: converted label list169 """170 return [[1 if l in labels else 0 for l in label_dict.get_items()] for labels in label_list]171def log_line(log):172 log.info('-' * 100)173def add_file_handler(log, output_file):174 init_output_file(output_file.parents[0], output_file.name)175 fh = logging.FileHandler(output_file)176 fh.setLevel(logging.INFO)177 formatter = logging.Formatter('%(asctime)-15s %(message)s')178 fh.setFormatter(formatter)...

Full Screen

Full Screen

classDict.py

Source:classDict.py Github

copy

Full Screen

1##################################################################2### class_dic3##################################################################4#class_dic = {5# '11100': {'class_name': 'Continuous Urban Fabric (S.L. &amp;gt; 80%)','train_id': 1},6# '11210': {'class_name': 'Discontinuous Dense Urban Fabric (S.L. : 50% - 80%)','train_id': 2},7# '11220': {'class_name': 'Discontinuous Medium Density Urban Fabric (S.L. : 30% - 50%)','train_id': 3},8# '11230': {'class_name': 'Discontinuous Low Density Urban Fabric (S.L. : 10% - 30%)','train_id': 4},9# '11240': {'class_name': 'Discontinuous Very Low Density Urban Fabric (S.L. &amp;lt; 10%)','train_id': 5},10# '11300': {'class_name': 'Isolated Structures', 'train_id': 6},11# '12100': {'class_name': 'Industrial, commercial, public, military and private units','train_id': 7},12# '12210': {'class_name': 'Fast transit roads and associated land','train_id': 8},13# '12220': {'class_name': 'Other roads and associated land', 'train_id': 8},14# '12230': {'class_name': 'Railways and associated land', 'train_id': 10},15# '12300': {'class_name': 'Port areas', 'train_id': 11},16# '12400': {'class_name': 'Airports', 'train_id': 12},17# '13100': {'class_name': 'Mineral extraction and dump sites', 'train_id': 13},18# '13300': {'class_name': 'Construction sites', 'train_id': 14},19# '13400': {'class_name': 'Land without current use', 'train_id': 15},20# '14100': {'class_name': 'Green urban areas', 'train_id': 16},21# '14200': {'class_name': 'Sports and leisure facilities', 'train_id': 17},22# '21000': {'class_name': 'Arable land (annual crops)', 'train_id': 18},23# '22000': {'class_name': 'Permanent crops (vineyards, fruit trees, olive groves)','train_id': 19},24# '23000': {'class_name': 'Pastures', 'train_id': 20},25# '24000': {'class_name': 'Complex and mixed cultivation patterns','train_id': 21},26# '25000': {'class_name': 'Orchards at the fringe of urban classes','train_id': 22},27# '31000': {'class_name': 'Forests', 'train_id': 23},28# '32000': {'class_name': 'Herbaceous vegetation associations (natural grassland, moors...)','train_id': 24},29# '33000': {'class_name': 'Open spaces with little or no vegetations (beaches, dunes, bare rocks, glaciers)','train_id': 25},30# '40000': {'class_name': 'Wetland', 'train_id': 26},31# '50000': {'class_name': 'Water bodies', 'train_id': 27}32#}33#class_dict = {34# '11100': {'class_name': 'Continuous Urban Fabric (S.L. &amp;gt; 80%)','train_id': 1},35# '11210': {'class_name': 'Discontinuous Dense Urban Fabric (S.L. : 50% - 80%)','train_id': 2},36# '11220': {'class_name': 'Discontinuous Medium Density Urban Fabric (S.L. : 30% - 50%)','train_id': 3},37# '11230': {'class_name': 'Discontinuous Low Density Urban Fabric (S.L. : 10% - 30%)','train_id': 4},38# '11240': {'class_name': 'Discontinuous Very Low Density Urban Fabric (S.L. &amp;lt; 10%)','train_id': 5},39# '11300': {'class_name': 'Isolated Structures', 'train_id': 6},40# '12100': {'class_name': 'Industrial, commercial, public, military and private units','train_id': 7},41# '12210': {'class_name': 'Fast transit roads and associated land','train_id': 8},42# '12220': {'class_name': 'Other roads and associated land', 'train_id': 8},43# '12230': {'class_name': 'Railways and associated land', 'train_id': 9},44# '12300': {'class_name': 'Port areas', 'train_id': 10},45# '12400': {'class_name': 'Airports', 'train_id': 11},46# '13100': {'class_name': 'Mineral extraction and dump sites', 'train_id': 12},47# '13300': {'class_name': 'Construction sites', 'train_id': 13},48# '13400': {'class_name': 'Land without current use', 'train_id': 14},49# '14100': {'class_name': 'Green urban areas', 'train_id': 15},50# '14200': {'class_name': 'Sports and leisure facilities', 'train_id': 16},51# '21000': {'class_name': 'Arable land (annual crops)', 'train_id': 17},52# '22000': {'class_name': 'Permanent crops (vineyards, fruit trees, olive groves)','train_id': 18},53# '23000': {'class_name': 'Pastures', 'train_id': 19},54# '24000': {'class_name': 'Complex and mixed cultivation patterns','train_id': 20},55# '25000': {'class_name': 'Orchards at the fringe of urban classes','train_id': 21},56# '31000': {'class_name': 'Forests', 'train_id': 22},57# '32000': {'class_name': 'Herbaceous vegetation associations (natural grassland, moors...)','train_id': 23},58# '33000': {'class_name': 'Open spaces with little or no vegetations (beaches, dunes, bare rocks, glaciers)','train_id': 24},59# '40000': {'class_name': 'Wetland', 'train_id': 25},60# '50000': {'class_name': 'Water bodies', 'train_id': 26}61#}62class_dict={63 '11100': {'train_id': 1, 'class_name': 'Continuous Urban Fabric (S.L. &amp;gt; 80%)'},64 '11210': {'train_id': 2, 'class_name': 'Discontinuous Dense Urban Fabric (S.L. : 50% - 80%)'},65 '11220': {'train_id': 3, 'class_name': 'Discontinuous Medium Density Urban Fabric (S.L. : 30% - 50%)'},66 '11230': {'train_id': 4, 'class_name': 'Discontinuous Low Density Urban Fabric (S.L. : 10% - 30%)'},67 '11240': {'train_id': 5, 'class_name': 'Discontinuous Very Low Density Urban Fabric (S.L. &amp;lt; 10%)'},68 '11300': {'train_id': 6, 'class_name': 'Isolated Structures'},69 '12100': {'train_id': 7, 'class_name': 'Industrial, commercial, public, military and private units'},70 '12210': {'train_id': 8, 'class_name': 'Fast transit roads and associated land'},71 '12220': {'train_id': 9, 'class_name': 'Other roads and associated land'},72 '12230': {'train_id': 10, 'class_name': 'Railways and associated land'},73 '12300': {'train_id': 11, 'class_name': 'Port areas'},74 '12400': {'train_id': 12, 'class_name': 'Airports'},75 '13100': {'train_id': 13, 'class_name': 'Mineral extraction and dump sites'},76 '13300': {'train_id': 14, 'class_name': 'Construction sites'},77 '13400': {'train_id': 15, 'class_name': 'Land without current use'},78 '14100': {'train_id': 16, 'class_name': 'Green urban areas'},79 '14200': {'train_id': 17, 'class_name': 'Sports and leisure facilities'},80 '21000': {'train_id': 18, 'class_name': 'Arable land (annual crops)'},81 '22000': {'train_id': 19, 'class_name': 'Permanent crops (vineyards, fruit trees, olive groves)'},82 '23000': {'train_id': 20, 'class_name': 'Pastures'},83 '24000': {'train_id': 21, 'class_name': 'Complex and mixed cultivation patterns'},84 '25000': {'train_id': 22, 'class_name': 'Orchards at the fringe of urban classes'},85 '31000': {'train_id': 23, 'class_name': 'Forests'},86 '32000': {'train_id': 24, 'class_name': 'Herbaceous vegetation associations (natural grassland, moors...)'},87 '33000': {'train_id': 25, 'class_name': 'Open spaces with little or no vegetations (beaches, dunes, bare rocks, glaciers)'},88 '40000': {'train_id': 26, 'class_name': 'Wetland'},89 '50000': {'train_id': 27, 'class_name': 'Water bodies'}...

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 Slash 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