rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
return changes[a.rev].author.lower()
return (changes[a.rev].author.lower(), embedded_numbers(a.name.lower()))
def file_order(a): return changes[a.rev].author.lower()
e498d8b88df149cb9e5f506f4f8a4417d9d8cb9f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9317/e498d8b88df149cb9e5f506f4f8a4417d9d8cb9f/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 585, 67, 1019, 12, 69, 4672, 327, 3478, 63, 69, 18, 9083, 8009, 4161, 18, 8167, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 585, 67, 1019, 12, 69, 4672, 327, 3478, 63, 69, 18, 9083, 8009, 4161, 18, 8167, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
HTMLApplication.onDownloadingItemsCountChange(self, obj, id)
HTMLApplication.onUnwatchedItemsCountChange(self, obj, id)
def onUnwatchedItemsCountChange(self, obj, id): HTMLApplication.onDownloadingItemsCountChange(self, obj, id) pybridge = makeService("@participatoryculture.org/dtv/pybridge;1",pcfIDTVPyBridge, True, False) pybridge.updateTrayMenus()
3f3cdf4fe15f0cd1d0698122bfe673ef0555fbb4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/3f3cdf4fe15f0cd1d0698122bfe673ef0555fbb4/Application.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 984, 7585, 329, 3126, 1380, 3043, 12, 2890, 16, 1081, 16, 612, 4672, 3982, 3208, 18, 265, 984, 7585, 329, 3126, 1380, 3043, 12, 2890, 16, 1081, 16, 612, 13, 2395, 18337, 273, 1221...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 984, 7585, 329, 3126, 1380, 3043, 12, 2890, 16, 1081, 16, 612, 4672, 3982, 3208, 18, 265, 984, 7585, 329, 3126, 1380, 3043, 12, 2890, 16, 1081, 16, 612, 13, 2395, 18337, 273, 1221...
return lxml.etree.fromstring(verify(cms, ta))
print "Entering cms.xml_verify()" val = lxml.etree.fromstring(verify(cms, ta)) print "Exiting cms.xml_verify()" return val
def xml_verify(cms, ta): """Composite routine to verify CMS-wrapped XML.""" return lxml.etree.fromstring(verify(cms, ta))
9221b12d1b1a9063f61d0066c65c0fb8654b32b0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/119/9221b12d1b1a9063f61d0066c65c0fb8654b32b0/cms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2025, 67, 8705, 12, 6851, 16, 13561, 4672, 3536, 9400, 12245, 358, 3929, 16621, 17, 18704, 3167, 12123, 1172, 315, 10237, 310, 6166, 18, 2902, 67, 8705, 10031, 1244, 273, 328, 2902, 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, 2025, 67, 8705, 12, 6851, 16, 13561, 4672, 3536, 9400, 12245, 358, 3929, 16621, 17, 18704, 3167, 12123, 1172, 315, 10237, 310, 6166, 18, 2902, 67, 8705, 10031, 1244, 273, 328, 2902, 18, ...
return pos, result def scan(file, pos): """Return a potential transaction location following pos in file.
return pos, result, tid def truncate(f, pos, file_size, outp): """Copy data from pos to end of f to a .trNNN file.""" i = 0 while 1: trname = outp + ".tr%d" % i if os.path.exists(trname): i += 1 tr = open(trname, "wb") copy(f, tr, file_size - pos) f.seek(pos) tr.close() def copy(src, dst, n): while n: buf = src.read(8096) if not buf: break if len(buf) > n: buf = buf[:n] dst.write(buf) n -= len(buf) def scan(f, pos): """Return a potential transaction location following pos in f.
def read_transaction_header(file, pos, file_size): # Read the transaction record file.seek(pos) h = file.read(23) if len(h) < 23: raise EOFError tid, stl, status, ul, dl, el = unpack(">8s8scHHH",h) if el < 0: el=t32-el tl=u64(stl) if status=='c': raise EOFError if pos+(tl+8) > file_size: error("bad transaction length at %s", pos) if status not in ' up': error('invalid status, %s, at %s', status, pos) if tl < (23+ul+dl+el): error('invalid transaction length, %s, at %s', tl, pos) tpos=pos tend=tpos+tl if status=='u': # Undone transaction, skip it file.seek(tend) h = file.read(8) if h != stl: error('inconsistent transaction length at %s', pos) pos = tend + 8 return pos, None pos = tpos+(23+ul+dl+el) user = file.read(ul) description = file.read(dl) if el: try: e=loads(file.read(el)) except: e={} else: e={} result = RecordIterator(tid, status, user, description, e, pos, tend, file, tpos) pos=tend # Read the (intentionally redundant) transaction length file.seek(pos) h = file.read(8) if h != stl: error("redundant transaction length check failed at %s", pos) pos += 8 return pos, result
9bf5e2e14a6436c3a8e756728b18bc7a4b7dd814 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/9bf5e2e14a6436c3a8e756728b18bc7a4b7dd814/fsrecover.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 7958, 67, 3374, 12, 768, 16, 949, 16, 585, 67, 1467, 4672, 468, 2720, 326, 2492, 1409, 585, 18, 16508, 12, 917, 13, 366, 273, 585, 18, 896, 12, 4366, 13, 309, 562, 12, 76,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7958, 67, 3374, 12, 768, 16, 949, 16, 585, 67, 1467, 4672, 468, 2720, 326, 2492, 1409, 585, 18, 16508, 12, 917, 13, 366, 273, 585, 18, 896, 12, 4366, 13, 309, 562, 12, 76,...
def reset_timestamp(new_timestamp):
def reset_timestamp(self, new_timestamp):
def reset_timestamp(new_timestamp): self.base_time = time.time() self.base_timestamp = new_timestamp
b62fce4e16beaf1f2ad3da1d19d00b1e3338004e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8028/b62fce4e16beaf1f2ad3da1d19d00b1e3338004e/mcap_csp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 67, 5508, 12, 2890, 16, 394, 67, 5508, 4672, 365, 18, 1969, 67, 957, 273, 813, 18, 957, 1435, 365, 18, 1969, 67, 5508, 273, 394, 67, 5508, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2715, 67, 5508, 12, 2890, 16, 394, 67, 5508, 4672, 365, 18, 1969, 67, 957, 273, 813, 18, 957, 1435, 365, 18, 1969, 67, 5508, 273, 394, 67, 5508, 2, -100, -100, -100, -100, -100, -100...
return updates = node.updates() updatesmore = None in updates updates.discard(None) updates = ' '.join(map(str, sorted(updates))) if updatesmore: self.write('// clobbers: %s (and possibly more)' % updates) elif updates: self.write('// clobbers: %s' % updates)
updates = node.postupdates() if updates: self.write('// clobbers: %r' % updates)
def dumpcomplex(self, node): stride = node.stride() if stride is None: self.write('// stride: unknown') elif stride != 0: self.write('// stride: %s' % stride)
71e0598bb7dc6d9b90f66161eeb283e8ddccc073 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2040/71e0598bb7dc6d9b90f66161eeb283e8ddccc073/esotope-bfc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 14259, 12, 2890, 16, 756, 4672, 11084, 273, 756, 18, 27937, 1435, 309, 11084, 353, 599, 30, 365, 18, 2626, 2668, 759, 11084, 30, 5917, 6134, 1327, 11084, 480, 374, 30, 365, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 14259, 12, 2890, 16, 756, 4672, 11084, 273, 756, 18, 27937, 1435, 309, 11084, 353, 599, 30, 365, 18, 2626, 2668, 759, 11084, 30, 5917, 6134, 1327, 11084, 480, 374, 30, 365, 18, 2...
for f in os.listdir(destfolder): if f.endswith('.metadata'): continue fullname = os.path.join(destfolder, f) P = FileProxy(f, fullname, f) mi = self.mimetypes_registry.classify(data=None, filename=f) if os.path.isdir(fullname): P.setIconPath('folder_icon.gif') P.setAbsoluteURL(self.absolute_url() + '/' + os.path.join(rel_dir, f) + '/plfng_view') P.setMimeType('folder') else: P.setIconPath(mi.icon_path) P.setAbsoluteURL(self.absolute_url() + '/' + os.path.join(rel_dir, f)) P.setMimeType(mi.normalized()) if os.path.exists(fullname + '.metadata'): try: P.setComment(getMetadataElement(fullname, section="GENERAL", option="comment")) except: P.setComment('') else: P.setComment('') l.append(P) except: zLOG.LOG('PloneLocalFolderNG', zLOG.INFO , "listFolderContents() :: error reading folder (%s) contents" % destfolder )
for f in os.listdir(destfolder): if f.endswith('.metadata'): continue fullname = os.path.join(destfolder, f) P = FileProxy(f, fullname, f) mi = self.mimetypes_registry.classify(data=None, filename=f) if os.path.isdir(fullname): P.setIconPath('folder_icon.gif') P.setAbsoluteURL(self.absolute_url() + '/' + os.path.join(rel_dir, f) + '/plfng_view') P.setMimeType('folder') else: P.setIconPath(mi.icon_path) P.setAbsoluteURL(self.absolute_url() + '/' + os.path.join(rel_dir, f)) P.setMimeType(mi.normalized()) if os.path.exists(fullname + '.metadata'): try: P.setComment(getMetadataElement(fullname, section="GENERAL", option="comment")) except: P.setComment('') else: P.setComment('') l.append(P) except: zLOG.LOG('PloneLocalFolderNG', zLOG.INFO , "listFolderContents() :: error reading folder (%s) contents" % destfolder )
def listFolderContents(self, spec=None, contentFilter=None, suppressHiddenFiles=0, REQUEST=None, RESPONSE=None): """ list content of local filesystem """ #zLOG.LOG('PLFNG', zLOG.INFO , "listFolderContents() :: REQUEST = %s" % REQUEST) #zLOG.LOG('PLFNG', zLOG.INFO , "listFolderContents() :: self.REQUEST = %s" % self.REQUEST) if REQUEST==None: self.REQUEST.RESPONSE.redirect( self.REQUEST['URL1'] + '/plfng_view' ) #zLOG.LOG('PLFNG', zLOG.INFO , "listFolderContents() :: self.REQUEST[URL1] = %s" % self.REQUEST['URL1']) return [] #zLOG.LOG('PLFNG', zLOG.INFO , "listFolderContents() :: self.REQUEST = %s" % self.REQUEST) #self.REQUEST.RESPONSE.redirect( self.absolute_url() + '/plfng_view' ) else: rel_dir = '/'.join(REQUEST.get('_e', [])) show_dir = '/'.join(REQUEST['_e']) action = REQUEST.get('action', '')
692ac3754ddf4f2db9a4880d73fdcaa486784f64 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/692ac3754ddf4f2db9a4880d73fdcaa486784f64/PloneLocalFolderNG.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 3899, 6323, 12, 2890, 16, 225, 857, 33, 7036, 16, 913, 1586, 33, 7036, 16, 12257, 9345, 2697, 33, 20, 16, 12492, 33, 7036, 16, 20645, 33, 7036, 4672, 3536, 666, 913, 434, 1191, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 3899, 6323, 12, 2890, 16, 225, 857, 33, 7036, 16, 913, 1586, 33, 7036, 16, 12257, 9345, 2697, 33, 20, 16, 12492, 33, 7036, 16, 20645, 33, 7036, 4672, 3536, 666, 913, 434, 1191, ...
def __init__(self,n=1,r=1,c=1,e=4, star=False, **kwargs):
def __init__(self, n=1, r=1, c=1, e=4, star=False, **kwargs):
def __init__(self,n=1,r=1,c=1,e=4, star=False, **kwargs): r""" Small Scale Variants of the AES polynomial system constructor over $GF(2)$. See help for SR.
e506ccc2459e6e3948659b0d1b28d9d6b70342e4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/e506ccc2459e6e3948659b0d1b28d9d6b70342e4/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 290, 33, 21, 16, 436, 33, 21, 16, 276, 33, 21, 16, 425, 33, 24, 16, 10443, 33, 8381, 16, 2826, 4333, 4672, 436, 8395, 9425, 454, 12591, 11487, 4388, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 290, 33, 21, 16, 436, 33, 21, 16, 276, 33, 21, 16, 425, 33, 24, 16, 10443, 33, 8381, 16, 2826, 4333, 4672, 436, 8395, 9425, 454, 12591, 11487, 4388, ...
def _generic_names(self): return frozenset(['after', 'before'])
def _generic_names(self): #{{{ return frozenset(['after', 'before'])
93fac5d70a98e72cba457e3a1d94ab37958155ea /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2635/93fac5d70a98e72cba457e3a1d94ab37958155ea/decorators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 13540, 67, 1973, 12, 2890, 4672, 3735, 12187, 327, 23462, 12, 3292, 5205, 2187, 296, 5771, 19486, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 13540, 67, 1973, 12, 2890, 4672, 3735, 12187, 327, 23462, 12, 3292, 5205, 2187, 296, 5771, 19486, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
wiface = wnettools.WirelessInterface(self.wireless_interface, self.wpa_driver)
wiface = wnettools.WirelessInterface(self.wireless_interface, self.wpa_driver)
def GetSignalStrength(self): """ Get signal strength of the current network.
697bb050ead410cc2f275a2a2056d6dec4e376ce /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12280/697bb050ead410cc2f275a2a2056d6dec4e376ce/networking.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 11208, 27624, 12, 2890, 4672, 3536, 968, 4277, 21638, 434, 326, 783, 2483, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 11208, 27624, 12, 2890, 4672, 3536, 968, 4277, 21638, 434, 326, 783, 2483, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
else:
elif line != "":
def __init__(self, line=None): # load the name, (pose,time) pairs for this sequence try: if line == None: return while True: if line.find(",") > 0: self.append(line[0:line.index(",")].strip().rstrip().replace("|",",")) else: self.append(line.strip().rstrip().replace("|",",")) line = line[line.index(",")+1:] except: pass
3e543cdb2d6303d2cbf2b29ee72da644c4bda22b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9859/3e543cdb2d6303d2cbf2b29ee72da644c4bda22b/project.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 980, 33, 7036, 4672, 468, 1262, 326, 508, 16, 261, 4150, 16, 957, 13, 5574, 364, 333, 3102, 775, 30, 309, 980, 422, 599, 30, 327, 1323, 1053, 30, 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, 1001, 2738, 972, 12, 2890, 16, 980, 33, 7036, 4672, 468, 1262, 326, 508, 16, 261, 4150, 16, 957, 13, 5574, 364, 333, 3102, 775, 30, 309, 980, 422, 599, 30, 327, 1323, 1053, 30, 309, ...
if not (typ in (DictType, ListType, TupleType) and object):
if not (typ in (DictType, ListType, TupleType, StringType) and object):
def _safe_repr(object, context, maxlevels=None, level=0): level += 1 typ = type(object) if not (typ in (DictType, ListType, TupleType) and object): rep = `object` return rep, (rep and (rep[0] != '<')), 0 if context.has_key(id(object)): return `_Recursion(object)`, 0, 1 objid = id(object) context[objid] = 1 readable = 1 recursive = 0 startchar, endchar = {ListType: "[]", TupleType: "()", DictType: "{}"}[typ] if maxlevels and level > maxlevels: with_commas = "..." readable = 0 elif typ is DictType: components = [] for k, v in object.iteritems(): krepr, kreadable, krecur = _safe_repr(k, context, maxlevels, level) vrepr, vreadable, vrecur = _safe_repr(v, context, maxlevels, level) components.append("%s: %s" % (krepr, vrepr)) readable = readable and kreadable and vreadable recursive = recursive or krecur or vrecur with_commas = ", ".join(components) else: # list or tuple assert typ in (ListType, TupleType) components = [] for element in object: subrepr, subreadable, subrecur = _safe_repr( element, context, maxlevels, level) components.append(subrepr) readable = readable and subreadable recursive = recursive or subrecur if len(components) == 1 and typ is TupleType: components[0] += "," with_commas = ", ".join(components) s = "%s%s%s" % (startchar, with_commas, endchar) del context[objid] return s, readable and not recursive, recursive
c609577284d84e3374fee469ded0b38b9133a37c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/c609577284d84e3374fee469ded0b38b9133a37c/pprint.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4626, 67, 12715, 12, 1612, 16, 819, 16, 943, 12095, 33, 7036, 16, 1801, 33, 20, 4672, 1801, 1011, 404, 3815, 273, 618, 12, 1612, 13, 309, 486, 261, 12846, 316, 261, 5014, 559, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4626, 67, 12715, 12, 1612, 16, 819, 16, 943, 12095, 33, 7036, 16, 1801, 33, 20, 4672, 1801, 1011, 404, 3815, 273, 618, 12, 1612, 13, 309, 486, 261, 12846, 316, 261, 5014, 559, 1...
minBytes = maxint maxBytes = 0
if len(self.fileInfoList) > 0: minBytes = self.fileInfoList[0].bytes maxBytes = self.fileInfoList[0].bytes else: minBytes = 0 maxBytes = 0
def getFileStat(self,what): """ Return some file statistics @param self @param string type ('files','avg lines','min lines','max lines', 'sum bytes','avg bytes','min bytes','max bytes') @return number stat_value value for the requested stat. Depending on its type, this may be either an integer or a float """ if what not in ['files','avg lines','min lines','max lines','sum bytes','avg bytes','min bytes','max bytes']: return 0 fileCount = len(self.fileInfoList) if what in ['sum bytes','avg bytes','min bytes','max bytes']: sumBytes = 0 minBytes = maxint maxBytes = 0 for file in self.fileInfoList: sumBytes += file.bytes if file.bytes < minBytes: minBytes = file.bytes elif file.bytes > maxBytes: maxBytes = file.bytes if what in ['min lines','max lines']: minLines = maxint maxLines = 0 for file in self.fileInfoList: if file.lines < minLines: minLines = file.lines elif file.lines > maxLines: maxLines = file.lines if what == 'files': return fileCount elif what == 'avg lines': return self.getLoc('totals') / fileCount elif what == 'min lines': return minLines elif what == 'max lines': return maxLines elif what == 'sum bytes': return sumBytes elif what == 'avg bytes': return float(sumBytes/fileCount) elif what == 'min bytes': return minBytes elif what == 'max bytes': return maxBytes
9cc4a3475475c3dbe2b3d026fe16f000431cd3bc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5976/9cc4a3475475c3dbe2b3d026fe16f000431cd3bc/hypercore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6034, 5000, 12, 2890, 16, 23770, 4672, 3536, 2000, 2690, 585, 7691, 632, 891, 365, 632, 891, 533, 618, 7707, 2354, 17023, 14141, 2362, 17023, 1154, 2362, 17023, 1896, 2362, 2187, 296, 1364...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6034, 5000, 12, 2890, 16, 23770, 4672, 3536, 2000, 2690, 585, 7691, 632, 891, 365, 632, 891, 533, 618, 7707, 2354, 17023, 14141, 2362, 17023, 1154, 2362, 17023, 1896, 2362, 2187, 296, 1364...
LDBDClient.LDBDClient(self.serverName,int(self.serverPort),identity)
LDBDClient.LDBDClient(serverName,int(serverPort),identity)
def getSciSegs(serverURL="ldbd://metaserver.phy.syr.edu:30015", ifo=None, gpsStart=None, gpsStop=None, cut=bool(False)): """ This method is designed to query the server specified by SERVERURL. The method will return the segments that are between and overlaping with the variable gpsStart and gpsStop. If the flag cut is specified to be True then the returned lists will be cut so that the times are between gpsStart and gpsStop inclusive. In addition to these required arguments you must also specify in a text string the IFO of interest. Valid entries are L1 H1 V1 , but only one IFO at a time can be specified. """ if sum([x==None for x in (ifo,gpsStart,gpsStop)])>0: os.stderr.write("Invalid arguments given to getSciSegs.\n") return None ifo=ifo.strip() queryString="SELECT \ segment_definer.ifos,segment_definer.name,\
880d0870ae33546eecaf51d72c7fafa1d39bad26 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/880d0870ae33546eecaf51d72c7fafa1d39bad26/fu_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1322, 8450, 1761, 564, 12, 3567, 1785, 1546, 1236, 16410, 2207, 10578, 345, 12330, 18, 844, 93, 18, 9009, 86, 18, 28049, 30, 19249, 3600, 3113, 21479, 33, 7036, 16, 20985, 1685, 33, 7036...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1322, 8450, 1761, 564, 12, 3567, 1785, 1546, 1236, 16410, 2207, 10578, 345, 12330, 18, 844, 93, 18, 9009, 86, 18, 28049, 30, 19249, 3600, 3113, 21479, 33, 7036, 16, 20985, 1685, 33, 7036...
print _("created index of plugins")
self.logger.debug(_("created index of plugins"))
def create_plugin_index(self): for file_handler in glob(self.config['plugin_folder'] + sep + '*.py'): if file_handler != self.config['plugin_folder'] + sep + "Plugin.py": plugin_pattern = "" plugin_file = basename(file_handler).replace('.py', '') for line in open(file_handler, "r").readlines(): if "props['pattern']" in line: plugin_pattern = line.split("r\"")[1].split("\"")[0] if plugin_pattern != "": self.plugins_avaible[plugin_file] = plugin_pattern self.logger.debug(plugin_file + _(" added")) print _("created index of plugins")
8b1e215d8c26e02670fa809868120dcccb9db446 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9838/8b1e215d8c26e02670fa809868120dcccb9db446/Core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 4094, 67, 1615, 12, 2890, 4672, 364, 585, 67, 4176, 316, 4715, 12, 2890, 18, 1425, 3292, 4094, 67, 5609, 3546, 397, 5478, 397, 19962, 2074, 11, 4672, 309, 585, 67, 4176, 480, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 4094, 67, 1615, 12, 2890, 4672, 364, 585, 67, 4176, 316, 4715, 12, 2890, 18, 1425, 3292, 4094, 67, 5609, 3546, 397, 5478, 397, 19962, 2074, 11, 4672, 309, 585, 67, 4176, 480, ...
ip_re = "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+"
int_re = "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+"
def collectData(self): """Collect network interface data. """
ca39f42733b1d32bf6a376cea08c6e75c442e7cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3643/ca39f42733b1d32bf6a376cea08c6e75c442e7cb/netstat.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3274, 751, 12, 2890, 4672, 3536, 10808, 2483, 1560, 501, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3274, 751, 12, 2890, 4672, 3536, 10808, 2483, 1560, 501, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
elif x.eit is None:
else:
def isInTimer(self, eventid, begin, duration, service): time_match = 0 for x in self.timer_list: if str(x.service_ref) == str(service): #if x.eit is not None and x.repeated == 0: # if x.eit == eventid: # return duration if x.repeated != 0: chktime = localtime(begin) time = localtime(x.begin) chktimecmp = chktime.tm_wday * 1440 + chktime.tm_hour * 60 + chktime.tm_min for y in range(7): if x.repeated & (2 ** y): timecmp = y * 1440 + time.tm_hour * 60 + time.tm_min if timecmp <= chktimecmp < (timecmp + ((x.end - x.begin) / 60)): time_match = ((timecmp + ((x.end - x.begin) / 60)) - chktimecmp) * 60 elif chktimecmp <= timecmp < (chktimecmp + (duration / 60)): time_match = ((chktimecmp + (duration / 60)) - timecmp) * 60 elif x.eit is None: end = begin + duration if begin <= x.begin <= end: diff = end - x.begin if time_match < diff: time_match = diff elif x.begin <= begin <= x.end: diff = x.end - begin if time_match < diff: time_match = diff return time_match
7a1caa86f7dbcd3062b1cca23cb84a16dfef2b7d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/7a1caa86f7dbcd3062b1cca23cb84a16dfef2b7d/RecordTimer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8048, 6777, 12, 2890, 16, 871, 350, 16, 2376, 16, 3734, 16, 1156, 4672, 813, 67, 1916, 273, 374, 364, 619, 316, 365, 18, 12542, 67, 1098, 30, 309, 609, 12, 92, 18, 3278, 67, 1734, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8048, 6777, 12, 2890, 16, 871, 350, 16, 2376, 16, 3734, 16, 1156, 4672, 813, 67, 1916, 273, 374, 364, 619, 316, 365, 18, 12542, 67, 1098, 30, 309, 609, 12, 92, 18, 3278, 67, 1734, ...
QToolTip.add(self.icharg_spinbox,self.__tr("The total charge of the structure to be treated quantum mechanically.")) QWhatsThis.add(self.icharg_spinbox,self.__tr("The total charge of the structure to be treated quantum mechanically."))
QToolTip.add(self.icharg_spinbox,self.__tr("The total charge of the structure (IGHARG)")) QWhatsThis.add(self.icharg_spinbox,self.__tr("The total charge of the structure to be treated quantum mechanically (ICHARG)."))
def languageChange(self): self.setCaption(self.__tr("GAMESS Properties")) self.psetslbl_2_2.setText(self.__tr("Name :")) self.textLabel1_2_3.setText(self.__tr("Calculate :")) self.textLabel1_3.setText(self.__tr("Description :")) self.textLabel1_3_2.setText(self.__tr("Color :")) self.name_linedit.setText(QString.null) QToolTip.add(self.name_linedit,self.__tr("The name of the GAMESS jig.")) QWhatsThis.add(self.name_linedit,self.__tr("The name of the GAMESS jig.")) self.runtyp_combox.clear() self.runtyp_combox.insertItem(self.__tr("Energy")) self.runtyp_combox.insertItem(self.__tr("Optimization")) self.runtyp_combox.setCurrentItem(0) self.comment_linedit.setText(QString.null) self.choose_color_btn.setText(self.__tr("Choose...")) QToolTip.add(self.choose_color_btn,self.__tr("Change color")) self.scftyp_btngrp.setTitle(self.__tr("Electronic Structure Properties")) self.rhf_radiobtn.setText(self.__tr("RHF")) QToolTip.add(self.rhf_radiobtn,self.__tr("Restricted Hartree-Fock. All electrons are paired and each spatial orbital is doubly occupied. Cannot be used with multiplicities greater than 1.")) QWhatsThis.add(self.rhf_radiobtn,self.__tr("Restricted Hartree-Fock. All electrons are paired and each spatial orbital is doubly occupied. Cannot be used with multiplicities greater than 1.")) self.uhf_radiobtn.setText(self.__tr("UHF")) QToolTip.add(self.uhf_radiobtn,self.__tr("Unrestricted Hartree-Fock. All electrons are unpaired and spatial (spin) orbitals are uniquely defined for each electron. More time consuming, but more accurate, than ROHF. ")) QWhatsThis.add(self.uhf_radiobtn,self.__tr("Unrestricted Hartree-Fock. All electrons are unpaired and spatial (spin) orbitals are uniquely defined for each electron. More time consuming, but more accurate, than ROHF. ")) self.rohf_radiobtn.setText(self.__tr("ROHF")) QToolTip.add(self.rohf_radiobtn,self.__tr("Restricted Open-shell Hartree-Fock. Spin-paired electrons are assigned to doubly-occupied spatial orbitals, while electrons with unpaired spins are provided unique spatial orbitals.")) QWhatsThis.add(self.rohf_radiobtn,self.__tr("Restricted Open-shell Hartree-Fock. Spin-paired electrons are assigned to doubly-occupied spatial orbitals, while electrons with unpaired spins are provided unique spatial orbitals.")) self.textLabel1_4.setText(self.__tr("Charge:")) QToolTip.add(self.icharg_spinbox,self.__tr("The total charge of the structure to be treated quantum mechanically.")) QWhatsThis.add(self.icharg_spinbox,self.__tr("The total charge of the structure to be treated quantum mechanically.")) self.textLabel1_2_2.setText(self.__tr("Multiplicity:")) self.multi_combox.clear() self.multi_combox.insertItem(self.__tr("1")) self.multi_combox.insertItem(self.__tr("2")) self.multi_combox.insertItem(self.__tr("3")) self.multi_combox.insertItem(self.__tr("4")) self.multi_combox.insertItem(self.__tr("5")) self.multi_combox.insertItem(self.__tr("6")) self.multi_combox.insertItem(self.__tr("7")) QToolTip.add(self.multi_combox,self.__tr("N + 1, where N is the number of unpaired electrons.")) QWhatsThis.add(self.multi_combox,self.__tr("N + 1, where N is the number of unpaired electrons.")) self.groupBox8.setTitle(self.__tr("System Memory and Usage")) self.textLabel2_2.setText(self.__tr("Memory :")) self.textLabel1.setText(self.__tr("MB")) self.dirscf_checkbox.setText(self.__tr("DirectSCF")) QToolTip.add(self.dirscf_checkbox,self.__tr("Check this box to run the calculation in RAM and avoid hard disk usage for integral storage.")) QWhatsThis.add(self.dirscf_checkbox,self.__tr("Check this box to run the calculation in RAM and avoid hard disk usage for integral storage.")) self.groupBox2.setTitle(self.__tr("Electron Correlation Method")) self.textLabel6.setText(self.__tr("Basis Set :")) self.gbasis_combox.clear() self.gbasis_combox.insertItem(self.__tr("AM1")) self.gbasis_combox.insertItem(self.__tr("PM3")) self.gbasis_combox.insertItem(self.__tr("STO-3G")) self.gbasis_combox.insertItem(self.__tr("STO-6G")) self.gbasis_combox.insertItem(self.__tr("3-21G")) self.gbasis_combox.insertItem(self.__tr("3-21G*")) self.gbasis_combox.insertItem(self.__tr("6-31G")) self.gbasis_combox.insertItem(self.__tr("6-31G(d)")) self.gbasis_combox.insertItem(self.__tr("6-31G(d,p)")) self.gbasis_combox.insertItem(self.__tr("6-31+G(d)")) self.gbasis_combox.insertItem(self.__tr("6-31+G(d,p)")) self.gbasis_combox.insertItem(self.__tr("6-31++G(d)")) self.gbasis_combox.insertItem(self.__tr("6-31++G(d,p)")) self.gbasis_combox.insertItem(self.__tr("6-311G")) self.gbasis_combox.insertItem(self.__tr("6-311G(d)")) self.gbasis_combox.insertItem(self.__tr("6-311G(d,p)")) self.gbasis_combox.insertItem(self.__tr("6-311+G(d,p)")) self.gbasis_combox.insertItem(self.__tr("6-311++G(d,p)")) self.gbasis_combox.setCurrentItem(0) QToolTip.add(self.gbasis_combox,self.__tr("Select from among the standard Gaussian-type basis sets and semi-empirical parameters in GAMESS.")) QWhatsThis.add(self.gbasis_combox,self.__tr("Select from among the standard Gaussian-type basis sets and semi-empirical parameters in GAMESS.")) self.checkBox10_3_2.setText(self.__tr("Read $HESS Group")) self.checkBox10_2_2_2.setText(self.__tr("Read $VEC Group")) QToolTip.add(self.checkBox10_2_2_2,self.__tr("Only if Hf basis same as CI basis","Only if Hf basis same as CI basis")) QWhatsThis.add(self.checkBox10_2_2_2,self.__tr("Only if Hf basis same as CI basis")) self.checkBox35.setText(self.__tr("Frequencies")) self.ecm_btngrp.setTitle(QString.null) self.none_radiobtn.setText(self.__tr("None")) QToolTip.add(self.none_radiobtn,self.__tr("Select this button to neglect electron correlation in the calculation.")) QWhatsThis.add(self.none_radiobtn,self.__tr("Select this button to neglect electron correlation in the calculation.")) self.dft_radiobtn.setText(self.__tr("DFT")) QToolTip.add(self.dft_radiobtn,self.__tr("Select this button to perform a density functional theory calculation.")) QWhatsThis.add(self.dft_radiobtn,self.__tr("Select this button to perform a density functional theory calculation.")) self.mp2_radiobtn.setText(self.__tr("MP2")) QToolTip.add(self.mp2_radiobtn,self.__tr("Select this button to perform a Second-Order Moeller Plesset calculation.")) QWhatsThis.add(self.mp2_radiobtn,self.__tr("Select this button to perform a Second-Order Moeller Plesset calculation.")) self.dfttyp_label.setText(self.__tr("Functional:")) self.gridsize_label.setText(self.__tr("Grid Size:")) self.dfttyp_combox.clear() self.dfttyp_combox.insertItem(self.__tr("SLATER (E)")) self.dfttyp_combox.insertItem(self.__tr("BECKE (E)")) self.dfttyp_combox.insertItem(self.__tr("GILL (E)")) self.dfttyp_combox.insertItem(self.__tr("PBE (E)")) self.dfttyp_combox.insertItem(self.__tr("VWN (C)")) self.dfttyp_combox.insertItem(self.__tr("LYP (C)")) self.dfttyp_combox.insertItem(self.__tr("OP (C)")) self.dfttyp_combox.insertItem(self.__tr("SVWN/LDA (E+C)")) self.dfttyp_combox.insertItem(self.__tr("SLYP (E+C)")) self.dfttyp_combox.insertItem(self.__tr("SOP (E+C)")) self.dfttyp_combox.insertItem(self.__tr("BVWN (E+C)")) self.dfttyp_combox.insertItem(self.__tr("BLYP (E+C)")) self.dfttyp_combox.insertItem(self.__tr("BOP (E+C)")) self.dfttyp_combox.insertItem(self.__tr("GVWN (E+C)")) self.dfttyp_combox.insertItem(self.__tr("GLYP (E+C)")) self.dfttyp_combox.insertItem(self.__tr("GOP (E+C)")) self.dfttyp_combox.insertItem(self.__tr("PBEVWN (E+C)")) self.dfttyp_combox.insertItem(self.__tr("PBELYP (E+C)")) self.dfttyp_combox.insertItem(self.__tr("PBEOP (E+C)")) self.dfttyp_combox.insertItem(self.__tr("BHHLYP (H)")) self.dfttyp_combox.insertItem(self.__tr("B3LYP (H)")) QToolTip.add(self.dfttyp_combox,self.__tr("Select an available density functional in GAMESS.")) QWhatsThis.add(self.dfttyp_combox,self.__tr("Select an available density functional in GAMESS.")) self.gridsize_combox.clear() self.gridsize_combox.insertItem(self.__tr("Coarse")) self.gridsize_combox.insertItem(self.__tr("Default")) self.gridsize_combox.insertItem(self.__tr("Fine")) self.gridsize_combox.insertItem(self.__tr("Army Grade")) self.gridsize_combox.setCurrentItem(1) QToolTip.add(self.gridsize_combox,self.__tr("Select the grid spacing for the DFT calculation.")) QWhatsThis.add(self.gridsize_combox,self.__tr("Select the grid spacing for the DFT calculation.")) self.core_electrons_checkbox.setText(self.__tr("Core electrons?")) QToolTip.add(self.core_electrons_checkbox,self.__tr("Check this box to include both the valence and core electrons in the MP2 calculation.")) QWhatsThis.add(self.core_electrons_checkbox,self.__tr("Check this box to include both the valence and core electrons in the MP2 calculation.")) self.groupBox3.setTitle(self.__tr("Convergence Criteria")) self.textLabel3.setText(self.__tr("Energy and Density:")) self.density_conv_combox.clear() self.density_conv_combox.insertItem(self.__tr("Coarse")) self.density_conv_combox.insertItem(self.__tr("Medium")) self.density_conv_combox.insertItem(self.__tr("Fine")) self.density_conv_combox.insertItem(self.__tr("Very Fine")) self.density_conv_combox.setCurrentItem(1) QToolTip.add(self.density_conv_combox,self.__tr("Selects the accuracy of the electron density convergence for the energy calculation.")) QWhatsThis.add(self.density_conv_combox,self.__tr("Selects the accuracy of the electron density convergence for the energy calculation.")) self.rmsd_lbl.setText(self.__tr("RMSD:")) self.rmsd_combox.clear() self.rmsd_combox.insertItem(self.__tr("Coarse")) self.rmsd_combox.insertItem(self.__tr("Medium")) self.rmsd_combox.insertItem(self.__tr("Fine")) self.rmsd_combox.insertItem(self.__tr("Very Fine")) self.rmsd_combox.setCurrentItem(1) self.iterations_lbl.setText(self.__tr("Iterations :")) self.edit_input_file_cbox.setText(self.__tr("Open Input File in text editor")) self.run_job_btn.setText(self.__tr("Save and Run")) QToolTip.add(self.run_job_btn,self.__tr("Save GAMESS parameters and launch job.")) self.save_btn.setText(self.__tr("Save")) self.cancel_btn.setText(self.__tr("Cancel")) QToolTip.add(self.cancel_btn,self.__tr("Closes this window.")) QWhatsThis.add(self.cancel_btn,self.__tr("Closes this window."))
24f41dc8e19de3c29875b1970aa782574333c759 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/24f41dc8e19de3c29875b1970aa782574333c759/GamessPropDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2653, 3043, 12, 2890, 4672, 365, 18, 542, 21158, 12, 2890, 16186, 313, 2932, 43, 1642, 1260, 6183, 6, 3719, 365, 18, 84, 542, 2069, 3083, 67, 22, 67, 22, 18, 542, 1528, 12, 2890, 161...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2653, 3043, 12, 2890, 4672, 365, 18, 542, 21158, 12, 2890, 16186, 313, 2932, 43, 1642, 1260, 6183, 6, 3719, 365, 18, 84, 542, 2069, 3083, 67, 22, 67, 22, 18, 542, 1528, 12, 2890, 161...
return self._getCachedInfo()['images'][size]
return self._getCachedInfo('images', size)
def getImage(self, size = IMAGE_LARGE): """Returns the associated image URL. * size: The image size. Possible values: o IMAGE_LARGE o IMAGE_MEDIUM o IMAGE_SMALL """ return self._getCachedInfo()['images'][size]
ec1304614ea5bc838c2f5bb83444fc59ac9c26d8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9926/ec1304614ea5bc838c2f5bb83444fc59ac9c26d8/pylast.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10567, 12, 2890, 16, 963, 273, 10757, 67, 48, 28847, 4672, 3536, 1356, 326, 3627, 1316, 1976, 18, 380, 963, 30, 1021, 1316, 963, 18, 25433, 924, 30, 320, 10757, 67, 48, 28847, 320, 107...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10567, 12, 2890, 16, 963, 273, 10757, 67, 48, 28847, 4672, 3536, 1356, 326, 3627, 1316, 1976, 18, 380, 963, 30, 1021, 1316, 963, 18, 25433, 924, 30, 320, 10757, 67, 48, 28847, 320, 107...
r""" $2^n - 1$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000225;a 2^n - 1. sage: a(0) 0 sage: a(-1) Traceback (most recent call last): ... ValueError: input n (=-1) must be an integer >= 0 sage: a(12) 4095 sage: a.list(12) [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047] AUTHOR: -- Jaap Spies (2007-01-25) """ def __init__(self):
def __init__(self): r""" $2^n - 1$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000225;a 2^n - 1. sage: a(0) 0 sage: a(-1) Traceback (most recent call last): ... ValueError: input n (=-1) must be an integer >= 0 sage: a(12) 4095 sage: a.list(12) [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047] AUTHOR: -- Jaap Spies (2007-01-25) """
def _eval(self, n): return Integer(n**2)
7b02e5455d5d52d6dcc7f2314cdd56803031a1c6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/7b02e5455d5d52d6dcc7f2314cdd56803031a1c6/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 327, 2144, 12, 82, 636, 22, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 327, 2144, 12, 82, 636, 22, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if hasattr(self, 'aq_base'): self=self.aq_base if default is _marker: return getattr(self, id) try: return getattr(self, id) except: return default
if hasattr(self, 'aq_base'): base=self.aq_base else: base=self if not hasattr(base, id): if default is _marker: raise AttributeError, id return default return getattr(self, id)
def _getOb(self, id, default=_marker): if hasattr(self, 'aq_base'): self=self.aq_base if default is _marker: return getattr(self, id) try: return getattr(self, id) except: return default
c2d20afee07325cf00f4f6e6a8fc15d79ba301df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c2d20afee07325cf00f4f6e6a8fc15d79ba301df/ObjectManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 10516, 12, 2890, 16, 612, 16, 805, 33, 67, 11145, 4672, 309, 3859, 12, 2890, 16, 296, 69, 85, 67, 1969, 11, 4672, 365, 33, 2890, 18, 69, 85, 67, 1969, 309, 805, 353, 389,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 10516, 12, 2890, 16, 612, 16, 805, 33, 67, 11145, 4672, 309, 3859, 12, 2890, 16, 296, 69, 85, 67, 1969, 11, 4672, 365, 33, 2890, 18, 69, 85, 67, 1969, 309, 805, 353, 389,...
sage: x <= Mod(2,5)
sage: x <= Mod(2,5)
def __le__(self, right): r""" Construct the symbolic inequality \code{self <= right}.
61570ec939f5d28f1d473a6111bc69678d16e9b5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/61570ec939f5d28f1d473a6111bc69678d16e9b5/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 298, 972, 12, 2890, 16, 2145, 4672, 436, 8395, 14291, 326, 16754, 316, 9729, 560, 521, 710, 95, 2890, 1648, 2145, 5496, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 298, 972, 12, 2890, 16, 2145, 4672, 436, 8395, 14291, 326, 16754, 316, 9729, 560, 521, 710, 95, 2890, 1648, 2145, 5496, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
SQLStorageConfig, Folder):
SQLStorageConfig, Folder, ReferenceEngine):
def __call__(self): __traceback_info__ = self._args return renderer.render(**self._args)
007e8c3f4e79f019befd6180292339a943b6f81d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/007e8c3f4e79f019befd6180292339a943b6f81d/ArchetypeTool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 4672, 1001, 21696, 67, 1376, 972, 273, 365, 6315, 1968, 327, 5690, 18, 5902, 12, 636, 2890, 6315, 1968, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 4672, 1001, 21696, 67, 1376, 972, 273, 365, 6315, 1968, 327, 5690, 18, 5902, 12, 636, 2890, 6315, 1968, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
treestore.append(None, [False, pkg_name, local_version,\
text = '<b>%s</b>\n<small><i>%s</i></small>' % (pkg_name, desc) treestore.append(None, [False, text, local_version,\
def alpm_fill_treestore_with_pkgs_and_grps(self, treeview, treestore, pkgs, groups, repo_name = None): treeview.set_model(None) already_visited_pkgs = {} already_visited_grps = {}
406465af1625206c1b85268c2a144f8c51a0f1af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2759/406465af1625206c1b85268c2a144f8c51a0f1af/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 524, 7755, 67, 5935, 67, 27427, 25626, 67, 1918, 67, 25376, 67, 464, 67, 3197, 1121, 12, 2890, 16, 2151, 1945, 16, 9787, 25626, 16, 16922, 16, 3252, 16, 3538, 67, 529, 273, 599, 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, 524, 7755, 67, 5935, 67, 27427, 25626, 67, 1918, 67, 25376, 67, 464, 67, 3197, 1121, 12, 2890, 16, 2151, 1945, 16, 9787, 25626, 16, 16922, 16, 3252, 16, 3538, 67, 529, 273, 599, 4672, ...
pass
return
def parseLine (self, line): #self.lock.acquire() parts = multiWs.split(line.strip()) if self.features["sigint"]: self.engine.sigint() # Illegal Move elif parts[0].lower().find("illegal") >= 0: if parts[-2] == "sd" and parts[-1].isdigit(): self.sd = False self.setDepth (int(parts[-1])) # A Move elif self.history: if parts[0] == "move": movestr = parts[1] # Old Variation elif d_plus_dot_expr.match(parts[0]) and parts[1] == "...": movestr = parts[2] else: movestr = False if movestr: move = self.parseMove(movestr) self.history = None self.emit("move", move) # Analyzing elif len(parts) >= 5 and self.forced and isdigits(parts[1:4]): if parts[:4] == ["0","0","0","0"]: # Crafty don't analyze untill it is out of book print >> self.engine, "book off" return his2 = self.history.clone() moves = [] for m in movre.findall(" ".join(parts[4:])+" "): try: moves.append(self.parseMove(m, his2)) except Exception, e: continue if moves: his2.add(moves[-1], mvlist=False) if moves: self.emit("analyze", moves) # Offers draw elif parts[0] == "offer" and parts[1] == "draw": self.emit("draw_offer") # Resigns elif line.find("resign") >= 0: self.emit("resign") #Tell User Error elif parts[0] in ("tellusererror", "Error"): print "Tell User Error", repr(" ".join(parts[1:])) # Tell Somebody elif parts[0][:4] == "tell" and \ parts[0][4:] in ("others", "all", "ics", "icsnoalias"): pass #print "Tell", parts[0][4:], repr(" ".join(parts[1:])) # Error elif parts[0].lower() in ("illegal", "error"): self.__del__() self.emit('dead') # Features elif parts.count("feature") > 0: for i, pair in enumerate(parts[j+1:]): if pair.find("=") < 0: continue key, value = pair.split("=") if value.startswith("\"") and value.endswith("\""): value = value[1:-1] elif value.startswith("\"") and not value.endswith("\""): rest = value[1:]+" "+" ".join(parts[2+i+j:]) i = rest.find("\"") if i >= 0: value = rest[:i] else: value[1:] else: value = int(value) self.features[key] = value #self.lock.release()
9f4908570592caedccdbd02503f0323e274e2545 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5339/9f4908570592caedccdbd02503f0323e274e2545/CECP.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1670, 261, 2890, 16, 980, 4672, 468, 2890, 18, 739, 18, 1077, 1039, 1435, 225, 2140, 273, 3309, 15444, 18, 4939, 12, 1369, 18, 6406, 10756, 309, 365, 18, 7139, 9614, 7340, 474, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1670, 261, 2890, 16, 980, 4672, 468, 2890, 18, 739, 18, 1077, 1039, 1435, 225, 2140, 273, 3309, 15444, 18, 4939, 12, 1369, 18, 6406, 10756, 309, 365, 18, 7139, 9614, 7340, 474, 1...
return (cmd, i[0], args, options, cmdoptions)
return (cmd, cmd and i[0] or None, args, options, cmdoptions)
def parse(args): options = {} cmdoptions = {} try: args = fancyopts.fancyopts(args, globalopts, options) except fancyopts.getopt.GetoptError, inst: raise ParseError(None, inst) if options["version"]: return ("version", show_version, [], options, cmdoptions) elif not args: return ("help", help_, ["shortlist"], options, cmdoptions) else: cmd, args = args[0], args[1:] i = find(cmd)[1] # combine global options into local c = list(i[1]) for o in globalopts: c.append((o[0], o[1], options[o[1]], o[3])) try: args = fancyopts.fancyopts(args, c, cmdoptions) except fancyopts.getopt.GetoptError, inst: raise ParseError(cmd, inst) # separate global options back out for o in globalopts: n = o[1] options[n] = cmdoptions[n] del cmdoptions[n] return (cmd, i[0], args, options, cmdoptions)
34faed6951e09ce6f6cd354ca60e1184df333695 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/34faed6951e09ce6f6cd354ca60e1184df333695/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 1968, 4672, 702, 273, 2618, 1797, 2116, 273, 2618, 225, 775, 30, 833, 273, 31701, 4952, 18, 74, 12514, 4952, 12, 1968, 16, 2552, 4952, 16, 702, 13, 1335, 31701, 4952, 18, 588...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 1968, 4672, 702, 273, 2618, 1797, 2116, 273, 2618, 225, 775, 30, 833, 273, 31701, 4952, 18, 74, 12514, 4952, 12, 1968, 16, 2552, 4952, 16, 702, 13, 1335, 31701, 4952, 18, 588...
print >> out, "prefix = /%s"%env['prefix'] print >> out, "libdir = /%s/lib"%env['prefix'] print >> out, "includedir = /%s/include"%env['prefix']
print >> out, "prefix = %s"%env['prefix'] print >> out, "libdir = ${prefix}/lib" print >> out, "includedir = ${prefix}/include"
def linux_create_pkg_descriptor( self, env, out_file ) : out = open(out_file, 'w') print >> out, "prefix = /%s"%env['prefix'] print >> out, "libdir = /%s/lib"%env['prefix'] print >> out, "includedir = /%s/include"%env['prefix'] print >> out print >> out, "Name: %s"%self.name print >> out, "Version: %s"%self.version print >> out, "Description: C++ Framework for analysis, synthesis and transformation of music audio signals" print >> out, "Requires: %s"%" ".join(self.depends) print >> out, "Conflicts: " print >> out, "Libs: -L${libdir} -l%s"%self.name edict = env.Dictionary() cppflags = edict.get('CPPFLAGS', ['']) cppaths = edict.get('CPPPATH', ['']) cpppaths = [ '-I'+path for path in cppaths ] print >> out, "Cflags: -I${includedir} %s"%" ".join(cppflags+cpppaths)
3b05ca69c75975b4ec1fba5fa216ba0ad4fd55b0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1456/3b05ca69c75975b4ec1fba5fa216ba0ad4fd55b0/clam_build_helpers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19725, 67, 2640, 67, 10657, 67, 12628, 12, 365, 16, 1550, 16, 596, 67, 768, 262, 294, 596, 273, 1696, 12, 659, 67, 768, 16, 296, 91, 6134, 225, 1172, 1671, 596, 16, 315, 3239, 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, 19725, 67, 2640, 67, 10657, 67, 12628, 12, 365, 16, 1550, 16, 596, 67, 768, 262, 294, 596, 273, 1696, 12, 659, 67, 768, 16, 296, 91, 6134, 225, 1172, 1671, 596, 16, 315, 3239, 273, ...
if USE_CODEMIRROR: result.append(u"""
result.append(u"""
def render(self, name, value, attrs=None): result = [] result.append( super(CodeMirrorTextArea, self).render(name, value, attrs)) if USE_CODEMIRROR: result.append(u"""
9953ac8069c9b5e668fb744e1c71ce32bce4fc81 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1201/9953ac8069c9b5e668fb744e1c71ce32bce4fc81/admin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 508, 16, 460, 16, 3422, 33, 7036, 4672, 563, 273, 5378, 563, 18, 6923, 12, 2240, 12, 1085, 13035, 1528, 5484, 16, 365, 2934, 5902, 12, 529, 16, 460, 16, 3422, 371...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 508, 16, 460, 16, 3422, 33, 7036, 4672, 563, 273, 5378, 563, 18, 6923, 12, 2240, 12, 1085, 13035, 1528, 5484, 16, 365, 2934, 5902, 12, 529, 16, 460, 16, 3422, 371...
recipient = sp.getProperty('listserv_email', siteadmin) sender = emailaddress if name: sender = "%s <%s>" % (name, sender) subject = '' try: self.context.MailHost.secureSend(message=mesg , mto=recipient, mfrom=sender, subject=subject) except Exception, e: mssg = "Your subscription could not be sent. Please try again. " +str(e)
def subscribe(self, emailaddress, name=''): """ helper method to enable mail subscription to anonymous user """ ptool = getToolByName(self.context, 'portal_url') portal = ptool.getPortalObject() pp = getToolByName(portal, 'portal_properties') sp = getattr(pp, 'site_properties', None) siteadmin = getattr(portal, 'email_from_address') reg_tool = getToolByName(self.context, 'portal_registration')
6c5864e829ff9539464f60c69676315e739a127d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10561/6c5864e829ff9539464f60c69676315e739a127d/newsletter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9129, 12, 2890, 16, 2699, 2867, 16, 508, 2218, 11, 4672, 3536, 4222, 707, 358, 4237, 4791, 4915, 358, 13236, 729, 3536, 293, 6738, 273, 336, 6364, 5911, 12, 2890, 18, 2472, 16, 296, 24...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9129, 12, 2890, 16, 2699, 2867, 16, 508, 2218, 11, 4672, 3536, 4222, 707, 358, 4237, 4791, 4915, 358, 13236, 729, 3536, 293, 6738, 273, 336, 6364, 5911, 12, 2890, 18, 2472, 16, 296, 24...
subprocess.Popen(_cmd, stdin=subprocess.PIPE).communicate(str(unicode(string)))
subprocess.Popen(_cmd, stdin=subprocess.PIPE).communicate(unicode(string))
def copy(string): """Copy given string into system clipboard.""" try: _cmd = ["xclip", "-selection", "clipboard"] subprocess.Popen(_cmd, stdin=subprocess.PIPE).communicate(str(unicode(string))) return except Exception, why: raise XclipNotFound
296adc4a9fb6c8a2ed7d2c8b86768d82c37f4a80 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14995/296adc4a9fb6c8a2ed7d2c8b86768d82c37f4a80/linux.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 12, 1080, 4672, 3536, 2951, 864, 533, 1368, 2619, 20304, 12123, 775, 30, 389, 4172, 273, 8247, 6511, 3169, 3113, 3701, 10705, 3113, 315, 14161, 3752, 11929, 6652, 18, 52, 3190, 24899...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 12, 1080, 4672, 3536, 2951, 864, 533, 1368, 2619, 20304, 12123, 775, 30, 389, 4172, 273, 8247, 6511, 3169, 3113, 3701, 10705, 3113, 315, 14161, 3752, 11929, 6652, 18, 52, 3190, 24899...
instance.__class__.__history_table__.insert().execute(colvalues) instance.version += 1 instance.timestamp = datetime.now()
history = instance.__class__.__history_table__ values = history.select(get_history_where(instance), order_by=[desc(history.c.timestamp)]).execute().fetchone() if not values: instance.version = 1 instance.timestamp = datetime.now() colvalues = dict([(key, getattr(instance, key)) for key in instance.c.keys()]) history.insert().execute(colvalues) return EXT_PASS new = False for key in instance.c.keys(): if key in ['version', 'timestamp']: continue if getattr(instance, key) != values[key]: new = True break if new: instance.version += 1 instance.timestamp = datetime.now() colvalues = dict([(key, getattr(instance, key)) for key in instance.c.keys()]) history.insert().execute(colvalues)
def before_update(self, mapper, connection, instance): # In SQLAlchemy 0.3.X, and possibly 0.4 (unknown), objects can # sometimes be implicated to be saved when in fact they haven't been # updated. If we've already inserted this version, we don't need to # insert it again. values = instance.__class__.__history_table__.select(get_entity_where(instance), order_by=[desc(instance.c.timestamp)]).execute().fetchone() if values and instance.version == values['version']: return EXT_PASS colvalues = dict([(key, getattr(instance, key)) for key in instance.c.keys()]) instance.__class__.__history_table__.insert().execute(colvalues) instance.version += 1 instance.timestamp = datetime.now() return EXT_PASS
b88fec8671c5ddfc97df47664867dfbb3adf9bce /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11921/b88fec8671c5ddfc97df47664867dfbb3adf9bce/versioned.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1865, 67, 2725, 12, 2890, 16, 5815, 16, 1459, 16, 791, 4672, 468, 657, 3063, 1067, 17192, 374, 18, 23, 18, 60, 16, 471, 10016, 374, 18, 24, 261, 8172, 3631, 2184, 848, 468, 16594, 50...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1865, 67, 2725, 12, 2890, 16, 5815, 16, 1459, 16, 791, 4672, 468, 657, 3063, 1067, 17192, 374, 18, 23, 18, 60, 16, 471, 10016, 374, 18, 24, 261, 8172, 3631, 2184, 848, 468, 16594, 50...
pass
test_support.threading_cleanup(*self._threads)
def tearDown (self): pass
5e3703b840021f39f424b370b274cd773c533acb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/5e3703b840021f39f424b370b274cd773c533acb/test_asynchat.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 2091, 4164, 261, 2890, 4672, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 2091, 4164, 261, 2890, 4672, 1342, 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, -...
self.attach_file_to_task(cr, uid, task['transformation_id'][0], context['input_filename'], '[FILE IN] FILE IMPORTED ' + context['start_date'], True, context)
self.attach_file_to_task(cr, uid, id, context['input_filename'], '[FILE IN] FILE IMPORTED ' + context['start_date'], True, context)
def start_kettle_task(self, cr, uid, ids, context=None): logger = netsvc.Logger() user = self.pool.get('res.users').browse(cr, uid, uid, context) for id in ids: context.update({'default_res_id' : id, 'default_res_model': 'kettle.task', 'start_date' : time.strftime('%d-%m-%Y %H:%M:%S')}) log_file_name = 'TASK LOG ' + context['start_date'] attachment_id = self.pool.get('ir.attachment').create(cr, uid, {'name': log_file_name}, context) cr.commit() context['filter'] = { 'AUTO_REP_db_erp': str(cr.dbname), 'AUTO_REP_user_erp': str(user.login), 'AUTO_REP_db_pass_erp': str(user.password), 'AUTO_REP_kettle_task_id' : str(id), 'AUTO_REP_kettle_task_attachment_id' : str(attachment_id), } task = self.read(cr, uid, id, ['upload_file', 'parameters', 'transformation_id'], context) if task['upload_file']: if not (context and context.get('input_filename',False)): logger.notifyChannel('kettle-connector', netsvc.LOG_INFO, "the task " + task['name'] + " can't be executed because the anyone File was uploaded") continue else: context['filter'].update({'AUTO_REP_file_in' : str(context['input_filename'])}) context = self.execute_python_code(cr, uid, id, 'before', context) context['filter'].update(eval('{' + str(task['parameters'] or '')+ '}')) self.pool.get('kettle.transformation').execute_transformation(cr, uid, id, log_file_name, attachment_id, context)
cf94f35ac680108835947de442cd81e891a4aec9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/cf94f35ac680108835947de442cd81e891a4aec9/kettle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 79, 278, 5929, 67, 4146, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 1194, 273, 21954, 4227, 18, 3328, 1435, 729, 273, 365, 18, 6011, 18, 588, 2668, 455...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 79, 278, 5929, 67, 4146, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 1194, 273, 21954, 4227, 18, 3328, 1435, 729, 273, 365, 18, 6011, 18, 588, 2668, 455...
(x,y,z)=matrix.transform(x,y,z)
if self.matrix[-1]: (x,y,z)=self.matrix[-1].transform(x,y,z)
def makepoly(self, haveuv, vtx, idx=None): if self.t==None: return False # Only care about textured polygons if not self.loc: return False # Not for library objects if self.debug: self.debug.write("Poly: %s %s %s %d " % (basename(self.tex[self.t]), self.alt, self.layer, self.zbias))
d87ee6f81b21f2c4fda5318c88bdcdd71b150057 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11663/d87ee6f81b21f2c4fda5318c88bdcdd71b150057/convbgl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29796, 881, 355, 93, 12, 2890, 16, 1240, 16303, 16, 331, 978, 16, 2067, 33, 7036, 4672, 309, 365, 18, 88, 631, 7036, 30, 327, 1083, 202, 7, 5098, 7671, 2973, 977, 2862, 17294, 309, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29796, 881, 355, 93, 12, 2890, 16, 1240, 16303, 16, 331, 978, 16, 2067, 33, 7036, 4672, 309, 365, 18, 88, 631, 7036, 30, 327, 1083, 202, 7, 5098, 7671, 2973, 977, 2862, 17294, 309, 4...
""" fl_create_dial(type, x, y, w, h, label) -> object ref.
""" fl_create_dial(type, x, y, w, h, label) -> object
def fl_create_dial(type, x, y, w, h, label): """ fl_create_dial(type, x, y, w, h, label) -> object ref. """ retval = _fl_create_dial(type, x, y, w, h, label) return retval
8765c710f695de392f6fc7c664c746ec98668b1d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/8765c710f695de392f6fc7c664c746ec98668b1d/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 2640, 67, 25909, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 4672, 3536, 1183, 67, 2640, 67, 25909, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 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, 1183, 67, 2640, 67, 25909, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 4672, 3536, 1183, 67, 2640, 67, 25909, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 13, ...
writeIncludesForInterface(iface)
resulttypes.extend(writeIncludesForInterface(iface))
def writeIncludesForInterface(iface): assert iface.kind == 'interface' for member in iface.stubMembers: writeIncludesForMember(member) includeType(iface)
77f7c863c783916adfbfd3df09dc83b3fe318e54 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11102/77f7c863c783916adfbfd3df09dc83b3fe318e54/qsgen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 16815, 1290, 1358, 12, 31479, 4672, 1815, 9751, 18, 9224, 422, 296, 5831, 11, 364, 3140, 316, 9751, 18, 12847, 6918, 30, 1045, 16815, 1290, 4419, 12, 5990, 13, 2341, 559, 12, 31479...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1045, 16815, 1290, 1358, 12, 31479, 4672, 1815, 9751, 18, 9224, 422, 296, 5831, 11, 364, 3140, 316, 9751, 18, 12847, 6918, 30, 1045, 16815, 1290, 4419, 12, 5990, 13, 2341, 559, 12, 31479...
oscmd("ln -s "+prefix+libdir+"/panda3d/nppanda3d.so "+destdir+prefix+"/lib/mozilla/plugins/nppanda3d.so") oscmd("ln -s "+prefix+libdir+"/panda3d/nppanda3d.so "+destdir+prefix+"/lib/mozilla-firefox/plugins/nppanda3d.so") oscmd("ln -s "+prefix+libdir+"/panda3d/nppanda3d.so "+destdir+prefix+"/lib/xulrunner-addons/plugins/nppanda3d.so")
oscmd("ln -s "+prefix+libdir+"/panda3d/nppanda3d.so "+destdir+prefix+libdir+"/mozilla/plugins/nppanda3d.so") oscmd("ln -s "+prefix+libdir+"/panda3d/nppanda3d.so "+destdir+prefix+libdir+"/mozilla-firefox/plugins/nppanda3d.so") oscmd("ln -s "+prefix+libdir+"/panda3d/nppanda3d.so "+destdir+prefix+libdir+"/xulrunner-addons/plugins/nppanda3d.so")
def InstallPanda(destdir="", prefix="/usr", outputdir="built"): if (not prefix.startswith("/")): prefix = "/" + prefix PPATH=get_python_lib() 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+"/share/mime-info") oscmd("mkdir -p "+destdir+prefix+"/share/mime/packages") oscmd("mkdir -p "+destdir+prefix+"/share/application-registry") oscmd("mkdir -p "+destdir+prefix+"/share/applications") oscmd("mkdir -p "+destdir+prefix+libdir+"/panda3d") oscmd("mkdir -p "+destdir+PPATH) oscmd("mkdir -p "+destdir+"/etc/ld.so.conf.d") WriteFile(destdir+prefix+"/share/panda3d/direct/__init__.py", "") Configrc = ReadFile(outputdir+"/etc/Config.prc") Configrc.replace("model-path $THIS_PRC_DIR/..", "model-path "+destdir+prefix+"/share/panda3d") WriteFile(destdir+"/etc/Config.prc", Configrc) oscmd("cp "+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") WriteMimeFile(destdir+prefix+"/share/mime-info/panda3d.mime", MIME_INFO) WriteKeysFile(destdir+prefix+"/share/mime-info/panda3d.keys", MIME_INFO) WriteMimeXMLFile(destdir+prefix+"/share/mime/packages/panda3d.xml", MIME_INFO) WriteApplicationsFile(destdir+prefix+"/share/application-registry/panda3d.applications", APP_INFO, MIME_INFO) oscmd("cp makepanda/pview.desktop "+destdir+prefix+"/share/applications/pview.desktop") if (os.path.exists(outputdir+"/lib/nppanda3d.so")): oscmd("ln -s "+prefix+libdir+"/panda3d/nppanda3d.so "+destdir+prefix+"/lib/mozilla/plugins/nppanda3d.so") oscmd("ln -s "+prefix+libdir+"/panda3d/nppanda3d.so "+destdir+prefix+"/lib/mozilla-firefox/plugins/nppanda3d.so") oscmd("ln -s "+prefix+libdir+"/panda3d/nppanda3d.so "+destdir+prefix+"/lib/xulrunner-addons/plugins/nppanda3d.so") 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+PPATH+"/panda3d.pth") oscmd("echo '"+prefix+libdir+"/panda3d'>> "+destdir+PPATH+"/panda3d.pth") oscmd("cp "+outputdir+"/bin/* "+destdir+prefix+"/bin/") for base in os.listdir(outputdir+"/lib"): if (not base.endswith(".a")): oscmd("cp "+outputdir+"/lib/"+base+" "+destdir+prefix+libdir+"/panda3d/"+base) # rpmlint doesn't like it if we compile pyc. #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+prefix+"/include/panda3d") DeleteCVS(destdir+prefix+"/share/panda3d") # rpmlint doesn't like these files, for some reason. DeleteBuildFiles(destdir+prefix+"/share/panda3d") if (os.path.isfile(destdir+prefix+"/share/panda3d/direct/leveleditor/copyfiles.pl")): os.remove(destdir+prefix+"/share/panda3d/direct/leveleditor/copyfiles.pl")
89e5c85930fbe29392c86f54d0274134bd48f125 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7242/89e5c85930fbe29392c86f54d0274134bd48f125/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...
if not hasattr(self, "prevTime"): self.prevTime = time() snow = time()
def _loop(self, starttime, count, interval): if hasattr(self, "call"): del self.call if not hasattr(self, "prevTime"): self.prevTime = time() snow = time() self.f(*self.a, **self.kw) now = time() while self.running: count += 1 fromStart = count * interval fromNow = starttime - now delay = fromNow + fromStart if delay > 0: self.call = reactor.callLater(delay, self._loop, starttime, count, interval) t = time() self.prevTime = t return
0aa116d0ba2630ded195bc2234086a188b089535 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1265/0aa116d0ba2630ded195bc2234086a188b089535/rtp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6498, 12, 2890, 16, 23437, 16, 1056, 16, 3673, 4672, 309, 3859, 12, 2890, 16, 315, 1991, 6, 4672, 1464, 365, 18, 1991, 365, 18, 74, 30857, 2890, 18, 69, 16, 2826, 2890, 18, 9987...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6498, 12, 2890, 16, 23437, 16, 1056, 16, 3673, 4672, 309, 3859, 12, 2890, 16, 315, 1991, 6, 4672, 1464, 365, 18, 1991, 365, 18, 74, 30857, 2890, 18, 69, 16, 2826, 2890, 18, 9987...
return self._endExposure(imageRequest) def _endExposure(self, request):
print time.time(), "end" return self._endExposure(imageRequest, status) def _endExposure(self, request, status):
def _expose(self, imageRequest): shutterRequest = imageRequest['shutter'] if shutterRequest == Shutter.OPEN: shutter = SBIGDrv.openShutter elif shutterRequest == Shutter.CLOSE: shutter = SBIGDrv.closeShutter elif shutterRequest == Shutter.LEAVE_AS_IS: shutter = SBIGDrv.leaveShutter else: self.log.warning("Incorrect shutter option (%s)." " Leaving shutter intact" % shutterRequest) shutter = SBIGDrv.leaveShutter # ok, start it self.exposeBegin(imageRequest) self.drv.startExposure(self.ccd, int(imageRequest["exptime"]*100), shutter) # save time exposure started self.lastFrameStartTime = dt.datetime.utcnow() self.lastFrameTemp = self.getTemperature()
638e60fab47d94aa85772d5e40d8a5a116505d95 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3749/638e60fab47d94aa85772d5e40d8a5a116505d95/sbig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 338, 4150, 12, 2890, 16, 1316, 691, 4672, 225, 9171, 387, 691, 273, 1316, 691, 3292, 674, 18220, 3546, 225, 309, 9171, 387, 691, 422, 2638, 18220, 18, 11437, 30, 9171, 387, 273, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 338, 4150, 12, 2890, 16, 1316, 691, 4672, 225, 9171, 387, 691, 273, 1316, 691, 3292, 674, 18220, 3546, 225, 309, 9171, 387, 691, 422, 2638, 18220, 18, 11437, 30, 9171, 387, 273, 3...
p2=string.atoi(mynewver[1][3:])
p2=string.atof(mynewver[1][3:])
def relparse(myver): number=0 p1=0 p2=0 mynewver=string.split(myver,"_") if len(mynewver)==2: #alpha,beta or pre number=string.atoi(mynewver[0]) if "beta" == mynewver[1][:4]: p1=-2 try: p2=string.atoi(mynewver[1][4:]) except: p2=0 elif "alpha" == mynewver[1][:5]: p1=-3 try: p2=string.atoi(mynewver[1][5:]) except: p2=0 elif "pre" ==mynewver[1][:3]: p1=-1 try: p2=string.atoi(mynewver[1][3:]) except: p2=0 else: #normal number or number with letter at end divider=len(myver)-1 if myver[divider:] not in "1234567890": #letter at end p1=ord(myver[divider:]) number=string.atoi(myver[0:divider]) else: number=string.atoi(myver) return [number,p1,p2]
35704d4f9e9c7b95c1657cbe1612b7bfdea07605 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9957/35704d4f9e9c7b95c1657cbe1612b7bfdea07605/portage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1279, 2670, 12, 4811, 502, 4672, 1300, 33, 20, 293, 21, 33, 20, 293, 22, 33, 20, 312, 878, 359, 502, 33, 1080, 18, 4939, 12, 4811, 502, 10837, 67, 7923, 309, 562, 12, 81, 878, 359,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1279, 2670, 12, 4811, 502, 4672, 1300, 33, 20, 293, 21, 33, 20, 293, 22, 33, 20, 312, 878, 359, 502, 33, 1080, 18, 4939, 12, 4811, 502, 10837, 67, 7923, 309, 562, 12, 81, 878, 359,...
if not option.startswith("_"):
if not option.startswith("_") and getattr(options, option) != None:
def run(): # Command line parser options. parser = optparse.OptionParser(usage = "usage: %prog [options] urls") parser.add_option("--open", dest="open", help="Metalink file to open and modify") parser.add_option("-o", dest="output", help="Binary file name") parser.add_option("-d", dest="download", action="store_true", help="Don't download the file again") parser.add_option("--clear_urls", dest="clear_urls", action="store_true", help="Remove any existing urls when opening a file") parser.add_option("-i", dest="identity", help="Identity") parser.add_option("-v", dest="version", help="Version Number") parser.add_option("--os", dest="os", help="Operating System") parser.add_option("--publisher-name", dest="publisher_name", help="Publisher Name") parser.add_option("--publisher-url", dest="publisher_url", help="Publisher URL") parser.add_option("-c", "--copyright", dest="copyright", help="Copyright") parser.add_option("--description", dest="description", help="Description") parser.add_option("--license-name", dest="license_name", help="License Name") parser.add_option("--license-url", dest="license_url", help="License URL") parser.add_option("-l", "--language", dest="language", help="The language the file is in, per ISO-639/3166. \"en-US\" for Standard American English") parser.add_option("--maxconn", dest="maxconn_total", help="Maximum number of connections for downloading") parser.add_option("--origin", dest="origin", help="URL for the finished metalink file to check for updates") #parser.add_option("-s", "--size", dest="size", help="File size") parser.set_defaults(identity="",version="",os="",publisher_name="",publisher_url="",copyright="",description="",license_name="",license_url="",language="",maxconn_total="",origin="") (options, args) = parser.parse_args() if len(args) <= 0: print "ERROR: Specify a URL." parser.print_help() return xml = metalink.Metalink() if options.open != None: xml.load_file(options.open) if options.clear_urls: xml.clear_res() for option in dir(options): if not option.startswith("_"): try: getattr(xml, option) except AttributeError: continue setattr(xml, option, getattr(options, option)) download = True if options.download: download = False build(xml, args, None, options.output, download)
f4dc6c94a5fbddbea48d096d63129b329dfb6edb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6425/f4dc6c94a5fbddbea48d096d63129b329dfb6edb/meditor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 13332, 468, 3498, 980, 2082, 702, 18, 2082, 273, 2153, 2670, 18, 1895, 2678, 12, 9167, 273, 315, 9167, 30, 738, 14654, 306, 2116, 65, 6903, 7923, 2082, 18, 1289, 67, 3482, 2932, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13332, 468, 3498, 980, 2082, 702, 18, 2082, 273, 2153, 2670, 18, 1895, 2678, 12, 9167, 273, 315, 9167, 30, 738, 14654, 306, 2116, 65, 6903, 7923, 2082, 18, 1289, 67, 3482, 2932, ...
cmd = "condor_glidein -count "+self.nodeCount+" -setup_jobmanager=jobmanager-fork -arch=7.4.0-i686-pc-Linux-2.4 -idletime 5 grid-abe.ncsa.teragrid.org/jobmanager-pbs"
cmd = "condor_glidein -count %d -setup_jobmanager=jobmanager-fork -arch=7.4.0-i686-pc-Linux-2.4 -idletime 5 grid-abe.ncsa.teragrid.org/jobmanager-pbs" % self.nodeCount print "running cmd = "+cmd
def runPipelines(self):
c6f0f88861917323b6807d9619af21437a1d3595 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6549/c6f0f88861917323b6807d9619af21437a1d3595/DagmanProductionRunner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 24925, 14567, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 24925, 14567, 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, ...
'parent.currency'])
'_parent_sale.currency'])
def ignore_packing_exception(self, cursor, user, sale_id, context=None): line_obj = self.pool.get('sale.line')
63ab9b352113f550a19cea3cf8f4525ee1ffdbe6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9306/63ab9b352113f550a19cea3cf8f4525ee1ffdbe6/sale.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2305, 67, 2920, 310, 67, 4064, 12, 2890, 16, 3347, 16, 729, 16, 272, 5349, 67, 350, 16, 819, 33, 7036, 4672, 980, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 87, 5349, 18, 1369, 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, 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, 2305, 67, 2920, 310, 67, 4064, 12, 2890, 16, 3347, 16, 729, 16, 272, 5349, 67, 350, 16, 819, 33, 7036, 4672, 980, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 87, 5349, 18, 1369, 6...
print 'Connected by', addr r = Redirector(ser, connection)
sys.stderr.write('Connected by %s\n' % (addr,)) r = Redirector( ser, connection, options.convert and ser_newline or None, options.convert and net_newline or None, options.spy, )
def stop(self): """Stop copying""" if self.alive: self.alive = False self.thread_read.join()
4ecea3dab2a6a60d58f5e81772097e13990d8140 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2937/4ecea3dab2a6a60d58f5e81772097e13990d8140/tcp_serial_redirect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 12, 2890, 4672, 3536, 4947, 8933, 8395, 309, 365, 18, 11462, 30, 365, 18, 11462, 273, 1083, 365, 18, 5930, 67, 896, 18, 5701, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 12, 2890, 4672, 3536, 4947, 8933, 8395, 309, 365, 18, 11462, 30, 365, 18, 11462, 273, 1083, 365, 18, 5930, 67, 896, 18, 5701, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -...
return http.Response(stream=s)
return HTMLResponse(stream=s)
def render(self, ctx=None): # Create a live Sage worksheet out of self.path and render it. doc_page_html = open(self.docpath).read() from docHTMLProcessor import SphinxHTMLProcessor doc_page = SphinxHTMLProcessor().process_doc_html(doc_page_html)
5da3b1cd72cd4a94421b8bc914d7957cdbe6b56d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/5da3b1cd72cd4a94421b8bc914d7957cdbe6b56d/twist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1103, 33, 7036, 4672, 468, 1788, 279, 8429, 348, 410, 13622, 596, 434, 365, 18, 803, 471, 1743, 518, 18, 997, 67, 2433, 67, 2620, 273, 1696, 12, 2890, 18, 2434, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1103, 33, 7036, 4672, 468, 1788, 279, 8429, 348, 410, 13622, 596, 434, 365, 18, 803, 471, 1743, 518, 18, 997, 67, 2433, 67, 2620, 273, 1696, 12, 2890, 18, 2434, 8...
return self.seconds
return self.__seconds
def __int__(self): """ Return the integer part (seconds) of a LIGOTimeGPS as an int.
64e3217d9e86a7f50114bba7adfdee1638e21ac0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3589/64e3217d9e86a7f50114bba7adfdee1638e21ac0/lal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 474, 972, 12, 2890, 4672, 3536, 2000, 326, 3571, 1087, 261, 7572, 13, 434, 279, 511, 3047, 51, 950, 28983, 487, 392, 509, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 474, 972, 12, 2890, 4672, 3536, 2000, 326, 3571, 1087, 261, 7572, 13, 434, 279, 511, 3047, 51, 950, 28983, 487, 392, 509, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
obj = self.data['objects'][target]
obj = self.data['objects'][name]
def _create_refnode(expr): target = unicode(expr) if target not in self.data['objects']: return None obj = self.data['objects'][target] if obj[1] != typ: return None return make_refnode(builder, fromdocname, obj[0], target, contnode, target)
c6a6cc5c5f3f964470f65eb62ab41d1a38199c9f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5532/c6a6cc5c5f3f964470f65eb62ab41d1a38199c9f/cpp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 1734, 2159, 12, 8638, 4672, 1018, 273, 5252, 12, 8638, 13, 309, 1018, 486, 316, 365, 18, 892, 3292, 6911, 3546, 30, 327, 599, 1081, 273, 365, 18, 892, 3292, 6911, 3546, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 1734, 2159, 12, 8638, 4672, 1018, 273, 5252, 12, 8638, 13, 309, 1018, 486, 316, 365, 18, 892, 3292, 6911, 3546, 30, 327, 599, 1081, 273, 365, 18, 892, 3292, 6911, 3546, ...
str = '<h3>Modules</h3>\n<ul>\n'
str = self._table_header('Submodules', 'details')
def _module_list(self, modules, sortorder): """ @return: The HTML code for the module hierarchy tree, containing the given modules. This is used by L{_module_to_html} to list the submodules of a package. @rtype: C{string} """ if len(modules) == 0: return '' str = '<h3>Modules</h3>\n<ul>\n' modules = self._filtersort_links(modules, sortorder) for link in modules: str += self._module_tree_item(link.target()) return str + '</ul>\n'
36d55ba570a7b20eabb1f20282f2d10ee3127367 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/36d55ba570a7b20eabb1f20282f2d10ee3127367/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2978, 67, 1098, 12, 2890, 16, 4381, 16, 1524, 1019, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 326, 1605, 9360, 2151, 16, 4191, 326, 864, 4381, 18, 225, 1220, 353, 1399, 635...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2978, 67, 1098, 12, 2890, 16, 4381, 16, 1524, 1019, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 326, 1605, 9360, 2151, 16, 4191, 326, 864, 4381, 18, 225, 1220, 353, 1399, 635...
lwork = calc_lwork.getri(getri.prefix,a1.shape[0])[1]
lwork = calc_lwork.getri(getri.prefix,a1.shape[0]) lwork = lwork[1] lwork = int(1.01*lwork)
def inv(a, overwrite_a=0): """Return inverse of square matrix a. """ a1 = asarray(a) if len(a1.shape) != 2 or a1.shape[0] != a1.shape[1]: raise ValueError, 'expected square matrix' overwrite_a = overwrite_a or a1 is not a #XXX: I found no advantage or disadvantage of using finv.
d2289b8c0d6dbe549538e64771e1bd75fab2ee06 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/d2289b8c0d6dbe549538e64771e1bd75fab2ee06/basic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2198, 12, 69, 16, 6156, 67, 69, 33, 20, 4672, 3536, 990, 8322, 434, 8576, 3148, 279, 18, 3536, 279, 21, 273, 10455, 12, 69, 13, 309, 562, 12, 69, 21, 18, 4867, 13, 480, 576, 578, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2198, 12, 69, 16, 6156, 67, 69, 33, 20, 4672, 3536, 990, 8322, 434, 8576, 3148, 279, 18, 3536, 279, 21, 273, 10455, 12, 69, 13, 309, 562, 12, 69, 21, 18, 4867, 13, 480, 576, 578, ...
c = compile(code, _encode_filename(filename), 'exec')
c = self._compile(code, _encode_filename(filename))
def write_file(filename, data, mode): if zip: info = ZipInfo(filename) info.external_attr = 0755 << 16L zip_file.writestr(info, data) else: f = open(os.path.join(target, filename), mode) try: f.write(data) finally: f.close()
78efe7401b1f49fc1a72fc33ed6b6b97767cec44 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14446/78efe7401b1f49fc1a72fc33ed6b6b97767cec44/environment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 768, 12, 3459, 16, 501, 16, 1965, 4672, 309, 3144, 30, 1123, 273, 8603, 966, 12, 3459, 13, 1123, 18, 9375, 67, 1747, 273, 18641, 2296, 2872, 48, 3144, 67, 768, 18, 13284, 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, 1045, 67, 768, 12, 3459, 16, 501, 16, 1965, 4672, 309, 3144, 30, 1123, 273, 8603, 966, 12, 3459, 13, 1123, 18, 9375, 67, 1747, 273, 18641, 2296, 2872, 48, 3144, 67, 768, 18, 13284, 3...
if self._poll.active and not self._preview:
if self._poll.active and not self._previewing:
def draw_poll_details_box(self): """(Re)draw the poll details box self.poll_details_box should be already defined on the canvas. """ poll_details_box = self.poll_details_box poll_details_box.remove_all()
96d7a3e2e2c337e1e11897013d8080b5b48f1a0d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6691/96d7a3e2e2c337e1e11897013d8080b5b48f1a0d/poll.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 67, 13835, 67, 6395, 67, 2147, 12, 2890, 4672, 3536, 12, 426, 13, 9446, 326, 7672, 3189, 3919, 225, 365, 18, 13835, 67, 6395, 67, 2147, 1410, 506, 1818, 2553, 603, 326, 5953, 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, 3724, 67, 13835, 67, 6395, 67, 2147, 12, 2890, 4672, 3536, 12, 426, 13, 9446, 326, 7672, 3189, 3919, 225, 365, 18, 13835, 67, 6395, 67, 2147, 1410, 506, 1818, 2553, 603, 326, 5953, 18,...
g_message_board[self.address[0]] = message
g_message_board[self.ip] = message
def run(self): running = 1 while running: message = self.client.recv(self.size)
9c1cadc3cf0a802150d579af45f298117b3dfe7d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/228/9c1cadc3cf0a802150d579af45f298117b3dfe7d/server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 3549, 273, 404, 1323, 3549, 30, 883, 273, 365, 18, 2625, 18, 18334, 12, 2890, 18, 1467, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 3549, 273, 404, 1323, 3549, 30, 883, 273, 365, 18, 2625, 18, 18334, 12, 2890, 18, 1467, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
self.id.write(h5s.ALL, h5s.ALL, data)
id.write(h5s.ALL, h5s.ALL, data) HLObject.__init__(self, id)
def __init__(self, group, name, shape=None, dtype=None, data=None, chunks=None, compression=None, shuffle=None, fletcher32=None, maxshape=None, compression_opts=None, _rawid = None): """ Open or create a new dataset in the file.
b1a598a2d723040490bcce9fa07057de259dfbab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10380/b1a598a2d723040490bcce9fa07057de259dfbab/highlevel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1041, 16, 508, 16, 2179, 33, 7036, 16, 3182, 33, 7036, 16, 501, 33, 7036, 16, 6055, 33, 7036, 16, 9154, 33, 7036, 16, 12552, 33, 7036, 16, 1183, 1593, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1041, 16, 508, 16, 2179, 33, 7036, 16, 3182, 33, 7036, 16, 501, 33, 7036, 16, 6055, 33, 7036, 16, 9154, 33, 7036, 16, 12552, 33, 7036, 16, 1183, 1593, ...
obj._auto_update = True
def get_object_from_doc(self, cls, id, doc): obj_node = doc.getElementsByTagName('object')[0] if not cls: class_name = obj_node.getAttribute('class') cls = find_class(class_name) if not id: id = obj_node.getAttribute('id') obj = cls(id) obj._auto_update = False for prop_node in obj_node.getElementsByTagName('property'): prop_name = prop_node.getAttribute('name') prop = obj.find_property(prop_name) if prop.data_type != Key: if hasattr(prop, 'item_type'): value = self.get_list(prop_node, prop.item_type) else: prop_value = self.get_text_value(prop_node) value = self.decode_value(prop, prop_value) value = prop.make_value_from_datastore(value) setattr(obj, prop.name, value) obj._auto_update = True return obj
88c9f552a156ee972c88891a1fdc79060dffec5d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1098/88c9f552a156ee972c88891a1fdc79060dffec5d/xmlmanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1612, 67, 2080, 67, 2434, 12, 2890, 16, 2028, 16, 612, 16, 997, 4672, 1081, 67, 2159, 273, 997, 18, 588, 3471, 10401, 2668, 1612, 6134, 63, 20, 65, 309, 486, 2028, 30, 667, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1612, 67, 2080, 67, 2434, 12, 2890, 16, 2028, 16, 612, 16, 997, 4672, 1081, 67, 2159, 273, 997, 18, 588, 3471, 10401, 2668, 1612, 6134, 63, 20, 65, 309, 486, 2028, 30, 667, ...
def hpy_d7a6d791d7a2(hpy_d7a6d791d7a2): """שנה את צבע העט""" turtle.color(hpy_d7a6d791d7a2d799d79d[hpy_d7a6d791d7a2])
def hpy_d7a6d791d7a2(*hpy_d790d7a8d792): """שנה את צבע העט.
def hpy_d7a6d791d7a2(hpy_d7a6d791d7a2): """שנה את צבע העט""" turtle.color(hpy_d7a6d791d7a2d799d79d[hpy_d7a6d791d7a2])
b7172c683d993fc190f5a8e2a730bccdcdc130f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8187/b7172c683d993fc190f5a8e2a730bccdcdc130f8/hturtle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 366, 2074, 67, 72, 27, 69, 26, 72, 7235, 21, 72, 27, 69, 22, 30857, 76, 2074, 67, 72, 7235, 20, 72, 27, 69, 28, 72, 7235, 22, 4672, 3536, 152, 107, 152, 259, 152, 247, 225, 152, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 366, 2074, 67, 72, 27, 69, 26, 72, 7235, 21, 72, 27, 69, 22, 30857, 76, 2074, 67, 72, 7235, 20, 72, 27, 69, 28, 72, 7235, 22, 4672, 3536, 152, 107, 152, 259, 152, 247, 225, 152, ...
data[k] = Array([], "s")
data[k] = dbus.Array([], "s")
def dsanitize(data): # Clean up a dict so that it can be transmitted through D-Bus for k, v in data.items(): # Manually specify an arbitrary content type for empty Python arrays # because D-Bus can't handle the type conversion for empty arrays if not v and isinstance(v, list): data[k] = Array([], "s") # D-Bus has no concept of a null or empty value so we have to convert # None types to something else. I use an empty string because it has # the same behavior as None in a Python conditional expression elif v == None: data[k] = "" return data
c1ca5f821788e5eb0bddb76b4c6d3faa83e2c396 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7036/c1ca5f821788e5eb0bddb76b4c6d3faa83e2c396/dbuswrapper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3780, 13502, 12, 892, 4672, 468, 9645, 731, 279, 2065, 1427, 716, 518, 848, 506, 906, 7948, 3059, 463, 17, 7086, 364, 417, 16, 331, 316, 501, 18, 3319, 13332, 468, 8660, 3452, 4800, 39...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3780, 13502, 12, 892, 4672, 468, 9645, 731, 279, 2065, 1427, 716, 518, 848, 506, 906, 7948, 3059, 463, 17, 7086, 364, 417, 16, 331, 316, 501, 18, 3319, 13332, 468, 8660, 3452, 4800, 39...
return guid return ''
return guid return ''
def getGuidByPfn(self,pfn): for guid,pfile in self.files.items(): for p in pfile.pfns: if pfn == p[0]: return guid return ''
15bf7dd6204f2cdb3b3b2146d62e93fe210c8af4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12864/15bf7dd6204f2cdb3b3b2146d62e93fe210c8af4/PoolXMLCatalog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7162, 1911, 858, 52, 4293, 12, 2890, 16, 84, 4293, 4672, 225, 364, 9875, 16, 84, 768, 316, 365, 18, 2354, 18, 3319, 13332, 364, 293, 316, 293, 768, 18, 14241, 2387, 30, 309, 293, 429...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7162, 1911, 858, 52, 4293, 12, 2890, 16, 84, 4293, 4672, 225, 364, 9875, 16, 84, 768, 316, 365, 18, 2354, 18, 3319, 13332, 364, 293, 316, 293, 768, 18, 14241, 2387, 30, 309, 293, 429...
university = [et for et in entity_types if et.source == 'oxpoints'] public = [et for et in entity_types if et.source != 'oxpoints'] return { 'university': university, 'public': public,
return { 'entity_types': entity_types,
def initial_context(cls, request): entity_types = EntityType.objects.filter(show_in_category_list=True) university = [et for et in entity_types if et.source == 'oxpoints'] public = [et for et in entity_types if et.source != 'oxpoints']
3cd8c78e193cd999601c7269605a7d43cfb07068 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14173/3cd8c78e193cd999601c7269605a7d43cfb07068/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2172, 67, 2472, 12, 6429, 16, 590, 4672, 1522, 67, 2352, 273, 23517, 18, 6911, 18, 2188, 12, 4500, 67, 267, 67, 4743, 67, 1098, 33, 5510, 13, 640, 6760, 560, 273, 306, 278, 364, 3393...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2172, 67, 2472, 12, 6429, 16, 590, 4672, 1522, 67, 2352, 273, 23517, 18, 6911, 18, 2188, 12, 4500, 67, 267, 67, 4743, 67, 1098, 33, 5510, 13, 640, 6760, 560, 273, 306, 278, 364, 3393...
self.outstream.write("*\n")
self.outstream.write("*" + os.linesep)
def write(self, record): id = record.id assert "\n" not in id description = record.description assert "\n" not in description self.outstream.write(">P1;%s %s\n" % (id, description))
842c7d3d15f376ed24a8bb00f08fad9db98860e9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/842c7d3d15f376ed24a8bb00f08fad9db98860e9/generic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 1409, 4672, 612, 273, 1409, 18, 350, 1815, 1548, 82, 6, 486, 316, 612, 2477, 273, 1409, 18, 3384, 1815, 1548, 82, 6, 486, 316, 2477, 225, 365, 18, 659, 3256, 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, 1045, 12, 2890, 16, 1409, 4672, 612, 273, 1409, 18, 350, 1815, 1548, 82, 6, 486, 316, 612, 2477, 273, 1409, 18, 3384, 1815, 1548, 82, 6, 486, 316, 2477, 225, 365, 18, 659, 3256, 18, ...
def fl_show_object(ob): """ fl_show_object(ob) """ _fl_show_object(ob)
def fl_show_object(pObject): """ fl_show_object(pObject) """ _fl_show_object(pObject)
def fl_show_object(ob): """ fl_show_object(ob) """ _fl_show_object(ob)
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 4500, 67, 1612, 12, 84, 921, 4672, 3536, 1183, 67, 4500, 67, 1612, 12, 84, 921, 13, 3536, 225, 389, 2242, 67, 4500, 67, 1612, 12, 84, 921, 13, 282, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1183, 67, 4500, 67, 1612, 12, 84, 921, 4672, 3536, 1183, 67, 4500, 67, 1612, 12, 84, 921, 13, 3536, 225, 389, 2242, 67, 4500, 67, 1612, 12, 84, 921, 13, 282, 2, -100, -100, -100, -...
self._info.log("Adjusting topology for fault '%s'." % interface.label)
self._info.log("Adjusting topology for fault '%s' of size %d." % (interface.label, interface.faultSize(mesh)))
def _adjustTopology(self, mesh, interfaces): """ Adjust topology for interface implementation. """ logEvent = "%sadjTopo" % self._loggingPrefix self._eventLogger.eventBegin(logEvent) if not interfaces is None: firstFaultVertex = 0 firstFaultCell = 0 for interface in interfaces: firstFaultCell += interface.faultSize(mesh) if interface.useLagrangeConstraints(): firstFaultCell += interface.faultSize(mesh) for interface in interfaces: self._info.log("Adjusting topology for fault '%s'." % interface.label) firstFaultVertex, firstFaultCell = interface.adjustTopology(mesh, firstFaultVertex, firstFaultCell)
d7e28cec81445820827a38d7adedbb7adab67c5d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8645/d7e28cec81445820827a38d7adedbb7adab67c5d/MeshGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 13362, 18618, 12, 2890, 16, 6986, 16, 7349, 4672, 3536, 17720, 9442, 364, 1560, 4471, 18, 3536, 25424, 273, 2213, 87, 13829, 3401, 83, 6, 738, 365, 6315, 11167, 2244, 365, 6315, 257...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13362, 18618, 12, 2890, 16, 6986, 16, 7349, 4672, 3536, 17720, 9442, 364, 1560, 4471, 18, 3536, 25424, 273, 2213, 87, 13829, 3401, 83, 6, 738, 365, 6315, 11167, 2244, 365, 6315, 257...
def _check_certificat(self, cr, uid, ids):
def _check_certificate(self, cr, uid, ids):
def _check_certificat(self, cr, uid, ids): if not ids: return True
63d6e4443f732e89575e572aa847fb865fb79aa7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/63d6e4443f732e89575e572aa847fb865fb79aa7/module.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 14108, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 4672, 309, 486, 3258, 30, 327, 1053, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 14108, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 4672, 309, 486, 3258, 30, 327, 1053, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
fp = None
infp = None
def _loop(self, starttime, count, interval): if hasattr(self, "call"): del self.call self.f(*self.a, **self.kw) now = time() while self.running: count += 1 fromStart = count * interval fromNow = starttime - now delay = fromNow + fromStart if delay > 0: self.call = reactor.callLater(delay, self._loop, starttime, count, interval) return
bb9c0b2f3df3403578e2de28d8b74fd768f2cc32 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1265/bb9c0b2f3df3403578e2de28d8b74fd768f2cc32/rtp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6498, 12, 2890, 16, 23437, 16, 1056, 16, 3673, 4672, 309, 3859, 12, 2890, 16, 315, 1991, 6, 4672, 1464, 365, 18, 1991, 365, 18, 74, 30857, 2890, 18, 69, 16, 2826, 2890, 18, 9987...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6498, 12, 2890, 16, 23437, 16, 1056, 16, 3673, 4672, 309, 3859, 12, 2890, 16, 315, 1991, 6, 4672, 1464, 365, 18, 1991, 365, 18, 74, 30857, 2890, 18, 69, 16, 2826, 2890, 18, 9987...
print "Usage %s <opts>" % sys.argv[0]
print __doc__.split( '\n' )[1] print "Usage:\n %s [options]..." % sys.argv[0] print "Options:"
def fixAbsoluteLinks( path ): for entry in os.listdir( path ): entryPath = os.path.join( path, entry ) if os.path.islink( entryPath ): destPath = os.readlink( entryPath ) if os.path.isabs( destPath ): absLinkDirSplit = [ d for d in os.path.abspath( path ).split( "/" ) if d.strip() ] absDestDirSplit = [ d for d in destPath.split( "/" ) if d.strip() ] common = -1 for i in range( min( len( absLinkDirSplit ), len( absDestDirSplit ) ) ): if absLinkDirSplit[ i ] == absDestDirSplit[ i ]: common = i else: break absLinkDirSplit = absLinkDirSplit[ common + 1: ] absDestDirSplit = absDestDirSplit[ common + 1: ] finalDestination = [ ".." for d in absLinkDirSplit ] finalDestination.extend( absDestDirSplit ) finalDestination = os.path.join( *finalDestination ) print "Relinking %s" % entryPath print " %s -> %s" % ( destPath, finalDestination ) os.unlink( entryPath ) os.symlink( finalDestination, entryPath ) elif os.path.isdir( entryPath ): fixAbsoluteLinks( entryPath )
eae2de6b07eebbb079598c001145f786278160d6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/eae2de6b07eebbb079598c001145f786278160d6/dirac-compile-externals.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 10368, 7100, 12, 589, 262, 30, 364, 1241, 316, 1140, 18, 1098, 1214, 12, 589, 262, 30, 1241, 743, 273, 1140, 18, 803, 18, 5701, 12, 589, 16, 1241, 262, 309, 1140, 18, 803, 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, 2917, 10368, 7100, 12, 589, 262, 30, 364, 1241, 316, 1140, 18, 1098, 1214, 12, 589, 262, 30, 1241, 743, 273, 1140, 18, 803, 18, 5701, 12, 589, 16, 1241, 262, 309, 1140, 18, 803, 18, ...
tag=None, magmom=None, mass=None, momentum=None, charge=None):
tag=None, momentum=None, mass=None, magmom=None, charge=None): """Construct Atom object. Parameters ---------- symbol : str or int Can be a chemical symbol (str) or an atomic number (int). position : sequence of 3 floats Atomi position. tag : int Special purpose tag. momentum: sequence of 3 floats Momentum for atom. mass : float Atomic mass in atomic units. magmom: float Magnetic moment. charge : float Atomic charge. Examples -------- The first two are equivalent: >>> a = Atom('O', charge=-2) >>> b = Atom(8, charge=-2) >>> c = Atom('H', position=(1, 2, 3), magmom=1) >>> print a.charge, a.position -2, (0, 0, 0) >>> print c.position (1, 2, 3) >>> print b.symbol 'O' """
def __init__(self, symbol, position=(0, 0, 0), tag=None, magmom=None, mass=None, momentum=None, charge=None): if isinstance(symbol, str): self.number = atomic_numbers[symbol] self.symbol = symbol else: self.number = symbol self.symbol = chemical_symbols[symbol] self.position = position self.tag = tag self.momentum = momentum self.mass = mass self.magmom = magmom self.charge = charge
4f53c765c1e0026359605da5aba1d414cddb5674 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5572/4f53c765c1e0026359605da5aba1d414cddb5674/atoms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3273, 16, 1754, 28657, 20, 16, 374, 16, 374, 3631, 1047, 33, 7036, 16, 10382, 379, 33, 7036, 16, 8039, 33, 7036, 16, 4447, 81, 362, 33, 7036, 16, 13765...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3273, 16, 1754, 28657, 20, 16, 374, 16, 374, 3631, 1047, 33, 7036, 16, 10382, 379, 33, 7036, 16, 8039, 33, 7036, 16, 4447, 81, 362, 33, 7036, 16, 13765...
self.lfmter = {False: LatexFormatter(style=style), True: LatexFormatter(style=style, linenos=True)}
self.lfmter = {False: LatexFormatter(style=style, commandprefix='PYG'), True: LatexFormatter(style=style, linenos=True, commandprefix='PYG')}
def __init__(self, dest='html', stylename='sphinx'): self.dest = dest if not pygments: return if stylename == 'sphinx': style = SphinxStyle elif '.' in stylename: module, stylename = stylename.rsplit('.', 1) style = getattr(__import__(module, None, None, ['']), stylename) else: style = get_style_by_name(stylename) self.hfmter = {False: HtmlFormatter(style=style), True: HtmlFormatter(style=style, linenos=True)} self.lfmter = {False: LatexFormatter(style=style), True: LatexFormatter(style=style, linenos=True)}
0ea5c0da4f9bb23fab6017167f1f15d6a9dc3dee /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5532/0ea5c0da4f9bb23fab6017167f1f15d6a9dc3dee/highlighting.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1570, 2218, 2620, 2187, 16253, 14724, 2218, 87, 15922, 11, 4672, 365, 18, 10488, 273, 1570, 309, 486, 2395, 75, 1346, 30, 327, 309, 16253, 14724, 422, 296,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1570, 2218, 2620, 2187, 16253, 14724, 2218, 87, 15922, 11, 4672, 365, 18, 10488, 273, 1570, 309, 486, 2395, 75, 1346, 30, 327, 309, 16253, 14724, 422, 296,...
return tools.ustr(body.encode('ascii', 'replace'))
return tools.ustr((body or '').encode('ascii', 'replace'))
def format_body(self, body): return tools.ustr(body.encode('ascii', 'replace'))
cb1a819d76e6ad860c5454a9dbf2c79b756095ee /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/cb1a819d76e6ad860c5454a9dbf2c79b756095ee/crm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 3432, 12, 2890, 16, 1417, 4672, 327, 8513, 18, 27008, 12, 3432, 18, 3015, 2668, 9184, 2187, 296, 2079, 26112, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 3432, 12, 2890, 16, 1417, 4672, 327, 8513, 18, 27008, 12, 3432, 18, 3015, 2668, 9184, 2187, 296, 2079, 26112, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if isinstance(read, bytes): read = read.decode('ascii')
def _recv(self, which, maxsize): conn, maxsize = self.get_conn_maxsize(which, maxsize) if conn is None: return None try: x = msvcrt.get_osfhandle(conn.fileno()) (read, nAvail, nMessage) = PeekNamedPipe(x, 0) if maxsize < nAvail: nAvail = maxsize if nAvail > 0: (errCode, read) = ReadFile(x, nAvail, None) if isinstance(read, bytes): read = read.decode('ascii') except ValueError: return self._close(which) except (subprocess.pywintypes.error, Exception): if geterror()[0] in (109, errno.ESHUTDOWN): return self._close(which) raise if self.universal_newlines: # Translate newlines. For Python 3.x assume read is text. # If bytes then another solution is needed.
49b7f1af67d5a2c26db49b356a3d35a7324f6cb3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1298/49b7f1af67d5a2c26db49b356a3d35a7324f6cb3/async_sub.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 18334, 12, 2890, 16, 1492, 16, 22959, 4672, 1487, 16, 22959, 273, 365, 18, 588, 67, 4646, 67, 1896, 1467, 12, 12784, 16, 22959, 13, 309, 1487, 353, 599, 30, 327, 599, 225, 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, 389, 18334, 12, 2890, 16, 1492, 16, 22959, 4672, 1487, 16, 22959, 273, 365, 18, 588, 67, 4646, 67, 1896, 1467, 12, 12784, 16, 22959, 13, 309, 1487, 353, 599, 30, 327, 599, 225, 775, ...
def __noopSubst(func, name): return '$(%s)' % name
try: utils.checkBakefileVersion('0.1.5') def __noopSubst(name, func, caller): return '$(%s)' % name except AttributeError: def __noopSubst(func, name): return '$(%s)' % name
def __noopSubst(func, name): return '$(%s)' % name
6e6af2869a8131bd71d787f9a9fb0d6f51d889a0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/6e6af2869a8131bd71d787f9a9fb0d6f51d889a0/wxwin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2135, 556, 1676, 334, 12, 644, 16, 508, 4672, 327, 3365, 9275, 87, 2506, 738, 508, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2135, 556, 1676, 334, 12, 644, 16, 508, 4672, 327, 3365, 9275, 87, 2506, 738, 508, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
new_id = super(account_invoice,self).refund(cr, uid, ids, date=date, period_id=period_id, description=description)
new_id = super(account_invoice,self).refund(cr, uid, ids, date=date, period_id=period_id, description=description, journal_id=journal_id)
def refund(self, cr, uid, ids, date=None, period_id=None, description=None): map_old_new = {} refund_ids = [] for old_inv_id in ids: new_id = super(account_invoice,self).refund(cr, uid, ids, date=date, period_id=period_id, description=description) refund_ids += new_id map_old_new[old_inv_id] = new_id[0]
cbea6a2d9a37b768b84716ca85849f17c7ebc827 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/cbea6a2d9a37b768b84716ca85849f17c7ebc827/account_tax_include.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16255, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1509, 33, 7036, 16, 3879, 67, 350, 33, 7036, 16, 2477, 33, 7036, 4672, 852, 67, 1673, 67, 2704, 273, 2618, 16255, 67, 2232, 273, 53...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16255, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1509, 33, 7036, 16, 3879, 67, 350, 33, 7036, 16, 2477, 33, 7036, 4672, 852, 67, 1673, 67, 2704, 273, 2618, 16255, 67, 2232, 273, 53...
pen = self.GetStatusPen(penColor)
pen = self.GetStatusPen(outlineColor)
def Draw(self, dc, boundingRect, styles, brushOffset, selected): item = self._item
614c6e0fec5358c7acde5bbf542101668445ed6a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/614c6e0fec5358c7acde5bbf542101668445ed6a/CalendarCanvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 12, 2890, 16, 6744, 16, 7552, 6120, 16, 5687, 16, 5186, 1218, 2335, 16, 3170, 4672, 761, 273, 365, 6315, 1726, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 12, 2890, 16, 6744, 16, 7552, 6120, 16, 5687, 16, 5186, 1218, 2335, 16, 3170, 4672, 761, 273, 365, 6315, 1726, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
uncache = collections.defaultdict(list)
uncache = collections.defaultdict(set)
def make_dns_cache(db): cursor = db.cursor() cursor.execute("SELECT DISTINCT(hostname) FROM shares") cache = dict([(share[0], socket.gethostbyname(share[0])) for share in cursor.fetchall()]) uncache = collections.defaultdict(list) for (k, v) in cache.iteritems(): uncache[v].append(k) return cache, uncache
279d17286a4950c91f806534b36abd057a1ac3a3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4762/279d17286a4950c91f806534b36abd057a1ac3a3/pinger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 14926, 67, 2493, 12, 1966, 4672, 3347, 273, 1319, 18, 9216, 1435, 3347, 18, 8837, 2932, 4803, 23286, 12, 10358, 13, 4571, 24123, 7923, 1247, 273, 2065, 3816, 12, 14419, 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, 1221, 67, 14926, 67, 2493, 12, 1966, 4672, 3347, 273, 1319, 18, 9216, 1435, 3347, 18, 8837, 2932, 4803, 23286, 12, 10358, 13, 4571, 24123, 7923, 1247, 273, 2065, 3816, 12, 14419, 63, 20,...
return 0
return ind
def dh_singVal( value, match ): """This function helps with matching a single value. formats['CurrEvents']['en'](0) => u'Current Events' formats['CurrEvents']['en'](u'Current Events') => 0""" if type(value) is int: if value == 0: return match else: raise ValueError("unknown value %d" % value) else: if value == match: return 0 else: raise ValueError()
32e5f5c1a30bc02fc3075b9c456f10fafab05a66 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/32e5f5c1a30bc02fc3075b9c456f10fafab05a66/date.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11007, 67, 2470, 3053, 12, 460, 16, 845, 262, 30, 3536, 2503, 445, 21814, 598, 3607, 279, 2202, 460, 18, 6449, 3292, 20143, 3783, 21712, 275, 3546, 12, 20, 13, 516, 582, 11, 3935, 9043...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11007, 67, 2470, 3053, 12, 460, 16, 845, 262, 30, 3536, 2503, 445, 21814, 598, 3607, 279, 2202, 460, 18, 6449, 3292, 20143, 3783, 21712, 275, 3546, 12, 20, 13, 516, 582, 11, 3935, 9043...
xi = XInfo(os.path.join(os.environ['XIA2_ROOT'], 'Data', 'Test', 'Xinfo', '1vr9.xinfo'))
xi = XInfo(os.path.join(os.environ['XIA2_ROOT'], 'Data', 'Test', 'Xinfo', '1vrm-post-scale.xinfo'))
def _parse_crystal(self, crystal_records): '''Parse the interesting information out of the crystal description.'''
6ffb5b650d7622d6e049131a8377d82fc2539589 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3290/6ffb5b650d7622d6e049131a8377d82fc2539589/XInfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 3353, 31365, 12, 2890, 16, 4422, 31365, 67, 7094, 4672, 9163, 3201, 326, 26122, 1779, 596, 434, 326, 4422, 31365, 2477, 1093, 6309, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 3353, 31365, 12, 2890, 16, 4422, 31365, 67, 7094, 4672, 9163, 3201, 326, 26122, 1779, 596, 434, 326, 4422, 31365, 2477, 1093, 6309, 2, -100, -100, -100, -100, -100, -100, ...
if self.setup['bundle'] and bundle not in self.setup['bundle']:
if self.setup['bundle'] and \ bundle.get('name') not in self.setup['bundle']:
def Install(self): '''Install all entries''' self.DispatchInstallCalls(self.whitelist) mods = self.modified mbundles = [struct for struct in self.config.findall('Bundle') if \ [mod for mod in mods if mod in struct]]
0eda10533870439315c9a749389a381558299eec /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11867/0eda10533870439315c9a749389a381558299eec/Frame.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10284, 12, 2890, 4672, 9163, 6410, 777, 3222, 26418, 365, 18, 5325, 6410, 10125, 12, 2890, 18, 20409, 13, 15546, 273, 365, 18, 7342, 4903, 7663, 273, 306, 1697, 364, 1958, 316, 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, 10284, 12, 2890, 4672, 9163, 6410, 777, 3222, 26418, 365, 18, 5325, 6410, 10125, 12, 2890, 18, 20409, 13, 15546, 273, 365, 18, 7342, 4903, 7663, 273, 306, 1697, 364, 1958, 316, 365, 18, ...
141 sage: a.list(12) [6, 9, 10, 12, 14, 15, 18, 20, 21, 22, 24, 25] sage: a(1/3) Traceback (most recent call last): ... TypeError: Unable to coerce rational (=1/3) to an Integer.
3 sage: a(256) 1 sage: a(29) 2 sage: a.list(20) [1, 1, 2, 1, 2, 2, 2, 1, 3, 2, 2, 2, 2, 2, 4, 1, 2, 3, 2, 2] sage: a(-1) Traceback (most recent call last): ... ValueError: input n (=-1) must be a positive integer AUTHOR: - Jaap Spies (2007-01-14) """ def _repr_(self): return "Number of odd divisors of n" offset = 1 def _eval(self, n): return sum(i%2 for i in arith.divisors(n)) class A001694(SloaneSequence): r""" This function returns the $n$-th Powerful Number: A positive integer $n$ is powerful if for every prime $p$ dividing $n$, $p^2$ also divides $n$. INPUT: n -- positive integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A001694; a Powerful Numbers (also called squarefull, square-full or 2-full numbers). sage: a.offset 1 sage: a(1) 1 sage: a(4) 9 sage: a(100) 3136 sage: a(156) 7225 sage: a.list(19) [1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 72, 81, 100, 108, 121, 125, 128, 144] sage: a(-1) Traceback (most recent call last): ... ValueError: input n (=-1) must be a positive integer
def is_power_of_two(n): r""" This function returns True if and only if $n$ is a power of 2 INPUT: n -- integer OUTPUT: True -- if n is a power of 2 False -- if not EXAMPLES: sage: from sage.databases.sloane_functions import is_power_of_two sage: is_power_of_two(1024) True sage: is_power_of_two(1) True sage: is_power_of_two(24) False sage: is_power_of_two(0) False sage: is_power_of_two(-4) False AUTHOR: -- Jaap Spies (2006-12-09) """ # modification of is2pow(n) from the Programming Guide while n > 0 and n%2 == 0: n = n >> 1 return n == 1
e5d5b60c16d66a2bb879d4bdc18e2f9b3b075cd6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/e5d5b60c16d66a2bb879d4bdc18e2f9b3b075cd6/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 12238, 67, 792, 67, 15415, 12, 82, 4672, 436, 8395, 1220, 445, 1135, 1053, 309, 471, 1338, 309, 271, 82, 8, 353, 279, 7212, 434, 576, 225, 12943, 30, 290, 1493, 3571, 225, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 12238, 67, 792, 67, 15415, 12, 82, 4672, 436, 8395, 1220, 445, 1135, 1053, 309, 471, 1338, 309, 271, 82, 8, 353, 279, 7212, 434, 576, 225, 12943, 30, 290, 1493, 3571, 225, 1...
rv = 0
rv = 0
def _quit(self):
1c147c23599653ee2cd664a4431b6089f0009cdd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/1c147c23599653ee2cd664a4431b6089f0009cdd/PackageManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 27176, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 27176, 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, -...
self._rbuf = data[left:] buffers[-1] = data[:left] break
buf.write(buffer(data, 0, left)) self._rbuf.write(buffer(data, left)) del data break buf.write(data)
def read(self, size=-1): data = self._rbuf if size < 0: # Read until EOF buffers = [] if data: buffers.append(data) self._rbuf = "" if self._rbufsize <= 1: recv_size = self.default_bufsize else: recv_size = self._rbufsize while True: data = self._sock.recv(recv_size) if not data: break buffers.append(data) return "".join(buffers) else: # Read until size bytes or EOF seen, whichever comes first buf_len = len(data) if buf_len >= size: self._rbuf = data[size:] return data[:size] buffers = [] if data: buffers.append(data) self._rbuf = "" while True: left = size - buf_len recv_size = min(self._rbufsize, left) data = self._sock.recv(recv_size) if not data: break buffers.append(data) n = len(data) if n >= left: self._rbuf = data[left:] buffers[-1] = data[:left] break buf_len += n return "".join(buffers)
f8cc64017ca0f33b1e21b1c9c9f5f30ebdc4da31 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/f8cc64017ca0f33b1e21b1c9c9f5f30ebdc4da31/socket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 963, 29711, 21, 4672, 501, 273, 365, 6315, 86, 4385, 309, 963, 411, 374, 30, 468, 2720, 3180, 6431, 9664, 273, 5378, 309, 501, 30, 9664, 18, 6923, 12, 892, 13, 365...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 963, 29711, 21, 4672, 501, 273, 365, 6315, 86, 4385, 309, 963, 411, 374, 30, 468, 2720, 3180, 6431, 9664, 273, 5378, 309, 501, 30, 9664, 18, 6923, 12, 892, 13, 365...
self.log.warn('Failed to get jobs for %s status with error:\n%s' %(result))
self.log.warn('Failed to get jobs for %s status with error:\n%s' %(state,result))
def __purgeCompletedJobs(self): """This method checks for jobs in the Successful/Failed status and conveys updates to the job state service and job monitoring. """ toPurge = [] statusList = [('Successful','Waiting','Pilot Agent Submission'),('Failed','Failed','Exceeded Max Staging Retry')] for state,status,minorStatus in statusList: result = self.stagerClient.getJobsForSystemAndState(state,self.system,self.jobSelectLimit) if not result['OK']: self.log.warn('Failed to get jobs for %s status with error:\n%s' %(result)) return result if result['JobIDs']: self.log.verbose('%s %s jobs available to update' %(len(result['JobIDs']),state)) for jobID in result['JobIDs']: result = self.__updateJobProgress(jobID,status,minorStatus) if not result['OK']: return result toPurge.append(jobID) else: self.log.verbose('No %s jobs available to update' %state)
189a79eb1c6258be874a42176d7742a092feef64 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/189a79eb1c6258be874a42176d7742a092feef64/StagerMonitorWMS.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 26422, 9556, 7276, 12, 2890, 4672, 3536, 2503, 707, 4271, 364, 6550, 316, 326, 11958, 2706, 19, 2925, 1267, 471, 6292, 402, 87, 4533, 358, 326, 1719, 919, 1156, 471, 1719, 16309, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 26422, 9556, 7276, 12, 2890, 4672, 3536, 2503, 707, 4271, 364, 6550, 316, 326, 11958, 2706, 19, 2925, 1267, 471, 6292, 402, 87, 4533, 358, 326, 1719, 919, 1156, 471, 1719, 16309, 1...
shape = image.GetDimensions()
shape = image.GetDimension(0) * image.GetDimension(1), pf.GetSamplesPerPixel() if image.GetNumberOfDimensions() == 3: d = d[0] * image.GetDimension(2), d[1]
def gdcm_to_numpy(image): """Converts a GDCM image to a numpy array. """ pf = image.GetPixelFormat().GetScalarType() assert pf in get_gdcm_to_numpy_typemap().keys(), \ "Unsupported array type %s"%pf shape = image.GetDimensions() dtype = get_numpy_array_type(pf) gdcm_array = image.GetBuffer() result = numpy.frombuffer(gdcm_array, dtype=dtype) #result.shape = shape return result
ec68a0835326855803d85024517ea39834a04d74 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13995/ec68a0835326855803d85024517ea39834a04d74/ConvertNumpy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 314, 7201, 81, 67, 869, 67, 15974, 12, 2730, 4672, 3536, 5692, 279, 611, 5528, 49, 1316, 358, 279, 3972, 526, 18, 3536, 10811, 273, 1316, 18, 967, 9037, 1630, 7675, 967, 13639, 559, 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, 314, 7201, 81, 67, 869, 67, 15974, 12, 2730, 4672, 3536, 5692, 279, 611, 5528, 49, 1316, 358, 279, 3972, 526, 18, 3536, 10811, 273, 1316, 18, 967, 9037, 1630, 7675, 967, 13639, 559, 14...
self.mainFrame.Layout()
sizer.Layout()
def RenderMainView (self): mainViewRoot = Globals.mainViewRoot mainViewRoot.lastDynamicBlock = False assert len (Globals.views) == 0 mainViewRoot.render() """ We have to wire up the block mainViewRoot, it's widget and sizer to a new sizer that we add to the mainFrame. """ sizer = wx.BoxSizer (wx.HORIZONTAL) self.mainFrame.SetSizer (sizer) from osaf.framework.blocks.Block import wxRectangularChild sizer.Add (mainViewRoot.widget, mainViewRoot.stretchFactor, wxRectangularChild.CalculateWXFlag(mainViewRoot), wxRectangularChild.CalculateWXBorder(mainViewRoot)) self.mainFrame.Layout()
197c5ce021f29a2d8022abef1b77f305c3ca78c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/197c5ce021f29a2d8022abef1b77f305c3ca78c3/Application.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6987, 6376, 1767, 261, 2890, 4672, 2774, 1767, 2375, 273, 18901, 1031, 18, 5254, 1767, 2375, 2774, 1767, 2375, 18, 2722, 9791, 1768, 273, 1083, 1815, 562, 261, 19834, 18, 7061, 13, 422, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6987, 6376, 1767, 261, 2890, 4672, 2774, 1767, 2375, 273, 18901, 1031, 18, 5254, 1767, 2375, 2774, 1767, 2375, 18, 2722, 9791, 1768, 273, 1083, 1815, 562, 261, 19834, 18, 7061, 13, 422, ...
self.lastEvent = eg.EventGhostEvent()
self.lastEvent = None
def Setup(self, plugin, waitTime): """ This will be called inside the thread at the beginning. """ self.plugin = plugin self.waitTime = waitTime self.timer = Timer(0, self.OnTimeOut) self.lastEvent = eg.EventGhostEvent() wc = WNDCLASS() wc.hInstance = GetModuleHandle(None) wc.lpszClassName = "HiddenMceMessageReceiver" wc.lpfnWndProc = WNDPROC(self.MyWndProc) if not RegisterClass(byref(wc)): raise WinError() self.hwnd = CreateWindowEx( 0, wc.lpszClassName, "MCE Remote Message Receiver", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 0, 0, wc.hInstance, None ) if not self.hwnd: raise WinError() self.wc = wc self.hinst = wc.hInstance self.dll = WinDLL(os.path.join(PLUGIN_DIR, "MceIr.dll")) if not self.dll.MceIrRegisterEvents(self.hwnd): raise self.plugin.Exceptions.DeviceNotFound self.dll.MceIrSetRepeatTimes(1,1)
99135a1202cf49af9227b1169784fd9f9a7e175a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8076/99135a1202cf49af9227b1169784fd9f9a7e175a/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10939, 12, 2890, 16, 1909, 16, 30452, 4672, 3536, 1220, 903, 506, 2566, 4832, 326, 2650, 622, 326, 8435, 18, 3536, 365, 18, 4094, 273, 1909, 365, 18, 7048, 950, 273, 30452, 365, 18, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10939, 12, 2890, 16, 1909, 16, 30452, 4672, 3536, 1220, 903, 506, 2566, 4832, 326, 2650, 622, 326, 8435, 18, 3536, 365, 18, 4094, 273, 1909, 365, 18, 7048, 950, 273, 30452, 365, 18, 12...
SMTPRecipientsRefused The server rejected for ALL recipients
SMTPRecipientsRefused The server rejected ALL recipients
def sendmail(self, from_addr, to_addrs, msg, mail_options=[], rcpt_options=[]): """This command performs an entire mail transaction.
e01b9711d468595d7e3ccadaae7ba2cc3df096ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/e01b9711d468595d7e3ccadaae7ba2cc3df096ae/smtplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 4408, 12, 2890, 16, 628, 67, 4793, 16, 358, 67, 23305, 16, 1234, 16, 4791, 67, 2116, 22850, 6487, 4519, 337, 67, 2116, 33, 8526, 4672, 3536, 2503, 1296, 11199, 392, 7278, 4791, 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, 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, 1366, 4408, 12, 2890, 16, 628, 67, 4793, 16, 358, 67, 23305, 16, 1234, 16, 4791, 67, 2116, 22850, 6487, 4519, 337, 67, 2116, 33, 8526, 4672, 3536, 2503, 1296, 11199, 392, 7278, 4791, 2...
cmd += ' -cdrom-device %s -dvd-device %s' % \ (self.media.devicename, self.media.devicename)
if self.media: cmd += ' -cdrom-device %s -dvd-device %s' % \ (self.media.devicename, self.media.devicename)
def dvd_vcd_title_menu(self, arg=None, menuw=None): """ Generate special menu for DVD/VCD/SVCD content """ pop = None
c9987217b0a3654296c92fabcb5a2828b0fe7b1b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/c9987217b0a3654296c92fabcb5a2828b0fe7b1b/videoitem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12494, 72, 67, 4227, 72, 67, 2649, 67, 5414, 12, 2890, 16, 1501, 33, 7036, 16, 3824, 91, 33, 7036, 4672, 3536, 6654, 4582, 3824, 364, 463, 21544, 19, 58, 10160, 19, 23927, 10160, 913, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12494, 72, 67, 4227, 72, 67, 2649, 67, 5414, 12, 2890, 16, 1501, 33, 7036, 16, 3824, 91, 33, 7036, 4672, 3536, 6654, 4582, 3824, 364, 463, 21544, 19, 58, 10160, 19, 23927, 10160, 913, ...
connect_ring(first_r, first_ring, prev_r, prev_ring, rz_closure_marker) return points, facets, markers, holelists
connect_ring(len(rz_points)-1, 0, rz_closure_marker) return points, facets, holelists, markers
def connect_ring(r, z, ring, prev_r, prev_z, prev_ring, marker): if _is_same_float(z, prev_z): assert not _is_same_float(r, prev_r) # we're moving purely outward--this doesn't need fans, only plane # surfaces. Special casing this leads to more freedom for TetGen # and hence better meshes.
3ced297c55913885e4b6094b0c0e25c20e66ad10 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11985/3ced297c55913885e4b6094b0c0e25c20e66ad10/tet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 67, 8022, 12, 86, 16, 998, 16, 9221, 16, 2807, 67, 86, 16, 2807, 67, 94, 16, 2807, 67, 8022, 16, 5373, 4672, 309, 389, 291, 67, 14307, 67, 5659, 12, 94, 16, 2807, 67, 94, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 67, 8022, 12, 86, 16, 998, 16, 9221, 16, 2807, 67, 86, 16, 2807, 67, 94, 16, 2807, 67, 8022, 16, 5373, 4672, 309, 389, 291, 67, 14307, 67, 5659, 12, 94, 16, 2807, 67, 94, 4...
project_name, db_str, repository_dir, templates_dir = arg[0:3]
project_name, db_str, repository_dir, templates_dir = arg[:4]
def do_initenv(self, line): if self.env_check(): print "Initenv for '%s' failed.\nDoes an environment already exist?" % self.envname return arg = self.arg_tokenize(line) project_name = None db_str = None repository_dir = None templates_dir = None if len(arg) == 1: returnvals = self.get_initenv_args() project_name, db_str, repository_dir, templates_dir = returnvals elif len(arg)!= 3: print 'Wrong number of arguments to initenv %d' % len(arg) return else: project_name, db_str, repository_dir, templates_dir = arg[0:3]
c946c1f1ddb50dc28f0af65848e63a83fe66445c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/c946c1f1ddb50dc28f0af65848e63a83fe66445c/admin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 2738, 3074, 12, 2890, 16, 980, 4672, 309, 365, 18, 3074, 67, 1893, 13332, 1172, 315, 2570, 3074, 364, 1995, 87, 11, 2535, 8403, 82, 10154, 392, 3330, 1818, 1005, 7225, 738, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 2738, 3074, 12, 2890, 16, 980, 4672, 309, 365, 18, 3074, 67, 1893, 13332, 1172, 315, 2570, 3074, 364, 1995, 87, 11, 2535, 8403, 82, 10154, 392, 3330, 1818, 1005, 7225, 738, 36...
for x in ipath: cmd = cmd + " /I \"" + x + "\"";
for x in ipath: cmd = cmd + " /I \"" + x + "\""
def CompileC(obj=0,src=0,ipath=[],opts=[]): if ((obj==0)|(src==0)): sys.exit("syntax error in CompileC directive"); ipath = ["built/tmp"] + ipath + ["built/include"] fullsrc = CxxFindSource(src, ipath) if (fullsrc == 0): sys.exit("Cannot find source file "+src) dep = CxxCalcDependencies(fullsrc, ipath, []) if (COMPILER=="MSVC7"): wobj = "built/tmp/"+obj if (older(wobj, dep)): global VERBOSE if VERBOSE >= 0: checkIfNewDir(ipath[1]) cmd = 'cl.exe /Fo"' + wobj + '" /nologo /c'; cmd = cmd + " /I\"built/python/include\"" if (opts.count("DXSDK")): cmd = cmd + ' /I"' + DirectXSDK + '/include"' if (opts.count("MAYA5")): cmd = cmd + ' /I"' + Maya5SDK + 'include"' if (opts.count("MAYA6")): cmd = cmd + ' /I"' + Maya6SDK + 'include"' for max in ["MAX5","MAX6","MAX7"]: if (PkgSelected(opts,max)): cmd = cmd + ' /I"' + MAXSDK[max] + 'include" /I"' + MAXSDKCS[max] + '" /D' + max for pkg in PACKAGES: if (pkg != "MAYA5") and (pkg != "MAYA6") and PkgSelected(opts,pkg): cmd = cmd + ' /I"' + THIRDPARTY + pkg.lower() + "/include" + '"' for x in ipath: cmd = cmd + " /I \"" + x + "\""; if (opts.count('NOFLOATWARN')): cmd = cmd + ' /wd4244 /wd4305' if (opts.count("WITHINPANDA")): cmd = cmd + ' /DWITHIN_PANDA' if (OPTIMIZE==1): cmd = cmd + " /D_DEBUG /Zc:forScope /MDd /Zi /RTCs /GS " if (OPTIMIZE==2): cmd = cmd + " /D_DEBUG /Zc:forScope /MDd /Zi /RTCs /GS " if (OPTIMIZE==3): cmd = cmd + " /Zc:forScope /MD /O2 /Ob2 /G6 /Zi /DFORCE_INLINING " if (OPTIMIZE==4): cmd = cmd + " /Zc:forScope /MD /O2 /Ob2 /G6 /GL /Zi /DFORCE_INLINING /DNDEBUG " cmd = cmd + " /Fd\"" + wobj[:-4] + ".pdb\""; building = buildingwhat(opts) if (building): cmd = cmd + " /DBUILDING_"+building cmd = cmd + " /EHsc /Zm300 /DWIN32_VC /DWIN32 /W3 \"" + fullsrc + "\"" oscmd(cmd) updatefiledate(wobj) if (COMPILER=="LINUXA"): wobj = "built/tmp/" + obj[:-4] + ".o" if (older(wobj, dep)): global VERBOSE if VERBOSE >= 0: checkIfNewDir(ipath[1]) if (src[-2:]==".c"): cmd = "gcc -c -o "+wobj else: cmd = "g++ -ftemplate-depth-30 -c -o "+wobj cmd = cmd + ' -I"' + PythonSDK + '"' if (PkgSelected(opts,"VRPN")): cmd = cmd + ' -I"' + THIRDPARTY + 'vrpn/include"' if (PkgSelected(opts,"FFTW")): cmd = cmd + ' -I"' + THIRDPARTY + 'fftw/include"' if (PkgSelected(opts,"FMOD")): cmd = cmd + ' -I"' + THIRDPARTY + 'fmod/include"' if (PkgSelected(opts,"NVIDIACG")): cmd = cmd + ' -I"' + THIRDPARTY + 'nvidiacg/include"' if (PkgSelected(opts,"NSPR")): cmd = cmd + ' -I"' + THIRDPARTY + 'nspr/include"' if (PkgSelected(opts,"FREETYPE")): cmd = cmd + ' -I/usr/include/freetype2' for x in ipath: cmd = cmd + ' -I"' + x + '"' if (opts.count("WITHINPANDA")): cmd = cmd + ' -DWITHIN_PANDA' if (OPTIMIZE==1): cmd = cmd + " -g" if (OPTIMIZE==2): cmd = cmd + " -O1" if (OPTIMIZE==3): cmd = cmd + " -O2" if (OPTIMIZE==4): cmd = cmd + " -O2" building = buildingwhat(opts) if (building): cmd = cmd + " -DBUILDING_" + building cmd = cmd + " " + fullsrc oscmd(cmd) updatefiledate(wobj)
4a71a3ad56d88a79d9aba6c9d9fa1abc8c3a885e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/4a71a3ad56d88a79d9aba6c9d9fa1abc8c3a885e/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16143, 39, 12, 2603, 33, 20, 16, 4816, 33, 20, 16, 625, 421, 22850, 6487, 4952, 33, 8526, 4672, 309, 14015, 2603, 631, 20, 14047, 12, 4816, 631, 20, 3719, 30, 2589, 18, 8593, 2932, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16143, 39, 12, 2603, 33, 20, 16, 4816, 33, 20, 16, 625, 421, 22850, 6487, 4952, 33, 8526, 4672, 309, 14015, 2603, 631, 20, 14047, 12, 4816, 631, 20, 3719, 30, 2589, 18, 8593, 2932, 1...
if PROP_TYPE(headers_tag)==PT_STRING8: self.headers = headers has_headers = True else: has_headers = PROP_TYPE(headers_tag)==PT_ERROR and \ headers==mapi.MAPI_E_NOT_ENOUGH_MEMORY self.headers = None
has_headers = PROP_TYPE(headers_tag)==PT_STRING8
def __init__(self, msgstore, prop_row): self.msgstore = msgstore self.mapi_object = None
93381a32ba635ab0977515e7f962bc00151b09d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/93381a32ba635ab0977515e7f962bc00151b09d8/msgstore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1234, 2233, 16, 2270, 67, 492, 4672, 365, 18, 3576, 2233, 273, 1234, 2233, 365, 18, 1458, 77, 67, 1612, 273, 599, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1234, 2233, 16, 2270, 67, 492, 4672, 365, 18, 3576, 2233, 273, 1234, 2233, 365, 18, 1458, 77, 67, 1612, 273, 599, 2, -100, -100, -100, -100, -100, -100, ...
map.addMergeFacesCallbacks(self.preMergeFaces, self.confirm), map.addRemoveBridgeCallbacks(self.preRemoveBridge, self.confirm), map.addMergeEdgesCallbacks(self.preMergeEdges, self.confirm),
self._map().addMergeFacesCallbacks(self.preMergeFaces, self.confirm), self._map().addRemoveBridgeCallbacks(self.preRemoveBridge, self.confirm), self._map().addMergeEdgesCallbacks(self.preMergeEdges, self.confirm),
def __init__(self, map): self._attachedHooks = ( map.addMergeFacesCallbacks(self.preMergeFaces, self.confirm), map.addRemoveBridgeCallbacks(self.preRemoveBridge, self.confirm), map.addMergeEdgesCallbacks(self.preMergeEdges, self.confirm), )
242031941f5d1265da84d5257d9b193749300383 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10394/242031941f5d1265da84d5257d9b193749300383/maputils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 852, 4672, 365, 6315, 24157, 13620, 273, 261, 365, 6315, 1458, 7675, 1289, 6786, 17268, 10617, 12, 2890, 18, 1484, 6786, 17268, 16, 365, 18, 10927, 3631, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 852, 4672, 365, 6315, 24157, 13620, 273, 261, 365, 6315, 1458, 7675, 1289, 6786, 17268, 10617, 12, 2890, 18, 1484, 6786, 17268, 16, 365, 18, 10927, 3631, 3...
IX.is_unique as [unique],
IX.is_unique as [unique],
def get_indexes(self, cursor, table_name):
672a3bf79aaf9caebe9d1386b47cf42345466cd3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1254/672a3bf79aaf9caebe9d1386b47cf42345466cd3/introspection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 11265, 12, 2890, 16, 3347, 16, 1014, 67, 529, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 11265, 12, 2890, 16, 3347, 16, 1014, 67, 529, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.write_file(migration, data.replace('next-version', self.target_version))
self.write_file(migration, data.replace('next-version', self.next_version))
def run(self, options, base_dir): # setup directory configuration
7a1a0971f55a8a0f0026343d8f2a85aea4ac8ee1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/760/7a1a0971f55a8a0f0026343d8f2a85aea4ac8ee1/dvstool_oracle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 702, 16, 1026, 67, 1214, 4672, 468, 3875, 1867, 1664, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 702, 16, 1026, 67, 1214, 4672, 468, 3875, 1867, 1664, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
sys.exit(1)
sys.exit(0)
def main(options, args): directory = args[0] success = True for file in os.listdir(directory): path = os.path.abspath(os.path.join(directory, file)) if not IsPEFile(path): continue pe = pefile.PE(path, fast_load=True) # Check for /DYNAMICBASE. if pe.OPTIONAL_HEADER.DllCharacteristics & DYNAMICBASE_FLAG: if options.verbose: print "Checking %s for /DYNAMICBASE... PASS" % path else: success = False print "Checking %s for /DYNAMICBASE... FAIL" % path # Check for /NXCOMPAT. if pe.OPTIONAL_HEADER.DllCharacteristics & NXCOMPAT_FLAG: if options.verbose: print "Checking %s for /NXCOMPAT... PASS" % path else: success = False print "Checking %s for /NXCOMPAT... FAIL" % path if not success: sys.exit(1)
9c0b0aee86c9fd8b93a8e85141d60fbcc04b42d2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/9c0b0aee86c9fd8b93a8e85141d60fbcc04b42d2/checkbins.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2116, 16, 833, 4672, 1867, 273, 833, 63, 20, 65, 2216, 273, 1053, 225, 364, 585, 316, 1140, 18, 1098, 1214, 12, 5149, 4672, 589, 273, 1140, 18, 803, 18, 5113, 803, 12, 538,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2116, 16, 833, 4672, 1867, 273, 833, 63, 20, 65, 2216, 273, 1053, 225, 364, 585, 316, 1140, 18, 1098, 1214, 12, 5149, 4672, 589, 273, 1140, 18, 803, 18, 5113, 803, 12, 538,...
yield "<h2>No error log available</h2>"
yield "<h2>No error log available</h2>\n"
def view_build(myself, tree, host, compiler, rev, plain_logs=False): """view one build in detail""" # ensure the params are valid before using them assert host in hosts, "unknown host %s" % host assert compiler in compilers, "unknown compiler %s" % compiler assert tree in trees, "not a build tree %s" % tree uname = "" cflags = "" config = "" build = db.get_build(tree, host, compiler, rev) age_mtime = build.age_mtime() (revision, revision_time) = build.revision_details() status = build_status(myself, tree, host, compiler, rev) if rev: assert re.match("^[0-9a-fA-F]*$", rev) log = build.read_log() err = build.read_err() if log: log = cgi.escape(log) m = re.search("(.*)", log) if m: uname = m.group(1) m = re.search("CFLAGS=(.*)", log) if m: cflags = m.group(1) m = re.search("configure options: (.*)", log) if m: config = m.group(1) if err: err = cgi.escape(err) yield '<h2>Host information:</h2>' host_web_file = "../web/%s.html" % host if os.path.exists(host_web_file): yield util.FileLoad(host_web_file) yield "<table class='real'>" yield "<tr><td>Host:</td><td><a href='%s?function=View+Host;host=%s;tree=%s;"\ "compiler=%s#'>%s</a> - %s</td></tr>" % (myself, host, tree, compiler, host, hosts[host]) yield "<tr><td>Uname:</td><td>%s</td></tr>" % uname yield "<tr><td>Tree:</td><td>%s</td></tr>" % tree_link(myself, tree) yield "<tr><td>Build Revision:</td><td>%s</td></tr>" % revision_link(myself, revision, tree) yield "<tr><td>Build age:</td><td><div class='age'>%s</div></td></tr>" % red_age(age_mtime) yield "<tr><td>Status:</td><td>%s</td></tr>" % status yield "<tr><td>Compiler:</td><td>%s</td></tr>" % compiler yield "<tr><td>CFLAGS:</td><td>%s</td></tr>" % cflags yield "<tr><td>configure options:</td><td>%s</td></tr>" % config yield "".join(show_oldrevs(myself, tree, host, compiler)) # check the head of the output for our magic string rev_var = "" if rev: rev_var = ";revision=%s" % rev yield "<div id='log'>" if not plain_logs: yield "<p>Switch to the <a href='%s?function=View+Build;host=%s;tree=%s"\ ";compiler=%s%s;plain=true' title='Switch to bland, non-javascript,"\ " unstyled view'>Plain View</a></p>" % (myself, host, tree, compiler, rev_var) yield "<div id='actionList'>" # These can be pretty wide -- perhaps we need to # allow them to wrap in some way? if err == "": yield "<h2>No error log available</h2>" else: yield "<h2>Error log:</h2>" yield make_collapsible_html('action', "Error Output", "\n%s" % err, "stderr-0") if log == "": yield "<h2>No build log available</h2>" else: yield "<h2>Build log:</h2>" yield print_log_pretty(log) yield "<p><small>Some of the above icons derived from the <a href='http://www.gnome.org'>Gnome Project</a>'s stock icons.</small></p>" yield "</div>" else: yield "<p>Switch to the <a href='%s?function=View+Build;host=%s;tree=%s;"\ "compiler=%s%s' title='Switch to colourful, javascript-enabled, styled"\ " view'>Enhanced View</a></p>" % (myself, host, tree, compiler, rev_var) if err == "": yield "<h2>No error log available</h2>" else: yield '<h2>Error log:</h2>' yield '<div id="errorLog"><pre>%s</pre></div>' % err if log == "": yield '<h2>No build log available</h2>' else: yield '<h2>Build log:</h2>' yield '<div id="buildLog"><pre>%s</pre></div>' % log yield '</div>'
aded61733b040c3e2918f7cb5990b12cebe2244e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7314/aded61733b040c3e2918f7cb5990b12cebe2244e/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 67, 3510, 12, 4811, 2890, 16, 2151, 16, 1479, 16, 5274, 16, 5588, 16, 7351, 67, 10011, 33, 8381, 4672, 3536, 1945, 1245, 1361, 316, 7664, 8395, 468, 3387, 326, 859, 854, 923, 186...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 67, 3510, 12, 4811, 2890, 16, 2151, 16, 1479, 16, 5274, 16, 5588, 16, 7351, 67, 10011, 33, 8381, 4672, 3536, 1945, 1245, 1361, 316, 7664, 8395, 468, 3387, 326, 859, 854, 923, 186...
validate(xhtml)
def test_math(): raw=r'''
7d3d5cfa21ebe29a131b11ca02a8ced6e7d7b4d2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12391/7d3d5cfa21ebe29a131b11ca02a8ced6e7d7b4d2/test_xhtmlwriter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 15949, 13332, 1831, 33, 86, 26418, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 15949, 13332, 1831, 33, 86, 26418, 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...
transformation.invert() primitive.Transform(node, transformation)
primitive.Transform(node, transformation.inv)
def do(self): node = context.application.cache.node destination = context.application.cache.drag_destination if isinstance(node, GLTransformationMixin): transformation = destination.get_frame_relative_to(node.parent) transformation.invert() primitive.Transform(node, transformation) primitive.Move(node, destination, new_index=self.parameters.child_index)
e0fefa0af24d07ec5cbb5c9f27019f9b2f3fb7ba /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11052/e0fefa0af24d07ec5cbb5c9f27019f9b2f3fb7ba/drag.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 12, 2890, 4672, 756, 273, 819, 18, 3685, 18, 2493, 18, 2159, 2929, 273, 819, 18, 3685, 18, 2493, 18, 15997, 67, 10590, 309, 1549, 12, 2159, 16, 10252, 15292, 14439, 4672, 8620, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 12, 2890, 4672, 756, 273, 819, 18, 3685, 18, 2493, 18, 2159, 2929, 273, 819, 18, 3685, 18, 2493, 18, 15997, 67, 10590, 309, 1549, 12, 2159, 16, 10252, 15292, 14439, 4672, 8620, 27...
wikipedia.output("Skipping link %s to an ignored page"%page2)
wikipedia.output(u"Skipping link %s to an ignored page"%page2)
def workDone(self, counter): """This is called by a worker to tell us that the promised work was completed as far as possible. The only argument is an instance of a counter class, that has methods minus() and plus() to keep counts of the total work todo.""" # Loop over all the pages that should have been taken care of for pl in self.pending: # Mark the page as done self.done[pl] = pl.site()
f9828c7558db8adf4bff5df0144d8a01af3cdeee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/f9828c7558db8adf4bff5df0144d8a01af3cdeee/interwiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1440, 7387, 12, 2890, 16, 3895, 4672, 3536, 2503, 353, 2566, 635, 279, 4322, 358, 9276, 584, 716, 326, 3012, 5918, 1440, 1703, 5951, 487, 10247, 487, 3323, 18, 1021, 1338, 1237, 353, 392...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1440, 7387, 12, 2890, 16, 3895, 4672, 3536, 2503, 353, 2566, 635, 279, 4322, 358, 9276, 584, 716, 326, 3012, 5918, 1440, 1703, 5951, 487, 10247, 487, 3323, 18, 1021, 1338, 1237, 353, 392...
cancel.set_flags (CAN_DEFAULT)
cancel.set_flags (gtk.CAN_DEFAULT)
def __init__ (self, title, callback): gtk.Dialog.__init__ (self) self.set_transient_for (mainWindow) self.set_title (title) self.callback = callback ok = gtk.Button ("OK") ok.set_flags (CAN_DEFAULT) ok.connect ("clicked", self.okSignal) ok.show() self.action_area.pack_start (ok, TRUE, FALSE, 10) cancel = gtk.Button ("Cancel") cancel.set_flags (CAN_DEFAULT) cancel.connect ("clicked", self.cancelSignal) cancel.show() self.action_area.pack_start (cancel, TRUE, FALSE, 10) ok.grab_default() self.set_modal (TRUE)
44ba4a387d4167dedba8d083a763a0b3d1a1236b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4580/44ba4a387d4167dedba8d083a763a0b3d1a1236b/driconf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 2077, 16, 1348, 4672, 22718, 18, 6353, 16186, 2738, 972, 261, 2890, 13, 365, 18, 542, 67, 22670, 67, 1884, 261, 5254, 3829, 13, 365, 18, 542, 67, 2649, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 261, 2890, 16, 2077, 16, 1348, 4672, 22718, 18, 6353, 16186, 2738, 972, 261, 2890, 13, 365, 18, 542, 67, 22670, 67, 1884, 261, 5254, 3829, 13, 365, 18, 542, 67, 2649, ...
modules = [ModuleInfo(info) for info in find_files_named('info.txt', 'src')]
modules = dict([(mod.basename, mod) for mod in [ModuleInfo(info) for info in find_files_named('info.txt', 'src')]])
def find_files_named(desired_name, in_path): for (dirpath, dirnames, filenames) in os.walk(in_path): if desired_name in filenames: yield os.path.join(dirpath, desired_name)
83f29203e9914995d719535adb4acb85e59d53a7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9556/83f29203e9914995d719535adb4acb85e59d53a7/configure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 2354, 67, 13188, 12, 30458, 67, 529, 16, 316, 67, 803, 4672, 364, 261, 1214, 803, 16, 1577, 1973, 16, 9066, 13, 316, 1140, 18, 11348, 12, 267, 67, 803, 4672, 309, 6049, 67,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 2354, 67, 13188, 12, 30458, 67, 529, 16, 316, 67, 803, 4672, 364, 261, 1214, 803, 16, 1577, 1973, 16, 9066, 13, 316, 1140, 18, 11348, 12, 267, 67, 803, 4672, 309, 6049, 67,...
secDB = db.DB(self.env) secDB.set_flags(db.DB_DUP) secDB.open(self.filename, "secondary", db.DB_BTREE,
self.secDB = db.DB(self.env) self.secDB.set_flags(db.DB_DUP) self.secDB.open(self.filename, "secondary", db.DB_BTREE,
def test02_associateAfterDB(self): if verbose: print '\n', '-=' * 30 print "Running %s.test02_associateAfterDB..." % \ self.__class__.__name__
c9321ccdfc51bc5e6317151467eb008720a86fe7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c9321ccdfc51bc5e6317151467eb008720a86fe7/test_associate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 3103, 67, 11577, 4436, 2290, 12, 2890, 4672, 309, 3988, 30, 1172, 2337, 82, 2187, 2400, 2218, 380, 5196, 1172, 315, 7051, 738, 87, 18, 3813, 3103, 67, 11577, 4436, 2290, 7070, 738,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 3103, 67, 11577, 4436, 2290, 12, 2890, 4672, 309, 3988, 30, 1172, 2337, 82, 2187, 2400, 2218, 380, 5196, 1172, 315, 7051, 738, 87, 18, 3813, 3103, 67, 11577, 4436, 2290, 7070, 738,...
command = path_ffmpeg[0] + " -v 1 -i '%s' -r %s -target dvd -b 3000 -s %s -ab 192 -copyts " \
source = quoteFilename(source) command = path_ffmpeg[0] + " -v 1 -i %s -r %s -target dvd -b 3000 -s %s -ab 192 -copyts " \
def encodeVideoToMPEG2(source, destvideofile, video, audio1, audio2, aspectratio): """Encodes an unknown video source file eg. AVI to MPEG2 video and AC3 audio, use ffmpeg""" #MPEG-2 resolutions: 720x480, 720x576, 352x480, 352x576 if videomode=="ntsc": encoderesolution=dvdNTSCD1 else: encoderesolution=dvdPALD1 #192 is the kbit rate for the ac3 audio #3000 is the kbit rate for the MPEG2 video command = path_ffmpeg[0] + " -v 1 -i '%s' -r %s -target dvd -b 3000 -s %s -ab 192 -copyts " \ "-aspect %s %s" % (source, videomode, encoderesolution, aspectratio, destvideofile) #add second audio track if required if audio2[AUDIO_ID] != -1: command += " -newaudio" #make sure we get the correct stream(s) that we want command += " -map 0:%d -map 0:%d " % (video[VIDEO_INDEX], audio1[AUDIO_INDEX]) if audio2[AUDIO_ID] != -1: command += "-map 0:%d" % (audio2[AUDIO_INDEX]) write(command) result = runCommand(command) if result!=0: fatalError("Failed while running ffmpeg to re-encode video.\n" "Command was %s" % command)
fb525bce7d047ef02cae0f76cfdfc4906e765992 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13713/fb525bce7d047ef02cae0f76cfdfc4906e765992/mythburn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2017, 10083, 774, 49, 16533, 22, 12, 3168, 16, 1570, 9115, 768, 16, 6191, 16, 7447, 21, 16, 7447, 22, 16, 9648, 9847, 4672, 3536, 19771, 392, 5917, 6191, 1084, 585, 9130, 18, 432, 4136...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2017, 10083, 774, 49, 16533, 22, 12, 3168, 16, 1570, 9115, 768, 16, 6191, 16, 7447, 21, 16, 7447, 22, 16, 9648, 9847, 4672, 3536, 19771, 392, 5917, 6191, 1084, 585, 9130, 18, 432, 4136...