Found 842 results in 228 files
github.com/google/rekall:rekall-core/rekall/scan.py: [master,] python
170:     needle = None
171:     needle_offset = None
540:     needles = []
59:         """Is the needle found at 'offset'?
63:             checked for the needle.
173:     def __init__(self, needle=None, needle_offset=0, **kwargs):
175:         self.needle = needle
176:         self.needle_offset = needle_offset
180:         buffer_offset = buffer_as.get_buffer_offset(offset) + self.needle_offset
181:         if buffer_as.data.startswith(self.needle, buffer_offset):
182:             return self.needle
185:         # Search the rest of the buffer for the needle.
186:         buffer_offset = buffer_as.get_buffer_offset(offset) + self.needle_offset
187:         dindex = buffer_as.data.find(self.needle, buffer_offset + 1)
532:             yield ("StringCheck", dict(needle=expected_bytes,
533:                                        needle_offset=rel_offset + array_offset))
553:                 needle=self.needles[0])
96:     def __init__(self, needles=None, **kwargs):
100:           needles: A list of strings we search for.
103:           RuntimeError: No needles provided.
109:         if not needles:
110:             raise RuntimeError("No needles provided to search.")
114:         if max([len(x) for x in needles]) > 50:
118:         # sure all the needles are bytes too.
119:         byte_needles = [utils.SmartStr(x) for x in needles]
120:         tree = acora.AcoraBuilder(*byte_needles)
539:     # Override with the needles to check for.
542:     def __init__(self, needles=None, **kwargs):
544:         if needles is not None:
545:             self.needles = needles
550:         if len(needles) == 1:
557:                 needles=self.needles)
587:         self.needles = []
595:             self.needles.append(tmp.obj_vm.read(0, tmp.obj_size))
597:         # The common string between all the needles.
599:             ("MultiStringFinderCheck", dict(needles=self.needles)),
github.com/google/coursebuilder-android-container-module:android/worker.py: [master,] python
110: _ACCEPT_LICENSE_NEEDLE = 'Do you accept the license'
133: _GRADLEW_INSTALL_SUCCESS_NEEDLE = 'BUILD SUCCESSFUL'
145: _TEST_FAILURE_NEEDLE = 'FAILURES!!!\r'
779:         return _GRADLEW_INSTALL_SUCCESS_NEEDLE not in result
782:         return _TEST_FAILURE_NEEDLE in result
1111:             if _ACCEPT_LICENSE_NEEDLE in line and not process.poll():
github.com/google/coursebuilder-core:coursebuilder/modules/gitkit/gitkit.py: [master,] python
150: _BAD_CRYPTO_NEEDLE = 'PKCS12 format is not supported by the PyCrypto library'
627:             if _BAD_CRYPTO_NEEDLE in e.message:
chromium.googlesource.com/chromium/codesearch:src/third_party/jinja2/parser.py: [master,] python
140:     def parse_statements(self, end_tokens, drop_needle=False):
147:         the call is the matched end token.  If this is not wanted `drop_needle`
163:         if drop_needle:
175:                                      drop_needle=True)
193:             else_ = self.parse_statements(('name:endfor',), drop_needle=True)
212:                                                    drop_needle=True)
231:         node.body = self.parse_statements(('name:endblock',), drop_needle=True)
333:         node.body = self.parse_statements(('name:endcall',), drop_needle=True)
340:                                           drop_needle=True)
348:                                           drop_needle=True)
chromium.googlesource.com/chromium/codesearch:src/third_party/jinja2/ext.py: [master,] python
430:                                          drop_needle=True))
444:                                             drop_needle=True)
github.com/google/cpython-pt:Tools/stringbench/stringbench.py: [3.3,] python
1080:     needle = STR("AACT")
1082:         seq_count(needle)
android.googlesource.com/platform/external/python/cpython3:Tools/stringbench/stringbench.py: [master,] python
1080:     needle = STR("AACT")
1082:         seq_count(needle)
chromium.googlesource.com/chromium/src/codesearch:third_party/catapult/third_party/google-endpoints/rsa/transform.py: [master,] python
120: def bytes_leading(raw_bytes, needle=ZERO_BYTE):
128:     :param needle:
131:         The number of leading needle bytes.
136:     _byte = needle[0]
android.googlesource.com/platform/external/libmojo:third_party/jinja2/parser.py: [master,] python
141:     def parse_statements(self, end_tokens, drop_needle=False):
148:         the call is the matched end token.  If this is not wanted `drop_needle`
164:         if drop_needle:
191:             else_ = self.parse_statements(('name:endfor',), drop_needle=True)
210:                                                    drop_needle=True)
229:         node.body = self.parse_statements(('name:endblock',), drop_needle=True)
329:         node.body = self.parse_statements(('name:endcall',), drop_needle=True)
336:                                           drop_needle=True)
344:                                           drop_needle=True)
android.googlesource.com/platform/external/libmojo:third_party/jinja2/ext.py: [master,] python
430:                                          drop_needle=True))
444:                                             drop_needle=True)
android.googlesource.com/platform/external/deqp:scripts/convert_case_list_to_xml.py: [master,] python
32: def findAllMatches(haystack, needle):
36: 		ndx = haystack.find(needle, ndx+1)
Duplicate result github.com/fuchsia-mirror/third_party-vulkan-cts:scripts/convert_case_list_to_xml.py: [master,] python Duplicate result
github.com/google/proto-quic:src/tools/swarming_client/third_party/rsa/rsa/transform.py: [master,] python
118: def bytes_leading(raw_bytes, needle=ZERO_BYTE):
126:     :param needle:
129:         The number of leading needle bytes.
133:     _byte = needle[0]
Duplicate result chromium.googlesource.com/infra/luci/luci-py:client/third_party/rsa/rsa/transform.py: [master,] python Duplicate result
chromium.googlesource.com/infra/third_party/Pygments:tests/string_asserts.py: [master,] python
12:     def assertStartsWith(self, haystack, needle, msg=None):
14:             msg = "'{}' does not start with '{}'".format(haystack, needle)
15:         if not haystack.startswith(needle):
18:     def assertEndsWith(self, haystack, needle, msg=None):
20:             msg = "'{}' does not end with '{}'".format(haystack, needle)
21:         if not haystack.endswith(needle):
Duplicate result chromium.googlesource.com/infra/infra/codesearch:luci/client/third_party/rsa/rsa/transform.py: [master,] python Duplicate result
chromium.googlesource.com/chromium/codesearch:src/tools/android/appstats.py: [master,] python
31:   def FindLines(haystack, needle):
33:     |needle|."""
34:     return [ hay for hay in haystack if needle in hay ]
github.com/google/playhvz:web/tests/driver.py: [master,] python
88:   def ExpectContains(self, path, needle, should_exist=True, check_visible=True):
102:     # print 'Checking if "%s" is in "%s"' % (needle, text)
106:       assert needle in text, "The text %s was not found in %s" % (needle, path)
107:       ## assert element.is_displayed(), "The text %s is not visible"  % needle
109:       assert (needle not in text), "The text %s was found when it wasn't supposed be there." % needle
144:   def ExpectContains(self, path, needle, should_exist=True, check_visible=True):
145:     return self.Retry(lambda: self.inner_driver.ExpectContains(path, needle, should_exist=should_exist, check_visible=check_visible))
235:   def ExpectContains(self, path, needle, should_exist=True, check_visible=True, scoped=True):
236:     self.drivers_by_user[self.current_user].ExpectContains(path, needle, should_exist=should_exist, check_visible=check_visible)
329:   def ExpectContains(self, path, needle, scoped=True, should_exist=True, check_visible=True):
331:       self.inner_driver.ExpectContains([[By.ID, self.current_user + "App"]] + path, needle, should_exist=should_exist, check_visible=check_visible)
333:       self.inner_driver.ExpectContains(path, needle, should_exist=should_exist, check_visible=check_visible)
396:   def ExpectContains(self, path, needle, should_exist=True, check_visible=True, scoped=True):
397:     return self.inner_driver.ExpectContains(path, needle, should_exist=should_exist, check_visible=check_visible, scoped=scoped)
Duplicate result chromium.googlesource.com/chromium/src/codesearch:tools/swarming_client/third_party/rsa/rsa/transform.py: [master,] python Duplicate result
github.com/google/coursebuilder-core:coursebuilder/tests/integration/load_test.py: [master,] python
76: def assert_contains(needle, haystack):
77:     if needle not in haystack:
78:         raise Exception('Expected to find term: %s\n%s', needle, haystack)
81: def assert_does_not_contain(needle, haystack):
82:     if needle in haystack:
83:         raise Exception('Did not expect to find term: %s\n%s', needle, haystack)
Duplicate result chromium.googlesource.com/infra/luci/client-py:third_party/rsa/rsa/transform.py: [master,] python Duplicate result
Duplicate result android.googlesource.com/platform/superproject:external/libmojo/third_party/jinja2/parser.py: [master,] python Duplicate result
Duplicate result android.googlesource.com/platform/superproject:external/libmojo/third_party/jinja2/ext.py: [master,] python Duplicate result
Duplicate result chromium.googlesource.com/infra/infra/codesearch:luci/appengine/components/components/third_party/jinja2/parser.py: [master,] python Duplicate result
Duplicate result chromium.googlesource.com/infra/infra/codesearch:luci/appengine/components/components/third_party/jinja2/ext.py: [master,] python Duplicate result
github.com/google/coursebuilder-core:coursebuilder/tests/functional/actions.py: [master,] python
458: def assert_contains(needle, haystack, collapse_whitespace=False):
459:     needle = to_unicode(needle)
463:     if needle not in haystack:
464:         raise Exception('Can\'t find \'%s\' in \'%s\'.' % (needle, haystack))
469:     for needle in needles:
470:         needle = to_unicode(needle)
471:         if needle not in haystack:
473:                 'Can\'t find \'%s\' in \'%s\'.' % (needle, haystack))
476: def assert_does_not_contain(needle, haystack, collapse_whitespace=False):
477:     needle = to_unicode(needle)
481:     if needle in haystack:
482:         raise Exception('Found \'%s\' in \'%s\'.' % (needle, haystack))
487:     for needle in needles:
488:         needle = to_unicode(needle)
489:         if needle in haystack:
490:             raise Exception('Found \'%s\' in \'%s\'.' % (needle, haystack))
467: def assert_contains_all_of(needles, haystack):
485: def assert_contains_none_of(needles, haystack):
chromium.googlesource.com/infra/third_party/docutils:sandbox/py-rest-doc/sphinx/web/markup.py: [master,] python
107:     def get_data(self, drop_needle=False):
113:                     if not drop_needle:
github.com/google/coursebuilder-core:coursebuilder/scripts/project.py: [master,] python
527:     def assert_contains(self, needle, haystack):
528:         if haystack.find(needle) == -1:
530:                 'Expected to find %s, found:\n%s', (needle, haystack))
android.googlesource.com/platform/superproject:external/python/cpython3/Lib/asynchat.py: [master,] python
288: # Given 'haystack', see if any prefix of 'needle' is at its end.  This
303: def find_prefix_at_end(haystack, needle):
304:     l = len(needle) - 1
305:     while l and not haystack.endswith(needle[:l]):
Duplicate result github.com/fuchsia-mirror/mojo-public:third_party/jinja2/parser.py: [master,] python Duplicate result
Duplicate result github.com/fuchsia-mirror/mojo-public:third_party/jinja2/ext.py: [master,] python Duplicate result
github.com/tensorflow/benchmarks:scripts/tf_cnn_benchmarks/variable_mgr.py: [master,] python
1045:   """Tests if any needle is a substring of haystack.
1044: def contains_any(haystack, needles):
1049:     needles: list of strings
1052:     True if any element of needles is a substring of haystack,
1055:   for n in needles:
Duplicate result chromium.googlesource.com/infra/experimental:everyone_loves_stip/slo_bro/lib/rsa/transform.py: [master,] python Duplicate result
Duplicate result chromium.googlesource.com/infra/experimental:everyone_loves_stip/slo_bro/lib/rsa/rsa/transform.py: [master,] python Duplicate result
Duplicate result android.googlesource.com/platform/external/adt-infra:build/third_party/rsa/transform.py: [master,] python Duplicate result
Duplicate result github.com/android-pay/s2ap-quickstart-python:lib/rsa/transform.py: [master,] python Duplicate result
Duplicate result github.com/fuchsia-mirror/third_party-jinja2:parser.py: [master,] python Duplicate result
Duplicate result chromium.googlesource.com/chromium/src/third_party/jinja2:parser.py: [master,] python Duplicate result
Duplicate result chromium.googlesource.com/arc/arc:third_party/chromium-ppapi/third_party/jinja2/parser.py: [master,] python Duplicate result
Duplicate result chromium.googlesource.com/arc/arc:third_party/chromium-ppapi/third_party/jinja2/ext.py: [master,] python Duplicate result
Duplicate result chromium.googlesource.com/ios-chromium-mirror:third_party/jinja2/parser.py: [master,] python Duplicate result
Duplicate result chromium.googlesource.com/chromium/src:third_party/jinja2/parser.py: [master,] python Duplicate result
Duplicate result chromium.googlesource.com/ios-chromium-mirror:third_party/jinja2/ext.py: [master,] python Duplicate result
Duplicate result chromium.googlesource.com/chromium/src:third_party/jinja2/ext.py: [master,] python Duplicate result
Duplicate result android.googlesource.com/platform/external/adt-infra:build/third_party/jinja2/jinja2/parser.py: [master,] python Duplicate result
Duplicate result android.googlesource.com/platform/external/adt-infra:build/third_party/jinja2/jinja2/ext.py: [master,] python Duplicate result
chromium.googlesource.com/infra/third_party/Jinja2:jinja2/parser.py: [master,] python
140:     def parse_statements(self, end_tokens, drop_needle=False):
147:         the call is the matched end token.  If this is not wanted `drop_needle`
163:         if drop_needle:
175:                                      drop_needle=True)
193:             else_ = self.parse_statements(('name:endfor',), drop_needle=True)
212:                                                    drop_needle=True)
231:         node.body = self.parse_statements(('name:endblock',), drop_needle=True)
331:         node.body = self.parse_statements(('name:endcall',), drop_needle=True)
338:                                           drop_needle=True)
346:                                           drop_needle=True)
Duplicate result android.googlesource.com/platform/external/adt-infra:build/third_party/gsutil/third_party/rsa/rsa/transform.py: [master,] python Duplicate result
Duplicate result chromium.googlesource.com/chromium/tools/build:third_party/jinja2/jinja2/parser.py: [master,] python Duplicate result
Duplicate result chromium.googlesource.com/chromium/tools/build:third_party/jinja2/jinja2/ext.py: [master,] python Duplicate result

5533KB index data, 25473 ngram matches, 2362 docs considered, 261 docs (6776KB) loaded, 0 docs skipped