rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
search_modifier = tokens[start].text=="|" | search_modifier = tokens[start].text in ("|", "!") | def run(self): tokens = self.tokens i = 0 start = None | 77e93ba625801e9c9f0cf3b1fdb4644a87a19e31 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12391/77e93ba625801e9c9f0cf3b1fdb4644a87a19e31/core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
2430,
273,
365,
18,
7860,
277,
273,
374,
787,
273,
599,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
12,
2890,
4672,
2430,
273,
365,
18,
7860,
277,
273,
374,
787,
273,
599,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
return urlparse.urlunparse((scheme, netloc, path, params, query, fragment)) | return _urlunparse(scheme, netloc, path, params, query, fragment, url) | def hidepassword(url): '''hide user credential in a url string''' scheme, netloc, path, params, query, fragment = urlparse.urlparse(url) netloc = re.sub('([^:]*):([^@]*)@(.*)', r'\1:***@\3', netloc) return urlparse.urlunparse((scheme, netloc, path, params, query, fragment)) | 6bdafded4dc10f3c747ce4fa35d3befbca2aba12 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/6bdafded4dc10f3c747ce4fa35d3befbca2aba12/url.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6853,
3664,
12,
718,
4672,
9163,
11248,
729,
8447,
316,
279,
880,
533,
26418,
4355,
16,
17345,
16,
589,
16,
859,
16,
843,
16,
5481,
273,
15185,
18,
718,
2670,
12,
718,
13,
17345,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6853,
3664,
12,
718,
4672,
9163,
11248,
729,
8447,
316,
279,
880,
533,
26418,
4355,
16,
17345,
16,
589,
16,
859,
16,
843,
16,
5481,
273,
15185,
18,
718,
2670,
12,
718,
13,
17345,
273,
... |
if __debug__: import spambayes.Options assert spambayes.Options.optionsPathname == \ ini_filename.encode(filesystem_encoding), \ "'spambayes.Options' was imported too early, with the " \ "incorrect directory %r" \ % (spambayes.Options.optionsPathname,) | assert hasattr(sys, "frozen") | def import_core_spambayes_stuff(ini_filename): if "spambayes.Options" in sys.modules: # Manager probably being re-initialized (via the Outlook 'addin' GUI # Check that nothing has changed underneath us. if __debug__: import spambayes.Options assert spambayes.Options.optionsPathname == \ ini_filename.encode(filesystem_encoding), \ "'spambayes.Options' was imported too early, with the " \ "incorrect directory %r" \ % (spambayes.Options.optionsPathname,) return global bayes_classifier, bayes_tokenize, bayes_storage # ini_filename is Unicode, but environ not unicode aware os.environ["BAYESCUSTOMIZE"] = ini_filename.encode(filesystem_encoding) from spambayes import classifier from spambayes.tokenizer import tokenize from spambayes import storage bayes_classifier = classifier bayes_tokenize = tokenize bayes_storage = storage assert "spambayes.Options" in sys.modules, \ "Expected 'spambayes.Options' to be loaded here" | b46667ea73807a81e6551291dc6102a756e0b7bd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/b46667ea73807a81e6551291dc6102a756e0b7bd/manager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1930,
67,
3644,
67,
1752,
2536,
528,
281,
67,
334,
3809,
12,
8767,
67,
3459,
4672,
309,
315,
1752,
2536,
528,
281,
18,
1320,
6,
316,
2589,
18,
6400,
30,
468,
8558,
8656,
3832,
283,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1930,
67,
3644,
67,
1752,
2536,
528,
281,
67,
334,
3809,
12,
8767,
67,
3459,
4672,
309,
315,
1752,
2536,
528,
281,
18,
1320,
6,
316,
2589,
18,
6400,
30,
468,
8558,
8656,
3832,
283,
1... |
self.sock.send(buf) | BS = 512 if len(buf) >= BS: self.flush() self.sock.send(buf) elif len(buf) + len(self.buf) >= BS: self.flush() self.buf = buf else: self.buf = self.buf + buf def flush(self): if self.buf and self.rw == 'w': self.sock.send(self.buf) self.buf = '' | def write(self, buf): self.sock.send(buf) | 41cadba88bb9f9b491c12db62fd24f9f9f6539c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/41cadba88bb9f9b491c12db62fd24f9f9f6539c1/socket.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
1681,
4672,
365,
18,
15031,
18,
4661,
12,
4385,
13,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1045,
12,
2890,
16,
1681,
4672,
365,
18,
15031,
18,
4661,
12,
4385,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
res.update({'text': '\n\n'+(case.user_id.signature or '') + '\n\n' + (case.description or '')}) | res.update({'text': '\n\n'+(case.user_id.signature or '')}) | def default_get(self, cr, uid, fields, context=None): """ This function gets default values """ if not context: context = {} | 393afb43b781bbe2a34c82b0aba02e55cd2cd0a6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/393afb43b781bbe2a34c82b0aba02e55cd2cd0a6/crm_send_email.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
805,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
1466,
16,
819,
33,
7036,
4672,
3536,
1220,
445,
5571,
805,
924,
3536,
309,
486,
819,
30,
819,
273,
2618,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
805,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
1466,
16,
819,
33,
7036,
4672,
3536,
1220,
445,
5571,
805,
924,
3536,
309,
486,
819,
30,
819,
273,
2618,
2,
-100,
-100,
-100,
-100,
-1... |
self.store.extract('d','f','g') | self.store.extract(['d','f','g']) | def raise_extract(self): '''DictStore: extract: fail because unknown attribute name.''' self.store.extract('d','f','g') | 45268ff49ddb4f963530947d7202a5e0642e2fda /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2720/45268ff49ddb4f963530947d7202a5e0642e2fda/storage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1002,
67,
8004,
12,
2890,
4672,
9163,
5014,
2257,
30,
2608,
30,
2321,
2724,
5917,
1566,
508,
1093,
6309,
365,
18,
2233,
18,
8004,
12,
3292,
72,
17023,
74,
17023,
75,
19486,
282,
2,
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,
1002,
67,
8004,
12,
2890,
4672,
9163,
5014,
2257,
30,
2608,
30,
2321,
2724,
5917,
1566,
508,
1093,
6309,
365,
18,
2233,
18,
8004,
12,
3292,
72,
17023,
74,
17023,
75,
19486,
282,
2,
-10... |
activity_up = get_object_or_404(Activity, id=id_up); activity_down = get_object_or_404(Activity, id=id_down); | activity_up = get_object_or_404(Activity, id=id_up, offering__slug=course_slug) activity_down = get_object_or_404(Activity, id=id_down, offering__slug=course_slug) | def reorder_activity(request, course_slug): """ Ajax way to reorder activity. This ajax view function is called in the course_info page. """ if request.method == 'POST': id_up = request.POST.get('id_up') id_down = request.POST.get('id_down') if id_up == None or id_down == None: return ForbiddenResponse(request) # swap the position of the two activities activity_up = get_object_or_404(Activity, id=id_up); activity_down = get_object_or_404(Activity, id=id_down); temp = activity_up.position activity_up.position = activity_down.position activity_down.position = temp activity_up.save() activity_down.save() return HttpResponse("Order updated!") return ForbiddenResponse(request) | ae4e33f857e06229e974b07ff4e143db52fb219e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6634/ae4e33f857e06229e974b07ff4e143db52fb219e/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19427,
67,
9653,
12,
2293,
16,
4362,
67,
6436,
4672,
3536,
18772,
4031,
358,
19427,
5728,
18,
1220,
10733,
1476,
445,
353,
2566,
316,
326,
4362,
67,
1376,
1363,
18,
3536,
309,
590,
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,
19427,
67,
9653,
12,
2293,
16,
4362,
67,
6436,
4672,
3536,
18772,
4031,
358,
19427,
5728,
18,
1220,
10733,
1476,
445,
353,
2566,
316,
326,
4362,
67,
1376,
1363,
18,
3536,
309,
590,
18,
... |
if key != 'channelName': raise | def upgrade116(cursor): """Convert filenames in the status container to unicode.""" cursor.execute("SELECT id, status FROM remote_downloader") filename_fields = ('channelName', 'shortFilename', 'filename') for row in cursor.fetchall(): id, status = row status = eval(status, __builtins__, {'datetime': datetime, 'time': time}) changed = False for key in filename_fields: value = status.get(key) if value is not None and not isinstance(value, unicode): try: status[key] = value.decode("utf-8") except UnicodeError: # for channelNames with bad unicode, try some kludges to # get things working. (#14003) if key != 'channelName': raise try: # kludge 1: latin-1 charset status[key] = value.decode("iso-8859-1") except UnicodeError: # kludge 2: replace bad values status[key] = value.decode("utf-8", 'replace') changed = True if changed: cursor.execute("UPDATE remote_downloader SET status=? " "WHERE id=?", (repr(status), id)) | 2c2c9018c7a39902ac177abfb02fd9a2500082b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/2c2c9018c7a39902ac177abfb02fd9a2500082b1/databaseupgrade.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8400,
20562,
12,
9216,
4672,
3536,
2723,
9066,
316,
326,
1267,
1478,
358,
5252,
12123,
3347,
18,
8837,
2932,
4803,
612,
16,
1267,
4571,
2632,
67,
2378,
6714,
7923,
1544,
67,
2821,
273,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8400,
20562,
12,
9216,
4672,
3536,
2723,
9066,
316,
326,
1267,
1478,
358,
5252,
12123,
3347,
18,
8837,
2932,
4803,
612,
16,
1267,
4571,
2632,
67,
2378,
6714,
7923,
1544,
67,
2821,
273,
7... | |
if line[-2:] == CRLF: line = line[:-2] elif line[-1:] in CRLF: line = line[:-1] | if line[-2:] == CRLF: line = line[:-2] elif line[-1:] in CRLF: line = line[:-1] | def getline(self): """Internal: return one line from the server, stripping CRLF. Raise EOFError if the connection is closed.""" line = self.file.readline() if self.debugging > 1: print('*get*', repr(line)) if not line: raise EOFError if line[-2:] == CRLF: line = line[:-2] elif line[-1:] in CRLF: line = line[:-1] return line | 17de0ac39e028b8777529030dfc984cdf592a543 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/17de0ac39e028b8777529030dfc984cdf592a543/nntplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
1369,
12,
2890,
4672,
3536,
3061,
30,
327,
1245,
980,
628,
326,
1438,
16,
2569,
1382,
21791,
18,
20539,
6431,
668,
309,
326,
1459,
353,
4375,
12123,
980,
273,
365,
18,
768,
18,
89... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1369,
12,
2890,
4672,
3536,
3061,
30,
327,
1245,
980,
628,
326,
1438,
16,
2569,
1382,
21791,
18,
20539,
6431,
668,
309,
326,
1459,
353,
4375,
12123,
980,
273,
365,
18,
768,
18,
89... |
if len(args) + len(defaults) + 1< len(arg_names): | if len(args) + len(defaults) + 1 < len(arg_names): | def call_handle_args(self, *args): arg_names, var_arg_name, _, defaults = inspect.getargspec(self.handle_args) if len(args) + len(defaults) + 1< len(arg_names): raise NotEnoughArguments('missing argument') if var_arg_name is None: if len(args) > len(arg_names): raise TooManyArguments('too many arguments') self.handle_args(*args) | 2ea5682f0df3eba86bd30f41e79cece02b3b14bd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3688/2ea5682f0df3eba86bd30f41e79cece02b3b14bd/cli_framework.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
745,
67,
4110,
67,
1968,
12,
2890,
16,
380,
1968,
4672,
1501,
67,
1973,
16,
569,
67,
3175,
67,
529,
16,
389,
16,
3467,
273,
5334,
18,
588,
23172,
12,
2890,
18,
4110,
67,
1968,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
745,
67,
4110,
67,
1968,
12,
2890,
16,
380,
1968,
4672,
1501,
67,
1973,
16,
569,
67,
3175,
67,
529,
16,
389,
16,
3467,
273,
5334,
18,
588,
23172,
12,
2890,
18,
4110,
67,
1968,
13,
... |
thread.stack_size(0) if thread.stack_size() != 0: raise ValueError, "stack_size not reset to default" | def task2(self, ident): for i in range(NUMTRIPS): if ident == 0: delay = 0.001 else: with self.random_mutex: delay = random.random() * NUMTASKS verbose_print("task %s will run for %s" % (ident, round(delay, 1))) time.sleep(delay) verbose_print("task %s entering %s" % (ident, i)) self.bar.enter() verbose_print("task %s leaving barrier" % ident) with self.running_mutex: self.running -= 1 finished = self.running == 0 if finished: self.done_mutex.release() | def task2(ident): global running for i in range(numtrips): if ident == 0: # give it a good chance to enter the next # barrier before the others are all out # of the current one delay = 0.001 else: rmutex.acquire() delay = random.random() * numtasks rmutex.release() if verbose: print 'task', ident, 'will run for', round(delay, 1), 'sec' time.sleep(delay) if verbose: print 'task', ident, 'entering barrier', i bar.enter() if verbose: print 'task', ident, 'leaving barrier', i mutex.acquire() running -= 1 # Must release mutex before releasing done, else the main thread can # exit and set mutex to None as part of global teardown; then # mutex.release() raises AttributeError. finished = running == 0 mutex.release() if finished: done.release() | 12c238c50046dc378380207f15830cf4af619e32 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/12c238c50046dc378380207f15830cf4af619e32/test_thread.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1562,
22,
12,
6392,
4672,
2552,
3549,
364,
277,
316,
1048,
12,
2107,
313,
7146,
4672,
309,
3390,
422,
374,
30,
468,
8492,
518,
279,
7494,
17920,
358,
6103,
326,
1024,
468,
24651,
1865,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1562,
22,
12,
6392,
4672,
2552,
3549,
364,
277,
316,
1048,
12,
2107,
313,
7146,
4672,
309,
3390,
422,
374,
30,
468,
8492,
518,
279,
7494,
17920,
358,
6103,
326,
1024,
468,
24651,
1865,
... |
elif mode.get()=='JT6M' or mode.get()=="ISCAT": isync6m=isync | elif mode.get()=='JT6M': isync6m=isync elif mode.get()=="ISCAT": isync_iscat=isync | def update(): global root_geom,isec0,naz,nel,ndmiles,ndkm,nhotaz,nhotabetter,nopen, \ im,pim,cmap0,isync,isync441,isync6m,isync65,isync_save,idsec, \ first,itol,txsnrdb,tx6alt utc=time.gmtime(time.time()+0.1*idsec) isec=utc[5] if isec != isec0: #Do once per second isec0=isec t=time.strftime('%Y %b %d\n%H:%M:%S',utc) Audio.gcom2.utcdate=t[:12] Audio.gcom2.iyr=utc[0] Audio.gcom2.imo=utc[1] Audio.gcom2.ida=utc[2] Audio.gcom2.ihr=utc[3] Audio.gcom2.imi=utc[4] Audio.gcom2.isc=utc[5] ldate.configure(text=t) root_geom=root.geometry() utchours=utc[3]+utc[4]/60.0 + utc[5]/3600.0 naz,nel,ndmiles,ndkm,nhotaz,nhotabetter=Audio.azdist0( \ options.MyGrid.get().upper(),HisGrid.get().upper(),utchours) azdist() g.nfreq=nfreq.get() if Audio.gcom2.ndecoding==0: g.AzSun,g.ElSun,g.AzMoon,g.ElMoon,g.AzMoonB,g.ElMoonB,g.ntsky, \ g.ndop,g.ndop00,g.dbMoon,g.RAMoon,g.DecMoon,g.HA8,g.Dgrd, \ g.sd,g.poloffset,g.MaxNR,g.dfdt,g.dfdt0,g.RaAux,g.DecAux, \ g.AzAux,g.ElAux = Audio.astro0(utc[0],utc[1],utc[2], \ utchours,nfreq.get(),options.MyGrid.get().upper(), \ options.auxra.get()+(' '*9)[:9], \ options.auxdec.get()+(' '*9)[:9]) if len(HisGrid.get().strip())<4: g.ndop=g.ndop00 g.dfdt=g.dfdt0 if (ntx.get()==1 and noshjt65.get()) or noshjt65all.get(): Audio.gcom2.ntx2=1 else: Audio.gcom2.ntx2=0 if mode.get()[:4]=='JT65' or mode.get()[:3]=='JT4' \ or mode.get()[:2]=='CW': graph2.delete(ALL) graph2.create_text(80,13,anchor=CENTER,text="Moon",font=g2font) graph2.create_text(13,37,anchor=W, text="Az: %6.2f" % g.AzMoon,font=g2font) graph2.create_text(13,61,anchor=W, text="El: %6.2f" % g.ElMoon,font=g2font) graph2.create_text(13,85,anchor=W, text="Dop:%6d" % g.ndop,font=g2font) graph2.create_text(13,109,anchor=W,text="Dgrd:%5.1f" % g.Dgrd,font=g2font) if (mode.get()[:4]=='JT65' or mode.get()[:3]=='JT4') and g.freeze_decode: itol=2 ltol.configure(text='Tol '+str(50)) Audio.gcom2.dftolerance=50 nfreeze.set(1) Audio.gcom2.nfreeze=1 if Audio.gcom2.monitoring: Audio.gcom2.ndecoding=1 Audio.gcom2.nagain=0 else: Audio.gcom2.ndecoding=4 Audio.gcom2.nagain=1 g.freeze_decode=0 n=-99 g.rms=g.rms+0.001 if g.rms > 0: n=int(20.0*log10(g.rms/770.0+0.01)) else: print "RMS noise:", g.rms, " out of range." t="Rx noise:%3d dB" % (n,) if n>=-10 and n<=10: msg4.configure(text=t,bg='gray85') else: msg4.configure(text=t,bg='red') t=g.ftnstr(Audio.gcom2.decodedfile) | 6ca49ec90be5fe2fb7f7f92dfcc9376c8203defe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2394/6ca49ec90be5fe2fb7f7f92dfcc9376c8203defe/wsjt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
13332,
2552,
1365,
67,
10049,
16,
291,
557,
20,
16,
82,
1561,
16,
3084,
16,
4880,
81,
1449,
16,
82,
2883,
81,
16,
82,
15224,
1561,
16,
82,
15224,
378,
11214,
16,
82,
3190,
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,
1089,
13332,
2552,
1365,
67,
10049,
16,
291,
557,
20,
16,
82,
1561,
16,
3084,
16,
4880,
81,
1449,
16,
82,
2883,
81,
16,
82,
15224,
1561,
16,
82,
15224,
378,
11214,
16,
82,
3190,
16,
... |
class ContourPlotFactory(GraphicPrimitiveFactory_contour_plot): | class ContourPlotFactory(GraphicPrimitiveFactory): | def _from_xdata_ydata(self, point, r, options): g = Graphics() g._circle(float(point[0]), float(point[1]), float(r), options) return g | 62fa6a278646fd5a09f2b2af5cb89657bbef34ee /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/62fa6a278646fd5a09f2b2af5cb89657bbef34ee/plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2080,
67,
92,
892,
67,
93,
892,
12,
2890,
16,
1634,
16,
436,
16,
702,
4672,
314,
273,
16830,
1435,
314,
6315,
18970,
12,
5659,
12,
1153,
63,
20,
65,
3631,
1431,
12,
1153,
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,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2080,
67,
92,
892,
67,
93,
892,
12,
2890,
16,
1634,
16,
436,
16,
702,
4672,
314,
273,
16830,
1435,
314,
6315,
18970,
12,
5659,
12,
1153,
63,
20,
65,
3631,
1431,
12,
1153,
63,
... |
img = PilImage.open(img_path) | img = PilImage.open(img_path) if img.mode == 'RGBA': cmds.append(base_cmd+['-background', 'white', '-alpha', 'Background', '-alpha', 'off', img_path, img_path]) | def _fixBrokenImages(self, img_node, img_path): img = PilImage.open(img_path) cmds = [] base_cmd = [ 'convert', '-limit',' memory', '32000000', '-limit',' map', '64000000', '-limit', 'disk', '64000000', '-limit', 'area', '64000000', ] if img.info.get('interlace', 0) == 1: cmds.append(base_cmd + [img_path, '-interlace', 'none', img_path]) if img.mode == 'P': # ticket 324 cmds.append(base_cmd + [img_path, img_path]) # we esentially do nothing...but this seems to fix the problems if img.mode == 'LA': # ticket 429 cleaned = PilImage.new('LA', img.size) new_data = [] for pixel in img.getdata(): if pixel[1] == 0: new_data.append((255,0)) else: new_data.append(pixel) cleaned.putdata(new_data) cleaned.save(img_path) img = PilImage.open(img_path) | ff0991ac81a783f0187ed59e61ef119020aeeca2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12390/ff0991ac81a783f0187ed59e61ef119020aeeca2/rlwriter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
904,
29559,
8946,
12,
2890,
16,
3774,
67,
2159,
16,
3774,
67,
803,
4672,
3774,
273,
453,
330,
2040,
18,
3190,
12,
6081,
67,
803,
13,
309,
3774,
18,
3188,
422,
296,
23263,
4278,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
904,
29559,
8946,
12,
2890,
16,
3774,
67,
2159,
16,
3774,
67,
803,
4672,
3774,
273,
453,
330,
2040,
18,
3190,
12,
6081,
67,
803,
13,
309,
3774,
18,
3188,
422,
296,
23263,
4278,
... |
def reload_color(self, entry, (colorbut,show_opacity_scale)): self.load_color(entry['group'], entry['key'], colorbut, show_opacity_scale) | def reload_color(self, group, key, value, (colorbut,show_opacity_scale)): self.load_color(group, key, colorbut, show_opacity_scale) | def reload_color(self, entry, (colorbut,show_opacity_scale)): self.load_color(entry['group'], entry['key'], colorbut, show_opacity_scale) | 6e5ef9d2ff04626633394808ed3d5531bb4809af /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8416/6e5ef9d2ff04626633394808ed3d5531bb4809af/awnClass.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7749,
67,
3266,
12,
2890,
16,
1241,
16,
261,
3266,
12885,
16,
4500,
67,
19515,
67,
5864,
3719,
30,
365,
18,
945,
67,
3266,
12,
4099,
3292,
1655,
17337,
1241,
3292,
856,
17337,
2036,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7749,
67,
3266,
12,
2890,
16,
1241,
16,
261,
3266,
12885,
16,
4500,
67,
19515,
67,
5864,
3719,
30,
365,
18,
945,
67,
3266,
12,
4099,
3292,
1655,
17337,
1241,
3292,
856,
17337,
2036,
12... |
if 'tg_format' in request.params and request.params['tg_format'] == 'json': return dict(message='No package named %s' % packageName) else: return dict(tg_template='pkgdb.templates.errors', status=False, | error = dict(status=False, | def name(self, packageName, collectionName=None, collectionVersion=None): # Return the information about a package. package = model.Package.get_by( model.Package.c.statuscode!=self.removedStatus, name=packageName) if not package: if 'tg_format' in request.params and request.params['tg_format'] == 'json': return dict(message='No package named %s' % packageName) else: return dict(tg_template='pkgdb.templates.errors', status=False, title=self.appTitle + ' -- Invalid Package Name', message= 'The packagename you were linked to (%s)' \ ' does not appear in the Package Database.' \ ' If you received this error from a link on the' \ ' fedoraproject.org website, please report it.' % packageName) | 703f5f0244581bd2f33be4a34e887a824eee7377 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9953/703f5f0244581bd2f33be4a34e887a824eee7377/packages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
508,
12,
2890,
16,
9929,
16,
17137,
33,
7036,
16,
1849,
1444,
33,
7036,
4672,
468,
2000,
326,
1779,
2973,
279,
2181,
18,
2181,
273,
938,
18,
2261,
18,
588,
67,
1637,
12,
938,
18,
226... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
508,
12,
2890,
16,
9929,
16,
17137,
33,
7036,
16,
1849,
1444,
33,
7036,
4672,
468,
2000,
326,
1779,
2973,
279,
2181,
18,
2181,
273,
938,
18,
2261,
18,
588,
67,
1637,
12,
938,
18,
226... |
if not self.__hash == myHash: | stats = os.fstat(self.__handler.fileno()) if self.__hash != myHash or self.__ino != stats.st_ino: | def open(self): self.__handler = open(self.__filename) firstLine = self.__handler.readline() # Computes the MD5 of the first line. myHash = md5.new(firstLine).digest() # Compare hash. if not self.__hash == myHash: logSys.info("Log rotation detected for %s" % self.__filename) self.__hash = myHash self.__pos = 0 # Sets the file pointer to the last position. self.__handler.seek(self.__pos) | 678cf2f35e1f484ab9f1fa249f977df8043e3bce /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12786/678cf2f35e1f484ab9f1fa249f977df8043e3bce/filter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
12,
2890,
4672,
365,
16186,
4176,
273,
1696,
12,
2890,
16186,
3459,
13,
24415,
273,
365,
16186,
4176,
18,
896,
1369,
1435,
468,
14169,
281,
326,
10852,
25,
434,
326,
1122,
980,
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,
1696,
12,
2890,
4672,
365,
16186,
4176,
273,
1696,
12,
2890,
16186,
3459,
13,
24415,
273,
365,
16186,
4176,
18,
896,
1369,
1435,
468,
14169,
281,
326,
10852,
25,
434,
326,
1122,
980,
18,... |
gromacsFullBaseFileName, | trajectoryOutputFile, | def run_using_old_movie_obj_to_hold_sim_params(self, movie): #bruce 051115 removed unused 'options' arg self._movie = movie # general kluge for old-code compat (lots of our methods still use this and modify it) # note, this movie object (really should be a simsetup object?) does not yet know a proper alist (or any alist, I hope) [bruce 050404] self.errcode = self.set_options_errQ( ) # set movie alist, output filenames, sim executable pathname (verify it exists) #obs comment [about the options arg i removed?? or smth else?] # options include everything that affects the run except the set of atoms and the part if self.errcode: # used to be a local var 'r' # bruce 051115 comment: more than one reason this can happen, one is sim executable missing return self.sim_input_file = self.sim_input_filename() # might get name from options or make up a temporary filename if (self.mflag == 1 and self.useGromacs): if (not self.verifyGromacsPlugin()): self.errcode = _FAILURE_ALREADY_DOCUMENTED return self.set_waitcursor(True) progressBar = self.win.statusBar().progressBar | db577c710d68147b29e19e07c975b40966936f56 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/db577c710d68147b29e19e07c975b40966936f56/runSim.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
9940,
67,
1673,
67,
8683,
13120,
67,
2603,
67,
869,
67,
21056,
67,
9812,
67,
2010,
12,
2890,
16,
21360,
4672,
468,
2848,
3965,
15331,
2499,
3600,
3723,
10197,
296,
2116,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
9940,
67,
1673,
67,
8683,
13120,
67,
2603,
67,
869,
67,
21056,
67,
9812,
67,
2010,
12,
2890,
16,
21360,
4672,
468,
2848,
3965,
15331,
2499,
3600,
3723,
10197,
296,
2116,
11,
... |
return unicode( s ) | self.text = self.prefix + self.text + self.suffix return unicode( trim_spaces( self.text ) ) | def getText(self): s = '' for n in self.node.childNodes: if n.nodeType == n.TEXT_NODE: s += n.data elif n.nodeName == 'fo:inline': i = Inline( n ) s += i.getText() elif n.nodeName == 'fo:page-number': s += "#1#" | 2844f923f5ea74333d63aa8a1fe1452631bc2736 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2494/2844f923f5ea74333d63aa8a1fe1452631bc2736/inline.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6701,
12,
2890,
4672,
272,
273,
875,
364,
290,
316,
365,
18,
2159,
18,
3624,
3205,
30,
309,
290,
18,
2159,
559,
422,
290,
18,
5151,
67,
8744,
30,
272,
1011,
290,
18,
892,
1327,
290,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6701,
12,
2890,
4672,
272,
273,
875,
364,
290,
316,
365,
18,
2159,
18,
3624,
3205,
30,
309,
290,
18,
2159,
559,
422,
290,
18,
5151,
67,
8744,
30,
272,
1011,
290,
18,
892,
1327,
290,
... |
if fullpath.endswith(".py") or fullpath.endswith(".pyw"): return True elif "python" in line: return True return False def can_be_compiled(fullpath): infile = _open(fullpath) if infile is None: return False code = infile.read() infile.close() try: compile(code, fullpath, "exec") except Exception, err: print_debug("%s: cannot compile: %s" % (fullpath, err)) return False | def looks_like_python(fullpath): infile = _open(fullpath) if infile is None: return False line = infile.readline() infile.close() if binary_re.search(line): # file appears to be binary print_debug("%s: appears to be binary" % fullpath) return False if fullpath.endswith(".py") or fullpath.endswith(".pyw"): return True elif "python" in line: # disguised Python script (e.g. CGI) return True return False | 568973181aa523bbcf7f827b3a2eb2affd96ea67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/568973181aa523bbcf7f827b3a2eb2affd96ea67/findnocoding.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10192,
67,
5625,
67,
8103,
12,
2854,
803,
4672,
14568,
273,
389,
3190,
12,
2854,
803,
13,
309,
14568,
353,
599,
30,
327,
1083,
225,
980,
273,
14568,
18,
896,
1369,
1435,
14568,
18,
441... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10192,
67,
5625,
67,
8103,
12,
2854,
803,
4672,
14568,
273,
389,
3190,
12,
2854,
803,
13,
309,
14568,
353,
599,
30,
327,
1083,
225,
980,
273,
14568,
18,
896,
1369,
1435,
14568,
18,
441... | |
[ iters[j].next() for j in range(n) ] | for it in iters: it.next() | def enum_affine_rational_field(X,B): """ Enumerates affine rational points on scheme X (defined over `\QQ`) up to bound B. INPUT: - ``X`` - a scheme or set of abstract rational points of a scheme - ``B`` - a positive integer bound OUTPUT: - a list containing the affine points of X of height up to B, sorted. EXAMPLES:: sage: A.<x,y,z> = AffineSpace(3,QQ) sage: from sage.schemes.generic.rational_point import enum_affine_rational_field sage: enum_affine_rational_field(A(QQ),1) [(-1, -1, -1), (-1, -1, 0), (-1, -1, 1), (-1, 0, -1), (-1, 0, 0), (-1, 0, 1), (-1, 1, -1), (-1, 1, 0), (-1, 1, 1), (0, -1, -1), (0, -1, 0), (0, -1, 1), (0, 0, -1), (0, 0, 0), (0, 0, 1), (0, 1, -1), (0, 1, 0), (0, 1, 1), (1, -1, -1), (1, -1, 0), (1, -1, 1), (1, 0, -1), (1, 0, 0), (1, 0, 1), (1, 1, -1), (1, 1, 0), (1, 1, 1)] :: sage: A.<w,x,y,z> = AffineSpace(4,QQ) sage: S = A.subscheme([x^2-y*z+3,w^3+z+y^2]) sage: enum_affine_rational_field(S(QQ),2) [] sage: enum_affine_rational_field(S(QQ),3) [(-2, 0, -3, -1)] :: sage: A.<x,y> = AffineSpace(2,QQ) sage: C = Curve(x^2+y-x) sage: enum_affine_rational_field(C,10) [(-2, -6), (-1, -2), (0, 0), (1, 0), (2, -2), (3, -6)] AUTHOR: David R. Kohel <kohel@maths.usyd.edu.au> (small adjustments by Charlie Turner 06-2010) """ if is_Scheme(X): X = X(X.base_ring()) n = X.codomain().ambient_space().ngens() if X.value_ring() is ZZ: Q = [ 1 ] else: # rational field Q = [ k+1 for k in range(B) ] R = [ 0 ] + [ s*k for k in range(1,B+1) for s in [1,-1] ] pts = [] P = [ 0 for _ in range(n) ] m = ZZ(0) try: pts.append(X(P)) except: pass iters = [ iter(R) for _ in range(n) ] [ iters[j].next() for j in range(n) ] i = 0 while i < n: try: a = ZZ(iters[i].next()) m = m.gcd(a) P[i] = a for b in Q: if m.gcd(b) == 1: try: pts.append(X([ num/b for num in P ])) except: pass i = 0 m = ZZ(0) except StopIteration: iters[i] = iter(R) # reset P[i] = iters[i].next() # reset P[i] to 0 and increment i += 1 pts.sort() return pts | 7437114fd97818d63a9f0b766fecf0fb34f4f16c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/7437114fd97818d63a9f0b766fecf0fb34f4f16c/rational_point.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2792,
67,
7329,
558,
67,
7034,
287,
67,
1518,
12,
60,
16,
38,
4672,
3536,
6057,
264,
815,
28381,
436,
8371,
3143,
603,
4355,
1139,
261,
2178,
1879,
1375,
64,
53,
53,
24065,
731,
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,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2792,
67,
7329,
558,
67,
7034,
287,
67,
1518,
12,
60,
16,
38,
4672,
3536,
6057,
264,
815,
28381,
436,
8371,
3143,
603,
4355,
1139,
261,
2178,
1879,
1375,
64,
53,
53,
24065,
731,
358,
... |
self.__import_programs(p.stop, stop + 60) | self.__import_programs(p.stop, stop + 60 + 2 * 3600) | def __getitem__(self, key): """ Get a program or a list of programs. Possible usage is channel[time] to get the programm running at 'time' channel[start:stop] to get the programms between start and stop channel[start:] to get all programms beginning at start """ if isinstance(key, slice): start = key.start stop = key.stop else: start = key stop = 0 | f29806184942ec04f800b8bce4da1a3a7ddafdcc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/f29806184942ec04f800b8bce4da1a3a7ddafdcc/channel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
498,
4672,
3536,
968,
279,
5402,
578,
279,
666,
434,
25038,
18,
25433,
4084,
353,
1904,
63,
957,
65,
358,
336,
326,
5402,
81,
3549,
622,
296,
957,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
498,
4672,
3536,
968,
279,
5402,
578,
279,
666,
434,
25038,
18,
25433,
4084,
353,
1904,
63,
957,
65,
358,
336,
326,
5402,
81,
3549,
622,
296,
957,
11,
... |
"""Set the POSTGRES installation directory. If set, the pq library and headers will be expected in POSTGRES_DIR/lib and POSTGRES_DIR/include. Otherwise the default is to use the system location. | """Set the POSTGRES installation directory. If set, the pq library and headers will be expected in POSTGRES_DIR/lib and POSTGRES_DIR/include. Otherwise the default is to use the system location. | def generate(env): global options if not options: options = env.GlobalOptions() options.Add('POSTGRES_DIR', | 81fa9f8db3fa5d4f7ed1a6dc5ab92a6b1ba7ca21 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1466/81fa9f8db3fa5d4f7ed1a6dc5ab92a6b1ba7ca21/postgres_pq.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
12,
3074,
4672,
2552,
702,
309,
486,
702,
30,
702,
273,
1550,
18,
5160,
1320,
1435,
702,
18,
986,
2668,
3798,
43,
7031,
67,
4537,
2187,
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,
2103,
12,
3074,
4672,
2552,
702,
309,
486,
702,
30,
702,
273,
1550,
18,
5160,
1320,
1435,
702,
18,
986,
2668,
3798,
43,
7031,
67,
4537,
2187,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
class AudioScrobblerServiceFixture(Fixture): | class AudioScrobblerServiceFixture(AspyFixture): | def load_music(self): music = Music("E:\\Music\\Bloc Party - Silent Alarm\\01 - Like Eating Glass.mp3") music.length = 261 music.played_at = int(time.time()) - 40 return music | 43a0f8d3d71fafa93f66b7de5c6311692b8b2ccd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5169/43a0f8d3d71fafa93f66b7de5c6311692b8b2ccd/aspyplayer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
81,
14894,
12,
2890,
4672,
26225,
273,
490,
14894,
2932,
41,
31027,
49,
14894,
1695,
38,
1829,
6393,
93,
300,
348,
8125,
2262,
4610,
1695,
1611,
300,
23078,
512,
1776,
611,
459... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
81,
14894,
12,
2890,
4672,
26225,
273,
490,
14894,
2932,
41,
31027,
49,
14894,
1695,
38,
1829,
6393,
93,
300,
348,
8125,
2262,
4610,
1695,
1611,
300,
23078,
512,
1776,
611,
459... |
print "converting to rectangle, option 2:" return self.Rectangle(self.dc,points[0][0],points[0][1],points[2][0],points[2][1]) return self._appendOptimize16(points,EMR.POLYGON16,EMR.POLYGON) | if self.verbose: print "converting to rectangle, option 2:" return self.Rectangle(points[0][0],points[0][1],points[2][0],points[2][1]) return self._appendOptimize16(points,_EMR._POLYGON16,_EMR._POLYGON) | def Polygon(self,points): """ | 688318604ffe18a54bb261a3bde4bf6e1784a8de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8136/688318604ffe18a54bb261a3bde4bf6e1784a8de/pyemf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12681,
12,
2890,
16,
4139,
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,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12681,
12,
2890,
16,
4139,
4672,
3536,
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,
-1... |
self.assertRaises(OverflowError, xrange, 1e100, 1e101, 1e101) | self.assertRaises(TypeError, xrange, 0.0, 2, 1) self.assertRaises(TypeError, xrange, 1, 2.0, 1) self.assertRaises(TypeError, xrange, 1, 2, 1.0) self.assertRaises(TypeError, xrange, 1e100, 1e101, 1e101) | def test_xrange(self): self.assertEqual(list(xrange(3)), [0, 1, 2]) self.assertEqual(list(xrange(1, 5)), [1, 2, 3, 4]) self.assertEqual(list(xrange(0)), []) self.assertEqual(list(xrange(-3)), []) self.assertEqual(list(xrange(1, 10, 3)), [1, 4, 7]) self.assertEqual(list(xrange(5, -5, -3)), [5, 2, -1, -4]) | d6a3915e3f51ca5ff906dd049e3959d8cb692c0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d6a3915e3f51ca5ff906dd049e3959d8cb692c0a/test_xrange.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
92,
3676,
12,
2890,
4672,
365,
18,
11231,
5812,
12,
1098,
12,
92,
3676,
12,
23,
13,
3631,
306,
20,
16,
404,
16,
576,
5717,
365,
18,
11231,
5812,
12,
1098,
12,
92,
3676,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
92,
3676,
12,
2890,
4672,
365,
18,
11231,
5812,
12,
1098,
12,
92,
3676,
12,
23,
13,
3631,
306,
20,
16,
404,
16,
576,
5717,
365,
18,
11231,
5812,
12,
1098,
12,
92,
3676,
1... |
result += self.left_term_weight * math.exp(arg1) + \ self.right_term_weight * (1. / math.exp(arg2)) | if(arg1 > self.overflow_limit): term1 = math.exp(700) else: term1 = math.exp(arg1) if(arg2 > self.overflow_limit): term2 = math.exp(700) else: term2 = math.exp(arg2) result += self.left_term_weight * term1 + \ self.right_term_weight * (1. / term2) | def functional(self, u_isos): result = 0.0 for u in u_isos: arg1 = self.shape_factor_left * (self.u_min - u) arg2 = self.shape_factor_right * (self.u_max - u) if(u > self.right_limit or u < self.left_limit): result += self.left_term_weight * math.exp(arg1) + \ self.right_term_weight * (1. / math.exp(arg2)) return result / u_isos.size() | eb3d85be76636bce057b738dfe6e8be136d4f017 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/eb3d85be76636bce057b738dfe6e8be136d4f017/minimization.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18699,
12,
2890,
16,
582,
67,
291,
538,
4672,
563,
273,
374,
18,
20,
364,
582,
316,
582,
67,
291,
538,
30,
1501,
21,
273,
365,
18,
4867,
67,
6812,
67,
4482,
225,
380,
261,
2890,
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,
18699,
12,
2890,
16,
582,
67,
291,
538,
4672,
563,
273,
374,
18,
20,
364,
582,
316,
582,
67,
291,
538,
30,
1501,
21,
273,
365,
18,
4867,
67,
6812,
67,
4482,
225,
380,
261,
2890,
18... |
if user is not None: log( 'Updating sources...' ) | if user is not None or os.path.exists( os.path.join( boost_root, 'CVS' ) ): log( 'Updating sources from CVS...' ) | def update_source( user, tag, proxy, args, **unused ): if user is not None: log( 'Updating sources...' ) cvs_update( user, tag, args ) else: get_source( user, tag, proxy, args ) | 42e903364c90801affb03213c92d038ca6c9b6ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7959/42e903364c90801affb03213c92d038ca6c9b6ff/regression.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
3168,
12,
729,
16,
1047,
16,
2889,
16,
833,
16,
2826,
14375,
262,
30,
309,
729,
353,
486,
599,
578,
1140,
18,
803,
18,
1808,
12,
1140,
18,
803,
18,
5701,
12,
14994,
67,
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,
1089,
67,
3168,
12,
729,
16,
1047,
16,
2889,
16,
833,
16,
2826,
14375,
262,
30,
309,
729,
353,
486,
599,
578,
1140,
18,
803,
18,
1808,
12,
1140,
18,
803,
18,
5701,
12,
14994,
67,
3... |
try: keywords[l_prop.id] = REQUEST.get(l_prop.id, '') except: keywords[l_prop.id] = '' return keywords | try: output[l_prop.id] = REQUEST.get(l_prop.id, keywords.get(l_prop.id, '')) except: output[l_prop.id] = '' return output | def processDynamicProperties(self, meta_type, REQUEST=None, keywords={}): """ """ for l_prop in self.getDynamicPropertiesTool().getDynamicProperties(meta_type): try: keywords[l_prop.id] = REQUEST.get(l_prop.id, '') except: keywords[l_prop.id] = '' | 749c88bf9d4e74be00d60faed2d8e1de50942798 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/749c88bf9d4e74be00d60faed2d8e1de50942798/NySite.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
9791,
2297,
12,
2890,
16,
2191,
67,
723,
16,
12492,
33,
7036,
16,
7093,
12938,
4672,
3536,
3536,
364,
328,
67,
5986,
316,
365,
18,
588,
9791,
2297,
6364,
7675,
588,
9791,
2297,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
9791,
2297,
12,
2890,
16,
2191,
67,
723,
16,
12492,
33,
7036,
16,
7093,
12938,
4672,
3536,
3536,
364,
328,
67,
5986,
316,
365,
18,
588,
9791,
2297,
6364,
7675,
588,
9791,
2297,
1... |
if nick == self.nickname: self.nickname = params[0] | if nick == self.nickname: self.nickname = params[0] else: self.userRenamed(nick, params[0]) | def irc_NICK(self, prefix, params): nick = string.split(prefix,'!',0)[0] if nick == self.nickname: self.nickname = params[0] | 494b9d5f056c28f6e92951c0c9e52f9889d54b93 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/494b9d5f056c28f6e92951c0c9e52f9889d54b93/irc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
277,
1310,
67,
50,
16656,
12,
2890,
16,
1633,
16,
859,
4672,
10909,
273,
533,
18,
4939,
12,
3239,
11189,
5,
2187,
20,
25146,
20,
65,
309,
10909,
422,
365,
18,
17091,
529,
30,
365,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
277,
1310,
67,
50,
16656,
12,
2890,
16,
1633,
16,
859,
4672,
10909,
273,
533,
18,
4939,
12,
3239,
11189,
5,
2187,
20,
25146,
20,
65,
309,
10909,
422,
365,
18,
17091,
529,
30,
365,
18... |
return cram(stripid(repr(x)), self.maxstring) | return self.escape(cram(stripid(repr(x)), self.maxstring)) | def repr_instance(self, x, level): try: return cram(stripid(repr(x)), self.maxstring) except: return self.escape('<%s instance>' % x.__class__.__name__) | 37f7b38eb6247564c00c8a355ab12268e8486c4e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/37f7b38eb6247564c00c8a355ab12268e8486c4e/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8480,
67,
1336,
12,
2890,
16,
619,
16,
1801,
4672,
775,
30,
327,
365,
18,
6939,
12,
71,
1940,
12,
6406,
350,
12,
12715,
12,
92,
13,
3631,
365,
18,
1896,
1080,
3719,
1335,
30,
327,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8480,
67,
1336,
12,
2890,
16,
619,
16,
1801,
4672,
775,
30,
327,
365,
18,
6939,
12,
71,
1940,
12,
6406,
350,
12,
12715,
12,
92,
13,
3631,
365,
18,
1896,
1080,
3719,
1335,
30,
327,
... |
filetag.tag().comment = commententry.get_text() | filetag.tag().comment = entries[6].get_text() | def editwindow_applyall(self, button, item, filetags, titleentry, artistentry, albumentry, yearentry, trackentry, genreentry, commententry): filetagnum = 0 for filetag in filetags: filetagnum = filetagnum + 1 if item == "title": filetag.tag().title = titleentry.get_text() elif item == "album": filetag.tag().album = albumentry.get_text() elif item == "artist": filetag.tag().artist = artistentry.get_text() elif item == "year": if len(yearentry.get_text()) > 0: filetag.tag().year = int(yearentry.get_text()) else: filetag.tag().year = 0 elif item == "track": filetag.tag().track = filetagnum elif item == "genre": filetag.tag().genre = genreentry.get_text() elif item == "comment": filetag.tag().comment = commententry.get_text() if item == "track": # Update the entry for the current song: trackentry.set_text(str(filetags[self.filetagnum].tag().track)) | 8e7f75d3649afea0782df60c0cbc0b9c2fb7cc04 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2312/8e7f75d3649afea0782df60c0cbc0b9c2fb7cc04/sonata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3874,
5668,
67,
9010,
454,
12,
2890,
16,
3568,
16,
761,
16,
661,
278,
1341,
16,
2077,
4099,
16,
15469,
4099,
16,
14844,
4099,
16,
677,
73,
7892,
698,
16,
3298,
4099,
16,
3157,
2842,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3874,
5668,
67,
9010,
454,
12,
2890,
16,
3568,
16,
761,
16,
661,
278,
1341,
16,
2077,
4099,
16,
15469,
4099,
16,
14844,
4099,
16,
677,
73,
7892,
698,
16,
3298,
4099,
16,
3157,
2842,
... |
def __get_rbuf_len(self): | def _get_rbuf_len(self): | def __get_rbuf_len(self): buf_len = 0 for i in [len(x) for x in self._rbuf]: buf_len += i return buf_len | dee4f185d018d143d63db650d2b9ee53fe09c8e9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/dee4f185d018d143d63db650d2b9ee53fe09c8e9/socket.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
86,
4385,
67,
1897,
12,
2890,
4672,
1681,
67,
1897,
273,
374,
364,
277,
316,
306,
1897,
12,
92,
13,
364,
619,
316,
365,
6315,
86,
4385,
14542,
1681,
67,
1897,
1011,
277... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
588,
67,
86,
4385,
67,
1897,
12,
2890,
4672,
1681,
67,
1897,
273,
374,
364,
277,
316,
306,
1897,
12,
92,
13,
364,
619,
316,
365,
6315,
86,
4385,
14542,
1681,
67,
1897,
1011,
277... |
self.assertEqual (db.tag_path_split ('rating'), (user, '', 'rating')) self.assertEqual (db.tag_path_split ('/%s/rating' % user), (user, '', 'rating')) self.assertEqual (db.tag_path_split ('/tags/%s/rating' % user), (user, '', 'rating')) self.assertEqual (db.tag_path_split ('foo/rating'), (user, 'foo', 'rating')) self.assertEqual (db.tag_path_split ('/%s/foo/rating' % user), (user, 'foo', 'rating')) self.assertEqual (db.tag_path_split ('/tags/%s/foo/rating' % user), (user, 'foo', 'rating')) self.assertEqual (db.tag_path_split ('foo/bar/rating'), (user, 'foo/bar', 'rating')) self.assertEqual (db.tag_path_split ('/%s/foo/bar/rating' % user), (user, 'foo/bar', 'rating')) self.assertEqual (db.tag_path_split ('/tags/%s/foo/bar/rating' % user), (user, 'foo/bar', 'rating')) self.assertRaises (TagPathError, db.tag_path_split, '') self.assertRaises (TagPathError, db.tag_path_split, '/') self.assertRaises (TagPathError, db.tag_path_split, '/foo') def testTypedValueInterpretation (self): | self.assertEqual(db.tag_path_split('rating'), (user, '', 'rating')) self.assertEqual(db.tag_path_split('/%s/rating' % user), (user, '', 'rating')) self.assertEqual(db.tag_path_split('/tags/%s/rating' % user), (user, '', 'rating')) self.assertEqual(db.tag_path_split('foo/rating'), (user, 'foo', 'rating')) self.assertEqual(db.tag_path_split('/%s/foo/rating' % user), (user, 'foo', 'rating')) self.assertEqual(db.tag_path_split('/tags/%s/foo/rating' % user), (user, 'foo', 'rating')) self.assertEqual(db.tag_path_split('foo/bar/rating'), (user, 'foo/bar', 'rating')) self.assertEqual(db.tag_path_split('/%s/foo/bar/rating' % user), (user, 'foo/bar', 'rating')) self.assertEqual(db.tag_path_split('/tags/%s/foo/bar/rating' % user), (user, 'foo/bar', 'rating')) self.assertRaises(TagPathError, db.tag_path_split, '') self.assertRaises(TagPathError, db.tag_path_split, '/') self.assertRaises(TagPathError, db.tag_path_split, '/foo') def testTypedValueInterpretation(self): | def testTagPathSplit (self): db = self.db | e75848841ac96982524448e932e12fd6ff9cbe0c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12637/e75848841ac96982524448e932e12fd6ff9cbe0c/fdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1805,
743,
5521,
261,
2890,
4672,
1319,
273,
365,
18,
1966,
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,... | [
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,
1842,
1805,
743,
5521,
261,
2890,
4672,
1319,
273,
365,
18,
1966,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Title: <INPUT TYPE=text SIZE=70 NAME=title VALUE="%s"<BR> | Title: <INPUT TYPE=text SIZE=70 NAME=title VALUE="%s"><BR> | def showedit(self, name, title, text): | ed531fd9df252b93d75593e5977cfd49eb36ae24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ed531fd9df252b93d75593e5977cfd49eb36ae24/faqmain.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
4619,
12,
2890,
16,
508,
16,
2077,
16,
977,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
4619,
12,
2890,
16,
508,
16,
2077,
16,
977,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
dtype = getattr (numpy, 'uint%s' % (bits_per_sample)) | dtype = getattr (self.dtypes, 'uint%s' % (bits_per_sample)) | def get_contiguous(self, channel_name=None): """ Return memmap of an image. | 67eb5b913784e716184933d99aa3bcc5629e8fe1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8227/67eb5b913784e716184933d99aa3bcc5629e8fe1/tiff_file.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
30611,
12,
2890,
16,
1904,
67,
529,
33,
7036,
4672,
3536,
2000,
1663,
1458,
434,
392,
1316,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
336,
67,
30611,
12,
2890,
16,
1904,
67,
529,
33,
7036,
4672,
3536,
2000,
1663,
1458,
434,
392,
1316,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if err!=None and err<error: break | if error!=None and err<error: break | def frGS(z,target,estimate=None, iterations=20,error=None): ''' Fresnel transform Gerchberg - Saxton Algorithm Calculates the phase distribution in a object plane (for a given amplitude constrain) to obtain an specific amplitude distribution in the target plane. A FFT implementation of the Fresnel Transform is used. **ARGUMENTS:** ========== ====================================================== z Propagation distance. This is used to calculate the resolution needed in the object plane, for a given target resolution. target :class:`Field` instance whose amplitude distribution is used to represent the amplitude constrain to be applied in the target plane. The phase of this field is not used. estimate :class:`Field` instance used as initial estimate for the problem. The amplitude of this field is taken as the reference amplitude and the phase is obtained. The resolution used to define this field must match the value needed to obtain the required target resolution when the FFT-Fresnel transform is used. If the wrong value is given an exception is raised. If not given, a unitary amplitude wave, with random phase and the correct resolution, is used. iterations Maximum number of iterations error Expected error ========== ====================================================== .. note : target and object must have the same wavelength **RETURN VALUE:** (holo,err) ==== =========================================================== holo Field instance, containing the reference amplitude information and the phase obtained from the iterative algorithm. The holo.res attribute contains the resolution of the calculated hologram for the given propagation distance. The holo.l attribute contains the wavelenght used to calculate the hologram. err Final error obtained ==== =========================================================== ''' if estimate==None: edata=exp(2.j*pi*random(target.shape)) sx,sy=target.size dxe=target.l*z/sx dye=target.l*z/sy estimate=Field(data=edata,psize=(dxe,dye),l=target.l) assert estimate.shape==target.shape,\ "The estimate field, and the target field, must have the same shape" assert target.l==estimate.l,\ "The wave lenghts for the reference beam, and the target must be equal" sx,sy=target.size dxe=target.l*z/sx dye=target.l*z/sy dx,dy=estimate.res assert (dxe==dx) and (dye==dy),\ "The resolution for the reference beam, and the target must be equal" holo=estimate eabs=estimate.abs() #Normalized Target amplitude ntarget=target.abs()/target.abs().max() for n in range(iterations): if n!=0: holo=imp.propagate_fresnel(-z) #Keep only the phase in the hologram plane holo.data=exp(1.j*holo.angle) #Apply the amplitude constain holo=holo*eabs #Calculate the new image plane imp=holo.propagate_fresnel(z) err=(ntarget-imp.abs()/imp.abs().max()).std() if err!=None and err<error: break d=exp(1.j*imp.angle) imp=Field(data=d, psize=imp.psize, l=imp.l) #Apply the amplitude constain imp=imp*target.abs() return holo,err | 57752884fee44b2ecf21de948f1a409afb585825 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3690/57752884fee44b2ecf21de948f1a409afb585825/gs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3812,
16113,
12,
94,
16,
3299,
16,
23562,
33,
7036,
16,
11316,
33,
3462,
16,
1636,
33,
7036,
4672,
9163,
478,
455,
3084,
2510,
611,
264,
343,
31317,
300,
348,
651,
1917,
15067,
225,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3812,
16113,
12,
94,
16,
3299,
16,
23562,
33,
7036,
16,
11316,
33,
3462,
16,
1636,
33,
7036,
4672,
9163,
478,
455,
3084,
2510,
611,
264,
343,
31317,
300,
348,
651,
1917,
15067,
225,
26... |
""" | r""" | def fourier_series_partial_sum(self,N,L): """ Returns the partial sum \[ f(x) \sim \frac{a_0}{2} + \sum_{n=1}^N [a_n\cos(\frac{n\pi x}{L}) + b_n\sin(\frac{n\pi x}{L})], \] as a string. | 6ea58891b00cf77041a2de69465efb2ab507dcd2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/6ea58891b00cf77041a2de69465efb2ab507dcd2/piecewise.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12792,
2453,
67,
10222,
67,
11601,
67,
1364,
12,
2890,
16,
50,
16,
48,
4672,
436,
8395,
2860,
326,
4702,
2142,
521,
63,
284,
12,
92,
13,
521,
9812,
521,
22187,
95,
69,
67,
20,
8637,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12792,
2453,
67,
10222,
67,
11601,
67,
1364,
12,
2890,
16,
50,
16,
48,
4672,
436,
8395,
2860,
326,
4702,
2142,
521,
63,
284,
12,
92,
13,
521,
9812,
521,
22187,
95,
69,
67,
20,
8637,
... |
ind = string.find(line, '[NCBI, ExPASy, Israel, Japan]') | ind = line.find('[NCBI, ExPASy, Israel, Japan]') | def reference_cross_reference(self, line): assert self.data.references, "RX: missing RN" # The basic (older?) RX line is of the form: # RX MEDLINE; 85132727. # but there are variants of this that need to be dealt with (see below) # CLD1_HUMAN in Release 39 and DADR_DIDMA in Release 33 # have extraneous information in the RX line. Check for # this and chop it out of the line. # (noticed by katel@worldpath.net) ind = string.find(line, '[NCBI, ExPASy, Israel, Japan]') if ind >= 0: line = line[:ind] | ade8039411341728bf4bd4dc20b4f5d9433c8f82 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/ade8039411341728bf4bd4dc20b4f5d9433c8f82/SProt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2114,
67,
14653,
67,
6180,
12,
2890,
16,
980,
4672,
1815,
365,
18,
892,
18,
14353,
16,
315,
54,
60,
30,
3315,
534,
50,
6,
468,
1021,
5337,
261,
1498,
8535,
534,
60,
980,
353,
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,
2114,
67,
14653,
67,
6180,
12,
2890,
16,
980,
4672,
1815,
365,
18,
892,
18,
14353,
16,
315,
54,
60,
30,
3315,
534,
50,
6,
468,
1021,
5337,
261,
1498,
8535,
534,
60,
980,
353,
434,
... |
Includes this ClauseElement. This accessor tends to be used for | Includes this ClauseElement. This accessor tends to be used for | def _cloned_set(self): """Return the set consisting all cloned anscestors of this ClauseElement. Includes this ClauseElement. This accessor tends to be used for FromClause objects to identify 'equivalent' FROM clauses, regardless of transformative operations. """ s = set() f = self while f is not None: s.add(f) f = getattr(f, '_is_clone_of', None) return s | 0dbbd6fe669afed79be8f639455e324ab9b817ca /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1074/0dbbd6fe669afed79be8f639455e324ab9b817ca/expression.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
830,
8184,
67,
542,
12,
2890,
4672,
3536,
990,
326,
444,
23570,
777,
13027,
392,
1017,
395,
1383,
434,
333,
3905,
1579,
1046,
18,
225,
657,
8993,
333,
3905,
1579,
1046,
18,
225,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
830,
8184,
67,
542,
12,
2890,
4672,
3536,
990,
326,
444,
23570,
777,
13027,
392,
1017,
395,
1383,
434,
333,
3905,
1579,
1046,
18,
225,
657,
8993,
333,
3905,
1579,
1046,
18,
225,
1... |
self.addLNBSimple(slotid = x, diseqcmode = 3, longitude = 0, loDirection = 0, latitude = 0, laDirection = 0) | self.addLNBSimple(slotid = x, diseqcmode = 3, longitude = float(str(nim.longitude.value[0]) + "." + str(nim.longitude.value[1])), loDirection = nim.longitudeOrientation.value - 2, latitude = float(str(nim.latitude.value[0]) + "." + str(nim.latitude.value[1])), laDirection = nim.latitudeOrientation.value) | def update(self): eDVBSatelliteEquipmentControl.getInstance().clear() self.satList = [] | ab927305ad491e1e556932fb947836986457a636 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/ab927305ad491e1e556932fb947836986457a636/NimManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
4672,
425,
30199,
12692,
270,
19345,
13142,
11568,
3367,
18,
588,
1442,
7675,
8507,
1435,
225,
365,
18,
12973,
682,
273,
5378,
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,
0,
0,
0,
0,
0,
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,
1089,
12,
2890,
4672,
425,
30199,
12692,
270,
19345,
13142,
11568,
3367,
18,
588,
1442,
7675,
8507,
1435,
225,
365,
18,
12973,
682,
273,
5378,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def eval(self, s, globals={}, locals={}): | def eval(self, s, globals=None, locals=None): """ EXAMPLES: sage: html.eval('<hr>') <html><font color='black'><hr></font></html> '' """ if globals is None: globals = {} if locals is None: locals = {} | def eval(self, s, globals={}, locals={}): s = str(s) s = math_parse(s) t = '' while len(s) > 0: i = s.find('<sage>') if i == -1: t += s break j = s.find('</sage>') if j == -1: t += s break t += s[:i] + '<span class="math">%s</span>'%\ latex(sage_eval(s[6+i:j], locals=locals)) s = s[j+7:] print "<html><font color='black'>%s</font></html>"%t return '' | cbfe5f3072c9450dabaeadfb020d4d6222523497 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/cbfe5f3072c9450dabaeadfb020d4d6222523497/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5302,
12,
2890,
16,
272,
16,
10941,
33,
7036,
16,
8985,
33,
7036,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
1729,
18,
8622,
2668,
32,
7256,
1870,
13,
411,
2620,
4438,
5776,
2036... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5302,
12,
2890,
16,
272,
16,
10941,
33,
7036,
16,
8985,
33,
7036,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
1729,
18,
8622,
2668,
32,
7256,
1870,
13,
411,
2620,
4438,
5776,
2036... |
self.DC.SetFont(f) tw,th = self.DC.GetTextExtent(test_day) | DC.SetFont(f) tw,th = DC.GetTextExtent(test_day) | def DrawWeek(self): # draw the week days width = self.gridx[1]-self.gridx[0] height = self.gridy[1] - self.gridy[0] rect_w = self.gridx[7]-self.gridx[0] | b25cb7db43121f1f6899b7ebfcd6ccc3806dd0f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/b25cb7db43121f1f6899b7ebfcd6ccc3806dd0f6/calendar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10184,
6630,
12,
2890,
4672,
377,
468,
3724,
326,
4860,
4681,
1835,
273,
365,
18,
5222,
92,
63,
21,
65,
17,
2890,
18,
5222,
92,
63,
20,
65,
2072,
273,
365,
18,
5222,
93,
63,
21,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10184,
6630,
12,
2890,
4672,
377,
468,
3724,
326,
4860,
4681,
1835,
273,
365,
18,
5222,
92,
63,
21,
65,
17,
2890,
18,
5222,
92,
63,
20,
65,
2072,
273,
365,
18,
5222,
93,
63,
21,
65... |
return '<%s/>' % ' '.join([self.tagname] + ['%s="%s"' % (n, v) for n, v in self.attlist()]) | return u'<%s/>' % ' '.join([self.tagname] + ['%s="%s"' % (n, v) for n, v in self.attlist()]) | def emptytag(self): return '<%s/>' % ' '.join([self.tagname] + ['%s="%s"' % (n, v) for n, v in self.attlist()]) | ffb86a078cea8d108cd312bd369ef34d402631d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/ffb86a078cea8d108cd312bd369ef34d402631d8/nodes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1008,
2692,
12,
2890,
4672,
327,
2368,
9,
87,
18280,
738,
296,
2418,
5701,
3816,
2890,
18,
2692,
529,
65,
397,
10228,
9,
87,
11613,
87,
5187,
738,
261,
82,
16,
331,
13,
364,
290,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1008,
2692,
12,
2890,
4672,
327,
2368,
9,
87,
18280,
738,
296,
2418,
5701,
3816,
2890,
18,
2692,
529,
65,
397,
10228,
9,
87,
11613,
87,
5187,
738,
261,
82,
16,
331,
13,
364,
290,
16,... |
P=1, Q=-1 fives the Fibonacci sequence. | P=1, Q=-1 gives the Fibonacci sequence. | def lucas_number1(n,P,Q): """ Returns then n-th Lucas number ``of the first kind'' (this is not standard terminology). The Lucas sequence $L^{(1)}_n$ is defined by the initial conditions $L^{(1)}_1=0$, $L^{(1)}_2=1$ and the recurrence relation $L^{(1)}_{n+2} = P*L^{(1)}_{n+1} - Q*L^{(1)}_n$. Wraps GAP's Lucas(...)[1]. P=1, Q=-1 fives the Fibonacci sequence. INPUT: n -- integer P, Q -- integer or rational numbers OUTPUT: integer or rational number EXAMPLES: sage: lucas_number1(5,1,-1) 5 sage: lucas_number1(6,1,-1) 8 sage: lucas_number1(7,1,-1) 13 sage: lucas_number1(7,1,-2) 43 sage: lucas_number1(5,2,3/5) 229/25 sage: lucas_number1(5,2,1.5) Traceback (most recent call last): ... TypeError: no canonical coercion from Real Field with 53 bits of precision to Rational Field There was a conjecture that the sequence $L_n$ defined by $L_{n+2} = L_{n+1} + L_n$, $L_1=1$, $L_2=3$, has the property that $n$ prime implies that $L_n$ is prime. sage: lucas = lambda n:(5/2)*lucas_number1(n,1,-1)+(1/2)*lucas_number2(n,1,-1) sage: [[lucas(n),is_prime(lucas(n)),n+1,is_prime(n+1)] for n in range(15)] [[1, False, 1, False], [3, True, 2, True], [4, False, 3, True], [7, True, 4, False], [11, True, 5, True], [18, False, 6, False], [29, True, 7, True], [47, True, 8, False], [76, False, 9, False], [123, False, 10, False], [199, True, 11, True], [322, False, 12, False], [521, True, 13, True], [843, False, 14, False], [1364, False, 15, False]] Can you use SAGE to find a counterexample to the conjecture? """ ans=gap.eval("Lucas(%s,%s,%s)[1]"%(QQ._coerce_(P),QQ._coerce_(Q),ZZ(n))) return sage_eval(ans) | 8b6cc309d81329ac887f73256610611664d8fcd5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/8b6cc309d81329ac887f73256610611664d8fcd5/combinat.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
328,
5286,
345,
67,
2696,
21,
12,
82,
16,
52,
16,
53,
4672,
3536,
2860,
1508,
290,
17,
451,
511,
5286,
345,
1300,
12176,
792,
326,
1122,
3846,
6309,
261,
2211,
353,
486,
4529,
16122,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
328,
5286,
345,
67,
2696,
21,
12,
82,
16,
52,
16,
53,
4672,
3536,
2860,
1508,
290,
17,
451,
511,
5286,
345,
1300,
12176,
792,
326,
1122,
3846,
6309,
261,
2211,
353,
486,
4529,
16122,
... |
testcases = [UTDataArrayFromNumPyArray_Scalar, \ UTDataArrayFromNumPyArray_Vector, \ UTDataArrayFromNumPyMultiArray_Scalar, \ UTDataArrayFromNumPyMultiArray_Vector] | testcases = [UTFloatArrayFromNumPyArray_Scalar, \ UTDoubleArrayFromNumPyArray_Scalar, \ UTFloatArrayFromNumPyArray_Vector, \ UTDoubleArrayFromNumPyArray_Vector, \ UTFloatArrayFromNumPyMultiArray_Scalar, \ UTDoubleArrayFromNumPyMultiArray_Scalar, \ UTFloatArrayFromNumPyMultiArray_Vector, \ UTDoubleArrayFromNumPyMultiArray_Vector] | def get_leaktest_scenario(self): | 34128e9b0827c17d15020a7d73bb23a6abf2d402 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5572/34128e9b0827c17d15020a7d73bb23a6abf2d402/vtk_data.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
298,
581,
3813,
67,
26405,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
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,
336,
67,
298,
581,
3813,
67,
26405,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
None) | None, iface = ITicketIssuer, rootObject = self) | def createResource(self): return PublicAthenaLivePage( ITicketIssuer, self, getLoader("signup"), IStaticShellContent(self.store, None), None) | f942a031b0edf71760ab55f9b0584454b8ba3a06 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6980/f942a031b0edf71760ab55f9b0584454b8ba3a06/signup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24317,
12,
2890,
4672,
327,
7224,
37,
15991,
69,
12328,
1964,
12,
467,
13614,
16667,
16,
365,
16,
336,
2886,
2932,
2977,
416,
6,
3631,
467,
5788,
13220,
1350,
12,
2890,
18,
2233,
16,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24317,
12,
2890,
4672,
327,
7224,
37,
15991,
69,
12328,
1964,
12,
467,
13614,
16667,
16,
365,
16,
336,
2886,
2932,
2977,
416,
6,
3631,
467,
5788,
13220,
1350,
12,
2890,
18,
2233,
16,
5... |
p = Process('python', [__file__, '--child', '--logfile', os.path.join(tempfile.gettempdir(), 'saranwrap.log')], dead_callback) | p = Process(sys.executable, [__file__, '--child', '--logfile', os.path.join(tempfile.gettempdir(), 'saranwrap.log')], dead_callback) | def wrap(obj, dead_callback = None): """ | dc680acc35f57558409253533bedbd88085dce6b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10078/dc680acc35f57558409253533bedbd88085dce6b/saranwrap.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2193,
12,
2603,
16,
8363,
67,
3394,
273,
599,
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,
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,
2193,
12,
2603,
16,
8363,
67,
3394,
273,
599,
4672,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return [nodes, in_0, in_1, in_0_alive, in_1_alive, common_rel] | return [nodes, in_0, in_1, in_0_alive, in_1_alive, common_rel, time] | def Simulate(birth_0, death_0, turnover, birth_1, death_1, migration_1, migration_0, intitial_0, initial_1, runs): """ Input Parameters ---------------- birth_0 the per lineage birth rate in state 0 death_0 the per lineage death rate in state 0 birth_1 the per lineage birth rate in state 1 death_1 the per lineage death rate in state 1 migration_1 the per lineage migration rate from 0 to 1 migration_0 the per lineage migration rate from 1 to 0 initial_0 the size of the initial population in state 0 initial_1 the size of the initial population in state 1 runs the number of times to run the simulation Return Values ------------- nodes the node map [Time of Birth (0), Parent node (1), region (2), migration_times (3), Time of Death (4)] of the final population common_rel the common ancestors of the remaining lineages in_0 the number of lineages in the boreal region at the tips of the tree (after all remaining lineages are related to eachother) in_1 the number of lineages in the tropical region at the tips of the tree (after all remaining are related to eachother) """ #start with initial_0 in the boreal, initial_1 in the tropical, and run the birth-death, character change simulator #until the remaining lineages all have the same parent. Then use each of these lineages as initial_0, #initial_1 (ie no longer connected) until the remaining lineages all have the same parent. #Do this the desired number of times. The last run will be nodes array to be returned. #This last run will produce a tree with a certain age (from root to tips). The extent of total lineage decline is #not known, so it will be best to at first have the birth rate only slightly smaller than the death rate, #and have run equal to one. for i in range(0,runs): [nodes, in_0, in_1, in_0_alive, in_1_alive, common_rel] =CreatePopulation(birth_0, death_0, turnover, birth_1, death_1, migration_1, migration_0, intitial_0, initial_1) #common_rel=CreatePopulation(birth_0, death_0, birth_1, death_1, migration_1, migration_0, dt, intitial_0, initial_1) return [nodes, in_0, in_1, in_0_alive, in_1_alive, common_rel] | c872827e6167f1bc33108444aa076f7378184a7e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7945/c872827e6167f1bc33108444aa076f7378184a7e/bd_simple.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9587,
6243,
12,
22531,
67,
20,
16,
443,
421,
67,
20,
16,
7005,
1643,
16,
17057,
67,
21,
16,
443,
421,
67,
21,
16,
6333,
67,
21,
16,
6333,
67,
20,
16,
509,
305,
649,
67,
20,
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,
9587,
6243,
12,
22531,
67,
20,
16,
443,
421,
67,
20,
16,
7005,
1643,
16,
17057,
67,
21,
16,
443,
421,
67,
21,
16,
6333,
67,
21,
16,
6333,
67,
20,
16,
509,
305,
649,
67,
20,
16,
... |
if work_data and not delete: | if work_data: | def save(self, formdata): """Update work and edition documents according to the specified formdata.""" comment = formdata.pop('_comment', '') | cadc7e6e94b4e798e21e2505f1000d44f01e287c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3913/cadc7e6e94b4e798e21e2505f1000d44f01e287c/addbook.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
12,
2890,
16,
30642,
4672,
3536,
1891,
1440,
471,
28432,
7429,
4888,
358,
326,
1269,
30642,
12123,
2879,
273,
30642,
18,
5120,
2668,
67,
3469,
2187,
28707,
2,
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,
1923,
12,
2890,
16,
30642,
4672,
3536,
1891,
1440,
471,
28432,
7429,
4888,
358,
326,
1269,
30642,
12123,
2879,
273,
30642,
18,
5120,
2668,
67,
3469,
2187,
28707,
2,
-100,
-100,
-100,
-100,... |
_do_under(i, t_off, tx) | _do_under(i, t_off+leftIndent, tx) | def drawPara(self,debug=0): """Draws a paragraph according to the given style. Returns the final y position at the bottom. Not safe for paragraphs without spaces e.g. Japanese; wrapping algorithm will go infinite.""" | e1b6ae68ff0889c00107af6cf95dc49d2a194d6b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/e1b6ae68ff0889c00107af6cf95dc49d2a194d6b/paragraph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
23529,
12,
2890,
16,
4148,
33,
20,
4672,
3536,
25113,
279,
10190,
4888,
358,
326,
864,
2154,
18,
2860,
326,
727,
677,
1754,
622,
326,
5469,
18,
2288,
4183,
364,
24552,
2887,
7292,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
23529,
12,
2890,
16,
4148,
33,
20,
4672,
3536,
25113,
279,
10190,
4888,
358,
326,
864,
2154,
18,
2860,
326,
727,
677,
1754,
622,
326,
5469,
18,
2288,
4183,
364,
24552,
2887,
7292,
... |
class="zope.app.component.tests.views.V1" for="zope.app.component.tests.views.IC" attribute="action" permission="zope.Public" allowed_attributes="action" /> """ | class="zope.app.component.tests.views.V1" for="zope.app.component.tests.views.IC" attribute="action" permission="zope.Public" allowed_attributes="action" /> ''' | def testAttributeProtectedPage(self): xmlconfig(StringIO(template % """ <browser:page name="test" class="zope.app.component.tests.views.V1" for="zope.app.component.tests.views.IC" attribute="action" permission="zope.Public" allowed_attributes="action" /> """ )) | 1cfc7ddd1cac0110cca3e909215477e1c59bbca3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9523/1cfc7ddd1cac0110cca3e909215477e1c59bbca3/test_directives.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1499,
15933,
1964,
12,
2890,
4672,
2025,
1425,
12,
780,
4294,
12,
3202,
738,
3536,
411,
11213,
30,
2433,
508,
1546,
3813,
6,
667,
1546,
94,
1306,
18,
2910,
18,
4652,
18,
16341,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1499,
15933,
1964,
12,
2890,
4672,
2025,
1425,
12,
780,
4294,
12,
3202,
738,
3536,
411,
11213,
30,
2433,
508,
1546,
3813,
6,
667,
1546,
94,
1306,
18,
2910,
18,
4652,
18,
16341,
1... |
exc_data = collector.collect_exception(*exc_info) debug_info = DebugInfo(count, exc_info, exc_data, base_path, environ) assert count not in self.debug_infos self.debug_infos[count] = debug_info | def detect_start_response(status, headers, exc_info=None): try: return start_response(status, headers, exc_info) except: raise else: started.append(True) | 23e8ee954360c5dcd956fcb3b3d3cbe9f4d92852 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2097/23e8ee954360c5dcd956fcb3b3d3cbe9f4d92852/middleware.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
67,
1937,
67,
2740,
12,
2327,
16,
1607,
16,
3533,
67,
1376,
33,
7036,
4672,
775,
30,
327,
787,
67,
2740,
12,
2327,
16,
1607,
16,
3533,
67,
1376,
13,
1335,
30,
1002,
469,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
67,
1937,
67,
2740,
12,
2327,
16,
1607,
16,
3533,
67,
1376,
33,
7036,
4672,
775,
30,
327,
787,
67,
2740,
12,
2327,
16,
1607,
16,
3533,
67,
1376,
13,
1335,
30,
1002,
469,
30,
... | |
' %s' % cli_bracket ('tag /%s/rating not present' % user), | ' %s' % cli_bracket('tag /%s/rating not present' % user), | def showUntagSuccessTest (self, mode): self.stealOutput () (flag, spec) = specify_DADGAD (mode, self.db.host) description = describe_by_mode (spec, mode) hostname = ['--hostname', choose_host()] args = ['show', '-v', flag, spec, 'rating', '/fluiddb/about'] + hostname execute_command_line(*parse_args(args)) self.reset () user = self.db.credentials.username self.assertEqual (self.out.buffer, ['Object %s:' % description, '\n', ' %s' % cli_bracket ('tag /%s/rating not present' % user), | e75848841ac96982524448e932e12fd6ff9cbe0c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12637/e75848841ac96982524448e932e12fd6ff9cbe0c/fdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
57,
496,
346,
4510,
4709,
261,
2890,
16,
1965,
4672,
365,
18,
334,
73,
287,
1447,
1832,
261,
6420,
16,
857,
13,
273,
4800,
67,
40,
1880,
43,
1880,
261,
3188,
16,
365,
18,
1966,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
57,
496,
346,
4510,
4709,
261,
2890,
16,
1965,
4672,
365,
18,
334,
73,
287,
1447,
1832,
261,
6420,
16,
857,
13,
273,
4800,
67,
40,
1880,
43,
1880,
261,
3188,
16,
365,
18,
1966,... |
except: sys.stderr.write(u"! Error: Unknown error during a Movie (%s) information lookup\n" % tmdb_id) | except Exception, e: sys.stderr.write(u"! Error: Unknown error during a Movie (%s) information lookup\nError(%s)\n" % (tmdb_id, e)) | def movieData(tmdb_id): '''Get Movie data by IMDB or TMDB number and return the details ''' try: return displayMovieData(self.searchTMDB(tmdb_id)) except TmdbMovieOrPersonNotFound, msg: sys.stderr.write(u"%s\n" % msg) return None except TmdHttpError, msg: sys.stderr.write(self.error_messages['TmdHttpError'] % msg) sys.exit(1) except TmdXmlError, msg: sys.stderr.write(self.error_messages['TmdXmlError'] % msg) sys.exit(1) except TmdBaseError, msg: sys.stderr.write(self.error_messages['TmdBaseError'] % msg) sys.exit(1) except TmdbUiAbort, msg: sys.stderr.write(self.error_messages['TmdbUiAbort'] % msg) sys.exit(1) except: sys.stderr.write(u"! Error: Unknown error during a Movie (%s) information lookup\n" % tmdb_id) sys.exit(1) | d513c9cd63054ab9cc5e68cbbb47082534949fc9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13713/d513c9cd63054ab9cc5e68cbbb47082534949fc9/tmdb_api.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21360,
751,
12,
88,
27574,
67,
350,
4672,
9163,
967,
26963,
501,
635,
6246,
2290,
578,
27435,
2290,
1300,
471,
327,
326,
3189,
9163,
775,
30,
327,
2562,
16727,
13120,
751,
12,
2890,
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,
21360,
751,
12,
88,
27574,
67,
350,
4672,
9163,
967,
26963,
501,
635,
6246,
2290,
578,
27435,
2290,
1300,
471,
327,
326,
3189,
9163,
775,
30,
327,
2562,
16727,
13120,
751,
12,
2890,
18,
... |
if len( attr ) > 0: return S_ERROR( "Proxies with VOMS extensions are not allowed to be uploaded" ) | def __checkVOMSisAlignedWithGroup( self, userGroup, chain ): voms = VOMS() if not voms.vomsInfoAvailable(): if self.__vomsRequired: return S_ERROR( "VOMS is required, but it's not available" ) gLogger.warn( "voms-proxy-info is not available" ) return S_OK() retVal = voms.getVOMSAttributes( chain ) if not retVal[ 'OK' ]: return retVal attr = retVal[ 'Value' ] #HACK: We deny proxies with VOMS extensions if len( attr ) > 0: return S_ERROR( "Proxies with VOMS extensions are not allowed to be uploaded" ) #END HACK validVOMSAttr = CS.getVOMSAttributeForGroup( userGroup ) if len( attr ) == 0 or attr[0] == validVOMSAttr: return S_OK( 'OK' ) msg = "VOMS attributes are not aligned with dirac group" msg += "Attributes are %s and allowed is %s for group %s" % ( attr, validVOMSAttrs, userGroup ) return S_ERROR( msg ) | e5c864247e94fee7e4ef9bf71e06e6a519c97a76 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/e5c864247e94fee7e4ef9bf71e06e6a519c97a76/ProxyDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1893,
58,
1872,
55,
291,
28495,
1190,
1114,
12,
365,
16,
26205,
16,
2687,
262,
30,
331,
25390,
273,
776,
1872,
55,
1435,
309,
486,
331,
25390,
18,
90,
25390,
966,
5268,
13332,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1893,
58,
1872,
55,
291,
28495,
1190,
1114,
12,
365,
16,
26205,
16,
2687,
262,
30,
331,
25390,
273,
776,
1872,
55,
1435,
309,
486,
331,
25390,
18,
90,
25390,
966,
5268,
13332,
30... | |
c.bookmarkPage("HYPER_1",fitType="XYZ",top=2.5*inch,bottom=2*inch) | c.bookmarkPage("HYPER_1",fit="XYZ",top=2.5*inch,bottom=2*inch) | def test1(self): | b3e8a12158cd0879ec0ae788465c6732c3f6ea3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b3e8a12158cd0879ec0ae788465c6732c3f6ea3f/test_pdfgen_links.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
21,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
21,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
self.data.append(string.split(line,"\012")[0]) | self.data.append(line.split("\012")[0]) | def __init__(self,infn): self.data=[] # init the data line list | c1bae8524e23e2baa66c77c949294c8844c8aef7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7167/c1bae8524e23e2baa66c77c949294c8844c8aef7/xpktools.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
267,
4293,
4672,
225,
365,
18,
892,
33,
8526,
565,
468,
1208,
326,
501,
980,
666,
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,
0,
0,
0,
0,
0,
0,
0,
0,
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,
267,
4293,
4672,
225,
365,
18,
892,
33,
8526,
565,
468,
1208,
326,
501,
980,
666,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Result is in form ['response', ['mesg_num octets', ...]]. Unsure what the optional 'msg' arg does. | Result without a msg argument is in form ['response', ['mesg_num octets', ...]]. Result when a msg argument is given is a single response: the "scan listing" for that message. | def list(self, which=None): """Request listing, return result. Result is in form ['response', ['mesg_num octets', ...]]. | c897eafbf0599329e14a12d56dd59c0fdd3cec2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/c897eafbf0599329e14a12d56dd59c0fdd3cec2b/poplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
12,
2890,
16,
1492,
33,
7036,
4672,
3536,
691,
11591,
16,
327,
563,
18,
3438,
353,
316,
646,
10228,
2740,
2187,
10228,
26244,
75,
67,
2107,
25497,
2187,
1372,
65,
8009,
2,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
12,
2890,
16,
1492,
33,
7036,
4672,
3536,
691,
11591,
16,
327,
563,
18,
3438,
353,
316,
646,
10228,
2740,
2187,
10228,
26244,
75,
67,
2107,
25497,
2187,
1372,
65,
8009,
2,
-100,
-... |
sage: c in MPolynomialRing(IntegerRing(), 2, names = ['x','y']) | sage: c in PolynomialRing(IntegerRing(), 2, names = ['x','y']) | def coefficient(self, degrees): """ Return the coefficient of the variables with the degrees specified in the python dictionary \code{degrees}. Mathematically, this is the coefficient in the base ring adjoined by the variables of this ring not listed in \code{degrees}. However, the result has the same parent as this polynomial. | e89f4b7623729d917a65e264773ad36d042ad588 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/e89f4b7623729d917a65e264773ad36d042ad588/multi_polynomial_element.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16554,
12,
2890,
16,
10904,
4672,
3536,
2000,
326,
16554,
434,
326,
3152,
598,
326,
10904,
1269,
316,
326,
5790,
3880,
521,
710,
95,
26943,
5496,
225,
2361,
351,
2126,
1230,
16,
333,
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,
16554,
12,
2890,
16,
10904,
4672,
3536,
2000,
326,
16554,
434,
326,
3152,
598,
326,
10904,
1269,
316,
326,
5790,
3880,
521,
710,
95,
26943,
5496,
225,
2361,
351,
2126,
1230,
16,
333,
353... |
tar = tarfile.open( archive_path, 'r:gz' ) | tar = tarfile.open( archive_path, 'r:gz' ) | def gunzip( archive_path, result_dir ): tar = tarfile.open( archive_path, 'r:gz' ) for tarinfo in tar: tar.extract( tarinfo, result_dir ) tar.close() | 924b9589bcb28d88f7617f9a8d1924277a04063f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9980/924b9589bcb28d88f7617f9a8d1924277a04063f/setup_boostbook.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31475,
4450,
12,
5052,
67,
803,
16,
563,
67,
1214,
262,
30,
8232,
273,
25857,
18,
3190,
12,
5052,
67,
803,
16,
296,
86,
30,
9764,
11,
262,
364,
8232,
1376,
316,
8232,
30,
8232,
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,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31475,
4450,
12,
5052,
67,
803,
16,
563,
67,
1214,
262,
30,
8232,
273,
25857,
18,
3190,
12,
5052,
67,
803,
16,
296,
86,
30,
9764,
11,
262,
364,
8232,
1376,
316,
8232,
30,
8232,
18,
... |
alignment=TA_CENTER, spaceAfter=6) | alignment=TA_CENTER, spaceAfter=6) | def configureStyles(self): """Store some styles in instance attributes. | 41742fc50332f407d9198cb1edd66fc71119226a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/41742fc50332f407d9198cb1edd66fc71119226a/pdfcal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5068,
9725,
12,
2890,
4672,
3536,
2257,
2690,
5687,
316,
791,
1677,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
5068,
9725,
12,
2890,
4672,
3536,
2257,
2690,
5687,
316,
791,
1677,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
'outlet/5', 'outlet/6', 'outlet/7', 'outlet/8',] | 'outlet/5', 'outlet/6', 'outlet/7', 'outlet/8', 'group/ibobs'] | def __init__(self, host, port=None): self.__conn = TelnetConnection(host, port) self.__conn.write('guppi\r') self.__conn.write('guppi\r') self.__conn.read_until('iBootBar > ') # For some reason it eats the first character after this... # sending a non-whitespace character seems to fix it # (i.e., sending a space breaks the parsing on the box) self.__conn.write('\x08') # ASCII backspace self.__kwds = ['outlet/1', 'outlet/2', 'outlet/3', 'outlet/4', 'outlet/5', 'outlet/6', 'outlet/7', 'outlet/8',] | 5c5d62c8ee0c046bb04be315992854284884cd3e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14654/5c5d62c8ee0c046bb04be315992854284884cd3e/powerstrip_agent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1479,
16,
1756,
33,
7036,
4672,
365,
16186,
4646,
273,
399,
292,
2758,
1952,
12,
2564,
16,
1756,
13,
365,
16186,
4646,
18,
2626,
2668,
75,
416,
7259,
64,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1479,
16,
1756,
33,
7036,
4672,
365,
16186,
4646,
273,
399,
292,
2758,
1952,
12,
2564,
16,
1756,
13,
365,
16186,
4646,
18,
2626,
2668,
75,
416,
7259,
64,... |
this = apply(_quickfix.new_MDEntryID, args) | this = _quickfix.new_MDEntryID(*args) | def __init__(self, *args): this = apply(_quickfix.new_MDEntryID, args) try: self.this.append(this) except: self.this = this | 7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
6188,
1622,
734,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
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,
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,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
6188,
1622,
734,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
3... |
apply(self.tk.call, (self._w, 'add', name) + self._options(cnf, kw)) self.subwidget_list[name] = TixSubWidget(self, name, check_intermediate=0) return self.subwidget_list[name] | apply(self.tk.call, (self._w, 'add', name) + self._options(cnf, kw)) self.subwidget_list[name] = TixSubWidget(self, name, check_intermediate=0) return self.subwidget_list[name] | def add(self, name, cnf={}, **kw): | 86af7ef7e3f4448abc89aa941517a84075d99a38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/86af7ef7e3f4448abc89aa941517a84075d99a38/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
12,
2890,
16,
508,
16,
23118,
28793,
2826,
9987,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
12,
2890,
16,
508,
16,
23118,
28793,
2826,
9987,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
sys.stderr.write("Aborting tabulate of binomial P\n") | sys.stderr.write("Aborting tabulation of binomial P\n") | def estimateDQbackground(self): """ This method looks at the self.resultlist inside the instance. Using this and 1000 generated time stamp it tabulates a ranking of flag prevelance, binomial probability 'p' """ if len(self.resultList) < 1: self.__backgroundResults__=list() self.__backgroundTimesDict__=dict() self.__backgroundDict__=dict() self.__haveBackgroundDict__=bool(False) return #Create DQ background, specify pickle locale to try and load first #Determine which IFOs from DQ listing uniqIfos=list() for ifo,b,c,d,e,f in self.resultList: if ifo not in uniqIfos: uniqIfos.append(ifo) ifoEpochList=[(x,getRunEpoch(self.triggerTime,x)) for x in uniqIfos] self.createDQbackground(ifoEpochList,self.__backgroundPickle__) #Calculate the binomial 'p' value for the flags in the table. if self.resultList < 1: sys.stderr.write("Aborting tabulate of binomial P\n") os.abort() seenFlags=dict() for ifo,name,version,comment,start,stop in self.resultList: if ifo.strip() not in seenFlags.keys(): seenFlags[ifo]=list() seenFlags[ifo].append(name) for myIfo,flagList in seenFlags.iteritems(): tmpFlags=list() for backgroundTime,backgroundFlags in \ self.__backgroundDict__[myIfo.strip()].iteritems(): tmpFlags.extend([name for ifo,name,ver,com,start,stop in backgroundFlags]) if myIfo not in self.__backgroundResults__.keys(): self.__backgroundResults__[myIfo]=dict() for myFlag in seenFlags[myIfo]: self.__backgroundResults__[myIfo][myFlag]=tmpFlags.count(myFlag)/float(self.__backgroundPoints__) self.__haveBackgroundDict__=True #Return background estimating | 5800af6be75ac2540e1e98d21cc7afadf15bf2aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/5800af6be75ac2540e1e98d21cc7afadf15bf2aa/fu_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11108,
40,
53,
9342,
12,
2890,
4672,
3536,
1220,
707,
10192,
622,
326,
365,
18,
2088,
1098,
4832,
326,
791,
18,
11637,
333,
471,
4336,
4374,
813,
14429,
518,
3246,
17099,
279,
23087,
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,
11108,
40,
53,
9342,
12,
2890,
4672,
3536,
1220,
707,
10192,
622,
326,
365,
18,
2088,
1098,
4832,
326,
791,
18,
11637,
333,
471,
4336,
4374,
813,
14429,
518,
3246,
17099,
279,
23087,
434... |
ws = Workspace.objects.get(pk = ws_pk) | ws = DAMWorkspace.objects.get(pk = ws_pk) | def test_delete(self): ws_pk = 1 ws = Workspace.objects.get(pk = ws_pk) node_id = Node.objects.get(label = 'test').pk params = self.get_final_parameters({}) response = self.client.get('/api/keyword/%s/delete/'%node_id, params, ) self.assertTrue(response.content == '') self.assertRaises(Node.DoesNotExist, Node.objects.get, pk = node_id ) | 774c03fcc85d5555c72b71c04da9a7d1a510e957 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4589/774c03fcc85d5555c72b71c04da9a7d1a510e957/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3733,
12,
2890,
4672,
4945,
67,
5465,
273,
404,
4945,
273,
463,
2192,
8241,
18,
6911,
18,
588,
12,
5465,
273,
4945,
67,
5465,
13,
756,
67,
350,
273,
2029,
18,
6911,
18,
588... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3733,
12,
2890,
4672,
4945,
67,
5465,
273,
404,
4945,
273,
463,
2192,
8241,
18,
6911,
18,
588,
12,
5465,
273,
4945,
67,
5465,
13,
756,
67,
350,
273,
2029,
18,
6911,
18,
588... |
expect(f.read(1), 'a') | expect(f.read(1), b'a') | def expect(got_this, expect_this): if test_support.verbose: print('%r =?= %r ...' % (got_this, expect_this), end=' ') if got_this != expect_this: if test_support.verbose: print('no') raise test_support.TestFailed, 'got %r, but expected %r' %\ (got_this, expect_this) else: if test_support.verbose: print('yes') | 6344d6c1d81593e2a7896fa9237ea294deb05218 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/6344d6c1d81593e2a7896fa9237ea294deb05218/test_largefile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4489,
12,
13212,
67,
2211,
16,
4489,
67,
2211,
4672,
309,
1842,
67,
13261,
18,
11369,
30,
1172,
29909,
86,
273,
35,
33,
738,
86,
25956,
738,
261,
13212,
67,
2211,
16,
4489,
67,
2211,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4489,
12,
13212,
67,
2211,
16,
4489,
67,
2211,
4672,
309,
1842,
67,
13261,
18,
11369,
30,
1172,
29909,
86,
273,
35,
33,
738,
86,
25956,
738,
261,
13212,
67,
2211,
16,
4489,
67,
2211,
... |
return '<%(cls)s %(fname)r (%(mime)s, %(size)d bytes)>' % { | return '<%(cls)s %(fname)r (%(mime)s, %(size)r bytes)>' % { | def __repr__(self): return '<%(cls)s %(fname)r (%(mime)s, %(size)d bytes)>' % { 'cls': self.__class__.__name__, 'fname': self.filename, 'mime': self.content_type, 'size': self.size, } | 5373d07db321aa6d718323e67c11d373636beb24 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/5373d07db321aa6d718323e67c11d373636beb24/NyBlobFile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
327,
2368,
17105,
6429,
13,
87,
8975,
12749,
13,
86,
6142,
12,
11757,
13,
87,
16,
8975,
1467,
13,
86,
1731,
13,
1870,
738,
288,
296,
6429,
4278,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
327,
2368,
17105,
6429,
13,
87,
8975,
12749,
13,
86,
6142,
12,
11757,
13,
87,
16,
8975,
1467,
13,
86,
1731,
13,
1870,
738,
288,
296,
6429,
4278,
365,
... |
("html", self.endTagHtml) | ("html", self.endTagHtml), (("title", "style", "script"), self.endTagTitleStyleScript) | def processEndTag(self, name): if self.collectingCharacters: self.finishCollectingCharacters(name, True) handlers = utils.MethodDispatcher([ ("head", self.endTagHead), ("html", self.endTagHtml) ]) handlers.setDefaultValue(self.endTagOther) handlers[name](name) | 07650463dcb1bc09b64ca00c142a11fe777079c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10463/07650463dcb1bc09b64ca00c142a11fe777079c1/parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
25633,
12,
2890,
16,
508,
4672,
309,
365,
18,
14676,
310,
11600,
30,
365,
18,
13749,
10808,
310,
11600,
12,
529,
16,
1053,
13,
4919,
273,
2990,
18,
1305,
6681,
3816,
7566,
1978,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
25633,
12,
2890,
16,
508,
4672,
309,
365,
18,
14676,
310,
11600,
30,
365,
18,
13749,
10808,
310,
11600,
12,
529,
16,
1053,
13,
4919,
273,
2990,
18,
1305,
6681,
3816,
7566,
1978,
... |
if request.method == 'POST': return redirect('language') else: languages = Language.objects.order_by("-id")[offset:limit] if(languages): json_subcat = serializers.serialize("json", languages) else: json_subcat = 'EOF' return HttpResponse(json_subcat, mimetype="application/javascript") | if request.method == 'POST': return redirect('language') else: languages = Language.objects.order_by("-id")[offset:limit] if(languages): json_subcat = serializers.serialize("json", languages) else: json_subcat = 'EOF' return HttpResponse(json_subcat, mimetype="application/javascript") | def get_languages_online(request, offset, limit): if request.method == 'POST': return redirect('language') else: languages = Language.objects.order_by("-id")[offset:limit] if(languages): json_subcat = serializers.serialize("json", languages) else: json_subcat = 'EOF' return HttpResponse(json_subcat, mimetype="application/javascript") | 7759d6eb08a7e6568691e648ed314450c8afa48e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11995/7759d6eb08a7e6568691e648ed314450c8afa48e/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
14045,
67,
21026,
12,
2293,
16,
1384,
16,
1800,
4672,
309,
590,
18,
2039,
422,
296,
3798,
4278,
327,
3136,
2668,
4923,
6134,
469,
30,
8191,
273,
9889,
18,
6911,
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,
336,
67,
14045,
67,
21026,
12,
2293,
16,
1384,
16,
1800,
4672,
309,
590,
18,
2039,
422,
296,
3798,
4278,
327,
3136,
2668,
4923,
6134,
469,
30,
8191,
273,
9889,
18,
6911,
18,
1019,
67,
... |
@setting(62, "Start Fast Recording") def start_fast_recording(self, c): """ Start fast recording temperature. Will start recording temperature if not before. """ self.selectedDevice(c).startFastRecording() @setting(63, "Stop Fast Recording") def stop_fast_recording(self, c): """ Stop fast recording temperature. Regular temperature recording will continue. """ self.selectedDevice(c).stopFastRecording() @setting(64, "Recording Status") def recording_status(self, c): """ Returns whether recording, recording fast, or not recording at all. """ dev = self.selectedDevice(c) if dev.state('recordFast'): return "Fast Recording" elif dev.state('recordTemp'): return "Recording" else: return "Not Recording" | @setting(62, "Is Recording") def is_recording(self, c): """ Returns whether recording or not. """ dev = self.selectedDevice(c) return dev.state('recordTemp') | def stop_recording(self, c): """ Stop recording temp. """ self.selectedDevice(c).stopRecording() | ecc133167eefb5fe6d901da9bd5da2284e919371 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7016/ecc133167eefb5fe6d901da9bd5da2284e919371/ADR.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2132,
67,
3366,
310,
12,
2890,
16,
276,
4672,
3536,
5131,
14949,
1906,
18,
3536,
365,
18,
8109,
3654,
12,
71,
2934,
5681,
21037,
1435,
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,
2132,
67,
3366,
310,
12,
2890,
16,
276,
4672,
3536,
5131,
14949,
1906,
18,
3536,
365,
18,
8109,
3654,
12,
71,
2934,
5681,
21037,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if i+1 in ele_pos_map.keys(): | if i in ele_pos_map.keys(): | def gen_seg(self, seg_data, src, err_node_list): """ Find error seg for this segment. Find any skipped error values. ID pos of bad value. @param seg_data: data segment instance """ cur_line = src.cur_line | 4cc131951b2f2d09daaa4f066d42f77d82b8ee10 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11528/4cc131951b2f2d09daaa4f066d42f77d82b8ee10/error_html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
67,
5680,
12,
2890,
16,
2291,
67,
892,
16,
1705,
16,
393,
67,
2159,
67,
1098,
4672,
3536,
4163,
555,
2291,
364,
333,
3267,
18,
4163,
1281,
9700,
555,
924,
18,
1599,
949,
434,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
67,
5680,
12,
2890,
16,
2291,
67,
892,
16,
1705,
16,
393,
67,
2159,
67,
1098,
4672,
3536,
4163,
555,
2291,
364,
333,
3267,
18,
4163,
1281,
9700,
555,
924,
18,
1599,
949,
434,
5... |
def antiphi(self,l): | def antiphi(self, l): | def antiphi(self,l): """ Inverse of self.phi. | 26b5b14a2a46b23848ccefac3b41425cf353e86a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/26b5b14a2a46b23848ccefac3b41425cf353e86a/sr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
392,
14587,
12266,
12,
2890,
16,
328,
4672,
3536,
657,
2476,
434,
365,
18,
9973,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
392,
14587,
12266,
12,
2890,
16,
328,
4672,
3536,
657,
2476,
434,
365,
18,
9973,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
return symmetrica.mult_schur_schur(left, right) | if left and right: return symmetrica.mult_schur_schur(left, right) else: return A._from_dict({}) | def _multiply(self, left, right): """ TESTS: sage: s = SFASchur(QQ) sage: a = s([2,1]) + 1; a s[] + s[2, 1] sage: a^2 # indirect doctest s[] + 2*s[2, 1] + s[2, 2, 1, 1] + s[2, 2, 2] + s[3, 1, 1, 1] + 2*s[3, 2, 1] + s[3, 3] + s[4, 1, 1] + s[4, 2] | 233ac4e2d286fa04c5d23492661deed974684c8c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/233ac4e2d286fa04c5d23492661deed974684c8c/schur.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7027,
1283,
12,
2890,
16,
2002,
16,
2145,
4672,
3536,
22130,
55,
30,
272,
410,
30,
272,
273,
348,
2046,
55,
343,
295,
12,
53,
53,
13,
272,
410,
30,
279,
273,
272,
3816,
22,
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,
389,
7027,
1283,
12,
2890,
16,
2002,
16,
2145,
4672,
3536,
22130,
55,
30,
272,
410,
30,
272,
273,
348,
2046,
55,
343,
295,
12,
53,
53,
13,
272,
410,
30,
279,
273,
272,
3816,
22,
16... |
Factors so far: [] | Proper factors so far: [] | def data_to_list(out, n, time): """ Convert output of Hart's sieve and n to a list and time. INPUT: out -- snapshot of text output of Hart's QuadraticSieve program n -- the integer being factored OUTPUT: list -- proper factors found so far str -- time information """ if time: out = out.strip() w = out.split('\n') for i in range(len(w)): if 'user' in w: break if i < len(w): t = w[i].strip() out = '\n'.join([w[j] for j in range(i)]) else: t = '' else: t = '' Z = sage.rings.integer.Integer i = out.find(':') if i == -1: return [] v = out[i+1:].split() v = list(set([Z(m) for m in v if Z(m) != n])) v.sort() return v, t | 216211ae40b16e6f8b3be4e466b1c580e50edf1b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/216211ae40b16e6f8b3be4e466b1c580e50edf1b/qsieve.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
501,
67,
869,
67,
1098,
12,
659,
16,
290,
16,
813,
4672,
3536,
4037,
876,
434,
670,
485,
1807,
272,
21271,
471,
290,
358,
279,
666,
471,
813,
18,
225,
12943,
30,
596,
1493,
4439,
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,
501,
67,
869,
67,
1098,
12,
659,
16,
290,
16,
813,
4672,
3536,
4037,
876,
434,
670,
485,
1807,
272,
21271,
471,
290,
358,
279,
666,
471,
813,
18,
225,
12943,
30,
596,
1493,
4439,
434... |
extensions.appendExten(self.name, "Queue(%s|Tth)" % self.name) | if self.ring: extensions.appendExten(self.name, "Queue(%s|Tthr)" % self.name) elif self.moh: extensions.appendExten(self.name, "SetMusicOnHold(%s)" % self.moh) extensions.appendExten(self.name, "Queue(%s|Tth)" % self.name) | def createAsteriskConfig(self): needModule("app_queue") needModule("res_monitor") | 9d4de284956523b5f2992f0d750ca7a716400d45 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2627/9d4de284956523b5f2992f0d750ca7a716400d45/cfg_phone_queue.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
37,
8190,
10175,
809,
12,
2890,
4672,
1608,
3120,
2932,
2910,
67,
4000,
7923,
1608,
3120,
2932,
455,
67,
10259,
7923,
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,
752,
37,
8190,
10175,
809,
12,
2890,
4672,
1608,
3120,
2932,
2910,
67,
4000,
7923,
1608,
3120,
2932,
455,
67,
10259,
7923,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
(envraStr, rpmpath) = string.split(line,'=') | (envraStr, rpmpath) = string.split(line, '=') | def HeaderInfoNevralLoad(filename, nevral, serverid): info = [] in_file = open(filename,'r') while 1: in_line = in_file.readline() if in_line == '': break info.append(in_line) in_file.close() for line in info: (envraStr, rpmpath) = string.split(line,'=') (epoch, name, ver, rel, arch) = stripENVRA(envraStr) rpmpath = string.replace(rpmpath, '\n','') if name not in conf.excludes: if conf.pkgpolicy == 'last': nevral.add((name, epoch, ver, rel, arch, rpmpath, serverid), 'a') else: if nevral.exists(name, arch): (e1, v1, r1) = nevral.evr(name, arch) (e2, v2, r2) = (epoch, ver, rel) rc = compareEVR((e1, v1, r1), (e2, v2, r2)) if (rc < 0): # ooo the second one is newer - push it in. nevral.add((name, epoch, ver, rel, arch, rpmpath, serverid), 'a') else: nevral.add((name, epoch, ver, rel, arch, rpmpath, serverid), 'a') | e7852c63a5b8d228ffcaf8685bd9ef2f040a51ef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/e7852c63a5b8d228ffcaf8685bd9ef2f040a51ef/clientStuff.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4304,
966,
6586,
18090,
287,
2563,
12,
3459,
16,
1073,
18090,
287,
16,
1438,
350,
4672,
1123,
273,
5378,
316,
67,
768,
273,
1696,
12,
3459,
11189,
86,
6134,
1323,
404,
30,
316,
67,
136... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4304,
966,
6586,
18090,
287,
2563,
12,
3459,
16,
1073,
18090,
287,
16,
1438,
350,
4672,
1123,
273,
5378,
316,
67,
768,
273,
1696,
12,
3459,
11189,
86,
6134,
1323,
404,
30,
316,
67,
136... |
for line in output.split('\n'): | for line in output.split( '\n' ): | def __parseJobStatus(self,output): """ Parse the output of the glite-ce-job-status """ resultDict = {} ref = '' for line in output.split('\n'): if not line: continue match = re.search('JobID=\[(.*)\]',line) if match and len(match.groups()) == 1: ref = match.group(1) match = re.search('Status.*\[(.*)\]',line) if match and len(match.groups()) == 1: creamStatus = match.group(1) if creamStatus in ['DONE-OK']: resultDict[ref] = 'Done' elif creamStatus in ['DONE-FAILED']: resultDict[ref] = 'Failed' elif creamStatus in ['REGISTERED','PENDING','IDLE']: resultDict[ref] = 'Scheduled' elif creamStatus in ['ABORTED']: resultDict[ref] = 'Aborted' elif creamStatus in ['CANCELLED']: resultDict[ref] = 'Killed' elif creamStatus in ['RUNNING','REALLY-RUNNING']: resultDict[ref] = 'Running' elif creamStatus == 'N/A': resultDict[ref] = 'Unknown' else: resultDict[ref] = creamStatus.capitalize() | 45afa08b7552c5b79d1cfd9cac53e65115f5e15a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/45afa08b7552c5b79d1cfd9cac53e65115f5e15a/CREAMComputingElement.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2670,
23422,
12,
2890,
16,
2844,
4672,
3536,
2884,
326,
876,
434,
326,
5118,
1137,
17,
311,
17,
4688,
17,
2327,
3536,
563,
5014,
273,
2618,
1278,
273,
875,
364,
980,
316,
876,
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,
1001,
2670,
23422,
12,
2890,
16,
2844,
4672,
3536,
2884,
326,
876,
434,
326,
5118,
1137,
17,
311,
17,
4688,
17,
2327,
3536,
563,
5014,
273,
2618,
1278,
273,
875,
364,
980,
316,
876,
18... |
- ``x,m`` - numbers or symbolic expressions. Either m or x-m must be an integer. | - ``x``, ``m`` - numbers or symbolic expressions. Either ``m`` or ``x-m`` must be an integer. | def binomial(x,m): r""" Return the binomial coefficient .. math:: x (x-1) \cdots (x-m+1) / m! which is defined for `m \in \ZZ` and any `x`. We extend this definition to include cases when `x-m` is an integer but `m` is not by binomial(x,m)= binomial(x,x-m) If `m<0` return `0`. INPUT: - ``x,m`` - numbers or symbolic expressions. Either m or x-m must be an integer. OUTPUT: number or symbolic expression (if input is symbolic) EXAMPLES:: sage: binomial(5,2) 10 sage: binomial(2,0) 1 sage: binomial(1/2, 0) 1 sage: binomial(3,-1) 0 sage: binomial(20,10) 184756 sage: binomial(-2, 5) -6 sage: binomial(RealField()('2.5'), 2) 1.87500000000000 sage: n=var('n'); binomial(n,2) 1/2*(n - 1)*n sage: n=var('n'); binomial(n,n) 1 sage: n=var('n'); binomial(n,n-1) n sage: binomial(2^100, 2^100) 1 sage: k, i = var('k,i',ns=1) sage: binomial(k,i) binomial(k,i) TESTS: We test that certain binomials are very fast (this should be instant) -- see trac 3309:: sage: a = binomial(RR(1140000.78), 42000000) """ if not isinstance(m, (int, long, integer.Integer)): try: m = ZZ(x-m) except TypeError: try: return x.binomial(m) except AttributeError: pass raise TypeError, 'Either m or x-m must be an integer' if isinstance(x, (int, long, integer.Integer)): if x >= 0 and (m < 0 or m > x): return ZZ(0) if m > sys.maxint: m = x - m if m > sys.maxint: raise ValueError, "binomial not implemented for m >= 2^32.\nThis is probably OK, since the answer would have billions of digits." return ZZ(pari(x).binomial(m)) try: P = x.parent() except AttributeError: P = type(x) if m < 0: return P(0) # a (hopefully) temporary fix for #3309; eventually Pari should do # this for us. if isinstance(x, (float, sage.rings.real_mpfr.RealNumber, sage.rings.real_mpfr.RealLiteral)): from sage.functions.all import gamma return gamma(x+1)/gamma(P(m+1))/gamma(x-m+1) return misc.prod([x-i for i in xrange(m)]) / P(factorial(m)) | 08206c95546f1db2a947692b19f3ca4ec939d5d9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/08206c95546f1db2a947692b19f3ca4ec939d5d9/arith.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4158,
11496,
12,
92,
16,
81,
4672,
436,
8395,
2000,
326,
4158,
11496,
16554,
225,
6116,
4233,
2866,
225,
619,
261,
92,
17,
21,
13,
521,
4315,
6968,
261,
92,
17,
81,
15,
21,
13,
342,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4158,
11496,
12,
92,
16,
81,
4672,
436,
8395,
2000,
326,
4158,
11496,
16554,
225,
6116,
4233,
2866,
225,
619,
261,
92,
17,
21,
13,
521,
4315,
6968,
261,
92,
17,
81,
15,
21,
13,
342,
... |
_USER = 0 | _USER = None | def login(username, password, host, port, database): global _SOCK, _USER, _USERNAME, _SESSION, _DATABASE, _VIEW_CACHE, SECURE _VIEW_CACHE = {} SECURE = False try: _SEMAPHORE.acquire() try: if _SOCK and (_SOCK.hostname != host or _SOCK.port != port): _SOCK.disconnect() if _SOCK is None: _SOCK = pysocket.PySocket(fingerprints=Fingerprints(), ca_certs=_CA_CERTS) if not _SOCK.connected: _SOCK.connect(host, port) args = (database, username, password, 'common', 'db', 'login') logging.getLogger('rpc.request').info(repr(args)) _SOCK.send(args) res = _SOCK.receive() logging.getLogger('rpc.result').debug(repr(res)) finally: _SEMAPHORE.release() except (socket.error, RuntimeError): try: _SOCK.reconnect() except (socket.error, RuntimeError): pass _USER = 0 _SESSION = '' return -1 if not res: _USER = 0 _SESSION = '' return -2 _USER = res[0] _USERNAME = username _SESSION = res[1] _DATABASE = database SECURE = _SOCK.ssl context_reload() return 1 | d5616e1f3784a444fd7607855fbd4eef4da84ba6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9151/d5616e1f3784a444fd7607855fbd4eef4da84ba6/rpc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3925,
12,
5053,
16,
2201,
16,
1479,
16,
1756,
16,
2063,
4672,
2552,
389,
3584,
3507,
16,
389,
4714,
16,
389,
21292,
16,
389,
7042,
16,
389,
22366,
16,
389,
12145,
67,
8495,
16,
31418,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5053,
16,
2201,
16,
1479,
16,
1756,
16,
2063,
4672,
2552,
389,
3584,
3507,
16,
389,
4714,
16,
389,
21292,
16,
389,
7042,
16,
389,
22366,
16,
389,
12145,
67,
8495,
16,
31418,
... |
raise ExtractError, "fifo not supported by system" | raise ExtractError("fifo not supported by system") | def makefifo(self, tarinfo, targetpath): """Make a fifo called targetpath. """ if hasattr(os, "mkfifo"): os.mkfifo(targetpath) else: raise ExtractError, "fifo not supported by system" | b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
74,
20299,
12,
2890,
16,
8232,
1376,
16,
1018,
803,
4672,
3536,
6464,
279,
284,
20299,
2566,
1018,
803,
18,
3536,
309,
3859,
12,
538,
16,
315,
24816,
74,
20299,
6,
4672,
1140,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
74,
20299,
12,
2890,
16,
8232,
1376,
16,
1018,
803,
4672,
3536,
6464,
279,
284,
20299,
2566,
1018,
803,
18,
3536,
309,
3859,
12,
538,
16,
315,
24816,
74,
20299,
6,
4672,
1140,
18... |
if ch == '\r': | if ch == b'\r': | def __init__(self, ifp): if isinstance(ifp, basestring): ifp = open(ifp) # # Find initial colon. # while 1: ch = ifp.read(1) if not ch: raise Error, "No binhex data found" # Cater for \r\n terminated lines (which show up as \n\r, hence # all lines start with \r) if ch == '\r': continue if ch == ':': break if ch != '\n': dummy = ifp.readline() | 2b5df605d4feb6b9f3d5c2b690131cf85c3b0fed /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/2b5df605d4feb6b9f3d5c2b690131cf85c3b0fed/binhex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
309,
84,
4672,
309,
1549,
12,
430,
84,
16,
10699,
4672,
309,
84,
273,
1696,
12,
430,
84,
13,
468,
468,
4163,
2172,
13336,
18,
468,
1323,
404,
30,
462,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
309,
84,
4672,
309,
1549,
12,
430,
84,
16,
10699,
4672,
309,
84,
273,
1696,
12,
430,
84,
13,
468,
468,
4163,
2172,
13336,
18,
468,
1323,
404,
30,
462,
... |
c = cmp(dict1, dict2) | if random.random() < 0.5: c = cmp(dict1, dict2) else: c = dict1 == dict2 | def test_one(n): global mutate, dict1, dict2, dict1keys, dict2keys # Fill the dicts without mutating them. mutate = 0 dict1keys = fill_dict(dict1, range(n), n) dict2keys = fill_dict(dict2, range(n), n) # Enable mutation, then compare the dicts so long as they have the # same size. mutate = 1 if verbose: print "trying w/ lengths", len(dict1), len(dict2), while dict1 and len(dict1) == len(dict2): if verbose: print ".", c = cmp(dict1, dict2) if verbose: print | f58515b41a9262bdfcfcc36b96da749f5702f21c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f58515b41a9262bdfcfcc36b96da749f5702f21c/test_mutants.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
476,
12,
82,
4672,
2552,
15887,
16,
2065,
21,
16,
2065,
22,
16,
2065,
21,
2452,
16,
2065,
22,
2452,
225,
468,
14192,
326,
15838,
2887,
4318,
1776,
2182,
18,
15887,
273,
374,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
476,
12,
82,
4672,
2552,
15887,
16,
2065,
21,
16,
2065,
22,
16,
2065,
21,
2452,
16,
2065,
22,
2452,
225,
468,
14192,
326,
15838,
2887,
4318,
1776,
2182,
18,
15887,
273,
374,
... |
def openmcastsock(group, port): import string import struct s = socket(AF_INET, SOCK_DGRAM) s.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1) s.bind(('', port)) group = gethostbyname(group) bytes = map(int, string.split(group, ".")) grpaddr = 0 for byte in bytes: grpaddr = (grpaddr << 8) | byte ifaddr = INADDR_ANY mreq = struct.pack('ll', htonl(grpaddr), htonl(ifaddr)) s.setsockopt(IPPROTO_IP, IP_ADD_MEMBERSHIP, mreq) return s main() | if __name__ == '__main__': main() | def receiver(): # Open and initialize the socket s = openmcastsock(MYGROUP, MYPORT) # # Loop, printing any data we receive while 1: data, sender = s.recvfrom(1500) while data[-1:] == '\0': data = data[:-1] # Strip trailing \0's print sender, ':', repr(data) | 6493d788f0e6b96cd7d2ed70e8e39f8b8b7ec8d8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/6493d788f0e6b96cd7d2ed70e8e39f8b8b7ec8d8/mcast.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5971,
13332,
468,
3502,
471,
4046,
326,
2987,
272,
273,
1696,
81,
4155,
15031,
12,
22114,
8468,
16,
22069,
6354,
13,
468,
468,
9720,
16,
19171,
1281,
501,
732,
6798,
1323,
404,
30,
501,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5971,
13332,
468,
3502,
471,
4046,
326,
2987,
272,
273,
1696,
81,
4155,
15031,
12,
22114,
8468,
16,
22069,
6354,
13,
468,
468,
9720,
16,
19171,
1281,
501,
732,
6798,
1323,
404,
30,
501,
... |
langlinks=False): | langlinks=False): | def preloadpages(self, pagelist, groupsize=50, templates=False, langlinks=False): """Return a generator to a list of preloaded pages. | 1571bf2f69d49fbc62f297642bbea030e1229fd0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9005/1571bf2f69d49fbc62f297642bbea030e1229fd0/site.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20941,
7267,
12,
2890,
16,
4262,
5449,
16,
1041,
1467,
33,
3361,
16,
5539,
33,
8381,
16,
3303,
7135,
33,
8381,
4672,
3536,
990,
279,
4456,
358,
279,
666,
434,
675,
4230,
4689,
18,
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,
20941,
7267,
12,
2890,
16,
4262,
5449,
16,
1041,
1467,
33,
3361,
16,
5539,
33,
8381,
16,
3303,
7135,
33,
8381,
4672,
3536,
990,
279,
4456,
358,
279,
666,
434,
675,
4230,
4689,
18,
2,
... |
base_url = self.GetAbsoluteScriptURL(name) | base_url = self.GetScriptURL(name, relative=1) | def FormatFormStart(self, name, extra=''): | f32670e904a3c18d331b6aa37d5f7583a903f24e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/f32670e904a3c18d331b6aa37d5f7583a903f24e/HTMLFormatter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4077,
1204,
1685,
12,
2890,
16,
508,
16,
2870,
2218,
11,
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,
... | [
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,
4077,
1204,
1685,
12,
2890,
16,
508,
16,
2870,
2218,
11,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
header_locale = "res_index:table(nofallback) {\n CLDRVersion { " header_locale += CLDR_VERSION + " }\n InstalledLocales {\n" header = "res_index:table(nofallback) {\nInstalledLocales {\n" footer = " }\n}" empty_value = " {\"\"}\n" locale_index = open(os.path.join(TMP_DAT_PATH, res_index), "w") locale_index.write(header_locale) brkitr_index = open(os.path.join(TMP_DAT_PATH, "brkitr", res_index), "w") brkitr_index.write(header) coll_index = open(os.path.join(TMP_DAT_PATH, "coll", res_index), "w") coll_index.write(header) rbnf_index = open(os.path.join(TMP_DAT_PATH, "rbnf", res_index), "w") rbnf_index.write(header) | locales = set() brkitrs = set() colls = set() rbnfs = set() | def GenResIndex(dat_list_file_path): res_index = "res_index.txt" header_locale = "res_index:table(nofallback) {\n CLDRVersion { " header_locale += CLDR_VERSION + " }\n InstalledLocales {\n" header = "res_index:table(nofallback) {\nInstalledLocales {\n" footer = " }\n}" empty_value = " {\"\"}\n" # key-value pair for all locale entries locale_index = open(os.path.join(TMP_DAT_PATH, res_index), "w") locale_index.write(header_locale) brkitr_index = open(os.path.join(TMP_DAT_PATH, "brkitr", res_index), "w") brkitr_index.write(header) coll_index = open(os.path.join(TMP_DAT_PATH, "coll", res_index), "w") coll_index.write(header) rbnf_index = open(os.path.join(TMP_DAT_PATH, "rbnf", res_index), "w") rbnf_index.write(header) for line in open(dat_list_file_path, "r"): if line.find("root.") >= 0: continue if line.find("res_index") >= 0: continue if line.find("_.res") >= 0: continue; start = line.find("brkitr/") if start >= 0: end = line.find(".res") if end > 0: brkitr_index.write(line[line.find("/")+1:end] + empty_value) elif line.find("coll/") >= 0: start = line.find("coll/") end = line.find(".res") if end > 0: coll_index.write(line[line.find("/")+1:end] + empty_value) elif line.find("rbnf/") >= 0: start = line.find("rbnf/") end = line.find(".res") if end > 0: rbnf_index.write(line[line.find("/")+1:end] + empty_value) elif line.find(".res") >= 0: # We need to determine the resource is locale resource or misc resource. # To determine the locale resource, we assume max script length is 3. end = line.find(".res") if end <= 3: locale_index.write(line[:end] + empty_value) elif line.find("_") <= 3: if line.find("_") > 0: locale_index.write(line[:end] + empty_value) locale_index.write(footer) brkitr_index.write(footer) coll_index.write(footer) rbnf_index.write(footer) locale_index.close() brkitr_index.close() coll_index.close() rbnf_index.close() # Call genrb to generate new res_index.res. InvokeIcuTool("genrb", TMP_DAT_PATH, [res_index]) InvokeIcuTool("genrb", os.path.join(TMP_DAT_PATH, "brkitr"), [res_index]) InvokeIcuTool("genrb", os.path.join(TMP_DAT_PATH, "coll"), [res_index]) InvokeIcuTool("genrb", os.path.join(TMP_DAT_PATH, "rbnf"), [res_index]) | e8aab5e9f14e1c3a670fbea64057a2a5f5c35245 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10672/e8aab5e9f14e1c3a670fbea64057a2a5f5c35245/icu_dat_generator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10938,
607,
1016,
12,
3404,
67,
1098,
67,
768,
67,
803,
4672,
400,
67,
1615,
273,
315,
455,
67,
1615,
18,
5830,
6,
1446,
67,
6339,
273,
315,
455,
67,
1615,
30,
2121,
12,
82,
792,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10938,
607,
1016,
12,
3404,
67,
1098,
67,
768,
67,
803,
4672,
400,
67,
1615,
273,
315,
455,
67,
1615,
18,
5830,
6,
1446,
67,
6339,
273,
315,
455,
67,
1615,
30,
2121,
12,
82,
792,
7... |
sage.ext.sig.get_bad_sigs() | def my_sigfpe(x, n): sage.ext.sig.get_bad_sigs() raise RuntimeError, "A floating point exception occured." | a6685bba5d2c8cc8a971c49bb2cf9c20713773f9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/a6685bba5d2c8cc8a971c49bb2cf9c20713773f9/get_sigs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3399,
67,
7340,
74,
347,
12,
92,
16,
290,
4672,
1002,
7265,
16,
315,
37,
13861,
1634,
1520,
16206,
1199,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3399,
67,
7340,
74,
347,
12,
92,
16,
290,
4672,
1002,
7265,
16,
315,
37,
13861,
1634,
1520,
16206,
1199,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
if e[0] == EINTR: | if e.args[0] == EINTR: | def read(self, size=-1): # Use max, disallow tiny reads in a loop as they are very inefficient. # We never leave read() with any leftover data from a new recv() call # in our internal buffer. rbufsize = max(self._rbufsize, self.default_bufsize) # Our use of StringIO rather than lists of string objects returned by # recv() minimizes memory usage and fragmentation that occurs when # rbufsize is large compared to the typical return value of recv(). buf = self._rbuf buf.seek(0, 2) # seek end if size < 0: # Read until EOF self._rbuf = StringIO() # reset _rbuf. we consume it via buf. while True: try: data = self._sock.recv(rbufsize) except error, e: if e[0] == EINTR: continue raise if not data: break buf.write(data) return buf.getvalue() else: # Read until size bytes or EOF seen, whichever comes first buf_len = buf.tell() if buf_len >= size: # Already have size bytes in our buffer? Extract and return. buf.seek(0) rv = buf.read(size) self._rbuf = StringIO() self._rbuf.write(buf.read()) return rv | b661b1d30c84d146ce4883fd0a1ad27952a5aead /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/b661b1d30c84d146ce4883fd0a1ad27952a5aead/socket.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
963,
29711,
21,
4672,
468,
2672,
943,
16,
29176,
24405,
6838,
316,
279,
2798,
487,
2898,
854,
8572,
316,
25403,
18,
468,
1660,
5903,
8851,
855,
1435,
598,
1281,
29709,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
2890,
16,
963,
29711,
21,
4672,
468,
2672,
943,
16,
29176,
24405,
6838,
316,
279,
2798,
487,
2898,
854,
8572,
316,
25403,
18,
468,
1660,
5903,
8851,
855,
1435,
598,
1281,
29709,... |
if to_location: to_location = to_location[0] | def default_unit_price_required(self, cursor, user, context=None): from_location = self.default_from_location(cursor, user, context=context) if from_location: from_location = from_location[0] to_location = self.default_to_location(cursor,user, context=context) if to_location: to_location = to_location[0] vals = { 'from_location': from_location, 'to_location': to_location, } return self.on_change_with_unit_price_required(cursor, user, [], vals, context=context) | ba472c4f0d51f793137375955a51ac9d1128f54c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9298/ba472c4f0d51f793137375955a51ac9d1128f54c/move.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
805,
67,
4873,
67,
8694,
67,
4718,
12,
2890,
16,
3347,
16,
729,
16,
819,
33,
7036,
4672,
628,
67,
3562,
273,
365,
18,
1886,
67,
2080,
67,
3562,
12,
9216,
16,
729,
16,
819,
33,
2472... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
805,
67,
4873,
67,
8694,
67,
4718,
12,
2890,
16,
3347,
16,
729,
16,
819,
33,
7036,
4672,
628,
67,
3562,
273,
365,
18,
1886,
67,
2080,
67,
3562,
12,
9216,
16,
729,
16,
819,
33,
2472... | |
print "!!! update.fetches=" + str(extraFetches) | def update(reps, extraFetches={}, dbindex = None, force=False): '''Update a list of *reps* within the workspace. The update will either sync with a source rep repository if the project is present in *srcTop* or will install a new binary package through the local package manager. *extraFetches* is a list of extra files to fetch from the remote machine, usually a list of compressed source tar files.''' print "!!! update.fetches=" + str(extraFetches) if not dbindex: dbindex = index dbindex.validate(force) handler = Unserializer(reps) dbindex.parse(handler) if len(extraFetches) > 0: fetch(extraFetches) # If an error occurs, at least save previously configured variables. context.save() for name in reps: # The project is present in *srcTop*, so we will update the source # code from a repository. rep = handler.asProject(name).repository if not rep: rep = handler.asProject(name).patch if rep: # Not every project is made a first-class citizen. If there are # no rep structure for a project, it must depend on a project # that does in order to have a source repled repository. # This is a simple way to specify inter-related projects # with complex dependency set and barely any code. writetext('######## updating project ' + name + '...\n') # \todo We do not propagate force= here to avoid messing up # the local checkouts on pubUpdate() rep.update(name,context) else: writetext('warning: ' + name + ' is not a project under source control. It is most likely a psuedo-project and will be updated through an "update recurse" command.\n') | 021d0af4493896ff6811cfbbd2baaa38effbe930 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1360/021d0af4493896ff6811cfbbd2baaa38effbe930/dws.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
266,
1121,
16,
2870,
14288,
28793,
1319,
1615,
273,
599,
16,
2944,
33,
8381,
4672,
9163,
1891,
279,
666,
434,
380,
266,
1121,
14,
3470,
326,
6003,
18,
1021,
1089,
903,
3344,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1089,
12,
266,
1121,
16,
2870,
14288,
28793,
1319,
1615,
273,
599,
16,
2944,
33,
8381,
4672,
9163,
1891,
279,
666,
434,
380,
266,
1121,
14,
3470,
326,
6003,
18,
1021,
1089,
903,
3344,
... | |
self.setRoles(['Owner',]) self.assertFalse( getSecurityManager().checkPermission( "Modify portal content", self.portal.docs.doc1 )) | self.setRoles(['Owner',]) | def test_workflowState( self ): # ensure baseline workflow state is retained on checkin, including security | feada1eb4a33a4943e5ab5cd43024d6396b3b804 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12223/feada1eb4a33a4943e5ab5cd43024d6396b3b804/test_iterate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
13815,
1119,
12,
365,
262,
30,
468,
3387,
14243,
6095,
919,
353,
25227,
603,
866,
267,
16,
6508,
4373,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
13815,
1119,
12,
365,
262,
30,
468,
3387,
14243,
6095,
919,
353,
25227,
603,
866,
267,
16,
6508,
4373,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
getPrincipal = zapi.principals().getPrincipal | getPrincipal = getUtility(IAuthentication).getPrincipal | def _groupsFor(self, principal): groups = self._cache.get(principal.id) if groups is None: groups = getattr(principal, 'groups', ()) if groups: getPrincipal = zapi.principals().getPrincipal groups = self._findGroupsFor(principal, getPrincipal, []) else: groups = () | f0218125d6bba9de7632c743b5da7ad1ed34b816 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9751/f0218125d6bba9de7632c743b5da7ad1ed34b816/zopepolicy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4650,
1290,
12,
2890,
16,
8897,
4672,
3252,
273,
365,
6315,
2493,
18,
588,
12,
26138,
18,
350,
13,
309,
3252,
353,
599,
30,
3252,
273,
3869,
12,
26138,
16,
296,
4650,
2187,
1832,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4650,
1290,
12,
2890,
16,
8897,
4672,
3252,
273,
365,
6315,
2493,
18,
588,
12,
26138,
18,
350,
13,
309,
3252,
353,
599,
30,
3252,
273,
3869,
12,
26138,
16,
296,
4650,
2187,
1832,
... |
bug_fetched = 1 | bug_fetched = True | def abc(request, response, func=find_first_match): '''Get items from the request Queue, process them with func(), put the results along with the Thread's name into the response Queue. Stop running when item is None.''' #while 1: #tuple_item_key = request.get() #if tuple_item_key is None: # break #(key, item) = tuple_item_key (key, item) = request #INFO: Everything (url, file, download_size, checksum) = stripper(item) thread_name = threading.currentThread().getName() log.verbose("Thread is %s\n" % (thread_name) ) if url.endswith(".deb"): try: PackageName = file.split("_")[0] except IndexError: log.err("Not getting a package name here is problematic. Better bail out.\n") sys.exit(1) #INFO: For Package version, we don't want to fail try: PackageVersion = file.split("_")[1] except IndexError: PackageVersion = "NA" log.verbose("Weird!! Package version not present. Is it really a deb file?\n") #INFO: find_first_match() returns False or a file name with absolute path full_file_path = func(Str_CacheDir, file) #INFO: If we find the file in the local Str_CacheDir, we'll execute this block. if full_file_path != False: # We'll first check for its md5 checksum if Bool_DisableMD5Check is False: if FetcherInstance.CheckHashDigest(full_file_path, checksum) is True: log.verbose("Checksum correct for package %s.%s\n" % (PackageName, LINE_OVERWRITE_FULL) ) if Bool_BugReports: bug_fetched = 0 log.verbose("Fetching bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_FULL) ) if FetchBugReportsDebian.FetchBugsDebian(PackageName) in [1,2]: log.verbose("Fetched bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_FULL) ) bug_fetched = 1 else: log.verbose("Couldn't fetch bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_MID) ) if Str_BundleFile: if FetcherInstance.compress_the_file(Str_BundleFile, full_file_path) is True: log.success("%s copied from local cache directory %s.%s\n" % (PackageName, Str_CacheDir, LINE_OVERWRITE_MID) ) else: log.err("Couldn't add %s to archive %s.%s\n" % (file, Str_BundleFile, LINE_OVERWRITE_MID) ) sys.exit(1) #INFO: If no zip option enabled, simply copy the downloaded package file # along with the downloaded bug reports. else: try: shutil.copy(full_file_path, Str_DownloadDir) log.success("%s copied from local cache directory %s.%s\n" % (PackageName, Str_CacheDir, LINE_OVERWRITE_MID) ) except shutil.Error: log.verbose("%s already available in %s. Skipping copy!!!%s\n" % (file, Str_DownloadDir, LINE_OVERWRITE_MID) ) if bug_fetched == 1: for x in os.listdir(os.curdir): if (x.startswith(PackageName) and x.endswith(apt_bug_file_format) ): shutil.move(x, Str_DownloadDir) log.verbose("Moved %s file to %s folder.%s\n" % (x, Str_DownloadDir, LINE_OVERWRITE_FULL) ) #INFO: Damn!! The md5chesum didn't match :-( # The file is corrupted and we need to download a new copy from the internet else: log.verbose("%s checksum mismatch. Skipping file.%s\n" % (file, LINE_OVERWRITE_FULL) ) log.msg("Downloading %s - %s %s\n" % (PackageName, log.calcSize(download_size/1024), LINE_OVERWRITE_MID) ) if FetcherInstance.download_from_web(url, file, Str_DownloadDir) == True: log.success("\r%s done.%s\n" % (PackageName, LINE_OVERWRITE_FULL) ) #Add to Str_CacheDir if possible if Str_CacheDir and os.access(Str_CacheDir, os.W_OK) == True: try: shutil.copy(file, Str_CacheDir) log.verbose("%s copied to local cache directory %s.%s\n" % (file, Str_CacheDir, LINE_OVERWRITE_MID) ) except shutil.Error: log.verbose("Couldn't copy %s to %s.%s\n" % (file, Str_CacheDir, LINE_OVERWRITE_FULL) ) else: log.verbose("cache_dir %s is not writeable. Skipping copy to it.\n" % (Str_CacheDir) ) #Fetch bug reports if Bool_BugReports: log.verbose("Fetching bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_MID) ) if FetchBugReportsDebian.FetchBugsDebian( PackageName ) in [1, 2]: log.verbose( "Fetched bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) else: log.verbose( "Couldn't fetch bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) if Str_BundleFile: if FetcherInstance.compress_the_file( Str_BundleFile, file ) != True: log.err( "Couldn't archive %s to file %s.%s\n" % ( file, Str_BundleFile, LINE_OVERWRITE_SMALL ) ) sys.exit( 1 ) else: log.verbose( "%s added to archive %s.%s\n" % ( file, Str_BundleFile, LINE_OVERWRITE_SMALL ) ) os.unlink( os.path.join( Str_DownloadDir, file ) ) #INFO: You're and idiot. # You should NOT disable md5checksum for any files else: if Bool_BugReports: bug_fetched = 0 log.verbose("Fetching bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_MID) ) if FetchBugReportsDebian.FetchBugsDebian( PackageName ) in [1, 2]: log.verbose( "Fetched bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) bug_fetched = 1 else: log.verbose( "Couldn't fetch bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) #FIXME: Don't know why this was really required. If this has no changes, delete it. #file = full_file_path.split("/") #file = file[len(file) - 1] #file = download_path + "/" + file if Str_BundleFile: if FetcherInstance.compress_the_file( Str_BundleFile, file ) != True: log.err( "Couldn't archive %s to file %s.%s\n" % ( file, Str_BundleFile, LINE_OVERWRITE_SMALL ) ) sys.exit( 1 ) else: log.verbose( "%s added to archive %s.%s\n" % ( file, Str_BundleFile, LINE_OVERWRITE_SMALL ) ) os.unlink( os.path.join( Str_DownloadDir, file ) ) else: # Since zip file option is not enabled let's copy the file to the target folder try: shutil.copy( full_file_path, Str_DownloadDir ) log.success( "%s copied from local cache directory %s.%s\n" % ( file, Str_CacheDir, LINE_OVERWRITE_SMALL ) ) except shutil.Error: log.verbose( "%s already available in dest_dir. Skipping copy!!!%s\n" % ( file, LINE_OVERWRITE_SMALL ) ) # And also the bug reports if bug_fetched == 1: for x in os.listdir( os.curdir ): if ( x.startswith( PackageName ) and x.endswith( apt_bug_file_format ) ): shutil.move( x, Str_DownloadDir ) log.verbose( "Moved %s file to %s folder.%s\n" % ( x, Str_DownloadDir, LINE_OVERWRITE_MID ) ) else: #INFO: This block gets executed if the file is not found in local Str_CacheDir or Str_CacheDir is None # We go ahead and try to download it from the internet log.verbose( "%s not available in local cache %s.%s\n" % ( file, Str_CacheDir, LINE_OVERWRITE_MID ) ) log.msg( "Downloading %s %s - %s %s\n" % ( PackageName, PackageVersion, log.calcSize( download_size / 1024 ), LINE_OVERWRITE_MID ) ) if FetcherInstance.download_from_web( url, file, Str_DownloadDir ) == True: #INFO: This block gets executed if md5checksum is allowed if Bool_DisableMD5Check is False: #INFO: Debian moved to SHA256. So we use that now. Older systems could have md5 log.verbose( "File %s has checksum %s\n" % ( file, checksum ) ) if FetcherInstance.CheckHashDigest( file, checksum ) is True: if Str_CacheDir and os.access( Str_CacheDir, os.W_OK ) == True: try: shutil.copy( file, Str_CacheDir ) log.verbose( "%s copied to local cache directory %s.%s\n" % ( file, Str_CacheDir, LINE_OVERWRITE_MID ) ) except shutil.Error: log.verbose( "%s already available in %s. Skipping copy!!!%s\n" % ( file, Str_CacheDir, LINE_OVERWRITE_MID ) ) else: log.verbose( "Str_CacheDir %s is not writeable. Skipping copy to it.\n" % ( Str_CacheDir ) ) if Bool_BugReports: log.verbose("Fetching bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_MID) ) if FetchBugReportsDebian.FetchBugsDebian( PackageName ) in [1, 2]: log.verbose( "Fetched bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) else: log.verbose( "Couldn't fetch bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) if Str_BundleFile: if FetcherInstance.compress_the_file( Str_BundleFile, file ) != True: log.err( "Couldn't archive %s to file %s.%s\n" % ( file, Str_BundleFile, LINE_OVERWRITE_SMALL ) ) sys.exit( 1 ) else: log.verbose( "%s added to archive %s.%s\n" % ( file, Str_BundleFile, LINE_OVERWRITE_SMALL ) ) os.unlink( os.path.join( Str_DownloadDir, file ) ) log.success( "\r%s %s done.%s\n" % ( PackageName, PackageVersion, LINE_OVERWRITE_FULL ) ) else: #INFO MD5 Checksum is incorrect. log.err( "%s Checksum mismatch.\n" % ( PackageName ) ) errlist.append( PackageName ) else: if Bool_BugReports: log.verbose("Fetching bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_MID) ) if FetchBugReportsDebian.FetchBugsDebian( PackageName ) in [1, 2]: log.verbose( "Fetched bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) else: log.verbose( "Couldn't fetch bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) if Str_BundleFile: if FetcherInstance.compress_the_file( Str_BundleFile, file ) != True: log.err( "Couldn't archive %s to file %s.%s\n" % ( file, Str_BundleFile, LINE_OVERWRITE_SMALL ) ) sys.exit( 1 ) else: log.verbose( "%s added to archive %s.%s\n" % ( file, Str_BundleFile, LINE_OVERWRITE_SMALL ) ) os.unlink( os.path.join( Str_DownloadDir, file ) ) log.success( "\r%s %s done.%s\n" % ( PackageName, PackageVersion, LINE_OVERWRITE_FULL ) ) else: errlist.append( PackageName ) else: #INFO: We are a package update PackageName = url log.msg("Downloading %s.%s\n" % (PackageName, LINE_OVERWRITE_MID) ) if FetcherInstance.download_from_web(url, file, Str_DownloadDir) == True: log.success("\r%s done.%s\n" % (PackageName, LINE_OVERWRITE_FULL) ) if Str_BundleFile: if FetcherInstance.compress_the_file(Str_BundleFile, file) != True: log.err("Couldn't archive %s to file %s.%s\n" % (file, Str_BundleFile, LINE_OVERWRITE_MID) ) sys.exit(1) else: log.verbose("%s added to archive %s.%s\n" % (file, Str_BundleFile, LINE_OVERWRITE_FULL) ) os.unlink(os.path.join(Str_DownloadDir, file) ) else: errlist.append(url) | e22d300894f4558c7d16636d6d8bd6a166b03adf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12499/e22d300894f4558c7d16636d6d8bd6a166b03adf/AptOfflineCoreLib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20011,
12,
2293,
16,
766,
16,
1326,
33,
4720,
67,
3645,
67,
1916,
4672,
9163,
967,
1516,
628,
326,
590,
7530,
16,
1207,
2182,
598,
1326,
9334,
1378,
326,
1686,
7563,
598,
326,
4884,
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,
20011,
12,
2293,
16,
766,
16,
1326,
33,
4720,
67,
3645,
67,
1916,
4672,
9163,
967,
1516,
628,
326,
590,
7530,
16,
1207,
2182,
598,
1326,
9334,
1378,
326,
1686,
7563,
598,
326,
4884,
18... |
(uid, gid, pid) = self.GetContext() tsumufs.cacheManager.access(uid, path, os.W_OK) | context = self.GetContext() tsumufs.cacheManager.access(context['uid'], path, os.W_OK) | def truncate(self, path, size=None): ''' Truncate a file to zero length. | c3478d05944e6e6bef9ad5c70ada99c0c43c2db1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10739/c3478d05944e6e6bef9ad5c70ada99c0c43c2db1/fusethread.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10310,
12,
2890,
16,
589,
16,
963,
33,
7036,
4672,
9163,
25869,
279,
585,
358,
3634,
769,
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,... | [
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10310,
12,
2890,
16,
589,
16,
963,
33,
7036,
4672,
9163,
25869,
279,
585,
358,
3634,
769,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
temp['record'] = print_record(recIDs[irec], format, ot, ln, search_pattern=search_pattern, uid=uid) | temp['record'] = print_record(recIDs[irec], format, ot, ln, search_pattern=search_pattern, uid=uid, verbose=verbose) | def print_records(req, recIDs, jrec=1, rg=10, format='hb', ot='', ln=cdslang, relevances=[], relevances_prologue="(", relevances_epilogue="%%)", decompress=zlib.decompress, search_pattern='', print_records_prologue_p=True, print_records_epilogue_p=True): """ Prints list of records 'recIDs' formatted accoding to 'format' in groups of 'rg' starting from 'jrec'. Assumes that the input list 'recIDs' is sorted in reverse order, so it counts records from tail to head. A value of 'rg=-9999' means to print all records: to be used with care. Print also list of RELEVANCES for each record (if defined), in between RELEVANCE_PROLOGUE and RELEVANCE_EPILOGUE. Print prologue and/or epilogue specific to 'format' if 'print_records_prologue_p' and/or print_records_epilogue_p' are True. """ # load the right message language _ = gettext_set_language(ln) # sanity checking: if req is None: return # get user id (for formatting based on priviledge) uid = getUid(req) if len(recIDs): nb_found = len(recIDs) if rg == -9999: # print all records rg = nb_found else: rg = abs(rg) if jrec < 1: # sanity checks jrec = 1 if jrec > nb_found: jrec = max(nb_found-rg+1, 1) # will print records from irec_max to irec_min excluded: irec_max = nb_found - jrec irec_min = nb_found - jrec - rg if irec_min < 0: irec_min = -1 if irec_max >= nb_found: irec_max = nb_found - 1 #req.write("%s:%d-%d" % (recIDs, irec_min, irec_max)) if format.startswith('x'): # print header if needed if print_records_prologue_p: print_records_prologue(req, format) # print records recIDs_to_print = [recIDs[x] for x in range(irec_max, irec_min, -1)] req.write(format_records(recIDs_to_print, format, ln=ln, search_pattern=search_pattern, record_separator="\n", uid=uid)) # print footer if needed if print_records_epilogue_p: print_records_epilogue(req, format) elif format.startswith('t') or str(format[0:3]).isdigit(): # we are doing plain text output: for irec in range(irec_max, irec_min, -1): x = print_record(recIDs[irec], format, ot, ln, search_pattern=search_pattern, uid=uid) req.write(x) if x: req.write('\n') elif format == 'excel': recIDs_to_print = [recIDs[x] for x in range(irec_max, irec_min, -1)] create_excel(recIDs=recIDs_to_print, req=req, ln=ln) else: # we are doing HTML output: if format == 'hp' or format.startswith("hb_") or format.startswith("hd_"): # portfolio and on-the-fly formats: for irec in range(irec_max, irec_min, -1): req.write(print_record(recIDs[irec], format, ot, ln, search_pattern=search_pattern, uid=uid)) elif format.startswith("hb"): # HTML brief format: rows = [] for irec in range(irec_max, irec_min, -1): temp = { 'number' : jrec+irec_max-irec, 'recid' : recIDs[irec], } if relevances and relevances[irec]: temp['relevance'] = relevances[irec] else: temp['relevance'] = '' temp['record'] = print_record(recIDs[irec], format, ot, ln, search_pattern=search_pattern, uid=uid) rows.append(temp) req.write(websearch_templates.tmpl_records_format_htmlbrief( ln = ln, weburl = weburl, rows = rows, relevances_prologue = relevances_prologue, relevances_epilogue = relevances_epilogue, )) else: # HTML detailed format: # print other formatting choices: rows = [] for irec in range(irec_max, irec_min, -1): temp = { 'record' : print_record(recIDs[irec], format, ot, ln, search_pattern=search_pattern, uid=uid), 'recid' : recIDs[irec], 'creationdate': '', 'modifydate' : '', } if record_exists(recIDs[irec])==1: temp['creationdate'] = get_creation_date(recIDs[irec]) temp['modifydate'] = get_modification_date(recIDs[irec]) if CFG_EXPERIMENTAL_FEATURES: r = calculate_cited_by_list(recIDs[irec]) if r: temp ['citinglist'] = r temp ['citationhistory'] = create_citation_history_graph_and_box(recIDs[irec], ln) r = calculate_co_cited_with_list(recIDs[irec]) if r: temp ['cociting'] = r if CFG_BIBRANK_SHOW_DOWNLOAD_GRAPHS: r = calculate_reading_similarity_list(recIDs[irec], "downloads") if r: temp ['downloadsimilarity'] = r temp ['downloadhistory'] = create_download_history_graph_and_box(recIDs[irec], ln) # Get comments and reviews for this record if exist # FIXME: templatize me if CFG_WEBCOMMENT_ALLOW_COMMENTS or CFG_WEBCOMMENT_ALLOW_REVIEWS: from invenio.webcomment import get_first_comments_or_remarks (comments, reviews) = get_first_comments_or_remarks(recID=recIDs[irec], ln=ln, nb_comments=CFG_WEBCOMMENT_NB_COMMENTS_IN_DETAILED_VIEW, nb_reviews=CFG_WEBCOMMENT_NB_REVIEWS_IN_DETAILED_VIEW) temp['comments'] = comments temp['reviews'] = reviews r = calculate_reading_similarity_list(recIDs[irec], "pageviews") if r: temp ['viewsimilarity'] = r rows.append(temp) req.write(websearch_templates.tmpl_records_format_other( ln = ln, weburl = weburl, url_argd = req.argd, rows = rows, format = format, )) else: print_warning(req, _("Use different search terms.")) | 845a99c9c5de9c5d99d06ec25bc8f5be515522e8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/845a99c9c5de9c5d99d06ec25bc8f5be515522e8/search_engine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
7094,
12,
3658,
16,
1950,
5103,
16,
525,
3927,
33,
21,
16,
14524,
33,
2163,
16,
740,
2218,
76,
70,
2187,
15835,
2218,
2187,
7211,
33,
4315,
2069,
539,
16,
6707,
90,
6872,
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,
1172,
67,
7094,
12,
3658,
16,
1950,
5103,
16,
525,
3927,
33,
21,
16,
14524,
33,
2163,
16,
740,
2218,
76,
70,
2187,
15835,
2218,
2187,
7211,
33,
4315,
2069,
539,
16,
6707,
90,
6872,
2... |
pkt.time = arch.get_last_packet_timestamp(self.ins) | pkt.time = get_last_packet_timestamp(self.ins) | def recv(self, x): pkt, sa_ll = self.ins.recvfrom(x) if sa_ll[2] == socket.PACKET_OUTGOING: return None if sa_ll[3] in conf.l2types: cls = conf.l2types[sa_ll[3]] lvl = 2 elif sa_ll[1] in conf.l3types: cls = conf.l3types[sa_ll[1]] lvl = 3 else: cls = conf.default_l2 warning("Unable to guess type (interface=%s protocol=%#x family=%i). Using %s" % (sa_ll[0],sa_ll[1],sa_ll[3],cls.name)) lvl = 2 | 14c74c45cca1c3048391b67bd41fd3df4f699bde /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7311/14c74c45cca1c3048391b67bd41fd3df4f699bde/linux.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10665,
12,
2890,
16,
619,
4672,
11536,
16,
7864,
67,
2906,
273,
365,
18,
2679,
18,
18334,
2080,
12,
92,
13,
309,
7864,
67,
2906,
63,
22,
65,
422,
2987,
18,
12231,
1584,
67,
5069,
163... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10665,
12,
2890,
16,
619,
4672,
11536,
16,
7864,
67,
2906,
273,
365,
18,
2679,
18,
18334,
2080,
12,
92,
13,
309,
7864,
67,
2906,
63,
22,
65,
422,
2987,
18,
12231,
1584,
67,
5069,
163... |
if progress_callback: progress_callback(filename) | def _write_css(self, directory, progress_callback, cssname): """ Write the CSS stylesheet to the given file. If C{self._css} contains a stylesheet file or name (from L{epydoc.css}), then use that stylesheet; otherwise, if a stylesheet file already exists, use that stylesheet. Otherwise, use the default stylesheet. | 21a6d8c30a29a133335836c07a6da6e2f0b95f2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/21a6d8c30a29a133335836c07a6da6e2f0b95f2a/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2626,
67,
5212,
12,
2890,
16,
1867,
16,
4007,
67,
3394,
16,
3747,
529,
4672,
3536,
2598,
326,
6765,
13820,
358,
326,
864,
585,
18,
225,
971,
385,
95,
2890,
6315,
5212,
97,
1914,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2626,
67,
5212,
12,
2890,
16,
1867,
16,
4007,
67,
3394,
16,
3747,
529,
4672,
3536,
2598,
326,
6765,
13820,
358,
326,
864,
585,
18,
225,
971,
385,
95,
2890,
6315,
5212,
97,
1914,
... | |
if unmergedDs['MergedLFNBase'] != None: if fileInfo['Size'] >= self.taskAttrs['MinMergeFileSize']: mergeModLabel = "%s-Merged" % outModLabel ds = datasetMap.get(mergeModLabel, None) if ds != None: outModLabel = mergeModLabel fileInfo['MergedBySize'] = "True" fileInfo['MergedLFNBase'] = unmergedDs['MergedLFNBase'] msg = "File Associated to Merge Output based on size:\n" msg += " %s\n Size = %s\n" % (fileInfo['LFN'], fileInfo['Size']) print msg | if unmergedDs is not None: if unmergedDs['MergedLFNBase'] != None: if fileInfo['Size'] >= self.taskAttrs['MinMergeFileSize']: mergeModLabel = "%s-Merged" % outModLabel ds = datasetMap.get(mergeModLabel, None) if ds != None: outModLabel = mergeModLabel fileInfo['MergedBySize'] = "True" fileInfo['MergedLFNBase'] = unmergedDs['MergedLFNBase'] msg = "File Associated to Merge Output based on size:\n" msg += " %s\n Size = %s\n" % (fileInfo['LFN'], fileInfo['Size']) print msg else: print "File is smaller than %s" % self.taskAttrs['MinMergeFileSize'] | def matchDataset(self, fileInfo, datasetMap): """ _matchDataset_ | eb4bec93f4446a3985de3a2d969ee7e7f5285e78 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8886/eb4bec93f4446a3985de3a2d969ee7e7f5285e78/TaskState.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
845,
10656,
12,
2890,
16,
12538,
16,
3709,
863,
4672,
3536,
389,
1916,
10656,
67,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
845,
10656,
12,
2890,
16,
12538,
16,
3709,
863,
4672,
3536,
389,
1916,
10656,
67,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.