rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
assert self.printInterests() | assert self.printInterestsIfDebug() | def removeInterest(self, contextId, event=None): """ Stop looking in a zone """ assert self.notify.debugCall() answer = 0 if DoInterestManager._interests.has_key(contextId): if event is not None: DoInterestManager._interestIdScopes += 1 DoInterestManager._interests[contextId][3] = "PendingDel" DoInterestManager._interests[contextId][2] = event DoInterestManager._interests[contextId][1] = DoInterestManager._interestIdScopes self._sendRemoveInterest(contextId) else: DoInterestManager._interests[contextId][2] = None DoInterestManager._interests[contextId][1] = 0 self._sendRemoveInterest(contextId) del DoInterestManager._interests[contextId] answer = 1 else: self.notify.warning("removeInterest: contextId not found: %s" % (contextId)) assert self.printInterests() return answer | 89775fc9c26f3ea3b58b50241e39dc1220ecbcf0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/89775fc9c26f3ea3b58b50241e39dc1220ecbcf0/DoInterestManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
29281,
12,
2890,
16,
225,
819,
548,
16,
871,
33,
7036,
4672,
3536,
5131,
7849,
316,
279,
4157,
3536,
1815,
365,
18,
12336,
18,
4148,
1477,
1435,
5803,
273,
374,
309,
225,
2256,
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,
1206,
29281,
12,
2890,
16,
225,
819,
548,
16,
871,
33,
7036,
4672,
3536,
5131,
7849,
316,
279,
4157,
3536,
1815,
365,
18,
12336,
18,
4148,
1477,
1435,
5803,
273,
374,
309,
225,
2256,
2... |
print linkDest | def getMissingProjects(missingProjects): """for each directory name in dirs, try to resolve the archive and retrieve it via GNUArch. """ for project in missingProjects: basedir = os.path.abspath(os.path.join(project.getDir(), "..")) print basedir if project.alias != None: newLink = os.path.join(basedir, project.alias) if os.path.exists(newLink) or os.path.islink(newLink): print "\nError: For this project I need to make a symlink!!" print "Symlink would be: " + project.version + " -> " + project.alias + " in " + os.getcwd() print "Error: " + project.alias + " already exists. Please move it out of the way." print "Run '" + " ".join(sys.argv) + "' afterwards again." sys.exit(1) print "Fetching project: " + project.getRCSUrl() project.getRCS().get(project.getRCSUrl()) if project.alias != None: curDir = os.getcwd() os.chdir(basedir) print basedir linkDest = project.getDir().split("/")[-1] print linkDest os.symlink(linkDest, project.alias) os.chdir(curDir) linkPrivatePy(project.getDir(), project) | 8b1f56ed99bd6da97f627bd75992932e0cca3710 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8259/8b1f56ed99bd6da97f627bd75992932e0cca3710/playground.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2108,
2169,
15298,
12,
7337,
15298,
4672,
3536,
1884,
1517,
1867,
508,
316,
7717,
16,
775,
358,
2245,
326,
5052,
471,
4614,
518,
3970,
611,
50,
57,
12269,
18,
3536,
225,
364,
1984,
316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2108,
2169,
15298,
12,
7337,
15298,
4672,
3536,
1884,
1517,
1867,
508,
316,
7717,
16,
775,
358,
2245,
326,
5052,
471,
4614,
518,
3970,
611,
50,
57,
12269,
18,
3536,
225,
364,
1984,
316,
... | |
old_test_path = test_support.TESTFN + ".2" if os.path.isdir(old_test_path): for root, dirs, files in os.walk(old_test_path, topdown=False): for name in files: os.remove(os.path.join(root, name)) for name in dirs: dirname = os.path.join(root, name) if not os.path.islink(dirname): os.rmdir(dirname) else: os.remove(dirname) os.rmdir(old_test_path) | def test_main(): # cleanup old test dir on Windows buildbots old_test_path = test_support.TESTFN + ".2" if os.path.isdir(old_test_path): for root, dirs, files in os.walk(old_test_path, topdown=False): for name in files: os.remove(os.path.join(root, name)) for name in dirs: dirname = os.path.join(root, name) if not os.path.islink(dirname): os.rmdir(dirname) else: os.remove(dirname) os.rmdir(old_test_path) test_support.run_unittest( urlopen_FileTests, urlopen_HttpTests, urlretrieve_FileTests, QuotingTests, UnquotingTests, urlencode_Tests, Pathname_Tests ) | 065633d95eb5cc43ee61fb41e230143f2be730e5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/065633d95eb5cc43ee61fb41e230143f2be730e5/test_urllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5254,
13332,
468,
6686,
1592,
1842,
1577,
603,
8202,
1361,
4819,
334,
395,
67,
13261,
18,
2681,
67,
4873,
3813,
12,
19613,
67,
812,
14650,
16,
19613,
67,
2940,
14650,
16,
880,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5254,
13332,
468,
6686,
1592,
1842,
1577,
603,
8202,
1361,
4819,
334,
395,
67,
13261,
18,
2681,
67,
4873,
3813,
12,
19613,
67,
812,
14650,
16,
19613,
67,
2940,
14650,
16,
880,
... | |
uch = struct.pack("B", value) | uch = unichr(value) | def object(self, str, i, res): | fe53d0fd510bba31efe21f95f86c3eb8bf6eea50 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/fe53d0fd510bba31efe21f95f86c3eb8bf6eea50/notation3.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
733,
12,
2890,
16,
609,
16,
277,
16,
400,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
733,
12,
2890,
16,
609,
16,
277,
16,
400,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
'Modules', ' | 'Modules', ' | def docmodule(self, object, name=None, mod=None, *ignored): """Produce HTML documentation for a module object.""" name = object.__name__ # ignore the passed-in name try: all = object.__all__ except AttributeError: all = None parts = split(name, '.') links = [] for i in range(len(parts)-1): links.append( '<a href="%s.html"><font color="#ffffff">%s</font></a>' % (join(parts[:i+1], '.'), parts[i])) linkedname = join(links + parts[-1:], '.') head = '<big><big><strong>%s</strong></big></big>' % linkedname try: path = inspect.getabsfile(object) url = path if sys.platform == 'win32': import nturl2path url = nturl2path.pathname2url(path) filelink = '<a href="file:%s">%s</a>' % (url, path) except TypeError: filelink = '(built-in)' info = [] if hasattr(object, '__version__'): version = str(object.__version__) if version[:11] == '$' + 'Revision: ' and version[-1:] == '$': version = strip(version[11:-1]) info.append('version %s' % self.escape(version)) if hasattr(object, '__date__'): info.append(self.escape(str(object.__date__))) if info: head = head + ' (%s)' % join(info, ', ') docloc = self.getdocloc(object) if docloc is not None: docloc = '<br><a href="%(docloc)s">Module Docs</a>' % locals() else: docloc = '' result = self.heading( head, '#ffffff', '#7799ee', '<a href=".">index</a><br>' + filelink + docloc) | 0d537716080d853e500c91a17550656b7c2883a8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/0d537716080d853e500c91a17550656b7c2883a8/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
2978,
12,
2890,
16,
733,
16,
508,
33,
7036,
16,
681,
33,
7036,
16,
380,
24055,
4672,
3536,
25884,
3982,
7323,
364,
279,
1605,
733,
12123,
508,
273,
733,
16186,
529,
972,
468,
2305... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
2978,
12,
2890,
16,
733,
16,
508,
33,
7036,
16,
681,
33,
7036,
16,
380,
24055,
4672,
3536,
25884,
3982,
7323,
364,
279,
1605,
733,
12123,
508,
273,
733,
16186,
529,
972,
468,
2305... |
urllib2.urlopen('http://127.0.0.1:%s/' % self.server_address[1]) | urllib2.urlopen('http://127.0.0.1:%s/' % self.server_port) | def stop(self): """self.shutdown is not supported on python < 2.6""" self._run = False urllib2.urlopen('http://127.0.0.1:%s/' % self.server_address[1]) self.thread.join() | 641afae67627f4c6fb3c52a318a6c86b50a33ee2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/495/641afae67627f4c6fb3c52a318a6c86b50a33ee2/server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2132,
12,
2890,
4672,
3536,
2890,
18,
15132,
353,
486,
3260,
603,
5790,
411,
576,
18,
26,
8395,
365,
6315,
2681,
273,
1083,
11527,
22,
18,
295,
18589,
2668,
2505,
2207,
14260,
18,
20,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2132,
12,
2890,
4672,
3536,
2890,
18,
15132,
353,
486,
3260,
603,
5790,
411,
576,
18,
26,
8395,
365,
6315,
2681,
273,
1083,
11527,
22,
18,
295,
18589,
2668,
2505,
2207,
14260,
18,
20,
... |
ostream = tempfile.NamedTemporaryFile(suffix='.xml') | handle, path = tempfile.mkstemp(suffix='.xml') | def test_OFS_ObjectManager__importObjectFromFile_xml(self): from OFS.DTMLMethod import DTMLMethod from OFS.Folder import Folder from OFS.XMLExportImport import exportXML | 4630a5bcfe9d964a5e40a9bb146aabf33974b639 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4630a5bcfe9d964a5e40a9bb146aabf33974b639/test_XMLExportImport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3932,
55,
67,
921,
1318,
972,
5666,
921,
13087,
67,
2902,
12,
2890,
4672,
628,
531,
4931,
18,
40,
2838,
1305,
1930,
463,
2838,
1305,
628,
531,
4931,
18,
3899,
1930,
12623,
62... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1842,
67,
3932,
55,
67,
921,
1318,
972,
5666,
921,
13087,
67,
2902,
12,
2890,
4672,
628,
531,
4931,
18,
40,
2838,
1305,
1930,
463,
2838,
1305,
628,
531,
4931,
18,
3899,
1930,
12623,
62... |
collection_table_update_time = str(res[0][11])[0:len(collection_table_update_time) - 3] | if str(res[0][11])[len(collection_table_update_time) - 3:] == ".00": collection_table_update_time = str(res[0][11])[0:len(collection_table_update_time) - 3] else: collection_table_update_time = str(res[0][11])[0:len(collection_table_update_time)] | def perform_runwebcoll(colID, ln, confirm=0, callback='yes'): """Status of the collection tables / indexes""" subtitle = """<a name="11"></a>Webcoll Status""" output = "" colID = int(colID) col_dict = dict(get_def_name('', "collection")) output += """<br><b>Last updates:</b><br>""" collection_table_update_time = "" collection_web_update_time = "" res = run_sql("SHOW TABLE STATUS LIKE 'collection'") if res: collection_table_update_time = str(res[0][11])[0:len(collection_table_update_time) - 3] output += "Collection table last updated: %s<br>" % collection_table_update_time try: file = open("%s/collections/1/last-updated-ln=en.html" % cachedir) collection_web_update_time = str(file.readline()) output += "Collection webpage last updated: %s<br>" % collection_web_update_time file.close() except StandardError, e: pass try: tabletime = time.strptime(collection_table_update_time, "%Y-%m-%d %H:%M:%S") except StandardError, e: tabletime = time.strptime(collection_table_update_time, "%Y-%m-%d %H:%M") webtime = time.strptime(collection_web_update_time, "%d %b %Y %H:%M:%S %Z") if tabletime > webtime: output += """<br><b><span class="info">Warning: The collections has been modified since last time Webcoll was executed, to process the changes, Webcoll must be executed.</span></b><br>""" header = ['ID', 'Name', 'Time', 'Status', 'Progress'] actions = [] output += """<br><b>Last BibSched tasks:</b><br>""" res = run_sql("select id, proc, host, user, runtime, sleeptime, arguments, status, progress from schTASK where proc='webcoll' and runtime< now() ORDER by runtime") if len(res) > 0: (id, proc, host, user, runtime, sleeptime, arguments, status, progress) = res[len(res) - 1] webcoll__update_time = runtime actions.append([id, proc, runtime, (status !="" and status or ''), (progress !="" and progress or '')]) else: actions.append(['', 'webcoll', '', '', 'Not executed yet']) res = run_sql("select id, proc, host, user, runtime, sleeptime, arguments, status, progress from schTASK where proc='bibindex' and runtime< now() ORDER by runtime") if len(res) > 0: (id, proc, host, user, runtime, sleeptime, arguments, status, progress) = res[len(res) - 1] actions.append([id, proc, runtime, (status !="" and status or ''), (progress !="" and progress or '')]) else: actions.append(['', 'bibindex', '', '', 'Not executed yet']) output += tupletotable(header=header, tuple=actions) output += """<br><b>Next scheduled BibSched run:</b><br>""" actions = [] res = run_sql("select id, proc, host, user, runtime, sleeptime, arguments, status, progress from schTASK where proc='webcoll' and runtime > now() ORDER by runtime") webcoll_future = "" if len(res) > 0: (id, proc, host, user, runtime, sleeptime, arguments, status, progress) = res[0] webcoll__update_time = runtime actions.append([id, proc, runtime, (status !="" and status or ''), (progress !="" and progress or '')]) webcoll_future = "yes" else: actions.append(['', 'webcoll', '', '', 'Not scheduled']) res = run_sql("select id, proc, host, user, runtime, sleeptime, arguments, status, progress from schTASK where proc='bibindex' and runtime > now() ORDER by runtime") bibindex_future = "" if len(res) > 0: (id, proc, host, user, runtime, sleeptime, arguments, status, progress) = res[0] actions.append([id, proc, runtime, (status !="" and status or ''), (progress !="" and progress or '')]) bibindex_future = "yes" else: actions.append(['', 'bibindex', '', '', 'Not scheduled']) output += tupletotable(header=header, tuple=actions) if webcoll_future == "": output += """<br><b><span class="info">Warning: Webcoll is not scheduled for a future run by bibsched, any updates to the collection will not be processed.</span></b><br>""" if bibindex_future == "": output += """<br><b><span class="info">Warning: Bibindex is not scheduled for a future run by bibsched, any updates to the records will not be processed.</span></b><br>""" try: body = [output, extra] except NameError: body = [output] if callback: return perform_index(colID, ln, "perform_runwebcoll", addadminbox(subtitle, body)) else: return addadminbox(subtitle, body) | 7cfed84b7f4e67872dabe3bf72fc8c83e53bfd36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/7cfed84b7f4e67872dabe3bf72fc8c83e53bfd36/websearchadminlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3073,
67,
2681,
4875,
12910,
12,
1293,
734,
16,
7211,
16,
6932,
33,
20,
16,
1348,
2218,
9707,
11,
4672,
3536,
1482,
434,
326,
1849,
4606,
342,
5596,
8395,
225,
20281,
273,
3536,
32,
69... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3073,
67,
2681,
4875,
12910,
12,
1293,
734,
16,
7211,
16,
6932,
33,
20,
16,
1348,
2218,
9707,
11,
4672,
3536,
1482,
434,
326,
1849,
4606,
342,
5596,
8395,
225,
20281,
273,
3536,
32,
69... |
self.scan_as_file("%s|%s" % (stream.inode, inode), factories) | self.scan_as_file("%s|%s" % (combined_inode, inode), factories) if len(m.contact_list)>0: logging.log(logging.VERBOSE_DEBUG,"Inserting contact list: %s" % ",".join(m.contact_list)) m.insert_user_data("%s (Target)" % m.client_id,'contact_list',",".join(m.contact_list)) | def process_stream(self, stream, factories): ports = dissect.fix_ports("MSN") if stream.src_port in ports or stream.dest_port in ports: #Keep track of the streams we have combined so we don't process reverse again #self.processed is a ring buffer so it doesn't get too big if not self.processed.has_key(stream.con_id): #Haven't processed this one. #This returns the forward and reverse stream associated with the MSN port (uses port numbers in .pyflagrc). forward_stream, reverse_stream = self.stream_to_server(stream, "MSN") #We need both streams otherwise this won't work if not reverse_stream or not forward_stream: return | cf7fac3ff0c735f3f514d4f41c9e494e2787883c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5568/cf7fac3ff0c735f3f514d4f41c9e494e2787883c/MSN.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
3256,
12,
2890,
16,
1407,
16,
17456,
4672,
9048,
273,
1015,
5709,
18,
904,
67,
4363,
2932,
3537,
50,
7923,
225,
309,
1407,
18,
4816,
67,
655,
316,
9048,
578,
1407,
18,
10488,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
3256,
12,
2890,
16,
1407,
16,
17456,
4672,
9048,
273,
1015,
5709,
18,
904,
67,
4363,
2932,
3537,
50,
7923,
225,
309,
1407,
18,
4816,
67,
655,
316,
9048,
578,
1407,
18,
10488,... |
def sanitize_learn_input(self, string, channel): | def sanitize_learn_input(self, string): | def sanitize_learn_input(self, string, channel): """Remove extraneous/irrelevant data from input to markov chain - remove nickname prefixes: "nick: foo bar" -> "foo bar" """ # channel is included for future use, e.g. in checking the channel # username list # doing more is a good idea? # TODO: use real usernames from the nick list # idea: handle "nick1, nick2: thanks!" # idea: handle obviously technical data like URIs. Too hard? heheh. nick_regex = (r'(?P<nick>[A-Za-z\x5b-\x60\x7b-\x7d]' r'[0-9A-Za-z\x5b-\x60\x7b-\x7d\-]*)') # RFC2812 2.3.1 , extended regex = re.compile(nick_regex + r'\s*(?P<sep>:)\s*(?P<message>.*)') match = regex.match(string) if match is None: sanitized = string else: # in future, do elif to check if the nick group is actually used # in the channel sanitized = match.group('message') return sanitized | 94efcb6d4c8b4542d3729537448ee5b56e3fbc54 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6095/94efcb6d4c8b4542d3729537448ee5b56e3fbc54/irc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8881,
67,
21346,
67,
2630,
12,
2890,
16,
533,
4672,
3536,
3288,
7582,
15522,
19,
481,
27719,
501,
628,
810,
358,
2267,
1527,
2687,
225,
300,
1206,
19570,
9419,
30,
315,
17091,
30,
8431,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8881,
67,
21346,
67,
2630,
12,
2890,
16,
533,
4672,
3536,
3288,
7582,
15522,
19,
481,
27719,
501,
628,
810,
358,
2267,
1527,
2687,
225,
300,
1206,
19570,
9419,
30,
315,
17091,
30,
8431,
... |
common.message(_('Image size to large!'), dia, | common.message(_('Image size too large!'), dia, | def save(widget, graph, window): dia = gtk.Dialog(_('Save As'), window, gtk.DIALOG_MODAL|gtk.DIALOG_DESTROY_WITH_PARENT, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OK, gtk.RESPONSE_OK)) dia.set_icon(TRYTON_ICON) dia.set_default_response(gtk.RESPONSE_OK) dia.vbox.set_spacing(5) dia.vbox.set_homogeneous(False) title = gtk.Label('<b>' + _('Image Size') + '</b>') title.set_alignment(0.0, 0.5) title.set_use_markup(True) dia.vbox.pack_start(title) table = gtk.Table(2, 2) table.set_col_spacings(3) table.set_row_spacings(3) table.set_border_width(1) table.attach(gtk.Label(_('Width:')), 0, 1, 0, 1, yoptions=False, xoptions=gtk.FILL) spinwidth = gtk.SpinButton(gtk.Adjustment(400.0, 0.0, sys.maxint, 1.0, 10.0, 10.0)) spinwidth.set_numeric(True) spinwidth.set_activates_default(True) table.attach(spinwidth, 1, 2, 0, 1, yoptions=False, xoptions=gtk.FILL) table.attach(gtk.Label(_('Height:')), 0, 1, 1, 2, yoptions=False, xoptions=gtk.FILL) spinheight = gtk.SpinButton(gtk.Adjustment(200.0, 0.0, sys.maxint, 1.0, 10.0, 10.0)) spinheight.set_numeric(True) spinheight.set_activates_default(True) table.attach(spinheight, 1, 2, 1, 2, yoptions=False, xoptions=gtk.FILL) dia.vbox.pack_start(table) filechooser = gtk.FileChooserWidget(gtk.FILE_CHOOSER_ACTION_SAVE, None) filechooser.set_current_folder(CONFIG['client.default_path']) filter = gtk.FileFilter() filter.set_name(_('PNG image (*.png)')) filter.add_mime_type('image/png') filter.add_pattern('*.png') filechooser.add_filter(filter) dia.vbox.pack_start(filechooser) dia.show_all() while True: response = dia.run() width = spinwidth.get_value_as_int() height = spinheight.get_value_as_int() filename = filechooser.get_filename() if filename: filename = filename.decode('utf-8') try: CONFIG['client.default_path'] = \ os.path.dirname(filepath) CONFIG.save() except: pass if response == gtk.RESPONSE_OK: if width and height and filename: if not filename.endswith('.png'): filename = filename + '.png' try: graph.export_png(filename, width, height) break except MemoryError: common.message(_('Image size to large!'), dia, gtk.MESSAGE_ERROR) else: break window.present() dia.destroy() return | 553d64f1b7a4115c1e673955f04ba0831d849e51 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9151/553d64f1b7a4115c1e673955f04ba0831d849e51/parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
12,
6587,
16,
2667,
16,
2742,
4672,
302,
1155,
273,
22718,
18,
6353,
24899,
2668,
4755,
2970,
19899,
2742,
16,
22718,
18,
2565,
18683,
67,
6720,
1013,
96,
4521,
79,
18,
2565,
18683... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
12,
6587,
16,
2667,
16,
2742,
4672,
302,
1155,
273,
22718,
18,
6353,
24899,
2668,
4755,
2970,
19899,
2742,
16,
22718,
18,
2565,
18683,
67,
6720,
1013,
96,
4521,
79,
18,
2565,
18683... |
'<br/>', self.html_tls_group_table(),'<br/>', self.html_bmean(),'<br/>', self.tls_segment_recombination(),'<br/>', self.html_translation_analysis(),'<br/>', self.html_libration_analysis(),'<br/>', self.html_ca_differance(),'<br/>', self.html_rmsd_plot()] | '<br/>'] l += [self.html_tls_group_table(),'<br/>'] l += [self.html_bmean(),'<br/>'] l += [self.tls_segment_recombination(),'<br/>'] l += [self.html_translation_analysis(),'<br/>'] l += [self.html_libration_analysis(),'<br/>'] l += [self.html_ca_differance(),'<br/>'] l += [self.html_rmsd_plot()] | def write_all_files(self): """Writes analysis details of each TLS group. """ title = "Chain %s Partitioned by %d TLS Groups" % (self.chain_id, self.ntls) path = "%s_CHAIN%s_ANALYSIS.html" % (self.struct_id, self.chain_id) | 81092918682cb3b404793cc6abd4020f9621498a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10674/81092918682cb3b404793cc6abd4020f9621498a/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
454,
67,
2354,
12,
2890,
4672,
3536,
8368,
6285,
3189,
434,
1517,
8098,
1041,
18,
3536,
2077,
273,
315,
3893,
738,
87,
12598,
329,
635,
738,
72,
8098,
14712,
6,
738,
261,
289... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
454,
67,
2354,
12,
2890,
4672,
3536,
8368,
6285,
3189,
434,
1517,
8098,
1041,
18,
3536,
2077,
273,
315,
3893,
738,
87,
12598,
329,
635,
738,
72,
8098,
14712,
6,
738,
261,
289... |
self.tabstops[self.c - 1] = True | if self.c <= len(self.tabstops): self.tabstops[self.c - 1] = True | def esc_set_tab(self, csi): # {{{ logging.debug('set tab at ' + str(self.c)) self.tabstops[self.c - 1] = True # }}} | ecce4c1f1a87c743b14c5c337575a94ee149b8a7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10698/ecce4c1f1a87c743b14c5c337575a94ee149b8a7/conque.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2904,
67,
542,
67,
7032,
12,
2890,
16,
30887,
4672,
468,
10179,
95,
2907,
18,
4148,
2668,
542,
3246,
622,
296,
397,
609,
12,
2890,
18,
71,
3719,
309,
365,
18,
71,
1648,
562,
12,
2890... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2904,
67,
542,
67,
7032,
12,
2890,
16,
30887,
4672,
468,
10179,
95,
2907,
18,
4148,
2668,
542,
3246,
622,
296,
397,
609,
12,
2890,
18,
71,
3719,
309,
365,
18,
71,
1648,
562,
12,
2890... |
'''Determine whether the user has the Role.''' | """Determine whether the user has the Role.""" | def hasRole(self, rolename): '''Determine whether the user has the Role.''' roles = self._db.user.get(self._nodeid, 'roles').split(',') for role in roles: if role.strip() == rolename: return True return False | 16a3ebf380b95607b344181655488d818a27791f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1906/16a3ebf380b95607b344181655488d818a27791f/templating.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
28335,
12,
2890,
16,
10643,
1069,
4672,
3536,
8519,
2856,
326,
729,
711,
326,
6204,
12123,
4900,
273,
365,
6315,
1966,
18,
1355,
18,
588,
12,
2890,
6315,
2159,
350,
16,
296,
7774,
16063,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
28335,
12,
2890,
16,
10643,
1069,
4672,
3536,
8519,
2856,
326,
729,
711,
326,
6204,
12123,
4900,
273,
365,
6315,
1966,
18,
1355,
18,
588,
12,
2890,
6315,
2159,
350,
16,
296,
7774,
16063,... |
queue.add(c) | queue.add_task(c) | def cli_convert_main(input_files): global error error = ErrorPrinter() output_type = get_option('cli-output-type') output_suffix = get_option('cli-output-suffix') generator = TargetNameGenerator() generator.set_target_suffix(output_suffix) progress = CliProgress() queue = TaskQueue() for input_file in input_files: input_file = SoundFile(input_file) output_name = generator.get_target_name(input_file) c = Converter(input_file, output_name, output_type) c.overwrite = True c.init() queue.add(c) previous_filename = None queue.run() while queue.running: t = queue.get_current_task() if t and not get_option('quiet'): if previous_filename != t.sound_file.get_filename_for_display(): if previous_filename: print _('%s: OK') % previous_filename previous_filename = t.sound_file.get_filename_for_display() percent = 0 if t.get_duration(): percent = '%.1f %%' % ( 100.0* (t.get_position() / t.get_duration() )) else: percent = '/-\|' [int(time.time()) % 4] progress.show('%s: %s' % (t.sound_file.get_filename_for_display()[-65:], percent )) gtk_sleep(0.1) if not get_option('quiet'): progress.clear() | 436aa4b3c1e9e9debf43e75f53fcd9fee786e756 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2369/436aa4b3c1e9e9debf43e75f53fcd9fee786e756/soundconverter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4942,
67,
6283,
67,
5254,
12,
2630,
67,
2354,
4672,
2552,
555,
555,
273,
1068,
12149,
1435,
225,
876,
67,
723,
273,
336,
67,
3482,
2668,
4857,
17,
2844,
17,
723,
6134,
876,
67,
8477,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4942,
67,
6283,
67,
5254,
12,
2630,
67,
2354,
4672,
2552,
555,
555,
273,
1068,
12149,
1435,
225,
876,
67,
723,
273,
336,
67,
3482,
2668,
4857,
17,
2844,
17,
723,
6134,
876,
67,
8477,
... |
cAlphaViewer = self.app.viewers['calpha'] cm = cAlphaViewer.renderer.selectionCenterOfMass() | cm = self.CalphaViewer.renderer.selectionCenterOfMass() | def posRotateCM_pitch(self, angle): print 'pitch:', angle axis = self.app.mainCamera.right oldAngle = self.pitch axis = Vector3DFloat(axis[0], axis[1], axis[2]) cAlphaViewer = self.app.viewers['calpha'] cm = cAlphaViewer.renderer.selectionCenterOfMass() newAngle = math.pi*angle/180 cAlphaViewer.renderer.selectionRotate(cm, axis, newAngle-oldAngle) cAlphaViewer.emitModelChanged() self.pitch = newAngle | 9fefa88d897047cb33ba1b9c7ca873fe31bb572c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4399/9fefa88d897047cb33ba1b9c7ca873fe31bb572c/structure_editor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
949,
16357,
9611,
67,
25910,
12,
2890,
16,
5291,
4672,
1172,
296,
25910,
30,
2187,
5291,
2654,
273,
365,
18,
2910,
18,
5254,
16521,
18,
4083,
1592,
8467,
273,
365,
18,
25910,
225,
2654,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
949,
16357,
9611,
67,
25910,
12,
2890,
16,
5291,
4672,
1172,
296,
25910,
30,
2187,
5291,
2654,
273,
365,
18,
2910,
18,
5254,
16521,
18,
4083,
1592,
8467,
273,
365,
18,
25910,
225,
2654,
... |
@keyword mode: If set, provides the mode to set on the file. @keyword use : A Use flag, or boolean, or a tuple of Use flags, and/or boolean | @keyword mode: If set, provides the mode to set on the file. @keyword use : A Use flag, or boolean, or a tuple of Use flags, and/or boolean | def __init__(self, recipe, *args, **keywords): | bbf56a2c6ce326846b9cfaed245edce8bd904567 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/bbf56a2c6ce326846b9cfaed245edce8bd904567/source.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
16100,
16,
380,
1968,
16,
2826,
11771,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
16100,
16,
380,
1968,
16,
2826,
11771,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self._dayoffset=dx=int((self._julianday(yr,mo,dy)+2L)%7) | self._dayoffset=dx=int((_julianday(yr,mo,dy)+2L)%7) | def __init__(self,*args): """Return a new date-time object | befc802c3f8f99550f565b61586bed86f5a03c2d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/befc802c3f8f99550f565b61586bed86f5a03c2d/DateTime.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
14,
1968,
4672,
3536,
990,
279,
394,
1509,
17,
957,
733,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
14,
1968,
4672,
3536,
990,
279,
394,
1509,
17,
957,
733,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
k = len(G.rows()) | def permutation_automorphism_group(self,mode=None): r""" If $C$ is an $[n,k,d]$ code over $F$, this function computes the subgroup $Aut(C) \subset S_n$ of all permutation automorphisms of $C$. If mode="verbose" then code-theoretic data is printed out at several stages of the computation. Combines an idea of mine with an improvement suggested by Cary Huffman. EXAMPLES: sage: MS = MatrixSpace(GF(2),4,8) sage: G = MS([[1,0,0,0,1,1,1,0],[0,1,1,1,0,0,0,0],[0,0,0,0,0,0,0,1],[0,0,0,0,0,1,0,0]]) sage: C = LinearCode(G) sage: C Linear code of length 8, dimension 4 over Finite Field of size 2 sage: G = C.permutation_automorphism_group() sage: G.order() 144 A less easy example involves showing that the permutation automorphism group of the extended ternary Golay code is the Mathieu group $M_{11}$. sage: C = ExtendedTernaryGolayCode() sage: M11 = MathieuGroup(11) sage: M11.order() 7920 sage: G = C.permutation_automorphism_group() # this should take < 5 seconds sage: G.is_isomorphic(M11) # this should take < 5 seconds True WARNING: - *Ugly code, which should be replaced by a call to Robert Miller's nice program.* """ F = self.base_ring() q = F.order() G = self.gen_mat() n = len(G.columns()) k = len(G.rows()) # G is always full rank Gp = gap("SymmetricGroup(%s)"%n) # initializing G in gap Sn = SymmetricGroup(n) wts = self.spectrum() # bottleneck 1 Gstr = str(gap(G)) gap.eval("C:=GeneratorMatCode("+Gstr+",GF("+str(q)+"))") gap.eval("eltsC:=Elements(C)") nonzerowts = [i for i in range(len(wts)) if wts[i]!=0] if mode=="verbose": print "\n Minimum distance: %s \n Weight distribution: \n %s"%(nonzerowts[1],wts) stop = 0 # only stop if all gens are autos for i in range(1,len(nonzerowts)): if stop == 1: break wt = nonzerowts[i] if mode=="verbose": size = Gp.Size() print "\n Using the %s codewords of weight %s \n Supergroup size: \n %s\n "%(wts[wt],wt,size) gap.eval("Cwt:=Filtered(eltsC,c->WeightCodeword(c)=%s)"%wt) # bottleneck 2 (repeated gap.eval("matCwt:=List(Cwt,c->VectorCodeword(c))") # for each i until stop = 1) A = gap("MatrixAutomorphisms(matCwt)") #print "A = ",A, "\n Gp = ", Gp, "\n strGp = ", str(Gp) G2 = gap("Intersection2(%s,%s)"%(str(A).replace("\n",""),str(Gp).replace("\n",""))) # bottleneck 3 Gp = G2 if Gp.Size()==1: return PermutationGroup([()]) autgp_gens = Gp.GeneratorsOfGroup() gens = [Sn(str(x).replace("\n","")) for x in autgp_gens] stop = 1 # get ready to stop for x in gens: # if one of these gens is not an auto then don't stop if not(self.is_permutation_automorphism(x)): stop = 0 break G = PermutationGroup(gens) return G | 24267b4dbde13a19b59225e71b0b95cf6a68a709 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/24267b4dbde13a19b59225e71b0b95cf6a68a709/linear_code.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17440,
67,
5854,
362,
7657,
6228,
67,
1655,
12,
2890,
16,
3188,
33,
7036,
4672,
436,
8395,
971,
271,
39,
8,
353,
392,
271,
63,
82,
16,
79,
16,
72,
65,
8,
981,
1879,
271,
42,
8,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17440,
67,
5854,
362,
7657,
6228,
67,
1655,
12,
2890,
16,
3188,
33,
7036,
4672,
436,
8395,
971,
271,
39,
8,
353,
392,
271,
63,
82,
16,
79,
16,
72,
65,
8,
981,
1879,
271,
42,
8,
1... | |
@needs("setuptools.bdist_mpkg", "doc") | def bdist_mpkg(): sh("python setupegg.py bdist_mpkg") @task | def mpkg_name(): maj, min = macosx_version()[:2] pyver = ".".join([str(i) for i in sys.version_info[:2]]) return "numpy-%s-py%s-macosx%s.%s.mpkg" % \ (FULLVERSION, pyver, maj, min) | 83b74f286243ff6822e8c12eae67d3ae12805a76 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/83b74f286243ff6822e8c12eae67d3ae12805a76/pavement.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
312,
10657,
67,
529,
13332,
29478,
16,
1131,
273,
5318,
538,
92,
67,
1589,
1435,
10531,
22,
65,
2395,
502,
273,
4585,
18,
5701,
3816,
701,
12,
77,
13,
364,
277,
316,
2589,
18,
1589,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
312,
10657,
67,
529,
13332,
29478,
16,
1131,
273,
5318,
538,
92,
67,
1589,
1435,
10531,
22,
65,
2395,
502,
273,
4585,
18,
5701,
3816,
701,
12,
77,
13,
364,
277,
316,
2589,
18,
1589,
... |
for param in dConfigParamList: if(config.GetBool('want-%s-report' % (param,), 0)): doPrint = True break | dConfigParamList = [param for param in dConfigParamList \ if config.GetBool('want-%s-report' % (param,), 0)] doPrint = bool(dConfigParamList) pass | def decorator(f): return f | 1ea78fd02fc9ae34753d15944c23b5502ce72aef /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8543/1ea78fd02fc9ae34753d15944c23b5502ce72aef/PythonUtil.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7367,
12,
74,
4672,
327,
284,
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,
... | [
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7367,
12,
74,
4672,
327,
284,
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,... |
if options.verbose: print timestamp(), " Syncing rpms to child channel", channel | if options.verbose: print timestamp(), " Checking channel: %s" % channel sys.stdout.flush() | def main(): if options.demo: key = False current_channels = {} current_channel_labels = ['rhel-x86_64-server-5'] else: # Login to Satellite server key = login(options.user, options.password) # Build existing channel list current_channels = client.channel.list_all_channels(key) current_channel_labels = [] for channel in current_channels: current_channel_labels.append(channel['label']) if options.debug: print timestamp(), "DEBUG: Channels on current Satellite server:", current_channel_labels if client.api.get_version() < 5.1: # TODO: Haven't tested with Spacewalk, not sure how it is reported print timestamp(), "! This script uses features not available with Satellite versions older than 5.1" sys.exit(1) if not options.client_actions_only: # This begins the server actions section if not os.path.exists(options.localdir): try: os.makedirs(options.localdir) except: print timestamp(), "! Error: Unable to create %s" % (options.localdir) raise if (not options.delete) and (not options.no_rsync): # Sync local Dell repo with public Dell repo returncode = get_dell_repo(options.repo, options.localdir, only_systems) if not returncode == 0: print timestamp(), "! rsync process exited with returncode:", returncode raise # Build child channels based on dell repo as needed systems = build_channel_list(options.localdir, SYSTEM_VENDOR_ID, only_systems, DELL_SYSTEM_NAMES) systems['platform_independent'] = PLATFORM_INDEPENDENT # Iterate through list of supported RHEL versions and archs, create parent channels if needed channels = {} print timestamp(), "Checking base channels on Satellite server" for parent in SUPPORTED_CHANNELS: if options.verbose: print timestamp(), "Checking base channel", parent # Check each supported base channel, skip if it does not exist on Satellite server if parent not in current_channel_labels: if options.verbose: print timestamp(), "- %s is not a current base channel, skipping." % (parent) continue else: channels[parent] = SUPPORTED_CHANNELS[parent] channels[parent]['child_channels'] = [] # Initialize key for child channels if options.verbose: print timestamp(), "+ %s found on Satellite server, checking child channels." % (parent) if channels[parent]['arch'] == 'i386': # This is because Satellite stores x86 as 'ia32' arch = 'channel-ia32' else: arch = 'channel-' + channels[parent]['arch'] subdir = channels[parent]['subdir'] print timestamp(), " Checking child channels for %s" % parent for system in systems: # use system name plus parent to create a unique child channel c_label = DELL_INFO['label'] + '-' + system + '-' + parent c_name = DELL_INFO['name'] + ' on ' + systems[system] + ' for ' + parent c_summary = DELL_INFO['summary'] + ' on ' + systems[system] + ' running ' + parent c_arch = arch c_dir = options.localdir + system + '/' + subdir if options.verbose: print timestamp(), " Checking child channel:", c_label if channel_exists(key, c_label, current_channels): if options.delete: # Delete child channels if requested if options.demo: print timestamp(), "+ Deleting channel:", c_label else: delete_channel(key, c_label) else: if options.debug: print timestamp(), "DEBUG: checking for dir:", c_dir if options.verbose: print timestamp(), "Info: Child channel already exists:", c_label if os.path.isdir(c_dir): channels[parent]['child_channels'].append(system) else: if not options.delete: # Build child channels if needed if options.debug: print timestamp(), "DEBUG: checking for dir:", c_dir if os.path.isdir(c_dir): channels[parent]['child_channels'].append(system) if options.debug: print timestamp(), "DEBUG: %s exists for %s, creating channel" % (subdir, system) if options.demo: if options.verbose: print timestamp(), "+ Creating child channel:", c_label else: create_channel(key, c_label, c_name, c_summary, c_arch, parent) else: if options.debug: print timestamp(), "DEBUG: %s does not exists for %s" % (subdir, system) if (not options.delete) and (not options.no_packages): # Iterate through channels, pushing rpms from the local repo as needed # TODO: check if rpm is already uploaded and orphaned or part of another channel if options.debug: print timestamp(), "DEBUG: Channel mapping:", channels print timestamp(), "Syncing rpms as needed" for parent in channels: print timestamp(), " Syncing rpms for child channels in %s" % parent for child in channels[parent]['child_channels']: dir = options.localdir + child + '/' + channels[parent]['subdir'] channel = DELL_INFO['label'] + '-' + child + '-' + parent if options.verbose: print timestamp(), " Syncing rpms to child channel", channel if options.debug: print timestamp(), "DEBUG: Looking for rpms in", dir rpms = gen_rpm_list(dir) # Get all packages in child channel existing_packages = client.channel.software.list_all_packages(key, channel) if options.debug: print timestamp(), "DEBUG: Existing packages in", channel, existing_packages for rpm in rpms: if options.debug: print timestamp(), "DEBUG: Working on:", rpm # Strip off '.rpm' at end of file to match against existing entries rpm_name = rpm.split('.rpm')[0] # Now strip off any preceeding paths rpm_name = rpm_name.split('/')[-1] # Iterate through existing packages, and skip existing ones if options.verbose: print timestamp(), "Checking if %s is already on the Satellite server in %s" % (rpm_name, channel) for package in existing_packages: existing_rpm_name = reconstruct_name(package) if options.debug: print timestamp(), "DEBUG: Checking match for %s and %s" % (rpm_name, existing_rpm_name) if existing_rpm_name == rpm_name: # This means the intended rpm is already in Satellite, so skip if options.verbose: print timestamp(), "- %s already in Satellite, skipping" % (rpm_name) break else: if options.verbose: print timestamp(), "+ %s is not in Satellite, adding" % (rpm_name) if options.debug: print timestamp(), "DEBUG: Calling: push_rpm(",rpm, channel, options.user, options.password, options.satserver, ")" returncode = push_rpm(rpm, channel, options.user, options.password, options.satserver) if not returncode == 0: print timestamp(), "! rhnpush process exited with returncode:", returncode if returncode == 255: print timestamp(), "You may force package uploads with --force" sys.exit(1) print timestamp(), "Completed uploading rpms.\n" if (not options.server_actions_only) and (not options.demo) and (not options.delete): # This is the client actions section print timestamp(), "Subscribing registered systems to the %s channel." % (PLATFORM_INDEPENDENT) client_systems = subscribe_clients(key) print timestamp(), "Scheduling software installation and actions on clients." client_systems = schedule_actions(key, client_systems) print timestamp(), "Waiting for client actions to complete." client_systems = get_action_results(key, client_systems) print timestamp(), "All actions completed.\n" show_client_results(client_systems) if not options.demo: logout(key) | 47bf7c5912da2993d3407be03ab7a0b52c21819b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3457/47bf7c5912da2993d3407be03ab7a0b52c21819b/dell-satellite-sync.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
309,
702,
18,
27928,
30,
498,
273,
1083,
783,
67,
9114,
273,
2618,
783,
67,
4327,
67,
5336,
273,
10228,
30138,
292,
17,
92,
5292,
67,
1105,
17,
3567,
17,
25,
3546,
469,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2774,
13332,
309,
702,
18,
27928,
30,
498,
273,
1083,
783,
67,
9114,
273,
2618,
783,
67,
4327,
67,
5336,
273,
10228,
30138,
292,
17,
92,
5292,
67,
1105,
17,
3567,
17,
25,
3546,
469,
... |
_test() t = [0xf0, 0xf00, 0xff00, 0xffff00, 0xffffff00L] o = [] for x in t: pass x = 0L | import doctest failure, nbtest = doctest.testmod() if failure: import sys sys.exit(1) | def _test(): import doctest, IPy return doctest.testmod(IPy) | 6fae974e62365a9a1139f06f403aea6ee0cb26f3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14367/6fae974e62365a9a1139f06f403aea6ee0cb26f3/IPy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3813,
13332,
1930,
31263,
395,
16,
2971,
93,
327,
31263,
395,
18,
3813,
1711,
12,
2579,
93,
13,
225,
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,
389,
3813,
13332,
1930,
31263,
395,
16,
2971,
93,
327,
31263,
395,
18,
3813,
1711,
12,
2579,
93,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
return Expr(self.root.simplify()) | return Expr(self._simplify(self.code)) | def simplify(self): return Expr(self.root.simplify()) | 1dd24e33ec6c36d3d5a36f2c212e6968864d27b3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2040/1dd24e33ec6c36d3d5a36f2c212e6968864d27b3/esotope-bfc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16499,
12,
2890,
4672,
327,
8074,
12,
2890,
18,
3085,
18,
9812,
412,
1164,
10756,
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,
16499,
12,
2890,
4672,
327,
8074,
12,
2890,
18,
3085,
18,
9812,
412,
1164,
10756,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return mime_type[ctpos + 8:] | return mimetype[ctpos + 8:] | def get_charset(mimetype): """Return the character encoding included in the given content type string, or `None` if `mimetype` is `None` or empty or if no charset information is available. """ if mimetype: ctpos = mimetype.find('charset=') if ctpos >= 0: return mime_type[ctpos + 8:] | 3569a7724c560c55eeb36124007f6aa652684e8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/3569a7724c560c55eeb36124007f6aa652684e8b/api.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
9999,
12,
22571,
4672,
3536,
990,
326,
3351,
2688,
5849,
316,
326,
864,
913,
618,
533,
16,
578,
1375,
7036,
68,
309,
1375,
22571,
68,
353,
1375,
7036,
68,
578,
1008,
578,
309,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
9999,
12,
22571,
4672,
3536,
990,
326,
3351,
2688,
5849,
316,
326,
864,
913,
618,
533,
16,
578,
1375,
7036,
68,
309,
1375,
22571,
68,
353,
1375,
7036,
68,
578,
1008,
578,
309,... |
config.addOption('DQ2_OUTPUT_SPACE_TOKENS', [ 'ATLASSCRATCHDISK', 'ATLASLOCALGROUPDISK'] , 'Allowed space tokens names of DQ2OutputDataset output' ) | config.addOption('DQ2_OUTPUT_SPACE_TOKENS', [ 'ATLASSCRATCHDISK', 'ATLASLOCALGROUPDISK', 'T2ATLASSCRATCHDISK', 'T2ATLASLOCALGROUPDISK' ] , 'Allowed space tokens names of DQ2OutputDataset output' ) | def retrieve(self, type=None, name=None, **options ): """Retrieve files listed in outputdata and registered in output from remote SE to local filesystem in background thread""" from Ganga.GPIDev.Lib.Job import Job from GangaAtlas.Lib.ATLASDataset import Download import os, threading job = self._getParent() | 9e3fe3cdba799686fa836cf63200e536edc49d99 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/9e3fe3cdba799686fa836cf63200e536edc49d99/DQ2Dataset.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4614,
12,
2890,
16,
618,
33,
7036,
16,
508,
33,
7036,
16,
2826,
2116,
262,
30,
3536,
5767,
1390,
12889,
316,
876,
892,
471,
4104,
316,
876,
628,
2632,
3174,
358,
1191,
6496,
316,
5412,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4614,
12,
2890,
16,
618,
33,
7036,
16,
508,
33,
7036,
16,
2826,
2116,
262,
30,
3536,
5767,
1390,
12889,
316,
876,
892,
471,
4104,
316,
876,
628,
2632,
3174,
358,
1191,
6496,
316,
5412,... |
res = self.getTransformations(condDict=condDict, | res = self.database.getTransformations(condDict=condDict, | def export_getTransformations(self,condDict={},older=None, newer=None, timeStamp='CreationDate', orderAttribute=None, limit=None, extraParams=False): res = self.getTransformations(condDict=condDict, older=older, newer=newer, timeStamp=timeStamp, orderAttribute=orderAttribute, limit=limit, extraParams=extraParams) return self.__parseRes(res) | 6360cf54df0d89984ad50222d86a203e97fc3802 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/6360cf54df0d89984ad50222d86a203e97fc3802/TransformationHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
67,
588,
4059,
1012,
12,
2890,
16,
10013,
5014,
28793,
1498,
33,
7036,
16,
16069,
33,
7036,
16,
18198,
2218,
9906,
1626,
2187,
1353,
1499,
33,
7036,
16,
1800,
33,
7036,
16,
2870,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3359,
67,
588,
4059,
1012,
12,
2890,
16,
10013,
5014,
28793,
1498,
33,
7036,
16,
16069,
33,
7036,
16,
18198,
2218,
9906,
1626,
2187,
1353,
1499,
33,
7036,
16,
1800,
33,
7036,
16,
2870,
... |
log.error(str(e)) | log.error("%s: %s" % (versionStr, str(e))) | def checkout(repos, cfg, dir, name, versionStr = None): # This doesn't use helper.findPackage as it doesn't want to allow # branches nicknames. Doing so would cause two problems. First, we could # get multiple matches for a single pacakge. Two, even if we got # a single match we wouldn't know where to check in changes. A nickname # branch doesn't work for checkins as it could refer to multiple # branches, even if it doesn't right now. if name[0] != ":": name = cfg.packagenamespace + ":" + name name = name + ":sources" if not versionStr: version = cfg.defaultbranch else: if versionStr != "/": versionStr = cfg.defaultbranch.asString() + "/" + versionStr try: version = versions.VersionFromString(versionStr) except versions.ParseError, e: log.error(str(e)) return try: if version.isBranch(): trv = repos.getLatestPackage(name, version) else: trv = repos.getPackageVersion(name, version) except versioned.MissingBranchError, e: log.error(str(e)) return except repository.PackageMissing, e: log.error(str(e)) return if not dir: dir = trv.getName().split(":")[-2] if not os.path.isdir(dir): try: os.mkdir(dir) except OSError, err: log.error("cannot create directory %s/%s: %s", os.getcwd(), dir, str(err)) return state = SourceState() state.setTroveName(trv.getName()) state.setTroveVersion(trv.getVersion()) if version.isBranch(): state.setTroveBranch(version) else: state.setTroveBranch(version.branch()) for (fileId, path, version) in trv.fileList(): fullPath = dir + "/" + path fileObj = repos.getFileVersion(fileId, version) contents = filecontents.FromRepository(repos, fileObj.sha1()) fileObj.restore(contents, fullPath, 1) state.addFile(fileId, path, version) state.write(dir + "/SRS") | e81dfa06e24fba20a03f2c4e195b539f58aaa9e6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/e81dfa06e24fba20a03f2c4e195b539f58aaa9e6/checkin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13926,
12,
15564,
16,
2776,
16,
1577,
16,
508,
16,
1177,
1585,
273,
599,
4672,
468,
1220,
3302,
1404,
999,
4222,
18,
4720,
2261,
487,
518,
3302,
1404,
2545,
358,
1699,
468,
11483,
10909,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13926,
12,
15564,
16,
2776,
16,
1577,
16,
508,
16,
1177,
1585,
273,
599,
4672,
468,
1220,
3302,
1404,
999,
4222,
18,
4720,
2261,
487,
518,
3302,
1404,
2545,
358,
1699,
468,
11483,
10909,... |
f.grid(row=0,col=2,padx=2,pady=2,ipadx=2,ipady=2) | f.grid(row=0,column=2,padx=2,pady=2,ipadx=2,ipady=2) | def create_command_buttons(self): # # place button frame on the right f = self.buttonframe = Frame(self.top) f.grid(row=0,col=2,padx=2,pady=2,ipadx=2,ipady=2) | dd14c7ae1ba245bfc37a61c633814e3c81931537 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/dd14c7ae1ba245bfc37a61c633814e3c81931537/SearchDialogBase.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
3076,
67,
16016,
12,
2890,
4672,
468,
468,
3166,
3568,
2623,
603,
326,
2145,
284,
273,
365,
18,
5391,
3789,
273,
8058,
12,
2890,
18,
3669,
13,
284,
18,
5222,
12,
492,
33,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
3076,
67,
16016,
12,
2890,
4672,
468,
468,
3166,
3568,
2623,
603,
326,
2145,
284,
273,
365,
18,
5391,
3789,
273,
8058,
12,
2890,
18,
3669,
13,
284,
18,
5222,
12,
492,
33,
20... |
elif track.mark_unplayed == 1 and not track.rating: | elif track.playcount > 0 and not track.rating: | def purge(self): for track in gpod.sw_get_playlist_tracks(self.podcasts_playlist): if gpod.itdb_filename_on_ipod(track) is None: log('Episode has no file: %s', track.title, sender=self) # self.remove_track_gpod(track) elif track.mark_unplayed == 1 and not track.rating: log('Purging episode: %s', track.title, sender=self) self.remove_track_gpod(track) | b06f6751e1099642d3654dda51d291ce53da02de /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12778/b06f6751e1099642d3654dda51d291ce53da02de/sync.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11668,
12,
2890,
4672,
364,
3298,
316,
4178,
369,
18,
5328,
67,
588,
67,
1601,
1098,
67,
21499,
12,
2890,
18,
7832,
4155,
87,
67,
1601,
1098,
4672,
309,
4178,
369,
18,
305,
1966,
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,
11668,
12,
2890,
4672,
364,
3298,
316,
4178,
369,
18,
5328,
67,
588,
67,
1601,
1098,
67,
21499,
12,
2890,
18,
7832,
4155,
87,
67,
1601,
1098,
4672,
309,
4178,
369,
18,
305,
1966,
67,
... |
self.bIsRunning = 1 | self.m_bIsRunning = 1 | def StartPackages(self): """Activate all packages | 54ffec807df4acdcdd8fab12b225a27dbe06e238 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2853/54ffec807df4acdcdd8fab12b225a27dbe06e238/pManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3603,
11425,
12,
2890,
4672,
3536,
21370,
777,
5907,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
3603,
11425,
12,
2890,
4672,
3536,
21370,
777,
5907,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
assert apath[len(pd)] in [os.sep],`path,apath[len(pd)]` | assert apath[len(pd)] in [os.sep],repr((path,apath[len(pd)])) | def rel_path(path, parent_path): """Return path relative to parent_path. """ pd = os.path.abspath(parent_path) apath = os.path.abspath(path) if len(apath)<len(pd): return path if apath==pd: return '' if pd == apath[:len(pd)]: assert apath[len(pd)] in [os.sep],`path,apath[len(pd)]` path = apath[len(pd)+1:] return path | c85421c3b85e794d07e8de0304136c068c7f2e17 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/c85421c3b85e794d07e8de0304136c068c7f2e17/misc_util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1279,
67,
803,
12,
803,
16,
982,
67,
803,
4672,
3536,
990,
589,
3632,
358,
982,
67,
803,
18,
3536,
4863,
273,
1140,
18,
803,
18,
5113,
803,
12,
2938,
67,
803,
13,
513,
421,
273,
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,
1279,
67,
803,
12,
803,
16,
982,
67,
803,
4672,
3536,
990,
589,
3632,
358,
982,
67,
803,
18,
3536,
4863,
273,
1140,
18,
803,
18,
5113,
803,
12,
2938,
67,
803,
13,
513,
421,
273,
11... |
if atts.has_key('width'): atts['width'] = int(round(node['width'] * (float(node['scale']) / 100))) if atts.has_key('height'): atts['height'] = int(round(node['height'] * (float(node['scale']) / 100))) | for att_name in 'width', 'height': if atts.has_key(att_name): match = re.match(r'([0-9.]+)(.*)', atts[att_name]) assert match atts[att_name] = '%s%s' % ( float(match.group(1)) * (float(node['scale']) / 100), match.group(2)) | def visit_image(self, node): atts = {} atts['src'] = node['uri'] if node.has_key('width'): atts['width'] = node['width'] if node.has_key('height'): atts['height'] = node['height'] if node.has_key('scale'): if Image and not (node.has_key('width') and node.has_key('height')): try: im = Image.open(str(atts['src'])) except (IOError, # Source image can't be found or opened UnicodeError): # PIL doesn't like Unicode paths. pass else: if not atts.has_key('width'): atts['width'] = im.size[0] if not atts.has_key('height'): atts['height'] = im.size[1] del im if atts.has_key('width'): atts['width'] = int(round(node['width'] * (float(node['scale']) / 100))) if atts.has_key('height'): atts['height'] = int(round(node['height'] * (float(node['scale']) / 100))) style = [] for att_name in 'width', 'height': if atts.has_key(att_name): if re.match(r'^[0-9.]+$', atts[att_name]): # Interpret unitless values as pixels. atts[att_name] += 'px' style.append('%s: %s;' % (att_name, atts[att_name])) del atts[att_name] if style: atts['style'] = ' '.join(style) atts['alt'] = node.get('alt', atts['src']) if node.has_key('align'): atts['align'] = self.attval(node['align']) atts['class'] = 'align-%s' % atts['align'] if (isinstance(node.parent, nodes.TextElement) or (isinstance(node.parent, nodes.reference) and not isinstance(node.parent.parent, nodes.TextElement))): # Inline context or surrounded by <a>...</a>. suffix = '' else: suffix = '\n' self.body.append(self.emptytag(node, 'img', suffix, **atts)) | d35fdfc619d5cc98dd67a7f4e078d24337ea761c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/d35fdfc619d5cc98dd67a7f4e078d24337ea761c/html4css1.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
2730,
12,
2890,
16,
756,
4672,
15687,
273,
2618,
15687,
3292,
4816,
3546,
273,
756,
3292,
1650,
3546,
309,
756,
18,
5332,
67,
856,
2668,
2819,
11,
4672,
15687,
3292,
2819,
3546... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3757,
67,
2730,
12,
2890,
16,
756,
4672,
15687,
273,
2618,
15687,
3292,
4816,
3546,
273,
756,
3292,
1650,
3546,
309,
756,
18,
5332,
67,
856,
2668,
2819,
11,
4672,
15687,
3292,
2819,
3546... |
return [(msg, subj)] | return [(msg, subj, None)] | def getbundlemsgs(bundle): subj = (opts.get('subject') or prompt(ui, 'Subject:', 'A bundle for your repository')) | 9da6032086f09e0116442acbe6e7d1fe447e0b5e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/9da6032086f09e0116442acbe6e7d1fe447e0b5e/patchbomb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
9991,
27439,
12,
9991,
4672,
15333,
273,
261,
4952,
18,
588,
2668,
7857,
6134,
578,
6866,
12,
4881,
16,
296,
6638,
30,
2187,
296,
37,
3440,
364,
3433,
3352,
26112,
2,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
9991,
27439,
12,
9991,
4672,
15333,
273,
261,
4952,
18,
588,
2668,
7857,
6134,
578,
6866,
12,
4881,
16,
296,
6638,
30,
2187,
296,
37,
3440,
364,
3433,
3352,
26112,
2,
-100,
-100,
... |
next=_('Next'), num=num) | next=_('Next'), num=num, gp_start=gp_start, gp_end=gp_end) | def render_book_list(ids, prefix, suffix=''): # {{{ pages = [] num = len(ids) pos = 0 delta = 25 while ids: page = list(ids[:delta]) pages.append((page, pos)) ids = ids[delta:] pos += len(page) page_template = u'''\ <div class="page" id="page{0}"> <div class="load_data" title="{1}"> <span class="url" title="{prefix}/browse/booklist_page"></span> <span class="start" title="{start}"></span> <span class="end" title="{end}"></span> </div> <div class="loading"><img src="{prefix}/static/loading.gif" /> {2}</div> <div class="loaded"></div> </div> ''' rpages = [] for i, x in enumerate(pages): pg, pos = x ld = xml(json.dumps(pg), True) rpages.append(page_template.format(i, ld, xml(_('Loading, please wait')) + '…', start=pos+1, end=pos+len(pg), prefix=prefix)) rpages = u'\n\n'.join(rpages) templ = u'''\ <h3>{0} {suffix}</h3> <div id="booklist"> <div class="listnav topnav"> {navbar} </div> {pages} <div class="listnav bottomnav"> {navbar} </div> </div> ''' navbar = u'''\ <div class="navleft"> <a href="#" onclick="first_page(); return false;">{first}</a> <a href="#" onclick="previous_page(); return false;">{previous}</a> </div> <div class="navmiddle"> <span class="start">0</span> to <span class="end">0</span> of {num} </div> <div class="navright"> <a href="#" onclick="next_page(); return false;">{next}</a> <a href="#" onclick="last_page(); return false;">{last}</a> </div> '''.format(first=_('First'), last=_('Last'), previous=_('Previous'), next=_('Next'), num=num) return templ.format(_('Browsing %d books')%num, suffix=suffix, pages=rpages, navbar=navbar) | 05fb9ee82657bf281215f8eb30f7f042b44c6d93 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/05fb9ee82657bf281215f8eb30f7f042b44c6d93/browse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
3618,
67,
1098,
12,
2232,
16,
1633,
16,
3758,
2218,
11,
4672,
468,
10179,
95,
4689,
273,
5378,
818,
273,
562,
12,
2232,
13,
949,
273,
374,
3622,
273,
6969,
1323,
3258,
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,
1743,
67,
3618,
67,
1098,
12,
2232,
16,
1633,
16,
3758,
2218,
11,
4672,
468,
10179,
95,
4689,
273,
5378,
818,
273,
562,
12,
2232,
13,
949,
273,
374,
3622,
273,
6969,
1323,
3258,
30,
... |
r = e = list(client_map) w = [fd for (fd, obj) in map.iteritems() if obj.writable()] | r = e = client_map.keys() w = [fd for (fd, obj) in map.items() if obj.writable()] | def client_loop(): map = client_map read = asyncore.read write = asyncore.write _exception = asyncore._exception loop_failures = 0 while map: try: r = e = list(client_map) w = [fd for (fd, obj) in map.iteritems() if obj.writable()] try: r, w, e = select.select(r, w, e, client_timeout) except select.error, err: if err[0] != errno.EINTR: if err[0] == errno.EBADF: # If a connection is closed while we are # calling select on it, we can get a bad # file-descriptor error. We'll check for this # case by looking for entries in r and w that # are not in the socket map. if [fd for fd in r if fd not in client_map]: continue if [fd for fd in w if fd not in client_map]: continue raise else: continue if not (r or w or e): for obj in client_map.itervalues(): if isinstance(obj, Connection): # Send a heartbeat message as a reply to a # non-existent message id. try: obj.send_reply(-1, None) except DisconnectedError: pass global client_timeout_count client_timeout_count += 1 continue for fd in r: obj = map.get(fd) if obj is None: continue read(obj) for fd in w: obj = map.get(fd) if obj is None: continue write(obj) for fd in e: obj = map.get(fd) if obj is None: continue _exception(obj) except: if map: try: client_logger.critical('The ZEO cient loop failed.', exc_info=sys.exc_info()) except: pass for fd, obj in map.items(): if obj is client_trigger: continue try: obj.mgr.client.close() except: map.pop(fd, None) try: client_logger.critical("Couldn't close a dispatcher.", exc_info=sys.exc_info()) except: pass | 4a949a33c5504699154b87e7d5d844927c6250aa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10048/4a949a33c5504699154b87e7d5d844927c6250aa/connection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1004,
67,
6498,
13332,
852,
273,
1004,
67,
1458,
225,
855,
273,
4326,
479,
18,
896,
1045,
273,
4326,
479,
18,
2626,
389,
4064,
273,
4326,
479,
6315,
4064,
2798,
67,
26268,
273,
374,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1004,
67,
6498,
13332,
852,
273,
1004,
67,
1458,
225,
855,
273,
4326,
479,
18,
896,
1045,
273,
4326,
479,
18,
2626,
389,
4064,
273,
4326,
479,
6315,
4064,
2798,
67,
26268,
273,
374,
22... |
if self.is_terminal(): | if self.root.is_terminal(): | def is_preterminal(self): """Returns True if all direct descendents are terminal.""" if self.is_terminal(): return False for clade in self.clades: if not clade.is_terminal(): return False return True | e916fd93a1bc5d1b47da3c57c9b038389c3ce8c5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7167/e916fd93a1bc5d1b47da3c57c9b038389c3ce8c5/BaseTree.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
1484,
15979,
12,
2890,
4672,
3536,
1356,
1053,
309,
777,
2657,
10653,
4877,
854,
8651,
12123,
309,
365,
18,
3085,
18,
291,
67,
15979,
13332,
327,
1083,
364,
927,
2486,
316,
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,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
1484,
15979,
12,
2890,
4672,
3536,
1356,
1053,
309,
777,
2657,
10653,
4877,
854,
8651,
12123,
309,
365,
18,
3085,
18,
291,
67,
15979,
13332,
327,
1083,
364,
927,
2486,
316,
365,... |
if (inspect.getmodule(value) or object) is object: | if (all is not None or (inspect.getmodule(value) or object) is object): | def docmodule(self, object, name=None, mod=None, *ignored): """Produce HTML documentation for a module object.""" name = object.__name__ # ignore the passed-in name try: all = object.__all__ except AttributeError: all = None parts = split(name, '.') links = [] for i in range(len(parts)-1): links.append( '<a href="%s.html"><font color="#ffffff">%s</font></a>' % (join(parts[:i+1], '.'), parts[i])) linkedname = join(links + parts[-1:], '.') head = '<big><big><strong>%s</strong></big></big>' % linkedname try: path = inspect.getabsfile(object) url = path if sys.platform == 'win32': import nturl2path url = nturl2path.pathname2url(path) filelink = '<a href="file:%s">%s</a>' % (url, path) except TypeError: filelink = '(built-in)' info = [] if hasattr(object, '__version__'): version = str(object.__version__) if version[:11] == '$' + 'Revision: ' and version[-1:] == '$': version = strip(version[11:-1]) info.append('version %s' % self.escape(version)) if hasattr(object, '__date__'): info.append(self.escape(str(object.__date__))) if info: head = head + ' (%s)' % join(info, ', ') docloc = self.getdocloc(object) if docloc is not None: docloc = '<br><a href="%(docloc)s">Module Docs</a>' % locals() else: docloc = '' result = self.heading( head, '#ffffff', '#7799ee', '<a href=".">index</a><br>' + filelink + docloc) | 6f496c11c687dc43f325271c4ba53d15728c4a8a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/6f496c11c687dc43f325271c4ba53d15728c4a8a/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
2978,
12,
2890,
16,
733,
16,
508,
33,
7036,
16,
681,
33,
7036,
16,
380,
24055,
4672,
3536,
25884,
3982,
7323,
364,
279,
1605,
733,
12123,
508,
273,
733,
16186,
529,
972,
468,
2305... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
2978,
12,
2890,
16,
733,
16,
508,
33,
7036,
16,
681,
33,
7036,
16,
380,
24055,
4672,
3536,
25884,
3982,
7323,
364,
279,
1605,
733,
12123,
508,
273,
733,
16186,
529,
972,
468,
2305... |
try: body = [output, extra] except NameError: body = [output] | body = [output] | def perform_modifyalerts(req, userID, callback='yes', confirm=0): """modify email and password of an account""" (auth_code, auth_message) = is_adminuser(req) if auth_code != 0: return mustloginpage(req, auth_message) subtitle = """<a name="3"></a>3. Modify alerts.   <small>[<a title="See guide" href="%s/admin/webaccess/guide.html#4">?</a>]</small>""" % weburl res = run_sql("SELECT id, email, password FROM user WHERE id=%s" % userID) output = "" if res: text = """To modify the alerts for this account, you have to login as the user.""" output += createhiddenform(action="%s/youraccount/login?" % sweburl, text=text, p_email=res[0][1], p_pw=res[0][2], referer="%s/youralerts/display" % weburl, button="Login") output += "Remember that you will be logged out as the current user." res= """ SELECT q.id, q.urlargs, a.id_basket, a.alert_name, a.frequency, a.notification, DATE_FORMAT(a.date_creation,'%%d %%b %%Y'), DATE_FORMAT(a.date_lastrun,'%%d %%b %%Y') FROM query q, user_query_basket a WHERE a.id_user='%s' AND a.id_query=q.id ORDER BY a.alert_name ASC """ % userID #res = run_sql(res) #for (qID, qurlargs, id_basket, alertname, frequency, notification, date_creation, date_lastrun) in res: # output += "%s - %s - %s - %s - %s - %s - %s<br>" % (qID, id_basket, alertname, frequency, notification, date_creation, date_lastrun) else: output += '<b><span class="info">The account id given does not exist.</span></b>' try: body = [output, extra] except NameError: body = [output] if callback: return perform_editaccount(req, userID, mtype='perform_modifyalerts', content=addadminbox(subtitle, body), callback='yes') else: return addadminbox(subtitle, body) | 8e6aa1042563d2e1f44b1ffbe6e50d6cd67dbacc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1931/8e6aa1042563d2e1f44b1ffbe6e50d6cd67dbacc/webaccessadmin_lib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3073,
67,
17042,
11798,
87,
12,
3658,
16,
16299,
16,
1348,
2218,
9707,
2187,
6932,
33,
20,
4672,
3536,
17042,
2699,
471,
2201,
434,
392,
2236,
8395,
225,
261,
1944,
67,
710,
16,
1357,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3073,
67,
17042,
11798,
87,
12,
3658,
16,
16299,
16,
1348,
2218,
9707,
2187,
6932,
33,
20,
4672,
3536,
17042,
2699,
471,
2201,
434,
392,
2236,
8395,
225,
261,
1944,
67,
710,
16,
1357,
... |
def _fetch_row(self): return self._result.fetch(1)[0] def _fetch_rows(self, size): return self._result.fetch(size) def _fetch_all_rows(self): r = list(self._result.fetch(self.arraysize)) while len(r) >= self.arraysize: rows = self._result.fetch(self.arraysize) if not rows: break r.extend(list(rows)) return r | def _fetch_row(self): return self._result.fetch_row(1)[0] def _fetch_rows(self, size): return self._result.fetch_row(size) def _fetch_all_rows(self): return _fetchall(self._result, self.arraysize) | def _fetch_row(self): return self._result.fetch(1)[0] | 47edf13df137fea66f12ca636de5f3fc396f8007 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10477/47edf13df137fea66f12ca636de5f3fc396f8007/MySQLdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5754,
67,
492,
12,
2890,
4672,
327,
365,
6315,
2088,
18,
5754,
12,
21,
25146,
20,
65,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
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,
389,
5754,
67,
492,
12,
2890,
4672,
327,
365,
6315,
2088,
18,
5754,
12,
21,
25146,
20,
65,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
print data | self.dprint(data) | def getHeatMapByFocalPlane(self, iter): """Generate a heat map using focal planes Fast for BIP and BIL, slow for BSQ. This is a slightly more complicated algorithm that uses focal planes to create the histogram. Because there's an extra python loop inside this method, the theoretical speed of this method is slower than L{getHistogramByBand}. However, because BIL and BIP cubes are structured to read focal plane images very quickly, this method is many times faster than L{getHistogramByBand} when both cubes are BIL or BIP. If one cube is BSQ, it's probably faster to use L{getHistogramByBand} because more work is done by numpy. """ self.heatmap = HSI.createCube('bsq', self.lines, self.samples, 1, self.dtype) data = self.heatmap.getBandRaw(0) bblmask = self.getFocalPlaneBadBandMask() | 9cc281a7c8026f3be4d9fe9fd8900a244ecb43ea /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11522/9cc281a7c8026f3be4d9fe9fd8900a244ecb43ea/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
5256,
270,
863,
858,
42,
23735,
19505,
12,
2890,
16,
1400,
4672,
3536,
4625,
279,
19347,
852,
1450,
284,
23735,
31634,
225,
9545,
364,
605,
2579,
471,
605,
2627,
16,
11816,
364,
605... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5256,
270,
863,
858,
42,
23735,
19505,
12,
2890,
16,
1400,
4672,
3536,
4625,
279,
19347,
852,
1450,
284,
23735,
31634,
225,
9545,
364,
605,
2579,
471,
605,
2627,
16,
11816,
364,
605... |
C{r.NormalizePythonInterpreterVersion([I{filterexp}], I{exceptions=filterexp}, I{versionMap=((from, to), ...)}])} | C{r.NormalizePythonInterpreterVersion([I{filterexp}], [I{exceptions=filterexp}i], [I{versionMap=((from, to), ...)}])} | def removeStack(line): m = stackRe.match(line) if m: return '%s include %s\n'%(m.group(1), m.group(2)) return line | 1f612c8912f7889332a7448eef7bd19644fed99e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8744/1f612c8912f7889332a7448eef7bd19644fed99e/normalize.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
2624,
12,
1369,
4672,
312,
273,
2110,
426,
18,
1916,
12,
1369,
13,
309,
312,
30,
327,
1995,
87,
2341,
738,
87,
64,
82,
11,
17105,
81,
18,
1655,
12,
21,
3631,
312,
18,
1655,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
2624,
12,
1369,
4672,
312,
273,
2110,
426,
18,
1916,
12,
1369,
13,
309,
312,
30,
327,
1995,
87,
2341,
738,
87,
64,
82,
11,
17105,
81,
18,
1655,
12,
21,
3631,
312,
18,
1655,
1... |
acc_dest = move.location_dest_id.account_id.id | acc_dest = move.location_dest_id.account_id.id | def action_done(self, cr, uid, ids, context=None): track_flag=False for move in self.browse(cr, uid, ids): if move.move_dest_id.id and (move.state != 'done'): cr.execute('insert into stock_move_history_ids (parent_id,child_id) values (%s,%s)', (move.id, move.move_dest_id.id)) if move.move_dest_id.state in ('waiting','confirmed'): self.write(cr, uid, [move.move_dest_id.id], {'state':'assigned'}) if move.move_dest_id.picking_id: wf_service = netsvc.LocalService("workflow") wf_service.trg_write(uid, 'stock.picking', move.move_dest_id.picking_id.id, cr) else: pass # self.action_done(cr, uid, [move.move_dest_id.id]) if move.move_dest_id.auto_validate: self.action_done(cr, uid, [move.move_dest_id.id], context=context) | 369221b47101072e094ad2d02fe2edd2b47690aa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/369221b47101072e094ad2d02fe2edd2b47690aa/stock.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
8734,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
33,
7036,
4672,
3298,
67,
6420,
33,
8381,
364,
3635,
316,
365,
18,
25731,
12,
3353,
16,
4555,
16,
3258,
4672,
309,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1301,
67,
8734,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
33,
7036,
4672,
3298,
67,
6420,
33,
8381,
364,
3635,
316,
365,
18,
25731,
12,
3353,
16,
4555,
16,
3258,
4672,
309,
36... |
self.gridlayout9.addWidget(self.textLabel1_5,1,0,1,1) spacerItem6 = QtGui.QSpacerItem(189,20,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Minimum) self.gridlayout9.addItem(spacerItem6,2,0,1,1) | self.gridlayout7.addWidget(self.textLabel1_5,1,0,1,1) spacerItem7 = QtGui.QSpacerItem(189,20,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Minimum) self.gridlayout7.addItem(spacerItem7,2,0,1,1) | def setupUi(self, UserPrefsDialog): UserPrefsDialog.setObjectName("UserPrefsDialog") UserPrefsDialog.resize(QtCore.QSize(QtCore.QRect(0,0,609,642).size()).expandedTo(UserPrefsDialog.minimumSizeHint())) | 30deb2219e016847d91b37e801c50b75fbd1c3cf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/30deb2219e016847d91b37e801c50b75fbd1c3cf/UserPrefsDialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
13943,
12,
2890,
16,
2177,
1386,
2556,
6353,
4672,
2177,
1386,
2556,
6353,
18,
542,
16707,
2932,
1299,
1386,
2556,
6353,
7923,
2177,
1386,
2556,
6353,
18,
15169,
12,
23310,
4670,
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,
3875,
13943,
12,
2890,
16,
2177,
1386,
2556,
6353,
4672,
2177,
1386,
2556,
6353,
18,
542,
16707,
2932,
1299,
1386,
2556,
6353,
7923,
2177,
1386,
2556,
6353,
18,
15169,
12,
23310,
4670,
18,... |
filename = os.path.join(bundlecontents, item) infoarray = parsePkgRefs(filename) return infoarray | filename = os.path.join(bundlecontents, item) dom = minidom.parse(filename) pkgrefs = dom.getElementsByTagName("pkg-ref") if pkgrefs: for ref in pkgrefs: fileref = getText(ref.childNodes) if fileref.startswith("file:"): relativepath = urllib2.unquote(fileref[5:]) subpkgpath = os.path.join(pkgpath, relativepath) if os.path.exists(subpkgpath): pkginfo = getBundlePackageInfo(subpkgpath) if pkginfo: infoarray.extend(pkginfo) if infoarray: return infoarray | def getBundlePackageInfo(pkgpath): infoarray = [] if pkgpath.endswith(".pkg"): pkginfo = getOnePackageInfo(pkgpath) if pkginfo: infoarray.append(pkginfo) return infoarray bundlecontents = os.path.join(pkgpath, "Contents") if os.path.exists(bundlecontents): for item in os.listdir(bundlecontents): if item.endswith(".dist"): filename = os.path.join(bundlecontents, item) infoarray = parsePkgRefs(filename) return infoarray # no .dist file found, look for packages in subdirs dirsToSearch = [] plistpath = os.path.join(pkgpath, "Contents", "Info.plist") if os.path.exists(plistpath): pl = FoundationPlist.readPlist(plistpath) if 'IFPkgFlagComponentDirectory' in pl: dirsToSearch.append(pl['IFPkgFlagComponentDirectory']) if dirsToSearch == []: dirsToSearch = ['Contents', 'Contents/Packages', 'Contents/Resources', 'Contents/Resources/Packages'] for subdir in dirsToSearch: searchdir = os.path.join(pkgpath, subdir) if os.path.exists(searchdir): for item in os.listdir(searchdir): itempath = os.path.join(searchdir, item) if os.path.isdir(itempath) and itempath.endswith(".pkg"): pkginfo = getOnePackageInfo(itempath) if pkginfo: infoarray.append(pkginfo) return infoarray | 7556630385226ce39e8048180b9fee2eefda4753 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6241/7556630385226ce39e8048180b9fee2eefda4753/munkicommon.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10946,
2261,
966,
12,
10657,
803,
4672,
1123,
1126,
273,
5378,
225,
309,
3475,
803,
18,
5839,
1918,
2932,
18,
10657,
6,
4672,
3475,
1376,
273,
20863,
2261,
966,
12,
10657,
803,
13,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10946,
2261,
966,
12,
10657,
803,
4672,
1123,
1126,
273,
5378,
225,
309,
3475,
803,
18,
5839,
1918,
2932,
18,
10657,
6,
4672,
3475,
1376,
273,
20863,
2261,
966,
12,
10657,
803,
13,
309,
... |
subjobsize = datasetSizes[dataset] / nrjob / (1024*1024) while subjobsize > maxsize: warn = True self.numfiles = self.numfiles - 1 if self.numfiles < 1: self.numfiles = 1 nrjob = int(math.ceil(len(guids)/float(self.numfiles))) self.numfiles = int(math.ceil(len(guids)/float(nrjob))) | if self.filesize > 0 or job.backend._name in [ 'NG', 'Panda']: warn = False maxsize = self.filesize if job.backend._name == 'NG': maxsize = config['MaxFileSizeNGDQ2JobSplitter'] elif job.backend._name == 'Panda': maxsize = config['MaxFileSizePandaDQ2JobSplitter'] elif job.backend._name == 'LCG': nrjob = 1 self.numfiles = len(guids) | def split(self,job): | d334c706fa3e502704ced4a30ce79dd40347cd87 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/d334c706fa3e502704ced4a30ce79dd40347cd87/DQ2JobSplitter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1416,
12,
2890,
16,
4688,
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,
... | [
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1416,
12,
2890,
16,
4688,
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,
-10... |
return version version = getversion() if version: f = file("mercurial/__version__.py", "w") f.write(' f.write('version = "%s"\n' % version) f.close() else: version = "unknown" | if version: f = file("mercurial/__version__.py", "w") f.write(' f.write('version = "%s"\n' % version) f.close() try: from mercurial import __version__ version = __version__.version except ImportError: version = 'unknown' | def getversion(): if not os.path.exists('.hg'): return None # not in a repository # execute hg out of this directory with a custom environment which # includes the pure Python modules in mercurial/pure pypath = os.environ.get('PYTHONPATH', '') purepath = os.path.join('mercurial', 'pure') os.environ['PYTHONPATH'] = os.pathsep.join(['mercurial', purepath, pypath]) os.environ['HGRCPATH'] = '' # do not read any config file cmd = '%s hg id -it' % sys.executable try: l = os.popen(cmd).read().split() except OSError, e: print "warning: could not establish Mercurial version: %s" % e os.environ['PYTHONPATH'] = pypath while len(l) > 1 and l[-1][0].isalpha(): # remove non-numbered tags l.pop() if l: version = l[-1] # latest tag or revision number if version.endswith('+'): version += time.strftime('%Y%m%d') return version | a197171549b1275b06fb07d3908d32a4aae8087f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/a197171549b1275b06fb07d3908d32a4aae8087f/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
1589,
13332,
309,
486,
1140,
18,
803,
18,
1808,
2668,
18,
26981,
11,
4672,
327,
599,
468,
486,
316,
279,
3352,
225,
468,
1836,
22576,
596,
434,
333,
1867,
598,
279,
1679,
3330,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
1589,
13332,
309,
486,
1140,
18,
803,
18,
1808,
2668,
18,
26981,
11,
4672,
327,
599,
468,
486,
316,
279,
3352,
225,
468,
1836,
22576,
596,
434,
333,
1867,
598,
279,
1679,
3330,
14... |
related_name=model_cls._meta.verbose_name_plural) | related_name=model_cls.__name__) | def register(model_cls, config_cls=EavConfig): """ Inject eav features into the given model and attach a signal listener to it for setup. """ cls_id = get_unique_class_identifier(model_cls) if cls_id in EavRegistry.cache: return config_cls = EavRegistry.wrap_config_class(model_cls, config_cls) post_init.connect(EavRegistry.attach, sender=model_cls) post_save.connect(EavEntity.save_handler, sender=model_cls) EavRegistry.cache[cls_id] = { 'config_cls': config_cls, 'model_cls': model_cls } | edb58a347b302174da90e16f6edb089fac050c21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11809/edb58a347b302174da90e16f6edb089fac050c21/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1744,
12,
2284,
67,
6429,
16,
642,
67,
6429,
33,
41,
842,
809,
4672,
3536,
20085,
425,
842,
4467,
1368,
326,
864,
938,
471,
3306,
279,
4277,
2991,
358,
518,
364,
3875,
18,
3536,
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,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1744,
12,
2284,
67,
6429,
16,
642,
67,
6429,
33,
41,
842,
809,
4672,
3536,
20085,
425,
842,
4467,
1368,
326,
864,
938,
471,
3306,
279,
4277,
2991,
358,
518,
364,
3875,
18,
3536,
225,
... |
epochtuple = (1970, 1, 1, 0, 0, 0, 0, 0, 0) | epochtuple = (1970, 1, 2, 3, 46, 40, 0, 0, 0) | def _timecvt(self, timestamp): | fc817a29c532287d45bf9ac82ba6e69526d6a4d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7420/fc817a29c532287d45bf9ac82ba6e69526d6a4d6/rgtpclient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
957,
71,
11734,
12,
2890,
16,
2858,
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,... | [
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
957,
71,
11734,
12,
2890,
16,
2858,
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,
... |
if node == None: return (None, data) if len(remainingData) < 5: return (None, data) | def _UnpackOneTerm(data): dataLen = len(data) if len(data) == 0: return (None, data) data0 = ord(data[0]) if data0 == MAGIC_SMALL_INTEGER: if dataLen < 2: return (None, data) n = _ReadInt1(data[1]) return (ErlNumber(n), data[2:]) elif data0 == MAGIC_INTEGER: if dataLen < 5: return (None, data) n = _ReadInt4(data[1:5]) return (ErlNumber(n), data[5:]) elif data0 == MAGIC_FLOAT: if dataLen < 32: return (None, data) floatData = data[1:32] try: nullIndex = string.index(floatData, chr(0)) floatStr = floatData[0:nullIndex] except ValueError: floatStr = floatData f = string.atof(floatStr) return (ErlNumber(f), data[32:]) elif data0 == MAGIC_ATOM: if dataLen < 3: return (None, data) atomLen = _ReadInt2(data[1:3]) if dataLen < 3 + atomLen: return (None, data) atomText = data[3:3 + atomLen] return (ErlAtom(atomText), data[3 + atomLen:]) elif data0 == MAGIC_REFERENCE: (node, remainingData) = _UnpackOneTerm(data[1:]) if node == None: return (None, data) if len(remainingData) < 5: return (None, data) id = _ReadId(remainingData[0:4]) creation = _ReadCreation(remainingData[4]) return (ErlRef(node, id, creation), remainingData[5:]) elif data0 == MAGIC_PORT: (node, remainingData) = _UnpackOneTerm(data[1:]) if node == None: return (None, data) if len(remainingData) < 5: return (None, data) id = _ReadId(remainingData[0:4]) creation = _ReadCreation(remainingData[4]) return (ErlPort(node, id, creation), remainingData[5:]) elif data0 == MAGIC_PID: (node, remainingData) = _UnpackOneTerm(data[1:]) if node == None: return (None, data) if len(remainingData) < 9: return (None, data) id = _ReadId(remainingData[0:4], 15) serial = _ReadInt4(remainingData[4:8]) creation = _ReadCreation(remainingData[8]) return (ErlPid(node, id, serial, creation), remainingData[9:]) elif data0 == MAGIC_SMALL_TUPLE: if dataLen < 2: return (None, data) arity = _ReadInt1(data[1]) (elements, remainingData) = _UnpackTermSeq(arity, data[2:]) if elements == None: return (None, data) return (ErlTuple(elements), remainingData) elif data0 == MAGIC_LARGE_TUPLE: if dataLen < 5: return (None, data) arity = _ReadInt4(data[1:5]) (elements, remainingData) = _UnpackTermSeq(arity, data[5:]) if elements == None: return (None, data) return (ErlTuple(elements), remainingData) elif data0 == MAGIC_NIL: return (ErlList([]), data[1:]) elif data0 == MAGIC_STRING: if dataLen < 3: return (None, data) strlen = _ReadInt2(data[1:3]) if dataLen < 3 + strlen: return (None, data) s = data[3:3 + strlen] return (ErlString(s), data[3 + strlen:]) elif data0 == MAGIC_LIST: if dataLen < 5: return (None, data) arity = _ReadInt4(data[1:5]) (elements, remainingData) = _UnpackTermSeq(arity, data[5:]) if elements == None: return (None, data) return (ErlList(elements), remainingData[1:]) # skip MAGIC_NIL elif data0 == MAGIC_BINARY: if dataLen < 5: return (None, data) binlen = _ReadInt4(data[1:5]) if dataLen < 5 + binlen: return (None, data) s = data[5:5 + binlen] return (ErlBinary(s), data[5 + binlen:]) elif data0 == MAGIC_SMALL_BIG: if dataLen < 2: return (None, data) n = _ReadInt1(data[1]) if dataLen < 2 + 1 + n: return (None, data) sign = _ReadInt1(data[2]) bignum = 0L for i in range(n): d = _ReadInt1(data[3 + n - i - 1]) bignum = bignum * 256L + long(d) if sign: bignum = bignum * -1L return (ErlNumber(bignum), data[3 + n:]) elif data0 == MAGIC_LARGE_BIG: if dataLen < 5: return (None, data) n = _ReadInt4(data[1:5]) if dataLen < 5 + 1 + n: return (None, data) sign = _ReadInt1(data[5]) bignum = 0L for i in range(n): d = _ReadInt1(data[6 + n - i - 1]) bignum = bignum * 256L + long(d) if sign: bignum = bignum * -1L return (ErlNumber(bignum), data[6 + n:]) elif data0 == MAGIC_NEW_CACHE: if dataLen < 4: return (None, data) index = _ReadInt1(data[1]) atomLen = _ReadInt2(data[2:4]) if dataLen < 4 + atomLen: return (None, data) atomText = data[4:4 + atomLen] return (ErlAtom(atomText, cache=index), data[4 + atomLen:]) elif data0 == MAGIC_CACHED_ATOM: if dataLen < 2: return (None, data) index = _ReadInt1(data[1]) return (ErlAtom(None, cache=index), data[2:]) elif data0 == MAGIC_NEW_REFERENCE: if dataLen < 3: return (None, data) idLen = _ReadInt2(data[1:3]) (node, remainingData) = _UnpackOneTerm(data[3:]) if node == None: return (None, data) nprim = 4 * idLen if len(remainingData) < 1 + nprim: return (None, data) creation = _ReadCreation(remainingData[0]) remainingData = remainingData[1:] id0 = _ReadId(remainingData[0:4]) ids = [id0] remainingData = remainingData[4:] for i in range(idLen-1): id = _ReadInt4(remainingData[0:4]) remainingData = remainingData[4:] ids.append(id) return (ErlRef(node, ids, creation), remainingData) elif data0 == MAGIC_FUN: if dataLen < 5: return (None, data) freevarsLen = _ReadInt4(data[1:5]) (pid, remainingData1) = _UnpackOneTerm(data[5:]) if pid == None: return (None, data) (module, remainingData2) = _UnpackOneTerm(remainingData1) if module == None: return (None, data) (index, remainingData3) = _UnpackOneTerm(remainingData2) if index == None: return (None, data) (uniq, remainingData4) = _UnpackOneTerm(remainingData3) if uniq == None: return (None, data) (freeVars, remainingData5) = _UnpackTermSeq(freevarsLen,remainingData4) if freeVars == None: return (None, data) print "MAGIC_FUN" print pid print module print index print uniq print freeVars return (ErlFun(pid, module, index, uniq, freeVars), remainingData5) else: print "Bad tag %s" % `data0` return (None, data) | cadc8319939cd691f548c4b841a357df13bff542 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7565/cadc8319939cd691f548c4b841a357df13bff542/erl_term.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
23649,
3335,
4065,
12,
892,
4672,
501,
2891,
273,
562,
12,
892,
13,
225,
309,
562,
12,
892,
13,
422,
374,
30,
327,
261,
7036,
16,
501,
13,
225,
501,
20,
273,
4642,
12,
892,
63... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
23649,
3335,
4065,
12,
892,
4672,
501,
2891,
273,
562,
12,
892,
13,
225,
309,
562,
12,
892,
13,
422,
374,
30,
327,
261,
7036,
16,
501,
13,
225,
501,
20,
273,
4642,
12,
892,
63... | |
mycontext['server_wait_info']={'handle':server_wait_handle,'active':True, 'servers_connected':0, 'lock':getlock()} | mycontext['server_wait_info']={'active':True,'lock':getlock()} | def main(): # Forwarder IP ip = getmyip() FORWARDER_STATE["ip"] = ip # Setup a port for servers to connect server_wait_handle = waitforconn(ip, mycontext['SERVER_PORT'], new_server) mycontext['server_wait_info']={'handle':server_wait_handle,'active':True, 'servers_connected':0, 'lock':getlock()} # Setup a port for clients to connect client_wait_handle = waitforconn(ip, mycontext['CLIENT_PORT'], inbound_connection) # Advertise the forwarder nat_forwarder_advertise(ip,mycontext['SERVER_PORT'],mycontext['CLIENT_PORT']) nat_toggle_advertisement(True) # DEBUG if DEBUG1: print getruntime(),"Forwarder Started on",ip # Periodically check the multiplexers, see if they are alive while True: sleep(CHECK_INTERVAL) # DEBUG if DEBUG3: print getruntime(), "Polling for dead connections." # Check each multiplexer for (id, info) in CONNECTIONS.items(): # Check server type connections for their status if info["type"] == TYPE_MUX: mux = info["mux"] status = mux.isAlive() # Check if the mux is no longer initialized if not status: # DEBUG if DEBUG1: print getruntime(),"Connection #",id,"dead. Removing..." # De-register this server deregister_server(id, None) # if a stopcomm was called check and see if we can do a new waitforconn sleep(WAIT_INTERVAL) #make sure servers are disconnected server_wait_dict = mycontext['server_wait_info'] server_wait_dict['lock'].acquire() if (not server_wait_dict['active']) and (server_wait_dict['servers_connected'] < MAX_SERVERS): #commented out until stopcomm issue is resolved #server_wait_dict['handle'] = waitforconn(ip,mycontext['SERVER_PORT'],new_server) # start advertising the forwarder nat_toggle_advertisement(True) print 'allowing new servers to connect' server_wait_dict['active'] = True server_wait_dict['lock'].release() | 7a3c34460187cdf889fbabd2143f1bd73e2d1af2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/7a3c34460187cdf889fbabd2143f1bd73e2d1af2/forwarder_rpc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
468,
2457,
20099,
2971,
2359,
273,
336,
4811,
625,
1435,
12108,
16777,
4179,
67,
7998,
9614,
625,
11929,
273,
2359,
225,
468,
10939,
279,
1756,
364,
7084,
358,
3077,
1438,
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,
2774,
13332,
468,
2457,
20099,
2971,
2359,
273,
336,
4811,
625,
1435,
12108,
16777,
4179,
67,
7998,
9614,
625,
11929,
273,
2359,
225,
468,
10939,
279,
1756,
364,
7084,
358,
3077,
1438,
67,... |
regex = '\\\\(include|input){([^}]*)}', | regex = '\\\\(?:include|input){([^}]*)}', | def LaTeXScanner(fs = SCons.Node.FS.default_fs): """Return a prototype Scanner instance for scanning LaTeX source files""" ds = LaTeX(name = "LaTeXScanner", suffixes = '$LATEXSUFFIXES', path_variable = 'TEXINPUTS', regex = '\\\\(include|input){([^}]*)}', recursive = 0) return ds | 09a8086dae7ca176cc5513629e5e25f007a57b37 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12817/09a8086dae7ca176cc5513629e5e25f007a57b37/LaTeX.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21072,
21575,
60,
11338,
12,
2556,
273,
20487,
18,
907,
18,
4931,
18,
1886,
67,
2556,
4672,
3536,
990,
279,
4409,
19074,
791,
364,
21138,
21072,
21575,
60,
1084,
1390,
8395,
3780,
273,
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,
21072,
21575,
60,
11338,
12,
2556,
273,
20487,
18,
907,
18,
4931,
18,
1886,
67,
2556,
4672,
3536,
990,
279,
4409,
19074,
791,
364,
21138,
21072,
21575,
60,
1084,
1390,
8395,
3780,
273,
2... |
nodes = [] nodes.extend(flatten_nodes(self.defaults)) nodes.append(self.code) return tuple(nodes) | nodelist = [] nodelist.extend(flatten_nodes(self.defaults)) nodelist.append(self.code) return tuple(nodelist) | def getChildNodes(self): nodes = [] nodes.extend(flatten_nodes(self.defaults)) nodes.append(self.code) return tuple(nodes) | f9790adb2bf17d408a715f552f9ea1f6de672d26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f9790adb2bf17d408a715f552f9ea1f6de672d26/ast.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23895,
12,
2890,
4672,
2199,
273,
5378,
2199,
18,
14313,
12,
16940,
67,
4690,
12,
2890,
18,
7606,
3719,
2199,
18,
6923,
12,
2890,
18,
710,
13,
327,
3193,
12,
4690,
13,
2,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
23895,
12,
2890,
4672,
2199,
273,
5378,
2199,
18,
14313,
12,
16940,
67,
4690,
12,
2890,
18,
7606,
3719,
2199,
18,
6923,
12,
2890,
18,
710,
13,
327,
3193,
12,
4690,
13,
2,
-100,
-100,
... |
host)) | host)) | def prompt_user_passwd(self, host, realm): """Override this in a GUI environment!""" import getpass try: user = raw_input("Enter username for %s at %s: " % (realm, host)) passwd = getpass.getpass("Enter password for %s in %s at %s: " % (user, realm, host)) return user, passwd except KeyboardInterrupt: print return None, None | 70e89305cf7cc2bdb9acab85803dfa4b07ed1b45 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/70e89305cf7cc2bdb9acab85803dfa4b07ed1b45/urllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6866,
67,
1355,
67,
24002,
12,
2890,
16,
1479,
16,
11319,
4672,
3536,
6618,
333,
316,
279,
10978,
3330,
5,
8395,
1930,
31889,
775,
30,
729,
273,
1831,
67,
2630,
2932,
10237,
2718,
364,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6866,
67,
1355,
67,
24002,
12,
2890,
16,
1479,
16,
11319,
4672,
3536,
6618,
333,
316,
279,
10978,
3330,
5,
8395,
1930,
31889,
775,
30,
729,
273,
1831,
67,
2630,
2932,
10237,
2718,
364,
... |
pos = pos + self.len | pos += self.len | def seek(self, pos, mode = 0): if self.closed: raise ValueError, "I/O operation on closed file" if self.buflist: self.buf = self.buf + string.joinfields(self.buflist, '') self.buflist = [] if mode == 1: pos = pos + self.pos elif mode == 2: pos = pos + self.len self.pos = max(0, pos) | c177428ad263e8b29a3f04ac2f49aa68b714fa23 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/c177428ad263e8b29a3f04ac2f49aa68b714fa23/StringIO.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6520,
12,
2890,
16,
949,
16,
1965,
273,
374,
4672,
309,
365,
18,
12204,
30,
1002,
2068,
16,
315,
45,
19,
51,
1674,
603,
4375,
585,
6,
309,
365,
18,
4385,
1098,
30,
365,
18,
4385,
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,
6520,
12,
2890,
16,
949,
16,
1965,
273,
374,
4672,
309,
365,
18,
12204,
30,
1002,
2068,
16,
315,
45,
19,
51,
1674,
603,
4375,
585,
6,
309,
365,
18,
4385,
1098,
30,
365,
18,
4385,
2... |
duration = duration.days * 24 + duration.seconds / 3600 | duration = duration.days * 24 + duration.seconds / float(3600) | def MakeRectForRange(calendarCanvas, startTime, endTime): """ Turn a datetime range into a rectangle that can be drawn on the screen This is a static method, and can be used outside this class """ startPosition = calendarCanvas.getPositionFromDateTime(startTime) # ultimately, I'm not sure that we should be asking the calendarCanvas # directly for dayWidth and hourHeight, we probably need some system # instead similar to getPositionFromDateTime where we pass in a duration duration = (endTime - startTime) duration = duration.days * 24 + duration.seconds / 3600 (cellWidth, cellHeight) = (calendarCanvas.dayWidth, int(duration * calendarCanvas.hourHeight)) return wx.Rect(startPosition.x, startPosition.y, cellWidth, cellHeight) | cd7867f436c5be55899e163b98e9d77315597dfe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/cd7867f436c5be55899e163b98e9d77315597dfe/CalendarCanvas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4344,
6120,
1290,
2655,
12,
11650,
12971,
16,
8657,
16,
13859,
4672,
3536,
22425,
279,
3314,
1048,
1368,
279,
11845,
716,
848,
506,
19377,
603,
326,
5518,
1220,
353,
279,
760,
707,
16,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4344,
6120,
1290,
2655,
12,
11650,
12971,
16,
8657,
16,
13859,
4672,
3536,
22425,
279,
3314,
1048,
1368,
279,
11845,
716,
848,
506,
19377,
603,
326,
5518,
1220,
353,
279,
760,
707,
16,
4... |
del changed['password'] | elif self.nodeid == self.getuid(): set_cookie = password | def showuser(self, message=None): '''Display a user page for editing. Make sure the user is allowed to edit this node, and also check for password changes. ''' if self.user == 'anonymous': raise Unauthorised | 3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42/cgi_client.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
1355,
12,
2890,
16,
883,
33,
7036,
4672,
9163,
4236,
279,
729,
1363,
364,
15755,
18,
4344,
3071,
326,
729,
353,
2935,
358,
3874,
333,
756,
16,
471,
2546,
866,
364,
2201,
3478,
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,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
1355,
12,
2890,
16,
883,
33,
7036,
4672,
9163,
4236,
279,
729,
1363,
364,
15755,
18,
4344,
3071,
326,
729,
353,
2935,
358,
3874,
333,
756,
16,
471,
2546,
866,
364,
2201,
3478,
18... |
print "\tCLSID = " + repr(self.clsid) | print >> stream, "\tCLSID = " + repr(self.clsid) | def WriteClassHeader(self, generator): generator.checkWriteDispatchBaseClass() doc = self.doc print 'class ' + self.python_name + '(DispatchBaseClass):' if doc[1]: print '\t' + build._safeQuotedString(doc[1]) try: progId = pythoncom.ProgIDFromCLSID(self.clsid) print "\t# This class is creatable by the name '%s'" % (progId) except pythoncom.com_error: pass print "\tCLSID = " + repr(self.clsid) if self.coclass_clsid is None: print "\tcoclass_clsid = None" else: print "\tcoclass_clsid = " + repr(self.coclass_clsid) print self.bWritten = 1 | cfd84d318292d699ca53899ee423b08bfb797445 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/cfd84d318292d699ca53899ee423b08bfb797445/genpy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2598,
797,
1864,
12,
2890,
16,
4456,
4672,
4456,
18,
1893,
3067,
5325,
2171,
797,
1435,
997,
273,
365,
18,
2434,
1172,
296,
1106,
296,
397,
365,
18,
8103,
67,
529,
397,
7747,
5325,
217... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2598,
797,
1864,
12,
2890,
16,
4456,
4672,
4456,
18,
1893,
3067,
5325,
2171,
797,
1435,
997,
273,
365,
18,
2434,
1172,
296,
1106,
296,
397,
365,
18,
8103,
67,
529,
397,
7747,
5325,
217... |
repme = "\n*[[:Image:%s]] is also on '''Commons''': [[commons:Image:%s]]" % (self.image, commons_image_with_this_hash[0]) self.report_image(self.image, self.rep_page, self.com, repme, addings = False, regex = regexOnCommons) | def checkImageOnCommons(self): """ Checking if the image is on commons """ wikipedia.output(u'Checking if %s is on commons...' % self.image) commons_site = wikipedia.getSite('commons', 'commons') regexOnCommons = r"\n\*\[\[:Image:%s\]\] is also on '''Commons''': \[\[commons:Image:.*?\]\]$" % self.image imagePage = wikipedia.ImagePage(self.site, 'Image:%s' % self.image) hash_found = imagePage.getHash() commons_image_with_this_hash = commons_site.getImagesFromAnHash(hash_found) if commons_image_with_this_hash != []: wikipedia.output(u'%s is on commons!' % self.image) imagePage = wikipedia.ImagePage(self.site, 'Image:%s' % self.image) on_commons_text = imagePage.getImagePageHtml() if "<div class='sharedUploadNotice'>" in on_commons_text: wikipedia.output(u"But, the image doesn't exist on your project! Skip...") # Problems? Yes! We have to skip the check part for that image! # Because it's on commons but someone has added something on your project. return False elif 'stemma' in self.image.lower() and self.site.lang == 'it': wikipedia.output(u'%s has "stemma" inside, means that it\'s ok.' % self.image) return True # Problems? No, it's only not on commons but the image needs a check else: repme = "\n*[[:Image:%s]] is also on '''Commons''': [[commons:Image:%s]]" % (self.image, commons_image_with_this_hash[0]) self.report_image(self.image, self.rep_page, self.com, repme, addings = False, regex = regexOnCommons) # Problems? No, return True return True else: # Problems? No, return True return True | b6e75dd754772286281aaa370f41558ab9682a19 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/b6e75dd754772286281aaa370f41558ab9682a19/checkimages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
2040,
1398,
6517,
87,
12,
2890,
4672,
3536,
24471,
309,
326,
1316,
353,
603,
24021,
3536,
21137,
18,
2844,
12,
89,
11,
14294,
309,
738,
87,
353,
603,
24021,
7821,
738,
365,
18,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
2040,
1398,
6517,
87,
12,
2890,
4672,
3536,
24471,
309,
326,
1316,
353,
603,
24021,
3536,
21137,
18,
2844,
12,
89,
11,
14294,
309,
738,
87,
353,
603,
24021,
7821,
738,
365,
18,
27... | |
method_not_allowed | method_not_allowed = None | def after_traverse(self, context): """Post-publishing process. Possible actions are wrapping the body into a template, etc.""" pass | eff86ea47d560c10c049b3790b4de48cbfc8765b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12681/eff86ea47d560c10c049b3790b4de48cbfc8765b/resources.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1839,
67,
2033,
2476,
12,
2890,
16,
819,
4672,
3536,
3349,
17,
6543,
310,
1207,
18,
25433,
4209,
854,
14702,
326,
1417,
1368,
279,
1542,
16,
5527,
12123,
1342,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1839,
67,
2033,
2476,
12,
2890,
16,
819,
4672,
3536,
3349,
17,
6543,
310,
1207,
18,
25433,
4209,
854,
14702,
326,
1417,
1368,
279,
1542,
16,
5527,
12123,
1342,
2,
-100,
-100,
-100,
-100,... |
processes = self.WMI.Win32_Process(name="ufo.exe") | processes = self.WMI.Win32_Process(Name="ufo.exe") | def check_process(self): logging.debug("Checking UFO process") # TODO: Get pid for possible kill processes = self.WMI.Win32_Process(name="ufo.exe") logging.debug("ufo process : "+str(processes)) if len(processes)>1 : logging.debug("U.F.O launched twice. Exiting") logging.debug(str([ x.Name for x in processes if x.ProcessId != os.getpid() ])) gui.dialog_error_report(title=u"Impossible de lancer UFO", msg=u"UFO semble déjà en cours d'utilisation.\n" + \ u"Veuillez fermer toutes les fenêtres UFO, et relancer le programme.\n" + \ "Processus :\n" + "\n".join([ x.Name for x in processes if x.ProcessId != os.getpid() ]).strip()) sys.exit(0) | 2a4414940b19698a7ea19dfca94ee9ed9006bb77 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1208/2a4414940b19698a7ea19dfca94ee9ed9006bb77/windowsbackend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
2567,
12,
2890,
4672,
2907,
18,
4148,
2932,
14294,
587,
3313,
1207,
7923,
468,
2660,
30,
968,
4231,
364,
3323,
8673,
8488,
273,
365,
18,
59,
7492,
18,
18049,
1578,
67,
2227,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
2567,
12,
2890,
4672,
2907,
18,
4148,
2932,
14294,
587,
3313,
1207,
7923,
468,
2660,
30,
968,
4231,
364,
3323,
8673,
8488,
273,
365,
18,
59,
7492,
18,
18049,
1578,
67,
2227,
1... |
if not seReadStatus.has_key(se): res = self.__SEActive(se) | if not seReadStatus.has_key( se ): res = self.__SEActive( se ) | def getActiveReplicas(self,lfns): """ Get all the replicas for the SEs which are in Active status for reading. """ res = self.getCatalogReplicas(lfns) if not res['OK']: return res failed = res['Value']['Failed'] seReadStatus = {} lfnReplicas = {} for lfn,replicas in res['Value']['Successful'].items(): for se in replicas.keys(): if not seReadStatus.has_key(se): res = self.__SEActive(se) if res['OK']: seReadStatus[se] = res['Value']['Read'] else: seReadStatus[se] = False if not seReadStatus[se]: replicas.pop(se) lfnReplicas[lfn] = replicas resDict = {'Successful':lfnReplicas,'Failed':failed} return S_OK(resDict) | 9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11960,
17248,
12,
2890,
16,
20850,
2387,
4672,
3536,
968,
777,
326,
21545,
364,
326,
3174,
87,
1492,
854,
316,
8857,
1267,
364,
6453,
18,
3536,
400,
273,
365,
18,
588,
9769,
17248,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11960,
17248,
12,
2890,
16,
20850,
2387,
4672,
3536,
968,
777,
326,
21545,
364,
326,
3174,
87,
1492,
854,
316,
8857,
1267,
364,
6453,
18,
3536,
400,
273,
365,
18,
588,
9769,
17248,
12,
... |
def test_filelike_searching(self): data = BytesIO(self.search_string) | def _search_in_file(self, ac, data): import tempfile tmp = tempfile.TemporaryFile() try: tmp.write(data.encode('ASCII')) tmp.seek(0) return list(ac.filefind(tmp)) finally: tmp.close() def test_large_filelike_searching(self): | def test_filelike_searching(self): data = BytesIO(self.search_string) filefind = self._build('SADHFCAL'.encode('ASCII'), 'bdeg'.encode('ASCII')).filefind | 782b291a49cf5ce70732a34c1045b757b48683d7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12502/782b291a49cf5ce70732a34c1045b757b48683d7/test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3072,
67,
267,
67,
768,
12,
2890,
16,
1721,
16,
501,
4672,
1930,
13275,
1853,
273,
13275,
18,
23808,
1435,
775,
30,
1853,
18,
2626,
12,
892,
18,
3015,
2668,
13756,
26112,
1853,
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,
389,
3072,
67,
267,
67,
768,
12,
2890,
16,
1721,
16,
501,
4672,
1930,
13275,
1853,
273,
13275,
18,
23808,
1435,
775,
30,
1853,
18,
2626,
12,
892,
18,
3015,
2668,
13756,
26112,
1853,
18... |
for arg in args: | for arg_index, arg in enumerate(args): | def __call__(self, *args, **kwargs): t0 = time.time() | 76ea3f45df50c41541c41d786e82e594a36c9ee7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/76ea3f45df50c41541c41d786e82e594a36c9ee7/function_module.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
268,
20,
273,
813,
18,
957,
1435,
2,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
268,
20,
273,
813,
18,
957,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
The normal subgroups of `H = PSL(2,7) \cdot PSL(2,7)` are | The normal subgroups of `H = PSL(2,7) \\times PSL(2,7)` are | def normal_subgroups(self): """ Return the normal subgroups of this group as a (sorted in increasing order) list of permutation groups. The normal subgroups of `H = PSL(2,7) \cdot PSL(2,7)` are `1`, two copies of `PSL(2,7)` and `H` itself, as the following example shows. | 317c35fede8b7240fbdacb4dd62bbce96157450d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/317c35fede8b7240fbdacb4dd62bbce96157450d/permgroup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2212,
67,
1717,
4650,
12,
2890,
4672,
3536,
2000,
326,
2212,
720,
4650,
434,
333,
1041,
487,
279,
261,
10350,
316,
21006,
1353,
13,
666,
434,
17440,
3252,
18,
225,
1021,
2212,
720,
4650,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2212,
67,
1717,
4650,
12,
2890,
4672,
3536,
2000,
326,
2212,
720,
4650,
434,
333,
1041,
487,
279,
261,
10350,
316,
21006,
1353,
13,
666,
434,
17440,
3252,
18,
225,
1021,
2212,
720,
4650,... |
break else: raise ImportError, repr(ext) + " not found" | return if dynload_found: raise ImportError, repr(ext_path) + " not found" | def __load(): import imp, os, sys ext = %r for path in sys.path: if not path.endswith('lib-dynload'): continue ext = os.path.join(path, ext) if os.path.exists(ext): #print "py2app extension module", __name__, "->", ext mod = imp.load_dynamic(__name__, ext) #mod.frozen = 1 break else: raise ImportError, repr(ext) + " not found" else: raise ImportError, "lib-dynload not found" | b9ad10cf20df906c8f3eff525a391b7e77eeab8c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2074/b9ad10cf20df906c8f3eff525a391b7e77eeab8c/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
945,
13332,
1930,
1646,
16,
1140,
16,
2589,
1110,
273,
738,
86,
364,
589,
316,
2589,
18,
803,
30,
309,
486,
589,
18,
5839,
1918,
2668,
2941,
17,
28595,
945,
11,
4672,
1324,
1110,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
945,
13332,
1930,
1646,
16,
1140,
16,
2589,
1110,
273,
738,
86,
364,
589,
316,
2589,
18,
803,
30,
309,
486,
589,
18,
5839,
1918,
2668,
2941,
17,
28595,
945,
11,
4672,
1324,
1110,... |
hosts = [Host.get(hostId[0]) for hostId in publiclist_hosts()] | hosts = [h for h in Host.select(orderBy='country') if not h.is_private() and h.is_active()] | def index(self, *vpath, **params): hosts = [Host.get(hostId[0]) for hostId in publiclist_hosts()] | 13f5b51d029fb43aa35c48307a86242a7f517509 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13031/13f5b51d029fb43aa35c48307a86242a7f517509/controllers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
12,
2890,
16,
380,
90,
803,
16,
2826,
2010,
4672,
7206,
273,
306,
2594,
18,
588,
12,
2564,
548,
63,
20,
5717,
364,
1479,
548,
316,
1071,
1098,
67,
11588,
1435,
65,
2,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
770,
12,
2890,
16,
380,
90,
803,
16,
2826,
2010,
4672,
7206,
273,
306,
2594,
18,
588,
12,
2564,
548,
63,
20,
5717,
364,
1479,
548,
316,
1071,
1098,
67,
11588,
1435,
65,
2,
-100,
-100... |
[1, -0.500000000000000? + 0.866025403784439?*I, -0.500000000000000? - 0.866025403784439?*I] | [1, -0.5000000000... + 0.8660254037...*I, -0.5000000000... - 0.8660254037...*I] | def spectrum(self, laplacian=False): r""" Returns a list of the eigenvalues of the adjacency matrix. | 8af82b9d918feff44e56cda049c0e66557eeaad3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/8af82b9d918feff44e56cda049c0e66557eeaad3/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17970,
12,
2890,
16,
7125,
30538,
2779,
33,
8381,
4672,
436,
8395,
2860,
279,
666,
434,
326,
29831,
434,
326,
25220,
3148,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17970,
12,
2890,
16,
7125,
30538,
2779,
33,
8381,
4672,
436,
8395,
2860,
279,
666,
434,
326,
29831,
434,
326,
25220,
3148,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
type='int') | type='float') | def purge(base_dir, gigs, ignore, dry_run=False): """Delete directories under `base_dir` until `gigs` GB are free Will not delete directories listed in the ignore list.""" gigs *= 1024 * 1024 * 1024 if freespace(base_dir) >= gigs: return dirs = [os.path.join(base_dir, d) for d in os.listdir(base_dir) if os.path.isdir(os.path.join(base_dir, d)) and d not in ignore] dirs.sort(mtime_sort) while dirs and freespace(base_dir) < gigs: d = dirs.pop(0) print "Deleting", d if not dry_run: shutil.rmtree(d, ignore_errors=True) | 08b687b14db4969ffe3477a91e1ef89ee939b686 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6206/08b687b14db4969ffe3477a91e1ef89ee939b686/purge_builds.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11668,
12,
1969,
67,
1214,
16,
314,
360,
87,
16,
2305,
16,
10299,
67,
2681,
33,
8381,
4672,
3536,
2613,
6402,
3613,
1375,
1969,
67,
1214,
68,
3180,
1375,
75,
360,
87,
68,
25069,
854,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11668,
12,
1969,
67,
1214,
16,
314,
360,
87,
16,
2305,
16,
10299,
67,
2681,
33,
8381,
4672,
3536,
2613,
6402,
3613,
1375,
1969,
67,
1214,
68,
3180,
1375,
75,
360,
87,
68,
25069,
854,
... |
def repr_long(self, x, level): | def repr_int(self, x, level): | def repr_long(self, x, level): s = __builtin__.repr(x) # XXX Hope this isn't too slow... if len(s) > self.maxlong: i = max(0, (self.maxlong-3)//2) j = max(0, self.maxlong-3-i) s = s[:i] + '...' + s[len(s)-j:] return s | 4c9695a9d15661c526867e387967f5f3e82bed6f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/4c9695a9d15661c526867e387967f5f3e82bed6f/repr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8480,
67,
474,
12,
2890,
16,
619,
16,
1801,
4672,
272,
273,
1001,
24553,
25648,
12715,
12,
92,
13,
468,
11329,
670,
1306,
333,
5177,
1404,
4885,
11816,
2777,
309,
562,
12,
87,
13,
405,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
474,
12,
2890,
16,
619,
16,
1801,
4672,
272,
273,
1001,
24553,
25648,
12715,
12,
92,
13,
468,
11329,
670,
1306,
333,
5177,
1404,
4885,
11816,
2777,
309,
562,
12,
87,
13,
405,... |
self._catalog._convertBTrees(threshold *1 ) | self._catalog._convertBTrees(threshold) | def manage_convertBTrees(self, threshold=200): """Convert the catalog's data structures to use BTrees package""" tt=time.time() ct=time.clock() self._catalog._convertBTrees(threshold *1 #make sure ints an int) ) tt=time.time()-tt ct=time.clock()-ct return 'Finished conversion in %s seconds (%s cpu)' % (tt, ct) | 926e34b00d1f44c832096455d5a6650bc940d96c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/926e34b00d1f44c832096455d5a6650bc940d96c/ZCatalog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
67,
6283,
38,
26590,
12,
2890,
16,
5573,
33,
6976,
4672,
3536,
2723,
326,
6222,
1807,
501,
12597,
358,
999,
605,
26590,
2181,
8395,
3574,
33,
957,
18,
957,
1435,
5691,
33,
957,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
67,
6283,
38,
26590,
12,
2890,
16,
5573,
33,
6976,
4672,
3536,
2723,
326,
6222,
1807,
501,
12597,
358,
999,
605,
26590,
2181,
8395,
3574,
33,
957,
18,
957,
1435,
5691,
33,
957,
... |
resAtt = jobDB.getJobAttributes(jobID,['OwnerDN','OwnerGroup']) | resAtt = jobDB.getJobAttributes( jobID, ['OwnerDN', 'OwnerGroup'] ) | def selectJob(self, resourceDescription): """ Main job selection function to find the highest priority job matching the resource capacity """ | 059c4744ef6766e0575a5cd4d6f09d892a66a7df /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/059c4744ef6766e0575a5cd4d6f09d892a66a7df/MatcherHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2027,
2278,
12,
2890,
16,
1058,
3291,
4672,
3536,
12740,
1719,
4421,
445,
358,
1104,
326,
9742,
4394,
1719,
3607,
326,
1058,
7519,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2027,
2278,
12,
2890,
16,
1058,
3291,
4672,
3536,
12740,
1719,
4421,
445,
358,
1104,
326,
9742,
4394,
1719,
3607,
326,
1058,
7519,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
defaultItemCheck = False | defaultItemCheck = inisettings['AutoItemCheck'] | def getBook(objectId,eid,full,value,iconPath,modelPath,modb_p): book = MreBook(('BOOK',0,0,0,0)) book.longFids = True book.changed = True book.eid = eid book.full = full book.value = value book.weight = 0.2 book.fid = keep((GPath('Cobl Main.esm'),objectId)) book.text = '<div align="left"><font face=3 color=4444>' book.text += _("Salan's Catalog of %s\r\n\r\n") % full book.iconPath = iconPath book.model = book.getDefault('model') book.model.modPath = modelPath book.model.modb_p = modb_p book.modb = book self.patchFile.BOOK.setRecord(book) return book | f7657b46c1cc4c0ebe998d470c2afc1743ac92de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/f7657b46c1cc4c0ebe998d470c2afc1743ac92de/bosh.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2882,
1184,
12,
1612,
548,
16,
73,
350,
16,
2854,
16,
1132,
16,
3950,
743,
16,
2284,
743,
16,
1711,
70,
67,
84,
4672,
6978,
273,
490,
266,
9084,
12,
2668,
28163,
2187,
20,
16,
20,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2882,
1184,
12,
1612,
548,
16,
73,
350,
16,
2854,
16,
1132,
16,
3950,
743,
16,
2284,
743,
16,
1711,
70,
67,
84,
4672,
6978,
273,
490,
266,
9084,
12,
2668,
28163,
2187,
20,
16,
20,
... |
multiValue ) | multiValue ) | def __buildCondition(self, condDict, older=None, newer=None, timeStamp='LastUpdateTime' ): """ build SQL condition statement from provided condDict and other extra conditions """ condition = '' conjunction = "WHERE" | 99c1bc850ba087890925b3180df206f65bb1d4b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/99c1bc850ba087890925b3180df206f65bb1d4b3/JobDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3510,
3418,
12,
2890,
16,
6941,
5014,
16,
12156,
33,
7036,
16,
16069,
33,
7036,
16,
18198,
2218,
3024,
1891,
950,
11,
262,
30,
3536,
1361,
3063,
2269,
3021,
628,
2112,
6941,
5014,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
3510,
3418,
12,
2890,
16,
6941,
5014,
16,
12156,
33,
7036,
16,
16069,
33,
7036,
16,
18198,
2218,
3024,
1891,
950,
11,
262,
30,
3536,
1361,
3063,
2269,
3021,
628,
2112,
6941,
5014,
... |
400, 400, | 360, 360, | def drawGraph(request, xStart=-180.0, yStart=-180.0, xEnd=180.0, yEnd=180.0, attribute='Observations', xProperty='phi', yProperty='psi', reference=None, residue=None, xBin=10, yBin=10): svg = SVG() x = 55; y = 45; height = 400; width = 400; hashsize = 10 #background svg.rect(x, y, width, height, 1, '#00fffff', '#222222'); #svg.rect(0, 0, width+90, height+90, 1, '#00fffff'); #svg.rect(x, y, width, height, 1, '#666666'); #border svg.rect(x, y, width, height, 1, '#000000'); #axis if xStart < 0 and xEnd > 0: xZero = (width/(xEnd-xStart)) * abs (xStart) svg.line( x+xZero, y, x+xZero, y+height, 1, '#666666'); if yStart < 0 and xEnd > 0: yZero = height+y - (height/(yEnd-yStart)) * abs (yStart) svg.line( x, yZero, x+width, yZero, 1, '#666666'); #hashes for i in range(9): hashx = x+(width/8.0)*i hashy = y+(height/8.0)*i svg.line( hashx, y+height, hashx, y+height+hashsize, 1, '#000000'); svg.line( x, hashy, x-hashsize, hashy, 1, '#000000'); #labels xstep = (xEnd - xStart) / 4 ystep = (yEnd - yStart) / 4 for i in range(5): xtext = xStart + xstep*i xhash = x+(width/4)*i-(2.5*len(str(xtext))) svg.text(xhash, y+height+hashsize*2+3, str(xtext),12) ytext = yEnd - ystep*i yhash = y+(height/4)*i+4 svg.text(x-5-(8*len(str(ytext))), yhash, str(ytext),12) #title text len1 = 220 - len(xProperty)*7/2 - len(xProperty)*7/2 len2 = 182 - len(attribute)*7/2 svg.text(len1,15, 'Plot of %s vs. %s' % (xProperty,yProperty), 12) svg.text(len2,35, 'Shading Based Off of %s' % attribute, 12) cdp = ConfDistPlot( 400, #height 400, #width 0, #Xpadding 0, #Ypadding x, #Xoffset y, #Yoffset xStart, #Xstart xEnd, #Xend yStart, #Ystart yEnd, #Yend xBin, #Xbin yBin, #Ybin xProperty, #X property yProperty, #Y property attribute, #property residue, #residue Index #reference request.session['search'].querySet() ) boxes = cdp.Plot() return (svg,boxes) | 29369efcb698022e11c3c1503b781a33276d2219 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6163/29369efcb698022e11c3c1503b781a33276d2219/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
4137,
12,
2293,
16,
619,
1685,
29711,
18278,
18,
20,
16,
677,
1685,
29711,
18278,
18,
20,
16,
619,
1638,
33,
18278,
18,
20,
16,
677,
1638,
33,
18278,
18,
20,
16,
1566,
2218,
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,
3724,
4137,
12,
2293,
16,
619,
1685,
29711,
18278,
18,
20,
16,
677,
1685,
29711,
18278,
18,
20,
16,
619,
1638,
33,
18278,
18,
20,
16,
677,
1638,
33,
18278,
18,
20,
16,
1566,
2218,
26... |
'5.16.2' | '5.16.3' | def maxima_version(): """ EXAMPLES: sage: from sage.interfaces.maxima import maxima_version sage: maxima_version() '5.16.2' """ return os.popen('maxima --version').read().split()[1] | 6c1e1f26c9d8daec615972264e9265548141f7e1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/6c1e1f26c9d8daec615972264e9265548141f7e1/maxima.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
943,
13888,
67,
1589,
13332,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
628,
272,
410,
18,
15898,
18,
1896,
13888,
1930,
943,
13888,
67,
1589,
272,
410,
30,
943,
13888,
67,
1589,
1435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
943,
13888,
67,
1589,
13332,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
628,
272,
410,
18,
15898,
18,
1896,
13888,
1930,
943,
13888,
67,
1589,
272,
410,
30,
943,
13888,
67,
1589,
1435,
... |
self.o.display = self.saveDisp | self.o.setDisplay(self.saveDisp) | def restore_patches(self): self.o.display = self.saveDisp self.o.selatom = None | ebf76559b4980a1fbd16e87ccfd14cec0f9daf39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/ebf76559b4980a1fbd16e87ccfd14cec0f9daf39/depositMode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5217,
67,
30278,
12,
2890,
4672,
365,
18,
83,
18,
542,
4236,
12,
2890,
18,
5688,
1669,
84,
13,
365,
18,
83,
18,
1786,
7466,
273,
599,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5217,
67,
30278,
12,
2890,
4672,
365,
18,
83,
18,
542,
4236,
12,
2890,
18,
5688,
1669,
84,
13,
365,
18,
83,
18,
1786,
7466,
273,
599,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
self.reclist = HitSet(Numeric.loads(zlib.decompress(res[0][5]))) | self.reclist = HitSet(Numeric.loads(zlib.decompress(res[0][4]))) | def __init__(self, name=""): "Creates collection instance by querying the DB configuration database about 'name'." self.calculate_reclist_run_already = 0 # to speed things up wihtout much refactoring self.update_reclist_run_already = 0 # to speed things up wihtout much refactoring self.reclist_with_nonpublic_subcolls = HitSet() if not name: self.name = cdsname # by default we are working on the home page self.id = 1 self.dbquery = None self.nbrecs = None self.reclist = HitSet() else: self.name = name query = "SELECT id,name,dbquery,nbrecs,reclist FROM collection WHERE name='%s'" % escape_string(name) try: res = run_sql(query, None, 1) if res: self.id = res[0][0] self.name = res[0][1] self.dbquery = res[0][2] self.nbrecs = res[0][3] try: self.reclist = HitSet(Numeric.loads(zlib.decompress(res[0][5]))) except: self.reclist = HitSet() else: # collection does not exist! self.id = None self.dbquery = None self.nbrecs = None self.reclist = HitSet() except Error, e: print "Error %d: %s" % (e.args[0], e.args[1]) sys.exit(1) | b59a2887f01a5ef762b93334b01eaba0f51f7ffb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2139/b59a2887f01a5ef762b93334b01eaba0f51f7ffb/websearch_webcoll.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
1546,
6,
4672,
315,
2729,
1849,
791,
635,
23936,
326,
2383,
1664,
2063,
2973,
296,
529,
14550,
365,
18,
11162,
67,
266,
830,
376,
67,
2681,
67,
1758... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
1546,
6,
4672,
315,
2729,
1849,
791,
635,
23936,
326,
2383,
1664,
2063,
2973,
296,
529,
14550,
365,
18,
11162,
67,
266,
830,
376,
67,
2681,
67,
1758... |
files = [os.path.join(test_support.TESTFN, f) for f in filenames] | files = set(filenames) normal_form = None | def deltree(dirname): # Don't hide legitimate errors: if one of these suckers exists, it's # an error if we can't remove it. if os.path.exists(dirname): # must pass unicode to os.listdir() so we get back unicode results. for fname in os.listdir(unicode(dirname)): os.unlink(os.path.join(dirname, fname)) os.rmdir(dirname) | 77a884950570fe8ff00a2d0b88bec5354e6ad887 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/77a884950570fe8ff00a2d0b88bec5354e6ad887/test_pep277.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1464,
3413,
12,
12287,
4672,
468,
7615,
1404,
6853,
4553,
305,
4988,
1334,
30,
225,
309,
1245,
434,
4259,
1597,
363,
414,
1704,
16,
518,
1807,
468,
392,
555,
309,
732,
848,
1404,
1206,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1464,
3413,
12,
12287,
4672,
468,
7615,
1404,
6853,
4553,
305,
4988,
1334,
30,
225,
309,
1245,
434,
4259,
1597,
363,
414,
1704,
16,
518,
1807,
468,
392,
555,
309,
732,
848,
1404,
1206,
... |
dont_limit_starts_with = True else: dont_limit_starts_with = False | def get_word_list_iter(self, start_word): search_pos, starts_with = self.get_search_pos_for(start_word) #print "search_pos: %s, starts_with %s" % (search_pos, starts_with) if not isinstance(search_pos, list): search_pos = [search_pos] dont_limit_starts_with = True else: #This means we deal with broken portion of dictionary were words with the same beginnings #are not grouped, so we can't fully use index items that were not in the original short index dont_limit_starts_with = False found = False for pos in search_pos: for item in self.__word_list_iter__(start_word, pos, starts_with, dont_limit_starts_with): if not found and isinstance(item, WordLookup): found = True yield item if not found: u_start_word = start_word.decode(self.encoding) self.ensure_index_depth(len(u_start_word)) self.short_index[len(u_start_word)][u_start_word] = -1 | ce75cf48617cdd59371d923935766223e95571ce /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14305/ce75cf48617cdd59371d923935766223e95571ce/sdict.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1095,
67,
1098,
67,
2165,
12,
2890,
16,
787,
67,
1095,
4672,
1623,
67,
917,
16,
2542,
67,
1918,
273,
365,
18,
588,
67,
3072,
67,
917,
67,
1884,
12,
1937,
67,
1095,
13,
468... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1095,
67,
1098,
67,
2165,
12,
2890,
16,
787,
67,
1095,
4672,
1623,
67,
917,
16,
2542,
67,
1918,
273,
365,
18,
588,
67,
3072,
67,
917,
67,
1884,
12,
1937,
67,
1095,
13,
468... | |
'15 seconds' or '1min 10s'. The time string format is described in an appendix of Robot Framework User Guide. | '15 seconds', '1min 10s' or just '10'. The time string format is described in an appendix of Robot Framework User Guide. | def wait_until_created(self, path, timeout='1 minute'): """Waits until the given file or directory is created. | b0324068466ff6a2984e186156907032736ca345 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7408/b0324068466ff6a2984e186156907032736ca345/OperatingSystem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2529,
67,
12198,
67,
4824,
12,
2890,
16,
589,
16,
2021,
2218,
21,
8044,
11,
4672,
3536,
26153,
3180,
326,
864,
585,
578,
1867,
353,
2522,
18,
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,
2529,
67,
12198,
67,
4824,
12,
2890,
16,
589,
16,
2021,
2218,
21,
8044,
11,
4672,
3536,
26153,
3180,
326,
864,
585,
578,
1867,
353,
2522,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
show the current time | Shows the current time. Activate with: plugin.activate('idlebar.clock', level=50) Note: The clock will always be displayed on the right side of the idlebar. | def draw(self, (type, object), x, osd): return | d4bead8f4304ca81687cb0fe137a4c581dbf6103 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/d4bead8f4304ca81687cb0fe137a4c581dbf6103/idlebar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
12,
2890,
16,
261,
723,
16,
733,
3631,
619,
16,
1140,
72,
4672,
327,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
12,
2890,
16,
261,
723,
16,
733,
3631,
619,
16,
1140,
72,
4672,
327,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return self.nlevel - 0x100 | return self.nlevel | def getNoiselevel(self): """ returns noise level """ return self.nlevel - 0x100 | 18b2d105b8dbefad8eab230de77e2c5bbabd1b6d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3159/18b2d105b8dbefad8eab230de77e2c5bbabd1b6d/iwlibs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
2279,
291,
6516,
941,
12,
2890,
4672,
3536,
1135,
10825,
1801,
3536,
327,
365,
18,
82,
2815,
300,
374,
92,
6625,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
2279,
291,
6516,
941,
12,
2890,
4672,
3536,
1135,
10825,
1801,
3536,
327,
365,
18,
82,
2815,
300,
374,
92,
6625,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
(exactmatched, matched, unmatched) = yum.packages.parsePackages(self.pkgSack.returnPackages(), self.pkglist, casematch=1) | (exactmatched, matched, unmatched) = yum.packages.parsePackages(self.pkgSack.returnPackages(), searchlist, casematch=1) | def getPackageObjects(self): """Cycle through the list of packages, get package object matches, and resolve deps. | be44e2527d8134ec855e844728a1201a6db6ce2b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8489/be44e2527d8134ec855e844728a1201a6db6ce2b/gather.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11506,
4710,
12,
2890,
4672,
3536,
13279,
3059,
326,
666,
434,
5907,
16,
336,
2181,
733,
1885,
16,
471,
2245,
8740,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11506,
4710,
12,
2890,
4672,
3536,
13279,
3059,
326,
666,
434,
5907,
16,
336,
2181,
733,
1885,
16,
471,
2245,
8740,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
except TypeError: self.dispatcher = self.trace_dispatch_i | def get_time_timer(timer=timer, reduce=reduce, reducer=operator.add): return reduce(reducer, timer(), 0) self.get_time = get_time_timer | def __init__(self, timer=None): self.timings = {} self.cur = None self.cmd = "" | bc75e8f6af740f0d3b26d6eeaa9a4428ce268142 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/bc75e8f6af740f0d3b26d6eeaa9a4428ce268142/profile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5441,
33,
7036,
4672,
365,
18,
8584,
899,
273,
2618,
365,
18,
1397,
273,
599,
365,
18,
4172,
273,
1408,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5441,
33,
7036,
4672,
365,
18,
8584,
899,
273,
2618,
365,
18,
1397,
273,
599,
365,
18,
4172,
273,
1408,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if not self.data_channel: | dc = self.data_channel if dc is not None and dc.transfer_in_progress(): self.quit_pending = True else: | def ftp_QUIT(self, line): """Quit the current session.""" # From RFC-959: # This command terminates a USER and if file transfer is not # in progress, the server closes the control connection. # If file transfer is in progress, the connection will remain # open for result response and the server will then close it. if self.authenticated: msg_quit = self.authorizer.get_msg_quit(self.username) else: msg_quit = "Goodbye." if len(msg_quit) <= 75: self.respond("221 %s" %msg_quit) else: self.push("221-%s\r\n" %msg_quit) self.respond("221 ") | b72be3883869c0d6338fc8636991ea45b11add17 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7236/b72be3883869c0d6338fc8636991ea45b11add17/ftpserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13487,
67,
3500,
1285,
12,
2890,
16,
980,
4672,
3536,
25365,
326,
783,
1339,
12123,
468,
6338,
8372,
17,
29,
6162,
30,
468,
1220,
1296,
30559,
279,
7443,
471,
309,
585,
7412,
353,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13487,
67,
3500,
1285,
12,
2890,
16,
980,
4672,
3536,
25365,
326,
783,
1339,
12123,
468,
6338,
8372,
17,
29,
6162,
30,
468,
1220,
1296,
30559,
279,
7443,
471,
309,
585,
7412,
353,
486,
... |
s = Server() s.run() | def generate_html() : html_content = g_html_head for client in sorted(g_client_table.keys()) : html_content += '<p><strong>' + client + '</strong>: ' + g_client_table[client] + '</p>\n' html_content += g_html_tail | def run(self): running = 1 while running: message = self.client.recv(self.size) if message: g_mutex.acquire() | c346a2c9da8a2cb2f66a94285f258c85af4c7aa1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/228/c346a2c9da8a2cb2f66a94285f258c85af4c7aa1/server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
3549,
273,
404,
1323,
3549,
30,
883,
273,
365,
18,
2625,
18,
18334,
12,
2890,
18,
1467,
13,
309,
883,
30,
314,
67,
29946,
18,
1077,
1039,
1435,
2,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1086,
12,
2890,
4672,
3549,
273,
404,
1323,
3549,
30,
883,
273,
365,
18,
2625,
18,
18334,
12,
2890,
18,
1467,
13,
309,
883,
30,
314,
67,
29946,
18,
1077,
1039,
1435,
2,
-100,
-100,
-... |
return type, rate, nchannels, data_size/frame_size, sample_bits | return type, rate, nchannels, data_size//frame_size, sample_bits | def test_au(h, f): if h[:4] == '.snd': f = get_long_be elif h[:4] in ('\0ds.', 'dns.'): f = get_long_le else: return None type = 'au' hdr_size = f(h[4:8]) data_size = f(h[8:12]) encoding = f(h[12:16]) rate = f(h[16:20]) nchannels = f(h[20:24]) sample_size = 1 # default if encoding == 1: sample_bits = 'U' elif encoding == 2: sample_bits = 8 elif encoding == 3: sample_bits = 16 sample_size = 2 else: sample_bits = '?' frame_size = sample_size * nchannels return type, rate, nchannels, data_size/frame_size, sample_bits | 9387a63f18dc612bd7e851821e30ca5e6d28e8db /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/9387a63f18dc612bd7e851821e30ca5e6d28e8db/sndhdr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
8377,
12,
76,
16,
284,
4672,
309,
366,
10531,
24,
65,
422,
2418,
87,
4880,
4278,
284,
273,
336,
67,
5748,
67,
2196,
1327,
366,
10531,
24,
65,
316,
7707,
64,
20,
2377,
1093,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8377,
12,
76,
16,
284,
4672,
309,
366,
10531,
24,
65,
422,
2418,
87,
4880,
4278,
284,
273,
336,
67,
5748,
67,
2196,
1327,
366,
10531,
24,
65,
316,
7707,
64,
20,
2377,
1093,... |
def __init__(self, *args, **kwargs): r = super(ir_attachment, self).__init__(*args, **kwargs) self.pool.get('ir.model.access').register_cache_clearing_method(self._name, 'clear_cache') return r def __del__(self): self.pool.get('ir.model.access').unregister_cache_clearing_method(self._name, 'clear_cache') return super(ir_attachment, self).__del__() | def action_get(self, cr, uid, context=None): dataobj = self.pool.get('ir.model.data') data_id = dataobj._get_id(cr, 1, 'base', 'action_attachment') res_id = dataobj.browse(cr, uid, data_id, context).res_id return self.pool.get('ir.actions.act_window').read(cr, uid, res_id, [], context) | f8820e4506597dc1b00db783e6a54bf8dbb20374 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12853/f8820e4506597dc1b00db783e6a54bf8dbb20374/ir_attachment.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
819,
33,
7036,
4672,
501,
2603,
273,
365,
18,
6011,
18,
588,
2668,
481,
18,
2284,
18,
892,
6134,
501,
67,
350,
273,
501,
2603,
6315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1301,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
819,
33,
7036,
4672,
501,
2603,
273,
365,
18,
6011,
18,
588,
2668,
481,
18,
2284,
18,
892,
6134,
501,
67,
350,
273,
501,
2603,
6315,
... | |
'user_email': fields.function(_email_get, method=True, fnct_inv=_email_set, string='Email', type="char"), | 'user_email': fields.function(_email_get, method=True, fnct_inv=_email_set, string='Email', type="char", size=240), | def _email_set(self, cr, uid, ids, name, value, arg, context=None): if not isinstance(ids,list): ids = [ids] address_obj = self.pool.get('res.partner.address') for user in self.browse(cr, uid, ids, context=context): if user.address_id: address_obj.write(cr, uid, user.address_id.id, {'email': value or None}, context=context) else: address_id = address_obj.create(cr, uid, {'name': user.name, 'email': value or None}, context=context) self.write(cr, uid, ids, {'address_id': address_id}, context) return True | 1548395ba2d1e3808f68f59a514dbce787ceef0c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/1548395ba2d1e3808f68f59a514dbce787ceef0c/res_user.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3652,
67,
542,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
460,
16,
1501,
16,
819,
33,
7036,
4672,
309,
486,
1549,
12,
2232,
16,
1098,
4672,
3258,
273,
306,
2232,
65,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3652,
67,
542,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
460,
16,
1501,
16,
819,
33,
7036,
4672,
309,
486,
1549,
12,
2232,
16,
1098,
4672,
3258,
273,
306,
2232,
65,
... |
k = len(G.rows()) | def module_composition_factors(self,gp): r""" Prints the GAP record of the Meataxe composition factors module in Meataxe notation. | 90ff33abb51043d1baa7fdf15f610546756cd0b7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/90ff33abb51043d1baa7fdf15f610546756cd0b7/linear_code.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1605,
67,
24388,
67,
22108,
12,
2890,
16,
6403,
4672,
436,
8395,
3038,
87,
326,
611,
2203,
1409,
434,
326,
7499,
396,
6554,
16919,
14490,
1605,
316,
7499,
396,
6554,
12155,
18,
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,
1605,
67,
24388,
67,
22108,
12,
2890,
16,
6403,
4672,
436,
8395,
3038,
87,
326,
611,
2203,
1409,
434,
326,
7499,
396,
6554,
16919,
14490,
1605,
316,
7499,
396,
6554,
12155,
18,
2,
-100,
... | |
particle.nbest_cand(best.position, bestval, comparator) | if best: particle.nbest_cand(best.position, bestval, comparator) | def pso_reduce(self, key, value_iter): comparator = self.function.comparator particle = None best = None bestval = float('inf') | b345ab5b8704b51fefc4a13bf3ccb4da78f1daf8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/966/b345ab5b8704b51fefc4a13bf3ccb4da78f1daf8/standardpso.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
293,
2048,
67,
12498,
12,
2890,
16,
498,
16,
460,
67,
2165,
4672,
8862,
273,
365,
18,
915,
18,
832,
2528,
20036,
273,
599,
3796,
273,
599,
3796,
1125,
273,
1431,
2668,
10625,
6134,
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,
293,
2048,
67,
12498,
12,
2890,
16,
498,
16,
460,
67,
2165,
4672,
8862,
273,
365,
18,
915,
18,
832,
2528,
20036,
273,
599,
3796,
273,
599,
3796,
1125,
273,
1431,
2668,
10625,
6134,
2,
... |
xy = conf["xy"] or (-1, -1) wh = conf["wh"] or (500, 500) | xy = conf.get("xy", (-1, -1)) wh = conf.get("wh", (500, 500)) | def __init__(self): # threading stuff gtk.gdk.threads_init() gtk.Window.__init__(self) try: self.set_icon( gtk.gdk.pixbuf_new_from_file(urk.path("urk_icon.svg")) ) except: pass | aa65b839226a78951506a01cc59b3d4a3232f358 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10693/aa65b839226a78951506a01cc59b3d4a3232f358/ui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
468,
17254,
10769,
22718,
18,
75,
2883,
18,
12495,
67,
2738,
1435,
225,
22718,
18,
3829,
16186,
2738,
972,
12,
2890,
13,
225,
775,
30,
365,
18,
542,
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,
1001,
2738,
972,
12,
2890,
4672,
468,
17254,
10769,
22718,
18,
75,
2883,
18,
12495,
67,
2738,
1435,
225,
22718,
18,
3829,
16186,
2738,
972,
12,
2890,
13,
225,
775,
30,
365,
18,
542,
67... |
def kwweb_changeset(web, req, tmpl): try: _kwtemplater.matcher = util.never except AttributeError: pass return web.changeset(tmpl, web.changectx(req)) def kwweb_filediff(web, req, tmpl): try: _kwtemplater.matcher = util.never except AttributeError: pass return web.filediff(tmpl, web.filectx(req)) | def kwweb_changeset(web, req, tmpl): try: _kwtemplater.matcher = util.never except AttributeError: pass return web.changeset(tmpl, web.changectx(req)) | fccc3b48cb568f0d49fe72ea7746183f3e259c3d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/fccc3b48cb568f0d49fe72ea7746183f3e259c3d/keyword.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5323,
4875,
67,
6329,
278,
12,
4875,
16,
1111,
16,
10720,
4672,
775,
30,
389,
9987,
27380,
2045,
18,
22761,
273,
1709,
18,
4644,
502,
1335,
6394,
30,
1342,
327,
3311,
18,
6329,
278,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5323,
4875,
67,
6329,
278,
12,
4875,
16,
1111,
16,
10720,
4672,
775,
30,
389,
9987,
27380,
2045,
18,
22761,
273,
1709,
18,
4644,
502,
1335,
6394,
30,
1342,
327,
3311,
18,
6329,
278,
12... | |
parser.add_option('-t', '--timeout', | parser.add_option('-t', '--timeout', | def option_parser(usage=_('%prog URL\n\nWhere URL is for example http://google.com')): parser = OptionParser(usage=usage) parser.add_option('-d', '--base-dir', help=_('Base directory into which URL is saved. Default is %default'), default='.', type='string', dest='dir') parser.add_option('-t', '--timeout', help=_('Timeout in seconds to wait for a response from the server. Default: %default s'), default=10.0, type='float', dest='timeout') parser.add_option('-r', '--max-recursions', default=1, help=_('Maximum number of levels to recurse i.e. depth of links to follow. Default %default'), type='int', dest='max_recursions') parser.add_option('-n', '--max-files', default=sys.maxint, type='int', dest='max_files', help=_('The maximum number of files to download. This only applies to files from <a href> tags. Default is %default')) parser.add_option('--delay', default=0, dest='delay', type='int', help=_('Minimum interval in seconds between consecutive fetches. Default is %default s')) parser.add_option('--encoding', default=None, help=_('The character encoding for the websites you are trying to download. The default is to try and guess the encoding.')) parser.add_option('--match-regexp', default=[], action='append', dest='match_regexps', help=_('Only links that match this regular expression will be followed. This option can be specified multiple times, in which case as long as a link matches any one regexp, it will be followed. By default all links are followed.')) parser.add_option('--filter-regexp', default=[], action='append', dest='filter_regexps', help=_('Any link that matches this regular expression will be ignored. This option can be specified multiple times, in which case as long as any regexp matches a link, it will be ignored.By default, no links are ignored. If both --filter-regexp and --match-regexp are specified, then --filter-regexp is applied first.')) parser.add_option('--dont-download-stylesheets', action='store_true', default=False, help=_('Do not download CSS stylesheets.'), dest='no_stylesheets') parser.add_option('--verbose', help=_('Show detailed output information. Useful for debugging'), default=False, action='store_true', dest='verbose') return parser | 596b52afac5365d3f7c48b017160fc09530e9c95 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/596b52afac5365d3f7c48b017160fc09530e9c95/simple.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1456,
67,
4288,
12,
9167,
33,
67,
29909,
14654,
1976,
64,
82,
64,
82,
5262,
1976,
353,
364,
3454,
1062,
2207,
9536,
18,
832,
26112,
30,
2082,
273,
18862,
12,
9167,
33,
9167,
13,
2082,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1456,
67,
4288,
12,
9167,
33,
67,
29909,
14654,
1976,
64,
82,
64,
82,
5262,
1976,
353,
364,
3454,
1062,
2207,
9536,
18,
832,
26112,
30,
2082,
273,
18862,
12,
9167,
33,
9167,
13,
2082,
... |
submittedPilots += result['Value'] self.log.info( 'Number of pilots Submitted %s' % submittedPilots ) | toSubmitPilots += result['Value'] self.log.info( 'Number of pilots to be Submitted %s' % self.toSubmitPilots ) if 'Default' in self.pools: self.pools['Default'].processAllResults() self.log.info( 'Number of pilots Submitted %s' % self.submittedPilots ) | def execute(self): """Main Agent code: 1.- Query TaskQueueDB for existing TQs 2.- Add their Priorities 3.- Submit pilots """ | 4fc45f848c73ccd70e55d2692551954ac266f79d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/4fc45f848c73ccd70e55d2692551954ac266f79d/TaskQueueDirector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
4672,
3536,
6376,
8669,
981,
30,
404,
18,
17,
2770,
3837,
3183,
2290,
364,
2062,
399,
53,
87,
576,
18,
17,
1436,
3675,
30326,
1961,
890,
18,
17,
17320,
24970,
6968,
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,
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,
1836,
12,
2890,
4672,
3536,
6376,
8669,
981,
30,
404,
18,
17,
2770,
3837,
3183,
2290,
364,
2062,
399,
53,
87,
576,
18,
17,
1436,
3675,
30326,
1961,
890,
18,
17,
17320,
24970,
6968,
353... |
__version__ = " | __version__ = " | def testMultiply(self): self.assertEquals((0 * 10), 0) self.assertEquals((5 * 8), 40) | 574b8d8adedfa3567f2e1195fa1c0b57337f7057 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/574b8d8adedfa3567f2e1195fa1c0b57337f7057/unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
26040,
12,
2890,
4672,
365,
18,
11231,
8867,
12443,
20,
380,
1728,
3631,
374,
13,
365,
18,
11231,
8867,
12443,
25,
380,
1725,
3631,
8063,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
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,
26040,
12,
2890,
4672,
365,
18,
11231,
8867,
12443,
20,
380,
1728,
3631,
374,
13,
365,
18,
11231,
8867,
12443,
25,
380,
1725,
3631,
8063,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,... |
task = self._install(prvpkg, cs, lk, None, _pruneweight, depth) for res in task: yield res | task = trans.TaskInstall(self, prvpkg, cs, lk, None, _pruneweight, self._yieldweight) for res in task: yield res; _pruneweight=min(_pruneweight,self._pruneweight); task.setWeights(_pruneweight, self._yieldweight) | def _pending(self, changeset, locked, pending, pruneweight, depth=0): depth += 1 if traceVerbosity<4: trace(1, depth, "_pending(pw=%f)", (pruneweight)) else: trace(4, depth, "_pending(%s, pw=%f)", (pending, pruneweight)) | c2ff0e2fa3473e5898baf091e7a39f94abf28732 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8317/c2ff0e2fa3473e5898baf091e7a39f94abf28732/transaction.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9561,
12,
2890,
16,
22463,
16,
8586,
16,
4634,
16,
846,
318,
359,
1274,
16,
3598,
33,
20,
4672,
3598,
1011,
404,
309,
2606,
30594,
32,
24,
30,
2606,
12,
21,
16,
3598,
16,
4192,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9561,
12,
2890,
16,
22463,
16,
8586,
16,
4634,
16,
846,
318,
359,
1274,
16,
3598,
33,
20,
4672,
3598,
1011,
404,
309,
2606,
30594,
32,
24,
30,
2606,
12,
21,
16,
3598,
16,
4192,
... |
container=False): | container=False, synch_job=False): | def __init__(self, machine_label, control_file, platforms=[], container=False): self.machine_label = machine_label self.control_file = control_file self.platforms = platforms self.container = container | 0eb4120955bf4482e1a0b34707018f7b733235c7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12268/0eb4120955bf4482e1a0b34707018f7b733235c7/frontend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5228,
67,
1925,
16,
3325,
67,
768,
16,
17422,
22850,
6487,
1478,
33,
8381,
16,
272,
2515,
67,
4688,
33,
8381,
4672,
365,
18,
9149,
67,
1925,
273,
5228,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5228,
67,
1925,
16,
3325,
67,
768,
16,
17422,
22850,
6487,
1478,
33,
8381,
16,
272,
2515,
67,
4688,
33,
8381,
4672,
365,
18,
9149,
67,
1925,
273,
5228,
... |
tokens.extend(("TEXT", pre.replace("\n", "").replace(r"\$", "$"))) | tokens.extend(("TEXT", pre.replace("\$", "$"))) | def interpolate_text(self, text, line=0): tokens = [] for match in QUOTED_STRING.finditer(text): pre = match.group(1) var = match.group(3) or match.group(4) dir = match.group(2) # preceding text if pre: line += pre.count("\n") tokens.extend(("TEXT", pre.replace("\n", "").replace(r"\$", "$"))) # variable reference if var: line += dir.count("\n") tokens.append([dir, line, self.tokenise_directive(var)]) # other '$' reference - treated as text elif dir: line += dir.count("\n") tokens.extend(("TEXT", dir.replace("\n", ""))) return tokens | 50a3be9d53df80b9f11cbbf3bdc9c78877ace959 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1390/50a3be9d53df80b9f11cbbf3bdc9c78877ace959/parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13156,
67,
955,
12,
2890,
16,
977,
16,
980,
33,
20,
4672,
2430,
273,
5378,
364,
845,
316,
23984,
6404,
67,
5804,
18,
4720,
2165,
12,
955,
4672,
675,
273,
845,
18,
1655,
12,
21,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13156,
67,
955,
12,
2890,
16,
977,
16,
980,
33,
20,
4672,
2430,
273,
5378,
364,
845,
316,
23984,
6404,
67,
5804,
18,
4720,
2165,
12,
955,
4672,
675,
273,
845,
18,
1655,
12,
21,
13,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.