id
int64
1
6.07M
name
stringlengths
1
295
code
stringlengths
12
426k
language
stringclasses
1 value
source_file
stringlengths
5
202
start_line
int64
1
158k
end_line
int64
1
158k
repo
dict
7,501
analyse_text
def analyse_text(text): rv = PhpLexer.analyse_text(text) - 0.01 if html_doctype_matches(text): rv += 0.5 return rv
python
wandb/vendor/pygments/lexers/templates.py
1,120
1,124
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,502
__init__
def __init__(self, **options): super(XmlPhpLexer, self).__init__(XmlLexer, PhpLexer, **options)
python
wandb/vendor/pygments/lexers/templates.py
1,137
1,138
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,503
analyse_text
def analyse_text(text): rv = PhpLexer.analyse_text(text) - 0.01 if looks_like_xml(text): rv += 0.4 return rv
python
wandb/vendor/pygments/lexers/templates.py
1,140
1,144
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,504
__init__
def __init__(self, **options): super(CssPhpLexer, self).__init__(CssLexer, PhpLexer, **options)
python
wandb/vendor/pygments/lexers/templates.py
1,157
1,158
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,505
analyse_text
def analyse_text(text): return PhpLexer.analyse_text(text) - 0.05
python
wandb/vendor/pygments/lexers/templates.py
1,160
1,161
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,506
__init__
def __init__(self, **options): super(JavascriptPhpLexer, self).__init__(JavascriptLexer, PhpLexer, **options)
python
wandb/vendor/pygments/lexers/templates.py
1,177
1,179
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,507
analyse_text
def analyse_text(text): return PhpLexer.analyse_text(text)
python
wandb/vendor/pygments/lexers/templates.py
1,181
1,182
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,508
__init__
def __init__(self, **options): super(HtmlSmartyLexer, self).__init__(HtmlLexer, SmartyLexer, **options)
python
wandb/vendor/pygments/lexers/templates.py
1,198
1,199
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,509
analyse_text
def analyse_text(text): rv = SmartyLexer.analyse_text(text) - 0.01 if html_doctype_matches(text): rv += 0.5 return rv
python
wandb/vendor/pygments/lexers/templates.py
1,201
1,205
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,510
__init__
def __init__(self, **options): super(XmlSmartyLexer, self).__init__(XmlLexer, SmartyLexer, **options)
python
wandb/vendor/pygments/lexers/templates.py
1,219
1,220
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,511
analyse_text
def analyse_text(text): rv = SmartyLexer.analyse_text(text) - 0.01 if looks_like_xml(text): rv += 0.4 return rv
python
wandb/vendor/pygments/lexers/templates.py
1,222
1,226
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,512
__init__
def __init__(self, **options): super(CssSmartyLexer, self).__init__(CssLexer, SmartyLexer, **options)
python
wandb/vendor/pygments/lexers/templates.py
1,240
1,241
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,513
analyse_text
def analyse_text(text): return SmartyLexer.analyse_text(text) - 0.05
python
wandb/vendor/pygments/lexers/templates.py
1,243
1,244
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,514
__init__
def __init__(self, **options): super(JavascriptSmartyLexer, self).__init__(JavascriptLexer, SmartyLexer, **options)
python
wandb/vendor/pygments/lexers/templates.py
1,260
1,262
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,515
analyse_text
def analyse_text(text): return SmartyLexer.analyse_text(text) - 0.05
python
wandb/vendor/pygments/lexers/templates.py
1,264
1,265
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,516
__init__
def __init__(self, **options): super(HtmlDjangoLexer, self).__init__(HtmlLexer, DjangoLexer, **options)
python
wandb/vendor/pygments/lexers/templates.py
1,281
1,282
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,517
analyse_text
def analyse_text(text): rv = DjangoLexer.analyse_text(text) - 0.01 if html_doctype_matches(text): rv += 0.5 return rv
python
wandb/vendor/pygments/lexers/templates.py
1,284
1,288
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,518
__init__
def __init__(self, **options): super(XmlDjangoLexer, self).__init__(XmlLexer, DjangoLexer, **options)
python
wandb/vendor/pygments/lexers/templates.py
1,302
1,303
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,519
analyse_text
def analyse_text(text): rv = DjangoLexer.analyse_text(text) - 0.01 if looks_like_xml(text): rv += 0.4 return rv
python
wandb/vendor/pygments/lexers/templates.py
1,305
1,309
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,520
__init__
def __init__(self, **options): super(CssDjangoLexer, self).__init__(CssLexer, DjangoLexer, **options)
python
wandb/vendor/pygments/lexers/templates.py
1,323
1,324
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,521
analyse_text
def analyse_text(text): return DjangoLexer.analyse_text(text) - 0.05
python
wandb/vendor/pygments/lexers/templates.py
1,326
1,327
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,522
__init__
def __init__(self, **options): super(JavascriptDjangoLexer, self).__init__(JavascriptLexer, DjangoLexer, **options)
python
wandb/vendor/pygments/lexers/templates.py
1,347
1,349
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,523
analyse_text
def analyse_text(text): return DjangoLexer.analyse_text(text) - 0.05
python
wandb/vendor/pygments/lexers/templates.py
1,351
1,352
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,524
__init__
def __init__(self, **options): super(JspLexer, self).__init__(XmlLexer, JspRootLexer, **options)
python
wandb/vendor/pygments/lexers/templates.py
1,391
1,392
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,525
analyse_text
def analyse_text(text): rv = JavaLexer.analyse_text(text) - 0.01 if looks_like_xml(text): rv += 0.4 if '<%' in text and '%>' in text: rv += 0.1 return rv
python
wandb/vendor/pygments/lexers/templates.py
1,394
1,400
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,526
__init__
def __init__(self, **options): super(EvoqueHtmlLexer, self).__init__(HtmlLexer, EvoqueLexer, **options)
python
wandb/vendor/pygments/lexers/templates.py
1,468
1,470
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,527
__init__
def __init__(self, **options): super(EvoqueXmlLexer, self).__init__(XmlLexer, EvoqueLexer, **options)
python
wandb/vendor/pygments/lexers/templates.py
1,485
1,487
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,528
__init__
def __init__(self, **options): super(ColdfusionHtmlLexer, self).__init__(HtmlLexer, ColdfusionMarkupLexer, **options)
python
wandb/vendor/pygments/lexers/templates.py
1,593
1,595
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,529
__init__
def __init__(self, **options): super(ColdfusionCFCLexer, self).__init__(ColdfusionHtmlLexer, ColdfusionLexer, **options)
python
wandb/vendor/pygments/lexers/templates.py
1,609
1,611
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,530
__init__
def __init__(self, **options): super(SspLexer, self).__init__(XmlLexer, JspRootLexer, **options)
python
wandb/vendor/pygments/lexers/templates.py
1,625
1,626
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,531
analyse_text
def analyse_text(text): rv = 0.0 if re.search('val \w+\s*:', text): rv += 0.6 if looks_like_xml(text): rv += 0.2 if '<%' in text and '%>' in text: rv += 0.1 return rv
python
wandb/vendor/pygments/lexers/templates.py
1,628
1,636
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,532
__init__
def __init__(self, **options): super(TeaTemplateLexer, self).__init__(XmlLexer, TeaTemplateRootLexer, **options)
python
wandb/vendor/pygments/lexers/templates.py
1,672
1,674
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,533
analyse_text
def analyse_text(text): rv = TeaLangLexer.analyse_text(text) - 0.01 if looks_like_xml(text): rv += 0.4 if '<%' in text and '%>' in text: rv += 0.1 return rv
python
wandb/vendor/pygments/lexers/templates.py
1,676
1,682
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,534
__init__
def __init__(self, **options): super(LassoHtmlLexer, self).__init__(HtmlLexer, LassoLexer, **options)
python
wandb/vendor/pygments/lexers/templates.py
1,703
1,704
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,535
analyse_text
def analyse_text(text): rv = LassoLexer.analyse_text(text) - 0.01 if html_doctype_matches(text): # same as HTML lexer rv += 0.5 return rv
python
wandb/vendor/pygments/lexers/templates.py
1,706
1,710
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,536
__init__
def __init__(self, **options): super(LassoXmlLexer, self).__init__(XmlLexer, LassoLexer, **options)
python
wandb/vendor/pygments/lexers/templates.py
1,727
1,728
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,537
analyse_text
def analyse_text(text): rv = LassoLexer.analyse_text(text) - 0.01 if looks_like_xml(text): rv += 0.4 return rv
python
wandb/vendor/pygments/lexers/templates.py
1,730
1,734
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,538
__init__
def __init__(self, **options): options['requiredelimiters'] = True super(LassoCssLexer, self).__init__(CssLexer, LassoLexer, **options)
python
wandb/vendor/pygments/lexers/templates.py
1,750
1,752
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,539
analyse_text
def analyse_text(text): rv = LassoLexer.analyse_text(text) - 0.05 if re.search(r'\w+:.+?;', text): rv += 0.1 if 'padding:' in text: rv += 0.1 return rv
python
wandb/vendor/pygments/lexers/templates.py
1,754
1,760
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,540
__init__
def __init__(self, **options): options['requiredelimiters'] = True super(LassoJavascriptLexer, self).__init__(JavascriptLexer, LassoLexer, **options)
python
wandb/vendor/pygments/lexers/templates.py
1,778
1,781
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,541
analyse_text
def analyse_text(text): rv = LassoLexer.analyse_text(text) - 0.05 return rv
python
wandb/vendor/pygments/lexers/templates.py
1,783
1,785
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,542
__init__
def __init__(self, **options): super(HandlebarsHtmlLexer, self).__init__(HtmlLexer, HandlebarsLexer, **options)
python
wandb/vendor/pygments/lexers/templates.py
1,877
1,878
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,543
__init__
def __init__(self, **options): super(YamlJinjaLexer, self).__init__(YamlLexer, DjangoLexer, **options)
python
wandb/vendor/pygments/lexers/templates.py
1,896
1,897
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,544
__init__
def __init__(self, **options): super(TwigHtmlLexer, self).__init__(HtmlLexer, TwigLexer, **options)
python
wandb/vendor/pygments/lexers/templates.py
2,202
2,203
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,545
__init__
def __init__(self, **options): super(Angular2HtmlLexer, self).__init__(HtmlLexer, Angular2Lexer, **options)
python
wandb/vendor/pygments/lexers/templates.py
2,282
2,283
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,546
_indentation
def _indentation(lexer, match, ctx): indentation = match.group(0) yield match.start(), Text, indentation ctx.last_indentation = indentation ctx.pos = match.end() if hasattr(ctx, 'block_state') and ctx.block_state and \ indentation.startswith(ctx.block_indentation) and \ inde...
python
wandb/vendor/pygments/lexers/css.py
505
518
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,547
_starts_block
def _starts_block(token, state): def callback(lexer, match, ctx): yield match.start(), token, match.group(0) if hasattr(ctx, 'last_indentation'): ctx.block_indentation = ctx.last_indentation else: ctx.block_indentation = '' ctx.block_state = state ct...
python
wandb/vendor/pygments/lexers/css.py
521
533
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,548
callback
def callback(lexer, match, ctx): yield match.start(), token, match.group(0) if hasattr(ctx, 'last_indentation'): ctx.block_indentation = ctx.last_indentation else: ctx.block_indentation = '' ctx.block_state = state ctx.pos = match.end()
python
wandb/vendor/pygments/lexers/css.py
522
531
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,549
analyse_text
def analyse_text(text): if re.match(r'^\.(text|data|section)', text, re.M): return True elif re.match(r'^\.\w+', text, re.M): return 0.1
python
wandb/vendor/pygments/lexers/asm.py
93
97
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,550
_objdump_lexer_tokens
def _objdump_lexer_tokens(asm_lexer): """ Common objdump lexer tokens to wrap an ASM lexer. """ hex_re = r'[0-9A-Za-z]' return { 'root': [ # File name & format: ('(.*?)(:)( +file format )(.*?)$', bygroups(Name.Label, Punctuation, Text, String)), ...
python
wandb/vendor/pygments/lexers/asm.py
100
146
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,551
__init__
def __init__(self, **options): super(DObjdumpLexer, self).__init__(DLexer, ObjdumpLexer, **options)
python
wandb/vendor/pygments/lexers/asm.py
170
171
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,552
__init__
def __init__(self, **options): super(CppObjdumpLexer, self).__init__(CppLexer, ObjdumpLexer, **options)
python
wandb/vendor/pygments/lexers/asm.py
183
184
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,553
__init__
def __init__(self, **options): super(CObjdumpLexer, self).__init__(CLexer, ObjdumpLexer, **options)
python
wandb/vendor/pygments/lexers/asm.py
196
197
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,554
analyse_text
def analyse_text(self, text): # comments in GAS start with "#" if re.match(r'^\s*;', text, re.MULTILINE): return 0.9
python
wandb/vendor/pygments/lexers/asm.py
638
641
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,555
__init__
def __init__(self, **options): Lexer.__init__(self, **options) self.keywords = set() if get_bool_opt(options, 'turbopascal', True): self.keywords.update(self.TURBO_PASCAL_KEYWORDS) if get_bool_opt(options, 'delphi', True): self.keywords.update(self.DELPHI_KEYWORDS...
python
wandb/vendor/pygments/lexers/pascal.py
301
312
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,556
get_tokens_unprocessed
def get_tokens_unprocessed(self, text): scanner = Scanner(text, re.DOTALL | re.MULTILINE | re.IGNORECASE) stack = ['initial'] in_function_block = False in_property_block = False was_dot = False next_token_is_function = False next_token_is_property = False ...
python
wandb/vendor/pygments/lexers/pascal.py
314
508
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,557
opcode_name_callback
def opcode_name_callback(lexer, match): opcode = match.group(0) lexer.user_defined_opcodes.add(opcode) yield match.start(), Name.Function, opcode
python
wandb/vendor/pygments/lexers/csound.py
149
152
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,558
name_callback
def name_callback(lexer, match): name = match.group(0) if re.match('p\d+$', name) or name in OPCODES: yield match.start(), Name.Builtin, name elif name in lexer.user_defined_opcodes: yield match.start(), Name.Function, name else: nameMatch = re.search(...
python
wandb/vendor/pygments/lexers/csound.py
154
166
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,559
__init__
def __init__(self, **options): from pygments.lexers._vim_builtins import command, option, auto self._cmd = command self._opt = option self._aut = auto RegexLexer.__init__(self, **options)
python
wandb/vendor/pygments/lexers/textedit.py
123
129
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,560
is_in
def is_in(self, w, mapping): r""" It's kind of difficult to decide if something might be a keyword in VimL because it allows you to abbreviate them. In fact, 'ab[breviate]' is a good example. :ab, :abbre, or :abbreviate are valid ways to call it so rather than making really awf...
python
wandb/vendor/pygments/lexers/textedit.py
131
152
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,561
get_tokens_unprocessed
def get_tokens_unprocessed(self, text): # TODO: builtins are only subsequent tokens on lines # and 'keywords' only happen at the beginning except # for :au ones for index, token, value in \ RegexLexer.get_tokens_unprocessed(self, text): if token is...
python
wandb/vendor/pygments/lexers/textedit.py
154
169
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,562
analyse_text
def analyse_text(text): for line in text.splitlines(): line = line.strip() if line.startswith('deb ') or line.startswith('deb-src '): return True
python
wandb/vendor/pygments/lexers/installers.py
260
264
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,563
_gen_command_rules
def _gen_command_rules(keyword_cmds_re, builtin_cmds_re, context=""): return [ (keyword_cmds_re, Keyword, 'params' + context), (builtin_cmds_re, Name.Builtin, 'params' + context), (r'([\w.-]+)', Name.Variable, 'params' + context), (r'#', Comment, 'comment'), ...
python
wandb/vendor/pygments/lexers/tcl.py
49
55
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,564
analyse_text
def analyse_text(text): return shebang_matches(text, r'(tcl)')
python
wandb/vendor/pygments/lexers/tcl.py
144
145
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,565
analyse_text
def analyse_text(self, text): # if it starts with a line number, it shouldn't be a "modern" Basic # like VB.net if re.match(r'\d+', text): return 0.2
python
wandb/vendor/pygments/lexers/basic.py
353
357
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,566
analyse_text
def analyse_text(text): if '$DYNAMIC' in text or '$STATIC' in text: return 0.9
python
wandb/vendor/pygments/lexers/basic.py
498
500
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,567
__init__
def __init__(self, **options): # # check dialect options # dialects = get_list_opt(options, 'dialect', []) # for dialect_option in dialects: if dialect_option in self.dialects[1:-1]: # valid dialect option found self.set_dialect...
python
wandb/vendor/pygments/lexers/modula2.py
1,265
1,300
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,568
set_dialect
def set_dialect(self, dialect_id): # # if __debug__: # print 'entered set_dialect with arg: ', dialect_id # # check dialect name against known dialects if dialect_id not in self.dialects: dialect = 'unknown' # default else: dialect = di...
python
wandb/vendor/pygments/lexers/modula2.py
1,303
1,400
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,569
get_dialect_from_dialect_tag
def get_dialect_from_dialect_tag(self, dialect_tag): # # if __debug__: # print 'entered get_dialect_from_dialect_tag with arg: ', dialect_tag # # constants left_tag_delim = '(*!' right_tag_delim = '*)' left_tag_delim_len = len(left_tag_delim) ri...
python
wandb/vendor/pygments/lexers/modula2.py
1,405
1,450
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,570
get_tokens_unprocessed
def get_tokens_unprocessed(self, text): for index, token, value in RegexLexer.get_tokens_unprocessed(self, text): # # check for dialect tag if dialect has not been set by tag if not self.dialect_set_by_tag and token == Comment.Special: indicated_dialect = self...
python
wandb/vendor/pygments/lexers/modula2.py
1,453
1,561
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,571
analyse_text
def analyse_text(text): if re.match(r'\w+\s*:\s*\w', text): return 0.3 return 0
python
wandb/vendor/pygments/lexers/actionscript.py
193
196
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,572
innerstring_rules
def innerstring_rules(ttype): return [ # the old style '%s' % (...) string formatting (r'%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?' '[hlL]?[E-GXc-giorsux%]', String.Interpol), # backslashes, quotes and formatting signs must be parsed one at a time ...
python
wandb/vendor/pygments/lexers/python.py
38
49
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,573
analyse_text
def analyse_text(text): return shebang_matches(text, r'pythonw?(2(\.\d)?)?') or \ 'import ' in text[:1000]
python
wandb/vendor/pygments/lexers/python.py
240
242
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,574
innerstring_rules
def innerstring_rules(ttype): return [ # the old style '%s' % (...) string formatting (still valid in Py3) (r'%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?' '[hlL]?[E-GXc-giorsux%]', String.Interpol), # the new style '{}'.format(...) string formatting ...
python
wandb/vendor/pygments/lexers/python.py
261
279
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,575
analyse_text
def analyse_text(text): return shebang_matches(text, r'pythonw?3(\.\d)?')
python
wandb/vendor/pygments/lexers/python.py
399
400
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,576
__init__
def __init__(self, **options): self.python3 = get_bool_opt(options, 'python3', False) Lexer.__init__(self, **options)
python
wandb/vendor/pygments/lexers/python.py
428
430
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,577
get_tokens_unprocessed
def get_tokens_unprocessed(self, text): if self.python3: pylexer = Python3Lexer(**self.options) tblexer = Python3TracebackLexer(**self.options) else: pylexer = PythonLexer(**self.options) tblexer = PythonTracebackLexer(**self.options) curcode = ''...
python
wandb/vendor/pygments/lexers/python.py
432
488
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,578
get_tokens_unprocessed
def get_tokens_unprocessed(self, text): for index, token, value in \ PythonLexer.get_tokens_unprocessed(self, text): if token is Name and value in self.EXTRA_KEYWORDS: yield index, Keyword.Pseudo, value else: yield index, token, value
python
wandb/vendor/pygments/lexers/python.py
928
934
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,579
analyse_text
def analyse_text(text): return (shebang_matches(text, r'pythonw?(2(\.\d)?)?') or 'import ' in text[:1000]) \ and ('import numpy' in text or 'from numpy import' in text)
python
wandb/vendor/pygments/lexers/python.py
936
939
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,580
analyse_text
def analyse_text(text): score = 0 if re.search(r'^\s*\.class\s', text, re.MULTILINE): score += 0.5 if re.search(r'\b((check-cast|instance-of|throw-verification-error' r')\b|(-to|add|[ais]get|[ais]put|and|cmpl|const|div|' r'if|invo...
python
wandb/vendor/pygments/lexers/dalvik.py
108
125
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,581
get_tokens_unprocessed
def get_tokens_unprocessed(self, text): for index, token, value in RegexLexer.get_tokens_unprocessed(self, text): if token is Name: lowercase_value = value.lower() if lowercase_value in self.builtins: yield index, Name.Builtin, value ...
python
wandb/vendor/pygments/lexers/dylan.py
93
109
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,582
get_tokens_unprocessed
def get_tokens_unprocessed(self, text): dylexer = DylanLexer(**self.options) curcode = '' insertions = [] for match in self._line_re.finditer(text): line = match.group() m = self._prompt_re.match(line) if m is not None: end = m.end() ...
python
wandb/vendor/pygments/lexers/dylan.py
265
289
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,583
get_tokens_unprocessed
def get_tokens_unprocessed(self, text): ins = [] lines = text.splitlines(True) done = '' lex = BaseMakefileLexer(**self.options) backslashflag = False for line in lines: if self.r_special.match(line) or backslashflag: ins.append((len(done), [(0...
python
wandb/vendor/pygments/lexers/make.py
46
61
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,584
analyse_text
def analyse_text(text): # Many makefiles have $(BIG_CAPS) style variables if re.search(r'\$\([A-Z_]+\)', text): return 0.1
python
wandb/vendor/pygments/lexers/make.py
63
66
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,585
analyse_text
def analyse_text(text): exp = r'^ *CMAKE_MINIMUM_REQUIRED *\( *VERSION *\d(\.\d)* *( FATAL_ERROR)? *\) *$' if re.search(exp, text, flags=re.MULTILINE | re.IGNORECASE): return 0.8 return 0.0
python
wandb/vendor/pygments/lexers/make.py
198
202
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,586
analyse_text
def analyse_text(text): if text[:7] == 'Index: ': return True if text[:5] == 'diff ': return True if text[:4] == '--- ': return 0.9
python
wandb/vendor/pygments/lexers/diff.py
44
50
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,587
get_tokens_unprocessed
def get_tokens_unprocessed(self, text): for index, token, value in JavaLexer.get_tokens_unprocessed(self, text): if token is Name and value in self.aj_keywords: yield index, Keyword, value elif token is Name.Label and value in self.aj_inter_type: yield ind...
python
wandb/vendor/pygments/lexers/jvm.py
121
131
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,588
get_tokens_unprocessed
def get_tokens_unprocessed(self, text): lexer = GosuLexer() stack = ['templateText'] for item in lexer.get_tokens_unprocessed(text, stack): yield item
python
wandb/vendor/pygments/lexers/jvm.py
455
459
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,589
analyse_text
def analyse_text(text): return shebang_matches(text, r'groovy')
python
wandb/vendor/pygments/lexers/jvm.py
529
530
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,590
analyse_text
def analyse_text(text): score = 0 if re.search(r'^\s*\.class\s', text, re.MULTILINE): score += 0.5 if re.search(r'^\s*[a-z]+_[a-z]+\b', text, re.MULTILINE): score += 0.3 if re.search(r'^\s*\.(attribute|bytecode|debug|deprecated|enclosing|' ...
python
wandb/vendor/pygments/lexers/jvm.py
1,563
1,573
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,591
__init__
def __init__(self, **options): self.funcnamehighlighting = get_bool_opt( options, 'funcnamehighlighting', True) self.disabledmodules = get_list_opt( options, 'disabledmodules', ['unknown']) self.startinline = get_bool_opt(options, 'startinline', False) # private ...
python
wandb/vendor/pygments/lexers/php.py
231
249
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,592
get_tokens_unprocessed
def get_tokens_unprocessed(self, text): stack = ['root'] if self.startinline: stack.append('php') for index, token, value in \ RegexLexer.get_tokens_unprocessed(self, text, stack): if token is Name.Other: if value in self._functions: ...
python
wandb/vendor/pygments/lexers/php.py
251
261
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,593
analyse_text
def analyse_text(text): rv = 0.0 if re.search(r'<\?(?!xml)', text): rv += 0.3 return rv
python
wandb/vendor/pygments/lexers/php.py
263
267
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,594
language_callback
def language_callback(lexer, match): """Parse the content of a $-string using a lexer The lexer is chosen looking for a nearby LANGUAGE or assumed as plpgsql if inside a DO statement and no LANGUAGE has been found. """ l = None m = language_re.match(lexer.text[match.end():match.end()+100]) ...
python
wandb/vendor/pygments/lexers/sql.py
65
99
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,595
get_tokens_unprocessed
def get_tokens_unprocessed(self, text, *args): # Have a copy of the entire text to be used by `language_callback`. self.text = text for x in super(PostgresBase, self).get_tokens_unprocessed( text, *args): yield x
python
wandb/vendor/pygments/lexers/sql.py
111
116
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,596
_get_lexer
def _get_lexer(self, lang): if lang.lower() == 'sql': return get_lexer_by_name('postgresql', **self.options) tries = [lang] if lang.startswith('pl'): tries.append(lang[2:]) if lang.endswith('u'): tries.append(lang[:-1]) if lang.startswith('pl'...
python
wandb/vendor/pygments/lexers/sql.py
118
138
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,597
__init__
def __init__(self, x): self.iter = iter(x) self._nextitem = None
python
wandb/vendor/pygments/lexers/sql.py
268
270
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,598
__iter__
def __iter__(self): return self
python
wandb/vendor/pygments/lexers/sql.py
272
273
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,599
send
def send(self, i): self._nextitem = i return i
python
wandb/vendor/pygments/lexers/sql.py
275
277
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
7,600
__next__
def __next__(self): if self._nextitem is not None: ni = self._nextitem self._nextitem = None return ni return next(self.iter)
python
wandb/vendor/pygments/lexers/sql.py
279
284
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }