rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
compare = html_compare | diff = html_diff | def document_compare(expected, compared, whitespace=True): # See if we need to use XML or HTML if not _xmldecl_find.match(expected) and _html_find.search(expected): compare = html_compare else: compare = xml_compare return compare(expected, compared, whitespace) | 005fe03c7ee561cde4832e60e02133555601ae53 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14078/005fe03c7ee561cde4832e60e02133555601ae53/treecompare.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1668,
67,
9877,
12,
3825,
16,
15843,
16,
7983,
33,
5510,
4672,
468,
2164,
309,
732,
1608,
358,
999,
3167,
578,
3982,
309,
486,
389,
2902,
8840,
67,
4720,
18,
1916,
12,
3825,
13,
471,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1668,
67,
9877,
12,
3825,
16,
15843,
16,
7983,
33,
5510,
4672,
468,
2164,
309,
732,
1608,
358,
999,
3167,
578,
3982,
309,
486,
389,
2902,
8840,
67,
4720,
18,
1916,
12,
3825,
13,
471,
... |
os.remove(self.log_file) config.set(prefs.DOWNLOADER_LOG_PATHNAME, self.log_file) | os.remove(self.log_file) config.set(prefs.MOVIES_DIRECTORY, os.path.join(tempfile.tempdir, 'movies-dir'), temporary=True) config.set(prefs.DOWNLOADER_LOG_PATHNAME, self.log_file, temporary=True) | def setUp(self): EventLoopTest.setUp(self) self.url = u'http://pculture.org/feeds_test/unittest-feed-1.rss' self.feed = models.Feed(self.url) downloader.init_controller() downloader.startup_downloader() self.log_file = os.path.join(tempfile.tempdir, 'miro-download-unit-tests') if os.path.exists(self.log_file): os.remove(self.log_file) # start with a fresh log config.set(prefs.DOWNLOADER_LOG_PATHNAME, self.log_file) | 759ecf0427cff4d799d29fcfd98d4ff9c79a7d48 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/759ecf0427cff4d799d29fcfd98d4ff9c79a7d48/downloadertest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
2587,
6452,
4709,
18,
542,
1211,
12,
2890,
13,
365,
18,
718,
273,
582,
11,
2505,
2207,
2436,
29923,
18,
3341,
19,
7848,
87,
67,
3813,
19,
4873,
3813,
17,
7848,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
2587,
6452,
4709,
18,
542,
1211,
12,
2890,
13,
365,
18,
718,
273,
582,
11,
2505,
2207,
2436,
29923,
18,
3341,
19,
7848,
87,
67,
3813,
19,
4873,
3813,
17,
7848,
... |
msg['Reply-To'] = 'Britische Regierung gibt gr\xfcnes Licht f\xfcr Offshore-Windkraftprojekte <a-very-long-address@example.com>' eq(msg.as_string(), """\ Reply-To: Britische Regierung gibt gr\xfcnes Licht f\xfcr Offshore-Windkraftprojekte <a-very-long-address@example.com> | header_string = ('Britische Regierung gibt gr\xfcnes Licht ' 'f\xfcr Offshore-Windkraftprojekte ' '<a-very-long-address@example.com>') msg['Reply-To'] = header_string self.assertRaises(UnicodeEncodeError, msg.as_string) msg = Message() msg['Reply-To'] = Header(header_string, 'utf-8', header_name='Reply-To') eq(msg.as_string(maxheaderlen=78), """\ Reply-To: =?utf-8?q?Britische_Regierung_gibt_gr=C3=BCnes_Licht_f=C3=BCr_Offs?= =?utf-8?q?hore-Windkraftprojekte_=3Ca-very-long-address=40example=2Ecom=3E?= | def test_long_8bit_header_no_charset(self): eq = self.ndiffAssertEqual msg = Message() msg['Reply-To'] = 'Britische Regierung gibt gr\xfcnes Licht f\xfcr Offshore-Windkraftprojekte <a-very-long-address@example.com>' eq(msg.as_string(), """\ | fb8474975d98c0aa63a2bc3f383dfbe0543922ce /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/fb8474975d98c0aa63a2bc3f383dfbe0543922ce/test_email.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5748,
67,
28,
3682,
67,
3374,
67,
2135,
67,
9999,
12,
2890,
4672,
7555,
273,
365,
18,
4880,
3048,
8213,
5812,
1234,
273,
2350,
1435,
1234,
3292,
7817,
17,
774,
3546,
273,
296... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5748,
67,
28,
3682,
67,
3374,
67,
2135,
67,
9999,
12,
2890,
4672,
7555,
273,
365,
18,
4880,
3048,
8213,
5812,
1234,
273,
2350,
1435,
1234,
3292,
7817,
17,
774,
3546,
273,
296... |
debug(" country-code second level domain %s", domain) | _debug(" country-code second level domain %s", domain) | def set_ok_domain(self, cookie, request): if self.is_blocked(cookie.domain): debug(" domain %s is in user block-list", cookie.domain) return False if self.is_not_allowed(cookie.domain): debug(" domain %s is not in user allow-list", cookie.domain) return False if cookie.domain_specified: req_host, erhn = eff_request_host(request) domain = cookie.domain if self.strict_domain and (domain.count(".") >= 2): # XXX This should probably be compared with the Konqueror # (kcookiejar.cpp) and Mozilla implementations, but it's a # losing battle. i = domain.rfind(".") j = domain.rfind(".", 0, i) if j == 0: # domain like .foo.bar tld = domain[i+1:] sld = domain[j+1:i] if sld.lower() in ("co", "ac", "com", "edu", "org", "net", "gov", "mil", "int", "aero", "biz", "cat", "coop", "info", "jobs", "mobi", "museum", "name", "pro", "travel", "eu") and len(tld) == 2: # domain like .co.uk debug(" country-code second level domain %s", domain) return False if domain.startswith("."): undotted_domain = domain[1:] else: undotted_domain = domain embedded_dots = (undotted_domain.find(".") >= 0) if not embedded_dots and domain != ".local": debug(" non-local domain %s contains no embedded dot", domain) return False if cookie.version == 0: if (not erhn.endswith(domain) and (not erhn.startswith(".") and not ("."+erhn).endswith(domain))): debug(" effective request-host %s (even with added " "initial dot) does not end end with %s", erhn, domain) return False if (cookie.version > 0 or (self.strict_ns_domain & self.DomainRFC2965Match)): if not domain_match(erhn, domain): debug(" effective request-host %s does not domain-match " "%s", erhn, domain) return False if (cookie.version > 0 or (self.strict_ns_domain & self.DomainStrictNoDots)): host_prefix = req_host[:-len(domain)] if (host_prefix.find(".") >= 0 and not IPV4_RE.search(req_host)): debug(" host prefix %s for domain %s contains a dot", host_prefix, domain) return False return True | 7fde00696ae6c872310a407df8b8923ab907f247 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/7fde00696ae6c872310a407df8b8923ab907f247/cookielib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
601,
67,
4308,
12,
2890,
16,
3878,
16,
590,
4672,
309,
365,
18,
291,
67,
23156,
12,
8417,
18,
4308,
4672,
1198,
2932,
282,
2461,
738,
87,
353,
316,
729,
1203,
17,
1098,
3113... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
601,
67,
4308,
12,
2890,
16,
3878,
16,
590,
4672,
309,
365,
18,
291,
67,
23156,
12,
8417,
18,
4308,
4672,
1198,
2932,
282,
2461,
738,
87,
353,
316,
729,
1203,
17,
1098,
3113... |
raise Error, "Unpack entry error: %s"%arg | raise Error, "Unpack header error: %s" % (arg,) | def decode(input, output, resonly=0): if type(input) == type(''): input = open(input, 'rb') # Should we also test for FSSpecs or FSRefs? header = input.read(AS_HEADER_LENGTH) try: magic, version, dummy, nentry = struct.unpack(AS_HEADER_FORMAT, header) except ValueError, arg: raise Error, "Unpack header error: %s"%arg if verbose: print 'Magic: 0x%8.8x'%magic print 'Version: 0x%8.8x'%version print 'Entries: %d'%nentry if magic != AS_MAGIC: raise Error, 'Unknown AppleSingle magic number 0x%8.8x'%magic if version != AS_VERSION: raise Error, 'Unknown AppleSingle version number 0x%8.8x'%version if nentry <= 0: raise Error, "AppleSingle file contains no forks" headers = [input.read(AS_ENTRY_LENGTH) for i in range(nentry)] didwork = 0 for hdr in headers: try: id, offset, length = struct.unpack(AS_ENTRY_FORMAT, hdr) except ValueError, arg: raise Error, "Unpack entry error: %s"%arg if verbose: print 'Fork %d, offset %d, length %d'%(id, offset, length) input.seek(offset) if length == 0: data = '' else: data = input.read(length) if len(data) != length: raise Error, 'Short read: expected %d bytes got %d'%(length, len(data)) if id == AS_DATAFORK: if verbose: print ' (data fork)' if not resonly: didwork = 1 fp = open(output, 'wb') fp.write(data) fp.close() elif id == AS_RESOURCEFORK: didwork = 1 if verbose: print ' (resource fork)' if resonly: fp = open(output, 'wb') else: fp = MacOS.openrf(output, 'wb') fp.write(data) fp.close() elif id in AS_IGNORE: if verbose: print ' (ignored)' else: raise Error, 'Unknown fork type %d'%id if not didwork: raise Error, 'No useful forks found' | 3997f58a0c147cee83203ef731e2541c10557335 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3997f58a0c147cee83203ef731e2541c10557335/applesingle.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2495,
12,
2630,
16,
876,
16,
400,
3700,
33,
20,
4672,
309,
618,
12,
2630,
13,
422,
618,
2668,
11,
4672,
810,
273,
1696,
12,
2630,
16,
296,
6731,
6134,
468,
9363,
732,
2546,
1842,
364... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2495,
12,
2630,
16,
876,
16,
400,
3700,
33,
20,
4672,
309,
618,
12,
2630,
13,
422,
618,
2668,
11,
4672,
810,
273,
1696,
12,
2630,
16,
296,
6731,
6134,
468,
9363,
732,
2546,
1842,
364... |
return [(k, Utils.unquote(v)) for k, v in params] | return [(k, _unquotevalue(v)) for k, v in params] | def get_params(self, failobj=None, header='content-type', unquote=1): """Return the message's Content-Type: parameters, as a list. | 1cca6772173993cc35d4ffe65dace9d6254e41ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1cca6772173993cc35d4ffe65dace9d6254e41ea/Message.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2010,
12,
2890,
16,
2321,
2603,
33,
7036,
16,
1446,
2218,
1745,
17,
723,
2187,
25611,
33,
21,
4672,
3536,
990,
326,
883,
1807,
3697,
17,
559,
30,
1472,
16,
487,
279,
666,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2010,
12,
2890,
16,
2321,
2603,
33,
7036,
16,
1446,
2218,
1745,
17,
723,
2187,
25611,
33,
21,
4672,
3536,
990,
326,
883,
1807,
3697,
17,
559,
30,
1472,
16,
487,
279,
666,
18... |
size=wxSize(105, 21), style=0, validator=wxDefaultValidator, | size=wxSize(101, 21), style=0, validator=wxDefaultValidator, | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSize(451, 455)) self.SetAutoLayout(true) self.SetSizeHints(425, 400, -1, -1) self.Center(wxBOTH) EVT_SIZE(self, self.OnStcstyleeditdlgSize) | aac0471ac41eaa175cbaa05604248123746b2b22 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/aac0471ac41eaa175cbaa05604248123746b2b22/STCStyleEditor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
67,
16277,
87,
12,
2890,
16,
846,
496,
4672,
468,
4374,
707,
16,
2727,
1404,
3874,
7075,
6353,
16186,
2738,
972,
12,
2890,
16,
612,
33,
27226,
734,
67,
882,
39,
15066,
10776... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
67,
16277,
87,
12,
2890,
16,
846,
496,
4672,
468,
4374,
707,
16,
2727,
1404,
3874,
7075,
6353,
16186,
2738,
972,
12,
2890,
16,
612,
33,
27226,
734,
67,
882,
39,
15066,
10776... |
self.config['g_series'] = cfile['file_seriesname']+self.graphic_suffix[rel_type]+u'.%(ext)s' | if self.program_seriesid == None: self.config['g_series'] = sanitiseFileName(cfile['file_seriesname'])+self.graphic_suffix[rel_type]+u'.%(ext)s' else: self.config['g_series'] = sanitiseFileName(self.program_seriesid)+self.graphic_suffix[rel_type]+u'.%(ext)s' | def _getTmdbGraphics(self, cfile, graphic_type, watched=False): '''Download either a movie Poster or Fanart return None return full qualified path and filename of downloaded graphic ''' if graphic_type == u'-P': graphic_name = u'poster' key_type = u'coverimage' rel_type = u'coverfile' else: graphic_name = u'fanart' key_type = u'fanart' rel_type = key_type | a2f974416e8001f45614f0ab9552374085d1abd1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/a2f974416e8001f45614f0ab9552374085d1abd1/jamu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
56,
27574,
17558,
12,
2890,
16,
276,
768,
16,
19548,
67,
723,
16,
23135,
33,
8381,
4672,
9163,
7109,
3344,
279,
21360,
5616,
264,
578,
478,
304,
485,
327,
599,
327,
1983,
934... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
56,
27574,
17558,
12,
2890,
16,
276,
768,
16,
19548,
67,
723,
16,
23135,
33,
8381,
4672,
9163,
7109,
3344,
279,
21360,
5616,
264,
578,
478,
304,
485,
327,
599,
327,
1983,
934... |
anchor = kw.pop('_anchor') | anchor = kw['_anchor'] | def route_url(route_name, request, *elements, **kw): """Generates a fully qualified URL for a named BFG route. Use the route's ``name`` as the first positional argument. Use a request object as the second positional argument. Additional positional arguments are appended to the URL as path segments after it is generated. Use keyword arguments to supply values which match any dynamic path elements in the route definition. Raises a KeyError exception if the URL cannot be generated for any reason (not enough arguments, for example). For example, if you've defined a route named "foobar" with the path ``:foo/:bar/*traverse``:: route_url('foobar', request, foo='1') => <KeyError exception> route_url('foobar', request, foo='1', bar='2') => <KeyError exception> route_url('foobar', request, foo='1', bar='2', 'traverse=('a','b')) => http://e.com/1/2/a/b route_url('foobar', request, foo='1', bar='2', 'traverse=('/a/b')) => http://e.com/1/2/a/b Values replacing ``:segment`` arguments can be passed as strings or Unicode objects. They will be encoded to UTF-8 and URL-quoted before being placed into the generated URL. Values replacing ``*remainder`` arguments can be passed as strings *or* tuples of Unicode/string values. If a tuple is passed as a ``*remainder`` replacement value, its values are URL-quoted and encoded to UTF-8. The resulting strings are joined with slashes and rendered into the URL. If a string is passed as a ``*remainder`` replacement value, it is tacked on to the URL untouched. If a keyword argument ``_query`` is present, it will used to compose a query string that will be tacked on to the end of the URL. The value of ``_query`` must be a sequence of two-tuples *or* a data structure with an ``.items()`` method that returns a sequence of two-tuples (presumably a dictionary). This data structure will be turned into a query string per the documentation of ``repoze.url.urlencode`` function. After the query data is turned into a query string, a leading ``?`` is prepended, and the the resulting string is appended to the generated URL. .. note:: Python data structures that are passed as ``_query`` which are sequences or dictionaries are turned into a string under the same rules as when run through urllib.urlencode with the ``doseq`` argument equal to ``True``. This means that sequences can be passed as values, and a k=v pair will be placed into the query string for each value. If a keyword argument ``_anchor`` is present, its string representation will be used as a named anchor in the generated URL (e.g. if ``_anchor`` is passed as ``foo`` and the model URL is ``http://example.com/model/url``, the resulting generated URL will be ``http://example.com/model/url#foo``). .. note:: If ``_anchor`` is passed as a string, it should be UTF-8 encoded. If ``_anchor`` is passed as a Unicode object, it will be converted to UTF-8 before being appended to the URL. The anchor value is not quoted in any way before being appended to the generated URL. If both ``_anchor`` and ``_query`` are specified, the anchor element will always follow the query element, e.g. ``http://example.com?foo=1#bar``. This function raises a ``KeyError`` if the URL cannot be generated due to missing replacement names. Extra replacement names are ignored. """ try: reg = request.registry except AttributeError: reg = get_current_registry() # b/c mapper = reg.getUtility(IRoutesMapper) path = mapper.generate(route_name, kw) # raises KeyError if generate fails anchor = '' qs = '' if '_query' in kw: qs = '?' + urlencode(kw.pop('_query'), doseq=True) if '_anchor' in kw: anchor = kw.pop('_anchor') if isinstance(anchor, unicode): anchor = anchor.encode('utf-8') anchor = '#' + anchor if elements: suffix = _join_elements(elements) if not path.endswith('/'): suffix = '/' + suffix else: suffix = '' return request.application_url + path + suffix + qs + anchor | fb8dd1025309a0bb90e875ead59744f1571d9b92 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14321/fb8dd1025309a0bb90e875ead59744f1571d9b92/url.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1946,
67,
718,
12,
5547,
67,
529,
16,
590,
16,
380,
6274,
16,
2826,
9987,
4672,
3536,
6653,
279,
7418,
9348,
1976,
364,
279,
4141,
605,
42,
43,
1946,
18,
225,
2672,
326,
1946,
1807,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1946,
67,
718,
12,
5547,
67,
529,
16,
590,
16,
380,
6274,
16,
2826,
9987,
4672,
3536,
6653,
279,
7418,
9348,
1976,
364,
279,
4141,
605,
42,
43,
1946,
18,
225,
2672,
326,
1946,
1807,
... |
commands.extend([ [sys.executable, 'bootstrap.py', 'tar-gz'], [sys.executable, 'runtest.py', '--noqmtest', '-p', 'tar-gz', script], ]) | commands.append([sys.executable, 'bootstrap.py', 'tar-gz']) for script in scripts: c = [sys.executable, 'runtest.py', '-p', 'tar-gz', script] commands.append(c) | def script_commands(script): """ Returns a list of the commands to be executed to test the specified TimeSCons script. This involves building SCons (specifically the 'tar-gz' Alias that creates and unpacks a SCons .tar.gz package, in order to have the *.py files compiled to *.pyc) after first removing the build directory, and then actually calling runtest.py to run the timing script. """ commands = [] if os.path.exists('build'): commands.extend([ ['mv', 'build', 'build.OLD'], ['rm', '-rf', 'build.OLD'], ]) commands.extend([ [sys.executable, 'bootstrap.py', 'tar-gz'], # --noqmtest is necessary for the log to contain the # actual scons output (which qmtest normally swallows). [sys.executable, 'runtest.py', '--noqmtest', '-p', 'tar-gz', script], ]) return commands | 60b00b407ca5b7d2fbc1dd84369c440ab2c0b3d1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12817/60b00b407ca5b7d2fbc1dd84369c440ab2c0b3d1/time-scons.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2728,
67,
7847,
12,
4263,
4672,
3536,
2860,
279,
666,
434,
326,
4364,
358,
506,
7120,
358,
1842,
326,
1269,
2647,
55,
9054,
2728,
18,
225,
1220,
29876,
3324,
10504,
20487,
261,
12524,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2728,
67,
7847,
12,
4263,
4672,
3536,
2860,
279,
666,
434,
326,
4364,
358,
506,
7120,
358,
1842,
326,
1269,
2647,
55,
9054,
2728,
18,
225,
1220,
29876,
3324,
10504,
20487,
261,
12524,
12... |
n = len(G.columns()) | n = self.length() n_o = other.length() if F != F_o or n != n_o: return False | def is_permutation_equivalent(self,other,method=None): """ Returns true if self and other are permutation equivalent codes and false otherwise. The method="verbose" option also returns a permutation (if true) sending self to other. Uses Robert Miller's double coset partition refinement work. EXAMPLES: sage: P.<x> = PolynomialRing(GF(2),"x") sage: g = x^3+x+1 sage: C1 = CyclicCodeFromGeneratingPolynomial(7,g); C1 Linear code of length 7, dimension 4 over Finite Field of size 2 sage: C2 = HammingCode(3,GF(2)); C2 Linear code of length 7, dimension 4 over Finite Field of size 2 sage: C1.is_permutation_equivalent(C2) True sage: C1.is_permutation_equivalent(C2,method="verbose") (True, (4,6,5,7)) | 6041d682adcc61b5f736f8dd8f829a980cec3f70 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/6041d682adcc61b5f736f8dd8f829a980cec3f70/linear_code.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
12160,
9245,
67,
14298,
6505,
12,
2890,
16,
3011,
16,
2039,
33,
7036,
4672,
3536,
2860,
638,
309,
365,
471,
1308,
854,
17440,
7680,
6198,
471,
629,
3541,
18,
1021,
707,
1546,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
12160,
9245,
67,
14298,
6505,
12,
2890,
16,
3011,
16,
2039,
33,
7036,
4672,
3536,
2860,
638,
309,
365,
471,
1308,
854,
17440,
7680,
6198,
471,
629,
3541,
18,
1021,
707,
1546,
... |
timeout=1800, wait_interval=0, thread_safe_write=True): | timeout=1800, wait_interval=0, check_interval=0.1, thread_safe_write=True): | def __init__(self, name, max_connections=-1, endpoint=None, timeout=1800, wait_interval=0, thread_safe_write=True): WsgiChannel.__init__(self, name, max_connections, endpoint, timeout, StreamingConnection, wait_interval, check_interval) | ecf9df0df4361f343ab01b0eab2ad5cc6484d1fe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5028/ecf9df0df4361f343ab01b0eab2ad5cc6484d1fe/wsgi_channel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
16,
943,
67,
13313,
29711,
21,
16,
2494,
33,
7036,
16,
2021,
33,
2643,
713,
16,
2529,
67,
6624,
33,
20,
16,
866,
67,
6624,
33,
20,
18,
21,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
16,
943,
67,
13313,
29711,
21,
16,
2494,
33,
7036,
16,
2021,
33,
2643,
713,
16,
2529,
67,
6624,
33,
20,
16,
866,
67,
6624,
33,
20,
18,
21,
16,
... |
raise NotImplementedError, msg | raise ValueError, msg | def UpperMechanicalWord(self, alpha, rho=0, alphabet=None): r""" Returns the upper mechanical word. | d352084048076a1147fa81ffe09ce8981f274743 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/d352084048076a1147fa81ffe09ce8981f274743/word_generators.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29844,
4667,
7472,
1706,
3944,
12,
2890,
16,
4190,
16,
10360,
33,
20,
16,
10877,
33,
7036,
4672,
436,
8395,
2860,
326,
3854,
1791,
7472,
1706,
2076,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29844,
4667,
7472,
1706,
3944,
12,
2890,
16,
4190,
16,
10360,
33,
20,
16,
10877,
33,
7036,
4672,
436,
8395,
2860,
326,
3854,
1791,
7472,
1706,
2076,
18,
2,
-100,
-100,
-100,
-100,
-100,
... |
os.chmod(p, stat.S_IMODE(st.st_mode) | stat.S_IXGRP) | os.chmod(p, stat.S_IMODE(st.st_mode) | stat.S_IWGRP) os.chown(p, -1, gid) | def buildPython(): print "Building a universal python" buildDir = os.path.join(WORKDIR, '_bld', 'python') rootDir = os.path.join(WORKDIR, '_root') if os.path.exists(buildDir): shutil.rmtree(buildDir) if os.path.exists(rootDir): shutil.rmtree(rootDir) os.mkdir(buildDir) os.mkdir(rootDir) os.mkdir(os.path.join(rootDir, 'empty-dir')) curdir = os.getcwd() os.chdir(buildDir) # Not sure if this is still needed, the original build script # claims that parts of the install assume python.exe exists. os.symlink('python', os.path.join(buildDir, 'python.exe')) # Extract the version from the configure file, needed to calculate # several paths. version = getVersion() print "Running configure..." runCommand("%s -C --enable-framework --enable-universalsdk=%s LDFLAGS='-g -L%s/libraries/usr/local/lib' OPT='-g -O3 -I%s/libraries/usr/local/include' 2>&1"%( shellQuote(os.path.join(SRCDIR, 'configure')), shellQuote(SDKPATH), shellQuote(WORKDIR)[1:-1], shellQuote(WORKDIR)[1:-1])) print "Running make" runCommand("make") print "Runing make frameworkinstall" runCommand("make frameworkinstall DESTDIR=%s"%( shellQuote(rootDir))) print "Runing make frameworkinstallextras" runCommand("make frameworkinstallextras DESTDIR=%s"%( shellQuote(rootDir))) print "Copy required shared libraries" if os.path.exists(os.path.join(WORKDIR, 'libraries', 'Library')): runCommand("mv %s/* %s"%( shellQuote(os.path.join( WORKDIR, 'libraries', 'Library', 'Frameworks', 'Python.framework', 'Versions', getVersion(), 'lib')), shellQuote(os.path.join(WORKDIR, '_root', 'Library', 'Frameworks', 'Python.framework', 'Versions', getVersion(), 'lib')))) print "Fix file modes" frmDir = os.path.join(rootDir, 'Library', 'Frameworks', 'Python.framework') for dirpath, dirnames, filenames in os.walk(frmDir): for dn in dirnames: os.chmod(os.path.join(dirpath, dn), 0775) for fn in filenames: if os.path.islink(fn): continue # "chmod g+w $fn" p = os.path.join(dirpath, fn) st = os.stat(p) os.chmod(p, stat.S_IMODE(st.st_mode) | stat.S_IXGRP) # We added some directories to the search path during the configure # phase. Remove those because those directories won't be there on # the end-users system. path =os.path.join(rootDir, 'Library', 'Frameworks', 'Python.framework', 'Versions', version, 'lib', 'python%s'%(version,), 'config', 'Makefile') fp = open(path, 'r') data = fp.read() fp.close() data = data.replace('-L%s/libraries/usr/local/lib'%(WORKDIR,), '') data = data.replace('-I%s/libraries/usr/local/include'%(WORKDIR,), '') fp = open(path, 'w') fp.write(data) fp.close() # Add symlinks in /usr/local/bin, using relative links usr_local_bin = os.path.join(rootDir, 'usr', 'local', 'bin') to_framework = os.path.join('..', '..', '..', 'Library', 'Frameworks', 'Python.framework', 'Versions', version, 'bin') if os.path.exists(usr_local_bin): shutil.rmtree(usr_local_bin) os.makedirs(usr_local_bin) for fn in os.listdir( os.path.join(frmDir, 'Versions', version, 'bin')): os.symlink(os.path.join(to_framework, fn), os.path.join(usr_local_bin, fn)) os.chdir(curdir) | e31d2b6c38a808633a54b26c053bad00dd2f36f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e31d2b6c38a808633a54b26c053bad00dd2f36f8/build-installer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
15774,
13332,
1172,
315,
16713,
279,
26182,
5790,
6,
225,
1361,
1621,
273,
1140,
18,
803,
18,
5701,
12,
10566,
4537,
16,
2070,
70,
1236,
2187,
296,
8103,
6134,
15393,
273,
1140,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
15774,
13332,
1172,
315,
16713,
279,
26182,
5790,
6,
225,
1361,
1621,
273,
1140,
18,
803,
18,
5701,
12,
10566,
4537,
16,
2070,
70,
1236,
2187,
296,
8103,
6134,
15393,
273,
1140,
18... |
if np.all(kpt == 0): | if np.all(kpt_c == 0): | def get_pseudo_wave_function(self, band=0, kpt=0, spin=0, pad=True): kpt = self.get_bz_k_points()[k] state = self.calc.GetElectronicStates().GetState(band=n, spin=s, kptindex=k) | ed3b119242fde527ef14864f200485eb0737101f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1380/ed3b119242fde527ef14864f200485eb0737101f/dacapo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
26023,
67,
17838,
67,
915,
12,
2890,
16,
8937,
33,
20,
16,
417,
337,
33,
20,
16,
12490,
33,
20,
16,
4627,
33,
5510,
4672,
417,
337,
273,
365,
18,
588,
67,
25292,
67,
79,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
26023,
67,
17838,
67,
915,
12,
2890,
16,
8937,
33,
20,
16,
417,
337,
33,
20,
16,
12490,
33,
20,
16,
4627,
33,
5510,
4672,
417,
337,
273,
365,
18,
588,
67,
25292,
67,
79,
... |
for entry in entries: | for entry in entries: | def getSiteList(cp): """ Get the listing of all sites in a BDII. @param cp: Site configuration; see L{query_bdii}. @type cp: ConfigParser @returns: List of site names. """ fp = query_bdii(cp, query="(&(objectClass=GlueTop)" \ "(!(objectClass=GlueSchemaVersion)))") entries = read_ldap(fp) sitenames = [] for entry in entries: dummy, sitename = entry.dn[0].split('=') sitenames.append(sitename) return sitenames | 8d2d51033dfcf70ca9fdc375b2cbdebfafe60516 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12088/8d2d51033dfcf70ca9fdc375b2cbdebfafe60516/gip_ldap.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11021,
682,
12,
4057,
4672,
3536,
968,
326,
11591,
434,
777,
9180,
316,
279,
605,
2565,
45,
18,
225,
632,
891,
3283,
30,
9063,
1664,
31,
2621,
511,
95,
2271,
67,
16410,
2835,
5496,
632... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11021,
682,
12,
4057,
4672,
3536,
968,
326,
11591,
434,
777,
9180,
316,
279,
605,
2565,
45,
18,
225,
632,
891,
3283,
30,
9063,
1664,
31,
2621,
511,
95,
2271,
67,
16410,
2835,
5496,
632... |
self._markItem(path, thing) | self._markItem(path, item) | def doFile(self, path): | 80465791a361db2948891586b0f764f9d02decba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/80465791a361db2948891586b0f764f9d02decba/packagepolicy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
812,
12,
2890,
16,
589,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
812,
12,
2890,
16,
589,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
gLogger.error( "[COMPACT] Cannot delete old records", "Table: %s Timespan: %s Error: %s" % ( table, | self.log.error( "[COMPACT] Cannot delete old records", "Table: %s Timespan: %s Error: %s" % ( table, | def __deleteRecordsOlderThanDataTimespan( self, typeName ): """ IF types define dataTimespan, then records older than datatimespan seconds will be deleted automatically """ dataTimespan = self.dbCatalog[ typeName ][ 'dataTimespan' ] if dataTimespan < 86400 * 30: return for table, field in ( ( self.__getTableName( "type", typeName ), 'endTime' ), ( self.__getTableName( "bucket", typeName ), 'startTime + bucketLength' ) ): gLogger.info( "[COMPACT] Deleting old records for table %s" % table ) sqlCmd = "DELETE FROM `%s` WHERE %s < UNIX_TIMESTAMP()-%d" % ( table, field, dataTimespan ) result = self._update( sqlCmd ) if not result[ 'OK' ]: gLogger.error( "[COMPACT] Cannot delete old records", "Table: %s Timespan: %s Error: %s" % ( table, dataTimespan, result[ 'Message' ] ) ) else: gLogger.info( "[COMPACT] Deleted %d records for %s table" % ( result[ 'Value' ], table ) ) | 2d64cf84778b38287afba61e49dcd158858f1643 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/2d64cf84778b38287afba61e49dcd158858f1643/AccountingDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3733,
6499,
51,
80,
765,
9516,
751,
10694,
7355,
12,
365,
16,
8173,
262,
30,
3536,
11083,
1953,
4426,
501,
10694,
7355,
16,
1508,
3853,
12156,
2353,
1150,
270,
4485,
7355,
3974,
90... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3733,
6499,
51,
80,
765,
9516,
751,
10694,
7355,
12,
365,
16,
8173,
262,
30,
3536,
11083,
1953,
4426,
501,
10694,
7355,
16,
1508,
3853,
12156,
2353,
1150,
270,
4485,
7355,
3974,
90... |
""" | """Handles MDX request | def request(self, cr, uid, name, request, context = {}): | 1dc268e357fe6ce10746aa6f778e8fad1db095de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1dc268e357fe6ce10746aa6f778e8fad1db095de/olap.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
590,
12,
2890,
16,
4422,
16,
4555,
16,
508,
16,
590,
16,
819,
273,
2618,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
590,
12,
2890,
16,
4422,
16,
4555,
16,
508,
16,
590,
16,
819,
273,
2618,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
try: f.writelines("BOINC error: " + error_mask) | try: f.writelines("BOINC error: " + str(error_mask) + "\n") if result.stderr_out: f.writelines("STD ERR: " + result.stderr_out + "\n") f.writelines("For additional information, check: " + "$project/log_$machine/pymw_assimilator.py.log\n") | def _copy_to_output(self, result, error_mask=0): # validate that the destination path still exists if not os.path.exists(self.pymwDir): self.logCritical("PyMW path does not exist or is inaccessible: %s\n", \ self.pymwDir) return resultFullPath = self.get_file_path(result) resultName = re.search('<open_name>(.*)</open_name>',result.xml_doc_in).group(1) | 1a5100056746b46cbdc927611eda6325a6446217 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10777/1a5100056746b46cbdc927611eda6325a6446217/pymw_assimilator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3530,
67,
869,
67,
2844,
12,
2890,
16,
563,
16,
555,
67,
4455,
33,
20,
4672,
468,
1954,
716,
326,
2929,
589,
4859,
1704,
309,
486,
1140,
18,
803,
18,
1808,
12,
2890,
18,
2074,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3530,
67,
869,
67,
2844,
12,
2890,
16,
563,
16,
555,
67,
4455,
33,
20,
4672,
468,
1954,
716,
326,
2929,
589,
4859,
1704,
309,
486,
1140,
18,
803,
18,
1808,
12,
2890,
18,
2074,
... |
if matchobj.group(1) != "": | if module != "": | def process_set_commands(matchobj): spaces = matchobj.group(1) module = matchobj.group(2) commands = matchobj.group(3) command_lines = re.split('\n', commands) result = [] for line in command_lines: temp = re.sub(r'#.*', "", line) result.append(re.sub(r'^\s*()(\w+)\s+(.*)($|#.*)', process_set_command, temp)) if matchobj.group(1) != "": x = 'PsiMod.set_default_options_for_module("%s")' % (module.upper()) result.insert(0, x) result.insert(1, 'PsiMod.set_option("NO_INPUT", True)') set_commands = spaces set_commands += spaces.join(result) return set_commands | 869406cf37b058318c48ead21ceec351eb2509d4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2781/869406cf37b058318c48ead21ceec351eb2509d4/input.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
542,
67,
7847,
12,
1916,
2603,
4672,
7292,
273,
845,
2603,
18,
1655,
12,
21,
13,
1605,
273,
845,
2603,
18,
1655,
12,
22,
13,
4364,
273,
845,
2603,
18,
1655,
12,
23,
13,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
542,
67,
7847,
12,
1916,
2603,
4672,
7292,
273,
845,
2603,
18,
1655,
12,
21,
13,
1605,
273,
845,
2603,
18,
1655,
12,
22,
13,
4364,
273,
845,
2603,
18,
1655,
12,
23,
13,
1... |
return (bv.grid) | kpts = (bv.grid) | def get_kpts(self): 'return the kpt grid, not the kpts' nc = netCDF(self.nc,'r') | 6b1067b8fa99385806ec1802b588c03a312a7024 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5735/6b1067b8fa99385806ec1802b588c03a312a7024/jacapo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
79,
1092,
12,
2890,
4672,
296,
2463,
326,
417,
337,
3068,
16,
486,
326,
417,
1092,
11,
8194,
273,
2901,
39,
4577,
12,
2890,
18,
14202,
11189,
86,
6134,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
79,
1092,
12,
2890,
4672,
296,
2463,
326,
417,
337,
3068,
16,
486,
326,
417,
1092,
11,
8194,
273,
2901,
39,
4577,
12,
2890,
18,
14202,
11189,
86,
6134,
2,
-100,
-100,
-100,
... |
audit = Auditor() | def process_form(self): form = self.context.REQUEST.form result = {} result['form'] = form | 0e43aed24390bde68ec7f192c8dd09716848e90f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6252/0e43aed24390bde68ec7f192c8dd09716848e90f/create_users_from_csv.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
687,
12,
2890,
4672,
646,
273,
365,
18,
2472,
18,
5519,
18,
687,
563,
273,
2618,
563,
3292,
687,
3546,
273,
646,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
687,
12,
2890,
4672,
646,
273,
365,
18,
2472,
18,
5519,
18,
687,
563,
273,
2618,
563,
3292,
687,
3546,
273,
646,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
osname = os.name src = __import__(osname) dst = self.copy_only(src, self.ok_posix_names) dst.environ = e = {} for key, value in os.environ.items(): e[key] = value | osname = os.name src = __import__(osname) dst = self.copy_only(src, self.ok_posix_names) dst.environ = e = {} for key, value in os.environ.items(): e[key] = value | def make_osname(self): | ca6ae39a786f3d7535cba0f2aef10692eb750051 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/ca6ae39a786f3d7535cba0f2aef10692eb750051/rexec.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
538,
529,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
538,
529,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
self.__buttonUp(0) | def scrollTo(self, index, centered=0): """ scrolls list so selected index is at top, or centered in box""" assert self.notify.debugStateCall(self) #print "scrollTo[", index,"] called, len(self[items])=", len(self["items"])," self[numItemsVisible]=", self["numItemsVisible"] try: self["numItemsVisible"] except: # RAU hack to kill 27633 self.notify.info('crash 27633 fixed!') return | 65e016c551594bdcdb1226b6862c1919e169e55c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7242/65e016c551594bdcdb1226b6862c1919e169e55c/DirectScrolledList.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5532,
774,
12,
2890,
16,
770,
16,
25340,
33,
20,
4672,
3536,
5532,
87,
666,
1427,
3170,
770,
353,
622,
1760,
16,
578,
25340,
316,
3919,
8395,
1815,
365,
18,
12336,
18,
4148,
1119,
1477... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5532,
774,
12,
2890,
16,
770,
16,
25340,
33,
20,
4672,
3536,
5532,
87,
666,
1427,
3170,
770,
353,
622,
1760,
16,
578,
25340,
316,
3919,
8395,
1815,
365,
18,
12336,
18,
4148,
1119,
1477... | |
email = wikiutil.clean_input(form.get('email', [theuser.email])[0]) theuser.email = email.strip() | new_email = wikiutil.clean_input(form.get('email', [request.user.email])[0]) new_email = new_email.strip() | def _save_user_prefs(self): _ = self._ form = self.request.form | 39ee40a7a56d6232a4f77e637d8fe0ae20d800f5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/39ee40a7a56d6232a4f77e637d8fe0ae20d800f5/prefs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5688,
67,
1355,
67,
1484,
2556,
12,
2890,
4672,
389,
273,
365,
6315,
646,
273,
365,
18,
2293,
18,
687,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5688,
67,
1355,
67,
1484,
2556,
12,
2890,
4672,
389,
273,
365,
6315,
646,
273,
365,
18,
2293,
18,
687,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
def flimage_scale(p1, p2, p3, p4): """ flimage_scale(p1, p2, p3, p4) -> num. """ retval = _flimage_scale(p1, p2, p3, p4) | def flimage_scale(pImage, p2, p3, p4): """ flimage_scale(pImage, p2, p3, p4) -> num. """ retval = _flimage_scale(pImage, p2, p3, p4) | def flimage_scale(p1, p2, p3, p4): """ flimage_scale(p1, p2, p3, p4) -> num. """ retval = _flimage_scale(p1, p2, p3, p4) return retval | 8765c710f695de392f6fc7c664c746ec98668b1d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/8765c710f695de392f6fc7c664c746ec98668b1d/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
2730,
67,
5864,
12,
84,
2040,
16,
293,
22,
16,
293,
23,
16,
293,
24,
4672,
3536,
1183,
2730,
67,
5864,
12,
84,
2040,
16,
293,
22,
16,
293,
23,
16,
293,
24,
13,
317,
818,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
2730,
67,
5864,
12,
84,
2040,
16,
293,
22,
16,
293,
23,
16,
293,
24,
4672,
3536,
1183,
2730,
67,
5864,
12,
84,
2040,
16,
293,
22,
16,
293,
23,
16,
293,
24,
13,
317,
818,
18... |
query = searchwords.lower() | query = searchwords.lower() | def package(self, searchon='both', release=0, operator='AND', searchwords=''): '''Searches for packages | 7d72df3063deb48a7e54f1cefdfd7fa35df960e0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9953/7d72df3063deb48a7e54f1cefdfd7fa35df960e0/search.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2181,
12,
2890,
16,
1623,
265,
2218,
18237,
2187,
3992,
33,
20,
16,
3726,
2218,
4307,
2187,
1623,
3753,
2218,
11,
4672,
9163,
16294,
364,
5907,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2181,
12,
2890,
16,
1623,
265,
2218,
18237,
2187,
3992,
33,
20,
16,
3726,
2218,
4307,
2187,
1623,
3753,
2218,
11,
4672,
9163,
16294,
364,
5907,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
for plgin in plugins: if plgin['state'] and not plgin['error']: plgin['instance'] = plgin['class']() plgin['instance'].activate(plugin_api) | for plugin in plugins: if plugin['state'] and not plugin['error'] and not plugin['active']: plugin['instance'] = plugin['class']() plugin['instance'].activate(plugin_api) plugin['active'] = True | def activatePlugins(self, plugins, plugin_api): for plgin in plugins: if plgin['state'] and not plgin['error']: plgin['instance'] = plgin['class']() plgin['instance'].activate(plugin_api) | 2f8fb3f48b0ea3d7219b92c9a491d9debc06825f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7036/2f8fb3f48b0ea3d7219b92c9a491d9debc06825f/engine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10235,
9461,
12,
2890,
16,
4799,
16,
1909,
67,
2425,
4672,
364,
1909,
316,
4799,
30,
309,
1909,
3292,
2019,
3546,
471,
486,
1909,
3292,
1636,
3546,
471,
486,
1909,
3292,
3535,
3546,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10235,
9461,
12,
2890,
16,
4799,
16,
1909,
67,
2425,
4672,
364,
1909,
316,
4799,
30,
309,
1909,
3292,
2019,
3546,
471,
486,
1909,
3292,
1636,
3546,
471,
486,
1909,
3292,
3535,
3546,
30,
... |
'results_count': 200, | 'results_count': results_count, | def index(request): if request.GET: method = request.GET.get('method') method = 'phone' if method == 'phone' else 'email' try: page = int(request.GET.get('page')) except: page = 1 # Examples of initial / surname splitting # William Bloggs is W, Bloggs # Bloggs is , Bloggs # W Bloggs is W, Bloggs # Bloggs W is W, Bloggs # Bloggs William is B, William parts = request.GET.get('q', '').split(' ')[:2] if len(parts) == 1: surname, initial = parts[0], None elif parts[0].endswith(','): surname, initial = parts[0][:-1], parts[1][:1] elif len(parts[1]) == 1: surname, initial = parts[0], parts[1] else: surname, initial = parts[1], parts[0][:1] people, page_count, results_count = contact_search(surname, initial, True, method, page) context = { 'people': people, 'page': page, 'page_count': page_count, 'results_count': 200, #results_count, 'more_pages': page != page_count, 'pages': range(1, page_count+1), 'query': request.GET.get('q', ''), 'method': method, } else: context = { 'people': None, 'method': 'email' } if 'format' in request.GET and request.GET['format'] == 'json': json = simplejson.dumps(context) response = HttpResponse( json, mimetype='application/json' ) response['X-JSON'] = json response['ETag'] = hashlib.sha224(json).hexdigest() return response else: return mobile_render(request, context, 'contact/index') | eecb4afd0f56f18e37b431f6c5fc17e694dafb69 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14173/eecb4afd0f56f18e37b431f6c5fc17e694dafb69/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
12,
2293,
4672,
309,
590,
18,
3264,
30,
707,
273,
590,
18,
3264,
18,
588,
2668,
2039,
6134,
707,
273,
296,
10540,
11,
309,
707,
422,
296,
10540,
11,
469,
296,
3652,
11,
775,
30,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
12,
2293,
4672,
309,
590,
18,
3264,
30,
707,
273,
590,
18,
3264,
18,
588,
2668,
2039,
6134,
707,
273,
296,
10540,
11,
309,
707,
422,
296,
10540,
11,
469,
296,
3652,
11,
775,
30,... |
def rhs(t, (f_and_c, adv_rho)): from hedge.mesh import TAG_ALL, TAG_NONE from hedge.operators import StrongAdvectionOperator advop = StrongAdvectionOperator( discr, v=-cloud.velocities()[0], inflow_tag=TAG_ALL, outflow_tag=TAG_NONE, flux_type="central") if True: vis_timer.start() visf = vis.make_file("pic-%04d" % substep[0]) substep[0] += 1 raw_vel = cloud.raw_velocities() rho_rhs = cloud.pic_algorithm.get_debug_quantity_on_mesh("rhs", raw_vel) rho_local_div = cloud.pic_algorithm.get_debug_quantity_on_mesh("local_div", raw_vel) rho_fluxes = cloud.pic_algorithm.get_debug_quantity_on_mesh("fluxes", raw_vel) rho_minv_fluxes = -cloud.pic_algorithm.get_debug_quantity_on_mesh("minv_fluxes", raw_vel) rho = cloud.reconstruct_rho() rho_adv_rhs = advop.rhs(t, rho) rho_adv_local_div = dot(-cloud.velocities()[0], discr.nabla*rho) rho_adv_fluxes = advop.flux * rho rho_adv_minv_fluxes = -discr.inverse_mass_operator * rho_adv_fluxes cloud.add_to_vis(vis, visf, time=t, step=step) vis.add_data(visf, [ ("divD", max_op.epsilon*div_op(f_and_c.e)), ("e", f_and_c.e), ("h", f_and_c.h), ("rho", rho), ("rho_rhs", rho_rhs), ("rho_local_div", rho_local_div), ("rho_fluxes", rho_fluxes), ("rho_minv_fluxes", rho_minv_fluxes), ("rho_adv_rhs", rho_adv_rhs), ("rho_adv_local_div", rho_adv_local_div), ("rho_adv_fluxes", rho_adv_fluxes), ("rho_adv_minv_fluxes", rho_adv_minv_fluxes), ("j", cloud.reconstruct_j()), ("err_rhs", rho_rhs-rho_adv_rhs), ("err_local_div", rho_local_div-rho_adv_local_div), ("err_fluxes", rho_fluxes-rho_adv_fluxes), ("err_minv_fluxes", rho_minv_fluxes-rho_adv_minv_fluxes), ], | if True: vis_timer.start() visf = vis.make_file("pic-%04d" % step) vis.add_data(visf, [ ("divD", max_op.epsilon*div_op(fields.e)), ("e", fields.e), ("h", fields.h), ("rho", cloud.reconstruct_rho()), ("j", cloud.reconstruct_j()), ], | def rhs(t, (f_and_c, adv_rho)): from hedge.mesh import TAG_ALL, TAG_NONE from hedge.operators import StrongAdvectionOperator advop = StrongAdvectionOperator( discr, v=-cloud.velocities()[0], inflow_tag=TAG_ALL, outflow_tag=TAG_NONE, flux_type="central") | 3b8516963de31ecf967dd3d1b6a8e28c1dada331 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12869/3b8516963de31ecf967dd3d1b6a8e28c1dada331/with-charge.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7711,
12,
88,
16,
261,
74,
67,
464,
67,
71,
16,
17825,
67,
25603,
3719,
30,
628,
366,
7126,
18,
15557,
1930,
8358,
67,
4685,
16,
8358,
67,
9826,
628,
366,
7126,
18,
30659,
1930,
3978... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7711,
12,
88,
16,
261,
74,
67,
464,
67,
71,
16,
17825,
67,
25603,
3719,
30,
628,
366,
7126,
18,
15557,
1930,
8358,
67,
4685,
16,
8358,
67,
9826,
628,
366,
7126,
18,
30659,
1930,
3978... |
checklistDB=fu_utils.followupdqdb(False) | checklistDB=fu_utils.followupdqdb(True) | def getFileMatchingTrigger(jobname,string_id): if os.access(jobname,os.F_OK): filesInDir = os.listdir(jobname) for paramFile in filesInDir: if fnmatch.fnmatch(paramFile, "*"+string_id+"*.html"): return "../"+jobname+"/"+paramFile return False else: return False | 961458904bc17bab99c1c31b4eb43e799604e058 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/961458904bc17bab99c1c31b4eb43e799604e058/makeCheckList.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6034,
9517,
6518,
12,
4688,
529,
16,
1080,
67,
350,
4672,
309,
1140,
18,
3860,
12,
4688,
529,
16,
538,
18,
42,
67,
3141,
4672,
1390,
382,
1621,
273,
1140,
18,
1098,
1214,
12,
4688,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6034,
9517,
6518,
12,
4688,
529,
16,
1080,
67,
350,
4672,
309,
1140,
18,
3860,
12,
4688,
529,
16,
538,
18,
42,
67,
3141,
4672,
1390,
382,
1621,
273,
1140,
18,
1098,
1214,
12,
4688,
5... |
mt = getToolByName(self, 'portal_membership') if type(ids) is str: | if isinstance(ids, basestring): | def manage_delObjects(self, ids=[], REQUEST=None): """We need to enforce security.""" mt = getToolByName(self, 'portal_membership') if type(ids) is str: ids = [ids] for id in ids: item = self._getOb(id) if not mt.checkPermission(permissions.DeleteObjects, item): raise Unauthorized, ( "Do not have permissions to remove this object") return PortalFolder.manage_delObjects(self, ids, REQUEST=REQUEST) | 66c5dddacddf9443a81957c8f837a431ea994e66 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/66c5dddacddf9443a81957c8f837a431ea994e66/BaseFolder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
67,
3771,
4710,
12,
2890,
16,
3258,
22850,
6487,
12492,
33,
7036,
4672,
3536,
3218,
1608,
358,
12980,
4373,
12123,
309,
1549,
12,
2232,
16,
10699,
4672,
3258,
273,
306,
2232,
65,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
67,
3771,
4710,
12,
2890,
16,
3258,
22850,
6487,
12492,
33,
7036,
4672,
3536,
3218,
1608,
358,
12980,
4373,
12123,
309,
1549,
12,
2232,
16,
10699,
4672,
3258,
273,
306,
2232,
65,
... |
self.tries = 0 self.maxtries = 10 | def __init__(self, *args): apply(urllib.FancyURLopener.__init__, (self,) + args) self.errcode = 200 self.tries = 0 self.maxtries = 10 | 4ec165009050f243b6867bb901e9677b3b4b9284 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/4ec165009050f243b6867bb901e9677b3b4b9284/robotparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
2230,
12,
718,
2941,
18,
42,
12514,
1785,
25098,
16186,
2738,
972,
16,
261,
2890,
16,
13,
397,
833,
13,
365,
18,
25093,
273,
4044,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
2230,
12,
718,
2941,
18,
42,
12514,
1785,
25098,
16186,
2738,
972,
16,
261,
2890,
16,
13,
397,
833,
13,
365,
18,
25093,
273,
4044,
365,
... | |
col = gtk.TreeViewColumn ("Name", ren, markup=1) | col = gtk.TreeViewColumn ("Description", ren, markup=1) | def make_model(self, uris, treeview): | da22572c1268bc846e6b2d0007e2a009e6f0e186 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8416/da22572c1268bc846e6b2d0007e2a009e6f0e186/awnClass.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
2284,
12,
2890,
16,
21476,
16,
2151,
1945,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
2284,
12,
2890,
16,
21476,
16,
2151,
1945,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
files = [] for lookPat, lookPath in self.files[d]: found = False if not lookPath: for pat, path in deps[d]: if pat == lookPat: files += [ (lookPat, path) ] found = True break if not found: files += [ (lookPat, lookPath) ] self.files[d] = files | if d in self.files: files = [] for lookPat, lookPath in self.files[d]: found = False if not lookPath: for pat, path in deps[d]: if pat == lookPat: files += [ (lookPat, path) ] found = True break if not found: files += [ (lookPat, lookPath) ] self.files[d] = files | def populate(self, buildDeps = {}): if self.name in buildDeps: deps = buildDeps[self.name].files for d in deps: files = [] for lookPat, lookPath in self.files[d]: found = False if not lookPath: for pat, path in deps[d]: if pat == lookPat: files += [ (lookPat, path) ] found = True break if not found: files += [ (lookPat, lookPath) ] self.files[d] = files | a32fd692dd1e30de835cd0c6d09d9bec8f3ccf92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1360/a32fd692dd1e30de835cd0c6d09d9bec8f3ccf92/dws.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6490,
12,
2890,
16,
1361,
14430,
273,
2618,
4672,
309,
365,
18,
529,
316,
1361,
14430,
30,
8740,
273,
1361,
14430,
63,
2890,
18,
529,
8009,
2354,
364,
302,
316,
8740,
30,
1390,
273,
53... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6490,
12,
2890,
16,
1361,
14430,
273,
2618,
4672,
309,
365,
18,
529,
316,
1361,
14430,
30,
8740,
273,
1361,
14430,
63,
2890,
18,
529,
8009,
2354,
364,
302,
316,
8740,
30,
1390,
273,
53... |
log.debug('MATCH') | if DEBUG: log.debug('MATCH') | def adjustPriority(self, favname, mod=0): save = [] mod = int(mod) (status, me) = getFavorite(favname) oldprio = int(me.priority) newprio = oldprio + mod log.debug('ap: mod=%s\n' % mod) sr = self.getScheduledRecordings() favs = sr.getFavorites().values() sys.stderr.write('adjusting prio of '+favname+'\n') for fav in favs: fav.priority = int(fav.priority) if fav.name == me.name: log.debug('MATCH') fav.priority = newprio log.debug('moved prio of %s: %s => %s\n' % (fav.name, oldprio, newprio)) continue if mod < 0: if fav.priority < newprio or fav.priority > oldprio: log.debug('fp: %s, old: %s, new: %s\n' % (fav.priority, oldprio, newprio)) log.debug('skipping: %s\n' % fav.name) continue fav.priority = fav.priority + 1 log.debug('moved prio of %s: %s => %s\n' % (fav.name, fav.priority-1, fav.priority)) if mod > 0: if fav.priority > newprio or fav.priority < oldprio: log.debug('skipping: %s\n' % fav.name) continue fav.priority = fav.priority - 1 log.debug('moved prio of %s: %s => %s\n' % (fav.name, fav.priority+1, fav.priority)) sr.setFavoritesList(favs) self.saveScheduledRecordings(sr) | f5737db8bd118592997fea5a5e16fdbead535f3a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/f5737db8bd118592997fea5a5e16fdbead535f3a/recordserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5765,
8183,
12,
2890,
16,
18180,
529,
16,
681,
33,
20,
4672,
1923,
273,
5378,
681,
273,
509,
12,
1711,
13,
261,
2327,
16,
1791,
13,
273,
2812,
9444,
1137,
12,
19731,
529,
13,
1592,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5765,
8183,
12,
2890,
16,
18180,
529,
16,
681,
33,
20,
4672,
1923,
273,
5378,
681,
273,
509,
12,
1711,
13,
261,
2327,
16,
1791,
13,
273,
2812,
9444,
1137,
12,
19731,
529,
13,
1592,
2... |
frameCustom=Frame(frame,borderwidth=2,relief=GROOVE) frameKeySets=Frame(frame,borderwidth=2,relief=GROOVE) | frameCustom=LabelFrame(frame,borderwidth=2,relief=GROOVE, text=' Custom Key Bindings ') frameKeySets=LabelFrame(frame,borderwidth=2,relief=GROOVE, text=' Key Set ') | def CreatePageKeys(self): #tkVars self.bindingTarget=StringVar(self) self.builtinKeys=StringVar(self) self.customKeys=StringVar(self) self.keysAreBuiltin=BooleanVar(self) self.keyBinding=StringVar(self) ##widget creation #body frame frame=self.tabPages.pages['Keys']['page'] #body section frames frameCustom=Frame(frame,borderwidth=2,relief=GROOVE) frameKeySets=Frame(frame,borderwidth=2,relief=GROOVE) #frameCustom frameTarget=Frame(frameCustom) labelCustomTitle=Label(frameCustom,text='Set Custom Key Bindings') labelTargetTitle=Label(frameTarget,text='Action - Key(s)') scrollTargetY=Scrollbar(frameTarget) scrollTargetX=Scrollbar(frameTarget,orient=HORIZONTAL) self.listBindings=Listbox(frameTarget,takefocus=FALSE, exportselection=FALSE) self.listBindings.bind('<ButtonRelease-1>',self.KeyBindingSelected) scrollTargetY.config(command=self.listBindings.yview) scrollTargetX.config(command=self.listBindings.xview) self.listBindings.config(yscrollcommand=scrollTargetY.set) self.listBindings.config(xscrollcommand=scrollTargetX.set) self.buttonNewKeys=Button(frameCustom,text='Get New Keys for Selection', command=self.GetNewKeys,state=DISABLED) buttonSaveCustomKeys=Button(frameCustom, text='Save as New Custom Key Set',command=self.SaveAsNewKeySet) #frameKeySets labelKeysTitle=Label(frameKeySets,text='Select a Key Set') labelTypeTitle=Label(frameKeySets,text='Select : ') self.radioKeysBuiltin=Radiobutton(frameKeySets,variable=self.keysAreBuiltin, value=1,command=self.SetKeysType,text='a Built-in Key Set') self.radioKeysCustom=Radiobutton(frameKeySets,variable=self.keysAreBuiltin, value=0,command=self.SetKeysType,text='a Custom Key Set') self.optMenuKeysBuiltin=DynOptionMenu(frameKeySets, self.builtinKeys,None,command=None) self.optMenuKeysCustom=DynOptionMenu(frameKeySets, self.customKeys,None,command=None) self.buttonDeleteCustomKeys=Button(frameKeySets,text='Delete Custom Key Set', command=self.DeleteCustomKeys) ##widget packing #body frameCustom.pack(side=LEFT,padx=5,pady=5,expand=TRUE,fill=BOTH) frameKeySets.pack(side=LEFT,padx=5,pady=5,fill=Y) #frameCustom labelCustomTitle.pack(side=TOP,anchor=W,padx=5,pady=5) buttonSaveCustomKeys.pack(side=BOTTOM,fill=X,padx=5,pady=5) self.buttonNewKeys.pack(side=BOTTOM,fill=X,padx=5,pady=5) frameTarget.pack(side=LEFT,padx=5,pady=5,expand=TRUE,fill=BOTH) #frame target frameTarget.columnconfigure(0,weight=1) frameTarget.rowconfigure(1,weight=1) labelTargetTitle.grid(row=0,column=0,columnspan=2,sticky=W) self.listBindings.grid(row=1,column=0,sticky=NSEW) scrollTargetY.grid(row=1,column=1,sticky=NS) scrollTargetX.grid(row=2,column=0,sticky=EW) #frameKeySets labelKeysTitle.pack(side=TOP,anchor=W,padx=5,pady=5) labelTypeTitle.pack(side=TOP,anchor=W,padx=5,pady=5) self.radioKeysBuiltin.pack(side=TOP,anchor=W,padx=5) self.radioKeysCustom.pack(side=TOP,anchor=W,padx=5,pady=2) self.optMenuKeysBuiltin.pack(side=TOP,fill=X,padx=5,pady=5) self.optMenuKeysCustom.pack(side=TOP,fill=X,anchor=W,padx=5,pady=5) self.buttonDeleteCustomKeys.pack(side=TOP,fill=X,padx=5,pady=5) return frame | ed15565253c2cb817c68ed89e22c7a6c7707ab66 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/ed15565253c2cb817c68ed89e22c7a6c7707ab66/configDialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1788,
1964,
2396,
12,
2890,
4672,
468,
16099,
5555,
365,
18,
7374,
2326,
33,
780,
1537,
12,
2890,
13,
365,
18,
24553,
2396,
33,
780,
1537,
12,
2890,
13,
365,
18,
3662,
2396,
33,
780,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1788,
1964,
2396,
12,
2890,
4672,
468,
16099,
5555,
365,
18,
7374,
2326,
33,
780,
1537,
12,
2890,
13,
365,
18,
24553,
2396,
33,
780,
1537,
12,
2890,
13,
365,
18,
3662,
2396,
33,
780,
... |
return self._transform.config[key] | value = self._config[key] type = self.get_parameter_infos(key)[0] if type == 'dict': result = {} for key, val in value.items(): result[key] = val elif type == 'list': result = list(value) else: result = value return result security.declareProtected(CMFCorePermissions.ManagePortal, 'get_parameter_infos') def get_parameter_infos(self, key): """ get informations about a parameter return a tuple (type, label [, type specific data]) where type in string, int, list, dict """ try: return tuple(self._config_metadata[key]) except KeyError: return 'string', '' | def get_parameter_value(self, key): """ get value of a transform's parameter """ return self._transform.config[key] | 16e5508e84a72728e6a992c662c869a875011862 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/16e5508e84a72728e6a992c662c869a875011862/TransformTool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
6775,
67,
1132,
12,
2890,
16,
498,
4672,
3536,
336,
460,
434,
279,
2510,
1807,
1569,
3536,
327,
365,
6315,
6547,
18,
1425,
63,
856,
65,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
6775,
67,
1132,
12,
2890,
16,
498,
4672,
3536,
336,
460,
434,
279,
2510,
1807,
1569,
3536,
327,
365,
6315,
6547,
18,
1425,
63,
856,
65,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def upload_xml_doc(file_path, host): try: errors = RFDocUploader().upload(file_path, host) except Exception, err: errors = [str(err)] if errors: raise DataError('Failed to upload library:\n%s' % '\n'.join(errors)) | def create_xml_doc(lib, outpath): if _uploading(outpath): upload = outpath outpath = '/tmp/upload.xml' # TODO use temp file module else: upload = None _create_xml_doc(lib, outpath) if upload: upload_xml_doc(outpath, upload) os.remove(outpath) | 8bb6da62811da17103eba10dd3d582480996c875 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6988/8bb6da62811da17103eba10dd3d582480996c875/libdoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
2902,
67,
2434,
12,
2941,
16,
596,
803,
4672,
309,
389,
6327,
310,
12,
659,
803,
4672,
3617,
273,
596,
803,
596,
803,
273,
1173,
5645,
19,
6327,
18,
2902,
11,
468,
2660,
999... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
2902,
67,
2434,
12,
2941,
16,
596,
803,
4672,
309,
389,
6327,
310,
12,
659,
803,
4672,
3617,
273,
596,
803,
596,
803,
273,
1173,
5645,
19,
6327,
18,
2902,
11,
468,
2660,
999... | |
task = self.req.get_task(tid) if task: task.delete() else: print "trying to delete task already deleted" | task = self.req.delete_task(tid) | def on_delete_confirm(self, widget): """if we pass a tid as a parameter, we delete directly otherwise, we will look which tid is selected""" for tid in self.tids_todelete: task = self.req.get_task(tid) if task: task.delete() else: print "trying to delete task already deleted" self.tids_todelete = [] | d968784f3250143537a8403a7f3b5540eccf5d58 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/d968784f3250143537a8403a7f3b5540eccf5d58/delete_dialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
3733,
67,
10927,
12,
2890,
16,
3604,
4672,
3536,
430,
732,
1342,
279,
11594,
487,
279,
1569,
16,
732,
1430,
5122,
3541,
16,
732,
903,
2324,
1492,
11594,
353,
3170,
8395,
364,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
3733,
67,
10927,
12,
2890,
16,
3604,
4672,
3536,
430,
732,
1342,
279,
11594,
487,
279,
1569,
16,
732,
1430,
5122,
3541,
16,
732,
903,
2324,
1492,
11594,
353,
3170,
8395,
364,
... |
show(fmodels, selection, " START:") assert params.number_of_refinement_cycles > params.stop_reset_occupancies_at_macro_cycle assert params.number_of_refinement_cycles > params.stop_reset_adp_at_macro_cycle assert params.number_of_refinement_cycles > params.start_filtering_at_macro_cycle for i in xrange(params.number_of_refinement_cycles): if(params.refine in ["occupancies", "occupancies_and_adp"]): refinery( fmodels = fmodels, number_of_iterations = params.number_of_minimization_iterations, iselection = selection.iselection(), parameter = "occupancies") if(params.stop_reset_occupancies_at_macro_cycle >= i): reset_occupancies(fmodels=fmodels, selection=selection, occ_min=0, occ_max=10, set_min=0, set_max=10) if(params.start_filtering_at_macro_cycle < i): fmodels, selection = filter_da(fmodels, selection, params) show(fmodels, selection, "occ(%2d):"%i) if(params.refine in ["adp", "occupancies_and_adp"]): refinery( fmodels = fmodels, number_of_iterations = params.number_of_minimization_iterations, iselection = selection.iselection(), parameter = "adps") if(params.stop_reset_adp_at_macro_cycle >= i): reset_adps(fmodels = fmodels, selection = selection, b_min=5, b_max=100, set_min=5, set_max=100) if(params.start_filtering_at_macro_cycle < i): fmodels, selection = filter_da(fmodels, selection, params) show(fmodels, selection, "adp(%2d):"%i) | show_refinement_update(fmodels, selection, " START:") nrm = params.number_of_refinement_cycles assert nrm >= params.stop_reset_occupancies_at_macro_cycle assert nrm >= params.stop_reset_adp_at_macro_cycle assert nrm >= params.start_filtering_at_macro_cycle for macro_cycle in xrange(nrm): if("occupancies" in params.refine): fmodels, selection = refine_occupancies(fmodels = fmodels, selection = selection, params = params, macro_cycle = macro_cycle) if("adp" in params.refine): fmodels, selection = refine_adp(fmodels = fmodels, selection = selection, params = params, macro_cycle = macro_cycle) if("sites" in params.refine): fmodels, selection = refine_sites(fmodels = fmodels, selection = selection, params = params, macro_cycle = macro_cycle) | def show(fmodels, selection, prefix): fmt1 = "%s Rwork= %8.6f Rfree= %8.6f Number of: non-DA= %d DA= %d all= %d" print fmt1%(prefix, fmodel.r_work(), fmodel.r_free(), selection.count(False),selection.count(True), fmodels.fmodel_xray().xray_structure.scatterers().size()) occ = fmodels.fmodel_xray().xray_structure.scatterers().extract_occupancies() occ_da = occ.select(selection) occ_ma = occ.select(~selection) print " non-da: occ(min,max,mean)= %6.3f %6.3f %6.3f"%( flex.min(occ_ma),flex.max(occ_ma),flex.mean(occ_ma)) print " da: occ(min,max,mean)= %6.3f %6.3f %6.3f"%( flex.min(occ_da),flex.max(occ_da),flex.mean(occ_da)) b = fmodels.fmodel_xray().xray_structure.extract_u_iso_or_u_equiv()*\ adptbx.u_as_b(1.) b_da = b.select(selection) b_ma = b.select(~selection) print " non-da: ADP(min,max,mean)= %7.2f %7.2f %7.2f"%( flex.min(b_ma),flex.max(b_ma),flex.mean(b_ma)) print " da: ADP(min,max,mean)= %7.2f %7.2f %7.2f"%( flex.min(b_da),flex.max(b_da),flex.mean(b_da)) | c83e5aaf0a98a33f9afd742b631944b224553620 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/696/c83e5aaf0a98a33f9afd742b631944b224553620/grow_density.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
12,
74,
7665,
16,
4421,
16,
1633,
4672,
1325,
21,
273,
2213,
87,
534,
1252,
33,
738,
28,
18,
26,
74,
534,
9156,
33,
738,
28,
18,
26,
74,
3588,
434,
30,
1661,
17,
9793,
33,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
12,
74,
7665,
16,
4421,
16,
1633,
4672,
1325,
21,
273,
2213,
87,
534,
1252,
33,
738,
28,
18,
26,
74,
534,
9156,
33,
738,
28,
18,
26,
74,
3588,
434,
30,
1661,
17,
9793,
33,
... |
reactor.clientTCP("localhost", 10081, client) | reactor.clientTCP("localhost", 10081, client, timeout=5) | def testFailing(self): client = ClosingProtocol() reactor.clientTCP("localhost", 10081, client) | e5f9520da8481f0872e88daaeba8bf355e5a478d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e5f9520da8481f0872e88daaeba8bf355e5a478d/test_tcp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
3754,
310,
12,
2890,
4672,
1004,
273,
385,
10910,
5752,
1435,
19178,
18,
2625,
13891,
2932,
13014,
3113,
2130,
11861,
16,
1004,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
3754,
310,
12,
2890,
4672,
1004,
273,
385,
10910,
5752,
1435,
19178,
18,
2625,
13891,
2932,
13014,
3113,
2130,
11861,
16,
1004,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
os.startfile(url) return True | try: os.startfile(url) except WindowsError: return False else: return True | def open(self, url, new=0, autoraise=1): os.startfile(url) return True # Oh, my... | 64f710e01835e99c75fdb3c7b27ad6e8b157a295 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/64f710e01835e99c75fdb3c7b27ad6e8b157a295/webbrowser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
12,
2890,
16,
880,
16,
394,
33,
20,
16,
2059,
10610,
784,
33,
21,
4672,
775,
30,
1140,
18,
1937,
768,
12,
718,
13,
1335,
8202,
668,
30,
282,
327,
1083,
469,
30,
327,
1053,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
12,
2890,
16,
880,
16,
394,
33,
20,
16,
2059,
10610,
784,
33,
21,
4672,
775,
30,
1140,
18,
1937,
768,
12,
718,
13,
1335,
8202,
668,
30,
282,
327,
1083,
469,
30,
327,
1053,
46... |
return eval(re.sub(IRC_CODES_RE, '', repr(message))) | return cgi_escape(eval(re.sub(IRC_CODES_RE, '', repr(message)))) | def _strip_irc_codes(self, message): return eval(re.sub(IRC_CODES_RE, '', repr(message))) | eb82b1945aef03c67f2b2102ffd5b7b2626d1e74 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5822/eb82b1945aef03c67f2b2102ffd5b7b2626d1e74/notifier.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6406,
67,
481,
71,
67,
7000,
12,
2890,
16,
883,
4672,
327,
5302,
12,
266,
18,
1717,
12,
30240,
67,
17070,
67,
862,
16,
10226,
8480,
12,
2150,
20349,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6406,
67,
481,
71,
67,
7000,
12,
2890,
16,
883,
4672,
327,
5302,
12,
266,
18,
1717,
12,
30240,
67,
17070,
67,
862,
16,
10226,
8480,
12,
2150,
20349,
2,
-100,
-100,
-100,
-100,
-... |
uri = fileTag.getAttributeNS(None, 'uri') | uri = fileTag.getAttribute('uri') | def format_file(self, name, fileTag=None): """Given the short name of a file, and optionally its XML tag, return a Nouvelle-serializable representation. """ if fileTag: | 051c48166d52d45faeced1288895a6e1f8afdcda /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9478/051c48166d52d45faeced1288895a6e1f8afdcda/Commit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
67,
768,
12,
2890,
16,
508,
16,
585,
1805,
33,
7036,
4672,
3536,
6083,
326,
3025,
508,
434,
279,
585,
16,
471,
8771,
2097,
3167,
1047,
16,
327,
279,
423,
1395,
941,
298,
17,
881... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
67,
768,
12,
2890,
16,
508,
16,
585,
1805,
33,
7036,
4672,
3536,
6083,
326,
3025,
508,
434,
279,
585,
16,
471,
8771,
2097,
3167,
1047,
16,
327,
279,
423,
1395,
941,
298,
17,
881... |
if not server.timeout in (5000000, 300000000): self.fail("server.timeout should be 5000000 or 300000000") | if not server.timeout in (5.0, 300.0): self.fail("server.timeout should be 5.0 or 300.0") | def test_server_members(self): | 708bf7027607ec1d89d8bffd1fa50215e5951d9f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10002/708bf7027607ec1d89d8bffd1fa50215e5951d9f/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3567,
67,
7640,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3567,
67,
7640,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
def showInfo(node): | def singleVideoInfo(node): | def appendXMLChild(node): node.play() videoinfo = doc.createElement("videoinfo") videoinfo.setAttribute("file", node.href) videoinfo.setAttribute("duration", str(node.getDuration()/1000.)) videoinfo.setAttribute("bitrate", str(node.getBitrate())) rootElement.appendChild(videoinfo) videoNode = doc.createElement("video") videoNode.setAttribute("codec", node.getVideoCodec()) videoNode.setAttribute("size", str(node.getMediaSize())) videoNode.setAttribute("pixelformat", node.getStreamPixelFormat()) videoNode.setAttribute("fps", str(node.fps)) videoinfo.appendChild(videoNode) if node.hasAudio(): audioNode = doc.createElement("audio") audioNode.setAttribute("codec", node.getAudioCodec()) audioNode.setAttribute("samplerate", str(node.getAudioSampleRate())) audioNode.setAttribute("channels", str(node.getNumAudioChannels())) videoinfo.appendChild(audioNode) | f39acf9c95aaac330d5f54ed4f4ca03f16a4469f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7300/f39acf9c95aaac330d5f54ed4f4ca03f16a4469f/avg_videoinfo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
714,
4201,
1763,
12,
2159,
4672,
756,
18,
1601,
1435,
331,
831,
885,
617,
273,
997,
18,
2640,
1046,
2932,
6768,
885,
617,
7923,
331,
831,
885,
617,
18,
542,
1499,
2932,
768,
3113,
756,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
714,
4201,
1763,
12,
2159,
4672,
756,
18,
1601,
1435,
331,
831,
885,
617,
273,
997,
18,
2640,
1046,
2932,
6768,
885,
617,
7923,
331,
831,
885,
617,
18,
542,
1499,
2932,
768,
3113,
756,... |
stackless = False | def get_entry_point(self): assert self.c_ext_module return getattr(self.c_ext_module, self.translator.entrypoint.func_name) | 0aae1997c3e7ed7726ec56ebc4746145d042dbdb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/0aae1997c3e7ed7726ec56ebc4746145d042dbdb/genc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4099,
67,
1153,
12,
2890,
4672,
1815,
365,
18,
71,
67,
408,
67,
2978,
327,
3869,
12,
2890,
18,
71,
67,
408,
67,
2978,
16,
365,
18,
17879,
18,
4099,
1153,
18,
644,
67,
529,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4099,
67,
1153,
12,
2890,
4672,
1815,
365,
18,
71,
67,
408,
67,
2978,
327,
3869,
12,
2890,
18,
71,
67,
408,
67,
2978,
16,
365,
18,
17879,
18,
4099,
1153,
18,
644,
67,
529,... | |
bt.clicked = (my_entry_bt_4, en) | bt.callback_clicked_add(my_entry_bt_4, en) | def entry_scrolled_clicked(obj, it, *args, **kargs): win = elementary.Window("entry", elementary.ELM_WIN_BASIC) win.title_set("Entry Scrolled") win.autodel_set(True) bg = elementary.Background(win) win.resize_object_add(bg) bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND) bg.show() bx = elementary.Box(win) bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND) win.resize_object_add(bx) bx.show() sc = elementary.Scroller(win) sc.content_min_limit(0, 1) sc.policy_set(elementary.ELM_SCROLLER_POLICY_OFF, elementary.ELM_SCROLLER_POLICY_OFF) sc.bounce_set(False, False) sc.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0) sc.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL) bx.pack_end(sc) en = elementary.Entry(win) en.single_line_set(True) en.entry_set("Disable entry") en.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0) en.size_hint_align_set(evas.EVAS_HINT_FILL, 0.5) en.disabled_set(True) sc.content_set(en) en.show() sc.show() sc = elementary.Scroller(win) sc.content_min_limit(0, 1) sc.policy_set(elementary.ELM_SCROLLER_POLICY_OFF, elementary.ELM_SCROLLER_POLICY_OFF) sc.bounce_set(False, False) sc.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0) sc.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL) bx.pack_end(sc) en = elementary.Entry(win) en.password_set(True) en.entry_set("Access denied, give up!") en.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0) en.size_hint_align_set(evas.EVAS_HINT_FILL, 0.5) en.disabled_set(True) sc.content_set(en) en.show() sc.show() sc = elementary.Scroller(win) sc.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND) sc.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL) sc.policy_set(elementary.ELM_SCROLLER_POLICY_ON, elementary.ELM_SCROLLER_POLICY_ON) sc.bounce_set(False, True) bx.pack_end(sc) en = elementary.Entry(win) #TODO #en.context_menu_item_add("Hello", None, elementary.ELM_ICON_NONE, None, None) #en.context_menu_item_add("World", None, elementary.ELM_ICON_NONE, None, None) en.entry_set( "Multi-line disabled entry widget :)<br>" "We can use markup <b>like this</> for styling and<br>" "formatting <em>like this</>, as well as<br>" "<a href=X><link>links in the text</></a>, but it won't be editable or clickable.") en.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND) en.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL) en.disabled_set(True) sc.content_set(en) en.show() sc.show() sp = elementary.Separator(win) sp.horizontal_set(True) bx.pack_end(sp) sp.show() sc = elementary.Scroller(win) sc.content_min_limit(0, 1) sc.policy_set(elementary.ELM_SCROLLER_POLICY_OFF, elementary.ELM_SCROLLER_POLICY_OFF) sc.bounce_set(False, False) sc.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0) sc.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL) bx.pack_end(sc) en = elementary.Entry(win) en.single_line_set(True) en.entry_set("This is a single line") en.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0) en.size_hint_align_set(evas.EVAS_HINT_FILL, 0.5) en.select_all() sc.content_set(en) en.show() sc.show() sc = elementary.Scroller(win) sc.content_min_limit(0, 1) sc.policy_set(elementary.ELM_SCROLLER_POLICY_OFF, elementary.ELM_SCROLLER_POLICY_OFF) sc.bounce_set(False, False) sc.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0) sc.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL) bx.pack_end(sc) en = elementary.Entry(win) en.password_set(True) en.entry_set("Password here") en.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0) en.size_hint_align_set(evas.EVAS_HINT_FILL, 0.0) sc.content_set(en) en.show() sc.show() sc = elementary.Scroller(win) sc.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND) sc.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL) sc.policy_set(elementary.ELM_SCROLLER_POLICY_ON, elementary.ELM_SCROLLER_POLICY_ON) sc.bounce_set(False, True) bx.pack_end(sc) en = elementary.Entry(win) en.entry_set("This is an entry widget in this window that<br>" "uses markup <b>like this</> for styling and<br>" "formatting <em>like this</>, as well as<br>" "<a href=X><link>links in the text</></a>, so enter text<br>" "in here to edit it. By the way, links are<br>" "called <a href=anc-02>Anchors</a> so you will need<br>" "to refer to them this way. At the end here is a really long line to test line wrapping to see if it works. But just in case this line is not long enough I will add more here to really test it out, as Elementary really needs some good testing to see if entry widgets work as advertised.") en._callback_add("anchor,clicked", my_entry_anchor_test, (en,)) en.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND) en.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL) sc.content_set(en) en.show() sc.show() bx2 = elementary.Box(win) bx2.horizontal_set(True) bx2.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0) bx2.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL) bt = elementary.Button(win) bt.label_set("Clear") bt.clicked = (my_entry_bt_1, en) bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL) bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0) bx2.pack_end(bt) bt.show() bt = elementary.Button(win) bt.label_set("Print") bt.clicked = (my_entry_bt_2, en) bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL) bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0) bx2.pack_end(bt) bt.show() bt = elementary.Button(win) bt.label_set("Selection") bt.clicked = (my_entry_bt_3, en) bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL) bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0) bx2.pack_end(bt) bt.show() bt = elementary.Button(win) bt.label_set("Insert") bt.clicked = (my_entry_bt_4, en) bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL) bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0) bx2.pack_end(bt) bt.show() bx.pack_end(bx2) bx2.show() win.resize(320, 300) win.focus() win.show() | ef127faaba8fc06ebbb7bd48a4185405cdfc6a4e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12343/ef127faaba8fc06ebbb7bd48a4185405cdfc6a4e/test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1241,
67,
1017,
25054,
67,
7475,
329,
12,
2603,
16,
518,
16,
380,
1968,
16,
2826,
79,
1968,
4672,
5657,
273,
930,
814,
18,
3829,
2932,
4099,
3113,
930,
814,
18,
2247,
49,
67,
24572,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1241,
67,
1017,
25054,
67,
7475,
329,
12,
2603,
16,
518,
16,
380,
1968,
16,
2826,
79,
1968,
4672,
5657,
273,
930,
814,
18,
3829,
2932,
4099,
3113,
930,
814,
18,
2247,
49,
67,
24572,
... |
plt.figure(3) | plt.figure(4) | def num_integ(inx,iny): """Given values of a function (iny) evaluated at points (inx), calculate integral of function at points using trapezium rule""" inx = atleast_1d(inx) out = zeros(inx.shape, dtype=inx.dtype) for n in xrange(len(out)): out[n] = integrate.trapz(iny[0:n],inx[0:n]) return out | d46e4e8518f03c4a55d1d2deb77b2b584b339376 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1255/d46e4e8518f03c4a55d1d2deb77b2b584b339376/kinker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
818,
67,
14970,
12,
11414,
16,
11652,
4672,
3536,
6083,
924,
434,
279,
445,
261,
11652,
13,
12697,
622,
3143,
261,
11414,
3631,
4604,
21423,
434,
445,
622,
3143,
1450,
1284,
347,
94,
507... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
818,
67,
14970,
12,
11414,
16,
11652,
4672,
3536,
6083,
924,
434,
279,
445,
261,
11652,
13,
12697,
622,
3143,
261,
11414,
3631,
4604,
21423,
434,
445,
622,
3143,
1450,
1284,
347,
94,
507... |
self.decoders.append(wc.proxy.UnchunkStream.UnchunkStream()) | self.decoders.append( wc.proxy.decoders.UnchunkStream.UnchunkStream()) | def process_headers (self): """read and filter client request headers""" # Two newlines ends headers i = self.recv_buffer.find('\r\n\r\n') if i < 0: return i += 4 # Skip over newline terminator # the first 2 chars are the newline of request fp = StringIO.StringIO(self.read(i)[2:]) msg = wc.proxy.Headers.WcMessage(fp) # put unparsed data (if any) back to the buffer msg.rewindbody() self.recv_buffer = fp.read() + self.recv_buffer fp.close() wc.log.debug(wc.LOG_PROXY, "%s client headers \n%s", self, msg) self.fix_request_headers(msg) clientheaders = msg.copy() stage = wc.filter.STAGE_REQUEST_HEADER self.attrs = wc.filter.get_filterattrs(self.url, [stage], clientheaders=clientheaders, headers=msg) self.set_persistent(msg, self.http_ver) self.mangle_request_headers(msg) self.compress = wc.proxy.Headers.client_set_encoding_headers(msg) # filter headers self.headers = wc.filter.applyfilter(stage, msg, "finish", self.attrs) # add decoders self.decoders = [] # if content-length header is missing, assume zero length self.bytes_remaining = \ wc.proxy.Headers.get_content_length(self.headers, 0) # chunked encoded if self.headers.has_key('Transfer-Encoding'): # XXX don't look at value, assume chunked encoding for now wc.log.debug(wc.LOG_PROXY, '%s Transfer-encoding %r', self, self.headers['Transfer-encoding']) self.decoders.append(wc.proxy.UnchunkStream.UnchunkStream()) wc.proxy.Headers.client_remove_encoding_headers(self.headers) self.bytes_remaining = None if self.bytes_remaining is None: self.persistent = False if not self.hostname and self.headers.has_key('Host'): if self.method == 'CONNECT': defaultport = 443 else: defaultport = 80 host = self.headers['Host'] self.hostname, self.port = urllib.splitnport(host, defaultport) if not self.hostname: wc.log.error(wc.LOG_PROXY, "%s missing hostname in request", self) self.error(400, _("Bad Request")) # local request? if self.hostname in wc.proxy.dns_lookups.resolver.localhosts and \ self.port == wc.configuration.config['port']: # this is a direct proxy call, jump directly to content self.state = 'content' return # add missing host headers for HTTP/1.1 if not self.headers.has_key('Host'): wc.log.warn(wc.LOG_PROXY, "%s request without Host header encountered", self) if self.port != 80: self.headers['Host'] = "%s:%d\r" % (self.hostname, self.port) else: self.headers['Host'] = "%s\r" % self.hostname if wc.configuration.config["proxyuser"]: creds = wc.proxy.auth.get_header_credentials(self.headers, 'Proxy-Authorization') if not creds: auth = ", ".join(wc.proxy.auth.get_challenges()) self.error(407, _("Proxy Authentication Required"), auth=auth) return if 'NTLM' in creds: if creds['NTLM'][0]['type'] == \ wc.proxy.auth.ntlm.NTLMSSP_NEGOTIATE: attrs = { 'host': creds['NTLM'][0]['host'], 'domain': creds['NTLM'][0]['domain'], 'type': wc.proxy.auth.ntlm.NTLMSSP_CHALLENGE, } auth = ",".join(wc.proxy.auth.get_challenges(**attrs)) self.error(407, _("Proxy Authentication Required"), auth=auth) return # XXX the data=None argument should hold POST data if not wc.proxy.auth.check_credentials(creds, username=wc.configuration.config['proxyuser'], password_b64=wc.configuration.config['proxypass'], uri=wc.proxy.auth.get_auth_uri(self.url), method=self.method, data=None): wc.log.warn(wc.LOG_AUTH, "Bad proxy authentication from %s", self.addr[0]) auth = ", ".join(wc.proxy.auth.get_challenges()) self.error(407, _("Proxy Authentication Required"), auth=auth) return if self.method in ['OPTIONS', 'TRACE'] and \ wc.proxy.Headers.client_get_max_forwards(self.headers) == 0: # XXX display options ? self.state = 'done' headers = wc.proxy.Headers.WcMessage() headers['Content-Type'] = 'text/plain\r' wc.proxy.ServerHandleDirectly.ServerHandleDirectly(self, '%s 200 OK' % self.protocol, 200, headers, '') return if self.needs_redirect: self.state = 'done' headers = wc.proxy.Headers.WcMessage() headers['Content-Type'] = 'text/plain\r' headers['Location'] = '%s\r' % self.url wc.proxy.ServerHandleDirectly.ServerHandleDirectly(self, '%s 302 Found' % self.protocol, 302, headers, '') return self.state = 'content' | 90af7d84c582f452b47b4d557e2b90b2bf2731b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/90af7d84c582f452b47b4d557e2b90b2bf2731b0/HttpClient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2485,
261,
2890,
4672,
3536,
896,
471,
1034,
1004,
590,
1607,
8395,
468,
16896,
19181,
3930,
1607,
277,
273,
365,
18,
18334,
67,
4106,
18,
4720,
2668,
64,
86,
64,
82,
64,
86,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2485,
261,
2890,
4672,
3536,
896,
471,
1034,
1004,
590,
1607,
8395,
468,
16896,
19181,
3930,
1607,
277,
273,
365,
18,
18334,
67,
4106,
18,
4720,
2668,
64,
86,
64,
82,
64,
86,... |
for username,name,email in self.env.get_known_users(): | for username, name, email in self.env.get_known_users(): | def process_request(self, req): req.perm.assert_permission('TIMELINE_VIEW') | ba1cf021145a9e1db08a24d3aa8558e5880c91a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/ba1cf021145a9e1db08a24d3aa8558e5880c91a3/Timeline.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2293,
12,
2890,
16,
1111,
4672,
1111,
18,
12160,
18,
11231,
67,
9827,
2668,
4684,
5997,
67,
12145,
6134,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2293,
12,
2890,
16,
1111,
4672,
1111,
18,
12160,
18,
11231,
67,
9827,
2668,
4684,
5997,
67,
12145,
6134,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
(sys.platform.startswith('linux') and | ((sys.platform.startswith('linux') or sys.platform.startswith('gnu')) and | def finalize_options (self): from distutils import sysconfig | d149d0c76a7fa8c90140342dad3e1c220c63c054 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d149d0c76a7fa8c90140342dad3e1c220c63c054/build_ext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12409,
67,
2116,
261,
2890,
4672,
628,
2411,
5471,
1930,
2589,
1425,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12409,
67,
2116,
261,
2890,
4672,
628,
2411,
5471,
1930,
2589,
1425,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self.assertRaises(StandardError, wav_duration, self.mp3_filename) | self.assertRaises(StandardError, wav_duration, mp3_filename) | def test_non_wav(self): self.assertRaises(StandardError, wav_duration, self.mp3_filename) | ebf7098ec98c4922b049ba6136693a701aa15f39 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6133/ebf7098ec98c4922b049ba6136693a701aa15f39/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5836,
67,
24801,
12,
2890,
4672,
365,
18,
11231,
12649,
6141,
12,
8336,
668,
16,
19342,
67,
8760,
16,
365,
18,
1291,
23,
67,
3459,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5836,
67,
24801,
12,
2890,
4672,
365,
18,
11231,
12649,
6141,
12,
8336,
668,
16,
19342,
67,
8760,
16,
365,
18,
1291,
23,
67,
3459,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
from irclib import Event, nm_to_n | from irclib import Event | def handler(self, **args): import database from irclib import Event, nm_to_n # Set the target as either the person or the channel target = self.return_to_sender(args) orig_msg = args["text"] # Strip bot name orig_msg = orig_msg.split()[1:] # Now determine if we need to list karma or increment/decrement it, # which we check by seeing if the first word is "karma" msg = "" if orig_msg[0] == "karma": # If they just say "karma", self.debug(the top 3, the bottom 3, and) # the requester's karma if len(orig_msg) == 1: top = "Top 3 Karma -" # Top 3 query = "select counter, nick from stats where type='karma'" \ + " order by counter desc limit 3" record = database.doSQL(query) for i in range(len(record)): # i goes from 0 to 2 (hopefully) top += " " + str(i+1) + ") " + record[i][1] + ": " \ + self.str(record[i][0]) + ";" top += "\n" # Bottom 3 bot = "Bottom 3 Karma -" query = "select counter, nick from stats where type='karma'" \ + " order by counter asc limit 3" record = database.doSQL(query) for i in range(len(record)): bot += " " + str(i+1) + ") " + record[i][1] + ": " \ + self.str(record[i][0]) + ";" bot += "\n" # Requesters import irclib name = irclib.nm_to_n(args["source"]) self.debug(name) query = "select counter from stats where nick='" + name + "' and type='karma'" record = database.doSQL(query) if len(record) != 0: req = name + ": " + self.str(record[0][0]) else: req = "" | d5167c5389c03fe577b8526b09b722299f592b8e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10749/d5167c5389c03fe577b8526b09b722299f592b8e/karma.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1838,
12,
2890,
16,
2826,
1968,
4672,
1930,
2063,
628,
9482,
830,
495,
1930,
2587,
225,
468,
1000,
326,
1018,
487,
3344,
326,
6175,
578,
326,
1904,
1018,
273,
365,
18,
2463,
67,
869,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1838,
12,
2890,
16,
2826,
1968,
4672,
1930,
2063,
628,
9482,
830,
495,
1930,
2587,
225,
468,
1000,
326,
1018,
487,
3344,
326,
6175,
578,
326,
1904,
1018,
273,
365,
18,
2463,
67,
869,
6... |
self.case_specific_facts.add(args) | self.case_specific_facts.append(args) | def add_case_specific_fact(self, args): | 0dde8db52874a79d72bb88e7ba3b3de73eff9e60 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14714/0dde8db52874a79d72bb88e7ba3b3de73eff9e60/fact_base.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
3593,
67,
12524,
67,
3493,
12,
2890,
16,
833,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
3593,
67,
12524,
67,
3493,
12,
2890,
16,
833,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if readData1 != srccontents or readData2 != srccontents: raise TestFailed, "Written data doesn't equal read data." | fp = open(TESTFN, "wb") fp.write(self.data) fp.close() | def zipTest(f, compression, srccontents): zip = zipfile.ZipFile(f, "w", compression) # Create the ZIP archive zip.write(srcname, "another"+os.extsep+"name") zip.write(srcname, srcname) zip.close() zip = zipfile.ZipFile(f, "r", compression) # Read the ZIP archive readData2 = zip.read(srcname) readData1 = zip.read("another"+os.extsep+"name") zip.close() if readData1 != srccontents or readData2 != srccontents: raise TestFailed, "Written data doesn't equal read data." | f51eab5da1d45826c2db27f13ed719eae8fe5c8a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/f51eab5da1d45826c2db27f13ed719eae8fe5c8a/test_zipfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3144,
4709,
12,
74,
16,
9154,
16,
1705,
3980,
4672,
3144,
273,
18823,
18,
29394,
12,
74,
16,
315,
91,
3113,
9154,
13,
282,
468,
1788,
326,
18277,
5052,
3144,
18,
2626,
12,
4816,
529,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3144,
4709,
12,
74,
16,
9154,
16,
1705,
3980,
4672,
3144,
273,
18823,
18,
29394,
12,
74,
16,
315,
91,
3113,
9154,
13,
282,
468,
1788,
326,
18277,
5052,
3144,
18,
2626,
12,
4816,
529,
... |
CppText += IndentText + "tt_PenPaint = false;\n" CppText += IndentText + "glColor3ubv(tt_ColorBackground);\n" | CppText += IndentText + "tt_ActiveColor = tt_ColorBackground;\n" | def GetCppBuiltInInstruction(self, pInstruct, iIndent): IndentText = " " * (iIndent * self.IndentSize) NextIndent = " " * ((iIndent+1) * self.IndentSize) NumTypeGL = self.LogoState.NumType[0] NumTypeMath = "" if self.LogoState.NumType == 'float': NumTypeMath = "f" CppText = "" # get the C++ code for each argument in this instruction ArgText = [] for arg in pInstruct.Arguments: if arg.ArgType == ParamType.LISTCODE: ArgText.append("") else: text = self.GetCppArgument(arg) if text is None: return None ArgText.append(text) # now handle the particular instruction if pInstruct.pProc.FullName == ".setspecial": # .SETSPECIAL return "" elif pInstruct.pProc.FullName == "abs": # ABS CppText += "fabs%s(%s)" % (NumTypeMath, ArgText[0]) elif pInstruct.pProc.FullName == "and": # AND bFirst = True for argtext in ArgText: if bFirst is True: bFirst = False else: CppText += " && " CppText += "(%s)" % argtext elif pInstruct.pProc.FullName == "arctan": # ARCTAN if len(ArgText) == 1: CppText += "atan%s(%s) * tt_DegreeRad" % (NumTypeMath, ArgText[0]) else: CppText += "atan2%s(%s, %s) * tt_DegreeRad" % (NumTypeMath, ArgText[1], ArgText[0]) elif pInstruct.pProc.FullName == "array": # ARRAY CppText += "CArray<%s,1>(" % self.LogoState.NumType if len(pInstruct.Arguments) == 1: CppText += "(int) (%s), 1" % ArgText[0] else: CppText += "(int) (%s), (int) (%s)" % (ArgText[0], ArgText[1]) CppText += ")" elif pInstruct.pProc.FullName == "back": # BACK return self.GetCppBuiltinMove(IndentText, pInstruct.Arguments[0], "-") elif pInstruct.pProc.FullName == "butfirst": # BUTFIRST CppText += "%s.ButFirst()" % ArgText[0] elif pInstruct.pProc.FullName == "butlast": # BUTLAST CppText += "%s.ButLast()" % ArgText[0] elif pInstruct.pProc.FullName == "clean": # CLEAN CppText += IndentText + "wrapper_Clean();\n" elif pInstruct.pProc.FullName == "clearscreen": # CLEARSCREEN # just move to HOME position and call clean CppText += IndentText + "tt_TurtlePos[0] = tt_TurtlePos[1] = 0.5;\n" CppText += IndentText + "tt_TurtleDir = 0.0;\n" CppText += IndentText + "wrapper_Clean();\n" elif pInstruct.pProc.FullName == "cos": # COS CppText += "cos%s((%s) * tt_RadDegree)" % (NumTypeMath, ArgText[0]) elif pInstruct.pProc.FullName == "count": # COUNT CppText += "%s.Length()" % ArgText[0] elif pInstruct.pProc.FullName == "difference": # DIFFERENCE CppText += "(%s) - (%s)" % (ArgText[0], ArgText[1]) elif pInstruct.pProc.FullName in ("do.while", "do.until"): # DO.WHILE, DO.UNTIL CppText += IndentText + "do {\n" for instruct in pInstruct.Arguments[0].Elements[0].pInstruct: codetext = self.GetCppInstruction(instruct, iIndent + 1, True) if codetext is None: return None CppText += codetext if pInstruct.pProc.FullName == "do.while": CppText += IndentText + "} while (%s);\n" % ArgText[1] else: CppText += IndentText + "} while (!(%s));\n" % ArgText[1] elif pInstruct.pProc.FullName == "emptyp": # EMPTYP CppText += "%s.Length() == 0" % ArgText[0] elif pInstruct.pProc.FullName == "erasescreen": # ERASESCREEN CppText += IndentText + "wrapper_Erase();\n" elif pInstruct.pProc.FullName == "exp": # EXP CppText += "exp%s(%s)" % (NumTypeMath, ArgText[0]) elif pInstruct.pProc.FullName == "first": # FIRST CppText += "%s[0]" % ArgText[0] elif pInstruct.pProc.FullName == "for": # FOR my_temp = self.LogoState.TempIdx self.LogoState.TempIdx += 1 varname = pInstruct.pMakeVar.CppName # write code to set the start and limit values for the FOR loop CppText += IndentText + "%s start%02i = %s;\n" % (self.LogoState.NumType, my_temp, ArgText[1]) CppText += IndentText + "%s limit%02i = %s;\n" % (self.LogoState.NumType, my_temp, ArgText[2]) # write code to set the step size if pInstruct.Arguments[3].ArgType == ParamType.NUMBER: CodeList = pInstruct.Arguments[4].Elements[0].pInstruct CppText += IndentText + "%s step%02i = %s;\n" % (self.LogoState.NumType, my_temp, ArgText[3]) else: CodeList = pInstruct.Arguments[3].Elements[0].pInstruct CppText += IndentText + "%s step%02i = start%02i <= limit%02i ? 1.0 : -1.0;\n" % (self.LogoState.NumType, my_temp, my_temp, my_temp) # now write the FOR loop CppText += IndentText + "for (%s = start%02i; (%s - limit%02i) * step%02i <= 0.0; %s += step%02i)\n" % (varname, my_temp, varname, my_temp, my_temp, varname, my_temp) CppText += IndentText + "{\n" for instruct in CodeList: codetext = self.GetCppInstruction(instruct, iIndent + 1, True) if codetext is None: return None CppText += codetext CppText += IndentText + "}\n" elif pInstruct.pProc.FullName == "forever": # FOREVER my_counter = self.LogoState.LoopIdx self.LogoState.LoopIdx += 1 CppText += IndentText + "for (int loop%02i=1; ; loop%02i++)\n%s{\n" % (my_counter, my_counter, IndentText) for instruct in pInstruct.Arguments[0].Elements[0].pInstruct: self.LogoState.InnerLoopIdx = my_counter codetext = self.GetCppInstruction(instruct, iIndent + 1, True) if codetext is None: return None CppText += codetext CppText += IndentText + "}\n" self.LogoState.InnerLoopIdx = -1 elif pInstruct.pProc.FullName == "forward": # FORWARD return self.GetCppBuiltinMove(IndentText, pInstruct.Arguments[0], "+") elif pInstruct.pProc.FullName == "fput": # FPUT CppText += "CList<%s>(%s, %s)" % (self.LogoState.NumType, ArgText[0], ArgText[1]) elif pInstruct.pProc.FullName == "gaussian": # GAUSSIAN CppText += "tt_Gaussian()" elif pInstruct.pProc.FullName == "goto": # GOTO CppText += IndentText + "goto tag_%s;\n" % ArgText[0][1:-1] elif pInstruct.pProc.FullName == "heading": # HEADING CppText += "(tt_TurtleDir < 0.0 ? 360.0+fmod(tt_TurtleDir,360.0) : fmod(tt_TurtleDir,360.0))" elif pInstruct.pProc.FullName == "home": # HOME CppText += IndentText + "tt_TurtlePos[0] = tt_TurtlePos[1] = 0.5;\n" CppText += IndentText + "tt_TurtleDir = 0.0;\n" elif pInstruct.pProc.FullName in ("if", "ifelse"): # IF, IFELSE CppText += IndentText + "if (%s)\n" % ArgText[0] + IndentText + "{\n" for instruct in pInstruct.Arguments[1].Elements[0].pInstruct: codetext = self.GetCppInstruction(instruct, iIndent + 1, True) if codetext is None: return None CppText += codetext if pInstruct.pProc.FullName == "if": CppText += IndentText + "}\n" else: CppText += IndentText + "} else {\n" for instruct in pInstruct.Arguments[2].Elements[0].pInstruct: codetext = self.GetCppInstruction(instruct, iIndent + 1, True) if codetext is None: return None CppText += codetext CppText += IndentText + "}\n" elif pInstruct.pProc.FullName in ("iftrue", "iffalse"): # IFTRUE, IFFALSE if pInstruct.pProc.FullName == "iftrue": CppText += IndentText + "if (tt_TestValue)\n" + IndentText + "{\n" else: CppText += IndentText + "if (!tt_TestValue)\n" + IndentText + "{\n" for instruct in pInstruct.Arguments[0].Elements[0].pInstruct: codetext = self.GetCppInstruction(instruct, iIndent + 1, True) if codetext is None: return None CppText += codetext CppText += IndentText + "}\n" elif pInstruct.pProc.FullName == "int": # INT CppText += "(int) (%s)" % ArgText[0] elif pInstruct.pProc.FullName == "item": # ITEM if pInstruct.Arguments[1].ArgType == ParamType.LISTNUM: CppText += "%s[(int) (%s)-1]" % (ArgText[1], ArgText[0]) elif pInstruct.Arguments[1].ArgType == ParamType.ARRAY: CppText += "%s.Get((int) (%s))" % (ArgText[1], ArgText[0]) elif pInstruct.pProc.FullName == "label": # LABEL CppText += IndentText + "glEnd();\n" CppText += IndentText + "sprintf(tt_LabelText, \"" bFirst = True for arg in pInstruct.Arguments: if bFirst is True: bFirst = False else: CppText += " " if arg.ArgType == ParamType.QUOTEDWORD or arg.ArgType == ParamType.BOOLEAN: CppText += "%s" elif arg.ArgType == ParamType.NUMBER: CppText += "%g" else: print "Syntax error: Invalid parameter type %i (%s) in LABEL instruction." % (arg.ArgType, ParamType.Names[arg.ArgType]) return None CppText += "\"" for i in range(len(pInstruct.Arguments)): arg = pInstruct.Arguments[i] CppText += ", " if arg.ArgType == ParamType.QUOTEDWORD: CppText += ArgText[i] elif arg.ArgType == ParamType.NUMBER: CppText += "(double) (%s)" % ArgText[i] elif arg.ArgType == ParamType.BOOLEAN: CppText += '(%s) ? "True" : "False"' % ArgText[i] CppText += ");\n" CppText += IndentText + "DrawPointText(tt_Font, tt_JustifyVert, tt_JustifyHorz, tt_FontHeight, tt_TurtlePos[0], tt_TurtlePos[1], tt_LabelText);\n" CppText += IndentText + "glBegin(GL_LINES);\n" elif pInstruct.pProc.FullName == "last": # LAST CppText += "%s.Last()" % ArgText[0] elif pInstruct.pProc.FullName == "left": # LEFT CppText += IndentText + "tt_TurtleDir -= %s;\n" % ArgText[0] elif pInstruct.pProc.FullName == "list": # LIST CppText += "CList<%s>(" % self.LogoState.NumType if len(pInstruct.Arguments) <= 4: for i in range(len(pInstruct.Arguments)): if i != 0: CppText += ", " CppText += ArgText[i] else: CppText += "%i" % len(pInstruct.Arguments) for i in range(len(pInstruct.Arguments)): CppText += ", (double) %s" % ArgText[i] CppText += ")" elif pInstruct.pProc.FullName == "ln": # LN CppText += "log%s(%s)" % (NumTypeMath, ArgText[0]) elif pInstruct.pProc.FullName in ("localmake", "make"): # LOCALMAKE, MAKE CppText += IndentText + pInstruct.pMakeVar.CppName + " = " + ArgText[1] + ";\n" elif pInstruct.pProc.FullName == "log10": # LOG10 CppText += "log10%s(%s)" % (NumTypeMath, ArgText[0]) elif pInstruct.pProc.FullName == "lput": # FPUT CppText += "CList<%s>(%s, %s)" % (self.LogoState.NumType, ArgText[1], ArgText[0]) elif pInstruct.pProc.FullName == "mdarray": # MDARRAY if pInstruct.ReturnArrayDim is None: print "Internal error: unknown array dimensions for 'MDARRAY %s'" % ArgText[0] return None if pInstruct.ReturnArrayDim < 2 or pInstruct.ReturnArrayDim > 3: print "Logical error: MDARRAY cannot create an array with %i dimensions" % pInstruct.ReturnArrayDim return None listargtext = self.GetCppListnumExpansion(pInstruct.Arguments[0], pInstruct.ReturnArrayDim, "MDARRAY") if listargtext == None: return None CppText += "CArray<%s,%i>(%s)" % (self.LogoState.NumType, pInstruct.ReturnArrayDim, listargtext) elif pInstruct.pProc.FullName == "mditem": # MDITEM if pInstruct.Arguments[1].Elements[0].Type != ElemType.VAR_VALUE: print "Syntax error: MDITEM requires a variable for the array input, but '%s' was given" % pInstruct.Arguments[1].Elements[0].Text return None ArrayDim = pInstruct.Arguments[1].Elements[0].pVariable.ArrayDim if ArrayDim < 2: print "Logical error: Array '%s' in MDITEM instruction has fewer than 2 dimensions" % pInstruct.Arguments[1].Elements[0].Text return None listargtext = self.GetCppListnumExpansion(pInstruct.Arguments[0], ArrayDim, "MDITEM") if listargtext == None: return None CppText += "%s.Get(%s)" % (ArgText[1], listargtext) elif pInstruct.pProc.FullName == "mdsetitem": # MDSETITEM if pInstruct.Arguments[1].Elements[0].Type != ElemType.VAR_VALUE: print "Syntax error: MDSETITEM requires a variable for the array input, but '%s' was given" % pInstruct.Arguments[1].Elements[0].Text return None ArrayDim = pInstruct.Arguments[1].Elements[0].pVariable.ArrayDim if ArrayDim < 2: print "Logical error: Array '%s' in MDSETITEM instruction has fewer than 2 dimensions" % pInstruct.Arguments[1].Elements[0].Text return None listargtext = self.GetCppListnumExpansion(pInstruct.Arguments[0], ArrayDim, "MDSETITEM") if listargtext == None: return None CppText += IndentText + "%s.Set(%s, %s);\n" % (ArgText[1], ArgText[2], listargtext) elif pInstruct.pProc.FullName == "minus": # MINUS CppText += "-(%s)" % ArgText[0] elif pInstruct.pProc.FullName == "not": # NOT CppText += "!(%s)" % ArgText[0] elif pInstruct.pProc.FullName == "or": # OR bFirst = True for argtext in ArgText: if bFirst is True: bFirst = False else: CppText += " || " CppText += "(%s)" % argtext elif pInstruct.pProc.FullName == "output": # OUTPUT CppText += IndentText + "return %s;\n" % ArgText[0] elif pInstruct.pProc.FullName == "penup": # PENUP CppText += IndentText + "tt_PenDown = false;\n" elif pInstruct.pProc.FullName == "pendown": # PENDOWN CppText += IndentText + "tt_PenDown = true;\n" elif pInstruct.pProc.FullName == "penerase": # PENERASE CppText += IndentText + "tt_PenPaint = false;\n" CppText += IndentText + "glColor3ubv(tt_ColorBackground);\n" elif pInstruct.pProc.FullName == "penpaint": # PENPAINT CppText += IndentText + "tt_PenPaint = true;\n" CppText += IndentText + "glColor3ubv(tt_ColorPen);\n" elif pInstruct.pProc.FullName == "pick": # PICK CppText += "%s.Pick()" % ArgText[0] elif pInstruct.pProc.FullName == "pos": # POS CppText += "CList<%s>(tt_TurtlePos[0], tt_TurtlePos[1])" % self.LogoState.NumType elif pInstruct.pProc.FullName == "power": # POWER CppText += "pow%s(%s, %s)" % (NumTypeMath, ArgText[0], ArgText[1]) elif pInstruct.pProc.FullName == "product": # PRODUCT CppText += "(%s)" % ArgText[0] for argtext in ArgText[1:]: CppText += " * (%s)" % argtext elif pInstruct.pProc.FullName == "quotient": # QUOTIENT if len(ArgText) == 1: CppText += "1.0 / (%s)" % ArgText[0] else: CppText += "(%s) / (%s)" % (ArgText[0], ArgText[1]) elif pInstruct.pProc.FullName == "radarctan": # RADARCTAN if len(ArgText) == 1: CppText += "atan%s(%s)" % (NumTypeMath, ArgText[0]) else: CppText += "atan2%s(%s, %s)" % (NumTypeMath, ArgText[1], ArgText[0]) elif pInstruct.pProc.FullName == "radcos": # RADCOS CppText += "cos%s(%s)" % (NumTypeMath, ArgText[0]) elif pInstruct.pProc.FullName == "radsin": # RADSIN CppText += "sin%s(%s)" % (NumTypeMath, ArgText[0]) elif pInstruct.pProc.FullName == "random": # RANDOM if len(ArgText) == 1: CppText += "tt_Random((int) (%s))" % ArgText[0] else: CppText += "tt_Random((int) (%s), (int) (%s))" % (ArgText[0], ArgText[1]) elif pInstruct.pProc.FullName == "remainder": # REMAINDER CppText += "(int) (%s) %% (int) (%s)" % (ArgText[0], ArgText[1]) elif pInstruct.pProc.FullName == "repcount": # REPCOUNT if self.LogoState.InnerLoopIdx == -1: print "Syntax error: REPCOUNT instruction used outside of a FOREVER or REPEAT loop" return None CppText += "loop%02i" % self.LogoState.InnerLoopIdx elif pInstruct.pProc.FullName == "repeat": # REPEAT my_counter = self.LogoState.LoopIdx self.LogoState.LoopIdx += 1 CppText += IndentText + "for (int loop%02i=1; loop%02i <= %s; loop%02i++)\n" % (my_counter, my_counter, ArgText[0], my_counter) CppText += IndentText + "{\n" for instruct in pInstruct.Arguments[1].Elements[0].pInstruct: self.LogoState.InnerLoopIdx = my_counter codetext = self.GetCppInstruction(instruct, iIndent + 1, True) if codetext is None: return None CppText += codetext CppText += IndentText + "}\n" self.LogoState.InnerLoopIdx = -1 elif pInstruct.pProc.FullName == "rerandom": # RERANDOM if len(ArgText) == 0: CppText += IndentText + "srand(0);\n" else: CppText += IndentText + "srand((int) (%s));\n" % ArgText[0] elif pInstruct.pProc.FullName == "reverse": # REVERSE CppText += "%s.Reverse()" % ArgText[0] elif pInstruct.pProc.FullName == "right": # RIGHT CppText += IndentText + "tt_TurtleDir += %s;\n" % ArgText[0] elif pInstruct.pProc.FullName == "round": # ROUND CppText += "round%s(%s)" % (NumTypeMath, ArgText[0]) elif pInstruct.pProc.FullName == "setbackground": # SETBACKGROUND codetext = self.GetCppBuiltinSetColor(IndentText, pInstruct.Arguments[0], "tt_ColorBackground") if codetext is None: return None CppText += codetext CppText += IndentText + "if (tt_PenPaint == false)\n" CppText += IndentText + " " * self.IndentSize + "glColor3ubv(tt_ColorBackground);\n" elif pInstruct.pProc.FullName == "setfont": # SETFONT CppText += IndentText + "tt_Font = %s;\n" % ArgText[0] elif pInstruct.pProc.FullName == "setfontheight": # SETFONTHEIGHT CppText += IndentText + "tt_FontHeight = %s;\n" % ArgText[0] elif pInstruct.pProc.FullName == "setheading": # SETHEADING CppText += IndentText + "tt_TurtleDir = %s;\n" % ArgText[0] elif pInstruct.pProc.FullName == "setitem": # SETITEM if pInstruct.Arguments[1].Elements[0].Type != ElemType.VAR_VALUE: print "Syntax error: destination array for SETITEM instruction can only be a variable" return None if pInstruct.Arguments[1].Elements[0].pVariable.ArrayDim != 1: print "Logical error: Array '%s' in SETITEM instruction is not 1-dimensional" % pInstruct.Arguments[1].Elements[0].Text return None CppText += IndentText + "%s.Set(%s, (int) (%s));\n" % (ArgText[1], ArgText[2], ArgText[0]) elif pInstruct.pProc.FullName == "setjustifyvert": # SETJUSTIFYVERT CppText += IndentText + "tt_JustifyVert = %s;\n" % ArgText[0] elif pInstruct.pProc.FullName == "setjustifyhorz": # SETJUSTIFYHORZ CppText += IndentText + "tt_JustifyHorz = %s;\n" % ArgText[0] elif pInstruct.pProc.FullName == "setpencolor": # SETPENCOLOR codetext = self.GetCppBuiltinSetColor(IndentText, pInstruct.Arguments[0], "tt_ColorPen") if codetext is None: return None CppText += codetext CppText += IndentText + "if (tt_PenPaint == true)\n" CppText += NextIndent + "glColor3ubv(tt_ColorPen);\n" elif pInstruct.pProc.FullName == "setpensize": # SETPENSIZE CppText += IndentText + "glEnd();\n" CppText += IndentText + "glLineWidth(%s);\n" % ArgText[0] CppText += IndentText + "glBegin(GL_LINES);\n" elif pInstruct.pProc.FullName == "setpos": # SETPOS Arg = pInstruct.Arguments[0] elem0type = Arg.Elements[0].Type UpdateTurtle = "" if elem0type == ElemType.NUMBER: if len(Arg.Elements) != 2: print "Syntax error: SETPOS instruction takes an immediate list with exactly 2 numbers, but %i were given." % len(Arg.Elements) return None for i in range(2): UpdateTurtle += NextIndent + "tt_TurtlePos[%i] = %s;\n" % (i, Arg.Elements[i].Text) elif elem0type == ElemType.VAR_VALUE: UpdateTurtle += NextIndent + "tt_TurtlePos[0] = %s[0];\n" % (Arg.Elements[0].pVariable.CppName) UpdateTurtle += NextIndent + "tt_TurtlePos[1] = %s[1];\n" % (Arg.Elements[0].pVariable.CppName) elif elem0type == ElemType.FUNC_CALL: my_temp = self.LogoState.TempIdx self.LogoState.TempIdx += 1 codetext = self.GetCppInstruction(Arg.Elements[0].pInstruct, 0, False) if codetext is None: return None UpdateTurtle += NextIndent + "CList<%s> templist%02i = %s;\n" % (self.LogoState.NumType, my_temp, codetext) UpdateTurtle += NextIndent + "tt_TurtlePos[0] = templist%02i[0];\n" % my_temp UpdateTurtle += NextIndent + "tt_TurtlePos[1] = templist%02i[1];\n" % my_temp else: print "Internal error: invalid element type %i '%s' in a List argument for SETPOS." % (elem0type, ElemType.Names[elem0type]) return None CppText += self.GetCppBuiltinJump(IndentText, UpdateTurtle) elif pInstruct.pProc.FullName == "setscrunch": # SETSCRUNCH CppText += IndentText + "tt_ScrunchXY[0] = %s;\n" % ArgText[0] CppText += IndentText + "tt_ScrunchXY[1] = %s;\n" % ArgText[1] elif pInstruct.pProc.FullName == "setxy": # SETXY UpdateTurtle = NextIndent + "tt_TurtlePos[0] = %s;\n" % ArgText[0] UpdateTurtle += NextIndent + "tt_TurtlePos[1] = %s;\n" % ArgText[1] CppText += self.GetCppBuiltinJump(IndentText, UpdateTurtle) elif pInstruct.pProc.FullName == "setx": # SETX UpdateTurtle = NextIndent + "tt_TurtlePos[0] = %s;\n" % ArgText[0] CppText += self.GetCppBuiltinJump(IndentText, UpdateTurtle) elif pInstruct.pProc.FullName == "sety": # SETY UpdateTurtle = NextIndent + "tt_TurtlePos[1] = %s;\n" % ArgText[0] CppText += self.GetCppBuiltinJump(IndentText, UpdateTurtle) elif pInstruct.pProc.FullName == "sin": # SIN CppText += "sin%s((%s) * tt_RadDegree)" % (NumTypeMath, ArgText[0]) elif pInstruct.pProc.FullName == "sqrt": # SQRT CppText += "sqrt%s(%s)" % (NumTypeMath, ArgText[0]) elif pInstruct.pProc.FullName == "stop": # STOP CppText += IndentText + "return;\n" elif pInstruct.pProc.FullName == "sum": # SUM CppText += "(%s)" % ArgText[0] for argtext in ArgText[1:]: CppText += " + (%s)" % argtext elif pInstruct.pProc.FullName == "tag": # TAG CppText += "tag_%s:\n" % ArgText[0][1:-1] elif pInstruct.pProc.FullName == "test": # TEST CppText += IndentText + "tt_TestValue = (bool) (%s);\n" % ArgText[0] elif pInstruct.pProc.FullName == "towards": # TOWARDS Arg = pInstruct.Arguments[0] elem0type = Arg.Elements[0].Type if elem0type == ElemType.NUMBER: if len(Arg.Elements) != 2: print "Syntax error: TOWARDS instruction takes an immediate list with exactly 2 numbers, but %i were given." % len(Arg.Elements) return None CppText += "(atan2(%s - tt_TurtlePos[0], %s - tt_TurtlePos[1])*tt_DegreeRad)" % (Arg.Elements[0].Text, Arg.Elements[1].Text) elif elem0type == ElemType.VAR_VALUE: CppText += "tt_Towards(%s)" % Arg.Elements[0].pVariable.CppName elif elem0type == ElemType.FUNC_CALL: codetext = self.GetCppInstruction(Arg.Elements[0].pInstruct, 0, False) if codetext is None: return None CppText += "tt_Towards(%s)" % codetext else: print "Internal error: invalid element type %i '%s' in a List argument for TOWARDS." % (elem0type, ElemType.Names[elem0type]) return None elif pInstruct.pProc.FullName == "wait": # WAIT CppText += IndentText + "SDL_Delay((int) ((%s) * 1000 / 60));\n" % ArgText[0] elif pInstruct.pProc.FullName in ("while", "until"): # WHILE, UNTIL if pInstruct.pProc.FullName == "while": CppText += IndentText + "while (%s) {\n" % ArgText[0] else: CppText += IndentText + "while (!(%s)) {\n" % ArgText[0] for instruct in pInstruct.Arguments[1].Elements[0].pInstruct: codetext = self.GetCppInstruction(instruct, iIndent + 1, True) if codetext is None: return None CppText += codetext CppText += IndentText + "}\n" elif pInstruct.pProc.FullName == "window": # WINDOW CppText += IndentText + "tt_UseWrap = false;\n" elif pInstruct.pProc.FullName == "wrap": # WRAP CppText += IndentText + "tt_UseWrap = true;\n" elif pInstruct.pProc.FullName == "xcor": # XCOR CppText += "tt_TurtlePos[0]" elif pInstruct.pProc.FullName == "ycor": # YCOR CppText += "tt_TurtlePos[1]" else: print "Internal error: built-in instruction named '%s' is not implemented" % pInstruct.Name return None return CppText | bababbffcfffb2cb7b8c7a966a17e88685da5c1d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2419/bababbffcfffb2cb7b8c7a966a17e88685da5c1d/tt_cppwriter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
39,
11858,
16409,
382,
11983,
12,
2890,
16,
293,
382,
1697,
16,
277,
7790,
4672,
28653,
1528,
273,
315,
315,
380,
261,
77,
7790,
380,
365,
18,
7790,
1225,
13,
4804,
7790,
273,
315... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
39,
11858,
16409,
382,
11983,
12,
2890,
16,
293,
382,
1697,
16,
277,
7790,
4672,
28653,
1528,
273,
315,
315,
380,
261,
77,
7790,
380,
365,
18,
7790,
1225,
13,
4804,
7790,
273,
315... |
if child.fileName==NEWFILE: child.saveAs() if child.fileName==NEWFILE: return | if child.isNew(): child.saveAs() if child.isNew(): return | def reference_in_blender(self): """Reference in blender""" if self.confirmSave(): return if self.isNew(): return if self.parentPanel.checkBlender(): import Blender child = self.app.childActive msg = "" #message text, that will be displayed on the status bar #Check: maybe it is a cmpletly new file?: if child.fileName==NEWFILE: child.saveAs() #It will be still named NEWFILE, if the user has declined to reference it if child.fileName==NEWFILE: return #nothing to do - user has changed his mind | fde13fc113d3937bf67c3b591d69f9a1b60bcece /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2464/fde13fc113d3937bf67c3b591d69f9a1b60bcece/Child.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2114,
67,
267,
67,
3083,
2345,
12,
2890,
4672,
3536,
2404,
316,
2811,
2345,
8395,
309,
365,
18,
10927,
4755,
13332,
327,
309,
365,
18,
291,
1908,
13332,
327,
309,
365,
18,
2938,
5537,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2114,
67,
267,
67,
3083,
2345,
12,
2890,
4672,
3536,
2404,
316,
2811,
2345,
8395,
309,
365,
18,
10927,
4755,
13332,
327,
309,
365,
18,
291,
1908,
13332,
327,
309,
365,
18,
2938,
5537,
... |
for layer in self.layers[-1::-1]: | for layer in self.layers: | def testSetUp(self): """A layer may define a setup method to be called before each individual test. """ for layer in self.layers[-1::-1]: if hasattr(layer, 'testSetUp'): layer.testSetUp() | 692d69b46acadd02ecc0810f85282f5a7aec22ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10007/692d69b46acadd02ecc0810f85282f5a7aec22ad/testrunner.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
694,
1211,
12,
2890,
4672,
3536,
37,
3018,
2026,
4426,
279,
3875,
707,
358,
506,
2566,
1865,
1517,
7327,
1842,
18,
3536,
364,
3018,
316,
365,
18,
10396,
30,
309,
3859,
12,
6363,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
694,
1211,
12,
2890,
4672,
3536,
37,
3018,
2026,
4426,
279,
3875,
707,
358,
506,
2566,
1865,
1517,
7327,
1842,
18,
3536,
364,
3018,
316,
365,
18,
10396,
30,
309,
3859,
12,
6363,
... |
self.write_breadcrumbs(out, 'trees') | self.write_breadcrumbs(out, 'trees', 'trees.html') | def write_trees(self, out): """ Write an HTML page containing the module and class hierarchies to the given streams. @param public: The output stream for the public version of the page. @param private: The output stream for the private version of the page. """ # Header material. self.write_header(out, 'Trees') self.write_navbar(out, 'trees') self.write_breadcrumbs(out, 'trees') | 5651a6f4c9af655549cee3af81b7c2c1e48b85d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/5651a6f4c9af655549cee3af81b7c2c1e48b85d8/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
17204,
12,
2890,
16,
596,
4672,
3536,
2598,
392,
3982,
1363,
4191,
326,
1605,
471,
667,
366,
5148,
606,
358,
326,
864,
8205,
18,
632,
891,
1071,
30,
1021,
876,
1407,
364,
326... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
17204,
12,
2890,
16,
596,
4672,
3536,
2598,
392,
3982,
1363,
4191,
326,
1605,
471,
667,
366,
5148,
606,
358,
326,
864,
8205,
18,
632,
891,
1071,
30,
1021,
876,
1407,
364,
326... |
_sybase.builder()(*args, **kw) | return _sybase.builder()(*args, **kw) | def SybaseConnection(*args, **kw): _warn('SybaseConnection is deprecated; use connectionForURI("sybase://...") or "from sqlobject.sybase import builder; SybaseConnection = builder()"') _sybase.builder()(*args, **kw) | 4d4fdf355502ca3f9e32051f44750c3644dea5a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8798/4d4fdf355502ca3f9e32051f44750c3644dea5a3/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16455,
1969,
1952,
30857,
1968,
16,
2826,
9987,
4672,
389,
8935,
2668,
10876,
1969,
1952,
353,
6849,
31,
999,
1459,
1290,
3098,
2932,
9009,
1969,
2207,
7070,
13,
578,
315,
2080,
4744,
383,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16455,
1969,
1952,
30857,
1968,
16,
2826,
9987,
4672,
389,
8935,
2668,
10876,
1969,
1952,
353,
6849,
31,
999,
1459,
1290,
3098,
2932,
9009,
1969,
2207,
7070,
13,
578,
315,
2080,
4744,
383,... |
filename += " - " + self.name | def calculateFilename(self): service_name = self.service_ref.getServiceName() begin_date = strftime("%Y%m%d %H%M", localtime(self.begin)) begin_shortdate = strftime("%Y%m%d", localtime(self.begin)) print "begin_date: ", begin_date print "service_name: ", service_name print "name:", self.name print "description: ", self.description filename = begin_date + " - " + service_name if self.name: filename += " - " + self.name if config.usage.setup_level.index >= 2: # expert+ if config.recording.filename_composition.value == "short": filename = begin_shortdate + " - " + self.name elif config.recording.filename_composition.value == "long": filename = begin_date + " - " + service_name + " - " + self.name + " - " + self.description else: filename += " - " + self.name # standard | 296d197199348f0f39834308768487ee4b9f0285 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/296d197199348f0f39834308768487ee4b9f0285/RecordTimer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4604,
5359,
12,
2890,
4672,
1156,
67,
529,
273,
365,
18,
3278,
67,
1734,
18,
588,
16789,
1435,
2376,
67,
712,
273,
10405,
27188,
61,
9,
81,
9,
72,
738,
44,
9,
49,
3113,
1191,
957,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4604,
5359,
12,
2890,
4672,
1156,
67,
529,
273,
365,
18,
3278,
67,
1734,
18,
588,
16789,
1435,
2376,
67,
712,
273,
10405,
27188,
61,
9,
81,
9,
72,
738,
44,
9,
49,
3113,
1191,
957,
... | |
return 0.5-0.5*cos(2.0*pi*n/(M-1)) def hamming(M): | w = 0.5-0.5*cos(2.0*pi*n/(M-1)) if not sym and not odd: w = w[:-1] return w def hamming(M,sym=1): | def hanning(M): """The M-point Hanning window. """ n = arange(0,M) return 0.5-0.5*cos(2.0*pi*n/(M-1)) | c910a765560a2edce76e1be8b2a9eead5b434b0d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/c910a765560a2edce76e1be8b2a9eead5b434b0d/signaltools.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
366,
10903,
12,
49,
4672,
3536,
1986,
490,
17,
1153,
670,
10903,
2742,
18,
3536,
290,
273,
9660,
12,
20,
16,
49,
13,
327,
374,
18,
25,
17,
20,
18,
25,
14,
14445,
12,
22,
18,
20,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
366,
10903,
12,
49,
4672,
3536,
1986,
490,
17,
1153,
670,
10903,
2742,
18,
3536,
290,
273,
9660,
12,
20,
16,
49,
13,
327,
374,
18,
25,
17,
20,
18,
25,
14,
14445,
12,
22,
18,
20,
... |
print "\t\treturn str(apply( self.__call__, args))" | print "\t\ttry:" print "\t\t\treturn str(apply( self.__call__, args))" print "\t\texcept pythoncom.com_error:" print "\t\t\treturn repr(self)" | print "\tdef __str__(self, *args):" | 7f6eba6b3b1a8b7fcf22b723dcb461477f722e08 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/7f6eba6b3b1a8b7fcf22b723dcb461477f722e08/genpy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1172,
1548,
88,
536,
1001,
701,
972,
12,
2890,
16,
380,
1968,
13,
2773,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1172,
1548,
88,
536,
1001,
701,
972,
12,
2890,
16,
380,
1968,
13,
2773,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
LE_MAGIC = 0x950412de BE_MAGIC = 0xde120495 | LE_MAGIC = 0x950412deL BE_MAGIC = 0xde120495L | def install(self, unicode=0): import __builtin__ __builtin__.__dict__['_'] = unicode and self.ugettext or self.gettext | 3f5e2f11ac43eaefcf057cddfc65684bdfa0ec5e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3f5e2f11ac43eaefcf057cddfc65684bdfa0ec5e/gettext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3799,
12,
2890,
16,
5252,
33,
20,
4672,
1930,
1001,
24553,
972,
1001,
24553,
972,
16186,
1576,
972,
3292,
67,
3546,
273,
5252,
471,
365,
18,
89,
29967,
578,
365,
18,
29967,
2,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3799,
12,
2890,
16,
5252,
33,
20,
4672,
1930,
1001,
24553,
972,
1001,
24553,
972,
16186,
1576,
972,
3292,
67,
3546,
273,
5252,
471,
365,
18,
89,
29967,
578,
365,
18,
29967,
2,
-100,
-1... |
zipopen = zipfp.open(TESTFN, 'rU') for line in zipopen: data2 += line | with zipfp.open(TESTFN, 'rU') as zipopen: for line in zipopen: data2 += line | def test_univeral_readaheads(self): f = io.BytesIO() | 00da94b6ed796d43d8a0465e223f639d495e9b68 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/00da94b6ed796d43d8a0465e223f639d495e9b68/test_zipfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
318,
1667,
287,
67,
896,
11617,
87,
12,
2890,
4672,
284,
273,
2527,
18,
2160,
4294,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
318,
1667,
287,
67,
896,
11617,
87,
12,
2890,
4672,
284,
273,
2527,
18,
2160,
4294,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
{% gravatar_for_email <email> [size] [rating] %} Example:: {% gravatar_for_email someone@example.com 48 pg %} """ gravatar_id = md5_constructor(email).hexdigest() gravatar_url = GRAVATAR_URL_PREFIX + gravatar_id parameters = [p for p in ( ('d', GRAVATAR_DEFAULT_IMAGE), ('s', size or GRAVATAR_DEFAULT_SIZE), ('r', rating or GRAVATAR_DEFAULT_RATING), ) if p[1]] if parameters: gravatar_url += '?' + urllib.urlencode(parameters, doseq=True) | if parameters: gravatar_url += '?' + urllib.urlencode(parameters, doseq=True) | def gravatar_for_email(email, size=None, rating=None): """ Generates a Gravatar URL for the given email address. Syntax:: {% gravatar_for_email <email> [size] [rating] %} Example:: {% gravatar_for_email someone@example.com 48 pg %} """ gravatar_id = md5_constructor(email).hexdigest() gravatar_url = GRAVATAR_URL_PREFIX + gravatar_id parameters = [p for p in ( ('d', GRAVATAR_DEFAULT_IMAGE), ('s', size or GRAVATAR_DEFAULT_SIZE), ('r', rating or GRAVATAR_DEFAULT_RATING), ) if p[1]] if parameters: gravatar_url += '?' + urllib.urlencode(parameters, doseq=True) return escape(url) | c20f12ac79daae75c64e55293e23f0fe8e6775af /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13889/c20f12ac79daae75c64e55293e23f0fe8e6775af/gravatar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3087,
26177,
67,
1884,
67,
3652,
12,
3652,
16,
963,
33,
7036,
16,
13953,
33,
7036,
4672,
3536,
31902,
279,
10812,
26177,
1976,
364,
326,
864,
2699,
1758,
18,
225,
11517,
2866,
225,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3087,
26177,
67,
1884,
67,
3652,
12,
3652,
16,
963,
33,
7036,
16,
13953,
33,
7036,
4672,
3536,
31902,
279,
10812,
26177,
1976,
364,
326,
864,
2699,
1758,
18,
225,
11517,
2866,
225,
309,
... |
def _expire(self): c = self.store.cursor() s = "delete from kv where time < '%s';" % self.cut c.execute(s) reactor.callLater(const.KE_DELAY, self.doExpire) | def _expire(self): c = self.store.cursor() s = "delete from kv where time < '%s';" % self.cut c.execute(s) reactor.callLater(const.KE_DELAY, self.doExpire) | def _expire(self): | 815cbec78a6e942fe1dd3e3ef1b578ab1c471873 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/665/815cbec78a6e942fe1dd3e3ef1b578ab1c471873/actions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
14070,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
14070,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
log(item[item.rfind('/') + 1:] + ' [ 0.00s ]') | log(name + ' [ 0.00s ]') | def runScriptPerfTests(options, testlist, largeData=False): failed = False for item in testlist: #$CHANDLERBIN/release/$RUN_CHANDLER --create --catch=tests # --profileDir="$PC_DIR" # --catsPerfLog="$TIME_LOG" # --scriptTimeout=600 # --scriptFile="$TESTNAME" &> $TESTLOG | e27584775e9860ade1078dd422f43f6170dbd662 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/e27584775e9860ade1078dd422f43f6170dbd662/rt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
3651,
22016,
14650,
12,
2116,
16,
1842,
1098,
16,
7876,
751,
33,
8381,
4672,
2535,
273,
1083,
225,
364,
761,
316,
1842,
1098,
30,
468,
8,
1792,
4307,
14668,
12615,
19,
9340,
11141,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
3651,
22016,
14650,
12,
2116,
16,
1842,
1098,
16,
7876,
751,
33,
8381,
4672,
2535,
273,
1083,
225,
364,
761,
316,
1842,
1098,
30,
468,
8,
1792,
4307,
14668,
12615,
19,
9340,
11141,... |
self.assertEquals(xmlEncoding.decode(None, '<x/>', loggedEvents), None) | self.assertEquals(xmlEncoding.decode(ctAX, None, '<x/>', loggedEvents), None) | def testNoDeclarationOrBOM(self): loggedEvents=[] self.assertEquals(xmlEncoding.decode(None, '<x/>', loggedEvents), None) self.assertEquals(len(loggedEvents), 1) self.assertEquals(loggedEvents[0].__class__, MissingEncoding, "Must warn if there's no clue as to encoding") | c9bc8bbd0880a77ea6553e5286a8d6b8bd59e622 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5012/c9bc8bbd0880a77ea6553e5286a8d6b8bd59e622/testXmlEncodingDecode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
2279,
6094,
1162,
38,
1872,
12,
2890,
4672,
7545,
3783,
33,
8526,
365,
18,
11231,
8867,
12,
2902,
4705,
18,
3922,
12,
299,
2501,
16,
599,
16,
2368,
92,
18280,
16,
7545,
3783,
363... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
2279,
6094,
1162,
38,
1872,
12,
2890,
4672,
7545,
3783,
33,
8526,
365,
18,
11231,
8867,
12,
2902,
4705,
18,
3922,
12,
299,
2501,
16,
599,
16,
2368,
92,
18280,
16,
7545,
3783,
363... |
cty.c_int, [cty.POINTER(FL_OBJECT), STRING, STRING, STRING, STRING], | cty.c_int, [cty.POINTER(FL_OBJECT), STRING, STRING, STRING, STRING], | def fl_set_xyplot_data_double(ob, x, y, n, title, xlabel, ylabel): """ fl_set_xyplot_data_double(ob, x, y, n, title, xlabel, ylabel) -> num. """ retval = _fl_set_xyplot_data_double(ob, x, y, n, title, xlabel, ylabel) return retval | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
67,
1698,
4032,
67,
892,
67,
9056,
12,
947,
16,
619,
16,
677,
16,
290,
16,
2077,
16,
16576,
16,
16305,
4672,
3536,
1183,
67,
542,
67,
1698,
4032,
67,
892,
67,
9056,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
67,
1698,
4032,
67,
892,
67,
9056,
12,
947,
16,
619,
16,
677,
16,
290,
16,
2077,
16,
16576,
16,
16305,
4672,
3536,
1183,
67,
542,
67,
1698,
4032,
67,
892,
67,
9056,
... |
error_rc, _, _ = self.runcmd_unchecked("touch testtmp.m; " + _gcc + " -c testtmp.m -o /dev/null") | error_rc, _, _ = self.runcmd_unchecked( "touch testtmp.m; " + "rm -f testtmp.o; " + _gcc + " -x objective-c -c testtmp.m -o /dev/null && " + "test -f testtmp.o" ) | def runtest(self): # Don't try to run the test if GNU Objective C is not installed error_rc, _, _ = self.runcmd_unchecked("touch testtmp.m; " + _gcc + " -c testtmp.m -o /dev/null") if error_rc != 0: raise comfychair.NotRunError ('GNU Objective C not installed') else: Compilation_Case.runtest (self) | 72ea3e0b7cceab064f915e70854d65e4eba68baf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4521/72ea3e0b7cceab064f915e70854d65e4eba68baf/testdistcc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
3813,
12,
2890,
4672,
468,
7615,
1404,
775,
358,
1086,
326,
1842,
309,
611,
50,
57,
27941,
385,
353,
486,
5876,
555,
67,
1310,
16,
389,
16,
389,
273,
365,
18,
86,
551,
1264,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
3813,
12,
2890,
4672,
468,
7615,
1404,
775,
358,
1086,
326,
1842,
309,
611,
50,
57,
27941,
385,
353,
486,
5876,
555,
67,
1310,
16,
389,
16,
389,
273,
365,
18,
86,
551,
1264,
67... |
patch_file = join(buildenv.distdir, '0install/from-%s.patch' % orig_impl.get_version()) | patch_file = join(buildenv.metadir, 'from-%s.patch' % orig_impl.get_version()) | def do_build_internal(args): """build-internal""" import getpass, socket, time buildenv = BuildEnv() builddir = os.path.realpath('build') ensure_dir(buildenv.metadir) # Create build-environment.xml file root = buildenv.doc.documentElement info = buildenv.doc.createElementNS(XMLNS_0COMPILE, 'build-info') root.appendChild(buildenv.doc.createTextNode(' ')) root.appendChild(info) root.appendChild(buildenv.doc.createTextNode('\n')) info.setAttributeNS(None, 'time', time.strftime('%Y-%m-%d %H:%M').strip()) info.setAttributeNS(None, 'host', socket.getfqdn()) info.setAttributeNS(None, 'user', getpass.getuser()) uname = os.uname() info.setAttributeNS(None, 'arch', '%s-%s' % (uname[0], uname[4])) buildenv.doc.writexml(file(join(buildenv.metadir, 'build-environment.xml'), 'w')) # Create local binary interface file src_iface = iface_cache.get_interface(buildenv.interface) write_sample_interface(src_iface, buildenv.local_iface_file, buildenv.chosen_impl(buildenv.interface)) # Create the patch orig_impl = buildenv.chosen_impl(buildenv.interface) patch_file = join(buildenv.distdir, '0install/from-%s.patch' % orig_impl.get_version()) if os.path.isdir('src'): orig_src = lookup(orig_impl.id) # (ignore errors; will already be shown on stderr) os.system("diff -urN '%s' src > %s" % (orig_src.replace('\\', '\\\\').replace("'", "\\'"), patch_file)) if os.path.getsize(patch_file) == 0: os.unlink(patch_file) elif os.path.exists(patch_file): os.unlink(patch_file) env('BUILDDIR', builddir) env('DISTDIR', buildenv.distdir) env('SRCDIR', buildenv.srcdir) os.chdir(builddir) for needed_iface in buildenv.interfaces: impl = buildenv.chosen_impl(needed_iface) assert impl for dep in impl.dependencies.values(): dep_iface = buildenv.interfaces[dep.interface] for b in dep.bindings: if isinstance(b, EnvironmentBinding): dep_impl = buildenv.chosen_impl(dep.interface) do_env_binding(b, lookup(dep_impl.id)) if args == ['--shell']: spawn_and_check(find_in_path('sh'), []) else: command = buildenv.root_impl.metadata['command'] print "Executing: " + command if os.system(command): raise SafeException("Build command '%s' failed (non-zero exit status)" % command) | 9f228e86315dc97afa2066178728c67b93d0b930 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11549/9f228e86315dc97afa2066178728c67b93d0b930/build.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
3510,
67,
7236,
12,
1968,
4672,
3536,
3510,
17,
7236,
8395,
1930,
31889,
16,
2987,
16,
813,
225,
1361,
3074,
273,
3998,
3491,
1435,
225,
25666,
330,
449,
481,
273,
1140,
18,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
3510,
67,
7236,
12,
1968,
4672,
3536,
3510,
17,
7236,
8395,
1930,
31889,
16,
2987,
16,
813,
225,
1361,
3074,
273,
3998,
3491,
1435,
225,
25666,
330,
449,
481,
273,
1140,
18,
8... |
Graph on 3 vertices | Subgraph of (Complete graph): Graph on 3 vertices | def subgraph(self, vertices, inplace=False, create_using=None): """ Returns the subgraph induced by the given vertices. | 9d36d03b3ab7f06625c58cdce4e33c649f2fc772 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/9d36d03b3ab7f06625c58cdce4e33c649f2fc772/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21469,
12,
2890,
16,
6928,
16,
11783,
33,
8381,
16,
752,
67,
9940,
33,
7036,
4672,
3536,
2860,
326,
21469,
1547,
26372,
635,
326,
864,
6928,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21469,
12,
2890,
16,
6928,
16,
11783,
33,
8381,
16,
752,
67,
9940,
33,
7036,
4672,
3536,
2860,
326,
21469,
1547,
26372,
635,
326,
864,
6928,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
dayStartTime = currentTime - (currentTime - timezoneOffset) % 86400 | currentTime = time.time() dayStartTime = currentTime - (currentTime - TIMEZONE_OFFSET) % 86400 | def run(self): """ Redraws the display, coalescing updates if events are rapidly logged (for instance running at the DEBUG runlevel) while also being immediately responsive if additions are less frequent. """ timezoneOffset = time.altzone if time.localtime()[8] else time.timezone currentTime = time.time() # unix time for the start of the current day (local time), used so we # can redraw when the date changes dayStartTime = currentTime - (currentTime - timezoneOffset) % 86400 while not self._halt: currentTime = time.time() timeSinceReset = currentTime - self._lastUpdate maxLogUpdateRate = self._config["features.log.maxRefreshRate"] / 1000.0 sleepTime = 0 if (self.msgLog == self._lastLoggedEvents and currentTime < dayStartTime + 86401) or self._isPaused: sleepTime = 5 elif timeSinceReset < maxLogUpdateRate: sleepTime = max(0.05, maxLogUpdateRate - timeSinceReset) if sleepTime: self._cond.acquire() if not self._halt: self._cond.wait(sleepTime) self._cond.release() else: dayStartTime = currentTime - (currentTime - timezoneOffset) % 86400 self.redraw(True) | aeb6eee1c71f0c35308971cc1a0235edf35087a4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13459/aeb6eee1c71f0c35308971cc1a0235edf35087a4/logPanel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
3536,
4621,
1899,
87,
326,
2562,
16,
1825,
287,
742,
310,
4533,
309,
2641,
854,
767,
6610,
715,
7545,
261,
1884,
791,
3549,
622,
326,
6369,
1086,
2815,
13,
1323,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
3536,
4621,
1899,
87,
326,
2562,
16,
1825,
287,
742,
310,
4533,
309,
2641,
854,
767,
6610,
715,
7545,
261,
1884,
791,
3549,
622,
326,
6369,
1086,
2815,
13,
1323,
... |
termios.tcsetattr(fd, termios.TCSADRAIN, new) | termios.tcsetattr(fd, tcsetattr_flags, new) | def unix_getpass(prompt='Password: ', stream=None): """Prompt for a password, with echo turned off. Args: prompt: Written on stream to ask for the input. Default: 'Password: ' stream: A writable file object to display the prompt. Defaults to the tty. If no tty is available defaults to sys.stderr. Returns: The seKr3t input. Raises: EOFError: If our input tty or stdin was closed. GetPassWarning: When we were unable to turn echo off on the input. Always restores terminal settings before returning. """ fd = None tty = None try: # Always try reading and writing directly on the tty first. fd = os.open('/dev/tty', os.O_RDWR|os.O_NOCTTY) tty = os.fdopen(fd, 'w+', 1) input = tty if not stream: stream = tty except EnvironmentError, e: # If that fails, see if stdin can be controlled. try: fd = sys.stdin.fileno() except (AttributeError, ValueError): passwd = fallback_getpass(prompt, stream) input = sys.stdin if not stream: stream = sys.stderr if fd is not None: passwd = None try: old = termios.tcgetattr(fd) # a copy to save new = old[:] new[3] &= ~termios.ECHO # 3 == 'lflags' try: termios.tcsetattr(fd, termios.TCSADRAIN, new) passwd = _raw_input(prompt, stream, input=input) finally: termios.tcsetattr(fd, termios.TCSADRAIN, old) except termios.error, e: if passwd is not None: # _raw_input succeeded. The final tcsetattr failed. Reraise # instead of leaving the terminal in an unknown state. raise # We can't control the tty or stdin. Give up and use normal IO. # fallback_getpass() raises an appropriate warning. del input, tty # clean up unused file objects before blocking passwd = fallback_getpass(prompt, stream) stream.write('\n') return passwd | a045ad8541d4949a4ae61302f42a0ccb815d4540 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/a045ad8541d4949a4ae61302f42a0ccb815d4540/getpass.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9753,
67,
588,
5466,
12,
13325,
2218,
3913,
30,
2265,
1407,
33,
7036,
4672,
3536,
15967,
364,
279,
2201,
16,
598,
3376,
21826,
3397,
18,
225,
6634,
30,
6866,
30,
10423,
2253,
603,
1407,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9753,
67,
588,
5466,
12,
13325,
2218,
3913,
30,
2265,
1407,
33,
7036,
4672,
3536,
15967,
364,
279,
2201,
16,
598,
3376,
21826,
3397,
18,
225,
6634,
30,
6866,
30,
10423,
2253,
603,
1407,
... |
checkValue(parser, "/code/consts/item[0]", 42), checkValue(parser, "/code/stack_size", 4), checkValue(parser, "/code/consts/item[1]", 2535301200456458802993406410752L), checkValue(parser, "/code/consts/item[4]", 0.3j), checkValue(parser, "/code/consts/item[8]", "abc"), checkValue(parser, "/code/filename", "pyc_example.py")) | checkValue(parser, "/content/consts/item[0]", 42), checkValue(parser, "/content/stack_size", 4), checkValue(parser, "/content/consts/item[1]", 2535301200456458802993406410752L), checkValue(parser, "/content/consts/item[4]", 0.3j), checkValue(parser, "/content/consts/item[8]", "abc"), checkValue(parser, "/content/filename", "pyc_example.py")) | def checkPYC(parser): return ( checkValue(parser, "/code/consts/item[0]", 42), checkValue(parser, "/code/stack_size", 4), checkValue(parser, "/code/consts/item[1]", 2535301200456458802993406410752L), checkValue(parser, "/code/consts/item[4]", 0.3j), checkValue(parser, "/code/consts/item[8]", "abc"), checkValue(parser, "/code/filename", "pyc_example.py")) | da9143a9ed54c04e14f9c94ba135db5a477ee433 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/da9143a9ed54c04e14f9c94ba135db5a477ee433/run_testcase.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
16235,
39,
12,
4288,
4672,
327,
261,
866,
620,
12,
4288,
16,
2206,
1745,
19,
10248,
87,
19,
1726,
63,
20,
65,
3113,
14856,
3631,
866,
620,
12,
4288,
16,
2206,
1745,
19,
3772,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
16235,
39,
12,
4288,
4672,
327,
261,
866,
620,
12,
4288,
16,
2206,
1745,
19,
10248,
87,
19,
1726,
63,
20,
65,
3113,
14856,
3631,
866,
620,
12,
4288,
16,
2206,
1745,
19,
3772,
67... |
guid = codguid | guid = codguid | def OnJ(self, action, data, match=None): # COD4 stores the PBID in the log file codguid = match.group('guid') cid = match.group('cid') | 062ba95e19919a3253be183f631d4796d8eaa0df /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12909/062ba95e19919a3253be183f631d4796d8eaa0df/cod4.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
46,
12,
2890,
16,
1301,
16,
501,
16,
845,
33,
7036,
4672,
468,
385,
1212,
24,
9064,
326,
20819,
734,
316,
326,
613,
585,
11012,
14066,
273,
845,
18,
1655,
2668,
14066,
6134,
7504... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
46,
12,
2890,
16,
1301,
16,
501,
16,
845,
33,
7036,
4672,
468,
385,
1212,
24,
9064,
326,
20819,
734,
316,
326,
613,
585,
11012,
14066,
273,
845,
18,
1655,
2668,
14066,
6134,
7504... |
result[meeting_id]["alarms"] = alarm_obj.export_cal(cr, uid, alarm_ids) | result[meeting_id]["alarms"] = alarm_obj.export_cal(cr, uid, alarm_ids) | def _get_data(self, cr, uid, ids, name, arg, context): result = {} attendee_obj = self.pool.get('calendar.attendee') alarm_obj = self.pool.get('calendar.alarm') model_obj = self.pool.get('ir.model') model_id = model_obj.search(cr, uid, [('model','=',self._name)])[0] for meeting_id in ids: result[meeting_id] = {} if "attendees" in name: attendee_ids = attendee_obj.search(cr, uid, [('ref','=','%s,%d'%(self._name, meeting_id))]) result[meeting_id]["attendees"] = attendee_obj.export_cal(cr, uid, attendee_ids) if "alarms" in name: alarm_ids = alarm_obj.search(cr, uid, [('model_id','=',model_id), ('res_id','=',meeting_id)]) result[meeting_id]["alarms"] = alarm_obj.export_cal(cr, uid, alarm_ids) return result | 75258015cae6ae0d493e7eb6204a16eafed73cd9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/75258015cae6ae0d493e7eb6204a16eafed73cd9/crm_meeting.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
892,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
1501,
16,
819,
4672,
563,
273,
2618,
27645,
20953,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
11650,
18,
101... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
892,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
1501,
16,
819,
4672,
563,
273,
2618,
27645,
20953,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
11650,
18,
101... |
if type(cmd) == type(''): cmd = ['/bin/sh', '-c', cmd] | _cleanup() | def __init__(self, cmd, capturestderr=0, bufsize=-1): """The parameter 'cmd' is the shell command to execute in a sub-process. The 'capturestderr' flag, if true, specifies that the object should capture standard error output of the child process. The default is false. If the 'bufsize' parameter is specified, it specifies the size of the I/O buffers to/from the child process.""" if type(cmd) == type(''): cmd = ['/bin/sh', '-c', cmd] p2cread, p2cwrite = os.pipe() c2pread, c2pwrite = os.pipe() if capturestderr: errout, errin = os.pipe() self.pid = os.fork() if self.pid == 0: # Child os.close(0) os.close(1) if os.dup(p2cread) <> 0: sys.stderr.write('popen2: bad read dup\n') if os.dup(c2pwrite) <> 1: sys.stderr.write('popen2: bad write dup\n') if capturestderr: os.close(2) if os.dup(errin) <> 2: pass for i in range(3, MAXFD): try: os.close(i) except: pass try: os.execvp(cmd[0], cmd) finally: os._exit(1) # Shouldn't come here, I guess os._exit(1) os.close(p2cread) self.tochild = os.fdopen(p2cwrite, 'w', bufsize) os.close(c2pwrite) self.fromchild = os.fdopen(c2pread, 'r', bufsize) if capturestderr: os.close(errin) self.childerr = os.fdopen(errout, 'r', bufsize) else: self.childerr = None self.sts = -1 # Child not completed yet _active.append(self) | 1848b6e465ce811cf66719c2d3c4e6b4a0d5c4d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1848b6e465ce811cf66719c2d3c4e6b4a0d5c4d1/popen2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1797,
16,
7477,
11241,
33,
20,
16,
1681,
1467,
29711,
21,
4672,
3536,
1986,
1569,
296,
4172,
11,
353,
326,
5972,
1296,
358,
1836,
316,
279,
720,
17,
2567... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1797,
16,
7477,
11241,
33,
20,
16,
1681,
1467,
29711,
21,
4672,
3536,
1986,
1569,
296,
4172,
11,
353,
326,
5972,
1296,
358,
1836,
316,
279,
720,
17,
2567... |
return self._registers[id] | return self._cpu.get_register(id) | def get_register(self, id): return self._registers[id] | fe5444ad1be23b1278c59fae3f1801fee998e581 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2230/fe5444ad1be23b1278c59fae3f1801fee998e581/registerallocator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4861,
12,
2890,
16,
612,
4672,
327,
365,
6315,
22559,
63,
350,
65,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4861,
12,
2890,
16,
612,
4672,
327,
365,
6315,
22559,
63,
350,
65,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
self.assertRaises(TypeError, array.array, 'b', str('foo', 'ascii')) a = array.array('u', str(r'\xa0\xc2\u1234', 'unicode-escape')) a.fromunicode(str(' ', 'ascii')) a.fromunicode(str('', 'ascii')) a.fromunicode(str('', 'ascii')) a.fromunicode(str(r'\x11abc\xff\u1234', 'unicode-escape')) | self.assertRaises(TypeError, array.array, 'b', 'foo') a = array.array('u', '\xa0\xc2\u1234') a.fromunicode(' ') a.fromunicode('') a.fromunicode('') a.fromunicode('\x11abc\xff\u1234') | def test_unicode(self): self.assertRaises(TypeError, array.array, 'b', str('foo', 'ascii')) | 1f05a3b7fb754d6b30300e1e50aeb92aabe6afd6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/1f05a3b7fb754d6b30300e1e50aeb92aabe6afd6/test_array.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9124,
12,
2890,
4672,
365,
18,
11231,
12649,
6141,
12,
19030,
16,
526,
18,
1126,
16,
296,
70,
2187,
609,
2668,
11351,
2187,
296,
9184,
26112,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9124,
12,
2890,
4672,
365,
18,
11231,
12649,
6141,
12,
19030,
16,
526,
18,
1126,
16,
296,
70,
2187,
609,
2668,
11351,
2187,
296,
9184,
26112,
2,
-100,
-100,
-100,
-100,
-100,
... |
- n -- an integer between 0 and 3, inclusive. | - ``n`` - an integer between 0 and 3, inclusive. | def gen(self, n): """ Return the n-th generator. | aa7c8c5c25a8f62637a37f480aa5f24e29d7fbee /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/aa7c8c5c25a8f62637a37f480aa5f24e29d7fbee/quaternion_algebra.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
12,
2890,
16,
290,
4672,
3536,
2000,
326,
290,
17,
451,
4456,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
12,
2890,
16,
290,
4672,
3536,
2000,
326,
290,
17,
451,
4456,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
output += self.dump_text(item.data.find(XHTML('body')), stylizer) | output += self.dump_text(item.data.find(XHTML('body')), stylizer, item) | def fb2mlize_spine(self): output = self.fb2_header() if 'titlepage' in self.oeb_book.guide: self.log.debug('Generating cover page...') href = self.oeb_book.guide['titlepage'].href item = self.oeb_book.manifest.hrefs[href] if item.spine_position is None: stylizer = Stylizer(item.data, item.href, self.oeb_book, self.opts.output_profile) output += self.dump_text(item.data.find(XHTML('body')), stylizer) for item in self.oeb_book.spine: self.log.debug('Converting %s to FictionBook2 XML' % item.href) stylizer = Stylizer(item.data, item.href, self.oeb_book, self.opts.output_profile) output += self.dump_text(item.data.find(XHTML('body')), stylizer) output += self.fb2_body_footer() output += self.fb2mlize_images() output += self.fb2_footer() return u'<?xml version="1.0" encoding="UTF-8"?>\n%s' % etree.tostring(etree.fromstring(output), encoding=unicode, pretty_print=True) | 3b23ff4518162815b5a823918e2bbeb1fb42c4ab /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/3b23ff4518162815b5a823918e2bbeb1fb42c4ab/fb2ml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12754,
22,
781,
554,
67,
1752,
558,
12,
2890,
4672,
876,
273,
365,
18,
19192,
22,
67,
3374,
1435,
309,
296,
2649,
2433,
11,
316,
365,
18,
15548,
70,
67,
3618,
18,
12118,
30,
365,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12754,
22,
781,
554,
67,
1752,
558,
12,
2890,
4672,
876,
273,
365,
18,
19192,
22,
67,
3374,
1435,
309,
296,
2649,
2433,
11,
316,
365,
18,
15548,
70,
67,
3618,
18,
12118,
30,
365,
18,... |
self.tk.call(self._w, 'item', 'delete', entry, col) | self.tk.call(self._w, 'item', 'delete', entry, col) | def item_delete(self, entry, col): | b0e44d61d9e592e1acd6aa05eac9704ba5776f61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b0e44d61d9e592e1acd6aa05eac9704ba5776f61/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
761,
67,
3733,
12,
2890,
16,
1241,
16,
645,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
761,
67,
3733,
12,
2890,
16,
1241,
16,
645,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
def __init__(data = None) | def __init__(data = None): | def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 249) else quickfix.StringField.__init__(self, 249, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
4248,
29,
13,
469,
9549,
904,
18,
780,
974,
16186,
2738,
97... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
4248,
29,
13,
469,
9549,
904,
18,
780,
974,
16186,
2738,
97... |
self._update_window_title() | def on_select_tag(self, widget=None, row=None, col=None): #When you click on a tag, you want to unselect the tasks taglist, notag = self.get_selected_tags() if notag: newtag = ["notag"] else: if taglist and len(taglist) > 0: newtag = [taglist[0]] else: newtag = ['no_disabled_tag'] | 1bfa329f61ae82d2af78d8ff0bc35dc1017cd07d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8234/1bfa329f61ae82d2af78d8ff0bc35dc1017cd07d/browser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
4025,
67,
2692,
12,
2890,
16,
3604,
33,
7036,
16,
1027,
33,
7036,
16,
645,
33,
7036,
4672,
468,
9434,
1846,
4682,
603,
279,
1047,
16,
1846,
2545,
358,
640,
4025,
326,
4592,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
4025,
67,
2692,
12,
2890,
16,
3604,
33,
7036,
16,
1027,
33,
7036,
16,
645,
33,
7036,
4672,
468,
9434,
1846,
4682,
603,
279,
1047,
16,
1846,
2545,
358,
640,
4025,
326,
4592,
... | |
try: threadLocalCursor.execute("update reports set started_datetime = timestamp without time zone '%s', completed_datetime = timestamp without time zone '%s', success = False, processor_notes = '%s' where id = %s and date_processed = timestamp without time zone '%s'" % (startedDateTime, datetime.datetime.now(), message, reportId, date_processed)) threadLocalDatabaseConnection.commit() self.saveProcessedDumpJson(newReportRecordAsDict) except Exception: threadLocalDatabaseConnection.rollback() | try: threadLocalCursor.execute("update reports set started_datetime = timestamp without time zone '%s', completed_datetime = timestamp without time zone '%s', success = False, processor_notes = '%s' where id = %s and date_processed = timestamp without time zone '%s'" % (startedDateTime, datetime.datetime.now(), message, reportId, date_processed)) threadLocalDatabaseConnection.commit() self.saveProcessedDumpJson(newReportRecordAsDict) except Exception: threadLocalDatabaseConnection.rollback() | def processJob (self, jobTuple): """ This function is run only by a worker thread. Given a job, fetch a thread local database connection and the json document. Use these to create the record in the 'reports' table, then start the analysis of the dump file. | 14db2868eb7d421bea63ee4375bba4bca5978091 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12383/14db2868eb7d421bea63ee4375bba4bca5978091/processor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
2278,
261,
2890,
16,
1719,
9038,
4672,
3536,
1220,
445,
353,
1086,
1338,
635,
279,
4322,
2650,
18,
16803,
279,
1719,
16,
2158,
279,
2650,
1191,
2063,
1459,
471,
326,
1163,
1668,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
2278,
261,
2890,
16,
1719,
9038,
4672,
3536,
1220,
445,
353,
1086,
1338,
635,
279,
4322,
2650,
18,
16803,
279,
1719,
16,
2158,
279,
2650,
1191,
2063,
1459,
471,
326,
1163,
1668,
18... |
i = string.find(self.buf, '\n', self.pos) | i = self.buf.find('\n', self.pos) | def readline(self, length=None): if self.closed: raise ValueError, "I/O operation on closed file" if self.buflist: self.buf = self.buf + string.joinfields(self.buflist, '') self.buflist = [] i = string.find(self.buf, '\n', self.pos) if i < 0: newpos = self.len else: newpos = i+1 if length is not None: if self.pos + length < newpos: newpos = self.pos + length r = self.buf[self.pos:newpos] self.pos = newpos return r | c7ed0e3c1301fd27122e336eef7fd233526ccfc1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c7ed0e3c1301fd27122e336eef7fd233526ccfc1/StringIO.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12023,
12,
2890,
16,
769,
33,
7036,
4672,
309,
365,
18,
12204,
30,
1002,
2068,
16,
315,
45,
19,
51,
1674,
603,
4375,
585,
6,
309,
365,
18,
4385,
1098,
30,
365,
18,
4385,
273,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12023,
12,
2890,
16,
769,
33,
7036,
4672,
309,
365,
18,
12204,
30,
1002,
2068,
16,
315,
45,
19,
51,
1674,
603,
4375,
585,
6,
309,
365,
18,
4385,
1098,
30,
365,
18,
4385,
273,
365,
... |
cmd = cmd + ' "' + Maya5SDK + 'lib/Foundation.lib"' cmd = cmd + ' "' + Maya5SDK + 'lib/OpenMaya.lib"' cmd = cmd + ' "' + Maya5SDK + 'lib/OpenMayaAnim.lib"' | cmd = cmd + ' ' + Maya5SDK + 'lib/Foundation.lib' cmd = cmd + ' ' + Maya5SDK + 'lib/OpenMaya.lib' cmd = cmd + ' ' + Maya5SDK + 'lib/OpenMayaAnim.lib' | def CompileLink(dll=0, obj=[], opts=[], xdep=[]): if (dll==0): sys.exit("Syntax error in CompileLink directive") if (COMPILER=="MSVC7"): ALLTARGETS.append(PREFIX+"/bin/"+dll) lib = PREFIX+"/lib/"+dll[:-4]+".lib" dll = PREFIX+"/bin/"+dll wobj = [] for x in obj: suffix = x[-4:] if (suffix==".obj"): wobj.append(PREFIX+"/tmp/"+x) elif (suffix==".dll"): wobj.append(PREFIX+"/lib/"+x[:-4]+".lib") elif (suffix==".lib"): wobj.append(PREFIX+"/lib/"+x) elif (suffix==".res"): wobj.append(PREFIX+"/tmp/"+x) else: sys.exit("unknown suffix in object list.") if (older(dll, wobj+xdep)): cmd = 'link.exe /nologo /NODEFAULTLIB:LIBCI.LIB' if (dll[-4:]!=".exe"): cmd = cmd + " /DLL" if (OPTIMIZE==1): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRT.LIB " if (OPTIMIZE==2): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRT.LIB " if (OPTIMIZE==3): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRTD.LIB /OPT:REF " if (OPTIMIZE==4): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRTD.LIB /OPT:REF /LTCG " cmd = cmd + " /MAP /MAPINFO:EXPORTS /MAPINFO:LINES /fixed:no /incremental:no /stack:4194304 " if (opts.count("NOLIBCI")): cmd = cmd + " /NODEFAULTLIB:LIBCI.LIB " if (opts.count("MAXEGGDEF")): cmd = cmd + ' /DEF:pandatool/src/maxegg/MaxEgg.def' cmd = cmd + ' /OUT:"' + dll + '" /IMPLIB:"' + lib + '" /MAP:NUL' cmd = cmd + ' /LIBPATH:"' + PREFIX + '/python/libs" ' for x in wobj: cmd = cmd + ' "' + x + '"' if (dll[-4:]==".exe"): cmd = cmd + ' "' + PREFIX + '/tmp/pandaIcon.res"' if (opts.count("D3D8") or opts.count("D3D9") or opts.count("DXDRAW") or opts.count("DXSOUND") or opts.count("DXGUID")): cmd = cmd + ' /LIBPATH:"' + DIRECTXSDK + 'lib/x86"' cmd = cmd + ' /LIBPATH:"' + DIRECTXSDK + 'lib"' if (opts.count("D3D8")): cmd = cmd + ' d3d8.lib d3dx8.lib dxerr8.lib' if (opts.count("D3D9")): cmd = cmd + ' d3d9.lib d3dx9.lib dxerr9.lib' if (opts.count("DXDRAW")): cmd = cmd + ' ddraw.lib' if (opts.count("DXSOUND")): cmd = cmd + ' dsound.lib' if (opts.count("DXGUID")): cmd = cmd + ' dxguid.lib' if (opts.count("WINSOCK")): cmd = cmd + " wsock32.lib" if (opts.count("WINSOCK2")): cmd = cmd + " wsock32.lib ws2_32.lib" if (opts.count("WINCOMCTL")): cmd = cmd + ' comctl32.lib' if (opts.count("WINUSER")): cmd = cmd + " user32.lib" if (opts.count("WINMM")): cmd = cmd + " winmm.lib" if (opts.count("WINIMM")): cmd = cmd + " imm32.lib" if (opts.count("WINKERNEL")): cmd = cmd + " kernel32.lib" if (opts.count("WINOLDNAMES")): cmd = cmd + " oldnames.lib" if (opts.count("WINGDI")): cmd = cmd + " gdi32.lib" if (opts.count("ADVAPI")): cmd = cmd + " advapi32.lib" if (opts.count("GLUT")): cmd = cmd + " opengl32.lib glu32.lib" if (PkgSelected(opts,"ZLIB")): cmd = cmd + ' "' + THIRDPARTY + 'zlib/lib/libz.lib"' if (PkgSelected(opts,"PNG")): cmd = cmd + ' "' + THIRDPARTY + 'png/lib/libpng.lib"' if (PkgSelected(opts,"JPEG")): cmd = cmd + ' "' + THIRDPARTY + 'jpeg/lib/libjpeg.lib"' if (PkgSelected(opts,"TIFF")): cmd = cmd + ' "' + THIRDPARTY + 'tiff/lib/libtiff.lib"' if (PkgSelected(opts,"VRPN")): cmd = cmd + ' "' + THIRDPARTY + 'vrpn/lib/vrpn.lib"' cmd = cmd + ' "' + THIRDPARTY + 'vrpn/lib/quat.lib"' if (PkgSelected(opts,"FMOD")): cmd = cmd + ' "' + THIRDPARTY + 'fmod/lib/fmod.lib"' if (PkgSelected(opts,"MILES")): cmd = cmd + ' "' + THIRDPARTY + 'miles/lib/mss32.lib"' if (PkgSelected(opts,"NVIDIACG")): if (opts.count("CGGL")): cmd = cmd + ' "' + THIRDPARTY + 'nvidiacg/lib/cgGL.lib"' cmd = cmd + ' "' + THIRDPARTY + 'nvidiacg/lib/cg.lib"' if (PkgSelected(opts,"HELIX")): cmd = cmd + ' "' + THIRDPARTY + 'helix/lib/runtlib.lib"' cmd = cmd + ' "' + THIRDPARTY + 'helix/lib/syslib.lib"' cmd = cmd + ' "' + THIRDPARTY + 'helix/lib/contlib.lib"' cmd = cmd + ' "' + THIRDPARTY + 'helix/lib/debuglib.lib"' cmd = cmd + ' "' + THIRDPARTY + 'helix/lib/utillib.lib"' cmd = cmd + ' "' + THIRDPARTY + 'helix/lib/stlport_vc7.lib"' if (PkgSelected(opts,"NSPR")): cmd = cmd + ' "' + THIRDPARTY + 'nspr/lib/libnspr4.lib"' if (PkgSelected(opts,"SSL")): cmd = cmd + ' "' + THIRDPARTY + 'ssl/lib/ssleay32.lib"' cmd = cmd + ' "' + THIRDPARTY + 'ssl/lib/libeay32.lib"' if (PkgSelected(opts,"FREETYPE")): cmd = cmd + ' "' + THIRDPARTY + 'freetype/lib/libfreetype.lib"' if (PkgSelected(opts,"FFTW")): cmd = cmd + ' "' + THIRDPARTY + 'fftw/lib/rfftw.lib"' cmd = cmd + ' "' + THIRDPARTY + 'fftw/lib/fftw.lib"' if (PkgSelected(opts,"MAYA5")): cmd = cmd + ' "' + Maya5SDK + 'lib/Foundation.lib"' cmd = cmd + ' "' + Maya5SDK + 'lib/OpenMaya.lib"' cmd = cmd + ' "' + Maya5SDK + 'lib/OpenMayaAnim.lib"' if (PkgSelected(opts,"MAYA6")): cmd = cmd + ' "' + Maya6SDK + 'lib/Foundation.lib"' cmd = cmd + ' "' + Maya6SDK + 'lib/OpenMaya.lib"' cmd = cmd + ' "' + Maya6SDK + 'lib/OpenMayaAnim.lib"' for max in ["MAX5","MAX6","MAX7"]: if PkgSelected(opts,max): cmd = cmd + ' "' + MAXSDK[max] + 'lib/core.lib"' cmd = cmd + ' "' + MAXSDK[max] + 'lib/mesh.lib"' cmd = cmd + ' "' + MAXSDK[max] + 'lib/maxutil.lib"' cmd = cmd + ' "' + MAXSDK[max] + 'lib/paramblk2.lib"' oscmd(cmd) updatefiledate(dll) if ((OPTIMIZE == 1) and (dll[-4:]==".dll")): CopyFile(dll[:-4]+"_d.dll", dll) if (COMPILER=="LINUXA"): ALLTARGETS.append(PREFIX+"/lib/"+dll[:-4]+".so") if (dll[-4:]==".exe"): wdll = PREFIX+"/bin/"+dll[:-4] else: wdll = PREFIX+"/lib/"+dll[:-4]+".so" wobj = [] for x in obj: suffix = x[-4:] if (suffix==".obj"): wobj.append(PREFIX+"/tmp/"+x[:-4]+".o") elif (suffix==".dll"): wobj.append(PREFIX+"/lib/"+x[:-4]+".so") elif (suffix==".lib"): wobj.append(PREFIX+"/lib/"+x[:-4]+".a") else: sys.exit("unknown suffix in object list.") if (older(wdll, wobj+xdep)): if (dll[-4:]==".exe"): cmd = 'g++ -o "' + wdll + '" -L"' + PREFIX + '/lib"' else: cmd = 'g++ -shared -o "' + wdll + '" -L"' + PREFIX + '/lib"' for x in obj: suffix = x[-4:] if (suffix==".obj"): cmd = cmd + ' "' + PREFIX + '/tmp/' + x[:-4] + '.o"' elif (suffix==".dll"): cmd = cmd + ' -l' + x[3:-4] elif (suffix==".lib"): cmd = cmd + ' "' + PREFIX + '/lib/' + x[:-4] + '.a"' if (PkgSelected(opts,"FMOD")): cmd = cmd + ' -L"' + THIRDPARTY + 'fmod/lib" -lfmod-3.74' if (PkgSelected(opts,"NVIDIACG")): cmd = cmd + ' -L"' + THIRDPARTY + 'nvidiacg/lib" ' if (opts.count("CGGL")): cmd = cmd + " -lCgGL" cmd = cmd + " -lCg" if (PkgSelected(opts,"NSPR")): cmd = cmd + ' -L"' + THIRDPARTY + 'nspr/lib" -lpandanspr4' if (PkgSelected(opts,"ZLIB")): cmd = cmd + " -lz" if (PkgSelected(opts,"PNG")): cmd = cmd + " -lpng" if (PkgSelected(opts,"JPEG")): cmd = cmd + " -ljpeg" if (PkgSelected(opts,"TIFF")): cmd = cmd + " -ltiff" if (PkgSelected(opts,"SSL")): cmd = cmd + " -lssl" if (PkgSelected(opts,"FREETYPE")): cmd = cmd + " -lfreetype" if (PkgSelected(opts,"VRPN")): cmd = cmd + ' -L"' + THIRDPARTY + 'vrpn/lib" -lvrpn -lquat' if (PkgSelected(opts,"FFTW")): cmd = cmd + ' -L"' + THIRDPARTY + 'fftw/lib" -lrfftw -lfftw' if (opts.count("GLUT")): cmd = cmd + " -lGL -lGLU" oscmd(cmd) updatefiledate(wdll) | c85190276cd6a9b01b212e9fdd00c907bf653374 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/c85190276cd6a9b01b212e9fdd00c907bf653374/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16143,
2098,
12,
27670,
33,
20,
16,
1081,
22850,
6487,
1500,
22850,
6487,
619,
15037,
33,
8526,
4672,
309,
261,
27670,
631,
20,
4672,
2589,
18,
8593,
2932,
8070,
555,
316,
16143,
2098,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16143,
2098,
12,
27670,
33,
20,
16,
1081,
22850,
6487,
1500,
22850,
6487,
619,
15037,
33,
8526,
4672,
309,
261,
27670,
631,
20,
4672,
2589,
18,
8593,
2932,
8070,
555,
316,
16143,
2098,
8... |
'tclass : TEMPLATE OPEN templargspecs CLOSE class' | 'tclass : TEMPLATE LT templargspecs GT class' | def p_tclass_template(t): 'tclass : TEMPLATE OPEN templargspecs CLOSE class' t[0] = ['TEMPLATE_CLASS', t[3], t[5]] | 367505153c68ae57f68ccea93c03c7cb467e504a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13661/367505153c68ae57f68ccea93c03c7cb467e504a/blt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
293,
67,
88,
1106,
67,
3202,
12,
88,
4672,
296,
88,
1106,
294,
20835,
11807,
13988,
23172,
87,
19688,
667,
11,
268,
63,
20,
65,
273,
10228,
12205,
67,
5237,
2187,
268,
63,
23,
6487,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
293,
67,
88,
1106,
67,
3202,
12,
88,
4672,
296,
88,
1106,
294,
20835,
11807,
13988,
23172,
87,
19688,
667,
11,
268,
63,
20,
65,
273,
10228,
12205,
67,
5237,
2187,
268,
63,
23,
6487,
... |
print (Y1-Y2).max() | if verbose > 2: print (Y1-Y2).max() | def test_cdist_kulsinski_random(self): "Tests cdist(X, 'kulsinski') on random data." eps = 1e-07 # Get the data: the input matrix and the right output. X1 = eo['cdist-X1'] < 0.5 X2 = eo['cdist-X2'] < 0.5 Y1 = cdist(X1, X2, 'kulsinski') Y2 = cdist(X1, X2, 'test_kulsinski') print (Y1-Y2).max() self.failUnless(within_tol(Y1, Y2, eps)) | c3d85c07ed380f445f851652c8c4ee87f0b2dc45 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5882/c3d85c07ed380f445f851652c8c4ee87f0b2dc45/test_distance.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
4315,
376,
67,
79,
332,
87,
2679,
15299,
67,
9188,
12,
2890,
4672,
315,
14650,
276,
4413,
12,
60,
16,
296,
79,
332,
87,
2679,
15299,
6134,
603,
2744,
501,
1199,
7785,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
4315,
376,
67,
79,
332,
87,
2679,
15299,
67,
9188,
12,
2890,
4672,
315,
14650,
276,
4413,
12,
60,
16,
296,
79,
332,
87,
2679,
15299,
6134,
603,
2744,
501,
1199,
7785,
273,
... |
index = YT_VIDEO_FORMATS.index( "1080p" ) | index = YT_VIDEO_FORMATS.index( Prefs.Get('ytfmt') ) | def GetYouTubeVideo(video_id): yt_page = HTTP.Request(YT_VIDEO_PAGE % (video_id), cacheTime=1) t = re.findall('&t=([^&]+)', yt_page)[0] fmt_list = re.findall('&fmt_list=([^&]+)', yt_page)[0] fmt_list = String.Unquote(fmt_list, usePlus=False) fmts = re.findall('([0-9]+)[^,]*', fmt_list) index = YT_VIDEO_FORMATS.index( "1080p" ) if YT_FMT[index] in fmts: fmt = YT_FMT[index] else: for i in reversed( range(0, index+1) ): if str(YT_FMT[i]) in fmts: fmt = YT_FMT[i] break else: fmt = 5 url = YT_GET_VIDEO_URL % (video_id, t, fmt) Log('YouTube video URL --> ' + url) return url | 73820490b7c681857257eb5e2a48c6281bc5f9e2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14804/73820490b7c681857257eb5e2a48c6281bc5f9e2/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
6225,
27195,
10083,
12,
9115,
67,
350,
4672,
677,
88,
67,
2433,
273,
2239,
18,
691,
12,
61,
56,
67,
58,
27242,
67,
11219,
738,
261,
9115,
67,
350,
3631,
1247,
950,
33,
21,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
6225,
27195,
10083,
12,
9115,
67,
350,
4672,
677,
88,
67,
2433,
273,
2239,
18,
691,
12,
61,
56,
67,
58,
27242,
67,
11219,
738,
261,
9115,
67,
350,
3631,
1247,
950,
33,
21,
13,
... |
sqlValList.append( "%s=%s+%s" % ( fullFieldName, fullFieldName, value ) ) | sqlValList.append( "%s=%s+(%s*%s)" % ( fullFieldName, fullFieldName, value, proportion ) ) | def __updateBucket( self, typeName, startTime, bucketLength, keyValues, bucketValues, connObj = False ): """ Update a bucket when coming from the raw insert """ tableName = self.__getTableName( "bucket", typeName ) cmd = "UPDATE `%s` SET " % tableName sqlValList = [] for pos in range( len( self.dbCatalog[ typeName ][ 'values' ] ) ): valueField = self.dbCatalog[ typeName ][ 'values' ][ pos ] value = bucketValues[ pos ] fullFieldName = "`%s`.`%s`" % ( tableName, valueField ) sqlValList.append( "%s=%s+%s" % ( fullFieldName, fullFieldName, value ) ) sqlValList.append( "`%s`.`entriesInBucket`=`%s`.`entriesInBucket`+%s" % ( tableName, tableName, bucketValues[-1] ) ) cmd += ", ".join( sqlValList ) cmd += " WHERE `%s`.`startTime`='%s' AND `%s`.`bucketLength`='%s' AND " % ( tableName, startTime, tableName, bucketLength ) cmd += self.__generateSQLConditionForKeys( typeName, keyValues ) return self._update( cmd, conn = connObj ) | 37a787f2b59d8cdc5e90e22294460cff42def9bd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/37a787f2b59d8cdc5e90e22294460cff42def9bd/AccountingDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2725,
4103,
12,
365,
16,
8173,
16,
8657,
16,
2783,
1782,
16,
498,
1972,
16,
2783,
1972,
16,
1487,
2675,
273,
1083,
262,
30,
3536,
2315,
279,
2783,
1347,
19283,
628,
326,
1831,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2725,
4103,
12,
365,
16,
8173,
16,
8657,
16,
2783,
1782,
16,
498,
1972,
16,
2783,
1972,
16,
1487,
2675,
273,
1083,
262,
30,
3536,
2315,
279,
2783,
1347,
19283,
628,
326,
1831,
22... |
'where isForGXD = 1 and _Refs_key not in %s ' + \ 'and _AssayType_key in (1,2,3,4,5,6,8,9)' % (electronic), None) | 'where isForGXD = 1 and _Refs_key not in %s ' % (electronic) + \ 'and _AssayType_key in (1,2,3,4,5,6,8,9)' , None) | def assayTypeCounts(): # # Build a temp table to get the gene and assay counts. # db.sql('select _Assay_key, _AssayType_key, _Marker_key, source = "L" ' + \ 'into #gxdcounts ' + \ 'from GXD_Expression ' + \ 'where isForGXD = 1 and _Refs_key not in %s ' + \ 'and _AssayType_key in (1,2,3,4,5,6,8,9)' % (electronic), None) db.sql('insert into #gxdcounts ' + \ 'select _Assay_key, _AssayType_key, _Marker_key, source = "E" ' + \ 'from GXD_Expression ' + \ 'where isForGXD = 1 and _Refs_key in %s ' + \ 'and _AssayType_key in (1,2,3,4,5,6,8,9)' % (electronic), None) db.sql('create index idx1 on #gxdcounts(_Assay_key)', None) db.sql('create index idx2 on #gxdcounts(_AssayType_key)', None) db.sql('create index idx3 on #gxdcounts(_Marker_key)', None) db.sql('create index idx4 on #gxdcounts(source)', None) # # Get the gene and assay counts from the temp table. # cmd = [] cmd.append('select _AssayType_key, count(distinct _Marker_key) "count" ' + \ 'from #gxdcounts ' + \ 'group by _AssayType_key') cmd.append('select _AssayType_key, count(distinct _Assay_key) "count" ' + \ 'from #gxdcounts ' + \ 'where source = "L" ' + \ 'group by _AssayType_key') cmd.append('select _AssayType_key, count(distinct _Assay_key) "count" ' + \ 'from #gxdcounts ' + \ 'where source = "E" ' + \ 'group by _AssayType_key') results = db.sql(cmd,'auto') # # Add the gene counts for each assay type to a dictionary. # genes = {} for r in results[0]: genes[r['_AssayType_key']] = r['count'] # # Add the assay counts (literature and electronic submissions) for each # assay type to dictionaries. # assayLiter = {} for r in results[1]: assayLiter[r['_AssayType_key']] = r['count'] assayElect = {} for r in results[2]: assayElect[r['_AssayType_key']] = r['count'] # # Get the result counts from the GXD_Expression table. # cmd = [] cmd.append('select _AssayType_key, count(_Assay_key) "count" ' + \ 'from GXD_Expression ' + \ 'where isForGXD = 1 and _Refs_key not in %s ' + \ 'and _AssayType_key in (1,2,3,4,5,6,8,9)' % (electronic) + \ 'group by _AssayType_key') cmd.append('select _AssayType_key, count(_Assay_key) "count" ' + \ 'from GXD_Expression ' + \ 'where isForGXD = 1 and _Refs_key in %s ' + \ 'and _AssayType_key in (1,2,3,4,5,6,8,9)' % (electronic) + \ 'group by _AssayType_key') results = db.sql(cmd,'auto') # # Add the result counts (literature and electronic submission) for each # assay type to dictionaries. # resLiter = {} for r in results[0]: resLiter[r['_AssayType_key']] = r['count'] resElect = {} for r in results[1]: resElect[r['_AssayType_key']] = r['count'] # # Get the assay types in the order that they should appear in the # report. Also get the key for each assay to use as a lookup to get # the counts for each assay. # results = db.sql('select _AssayType_key, assayType ' + \ 'from GXD_AssayType ' + \ 'where _AssayType_key > 0 and _AssayType_key in (1,2,3,4,5,6,8,9) ' + \ 'order by assayType','auto') # # Print a heading for this section of the report. # fp.write(2*CRT + 'Number of Genes, Assays and Results by Assay Type:' + 2*CRT) fp.write(string.ljust(' ', 40)) fp.write(string.ljust('Assay', 10)) fp.write(string.ljust('Assay', 12)) fp.write(string.ljust('Assay', 12)) fp.write(string.ljust('Results', 10)) fp.write(string.ljust('Results', 12)) fp.write(string.ljust('Results', 12) + CRT) fp.write(string.ljust('Assay Type', 30)) fp.write(string.ljust('Genes', 10)) fp.write(string.ljust('Total', 10)) fp.write(string.ljust('Literature', 12)) fp.write(string.ljust('Submitted', 12)) fp.write(string.ljust('Total', 10)) fp.write(string.ljust('Literature', 12)) fp.write(string.ljust('Submitted', 12) + CRT) fp.write(string.ljust('----------------------------', 30)) fp.write(string.ljust('--------', 10)) fp.write(string.ljust('--------', 10)) fp.write(string.ljust('----------', 12)) fp.write(string.ljust('----------', 12)) fp.write(string.ljust('--------', 10)) fp.write(string.ljust('----------', 12)) fp.write(string.ljust('----------', 12) + CRT) # # Loop through each assay type and print the counts for the report. # for r in results: assayType = r['assayType'] assayTypeKey = r['_AssayType_key'] if genes.has_key(assayTypeKey): geneCount = genes[assayTypeKey] else: geneCount = 0 if assayLiter.has_key(assayTypeKey): assayLiterCount = assayLiter[assayTypeKey] else: assayLiterCount = 0 if assayElect.has_key(assayTypeKey): assayElectCount = assayElect[assayTypeKey] else: assayElectCount = 0 if resLiter.has_key(assayTypeKey): resLiterCount = resLiter[assayTypeKey] else: resLiterCount = 0 if resElect.has_key(assayTypeKey): resElectCount = resElect[assayTypeKey] else: resElectCount = 0 fp.write(string.ljust(assayType, 30)) fp.write(string.ljust(str(geneCount), 10)) fp.write(string.ljust(str(assayLiterCount+assayElectCount), 10)) fp.write(string.ljust(str(assayLiterCount), 12)) fp.write(string.ljust(str(assayElectCount), 12)) fp.write(string.ljust(str(resLiterCount+resElectCount), 10)) fp.write(string.ljust(str(resLiterCount), 12)) fp.write(string.ljust(str(resElectCount), 12) + CRT) | 1793da969b474b042e9c1a10792d75517b4a68aa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/340/1793da969b474b042e9c1a10792d75517b4a68aa/GXD_Stats.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1551,
528,
559,
9211,
13332,
225,
468,
468,
3998,
279,
1906,
1014,
358,
336,
326,
7529,
471,
1551,
528,
6880,
18,
468,
1319,
18,
4669,
2668,
4025,
389,
2610,
528,
67,
856,
16,
389,
261... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1551,
528,
559,
9211,
13332,
225,
468,
468,
3998,
279,
1906,
1014,
358,
336,
326,
7529,
471,
1551,
528,
6880,
18,
468,
1319,
18,
4669,
2668,
4025,
389,
2610,
528,
67,
856,
16,
389,
261... |
elif plugin['instance'] == None and plugin['state'] == True: | elif plugin['instance'] == None and plugin['state'] == True and not plugin['active']: | def recheckPlugins(self, plugins, plugin_api): for plugin in plugins: if plugin['instance'] != None and plugin['state'] == False: try: #print "deactivating plugin: " + plgin['name'] plugin['instance'].deactivate(plugin_api) plugin['instance'] = None except Exception, e: print "Error: %s" % e elif plugin['instance'] == None and plugin['state'] == True: try: #print "activating plugin: " + plgin['name'] if not plugin['error']: plugin['instance'] = plugin['class']() plugin['instance'].activate(plugin_api) else: plugin['state'] = False except Exception, e: print "Error: %s" % e | 0a84d1412c4ee633c48693de858ea2955b99d38c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7036/0a84d1412c4ee633c48693de858ea2955b99d38c/engine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
283,
1893,
9461,
12,
2890,
16,
4799,
16,
1909,
67,
2425,
4672,
364,
1909,
316,
4799,
30,
309,
1909,
3292,
1336,
3546,
480,
599,
471,
1909,
3292,
2019,
3546,
422,
1083,
30,
775,
30,
468... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
283,
1893,
9461,
12,
2890,
16,
4799,
16,
1909,
67,
2425,
4672,
364,
1909,
316,
4799,
30,
309,
1909,
3292,
1336,
3546,
480,
599,
471,
1909,
3292,
2019,
3546,
422,
1083,
30,
775,
30,
468... |
databytes += self.length(r) | databytes += max(0, self.length(r)) | def checksize(self): expected = 0 if self.count(): expected = self.end(self.count() - 1) | c2eed022559ad58fb1d54249976a9904b9660fbf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11312/c2eed022559ad58fb1d54249976a9904b9660fbf/revlog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
1467,
12,
2890,
4672,
2665,
273,
374,
309,
365,
18,
1883,
13332,
2665,
273,
365,
18,
409,
12,
2890,
18,
1883,
1435,
300,
404,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
1467,
12,
2890,
4672,
2665,
273,
374,
309,
365,
18,
1883,
13332,
2665,
273,
365,
18,
409,
12,
2890,
18,
1883,
1435,
300,
404,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
changeset = self.getItem(renamer.store, self['changeset'], Changeset) | changeset = getItem(renamer.store, self['changeset'], Changeset) | def process(self, renamer): changeset = self.getItem(renamer.store, self['changeset'], Changeset) logging.msg('Undoing: %s' % (changeset.asHumanly(),), verbosity=3) actions = list(changeset.getActions()) self.undoActions( renamer, changeset, reversed(actions)) | 5a5672fdc02e31a381f447be46c7e57cb49ca3ae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1270/5a5672fdc02e31a381f447be46c7e57cb49ca3ae/undo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
12,
2890,
16,
1654,
24458,
4672,
22463,
273,
8143,
12,
1187,
24458,
18,
2233,
16,
365,
3292,
6329,
278,
17337,
17776,
278,
13,
2907,
18,
3576,
2668,
31224,
310,
30,
738,
87,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
12,
2890,
16,
1654,
24458,
4672,
22463,
273,
8143,
12,
1187,
24458,
18,
2233,
16,
365,
3292,
6329,
278,
17337,
17776,
278,
13,
2907,
18,
3576,
2668,
31224,
310,
30,
738,
87,
11,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.