Best Python code snippet using pandera_python
grammars.py
Source:grammars.py  
...115        )116    def nodecount(self):117        return 1118    def pretty(self):119        return self._to_str()120    def pretty_lean(self):121        return self._to_str(lean=True)122    def _to_str(self, lean=False):123        return '%s:%d' % (type(self).__name__, id(self))124    def _to_ustr(self, lean=False):125        return ustr(self._to_str(lean=lean))126    def __str__(self):127        return self._to_str()128class Void(Model):129    def _to_str(self, lean=False):130        return '()'131class Fail(Model):132    def _to_str(self, lean=False):133        return '!()'134class Comment(Model):135    def __init__(self, ast=None, **kwargs):136        super(Comment, self).__init__(ast=AST(comment=ast))137    def _to_str(self, lean=False):138        return '(* %s *)' % self.comment139class EOLComment(Comment):140    def _to_str(self, lean=False):141        return '  # %s\n' % self.comment142class EOF(Model):143    def parse(self, ctx):144        ctx._next_token()145        if not ctx.buf.atend():146            ctx._error('Expecting end of text.')147    def _to_str(self, lean=False):148        return '$'149class Decorator(Model):150    def __init__(self, ast=None, exp=None, **kwargs):151        if exp is not None:152            self.exp = exp153        elif not isinstance(ast, AST):154            # Patch to avoid bad interactions with attribute setting in Model.155            # Also a shortcut for subexpressions that are not ASTs.156            ast = AST(exp=ast)157        super(Decorator, self).__init__(ast)158        assert isinstance(self.exp, Model)159    def parse(self, ctx):160        return self.exp.parse(ctx)161    def defines(self):162        return self.exp.defines()163    def _missing_rules(self, rules):164        return self.exp._missing_rules(rules)165    def _first(self, k, f):166        return self.exp._first(k, f)167    def _follow(self, k, fl, a):168        return self.exp._follow(k, fl, a)169    def nodecount(self):170        return 1 + self.exp.nodecount()171    def _to_str(self, lean=False):172        return self.exp._to_ustr(lean=lean)173# NOTE: backwards compatibility174_Decorator = Decorator175class Group(Decorator):176    def parse(self, ctx):177        with ctx._group():178            self.exp.parse(ctx)179            return ctx.last_node180    def _to_str(self, lean=False):181        exp = self.exp._to_ustr(lean=lean)182        if len(exp.splitlines()) > 1:183            return '(\n%s\n)' % indent(exp)184        else:185            return '(%s)' % trim(exp)186class Token(Model):187    def __postinit__(self, ast):188        super(Token, self).__postinit__(ast)189        self.token = ast190    def parse(self, ctx):191        return ctx._token(self.token)192    def _first(self, k, f):193        return set([(self.token,)])194    def _to_str(self, lean=False):195        return urepr(self.token)196class Constant(Model):197    def __postinit__(self, ast):198        super(Constant, self).__postinit__(ast)199        self.literal = ast200    def parse(self, ctx):201        return self.literal202    def _to_str(self, lean=False):203        return '`%s`' % urepr(self.literal)204class Pattern(Model):205    def __postinit__(self, ast):206        super(Pattern, self).__postinit__(ast)207        if not isinstance(ast, list):208            ast = [ast]209        self.patterns = ast210        re.compile(self.pattern, RE_FLAGS)211    @property212    def pattern(self):213        return ''.join(self.patterns)214    def parse(self, ctx):215        return ctx._pattern(self.pattern)216    def _first(self, k, f):217        return set([(self.pattern,)])218    def _to_str(self, lean=False):219        parts = []220        for pat in (ustr(p) for p in self.patterns):221            template = '/%s/'222            if '/' in pat:223                template = '?"%s"'224                pat = pat.replace('"', r'\"')225            parts.append(template % pat)226        return '\n+ '.join(parts)227class Lookahead(Decorator):228    def parse(self, ctx):229        with ctx._if():230            super(Lookahead, self).parse(ctx)231    def _to_str(self, lean=False):232        return '&' + self.exp._to_ustr(lean=lean)233class NegativeLookahead(Decorator):234    def _to_str(self, lean=False):235        return '!' + ustr(self.exp._to_str(lean=lean))236    def parse(self, ctx):237        with ctx._ifnot():238            super(NegativeLookahead, self).parse(ctx)239class Sequence(Model):240    def __init__(self, ast, **kwargs):241        assert ast.sequence242        super(Sequence, self).__init__(ast=ast)243    def parse(self, ctx):244        ctx.last_node = [s.parse(ctx) for s in self.sequence]245        return ctx.last_node246    def defines(self):247        return [d for s in self.sequence for d in s.defines()]248    def _missing_rules(self, ruleset):249        return set().union(*[s._missing_rules(ruleset) for s in self.sequence])250    def _first(self, k, f):251        result = {()}252        for s in self.sequence:253            result = dot(result, s._first(k, f), k)254        return result255    def _follow(self, k, fl, a):256        fs = a257        for x in reversed(self.sequence):258            if isinstance(x, RuleRef):259                fl[x.name] |= fs260            x._follow(k, fl, fs)261            fs = dot(x.firstset, fs, k)262        return a263    def nodecount(self):264        return 1 + sum(s.nodecount() for s in self.sequence)265    def _to_str(self, lean=False):266        comments = self.comments_str()267        seq = [ustr(s._to_str(lean=lean)) for s in self.sequence]268        single = ' '.join(seq)269        if len(single) <= PEP8_LLEN and len(single.splitlines()) <= 1:270            return comments + single271        else:272            return comments + '\n'.join(seq)273class Choice(Model):274    def __init__(self, ast=None, **kwargs):275        super(Choice, self).__init__(ast=AST(options=ast))276        assert isinstance(self.options, list), urepr(self.options)277    def parse(self, ctx):278        with ctx._choice():279            for o in self.options:280                with ctx._option():281                    ctx.last_node = o.parse(ctx)282                    return ctx.last_node283            lookahead = ' '.join(ustr(urepr(f[0])) for f in self.lookahead if str(f))284            if lookahead:285                ctx._error('expecting one of {%s}' % lookahead)286            ctx._error('no available options')287    def defines(self):288        return [d for o in self.options for d in o.defines()]289    def _missing_rules(self, rules):290        return set().union(*[o._missing_rules(rules) for o in self.options])291    def _first(self, k, f):292        result = set()293        for o in self.options:294            result |= o._first(k, f)295        return result296    def _follow(self, k, fl, a):297        for o in self.options:298            o._follow(k, fl, a)299        return a300    def nodecount(self):301        return 1 + sum(o.nodecount() for o in self.options)302    def _to_str(self, lean=False):303        options = [ustr(o._to_str(lean=lean)) for o in self.options]304        multi = any(len(o.splitlines()) > 1 for o in options)305        single = ' | '.join(o for o in options)306        if multi:307            return '\n|\n'.join(indent(o) for o in options)308        elif len(options) and len(single) > PEP8_LLEN:309            return '| ' + '\n| '.join(o for o in options)310        else:311            return single312class Closure(Decorator):313    def parse(self, ctx):314        return ctx._closure(lambda: self.exp.parse(ctx))315    def _first(self, k, f):316        efirst = self.exp._first(k, f)317        result = {()}318        for _i in range(k):319            result = dot(result, efirst, k)320        return {()} | result321    def _to_str(self, lean=False):322        sexp = ustr(self.exp._to_str(lean=lean))323        if len(sexp.splitlines()) <= 1:324            return '{%s}' % sexp325        else:326            return '{\n%s\n}' % indent(sexp)327class PositiveClosure(Closure):328    def parse(self, ctx):329        return ctx._positive_closure(lambda: self.exp.parse(ctx))330    def _first(self, k, f):331        efirst = self.exp._first(k, f)332        result = {()}333        for _i in range(k):334            result = dot(result, efirst, k)335        return result336    def _to_str(self, lean=False):337        return super(PositiveClosure, self)._to_str(lean=lean) + '+'338class Join(Decorator):339    JOINOP = '%'340    def __init__(self, ast=None, **kwargs):341        super(Join, self).__init__(ast.exp)342        self.sep = ast.sep343    def parse(self, ctx):344        def sep():345            return self.sep.parse(ctx)346        def exp():347            return self.exp.parse(ctx)348        return self._do_parse(ctx, exp, sep)349    def _do_parse(self, ctx, exp, sep):350        return ctx._join(exp, sep)351    def _to_str(self, lean=False):352        ssep = self.sep._to_str(lean=lean)353        sexp = ustr(self.exp._to_str(lean=lean))354        if len(sexp.splitlines()) <= 1:355            return '%s%s{%s}' % (ssep, self.JOINOP, sexp)356        else:357            return '%s%s{\n%s\n}' % (ssep, self.JOINOP, sexp)358class PositiveJoin(Join):359    def _do_parse(self, ctx, exp, sep):360        return ctx._positive_join(exp, sep)361    def _to_str(self, lean=False):362        return super(PositiveJoin, self)._to_str(lean=lean) + '+'363class LeftJoin(PositiveJoin):364    JOINOP = '<'365    def _do_parse(self, ctx, exp, sep):366        return ctx._left_join(exp, sep)367class RightJoin(PositiveJoin):368    JOINOP = '>'369    def _do_parse(self, ctx, exp, sep):370        return ctx._right_join(exp, sep)371class Gather(Join):372    JOINOP = '.'373    def _do_parse(self, ctx, exp, sep):374        return ctx._gather(exp, sep)375class PositiveGather(Gather):376    def _do_parse(self, ctx, exp, sep):377        return ctx._positive_gather(exp, sep)378    def _to_str(self, lean=False):379        return super(PositiveGather, self)._to_str(lean=lean) + '+'380class EmptyClosure(Model):381    def parse(self, ctx):382        return ctx._empty_closure()383    def _to_str(self, lean=False):384        return '{}'385class Optional(Decorator):386    def parse(self, ctx):387        ctx.last_node = None388        with ctx._optional():389            return self.exp.parse(ctx)390    def _first(self, k, f):391        return {()} | self.exp._first(k, f)392    def _to_str(self, lean=False):393        exp = ustr(self.exp._to_str(lean=lean))394        template = '[%s]'395        if isinstance(self.exp, Choice):396            template = trim(self.str_template)397        elif isinstance(self.exp, Group):398            exp = self.exp.exp399        return template % exp400    str_template = '''401            [402            %s403            ]404            '''405class Cut(Model):406    def parse(self, ctx):407        ctx._cut()408        return None409    def _first(self, k, f):410        return {('~',)}411    def _to_str(self, lean=False):412        return '~'413class Named(Decorator):414    def __init__(self, ast=None, **kwargs):415        super(Named, self).__init__(ast.exp)416        self.name = ast.name417    def parse(self, ctx):418        value = self.exp.parse(ctx)419        ctx.ast[self.name] = value420        return value421    def defines(self):422        return [(self.name, False)] + super(Named, self).defines()423    def _to_str(self, lean=False):424        if lean:425            return self.exp._to_ustr(lean=True)426        return '%s:%s' % (self.name, self.exp._to_ustr(lean=lean))427class NamedList(Named):428    def parse(self, ctx):429        value = self.exp.parse(ctx)430        ctx.ast.setlist(self.name, value)431        return value432    def defines(self):433        return [(self.name, True)] + super(NamedList, self).defines()434    def _to_str(self, lean=False):435        if lean:436            return self.exp._to_ustr(lean=True)437        return '%s+:%s' % (self.name, ustr(self.exp._to_str(lean=lean)))438class Override(Named):439    def __init__(self, ast=None, **kwargs):440        super(Override, self).__init__(ast=AST(name='@', exp=ast))441    def defines(self):442        return []443class OverrideList(NamedList):444    def __init__(self, ast=None, **kwargs):445        super(OverrideList, self).__init__(ast=AST(name='@', exp=ast))446    def defines(self):447        return []448class Special(Model):449    def _first(self, k, f):450        return set([(self.value,)])451    def _to_str(self, lean=False):452        return '?%s?' % self.value453class RuleRef(Model):454    def __postinit__(self, ast):455        super(RuleRef, self).__postinit__(ast)456        self.name = ast457    def parse(self, ctx):458        try:459            rule = ctx._find_rule(self.name)460        except KeyError:461            ctx._error(self.name, etype=FailedRef)462        else:463            return rule()464    def _missing_rules(self, ruleset):465        if self.name not in ruleset:466            return {self.name}467        return set()468    def _first(self, k, f):469        self._first_set = f.get(self.name, set())470        return self._first_set471    @property472    def firstset(self, k=1):473        if self._first_set is None:474            self._first_set = {('<%s>' % self.name,)}475        return self._first_set476    def _to_str(self, lean=False):477        return self.name478class RuleInclude(Decorator):479    def __init__(self, rule):480        assert isinstance(rule, Rule), ustr(rule.name)481        super(RuleInclude, self).__init__(rule.exp)482        self.rule = rule483    def _to_str(self, lean=False):484        return '>%s' % (self.rule.name)485class Rule(Decorator):486    def __init__(self, ast, name, exp, params, kwparams, decorators=None):487        assert kwparams is None or isinstance(kwparams, Mapping), kwparams488        super(Rule, self).__init__(exp=exp, ast=ast)489        self.name = name490        self.params = params491        self.kwparams = kwparams492        self.decorators = decorators or []493        self._adopt_children([params, kwparams])494        self.is_name = 'name' in self.decorators495        self.base = None496    def parse(self, ctx):497        result = self._parse_rhs(ctx, self.exp)498        if self.is_name:499            ctx._check_name()500        return result501    def _parse_rhs(self, ctx, exp):502        result = ctx._call(exp.parse, self.name, self.params, self.kwparams)503        if isinstance(result, AST):504            defines = compress_seq(self.defines())505            result._define(506                [d for d, l in defines if not l],507                [d for d, l in defines if l]508            )509        return result510    def _first(self, k, f):511        if self._first_set:512            return self._first_set513        return self.exp._first(k, f)514    def _follow(self, k, fl, a):515        return self.exp._follow(k, fl, fl[self.name])516    @staticmethod517    def param_repr(p):518        if isinstance(p, (int, float)):519            return ustr(p)520        elif isinstance(p, strtype) and p.isalnum():521            return ustr(p)522        else:523            return urepr(p)524    def _to_str(self, lean=False):525        comments = self.comments_str()526        if lean:527            params = ''528        else:529            params = ', '.join(530                self.param_repr(p) for p in self.params531            ) if self.params else ''532            kwparams = ''533            if self.kwparams:534                kwparams = ', '.join(535                    '%s=%s' % (k, self.param_repr(v)) for (k, v)536                    in self.kwparams.items()537                )538            if params and kwparams:539                params = '(%s, %s)' % (params, kwparams)540            elif kwparams:541                params = '(%s)' % (kwparams)542            elif params:543                if len(self.params) == 1:544                    params = '::%s' % params545                else:546                    params = '(%s)' % params547        base = ' < %s' % ustr(self.base.name) if self.base else ''548        return trim(self.str_template).format(549            name=self.name,550            base=base,551            params=params,552            exp=indent(self.exp._to_str(lean=lean)),553            comments=comments,554            is_name='@name\n' if self.is_name else '',555        )556    str_template = '''\557                {is_name}{comments}{name}{base}{params}558                    =559                {exp}560                    ;561                '''562class BasedRule(Rule):563    def __init__(self, ast, name, exp, base, params, kwparams, decorators=None):564        super(BasedRule, self).__init__(565            ast,566            name,567            exp,568            params or base.params,569            kwparams or base.kwparams,570            decorators=decorators571        )572        self.base = base573        ast = AST(sequence=[self.base.exp, self.exp])574        ast.set_parseinfo(self.base.parseinfo)575        self.rhs = Sequence(ast)576    def parse(self, ctx):577        return self._parse_rhs(ctx, self.rhs)578    def defines(self):579        return self.rhs.defines()580class Grammar(Model):581    def __init__(self,582                 name,583                 rules,584                 filename='Unknown',585                 whitespace=None,586                 nameguard=None,587                 left_recursion=None,588                 comments_re=None,589                 eol_comments_re=None,590                 directives=None,591                 parseinfo=None,592                 keywords=None):593        super(Grammar, self).__init__()594        assert isinstance(rules, list), str(rules)595        self.rules = rules596        directives = directives or {}597        self.directives = directives598        if name is None:599            name = self.directives.get('grammar')600        if name is None:601            name = os.path.splitext(os.path.basename(filename))[0]602        self.name = name603        if whitespace is None:604            whitespace = directives.get('whitespace')605        self.whitespace = whitespace606        if nameguard is None:607            nameguard = directives.get('nameguard')608        self.nameguard = nameguard609        if left_recursion is None:610            left_recursion = directives.get('left_recursion')611        self.left_recursion = left_recursion612        if parseinfo is None:613            parseinfo = directives.get('parseinfo')614        self._use_parseinfo = parseinfo615        if comments_re is None:616            comments_re = directives.get('comments')617        self.comments_re = comments_re618        if eol_comments_re is None:619            eol_comments_re = directives.get('eol_comments')620        self.eol_comments_re = eol_comments_re621        self.keywords = keywords or set()622        self._adopt_children(rules)623        missing = self._missing_rules({r.name for r in self.rules})624        if missing:625            msg = '\n'.join([''] + list(sorted(missing)))626            raise GrammarError('Unknown rules, no parser generated:' + msg)627        self._calc_lookahead_sets()628    def _missing_rules(self, ruleset):629        return set().union(*[rule._missing_rules(ruleset) for rule in self.rules])630    @property631    def first_sets(self):632        return self._first_sets633    def _calc_lookahead_sets(self, k=1):634        self._calc_first_sets()635        self._calc_follow_sets()636    def _calc_first_sets(self, k=1):637        f = defaultdict(set)638        f1 = None639        while f1 != f:640            f1 = copy(f)641            for rule in self.rules:642                f[rule.name] |= rule._first(k, f)643        for rule in self.rules:644            rule._first_set = f[rule.name]645    def _calc_follow_sets(self, k=1):646        fl = defaultdict(set)647        fl1 = None648        while fl1 != fl:649            fl1 = copy(fl)650            for rule in self.rules:651                rule._follow(k, fl, set())652        for rule in self.rules:653            rule._follow_set = fl[rule.name]654    def parse(self,655              text,656              rule_name=None,657              start=None,658              filename=None,659              semantics=None,660              trace=False,661              context=None,662              whitespace=None,663              left_recursion=None,664              comments_re=None,665              eol_comments_re=None,666              parseinfo=None,667              **kwargs):668        start = start if start is not None else rule_name669        start = start if start is not None else self.rules[0].name670        ctx = context or ModelContext(671            self.rules,672            trace=trace,673            keywords=self.keywords,674            **kwargs)675        if whitespace is None:676            whitespace = self.whitespace677        if whitespace:678            whitespace = re.compile(whitespace)679        if left_recursion is None:680            left_recursion = self.left_recursion681        if parseinfo is None:682            parseinfo = self._use_parseinfo683        if comments_re is None:684            comments_re = self.comments_re685        if eol_comments_re is None:686            eol_comments_re = self.eol_comments_re687        return ctx.parse(688            text,689            rule_name=start,690            filename=filename,691            semantics=semantics,692            trace=trace,693            whitespace=whitespace,694            comments_re=comments_re,695            eol_comments_re=eol_comments_re,696            left_recursion=left_recursion,697            parseinfo=parseinfo,698            **kwargs699        )700    def nodecount(self):701        return 1 + sum(r.nodecount() for r in self.rules)702    def _to_str(self, lean=False):703        regex_directives = {'comments', 'eol_comments', 'whitespace'}704        ustr_directives = {'comments', 'grammar'}705        string_directives = {'namechars'}706        directives = ''707        for directive, value in self.directives.items():708            fmt = dict(709                name=directive,710                frame='/' if directive in regex_directives else '',711                value=(712                    urepr(value) if directive in string_directives713                    else ustr(value) if directive in ustr_directives714                    else value715                ),716            )717            directives += '@@{name} :: {frame}{value}{frame}\n'.format(**fmt)718        if directives:719            directives += '\n'720        keywords = '\n'.join(721            '@@keyword :: ' + ' '.join(urepr(k) for k in c if k is not None)722            for c in chunks(sorted(self.keywords), 8)723        ).strip()724        keywords = '\n\n' + keywords + '\n' if keywords else ''725        rules = (726            '\n\n'.join(ustr(rule._to_str(lean=lean))727                        for rule in self.rules)728        ).rstrip() + '\n'..._deserialization.py
Source:_deserialization.py  
...28    _dict,29    GeoReplication,30    ServiceStats,31)32def _int_to_str(value):33    return value if value is None else int(value)34def _get_download_size(start_range, end_range, resource_size):35    if start_range is not None:36        end_range = end_range if end_range else (resource_size if resource_size else None)37        if end_range is not None:38            return end_range - start_range39        else:40            return None41    else:42        return resource_size43GET_PROPERTIES_ATTRIBUTE_MAP = {44    'last-modified': (None, 'last_modified', parser.parse),45    'etag': (None, 'etag', _to_str),46    'x-ms-blob-type': (None, 'blob_type', _to_str),47    'content-length': (None, 'content_length', _int_to_str),48    'x-ms-blob-sequence-number': (None, 'page_blob_sequence_number', _int_to_str),49    'x-ms-blob-committed-block-count': (None, 'append_blob_committed_block_count', _int_to_str),50    'x-ms-share-quota': (None, 'quota', _int_to_str),51    'content-type': ('content_settings', 'content_type', _to_str),52    'cache-control': ('content_settings', 'cache_control', _to_str),53    'content-encoding': ('content_settings', 'content_encoding', _to_str),54    'content-disposition': ('content_settings', 'content_disposition', _to_str),55    'content-language': ('content_settings', 'content_language', _to_str),56    'content-md5': ('content_settings', 'content_md5', _to_str),57    'x-ms-lease-status': ('lease', 'status', _to_str),58    'x-ms-lease-state': ('lease', 'state', _to_str),59    'x-ms-lease-duration': ('lease', 'duration', _to_str),60    'x-ms-copy-id': ('copy', 'id', _to_str),61    'x-ms-copy-source': ('copy', 'source', _to_str),62    'x-ms-copy-status': ('copy', 'status', _to_str),63    'x-ms-copy-progress': ('copy', 'progress', _to_str),64    'x-ms-copy-completion-time': ('copy', 'completion_time', parser.parse),65    'x-ms-copy-status-description': ('copy', 'status_description', _to_str),66}67def _parse_metadata(response):68    '''69    Extracts out resource metadata information.70    '''71    if response is None or response.headers is None:72        return None73    metadata = _dict()74    for key, value in response.headers:75        if key.startswith('x-ms-meta-'):76            metadata[key[10:]] = _to_str(value)77    return metadata78def _parse_properties(response, result_class):79    '''80    Extracts out resource properties and metadata information.81    Ignores the standard http headers.82    '''83    if response is None or response.headers is None:84        return None85    props = result_class()86    for key, value in response.headers:87        info = GET_PROPERTIES_ATTRIBUTE_MAP.get(key)88        if info:89            if info[0] is None:90                setattr(props, info[1], info[2](value))...temperatures.py
Source:temperatures.py  
...18    chips = Configuration.chips19    features = Configuration.features20    temps = [None] * max(len(chips), len(features))21    for chip in chips_detected:22        chip_prefix = _to_str(chip.prefix)23        if chip_prefix not in chips:24            # this chip was not requested, so ignore25            continue26        for feature in chip:27            feature_name = _to_str(feature.name)28            if feature_name not in features:29                # this feature was not requested, so ignore30                continue31            for start_index in range(len(features)):32                try:33                    index = _get_index(chips=chips, chip=chip,34                                       features=features,35                                       feature=feature,36                                       start_index=start_index)37                except (NoSuchChipError, NoSuchFeatureError,38                        ChipFeatureMismatchError):39                    continue40                # fill in list with temperature value41                temps[index] = feature.get_value()42    return temps43def _get_index(chips, chip, features, feature, start_index):44    feature_name = _to_str(feature.name)45    chip_prefix = _to_str(chip.prefix)46    try:47        chip_index = chips[start_index:].index(chip_prefix)48    except ValueError:49        raise NoSuchChipError(50            'The requested chip %s does not appear beyond this point: %s' %51            (chip_prefix, chips[start_index:]))52    try:53        feature_index = features[start_index:].index(feature_name)54    except ValueError:55        raise NoSuchFeatureError(56            'The requested feature %s does not appear beyond this point: %s' %57            (feature_name, features[start_index:]))58    if feature_index != chip_index:59        raise ChipFeatureMismatchError(60            'The sensor %s does not belong to the chip %s.' %61            (feature_name, chip_prefix))62    index = start_index + feature_index63    return index64class NoSuchChipError(BaseException):65    pass66class NoSuchFeatureError(BaseException):67    pass68class ChipFeatureMismatchError(BaseException):69    pass70def _to_str(bytes_or_string):71    try:72        string = bytes_or_string.decode()73    except AttributeError:74        # prefix was str75        string = bytes_or_string...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!!
