rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
self.__create_gui() | def __init__(self): wx.Frame.__init__(self, None, size=(900, 400), style=wx.DEFAULT_FRAME_STYLE|wx.MAXIMIZE) self.__create_gui() self.timeline = None self.title_base = "The Timeline Project" self.SetTitle(self.title_base) self.extensions = [".timeline"] self.default_extension = self.extensions[0] self.wildcard = "Timeline file (%s)|%s" % ( ", ".join(["*" + e for e in self.extensions]), ";".join(["*" + e for e in self.extensions])) | 1ed204d27c6774e13a825a928803206ea0e3cc60 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5252/1ed204d27c6774e13a825a928803206ea0e3cc60/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
7075,
18,
3219,
16186,
2738,
972,
12,
2890,
16,
599,
16,
963,
28657,
29,
713,
16,
7409,
3631,
2154,
33,
27226,
18,
5280,
67,
15072,
67,
15066,
96,
2722... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7075,
18,
3219,
16186,
2738,
972,
12,
2890,
16,
599,
16,
963,
28657,
29,
713,
16,
7409,
3631,
2154,
33,
27226,
18,
5280,
67,
15072,
67,
15066,
96,
2722... | |
self.targets = [(0,0)] | self.resetTargets() | def runStart(self,runNumber): self.targets = [(0,0)] | fe746ab4d6953f29e8edb6cf2164e699c364c507 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5773/fe746ab4d6953f29e8edb6cf2164e699c364c507/simple_stack_logic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
1685,
12,
2890,
16,
2681,
1854,
4672,
365,
18,
11358,
273,
306,
12,
20,
16,
20,
25887,
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,
1086,
1685,
12,
2890,
16,
2681,
1854,
4672,
365,
18,
11358,
273,
306,
12,
20,
16,
20,
25887,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
elif k == u'icon': | elif k == u'ICON': | def getProps(f, base): r = [] if f.has_key(u'__title__'): r.append((base+'.title', f[u'__title__'])) if f.has_key(u'__desc__'): r.append((base+'.desc',f[u'__desc__'])) for i in range(len(f[u'children'])): c = f[u'children'][i] if c.has_key(u'children'): r += getProps(c, base + '.' + str(i)) else: for k,v in c.iteritems(): k = k.lower() if k == u'href': r.append(('%s.%i.href'%(base, i), v)) if k == u'feedurl': r.append(('%s.%i.feedurl'%(base, i), v)) elif k == u'__title__': r.append(('%s.%i.title'%(base, i), v)) elif k == u'icon': r.append(('%s.%i.icon'%(base, i), v)) return r | 927eaa22d380536c0632bcad257164f27a756867 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13067/927eaa22d380536c0632bcad257164f27a756867/Parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3570,
1121,
12,
74,
16,
1026,
4672,
436,
273,
5378,
309,
284,
18,
5332,
67,
856,
12,
89,
11,
972,
2649,
7250,
4672,
436,
18,
6923,
12443,
1969,
6797,
18,
2649,
2187,
284,
63,
89,
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,
3570,
1121,
12,
74,
16,
1026,
4672,
436,
273,
5378,
309,
284,
18,
5332,
67,
856,
12,
89,
11,
972,
2649,
7250,
4672,
436,
18,
6923,
12443,
1969,
6797,
18,
2649,
2187,
284,
63,
89,
11,... |
from pypy.translator import backendoptimization, simplify | from pypy.translator import simplify from pypy.translator.backendopt import removenoops | def g(i): if i == 1: return "ab" else: try: return f() except: return "hello!" | b221221538306210460b78608358195ee4390cba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/b221221538306210460b78608358195ee4390cba/test_rspecialcase.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
314,
12,
77,
4672,
309,
277,
422,
404,
30,
327,
315,
378,
6,
469,
30,
775,
30,
327,
284,
1435,
1335,
30,
327,
315,
23711,
4442,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
314,
12,
77,
4672,
309,
277,
422,
404,
30,
327,
315,
378,
6,
469,
30,
775,
30,
327,
284,
1435,
1335,
30,
327,
315,
23711,
4442,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
for oldrecorded in MythDB(mythdb).searchOldRecorded(title=record[u'title'], subtitle=record[u'subtitle'] ): | for oldrecorded in mythdb.searchOldRecorded(title=record[u'title'], subtitle=record[u'subtitle'] ): | def updateMythVideo(items): '''Add and delete MythVideo records for played Miro Videos. Add and delete symbolic links to Miro Videos, to coverart/Miro icons, banners and Miro screenshots and fanart. NOTE: banner and fanart graphics were provided with the script and are used only if present. Abort if processing failed return True if processing was successful ''' global localhostname, vid_graphics_dirs, storagegroups, channel_id, flat, simulation, verbose global channel_watch_only, statistics global graphic_suffix, graphic_path_suffix, graphic_name_suffix global local_only if not items: # There may not be any new items but a clean up of existing records may be required items = [] # Check that a MIRO video directory exists # if not then create the dir and add symbolic link to cover/file or icon createMiroMythVideoDirectory() # Remove any Miro Mythvideo records which the video or graphics paths are broken records = mythvideo.searchVideos(category=u'Miro', custom=(('inetref=%s','99999999'),)) if records: statistics[u'Total_Miro_MythVideos'] = len(records) for record in records: # Count the Miro-MythVideos that Miro is expiring or has saved if record[u'filename'][0] == u'/': if os.path.islink(record[u'filename']) and os.path.isfile(record[u'filename']): statistics[u'Total_Miro_expiring']+=1 elif record[u'host'] and storagegroups.has_key(u'mythvideo'): if os.path.islink(storagegroups[u'mythvideo']+record[u'filename']) and os.path.isfile(storagegroups[u'mythvideo']+record[u'filename']): statistics[u'Total_Miro_expiring']+=1 for record in records: if checkVideometadataFails(record, flat): delete = False if os.path.islink(record[u'filename']): # Only delete video files if they are symlinks if not record[u'host'] or record[u'filename'][0] == '/': if not os.path.isfile(record[u'filename']): delete = True else: if not os.path.isfile(vid_graphics_dirs[key_trans[field]]+record[u'filename']): delete = True else: if not os.path.isfile(record[u'filename']): delete = True if delete: # Only delete video files if they are symlinks if simulation: logger.info(u"Simulation: DELETE videometadata for intid = %s" % (record[u'intid'],)) logger.info(u"Simulation: DELETE oldrecorded for title(%s), subtitle(%s)" % (record[u'intid'],record[u'title'], record[u'subtitle'])) else: Video(id=record[u'intid'], db=mythvideo).delete() try: # An orphaned oldrecorded record may not exist for oldrecorded in MythDB(mythdb).searchOldRecorded(title=record[u'title'], subtitle=record[u'subtitle'] ): delOldRecorded((channel_id, oldrecorded.starttime)).delete() except Exception, e: pass statistics[u'Total_Miro_MythVideos']-=1 if record[u'filename'][0] == '/': try: if simulation: logger.info(u"Simulation: Remove video file symlink (%s)" % (record[u'filename'])) else: os.remove(record[u'filename']) statistics[u'Miros_MythVideos_video_removed']+=1 except OSError: pass elif record[u'host'] and storagegroups.has_key(u'mythvideo'): try: if simulation: logger.info(u"Simulation: Remove video file (%s)" % (storagegroups[u'mythvideo']+record[u'filename'])) else: os.remove(storagegroups[u'mythvideo']+record[u'filename']) except OSError: pass if record[u'screenshot']: # Remove any associated Screenshot if record[u'screenshot'][0] == '/': try: if simulation: logger.info(u"Simulation: Remove screenshot symlink (%s)" % (record[u'screenshot'])) else: os.remove(record[u'screenshot']) except OSError: pass elif record[u'host'] and storagegroups.has_key(u'episodeimagedir'): try: if simulation: logger.info(u"Simulation: Remove file (%s)" % (storagegroups[u'episodeimagedir']+record[u'screenshot'])) else: os.remove(storagegroups[u'episodeimagedir']+record[u'screenshot']) except OSError: pass # Remove any unique cover art graphic files if record[u'title'].lower() in channel_icon_override: if record[u'coverfile'][0] == u'/': try: if simulation: logger.info(u"Simulation: Remove item cover art file (%s)" % (record[u'coverfile'])) else: os.remove(record[u'coverfile']) except OSError: pass elif record[u'host'] and storagegroups.has_key(u'posterdir'): try: if simulation: logger.info(u"Simulation: Remove item cover art file (%s)" % (storagegroups[u'posterdir']+record[u'coverfile'])) else: os.remove(storagegroups[u'posterdir']+record[u'coverfile']) except OSError: pass if not items: # There may not be any new items to add to MythVideo return True # Reread Miro Mythvideo videometadata records # Remove the matching videometadata record from array of items items_copy = [] for item in items: items_copy.append(item) records = mythvideo.searchVideos(category=u'Miro', custom=(('inetref=%s','99999999'),)) if records: for record in records: for item in items: if item[u'channelTitle'] == record[u'title'] and item[u'title'] == record[u'subtitle']: try: items_copy.remove(item) except ValueError: logger.info(u"Video (%s - %s) was found multiple times in list of (watched and/or saved) items from Miro - skipping" % (item[u'channelTitle'], item[u'title'])) pass break for item in items: # Remove any items that are for a Channel that does not get MythVideo records if filter(is_not_punct_char, item[u'channelTitle'].lower()) in channel_watch_only: try: # Some items may have already been removed, let those passed items_copy.remove(item) except ValueError: pass # Add Miro videos that remain in the item list # If not a flat directory check if title directory exists and add icon symbolic link as coverfile for item in items_copy: if not flat and not item.has_key(u'copied'): createMiroChannelSubdirectory(item) if not item[u'screenshot']: # If there is no screen shot then create one screenshot_mythvideo = u"%s%s - %s%s.jpg" % (vid_graphics_dirs[u'episodeimagedir'], sanitiseFileName(item[u'channelTitle']), sanitiseFileName(item[u'title']), graphic_suffix[u'episodeimagedir']) try: result = takeScreenShot(item[u'videoFilename'], screenshot_mythvideo, size_limit=False) except: result = None if result != None: item[u'screenshot'] = screenshot_mythvideo tmp_array = createVideometadataRecord(item) videometadata = tmp_array[0] oldrecorded = tmp_array[1] if simulation: logger.info(u"Simulation: Create videometadata record for (%s - %s)" % (item[u'channelTitle'], item[u'title'])) else: # Check for duplicates if not local_only and videometadata[u'filename'][0] != u'/': intid = mythvideo.getVideo(exactfile=videometadata[u'filename'], host=localhostname.lower()) else: intid = mythvideo.getVideo(exactfile=videometadata[u'filename']) if intid == None: try: intid = Video(db=mythvideo).create(videometadata).intid except MythError, e: logger.critical(u"Adding Miro video to MythVideo (%s - %s) failed for (%s)." % (item[u'channelTitle'], item[u'title'], e.args[0])) sys.exit(1) if not item.has_key(u'copied'): try: OldRecorded().create(oldrecorded) except MythError, e: logger.critical(u"Failed writing the oldrecorded record for(%s)" % (e.args[0])) sys.exit(1) if videometadata[u'filename'][0] == u'/': cmd = mythcommflag_videos % videometadata[u'filename'] elif videometadata[u'host'] and storagegroups[u'mythvideo']: cmd = mythcommflag_videos % ((storagegroups[u'mythvideo']+videometadata[u'filename'])) statistics[u'Miros_MythVideos_added']+=1 statistics[u'Total_Miro_expiring']+=1 statistics[u'Total_Miro_MythVideos']+=1 displayMessage(u"Added Miro video to MythVideo (%s - %s)" % (videometadata[u'title'], videometadata[u'subtitle'])) else: sys.stdout.write(u'') displayMessage(u"Skipped adding a duplicate Miro video to MythVideo:\n(%s - %s)\nSometimes a Miro channel has the same video downloaded multiple times.\nThis is a Miro/Channel web site issue and often rectifies itself overtime.\n" % (videometadata[u'title'], videometadata[u'subtitle'])) return True # end updateMythVideo() | 1343c41ccf0843d1fd2aca238fd7164a00e09ba4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13713/1343c41ccf0843d1fd2aca238fd7164a00e09ba4/mirobridge.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12062,
451,
10083,
12,
3319,
4672,
9163,
986,
471,
1430,
8005,
451,
10083,
3853,
364,
6599,
329,
490,
11373,
776,
19871,
18,
1436,
471,
1430,
16754,
4716,
358,
490,
11373,
776,
19871... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12062,
451,
10083,
12,
3319,
4672,
9163,
986,
471,
1430,
8005,
451,
10083,
3853,
364,
6599,
329,
490,
11373,
776,
19871,
18,
1436,
471,
1430,
16754,
4716,
358,
490,
11373,
776,
19871... |
nodes = [] nodes.append(self.expr) nodes.extend(flatten_nodes(self.subs)) return tuple(nodes) | nodelist = [] nodelist.append(self.expr) nodelist.extend(flatten_nodes(self.subs)) return tuple(nodelist) | def getChildNodes(self): nodes = [] nodes.append(self.expr) nodes.extend(flatten_nodes(self.subs)) 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,
6923,
12,
2890,
18,
8638,
13,
2199,
18,
14313,
12,
16940,
67,
4690,
12,
2890,
18,
22284,
3719,
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,
6923,
12,
2890,
18,
8638,
13,
2199,
18,
14313,
12,
16940,
67,
4690,
12,
2890,
18,
22284,
3719,
327,
3193,
12,
4690,
13,
2,
-100,
-100,... |
smallest field containing a and b with generators i, j, k with i^2=a, j^2=b and i*j=-j*i.:: | `smallest` field containing the nonzero elements a and b with generators i, j, k with i^2=a, j^2=b and j*i=-i*j.:: | def QuaternionAlgebra(arg0, arg1=None, arg2=None, names='i,j,k'): """ There are three input formats:: - QuaternionAlgebra(a, b): quaternion algebra with i^2 = a, j^2 = b, i*j=k - QuaternionAlgebra(K, a, b): same as above but over a field K - QuaternionAlgebra(D): a rational quaternion algebra with discriminant D EXAMPLES:: QuaternionAlgebra(a, b) - return quaternion algebra over the smallest field containing a and b with generators i, j, k with i^2=a, j^2=b and i*j=-j*i.:: sage: QuaternionAlgebra(-2,-3) Quaternion Algebra (-2, -3) with base ring Rational Field sage: QuaternionAlgebra(GF(5)(2), GF(5)(3)) Quaternion Algebra (2, 3) with base ring Finite Field of size 5 sage: QuaternionAlgebra(QQ[sqrt(2)](-1), -5) Quaternion Algebra (-1, -5) with base ring Number Field in sqrt2 with defining polynomial x^2 - 2 sage: QuaternionAlgebra(sqrt(-1), sqrt(-3)) Quaternion Algebra (I, sqrt(3)*I) with base ring Symbolic Ring QuaternionAlgebra(K, a, b) - return quaternion algebra over the field K with generators i, j, k with i^2=a, j^2=b and i*j=-j*i.:: sage: QuaternionAlgebra(QQ, -7, -21) Quaternion Algebra (-7, -21) with base ring Rational Field sage: QuaternionAlgebra(QQ[sqrt(2)], -2,-3) Quaternion Algebra (-2, -3) with base ring Number Field in sqrt2 with defining polynomial x^2 - 2 QuaternionAlgebra(D) - D a squarefree integer; returns a rational quaternion algebra of discriminant D.:: sage: QuaternionAlgebra(1) Quaternion Algebra (-1, 1) with base ring Rational Field sage: QuaternionAlgebra(2) Quaternion Algebra (-1, -1) with base ring Rational Field sage: QuaternionAlgebra(7) Quaternion Algebra (-1, -7) with base ring Rational Field sage: QuaternionAlgebra(2*3*5*7) Quaternion Algebra (-22, 210) with base ring Rational Field If the coefficients `a` and `b` in the definition of the quaternion algebra are not integral, then a slower generic type is used for arithmetic:: sage: type(QuaternionAlgebra(-1,-3).0) <type 'sage.algebras.quaternion_algebra_element.QuaternionAlgebraElement_rational_field'> sage: type(QuaternionAlgebra(-1,-3/2).0) <type 'sage.algebras.quaternion_algebra_element.QuaternionAlgebraElement_generic'> Make sure caching is sane: sage: A = QuaternionAlgebra(2,3); A Quaternion Algebra (2, 3) with base ring Rational Field sage: B = QuaternionAlgebra(GF(5)(2),GF(5)(3)); B Quaternion Algebra (2, 3) with base ring Finite Field of size 5 sage: A is QuaternionAlgebra(2,3) True sage: B is QuaternionAlgebra(GF(5)(2),GF(5)(3)) True sage: Q = QuaternionAlgebra(2); Q Quaternion Algebra (-1, -1) with base ring Rational Field sage: Q is QuaternionAlgebra(QQ,-1,-1) True sage: Q is QuaternionAlgebra(-1,-1) True sage: Q.<ii,jj,kk> = QuaternionAlgebra(15); Q.variable_names() ('ii', 'jj', 'kk') sage: QuaternionAlgebra(15).variable_names() ('i', 'j', 'k') """ # QuaternionAlgebra(D) if arg1 is None and arg2 is None: K = QQ D = Integer(arg0) a, b = hilbert_conductor_inverse(D) a = Rational(a); b = Rational(b) elif arg2 is None: if is_Element(arg0): # QuaternionAlgebra(a, b) v = Sequence([arg0, arg1]) K = v.universe().fraction_field() a = v[0] b = v[1] else: raise ValueError, "unknown input" # QuaternionAlgebra(K, a, b) else: K = arg0 if not is_Field(K): raise TypeError, "base ring of quaternion algebra must be a field" a = K(arg1) b = K(arg2) global _cache names = normalize_names(3, names) key = (K, a, b, names) if _cache.has_key(key): return _cache[key] A = QuaternionAlgebra_ab(K, a, b, names=names) A._key = key _cache[key] = A return A | 48b328d83169177c002516f19cf8242db1504925 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/48b328d83169177c002516f19cf8242db1504925/quaternion_algebra.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4783,
17848,
1067,
29087,
12,
3175,
20,
16,
1501,
21,
33,
7036,
16,
1501,
22,
33,
7036,
16,
1257,
2218,
77,
16,
78,
16,
79,
11,
4672,
3536,
6149,
854,
8925,
810,
6449,
2866,
225,
300... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4783,
17848,
1067,
29087,
12,
3175,
20,
16,
1501,
21,
33,
7036,
16,
1501,
22,
33,
7036,
16,
1257,
2218,
77,
16,
78,
16,
79,
11,
4672,
3536,
6149,
854,
8925,
810,
6449,
2866,
225,
300... |
emergency_error(logfile, | emergency_error(self.logfile, | def start_scheduler(self): from celery.log import setup_logger logger = setup_logger(self.loglevel, self.logfile) beat = ClockService(logger, schedule_filename=self.schedule) | 27ed5955eff4d26e7fdd87c4e81d8ee83e07f79f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2024/27ed5955eff4d26e7fdd87c4e81d8ee83e07f79f/celerybeat.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
67,
19972,
12,
2890,
4672,
628,
25357,
627,
18,
1330,
1930,
3875,
67,
4901,
1194,
273,
3875,
67,
4901,
12,
2890,
18,
28189,
16,
365,
18,
28806,
13,
23795,
273,
18051,
1179,
12,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
787,
67,
19972,
12,
2890,
4672,
628,
25357,
627,
18,
1330,
1930,
3875,
67,
4901,
1194,
273,
3875,
67,
4901,
12,
2890,
18,
28189,
16,
365,
18,
28806,
13,
23795,
273,
18051,
1179,
12,
49... |
JS, test_args = args[0], args[1:] | JS, test_args = os.path.normpath(args[0]), args[1:] | def run_tests(tests, lib_dir): pb = None if not OPTIONS.hide_progress and not OPTIONS.show_cmd: try: from progressbar import ProgressBar pb = ProgressBar('', len(tests), 13) except ImportError: pass failures = [] complete = False try: for i, test in enumerate(tests): if not run_test(test, lib_dir): failures.append(test) n = i + 1 if pb: pb.label = '[%3d|%3d|%3d]'%(n - len(failures), len(failures), n) pb.update(n) complete = True except KeyboardInterrupt: pass if pb: pb.finish() if failures: print('FAILURES:') for test in failures: if OPTIONS.show_failed: print(' ' + get_test_cmd(test, lib_dir)) else: print(' ' + test) else: print('PASSED ALL' + ('' if complete else ' (partial run -- interrupted by user)')) | 2cf9fb6635193d6bd8c9dcac3437def11f9551ce /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/2cf9fb6635193d6bd8c9dcac3437def11f9551ce/trace-test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
16341,
12,
16341,
16,
2561,
67,
1214,
4672,
6386,
273,
599,
309,
486,
16726,
18,
11248,
67,
8298,
471,
486,
16726,
18,
4500,
67,
4172,
30,
775,
30,
628,
31730,
1930,
27793,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
16341,
12,
16341,
16,
2561,
67,
1214,
4672,
6386,
273,
599,
309,
486,
16726,
18,
11248,
67,
8298,
471,
486,
16726,
18,
4500,
67,
4172,
30,
775,
30,
628,
31730,
1930,
27793,
6... |
if options.sync: _Build(buildroot, emptytree) | _Build(buildroot, emptytree) | def main(): # Parse options usage = "usage: %prog [options] cbuildbot_config" parser = optparse.OptionParser(usage=usage) parser.add_option('-a', '--acl', default='private', help='ACL to set on GSD archives') parser.add_option('-r', '--buildroot', help='root directory where build occurs', default=".") parser.add_option('-n', '--buildnumber', help='build number', type='int', default=0) parser.add_option('--chrome_rev', default=None, type='string', dest='chrome_rev', help=('Chrome_rev of type [tot|latest_release|' 'sticky_release]')) parser.add_option('-g', '--gsutil', default='', help='Location of gsutil') parser.add_option('-c', '--gsutil_archive', default='', help='Datastore archive location') parser.add_option('--clobber', action='store_true', dest='clobber', default=False, help='Clobbers an old checkout before syncing') parser.add_option('--debug', action='store_true', dest='debug', default=False, help='Override some options to run as a developer.') parser.add_option('--noprebuilts', action='store_false', dest='prebuilts', default=True, help="Don't upload prebuilts.") parser.add_option('--nosync', action='store_false', dest='sync', default=True, help="Don't sync before building.") parser.add_option('--notests', action='store_false', dest='tests', default=True, help='Override values from buildconfig and run no tests.') parser.add_option('-f', '--revisionfile', help='file where new revisions are stored') parser.add_option('-t', '--tracking-branch', dest='tracking_branch', default='cros/master', help='Run the buildbot on a branch') parser.add_option('-u', '--url', dest='url', default='http://git.chromium.org/git/manifest', help='Run the buildbot on internal manifest') (options, args) = parser.parse_args() buildroot = os.path.abspath(options.buildroot) revisionfile = options.revisionfile tracking_branch = options.tracking_branch chrome_atom_to_build = None if len(args) >= 1: buildconfig = _GetConfig(args[-1]) else: Warning('Missing configuration description') parser.print_usage() sys.exit(1) try: # Calculate list of overlay directories. rev_overlays = _ResolveOverlays(buildroot, buildconfig['rev_overlays']) push_overlays = _ResolveOverlays(buildroot, buildconfig['push_overlays']) # We cannot push to overlays that we don't rev. assert set(push_overlays).issubset(set(rev_overlays)) # Either has to be a master or not have any push overlays. assert buildconfig['master'] or not push_overlays board = buildconfig['board'] old_binhost = None _PreFlightRinse(buildroot, buildconfig['board'], tracking_branch, rev_overlays) chroot_path = os.path.join(buildroot, 'chroot') boardpath = os.path.join(chroot_path, 'build', board) if options.sync: if options.clobber or not os.path.isdir(buildroot): _FullCheckout(buildroot, tracking_branch, url=options.url) else: old_binhost = _GetPortageEnvVar(buildroot, board, _FULL_BINHOST) _IncrementalCheckout(buildroot) new_binhost = _GetPortageEnvVar(buildroot, board, _FULL_BINHOST) emptytree = (old_binhost and old_binhost != new_binhost) # Check that all overlays can be found. for path in rev_overlays: if not os.path.isdir(path): Die('Missing overlay: %s' % path) if not os.path.isdir(chroot_path): _MakeChroot(buildroot) if not os.path.isdir(boardpath): _SetupBoard(buildroot, board=buildconfig['board']) # Perform uprev. If chrome_uprev is set, rev Chrome ebuilds. if options.chrome_rev: chrome_atom_to_build = _MarkChromeAsStable(buildroot, tracking_branch, options.chrome_rev, board) # If we found nothing to rev, we're done here. if not chrome_atom_to_build: return elif buildconfig['uprev']: _UprevPackages(buildroot, tracking_branch, revisionfile, buildconfig['board'], rev_overlays) _EnableLocalAccount(buildroot) # Doesn't rebuild without acquiring more source. if options.sync: _Build(buildroot, emptytree) if buildconfig['unittests'] and options.tests: _RunUnitTests(buildroot) _BuildImage(buildroot) if buildconfig['smoke_bvt'] and options.tests: _BuildVMImageForTesting(buildroot) test_results_dir = '/tmp/run_remote_tests.%s' % options.buildnumber try: _RunSmokeSuite(buildroot, test_results_dir) finally: if not options.debug: archive_full_path = os.path.join(options.gsutil_archive, str(options.buildnumber)) _ArchiveTestResults(buildroot, buildconfig['board'], test_results_dir=test_results_dir, gsutil=options.gsutil, archive_dir=archive_full_path, acl=options.acl) if buildconfig['uprev']: # Don't push changes for developers. if buildconfig['master']: # Master bot needs to check if the other slaves completed. if cbuildbot_comm.HaveSlavesCompleted(config): if not options.debug and options.prebuilts: _UploadPrebuilts(buildroot, board, buildconfig['rev_overlays'], [new_binhost]) _UprevPush(buildroot, tracking_branch, buildconfig['board'], push_overlays, options.debug) else: Die('CBUILDBOT - One of the slaves has failed!!!') else: # Publish my status to the master if its expecting it. if buildconfig['important'] and not options.debug: cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_COMPLETE) except: # Send failure to master bot. if not buildconfig['master'] and buildconfig['important']: cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_FAILED) raise | 6b69ba71218c4d6eed73e564829b112200a56887 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/6b69ba71218c4d6eed73e564829b112200a56887/cbuildbot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
468,
2884,
702,
4084,
273,
315,
9167,
30,
738,
14654,
306,
2116,
65,
2875,
680,
4819,
67,
1425,
6,
2082,
273,
2153,
2670,
18,
1895,
2678,
12,
9167,
33,
9167,
13,
2082,
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,
2774,
13332,
468,
2884,
702,
4084,
273,
315,
9167,
30,
738,
14654,
306,
2116,
65,
2875,
680,
4819,
67,
1425,
6,
2082,
273,
2153,
2670,
18,
1895,
2678,
12,
9167,
33,
9167,
13,
2082,
18,... |
return self._append(EMR.ARCTO(left,top,right,bottom, | return self._append(_EMR._ARCTO(left,top,right,bottom, | def ArcTo(self,left,top,right,bottom,xstart,ystart,xend,yend): """ | 688318604ffe18a54bb261a3bde4bf6e1784a8de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8136/688318604ffe18a54bb261a3bde4bf6e1784a8de/pyemf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24881,
774,
12,
2890,
16,
4482,
16,
3669,
16,
4083,
16,
9176,
16,
92,
1937,
16,
1094,
485,
16,
92,
409,
16,
93,
409,
4672,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24881,
774,
12,
2890,
16,
4482,
16,
3669,
16,
4083,
16,
9176,
16,
92,
1937,
16,
1094,
485,
16,
92,
409,
16,
93,
409,
4672,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
NUMBER '159215902150 (1, 5) (1, 23) | NUMBER '159215902150 (1, 5) (1, 22) | ... " def y(m): # A whitespace after the colon\\n" | 1fbae9878cfa20d661d49e29e47c6085f32923a3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/1fbae9878cfa20d661d49e29e47c6085f32923a3/test_tokenize.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
6647,
315,
225,
1652,
677,
12,
81,
4672,
468,
432,
7983,
1839,
326,
13336,
1695,
82,
6,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
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,
1372,
6647,
315,
225,
1652,
677,
12,
81,
4672,
468,
432,
7983,
1839,
326,
13336,
1695,
82,
6,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
handler = self.lib.handlers['unCoercableKeyword'] assert_equals(handler._arg_coercer(['True', '42']), ['True', '42']) | self._test_coercion(self._handler_named('unCoercableKeyword'), ['True', '42'], ['True', '42']) | def test_coercion_is_not_done_with_conflicting_signatures(self): handler = self.lib.handlers['unCoercableKeyword'] assert_equals(handler._arg_coercer(['True', '42']), ['True', '42']) | ec36ac8710fe582cb511ca1578a279f4f7b5f196 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6988/ec36ac8710fe582cb511ca1578a279f4f7b5f196/test_handlers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2894,
12610,
285,
67,
291,
67,
902,
67,
8734,
67,
1918,
67,
20340,
310,
67,
30730,
12,
2890,
4672,
1838,
273,
365,
18,
2941,
18,
11046,
3292,
318,
4249,
12610,
429,
8736,
354... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2894,
12610,
285,
67,
291,
67,
902,
67,
8734,
67,
1918,
67,
20340,
310,
67,
30730,
12,
2890,
4672,
1838,
273,
365,
18,
2941,
18,
11046,
3292,
318,
4249,
12610,
429,
8736,
354... |
suggested_primitives = Set( [func for func in dir(module) if getattr(module.__dict__[func], 'suggested_primitive', False)] ) | suggested_primitives = Set( [func for func in dir(module) if func not in seen and getattr(module.__dict__[func], 'suggested_primitive', False)] ) seen |= suggested_primitives | def main(): for module in (ll_os, ll_os_path, ll_time, ll_math): #XXX keep this list up-to-date too suggested_primitives = Set( [func for func in dir(module) if getattr(module.__dict__[func], 'suggested_primitive', False)] ) implemented_primitives = Set( [f[1:] for f in extfunctions.keys()] ) missing_primitives = suggested_primitives - implemented_primitives print 'Missing llvm primitives for %s:' % module.__name__ for m in missing_primitives: print ' %s' % m | 254eca7c21b4633471bc7cf6318bd4113f94360b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/254eca7c21b4633471bc7cf6318bd4113f94360b/suggested_primitive.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
364,
1605,
316,
261,
2906,
67,
538,
16,
6579,
67,
538,
67,
803,
16,
6579,
67,
957,
16,
6579,
67,
15949,
4672,
565,
468,
15639,
3455,
333,
666,
731,
17,
869,
17,
712,
488... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
364,
1605,
316,
261,
2906,
67,
538,
16,
6579,
67,
538,
67,
803,
16,
6579,
67,
957,
16,
6579,
67,
15949,
4672,
565,
468,
15639,
3455,
333,
666,
731,
17,
869,
17,
712,
488... |
return Formex() | return Formex(empty((0,2,3,),dtype=float)) | def intersectionLinesWithPlane(F,p,n,atol=1.e-4): """Return the intersection lines of a plex-3 Formex with plane (p,n). F is a Formex of plexitude 3. p is a point specified by 3 coordinates. n is the normal vector to a plane, specified by 3 components. atol is a tolerance factor defining whether an edge is intersected by the plane. """ n = asarray(n) p = asarray(p) F = F.cclip(F.test('all',n,p)) # remove elements at the negative side if F.nelems() == 0: return Formex() F = F.cclip(F.test('all',-n,p)) # select elements that will be cut by plane if F.nelems() == 0: return Formex() F1 = F21 = F22 = F31 = F32 = F41 = F42= F43 = Formex(empty((0,2,3,),dtype=float)) # Create a Formex with the edges C = Formex.concatenate([ F.selectNodes(e) for e in [[0,1],[1,2],[2,0]] ]) t = C.intersectionWithPlane(p,n) P = pointsAt(C,t) t = t.reshape(3,-1).transpose() Pb = P.reshape(3,-1,3).swapaxes(0,1) Pf = F.coords Ps = roll(F.coords,-1,axis=1) t1 = t >= 0.+atol t2 = t <= 1.-atol t3 = t >= 0.-atol t4 = t <= 1.+atol Tb = t1 * t2 Tf = (1-t1).astype(bool)*t3 Ts = (1-t2).astype(bool)*t4 Nb = Tb.sum(axis=-1) Nf = Tf.sum(axis=-1) Ns = Ts.sum(axis=-1) # Get the triangles with 2 edge intersections w1 = where(Nb==2)[0] if w1.size > 0: P = Pb[w1][Tb[w1]].reshape(-1,2,3) F1 = Formex(P) # Get the triangles with 1 edge intersection and 1 vertex intersection w21 = where( (Nb==1) * (Nf==1) * (Ns==0) )[0] if w21.size > 0: P1 = Pb[w21][Tb[w21]].reshape(-1,1,3) P2 = Pf[w21][Tf[w21]].reshape(-1,1,3) P = column_stack([P1,P2]) F21 = Formex(P) w22 = where( (Nb==1) * (Nf==0) * (Ns==1) )[0] if w22.size > 0: P1 = Pb[w22][Tb[w22]].reshape(-1,1,3) P2 = Ps[w22][Ts[w22]].reshape(-1,1,3) P = column_stack([P1,P2]) F22 = Formex(P) # Get the triangles with 1 edge intersection and 2 vertex intersections w3 = where( (Nb==1) * (Nf==1) * (Ns==1) )[0] if w3.size > 0: Tb3 = Tb[w3] Tf3 = Tf[w3] Ts3 = Ts[w3] Pb3 = Pb[w3] Pf3 = Pf[w3] Ps3 = Ps[w3] i = where(Ts3)[1] - where(Tf3)[1] w31 = where((i == 1)+(i==-2))[0] # different vertices if w31.size > 0: P1 = Pf3[w31][Tf3[w31]].reshape(-1,1,3) P2 = Ps3[w31][Ts3[w31]].reshape(-1,1,3) P = column_stack([P1,P2]) F32 = Formex(P) w32 = where((i == -1)+(i==2))[0] # equal vertices if w32.size > 0: P1 = Pb3[w32][Tb3[w32]].reshape(-1,1,3) P2 = Pf3[w32][Tf3[w32]].reshape(-1,1,3) P = column_stack([P1,P2]) F31 = Formex(P) # Get the triangles with 0 edge intersections and 2 or 3 vertex intersections w41 = where( (Nb==0) * (Nf==2) )[0] if w41.size > 0: P = Pf[w41][Tf[w41]].reshape(-1,2,3) F41 = Formex(P) w42 = where( (Nb==0) * (Ns==2) )[0] if w42.size > 0: P = Ps[w42][Ts[w42]].reshape(-1,2,3) F42 = Formex(P) w43 = where( (Nb==0) * (Nf==1) * (Ns==1) )[0] if w43.size > 0: Tf43 = Tf[w43] Ts43= Ts[w43] Pf43 = Pf[w43] Ps43 = Ps[w43] i = where(Ts43)[1] - where(Tf43)[1] w43 = where((i == 1)+(i==-2))[0] # different vertices if w43.size > 0: P1 = Pf43[w43][Tf43[w43]].reshape(-1,1,3) P2 = Ps43[w43][Ts43[w43]].reshape(-1,1,3) P = column_stack([P1,P2]) F43 = Formex(P) # join all the pieces Ft = F1 + F21 + F22 + F31 + F32 + F41 + F42+ F43 return Ft | c47023ebe39fe0a8384dd29cae502db93d243614 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2499/c47023ebe39fe0a8384dd29cae502db93d243614/formex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7619,
5763,
1190,
19505,
12,
42,
16,
84,
16,
82,
16,
270,
355,
33,
21,
18,
73,
17,
24,
4672,
3536,
990,
326,
7619,
2362,
434,
279,
293,
4149,
17,
23,
2748,
338,
598,
11017,
261,
84... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7619,
5763,
1190,
19505,
12,
42,
16,
84,
16,
82,
16,
270,
355,
33,
21,
18,
73,
17,
24,
4672,
3536,
990,
326,
7619,
2362,
434,
279,
293,
4149,
17,
23,
2748,
338,
598,
11017,
261,
84... |
self.hostname = 'localhost' | self.hostname = '127.0.0.1' | def setUp(self): self.jobdb = JobDatabaseSQLite(test=True) self.monitordb = MonitorDatabase(test=True) self.clientdb = ClientDatabase(test=True) self.dsage_server = DSageServer(self.jobdb, self.monitordb, self.clientdb, log_level=5) self.realm = Realm(self.dsage_server) self.p = _SSHKeyPortalRoot(portal.Portal(Realm(self.dsage_server))) self.clientdb = ClientDatabase(test=True) self.p.portal.registerChecker(PublicKeyCredentialsCheckerDB( self.clientdb)) self.client_factory = pb.PBServerFactory(self.p) self.hostname = 'localhost' self.r = reactor.listenTCP(0, self.client_factory) self.port = self.r.getHost().port | bb9f86e45dbd2f73b32fb229d9e907fa218fe1e9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/bb9f86e45dbd2f73b32fb229d9e907fa218fe1e9/test_pubkeyauth.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
365,
18,
4688,
1966,
273,
3956,
4254,
3997,
1137,
12,
3813,
33,
5510,
13,
365,
18,
2586,
305,
517,
70,
273,
14086,
4254,
12,
3813,
33,
5510,
13,
365,
18,
2625,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
365,
18,
4688,
1966,
273,
3956,
4254,
3997,
1137,
12,
3813,
33,
5510,
13,
365,
18,
2586,
305,
517,
70,
273,
14086,
4254,
12,
3813,
33,
5510,
13,
365,
18,
2625,
... |
os.makedirs(destination) | os.makedirs(destination) | def run(self): | 8ed7fd2c6ee89ddc4e119bb19d1e8f02ca9011ce /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8259/8ed7fd2c6ee89ddc4e119bb19d1e8f02ca9011ce/PyCoDocumentation.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
class SystemLoad(): | class SystemLoad: | def get_cpu_percentage(function, *args, **dargs): """Returns a tuple containing the CPU% and return value from function call. This function calculates the usage time by taking the difference of the user and system times both before and after the function call. """ child_pre = resource.getrusage(resource.RUSAGE_CHILDREN) self_pre = resource.getrusage(resource.RUSAGE_SELF) start = time.time() to_return = function(*args, **dargs) elapsed = time.time() - start self_post = resource.getrusage(resource.RUSAGE_SELF) child_post = resource.getrusage(resource.RUSAGE_CHILDREN) # Calculate CPU Percentage s_user, s_system = [a - b for a, b in zip(self_post, self_pre)[:2]] c_user, c_system = [a - b for a, b in zip(child_post, child_pre)[:2]] cpu_percent = (s_user + c_user + s_system + c_system) / elapsed return cpu_percent, to_return | 45a49ecda9c5a01be3396d03f8446aa31ace07e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12268/45a49ecda9c5a01be3396d03f8446aa31ace07e0/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
11447,
67,
18687,
12,
915,
16,
380,
1968,
16,
2826,
72,
1968,
4672,
3536,
1356,
279,
3193,
4191,
326,
12154,
9,
471,
327,
460,
628,
445,
745,
18,
225,
1220,
445,
17264,
326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
11447,
67,
18687,
12,
915,
16,
380,
1968,
16,
2826,
72,
1968,
4672,
3536,
1356,
279,
3193,
4191,
326,
12154,
9,
471,
327,
460,
628,
445,
745,
18,
225,
1220,
445,
17264,
326,
... |
sage: sage.symbolic.units.is_unit(var('meter')) True | sage: sage.symbolic.units.is_unit(var('meter')) True | def is_unit(s): """ Returns a boolean when asked whether the input is in the list of units. INPUT: - `s` -- an object OUTPUT: - ``bool`` EXAMPLES:: sage: sage.symbolic.units.is_unit(1) False sage: sage.symbolic.units.is_unit(units.length.meter) True The square of a unit is not a unit:: sage: sage.symbolic.units.is_unit(units.length.meter^2) False You can also directly create units using var, though they won't have a nice docstring describing the unit:: sage: sage.symbolic.units.is_unit(var('meter')) True """ return unit_to_type.has_key(str(s)) | 36d2f28c044694ad73a4a70a9d869366d0e39ec4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/36d2f28c044694ad73a4a70a9d869366d0e39ec4/units.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
4873,
12,
87,
4672,
3536,
2860,
279,
1250,
1347,
19279,
2856,
326,
810,
353,
316,
326,
666,
434,
4971,
18,
225,
12943,
30,
225,
300,
1375,
87,
68,
1493,
392,
733,
225,
11550,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
4873,
12,
87,
4672,
3536,
2860,
279,
1250,
1347,
19279,
2856,
326,
810,
353,
316,
326,
666,
434,
4971,
18,
225,
12943,
30,
225,
300,
1375,
87,
68,
1493,
392,
733,
225,
11550,
... |
m.add_image_measurement(F_TOTAL_AREA%(self.object_name.value), | m.add_image_measurement(F_TOTAL_AREA%(object.object_name.value), | def run(self, workspace): objects = workspace.get_objects(self.object_name.value) if objects.has_parent_image: area_occupied = np.sum(objects.segmented[objects.parent_image.mask]>0) total_area = np.sum(objects.parent_image.mask) else: area_occupied = np.sum(objects.segmented > 0) total_area = np.product(objects.segmented.shape) if workspace.frame != None: figure = workspace.create_or_find_figure(subplots=(2,1)) statistics = (("Area occupied","%d pixels"%(area_occupied)), ("Total area", "%d pixels"%(total_area))) figure.subplot_imshow_labels(0,0,objects.segmented, title="Object labels: %s"%(self.object_name.value)) figure.subplot_table(1,0,statistics) m = workspace.measurements m.add_image_measurement(F_AREA_OCCUPIED%(self.object_name.value), np.array([area_occupied], dtype=float )) m.add_image_measurement(F_TOTAL_AREA%(self.object_name.value), np.array([total_area], dtype=float)) if self.should_save_image.value: binary_pixels = objects.segmented > 0 output_image = cpi.Image(binary_pixels, parent_image = objects.parent_image) workspace.image_set.add(self.image_name.value, output_image) | a0bb548da9fde1e6fd3c949608fd007fd37a3ee9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2870/a0bb548da9fde1e6fd3c949608fd007fd37a3ee9/measureimageareaoccupied.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
6003,
4672,
2184,
273,
6003,
18,
588,
67,
6911,
12,
2890,
18,
1612,
67,
529,
18,
1132,
13,
309,
2184,
18,
5332,
67,
2938,
67,
2730,
30,
5091,
67,
25049,
416,
2092... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
6003,
4672,
2184,
273,
6003,
18,
588,
67,
6911,
12,
2890,
18,
1612,
67,
529,
18,
1132,
13,
309,
2184,
18,
5332,
67,
2938,
67,
2730,
30,
5091,
67,
25049,
416,
2092... |
PrintErrorMsg(ERROR_NAMING_CONVENTION_CHECK_VARIABLE_NAME, 'Member variable %s NOT follow naming convention.' % ErrMsg, FileTable, Td[5]) | PrintErrorMsg(ERROR_NAMING_CONVENTION_CHECK_VARIABLE_NAME, 'Member variable %s NOT follow naming convention.' % (Name+'.'+ErrMsg), FileTable, Td[5]) | def CheckDeclTypedefFormat(FullFileName, ModelId): ErrorMsgList = [] FileID = GetTableID(FullFileName, ErrorMsgList) if FileID < 0: return ErrorMsgList Db = GetDB() FileTable = 'Identifier' + str(FileID) SqlStatement = """ select Name, StartLine, EndLine, ID, Value from %s where Model = %d """ % (FileTable, ModelId) ResultSet = Db.TblFile.Exec(SqlStatement) ResultList = [] for Result in ResultSet: ResultList.append(Result) ErrorType = ERROR_DECLARATION_DATA_TYPE_CHECK_ALL if ModelId == DataClass.MODEL_IDENTIFIER_STRUCTURE: ErrorType = ERROR_DECLARATION_DATA_TYPE_CHECK_STRUCTURE_DECLARATION if ModelId == DataClass.MODEL_IDENTIFIER_ENUMERATE: ErrorType = ERROR_DECLARATION_DATA_TYPE_CHECK_ENUMERATED_TYPE if ModelId == DataClass.MODEL_IDENTIFIER_UNION: ErrorType = ERROR_DECLARATION_DATA_TYPE_CHECK_UNION_TYPE SqlStatement = """ select Modifier, Name, Value, StartLine, EndLine, ID from %s where Model = %d """ % (FileTable, DataClass.MODEL_IDENTIFIER_TYPEDEF) TdSet = Db.TblFile.Exec(SqlStatement) TdList = [] for Td in TdSet: TdList.append(Td) # Check member variable name format that from typedefs of ONLY this file. for Td in TdList: Value = Td[2].strip() if Value.startswith('enum'): ModelId = DataClass.MODEL_IDENTIFIER_ENUMERATE elif Value.startswith('struct'): ModelId = DataClass.MODEL_IDENTIFIER_STRUCTURE elif Value.startswith('union'): ModelId == DataClass.MODEL_IDENTIFIER_UNION else: pass # Check member variable format. ErrMsgList = CheckMemberVariableFormat(Value, ModelId) for ErrMsg in ErrMsgList: if EccGlobalData.gException.IsException(ERROR_NAMING_CONVENTION_CHECK_VARIABLE_NAME, ErrMsg): continue PrintErrorMsg(ERROR_NAMING_CONVENTION_CHECK_VARIABLE_NAME, 'Member variable %s NOT follow naming convention.' % ErrMsg, FileTable, Td[5]) IncludeFileList = GetAllIncludeFiles(FullFileName) for F in IncludeFileList: FileID = GetTableID(F, ErrorMsgList) if FileID < 0: continue IncludeFileTable = 'Identifier' + str(FileID) SqlStatement = """ select Modifier, Name, Value, StartLine, EndLine, ID from %s where Model = %d """ % (IncludeFileTable, DataClass.MODEL_IDENTIFIER_TYPEDEF) ResultSet = Db.TblFile.Exec(SqlStatement) TdList.extend(ResultSet) for Result in ResultList: # Check member variable format. ErrMsgList = CheckMemberVariableFormat(Result[4], ModelId) for ErrMsg in ErrMsgList: if EccGlobalData.gException.IsException(ERROR_NAMING_CONVENTION_CHECK_VARIABLE_NAME, ErrMsg): continue PrintErrorMsg(ERROR_NAMING_CONVENTION_CHECK_VARIABLE_NAME, 'Member variable %s NOT follow naming convention.' % ErrMsg, FileTable, Result[3]) # Check whether it is typedefed. Found = False for Td in TdList: if len(Td[0]) > 0: continue if Result[1] >= Td[3] and Td[4] >= Result[2]: Found = True if not Td[1].isupper(): PrintErrorMsg(ErrorType, 'Typedef should be UPPER case', FileTable, Td[5]) if Result[0] in Td[2].split(): Found = True if not Td[1].isupper(): PrintErrorMsg(ErrorType, 'Typedef should be UPPER case', FileTable, Td[5]) if not Found: PrintErrorMsg(ErrorType, 'No Typedef for %s' % Result[0], FileTable, Result[3]) continue | 55da07841c0281c8e74a15a63c3242d3f5b84ac8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/914/55da07841c0281c8e74a15a63c3242d3f5b84ac8/c.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2073,
3456,
559,
536,
1630,
12,
5080,
4771,
16,
3164,
548,
4672,
1068,
3332,
682,
273,
5378,
225,
1387,
734,
273,
968,
1388,
734,
12,
5080,
4771,
16,
1068,
3332,
682,
13,
309,
1387,
73... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2073,
3456,
559,
536,
1630,
12,
5080,
4771,
16,
3164,
548,
4672,
1068,
3332,
682,
273,
5378,
225,
1387,
734,
273,
968,
1388,
734,
12,
5080,
4771,
16,
1068,
3332,
682,
13,
309,
1387,
73... |
return style return (None, id, "", "", kind, None) | return style | def CalculateWXStyle(cls, block): if block.menuItemKind == "Separator": id = wx.ID_SEPARATOR kind = wx.ITEM_SEPARATOR else: """ Menu items must have an event, otherwise they can't cause any action, nor can we use wxWindows api's to distinguish them from each other. """ assert block.hasAttributeValue('event') id = Block.Block.getWidgetID(block) if block.menuItemKind == "Normal": kind = wx.ITEM_NORMAL elif block.menuItemKind == "Check": kind = wx.ITEM_CHECK elif block.menuItemKind == "Radio": kind = wx.ITEM_RADIO else: assert (False) title = block.title if len(block.accel) > 0: title = title + "\tCtrl+" + block.accel """ When inserting ourself into a MenuItem, we must actually insert ourself into the submenu of that MenuItem. """ parentWidget = block.dynamicParent.widget if isinstance (parentWidget, wxMenu): style = (parentWidget, id, title, block.helpString, kind, None) else: assert isinstance (parentWidget, wxMenuItem) submenu = block.GetSubMenu() assert submenu style = (None, id, title, block.helpString, kind, submenu) return style return (None, id, "", "", kind, None) | 6ed3cdcbb2d2f6796287ccd28992bdf8d2a26a7d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/6ed3cdcbb2d2f6796287ccd28992bdf8d2a26a7d/DynamicContainerBlocks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9029,
59,
60,
2885,
12,
6429,
16,
1203,
4672,
309,
1203,
18,
5414,
1180,
5677,
422,
315,
6581,
6877,
612,
273,
7075,
18,
734,
67,
4550,
3846,
273,
7075,
18,
12674,
67,
4550,
469,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9029,
59,
60,
2885,
12,
6429,
16,
1203,
4672,
309,
1203,
18,
5414,
1180,
5677,
422,
315,
6581,
6877,
612,
273,
7075,
18,
734,
67,
4550,
3846,
273,
7075,
18,
12674,
67,
4550,
469,
30,
... |
""" Set up test fixtures """ | """ Set up test fixtures. """ | def setUp(self): """ Set up test fixtures """ self.mock_tracker = MockTracker() | f197f660de27f119c9000bdd2c634e6960ce4fd0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4939/f197f660de27f119c9000bdd2c634e6960ce4fd0/scaffold.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
3536,
1000,
731,
1842,
23302,
18,
3536,
365,
18,
22851,
67,
16543,
273,
7867,
8135,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
24292,
12,
2890,
4672,
3536,
1000,
731,
1842,
23302,
18,
3536,
365,
18,
22851,
67,
16543,
273,
7867,
8135,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name=calibre - Ebook library management | Name=calibre GenericName=E-book library management | def binary_install(): manifest = os.path.join(getattr(sys, 'frozen_path'), 'manifest') exes = [x.strip() for x in open(manifest).readlines()] print 'Creating symlinks...' for exe in exes: dest = os.path.join('/usr', 'bin', exe) if os.path.exists(dest): os.remove(dest) os.symlink(os.path.join(getattr(sys, 'frozen_path'), exe), dest) post_install() return 0 | 21cd4d0f08eb0202f873570c9065d80bea5b0452 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/21cd4d0f08eb0202f873570c9065d80bea5b0452/linux.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3112,
67,
5425,
13332,
5643,
273,
1140,
18,
803,
18,
5701,
12,
588,
1747,
12,
9499,
16,
296,
28138,
67,
803,
19899,
296,
14357,
6134,
431,
281,
273,
306,
92,
18,
6406,
1435,
364,
619,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3112,
67,
5425,
13332,
5643,
273,
1140,
18,
803,
18,
5701,
12,
588,
1747,
12,
9499,
16,
296,
28138,
67,
803,
19899,
296,
14357,
6134,
431,
281,
273,
306,
92,
18,
6406,
1435,
364,
619,
... |
self.settings["CFLAGS"]="-Os -march=armv5te -pipe" | self.settings["CFLAGS"]+=" -march=armv5te" | def __init__(self,myspec): generic_arm.__init__(self,myspec) self.settings["CHOST"]="armv5tel-softfloat-linux-gnueabi" self.settings["CFLAGS"]="-Os -march=armv5te -pipe" | 423613d4d63f3a603ff416edd814c78b4f729c55 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7327/423613d4d63f3a603ff416edd814c78b4f729c55/arm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
81,
1900,
705,
4672,
5210,
67,
4610,
16186,
2738,
972,
12,
2890,
16,
81,
1900,
705,
13,
365,
18,
4272,
9614,
1792,
4005,
11929,
1546,
4610,
90,
25,
19261... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
81,
1900,
705,
4672,
5210,
67,
4610,
16186,
2738,
972,
12,
2890,
16,
81,
1900,
705,
13,
365,
18,
4272,
9614,
1792,
4005,
11929,
1546,
4610,
90,
25,
19261... |
self.pointerToIen, | self.pointerToIens, | def run(self): import lithomop3d # First define all of the lists that maintain variable values. The # variables in these lists are altered during the running of the code # and should not be accessed directly except as a member of the list. # They should not have been defined previously. | a3b996c5dd1f99d042cb2939115fc63c0a831041 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8640/a3b996c5dd1f99d042cb2939115fc63c0a831041/Lithomop3d_run.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
1930,
328,
483,
362,
556,
23,
72,
225,
468,
5783,
4426,
777,
434,
326,
6035,
716,
17505,
2190,
924,
18,
225,
1021,
468,
3152,
316,
4259,
6035,
854,
22349,
4982,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
1930,
328,
483,
362,
556,
23,
72,
225,
468,
5783,
4426,
777,
434,
326,
6035,
716,
17505,
2190,
924,
18,
225,
1021,
468,
3152,
316,
4259,
6035,
854,
22349,
4982,
3... |
if data[:2] == '\xfe\xff': | if data[:2] == b'\xfe\xff': | def pack(x, forcetype = None): """Pack a python object into an AE descriptor""" if forcetype: if isinstance(x, bytes): return AE.AECreateDesc(forcetype, x) else: return pack(x).AECoerceDesc(forcetype) if x == None: return AE.AECreateDesc(b'null', '') if isinstance(x, AEDescType): return x if isinstance(x, FSSType): return AE.AECreateDesc(b'fss ', x.data) if isinstance(x, FSRefType): return AE.AECreateDesc(b'fsrf', x.data) if isinstance(x, AliasType): return AE.AECreateDesc(b'alis', x.data) if isinstance(x, int): return AE.AECreateDesc(b'long', struct.pack('l', x)) if isinstance(x, float): return AE.AECreateDesc(b'doub', struct.pack('d', x)) if isinstance(x, (bytes, str8)): return AE.AECreateDesc(b'TEXT', x) if isinstance(x, str): # See http://developer.apple.com/documentation/Carbon/Reference/Apple_Event_Manager/Reference/reference.html#//apple_ref/doc/constant_group/typeUnicodeText # for the possible encodings. data = x.encode('utf16') if data[:2] == '\xfe\xff': data = data[2:] return AE.AECreateDesc(b'utxt', data) if isinstance(x, list): lst = AE.AECreateList('', 0) for item in x: lst.AEPutDesc(0, pack(item)) return lst if isinstance(x, dict): record = AE.AECreateList('', 1) for key, value in x.items(): packkey(record, key, value) #record.AEPutParamDesc(key, pack(value)) return record if isinstance(x, type) and issubclass(x, ObjectSpecifier): # Note: we are getting a class object here, not an instance return AE.AECreateDesc(b'type', x.want) if hasattr(x, '__aepack__'): return x.__aepack__() if hasattr(x, 'which'): return AE.AECreateDesc(b'TEXT', x.which) if hasattr(x, 'want'): return AE.AECreateDesc(b'TEXT', x.want) return AE.AECreateDesc(b'TEXT', repr(x)) # Copout | baa08362e81a56b112a244a6d2f02bf3cf2be06d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/baa08362e81a56b112a244a6d2f02bf3cf2be06d/aepack.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2298,
12,
92,
16,
364,
71,
5872,
273,
599,
4672,
3536,
4420,
279,
5790,
733,
1368,
392,
432,
41,
4950,
8395,
225,
309,
364,
71,
5872,
30,
309,
1549,
12,
92,
16,
1731,
4672,
327,
432,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2298,
12,
92,
16,
364,
71,
5872,
273,
599,
4672,
3536,
4420,
279,
5790,
733,
1368,
392,
432,
41,
4950,
8395,
225,
309,
364,
71,
5872,
30,
309,
1549,
12,
92,
16,
1731,
4672,
327,
432,... |
x, y = longopts[i][:optlen], longopts[i][optlen:] if opt != x: continue if y != '' and y != '=' and i+1 < len(longopts): if opt == longopts[i+1][:optlen]: raise GetoptError('option --%s not a unique prefix' % opt, opt) if longopts[i][-1:] in ('=', ): return 1, longopts[i][:-1] return 0, longopts[i] raise GetoptError('option --%s not recognized' % opt, opt) | if longopts[i].startswith(opt): break else: raise GetoptError('option --%s not recognized' % opt, opt) j = i+1 while j < len(longopts) and longopts[j].startswith(opt): j += 1 possibilities = longopts[i:j] if opt in possibilities: return 0, opt elif opt + '=' in possibilities: return 1, opt if len(possibilities) > 1: raise GetoptError('option --%s not a unique prefix' % opt, opt) assert len(possibilities) == 1 unique_match = possibilities[0] has_arg = unique_match.endswith('=') if has_arg: unique_match = unique_match[:-1] return has_arg, unique_match | def long_has_args(opt, longopts): optlen = len(opt) for i in range(len(longopts)): x, y = longopts[i][:optlen], longopts[i][optlen:] if opt != x: continue if y != '' and y != '=' and i+1 < len(longopts): if opt == longopts[i+1][:optlen]: raise GetoptError('option --%s not a unique prefix' % opt, opt) if longopts[i][-1:] in ('=', ): return 1, longopts[i][:-1] return 0, longopts[i] raise GetoptError('option --%s not recognized' % opt, opt) | 5206de5ed82f828611152bbbbe0a412a3e5c9cc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/5206de5ed82f828611152bbbbe0a412a3e5c9cc3/getopt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1525,
67,
5332,
67,
1968,
12,
3838,
16,
1525,
4952,
4672,
2153,
1897,
273,
562,
12,
3838,
13,
364,
277,
316,
1048,
12,
1897,
12,
5748,
4952,
3719,
30,
309,
1525,
4952,
63,
77,
8009,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1525,
67,
5332,
67,
1968,
12,
3838,
16,
1525,
4952,
4672,
2153,
1897,
273,
562,
12,
3838,
13,
364,
277,
316,
1048,
12,
1897,
12,
5748,
4952,
3719,
30,
309,
1525,
4952,
63,
77,
8009,
... |
index=getattr(self, index+'Index') | if hasattr(self.threadIndex, 'clear'): self.threadIndex.clear() return | def clearIndex(self, archive, index): | 3bf91d8e58657ce26c57db0c1099071e36bcd51e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/3bf91d8e58657ce26c57db0c1099071e36bcd51e/HyperDatabase.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2424,
1016,
12,
2890,
16,
5052,
16,
770,
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,
2424,
1016,
12,
2890,
16,
5052,
16,
770,
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,
... |
runner.setP3DFilename(*runner.parseSysArgs()) | argv = runner.parseSysArgs() runner.setP3DFilename(argv[0], argv = argv) | def parseSysArgs(self): """ Converts sys.argv into (p3dFilename, tokens). """ import getopt opts, args = getopt.getopt(sys.argv[1:], 'h') | 5b744c5ab84972e3f0ed92b66846301c654b7492 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8543/5b744c5ab84972e3f0ed92b66846301c654b7492/runp3d.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12712,
2615,
12,
2890,
4672,
3536,
20377,
2589,
18,
19485,
1368,
261,
84,
23,
72,
5359,
16,
2430,
2934,
3536,
1930,
336,
3838,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1109,
12712,
2615,
12,
2890,
4672,
3536,
20377,
2589,
18,
19485,
1368,
261,
84,
23,
72,
5359,
16,
2430,
2934,
3536,
1930,
336,
3838,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9... |
def getwhiteboard(self,id,which): '''Get the current value of the whiteboard specified by 'which' on bug with the the given id.''' raise NotImplementedError | def query_comments(self,product,version,component,string,matchtype='allwordssubstr'): '''Convenience method - query for bugs filed against the given product, version, and component whose comments match the given string. matchtype specifies the type of match to be done. matchtype may be any of the types listed in querydefaults['long_desc_type_list'], e.g.: ['allwordssubstr','anywordssubstr','substring','casesubstring', 'allwords','anywords','regexp','notregexp'] Return value is the same as with query(). ''' q = {'product':product,'version':version,'component':component, 'long_desc':string,'long_desc_type':matchtype} return self.query(q) | def getwhiteboard(self,id,which): '''Get the current value of the whiteboard specified by 'which' on bug with the the given id.''' raise NotImplementedError | 9ee1856c171867976b7a7b987baa62b24d14fd5c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5050/9ee1856c171867976b7a7b987baa62b24d14fd5c/bugzilla.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
14739,
3752,
12,
2890,
16,
350,
16,
12784,
4672,
9163,
967,
326,
783,
460,
434,
326,
9578,
3752,
1269,
635,
296,
12784,
11,
603,
7934,
598,
326,
326,
864,
612,
1093,
6309,
1002,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
336,
14739,
3752,
12,
2890,
16,
350,
16,
12784,
4672,
9163,
967,
326,
783,
460,
434,
326,
9578,
3752,
1269,
635,
296,
12784,
11,
603,
7934,
598,
326,
326,
864,
612,
1093,
6309,
1002,
1... |
r, w, e = popen2.popen3([blastcmd] + params) | r, w, e = popen2.popen3(' '.join([blastcmd] + params)) | def blastall(blastcmd, program, database, infile, **keywds): """blastall(blastcmd, program, database, infile, **keywds) -> read, error Undohandles Execute and retrieve data from blastall. blastcmd is the command used to launch the 'blastall' executable. program is the blast program to use, e.g. 'blastp', 'blastn', etc. database is the path to the database to search against. infile is the path to the file containing the sequence to search with. You may pass more parameters to **keywds to change the behavior of the search. Otherwise, optional values will be chosen by blastall. Scoring matrix Matrix to use. gap_open Gap open penalty. gap_extend Gap extension penalty. nuc_match Nucleotide match reward. (BLASTN) nuc_mismatch Nucleotide mismatch penalty. (BLASTN) query_genetic_code Genetic code for Query. db_genetic_code Genetic code for database. (TBLAST[NX]) Algorithm gapped Whether to do a gapped alignment. T/F (not for TBLASTX) expectation Expectation value cutoff. wordsize Word size. strands Query strands to search against database.([T]BLAST[NX]) keep_hits Number of best hits from a region to keep. xdrop Dropoff value (bits) for gapped alignments. hit_extend Threshold for extending hits. region_length Length of region used to judge hits. db_length Effective database length. search_length Effective length of search space. Processing filter Filter query sequence? T/F believe_query Believe the query defline. T/F restrict_gi Restrict search to these GI's. nprocessors Number of processors to use. Formatting html Produce HTML output? T/F descriptions Number of one-line descriptions. alignments Number of alignments. align_view Alignment view. Integer 0-6. show_gi Show GI's in deflines? T/F seqalign_file seqalign file to output. """ att2param = { 'matrix' : '-M', 'gap_open' : '-G', 'gap_extend' : '-E', 'nuc_match' : '-r', 'nuc_mismatch' : '-q', 'query_genetic_code' : '-Q', 'db_genetic_code' : '-D', 'gapped' : '-g', 'expectation' : '-e', 'wordsize' : '-W', 'strands' : '-S', 'keep_hits' : '-K', 'xdrop' : '-X', 'hit_extend' : '-f', 'region_length' : '-L', 'db_length' : '-z', 'search_length' : '-Y', 'program' : '-p', 'database' : '-d', 'infile' : '-i', 'filter' : '-F', 'believe_query' : '-J', 'restrict_gi' : '-l', 'nprocessors' : '-a', 'html' : '-T', 'descriptions' : '-v', 'alignments' : '-b', 'align_view' : '-m', 'show_gi' : '-I', 'seqalign_file' : '-O' } if not os.path.exists(blastcmd): raise ValueError, "blastall does not exist at %s" % blastcmd params = [] params.extend([att2param['program'], program]) params.extend([att2param['database'], database]) params.extend([att2param['infile'], infile]) for attr in keywds.keys(): params.extend([att2param[attr], str(keywds[attr])]) r, w, e = popen2.popen3([blastcmd] + params) w.close() return File.UndoHandle(r), File.UndoHandle(e) | 8c8f53e128abd1be4084ae9e7bfdf1e823158b7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/8c8f53e128abd1be4084ae9e7bfdf1e823158b7b/NCBIStandalone.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19047,
454,
12,
30901,
4172,
16,
5402,
16,
2063,
16,
14568,
16,
2826,
856,
91,
2377,
4672,
3536,
30901,
454,
12,
30901,
4172,
16,
5402,
16,
2063,
16,
14568,
16,
2826,
856,
91,
2377,
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,
19047,
454,
12,
30901,
4172,
16,
5402,
16,
2063,
16,
14568,
16,
2826,
856,
91,
2377,
4672,
3536,
30901,
454,
12,
30901,
4172,
16,
5402,
16,
2063,
16,
14568,
16,
2826,
856,
91,
2377,
13... |
time.sleep(1) | for i in xrange(100): time.sleep(.01) if not pidIsRunning(pid): return | def killProcess(self, pid=None): if pid is not None: try: os.kill(pid, signal.SIGTERM) time.sleep(1) os.kill(pid, signal.SIGKILL) except: pass | f0bf8dbddcd648a5fac7417081eff16a65f3ea2c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12354/f0bf8dbddcd648a5fac7417081eff16a65f3ea2c/platformutils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8673,
2227,
12,
2890,
16,
4231,
33,
7036,
4672,
309,
4231,
353,
486,
599,
30,
775,
30,
1140,
18,
16418,
12,
6610,
16,
4277,
18,
18513,
15176,
13,
364,
277,
316,
12314,
12,
6625,
4672,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8673,
2227,
12,
2890,
16,
4231,
33,
7036,
4672,
309,
4231,
353,
486,
599,
30,
775,
30,
1140,
18,
16418,
12,
6610,
16,
4277,
18,
18513,
15176,
13,
364,
277,
316,
12314,
12,
6625,
4672,
... |
import sqlite3 | import sqlite3 | def set_temp_store_directory( connection, temp_store_directory, verbose = False ): """ Sets the temp_store_directory parameter in sqlite. """ try: import sqlite3 except ImportError: # pre 2.5.x from pysqlite2 import dbapi2 as sqlite3 if verbose: print >> sys.stderr, "setting the temp_store_directory to %s" % temp_store_directory connection.cursor().execute('PRAGMA temp_store_directory = "%s"' % temp_store_directory) | 8cea1b2fc7596cef9cda3f1b4faff0434d729925 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3589/8cea1b2fc7596cef9cda3f1b4faff0434d729925/dbtables.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
5814,
67,
2233,
67,
5149,
12,
1459,
16,
1906,
67,
2233,
67,
5149,
16,
3988,
273,
1083,
262,
30,
3536,
11511,
326,
1906,
67,
2233,
67,
5149,
1569,
316,
16184,
18,
3536,
775,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
5814,
67,
2233,
67,
5149,
12,
1459,
16,
1906,
67,
2233,
67,
5149,
16,
3988,
273,
1083,
262,
30,
3536,
11511,
326,
1906,
67,
2233,
67,
5149,
1569,
316,
16184,
18,
3536,
775,
... |
robot_email = UnicodeCol(default=None, length=255) | robot_email = UnicodeCol(default=None) | def my_site(self): return self.host_category.my_site() | 1914e98105bad444213144f8ad795c2e01bf6f73 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13031/1914e98105bad444213144f8ad795c2e01bf6f73/model.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3399,
67,
4256,
12,
2890,
4672,
327,
365,
18,
2564,
67,
4743,
18,
4811,
67,
4256,
1435,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
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,
3399,
67,
4256,
12,
2890,
4672,
327,
365,
18,
2564,
67,
4743,
18,
4811,
67,
4256,
1435,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
cmdclass = {'build_ext':PyBuildExt, 'install':PyBuildInstall}, | cmdclass = {'build_ext':PyBuildExt, 'install':PyBuildInstall, 'install_lib':PyBuildInstallLib}, | def main(): # turn off warnings when deprecated modules are imported import warnings warnings.filterwarnings("ignore",category=DeprecationWarning) setup(name = 'Python standard library', version = '%d.%d' % sys.version_info[:2], cmdclass = {'build_ext':PyBuildExt, 'install':PyBuildInstall}, # The struct module is defined here, because build_ext won't be # called unless there's at least one extension module defined. ext_modules=[Extension('struct', ['structmodule.c'])], # Scripts to install scripts = ['Tools/scripts/pydoc'] ) | 0b55fe4de63c89c5ebc47ffe99b5b2af3ae0a7f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0b55fe4de63c89c5ebc47ffe99b5b2af3ae0a7f0/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
468,
7005,
3397,
5599,
1347,
6849,
4381,
854,
9101,
1930,
5599,
5599,
18,
2188,
12103,
2932,
6185,
3113,
4743,
33,
758,
13643,
6210,
13,
3875,
12,
529,
273,
296,
15774,
4529,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7005,
3397,
5599,
1347,
6849,
4381,
854,
9101,
1930,
5599,
5599,
18,
2188,
12103,
2932,
6185,
3113,
4743,
33,
758,
13643,
6210,
13,
3875,
12,
529,
273,
296,
15774,
4529,
... |
scitools.misc.dump(g, hide_nonpublic=False) | import scitools.misc; scitools.misc.dump(g, hide_nonpublic=False) | def _test(g): print 'g=%s' % str(g) # dump all the contents of a grid object: scitools.misc.dump(g, hide_nonpublic=False) from numpy import zeros def fv(*args): # vectorized evaluation function return zeros(g.shape)+2 def fs(*args): # scalar version return 2 fv_arr = g.vectorized_eval(fv) fs_arr = zeros(g.shape) coor = [0.0]*g.nsd itparts = ['all', 'interior', 'all_boundary', 'interior_boundary', 'corners'] if g.nsd == 3: itparts += ['all_edges', 'interior_edges'] for domain_part in itparts: print '\niterator over "%s"' % domain_part for i in g.iter(domain_part, vectorized_version=False): if isinstance(i, int): i = [i] # wrap index as list (if 1D) for k in range(g.nsd): coor[k] = g.coor[k][i[k]] print i, coor if domain_part == 'all': # fs_arr shape corresponds to all points fs_arr[i] = fs(*coor) print 'vectorized iterator over "%s":' % domain_part for slices in g.iter(domain_part, vectorized_version=True): if domain_part == 'all': fs_arr[slices] = fv(*g.coor) # else: more complicated print slices # boundary slices... | ce07dc4ebf7cb4b01fad76aa28005cd1d0980e03 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4727/ce07dc4ebf7cb4b01fad76aa28005cd1d0980e03/BoxGrid.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3813,
12,
75,
4672,
1172,
296,
75,
5095,
87,
11,
738,
609,
12,
75,
13,
468,
4657,
777,
326,
2939,
434,
279,
3068,
733,
30,
1930,
888,
305,
8192,
18,
23667,
31,
225,
888,
305,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3813,
12,
75,
4672,
1172,
296,
75,
5095,
87,
11,
738,
609,
12,
75,
13,
468,
4657,
777,
326,
2939,
434,
279,
3068,
733,
30,
1930,
888,
305,
8192,
18,
23667,
31,
225,
888,
305,
... |
oscmd("mkdir -p "+destdir+prefix+libdir+"/"+PYTHONV+"/lib-dynload") oscmd("mkdir -p "+destdir+prefix+libdir+"/"+PYTHONV+"/site-packages") | oscmd("mkdir -p "+destdir+prefix+libdir+"/"+os.path.abspath(PPATH+"/../lib-dynload")) oscmd("mkdir -p "+destdir+prefix+libdir+"/"+PPATH+"/site-packages") | def InstallPanda(destdir="", prefix="/usr", outputdir="built"): if (not prefix.startswith("/")): prefix = "/" + prefix #FIXME: this might not be the correct python version PYTHONV="python"+sys.version[:3] oscmd("mkdir -p "+destdir+prefix+"/bin") oscmd("mkdir -p "+destdir+prefix+"/include") oscmd("mkdir -p "+destdir+prefix+"/share/panda3d") oscmd("mkdir -p "+destdir+prefix+"/share/panda3d/direct") oscmd("mkdir -p "+destdir+prefix+libdir+"/panda3d") oscmd("mkdir -p "+destdir+prefix+libdir+"/"+PYTHONV+"/lib-dynload") oscmd("mkdir -p "+destdir+prefix+libdir+"/"+PYTHONV+"/site-packages") oscmd("mkdir -p "+destdir+"/etc/ld.so.conf.d") WriteFile(destdir+prefix+"/share/panda3d/direct/__init__.py", "") oscmd("sed -e 's@model-cache-@# model-cache-@' -e 's@$THIS_PRC_DIR/[.][.]@"+prefix+"/share/panda3d@' < "+outputdir+"/etc/Config.prc > "+destdir+"/etc/Config.prc") oscmd("cp "+outputdir+"/etc/Confauto.prc "+destdir+"/etc/Confauto.prc") oscmd("cp -R "+outputdir+"/include "+destdir+prefix+"/include/panda3d") oscmd("cp -R direct/src/* "+destdir+prefix+"/share/panda3d/direct") oscmd("cp -R "+outputdir+"/pandac "+destdir+prefix+"/share/panda3d/pandac") oscmd("cp -R "+outputdir+"/models "+destdir+prefix+"/share/panda3d/models") if os.path.isdir("samples"): oscmd("cp -R samples "+destdir+prefix+"/share/panda3d/samples") if os.path.isdir(outputdir+"/Pmw"): oscmd("cp -R "+outputdir+"/Pmw "+destdir+prefix+"/share/panda3d/Pmw") if os.path.isdir(outputdir+"/plugins"): oscmd("cp -R "+outputdir+"/plugins "+destdir+prefix+"/share/panda3d/plugins") oscmd("cp doc/LICENSE "+destdir+prefix+"/share/panda3d/LICENSE") oscmd("cp doc/LICENSE "+destdir+prefix+"/include/panda3d/LICENSE") oscmd("cp doc/ReleaseNotes "+destdir+prefix+"/share/panda3d/ReleaseNotes") oscmd("echo '"+prefix+libdir+"/panda3d'> "+destdir+"/etc/ld.so.conf.d/panda3d.conf") oscmd("echo '"+prefix+"/share/panda3d' > "+destdir+prefix+libdir+"/"+PYTHONV+"/site-packages/panda3d.pth") oscmd("echo '"+prefix+libdir+"/panda3d'>> "+destdir+prefix+libdir+"/"+PYTHONV+"/site-packages/panda3d.pth") oscmd("cp "+outputdir+"/bin/* "+destdir+prefix+"/bin/") for base in os.listdir(outputdir+"/lib"): oscmd("cp "+outputdir+"/lib/"+base+" "+destdir+prefix+libdir+"/panda3d/"+base) for base in os.listdir(destdir+prefix+"/share/panda3d/direct"): if ((base != "extensions") and (base != "extensions_native")): compileall.compile_dir(destdir+prefix+"/share/panda3d/direct/"+base) compileall.compile_dir(destdir+prefix+"/share/panda3d/Pmw") DeleteCVS(destdir) | 8a6c92f4c76934d64a415732f8fd8f860e55e15d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8543/8a6c92f4c76934d64a415732f8fd8f860e55e15d/installpanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10284,
52,
464,
69,
12,
10488,
1214,
1546,
3113,
1633,
1546,
19,
13640,
3113,
876,
1214,
1546,
12406,
6,
4672,
309,
261,
902,
1633,
18,
17514,
1918,
2932,
4898,
3719,
30,
1633,
273,
4016... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10284,
52,
464,
69,
12,
10488,
1214,
1546,
3113,
1633,
1546,
19,
13640,
3113,
876,
1214,
1546,
12406,
6,
4672,
309,
261,
902,
1633,
18,
17514,
1918,
2932,
4898,
3719,
30,
1633,
273,
4016... |
lsctables.SnglInspiralTable.next_id = lsctables.SnglInspiralID_old(0) if old_document: lsctables.SnglInspiralTable.validcolumns["event_id"] = "int_8s" | lsctables.SnglInspiralTable.validcolumns["event_id"] = "int_8s" | def ReadSnglInspiralFromFiles(fileList, mangle_event_id=False, verbose=False, non_lsc_tables_ok=False, old_document=False): """ Read the SnglInspiralTables from a list of files @param fileList: list of input files @param mangle_event_id: ID remapping is necessary in cases where multiple files might have event_id collisions (ex: exttrig injections) @param verbose: print ligolw_add progress """ # turn on ID remapping if necessary if mangle_event_id: next_id_orig = lsctables.SnglInspiralTable.next_id event_id_orig = lsctables.SnglInspiralTable.validcolumns["event_id"] lsctables.SnglInspiralTable.next_id = lsctables.SnglInspiralID_old(0) if old_document: lsctables.SnglInspiralTable.validcolumns["event_id"] = "int_8s" # ligolw_add will merge all tables, which is overkill, but merge time is # much less than I/O time. xmldoc = ligolw_add.ligolw_add(ligolw.Document(), fileList, non_lsc_tables_ok=non_lsc_tables_ok, verbose=verbose) # extract the SnglInspiral table try: snglInspiralTriggers = table.get_table(xmldoc, \ lsctables.SnglInspiralTable.tableName) except: snglInspiralTriggers = None # return ID remapping to its normal state (off) if mangle_event_id: lsctables.SnglInspiralTable.next_id = next_id_orig lsctables.SnglInspiralTable.validcolumns["event_id"] = event_id_orig return snglInspiralTriggers | f5679f873a857178997a240078cf75f6a6e240f8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/f5679f873a857178997a240078cf75f6a6e240f8/SnglInspiralUtils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2720,
55,
3368,
80,
382,
1752,
481,
287,
1265,
2697,
12,
768,
682,
16,
312,
4341,
67,
2575,
67,
350,
33,
8381,
16,
3988,
33,
8381,
16,
1661,
67,
80,
1017,
67,
9373,
67,
601,
33,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2720,
55,
3368,
80,
382,
1752,
481,
287,
1265,
2697,
12,
768,
682,
16,
312,
4341,
67,
2575,
67,
350,
33,
8381,
16,
3988,
33,
8381,
16,
1661,
67,
80,
1017,
67,
9373,
67,
601,
33,
83... |
editCtrl.Remove(*editCtrl.GetSelection()) | start, end = editCtrl.GetSelection() if end - start == 0: end += 1 editCtrl.Remove(start, end) | def DispatchCommand(self, command, event): if self.lastFocus == "Edit" and command == "Clear": editCtrl = self.treeCtrl.GetEditControl() editCtrl.Remove(*editCtrl.GetSelection()) return focus = self.FindFocus() method = getattr(focus, command, None) if method is not None: method() else: event.Skip() | 9ee56a35fdb10b99f4946424378c77c9e877b479 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8076/9ee56a35fdb10b99f4946424378c77c9e877b479/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11552,
2189,
12,
2890,
16,
1296,
16,
871,
4672,
309,
365,
18,
2722,
9233,
422,
315,
4666,
6,
471,
1296,
422,
315,
9094,
6877,
3874,
12418,
273,
365,
18,
3413,
12418,
18,
967,
4666,
336... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11552,
2189,
12,
2890,
16,
1296,
16,
871,
4672,
309,
365,
18,
2722,
9233,
422,
315,
4666,
6,
471,
1296,
422,
315,
9094,
6877,
3874,
12418,
273,
365,
18,
3413,
12418,
18,
967,
4666,
336... |
def get_forces(self, atoms): | def get_forces(self, atoms=None): | def get_forces(self, atoms): """Calculate atomic forces""" if self.calculation_required(atoms): if self.debug > 0: print 'calculation required for forces' self.calculate() nc = netCDF(self.get_nc(),'r') forces = nc.variables['DynamicAtomForces'][-1] nc.close() return forces | bf90610c8b52d6cb8ae1d7dae09bdec342268c8a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1380/bf90610c8b52d6cb8ae1d7dae09bdec342268c8a/jacapo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1884,
764,
12,
2890,
16,
9006,
33,
7036,
4672,
3536,
8695,
7960,
26376,
8395,
309,
365,
18,
29916,
67,
4718,
12,
14937,
4672,
309,
365,
18,
4148,
405,
374,
30,
1172,
296,
2991... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1884,
764,
12,
2890,
16,
9006,
33,
7036,
4672,
3536,
8695,
7960,
26376,
8395,
309,
365,
18,
29916,
67,
4718,
12,
14937,
4672,
309,
365,
18,
4148,
405,
374,
30,
1172,
296,
2991... |
def do_broadcast_event(self): """Get the broadcaster associated with the process and exercise BroadcastEvent API.""" | def do_add_listener_to_broadcaster(self): """Get the broadcaster associated with the process and wait for broadcaster events.""" | def do_broadcast_event(self): """Get the broadcaster associated with the process and exercise BroadcastEvent API.""" exe = os.path.join(os.getcwd(), "a.out") | 8e8f302d95ad10440f8126596a2a7bdfe1604d7d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13509/8e8f302d95ad10440f8126596a2a7bdfe1604d7d/TestEvents.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
1289,
67,
12757,
67,
869,
67,
15521,
23748,
12,
2890,
4672,
3536,
967,
326,
324,
26674,
3627,
598,
326,
1207,
471,
2529,
364,
324,
26674,
2641,
12123,
15073,
273,
1140,
18,
803,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
1289,
67,
12757,
67,
869,
67,
15521,
23748,
12,
2890,
4672,
3536,
967,
326,
324,
26674,
3627,
598,
326,
1207,
471,
2529,
364,
324,
26674,
2641,
12123,
15073,
273,
1140,
18,
803,... |
""" | """ | def flimage_open(p1): """ flimage_open(p1) -> image """ retval = _flimage_open(p1) return retval | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
2730,
67,
3190,
12,
84,
21,
4672,
3536,
1183,
2730,
67,
3190,
12,
84,
21,
13,
317,
1316,
3536,
225,
5221,
273,
389,
2242,
2730,
67,
3190,
12,
84,
21,
13,
327,
5221,
282,
2,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1183,
2730,
67,
3190,
12,
84,
21,
4672,
3536,
1183,
2730,
67,
3190,
12,
84,
21,
13,
317,
1316,
3536,
225,
5221,
273,
389,
2242,
2730,
67,
3190,
12,
84,
21,
13,
327,
5221,
282,
2,
-... |
sage: from sage.plot.plot3d.plot3d import _CoordTrans sage: _CoordTrans('y', ['x']) Unknown coordinate system (y in terms of x) """ if hasattr(self, 'all_vars'): if set(self.all_vars) != set(dep_vars + [indep_var]): raise ValueError, 'not all variables were specified for ' + \ 'this coordinate system' self.indep_var = indep_var self.dep_vars = dep_vars def gen_transform(self, **kwds): """ Generate the transformation for this coordinate system in terms of the | sage: from sage.plot.plot3d.plot3d import _ArbitraryCoordinates as arb sage: x,y,z=var('x,y,z') sage: c=arb((x+z,y*z,z), z, (x,y)) sage: c._name 'Arbitrary Coordinates' """ return self.__class__.__name__ def transform(self, **kwds): """ Return the transformation for this coordinate system in terms of the | def __init__(self, indep_var, dep_vars): """ INPUT: | ae9bf5e0d28a56cbf9d189e5545c9a8340d806de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/ae9bf5e0d28a56cbf9d189e5545c9a8340d806de/plot3d.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
316,
15037,
67,
1401,
16,
5993,
67,
4699,
4672,
3536,
12943,
30,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
316,
15037,
67,
1401,
16,
5993,
67,
4699,
4672,
3536,
12943,
30,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
if not self.attributes[XMLSchemaComponent.xsd].has_key(a): | if not self.attributes.has_key(a): | def __checkAttributes(self): """Checks that required attributes have been defined, attributes w/default cannot be required. Checks all defined attributes are legal. """ for a in self.__class__.required: if not self.attributes[XMLSchemaComponent.xsd].has_key(a): raise SchemaError,\ 'class instance %s, missing required attribute %s'\ %(self.__class__, a) | e50368f02a007b522df43404acf761191b9356f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13054/e50368f02a007b522df43404acf761191b9356f0/XMLSchema.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1893,
2498,
12,
2890,
4672,
3536,
4081,
716,
1931,
1677,
1240,
2118,
2553,
16,
1677,
341,
19,
1886,
2780,
506,
1931,
18,
282,
13074,
777,
2553,
1677,
854,
19286,
18,
3536,
364,
279... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1893,
2498,
12,
2890,
4672,
3536,
4081,
716,
1931,
1677,
1240,
2118,
2553,
16,
1677,
341,
19,
1886,
2780,
506,
1931,
18,
282,
13074,
777,
2553,
1677,
854,
19286,
18,
3536,
364,
279... |
self.setValue( self.theQtyFPN, self.theQtyValue ) | self.theStub.setProperty( 'Value', self.theValue ) | def increaseValue( self, button_object ): | 30bce103d9f34982fce5f0fc5e1245ea73d045a1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/30bce103d9f34982fce5f0fc5e1245ea73d045a1/VariableWindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10929,
620,
12,
365,
16,
3568,
67,
1612,
262,
30,
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,
10929,
620,
12,
365,
16,
3568,
67,
1612,
262,
30,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
INSTR_PATH = os.path.join(JOKOSHER_PATH, "..", "Instruments") | INSTR_PATHS = (os.path.join(JOKOSHER_PATH, "..", "Instruments"), os.path.expanduser("~/.jokosher/instruments")) | def idleCacheInstruments(): global instrumentPropertyList, _alreadyCached, _cacheGeneratorObject if _alreadyCached: #Stop idle_add from calling us again return False #create the generator if it hasnt been already if not _cacheGeneratorObject: _cacheGeneratorObject = _cacheInstrumentsGenerator() try: instrumentPropertyList.append(_cacheGeneratorObject.next()) #Make sure idle add calls us again return True except StopIteration: _alreadyCached = True #sort the instruments alphabetically #using the lowercase of the name (at index 0) instrumentPropertyList.sort(key=lambda x: x[0].lower()) #Stop idle_add from calling us again return False | ab5982e39937049ad0236f66503ac44e5aa93167 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10033/ab5982e39937049ad0236f66503ac44e5aa93167/Globals.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12088,
1649,
19228,
87,
13332,
2552,
10353,
1396,
682,
16,
389,
17583,
9839,
16,
389,
2493,
3908,
921,
309,
389,
17583,
9839,
30,
468,
4947,
12088,
67,
1289,
628,
4440,
584,
3382,
327,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12088,
1649,
19228,
87,
13332,
2552,
10353,
1396,
682,
16,
389,
17583,
9839,
16,
389,
2493,
3908,
921,
309,
389,
17583,
9839,
30,
468,
4947,
12088,
67,
1289,
628,
4440,
584,
3382,
327,
1... |
return time.strftime('%Y-%m-%d') | return datetime.datetime.today() | def __getattr__(self, item): if item == 'parent' and self.parent.parent: return EvalEnvironment(self.parent.parent) if item == "current_date": return time.strftime('%Y-%m-%d') if item == "time": return time return self.parent.get(includeid=True)[item] | 69e63052c4655c0c2abbb7a83dcd5da04c2393b7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9151/69e63052c4655c0c2abbb7a83dcd5da04c2393b7/record.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1747,
972,
12,
2890,
16,
761,
4672,
309,
761,
422,
296,
2938,
11,
471,
365,
18,
2938,
18,
2938,
30,
327,
13163,
5494,
12,
2890,
18,
2938,
18,
2938,
13,
309,
761,
422,
315,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1747,
972,
12,
2890,
16,
761,
4672,
309,
761,
422,
296,
2938,
11,
471,
365,
18,
2938,
18,
2938,
30,
327,
13163,
5494,
12,
2890,
18,
2938,
18,
2938,
13,
309,
761,
422,
315,... |
for e in table.values(): f = e[0] if f.__name__.startswith("debug"): continue | for c,e in table.items(): f = c aliases = None if "|" in f: l = f.split("|") f, aliases = l[0], l[1:] if f.startswith("debug"): continue | def help(ui, cmd=None): '''show help for a given command or all commands''' if cmd: try: i = find(cmd) ui.write("%s\n\n" % i[2]) if i[1]: for s, l, d, c in i[1]: opt=' ' if s: opt = opt + '-' + s + ' ' if l: opt = opt + '--' + l + ' ' if d: opt = opt + '(' + str(d) + ')' ui.write(opt, "\n") if c: ui.write(' %s\n' % c) ui.write("\n") ui.write(i[0].__doc__, "\n") except UnknownCommand: ui.warn("hg: unknown command %s\n" % cmd) sys.exit(0) else: if not ui.quiet: version(ui) ui.write('\n') ui.write('hg commands:\n\n') h = {} for e in table.values(): f = e[0] if f.__name__.startswith("debug"): continue d = "" if f.__doc__: d = f.__doc__.splitlines(0)[0].rstrip() h[f.__name__.rstrip("_")] = d fns = h.keys() fns.sort() m = max(map(len, fns)) for f in fns: ui.write(' %-*s %s\n' % (m, f, h[f])) | 0893811fc01f0dd4b4e8636ca072a2337f13402a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/0893811fc01f0dd4b4e8636ca072a2337f13402a/commands.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2809,
12,
4881,
16,
1797,
33,
7036,
4672,
9163,
4500,
2809,
364,
279,
864,
1296,
578,
777,
4364,
26418,
309,
1797,
30,
775,
30,
277,
273,
1104,
12,
4172,
13,
5915,
18,
2626,
27188,
87,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2809,
12,
4881,
16,
1797,
33,
7036,
4672,
9163,
4500,
2809,
364,
279,
864,
1296,
578,
777,
4364,
26418,
309,
1797,
30,
775,
30,
277,
273,
1104,
12,
4172,
13,
5915,
18,
2626,
27188,
87,... |
opt.append("-shared") if sys.platform.startswith('sunos'): opt.append('-mimpure-text') return opt def get_libgcc_dir(self): status, output = exec_command(self.compiler_f77 + ['-print-libgcc-file-name'], use_tee=0) if not status: return os.path.dirname(output) | return hook_name() _default_compilers = ( ('win32', ('gnu','intelv','absoft','compaqv','intelev','gnu95','g95')), ('cygwin.*', ('sage_fortran', 'gnu','intelv','absoft','compaqv','intelev','gnu95','g95')), ('linux.*', ('sage_fortran','gnu','intel','lahey','pg','absoft','nag','vast','compaq', 'intele','intelem','gnu95','g95')), ('darwin.*', ('sage_fortran','nag', 'absoft', 'ibm', 'intel', 'gnu', 'gnu95', 'g95')), ('sunos.*', ('sage_fortran','sun','gnu','gnu95','g95')), ('irix.*', ('mips','gnu','gnu95',)), ('aix.*', ('ibm','gnu','gnu95',)), ('posix', ('gnu','gnu95',)), ('nt', ('gnu','gnu95',)), ('mac', ('gnu','gnu95',)), ) fcompiler_class = None fcompiler_aliases = None if os.popen("sage_fortran --version").read().startswith('GNU Fortran'): import gnu cls=gnu.Sage_FCompiler_1 else: import gnu cls=gnu.Sage_FCompiler def load_all_fcompiler_classes(): """Cache all the FCompiler classes found in modules in the numpy.distutils.fcompiler package. """ from glob import glob global fcompiler_class, fcompiler_aliases,cls if fcompiler_class is not None: return pys = os.path.join(os.path.dirname(__file__), '*.py') fcompiler_class = {} fcompiler_aliases = {} for fname in glob(pys): module_name, ext = os.path.splitext(os.path.basename(fname)) module_name = 'numpy.distutils.fcompiler.' + module_name __import__ (module_name) module = sys.modules[module_name] if hasattr(module, 'compilers'): for cname in module.compilers: klass = getattr(module, cname) desc = (klass.compiler_type, klass, klass.description) fcompiler_class[klass.compiler_type] = desc for alias in klass.compiler_aliases: if alias in fcompiler_aliases: raise ValueError("alias %r defined for both %s and %s" % (alias, klass.__name__, fcompiler_aliases[alias][1].__name__)) fcompiler_aliases[alias] = desc fcompiler_class['sage_fortran']=('gnu',cls,"GNU Fortran (GCC)") def _find_existing_fcompiler(compiler_types, osname=None, platform=None, requiref90=False, c_compiler=None): from numpy.distutils.core import get_distribution dist = get_distribution(always=True) for compiler_type in compiler_types: v = None try: c = new_fcompiler(plat=platform, compiler=compiler_type, c_compiler=c_compiler) c.customize(dist) v = c.get_version() if requiref90 and c.compiler_f90 is None: v = None new_compiler = c.suggested_f90_compiler if new_compiler: log.warn('Trying %r compiler as suggested by %r ' 'compiler for f90 support.' % (compiler_type, new_compiler)) c = new_fcompiler(plat=platform, compiler=new_compiler, c_compiler=c_compiler) c.customize(dist) v = c.get_version() if v is not None: compiler_type = new_compiler if requiref90 and c.compiler_f90 is None: raise ValueError('%s does not support compiling f90 codes, ' 'skipping.' % (c.__class__.__name__)) except DistutilsModuleError: log.debug("_find_existing_fcompiler: compiler_type='%s' raised DistutilsModuleError", compiler_type) except CompilerNotFound: log.debug("_find_existing_fcompiler: compiler_type='%s' not found", compiler_type) if v is not None: return compiler_type return None def available_fcompilers_for_platform(osname=None, platform=None): if osname is None: osname = os.name if platform is None: platform = sys.platform matching_compiler_types = [] for pattern, compiler_type in _default_compilers: if re.match(pattern, platform) or re.match(pattern, osname): for ct in compiler_type: if ct not in matching_compiler_types: matching_compiler_types.append(ct) if not matching_compiler_types: matching_compiler_types.append('gnu') return matching_compiler_types def get_default_fcompiler(osname=None, platform=None, requiref90=False, c_compiler=None): """Determine the default Fortran compiler to use for the given platform.""" matching_compiler_types = available_fcompilers_for_platform(osname, platform) compiler_type = _find_existing_fcompiler(matching_compiler_types, osname=osname, platform=platform, requiref90=requiref90, c_compiler=c_compiler) return compiler_type def new_fcompiler(plat=None, compiler=None, verbose=0, dry_run=0, force=0, requiref90=False, c_compiler = None): """Generate an instance of some FCompiler subclass for the supplied platform/compiler combination. """ load_all_fcompiler_classes() if plat is None: plat = os.name if compiler is None: compiler = get_default_fcompiler(plat, requiref90=requiref90, c_compiler=c_compiler) if compiler in fcompiler_class: module_name, klass, long_description = fcompiler_class[compiler] elif compiler in fcompiler_aliases: module_name, klass, long_description = fcompiler_aliases[compiler] else: msg = "don't know how to compile Fortran code on platform '%s'" % plat if compiler is not None: msg = msg + " with '%s' compiler." % compiler msg = msg + " Supported compilers are: %s)" \ % (','.join(fcompiler_class.keys())) log.warn(msg) | def get_flags_linker_so(self): opt = self.linker_so[1:] if sys.platform=='darwin': target = os.environ.get('MACOSX_DEPLOYMENT_TARGET', None) # If MACOSX_DEPLOYMENT_TARGET is set, we simply trust the value # and leave it alone. But, distutils will complain if the # environment's value is different from the one in the Python # Makefile used to build Python. We let disutils handle this # error checking. if not target: # If MACOSX_DEPLOYMENT_TARGET is not set in the environment, # we try to get it first from the Python Makefile and then we # fall back to setting it to 10.3 to maximize the set of # versions we can work with. This is a reasonable default # even when using the official Python dist and those derived # from it. import distutils.sysconfig as sc g = {} filename = sc.get_makefile_filename() sc.parse_makefile(filename, g) target = g.get('MACOSX_DEPLOYMENT_TARGET', '10.3') os.environ['MACOSX_DEPLOYMENT_TARGET'] = target if target == '10.3': s = 'Env. variable MACOSX_DEPLOYMENT_TARGET set to 10.3' warnings.warn(s) | 88d8906f7b729e50947606558b12f05e24421e4d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/88d8906f7b729e50947606558b12f05e24421e4d/gnu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
7133,
67,
1232,
264,
67,
2048,
12,
2890,
4672,
2153,
273,
365,
18,
1232,
264,
67,
2048,
63,
21,
26894,
309,
2589,
18,
9898,
18920,
28076,
4278,
1018,
273,
1140,
18,
28684,
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,
336,
67,
7133,
67,
1232,
264,
67,
2048,
12,
2890,
4672,
2153,
273,
365,
18,
1232,
264,
67,
2048,
63,
21,
26894,
309,
2589,
18,
9898,
18920,
28076,
4278,
1018,
273,
1140,
18,
28684,
18,... |
"""Like nstransfercmd() but returns only the socket.""" | """Like ntransfercmd() but returns only the socket.""" | def transfercmd(self, cmd, rest=None): """Like nstransfercmd() but returns only the socket.""" return self.ntransfercmd(cmd, rest)[0] | 3fcf3f3134a5ac7d068b34036598275de17f3f4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/3fcf3f3134a5ac7d068b34036598275de17f3f4a/ftplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7412,
4172,
12,
2890,
16,
1797,
16,
3127,
33,
7036,
4672,
3536,
8804,
290,
13866,
4172,
1435,
1496,
1135,
1338,
326,
2987,
12123,
327,
365,
18,
82,
13866,
4172,
12,
4172,
16,
3127,
25146... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7412,
4172,
12,
2890,
16,
1797,
16,
3127,
33,
7036,
4672,
3536,
8804,
290,
13866,
4172,
1435,
1496,
1135,
1338,
326,
2987,
12123,
327,
365,
18,
82,
13866,
4172,
12,
4172,
16,
3127,
25146... |
if (32 + chunk_size * num_chunks) != len(piece): | if (32 + (num_chunks * chunk_size)) != len(piece): | def read_directory(self, piece): self.entries = {} if not piece.startswith('IFCM'): raise LitError('Header piece #1 is not main directory.') chunk_size, num_chunks = int32(piece[8:12]), int32(piece[24:28]) if (32 + chunk_size * num_chunks) != len(piece): raise LitError('IFCM HEADER has incorrect length') for chunk in range(num_chunks): p = 32 + chunk * chunk_size if piece[p:p+4] != 'AOLL': continue remaining = chunk_size - int32(piece[p+4:p+8]) - 48 if remaining < 0: raise LitError('AOLL remaining count is negative') entries = u16(piece[p+chunk_size-2:]) if entries <= 0: # Hopefully everything will work even without a correct entries # count entries = (2 ** 16) - 1 piece = piece[p+48:] i = 0 while i < entries: if remaining <= 0: break namelen, piece, remaining = encint(piece, remaining) if namelen != (namelen & 0x7fffffff): raise LitError('Directory entry had 64bit name length.') if namelen > remaining - 3: raise LitError('Read past end of directory chunk') name = piece[:namelen] piece = piece[namelen:] section, piece, remaining = encint(piece, remaining) offset, piece, remaining = encint(piece, remaining) size, piece, remaining = encint(piece, remaining) entry = DirectoryEntry(name, section, offset, size) if name == '::DataSpace/NameList': self.read_section_names(entry) elif name == '/manifest': self.read_manifest(entry) elif name == '/meta': self.read_meta(entry) self.entries[name] = entry i += 1 if not hasattr(self, 'section_names'): raise LitError('Lit file does not have a valid NameList') if not hasattr(self, 'manifest'): raise LitError('Lit file does not have a valid manifest') self.read_drm() | 006182e5f46ea8f5da43607ab530dff752a12d94 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/006182e5f46ea8f5da43607ab530dff752a12d94/reader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
5149,
12,
2890,
16,
11151,
4672,
365,
18,
8219,
273,
2618,
309,
486,
11151,
18,
17514,
1918,
2668,
45,
4488,
49,
11,
4672,
1002,
511,
305,
668,
2668,
1864,
11151,
468,
21,
353... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
5149,
12,
2890,
16,
11151,
4672,
365,
18,
8219,
273,
2618,
309,
486,
11151,
18,
17514,
1918,
2668,
45,
4488,
49,
11,
4672,
1002,
511,
305,
668,
2668,
1864,
11151,
468,
21,
353... |
Usage: yum [options] <update | install | info | remove | list | | Usage: yum [options] < update | install | info | remove | list | | def usage(self): print _(""" | 18d518d1521511781d65bc686769f98de3ae36e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/18d518d1521511781d65bc686769f98de3ae36e1/cli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
12,
2890,
4672,
1172,
389,
2932,
3660,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
12,
2890,
4672,
1172,
389,
2932,
3660,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
except : date = 0; FileDateCache[path] = date; | except : date = 0 FileDateCache[path] = date | def updatefiledate(path) : global FileDateCache try : date = os.path.getmtime(path) except : date = 0; FileDateCache[path] = date; | aa9700942409f59dfc63d4542d0bad0a01230726 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/aa9700942409f59dfc63d4542d0bad0a01230726/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
768,
712,
12,
803,
13,
294,
2552,
1387,
1626,
1649,
775,
294,
1509,
273,
1140,
18,
803,
18,
588,
10838,
12,
803,
13,
1335,
294,
1509,
273,
374,
1387,
1626,
1649,
63,
803,
65,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
768,
712,
12,
803,
13,
294,
2552,
1387,
1626,
1649,
775,
294,
1509,
273,
1140,
18,
803,
18,
588,
10838,
12,
803,
13,
1335,
294,
1509,
273,
374,
1387,
1626,
1649,
63,
803,
65,
2... |
('comp_dta',5),('invoice_number',11),('comp_bank_number',24),('date_value',6), | ('comp_dta',5),('invoice_number',11),('comp_bank_iban',24),('date_value',6), | def init_local_context(self): print "gt826" self.fields=[ ('seg_num1',2), #header ('date_value_hdr',6),('partner_bank_clearing',12),('zero5',5),('creation_date',6), ('comp_bank_clearing',7), ('uid',5), ('sequence',5), ('genre_trans',3), ('type_paiement',1),('flag',1), #seg1 ('comp_dta',5),('invoice_number',11),('comp_bank_number',24),('date_value',6), ('invoice_currency',3),('amount_to_pay',12),('padding',14), #seg2 ('seg_num2',2),('comp_name',20),('comp_street',20),('comp_zip',10), ('comp_city',10),('comp_country',20),('padding',46), #seg3 ('seg_num3',2),('partner_bvr',12),#numero d'adherent bvr ('padding',80),('invoice_reference',27),#communication structuree ('padding',2)] | 328edec7605fd017d24ea82a08c02c5bd0b17447 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/328edec7605fd017d24ea82a08c02c5bd0b17447/dta_wizard.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
67,
3729,
67,
2472,
12,
2890,
4672,
1172,
315,
4521,
28,
5558,
6,
365,
18,
2821,
22850,
7707,
5680,
67,
2107,
21,
2187,
22,
3631,
468,
3374,
7707,
712,
67,
1132,
67,
16587,
2187,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
67,
3729,
67,
2472,
12,
2890,
4672,
1172,
315,
4521,
28,
5558,
6,
365,
18,
2821,
22850,
7707,
5680,
67,
2107,
21,
2187,
22,
3631,
468,
3374,
7707,
712,
67,
1132,
67,
16587,
2187,... |
e.num = getint(b) | e.num = getint_event(b) | def _substitute(self, *args): """Internal function.""" if len(args) != len(self._subst_format): return args getboolean = self.tk.getboolean getint = int nsign, b, f, h, k, s, t, w, x, y, A, E, K, N, W, T, X, Y, D = args # Missing: (a, c, d, m, o, v, B, R) e = Event() e.serial = getint(nsign) e.num = getint(b) try: e.focus = getboolean(f) except TclError: pass e.height = getint(h) e.keycode = getint(k) # For Visibility events, event state is a string and # not an integer: try: e.state = getint(s) except ValueError: e.state = s e.time = getint(t) e.width = getint(w) e.x = getint(x) e.y = getint(y) e.char = A try: e.send_event = getboolean(E) except TclError: pass e.keysym = K e.keysym_num = getint(N) e.type = T try: e.widget = self._nametowidget(W) except KeyError: e.widget = W e.x_root = getint(X) e.y_root = getint(Y) try: e.delta = getint(D) except ValueError: e.delta = 0 return (e,) | 06848bdb9a7fcb2a84de1f8144e95d56a48ab347 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/06848bdb9a7fcb2a84de1f8144e95d56a48ab347/Tkinter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1717,
17207,
12,
2890,
16,
380,
1968,
4672,
3536,
3061,
445,
12123,
309,
562,
12,
1968,
13,
480,
562,
12,
2890,
6315,
1717,
334,
67,
2139,
4672,
327,
833,
336,
6494,
273,
365,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1717,
17207,
12,
2890,
16,
380,
1968,
4672,
3536,
3061,
445,
12123,
309,
562,
12,
1968,
13,
480,
562,
12,
2890,
6315,
1717,
334,
67,
2139,
4672,
327,
833,
336,
6494,
273,
365,
18,... |
f = ManualGenerator("SetControlData_Callback", setcontroldata_callback_body, condition=" | f = ManualGenerator("SetControlData_Callback", setcontroldata_callback_body); | def outputCleanupStructMembers(self): Output("Py_XDECREF(self->ob_callbackdict);") Output("if (self->ob_itself)SetControlReference(self->ob_itself, (long)0); /* Make it forget about us */") | 19f1e58cf0a0ec5f666107518196b52449ffec41 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/19f1e58cf0a0ec5f666107518196b52449ffec41/ctlsupport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
876,
15007,
3823,
6918,
12,
2890,
4672,
3633,
2932,
9413,
67,
60,
1639,
5458,
42,
12,
2890,
2122,
947,
67,
3394,
1576,
1769,
7923,
3633,
2932,
430,
261,
2890,
2122,
947,
67,
1282,
19079,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
876,
15007,
3823,
6918,
12,
2890,
4672,
3633,
2932,
9413,
67,
60,
1639,
5458,
42,
12,
2890,
2122,
947,
67,
3394,
1576,
1769,
7923,
3633,
2932,
430,
261,
2890,
2122,
947,
67,
1282,
19079,... |
userData['Descr'] = str("%s of %s" % (self.optionLabel, img.name)) | userData['Descr'] = str("%s of image %s" % (self.optionLabel, img.name)) | def debug(msg): print "[YWP@%s] %s" % ("%02d:%02d:%02d" % time.localtime(time.time())[3:6], msg) sys.stdout.flush() | 0c4364bbf400bb114ffff63a2dfbc0c901eff56c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11651/0c4364bbf400bb114ffff63a2dfbc0c901eff56c/stiff.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1198,
12,
3576,
4672,
1172,
5158,
61,
20265,
36,
9,
87,
65,
738,
87,
6,
738,
7566,
9,
3103,
72,
5319,
3103,
72,
5319,
3103,
72,
6,
738,
813,
18,
3729,
957,
12,
957,
18,
957,
10756,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1198,
12,
3576,
4672,
1172,
5158,
61,
20265,
36,
9,
87,
65,
738,
87,
6,
738,
7566,
9,
3103,
72,
5319,
3103,
72,
5319,
3103,
72,
6,
738,
813,
18,
3729,
957,
12,
957,
18,
957,
10756,... |
self._pages = None | self._index = None self._last_index_update = 0 | def __init__(self): self._pages = None | 6392f2a70e74c43e37782a00df9b97e7e92a6a57 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/6392f2a70e74c43e37782a00df9b97e7e92a6a57/api.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
6315,
7267,
273,
599,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
6315,
7267,
273,
599,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
'class': CPPClassObject, 'function': CPPFunctionObject, 'member': CPPMemberObject, 'type': CPPTypeObject | 'class': CPPClassObject, 'function': CPPFunctionObject, 'member': CPPMemberObject, 'type': CPPTypeObject, 'namespace': CPPCurrentNamespace | def describe_signature(self, signode, func): # return value is None for things with a reverse return value # such as casting operator definitions or constructors # and destructors. if func.rv is not None: self.attach_type(signode, func.rv) signode += nodes.Text(u' ') self.attach_function(signode, func) | 9da129aeb9a67d386c40bd67cb7b0854de864c81 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5532/9da129aeb9a67d386c40bd67cb7b0854de864c81/cpp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6401,
67,
8195,
12,
2890,
16,
1573,
390,
16,
1326,
4672,
468,
327,
460,
353,
599,
364,
9198,
598,
279,
4219,
327,
460,
468,
4123,
487,
27660,
3726,
6377,
578,
19874,
468,
471,
23819,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6401,
67,
8195,
12,
2890,
16,
1573,
390,
16,
1326,
4672,
468,
327,
460,
353,
599,
364,
9198,
598,
279,
4219,
327,
460,
468,
4123,
487,
27660,
3726,
6377,
578,
19874,
468,
471,
23819,
1... |
if self.proj_index != self.proj_om.get_history(): self.proj_index = self.proj_om.get_history() | index = combo.get_active() if self.proj_index != index: self.proj_index = index | def set_proj_cb(self,*args): """Set projection""" if self.proj_index != self.proj_om.get_history(): self.proj_index = self.proj_om.get_history() self.sr = osr.SpatialReference() self.sr.SetWellKnownGeogCS(self.datum_names[self.datum_name]) self.sr.SetProjection(self.projs[self.proj_index]) for i in self.proj_parms[self.proj_index]: try: self.sr.SetNormProjParm(i[0], self.parm_dict[i[0]]) except KeyError: self.sr.SetNormProjParm(i[0], i[3]) self.layer.set_projection(self.sr.ExportToWkt()) self.create_projparms() | 0a9f3291528240d019f1755ce071bd15e36e112d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11090/0a9f3291528240d019f1755ce071bd15e36e112d/gvrasterpropdlg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
17995,
67,
7358,
12,
2890,
16,
14,
1968,
4672,
3536,
694,
8106,
8395,
770,
273,
16778,
18,
588,
67,
3535,
1435,
309,
365,
18,
17995,
67,
1615,
480,
770,
30,
365,
18,
17995,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
17995,
67,
7358,
12,
2890,
16,
14,
1968,
4672,
3536,
694,
8106,
8395,
770,
273,
16778,
18,
588,
67,
3535,
1435,
309,
365,
18,
17995,
67,
1615,
480,
770,
30,
365,
18,
17995,
... |
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.sock.connect((host, port)) | self.sock = socket.create_connection((host, port)) | def open(self, host = '', port = IMAP4_PORT): """Setup connection to remote server on "host:port" (default: localhost:standard IMAP4 port). This connection will be used by the routines: read, readline, send, shutdown. """ self.host = host self.port = port self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.sock.connect((host, port)) self.file = self.sock.makefile('rb') | 2fd4b1d68f7059eb03a01621fa749d82539bb1bb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/2fd4b1d68f7059eb03a01621fa749d82539bb1bb/imaplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
12,
2890,
16,
1479,
273,
10226,
1756,
273,
6246,
2203,
24,
67,
6354,
4672,
3536,
7365,
1459,
358,
2632,
1438,
603,
315,
2564,
30,
655,
6,
261,
1886,
30,
17365,
30,
10005,
6246,
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,
1696,
12,
2890,
16,
1479,
273,
10226,
1756,
273,
6246,
2203,
24,
67,
6354,
4672,
3536,
7365,
1459,
358,
2632,
1438,
603,
315,
2564,
30,
655,
6,
261,
1886,
30,
17365,
30,
10005,
6246,
2... |
from os.path import basename | def __init__(self, moniker, main_file, aux_files=[], timestamp=None): import os import os.path | afdbb54885d6870d43a00232af554f720746c1ad /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12871/afdbb54885d6870d43a00232af554f720746c1ad/batchjob.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
6921,
1766,
264,
16,
2774,
67,
768,
16,
9397,
67,
2354,
22850,
6487,
2858,
33,
7036,
4672,
1930,
1140,
1930,
1140,
18,
803,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
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,
6921,
1766,
264,
16,
2774,
67,
768,
16,
9397,
67,
2354,
22850,
6487,
2858,
33,
7036,
4672,
1930,
1140,
1930,
1140,
18,
803,
2,
-100,
-100,
-100,
-100,
-1... | |
del binaries[arch][0][binary] | del binaries[parch][0][binary] | def doop_source(self, pkg): """Apply a change to the testing distribution as requested by `pkg` | b8d4deefd1e15dc48987f2d10c01b6f060204f30 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/b8d4deefd1e15dc48987f2d10c01b6f060204f30/britney.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
556,
67,
3168,
12,
2890,
16,
3475,
4672,
3536,
7001,
279,
2549,
358,
326,
7769,
7006,
487,
3764,
635,
1375,
10657,
68,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
556,
67,
3168,
12,
2890,
16,
3475,
4672,
3536,
7001,
279,
2549,
358,
326,
7769,
7006,
487,
3764,
635,
1375,
10657,
68,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
def rewind_cb(self): '''Sets all parameters back to their original states (including unpausing)''' | def rewind(self): '''Sets all parameters back to their original states (including unpausing)''' | def rewind_cb(self): '''Sets all parameters back to their original states (including unpausing)''' self.clear_highlighting() self.stdout_clear() self.current_line=0 self.finished=False self.paused=False self.source.see('1.0') | 299d942cd4da3083d36a0ef915134c6d929ed34b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5103/299d942cd4da3083d36a0ef915134c6d929ed34b/trace_display.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12881,
12,
2890,
4672,
9163,
2785,
777,
1472,
1473,
358,
3675,
2282,
5493,
261,
31348,
640,
8774,
9940,
2506,
6309,
225,
365,
18,
8507,
67,
15978,
310,
1435,
365,
18,
10283,
67,
8507,
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,
12881,
12,
2890,
4672,
9163,
2785,
777,
1472,
1473,
358,
3675,
2282,
5493,
261,
31348,
640,
8774,
9940,
2506,
6309,
225,
365,
18,
8507,
67,
15978,
310,
1435,
365,
18,
10283,
67,
8507,
14... |
self.generate_figure(node, source, destination) else: if self.in_paragraph: el1 = self.current_element else: el1 = SubElement(self.current_element, 'text:p', attrib={'text:style-name': 'rststyle-textbody'}) self.generate_image(node, source, destination, el1) def generate_figure(self, node, source, destination): caption = None for node1 in node.parent.children: if node1.tagname == 'caption': caption = node1.astext() self.image_style_count += 1 style_name = 'rstframestyle%d' % self.image_style_count | el3, el4, caption = self.generate_figure(node, source, destination, el2) attrib = { 'draw:blue': '0%', 'draw:color-inversion': 'false', 'draw:color-mode': 'standard', 'draw:contrast': '0%', 'draw:gamma': '100%', 'draw:green': '0%', 'draw:image-opacity': '100%', 'draw:luminance': '0%', 'draw:red': '0%', 'fo:border': 'none', 'fo:clip': 'rect(0in 0in 0in 0in)', 'fo:margin-bottom': '0in', 'fo:margin-left': '0in', 'fo:margin-right': '0in', 'fo:margin-top': '0in', 'fo:padding': '0in', 'style:horizontal-pos': 'from-left', 'style:horizontal-rel': 'paragraph-content', 'style:mirror': 'none', 'style:run-through': 'foreground', 'style:shadow': 'none', 'style:vertical-pos': 'from-top', 'style:vertical-rel': 'paragraph-content', 'style:wrap': 'none', } el5, width = self.generate_image(node, source, destination, el4, attrib) if caption is not None: el5.tail = caption else: el3 = self.generate_image(node, source, destination, el2) def depart_image(self, node): pass def get_image_width_height(self, node, attr, scale): size = None if attr in node.attributes: try: size = int(node.attributes[attr]) size *= 35.278 / 1000.0 size *= scale except ValueError, e: print 'Error: Invalid %s for image: "%s"' % ( attr, node.attributes[attr], ) return size def get_image_scale(self, node): | def visit_image(self, node): #ipshell('At visit_image') #self.trace_visit_node(node) # Capture the image file. if 'uri' in node.attributes: source = node.attributes['uri'] if not self.check_file_exists(source): print 'Error: Cannot find image file %s.' % (source, ) return else: return if source in self.image_dict: filename, destination = self.image_dict[source] else: self.image_count += 1 filename = os.path.split(source)[1] destination = 'Pictures/1%08x%s' % (self.image_count, filename, ) spec = (source, destination,) self.embedded_file_list.append(spec) self.image_dict[source] = (filename, destination,) # Is this a figure (containing an image) or just a plain image? if isinstance(node.parent, docutils.nodes.figure): self.generate_figure(node, source, destination) else: if self.in_paragraph: el1 = self.current_element else: el1 = SubElement(self.current_element, 'text:p', attrib={'text:style-name': 'rststyle-textbody'}) self.generate_image(node, source, destination, el1) | 8f9c74628116346d2f6e669c6a41a3e179d554cb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5620/8f9c74628116346d2f6e669c6a41a3e179d554cb/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
2730,
12,
2890,
16,
756,
4672,
468,
625,
10304,
2668,
861,
3757,
67,
2730,
6134,
468,
2890,
18,
5129,
67,
11658,
67,
2159,
12,
2159,
13,
468,
18477,
326,
1316,
585,
18,
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,
3757,
67,
2730,
12,
2890,
16,
756,
4672,
468,
625,
10304,
2668,
861,
3757,
67,
2730,
6134,
468,
2890,
18,
5129,
67,
11658,
67,
2159,
12,
2159,
13,
468,
18477,
326,
1316,
585,
18,
309,
... |
try: os.unlink(tmp_file) except Exception, e: logger = netsvc.Logger() logger.notifyChannel("warning", netsvc.LOG_WARNING, "Temporary file %s could not be deleted. (%s)" % (tmp_file.name, e)) | def _generate(self, cr, uid, data, context): pool = pooler.get_pool(cr.dbname) module_model = pool.get('ir.module.module') module_ids = data['ids'] | 975faf4268a466e0cab3072ab088d75bcfba4f17 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/975faf4268a466e0cab3072ab088d75bcfba4f17/wizard_tech_guide_rst.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7163,
12,
2890,
16,
4422,
16,
4555,
16,
501,
16,
819,
4672,
2845,
273,
2845,
264,
18,
588,
67,
6011,
12,
3353,
18,
20979,
13,
1605,
67,
2284,
273,
2845,
18,
588,
2668,
481,
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,
389,
7163,
12,
2890,
16,
4422,
16,
4555,
16,
501,
16,
819,
4672,
2845,
273,
2845,
264,
18,
588,
67,
6011,
12,
3353,
18,
20979,
13,
1605,
67,
2284,
273,
2845,
18,
588,
2668,
481,
18,
... | |
if ((event != masterEvent) and (event.occurrenceFor is not None) and | if ((event.occurrenceFor is not None) and | def recurringEventsInRange(self, date, nextDate, dayItems, timedItems): masterEvents = CalendarCollections(self.contents).masterEvents for masterEvent in masterEvents: for event in masterEvent.getOccurrencesBetween(date, nextDate): # One or both of dayItems and timedItems must be # True. If both, then there's no need to test the # item's day-ness. If only one is True, then # dayItems' value must match the return of # isDayItem. if ((event != masterEvent) and (event.occurrenceFor is not None) and ((dayItems and timedItems) or self.isDayItem(event) == dayItems)): | 8717c0db430a05cdf27a9a380a6d4de89bd264ef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/8717c0db430a05cdf27a9a380a6d4de89bd264ef/CalendarCanvas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26043,
3783,
25277,
12,
2890,
16,
1509,
16,
1024,
1626,
16,
2548,
3126,
16,
7491,
3126,
4672,
4171,
3783,
273,
5542,
15150,
12,
2890,
18,
3980,
2934,
7525,
3783,
364,
4171,
1133,
316,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26043,
3783,
25277,
12,
2890,
16,
1509,
16,
1024,
1626,
16,
2548,
3126,
16,
7491,
3126,
4672,
4171,
3783,
273,
5542,
15150,
12,
2890,
18,
3980,
2934,
7525,
3783,
364,
4171,
1133,
316,
41... |
except WhatchuTalkinBoutWillisError: | except ArgumentError: | def _handleFile(self, filename): m = None if osp.isfile(filename): try: mname = reflect.filenameToModuleName(filename) self._tryNamedAny(mname) except WhatchuTalkinBoutWillisError: # okay, not in PYTHONPATH... path, fullname = osp.split(filename) name, ext = osp.splitext(fullname) m = new.module(name) sourcestring = file(filename, 'rb').read() exec sourcestring in m.__dict__ sys.modules[name] = m self['modules'].append(m) | 44810fc1456fc104e486a733307c26c4f0104e37 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/44810fc1456fc104e486a733307c26c4f0104e37/trial.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4110,
812,
12,
2890,
16,
1544,
4672,
312,
273,
599,
309,
23660,
18,
291,
768,
12,
3459,
4672,
775,
30,
312,
529,
273,
3037,
18,
3459,
774,
22542,
12,
3459,
13,
365,
6315,
698,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4110,
812,
12,
2890,
16,
1544,
4672,
312,
273,
599,
309,
23660,
18,
291,
768,
12,
3459,
4672,
775,
30,
312,
529,
273,
3037,
18,
3459,
774,
22542,
12,
3459,
13,
365,
6315,
698,
7... |
valid_events = Event.objects.filter(useravailability__user=self, anchor=program.anchor).order_by('start')) | valid_events = Event.objects.filter(useravailability__user=self, anchor=program.anchor).order_by('start') | def getAvailableTimes(self, program, ignore_classes=False): """ Return a list of the Event objects representing the times that a particular user can teach for a particular program. """ from esp.resources.models import Resource from esp.cal.models import Event | 6a69992168203ca41889f5886d9ba8bfe5a27c58 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12041/6a69992168203ca41889f5886d9ba8bfe5a27c58/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15796,
10694,
12,
2890,
16,
5402,
16,
2305,
67,
4701,
33,
8381,
4672,
3536,
2000,
279,
666,
434,
326,
2587,
2184,
5123,
326,
4124,
716,
279,
6826,
729,
848,
6489,
497,
364,
279,
6826,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15796,
10694,
12,
2890,
16,
5402,
16,
2305,
67,
4701,
33,
8381,
4672,
3536,
2000,
279,
666,
434,
326,
2587,
2184,
5123,
326,
4124,
716,
279,
6826,
729,
848,
6489,
497,
364,
279,
6826,
... |
if not verbose: i.detail = "" print i | if verbose: print i elif not verbose and not i.host_name == 'detail': print i | def component_describe(self,components=None,verbose=False): params = {} if components: self.euca.connection.build_list_params(params,components,'Name') try: list = self.euca.connection.get_list('DescribeComponents', params, [('euca:item', Component)]) for i in list: if not verbose: i.detail = "" print i except EC2ResponseError, ex: self.euca.handle_error(ex) | e255c7df6a4e909b70cf841db7ff9325d60f847d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12708/e255c7df6a4e909b70cf841db7ff9325d60f847d/components.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1794,
67,
22748,
12,
2890,
16,
8119,
33,
7036,
16,
11369,
33,
8381,
4672,
859,
273,
2618,
309,
4085,
30,
365,
18,
73,
5286,
69,
18,
4071,
18,
3510,
67,
1098,
67,
2010,
12,
2010,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1794,
67,
22748,
12,
2890,
16,
8119,
33,
7036,
16,
11369,
33,
8381,
4672,
859,
273,
2618,
309,
4085,
30,
365,
18,
73,
5286,
69,
18,
4071,
18,
3510,
67,
1098,
67,
2010,
12,
2010,
16,
... |
raise ValueError, 'unknown cipher' | raise ValueError, ('unknown cipher', alg) | def __init__(self, alg, key, iv, op, key_as_bytes=0, d='md5', salt='', i=1): cipher = getattr(m2, alg) if not cipher: raise ValueError, 'unknown cipher' self.cipher=cipher() if key_as_bytes: kmd = getattr(m2, d) if not kmd: raise ValueError, 'unknown message digest' key = m2.bytes_to_key(self.cipher, kmd(), key, salt, iv, i) self.ctx=m2.cipher_ctx_new() m2.cipher_init(self.ctx, self.cipher, key, iv, op) del key | 416bbe794c00c7bcd147f4ca746425b2711305ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8055/416bbe794c00c7bcd147f4ca746425b2711305ab/EVP.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
11989,
16,
498,
16,
4674,
16,
1061,
16,
498,
67,
345,
67,
3890,
33,
20,
16,
302,
2218,
1264,
25,
2187,
4286,
2218,
2187,
277,
33,
21,
4672,
5867,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
11989,
16,
498,
16,
4674,
16,
1061,
16,
498,
67,
345,
67,
3890,
33,
20,
16,
302,
2218,
1264,
25,
2187,
4286,
2218,
2187,
277,
33,
21,
4672,
5867,
273,
... |
sums = ["COALESCE(SUM(msgs), 0)::float", | sums = ["COALESCE(SUM(msgs)-SUM(%s_spam_msgs), 0)::float" % (self.__short_name,), | def get_graph(self, end_date, report_days, host=None, user=None, email=None): if host or user: return None | e7dc5127b2ee682f62b16bf00e207d821437feb7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/87/e7dc5127b2ee682f62b16bf00e207d821437feb7/untangle_base_spam.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4660,
12,
2890,
16,
679,
67,
712,
16,
2605,
67,
9810,
16,
1479,
33,
7036,
16,
729,
33,
7036,
16,
2699,
33,
7036,
4672,
309,
1479,
578,
729,
30,
327,
599,
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,
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,
336,
67,
4660,
12,
2890,
16,
679,
67,
712,
16,
2605,
67,
9810,
16,
1479,
33,
7036,
16,
729,
33,
7036,
16,
2699,
33,
7036,
4672,
309,
1479,
578,
729,
30,
327,
599,
2,
-100,
-100,
-1... |
tmp_tnrs.append( line[2:].strip().split(':') ) | if ' ' in line[2:].strip(): for lpart in line[2:].strip().split(' '): tmp_tnrs.append(lpart.strip().split(':',2)) else: tmp_tnrs.append( line[2:].strip().split(':',2) ) | def unquote(str): return str[1:-1].replace("\\n", "\n") \ .replace('\\"', '"') | c05dc4b8478f7b37a2748c0affbd03a1988494a4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/c05dc4b8478f7b37a2748c0affbd03a1988494a4/translate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25611,
12,
701,
4672,
327,
609,
63,
21,
30,
17,
21,
8009,
2079,
2932,
1695,
82,
3113,
1548,
82,
7923,
282,
521,
263,
2079,
2668,
27576,
2187,
4754,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
25611,
12,
701,
4672,
327,
609,
63,
21,
30,
17,
21,
8009,
2079,
2932,
1695,
82,
3113,
1548,
82,
7923,
282,
521,
263,
2079,
2668,
27576,
2187,
4754,
13,
2,
-100,
-100,
-100,
-100,
-100,... |
import search s = search.SearchByName() | s = SearchByName() | def parse_results(self, raw_xml): """Parse the xml and return a list of dictionaries like: [ {'IDSubtitle': 'foo', 'LinkUseNext': 'foo', 'MovieName': 'foo_movie', ... }, {'IDSubtitle': 'foo', 'LinkUseNext': 'foo', 'MovieName': 'foo_movie', ... }, ...] """ dom = minidom.parseString(raw_xml) #Make the dom from raw xml entries=dom.getElementsByTagName('opensubtitles') #Pull out all entry's result_entries=[] #Make an empty container to fill up and return data = None # fetch the wanted result xml node for entry in entries: if len(entry.getElementsByTagName('results')) > 0: for result in entry.getElementsByTagName('results'): if len(result.getElementsByTagName('subtitle')) > 0: data = result.getElementsByTagName('subtitle') break break #print "data=", data if not data: return [] # catch all subtitles information for entry in data: try: sub_obj = subtitlefile.SubtitleFile(online=True) sub = {} if entry.getElementsByTagName('IDSubtitle'): sub['IDSubtitle'] = { 'IDSubtitle': entry.getElementsByTagName('IDSubtitle')[0].firstChild.data, 'Link': entry.getElementsByTagName('IDSubtitle')[0].getAttribute('Link'), 'LinkImdb': entry.getElementsByTagName('IDSubtitle')[0].getAttribute('LinkImdb'), 'DownloadLink': entry.getElementsByTagName('IDSubtitle')[0].getAttribute('DownloadLink'), 'uuid': entry.getElementsByTagName('IDSubtitle')[0].getAttribute('uuid'), } sub_obj.id = sub['IDSubtitle']['IDSubtitle'] if entry.getElementsByTagName('UserID'): sub['UserID'] = { 'UserID': entry.getElementsByTagName('UserID')[0].firstChild.data, 'Link': entry.getElementsByTagName('UserID')[0].getAttribute('Link'), } if entry.getElementsByTagName('UserNickName'): sub['UserNickName'] = entry.getElementsByTagName('UserNickName')[0].firstChild.data sub_obj._uploader = sub['UserNickName'] if entry.getElementsByTagName('MovieID'): #sub['MovieID'] = entry.getElementsByTagName('MovieID')[0].firstChild.data sub['MovieID'] = { 'MovieID': entry.getElementsByTagName('MovieID')[0].firstChild.data, 'Link': entry.getElementsByTagName('MovieID')[0].getAttribute('Link'), 'LinkImdb': entry.getElementsByTagName('MovieID')[0].getAttribute('LinkImdb'), } if entry.getElementsByTagName('MovieThumb'): sub['MovieThumb'] = entry.getElementsByTagName('MovieThumb')[0].firstChild.data if entry.getElementsByTagName('LinkUseNext'): sub['LinkUseNext'] = entry.getElementsByTagName('LinkUseNext')[0].firstChild.data if entry.getElementsByTagName('LinkZoozle'): sub['LinkZoozle'] = entry.getElementsByTagName('LinkZoozle')[0].firstChild.data if entry.getElementsByTagName('LinkTorrentbar'): sub['LinkTorrentbar'] = entry.getElementsByTagName('LinkTorrentbar')[0].firstChild.data if entry.getElementsByTagName('LinkBoardreader'): sub['LinkBoardreader'] = entry.getElementsByTagName('LinkBoardreader')[0].firstChild.data if entry.getElementsByTagName('MovieName'): sub['MovieName'] = entry.getElementsByTagName('MovieName')[0].firstChild.data if entry.getElementsByTagName('MovieYear'): sub['MovieYear'] = entry.getElementsByTagName('MovieYear')[0].firstChild.data if entry.getElementsByTagName('MovieImdbRating'): sub['MovieImdbRating'] = entry.getElementsByTagName('MovieImdbRating')[0].firstChild.data if entry.getElementsByTagName('MovieImdbID'): sub['MovieImdbID'] = entry.getElementsByTagName('MovieImdbID')[0].firstChild.data if entry.getElementsByTagName('SubAuthorComment'): try: sub['SubAuthorComment'] = entry.getElementsByTagName('SubAuthorComment')[0].firstChild.data except AttributeError: sub['SubAuthorComment'] = entry.getElementsByTagName('SubAuthorComment')[0].firstChild if entry.getElementsByTagName('ISO639'): sub['ISO639'] = { 'ISO639': entry.getElementsByTagName('ISO639')[0].firstChild.data, 'LinkSearch': entry.getElementsByTagName('ISO639')[0].getAttribute('LinkSearch'), 'flag': entry.getElementsByTagName('ISO639')[0].getAttribute('flag'), } sub_obj._languageXX = sub['ISO639']['ISO639'] if entry.getElementsByTagName('LanguageName'): sub['LanguageName'] = entry.getElementsByTagName('LanguageName')[0].firstChild.data sub_obj._languageName = sub['LanguageName'] if entry.getElementsByTagName('SubFormat'): sub['SubFormat'] = entry.getElementsByTagName('SubFormat')[0].firstChild.data if entry.getElementsByTagName('SubSumCD'): sub['SubSumCD'] = entry.getElementsByTagName('SubSumCD')[0].firstChild.data if entry.getElementsByTagName('SubAddDate'): sub['SubAddDate'] = entry.getElementsByTagName('SubAddDate')[0].firstChild.data if entry.getElementsByTagName('SubBad'): sub['SubBad'] = entry.getElementsByTagName('SubBad')[0].firstChild.data if entry.getElementsByTagName('SubRating'): sub['SubRating'] = entry.getElementsByTagName('SubRating')[0].firstChild.data if entry.getElementsByTagName('SubDownloadsCnt'): sub['SubDownloadsCnt'] = entry.getElementsByTagName('SubDownloadsCnt')[0].firstChild.data if entry.getElementsByTagName('SubMovieAka'): sub['SubMovieAka'] = entry.getElementsByTagName('SubMovieAka')[0].firstChild.data if entry.getElementsByTagName('SubDate'): sub['SubDate'] = entry.getElementsByTagName('SubDate')[0].firstChild.data if entry.getElementsByTagName('SubComments'): sub['SubComments'] = entry.getElementsByTagName('SubComments')[0].firstChild.data if entry.getElementsByTagName('TotalSubs'): sub['TotalSubs'] = entry.getElementsByTagName('TotalSubs')[0].firstChild.data if entry.getElementsByTagName('Newest'): sub['Newest'] = entry.getElementsByTagName('Newest')[0].firstChild.data if sub: #result_entries.append(sub) movie = Movie(sub) if sub_obj.id: movie.subtitles.append(sub_obj) result_entries.append(movie) except IndexError, e: pass return result_entries | f4a0b5c76f2474a74fe101030a960e622bef3d59 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1108/f4a0b5c76f2474a74fe101030a960e622bef3d59/search.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
4717,
12,
2890,
16,
1831,
67,
2902,
4672,
3536,
3201,
326,
2025,
471,
327,
279,
666,
434,
16176,
3007,
30,
306,
282,
13666,
734,
1676,
2649,
4278,
296,
11351,
2187,
296,
2098,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
4717,
12,
2890,
16,
1831,
67,
2902,
4672,
3536,
3201,
326,
2025,
471,
327,
279,
666,
434,
16176,
3007,
30,
306,
282,
13666,
734,
1676,
2649,
4278,
296,
11351,
2187,
296,
2098,
... |
>>> translate_stacktrace(file('infolog.txt').read()) | >>> translate_stacktrace(file('infolog.txt').read()) | def translate_stacktrace(infolog): '''\ Translate a complete stacktrace to (filename, lineno) tuples. The input string may be a complete infolog (i.e. infolog.txt). At the very least it must contain the 'Spring XXX has crashed.' or 'Hang detection triggered for Spring XXX.' line and at least one stack frame. The output is a list of (filename, lineno) tuples, or ('??', 0) for each frame that could not be translated. Example of a remote call to the service in Python: (Note that tuples have become lists) >>> from xmlrpclib import ServerProxy #doctest:+SKIP ... proxy = ServerProxy('http://springrts.com:8000/') ... proxy.translate_stacktrace(file('infolog.txt').read()) [['rts/Rendering/Env/GrassDrawer.cpp', 229], ['rts/Rendering/Env/GrassDrawer.cpp', 136], ['rts/Rendering/Env/AdvTreeDrawer.cpp', 54], ['rts/Rendering/Env/BaseTreeDrawer.cpp', 57], ['rts/Game/Game.cpp', 527], ... ['??', 0]] Example of a local call: >>> translate_stacktrace(file('infolog.txt').read()) [('rts/Rendering/Env/GrassDrawer.cpp', 229), ('rts/Rendering/Env/GrassDrawer.cpp', 136), ('rts/Rendering/Env/AdvTreeDrawer.cpp', 54), ('rts/Rendering/Env/BaseTreeDrawer.cpp', 57), ('rts/Game/Game.cpp', 527), ... ('??', 0)] ''' log.info('----- Start of translation process -----') # TODO: add module checksum dump to spring, add code here to parse those. # With checksums, the idea is: # 1) put module_names and module_checksums in a dict which maps name to checksum # 2) use best_matching_module to find best matching item from module_names # 3) get its checksum # 4) download debugging symbols from ##/#############################, which # shall be a symlink to the correct 7z file containing debugging symbols. # 5) perform translation.. # Without checksums, the idea is: # 1) look in config/branch/rev folder # 2) build a list of modules based on *_dbg.7z files available in this folder # (there's no guarantee of course that AI's, unitsync, etc. are of the # same version as Spring.., but we'll have to live with that.) # 3) download debugging symbols for a module directly from config/branch/rev/... # 4) perform translation try: config, branch, rev = detect_version_details(infolog) module_frames, frame_count = collect_stackframes(infolog) modules = collect_modules(config, branch, rev) translated_stacktrace = translate_(module_frames, frame_count, modules) except FatalError: # FatalError is intended to reach the client => re-raise raise except Exception: # Log the real exception log.critical(traceback.format_exc()) # Throw a new exception without leaking too much information raise FatalError('unhandled exception') log.info('----- End of translation process -----') return translated_stacktrace | 9156686b4113c7785dbaaaa2909e22a9289d3190 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1030/9156686b4113c7785dbaaaa2909e22a9289d3190/stacktrace_translator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4204,
67,
3772,
5129,
12,
10625,
3966,
4672,
875,
8314,
16820,
279,
3912,
26934,
358,
261,
3459,
16,
7586,
13,
10384,
18,
225,
1021,
810,
533,
2026,
506,
279,
3912,
8286,
3966,
261,
77,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4204,
67,
3772,
5129,
12,
10625,
3966,
4672,
875,
8314,
16820,
279,
3912,
26934,
358,
261,
3459,
16,
7586,
13,
10384,
18,
225,
1021,
810,
533,
2026,
506,
279,
3912,
8286,
3966,
261,
77,
... |
class PyWCmdLineTests(WCmdLineTests): | class PyWCmdLineTests(BaseTest, WCmdLineTests): | def test_improper_input(self): # Uses the private _setoption() function to test the parsing # of command-line warning arguments with test_support.catch_warning(self.module): self.assertRaises(self.module._OptionError, self.module._setoption, '1:2:3:4:5:6') self.assertRaises(self.module._OptionError, self.module._setoption, 'bogus::Warning') self.assertRaises(self.module._OptionError, self.module._setoption, 'ignore:2::4:-5') self.module._setoption('error::Warning::0') self.assertRaises(UserWarning, self.module.warn, 'convert to error') | 5561b5a428065a2753637468b90a1bbcdc8ab686 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/5561b5a428065a2753637468b90a1bbcdc8ab686/test_warnings.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
381,
22754,
67,
2630,
12,
2890,
4672,
468,
14854,
326,
3238,
389,
542,
3482,
1435,
445,
358,
1842,
326,
5811,
468,
434,
1296,
17,
1369,
3436,
1775,
598,
1842,
67,
13261,
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,
1842,
67,
381,
22754,
67,
2630,
12,
2890,
4672,
468,
14854,
326,
3238,
389,
542,
3482,
1435,
445,
358,
1842,
326,
5811,
468,
434,
1296,
17,
1369,
3436,
1775,
598,
1842,
67,
13261,
18,
... |
cp.set(sec, 'module_name', pms.module_name) cp.set(sec, 'module_config_dict', pms.module_config.__dict__) cp.set(sec, 'glyph_position', glyph_pos_dict[pms.instance_name]) | cp.set(sec, 'module_name', pms.moduleName) cp.set(sec, 'module_config_dict', pms.moduleConfig.__dict__) cp.set(sec, 'glyph_position', glyph_pos_dict[pms.instanceName]) | def save_network(pms_dict, connection_list, glyph_pos_dict, filename): """Given the serialised network representation as returned by ModuleManager._serialiseNetwork, write the whole thing to disk as a config-style DVN file. """ cp = ConfigParser.ConfigParser() # create a section for each module for pms in pms_dict.values(): sec = 'modules/%s' % (pms.instance_name,) cp.add_section(sec) cp.set(sec, 'module_name', pms.module_name) cp.set(sec, 'module_config_dict', pms.module_config.__dict__) cp.set(sec, 'glyph_position', glyph_pos_dict[pms.instance_name]) sec = 'connections' for idx, pconn in enumerate(connection_list): sec = 'connections/%d' % (idx,) cp.add_section(sec) attrs = pconn.__dict__.keys() for a in attrs: cp.set(sec, a, getattr(pconn, a)) cfp = file(filename, 'wb') cp.write(cfp) cfp.close() mm = devide_app.get_module_manager() mm.log_message('Wrote NEW-style network %s.' % (filename,)) | d2e6f789dbc16f4a6512fb342d5f85f0fa9791c2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4494/d2e6f789dbc16f4a6512fb342d5f85f0fa9791c2/convert_dvn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
67,
5185,
12,
84,
959,
67,
1576,
16,
1459,
67,
1098,
16,
9440,
67,
917,
67,
1576,
16,
1544,
4672,
3536,
6083,
326,
2734,
5918,
2483,
4335,
487,
2106,
635,
5924,
1318,
6315,
8818,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
5185,
12,
84,
959,
67,
1576,
16,
1459,
67,
1098,
16,
9440,
67,
917,
67,
1576,
16,
1544,
4672,
3536,
6083,
326,
2734,
5918,
2483,
4335,
487,
2106,
635,
5924,
1318,
6315,
8818,... |
if M <= 3: initial_precision = M elif ceil(log(M/2, 2)) == ceil(log(M/3, 2)): initial_precision = 2 else: initial_precision = 3 if initial_precision == 1: k = 1 X = S(1) elif initial_precision == 2: k = 2 X = S(base_ring(3) / base_ring(2)).shift(p) - r elif initial_precision == 3: k = 3 X = (base_ring(1) / base_ring(8)) * ( S(15).shift(2*p) - \ (base_ring(20) * r).shift(p) + \ (base_ring(12) * r.square()) \ ) three_halves = base_ring(3) / base_ring(2) while k < M: target_k = 2*k if ceil(log(M/target_k, 2)) == ceil(log(M/(target_k-1), 2)): target_k -= 1 temp = X.square() * (X * r) temp = temp.shift(-p*(3*k - target_k - 1)) X = (three_halves * X).shift(p*(target_k - k)) - temp k = target_k assert k == M, "Oops, something went wrong in the iteration" F0 = base_ring(p) * x_to_p_less_one * X F1 = F0 * x_to_p offset = ((2*k-1)*p - 1)/2 return F0, F1, offset | if M <= 3: initial_precision = M elif ceil(log(M/2, 2)) == ceil(log(M/3, 2)): initial_precision = 2 else: initial_precision = 3 if initial_precision == 1: k = 1 X = S(1) elif initial_precision == 2: k = 2 X = S(base_ring(3) / base_ring(2)).shift(p) - r elif initial_precision == 3: k = 3 X = (base_ring(1) / base_ring(8)) * ( S(15).shift(2*p) - \ (base_ring(20) * r).shift(p) + \ (base_ring(12) * r.square()) \ ) three_halves = base_ring(3) / base_ring(2) while k < M: target_k = 2*k if ceil(log(M/target_k, 2)) == ceil(log(M/(target_k-1), 2)): target_k -= 1 temp = X.square() * (X * r) temp = temp.shift(-p*(3*k - target_k - 1)) X = (three_halves * X).shift(p*(target_k - k)) - temp k = target_k assert k == M, "Oops, something went wrong in the iteration" F0 = base_ring(p) * x_to_p_less_one * X F1 = F0 * x_to_p offset = ((2*k-1)*p - 1)/2 return F0, F1, offset | def frobenius_expansion_by_newton(Q, p, M): r""" Computes the action of Frobenius on $dx/y$ and on $x dx/y$, using Newton's method (as suggested in Kedlaya's paper). (This function does *not* yet use the cohomology relations -- that happens afterwards in the "reduction" step.) More specifically, it finds $F_0$ and $F_1$ in the quotient ring $R[x, T]/(T - Q(x))$, such that $$ F( dx/y) = T^{-r} F0 dx/y, \text{ and } F(x dx/y) = T^{-r} F1 dx/y $$ where $$ r = ( (2M-3)p - 1 )/2. $$ (Here $T$ is $y^2 = z^{-2}$, and $R$ is the coefficient ring of $Q$.) $F_0$ and $F_1$ are computed in the SpecialCubicQuotientRing associated to $Q$, so all powers of $x^j$ for $j \geq 3$ are reduced to powers of $T$. INPUT: Q -- cubic polynomial of the form Q(x) = x^3 + ax + b, whose coefficient ring is a Z/(p^M)Z-algebra p -- residue characteristic of the p-adic field M -- p-adic precision of the coefficient ring (this will be used to determine the number of Newton iterations) OUTPUT: F0, F1 -- elements of SpecialCubicQuotientRing(Q), as described above r -- non-negative integer, as described above """ S = SpecialCubicQuotientRing(Q) x, _ = S.gens() # T = y^2 base_ring = S.base_ring() # When we compute Frob(1/y) we actually only need precision M-1, since # we're going to multiply by p at the end anyway. M = float(M - 1) # Kedlaya sets s = Q(x^p)/T^p = 1 + p T^{-p} E, where # E = (Q(x^p) - Q(x)^p) / p (has integral coefficients). # Then he computes s^{-1/2} in S, using Newton's method to find # successive approximations. We follow this plan, but we normalise our # approximations so that we only ever need positive powers of T. # Start by setting r = Q(x^p)/2 = 1/2 T^p s. # (The 1/2 is for convenience later on.) x_to_p_less_one = x**(p-1) x_to_p = x_to_p_less_one * x x_to_p_cubed = x_to_p.square() * x_to_p r = (base_ring(1) / base_ring(2)) * (x_to_p_cubed + Q[1]*x_to_p + S(Q[0])) # todo: this next loop would be clearer if it used the newton_method_sizes() # function # We will start with a hard-coded initial approximation, which we provide # up to precision 3. First work out what precision is best to start with. if M <= 3: initial_precision = M elif ceil(log(M/2, 2)) == ceil(log(M/3, 2)): # In this case there's no advantage to starting with precision three, # because we'll overshoot at the end. E.g. suppose the final precision # is 8. If we start with precision 2, we need two iterations to get us # to 8. If we start at precision 3, we will still need two iterations, # but we do more work along the way. So may as well start with only 2. initial_precision = 2 else: initial_precision = 3 # Now compute the first approximation. In the main loop below, X is the # normalised approximation, and k is the precision. More specifically, # X = T^{p(k-1)} x_i, where x_i is an approximation to s^{-1/2}, and the # approximation is correct mod p^k. if initial_precision == 1: k = 1 X = S(1) elif initial_precision == 2: # approximation is 3/2 - 1/2 s k = 2 X = S(base_ring(3) / base_ring(2)).shift(p) - r elif initial_precision == 3: # approximation is (15 - 10 s + 3 s^2) / 8 k = 3 X = (base_ring(1) / base_ring(8)) * ( S(15).shift(2*p) - \ (base_ring(20) * r).shift(p) + \ (base_ring(12) * r.square()) \ ) # The key to the following calculation is that the T^{-m} coefficient # of every x_i is divisible by p^(ceil(m/p)) (for m >= 0). Therefore if # we are only expecting an answer correct mod p^k, we can truncate # beyond the T^{-(k-1)p} term without any problems. # todo: what would be really nice is to be able to work in a lower # precision *coefficient ring* when we start the iteration, and move up to # higher precision rings as the iteration proceeds. This would be feasible # over Integers(p**n), but quite complicated (maybe impossible) over a more # general base ring. This might give a decent constant factor speedup; # or it might not, depending on how much the last iteration dominates the # whole runtime. My guess is that it isn't worth the effort. three_halves = base_ring(3) / base_ring(2) # Newton iteration loop while k < M: # target_k = k' = precision we want our answer to be after this iteration target_k = 2*k # This prevents us overshooting. For example if the current precision # is 3 and we want to get to 10, we're better off going up to 5 # instead of 6, because it's less work to get from 5 to 10 than it # is to get from 6 to 10. if ceil(log(M/target_k, 2)) == ceil(log(M/(target_k-1), 2)): target_k -= 1 # temp = T^{p(3k-2)} 1/2 s x_i^3 temp = X.square() * (X * r) # We know that the final result is only going to be correct mod # p^(target_k), so we might as well truncate the extraneous terms now. # temp = T^{p(k'-1)} 1/2 s x_i^3 temp = temp.shift(-p*(3*k - target_k - 1)) # X = T^{p(k'-1)} (3/2 x_i - 1/2 s x_i^3) # = T^{p(k'-1)} x_{i+1} X = (three_halves * X).shift(p*(target_k - k)) - temp k = target_k # Now k should equal M, since we're up to the correct precision assert k == M, "Oops, something went wrong in the iteration" # We should have s^{-1/2} correct to precision M. # The following line can be uncommented to verify this. # (It's a slow verification though, can double the whole computation time.) #assert (p * X.square() * r * base_ring(2)).coeffs() == \ # R(p).shift(p*(2*M - 1)).coeffs() # Finally incorporate frobenius of dx and x dx, and choose offset that # compensates for our normalisations by powers of T. F0 = base_ring(p) * x_to_p_less_one * X F1 = F0 * x_to_p offset = ((2*k-1)*p - 1)/2 return F0, F1, offset | 06ea403f27d6562f2b12bd1e2b8f27b9b674388a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/06ea403f27d6562f2b12bd1e2b8f27b9b674388a/monsky_washnitzer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
303,
19425,
8384,
67,
2749,
12162,
67,
1637,
67,
2704,
1917,
12,
53,
16,
293,
16,
490,
4672,
436,
8395,
14169,
281,
326,
1301,
434,
478,
303,
19425,
8384,
603,
271,
13437,
19,
93,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
303,
19425,
8384,
67,
2749,
12162,
67,
1637,
67,
2704,
1917,
12,
53,
16,
293,
16,
490,
4672,
436,
8395,
14169,
281,
326,
1301,
434,
478,
303,
19425,
8384,
603,
271,
13437,
19,
93,... |
if variables == None: variables = f.variables() | def equify(f, variables = None): """ Returns the equation rewritten as a symbolic function to give negative values when True, positive when False. EXAMPLES:: sage: from sage.plot.contour_plot import equify sage: var('x, y') (x, y) sage: equify(x^2 < 2) x |--> x^2 - 2 sage: equify(x^2 > 2) x |--> -x^2 + 2 sage: equify(x*y > 1) (x, y) |--> -x*y + 1 sage: equify(y > 0, (x,y)) (x, y) |--> -y """ import operator from sage.calculus.all import symbolic_expression op = f.operator() if variables == None: variables = f.variables() if op is operator.gt or op is operator.ge: s = symbolic_expression(f.rhs() - f.lhs()).function(*variables) return s else: s = symbolic_expression(f.lhs() - f.rhs()).function(*variables) return s | d4235734e2435a6828f66583a85001debae436ae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/d4235734e2435a6828f66583a85001debae436ae/contour_plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1298,
1164,
12,
74,
16,
3152,
273,
599,
4672,
3536,
2860,
326,
15778,
26768,
487,
279,
16754,
445,
358,
8492,
6092,
924,
1347,
1053,
16,
6895,
1347,
1083,
18,
225,
5675,
8900,
11386,
286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1298,
1164,
12,
74,
16,
3152,
273,
599,
4672,
3536,
2860,
326,
15778,
26768,
487,
279,
16754,
445,
358,
8492,
6092,
924,
1347,
1053,
16,
6895,
1347,
1083,
18,
225,
5675,
8900,
11386,
286... | |
self._embed = Browser() | self._embed = WebView() | def __init__(self, parent_window): gobject.GObject.__init__(self) | 80bdcd5fa306e11ef335cd3088e9bd409de20a89 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6905/80bdcd5fa306e11ef335cd3088e9bd409de20a89/webview.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
67,
5668,
4672,
314,
1612,
18,
43,
921,
16186,
2738,
972,
12,
2890,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
67,
5668,
4672,
314,
1612,
18,
43,
921,
16186,
2738,
972,
12,
2890,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
DataPool.clear = notify_decorator(dict.__setitem__) | DataPool.clear = notify_decorator(dict.clear) | def __init__(self): | ad6be781c146ac791b91071e68bfbc445b917f95 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11338/ad6be781c146ac791b91071e68bfbc445b917f95/session.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
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,
1001,
2738,
972,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
w = int(w * size/height) | def get_screenshot_xcomposite(self, screen, window, size=200): ''' Get the window pixmap of window from the X compositor extension, return it as a gdk.pixbuf. ''' display = screen.get_display() xdisplay = libgdk.gdk_x11_display_get_xdisplay(hash(display)) | d472c168498b2241a2352fc0f9f67f7c0f855ee6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7075/d472c168498b2241a2352fc0f9f67f7c0f855ee6/dockbarx.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
29435,
67,
92,
27676,
12,
2890,
16,
5518,
16,
2742,
16,
963,
33,
6976,
4672,
9163,
968,
326,
2742,
11871,
1458,
434,
2742,
628,
326,
1139,
532,
1724,
280,
2710,
16,
327,
518,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
29435,
67,
92,
27676,
12,
2890,
16,
5518,
16,
2742,
16,
963,
33,
6976,
4672,
9163,
968,
326,
2742,
11871,
1458,
434,
2742,
628,
326,
1139,
532,
1724,
280,
2710,
16,
327,
518,
... | |
file = os.path.expandvars('$SystemRoot\\memory.dmp') | file = os.path.expandvars('$windir\\memory.dmp') | def get_commands(self, option_id): # cache if 'posix' == os.name and 'cache' == option_id: dirname = os.path.expanduser("~/.cache/") for filename in children_in_directory(dirname, True): yield Command.Delete(filename) | cc4d7c323b32dc1bec50333652d586b266b89d80 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7853/cc4d7c323b32dc1bec50333652d586b266b89d80/Cleaner.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
7847,
12,
2890,
16,
1456,
67,
350,
4672,
468,
1247,
309,
296,
24463,
11,
422,
1140,
18,
529,
471,
296,
2493,
11,
422,
1456,
67,
350,
30,
4283,
273,
1140,
18,
803,
18,
12320,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7847,
12,
2890,
16,
1456,
67,
350,
4672,
468,
1247,
309,
296,
24463,
11,
422,
1140,
18,
529,
471,
296,
2493,
11,
422,
1456,
67,
350,
30,
4283,
273,
1140,
18,
803,
18,
12320,... |
elif data: | else: | def _to_xml(self, xml, data): if isinstance(data, (list, tuple)): for item in data: self._to_xml(xml, item) elif isinstance(data, dict): for key, value in data.iteritems(): xml.startElement(key, {}) self._to_xml(xml, value) xml.endElement(key) elif data: xml.characters(smart_unicode(data)) | f522696f9812cee3421e27b4779e8cd925ad6295 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11777/f522696f9812cee3421e27b4779e8cd925ad6295/emitters.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
869,
67,
2902,
12,
2890,
16,
2025,
16,
501,
4672,
309,
1549,
12,
892,
16,
261,
1098,
16,
3193,
3719,
30,
364,
761,
316,
501,
30,
365,
6315,
869,
67,
2902,
12,
2902,
16,
761,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
869,
67,
2902,
12,
2890,
16,
2025,
16,
501,
4672,
309,
1549,
12,
892,
16,
261,
1098,
16,
3193,
3719,
30,
364,
761,
316,
501,
30,
365,
6315,
869,
67,
2902,
12,
2902,
16,
761,
1... |
for otherClassId in package.classes: otherClassDeps = self._depLoader.getDeps(otherClassId, variants) if classId in (x.name for x in otherClassDeps["load"]): self._console.info("Used by: %s (load)" % otherClassId) if classId in (x.name for x in otherClassDeps["run"]): self._console.info("Used by: %s (run)" % otherClassId) | for part in parts.values(): if package in part.packages: self._console.info("Part %s" % part.name) for classId in sorted(package.classes): self._console.info("Class: %s" % classId) self._console.indent() for otherClassId in package.classes: otherClassDeps = self._depLoader.getDeps(otherClassId, variants) if classId in (x.name for x in otherClassDeps["load"]): self._console.info("Used by: %s (load)" % otherClassId) if classId in (x.name for x in otherClassDeps["run"]): self._console.info("Used by: %s (run)" % otherClassId) self._console.outdent() | def usedByDeps(depsLogConf): for packageId, package in enumerate(packages): self._console.info("Package %s" % packageId) self._console.indent() | d1325a630dd674037a9e9c9ee82994269849d10d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/d1325a630dd674037a9e9c9ee82994269849d10d/Generator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1399,
858,
14430,
12,
14877,
1343,
3976,
4672,
364,
2181,
548,
16,
2181,
316,
4241,
12,
10308,
4672,
365,
6315,
8698,
18,
1376,
2932,
2261,
738,
87,
6,
738,
2181,
548,
13,
365,
6315,
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,
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,
1399,
858,
14430,
12,
14877,
1343,
3976,
4672,
364,
2181,
548,
16,
2181,
316,
4241,
12,
10308,
4672,
365,
6315,
8698,
18,
1376,
2932,
2261,
738,
87,
6,
738,
2181,
548,
13,
365,
6315,
8... |
path('/home/guido/.scipy/cache/yzcoords.txt') | path('/home/guido/.scipy/cache/xyzcoords.txt') | def filepath(self, uri): """Return a path object to the uri in the cache. | 2ae79776959ca2db73d75db6abc360a4c38f76f4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/2ae79776959ca2db73d75db6abc360a4c38f76f4/datasource.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3608,
12,
2890,
16,
2003,
4672,
3536,
990,
279,
589,
733,
358,
326,
2003,
316,
326,
1247,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3608,
12,
2890,
16,
2003,
4672,
3536,
990,
279,
589,
733,
358,
326,
2003,
316,
326,
1247,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
try: if arr.isbyteswapped(): arr.byteswap() except AttributeError: | if not hasattr(arr, "type") or not hasattr(arr, "astype"): | def showArray(self, arr, **kargs): """Display a 2-d or 3-d grayscale integer numarray arrays. 3-d images are displayed as data cubes, meaning one can view a single z at a time or play through them as a movie, that sort of thing. Inputs: - arr: a numarray array; must be 2-d or 3-d: 2-d arrays have index order (y, x) 3-d arrays are loaded as a data cube index order (z, y, x) kargs: see Extra Keyword Arguments in the module doc string for information. Keywords that specify array info (see doc for showBinFile for the list) are ignored, because array info is determined from the array itself. Data types: - UInt8, Int16, Int32 and floating point types sent unmodified. - All other integer types are converted before transmission. - Complex types are rejected. Raises ValueError if arr's elements are not some kind of integer. Raises RuntimeError if ds9 is not running or returns an error message. """ try: if arr.isbyteswapped(): arr.byteswap() except AttributeError: arr = num.array(arr) if arr.type() in _ComplexTypes: raise TypeError("ds9 cannot handle complex data") | f8269c0c32ad07c8ca488e6b62cd741160d3ab1e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6354/f8269c0c32ad07c8ca488e6b62cd741160d3ab1e/DS9.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
1076,
12,
2890,
16,
2454,
16,
2826,
79,
1968,
4672,
3536,
4236,
279,
576,
17,
72,
578,
890,
17,
72,
16937,
5864,
3571,
818,
1126,
5352,
18,
890,
17,
72,
4602,
854,
10453,
487,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
1076,
12,
2890,
16,
2454,
16,
2826,
79,
1968,
4672,
3536,
4236,
279,
576,
17,
72,
578,
890,
17,
72,
16937,
5864,
3571,
818,
1126,
5352,
18,
890,
17,
72,
4602,
854,
10453,
487,
... |
prn( session.query( Employee).all( | prn( session.query( Employee).filter( | def test_selects(): from dbcook import expression session = sqlalchemy.orm.create_session() empl_table = mybuild.tables[ Employee] ######## simple age = 40 print '====== all Employee with age<=', age, ', plain SA' prn( session.query( Employee).all( empl_table.c.age <= age) ) print ' --- same, via expression' prn( expression.query1( lambda self: self.age <= age, klas=Employee, session=session) ) expression._debug = 'dbg' in sys.argv ######## 1 level self-ref age = 40 print '====== all Employee with manager of age<=', age, ', plain SA' mgr = empl_table.alias() prn( session.query( Employee).all( (mgr.c.age <= age) & (empl_table.c.manager_id == mgr.c.db_id) ) ) print ' --- same, via expression/equivalent' prn( expression.query1( lambda self, selfm=Employee: (self.manager == selfm.db_id) & (selfm.age <= age), klas=Employee, session=session) ) print ' --- same, via expression/automatic' prn( expression.query1( lambda self: self.manager.age <= age, klas=Employee, session=session) ) ######## multilevel self-ref mgr2 = empl_table.alias() print '====== multilevel: all Employee with manager with manager of age >', age, 'plain SA' prn( session.query( Employee).all( (mgr2.c.age > age) & (mgr.c.manager_id == mgr2.c.db_id) & (empl_table.c.manager_id == mgr.c.db_id) ) ) print ' --- same, via expression/automatic' prn( expression.query1( lambda self: self.manager.manager.age > age, klas=Employee, session=session) ) | d9b3a2e587baabafe5ebcc0406b8e5b6168e245e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10808/d9b3a2e587baabafe5ebcc0406b8e5b6168e245e/example1.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
4025,
87,
13332,
628,
9881,
1184,
1930,
2652,
1339,
273,
1847,
24182,
18,
535,
18,
2640,
67,
3184,
1435,
801,
412,
67,
2121,
273,
3399,
3510,
18,
9373,
63,
512,
27520,
65,
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,
1842,
67,
4025,
87,
13332,
628,
9881,
1184,
1930,
2652,
1339,
273,
1847,
24182,
18,
535,
18,
2640,
67,
3184,
1435,
801,
412,
67,
2121,
273,
3399,
3510,
18,
9373,
63,
512,
27520,
65,
22... |
file = os.path.abspath(file) | def add(self, files, options=''): """ Add the given list of files (or file) or directories to your HG repository. They must exist already. | ac9f108c6f21c3ad8c2941ced5e59d4ddf264682 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/ac9f108c6f21c3ad8c2941ced5e59d4ddf264682/hg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
12,
2890,
16,
1390,
16,
702,
2218,
11,
4672,
3536,
1436,
326,
864,
666,
434,
1390,
261,
280,
585,
13,
578,
6402,
358,
3433,
670,
43,
3352,
18,
225,
16448,
1297,
1005,
1818,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
12,
2890,
16,
1390,
16,
702,
2218,
11,
4672,
3536,
1436,
326,
864,
666,
434,
1390,
261,
280,
585,
13,
578,
6402,
358,
3433,
670,
43,
3352,
18,
225,
16448,
1297,
1005,
1818,
18,
... | |
self.assert_(not debugger.enabled) | self.assert_(not debugger.enabled) | def testEventDispatch(self): global debugger self.assert_(not debugger.enabled) debugger.onBreak = lambda evt: self.processDebugEvent(evt) debugger.onException = lambda evt: self.processDebugEvent(evt) debugger.onNewFunction = lambda evt: self.processDebugEvent(evt) debugger.onBeforeCompile = lambda evt: self.processDebugEvent(evt) debugger.onAfterCompile = lambda evt: self.processDebugEvent(evt) with JSContext() as ctxt: debugger.enabled = True self.assertEquals(3, int(ctxt.eval("function test() { text = \"1+2\"; return eval(text) } test()"))) debugger.enabled = False self.assertRaises(JSError, JSContext.eval, ctxt, "throw 1") self.assert_(not debugger.enabled) self.assertEquals(4, len(self.events)) | 39238494c6380764c75b46d3d726c011640ecf54 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5828/39238494c6380764c75b46d3d726c011640ecf54/PyV8.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1133,
5325,
12,
2890,
4672,
2552,
19977,
225,
365,
18,
11231,
67,
12,
902,
19977,
18,
5745,
13,
225,
19977,
18,
265,
7634,
273,
3195,
6324,
30,
365,
18,
2567,
2829,
1133,
12,
73,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1133,
5325,
12,
2890,
4672,
2552,
19977,
225,
365,
18,
11231,
67,
12,
902,
19977,
18,
5745,
13,
225,
19977,
18,
265,
7634,
273,
3195,
6324,
30,
365,
18,
2567,
2829,
1133,
12,
73,... |
temp_fname.append(os.path.join(cache_prefix, 'labeled_' + filenames[(w,t)])) | temp_fname.append(os.path.join(cache_prefix, 'labeled_tracks_' + filenames[(w,t)])) | def populate_directories(path, dataset_id): if os.path.lexists(path) == False: os.mkdir(path) if os.path.lexists(os.path.join(path, 'cache')) == False: os.mkdir(os.path.join(path, 'cache')) if os.path.lexists(os.path.join(path, 'cache', dataset_id)) == False: os.mkdir(os.path.join(path, 'cache', dataset_id)) | c30a20afb9792b03141fb185b40ca49125c41c24 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10592/c30a20afb9792b03141fb185b40ca49125c41c24/tracker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6490,
67,
15121,
12,
803,
16,
3709,
67,
350,
4672,
309,
1140,
18,
803,
18,
4149,
1486,
12,
803,
13,
422,
1083,
30,
1140,
18,
26686,
12,
803,
13,
309,
1140,
18,
803,
18,
4149,
1486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6490,
67,
15121,
12,
803,
16,
3709,
67,
350,
4672,
309,
1140,
18,
803,
18,
4149,
1486,
12,
803,
13,
422,
1083,
30,
1140,
18,
26686,
12,
803,
13,
309,
1140,
18,
803,
18,
4149,
1486,
... |
etree.parse(StringIO(page), base_url=b.get_url()) | url = b.get_url() if isinstance(url, str): url = unicode(url, 'latin1') etree.parse(StringIO(page), base_url=url) | def _validate_xhtml(func_name, *args, **kwargs): page = b.get_html() if "xhtml1-strict.dtd" not in page: return etree.clear_error_log() try: etree.parse(StringIO(page), base_url=b.get_url()) except etree.XMLSyntaxError, e: raise twill.errors.TwillAssertionError( _format_error_log(page, e.error_log)) | 9d7cb5221dd9fda9c8c354330e3b297e919787d1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2831/9d7cb5221dd9fda9c8c354330e3b297e919787d1/better_twill.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5662,
67,
26341,
12,
644,
67,
529,
16,
380,
1968,
16,
2826,
4333,
4672,
1363,
273,
324,
18,
588,
67,
2620,
1435,
309,
315,
26341,
21,
17,
13948,
18,
31834,
6,
486,
316,
1363,
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,
389,
5662,
67,
26341,
12,
644,
67,
529,
16,
380,
1968,
16,
2826,
4333,
4672,
1363,
273,
324,
18,
588,
67,
2620,
1435,
309,
315,
26341,
21,
17,
13948,
18,
31834,
6,
486,
316,
1363,
30... |
keys1 = set(self.iterkeys()) keys2 = set(other.iterkeys()) | keys1 = set(self.keys()) keys2 = set(other.keys()) | def is_coincident(self, other, keys = None): """ Return True if any segment in any list in self intersects any segment in any list in other. If the optional keys argument is not None, then only segment lists for the given keys are considered. Keys not represented in both segment lists are ignored. If keys is None (the default) then all segment lists are considered. | 2eb095334435c04d805fcc534c24074057044496 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3589/2eb095334435c04d805fcc534c24074057044496/segments.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
12645,
71,
6392,
12,
2890,
16,
1308,
16,
1311,
273,
599,
4672,
3536,
2000,
1053,
309,
1281,
3267,
316,
1281,
666,
316,
365,
19791,
1281,
3267,
316,
1281,
666,
316,
1308,
18,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
12645,
71,
6392,
12,
2890,
16,
1308,
16,
1311,
273,
599,
4672,
3536,
2000,
1053,
309,
1281,
3267,
316,
1281,
666,
316,
365,
19791,
1281,
3267,
316,
1281,
666,
316,
1308,
18,
2... |
s = "\\pdfoutline goto name{page.%d}" % pageno | s = "\\pdfoutline goto name{page.%dx}" % pageno | def write_toc_entry(entry, fp, layer): stype, snum, title, pageno, toc = entry s = "\\pdfoutline goto name{page.%d}" % pageno if toc: s = "%s count -%d" % (s, len(toc)) if snum: title = "%s %s" % (snum, title) s = "%s {%s}\n" % (s, title) fp.write(s) for entry in toc: write_toc_entry(entry, fp, layer + 1) | 566b58b403519f9d4971caa9deee100e4170e9e7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/566b58b403519f9d4971caa9deee100e4170e9e7/toc2bkm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
1391,
67,
4099,
12,
4099,
16,
4253,
16,
3018,
4672,
29365,
16,
272,
2107,
16,
2077,
16,
4262,
5764,
16,
17919,
273,
1241,
272,
273,
8422,
22353,
617,
322,
1369,
2897,
508,
95... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
1391,
67,
4099,
12,
4099,
16,
4253,
16,
3018,
4672,
29365,
16,
272,
2107,
16,
2077,
16,
4262,
5764,
16,
17919,
273,
1241,
272,
273,
8422,
22353,
617,
322,
1369,
2897,
508,
95... |
Graph on 30 vertices | union( Dodecahedron, Petersen graph ): Graph on 30 vertices | def disjoint_union(self, other): """ Returns the disjoint union of self and other. If there are common vertices to both, they will be renamed. EXAMPLE: sage: D = graphs.DodecahedralGraph() sage: P = graphs.PetersenGraph() sage: D.disjoint_union(P) Graph on 30 vertices """ if (self.is_directed() and not other.is_directed()) or (not self.is_directed() and other.is_directed()): raise TypeError('Both arguments must be of the same class.') repeat = False for u in self.vertices(): for v in other.vertices(): if u == v: repeat = True break if repeat: break if repeat: rename = ('0,','1,') else: rename = False import networkx if self.is_directed(): return DiGraph(networkx.union(self._nxg, other._nxg, rename=rename)) else: return Graph(networkx.union(self._nxg, other._nxg, rename=rename)) | c6ee9b8c95a50319119e91b8cfe37d340af4ae88 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/c6ee9b8c95a50319119e91b8cfe37d340af4ae88/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1015,
16452,
67,
18910,
12,
2890,
16,
1308,
4672,
3536,
2860,
326,
1015,
16452,
7812,
434,
365,
471,
1308,
18,
225,
971,
1915,
854,
2975,
6928,
358,
3937,
16,
2898,
903,
506,
17657,
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,
1015,
16452,
67,
18910,
12,
2890,
16,
1308,
4672,
3536,
2860,
326,
1015,
16452,
7812,
434,
365,
471,
1308,
18,
225,
971,
1915,
854,
2975,
6928,
358,
3937,
16,
2898,
903,
506,
17657,
18,
... |
supported_dists=('SuSE','debian','redhat','mandrake')): | supported_dists=('SuSE', 'debian', 'fedora', 'redhat', 'mandrake')): | def dist(distname='',version='',id='', supported_dists=('SuSE','debian','redhat','mandrake')): """ Tries to determine the name of the Linux OS distribution name. The function first looks for a distribution release file in /etc and then reverts to _dist_try_harder() in case no suitable files are found. Returns a tuple (distname,version,id) which default to the args given as parameters. """ try: etc = os.listdir('/etc') except os.error: # Probably not a Unix system return distname,version,id for file in etc: m = _release_filename.match(file) if m: _distname,dummy = m.groups() if _distname in supported_dists: distname = _distname break else: return _dist_try_harder(distname,version,id) f = open('/etc/'+file,'r') firstline = f.readline() f.close() m = _release_version.search(firstline) if m: _version,_id = m.groups() if _version: version = _version if _id: id = _id else: # Unkown format... take the first two words l = string.split(string.strip(firstline)) if l: version = l[0] if len(l) > 1: id = l[1] return distname,version,id | ccc2a5b2493fee9a85ba9fb0fe7968b61af99d17 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ccc2a5b2493fee9a85ba9fb0fe7968b61af99d17/platform.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2411,
12,
4413,
529,
2218,
2187,
1589,
2218,
2187,
350,
2218,
2187,
225,
3260,
67,
30467,
33,
2668,
17072,
1090,
2187,
296,
31888,
2779,
2187,
296,
74,
15534,
2187,
296,
1118,
11304,
2187,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2411,
12,
4413,
529,
2218,
2187,
1589,
2218,
2187,
350,
2218,
2187,
225,
3260,
67,
30467,
33,
2668,
17072,
1090,
2187,
296,
31888,
2779,
2187,
296,
74,
15534,
2187,
296,
1118,
11304,
2187,... |
def stop_event(self): """ Event to send on stop. """ if hasattr(self.handler, 'item'): return Event(PLAY_END, self.handler.item) return None | def stop_event(self): """ Event to send on stop. """ if hasattr(self.handler, 'item'): return Event(PLAY_END, self.handler.item) return None | 6c6f757d74971379853d8a2bd5aa70177e48d2f1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/6c6f757d74971379853d8a2bd5aa70177e48d2f1/childapp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2132,
67,
2575,
12,
2890,
4672,
3536,
2587,
358,
1366,
603,
2132,
18,
3536,
309,
3859,
12,
2890,
18,
4176,
16,
296,
1726,
11,
4672,
327,
2587,
12,
52,
7868,
67,
4415,
16,
365,
18,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2132,
67,
2575,
12,
2890,
4672,
3536,
2587,
358,
1366,
603,
2132,
18,
3536,
309,
3859,
12,
2890,
18,
4176,
16,
296,
1726,
11,
4672,
327,
2587,
12,
52,
7868,
67,
4415,
16,
365,
18,
41... | |
for _ in channel: pass yield inner, channel | def _inc(inner, self, key, channel, channels): try: while not channel.has_result(): for item in inner: inner.send(item) for _ in channel: pass yield inner, channel finally: channels.discard(channel) if self.counter.dec(key): callqueue.add(self._check, key) inner.finish(channel.result()) | 010e3ceb7ac4166a932dfbd4f9020a6aa1795911 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14361/010e3ceb7ac4166a932dfbd4f9020a6aa1795911/taskfarm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9523,
12,
7872,
16,
365,
16,
498,
16,
1904,
16,
5750,
4672,
775,
30,
1323,
486,
1904,
18,
5332,
67,
2088,
13332,
364,
761,
316,
3443,
30,
3443,
18,
4661,
12,
1726,
13,
3095,
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,
389,
9523,
12,
7872,
16,
365,
16,
498,
16,
1904,
16,
5750,
4672,
775,
30,
1323,
486,
1904,
18,
5332,
67,
2088,
13332,
364,
761,
316,
3443,
30,
3443,
18,
4661,
12,
1726,
13,
3095,
30,... | |
answer.extend([dy / dx] * dx) | answer.extend([-dy / dx] * dx) | def newton_slopes(self): polygon = self.newton_polygon() if polygon == []: return [] answer = [infinity] * polygon[0][0] for m in range(1, len(polygon)): dx = polygon[m][0] - polygon[m - 1][0] dy = polygon[m][1] - polygon[m - 1][1] answer.extend([dy / dx] * dx) return answer | 9b63542aac0ce93598f4740f38e6967c01639c31 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/9b63542aac0ce93598f4740f38e6967c01639c31/polynomial_padic_capped_relative_dense.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
1917,
67,
87,
16884,
281,
12,
2890,
4672,
7154,
273,
365,
18,
2704,
1917,
67,
20917,
1435,
309,
7154,
422,
5378,
30,
327,
5378,
5803,
273,
306,
267,
7850,
65,
380,
7154,
63,
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,
394,
1917,
67,
87,
16884,
281,
12,
2890,
4672,
7154,
273,
365,
18,
2704,
1917,
67,
20917,
1435,
309,
7154,
422,
5378,
30,
327,
5378,
5803,
273,
306,
267,
7850,
65,
380,
7154,
63,
20,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.