Found 1000 results in 274 files, showing top 50 files (show more).
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:
android.googlesource.com/platform/external/python/cpython3:Tools/stringbench/stringbench.py: [ master, ] python
1080:     needle = STR("AACT")
1082:         seq_count(needle)
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]
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)
chromium.googlesource.com/infra/luci/luci-py:client/third_party/rsa/rsa/transform.py: [ master, ] python Duplicate result
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]
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):
chromium.googlesource.com/chromium/codesearch:tools/depot_tools/git_cache.py: [ master, ] python
419:       needle = '%s^^^^{commit}' % revision
421:       needle = '%s^{commit}' % revision
425:       self.RunGit(['cat-file', '-e', needle])
chromium.googlesource.com/infra/infra/codesearch:luci/client/third_party/rsa/rsa/transform.py: [ master, ] python Duplicate result
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/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)
github.com/apache/cloudstack:tools/marvin/mvn-setup.py: [ master, ] python
36:     needle = '\nVERSION\s*=\s*[\'"][^\'"]*[\'"]'
38:     content = re.sub(needle, replacement, content, 1)
chromium.googlesource.com/ios-chromium-mirror: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/src:third_party/jinja2/parser.py: [ master, ] python Duplicate result
chromium.googlesource.com/chromium/src:third_party/jinja2/ext.py: [ master, ] python
430:                                          drop_needle=True))
444:                                             drop_needle=True)
chromium.googlesource.com/ios-chromium-mirror:third_party/jinja2/ext.py: [ master, ] python Duplicate result
chromium.googlesource.com/chromium/src/codesearch:tools/swarming_client/third_party/rsa/rsa/transform.py: [ master, ] python Duplicate result
github.com/chromium/chromium:third_party/jinja2/parser.py: [ master, ] python Duplicate result
github.com/chromium/chromium:third_party/jinja2/ext.py: [ master, ] python Duplicate result
kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux:tools/testing/selftests/bpf/test_offload.py: [ master, ] python
548: def check_no_extack(res, needle):
549:     fail((res[1] + res[2]).count(needle) or (res[1] + res[2]).count("Warning:"),
550:          "Found '%s' in command output, leaky extack?" % (needle))
559: def test_spurios_extack(sim, obj, skip_hw, needle):
562:     check_no_extack(res, needle)
565:     check_no_extack(res, needle)
568:     check_no_extack(res, needle)
android.googlesource.com/platform/superproject:external/deqp/scripts/convert_case_list_to_xml.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)
chromium.googlesource.com/chromium/codesearch:src:codesearch-gitlink-overlay/third_party/android_ndk/prebuilt/linux-x86_64/share/gdb/python/gdb/unwinder.py: [ master, ] python
86:     for needle in locus.frame_unwinders:
87:         if needle.name == unwinder.name:
chromium.googlesource.com/infra/luci/client-py:third_party/rsa/rsa/transform.py: [ master, ] python Duplicate result
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)
chromium.googlesource.com/infra/infra/codesearch:luci/appengine/components/components/third_party/jinja2/parser.py: [ master, ] python Duplicate result
chromium.googlesource.com/infra/infra/codesearch:luci/appengine/components/components/third_party/jinja2/ext.py: [ master, ] python Duplicate result
github.com/apache/cloudstack:test/integration/component/test_volumes.py: [ master, ] python
161:     @attr(tags=["advanced", "advancedns", "needle"])
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/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):
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))
github.com/apache/cloudstack:test/integration/component/maint/test_redundant_router_network_rules.py: [ master, ] python
1116:     @attr(tags=["advanced", "advancedns", "ssh", "needle"], required_hardware="true")
chromium.googlesource.com/chromium/codesearch:src:codesearch-gitlink-overlay/third_party/depot_tools/git_cache.py: [ master, ] python Duplicate result
chromium.googlesource.com/chromium/codesearch:src:codesearch-gitlink-overlay/third_party/android_ndk/prebuilt/linux-x86_64/lib/python2.7/asynchat.py: [ master, ] python
295: # Given 'haystack', see if any prefix of 'needle' is at its end.  This
310: def find_prefix_at_end (haystack, needle):
311:     l = len(needle) - 1
312:     while l and not haystack.endswith(needle[:l]):
chromium.googlesource.com/infra/experimental:everyone_loves_stip/slo_bro/lib/rsa/transform.py: [ master, ] python Duplicate result
chromium.googlesource.com/infra/experimental:everyone_loves_stip/slo_bro/lib/rsa/rsa/transform.py: [ master, ] python Duplicate result
android.googlesource.com/platform/external/adt-infra:build/third_party/rsa/transform.py: [ master, ] python Duplicate result
chromium.googlesource.com/chromium/src/third_party/jinja2:parser.py: [ master, ] python Duplicate result
github.com/fuchsia-mirror/third_party-vulkan-cts:scripts/convert_case_list_to_xml.py: [ master, ] python Duplicate result
android.googlesource.com/platform/external/adt-infra:build/third_party/jinja2/jinja2/parser.py: [ master, ] python Duplicate result
android.googlesource.com/platform/external/adt-infra:build/third_party/jinja2/jinja2/ext.py: [ master, ] python Duplicate result
github.com/fuchsia-mirror/mojo-public:third_party/jinja2/parser.py: [ master, ] python Duplicate result
github.com/android-pay/s2ap-quickstart-python:lib/rsa/transform.py: [ master, ] python Duplicate result
github.com/fuchsia-mirror/mojo-public:third_party/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)
android.googlesource.com/platform/external/adt-infra:build/third_party/gsutil/third_party/rsa/rsa/transform.py: [ master, ] python Duplicate result
android.googlesource.com/platform/superproject:external/libmojo/third_party/jinja2/parser.py: [ master, ] python Duplicate result

Took 32.550145ms for 5480KB index data, 7831 ngram matches, 2944 docs considered, 323 docs (8275KB) loaded.