Found 1168 results in 325 files, showing top 150 files (show more).
github.com/google/rekall:rekall-core/rekall/scan.py: [ master, ]
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/rekall:rekall-core/rekall/plugins/linux/heap_analysis.py: [ master, ]
2852:     def search_vmas_for_needle(self, search_string=None, pointers=None,
3053:     def search_chunks_for_needle(self, search_string=None, pointers=None,
2307:             for hit in self.search_vmas_for_needle(pointers=[top_chunk.v()]):
2787:             for hit in self.search_vmas_for_needle(pointers=mmap_pointers):
2789:                 found_pointers.add(hit['needle'])
2854:         """Searches all vmas or only the given ones for the given needle(s).
2868:                                                 dict(needle=search_string))])
2901:                     temp['needle'] = pointer
2904:                     temp['needle'] = search_string
3055:         """Searches all chunks for the given needle(s) and returns the ones
3070:             hits = self.search_vmas_for_needle(pointers=pointers,
3074:             hits = self.search_vmas_for_needle(search_string=search_string,
3085:         #   { needle (string or pointer): { offsets: {offsets} }, needle2: ...}
3099:                         result[chunk] = {hit['needle']: {hit['hit']}}
3102:                         if hit['needle'] not in list(result[chunk].keys()):
3103:                             result[chunk][hit['needle']] = {hit['hit']}
3106:                             result[chunk][hit['needle']].add(hit['hit'])
3657:                 hits = self.search_vmas_for_needle(
3661:                 hits = self.search_vmas_for_needle(
4228:                         hits = self.search_chunks_for_needle(
4233:                         temp_hits = self.search_chunks_for_needle(
4264:                                 temp_hit['needle'] = ','.join(rule_strings)
4267:                         temp_hits = self.search_chunks_for_needle(
4308:                             temp_hits = self.search_chunks_for_needle(
4342:                             "We didn't find anything for the given needle(s).")
4350:                         for needle, data in needles.items():
4351:                             if isinstance(needle, malloc_chunk):
4355:                                     "0x{:X}:\n".format(needle.v()))
4371:                                     "The following needle at the given "
4373:                                 renderer.write("Needle     Offset(s)\n")
4378:                                         (hex(needle) if isinstance(needle, int)
4379:                                          else repr(needle)) + ": "
4386:                                         (hex(needle) if isinstance(needle, int)
4387:                                          else repr(needle)) + ": The needle "
4237:                         for chunk, needles in temp_hits.items():
4239:                                 hits[chunk].update(needles)
4242:                                 hits[chunk] = needles
4271:                         for chunk, needles in temp_hits.items():
4273:                                 hits[chunk].update(needles)
4276:                                 hits[chunk] = needles
4345:                     for chunk, needles in hits.items():
github.com/google/coursebuilder-core:coursebuilder/modules/gitkit/gitkit.py: [ master, ]
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, ]
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():
android.googlesource.com/tools/repo:project.py: [ master, ]
1875:       needle = platform_utils.realpath(self.gitdir)
1888:         if fullpath == needle:
gerrit.googlesource.com/git-repo:project.py: [ master, ] Duplicate result
android.googlesource.com/platform/superproject:external/python/cpython3/Tools/stringbench/stringbench.py: [ master, ]
1080:     needle = STR("AACT")
1082:         seq_count(needle)
github.com/dulwich/dulwich:dulwich/object_store.py: [ master, ]
1032:     def __contains__(self, needle):
1040:           needle: SHA1 of the object to check for
1042:         if needle == ZERO_SHA:
1044:         return needle in self.store
chromium.googlesource.com/chromium/src/tools/android:appstats.py: [ master, ]
32:   def FindLines(haystack, needle):
34:     |needle|."""
35:     return [ hay for hay in haystack if needle in hay ]
android.googlesource.com/platform/superproject:external/bcc/tools/trace.py: [ master, ]
248:         char needle[] = %s;
249:         char haystack[sizeof(needle)];
251:         for (int i = 0; i < sizeof(needle) - 1; ++i) {
252:                 if (needle[i] != haystack[i]) {
github.com/google/closure-templates:python/sanitize.py: [ master, ]
394:   def match_prefix_ignore_case_past_end(needle, haystack, offset):
396:     chars_to_scan = min(len(needle), chars_left)
398:       if needle[i] != ascii_to_lower(haystack[i + offset]):
github.com/GoogleCloudPlatform/training-data-analyst:courses/machine_learning/deepdive2/structured/labs/serving/application/lib/jinja2/parser.py: [ master, ]
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/GoogleCloudPlatform/training-data-analyst:courses/machine_learning/deepdive2/structured/solutions/serving/application/lib/jinja2/parser.py: [ master, ] Duplicate result
github.com/google/ci_edit:app/window.py: [ master, ]
683:             needle = app.bookmark.Bookmark(beginRow, beginRow, {})
684:             beginIndex = bisect.bisect_left(bookmarkList, needle)
687:             needle.range = (endRow, endRow)
688:             endIndex = bisect.bisect_left(bookmarkList, needle)
android.googlesource.com/platform/external/python/cpython3:Tools/stringbench/stringbench.py: [ master, ] Duplicate result
android.googlesource.com/platform/superproject:external/bcc/tools/argdist.py: [ master, ]
258:         char needle[] = %s;
259:         char haystack[sizeof(needle)];
261:         for (int i = 0; i < sizeof(needle) - 1; ++i) {
262:                 if (needle[i] != haystack[i]) {
chromium.googlesource.com/infra/third_party/Pygments:pygments/lexer.py: [ master, ]
223:     def __init__(self, _root_lexer, _language_lexer, _needle=Other, **options):
226:         self.needle = _needle
234:             if t is self.needle:
android.googlesource.com/platform/external/linux-kselftest:tools/testing/selftests/bpf/test_offload.py: [ master, ]
659: def check_no_extack(res, needle):
660:     fail((res[1] + res[2]).count(needle) or (res[1] + res[2]).count("Warning:"),
661:          "Found '%s' in command output, leaky extack?" % (needle))
679: def test_spurios_extack(sim, obj, skip_hw, needle):
682:     check_no_extack(res, needle)
685:     check_no_extack(res, needle)
688:     check_no_extack(res, needle)
github.com/google/ci_edit:app/actions.py: [ master, ]
262:         needle = app.bookmark.Bookmark(lowerRow + 1, lowerRow + 1, {})
263:         index = bisect.bisect_left(self.bookmarks, needle)
279:         needle = app.bookmark.Bookmark(upperRow, upperRow, {})
280:         index = bisect.bisect_left(self.bookmarks, needle)
294:         needle = app.bookmark.Bookmark(upperRow, lowerRow, {})
296:         begin = bisect.bisect_left(rangeList, needle)
297:         if begin and needle.begin <= rangeList[begin - 1].end:
303:         offset = needle.end
chromium.googlesource.com/chromium/src/tools:android/appstats.py: [ master, ] Duplicate result
github.com/google/rekall:rekall-core/rekall/plugins/windows/common.py: [ master, ]
240:         super(PoolTagCheck, self).__init__(needle=tag, **kwargs)
105:                 needles=self.plugin_args.process_name,
267:         super(MultiPoolTagCheck, self).__init__(needles=tags, **kwargs)
android.googlesource.com/platform/external/bcc:tools/trace.py: [ master, ] Duplicate result
github.com/google/rekall:rekall-core/rekall/plugins/guess_profile.py: [ master, ]
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,
android.googlesource.com/platform/superproject:external/libchrome/third_party/jinja2/parser.py: [ master, ] Duplicate result
github.com/google/dotty:efilter/stdlib/core.py: [ master, ]
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/google/coursebuilder-core:coursebuilder/scripts/project.py: [ master, ]
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/ambari:ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/parser.py: [ trunk, ]
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/libchrome:third_party/jinja2/parser.py: [ master, ] Duplicate result
android.googlesource.com/platform/external/bcc:tools/argdist.py: [ master, ] Duplicate result
github.com/apache/ambari:ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/ext.py: [ trunk, ]
415:                                          drop_needle=True))
429:                                             drop_needle=True)
github.com/google/dotty:efilter/transforms/solve.py: [ master, ]
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)
github.com/chromium/chromium:tools/android/appstats.py: [ master, ] Duplicate result
github.com/google/rekall:rekall-core/rekall/plugins/darwin/common.py: [ master, ]
136:         ("StringCheck", dict(needle=b"Catfish \x00\x00"))
chromium.googlesource.com/arc/arc:third_party/chromium-ppapi/tools/android/appstats.py: [ master, ] Duplicate result
github.com/apache/incubator-retired-slider:slider-agent/src/main/python/jinja2/jinja2/parser.py: [ develop, ]
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/chromium-ppapi/third_party/jinja2/parser.py: [ master, ] Duplicate result
android.googlesource.com/platform/tools/idea:python/lib/Lib/asynchat.py: [ master, ]
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]):
github.com/google/dotty:efilter/parsers/common/grammar.py: [ master, ]
162:             needle = tuple((self._normalize_token(t)
164:             result = self._table.get(needle)
166:                 return result, needle
github.com/apache/incubator-retired-slider:slider-agent/src/main/python/jinja2/jinja2/ext.py: [ develop, ]
415:                                          drop_needle=True))
429:                                             drop_needle=True)
chromium.googlesource.com/ios-chromium-mirror:tools/android/appstats.py: [ master, ] Duplicate result
chromium.googlesource.com/chromium/src:tools/android/appstats.py: [ master, ] Duplicate result
android.googlesource.com/platform/superproject:tools/idea/python/lib/Lib/asynchat.py: [ master, ] Duplicate result
github.com/google/rekall:rekall-core/rekall/plugins/windows/malware/cmdhistory.py: [ master, ]
772:                 ("StringCheck", dict(needle=pattern))
895:                 ("StringCheck", dict(needle=pattern))
chromium.googlesource.com/infra/infra/codesearch:luci/appengine/components/components/third_party/jinja2/parser.py: [ master, ]
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/chromium/chromium:third_party/jinja2/parser.py: [ master, ] Duplicate result
chromium.googlesource.com/arc/arc:third_party/tools/depot_tools/git_cache.py: [ master, ]
450:       needle = '%s^^^^{commit}' % revision
452:       needle = '%s^{commit}' % revision
456:       self.RunGit(['cat-file', '-e', needle])
chromium.googlesource.com/dart/dartium/src:third_party/jinja2/parser.py: [ master, ]
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/dart/dartium/src:third_party/mojo/src/mojo/public/third_party/jinja2/parser.py: [ master, ] Duplicate result
chromium.googlesource.com/infra/infra/codesearch:luci/appengine/components/components/third_party/jinja2/ext.py: [ master, ]
430:                                          drop_needle=True))
444:                                             drop_needle=True)
github.com/apache/beam:sdks/python/apache_beam/metrics/metric.py: [ master, ]
139:   def _is_sub_list(needle, haystack):
140:     """True iff `needle` is a sub-list of `haystack` (i.e. a contiguous slice
141:     of `haystack` exactly matches `needle`"""
142:     needle_len = len(needle)
144:     for i in range(0, haystack_len - needle_len + 1):
145:       if haystack[i:i + needle_len] == needle:
github.com/kubernetes/test-infra:gubernator/filters.py: [ master, ]
227: def do_ltrim(s, needle):
228:     if s.startswith(needle):
229:         return s[len(needle):]
github.com/apache/beam:sdks/python/setup.py: [ master, ]
231:     'needle>=0.5.0,<1',
github.com/apache/libcloud:libcloud/common/abiquo.py: [ trunk, ]
88:             needle = '/api/'
90:             index = url_path.find(needle)
91:             result = url_path[index + len(needle) - 1:]
chromium.googlesource.com/chromium/chromium:third_party/jinja2/parser.py: [ trunk, ] Duplicate result
chromium.googlesource.com/dart/dartium/src:third_party/jinja2/ext.py: [ master, ]
430:                                          drop_needle=True))
444:                                             drop_needle=True)
chromium.googlesource.com/dart/dartium/src:third_party/mojo/src/mojo/public/third_party/jinja2/ext.py: [ master, ] Duplicate result
chromium.googlesource.com/ios-chromium-mirror:third_party/jinja2/parser.py: [ master, ] Duplicate result
chromium.googlesource.com/chromium/src:third_party/jinja2/parser.py: [ master, ] Duplicate result
github.com/google/cpython-pt:Tools/stringbench/stringbench.py: [ 3.3, ]
1080:     needle = STR("AACT")
1082:         seq_count(needle)
chromium.googlesource.com/chromium/chromium:third_party/jinja2/ext.py: [ trunk, ] Duplicate result
chromium.googlesource.com/chromium/tools/depot_tools:git_cache.py: [ master, ]
328:       needle = '%s^^^^{commit}' % revision
330:       needle = '%s^{commit}' % revision
334:       self.RunGit(['cat-file', '-e', needle])
chromium.googlesource.com/infra/third_party/docutils:sandbox/py-rest-doc/sphinx/web/markup.py: [ master, ]
107:     def get_data(self, drop_needle=False):
113:                     if not drop_needle:
chromium.googlesource.com/infra/luci/luci-py:appengine/components/components/third_party/jinja2/parser.py: [ master, ] Duplicate result
chromium.googlesource.com/infra/third_party/Jinja2:jinja2/parser.py: [ master, ]
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)
chromium.googlesource.com/infra/luci/luci-py:appengine/components/components/third_party/jinja2/ext.py: [ master, ] Duplicate result
chromium.googlesource.com/chromium/src/third_party:jinja2/parser.py: [ master, ] Duplicate result
android.googlesource.com/platform/external/opencv3:3rdparty/jinja2/parser.py: [ master, ] Duplicate result
chromium.googlesource.com/infra/third_party/Jinja2:jinja2/ext.py: [ master, ] Duplicate result
github.com/google/rekall:rekall-core/rekall/plugins/windows/dumpcerts.py: [ master, ]
64:         ('StringCheck', dict(needle=b"\x30\x82"))
github.com/google/rekall:rekall-core/rekall/plugins/windows/malware/svcscan.py: [ master, ]
323:                 needle=self.profile.get_constant("ServiceTag"))),
343:                 needle=self.profile.get_constant("ServiceTag"))),
android.googlesource.com/platform/superproject:external/python/cpython2/Lib/asynchat.py: [ master, ]
302: # Given 'haystack', see if any prefix of 'needle' is at its end.  This
317: def find_prefix_at_end (haystack, needle):
318:     l = len(needle) - 1
319:     while l and not haystack.endswith(needle[:l]):
chromium.googlesource.com/chromium/deps/python_26:Lib/asynchat.py: [ master, ]
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/chromium/src/testing/libfuzzer:gen_fuzzer_owners.py: [ master, ]
109:     needle = 'Type: '
111:       if needle and not line.startswith(needle):
113:       if needle == 'Type: ':
119:         needle = 'Direct dependencies'
120:       elif needle == 'Direct dependencies':
121:         needle = ''
123:         assert needle == ''
124:         if needle == line:
github.com/google/rekall:rekall-core/rekall/plugins/windows/modules.py: [ master, ]
82:         ("StringCheck", dict(needle=b"RSDS"))
github.com/google/rekall:rekall-core/rekall/plugins/common/sigscan.py: [ master, ]
54:         self.current_needle = 0
57:         if self.current_needle >= len(self.needles):
63:         next_part = self.needles[self.current_needle]
65:             self.current_needle += 1
71:         if self.current_needle >= len(self.needles):
75:         # Search the rest of the buffer for the needle.
77:         next_part = self.needles[self.current_needle]
79:         if self.current_needle:
82:             correction = len(self.needles[self.current_needle - 1])
115:             if self.check.current_needle >= len(self.check.needles):
38:     def __init__(self, needles=None, **kwargs):
42:           needles: A list of strings we search for.
45:           RuntimeError: No needles provided.
50:         if not needles:
51:             raise RuntimeError("No needles provided to search.")
53:         self.needles = needles
93:     def __init__(self, needles=None, **kwargs):
95:         self.needles = needles
99:             needles=self.needles)
187:                 session=self.session, profile=self.profile, needles=sig,
android.googlesource.com/platform/external/opencv3:3rdparty/jinja2/ext.py: [ master, ] Duplicate result
android.googlesource.com/platform/superproject:external/adt-infra/build/third_party/jinja2/jinja2/parser.py: [ master, ] Duplicate result
github.com/apache/tashi:src/tashi/nodemanager/vmcontrol/qemu.py: [ trunk, ]
344: 	def __consumeUntil(self, child, needle, timeout = -1):
349: 		buf = " " * len(needle)
351: 			while (buf[-(len(needle)):] != needle):
353: 				#print "[NEE]: %s" % (needle)
366: 			child.monitorHistory.append(buf[len(needle):])
367: 		return buf[len(needle):]
github.com/google/rekall:rekall-core/rekall/plugins/windows/heap_analysis.py: [ master, ]
415:                 ('StringCheck', dict(needle=addr.obj_vm.getvalue()))
github.com/googlearchive/appengine-flask-skeleton:lib/jinja2/parser.py: [ master, ] Duplicate result
chromium.googlesource.com/android_ndk:prebuilt/linux-x86_64/lib/python2.7/asynchat.py: [ master, ] Duplicate result
github.com/apache/incubator-ambari:ambari-common/src/main/python/jinja2/jinja2/parser.py: [ trunk, ] Duplicate result
github.com/apache/incubator-ambari:ambari-common/src/main/python/jinja2/jinja2/ext.py: [ trunk, ] Duplicate result
github.com/google/coding-with-chrome:third_party/aiyprojects-raspbian/src/examples/vision/object_meter/wordnet_grouping/mapping_data.py: [ master, ]
1092:     "dragonfly/darning needle/devil's darning needle/sewing needle/snake "
android.googlesource.com/platform/superproject:external/adt-infra/build/third_party/jinja2/jinja2/ext.py: [ master, ] Duplicate result
github.com/google/rekall:rekall-core/rekall/plugins/linux/bash.py: [ master, ]
45:         ('StringCheck', dict(needle=b"#")),
android.googlesource.com/platform/external/adt-infra:build/third_party/jinja2/jinja2/parser.py: [ master, ] Duplicate result
github.com/googlearchive/appengine-flask-skeleton:lib/jinja2/ext.py: [ master, ] Duplicate result
github.com/google/google-ctf:third_party/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/asynchat.py: [ master, ]
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/googleapis/artman:artman/tasks/python_grpc_tasks.py: [ master, ]
230:         needle = 'gapic'
239:                 if needle in dirs:
242:         raise RuntimeError('Path %s not found in %s.' % (needle, haystack))
github.com/chromium/codesearch-py:codesearch/language_utils.py: [ master, ]
33: def MatchSymbolSuffix(haystack_string, needle_string):
35: |needle_string|.
56:     needle = CppIdentifierTokens(needle_string)
57:     return haystack[-len(needle):] == needle
61:     """Like MatchSymbolSuffix, but caches preprocessed |needle|.
78:     def __init__(self, needle):
79:         self.needle = CppIdentifierTokens(needle)
82:         return CppIdentifierTokens(haystack)[-len(self.needle):] == self.needle
github.com/google/squires:option_lib.py: [ master, ]
370:   def _GetRegex(self, needle):
377:       needle: the string to search for a regex.
382:     if len(needle) > 1 and needle.startswith('/') and needle.endswith('/'):
383:       return needle.strip('/')
android.googlesource.com/platform/external/adt-infra:build/third_party/jinja2/jinja2/ext.py: [ master, ] Duplicate result
chromium.googlesource.com/chromium/src/testing:libfuzzer/gen_fuzzer_owners.py: [ master, ] Duplicate result
chromium.googlesource.com/chromium/src/ios:PRESUBMIT.py: [ master, ]
22: def IsSubListOf(needle, hay):
23:   """Returns whether there is a slice of |hay| equal to |needle|."""
25:     if line == needle[0]:
26:       if needle == hay[i:i+len(needle)]:
github.com/chromium/vim-codesearch:third_party/codesearch-py/codesearch/language_utils.py: [ master, ] Duplicate result
github.com/google/rekall:rekall-core/rekall/plugins/windows/registry/evtlogs.py: [ master, ]
174:     checks = [('StringCheck', dict(needle=b"LfLe"))]
android.googlesource.com/platform/external/python/cpython2:Lib/asynchat.py: [ master, ] Duplicate result
android.googlesource.com/platform/external/python/cpython3:Lib/asynchat.py: [ master, ]
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]):
github.com/tensorflow/benchmarks:scripts/tf_cnn_benchmarks/allreduce.py: [ master, ]
375:   """Tests if any needle is a substring of haystack.
374: def contains_any(haystack, needles):
379:     needles: list of strings
382:     True if any element of needles is a substring of haystack,
385:   for n in needles:
github.com/html5rocks/updates.html5rocks.com:lib/pygments/lexer.py: [ master, ]
188:     def __init__(self, _root_lexer, _language_lexer, _needle=Other, **options):
191:         self.needle = _needle
199:             if t is self.needle:
chromium.googlesource.com/chromium/dom-distiller:heuristics/distillable/get_screenshots.py: [ master, ]
67: def _parseNative(logs, needle):
72:     needle (str): the string leading the actual JSON.
81:     loc = message.find(needle)
83:       ret = json.loads(message[loc+len(needle):])
github.com/chromium/dom-distiller:heuristics/distillable/get_screenshots.py: [ master, ] Duplicate result
github.com/chromium/chromium:ios/PRESUBMIT.py: [ master, ] Duplicate result
chromium.googlesource.com/chromium/tools/build:third_party/jinja2/jinja2/parser.py: [ master, ] Duplicate result
github.com/google/cpython-pt:Lib/asynchat.py: [ 3.3, ]
302: # Given 'haystack', see if any prefix of 'needle' is at its end.  This
317: def find_prefix_at_end (haystack, needle):
318:     l = len(needle) - 1
319:     while l and not haystack.endswith(needle[:l]):
chromium.googlesource.com/chromium/tools/build:third_party/jinja2/jinja2/ext.py: [ master, ] Duplicate result
chromium.googlesource.com/chromium/src:ios/PRESUBMIT.py: [ master, ] Duplicate result
chromium.googlesource.com/ios-chromium-mirror:ios/PRESUBMIT.py: [ master, ] Duplicate result
android.googlesource.com/platform/superproject:external/python/cpython3/Lib/asynchat.py: [ master, ] Duplicate result
github.com/catapult-project/catapult:third_party/urllib3/urllib3/fields.py: [ master, ]
87:             re.escape(needle) for needle in needles_and_replacements.keys()
80: def _replace_multiple(value, needles_and_replacements):
83:         return needles_and_replacements[match.group(0)]
chromium.googlesource.com/infra/infra:appengine/monorail/third_party/urllib3/fields.py: [ master, ]
86:         r"|".join([re.escape(needle) for needle in needles_and_replacements.keys()])
81: def _replace_multiple(value, needles_and_replacements):
83:         return needles_and_replacements[match.group(0)]
chromium.googlesource.com/catapult:third_party/urllib3/urllib3/fields.py: [ master, ] Duplicate result
chromium.googlesource.com/chromium/src/third_party/jinja2:parser.py: [ master, ] Duplicate result
chromium.googlesource.com/infra/infra/codesearch:luci/client/third_party/urllib3/fields.py: [ master, ] Duplicate result
github.com/google/rekall:rekall-core/rekall/plugins/windows/kdbgscan.py: [ master, ]
38:     checks = [("StringCheck", dict(needle=b"KDBG"))]
github.com/googlefonts/fontelemetry:Lib/fontelemetry/datastructures/color.py: [ master, ]
105:         color_needle = getattr(self, color_name)
106:         return color_needle["hex"]
109:         color_needle = getattr(self, color_name)
110:         return color_needle["rgba"]
113:         color_needle = getattr(self, color_name)
114:         return color_needle["value"]
117:         color_needle = getattr(self, color_name)
118:         color_needle["value"] = str(value)
119:         setattr(self, color_name, color_needle)
android.googlesource.com/platform/superproject:external/deqp/scripts/convert_case_list_to_xml.py: [ master, ]
32: def findAllMatches(haystack, needle):
36: 		ndx = haystack.find(needle, ndx+1)
github.com/google/rekall:rekall-core/rekall/plugins/linux/find_kaslr.py: [ master, ]
50:     checks = [("StringCheck", dict(needle=b"swapper/0\x00"))]
github.com/google/nearby-connections:third_party/depot_tools/git_cache.py: [ master, ]
444:       needle = '%s^^^^{commit}' % revision
446:       needle = '%s^{commit}' % revision
450:       self.RunGit(['cat-file', '-e', needle])
chromium.googlesource.com/infra/luci/luci-py:client/third_party/urllib3/fields.py: [ master, ] Duplicate result
github.com/Jigsaw-Code/outline-metrics:report.py: [ master, ]
122:         def any_start_with(needle: str) -> None:
123:             return any(s.startswith(needle) for s in header)
chromium.googlesource.com/syzygy:syzygy/build/gyp_main.py: [ master, ]
66:   needle = 'output_dir='
68:     if item.startswith(needle):
69:       return item[len(needle):]
github.com/google/syzygy:syzygy/build/gyp_main.py: [ master, ] Duplicate result
github.com/google/hypebot:hypebot/commands/bash_commands.py: [ master, ]
136:     needle = re.compile(multi_word or single_word, re.IGNORECASE)
140:       if needle.search(stalk):
github.com/google/llvm-propeller:lldb/packages/Python/lldbsuite/test/source-manager/TestSourceManager.py: [ plo-dev, ]
51:     def do_display_source_python_api(self, use_color, needle_regex, highlight_source=False):
97:                               needle_regex])
github.com/google/shaka-player-embedded:third_party/jinja2/parser.py: [ master, ] Duplicate result
github.com/apache/ambari:ambari-common/src/main/python/ambari_jinja2/docs/cache_extension.py: [ trunk, ]
36:         # drop the needle (which would always be `endcache` in that case)
37:         body = parser.parse_statements(['name:endcache'], drop_needle=True)
android.googlesource.com/platform/external/python/rsa:rsa/transform.py: [ master, ]
111: def bytes_leading(raw_bytes, needle=b'\x00'):
119:     :param needle:
122:         The number of leading needle bytes.
127:     _byte = needle[0]
github.com/google/shaka-player-embedded:third_party/jinja2/ext.py: [ master, ] Duplicate result
chromium.googlesource.com/infra/luci/client-py:third_party/urllib3/fields.py: [ master, ] Duplicate result
chromium.googlesource.com/arc/arc:third_party/chromium-ppapi/ios/PRESUBMIT.py: [ master, ]
21: def IsSubListOf(needle, hay):
22:   """Returns whether there is a slice of |hay| equal to |needle|."""
24:     if line == needle[0]:
25:       if needle == hay[i:i+len(needle)]:
chromium.googlesource.com/infra/third_party/Jinja2:docs/cache_extension.py: [ master, ]
36:         # drop the needle (which would always be `endcache` in that case)
37:         body = parser.parse_statements(['name:endcache'], drop_needle=True)
chromium.googlesource.com/android_ndk:prebuilt/linux-x86_64/share/gdb/python/gdb/unwinder.py: [ master, ]
86:     for needle in locus.frame_unwinders:
87:         if needle.name == unwinder.name:
chromium.googlesource.com/infra/experimental:everyone_loves_stip/slo_bro/lib/rsa/transform.py: [ master, ]
118: def bytes_leading(raw_bytes, needle=ZERO_BYTE):
126:     :param needle:
129:         The number of leading needle bytes.
133:     _byte = needle[0]
chromium.googlesource.com/infra/experimental:everyone_loves_stip/slo_bro/lib/rsa/rsa/transform.py: [ master, ] Duplicate result
github.com/apache/incubator-ambari:ambari-common/src/main/python/jinja2/docs/cache_extension.py: [ trunk, ] Duplicate result
github.com/catapult-project/catapult:third_party/rsa/rsa/transform.py: [ master, ] Duplicate result
github.com/catapult-project/catapult:third_party/google-endpoints/rsa/transform.py: [ master, ]
120: def bytes_leading(raw_bytes, needle=ZERO_BYTE):
128:     :param needle:
131:         The number of leading needle bytes.
136:     _byte = needle[0]
github.com/catapult-project/catapult:third_party/gsutil/third_party/rsa/rsa/transform.py: [ master, ] Duplicate result
android.googlesource.com/platform/external/deqp:scripts/convert_case_list_to_xml.py: [ master, ] Duplicate result
chromium.googlesource.com/catapult:third_party/rsa/rsa/transform.py: [ master, ] Duplicate result
chromium.googlesource.com/catapult:third_party/google-endpoints/rsa/transform.py: [ master, ] Duplicate result
chromium.googlesource.com/catapult:third_party/gsutil/third_party/rsa/rsa/transform.py: [ master, ] Duplicate result
github.com/GoogleCloudPlatform/training-data-analyst:courses/machine_learning/deepdive2/structured/labs/serving/application/lib/rsa/transform.py: [ master, ] Duplicate result
github.com/GoogleCloudPlatform/training-data-analyst:courses/machine_learning/deepdive2/structured/solutions/serving/application/lib/rsa/transform.py: [ master, ] Duplicate result
android.googlesource.com/platform/superproject:external/python/rsa/rsa/transform.py: [ master, ] Duplicate result
github.com/googleapis/python-pubsub:google/cloud/pubsub_v1/subscriber/_protocol/histogram.py: [ master, ]
69:     def __contains__(self, needle):
70:         """Return True if needle is present in the histogram, False otherwise.
75:         return needle in self._data
chromium.googlesource.com/infra/infra/codesearch:luci/client/third_party/rsa/rsa/transform.py: [ master, ] Duplicate result
github.com/catapult-project/catapult-csm:third_party/gsutil/third_party/rsa/rsa/transform.py: [ master, ] Duplicate result