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 |
|---|---|---|---|---|---|---|
def commit(self, paths, log_message="", recurse=True, keep_locks=False): | def commit(self, paths, log_message="", recurse=False, keep_locks=False): | def commit(self, paths, log_message="", recurse=True, keep_locks=False): """ Commit a list of files to the repository. @type paths: list @param paths: A list of files/directories. @type log_message: string @param log_message: A commit log message. @type recurse: boolean @param recurse: Whether or not to recurse into sub-directories. @type keep_locks: boolean @param keep_locks: Whether or not to keep locks on commit. """ | 8455836add96e65adef6e98afd9f256353455af9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5119/8455836add96e65adef6e98afd9f256353455af9/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3294,
12,
2890,
16,
2953,
16,
613,
67,
2150,
1546,
3113,
11502,
33,
8381,
16,
3455,
67,
23581,
33,
8381,
4672,
3536,
10269,
279,
666,
434,
1390,
358,
326,
3352,
18,
225,
632,
723,
282,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3294,
12,
2890,
16,
2953,
16,
613,
67,
2150,
1546,
3113,
11502,
33,
8381,
16,
3455,
67,
23581,
33,
8381,
4672,
3536,
10269,
279,
666,
434,
1390,
358,
326,
3352,
18,
225,
632,
723,
282,... |
def setup(self, tarball='ctcs-1.3.1pre1.tar.bz2', length = '4h', | def setup(self, tarball='ctcs2.tar.bz2', length='4h', tc_opt='-k', | def setup(self, tarball='ctcs-1.3.1pre1.tar.bz2', length = '4h', tcf_contents=None): """ Builds the test suite, and sets up the control file that is going to be processed by the ctcs engine. @param tarball: CTCS tarball @param length: The amount of time we'll run the test suite @param tcf_contents: If the user wants to specify the contents of the CTCS control file, he could do so trough this parameter. If this parameter is provided, length is ignored. """ cerberus_tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(cerberus_tarball, self.srcdir) | 0322ee48cdb0b7cc570e294e49fad35236444bb4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10349/0322ee48cdb0b7cc570e294e49fad35236444bb4/cerberus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
12,
2890,
16,
29441,
2218,
299,
2143,
22,
18,
11718,
18,
25292,
22,
2187,
769,
2218,
24,
76,
2187,
1715,
67,
3838,
2218,
17,
79,
2187,
1715,
74,
67,
3980,
33,
7036,
4672,
3536,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3875,
12,
2890,
16,
29441,
2218,
299,
2143,
22,
18,
11718,
18,
25292,
22,
2187,
769,
2218,
24,
76,
2187,
1715,
67,
3838,
2218,
17,
79,
2187,
1715,
74,
67,
3980,
33,
7036,
4672,
3536,
... |
rv.modal = self.screen.modal | rv.modal = self.screen.modal and not self.hiding | def render(self, w, h, st, at): | 81ec2a6c35e0f8d1d334789cc21ae0780ccc53f6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10962/81ec2a6c35e0f8d1d334789cc21ae0780ccc53f6/screen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
341,
16,
366,
16,
384,
16,
622,
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,
1743,
12,
2890,
16,
341,
16,
366,
16,
384,
16,
622,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
albums = remove_list_duplicates(albums, False) albums.sort(locale.strcoll) for album in albums: self.browserdata.append(['album', album, escape_html(album)]) | (albums, years) = remove_list_duplicates(albums, years, False) albums2 = [] for i in range(len(albums)): albums2.append({'album':albums[i], 'year':years[i]}) albums2.sort(key=lambda x: x["year"]) for album in albums2: self.browserdata.append(['album', album['year'] + album['album'], escape_html(album['year'] + ' - ' + album['album'])]) | def browse(self, widget=None, root='/'): # Populates the library list with entries starting at root if not self.conn: return | 5702d6d9e3d709a24b93d00b466aeb171fa3d0c9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2312/5702d6d9e3d709a24b93d00b466aeb171fa3d0c9/sonata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21670,
12,
2890,
16,
3604,
33,
7036,
16,
1365,
2218,
2473,
4672,
468,
10264,
17099,
326,
5313,
666,
598,
3222,
5023,
622,
1365,
309,
486,
365,
18,
4646,
30,
327,
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,
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,
21670,
12,
2890,
16,
3604,
33,
7036,
16,
1365,
2218,
2473,
4672,
468,
10264,
17099,
326,
5313,
666,
598,
3222,
5023,
622,
1365,
309,
486,
365,
18,
4646,
30,
327,
2,
-100,
-100,
-100,
-... |
msg += self.eng.error | msg += str(self.eng.error) | def sendError(self): SITE_MAIL = self.eng.globals["SITE_MAIL"] SITE_NAME = self.eng.globals["SITE_NAME"] assert SITE_MAIL is not None, "must define SITE_MAIL first!" hr = "-" * 50 + "\n" msg = trim( """ To: %s From: cgi <%s> Subject: uncaught exception in %s | 520c8335a5a62f4c262820dd35143fd7894e9fca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8821/520c8335a5a62f4c262820dd35143fd7894e9fca/OutputDecorator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17538,
12,
2890,
4672,
23832,
67,
18191,
273,
365,
18,
24688,
18,
16227,
9614,
20609,
67,
18191,
11929,
23832,
67,
1985,
273,
365,
18,
24688,
18,
16227,
9614,
20609,
67,
1985,
11929,
1815,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
17538,
12,
2890,
4672,
23832,
67,
18191,
273,
365,
18,
24688,
18,
16227,
9614,
20609,
67,
18191,
11929,
23832,
67,
1985,
273,
365,
18,
24688,
18,
16227,
9614,
20609,
67,
1985,
11929,
1815,... |
name_load = str(eval(L[5:])) | name_load = _strip_quotes(L[5:]) | def preparse_file(contents, attached={}, magic=True, do_time=False, ignore_prompts=False): if not isinstance(contents, str): raise TypeError, "contents must be a string" assert isinstance(contents, str) # We keep track of which files have been loaded so far # in order to avoid a recursive load that would result # in creating a massive file and crashing. loaded_files = [] F = [] A = contents.splitlines() i = 0 while i < len(A): L = A[i].rstrip() if magic and L[:7] == "attach ": name = os.path.abspath(eval(L[7:])) try: if not attached.has_key(name): t = os.path.getmtime(name) attached[name] = t except IOError, OSError: pass L = 'load ' + L[7:] if magic and L[:5] == "load ": try: name_load = str(eval(L[5:])) except: name_load = L[5:].strip() if name_load in loaded_files: i += 1 continue loaded_files.append(name_load) if name_load[-3:] == '.py': _ip.magic('run -i "%s"'%name_load) L = '' elif name_load[-5:] == '.sage': try: G = open(name_load) except IOError: print "File '%s' not found, so skipping load of %s"%(name_load, name_load) i += 1 continue else: A = A[:i] + G.readlines() + A[i+1:] continue elif name_load[-5:] == '.spyx': import interpreter L = interpreter.load_cython(name_load) else: #print "Loading of '%s' not implemented (load .py, .spyx, and .sage files)"%name_load L = 'load("%s")'%name_load M = preparse(L, reset=(i==0), do_time=do_time, ignore_prompts=ignore_prompts) F.append(M) i += 1 # end while return '\n'.join(F) | 82f3a3323f0009d54b4d663e9386131922d9493a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/82f3a3323f0009d54b4d663e9386131922d9493a/preparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
675,
2670,
67,
768,
12,
3980,
16,
7495,
28793,
8146,
33,
5510,
16,
741,
67,
957,
33,
8381,
16,
2305,
67,
17401,
1092,
33,
8381,
4672,
309,
486,
1549,
12,
3980,
16,
609,
4672,
1002,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
675,
2670,
67,
768,
12,
3980,
16,
7495,
28793,
8146,
33,
5510,
16,
741,
67,
957,
33,
8381,
16,
2305,
67,
17401,
1092,
33,
8381,
4672,
309,
486,
1549,
12,
3980,
16,
609,
4672,
1002,
3... |
for entry in self.cfg.findall("Package"): | for entry in self.cfg.findall(".//Package"): | def Inventory(self): Toolset.Inventory(self) self.pkgwork = {'add':[], 'update':[], 'remove':[]} all = deepcopy(self.installed) desired = {} for entry in self.cfg.findall("Package"): desired[entry.attrib['name']] = entry | 5af69ab6c6973a33c6adccab114e062da731fffe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/5af69ab6c6973a33c6adccab114e062da731fffe/Debian.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24835,
12,
2890,
4672,
13288,
542,
18,
15059,
12,
2890,
13,
365,
18,
10657,
1252,
273,
13666,
1289,
4278,
63,
6487,
296,
2725,
4278,
63,
6487,
296,
4479,
4278,
8526,
97,
777,
273,
7217,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24835,
12,
2890,
4672,
13288,
542,
18,
15059,
12,
2890,
13,
365,
18,
10657,
1252,
273,
13666,
1289,
4278,
63,
6487,
296,
2725,
4278,
63,
6487,
296,
4479,
4278,
8526,
97,
777,
273,
7217,
... |
line = chrset_res.group(1) + \ CHARSET + chrset_res.group(3) | line = '%s%s%s' % (chrset_res.group(1), CHARSET, chrset_res.group(3)) | def mimify_part(ifile, ofile, is_mime): '''Convert an 8bit part of a MIME mail message to quoted-printable.''' has_cte = is_qp = is_base64 = 0 multipart = None must_quote_body = must_quote_header = has_iso_chars = 0 header = [] header_end = '' message = [] message_end = '' # read header hfile = HeaderFile(ifile) while 1: line = hfile.readline() if not line: break if not must_quote_header and iso_char.search(line): must_quote_header = 1 if mv.match(line): is_mime = 1 if cte.match(line): has_cte = 1 if qp.match(line): is_qp = 1 elif base64_re.match(line): is_base64 = 1 mp_res = mp.match(line) if mp_res: multipart = '--' + mp_res.group(1) if he.match(line): header_end = line break header.append(line) # read body while 1: line = ifile.readline() if not line: break if multipart: if line == multipart + '--\n': message_end = line break if line == multipart + '\n': message_end = line break if is_base64: message.append(line) continue if is_qp: while line[-2:] == '=\n': line = line[:-2] newline = ifile.readline() if newline[:len(QUOTE)] == QUOTE: newline = newline[len(QUOTE):] line = line + newline line = mime_decode(line) message.append(line) if not has_iso_chars: if iso_char.search(line): has_iso_chars = must_quote_body = 1 if not must_quote_body: if len(line) > MAXLEN: must_quote_body = 1 # convert and output header and body for line in header: if must_quote_header: line = mime_encode_header(line) chrset_res = chrset.match(line) if chrset_res: if has_iso_chars: # change us-ascii into iso-8859-1 if string.lower(chrset_res.group(2)) == 'us-ascii': line = chrset_res.group(1) + \ CHARSET + chrset_res.group(3) else: # change iso-8859-* into us-ascii line = chrset_res.group(1) + 'us-ascii' + chrset_res.group(3) if has_cte and cte.match(line): line = 'Content-Transfer-Encoding: ' if is_base64: line = line + 'base64\n' elif must_quote_body: line = line + 'quoted-printable\n' else: line = line + '7bit\n' ofile.write(line) if (must_quote_header or must_quote_body) and not is_mime: ofile.write('Mime-Version: 1.0\n') ofile.write('Content-Type: text/plain; ') if has_iso_chars: ofile.write('charset="%s"\n' % CHARSET) else: ofile.write('charset="us-ascii"\n') if must_quote_body and not has_cte: ofile.write('Content-Transfer-Encoding: quoted-printable\n') ofile.write(header_end) for line in message: if must_quote_body: line = mime_encode(line, 0) ofile.write(line) ofile.write(message_end) line = message_end while multipart: if line == multipart + '--\n': # read bit after the end of the last part while 1: line = ifile.readline() if not line: return if must_quote_body: line = mime_encode(line, 0) ofile.write(line) if line == multipart + '\n': nifile = File(ifile, multipart) mimify_part(nifile, ofile, 1) line = nifile.peek ofile.write(line) continue | 2e8ba6ce911f3ef7f45e05220f4eee09973936a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/2e8ba6ce911f3ef7f45e05220f4eee09973936a7/mimify.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20369,
1164,
67,
2680,
12,
430,
398,
16,
434,
398,
16,
353,
67,
11757,
4672,
9163,
2723,
392,
1725,
3682,
1087,
434,
279,
13195,
4791,
883,
358,
9298,
17,
1188,
429,
1093,
6309,
711,
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,
20369,
1164,
67,
2680,
12,
430,
398,
16,
434,
398,
16,
353,
67,
11757,
4672,
9163,
2723,
392,
1725,
3682,
1087,
434,
279,
13195,
4791,
883,
358,
9298,
17,
1188,
429,
1093,
6309,
711,
6... |
def __init__(self): | def __init__(self, screen=PVRState): | def __init__(self): self.onPlayStateChanged.append(self.__playStateChanged) self.pvrStateDialog = self.session.instantiateDialog(PVRState) self.onShow.append(self.__mayShow) self.onHide.append(self.pvrStateDialog.hide) | d473ac65efdd6132ee6c023a7bf27263d349007d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/d473ac65efdd6132ee6c023a7bf27263d349007d/InfoBarGenerics.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5518,
33,
52,
10986,
1119,
4672,
365,
18,
265,
11765,
1119,
5033,
18,
6923,
12,
2890,
16186,
1601,
1119,
5033,
13,
365,
18,
84,
18090,
1119,
6353,
273,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5518,
33,
52,
10986,
1119,
4672,
365,
18,
265,
11765,
1119,
5033,
18,
6923,
12,
2890,
16186,
1601,
1119,
5033,
13,
365,
18,
84,
18090,
1119,
6353,
273,
3... |
request, response = self._getTypeCodes() binding.Send(url=uri, opname=None, obj=args or kwargs, | request, response = self._getTypeCodes(callinfo) if len(kwargs): args = kwargs binding.Send(url=uri, opname=None, obj=args, | def _call(self, name, *args, **kwargs): """Call the named remote web service method.""" if len(args) and len(kwargs): raise TypeError( 'Use positional or keyword argument only.' ) | 137979fe8efcb7320f1e57f92ccc0c7b297421da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/137979fe8efcb7320f1e57f92ccc0c7b297421da/ServiceProxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1991,
12,
2890,
16,
508,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
1477,
326,
4141,
2632,
3311,
1156,
707,
12123,
309,
562,
12,
1968,
13,
471,
562,
12,
4333,
4672,
1002,
3580,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1991,
12,
2890,
16,
508,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
1477,
326,
4141,
2632,
3311,
1156,
707,
12123,
309,
562,
12,
1968,
13,
471,
562,
12,
4333,
4672,
1002,
3580,
12... |
rej_inc_ids = self.browse(cr, uid, ids)[0].reject_ids for rej_inc_id in rej_inc_ids: for reject_id in rej_inc_id.reject_ids: if reject_id.to_disable: cr.execute("update res_partner_address set active=False where id = %s" %(ids[0])) cr.commit() | def write(self, cr, uid, ids, vals, context): result = super(res_partner_address, self).write(cr, uid, ids, vals, context) rej_inc_ids = self.browse(cr, uid, ids)[0].reject_ids for rej_inc_id in rej_inc_ids: for reject_id in rej_inc_id.reject_ids: if reject_id.to_disable: cr.execute("update res_partner_address set active=False where id = %s" %(ids[0])) cr.commit() return result | 99429485e34e55f951668022f7ab91e292831961 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/99429485e34e55f951668022f7ab91e292831961/dm_as_reject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
5773,
16,
819,
4672,
563,
273,
2240,
12,
455,
67,
31993,
67,
2867,
16,
365,
2934,
2626,
12,
3353,
16,
4555,
16,
3258,
16,
5773,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
5773,
16,
819,
4672,
563,
273,
2240,
12,
455,
67,
31993,
67,
2867,
16,
365,
2934,
2626,
12,
3353,
16,
4555,
16,
3258,
16,
5773,
16,
... | |
for category, items in chrome['nav'].items(): | for category, items in req.chrome['nav'].items(): | def populate_hdf(self, req): """Add chrome-related data to the HDF (deprecated).""" req.hdf['HTTP.PathInfo'] = req.path_info req.hdf['htdocs_location'] = req.chrome['htdocs_location'] | 280a7ae6656e7256af352ca2056260635647deed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/280a7ae6656e7256af352ca2056260635647deed/chrome.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6490,
67,
26428,
12,
2890,
16,
1111,
4672,
3536,
986,
18167,
17,
9243,
501,
358,
326,
21673,
261,
14089,
13,
12123,
1111,
18,
26428,
3292,
3693,
18,
743,
966,
3546,
273,
1111,
18,
803,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
26428,
12,
2890,
16,
1111,
4672,
3536,
986,
18167,
17,
9243,
501,
358,
326,
21673,
261,
14089,
13,
12123,
1111,
18,
26428,
3292,
3693,
18,
743,
966,
3546,
273,
1111,
18,
803,
... |
clause = '%s subtitle like "%%%s%%"' % (clause, searchstr) | if exact_match: clause = '%s subtitle="%s"' % (clause, searchstr) else: clause = '%s subtitle like "%%%s%%"' % (clause, searchstr) | def search(self, searchstr, by_chan=None, search_title=True, search_subtitle=True, search_description=True): """ Return a list of programs with a title similar to the given parameter. If by_chan is given, it has to be a valid channel id and only programs from this channel will be returned. Result is a list of Programs. This function will only return programs with a stop time greater the current time. """ if not (search_title or search_subtitle or search_description): return [] | 4de8c80486a5c6d0ad8e61e5774661b67f5d5e0f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/4de8c80486a5c6d0ad8e61e5774661b67f5d5e0f/guide.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
12,
2890,
16,
1623,
701,
16,
635,
67,
7472,
33,
7036,
16,
1623,
67,
2649,
33,
5510,
16,
1623,
67,
1717,
2649,
33,
5510,
16,
1623,
67,
3384,
33,
5510,
4672,
3536,
2000,
279,
666... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1623,
12,
2890,
16,
1623,
701,
16,
635,
67,
7472,
33,
7036,
16,
1623,
67,
2649,
33,
5510,
16,
1623,
67,
1717,
2649,
33,
5510,
16,
1623,
67,
3384,
33,
5510,
4672,
3536,
2000,
279,
666... |
self.src = None | self.src = src | def __init__(self, content_type=None, src=None, text=None, extension_elements=None, extension_attributes=None): """Constructor for Content Args: content_type: string src: string text: str The text data in the this element extension_elements: list A list of ExtensionElement instances extension_attributes: dict A dictionary of attribute value string pairs """ self.type = content_type self.src = None self.text = text self.extension_elements = extension_elements or [] self.extension_attributes = extension_attributes or {} | 5fc62ce827c7a9c69a3c1018115f4c7399fb9681 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6580/5fc62ce827c7a9c69a3c1018115f4c7399fb9681/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
913,
67,
723,
33,
7036,
16,
1705,
33,
7036,
16,
977,
33,
7036,
16,
2710,
67,
6274,
33,
7036,
16,
2710,
67,
4350,
33,
7036,
4672,
3536,
6293,
364,
3697,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
913,
67,
723,
33,
7036,
16,
1705,
33,
7036,
16,
977,
33,
7036,
16,
2710,
67,
6274,
33,
7036,
16,
2710,
67,
4350,
33,
7036,
4672,
3536,
6293,
364,
3697,... |
to_last, to_first = [(rotation_matrix * (mesh.vertices[loop1[-1]].co - center1)).angle((mesh.vertices[loop2[i]].co - center2), 0) for i in [-1, 0]] | to_last, to_first = [((mesh.vertices[loop1[-1]].co - center1) * rotation_matrix).angle((mesh.vertices[loop2[i]].co - center2), 0) for i in [-1, 0]] | def calculate_lines(mesh, loops, mode, twist, reverse): lines = [] loop1, loop2 = [i[0] for i in loops] loop1_circular, loop2_circular = [i[1] for i in loops] circular = loop1_circular or loop2_circular circle_full = False # calculate loop centers centers = [] for loop in [loop1, loop2]: center = mathutils.Vector([0,0,0]) for vertex in loop: center += mesh.vertices[vertex].co center /= len(loop) centers.append(center) for i, loop in enumerate([loop1, loop2]): for vertex in loop: if mesh.vertices[vertex].co == centers[i]: # prevent zero-length vectors from appearing in angle comparisons centers[i] += mathutils.Vector([0.01, 0, 0]) break center1, center2 = centers # calculate the normals of the virtual planes that the loops are on normals = [] normal_plurity = False for i, loop in enumerate([loop1, loop2]): # covariance matrix mat = mathutils.Matrix([0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0]) x, y, z = centers[i] for loc in [mesh.vertices[vertex].co for vertex in loop]: mat[0][0] += (loc[0]-x)**2 mat[0][1] += (loc[0]-x)*(loc[1]-y) mat[0][2] += (loc[0]-x)*(loc[2]-z) mat[1][0] += (loc[1]-y)*(loc[0]-x) mat[1][1] += (loc[1]-y)**2 mat[1][2] += (loc[1]-y)*(loc[2]-z) mat[2][0] += (loc[2]-z)*(loc[0]-x) mat[2][1] += (loc[2]-z)*(loc[1]-y) mat[2][2] += (loc[2]-z)**2 # plane normal normal = False if sum(mat[0]) < 1e-6 or sum(mat[1]) < 1e-6 or sum(mat[2]) < 1e-6: normal_plurity = True try: mat.invert() except: if sum(mat[0]) == 0: normal = mathutils.Vector([1.0, 0.0, 0.0]) elif sum(mat[1]) == 0: normal = mathutils.Vector([0.0, 1.0, 0.0]) elif sum(mat[2]) == 0: normal = mathutils.Vector([0.0, 0.0, 1.0]) if not normal: itermax = 500 iter = 0 vec = mathutils.Vector([1.0, 1.0, 1.0]) vec2 = (vec*mat)/(vec*mat).length while vec != vec2 and iter<itermax: iter+=1 vec = vec2 vec2 = (vec*mat)/(vec*mat).length normal = vec2 normals.append(normal) # have plane normals face in the same direction (maximum angle is 90 degrees) if ((center1 + normals[0]) - center2).length < ((center1 - normals[0]) - center2).length: normals[0].negate() if ((center2 + normals[1]) - center1).length > ((center2 - normals[1]) - center1).length: normals[1].negate() # calculate rotation matrix, representing the difference between the plane normals axis = normals[0].cross(normals[1]) if axis.angle(mathutils.Vector([0, 0, 1]), 0) > 1.5707964: axis.negate() angle = normals[0].dot(normals[1]) rotation_matrix = mathutils.Matrix.Rotation(angle, 4, axis) # if circular, rotate loops so they are aligned if circular: # make sure loop1 is the circular one (or both are circular) if loop2_circular and not loop1_circular: loop1_circular, loop2_circular = True, False loop1, loop2 = loop2, loop1 # match start vertex of loop1 with loop2 target_vector = mesh.vertices[loop2[0]].co - center2 dif_angles = [[(rotation_matrix * (mesh.vertices[vertex].co - center1)).angle(target_vector, 0), False, i] for i, vertex in enumerate(loop1)] dif_angles.sort() if len(loop1) != len(loop2): angle_limit = dif_angles[0][0] * 1.2 # 20% margin dif_angles = [[(mesh.vertices[loop2[0]].co - mesh.vertices[loop1[index]].co).length, angle, index] for angle, distance, index in dif_angles if angle <= angle_limit] dif_angles.sort() loop1 = loop1[dif_angles[0][2]:] + loop1[:dif_angles[0][2]] # have both loops face the same way if normal_plurity and not circular: second_to_first, second_to_second, second_to_last = [(mesh.vertices[loop1[1]].co - center1).angle(mesh.vertices[loop2[i]].co - center2) for i in [0, 1, -1]] last_to_first, last_to_second = [(mesh.vertices[loop1[-1]].co - center1).angle(mesh.vertices[loop2[i]].co - center2) for i in [0, 1]] if (min(last_to_first, last_to_second)*1.1 < min(second_to_first, second_to_second)) or \ (loop2_circular and second_to_last*1.1 < min(second_to_first, second_to_second)): loop1.reverse() if circular: loop1 = [loop1[-1]] + loop1[:-1] else: angle = (mesh.vertices[loop1[0]].co - center1).cross(mesh.vertices[loop1[1]].co - center1).angle(normals[0]) target_angle = (mesh.vertices[loop2[0]].co - center2).cross(mesh.vertices[loop2[1]].co - center2).angle(normals[1]) limit = 1.5707964 # 0.5*pi, 90 degrees if not ((angle > limit and target_angle > limit) or (angle < limit and target_angle < limit)): loop1.reverse() if circular: loop1 = [loop1[-1]] + loop1[:-1] # both loops have the same length if len(loop1) == len(loop2): # manual override if twist: if abs(twist) < len(loop1): loop1 = loop1[twist:]+loop1[:twist] if reverse: loop1.reverse() lines.append([loop1[0], loop2[0]]) for i in range(1, len(loop1)): lines.append([loop1[i], loop2[i]]) # loops of different lengths else: # make loop1 longest loop if len(loop2) > len(loop1): loop1, loop2 = loop2, loop1 loop1_circular, loop2_circular = loop2_circular, loop1_circular # manual override if twist: if abs(twist) < len(loop1): loop1 = loop1[twist:]+loop1[:twist] if reverse: loop1.reverse() # shortest angle difference doesn't always give correct start vertex if loop1_circular and not loop2_circular: shifting = 1 while shifting: if len(loop1) - shifting < len(loop2): shifting = False break to_last, to_first = [(rotation_matrix * (mesh.vertices[loop1[-1]].co - center1)).angle((mesh.vertices[loop2[i]].co - center2), 0) for i in [-1, 0]] if to_first < to_last: loop1 = [loop1[-1]] + loop1[:-1] shifting += 1 else: shifting = False break # basic shortest side first if mode == 'basic': lines.append([loop1[0], loop2[0]]) for i in range(1, len(loop1)): if i >= len(loop2) - 1: # triangles lines.append([loop1[i], loop2[-1]]) else: # quads lines.append([loop1[i], loop2[i]]) # shortest edge algorithm else: # mode == 'shortest' lines.append([loop1[0], loop2[0]]) prev_vert2 = 0 for i in range(len(loop1) -1): if prev_vert2 == len(loop2) - 1 and not loop2_circular: # force triangles, reached end of loop2 tri, quad = 0, 1 elif prev_vert2 == len(loop2) - 1 and loop2_circular: # at end of loop2, but circular, so check with first vertex tri, quad = [(mathutils.Vector(mesh.vertices[loop1[i+1]].co) - mathutils.Vector(mesh.vertices[loop2[j]].co)).length for j in [prev_vert2, 0]] circle_full = 2 elif len(loop1) - 1 - i == len(loop2) - 1 - prev_vert2 and not circle_full: # force quads, otherwise won't make it to end of loop2 tri, quad = 1, 0 else: # calculate if tri or quad gives shortest edge tri, quad = [(mathutils.Vector(mesh.vertices[loop1[i+1]].co) - mathutils.Vector(mesh.vertices[loop2[j]].co)).length for j in range(prev_vert2, prev_vert2+2)] # triangle if tri < quad: lines.append([loop1[i+1], loop2[prev_vert2]]) if circle_full == 2: circle_full = False # quad elif not circle_full: lines.append([loop1[i+1], loop2[prev_vert2+1]]) prev_vert2 += 1 # quad to first vertex of loop2 else: lines.append([loop1[i+1], loop2[0]]) prev_vert2 = 0 circle_full = True # final face for circular loops if loop1_circular and loop2_circular: lines.append([loop1[0], loop2[0]]) return lines | 3c99606547c1cbdf8a00d81348e24eebea18f852 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11963/3c99606547c1cbdf8a00d81348e24eebea18f852/mesh_bridge.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4604,
67,
3548,
12,
15557,
16,
14075,
16,
1965,
16,
2339,
376,
16,
4219,
4672,
2362,
273,
5378,
2798,
21,
16,
2798,
22,
273,
306,
77,
63,
20,
65,
364,
277,
316,
14075,
65,
2798,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
3548,
12,
15557,
16,
14075,
16,
1965,
16,
2339,
376,
16,
4219,
4672,
2362,
273,
5378,
2798,
21,
16,
2798,
22,
273,
306,
77,
63,
20,
65,
364,
277,
316,
14075,
65,
2798,
21,
... |
lb.Clear() lb.AppendItems(self._config.dicom_filenames) | if self._config.dicom_filenames[:] != lb.GetStrings()[:]: lb.Clear() lb.AppendItems(self._config.dicom_filenames) | def config_to_view(self): # get listbox, clear it out, add filenames from the config lb = self._view_frame.dicom_files_lb lb.Clear() lb.AppendItems(self._config.dicom_filenames) | fd9d88561b145dd071322681fddf6a6e36b83e8a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4494/fd9d88561b145dd071322681fddf6a6e36b83e8a/DICOMReader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
642,
67,
869,
67,
1945,
12,
2890,
4672,
468,
336,
666,
2147,
16,
2424,
518,
596,
16,
527,
9066,
628,
326,
642,
7831,
273,
365,
6315,
1945,
67,
3789,
18,
15859,
362,
67,
2354,
67,
204... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
642,
67,
869,
67,
1945,
12,
2890,
4672,
468,
336,
666,
2147,
16,
2424,
518,
596,
16,
527,
9066,
628,
326,
642,
7831,
273,
365,
6315,
1945,
67,
3789,
18,
15859,
362,
67,
2354,
67,
204... |
sage: S == loads(dumps(S)) True | sage: TestSuite(S).run() | def __init__(self, A, prefix=None): """ Creates an auxiliary ring for the weights of a representation. This ring is associated with a WeylCharacterRing. The weights of a representation of a Lie group G or algebra are the characters of the characters of a Cartan subgroup T or subalgebra that occur when the representation is restricted to that Cartan. If a linear combination of weights is invariant under the Weyl group, then it is a linear combination of characters of G. | 7fa05b949ce753ba0d48f2e6f5125e6333b0ed1c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/7fa05b949ce753ba0d48f2e6f5125e6333b0ed1c/weyl_characters.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
432,
16,
1633,
33,
7036,
4672,
3536,
10210,
392,
9397,
20606,
9221,
364,
326,
5376,
434,
279,
4335,
18,
1220,
9221,
353,
3627,
598,
279,
678,
402,
80,
70... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
432,
16,
1633,
33,
7036,
4672,
3536,
10210,
392,
9397,
20606,
9221,
364,
326,
5376,
434,
279,
4335,
18,
1220,
9221,
353,
3627,
598,
279,
678,
402,
80,
70... |
""" | """ | def fl_create_pixmapbutton(type, x, y, w, h, label): """ fl_create_pixmapbutton(type, x, y, w, h, label) -> object """ retval = _fl_create_pixmapbutton(type, x, y, w, h, label) 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,
2640,
67,
14861,
1458,
5391,
12,
723,
16,
619,
16,
677,
16,
341,
16,
366,
16,
1433,
4672,
3536,
1183,
67,
2640,
67,
14861,
1458,
5391,
12,
723,
16,
619,
16,
677,
16,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2640,
67,
14861,
1458,
5391,
12,
723,
16,
619,
16,
677,
16,
341,
16,
366,
16,
1433,
4672,
3536,
1183,
67,
2640,
67,
14861,
1458,
5391,
12,
723,
16,
619,
16,
677,
16,
341,
... |
def __init__(data = None) | def __init__(data = None): | def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 699) else quickfix.StringField.__init__(self, 699, 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,
1666,
2733,
13,
469,
9549,
904,
18,
780,
974,
16186,
2738,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1666,
2733,
13,
469,
9549,
904,
18,
780,
974,
16186,
2738,
... |
print >>self.stdout, """tbreak same arguments as break, but breakpoint is removed when first hit.""" | print >>self.stdout, """tbreak same arguments as break, but breakpoint is removed when first hit.""" | def help_tbreak(self): print >>self.stdout, """tbreak same arguments as break, but breakpoint is | 83945b4854600370711e7678669f248ea227dcfd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/83945b4854600370711e7678669f248ea227dcfd/pdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2809,
67,
88,
8820,
12,
2890,
4672,
1172,
1671,
2890,
18,
10283,
16,
3536,
88,
8820,
225,
1967,
1775,
487,
898,
16,
1496,
18820,
353,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2809,
67,
88,
8820,
12,
2890,
4672,
1172,
1671,
2890,
18,
10283,
16,
3536,
88,
8820,
225,
1967,
1775,
487,
898,
16,
1496,
18820,
353,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
xg = xmlrpclib.ServerProxy(self.uri + '/xmlrpc/common') return xg.login(self.db, uid, passwd) raise Exception('Not Implemented') | connector = etl_socket.etl_socket() connector.connect(self.uri) connector.mysend(('common', 'login', self.db or '', uid or '', passwd or '')) res = connector.myreceive() connector.disconnect() return res | def login(self, uid, passwd): """ For logging in to OpenObject Database. """ import xmlrpclib from etl import etl_socket if self.con_type == 'xmlrpc': xg = xmlrpclib.ServerProxy(self.uri + '/xmlrpc/common') return xg.login(self.db, uid,passwd) elif self.con_type == 'socket': xg = xmlrpclib.ServerProxy(self.uri + '/xmlrpc/common') return xg.login(self.db, uid, passwd) raise Exception('Not Implemented') else: raise Exception('Not Supported') | 3f526c844d56142c653f66febe7279727fce9bb0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/3f526c844d56142c653f66febe7279727fce9bb0/openobject_connector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3925,
12,
2890,
16,
4555,
16,
19093,
4672,
3536,
2457,
2907,
316,
358,
3502,
921,
5130,
18,
3536,
1930,
2025,
13832,
830,
495,
628,
3393,
80,
1930,
3393,
80,
67,
7814,
309,
365,
18,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3925,
12,
2890,
16,
4555,
16,
19093,
4672,
3536,
2457,
2907,
316,
358,
3502,
921,
5130,
18,
3536,
1930,
2025,
13832,
830,
495,
628,
3393,
80,
1930,
3393,
80,
67,
7814,
309,
365,
18,
59... |
if packageId == 0: bootPackage = compiledContent self._console.outdent() continue resolvedFilePath = self._resolveFileName(filePath, variants, settings, packageId) filetool.save(resolvedFilePath, compiledContent) if compConf.get("paths/gzip"): filetool.gzip(resolvedFilePath, compiledContent) | compiledPackages.append(compiledContent) | def generateBootScript(bootPackage): self._console.info("Generating boot script...") bootBlocks = [] | 694362580a0d7ae92f6769d8e054e66b2d757d64 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/694362580a0d7ae92f6769d8e054e66b2d757d64/CodeGenerator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
15817,
3651,
12,
7137,
2261,
4672,
365,
6315,
8698,
18,
1376,
2932,
21755,
4835,
2728,
7070,
13,
4835,
6450,
273,
5378,
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,
0,
0,
0,
0,
0,
0,
0,
0,
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,
2103,
15817,
3651,
12,
7137,
2261,
4672,
365,
6315,
8698,
18,
1376,
2932,
21755,
4835,
2728,
7070,
13,
4835,
6450,
273,
5378,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
inst = object.im_self note = (inst and ' method of %s instance' % classname(inst.__class__, mod) or ' unbound %s method' % classname(imclass, mod)) | if object.im_self: note = ' method of %s instance' % classname( object.im_self.__class__, mod) else: note = ' unbound %s method' % classname(imclass,mod) | def docroutine(self, object, name=None, mod=None, cl=None): """Produce text documentation for a function or method object.""" realname = object.__name__ name = name or realname note = '' skipdocs = 0 if inspect.ismethod(object): imclass = object.im_class if cl: if imclass is not cl: note = ' from ' + classname(imclass, mod) skipdocs = 1 else: inst = object.im_self note = (inst and ' method of %s instance' % classname(inst.__class__, mod) or ' unbound %s method' % classname(imclass, mod)) object = object.im_func | 93cdc263dcadb71f7d53e01ec576fce416b7907a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/93cdc263dcadb71f7d53e01ec576fce416b7907a/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
22640,
12,
2890,
16,
733,
16,
508,
33,
7036,
16,
681,
33,
7036,
16,
927,
33,
7036,
4672,
3536,
25884,
977,
7323,
364,
279,
445,
578,
707,
733,
12123,
2863,
529,
273,
733,
16186,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
997,
22640,
12,
2890,
16,
733,
16,
508,
33,
7036,
16,
681,
33,
7036,
16,
927,
33,
7036,
4672,
3536,
25884,
977,
7323,
364,
279,
445,
578,
707,
733,
12123,
2863,
529,
273,
733,
16186,
... |
prompt = 'What will be the destination language for data?: ' | prompt = "What's the language of current data? (1-%s) " % len(lang_tuple) | def ask_for_default_language(): print 'These are configured languages:' for i, lang_tuple in enumerate(settings.LANGUAGES): print '\t%d. %s' % (i+1, lang_tuple[1]) print 'You must decide what language will be contains actual non translatable fields data' while True: prompt = 'What will be the destination language for data?: ' answer = raw_input(prompt).strip() if answer != '': try: index = int(answer) - 1 if index < 0 or index > len(settings.LANGUAGES): print 'That is not a valid number' else: return settings.LANGUAGES[index][0] except ValueError: print 'Please write a number' | bda2e982b9e8cea39e59cb377c1b86cac7e729e1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11729/bda2e982b9e8cea39e59cb377c1b86cac7e729e1/sync_transmeta_db.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6827,
67,
1884,
67,
1886,
67,
4923,
13332,
1172,
296,
29690,
854,
4351,
8191,
2497,
364,
277,
16,
3303,
67,
8052,
316,
4241,
12,
4272,
18,
15547,
55,
4672,
1172,
2337,
88,
9,
72,
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,
6827,
67,
1884,
67,
1886,
67,
4923,
13332,
1172,
296,
29690,
854,
4351,
8191,
2497,
364,
277,
16,
3303,
67,
8052,
316,
4241,
12,
4272,
18,
15547,
55,
4672,
1172,
2337,
88,
9,
72,
18,
... |
print "var" | def ParseReport(self, MetarReport=None): """Take report with raw info only and return it with in parsed values filled in. Note: This function edits the WeatherReport object you supply!""" if self.Report is None and MetarReport is None: raise EmptyReportException, \ "No report given on init and ParseReport()." elif MetarReport is not None: self.Report=MetarReport | 1323f56ca3ba148dc0f8e43c1ff76d64f1501c5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4602/1323f56ca3ba148dc0f8e43c1ff76d64f1501c5f/pymetar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2884,
4820,
12,
2890,
16,
21604,
297,
4820,
33,
7036,
4672,
3536,
13391,
2605,
598,
1831,
1123,
1338,
471,
327,
518,
598,
316,
2707,
924,
6300,
316,
18,
3609,
30,
1220,
445,
24450,
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,
2884,
4820,
12,
2890,
16,
21604,
297,
4820,
33,
7036,
4672,
3536,
13391,
2605,
598,
1831,
1123,
1338,
471,
327,
518,
598,
316,
2707,
924,
6300,
316,
18,
3609,
30,
1220,
445,
24450,
326,
... | |
res = self._getConnectionTransID(connection,transName) | res = self._getConnectionTransID( connection, transName ) | def setTransformationParameter(self,transName,paramName,paramValue,author='',connection=False): """ Add a parameter for the supplied transformations """ res = self._getConnectionTransID(connection,transName) if not res['OK']: return res connection = res['Value']['Connection'] transID = res['Value']['TransformationID'] message = '' if paramName in self.TRANSPARAMS: res = self.__updateTransformationParameter(transID,paramName,paramValue,connection=connection) if res['OK'] and (paramName != 'Body'): message = '%s updated to %s' % (paramName,paramValue) else: res = self.__addAdditionalTransformationParameter(transID, paramName, paramValue, connection=connection) if res['OK']: message = 'Added additional parameter %s' % paramName if message: self.__updateTransformationLogging(transID,message,author,connection=connection) return res | 9ad007ea503b29694fc081c1646b7c5ecd07b1f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9ad007ea503b29694fc081c1646b7c5ecd07b1f2/TransformationDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
15292,
1662,
12,
2890,
16,
2338,
461,
16,
891,
461,
16,
891,
620,
16,
4161,
2218,
2187,
4071,
33,
8381,
4672,
3536,
1436,
279,
1569,
364,
326,
4580,
19245,
3536,
400,
273,
365,
63... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15292,
1662,
12,
2890,
16,
2338,
461,
16,
891,
461,
16,
891,
620,
16,
4161,
2218,
2187,
4071,
33,
8381,
4672,
3536,
1436,
279,
1569,
364,
326,
4580,
19245,
3536,
400,
273,
365,
63... |
topics = forum.topics.order_by('-sticky').select_related() quick = {'posts': forum.posts.count(), | topics = forum.topics.order_by('-sticky', '-updated').select_related() quick = {'posts': forum.post_count, | def show_forum_ctx(request, forum_id): forum = Forum.objects.get(pk=forum_id) topics = forum.topics.order_by('-sticky').select_related() quick = {'posts': forum.posts.count(), 'topics': forum.topics.count(), 'last_topics': forum.topics.all().select_related()[:pybb_settings.QUICK_TOPICS_NUMBER], 'last_posts': forum.posts.order_by('-created').select_related()[:pybb_settings.QUICK_POSTS_NUMBER], } return {'forum': forum, 'topics': topics, 'quick': quick, 'paged_qs': topics, } | b4cdd17911d10f6be1727b2d75bec495294e6191 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12938/b4cdd17911d10f6be1727b2d75bec495294e6191/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
67,
11725,
67,
5900,
12,
2293,
16,
11283,
67,
350,
4672,
11283,
273,
2457,
379,
18,
6911,
18,
588,
12,
5465,
33,
11725,
67,
350,
13,
11204,
273,
11283,
18,
17905,
18,
1019,
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,
2405,
67,
11725,
67,
5900,
12,
2293,
16,
11283,
67,
350,
4672,
11283,
273,
2457,
379,
18,
6911,
18,
588,
12,
5465,
33,
11725,
67,
350,
13,
11204,
273,
11283,
18,
17905,
18,
1019,
67,
... |
rr = r if not pe_mode else r[0] sys.stderr.write( ( "Warning: Skipping read '%s', because chromosome " + "'%s', to which it has been aligned, did not appear in the GFF file.\n" ) % ( rr.read.name, iv.chrom ) ) | if not pe_mode: rr = r else: rr = r[0] if r[0] is not None else r[1] if not quiet: sys.stderr.write( ( "Warning: Skipping read '%s', because chromosome " + "'%s', to which it has been aligned, did not appear in the GFF file.\n" ) % ( rr.read.name, iv.chrom ) ) | def count_reads_in_features( sam_filename, gff_filename, stranded, overlap_mode, feature_type, id_attribute, quiet ): features = HTSeq.GenomicArrayOfSets( [], stranded ) counts = {} # Try to open samfile to fail early in case it is not there open( sam_filename ).close() for f in HTSeq.GFF_Reader( gff_filename ): if f.iv.chrom not in features.step_vectors.keys(): features.add_chrom( f.iv.chrom ) if f.type == feature_type: try: feature_id = f.attr[ id_attribute ] except KeyError: sys.exit( "Feature %s does not contain a '%s' attribute" % ( f.name, id_attribute ) ) if stranded and f.iv.strand == ".": sys.exit( "Feature %s at %s does not have strand information but you are " "running htseq-count in stranded mode. Use '--stranded=no'." % ( f.name, f.iv ) ) features.add_value( feature_id, f.iv ) counts[ f.attr[ id_attribute ] ] = 0 if len( counts ) == 0 and not quiet: sys.stderr.write( "Warning: No features of type '%s' found.\n" % feature_type ) first_read = iter( HTSeq.SAM_Reader( sam_filename ) ).next() pe_mode = first_read.paired_end read_seq = HTSeq.SAM_Reader( sam_filename ) if pe_mode: read_seq = HTSeq.pair_SAM_alignments( read_seq ) empty = 0 ambiguous = 0 i = 0 for r in read_seq: if not pe_mode: if not r.aligned: continue iv_seq = ( co.ref_iv for co in r.cigar if co.type == "M" ) else: if r[0] is not None and r[0].aligned: iv_seq = ( co.ref_iv for co in r[0].cigar if co.type == "M" ) else: iv_seq = tuple() if r[1] is not None and r[1].aligned: iv_seq = itertools.chain( iv_seq, ( invert_strand( co.ref_iv ) for co in r[1].cigar if co.type == "M" ) ) else: if ( r[0] is None ) or not ( r[0].aligned ): continue try: if overlap_mode == "union": fs = set() for iv in iv_seq: if iv.chrom not in features.step_vectors: raise UnknownChrom for fs2 in features.get_steps( iv, values_only=True ): fs = fs.union( fs2 ) elif overlap_mode == "intersection-strict" or overlap_mode == "intersection-nonempty": fs = None for iv in iv_seq: if iv.chrom not in features.step_vectors: raise UnknownChrom for fs2 in features.get_steps( iv, values_only=True ): if len(fs2) > 0 or overlap_mode == "intersection-strict": if fs is None: fs = fs2.copy() else: fs = fs.intersection( fs2 ) else: sys.exit( "Illegal overlap mode." ) if fs is None or len( fs ) == 0: empty += 1 elif len( fs ) > 1: ambiguous += 1 else: counts[ list(fs)[0] ] += 1 except UnknownChrom: rr = r if not pe_mode else r[0] sys.stderr.write( ( "Warning: Skipping read '%s', because chromosome " + "'%s', to which it has been aligned, did not appear in the GFF file.\n" ) % ( rr.read.name, iv.chrom ) ) i += 1 if i % 100000 == 0 and not quiet: sys.stderr.write( "%d reads processed.\n" % i ) for fn in sorted( counts.keys() ): print "%s\t%d" % ( fn, counts[fn] ) print "no_feature\t%d" % empty print "ambiguous\t%d" % ambiguous | 5505926669941075931bceba40854824edbf5660 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/596/5505926669941075931bceba40854824edbf5660/count.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1056,
67,
11904,
67,
267,
67,
7139,
12,
16260,
67,
3459,
16,
26534,
67,
3459,
16,
609,
5860,
16,
7227,
67,
3188,
16,
2572,
67,
723,
16,
612,
67,
4589,
16,
10902,
262,
30,
225,
4467,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1056,
67,
11904,
67,
267,
67,
7139,
12,
16260,
67,
3459,
16,
26534,
67,
3459,
16,
609,
5860,
16,
7227,
67,
3188,
16,
2572,
67,
723,
16,
612,
67,
4589,
16,
10902,
262,
30,
225,
4467,
... |
matchString = matchString.lstrip() | def __init__( self, matchString ): super(Literal,self).__init__() # remove leading white space from matchString - this wont work anyway matchString = matchString.lstrip() self.match = matchString self.matchLen = len(matchString) try: self.firstMatchChar = matchString[0] except IndexError: warnings.warn("null string passed to Literal; use Empty() instead", SyntaxWarning, stacklevel=2) self.name = '"%s"' % self.match self.errmsg = "Expected " + self.name self.mayReturnEmpty = False self.myException.msg = self.errmsg self.mayIndexError = False | a4a9edc430c1f433f7d01c71c795b1656411c38c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12364/a4a9edc430c1f433f7d01c71c795b1656411c38c/pyparsing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
16,
845,
780,
262,
30,
2240,
12,
6177,
16,
2890,
2934,
972,
2738,
972,
1435,
225,
468,
1206,
7676,
9578,
3476,
628,
845,
780,
300,
333,
341,
1580,
1440,
13466... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
365,
16,
845,
780,
262,
30,
2240,
12,
6177,
16,
2890,
2934,
972,
2738,
972,
1435,
225,
468,
1206,
7676,
9578,
3476,
628,
845,
780,
300,
333,
341,
1580,
1440,
13466... | |
self.store.set (cursor, 0, str(name), 1, str(newVal), 2, True) | self.store.set (cursor, 0, str(name), 1, str(newVal), 2, self.nameEditable, 3, self.valueEditable) | def editedSignal (self, widget, row, newVal, value): row = int(row) name = self.opts[row] cursor = self.store.get_iter_first() for i in range(row): cursor = self.store.iter_next (cursor) if value: if self.app.options[name] == newVal: return self.app.options[name] = newVal self.store.set (cursor, 0, str(name), 1, str(newVal), 2, True) else: if name == newVal or self.app.options.has_key(newVal) or \ self.driverOpts.has_key(newVal): return val = self.app.options.pop(name) name = newVal self.opts[row] = name self.app.options[name] = val self.store.set (cursor, 0, str(name), 1, str(val), 2, True) self.app.modified(self.app) | 22bdee93cc195fb068be8a95a01d513ed8ba0172 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4580/22bdee93cc195fb068be8a95a01d513ed8ba0172/driconf_commonui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18532,
11208,
261,
2890,
16,
3604,
16,
1027,
16,
20957,
16,
460,
4672,
1027,
273,
509,
12,
492,
13,
508,
273,
365,
18,
4952,
63,
492,
65,
3347,
273,
365,
18,
2233,
18,
588,
67,
2165,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
18532,
11208,
261,
2890,
16,
3604,
16,
1027,
16,
20957,
16,
460,
4672,
1027,
273,
509,
12,
492,
13,
508,
273,
365,
18,
4952,
63,
492,
65,
3347,
273,
365,
18,
2233,
18,
588,
67,
2165,... |
dtype : string | dtype : data-type | def ellipse(size, angle, ratio=0.5, dtype=np.uint8): """ Generates an elliptically-shaped structuring element of a given angle, ratio, and kernel size. Parameters ---------- size : int The half-width of the kernel. The kernel size is 2*size+1. angle : float The angle of rotation of the ellipse in radians. ratio : float The aspect ratio of the ellipse. dtype : string The data type of the structuring element. Returns ------- selem : ndarray The structuring element where elements of the neighborhood are 1 and 0 otherwise. """ structure = np.zeros((2*size+1, 2*size+1), dtype=dtype) a = np.matrix([np.cos(angle), np.sin(angle)]) b = np.matrix([-np.sin(angle), np.cos(angle)]) aspect = a.T * a + b.T * b / ratio for y in xrange(-size, size+ 1): for x in xrange(-size, size + 1): i = x+size j = y+size v = np.matrix([x,y], dtype='f') / float(size) n = v * aspect * v.T if n < 1: structure[i, j] = 1 return structure | 018bc62f5daad0192c5ced6bae4cbcfa229bf785 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12573/018bc62f5daad0192c5ced6bae4cbcfa229bf785/selem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26838,
12,
1467,
16,
5291,
16,
7169,
33,
20,
18,
25,
16,
3182,
33,
6782,
18,
11890,
28,
4672,
3536,
31902,
392,
415,
549,
337,
6478,
17,
674,
5994,
1958,
4017,
930,
434,
279,
864,
52... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
26838,
12,
1467,
16,
5291,
16,
7169,
33,
20,
18,
25,
16,
3182,
33,
6782,
18,
11890,
28,
4672,
3536,
31902,
392,
415,
549,
337,
6478,
17,
674,
5994,
1958,
4017,
930,
434,
279,
864,
52... |
self.dhcp0,self.dhcp2,self.dhcp3,self.dhcp1,self.dhcp4, | self.dhcp0,self.dhcp2,self.dhcp3,self.dhcp1, self.dhcp4, | def __init__(self,body,pos,ui,dbus=None): global daemon, wireless, wired | 4fa245b79a41a22da17ae3febbf053c5dd751a5f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12280/4fa245b79a41a22da17ae3febbf053c5dd751a5f/prefs_curses.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3432,
16,
917,
16,
4881,
16,
1966,
407,
33,
7036,
4672,
2552,
8131,
16,
6636,
2656,
16,
341,
2921,
2,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3432,
16,
917,
16,
4881,
16,
1966,
407,
33,
7036,
4672,
2552,
8131,
16,
6636,
2656,
16,
341,
2921,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
assert res == "str return" | assert_equal(res,"str return") | def __repr__(self): return "repr return" | 267b08d9c3e7613c126729a179f4503c91625e9c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7416/267b08d9c3e7613c126729a179f4503c91625e9c/test_scxx_object.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
327,
315,
12715,
327,
6,
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,
1001,
12715,
972,
12,
2890,
4672,
327,
315,
12715,
327,
6,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
- list of ``ManinSymbol`` - a copy of the complete list of Manin symbols. | a list of ``ManinSymbol`` objects, which is a copy of the complete list of Manin symbols. | def manin_symbol_list(self): """ Returns all the ManinSymbols in this ManinSymbolList as a list | 9ae824ec769dcfde5ec83bc3e40af81e971a8b62 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/9ae824ec769dcfde5ec83bc3e40af81e971a8b62/manin_symbols.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3161,
267,
67,
7175,
67,
1098,
12,
2890,
4672,
3536,
2860,
777,
326,
8660,
267,
14821,
316,
333,
8660,
267,
5335,
682,
487,
279,
666,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3161,
267,
67,
7175,
67,
1098,
12,
2890,
4672,
3536,
2860,
777,
326,
8660,
267,
14821,
316,
333,
8660,
267,
5335,
682,
487,
279,
666,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
apache_password_line_for_user = os.popen("grep %s %s" % (user,cfg_apache_password_file), 'r').read() password_apache = string.split(string.strip(apache_password_line_for_user),":")[1] | pipe_input, pipe_output = os.popen2(["/bin/grep", "^" + user + ":", cfg_apache_password_file], 'r') line = pipe_output.readlines()[0] password_apache = string.split(string.strip(line),":")[1] | def auth_apache_user_p(user, password): """Check whether user-supplied credentials correspond to valid Apache password data file. Return 0 in case of failure, 1 in case of success.""" try: apache_password_line_for_user = os.popen("grep %s %s" % (user,cfg_apache_password_file), 'r').read() password_apache = string.split(string.strip(apache_password_line_for_user),":")[1] except: # no pw found, so return not-allowed status return 0 salt = password_apache[:2] if crypt.crypt(password, salt) == password_apache: return 1 else: return 0 | 206ec78beb4d6eaaefcc86c7b5cac62d5db31a58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/206ec78beb4d6eaaefcc86c7b5cac62d5db31a58/webuser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1357,
67,
19211,
67,
1355,
67,
84,
12,
1355,
16,
2201,
4672,
3536,
1564,
2856,
729,
17,
2859,
3110,
4448,
4325,
358,
923,
24840,
2201,
501,
585,
18,
225,
2000,
374,
316,
648,
434,
5166... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1357,
67,
19211,
67,
1355,
67,
84,
12,
1355,
16,
2201,
4672,
3536,
1564,
2856,
729,
17,
2859,
3110,
4448,
4325,
358,
923,
24840,
2201,
501,
585,
18,
225,
2000,
374,
316,
648,
434,
5166... |
users.append({'title': request.POST['blanktitle'], | users.append({'title': user_title, | def generatetags(self, request, tl, one, two, module, extra, prog): """ generate nametags """ | 6305be2cb7ea98c932cb1d1d140656cb64a72c53 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12041/6305be2cb7ea98c932cb1d1d140656cb64a72c53/nametagmodule.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1215,
270,
278,
1341,
12,
2890,
16,
590,
16,
8332,
16,
1245,
16,
2795,
16,
1605,
16,
2870,
16,
11243,
4672,
3536,
2103,
15135,
278,
1341,
3536,
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,
1215,
270,
278,
1341,
12,
2890,
16,
590,
16,
8332,
16,
1245,
16,
2795,
16,
1605,
16,
2870,
16,
11243,
4672,
3536,
2103,
15135,
278,
1341,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
class _dummyTList(TList, TixSubWidget): def __init__(self, master, name, destroy_physically=1): TixSubWidget.__init__(self, master, name, destroy_physically) class _dummyComboBox(ComboBox, TixSubWidget): def __init__(self, master, name, destroy_physically=1): TixSubWidget.__init__(self, master, name, destroy_physically) self.subwidget_list['entry'] = _dummyEntry(self, 'entry') self.subwidget_list['arrow'] = _dummyButton(self, 'arrow') self.subwidget_list['slistbox'] = _dummyScrolledListBox(self, 'slistbox') self.subwidget_list['listbox'] = _dummyListbox(self, 'listbox', destroy_physically=0) class _dummyDirList(DirList, TixSubWidget): | class _dummyScrolledHList(ScrolledHList, TixSubWidget): | def __init__(self, master, name, destroy_physically=1): TixSubWidget.__init__(self, master, name, destroy_physically) | b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4171,
16,
508,
16,
5546,
67,
844,
1900,
6478,
33,
21,
4672,
399,
697,
1676,
4609,
16186,
2738,
972,
12,
2890,
16,
4171,
16,
508,
16,
5546,
67,
844,
190... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
2738,
972,
12,
2890,
16,
4171,
16,
508,
16,
5546,
67,
844,
1900,
6478,
33,
21,
4672,
399,
697,
1676,
4609,
16186,
2738,
972,
12,
2890,
16,
4171,
16,
508,
16,
5546,
67,
844,
190... |
new.fontsize = values[1] | if n>1: new.fontsize = values[1] if n>2: new.leading = values[2] elif op in ('FONTNAME', 'FACE'): new.fontname = values[0] elif op in ('SIZE', 'FONTSIZE'): new.fontsize = values[0] elif op == 'LEADING': new.leading = values[0] | def _setCellStyle(cellStyles, i, j, op, values): new = CellStyle('<%d, %d>' % (i,j), cellStyles[i][j]) cellStyles[i][j] = new if op == 'FONT': new.fontname = values[0] new.fontsize = values[1] elif op == 'TEXTCOLOR': new.color = colors.toColor(values[0], colors.Color(0,0,0)) elif op in ('ALIGN', 'ALIGNMENT'): new.alignment = values[0] elif op == 'VALIGN': new.valign = values[0] elif op == 'LEFTPADDING': new.leftPadding = values[0] elif op == 'RIGHTPADDING': new.rightPadding = values[0] elif op == 'TOPPADDING': new.topPadding = values[0] elif op == 'BOTTOMPADDING': new.bottomPadding = values[0] | 05bfe223624d1df66401c7f78a6ac81f78006d39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/05bfe223624d1df66401c7f78a6ac81f78006d39/tables.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
542,
4020,
2885,
12,
3855,
9725,
16,
277,
16,
525,
16,
1061,
16,
924,
4672,
394,
273,
8614,
2885,
2668,
32,
9,
72,
16,
738,
72,
1870,
738,
261,
77,
16,
78,
3631,
2484,
9725,
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,
389,
542,
4020,
2885,
12,
3855,
9725,
16,
277,
16,
525,
16,
1061,
16,
924,
4672,
394,
273,
8614,
2885,
2668,
32,
9,
72,
16,
738,
72,
1870,
738,
261,
77,
16,
78,
3631,
2484,
9725,
6... |
"""Parse an RFC-822 domain-literal.""" | """Parse an RFC 2822 domain-literal.""" | def getdomainliteral(self): """Parse an RFC-822 domain-literal.""" return '[%s]' % self.getdelimited('[', ']\r', 0) | b58b78a927ad2da7060de12e1b04c0a1f0926480 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/b58b78a927ad2da7060de12e1b04c0a1f0926480/_parseaddr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
4308,
13107,
12,
2890,
4672,
3536,
3201,
392,
8372,
9131,
3787,
2461,
17,
13107,
12123,
327,
21848,
87,
3864,
738,
365,
18,
588,
3771,
1038,
329,
2668,
63,
2187,
12671,
64,
86,
2187... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4308,
13107,
12,
2890,
4672,
3536,
3201,
392,
8372,
9131,
3787,
2461,
17,
13107,
12123,
327,
21848,
87,
3864,
738,
365,
18,
588,
3771,
1038,
329,
2668,
63,
2187,
12671,
64,
86,
2187... |
if m and hasattr(func, m): | if m and hasattr(m, func): | def _callback(self, cr, uid, model, func, args): args = (args or []) and eval(args) m=self.pool.get(model) if m and hasattr(func, m): f = getattr(m, func) f(cr, uid, *args) | 469d2bde4420017d2361ebcebfe9506517d041ae /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/469d2bde4420017d2361ebcebfe9506517d041ae/ir_cron.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3394,
12,
2890,
16,
4422,
16,
4555,
16,
938,
16,
1326,
16,
833,
4672,
833,
273,
261,
1968,
578,
5378,
13,
471,
5302,
12,
1968,
13,
312,
33,
2890,
18,
6011,
18,
588,
12,
2284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3394,
12,
2890,
16,
4422,
16,
4555,
16,
938,
16,
1326,
16,
833,
4672,
833,
273,
261,
1968,
578,
5378,
13,
471,
5302,
12,
1968,
13,
312,
33,
2890,
18,
6011,
18,
588,
12,
2284,
... |
if vp.dice: dice_expr = reverseFormatDice(vp.dice) | if vp.DICE: dice_expr = reverseFormatDice(vp) | def formatNormalized(actor, verb_phrases, targets): """Return a string with only the parts of speech, so a parseString ParseResults object can be return instead of a scanString result. """ _fm_verb_phrases = [] for vp in verb_phrases: verb_list = ' '.join(vp.verbs) if vp.dice: dice_expr = reverseFormatDice(vp.dice) elif vp.temp_modifier: dice_expr = '%+d' % (vp.temp_modifier,) else: dice_expr = '' verb_body = ' '.join((verb_list, dice_expr)) _fm_verb_phrases.append('[%s]' % (verb_body,)) fm_verb_phrases = ' '.join(_fm_verb_phrases) _fm_targets = [] for targ in targets: _fm_targets.append('@%s' % (targ,)) fm_targets = ' '.join(_fm_targets) if actor is not None: _actor = '*%s ' % (actor,) else: _actor = '' return '%s%s %s' % (_actor, fm_verb_phrases, fm_targets) | 64baac3c13d723d4cca03c0e3976ada112e0ce94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2289/64baac3c13d723d4cca03c0e3976ada112e0ce94/linesyntax.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
15577,
12,
3362,
16,
6405,
67,
844,
17415,
16,
5774,
4672,
3536,
990,
279,
533,
598,
1338,
326,
2140,
434,
24556,
16,
1427,
279,
23659,
2884,
3447,
733,
848,
506,
327,
3560,
434,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
740,
15577,
12,
3362,
16,
6405,
67,
844,
17415,
16,
5774,
4672,
3536,
990,
279,
533,
598,
1338,
326,
2140,
434,
24556,
16,
1427,
279,
23659,
2884,
3447,
733,
848,
506,
327,
3560,
434,
... |
format = '%s %s' % (release.description, release.version) | format = '%s %s' % (release.description, release.version) \ | def init_logger(): import os from tools.translate import resetlocale resetlocale() logger = logging.getLogger() # create a format for log messages and dates format = '[%(asctime)s] %(levelname)s:%(name)s:%(message)s' if tools.config['syslog']: # SysLog Handler if os.name == 'nt': handler = logging.handlers.NTEventLogHandler("%s %s" % (release.description, release.version)) else: handler = logging.handlers.SysLogHandler('/dev/log') format = '%s %s' % (release.description, release.version) + ':%(levelname)s:%(name)s:%(message)s' elif tools.config['logfile']: # LogFile Handler logf = tools.config['logfile'] try: dirname = os.path.dirname(logf) if dirname and not os.path.isdir(dirname): os.makedirs(dirname) if tools.config['logrotate'] is not False: handler = logging.handlers.TimedRotatingFileHandler(logf,'D',1,30) elif os.name == 'posix': handler = logging.handlers.WatchedFileHandler(logf) else: handler = logging.handlers.FileHandler(logf) except Exception, ex: sys.stderr.write("ERROR: couldn't create the logfile directory. Logging to the standard output.\n") handler = logging.StreamHandler(sys.stdout) else: # Normal Handler on standard output handler = logging.StreamHandler(sys.stdout) if isinstance(handler, logging.StreamHandler) and os.isatty(handler.stream.fileno()): formatter = ColoredFormatter(format) else: formatter = logging.Formatter(format) handler.setFormatter(formatter) # add the handler to the root logger logger.addHandler(handler) logger.setLevel(int(tools.config['log_level'] or '0')) | 7f4bcca8d0800569d4b78a0c597bfe4cae20a8c5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7f4bcca8d0800569d4b78a0c597bfe4cae20a8c5/netsvc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
67,
4901,
13332,
1930,
1140,
628,
8513,
18,
13929,
1930,
2715,
6339,
2715,
6339,
1435,
225,
1194,
273,
2907,
18,
588,
3328,
1435,
468,
752,
279,
740,
364,
613,
2743,
471,
7811,
740... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1208,
67,
4901,
13332,
1930,
1140,
628,
8513,
18,
13929,
1930,
2715,
6339,
2715,
6339,
1435,
225,
1194,
273,
2907,
18,
588,
3328,
1435,
468,
752,
279,
740,
364,
613,
2743,
471,
7811,
740... |
why = os.strerror(err.errno) | why = _strerror(err) | def ftp_STOU(self, line): """Store a file on the server with a unique name.""" # Note 1: RFC 959 prohibited STOU parameters, but this prohibition is # obsolete. # Note 2: 250 response wanted by RFC 959 has been declared incorrect # in RFC 1123 that wants 125/150 instead. # Note 3: RFC 1123 also provided an exact output format defined to be # as follow: # > 125 FILE: pppp # ...where pppp represents the unique path name of the file that will be # written. | e155be2e9b3e40d9bd92788d2569c640df5f0b57 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7236/e155be2e9b3e40d9bd92788d2569c640df5f0b57/ftpserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13487,
67,
882,
26556,
12,
2890,
16,
980,
4672,
3536,
2257,
279,
585,
603,
326,
1438,
598,
279,
3089,
508,
12123,
468,
3609,
404,
30,
8372,
2468,
6162,
450,
29993,
2347,
26556,
1472,
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,
13487,
67,
882,
26556,
12,
2890,
16,
980,
4672,
3536,
2257,
279,
585,
603,
326,
1438,
598,
279,
3089,
508,
12123,
468,
3609,
404,
30,
8372,
2468,
6162,
450,
29993,
2347,
26556,
1472,
16,... |
set = Difference(source, trash) | trash = schema.ns('osaf.pim', self.itsView).trashCollection for item, attribute in source.iterSources(True): if item is trash and attribute == trash.__collection__: set = Set(source) break else: set = Difference(source, trash) | def _sourcesChanged_(self, op): source = self.source trash = schema.ns('osaf.pim', self.itsView).trashCollection | d6f8a5c1ab83b1909f30745926dfadcd36007f9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/d6f8a5c1ab83b1909f30745926dfadcd36007f9b/collections.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
10141,
5033,
67,
12,
2890,
16,
1061,
4672,
225,
1084,
273,
365,
18,
3168,
20703,
273,
1963,
18,
2387,
2668,
538,
1727,
18,
84,
381,
2187,
365,
18,
1282,
1767,
2934,
28665,
2532,
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,
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,
10141,
5033,
67,
12,
2890,
16,
1061,
4672,
225,
1084,
273,
365,
18,
3168,
20703,
273,
1963,
18,
2387,
2668,
538,
1727,
18,
84,
381,
2187,
365,
18,
1282,
1767,
2934,
28665,
2532,
2... |
valuelist : value valuelist | valuelist : valuelist value | def p_valuelist(t): ''' valuelist : value valuelist | value ''' t[0] = createList( 'valuelist', t ) | 1a8e540808c326b13fcc3d7ecf1906c80d3bce53 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/1a8e540808c326b13fcc3d7ecf1906c80d3bce53/emparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
293,
67,
4531,
5449,
12,
88,
4672,
9163,
21748,
5449,
294,
21748,
5449,
460,
571,
460,
9163,
268,
63,
20,
65,
273,
225,
752,
682,
12,
296,
4531,
5449,
2187,
268,
262,
225,
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,
1,
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,
293,
67,
4531,
5449,
12,
88,
4672,
9163,
21748,
5449,
294,
21748,
5449,
460,
571,
460,
9163,
268,
63,
20,
65,
273,
225,
752,
682,
12,
296,
4531,
5449,
2187,
268,
262,
225,
2,
-100,
-... |
(new_string, num) = re.subn(pattern, '\\\\', new_string, count=0) | (new_string, num) = re.subn(pattern, '\\\\', new_string, count=0) | def replace_special_char(self, string, repl='-'): # Regular Expression Special Chars = . ^ $ * + ? { [ ] \ | ( ) special_chars = [ '\"', '\`', '\\\\', '/','~' ] new_string = string num = 0 for j in special_chars: pattern = j try: # A few of the special characters get automatically converted to a # different char, rather than what is passed in as repl if (pattern == "\'"): (new_string, num) = re.subn(pattern, "\\\'", new_string, count=0) elif (pattern == '/'): (new_string, num) = re.subn(pattern, '\\\\', new_string, count=0) else: (new_string, num) = re.subn(pattern, repl, new_string, count=0) except: _debug_( _( 'ERROR' ) + ': ' + _( 'Problem trying to call:' ) + ' re.subn' ) return new_string | 2dea6659ea7caf6d2ece3ed17231f52f1963d82e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/2dea6659ea7caf6d2ece3ed17231f52f1963d82e/cdbackup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1453,
67,
9371,
67,
3001,
12,
2890,
16,
533,
16,
6831,
2218,
6627,
4672,
468,
24544,
5371,
13409,
3703,
87,
273,
225,
263,
3602,
271,
380,
397,
692,
288,
306,
308,
521,
571,
261,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1453,
67,
9371,
67,
3001,
12,
2890,
16,
533,
16,
6831,
2218,
6627,
4672,
468,
24544,
5371,
13409,
3703,
87,
273,
225,
263,
3602,
271,
380,
397,
692,
288,
306,
308,
521,
571,
261,
262,
... |
aws_secret_access_key=self.db_passwd) | aws_secret_access_key=self.db_passwd, port=self.db_port, host=self.db_host, is_secure=self.enable_ssl ) | def _connect(self): self.sdb = boto.connect_sdb(aws_access_key_id=self.db_user, aws_secret_access_key=self.db_passwd) # This assumes that the domain has already been created # It's much more efficient to do it this way rather than # having this make a roundtrip each time to validate. # The downside is that if the domain doesn't exist, it breaks self.domain = self.sdb.lookup(self.db_name, validate=False) if not self.domain: self.domain = self.sdb.create_domain(self.db_name) | 4f17b450402d153526e3ca6e8f913dd7b93894f1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1098/4f17b450402d153526e3ca6e8f913dd7b93894f1/sdbmanager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3612,
12,
2890,
4672,
365,
18,
27056,
273,
17228,
18,
3612,
67,
27056,
12,
6850,
67,
3860,
67,
856,
67,
350,
33,
2890,
18,
1966,
67,
1355,
16,
2287,
67,
5875,
67,
3860,
67,
856,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3612,
12,
2890,
4672,
365,
18,
27056,
273,
17228,
18,
3612,
67,
27056,
12,
6850,
67,
3860,
67,
856,
67,
350,
33,
2890,
18,
1966,
67,
1355,
16,
2287,
67,
5875,
67,
3860,
67,
856,... |
raise RuntimeError("Invalid FUnction Pointer format: %s" % line) var = vars.pop() | print >> sys.stderr, var, vars raise RuntimeError("Invalid Function Pointer " "format: %s. Expected '*' got %s from %s" % (line,var,vars)) var = vars.pop() | def parse_filetext(filetext): global names for struct in structsRe.findall(filetext): body,name = struct if name in ('PyObject','PyVarObject', 'PyFrameObject'): emitComment("Skipping object %s" % name) continue print >> sys.stderr, "NAME", name startComment = body.find("/*") while startComment >= 0: #strip multiline comments endComment = body.find("*/",startComment) + 2 body = body[:startComment] + body[endComment:] startComment = body.find("/*") lines = body.split("\n") isPyObject = False for line in lines: line = line.strip() if not line: continue print >> sys.stderr, "LINE:" , line if line.startswith("#"): print >> sys.stderr, "PREPROCESSOR DIRECTIVE" emitRaw(line) elif line == 'PyObject_HEAD': print >> sys.stderr, "HEADER" , line isPyObject = True emitModuleHeader(name) names.append(name) emitRaw(" load_PyObject(sm);") elif line == 'PyObject_VAR_HEAD': print >> sys.stderr, "HEADER" , line isPyObject = True emitModuleHeader(name) names.append(name) emitRaw(" load_PyVarObject(sm);") elif line: if isPyObject == False: print >> sys.stderr, "NOT A PyObject: SKIPPING" , name emitComment("Skipping struct %s, not a PyObject based struct" % name) break typeof,rest = typeofRe.match(line).groups() print >> sys.stderr, "TYPE", typeof vars = variablesRe.findall(rest) vars.reverse() if typeof == "struct": # skip struct def print >> sys.stderr, "STRUCT", vars vars.pop() while vars: var = vars.pop() if var in ('*', '**'): var = vars.pop() print >> sys.stderr, "POINTER", var emitOffset(name, var) elif var == '(': print >> sys.stderr, "FUNCTION POINTER", vars var = vars.pop() if var != "*": raise RuntimeError("Invalid FUnction Pointer format: %s" % line) var = vars.pop() emitOffset(name, var) vars = None elif var == "[": print >> sys.stderr, "SKIPPING ARRAY STUB" , vars var = vars.pop() var = vars.pop() else: print >> sys.stderr, "normal", var emitOffset(name,var) if isPyObject == True: emitModuleFooter(name) | cf7e842383dc66d6f78633024dfb4dc7937eae02 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11637/cf7e842383dc66d6f78633024dfb4dc7937eae02/makeStructs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
7540,
27830,
12,
7540,
27830,
4672,
2552,
1257,
364,
1958,
316,
8179,
426,
18,
4720,
454,
12,
7540,
27830,
4672,
1417,
16,
529,
273,
1958,
309,
508,
316,
7707,
9413,
921,
17023... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1109,
67,
7540,
27830,
12,
7540,
27830,
4672,
2552,
1257,
364,
1958,
316,
8179,
426,
18,
4720,
454,
12,
7540,
27830,
4672,
1417,
16,
529,
273,
1958,
309,
508,
316,
7707,
9413,
921,
17023... |
def is_isomorphic(self, other, proof=False): | def is_isomorphic(self, other, proof=False, verbosity=0): | def is_isomorphic(self, other, proof=False): """ Tests for isomorphism between self and other. INPUT: proof -- if True, then output is (a,b), where a is a boolean and b is either a map or None. EXAMPLES: sage: D = graphs.DodecahedralGraph() sage: E = D.copy() sage: gamma = SymmetricGroup(20).random_element() sage: E.relabel(gamma) sage: D.is_isomorphic(E) True | 53ee1136334ccef3d22fb07eba25731064a97664 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/53ee1136334ccef3d22fb07eba25731064a97664/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
291,
362,
18435,
12,
2890,
16,
1308,
16,
14601,
33,
8381,
16,
11561,
33,
20,
4672,
3536,
7766,
87,
364,
353,
362,
7657,
6228,
3086,
365,
471,
1308,
18,
225,
12943,
30,
14601,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
291,
362,
18435,
12,
2890,
16,
1308,
16,
14601,
33,
8381,
16,
11561,
33,
20,
4672,
3536,
7766,
87,
364,
353,
362,
7657,
6228,
3086,
365,
471,
1308,
18,
225,
12943,
30,
14601,
... |
class Comparable(AnotherDateTimeClass): def timetuple(self): return () their = Comparable() self.assertEqual(cmp(our, their), 0) self.assertEqual(cmp(their, our), 0) self.failUnless(our == their) self.failUnless(their == our) | self.assertRaises(TypeError, cmp, their, our) class LargerThanAnything: def __lt__(self, other): return False def __le__(self, other): return isinstance(other, LargerThanAnything) def __eq__(self, other): return isinstance(other, LargerThanAnything) def __ne__(self, other): return not isinstance(other, LargerThanAnything) def __gt__(self, other): return not isinstance(other, LargerThanAnything) def __ge__(self, other): return True their = LargerThanAnything() self.assertEqual(our == their, False) self.assertEqual(their == our, False) self.assertEqual(our != their, True) self.assertEqual(their != our, True) self.assertEqual(our < their, True) self.assertEqual(their < our, False) self.assertEqual(cmp(our, their), -1) self.assertEqual(cmp(their, our), 1) | def __cmp__(self, other): # Return "equal" so calling this can't be confused with # compare-by-address (which never says "equal" for distinct # objects). return 0 | 4f251564b1a50b3727c359cc27e9c215d3a0dedd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/4f251564b1a50b3727c359cc27e9c215d3a0dedd/test_datetime.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9625,
972,
12,
2890,
16,
1308,
4672,
468,
2000,
315,
9729,
6,
1427,
4440,
333,
848,
1404,
506,
2195,
3668,
598,
468,
3400,
17,
1637,
17,
2867,
261,
12784,
5903,
20185,
315,
9729,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
9625,
972,
12,
2890,
16,
1308,
4672,
468,
2000,
315,
9729,
6,
1427,
4440,
333,
848,
1404,
506,
2195,
3668,
598,
468,
3400,
17,
1637,
17,
2867,
261,
12784,
5903,
20185,
315,
9729,
... |
score = float(candidate.getnotes()) | def buildmatches(inputfile, outputfile, matcher): """Builds a .po.tm file for use in Pootle""" #Can't use the same name: it might open the existing file! outputfile = factory.getobject(outputfile, ignore=".tm") #TODO: Do something useful with current content if file exists inputfile.units.sort(match.sourcelencmp) try: for unit in inputfile.units: if len(unit.source) > 70: break if not unit.source: continue candidates = matcher.matches(unit.source) for candidate in candidates: score = float(candidate.getnotes()) source = candidate.source target = candidate.target newunit = outputfile.addsourceunit(source) newunit.target = target newunit.addnote("%d%%" % score) newunit.addlocations(unit.getlocations()) except exceptions.KeyboardInterrupt: # Let's write what we have so far return outputfile return outputfile | 608f1c07ab4cf488f08d3bcfcc7b6c518c5af952 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11388/608f1c07ab4cf488f08d3bcfcc7b6c518c5af952/updatetm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
8436,
12,
2630,
768,
16,
876,
768,
16,
4546,
4672,
3536,
7746,
279,
263,
1631,
18,
16925,
585,
364,
999,
316,
453,
1632,
298,
8395,
468,
2568,
1404,
999,
326,
1967,
508,
30,
518,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8436,
12,
2630,
768,
16,
876,
768,
16,
4546,
4672,
3536,
7746,
279,
263,
1631,
18,
16925,
585,
364,
999,
316,
453,
1632,
298,
8395,
468,
2568,
1404,
999,
326,
1967,
508,
30,
518,... | |
bgimage.paste(picture,(int(node.attributes["x"].value), int(node.attributes["y"].value)),picture) | bgimage.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) | def drawThemeItem(page, itemsonthispage, itemnum, menuitem, bgimage, draw, bgimagemask, drawmask, spumuxdom, spunode, numberofitems, chapternumber, chapterlist): """Draws text and graphics onto a dvd menu, called by createMenu and createChapterMenu""" #Get the XML containing information about this item infoDOM = xml.dom.minidom.parse( os.path.join(getItemTempPath(itemnum),"info.xml") ) #Error out if its the wrong XML if infoDOM.documentElement.tagName != "fileinfo": fatalError("The info.xml file (%s) doesn't look right" % os.path.join(getItemTempPath(itemnum),"info.xml")) #boundarybox holds the max and min dimensions for this item so we can auto build a menu highlight box boundarybox=9999,9999,0,0 wantHighlightBox = True #Loop through all the nodes inside this menu item for node in menuitem.childNodes: #Process each type of item to add it onto the background image if node.nodeName=="graphic": #Overlay graphic image onto background imagefilename = expandItemText(infoDOM,node.attributes["filename"].value, itemnum, page, itemsonthispage, chapternumber, chapterlist) if doesFileExist(imagefilename): picture = Image.open(imagefilename,"r").resize((int(node.attributes["w"].value), int(node.attributes["h"].value))) picture = picture.convert("RGBA") bgimage.paste(picture,(int(node.attributes["x"].value), int(node.attributes["y"].value)),picture) del picture write( "Added image %s" % imagefilename) boundarybox=checkBoundaryBox(boundarybox, node) else: write( "Image file does not exist '%s'" % imagefilename) elif node.nodeName=="text": #Apply some text to the background, including wordwrap if required. text=expandItemText(infoDOM,node.attributes["value"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if text>"": paintText( draw, int(node.attributes["x"].value), int(node.attributes["y"].value), int(node.attributes["w"].value), int(node.attributes["h"].value), text, themeFonts[int(node.attributes["font"].value)], node.attributes["colour"].value, node.attributes["align"].value ) boundarybox=checkBoundaryBox(boundarybox, node) del text elif node.nodeName=="previous": if page>1: #Overlay previous graphic button onto background imagefilename = expandItemText(infoDOM,node.attributes["filename"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if not doesFileExist(imagefilename): fatalError("Cannot find image for previous button (%s)." % imagefilename) maskimagefilename = expandItemText(infoDOM,node.attributes["mask"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if not doesFileExist(maskimagefilename): fatalError("Cannot find mask image for previous button (%s)." % maskimagefilename) picture=Image.open(imagefilename,"r").resize((int(node.attributes["w"].value), int(node.attributes["h"].value))) picture=picture.convert("RGBA") bgimage.paste(picture,(int(node.attributes["x"].value), int(node.attributes["y"].value)),picture) del picture write( "Added previous button image %s" % imagefilename) picture=Image.open(maskimagefilename,"r").resize((int(node.attributes["w"].value), int(node.attributes["h"].value))) picture=picture.convert("RGBA") bgimagemask.paste(picture,(int(node.attributes["x"].value), int(node.attributes["y"].value)),picture) del picture write( "Added previous button mask image %s" % imagefilename) button = spumuxdom.createElement("button") button.setAttribute("name","previous") button.setAttribute("x0","%s" % int(node.attributes["x"].value)) button.setAttribute("y0","%s" % int(node.attributes["y"].value)) button.setAttribute("x1","%s" % (int(node.attributes["x"].value)+int(node.attributes["w"].value))) button.setAttribute("y1","%s" % (int(node.attributes["y"].value)+int(node.attributes["h"].value))) spunode.appendChild(button) elif node.nodeName=="next": if itemnum < numberofitems: #Overlay next graphic button onto background imagefilename = expandItemText(infoDOM,node.attributes["filename"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if not doesFileExist(imagefilename): fatalError("Cannot find image for next button (%s)." % imagefilename) maskimagefilename = expandItemText(infoDOM,node.attributes["mask"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if not doesFileExist(maskimagefilename): fatalError("Cannot find mask image for next button (%s)." % maskimagefilename) picture = Image.open(imagefilename,"r").resize((int(node.attributes["w"].value), int(node.attributes["h"].value))) picture = picture.convert("RGBA") bgimage.paste(picture,(int(node.attributes["x"].value), int(node.attributes["y"].value)),picture) del picture write( "Added next button image %s " % imagefilename) picture=Image.open(maskimagefilename,"r").resize((int(node.attributes["w"].value), int(node.attributes["h"].value))) picture=picture.convert("RGBA") bgimagemask.paste(picture,(int(node.attributes["x"].value), int(node.attributes["y"].value)),picture) del picture write( "Added next button mask image %s" % imagefilename) button = spumuxdom.createElement("button") button.setAttribute("name","next") button.setAttribute("x0","%s" % int(node.attributes["x"].value)) button.setAttribute("y0","%s" % int(node.attributes["y"].value)) button.setAttribute("x1","%s" % (int(node.attributes["x"].value) + int(node.attributes["w"].value))) button.setAttribute("y1","%s" % (int(node.attributes["y"].value) + int(node.attributes["h"].value))) spunode.appendChild(button) elif node.nodeName=="button": wantHighlightBox = False #Overlay item graphic/text button onto background imagefilename = expandItemText(infoDOM,node.attributes["filename"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if not doesFileExist(imagefilename): fatalError("Cannot find image for menu button (%s)." % imagefilename) maskimagefilename = expandItemText(infoDOM,node.attributes["mask"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if not doesFileExist(maskimagefilename): fatalError("Cannot find mask image for menu button (%s)." % maskimagefilename) picture=Image.open(imagefilename,"r").resize((int(node.attributes["w"].value), int(node.attributes["h"].value))) picture=picture.convert("RGBA") bgimage.paste(picture,(int(node.attributes["x"].value), int(node.attributes["y"].value)),picture) del picture # if we have some text paint that over the image textnode = node.getElementsByTagName("textnormal") if textnode.length > 0: textnode = textnode[0] text=expandItemText(infoDOM,textnode.attributes["value"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if text>"": paintText( draw, int(textnode.attributes["x"].value), int(textnode.attributes["y"].value), int(textnode.attributes["w"].value), int(textnode.attributes["h"].value), text, themeFonts[int(textnode.attributes["font"].value)], textnode.attributes["colour"].value, textnode.attributes["align"].value ) boundarybox=checkBoundaryBox(boundarybox, node) del text write( "Added button image %s" % imagefilename) picture=Image.open(maskimagefilename,"r").resize((int(node.attributes["w"].value), int(node.attributes["h"].value))) picture=picture.convert("RGBA") bgimagemask.paste(picture,(int(node.attributes["x"].value), int(node.attributes["y"].value)),picture) #del picture # if we have some text paint that over the image textnode = node.getElementsByTagName("textselected") if textnode.length > 0: textnode = textnode[0] text=expandItemText(infoDOM,textnode.attributes["value"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) textImage=Image.new("1",picture.size) textDraw=ImageDraw.Draw(textImage) if text>"": paintText(textDraw, int(node.attributes["x"].value) - int(textnode.attributes["x"].value), int(node.attributes["y"].value) - int(textnode.attributes["y"].value), int(textnode.attributes["w"].value), int(textnode.attributes["h"].value), text, themeFonts[int(textnode.attributes["font"].value)], "white", textnode.attributes["align"].value ) bgimagemask.paste(textnode.attributes["colour"].value, (int(textnode.attributes["x"].value), int(textnode.attributes["y"].value)),textImage) | 4a04444bb400931195d3d8968b619bcd683cb485 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13713/4a04444bb400931195d3d8968b619bcd683cb485/mythburn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
8335,
1180,
12,
2433,
16,
761,
816,
2211,
2433,
16,
761,
2107,
16,
3824,
1726,
16,
7611,
2730,
16,
3724,
16,
7611,
15374,
351,
835,
16,
3724,
4455,
16,
1694,
379,
2616,
9859,
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,
3724,
8335,
1180,
12,
2433,
16,
761,
816,
2211,
2433,
16,
761,
2107,
16,
3824,
1726,
16,
7611,
2730,
16,
3724,
16,
7611,
15374,
351,
835,
16,
3724,
4455,
16,
1694,
379,
2616,
9859,
16,... |
gtk.gdk.threads_leave() | def __renderImage(self, path, image_name): path = os.path.abspath(os.path.expanduser(path)) try: pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(path, 150, 100) except: return gtk.gdk.threads_enter() iter = self.list_store.append([path, image_name, pixbuf]) self.emit('selection_changed', self.isEmpty()) gtk.gdk.threads_leave() return pixbuf, path, iter | 6e1d2a904ce32398fbce456556eb3ca43c26f0d9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3764/6e1d2a904ce32398fbce456556eb3ca43c26f0d9/widgetModeler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
5902,
2040,
12,
2890,
16,
589,
16,
1316,
67,
529,
4672,
589,
273,
1140,
18,
803,
18,
5113,
803,
12,
538,
18,
803,
18,
12320,
1355,
12,
803,
3719,
775,
30,
11871,
4385,
273,
227... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5902,
2040,
12,
2890,
16,
589,
16,
1316,
67,
529,
4672,
589,
273,
1140,
18,
803,
18,
5113,
803,
12,
538,
18,
803,
18,
12320,
1355,
12,
803,
3719,
775,
30,
11871,
4385,
273,
227... | |
rpm_args.append('-bb') | rpm_cmd.append('-bb') | def run (self): | aaa422b673da8feedf207e7bdf51e8f27a26e54a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/aaa422b673da8feedf207e7bdf51e8f27a26e54a/bdist_rpm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
261,
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,
0,
0... | [
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
261,
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,
-100,
... |
if not dirs_in_sys_path.has_key(dircase) and os.path.exists(dir): | if not _dirs_in_sys_path.has_key(dircase) and os.path.exists(dir): | def addpackage(sitedir, name): fullname = os.path.join(sitedir, name) try: f = open(fullname) except IOError: return while 1: dir = f.readline() if not dir: break if dir[0] == '#': continue if dir.startswith("import"): exec dir continue if dir[-1] == '\n': dir = dir[:-1] dir, dircase = makepath(sitedir, dir) if not dirs_in_sys_path.has_key(dircase) and os.path.exists(dir): sys.path.append(dir) dirs_in_sys_path[dircase] = 1 | b68c1c0ec8bab05ec1aa55c4302f521a8e0b0e3c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b68c1c0ec8bab05ec1aa55c4302f521a8e0b0e3c/site.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
5610,
12,
87,
16261,
481,
16,
508,
4672,
13321,
273,
1140,
18,
803,
18,
5701,
12,
87,
16261,
481,
16,
508,
13,
775,
30,
284,
273,
1696,
12,
21885,
13,
1335,
8340,
30,
327,
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,
527,
5610,
12,
87,
16261,
481,
16,
508,
4672,
13321,
273,
1140,
18,
803,
18,
5701,
12,
87,
16261,
481,
16,
508,
13,
775,
30,
284,
273,
1696,
12,
21885,
13,
1335,
8340,
30,
327,
1323,... |
ShortField("length",None), | FieldLenField("len",None,"load","H",shift=-8), | def post_build(self, p): if self.length is None: p = p[:24]+struct.pack("!I",len(p))+p[28:] return p | 654a380b6e2c5d80ae90c72b299ab9bb8e222f10 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/654a380b6e2c5d80ae90c72b299ab9bb8e222f10/scapy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1603,
67,
3510,
12,
2890,
16,
293,
4672,
309,
365,
18,
2469,
353,
599,
30,
293,
273,
293,
10531,
3247,
3737,
1697,
18,
2920,
2932,
5,
45,
3113,
1897,
12,
84,
3719,
15,
84,
63,
6030,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1603,
67,
3510,
12,
2890,
16,
293,
4672,
309,
365,
18,
2469,
353,
599,
30,
293,
273,
293,
10531,
3247,
3737,
1697,
18,
2920,
2932,
5,
45,
3113,
1897,
12,
84,
3719,
15,
84,
63,
6030,
... |
global counter | def mktemp(suffix=""): """User-callable function to return a unique temporary file name.""" global counter dir = gettempdir() pre = gettempprefix() while 1: counter = counter + 1 file = os.path.join(dir, pre + `counter` + suffix) if not os.path.exists(file): return file | 7f79d9c62a6c1697def31d916e7ba896252ba4c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7f79d9c62a6c1697def31d916e7ba896252ba4c5/tempfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5028,
5814,
12,
8477,
1546,
6,
4672,
3536,
1299,
17,
7293,
445,
358,
327,
279,
3089,
6269,
585,
508,
12123,
1577,
273,
336,
5814,
1214,
1435,
675,
273,
336,
5814,
3239,
1435,
1323,
404,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5028,
5814,
12,
8477,
1546,
6,
4672,
3536,
1299,
17,
7293,
445,
358,
327,
279,
3089,
6269,
585,
508,
12123,
1577,
273,
336,
5814,
1214,
1435,
675,
273,
336,
5814,
3239,
1435,
1323,
404,
... | |
def __init__(self, album_name, api_key, api_secret, session_key): | def __init__(self, album_name, api_key, api_secret, session_key=""): | def __init__(self, album_name, api_key, api_secret, session_key): _Search.__init__(self, "album", {"album": album_name}, api_key, api_secret, session_key) | 8d8063afe8067477accae5bef5e470a4a3cbfa5d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9926/8d8063afe8067477accae5bef5e470a4a3cbfa5d/pylast.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
14844,
67,
529,
16,
1536,
67,
856,
16,
1536,
67,
5875,
16,
1339,
67,
856,
1546,
6,
4672,
225,
389,
2979,
16186,
2738,
972,
12,
2890,
16,
315,
25090,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14844,
67,
529,
16,
1536,
67,
856,
16,
1536,
67,
5875,
16,
1339,
67,
856,
1546,
6,
4672,
225,
389,
2979,
16186,
2738,
972,
12,
2890,
16,
315,
25090,
31... |
found = compare_cvs_revs(actualversion,m.new_revision) == 0 | found = compare_cvs_revs(actualversion,m.new_revision) >= 0 | def _checkoutUpstreamRevision(self, revision): """ Concretely do the checkout of the upstream sources. Use `revision` as the name of the tag to get, or as a date if it starts with a number. | b555c83acf4fe4adbd497bde6e266a9988f3680d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5981/b555c83acf4fe4adbd497bde6e266a9988f3680d/cvsps.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
17300,
1211,
3256,
7939,
12,
2890,
16,
6350,
4672,
3536,
735,
71,
1349,
2357,
741,
326,
13926,
434,
326,
13505,
5550,
18,
2672,
1375,
13057,
68,
487,
326,
508,
434,
326,
1047,
358,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
17300,
1211,
3256,
7939,
12,
2890,
16,
6350,
4672,
3536,
735,
71,
1349,
2357,
741,
326,
13926,
434,
326,
13505,
5550,
18,
2672,
1375,
13057,
68,
487,
326,
508,
434,
326,
1047,
358,
... |
phone.phoneType = random.choice(PHONETYPES) | def GeneratePhoneNumbers(): list = [] for i in range(random.randint(1, 3)): phone = Contacts.PhoneNumber() phone.phoneNumber = GeneratePhoneNumber() phone.phoneType = random.choice(PHONETYPES) list.append(phone) return list | c79f8b438736d960a0cac7614e9af1c01893c75c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/c79f8b438736d960a0cac7614e9af1c01893c75c/GenerateItems.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6654,
9451,
10072,
13332,
666,
273,
5378,
364,
277,
316,
1048,
12,
9188,
18,
7884,
474,
12,
21,
16,
890,
3719,
30,
7353,
273,
13329,
87,
18,
16943,
1435,
7353,
18,
10540,
1854,
273,
66... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6654,
9451,
10072,
13332,
666,
273,
5378,
364,
277,
316,
1048,
12,
9188,
18,
7884,
474,
12,
21,
16,
890,
3719,
30,
7353,
273,
13329,
87,
18,
16943,
1435,
7353,
18,
10540,
1854,
273,
66... | |
F = N.zeros(3, dtype=N.float64); | F = NP.zeros(3, dtype=NP.float64); | def load_volume(imagedesc, imagename=None, threshold=0.999, debug=0): """ image = load_volume(imagedesc, imagename=None, threshold=0.999, debug=0) --- OR --- image, h, ih, index = load_volume(imagedesc, imagename=None, threshold=0.999, debug=0) gets an image descriptor and optional filename and returns a scaled 8 bit volume. The scaling is designed to make full use of the 8 bits (ignoring high amplitude outliers). The current method uses numpy fromfile and will be replaced by neuroimage nifti load. Parameters ....... imagedesc : {dictionary} imagedesc is the descriptor of the image to be read. imagename : {string} : optional name of image file. No name creates a blank image that is used for creating a rotated test image or image rescaling. threshold : {float} : optional this is the threshold for upper cutoff in the 8 bit scaling. The volume histogram and integrated histogram is computed and the upper amplitude cutoff is where the integrated histogram crosses the value set in the threshold. setting threshold to 1.0 means the scaling is done over the min to max amplitude range. debug : {0, 1} : optional when debug=1 the method returns the volume histogram, integrated histogram and the amplitude index where the provided threshold occured. Returns ....... image : {dictionary} the volume data assoicated with the filename or a blank volume of the same dimensions as specified in imagedesc. --- OR --- (if debug = 1) image : {dictionary} the volume data assoicated with the filename or a blank volume of the same dimensions as specified in imagedesc. h : {nd_array} the volume 1D amplitude histogram ih : {nd_array} the volume 1D amplitude integrated histogram index : {int} the amplitude (histogram index) where the integrated histogram crosses the 'threshold' provided. Examples ........ >>> import numpy as N >>> import _registration as reg >>> anat_desc = reg.load_anatMRI_desc() >>> image_anat, h, ih, index = reg.load_volume(anat_desc, imagename='ANAT1_V0001.img', debug=1) >>> index 210 """ # load MRI or fMRI volume and return an autoscaled 8 bit image. # autoscale is using integrated histogram to deal with outlier high amplitude voxels if imagename == None: # imagename of none means to create a blank image ImageVolume = N.zeros(imagedesc['layers']*imagedesc['rows']*imagedesc['cols'], dtype=N.uint16).reshape(imagedesc['layers'], imagedesc['rows'], imagedesc['cols']) else: ImageVolume = N.fromfile(imagename, dtype=N.uint16).reshape(imagedesc['layers'], imagedesc['rows'], imagedesc['cols']); # the mat (voxel to physical) matrix M = N.eye(4, dtype=N.float64); # for now just the sample size (mm units) in x, y and z M[0][0] = imagedesc['sample_x'] M[1][1] = imagedesc['sample_y'] M[2][2] = imagedesc['sample_z'] # dimensions D = N.zeros(3, dtype=N.int32); # Gaussian kernel - fill in with build_fwhm() F = N.zeros(3, dtype=N.float64); D[0] = imagedesc['rows'] D[1] = imagedesc['cols'] D[2] = imagedesc['layers'] if imagename == None: # no voxels to scale to 8 bits ImageVolume = ImageVolume.astype(N.uint8) image = {'data' : ImageVolume, 'mat' : M, 'dim' : D, 'fwhm' : F} return image # 8 bit scale with threshold clip of the volume integrated histogram max = ImageVolume.max() min = ImageVolume.min() ih = N.zeros(max-min+1, dtype=N.float64); h = N.zeros(max-min+1, dtype=N.float64); if threshold <= 0: threshold = 0.999 elif threshold > 1.0: threshold = 1.0 # get the integrated histogram of the volume and get max from # the threshold crossing in the integrated histogram index = R.register_image_threshold(ImageVolume, h, ih, threshold) scale = 255.0 / (index-min) # generate the scaled 8 bit image images = (scale*(ImageVolume.astype(N.float)-min)) images[images>255] = 255 image = {'data' : images.astype(N.uint8), 'mat' : M, 'dim' : D, 'fwhm' : F} if debug == 1: return image, h, ih, index else: return image | de681f926e982b0212f2f58bf637917926737f89 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/de681f926e982b0212f2f58bf637917926737f89/_registration.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
9491,
12,
381,
11349,
742,
16,
8902,
1069,
33,
7036,
16,
5573,
33,
20,
18,
11984,
16,
1198,
33,
20,
4672,
225,
3536,
1316,
273,
1262,
67,
9491,
12,
381,
11349,
742,
16,
890... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1262,
67,
9491,
12,
381,
11349,
742,
16,
8902,
1069,
33,
7036,
16,
5573,
33,
20,
18,
11984,
16,
1198,
33,
20,
4672,
225,
3536,
1316,
273,
1262,
67,
9491,
12,
381,
11349,
742,
16,
890... |
file_to_check=p_dir + "/include/"+qglobal_file; | def try_qtdir(p_dir,version_major,version_minor): if (not os.path.isfile(p_dir + "/bin/moc")): return False; qglobal_file="qglobal.h"; if (version_major>=4): qglobal_file="Qt/qglobal.h" if (not os.path.isfile(p_dir + "/include/"+qglobal_file)): return False; file_to_check=p_dir + "/include/"+qglobal_file; print "trying" + file_to_check; | 31ad11a3beef51ba448f9f1581aeedf33e10dbcc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2217/31ad11a3beef51ba448f9f1581aeedf33e10dbcc/detect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
775,
67,
23311,
1214,
12,
84,
67,
1214,
16,
1589,
67,
14019,
16,
1589,
67,
17364,
4672,
225,
309,
261,
902,
1140,
18,
803,
18,
291,
768,
12,
84,
67,
1214,
397,
2206,
4757,
19,
81,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
775,
67,
23311,
1214,
12,
84,
67,
1214,
16,
1589,
67,
14019,
16,
1589,
67,
17364,
4672,
225,
309,
261,
902,
1140,
18,
803,
18,
291,
768,
12,
84,
67,
1214,
397,
2206,
4757,
19,
81,
... | |
_translation = translation(domain=domain, languages=_languages, class_=RoundupTranslations) | _translation = find_translation(domain=domain, languages=_languages, class_=translation_class) | def get_translation(language=None, domain=DOMAIN): """Return Translation object for given language and domain""" if language: _languages = [language] else: # use OS environment _languages = None # except for english ("en") language, add english fallback if available if language == "en": _fallback = None else: try: _fallback = translation(domain=domain, languages=["en"], class_=RoundupTranslations) except IOError: # no .mo files found _fallback = None # get the translation try: _translation = translation(domain=domain, languages=_languages, class_=RoundupTranslations) except IOError: _translation = None # see what's found if _translation and _fallback: _translation.add_fallback(_fallback) elif _fallback: _translation = _fallback elif not _translation: _translation = RoundupNullTranslations() return _translation | f273e5051ed346960e0a84c1f1aa4ac3b3142d19 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f273e5051ed346960e0a84c1f1aa4ac3b3142d19/i18n.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
10173,
12,
4923,
33,
7036,
16,
2461,
33,
18192,
4672,
3536,
990,
17427,
733,
364,
864,
2653,
471,
2461,
8395,
309,
2653,
30,
389,
14045,
273,
306,
4923,
65,
469,
30,
468,
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,
336,
67,
10173,
12,
4923,
33,
7036,
16,
2461,
33,
18192,
4672,
3536,
990,
17427,
733,
364,
864,
2653,
471,
2461,
8395,
309,
2653,
30,
389,
14045,
273,
306,
4923,
65,
469,
30,
468,
999,... |
fmt = _(u"%(index)3d. %(em)s%(person)s%(/em)s removed this item from the %(em)sTask List%(/em)s") | fmt = _(u"%(conflictNumber)3d. %(user)s removed this item from the <emphasis>Task List</emphasis>") | def __init__(self, frame, conflicts, callback): self.conflicts = conflicts self.acceptButtons = list() self.discardButtons = list() self.textControls = list() self.callback = callback | 2e25d8e497965606c80971d25c22cfc5478fdf17 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/2e25d8e497965606c80971d25c22cfc5478fdf17/ConflictDialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2623,
16,
14450,
16,
1348,
4672,
365,
18,
20340,
87,
273,
14450,
365,
18,
9436,
14388,
273,
666,
1435,
365,
18,
31992,
14388,
273,
666,
1435,
365,
18,
95... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2890,
16,
2623,
16,
14450,
16,
1348,
4672,
365,
18,
20340,
87,
273,
14450,
365,
18,
9436,
14388,
273,
666,
1435,
365,
18,
31992,
14388,
273,
666,
1435,
365,
18,
95... |
def onReplyOrForWardEvent(self, replyMethod): | def onReplyOrForwardEvent(self, replyMethod): | def onReplyOrForWardEvent(self, replyMethod): pim_ns = schema.ns('osaf.pim', self.itsView) main = schema.ns("osaf.views.main", self.itsView) selection = self.__getSelectedItems() replyMessage = None replyCollection = None # Note that this skips over any non-inbox items, so you # *could* select-all-reply for selectedItem in selection: if self.CanReplyOrForward(selectedItem): replyMessage = replyMethod(self.itsView, Mail.MailStamp(selectedItem)) # select the outbox collection if there was a reply if replyMessage is not None: sidebar = Block.Block.findBlockByName ("Sidebar") sidebar.select(pim_ns.outCollection) # select the last message replied/forwarded main.MainView.selectItems([replyMessage]) # by default the "from" field is selected, which looks funny; # so switch focus to the message body, except for "Forward", # which goes to the "To" field if replyMethod is not Mail.forwardMessage: focusTarget = Block.Block.findBlockByName('NotesBlock') else: focusTarget = Block.Block.findBlockByName('EditMailTo') if focusTarget is not None: focusTarget.widget.SetFocus() | 8fc24be64a9f8e190acdaf8331a4329984eed270 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/8fc24be64a9f8e190acdaf8331a4329984eed270/PimBlocks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
7817,
1162,
8514,
1133,
12,
2890,
16,
4332,
1305,
4672,
293,
381,
67,
2387,
273,
1963,
18,
2387,
2668,
538,
1727,
18,
84,
381,
2187,
365,
18,
1282,
1767,
13,
2774,
273,
1963,
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,
603,
7817,
1162,
8514,
1133,
12,
2890,
16,
4332,
1305,
4672,
293,
381,
67,
2387,
273,
1963,
18,
2387,
2668,
538,
1727,
18,
84,
381,
2187,
365,
18,
1282,
1767,
13,
2774,
273,
1963,
18,
... |
self.platform = None | def __init__(self, build, partner_dir, build_dir, working_dir, final_dir, repack_info): self.base_dir = os.getcwd() self.build = build self.full_build_path = "%s/%s/%s" % (self.base_dir, build_dir, build) self.full_partner_path = "%s/%s" % (self.base_dir, partner_dir) self.working_dir = working_dir self.final_dir = final_dir self.repack_info = repack_info mkdir(self.working_dir) self.platform = None | 8345bd04fc746d831846644290606cce5844b5a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10262/8345bd04fc746d831846644290606cce5844b5a8/partner-repacks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1361,
16,
19170,
67,
1214,
16,
1361,
67,
1214,
16,
5960,
67,
1214,
16,
727,
67,
1214,
16,
2071,
484,
67,
1376,
4672,
365,
18,
1969,
67,
1214,
273,
1140... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1361,
16,
19170,
67,
1214,
16,
1361,
67,
1214,
16,
5960,
67,
1214,
16,
727,
67,
1214,
16,
2071,
484,
67,
1376,
4672,
365,
18,
1969,
67,
1214,
273,
1140... | |
sql_lyr = ds.ExecuteSQL( "select proj4text from spatial_ref_sys" ) | sql_lyr = ds.ExecuteSQL( "select * from spatial_ref_sys" ) | dst_feat = ogr.Feature( feature_def = lyr.GetLayerDefn() ) | a12cd0bc2c71652e733634f4ebc6d409d83a88c3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10289/a12cd0bc2c71652e733634f4ebc6d409d83a88c3/ogr_sqlite.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3046,
67,
29735,
273,
320,
3197,
18,
4595,
12,
2572,
67,
536,
273,
18519,
86,
18,
967,
4576,
3262,
82,
1435,
262,
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,
3046,
67,
29735,
273,
320,
3197,
18,
4595,
12,
2572,
67,
536,
273,
18519,
86,
18,
967,
4576,
3262,
82,
1435,
262,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
data = self.data m, M = None, None for row in data: for val in row: if val is None: val = 0 if val is None: val = 0 if val < m: m = val if val > M: M = val return m, M | data = map(lambda x: map(lambda x: x is not None and x or 0,x), self.data) return min(min(data)), max(max(data)) | def _findMinMaxValues(self): "Find the minimum and maximum value of the data we have." | 2e99a565e0d5eecf3d86b9e11f4f81a32ea265e6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/2e99a565e0d5eecf3d86b9e11f4f81a32ea265e6/barcharts.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4720,
17454,
1972,
12,
2890,
4672,
315,
3125,
326,
5224,
471,
4207,
460,
434,
326,
501,
732,
1240,
1199,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
4720,
17454,
1972,
12,
2890,
4672,
315,
3125,
326,
5224,
471,
4207,
460,
434,
326,
501,
732,
1240,
1199,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
elif key!='': | else: | def read_incar(self): file=open('INCAR', 'r') file.readline() lines=file.readlines() for line in lines: key = line.split()[0].lower() try: if key in ['ispin', 'magmom']: continue self.incar_parameters[key] if key=='dipol': dipol=[] for n in range(3): dipol.append(float(line.split()[n+2])) self.incar_parameters[key] = dipol elif key!='': try: self.incar_parameters[key] = int(line.split()[2]) except ValueError: try: self.incar_parameters[key] = float(line.split()[2]) except ValueError: self.incar_parameters[key] = line.split()[2] self.incar_parameters[key]=line.split()[2] except KeyError: continue | f4df941d6c54cf13a5d420a795aef1f0f976beed /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5735/f4df941d6c54cf13a5d420a795aef1f0f976beed/vasp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
9523,
297,
12,
2890,
4672,
585,
33,
3190,
2668,
23213,
985,
2187,
296,
86,
6134,
585,
18,
896,
1369,
1435,
2362,
33,
768,
18,
896,
3548,
1435,
364,
980,
316,
2362,
30,
498,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
855,
67,
9523,
297,
12,
2890,
4672,
585,
33,
3190,
2668,
23213,
985,
2187,
296,
86,
6134,
585,
18,
896,
1369,
1435,
2362,
33,
768,
18,
896,
3548,
1435,
364,
980,
316,
2362,
30,
498,
... |
os.lseek(fd, size, 0) | if size <= 0: size = 1 os.lseek(fd, size-1, 0) | def expand(self, create = False, size = None): flags = os.O_WRONLY if create: flags |= os.O_CREAT makedirs(os.path.dirname(self.lofile)) | a5c394bb526de9090bb82c2703e29785ec3f254f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9342/a5c394bb526de9090bb82c2703e29785ec3f254f/fs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4542,
12,
2890,
16,
752,
273,
1083,
16,
963,
273,
599,
4672,
2943,
273,
1140,
18,
51,
67,
7181,
10857,
309,
752,
30,
2943,
5626,
1140,
18,
51,
67,
5458,
789,
12151,
12,
538,
18,
803,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4542,
12,
2890,
16,
752,
273,
1083,
16,
963,
273,
599,
4672,
2943,
273,
1140,
18,
51,
67,
7181,
10857,
309,
752,
30,
2943,
5626,
1140,
18,
51,
67,
5458,
789,
12151,
12,
538,
18,
803,... |
self.prohibit_importing('debian.debian_support') self.mock_imports('launch_control.sw_profile') mocker = Mocker() obj = mocker.replace('debian_bundle.debian_support.version_compare') mocker.replay() import launch_control.sw_profile self.assertTrue(launch_control.sw_profile.debian_version_compare is obj) mocker.verify() mocker.restore() | try: import debian except ImportError: pass else: self.prohibit_importing('debian.debian_support') self.mock_imports('launch_control.sw_profile') mocker = Mocker() obj = mocker.replace('debian_bundle.debian_support.version_compare') mocker.replay() import launch_control.sw_profile self.assertTrue(launch_control.sw_profile.debian_version_compare is obj) mocker.verify() mocker.restore() | def test_debian_import_failure(self): """ Make sure we import debian_bundle if debian is not available """ self.prohibit_importing('debian.debian_support') self.mock_imports('launch_control.sw_profile') mocker = Mocker() obj = mocker.replace('debian_bundle.debian_support.version_compare') mocker.replay() import launch_control.sw_profile self.assertTrue(launch_control.sw_profile.debian_version_compare is obj) mocker.verify() mocker.restore() | bfaeea99312c4063498b406d28424e4d30a4e0e8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7382/bfaeea99312c4063498b406d28424e4d30a4e0e8/sw_profile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
31888,
2779,
67,
5666,
67,
12251,
12,
2890,
4672,
3536,
4344,
3071,
732,
1930,
18202,
2779,
67,
9991,
309,
18202,
2779,
353,
486,
2319,
3536,
365,
18,
685,
31597,
67,
5666,
310... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
31888,
2779,
67,
5666,
67,
12251,
12,
2890,
4672,
3536,
4344,
3071,
732,
1930,
18202,
2779,
67,
9991,
309,
18202,
2779,
353,
486,
2319,
3536,
365,
18,
685,
31597,
67,
5666,
310... |
def do_clobber(dryrun=False, skip=None): | def do_clobber(dir, dryrun=False, skip=None): | def do_clobber(dryrun=False, skip=None): try: for f in os.listdir("."): if skip is not None and f in skip: print "Skipping", f continue clobber_path=f+clobber_suffix if os.path.isfile(f): print "Removing", f if not dryrun: if os.path.exists(clobber_path): os.unlink(clobber_path) # Prevent repeated moving. if f.endswith(clobber_suffix): os.unlink(f) else: shutil.move(f, clobber_path) os.unlink(clobber_path) elif os.path.isdir(f): print "Removing %s/" % f if not dryrun: if os.path.exists(clobber_path): rmdirRecursive(clobber_path) # Prevent repeated moving. if f.endswith(clobber_suffix): rmdirRecursive(f) else: shutil.move(f, clobber_path) rmdirRecursive(clobber_path) except: print "Couldn't clobber properly, bailing out." sys.exit(1) | 8fd578291b3c8fddba8b901618c3aefa4752040a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6206/8fd578291b3c8fddba8b901618c3aefa4752040a/clobberer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
71,
1295,
744,
12,
1214,
16,
10299,
2681,
33,
8381,
16,
2488,
33,
7036,
4672,
775,
30,
364,
284,
316,
1140,
18,
1098,
1214,
2932,
1199,
4672,
309,
2488,
353,
486,
599,
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,
741,
67,
71,
1295,
744,
12,
1214,
16,
10299,
2681,
33,
8381,
16,
2488,
33,
7036,
4672,
775,
30,
364,
284,
316,
1140,
18,
1098,
1214,
2932,
1199,
4672,
309,
2488,
353,
486,
599,
471,
... |
L += srange(args[i-1]+diff, args[i+1]+1, diff, universe=universe, check=False) | L += srange(args[i-1]+diff, args[i+1], diff, universe=universe, check=False, include_endpoint=True) | def ellipsis_range(*args): """ Return arithmatic sequence determined by the numeric arguments and ellipsis. Best illistrated by examples. Use [1,2,..,n] notation. EXAMPLES: sage: ellipsis_range(1,Ellipsis,11,100) [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 100] sage: ellipsis_range(0,2,Ellipsis,10,Ellipsis,20) [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20] sage: ellipsis_range(0,2,Ellipsis,11,Ellipsis,20) [0, 2, 4, 6, 8, 10, 11, 13, 15, 17, 19] """ from sage.structure.sequence import Sequence S = Sequence([a for a in args if a is not Ellipsis]) universe = S.universe() args = [Ellipsis if a is Ellipsis else universe(a) for a in args] diff = universe(1) if Ellipsis in args: i = args.index(Ellipsis) if i > 1: diff = args[i-1]-args[i-2] skip = False L = [] for i in range(len(args)): if skip: skip = False elif args[i] is Ellipsis: if i > 2 and args[i-2] is Ellipsis and L[-1] != args[i-1]: L.append(args[i-1]) L += srange(args[i-1]+diff, args[i+1]+1, diff, universe=universe, check=False) skip = True else: L.append(args[i]) return L | 5b781f7eaf348560b064f95fb5c58a9bc3a13c10 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/5b781f7eaf348560b064f95fb5c58a9bc3a13c10/misc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
28992,
67,
3676,
30857,
1968,
4672,
3536,
2000,
419,
13612,
2126,
3102,
11383,
635,
326,
6389,
1775,
471,
28992,
18,
25717,
277,
2906,
3337,
690,
635,
10991,
18,
225,
2672,
306,
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,
28992,
67,
3676,
30857,
1968,
4672,
3536,
2000,
419,
13612,
2126,
3102,
11383,
635,
326,
6389,
1775,
471,
28992,
18,
25717,
277,
2906,
3337,
690,
635,
10991,
18,
225,
2672,
306,
21,
16,
... |
":build.macppc.shared:PythonApplet.", | ":build.macppc.shared:PythonAppletPPC.", | def buildapplet(top, dummy, list): """Create a PPC python applet""" template = mkapplet.findtemplate() for src in list: if src[-3:] != '.py': raise 'Should end in .py', src base = os.path.basename(src) dst = os.path.join(top, base)[:-3] src = os.path.join(top, src) try: os.unlink(dst) except os.error: pass print 'Building applet', dst mkapplet.process(template, src, dst) | 0c28b63263149c7e1a7a07ef92681a509258fd3e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0c28b63263149c7e1a7a07ef92681a509258fd3e/fullbuild.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
438,
1469,
12,
3669,
16,
9609,
16,
666,
4672,
3536,
1684,
279,
453,
3513,
5790,
21853,
8395,
1542,
273,
5028,
438,
1469,
18,
4720,
3202,
1435,
364,
1705,
316,
666,
30,
309,
1705,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
438,
1469,
12,
3669,
16,
9609,
16,
666,
4672,
3536,
1684,
279,
453,
3513,
5790,
21853,
8395,
1542,
273,
5028,
438,
1469,
18,
4720,
3202,
1435,
364,
1705,
316,
666,
30,
309,
1705,
... |
""" Friedman Chi-Square is a non-parametric, one-way within-subjects ANOVA. This function calculates the Friedman Chi-square test for repeated measures and returns the result, along with the associated probability value. It assumes 3 or more repeated measures. Only 3 levels requires a minimum of 10 subjects in the study. Four levels requires 5 subjects per level(??). Returns: chi-square statistic, associated p-value """ | """Friedman Chi-Square is a non-parametric, one-way within-subjects ANOVA. This function calculates the Friedman Chi-square test for repeated measures and returns the result, along with the associated probability value. It assumes 3 or more repeated measures. Only 3 levels requires a minimum of 10 subjects in the study. Four levels requires 5 subjects per level(??). Returns: chi-square statistic, associated p-value """ | def friedmanchisquare(*args): """ | 4df9a383125c76d1f060a1bc70e49a9dd5337298 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/4df9a383125c76d1f060a1bc70e49a9dd5337298/stats.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
24012,
4728,
343,
291,
6182,
30857,
1968,
4672,
3536,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
284,
24012,
4728,
343,
291,
6182,
30857,
1968,
4672,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
raise | def __init__(self, event): """ @type event: L{Event} @param event: Event object for crash. """ | bc157283ede9bbd0aa98c93d01ee2b9c2dc2c159 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7261/bc157283ede9bbd0aa98c93d01ee2b9c2dc2c159/crash.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
871,
4672,
3536,
632,
723,
225,
871,
30,
511,
95,
1133,
97,
632,
891,
871,
30,
2587,
733,
364,
17053,
18,
3536,
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,
1001,
2738,
972,
12,
2890,
16,
871,
4672,
3536,
632,
723,
225,
871,
30,
511,
95,
1133,
97,
632,
891,
871,
30,
2587,
733,
364,
17053,
18,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
(?P<escaped>%(delim)s{2}) | %(delim)s(?P<named>%(id)s) | %(delim)s{(?P<braced>%(id)s)} | (?P<invalid>%(delim)s) | %(delim)s(?: (?P<escaped>%(delim)s) | (?P<named>%(id)s) | {(?P<braced>%(id)s)} | (?P<invalid>) ) | def __getitem__(self, key): try: return self._primary[key] except KeyError: return self._secondary[key] | d552b8159ef9b3dc544a386f7b55967804eb1122 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/d552b8159ef9b3dc544a386f7b55967804eb1122/string.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
498,
4672,
775,
30,
327,
365,
6315,
8258,
63,
856,
65,
1335,
4999,
30,
327,
365,
6315,
19674,
63,
856,
65,
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,
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,
1001,
31571,
972,
12,
2890,
16,
498,
4672,
775,
30,
327,
365,
6315,
8258,
63,
856,
65,
1335,
4999,
30,
327,
365,
6315,
19674,
63,
856,
65,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
ssh.connect(hostname, port=22, username=username, password=password, timeout=timeout) | ssh.connect(host, port=22, username=username, password=password, timeout=timeout) | def paramikoConnect(hostname, username, password, timeout): """Connects to 'hostname' and returns a Paramiko transport object to use in further communications""" # Uncomment this line to turn on Paramiko debugging (good for troubleshooting why some servers report connection failures) #paramiko.util.log_to_file('paramiko.log') ssh = paramiko.SSHClient() try: ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh.connect(hostname, port=22, username=username, password=password, timeout=timeout) except Exception, detail: # Connecting failed (for whatever reason) ssh = str(detail) return ssh | 6f69307ce1383825280bcd450de5b2253a841bcf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11566/6f69307ce1383825280bcd450de5b2253a841bcf/sshpt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
579,
27113,
5215,
12,
10358,
16,
2718,
16,
2201,
16,
2021,
4672,
3536,
21500,
358,
296,
10358,
11,
471,
1135,
279,
3014,
27113,
4736,
733,
358,
999,
316,
9271,
18279,
87,
8395,
468,
1351... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
579,
27113,
5215,
12,
10358,
16,
2718,
16,
2201,
16,
2021,
4672,
3536,
21500,
358,
296,
10358,
11,
471,
1135,
279,
3014,
27113,
4736,
733,
358,
999,
316,
9271,
18279,
87,
8395,
468,
1351... |
(device, open('/proc/partitions').read())) | (device, open('/proc/swaps').read())) | def get_swap_size_linux(device): """Return the size of the partition in bytes""" f = open("/proc/swaps") line = f.readline() if not re.search('Filename\s+Type\s+Size', line): raise RuntimeError("Unexpected first line in /proc/swaps '%s'" % line) for line in f: ret = re.search("%s\s+\w+\s+([0-9]+)\s" % device, line) if ret: return int(ret.group(1)) * 1024 raise RuntimeError("error: cannot find size of swap device '%s'\n%s" % \ (device, open('/proc/partitions').read())) | 59cf996d3971db9cac8c75eff9368e6e12b09ef4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7853/59cf996d3971db9cac8c75eff9368e6e12b09ef4/Memory.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
22270,
67,
1467,
67,
20132,
12,
5964,
4672,
3536,
990,
326,
963,
434,
326,
3590,
316,
1731,
8395,
284,
273,
1696,
2932,
19,
9381,
19,
5328,
6679,
7923,
980,
273,
284,
18,
896,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
22270,
67,
1467,
67,
20132,
12,
5964,
4672,
3536,
990,
326,
963,
434,
326,
3590,
316,
1731,
8395,
284,
273,
1696,
2932,
19,
9381,
19,
5328,
6679,
7923,
980,
273,
284,
18,
896,... |
else: ext = ".pyc" pyfile = os.path.join(path, baseName + ".py") | pyfile = os.path.join(path, baseName + ext) | def _find_localserver_module(): import win32com.server path = win32com.server.__path__[0] baseName = "localserver" pyfile = os.path.join(path, baseName + ".py") try: os.stat(pyfile) except os.error: # See if we have a compiled extension if __debug__: ext = ".pyo" else: ext = ".pyc" pyfile = os.path.join(path, baseName + ".py") try: os.stat(pyfile) except os.error: raise RuntimeError, "Can not locate the Python file '%s'" % baseName return pyfile | 79254f19914ec0f6c438338b016a190e95d7b21c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/79254f19914ec0f6c438338b016a190e95d7b21c/register.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4720,
67,
3729,
3567,
67,
2978,
13332,
1930,
5657,
1578,
832,
18,
3567,
589,
273,
5657,
1578,
832,
18,
3567,
16186,
803,
972,
63,
20,
65,
16162,
273,
315,
3729,
3567,
6,
2395,
768... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4720,
67,
3729,
3567,
67,
2978,
13332,
1930,
5657,
1578,
832,
18,
3567,
589,
273,
5657,
1578,
832,
18,
3567,
16186,
803,
972,
63,
20,
65,
16162,
273,
315,
3729,
3567,
6,
2395,
768... |
tooltip = goocanvas.Text(x= leftx - 20, y = lefty, font = "Sans 9", text=pad.get_name(), anchor=gtk.ANCHOR_E) | tooltip = goocanvas.Group() tipwidth = 8 * len(pad.get_name()) tiptext = goocanvas.Text(x= leftx - (tipwidth + 16), y = lefty, font = "Sans 9", text=pad.get_name(), anchor=gtk.ANCHOR_W) tipbg = goocanvas.Rect(x = leftx - (tipwidth + 18), y = lefty - 8, height = 16, width = tipwidth, line_width = 1, stroke_color = "red", fill_color = "pink") tooltip.add_child(tipbg) tooltip.add_child(tiptext) tooltip.set_property("visibility", goocanvas.INVISIBLE) | def _makePads(self): "Creates a Group containing individual pad widgets" #TODO: color code based on caps pgroup = goocanvas.Group() pgroup lefty = 109 righty = 109 leftx = 109 rightx = 191 factory = self.element.get_factory() templist = factory.get_static_pad_templates() #workaround for empty elements #if not padlist: # return pgroup #TODO: clean and optimize this loop for template in templist: #add any not yet existing pads using templates pad = self.element.get_pad(template.name_template) if not pad: pad = gst.pad_new_from_static_template(template, template.name_template) self.element.add_pad(pad) | 93da486052dd150c82365a0d2abe5f1fc432a88a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2689/93da486052dd150c82365a0d2abe5f1fc432a88a/gsteditorelement.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6540,
14878,
87,
12,
2890,
4672,
315,
2729,
279,
3756,
4191,
7327,
4627,
10965,
6,
468,
6241,
30,
2036,
981,
2511,
603,
15788,
293,
1655,
273,
1960,
504,
304,
4423,
18,
1114,
1435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6540,
14878,
87,
12,
2890,
4672,
315,
2729,
279,
3756,
4191,
7327,
4627,
10965,
6,
468,
6241,
30,
2036,
981,
2511,
603,
15788,
293,
1655,
273,
1960,
504,
304,
4423,
18,
1114,
1435,
... |
raise ImportError, 'No module named ' + module_name | raise ImportError, 'No module named ' + head | def load_component(name, path=None, globals=None, locals=None): if '.' in name: i = name.find('.') head, tail = name[:i], name[i + 1:] else: head, tail = name, '' module = _load_module(head, head, None, path) if not module: raise ImportError, 'No module named ' + module_name while tail: i = tail.find('.') if i < 0: i = len(tail) head, tail = tail[:i], tail[i + 1:] module_name = '%s.%s' % (module.__name__, head) module = _load_module(head, module_name, module, path) if not module: raise ImportError, 'No module named ' + module_name | b7686e4dcb32df3073567d61273bb0088a7fb073 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/b7686e4dcb32df3073567d61273bb0088a7fb073/loader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
4652,
12,
529,
16,
589,
33,
7036,
16,
10941,
33,
7036,
16,
8985,
33,
7036,
4672,
309,
2611,
316,
508,
30,
277,
273,
508,
18,
4720,
2668,
1093,
13,
910,
16,
5798,
273,
508,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1262,
67,
4652,
12,
529,
16,
589,
33,
7036,
16,
10941,
33,
7036,
16,
8985,
33,
7036,
4672,
309,
2611,
316,
508,
30,
277,
273,
508,
18,
4720,
2668,
1093,
13,
910,
16,
5798,
273,
508,
... |
result = S_ERROR(res['Message']) | result = S_ERROR( res['Message'] ) | def __gfal_wrapper(self, operation, gfalDict, srmRequestID = None ): | 70e66af095cb6701e39b1e701e4a2ce4d012b4f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/70e66af095cb6701e39b1e701e4a2ce4d012b4f7/SRM2Storage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
75,
74,
287,
67,
8376,
12,
2890,
16,
1674,
16,
13828,
287,
5014,
16,
272,
8864,
691,
734,
273,
599,
262,
30,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
75,
74,
287,
67,
8376,
12,
2890,
16,
1674,
16,
13828,
287,
5014,
16,
272,
8864,
691,
734,
273,
599,
262,
30,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
version_list = [int(i) for i in version_string.split()[-1].split('.')] | version_list = [int(i) for i in version_string.split()[1].split('.')] | def findModuleFiles(module, project_info): # Find the files related to the selected module cfiles = [] sfiles = [] # .c files related to the module and the cpu architecture for filename, path in project_info.searchFiles(module + ".c"): path = path.replace(project_info.info("BERTOS_PATH") + os.sep, "") path = replaceSeparators(path) cfiles.append(path + "/" + filename) # .s files related to the module and the cpu architecture for filename, path in project_info.searchFiles(module + ".s") + \ project_info.searchFiles(module + ".S"): path = path.replace(project_info.info("BERTOS_PATH") + os.sep, "") path = replaceSeparators(path) sfiles.append(path + "/" + filename) # .c and .s files related to the module and the cpu tags tags = project_info.info("CPU_INFOS")["CPU_TAGS"] # Awful, but secure check for version # TODO: split me in a method/function try: version_string = bertosVersion(project_info.info("BERTOS_PATH")) version_list = [int(i) for i in version_string.split()[-1].split('.')] except ValueError: # If the version file hasn't a valid version number assume it's an older # project. version_list = [0, 0] if version_list < [2, 5]: # For older versions of BeRTOS add the toolchain to the tags tags.append(project_info.info("CPU_INFOS")["TOOLCHAIN"]) for tag in tags: for filename, path in project_info.searchFiles(module + "_" + tag + ".c"): path = path.replace(project_info.info("BERTOS_PATH") + os.sep, "") if os.sep != "/": path = replaceSeparators(path) cfiles.append(path + "/" + filename) for filename, path in project_info.searchFiles(module + "_" + tag + ".s") + \ project_info.searchFiles(module + "_" + tag + ".S"): path = path.replace(project_info.info("BERTOS_PATH") + os.sep, "") path = replaceSeparators(path) sfiles.append(path + "/" + filename) return cfiles, sfiles | 60f0e0829b5fe5084054cec0fb122da9191cba5b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9114/60f0e0829b5fe5084054cec0fb122da9191cba5b/bertos_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
3120,
2697,
12,
2978,
16,
1984,
67,
1376,
4672,
468,
4163,
326,
1390,
3746,
358,
326,
3170,
1605,
276,
2354,
273,
5378,
272,
2354,
273,
5378,
468,
263,
71,
1390,
3746,
358,
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,
1104,
3120,
2697,
12,
2978,
16,
1984,
67,
1376,
4672,
468,
4163,
326,
1390,
3746,
358,
326,
3170,
1605,
276,
2354,
273,
5378,
272,
2354,
273,
5378,
468,
263,
71,
1390,
3746,
358,
326,
... |
BUILD_EXE_NAME = "Chromium.app/Contents/MacOS/Chromium" | BUILD_EXE_NAME = 'Chromium.app/Contents/MacOS/Chromium' | def SetArchiveVars(archive): """Set a bunch of global variables appropriate for the specified archive.""" global BUILD_ARCHIVE_TYPE global BUILD_ARCHIVE_DIR global BUILD_ZIP_NAME global BUILD_DIR_NAME global BUILD_EXE_NAME global BUILD_BASE_URL BUILD_ARCHIVE_TYPE = archive BUILD_ARCHIVE_DIR = 'chromium-rel-' + BUILD_ARCHIVE_TYPE if BUILD_ARCHIVE_TYPE in ('linux', 'linux-64'): BUILD_ZIP_NAME = 'chrome-linux.zip' BUILD_DIR_NAME = 'chrome-linux' BUILD_EXE_NAME = "chrome" elif BUILD_ARCHIVE_TYPE in ('mac'): BUILD_ZIP_NAME = 'chrome-mac.zip' BUILD_DIR_NAME = 'chrome-mac' BUILD_EXE_NAME = "Chromium.app/Contents/MacOS/Chromium" elif BUILD_ARCHIVE_TYPE in ('xp'): BUILD_ZIP_NAME = 'chrome-win32.zip' BUILD_DIR_NAME = 'chrome-win32' BUILD_EXE_NAME = "chrome.exe" BUILD_BASE_URL += BUILD_ARCHIVE_DIR | 02d09ff36aee01d534a3b286ed0ea9934b6b02d7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/02d09ff36aee01d534a3b286ed0ea9934b6b02d7/build-bisect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
7465,
5555,
12,
10686,
4672,
3536,
694,
279,
25606,
434,
2552,
3152,
5505,
364,
326,
1269,
5052,
12123,
2552,
30054,
67,
10586,
5354,
67,
2399,
2552,
30054,
67,
10586,
5354,
67,
4537... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1000,
7465,
5555,
12,
10686,
4672,
3536,
694,
279,
25606,
434,
2552,
3152,
5505,
364,
326,
1269,
5052,
12123,
2552,
30054,
67,
10586,
5354,
67,
2399,
2552,
30054,
67,
10586,
5354,
67,
4537... |
r""" Numbers $n$ such that $\phi(2n-1) < \phi(2n)$, where $\phi$ is Euler's totient function. Eulers totient function is also known as euler_phi, euler_phi is a standard SAGE function. INPUT: n -- positive integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A001836; a Numbers n such that phi(2n-1) < phi(2n), where phi is Euler's totient function A000010. sage: a.offset 1 sage: a(1) 53 sage: a(8) 683 sage: a(300) 17798 sage: a.list(12) [53, 83, 158, 263, 293, 368, 578, 683, 743, 788, 878, 893] sage: a(0) Traceback (most recent call last): ... ValueError: input n (=0) must be a positive integer Compare: Searching Sloane's online database... Numbers n such that phi(2n-1) < phi(2n), where phi is Eler's totient function A000010. [53, 83, 158, 263, 293, 368, 578, 683, 743, 788, 878, 893] AUTHOR: -- Jaap Spies (2007-01-17) """ def __init__(self): | def __init__(self): r""" Numbers $n$ such that $\phi(2n-1) < \phi(2n)$, where $\phi$ is Euler's totient function. Eulers totient function is also known as euler_phi, euler_phi is a standard SAGE function. INPUT: n -- positive integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A001836; a Numbers n such that phi(2n-1) < phi(2n), where phi is Euler's totient function A000010. sage: a.offset 1 sage: a(1) 53 sage: a(8) 683 sage: a(300) 17798 sage: a.list(12) [53, 83, 158, 263, 293, 368, 578, 683, 743, 788, 878, 893] sage: a(0) Traceback (most recent call last): ... ValueError: input n (=0) must be a positive integer Compare: Searching Sloane's online database... Numbers n such that phi(2n-1) < phi(2n), where phi is Eler's totient function A000010. [53, 83, 158, 263, 293, 368, 578, 683, 743, 788, 878, 893] AUTHOR: -- Jaap Spies (2007-01-17) """ | def is_powerful(self,n): r""" This function returns True if and only if $n$ is a Powerful Number: | 69a199217d612e1c590af73e16003812c85b93ec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/69a199217d612e1c590af73e16003812c85b93ec/sloane_functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
12238,
2706,
12,
2890,
16,
82,
4672,
436,
8395,
1220,
445,
1135,
1053,
309,
471,
1338,
309,
271,
82,
8,
353,
279,
23783,
2706,
3588,
30,
2,
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,
353,
67,
12238,
2706,
12,
2890,
16,
82,
4672,
436,
8395,
1220,
445,
1135,
1053,
309,
471,
1338,
309,
271,
82,
8,
353,
279,
23783,
2706,
3588,
30,
2,
-100,
-100,
-100,
-100,
-100,
-100,... |
def buildProtocol(self, connection): | def buildProtocol(self, addr): | def buildProtocol(self, connection): """Create an instance of a subclass of Protocol. | d00672db2a6aeff840b23ad93b0ecf0d7b922f30 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/d00672db2a6aeff840b23ad93b0ecf0d7b922f30/protocol.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
5752,
12,
2890,
16,
3091,
4672,
3536,
1684,
392,
791,
434,
279,
10177,
434,
4547,
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... | [
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
5752,
12,
2890,
16,
3091,
4672,
3536,
1684,
392,
791,
434,
279,
10177,
434,
4547,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
def makefile(self, sock, mode='r', bufsize=-1): | def makefile(self, sock, mode='r', bufsize=DEFAULT_BUFFER_SIZE): | def makefile(self, sock, mode='r', bufsize=-1): raise NotImplemented | cb68f66e4cb366fa4e3a11c62b4390047a4f213c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/82/cb68f66e4cb366fa4e3a11c62b4390047a4f213c/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
768,
12,
2890,
16,
7313,
16,
1965,
2218,
86,
2187,
1681,
1467,
33,
5280,
67,
11302,
67,
4574,
4672,
1002,
10051,
2,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
768,
12,
2890,
16,
7313,
16,
1965,
2218,
86,
2187,
1681,
1467,
33,
5280,
67,
11302,
67,
4574,
4672,
1002,
10051,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
src_dir = os.popen('grep -A 30 -E "^Package: dpkg$" ' + | src_dir = '/' + os.popen('grep -A 30 -E "^Package: dpkg$" ' + | def test_findSrcHash(self): lastDefer = defer.Deferred() src_dir = os.popen('grep -A 30 -E "^Package: dpkg$" ' + '/var/lib/apt/lists/' + self.sourcesFile + ' | grep -E "^Directory:" | head -n 1' + ' | cut -d\ -f 2').read().rstrip('\n') src_hashes = os.popen('grep -A 20 -E "^Package: dpkg$" ' + '/var/lib/apt/lists/' + self.sourcesFile + ' | grep -A 4 -E "^Files:" | grep -E "^ " ' + ' | cut -d\ -f 2').read().split('\n')[:-1] src_paths = os.popen('grep -A 20 -E "^Package: dpkg$" ' + '/var/lib/apt/lists/' + self.sourcesFile + ' | grep -A 4 -E "^Files:" | grep -E "^ " ' + ' | cut -d\ -f 4').read().split('\n')[:-1] | 53607bdd5893956a70875b6468a609eecb518300 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/665/53607bdd5893956a70875b6468a609eecb518300/AptPackages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
4720,
7740,
2310,
12,
2890,
4672,
1142,
758,
586,
273,
2220,
18,
16886,
1435,
225,
1705,
67,
1214,
273,
2023,
397,
1140,
18,
84,
3190,
2668,
11556,
84,
300,
37,
5196,
300,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4720,
7740,
2310,
12,
2890,
4672,
1142,
758,
586,
273,
2220,
18,
16886,
1435,
225,
1705,
67,
1214,
273,
2023,
397,
1140,
18,
84,
3190,
2668,
11556,
84,
300,
37,
5196,
300,
41... |
_acquireLock() try: if wr in _handlerList: _handlerList.remove(wr) finally: _releaseLock() | if _acquireLock is not None: _acquireLock() try: if wr in _handlerList: _handlerList.remove(wr) finally: _releaseLock() | def _removeHandlerRef(wr): """ Remove a handler reference from the internal cleanup list. """ _acquireLock() try: if wr in _handlerList: _handlerList.remove(wr) finally: _releaseLock() | f9cba609b6bf3d283e2e15666939dc48b39d9eb0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/f9cba609b6bf3d283e2e15666939dc48b39d9eb0/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4479,
1503,
1957,
12,
91,
86,
4672,
3536,
3581,
279,
1838,
2114,
628,
326,
2713,
6686,
666,
18,
3536,
565,
309,
389,
1077,
1039,
2531,
353,
486,
599,
30,
389,
1077,
1039,
2531,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4479,
1503,
1957,
12,
91,
86,
4672,
3536,
3581,
279,
1838,
2114,
628,
326,
2713,
6686,
666,
18,
3536,
565,
309,
389,
1077,
1039,
2531,
353,
486,
599,
30,
389,
1077,
1039,
2531,
14... |
import epdb epdb.st() for troveSpec in [ x for x in trv.iterRedirects() ]: yield ((V_REDIRECT, troveSpec), troveSpec) | def _iterAllVersions(trv, rewriteTroveInfo=True): # return all versions which need rewriting except for file versions # and the version of the trove itself. file versions are handled # separately since we can clone even if the files don't already # exist on the target branch (we just add them), and trove versions # are always rewritten even when cloning to the same branch # (while other versions are not) if rewriteTroveInfo: for troveTuple in \ [ x for x in trv.troveInfo.loadedTroves.iter() ]: yield ((V_LOADED, troveTuple), (troveTuple.name(), troveTuple.version(), troveTuple.flavor())) for troveTuple in \ [ x for x in trv.troveInfo.buildReqs.iter() ]: yield ((V_BREQ, troveTuple), (troveTuple.name(), troveTuple.version(), troveTuple.flavor())) for troveInfo in [ x for x in trv.iterTroveList(strongRefs=True, weakRefs=True) ]: yield ((V_REFTRV, troveInfo), troveInfo) import epdb epdb.st() for troveSpec in [ x for x in trv.iterRedirects() ]: yield ((V_REDIRECT, troveSpec), troveSpec) | 7c7b1da992d2d3b632a649f5f65404da11e06d95 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/7c7b1da992d2d3b632a649f5f65404da11e06d95/clone.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2165,
1595,
5940,
12,
313,
90,
16,
10738,
56,
303,
537,
966,
33,
5510,
4672,
468,
327,
777,
5244,
1492,
1608,
283,
14345,
1335,
364,
585,
5244,
468,
471,
326,
1177,
434,
326,
2343... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2165,
1595,
5940,
12,
313,
90,
16,
10738,
56,
303,
537,
966,
33,
5510,
4672,
468,
327,
777,
5244,
1492,
1608,
283,
14345,
1335,
364,
585,
5244,
468,
471,
326,
1177,
434,
326,
2343... | |
for k in range(self.K): | for k in range(actualK): | def showResults(self): self.table.clear() # clears the table if not self.mc: return self.table.setColumnCount(4) self.table.setRowCount(self.K+1) | a466db5964c86ce08067342105a7edae4fc70a31 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/a466db5964c86ce08067342105a7edae4fc70a31/OWKMeans.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
3447,
12,
2890,
4672,
365,
18,
2121,
18,
8507,
1435,
468,
22655,
326,
1014,
309,
486,
365,
18,
13952,
30,
327,
225,
365,
18,
2121,
18,
542,
1494,
1380,
12,
24,
13,
365,
18,
212... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
3447,
12,
2890,
4672,
365,
18,
2121,
18,
8507,
1435,
468,
22655,
326,
1014,
309,
486,
365,
18,
13952,
30,
327,
225,
365,
18,
2121,
18,
542,
1494,
1380,
12,
24,
13,
365,
18,
212... |
print usersite, sys.path | def test_s_option(self): usersite = site.USER_SITE self.assert_(usersite in sys.path) print usersite, sys.path | c676b5dacaf5df7998e057001651c7f371e56764 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/c676b5dacaf5df7998e057001651c7f371e56764/test_site.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
87,
67,
3482,
12,
2890,
4672,
3677,
1137,
273,
2834,
18,
4714,
67,
20609,
365,
18,
11231,
67,
12,
5577,
1137,
316,
2589,
18,
803,
13,
1172,
3677,
1137,
16,
2589,
18,
803,
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,
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,
87,
67,
3482,
12,
2890,
4672,
3677,
1137,
273,
2834,
18,
4714,
67,
20609,
365,
18,
11231,
67,
12,
5577,
1137,
316,
2589,
18,
803,
13,
1172,
3677,
1137,
16,
2589,
18,
803,
2... | |
def writable (self): | def writable(self): | def writable (self): return not self.accepting | 52c4de7c23c31563e4f0316b68865e17bb8c0f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/52c4de7c23c31563e4f0316b68865e17bb8c0f33/asyncore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9691,
12,
2890,
4672,
327,
486,
365,
18,
9436,
310,
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,
... | [
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,
9691,
12,
2890,
4672,
327,
486,
365,
18,
9436,
310,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return CONNECTION_DONE | return main.CONNECTION_DONE | def _postLoseConnection(self): """Gets called after loseConnection(), after buffered data is sent. | da252bb4a66672c705ca51e0ca7b3393076a142e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/da252bb4a66672c705ca51e0ca7b3393076a142e/ssl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2767,
1504,
307,
1952,
12,
2890,
4672,
3536,
3002,
2566,
1839,
29612,
1952,
9334,
1839,
11445,
501,
353,
3271,
18,
2,
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,
2767,
1504,
307,
1952,
12,
2890,
4672,
3536,
3002,
2566,
1839,
29612,
1952,
9334,
1839,
11445,
501,
353,
3271,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
ar2 = ar[0][0] self.assertEqual (ar2, 0x0000FF) ar2 = ar[1][0] self.assertEqual (ar2, 0x000011) ar2 = ar[-4][1] self.assertEqual (ar2, 0x000011) ar2 = ar[-4][5] self.assertEqual (ar2, 0x0000FF) | ar2 = ar[1][0] self.assertEqual (ar2, sf.map_rgb ((0, 0, 11))) ar2 = ar[-4][1] self.assertEqual (ar2, sf.map_rgb ((0, 0, 11))) ar2 = ar[-4][5] self.assertEqual (ar2, sf.map_rgb ((0, 0, 255))) | def test_get_pixel (self): sf = pygame.Surface ((10, 20), 0, 32) sf.fill ((0, 0, 255)) for x in xrange(20): sf.set_at((1,x), 0x000011) for x in xrange(10): sf.set_at((x,1), 0x000011) | 8c52ec7e2d3c922d31ce5b160f9bf0527da94d40 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1298/8c52ec7e2d3c922d31ce5b160f9bf0527da94d40/pixelarray_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
588,
67,
11743,
261,
2890,
4672,
9033,
273,
2395,
13957,
18,
11508,
14015,
2163,
16,
4200,
3631,
374,
16,
3847,
13,
9033,
18,
5935,
14015,
20,
16,
374,
16,
4561,
3719,
364,
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,
1842,
67,
588,
67,
11743,
261,
2890,
4672,
9033,
273,
2395,
13957,
18,
11508,
14015,
2163,
16,
4200,
3631,
374,
16,
3847,
13,
9033,
18,
5935,
14015,
20,
16,
374,
16,
4561,
3719,
364,
6... |
self.assert_(set(self._box.get_labels()) == | self.assertEqual(set(self._box.get_labels()), | def test_labels(self): # Get labels from the mailbox self.assertEqual(self._box.get_labels(), []) msg0 = mailbox.BabylMessage(self._template % 0) msg0.add_label('foo') key0 = self._box.add(msg0) self.assertEqual(self._box.get_labels(), ['foo']) msg1 = mailbox.BabylMessage(self._template % 1) msg1.set_labels(['bar', 'answered', 'foo']) key1 = self._box.add(msg1) self.assert_(set(self._box.get_labels()) == set(['foo', 'bar'])) msg0.set_labels(['blah', 'filed']) self._box[key0] = msg0 self.assert_(set(self._box.get_labels()) == set(['foo', 'bar', 'blah'])) self._box.remove(key1) self.assertEqual(set(self._box.get_labels()), set(['blah'])) | ea8344797e1a0ebd0b419ce14e16ab25af771fcc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/ea8344797e1a0ebd0b419ce14e16ab25af771fcc/test_mailbox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5336,
12,
2890,
4672,
468,
968,
3249,
628,
326,
14187,
365,
18,
11231,
5812,
12,
2890,
6315,
2147,
18,
588,
67,
5336,
9334,
5378,
13,
1234,
20,
273,
14187,
18,
38,
24383,
80,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5336,
12,
2890,
4672,
468,
968,
3249,
628,
326,
14187,
365,
18,
11231,
5812,
12,
2890,
6315,
2147,
18,
588,
67,
5336,
9334,
5378,
13,
1234,
20,
273,
14187,
18,
38,
24383,
80,... |
if os.path.exists(link) or os.path.islink(link): | if exists(link) or os.path.islink(link): | def saveSymlink(self, file): real = self.publicPath(file) link = self.latestPath(file) if os.path.exists(link) or os.path.islink(link): if os.path.islink(link): self.debug("Removing old symlink %s" % link) os.remove(link) else: raise BackupError("What the hell dude, %s is not a symlink" % link) self.debug("Adding symlink %s -> %s" % (link, real)) os.symlink(real, link) | c1e41d0df268fd361b14ee90cb5a928232b4e8fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9870/c1e41d0df268fd361b14ee90cb5a928232b4e8fb/WikiBackup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
18475,
12,
2890,
16,
585,
4672,
2863,
273,
365,
18,
482,
743,
12,
768,
13,
1692,
273,
365,
18,
13550,
743,
12,
768,
13,
309,
1704,
12,
1232,
13,
578,
1140,
18,
803,
18,
291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1923,
18475,
12,
2890,
16,
585,
4672,
2863,
273,
365,
18,
482,
743,
12,
768,
13,
1692,
273,
365,
18,
13550,
743,
12,
768,
13,
309,
1704,
12,
1232,
13,
578,
1140,
18,
803,
18,
291,
... |
for i in self.all_ids(): | for i in sorted(self.all_ids()): | def display(self): """Quick and dirty lists of all nodes.""" table=[('#','taxon','prev','succ','brlen','blen (sum)','support','comment')] for i in self.all_ids(): n=self.node(i) if not n.data: table.append((str(i),'-',str(n.prev),str(n.succ),'-','-','-','-')) else: tx=n.data.taxon if not tx: tx='-' blength=n.data.branchlength if blength is None: blength='-' sum_blength='-' else: sum_blength=self.sum_branchlength(node=i) support=n.data.support if support is None: support='-' comment=n.data.comment if comment is None: comment='-' table.append((str(i),tx,str(n.prev),str(n.succ),blength,sum_blength,support,comment)) print '\n'.join(['%3s %32s %15s %15s %8s %10s %8s %20s' % l for l in table]) print '\nRoot: ',self.root | 5b119dc443472ca73da34097f42f280edc1aaea8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7167/5b119dc443472ca73da34097f42f280edc1aaea8/Trees.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2562,
12,
2890,
4672,
3536,
13663,
471,
9603,
6035,
434,
777,
2199,
12123,
1014,
22850,
2668,
7,
17023,
8066,
265,
17023,
10001,
17023,
26560,
952,
17023,
70,
1321,
275,
17023,
70,
1897,
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,
2562,
12,
2890,
4672,
3536,
13663,
471,
9603,
6035,
434,
777,
2199,
12123,
1014,
22850,
2668,
7,
17023,
8066,
265,
17023,
10001,
17023,
26560,
952,
17023,
70,
1321,
275,
17023,
70,
1897,
2... |
def _newer_update_in_trans(self, pkgtup, available_pkg): | return tx_return def _newer_update_in_trans(self, pkgtup, available_pkg, tx_return): | def _check_new_update_provides(self, opkg, npkg): """ Check for any difference in the provides of the old and new update that is needed by the transaction. If so we "update" those pkgs too, to the latest version. """ oprovs = set(opkg.returnPrco('provides')) nprovs = set(npkg.returnPrco('provides')) for prov in oprovs.difference(nprovs): reqs = self.tsInfo.getRequires(*prov) for pkg in reqs: for req in reqs[pkg]: if not npkg.inPrcoRange('provides', req): naTup = (pkg.name, pkg.arch) for pkg in self.pkgSack.returnNewestByNameArch(naTup): self.update(po=pkg) break | 9bef1a0436e11e54b6999745ce72d4e211a2f5a7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5445/9bef1a0436e11e54b6999745ce72d4e211a2f5a7/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
67,
2704,
67,
2725,
67,
685,
13427,
12,
2890,
16,
1061,
14931,
16,
1130,
14931,
4672,
3536,
2073,
364,
1281,
7114,
316,
326,
8121,
434,
326,
1592,
471,
394,
1089,
716,
353,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1893,
67,
2704,
67,
2725,
67,
685,
13427,
12,
2890,
16,
1061,
14931,
16,
1130,
14931,
4672,
3536,
2073,
364,
1281,
7114,
316,
326,
8121,
434,
326,
1592,
471,
394,
1089,
716,
353,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.