44+ results for 're.compile' (0 ms)

Not the results you expected?

cmd_line.py (https://github.com/SublimeText/VintageEx.git) Python · 340 lines

144 offsets = []

145 sign = 1

146 is_num_or_sign = re.compile('^[0-9+-]')

147 while self.c != EOF and is_num_or_sign.match(self.c):

148 if self.c in '+-':

176 def consume_while_match(self, regex):

177 rv = ''

178 r = re.compile(regex)

179 while self.c != EOF and r.match(self.c):

180 rv += self.c

298 offsets = []

299 sign = 1

300 is_num_or_sign = re.compile('^[0-9+-]')

301 while self.c != EOF and is_num_or_sign.match(self.c):

302 if self.c in '+-':

utils.py (https://github.com/9h37/delikatess.git) Python · 221 lines

87 self.dest = dest

88

89 self.pattern = re.compile (r"(\.\d+)*.gpg")

90

91 def _backup (self, path, iterate = 1):

sgml.py (https://github.com/sabren/scrapy.git) Python · 158 lines

88 return True

89

90 _re_type = type(re.compile("", 0))

91

92 _matches = lambda url, regexs: any((r.search(url) for r in regexs))

98 tags=('a', 'area'), attrs=('href'), canonicalize=True, unique=True, process_value=None,

99 deny_extensions=None):

100 self.allow_res = [x if isinstance(x, _re_type) else re.compile(x) for x in arg_to_iter(allow)]

101 self.deny_res = [x if isinstance(x, _re_type) else re.compile(x) for x in arg_to_iter(deny)]

prettifiers.py (https://github.com/vis-netlausnir/visutils.git) Python · 308 lines

211 return tree

212

213 _non_id_char = re.compile('[^_0-9a-zA-Z]')

214 class _SafeObject(object):

215 def __init__(self):

SBTypeCategory.i (https://gitlab.com/jorjpimm/lldb) Swig · 237 lines

125 self.get_at_index_function = get_at_index_function

126 self.get_by_name_function = get_by_name_function

127 self.regex_type = type(re.compile('.'))

128

129

buildinator_common.py (https://github.com/vasi/kdelibs.git) Python · 152 lines

138 """Make an BuildStatus list of revisions, sorted latest-to-older"""

139 Lines = GetSvnLog ( SvnUrl )

140 RevisionLine = re.compile( '^r\d+\s')

141 Revisions = []

142 for Line in Lines:

load_phonon.py (https://github.com/wdzhou/mantid.git) Python · 185 lines

21

22 # Get regex strings from load_helper

23 header_regex = re.compile(load_helper.PHONON_HEADER_REGEX)

24 eigenvectors_regex = re.compile(load_helper.PHONON_EIGENVEC_REGEX)

transformations.py (https://gitlab.com/oytunistrator/snowscript) Python · 353 lines

342 return token_stream

343

344 _newline_pattern = re.compile(r"\n")

345

346

DownloadData.py (https://github.com/JasonAng/ResearchScripts.git) Python · 150 lines

18 "DownloadData object"

19

20 chromosomePat = re.compile('\$c\$')

21 ESTsuffixPat = re.compile('\$e\$')

titletranslate.py (https://github.com/malectro/Project-OPEN.git) Python · 162 lines

65 # ... unless we do want brackets

66 if removebrackets:

67 newname = re.sub(re.compile(ur"\W*?\(.*?\)\W*?", re.UNICODE), u" ", newname)

68 codesplit = codes.split(',')

69 codes = []

check_style_c_test.py (https://github.com/mgschwan/blensor.git) Python · 414 lines

387 import re

388 # E100

389 err_re_main = re.compile(r'.*\("(E\d+)"')

390 # E100.0

391 err_re_subv = re.compile(r'.*\("(E\d+)\.\d+"') # --> E100

392 err_re_subv_group = re.compile(r'.*\("(E\d+\.\d+)"') # --> E100.0

393 for l in fh:

394 g = err_re_subv.match(l)

apiclient-rax.py (https://gitlab.com/kawsark/pyrestclient) Python · 178 lines

19 #Load credentials from credentials_file variable

20 f = open(credentials_file, 'r')

21 pattern = re.compile("\s*\[rackspace_cloud\]\s*username\s*=\s*(\S*)\s*api_key\s*=\s*(\S*)")

22 match = pattern.search(f.read())

23 if match:

37

38 #Extract token from response:

39 p1 = re.compile("token.*\"id\":\"(.*?)\",")

40 m1 = p1.search(r.text)

41 token = m1.group(1)

42

43 #Extract tenantId from response:

44 p2 = re.compile("\"tenantId\":\"(\d*?)\",")

45 m2 = p2.search(r.text)

46 tenantId = m2.group(1)

marshal.py (https://github.com/nltk/nltk_contrib.git) Python · 206 lines

74 handler = file(filename, "r")

75

76 pattern = re.compile(r'^(.+):(.+?)$', re.UNICODE)

77 for line in handler.readlines():

78 m = re.match(pattern, line)

120 self._minlength = int(lines[1].split("minlength ")[1])

121

122 pattern = re.compile(r'^(.+):(.+?)$', re.UNICODE)

123 for line in lines[2:]:

124 m = re.match(pattern, line)

172

173

174 pattern = re.compile(r'^\[(.+)\]:(.+):(.+?)$', re.UNICODE)

175

176 # As the separator-char ":" can be used as a tag or as a text,

test_selector.py (https://github.com/mozilla/kuma-lib.git) Python · 200 lines

25 """Override the configuration to skip only specified files."""

26 c = Config()

27 c.ignoreFiles = [re.compile(r'^test_favourite_colour\.py$')]

28 s = Selector(c)

29

36 s = Selector(Config())

37 c = Config()

38 c.exclude = [re.compile(r'me')]

39 s2 = Selector(c)

40

47 s = Selector(Config())

48 c = Config()

49 c.include = [re.compile(r'me')]

50 s2 = Selector(c)

51

base.py (https://github.com/lithium/pyjirc.git) Python · 155 lines

19 self.handler = Handler(self.handle_message)

20 self.settings = settings

21 self._prefix_re = re.compile("(?P<nick>[^!]+)!(?P<user>[^@]+)@(?P<host>.+)")

22 self._jid_re = re.compile("(?P<node>[^@]+)@(?P<domain>[^/]+)(/(?P<resource>.+))?")

BindingComparator.java (https://github.com/vazexqi/CodingSpectator.git) Java · 313 lines

13 import java.util.HashSet;

14

15 import org.eclipse.jdt.core.compiler.CharOperation;

16 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;

17 import org.eclipse.jdt.internal.compiler.lookup.Binding;

fields.py (https://github.com/asdahlborg/epiwork-website.git) Python · 182 lines

60 """

61 outcode_pattern = fullUKPostcodeField.outcode_pattern

62 postcode_regex = re.compile(r'^(GIR|%s)$' % outcode_pattern)

63

64 def clean(self, value):

test_mypy_plugin_py3k.py (https://bitbucket.org/zzzeek/sqlalchemy.git) Python · 210 lines

155

156 expected_errors = []

157 expected_re = re.compile(r"\s*# EXPECTED(_MYPY)?: (.+)")

158 py_ver_re = re.compile(r"^#\s*PYTHON_VERSION\s?>=\s?(\d+\.\d+)")

runner.py (https://github.com/argodev/BiLab.git) Python · 204 lines

62 self.vendors = []

63 self.table_stack = []

64 self.re_var = re.compile(r"\${(.*?)}")

65

66 def vendor(self):

po-merge.py (https://github.com/yuvrajm/subversion.git) Python · 191 lines

23 import os, re, sys

24

25 msgstr_re = re.compile('msgstr\[\d+\] "')

26

27 def parse_translation(f):

UnusedCodeCleanUp.java (https://gitlab.com/unofficial-mirrors/eclipse-che) Java · 227 lines

15 import org.eclipse.jdt.core.ICompilationUnit;

16 import org.eclipse.jdt.core.JavaCore;

17 import org.eclipse.jdt.core.compiler.IProblem;

18 import org.eclipse.jdt.core.dom.CompilationUnit;

19 import org.eclipse.jdt.internal.corext.fix.CleanUpConstants;

104

105 if (isEnabled(CleanUpConstants.REMOVE_UNUSED_CODE_IMPORTS) && !isEnabled(CleanUpConstants.ORGANIZE_IMPORTS))

106 result.put(JavaCore.COMPILER_PB_UNUSED_IMPORT, JavaCore.WARNING);

107

108 boolean removeMembers= isEnabled(CleanUpConstants.REMOVE_UNUSED_CODE_PRIVATE_MEMBERS);

112 isEnabled(CleanUpConstants.REMOVE_UNUSED_CODE_PRIVATE_FELDS) ||

113 isEnabled(CleanUpConstants.REMOVE_UNUSED_CODE_PRIVATE_TYPES)))

114 result.put(JavaCore.COMPILER_PB_UNUSED_PRIVATE_MEMBER, JavaCore.WARNING);

115

116 if (isEnabled(CleanUpConstants.REMOVE_UNUSED_CODE_LOCAL_VARIABLES))

SearchIndex.py (https://github.com/mobyle2-legacy/mobyle2.core.git) Python · 133 lines

54 def filterRegistry(self, keywordList):

55 keywordList = [re.escape(k) for k in keywordList] # escape special re characters...

56 keywordsRe = re.compile('(%s)' % '|'.join(keywordList), re.I)

57 servicesList = getattr( registry, self.type + 's')[:]

58 for s in servicesList:

Inference.fs (https://github.com/mausch/fsharpx.git) F# · 176 lines

24 open Samples.FSharp.ProvidedTypes

25 open Microsoft.FSharp.Quotations

26 open Microsoft.FSharp.Core.CompilerServices

27

28 /// Generate property for every inferred property

main.py (https://github.com/yasulab/author-evaluator.git) Python · 234 lines

66

67 def get_word_list(text):

68 p = re.compile(r'\W+')

69 list = p.split(text)

70 for i,word in enumerate(list):

MemberDeclarationVisitor.java (https://github.com/vazexqi/CodingSpectator.git) Java · 327 lines

14 import org.eclipse.jdt.core.IAnnotatable;

15 import org.eclipse.jdt.core.IJavaElement;

16 import org.eclipse.jdt.core.compiler.CharOperation;

17 import org.eclipse.jdt.internal.compiler.ASTVisitor;

18 import org.eclipse.jdt.internal.compiler.ast.ASTNode;

EvaluationResult.java (https://gitlab.com/essere.lab.public/qualitas.class-corpus) Java · 232 lines

11 package org.aspectj.org.eclipse.jdt.internal.eval;

12

13 import org.aspectj.org.eclipse.jdt.core.compiler.CategorizedProblem;

14

15 /**

utility.py (https://bitbucket.org/Nitesh_Rajpurohit/app-engine.git) Python · 493 lines

10

11 COL_NAMES = {}

12 range_parts = re.compile(r'(\$?)([A-Z]{1,3})(\$?)(\d+)')

13

14

policy.py (https://gitlab.com/ryandub/yoke) Python · 178 lines

45 raise NameError('Invalid HTTP verb ' + verb +

46 '. Allowed verbs in HttpVerb class')

47 resource_pattern = re.compile(self.path_regex)

48 if not resource_pattern.match(resource):

49 raise NameError('Invalid resource path: ' + resource +

middleware.py (https://github.com/joskid/ella.git) Python · 166 lines

23 self._excluded_urls = ()

24 for url in core_settings.DOUBLE_RENDER_EXCLUDE_URLS:

25 self._excluded_urls += (re.compile(url),)

26

27 return self._excluded_urls

gtest_help_test.py (https://bitbucket.org/ultra_iter/qt-vtl.git) Python · 169 lines

62

63 # The help message must match this regex.

64 HELP_REGEX = re.compile(

65 FLAG_PREFIX + r'list_tests.*' +

66 FLAG_PREFIX + r'filter=.*' +

IDocumentElementRequestor.java (https://gitlab.com/essere.lab.public/qualitas.class-corpus) Java · 412 lines

11 package org.eclipse.jdt.internal.compiler;

12

13 import org.eclipse.jdt.core.compiler.CategorizedProblem;

14

15 /**

ASTVisitor.java (https://gitlab.com/essere.lab.public/qualitas.class-corpus) Java · 914 lines

11 package org.eclipse.jdt.internal.compiler;

12

13 import org.eclipse.jdt.core.compiler.IProblem;

14 import org.eclipse.jdt.internal.compiler.ast.*;

15 import org.eclipse.jdt.internal.compiler.lookup.BlockScope;

CompletionRequestorWrapper.java (https://gitlab.com/essere.lab.public/qualitas.class-corpus) Java · 340 lines

15 import org.eclipse.jdt.core.Flags;

16 import org.eclipse.jdt.core.Signature;

17 import org.eclipse.jdt.core.compiler.CharOperation;

18 import org.eclipse.jdt.core.compiler.IProblem;

ICompletionRequestor.java (https://gitlab.com/essere.lab.public/qualitas.class-corpus) Java · 426 lines

11 package org.eclipse.jdt.core;

12

13 import org.eclipse.jdt.core.compiler.IProblem;

14

15 /**

DefaultBytecodeVisitor.java (https://gitlab.com/essere.lab.public/qualitas.class-corpus) Java · 1837 lines

12

13 import org.aspectj.org.eclipse.jdt.core.Signature;

14 import org.aspectj.org.eclipse.jdt.core.compiler.CharOperation;

15 import org.aspectj.org.eclipse.jdt.core.util.ClassFileBytesDisassembler;

16 import org.aspectj.org.eclipse.jdt.core.util.IBytecodeVisitor;

IDocumentElementRequestor.java (https://gitlab.com/essere.lab.public/qualitas.class-corpus) Java · 412 lines

11 package org.aspectj.org.eclipse.jdt.internal.compiler;

12

13 import org.aspectj.org.eclipse.jdt.core.compiler.CategorizedProblem;

14

15 /**

ASTVisitor.java (https://gitlab.com/essere.lab.public/qualitas.class-corpus) Java · 894 lines

11 package org.aspectj.org.eclipse.jdt.internal.compiler;

12

13 import org.aspectj.org.eclipse.jdt.core.compiler.IProblem;

14 import org.aspectj.org.eclipse.jdt.internal.compiler.ast.*;

15 import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BlockScope;

ICompletionRequestor.java (https://gitlab.com/essere.lab.public/qualitas.class-corpus) Java · 426 lines

11 package org.aspectj.org.eclipse.jdt.core;

12

13 import org.aspectj.org.eclipse.jdt.core.compiler.IProblem;

14

15 /**

ISelectionRequestor.java (https://gitlab.com/essere.lab.public/qualitas.class-corpus) Java · 260 lines

11 package org.eclipse.jdt.internal.codeassist;

12

13 import org.eclipse.jdt.core.compiler.CategorizedProblem;

14

15 /**

TokenScanner.java (https://gitlab.com/essere.lab.public/qualitas.class-corpus) Java · 238 lines

15 import org.eclipse.core.runtime.Status;

16 import org.aspectj.org.eclipse.jdt.core.JavaCore;

17 import org.aspectj.org.eclipse.jdt.core.compiler.IScanner;

18 import org.aspectj.org.eclipse.jdt.core.compiler.ITerminalSymbols;

19 import org.aspectj.org.eclipse.jdt.core.compiler.InvalidInputException;

20

21 /**

RecoveryScanner.java (https://gitlab.com/essere.lab.public/qualitas.class-corpus) Java · 261 lines

12 package org.eclipse.jdt.internal.compiler.parser;

13

14 import org.eclipse.jdt.core.compiler.CharOperation;

15 import org.eclipse.jdt.core.compiler.InvalidInputException;

encoder.py (git://github.com/darwin/drydrop.git) Python · 434 lines ✨ Summary

This code defines a custom JSON encoder for Python, allowing for more control over how complex data types are serialized to JSON. It provides a way to customize the encoding of various data types, such as lists, dictionaries, and floats, by implementing custom _iterencode functions. This can be useful for specific use cases where standard JSON serialization does not meet requirements.

12 c_make_encoder = None

13

14 ESCAPE = re.compile(r'[\x00-\x1f\\"\b\f\n\r\t]')

15 ESCAPE_ASCII = re.compile(r'([\\"]|[^\ -~])')

16 HAS_UTF8 = re.compile(r'[\x80-\xff]')

17 ESCAPE_DCT = {

18 '\\': '\\\\',

notification.py (git://github.com/linkedin/indextank-service.git) Python · 95 lines ✨ Summary

This is a Python class that represents a notification message from Amazon Mechanical Turk (MTurk) and its associated events. It provides methods for verifying the authenticity of the notification message and accessing the event data.

42

43 EVENT_PATTERN = r"Event\.(?P<n>\d+)\.(?P<param>\w+)"

44 EVENT_RE = re.compile(EVENT_PATTERN)

45

46 def __init__(self, d):

Magic.py (http://editra-plugins.googlecode.com/svn/trunk/) Python · 3382 lines ✨ Summary

This is a Python class that defines a set of magic commands for an IPython shell. The magic commands allow users to interact with the shell in various ways, such as toggling doctest mode, executing code snippets, and customizing prompt behavior. The class provides a way to extend the functionality of the IPython shell through these magic commands.

280

281 # Characters that need to be escaped for latex:

282 escape_re = re.compile(r'(%|_|\$|#|&)',re.MULTILINE)

283 # Magic command names as headers:

284 cmd_name_re = re.compile(r'^(%s.*?):' % self.shell.ESC_MAGIC,

285 re.MULTILINE)

286 # Magic commands

287 cmd_re = re.compile(r'(?P<cmd>%s.+?\b)(?!\}\}:)' % self.shell.ESC_MAGIC,

288 re.MULTILINE)

289 # Paragraph continue

290 par_re = re.compile(r'\\$',re.MULTILINE)

291

292 # The "\n" symbol