Found 1172 results in 320 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-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:
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/dulwich/dulwich:dulwich/object_store.py: [ master, ] python
961:     def __contains__(self, needle):
968:         :param needle: SHA1 of the object to check for
970:         return needle in self.store
chromium.googlesource.com/chromium/src/tools/android:appstats.py: [ master, ] python
32:   def FindLines(haystack, needle):
34:     |needle|."""
35:     return [ hay for hay in haystack if needle in hay ]
android.googlesource.com/platform/external/python/cpython3:Tools/stringbench/stringbench.py: [ master, ] python
1080:     needle = STR("AACT")
1082:         seq_count(needle)
android.googlesource.com/platform/superproject:external/python/cpython3/Tools/stringbench/stringbench.py: [ master, ] python Duplicate result
github.com/google/ci_edit:app/window.py: [ master, ] python
622:       needle = app.bookmark.Bookmark(beginRow, beginRow)
623:       beginIndex = bisect.bisect_left(bookmarkList, needle)
626:       needle.range = (endRow, endRow)
627:       endIndex = bisect.bisect_left(bookmarkList, needle)
chromium.googlesource.com/infra/third_party/Pygments:pygments/lexer.py: [ master, ] python
223:     def __init__(self, _root_lexer, _language_lexer, _needle=Other, **options):
226:         self.needle = _needle
234:             if t is self.needle:
github.com/google/proto-quic: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/rekall:rekall-core/rekall/plugins/windows/common.py: [ master, ] python
240:         super(PoolTagCheck, self).__init__(needle=tag, **kwargs)
105:                 needles=self.plugin_args.process_name,
267:         super(MultiPoolTagCheck, self).__init__(needles=tags, **kwargs)
github.com/google/rekall:rekall-core/rekall/plugins/guess_profile.py: [ master, ] python
641:         needle_lookup = {}
661:                 needle_lookup.setdefault(keyword, []).append(method)
687:             for method in needle_lookup[hit]:
268:                 address_space=test_as, needles=[
640:         needles = []
660:                 needles.append(keyword)
680:             address_space=address_space, needles=needles,
github.com/google/ci_edit:app/actions.py: [ master, ] python
196:     needle = app.bookmark.Bookmark(lowerRow + 1, lowerRow + 1)
197:     index = bisect.bisect_left(self.bookmarks, needle)
214:     needle = app.bookmark.Bookmark(upperRow, upperRow)
215:     index = bisect.bisect_left(self.bookmarks, needle)
230:     needle = app.bookmark.Bookmark(upperRow, lowerRow)
232:     begin = bisect.bisect_left(rangeList, needle)
233:     if begin and needle.begin <= rangeList[begin - 1].end:
239:     offset = needle.end
chromium.googlesource.com/chromium/src/tools:android/appstats.py: [ master, ] python Duplicate result
github.com/chromium/chromium:tools/android/appstats.py: [ master, ] python Duplicate result
chromium.googlesource.com/chromium/codesearch:src/tools/android/appstats.py: [ master, ] python Duplicate result
chromium.googlesource.com/arc/arc:third_party/chromium-ppapi/tools/android/appstats.py: [ master, ] python Duplicate result
chromium.googlesource.com/chromium/codesearch:infra:codesearch-gitlink-overlay/luci/appengine/components/components/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)
github.com/google/dotty:efilter/stdlib/core.py: [ master, ] python
307:     """Returns the position of 'needle' in 'string', or -1 if not found."""
311:     def __call__(self, string, needle):
312:         return string.find(needle)
github.com/apache/ambari:ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/parser.py: [ trunk, ] 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)
chromium.googlesource.com/infra/infra/codesearch:luci/appengine/components/components/third_party/jinja2/parser.py: [ master, ] python Duplicate result
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))
chromium.googlesource.com/arc/arc:third_party/android/external/chromium_org/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)
chromium.googlesource.com/chromium/codesearch:infra:codesearch-gitlink-overlay/luci/appengine/components/components/third_party/jinja2/ext.py: [ master, ] python
430:                                          drop_needle=True))
444:                                             drop_needle=True)
chromium.googlesource.com/chromium/codesearch:tools/depot_tools/git_cache.py: [ master, ] python
434:       needle = '%s^^^^{commit}' % revision
436:       needle = '%s^{commit}' % revision
440:       self.RunGit(['cat-file', '-e', needle])
chromium.googlesource.com/chromium/src:tools/android/appstats.py: [ master, ] python Duplicate result
chromium.googlesource.com/ios-chromium-mirror:tools/android/appstats.py: [ master, ] python Duplicate result
github.com/apache/ambari:ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/ext.py: [ trunk, ] python
415:                                          drop_needle=True))
429:                                             drop_needle=True)
chromium.googlesource.com/infra/infra/codesearch:luci/appengine/components/components/third_party/jinja2/ext.py: [ master, ] python Duplicate result
github.com/apache/incubator-slider:slider-agent/src/main/python/jinja2/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)
chromium.googlesource.com/arc/arc:third_party/android/external/chromium_org/third_party/jinja2/ext.py: [ master, ] python
430:                                          drop_needle=True))
444:                                             drop_needle=True)
github.com/google/dotty:efilter/transforms/solve.py: [ master, ] python
778:     needle = solve(expr.element, vars).value
779:     if repeated.isrepeating(needle):
782:             message=("More than one value not allowed in the needle. "
783:                      "Got %d values.") % counted.count(needle))
796:         return Result(needle in haystack, ())
802:             if straw == needle:
811:         return Result(needle in straw, None)
chromium.googlesource.com/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]):
github.com/apache/incubator-slider:slider-agent/src/main/python/jinja2/jinja2/ext.py: [ master, ] python
415:                                          drop_needle=True))
429:                                             drop_needle=True)
android.googlesource.com/platform/external/libchrome:third_party/jinja2/parser.py: [ master, ] python
149:     def parse_statements(self, end_tokens, drop_needle=False):
156:         the call is the matched end token.  If this is not wanted `drop_needle`
172:         if drop_needle:
185:                                      drop_needle=True)
203:             else_ = self.parse_statements(('name:endfor',), drop_needle=True)
223:                                                      drop_needle=True)
243:                                           drop_needle=True)
252:                                             drop_needle=True)
268:         node.body = self.parse_statements(('name:endblock',), drop_needle=True)
369:         node.body = self.parse_statements(('name:endcall',), drop_needle=True)
376:                                           drop_needle=True)
384:                                           drop_needle=True)
github.com/google/rekall:rekall-core/rekall/plugins/darwin/common.py: [ master, ] python
136:         ("StringCheck", dict(needle=b"Catfish \x00\x00"))
android.googlesource.com/platform/superproject:tools/idea/python/lib/Lib/asynchat.py: [ master, ] python
276: # Given 'haystack', see if any prefix of 'needle' is at its end.  This
291: def find_prefix_at_end (haystack, needle):
292:     l = len(needle) - 1
293:     while l and not haystack.endswith(needle[:l]):
chromium.googlesource.com/dart/dartium/src:third_party/jinja2/parser.py: [ master, ] python Duplicate result
chromium.googlesource.com/dart/dartium/src:third_party/mojo/src/mojo/public/third_party/jinja2/parser.py: [ master, ] python Duplicate result
android.googlesource.com/platform/superproject:external/libchrome/third_party/jinja2/parser.py: [ master, ] python Duplicate result
github.com/google/dotty:efilter/parsers/common/grammar.py: [ master, ] python
162:             needle = tuple((self._normalize_token(t)
164:             result = self._table.get(needle)
166:                 return result, needle
chromium.googlesource.com/chromium/src/codesearch:third_party/android_ndk/prebuilt/linux-x86_64/lib/python2.7/asynchat.py: [ master, ] python Duplicate result
chromium.googlesource.com/chromium/chromium:third_party/jinja2/parser.py: [ trunk, ] python Duplicate result
github.com/google/rekall:rekall-core/rekall/plugins/windows/malware/cmdhistory.py: [ master, ] python
772:                 ("StringCheck", dict(needle=pattern))
895:                 ("StringCheck", dict(needle=pattern))
chromium.googlesource.com/dart/dartium/src:third_party/jinja2/ext.py: [ master, ] python Duplicate result
chromium.googlesource.com/dart/dartium/src:third_party/mojo/src/mojo/public/third_party/jinja2/ext.py: [ master, ] python Duplicate result
chromium.googlesource.com/chromium/src/third_party:jinja2/parser.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 Duplicate result
chromium.googlesource.com/chromium/codesearch:src:codesearch-gitlink-overlay/third_party/depot_tools/git_cache.py: [ master, ] python Duplicate result
chromium.googlesource.com/chromium/chromium:third_party/jinja2/ext.py: [ trunk, ] python Duplicate result