rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
def __init__(self, options, destination=None, destination_path=None): self.options = options """An option values object with "input_encoding" and "output_encoding"
def __init__(self, settings, destination=None, destination_path=None): self.settings = settings """A settings object with "input_encoding" and "output_encoding"
def __init__(self, options, destination=None, destination_path=None): self.options = options """An option values object with "input_encoding" and "output_encoding" attributes (typically a `docutils.optik.Values` object)."""
d3c78ba33589c75aed84d6467f6efbe2a351ccc0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/d3c78ba33589c75aed84d6467f6efbe2a351ccc0/io.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1947, 16, 2929, 33, 7036, 16, 2929, 67, 803, 33, 7036, 4672, 365, 18, 4272, 273, 1947, 3536, 37, 1947, 733, 598, 315, 2630, 67, 5999, 6, 471, 315, 2844...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1947, 16, 2929, 33, 7036, 16, 2929, 67, 803, 33, 7036, 4672, 365, 18, 4272, 273, 1947, 3536, 37, 1947, 733, 598, 315, 2630, 67, 5999, 6, 471, 315, 2844...
lfns = l.getElementsByTagName('lfn')
lfns = l.getElementsByTagName('lfn')
def __init__(self,dom=None): self.guid = '' self.pfns = [] self.lfns = [] if dom: self.guid = dom.getAttribute('ID') physs = dom.getElementsByTagName('physical') for p in physs: pfns = p.getElementsByTagName('pfn') meta = p.getElementsByTagName('metadata') for pfn in pfns: ftype = pfn.getAttribute('filetype') name = pfn.getAttribute('name') # Get the SE name if any se = "Uknown" for metadata in meta: mname = metadata.getAttribute('att_name') if mname == name: se = metadata.getAttribute('att_value') self.pfns.append((name,ftype,se)) logics = dom.getElementsByTagName('logical') for l in logics: # do not know yet the Pool lfn xml schema lfns = l.getElementsByTagName('lfn') for lfn in lfns: name = lfn.getAttribute('name') self.lfns.append(name)
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, 1001, 2738, 972, 12, 2890, 16, 9859, 33, 7036, 4672, 225, 365, 18, 14066, 273, 875, 365, 18, 14241, 2387, 273, 5378, 365, 18, 20850, 2387, 273, 5378, 225, 309, 4092, 30, 365, 18, 14066...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9859, 33, 7036, 4672, 225, 365, 18, 14066, 273, 875, 365, 18, 14241, 2387, 273, 5378, 365, 18, 20850, 2387, 273, 5378, 225, 309, 4092, 30, 365, 18, 14066...
contents=open(os.path.normpath(myroot+"var/db/pkg/"+category+"/"+pkgname+"/CONTENTS"))
contents=open(os.path.normpath(root+"var/db/pkg/"+category+"/"+pkgname+"/CONTENTS"))
def unmerge(myroot,category,pkgname): if myroot=="": myroot="/" if os.path.isdir(os.path.normpath(myroot+"var/db/pkg/"+category+"/"+pkgname)): if myroot=="/": print "Unmerging",pkgname+"..." else: print "Unmerging",pkgname,"from",myroot+"..." print else: print pkgname,"not installed" return try: contents=open(os.path.normpath(myroot+"var/db/pkg/"+category+"/"+pkgname+"/CONTENTS")) except: print "Error -- could not open CONTENTS file for", pkgname+". Aborting." return pkgfiles={} for line in contents.readlines(): mydat=string.split(line) # we do this so we can remove from non-root filesystems # (use the ROOT var to allow maintenance on other partitions) mydat[1]=os.path.normpath(myroot+mydat[1][1:]) if mydat[0]=="obj": #format: type, mtime, md5sum pkgfiles[mydat[1]]=[mydat[0], mydat[3], mydat[2]] elif mydat[0]=="dir": #format: type pkgfiles[mydat[1]]=[mydat[0] ] elif mydat[0]=="sym": #format: type, mtime, dest pkgfiles[mydat[1]]=[mydat[0], mydat[4], mydat[3]] elif mydat[0]=="dev": #format: type pkgfiles[mydat[1]]=[mydat[0] ] elif mydat[0]=="fif": #format: type pkgfiles[mydat[1]]=[mydat[0]] else: print "Error -- CONTENTS file for", pkgname, "is corrupt." print ">>> "+line return # we don't want to automatically remove the ebuild file listed # in the CONTENTS file. We'll do after everything else has # completed successfully. myebuildfile=os.path.normpath(myroot+"var/db/pkg/"+category+"/"+pkgname+"/"+pkgname+".ebuild") if pkgfiles.has_key(myebuildfile): del pkgfiles[myebuildfile] mykeys=pkgfiles.keys() mykeys.sort() mykeys.reverse() #prerm script pkgscript("prerm",myebuildfile) for obj in mykeys: obj=os.path.normpath(obj) if not os.path.islink(obj): #we skip this if we're dealing with a symlink #because os.path.exists() will operate on the #link target rather than the link itself. if not os.path.exists(obj): print "--- !found", pkgfiles[obj][0], obj continue if (pkgfiles[obj][0] not in ("dir","fif","dev")) and (getmtime(obj) != pkgfiles[obj][1]): print "--- !mtime", pkgfiles[obj][0], obj continue if pkgfiles[obj][0]=="dir": if not os.path.isdir(obj): print "--- !dir ","dir", obj continue if os.listdir(obj): print "--- !empty","dir", obj continue os.rmdir(obj) print "<<< ","dir",obj elif pkgfiles[obj][0]=="sym": if not os.path.islink(obj): print "--- !sym ","sym", obj continue mydest=os.readlink(obj) if os.path.exists(os.path.normpath(myroot+mydest)): if mydest != pkgfiles[obj][2]: print "--- !destn","sym", obj continue os.unlink(obj) print "<<< ","sym",obj elif pkgfiles[obj][0]=="obj": if not os.path.isfile(obj): print "--- !obj ","obj", obj continue mymd5=md5(obj) if mymd5 != string.upper(pkgfiles[obj][2]): print "--- !md5 ","obj", obj continue os.unlink(obj) print "<<< ","obj",obj elif pkgfiles[obj][0]=="fif": if not isfifo(obj): print "--- !fif ","fif", obj continue os.unlink(obj) print "<<< ","fif",obj elif pkgfiles[obj][0]=="dev": if not isdev(obj): print "--- !dev ","dev", obj continue os.unlink(obj) print "<<< ","dev",obj #postrm script pkgscript("postrm",myebuildfile) #recursive cleanup for thing in os.listdir(myroot+"var/db/pkg/"+category+"/"+pkgname): os.unlink(myroot+"var/db/pkg/"+category+"/"+pkgname+"/"+thing) os.rmdir(myroot+"var/db/pkg/"+category+"/"+pkgname) print if myroot=="/": print pkgname,"unmerged." else: print pkgname,"unmerged from",myroot+"."
01f4a9c4d0b331efdfed1bd9585e56e10c758791 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9957/01f4a9c4d0b331efdfed1bd9585e56e10c758791/portage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 2702, 12, 4811, 3085, 16, 4743, 16, 10657, 529, 4672, 309, 3399, 3085, 631, 3660, 30, 3399, 3085, 1546, 4898, 309, 1140, 18, 803, 18, 291, 1214, 12, 538, 18, 803, 18, 7959, 803, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 2702, 12, 4811, 3085, 16, 4743, 16, 10657, 529, 4672, 309, 3399, 3085, 631, 3660, 30, 3399, 3085, 1546, 4898, 309, 1140, 18, 803, 18, 291, 1214, 12, 538, 18, 803, 18, 7959, 803, ...
key1 = (xhtml_uri, 'http-equiv') key2 = (xhtml_uri, 'content')
key1 = (None, 'http-equiv') key2 = (None, 'content')
def set_content_type(stream, content_type): key1 = (xhtml_uri, 'http-equiv') key2 = (xhtml_uri, 'content') for event in stream: type, value, line = event if type == START_ELEMENT: ns_uri, name, attributes = value if ns_uri == xhtml_uri: # Skip <meta http-equiv="Content-Type"> if name == 'meta': if key1 in attributes: if attributes[key1] == 'Content-Type': continue elif name == 'head': yield event # Add <meta http-equiv="Content-Type"> attributes = {} attributes[key1] = 'Content-Type' attributes[key2] = content_type yield START_ELEMENT, (xhtml_uri, 'meta', attributes), line yield END_ELEMENT, (xhtml_uri, 'meta'), line continue elif type == END_ELEMENT: ns_uri, name = value if ns_uri == xhtml_uri: # Skip <meta http-equiv="Content-Type"> if name == 'meta': # XXX This will fail if there is another element # within the "<meta>" element (something that should # not happen). if key1 in attributes: if attributes[key1] == 'Content-Type': continue yield event
cabf92a72f663f2fa29f5b4613c7483bc353f784 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12681/cabf92a72f663f2fa29f5b4613c7483bc353f784/xhtml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 1745, 67, 723, 12, 3256, 16, 913, 67, 723, 4672, 498, 21, 273, 261, 7036, 16, 296, 2505, 17, 14298, 427, 6134, 498, 22, 273, 261, 7036, 16, 296, 1745, 6134, 364, 871, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 1745, 67, 723, 12, 3256, 16, 913, 67, 723, 4672, 498, 21, 273, 261, 7036, 16, 296, 2505, 17, 14298, 427, 6134, 498, 22, 273, 261, 7036, 16, 296, 1745, 6134, 364, 871, 316, ...
gLogger.warn("[%s] __getMigratedFiles: Failed to obtain physical file metadata." % se,"%s %s" % (pfn,error))
gLogger.warn( "[%s] __getMigratedFiles: Failed to obtain physical file metadata." % se, "%s %s" % ( pfn, error ) )
def __getMigratedFiles(self,se,pfns): # Get the active files from the database migrated = {} terminal = {} res = self.ReplicaManager.getStorageFileMetadata(pfns,se) if not res['OK']: return res for pfn,error in res['Value']['Failed'].items(): if re.search("File does not exist",error): gLogger.error("[%s] __getStorageMetadata: PFN does not exist at StorageElement." % se,"%s %s" % (pfn,error)) terminal[pfn] = 'PFNMissing' else: gLogger.warn("[%s] __getMigratedFiles: Failed to obtain physical file metadata." % se,"%s %s" % (pfn,error)) storageMetadata = res['Value']['Successful'] for pfn,metadata in storageMetadata.items(): if metadata['Migrated']: checksum = '' if metadata.has_key('Checksum'): checksum = metadata['Checksum'] migrated[pfn] = checksum elif metadata['Lost']: gLogger.error("[%s] __getMigratedFiles: PFN has been Lost by the StorageElement." % se,"%s" % (pfn)) terminal[pfn] = 'PFNLost' elif metadata['Unavailable']: gLogger.error("[%s] __getMigratedFiles: PFN declared Unavailable by StorageElement." % se,"%s" % (pfn)) terminal[pfn] = 'PFNUnavailable' resDict = {'Terminal':terminal,'Migrated':migrated} return S_OK(resDict)
d0365a9152f6e7105162edd475d5401448bfdaed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/d0365a9152f6e7105162edd475d5401448bfdaed/MigrationMonitoringAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 25483, 690, 2697, 12, 2890, 16, 307, 16, 14241, 2387, 4672, 468, 968, 326, 2695, 1390, 628, 326, 2063, 24741, 273, 2618, 8651, 273, 2618, 400, 273, 365, 18, 14222, 1318, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 25483, 690, 2697, 12, 2890, 16, 307, 16, 14241, 2387, 4672, 468, 968, 326, 2695, 1390, 628, 326, 2063, 24741, 273, 2618, 8651, 273, 2618, 400, 273, 365, 18, 14222, 1318, 18, ...
self.finishSelectionChanges ()
def onSelectionChangedEvent (self, notification): """ We have an event boundary inside us, which keeps all the events sent between blocks of the Detail View to ourselves. When we get a SelectionChanged event, we jump across the event boundary and call synchronizeItemDetail on each block to give it a chance to synchronize on the details of the Item. Notify container blocks before their children. """ self.finishSelectionChanges () # finish changes to previous selected item super(DetailRoot, self).onSelectionChangedEvent(notification) item= self.selectedItem() assert item is notification.data['item'], "can't track selection in DetailRoot.onSelectionChangedEvent" self.synchronizeWidget() if __debug__: dumpSelectionChanged = False if dumpSelectionChanged: self.dumpShownHierarchy ('onSelectionChangedEvent')
bc19b0d33ddcda2330a97058cf61cec88d49550e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/bc19b0d33ddcda2330a97058cf61cec88d49550e/Detail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 6233, 27553, 261, 2890, 16, 3851, 4672, 3536, 1660, 1240, 392, 871, 7679, 4832, 584, 16, 1492, 20948, 777, 326, 2641, 3271, 3086, 4398, 434, 326, 27931, 4441, 358, 19801, 18, 5203, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6233, 27553, 261, 2890, 16, 3851, 4672, 3536, 1660, 1240, 392, 871, 7679, 4832, 584, 16, 1492, 20948, 777, 326, 2641, 3271, 3086, 4398, 434, 326, 27931, 4441, 358, 19801, 18, 5203, ...
def fl_set_object_shortcutkey(obj, keysym): """ fl_set_object_shortcutkey(obj, keysym) """ _fl_set_object_shortcutkey(obj, keysym)
def fl_set_object_shortcutkey(pObject, keysym): """ fl_set_object_shortcutkey(pObject, keysym) """ _fl_set_object_shortcutkey(pObject, keysym)
def fl_set_object_shortcutkey(obj, keysym): """ fl_set_object_shortcutkey(obj, keysym) """ _fl_set_object_shortcutkey(obj, keysym)
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, 542, 67, 1612, 67, 24744, 856, 12, 84, 921, 16, 1311, 2942, 4672, 3536, 1183, 67, 542, 67, 1612, 67, 24744, 856, 12, 84, 921, 16, 1311, 2942, 13, 3536, 225, 389, 2242, 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, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 1612, 67, 24744, 856, 12, 84, 921, 16, 1311, 2942, 4672, 3536, 1183, 67, 542, 67, 1612, 67, 24744, 856, 12, 84, 921, 16, 1311, 2942, 13, 3536, 225, 389, 2242, 67, ...
for k, v in req.headers.items():
for k, v in req.headers.iteritems():
def do_open(self, http_class, req): host = req.get_host() if not host: raise URLError('no host given')
86503b131b2253c73f8e2f1fceb29c9cf761dc27 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/86503b131b2253c73f8e2f1fceb29c9cf761dc27/urllib2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 3190, 12, 2890, 16, 1062, 67, 1106, 16, 1111, 4672, 1479, 273, 1111, 18, 588, 67, 2564, 1435, 309, 486, 1479, 30, 1002, 1976, 668, 2668, 2135, 1479, 864, 6134, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 3190, 12, 2890, 16, 1062, 67, 1106, 16, 1111, 4672, 1479, 273, 1111, 18, 588, 67, 2564, 1435, 309, 486, 1479, 30, 1002, 1976, 668, 2668, 2135, 1479, 864, 6134, 2, -100, -100, ...
apply(self._push,(),A)
apply(self._push,(),A)
def start_font(self,attr): A = {} for i, j in self._fontAttrMap.items(): if attr.has_key(i): func = j[1] val = attr[i] try: A[j[0]] = (func is None) and val or apply(func,(val,)) except: self.syntax_error('%s: invalid value %s'%(i,val)) apply(self._push,(),A)
fbc3e56923bd589dae9668ac4344e2a48fc430a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/fbc3e56923bd589dae9668ac4344e2a48fc430a4/paraparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 5776, 12, 2890, 16, 1747, 4672, 432, 273, 2618, 364, 277, 16, 525, 316, 365, 6315, 5776, 3843, 863, 18, 3319, 13332, 309, 1604, 18, 5332, 67, 856, 12, 77, 4672, 1326, 273, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 5776, 12, 2890, 16, 1747, 4672, 432, 273, 2618, 364, 277, 16, 525, 316, 365, 6315, 5776, 3843, 863, 18, 3319, 13332, 309, 1604, 18, 5332, 67, 856, 12, 77, 4672, 1326, 273, 5...
def fixwhite_line(line):
def fixwhite_line(line, tabsize):
def fixwhite_line(line): if lead.search(line): newline = '' for i,c in enumerate(line): if c == ' ': newline += ' ' elif c == '\t': newline += ' ' * (tabsize - len(newline) % tabsize) else: newline += line[i:] break line = newline return line.rstrip() + '\n'
0aedd700c5d9f96df2fc20ef1b036c79587e5278 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7385/0aedd700c5d9f96df2fc20ef1b036c79587e5278/style.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 14739, 67, 1369, 12, 1369, 16, 3246, 1467, 4672, 309, 5871, 18, 3072, 12, 1369, 4672, 9472, 273, 875, 364, 277, 16, 71, 316, 4241, 12, 1369, 4672, 309, 276, 422, 296, 4290, 9472,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14739, 67, 1369, 12, 1369, 16, 3246, 1467, 4672, 309, 5871, 18, 3072, 12, 1369, 4672, 9472, 273, 875, 364, 277, 16, 71, 316, 4241, 12, 1369, 4672, 309, 276, 422, 296, 4290, 9472,...
3
3
def chromatic_number(G): r""" Returns the minimal number of colors needed to color the vertices of the graph `G`. EXAMPLES:: sage: from sage.graphs.graph_coloring import chromatic_number sage: G = Graph({0:[1,2,3],1:[2]}) sage: chromatic_number(G) 3 sage: G = graphs.PetersenGraph() sage: G.chromatic_number() 3 """ o = G.order() if o == 0: return 0 if len(G.edges()) == 0: return 1 elif G.is_bipartite(): #can we do it in linear time? return 2 else: #counting cliques is faster than our brute-force method... m = G.clique_number() if m >= o-1: #marginal improvement... if there's an o-1 clique and not an o clique, don't waste our time coloring. return m for n in range(m,o+1): for C in all_graph_colorings(G,n): return n
a468d77074137cba0ddfb241121c56cde855518e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/a468d77074137cba0ddfb241121c56cde855518e/graph_coloring.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8123, 2126, 67, 2696, 12, 43, 4672, 436, 8395, 2860, 326, 16745, 1300, 434, 5740, 3577, 358, 2036, 326, 6928, 434, 326, 2667, 1375, 43, 8338, 225, 5675, 8900, 11386, 2866, 225, 272, 410,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8123, 2126, 67, 2696, 12, 43, 4672, 436, 8395, 2860, 326, 16745, 1300, 434, 5740, 3577, 358, 2036, 326, 6928, 434, 326, 2667, 1375, 43, 8338, 225, 5675, 8900, 11386, 2866, 225, 272, 410,...
[res['base_pricelist_id']], prod_id,
[res['base_pricelist_id']], product_id,
def _create_parent_category_list(id, lst): if not id: return [] parent = product_category_tree.get(id) if parent: lst.append(parent) return _create_parent_category_list(parent, lst) else: return lst
58d8d88e28c480347effe9b5bb6565b78fe34542 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/58d8d88e28c480347effe9b5bb6565b78fe34542/pricelist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 2938, 67, 4743, 67, 1098, 12, 350, 16, 9441, 4672, 309, 486, 612, 30, 327, 5378, 982, 273, 3017, 67, 4743, 67, 3413, 18, 588, 12, 350, 13, 309, 982, 30, 9441, 18, 69...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 2938, 67, 4743, 67, 1098, 12, 350, 16, 9441, 4672, 309, 486, 612, 30, 327, 5378, 982, 273, 3017, 67, 4743, 67, 3413, 18, 588, 12, 350, 13, 309, 982, 30, 9441, 18, 69...
This code isn't perfect. For example, "_ABC...Zabc...z" should convert to "\w".
This code isn't perfect.
def _minimize_any_range(s): """s -> a string useable inside [] which matches all the characters in s For example, passing in "0123456789" returns "\d". This code isn't perfect. For example, "_ABC...Zabc...z" should convert to "\w". """ if not s: return s # Treat the '-' special since it must occur last. # However, this means '!"#....xyz' gets turned into '!-,.-z-' has_hyphen = 0 if '-' in s: has_hyphen = 1 s = string.replace(s, "-", "") # Get the ordered list of characters in the string chars = list(s) chars.sort() unique = [] prev_c = None for c in chars: if c != prev_c: unique.append(c) prev_c = c s = string.join(unique, "") t = "" prev = None prev_pos = 0 pos = 0 # Join successive characters which are in ASCII order # Eg, "abcdef" gets turned into "a-f" for c in unique: val = ord(c) if val - 1 != prev: # either beginning of string or non-sequential if prev is None: # beginning of string prev_pos = 0 else: # non-sequential # Create the string for the previous range. if prev_pos == pos - 1: # If there was one character in the range, use it t = t + _minimize_escape_char(s[prev_pos]) else: # Two or more characters in a row define a range t = t + _minimize_escape_range(s[prev_pos], s[pos-1]) prev_pos = pos else: # Still part of the same sequence, so just advance in the string pass prev = val pos = pos + 1 # Handle the final sequence block if s: if prev_pos == pos - 1: t = t + _minimize_escape_char(s[prev_pos]) else: t = t + _minimize_escape_range(s[prev_pos], s[pos-1]) else: # Get this case if there was no text except for the hyphen character pass # Put the hyphen back on the end if has_hyphen: t = t + '-' return t
5c06183e7ba92bd9329789761634ed1a50082ed1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/5c06183e7ba92bd9329789761634ed1a50082ed1/Expression.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1154, 10153, 67, 2273, 67, 3676, 12, 87, 4672, 3536, 87, 317, 279, 533, 999, 429, 4832, 5378, 1492, 1885, 777, 326, 3949, 316, 272, 225, 2457, 3454, 16, 9588, 316, 315, 26684, 6, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1154, 10153, 67, 2273, 67, 3676, 12, 87, 4672, 3536, 87, 317, 279, 533, 999, 429, 4832, 5378, 1492, 1885, 777, 326, 3949, 316, 272, 225, 2457, 3454, 16, 9588, 316, 315, 26684, 6, ...
self._imageReslice.SetResliceTransform(self._matrixToLT)
self._imageReslice.SetResliceTransform( inputStream.GetInverse())
def setInput(self, idx, inputStream): if idx == 0: self._imageReslice.SetInput(inputStream) else: try: self._matrixToLT.SetInput(inputStream.GetMatrix()) except AttributeError: # this means the inputStream has no GetMatrix() # i.e. it could be None or just the wrong type # if it's none, we just have to disconnect if inputStream == None: self._matrixToLT.SetInput(None) self._imageReslice.SetResliceTransform(None)
74132fc723b7d2a156698d657fc28c440eee0f11 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4494/74132fc723b7d2a156698d657fc28c440eee0f11/transformVolumeData.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21687, 12, 2890, 16, 2067, 16, 10010, 4672, 309, 2067, 422, 374, 30, 365, 6315, 2730, 607, 2008, 18, 28299, 12, 2630, 1228, 13, 469, 30, 775, 30, 365, 6315, 5667, 774, 12050, 18, 28299...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21687, 12, 2890, 16, 2067, 16, 10010, 4672, 309, 2067, 422, 374, 30, 365, 6315, 2730, 607, 2008, 18, 28299, 12, 2630, 1228, 13, 469, 30, 775, 30, 365, 6315, 5667, 774, 12050, 18, 28299...
""" Add a new docmument.
"""Add a new docmument.
def index_document(self, document): """ Add a new docmument. """ # Check the input if isinstance(document, CatalogAware): document = document.get_catalog_indexes() elif not isinstance(document, dict): raise ValueError, ('the document must be either a dictionary or' ' a CatalogAware object')
78d81817463acbe5a10737c561d712ddd9736c09 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/78d81817463acbe5a10737c561d712ddd9736c09/catalog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 770, 67, 5457, 12, 2890, 16, 1668, 4672, 3536, 986, 279, 394, 997, 81, 650, 18, 3536, 468, 2073, 326, 810, 309, 1549, 12, 5457, 16, 14953, 10155, 4672, 1668, 273, 1668, 18, 588, 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, 770, 67, 5457, 12, 2890, 16, 1668, 4672, 3536, 986, 279, 394, 997, 81, 650, 18, 3536, 468, 2073, 326, 810, 309, 1549, 12, 5457, 16, 14953, 10155, 4672, 1668, 273, 1668, 18, 588, 67, ...
else:
else:
def purge(base_dirs, gigs, ignore, dry_run=False): """Delete directories under `base_dirs` until `gigs` GB are free Will not delete directories listed in the ignore list.""" gigs *= 1024 * 1024 * 1024 if freespace(base_dirs[0]) >= gigs: return dirs = [] for base_dir in base_dirs: if os.path.exists(base_dir): for d in os.listdir(base_dir): if os.path.isdir(os.path.join(base_dir, d)) and \ d not in ignore: dirs.append(os.path.join(base_dir, d)) dirs.sort(mtime_sort) while dirs and freespace(base_dirs[0]) < gigs: d = dirs.pop(0) print "Deleting", d if not dry_run: try: clobber_path=d+clobber_suffix if os.path.exists(clobber_path): rmdirRecursive(clobber_path) # Prevent repeated moving. if d.endswith(clobber_suffix): rmdirRecursive(d) else: shutil.move(d, clobber_path) rmdirRecursive(clobber_path) except: print >>sys.stderr, "Couldn't purge %s properly. Skipping." % d
3b0b21e1ed368c4d9e46e35798e4becfbc7f3211 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6206/3b0b21e1ed368c4d9e46e35798e4becfbc7f3211/purge_builds.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11668, 12, 1969, 67, 8291, 16, 314, 360, 87, 16, 2305, 16, 10299, 67, 2681, 33, 8381, 4672, 3536, 2613, 6402, 3613, 1375, 1969, 67, 8291, 68, 3180, 1375, 75, 360, 87, 68, 25069, 854, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11668, 12, 1969, 67, 8291, 16, 314, 360, 87, 16, 2305, 16, 10299, 67, 2681, 33, 8381, 4672, 3536, 2613, 6402, 3613, 1375, 1969, 67, 8291, 68, 3180, 1375, 75, 360, 87, 68, 25069, 854, ...
print " Unit tests Succeeded :-) so i do git pull at romanee"
print " Unit tests Succeeded :-)"
def run( self, directory ): self.html.write('\n\n<table border=1>\n\t<caption> Results </caption>\n\t<tr>\n\t\t<th> Source File Test </th> <th> Compilation </th> <th> Test </th> <th> Result </th> <th> Log File </th> <th> Log Cerr File </th>\n\t</tr>\n' ) self.find_and_exec( directory ) self.html.write('</table>\n<br>\n<br> Global Result '+ create_html_image( self.icon[ self.res ], str(self.res ))+'\n<br>' )
018e8bc2431885bb2bd8828c391cf5f0f7fb7018 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8320/018e8bc2431885bb2bd8828c391cf5f0f7fb7018/run_unit_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 365, 16, 1867, 262, 30, 365, 18, 2620, 18, 2626, 2668, 64, 82, 64, 82, 32, 2121, 5795, 33, 21, 5333, 82, 64, 88, 32, 15386, 34, 10351, 7765, 15386, 5333, 82, 64, 88, 32, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 365, 16, 1867, 262, 30, 365, 18, 2620, 18, 2626, 2668, 64, 82, 64, 82, 32, 2121, 5795, 33, 21, 5333, 82, 64, 88, 32, 15386, 34, 10351, 7765, 15386, 5333, 82, 64, 88, 32, ...
needs_add = True
else: item_to_modify = CartItem(cart=self, product=chosen_item, quantity=0) for similarItem in self.cartitem_set.filter(product__id = chosen_item.id): looksTheSame = len(details) == similarItem.details.count() if looksTheSame: for detail in details: try: similarItem.details.get( name=detail['name'], value=detail['value'], price_change=detail['price_change'] ) except CartItemDetails.DoesNotExist: looksTheSame = False if looksTheSame: item_to_modify = similarItem alreadyInCart = True break
def add_item(self, chosen_item, number_added, details={}): needs_add = False try: item_to_modify = self.cartitem_set.filter(product__id = chosen_item.id)[0] # Custom Products will not be added, they will each get their own line item #TODO: More sophisticated checks to make sure the options really are different if 'CustomProduct' in item_to_modify.product.get_subtypes(): item_to_modify = CartItem(cart=self, product=chosen_item, quantity=0) needs_add = True except IndexError: #It doesn't exist so create a new one item_to_modify = CartItem(cart=self, product=chosen_item, quantity=0) needs_add = True config=Config.objects.get_current()
9bd62fbbd8b6dddb3550bd7c908245de0e7753ad /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13656/9bd62fbbd8b6dddb3550bd7c908245de0e7753ad/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 1726, 12, 2890, 16, 10447, 67, 1726, 16, 1300, 67, 9665, 16, 3189, 12938, 4672, 4260, 67, 1289, 273, 1083, 225, 775, 30, 761, 67, 869, 67, 17042, 273, 225, 365, 18, 11848, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 1726, 12, 2890, 16, 10447, 67, 1726, 16, 1300, 67, 9665, 16, 3189, 12938, 4672, 4260, 67, 1289, 273, 1083, 225, 775, 30, 761, 67, 869, 67, 17042, 273, 225, 365, 18, 11848, 1...
item.tag.name = val self.refresh()
item.tag.name = val self.refresh()
def setData(self, index, value, role=Qt.EditRole): if not index.isValid(): return NONE # set up to position at the category label path = self.path_for_index(self.parent(index)) val = unicode(value.toString()) if not val: error_dialog(self.tags_view, _('Item is blank'), _('An item cannot be set to nothing. Delete it instead.')).exec_() return False item = index.internalPointer() key = item.parent.category_key # make certain we know about the item's category if key not in self.db.field_metadata: return if key == 'search': if val in saved_searches().names(): error_dialog(self.tags_view, _('Duplicate search name'), _('The saved search name %s is already used.')%val).exec_() return False saved_searches().rename(unicode(item.data(role).toString()), val) self.tags_view.search_item_renamed.emit() else: if key == 'series': self.db.rename_series(item.tag.id, val) elif key == 'publisher': self.db.rename_publisher(item.tag.id, val) elif key == 'tags': self.db.rename_tag(item.tag.id, val) elif key == 'authors': self.db.rename_author(item.tag.id, val) elif self.db.field_metadata[key]['is_custom']: self.db.rename_custom_item(item.tag.id, val, label=self.db.field_metadata[key]['label']) self.tags_view.tag_item_renamed.emit() item.tag.name = val self.refresh() # Should work, because no categories can have disappeared if path: idx = self.index_for_path(path) if idx.isValid(): self.tags_view.setCurrentIndex(idx) self.tags_view.scrollTo(idx, QTreeView.PositionAtCenter) return True
f1be85806e73839fd9fbef1b6bd1af8619918fa1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/f1be85806e73839fd9fbef1b6bd1af8619918fa1/tag_view.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7929, 12, 2890, 16, 770, 16, 460, 16, 2478, 33, 23310, 18, 4666, 2996, 4672, 309, 486, 770, 18, 26810, 13332, 327, 11829, 468, 444, 731, 358, 1754, 622, 326, 3150, 1433, 589, 273, 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, 7929, 12, 2890, 16, 770, 16, 460, 16, 2478, 33, 23310, 18, 4666, 2996, 4672, 309, 486, 770, 18, 26810, 13332, 327, 11829, 468, 444, 731, 358, 1754, 622, 326, 3150, 1433, 589, 273, 365,...
if type(self.cl) == orange.BayesClassifier:
if isinstance(self.cl, orange.BayesClassifier):
def setNone(): self.footer.setCanvas(None) self.header.setCanvas(None) self.graph.setCanvas(None)
56ab201dc64572e7703d211ea0ca65a659dfb394 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/56ab201dc64572e7703d211ea0ca65a659dfb394/OWNomogram.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 7036, 13332, 365, 18, 14723, 18, 542, 12971, 12, 7036, 13, 365, 18, 3374, 18, 542, 12971, 12, 7036, 13, 365, 18, 4660, 18, 542, 12971, 12, 7036, 13, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 7036, 13332, 365, 18, 14723, 18, 542, 12971, 12, 7036, 13, 365, 18, 3374, 18, 542, 12971, 12, 7036, 13, 365, 18, 4660, 18, 542, 12971, 12, 7036, 13, 2, -100, -100, -100, -100, -...
outcome = 'FAIL'
if output.HasCrashed(): outcome = 'CRASH' else: outcome = 'FAIL'
def HasRun(self, output): if output.UnexpectedOutput(): outcome = 'FAIL' else: outcome = 'pass' print 'Done running %s: %s' % (output.test.GetLabel(), outcome)
8d4776218f1aea33f8fe37984468a1d55548879f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6651/8d4776218f1aea33f8fe37984468a1d55548879f/test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4393, 1997, 12, 2890, 16, 876, 4672, 309, 876, 18, 7762, 1447, 13332, 309, 876, 18, 5582, 12893, 13912, 13332, 12884, 273, 296, 39, 2849, 2664, 11, 469, 30, 12884, 273, 296, 12319, 11, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4393, 1997, 12, 2890, 16, 876, 4672, 309, 876, 18, 7762, 1447, 13332, 309, 876, 18, 5582, 12893, 13912, 13332, 12884, 273, 296, 39, 2849, 2664, 11, 469, 30, 12884, 273, 296, 12319, 11, ...
def spherical_bessel_Y(n,var):
def spherical_bessel_Y(n,var, alg="maxima"):
def spherical_bessel_Y(n,var): r""" Returns the spherical Bessel function of the second kind for integers n > -1. Reference: A&S 10.1.9 page 437 and A&S 10.1.15 page 439. EXAMPLES: sage: x = PolynomialRing(QQ, 'x').gen() sage: spherical_bessel_Y(2,x) -(3*sin(x)/x - (1 - 24/(8*x^2))*cos(x))/x """ _init() return meval("spherical_bessel_y(%s,%s)"%(ZZ(n),var))
eb789e32fdf1f64e23f2531a18e92c7ff5995df6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/eb789e32fdf1f64e23f2531a18e92c7ff5995df6/special.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 272, 21570, 67, 70, 403, 292, 67, 61, 12, 82, 16, 1401, 16, 11989, 1546, 1896, 13888, 6, 4672, 436, 8395, 2860, 326, 272, 21570, 605, 403, 292, 445, 434, 326, 2205, 3846, 364, 12321, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 272, 21570, 67, 70, 403, 292, 67, 61, 12, 82, 16, 1401, 16, 11989, 1546, 1896, 13888, 6, 4672, 436, 8395, 2860, 326, 272, 21570, 605, 403, 292, 445, 434, 326, 2205, 3846, 364, 12321, ...
parser.add_option("-b", "--boxplot", dest="boxplot", default="boxplot.pdf",
parser.add_option("-b", "--boxplot", dest="boxplot", default=None,
def save_as_mysql(dbname, mysqldump): # See http://stackoverflow.com/questions/1067060/perl-to-python import re conn = sqlite3.connect(dbname) mysqldump = open(mysqldump,'w') for line in conn.iterdump(): process = False for nope in ('BEGIN TRANSACTION','COMMIT', 'sqlite_sequence','CREATE UNIQUE INDEX'): if nope in line: break else: process = True if not process: continue line = re.sub(r"[\n\r\t ]+", " ", line) m = re.search('CREATE TABLE ([a-zA-Z0-9_]*)(.*)', line) if m: name, sub = m.groups() sub = sub.replace('"','`') line = '''DROP TABLE IF EXISTS %(name)s; CREATE TABLE IF NOT EXISTS %(name)s%(sub)s ''' line = line % dict(name=name, sub=sub) # make sure we use an engine that supports foreign keys line = line.rstrip("\n\t ;") + " ENGINE = InnoDB;" else: m = re.search('INSERT INTO "([a-zA-Z0-9_]*)"(.*)', line) if m: line = 'INSERT INTO %s%s\n' % m.groups() line = line.replace('"', r'\"') line = line.replace('"', "'") # foreign keys need special attention line = re.sub(r"([a-zA-Z0-9_]+) references ", "\\1 INTEGER, FOREIGN KEY (\\1) references ", line) line = re.sub(r"([^'])'t'(.)", "\\1THIS_IS_TRUE\\2", line) line = line.replace('THIS_IS_TRUE', '1') line = re.sub(r"([^'])'f'(.)", "\\1THIS_IS_FALSE\\2", line) line = line.replace('THIS_IS_FALSE', '0') line = line.replace('AUTOINCREMENT', 'AUTO_INCREMENT') mysqldump.write(line) mysqldump.close()
ba469da958ce3877ff74c2ed3b86538da976c3fb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7332/ba469da958ce3877ff74c2ed3b86538da976c3fb/benchmark_statistics.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 345, 67, 12527, 12, 20979, 16, 7219, 8481, 4672, 468, 2164, 1062, 2207, 20672, 18, 832, 19, 9758, 19, 22135, 7301, 4848, 19, 457, 80, 17, 869, 17, 8103, 1930, 283, 1487, 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, 1923, 67, 345, 67, 12527, 12, 20979, 16, 7219, 8481, 4672, 468, 2164, 1062, 2207, 20672, 18, 832, 19, 9758, 19, 22135, 7301, 4848, 19, 457, 80, 17, 869, 17, 8103, 1930, 283, 1487, 273,...
_exposed_ = ('isSet', 'set', 'clear', 'wait')
_exposed_ = ('is_set', 'set', 'clear', 'wait')
def notify_all(self): return self._callmethod('notify_all')
80821f7cf4b2af64e444ad71ca13eb96fcbd6454 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/80821f7cf4b2af64e444ad71ca13eb96fcbd6454/managers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5066, 67, 454, 12, 2890, 4672, 327, 365, 6315, 1991, 2039, 2668, 12336, 67, 454, 6134, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5066, 67, 454, 12, 2890, 4672, 327, 365, 6315, 1991, 2039, 2668, 12336, 67, 454, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
conf.env['HTMLDIR'] = conf.env['DATADIR'] + 'doc/' + Utils.g_module.APPNAME + '/'
conf.env['HTMLDIR'] = os.path.join(conf.env['DATADIR'], 'doc', Utils.g_module.APPNAME)
def append_cxx_flags(vals): conf.env.append_value('CCFLAGS', vals.split()) conf.env.append_value('CXXFLAGS', vals.split())
4e3ee97298ecf6faef09e60dfd5dc87604ca1e63 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/399/4e3ee97298ecf6faef09e60dfd5dc87604ca1e63/autowaf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 67, 71, 5279, 67, 7133, 12, 4524, 4672, 2195, 18, 3074, 18, 6923, 67, 1132, 2668, 6743, 17836, 2187, 5773, 18, 4939, 10756, 2195, 18, 3074, 18, 6923, 67, 1132, 2668, 39, 5619, 178...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 67, 71, 5279, 67, 7133, 12, 4524, 4672, 2195, 18, 3074, 18, 6923, 67, 1132, 2668, 6743, 17836, 2187, 5773, 18, 4939, 10756, 2195, 18, 3074, 18, 6923, 67, 1132, 2668, 39, 5619, 178...
speech.speakTextInfo(info,reason=speech.REASON_CARET)
speech.speakTextInfo(info,unit=textInfos.UNIT_LINE,reason=speech.REASON_CARET)
def script_review_nextLine(self,keyPress): info=api.getReviewPosition().copy() info.expand(textInfos.UNIT_LINE) info.collapse() res=info.move(textInfos.UNIT_LINE,1) api.setReviewPosition(info.copy()) info.expand(textInfos.UNIT_LINE) if res==0: speech.speakMessage(_("bottom")) speech.speakTextInfo(info,reason=speech.REASON_CARET)
1c8791e7a613b1b4ce57adbc360fae48f52760c6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9340/1c8791e7a613b1b4ce57adbc360fae48f52760c6/_default.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2728, 67, 16041, 67, 4285, 1670, 12, 2890, 16, 856, 11840, 4672, 1123, 33, 2425, 18, 588, 9159, 2555, 7675, 3530, 1435, 1123, 18, 12320, 12, 955, 7655, 18, 15736, 67, 5997, 13, 1123, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2728, 67, 16041, 67, 4285, 1670, 12, 2890, 16, 856, 11840, 4672, 1123, 33, 2425, 18, 588, 9159, 2555, 7675, 3530, 1435, 1123, 18, 12320, 12, 955, 7655, 18, 15736, 67, 5997, 13, 1123, 1...
this = apply(_quickfix.new_PosAmtType, args)
this = _quickfix.new_PosAmtType(*args)
def __init__(self, *args): this = apply(_quickfix.new_PosAmtType, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 1616, 31787, 559, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 1616, 31787, 559, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, ...
d = self.callRemote("computerPrepareImagingDirectory", uuid, imagingData) d.addErrback(self.onErrorRaise, "Imaging:computerPrepareImagingDirectory", [uuid, imagingData])
d = self.callRemote("computerPrepareImagingDirectory", MACAddress, imagingData) d.addErrback(self.onErrorRaise, "Imaging:computerPrepareImagingDirectory", [MACAddress, imagingData])
def computerPrepareImagingDirectory(self, MACAddress, imagingData = None): """ Asks the Package Server to create the file system structure for the given computer uuid thanks to imagingData content. If imagingData is None, the package server queries the MMC agent for the imaging data. """ if not isMACAddress(MACAddress): raise TypeError
6a630464196477bb258769e082fc146554407227 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5988/6a630464196477bb258769e082fc146554407227/imaging.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26579, 7543, 1170, 5755, 2853, 12, 2890, 16, 14246, 1887, 16, 709, 5755, 751, 273, 599, 4672, 3536, 2970, 7904, 326, 7508, 3224, 358, 752, 326, 585, 2619, 3695, 364, 326, 864, 26579, 382...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26579, 7543, 1170, 5755, 2853, 12, 2890, 16, 14246, 1887, 16, 709, 5755, 751, 273, 599, 4672, 3536, 2970, 7904, 326, 7508, 3224, 358, 752, 326, 585, 2619, 3695, 364, 326, 864, 26579, 382...
'importing_3000_event_calendar': 30,
'importing_3000_event_calendar.import': 30,
def __init__(self): self._app_path = os.getcwd() self._options = { 'tbox_data': '.', # raw .perf files 'html_data': '.', # where to output generated .html 'perf_data': '.', # where to store processed data 'verbose': False, 'debug': False, 'cleanup': False, # remove .perf files when processed 'configfile': 'perf.cfg', 'section': 'base', 'warn': 2.0, # range of values to control color of cells 'alert': 5.0, 'p_alert': 100.0, # percentage change to warn about (for summary only) }
8ec8fd792b8bb821ff18dd3f0fd09f135508d743 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/8ec8fd792b8bb821ff18dd3f0fd09f135508d743/perf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 6315, 2910, 67, 803, 273, 1140, 18, 588, 11089, 1435, 365, 6315, 2116, 225, 273, 288, 296, 88, 2147, 67, 892, 4278, 225, 2611, 16, 565, 468, 1831,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 6315, 2910, 67, 803, 273, 1140, 18, 588, 11089, 1435, 365, 6315, 2116, 225, 273, 288, 296, 88, 2147, 67, 892, 4278, 225, 2611, 16, 565, 468, 1831,...
n = width - len(s) if n <= 0: return s return ' '*n + s
return s.rjust(width)
def rjust(s, width): """rjust(s, width) -> string Return a right-justified version of s, in a field of the specified width, padded with spaces as needed. The string is never truncated. """ n = width - len(s) if n <= 0: return s return ' '*n + s
722edbc15fc2faab0937de48f2fc8ce9eaa963d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/722edbc15fc2faab0937de48f2fc8ce9eaa963d1/string.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 436, 3732, 12, 87, 16, 1835, 4672, 3536, 86, 3732, 12, 87, 16, 1835, 13, 317, 533, 225, 2000, 279, 2145, 17, 3732, 939, 1177, 434, 272, 16, 316, 279, 652, 434, 326, 1269, 1835, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 436, 3732, 12, 87, 16, 1835, 4672, 3536, 86, 3732, 12, 87, 16, 1835, 13, 317, 533, 225, 2000, 279, 2145, 17, 3732, 939, 1177, 434, 272, 16, 316, 279, 652, 434, 326, 1269, 1835, 16, ...
assert ec.verify_dsa(self.data, r, s) assert not ec.verify_dsa(self.data, s, r)
assert ec.verify_dsa(self.data, r, s) assert not ec.verify_dsa(self.data, s, r)
def _test_sign_dsa(self): ec = EC.gen_params(EC.NID_sect233k1) # ec.gen_key() self.assertRaises(EC.ECError, ec.sign_dsa, self.data) ec = EC.load_key(self.privkey) r, s = ec.sign_dsa(self.data) assert ec.verify_dsa(self.data, r, s) # XXX leak 40 bytes assert not ec.verify_dsa(self.data, s, r) # XXX leak 40 bytes
a38746ed50bfcac20e553e6591a2342d0527b6e3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8055/a38746ed50bfcac20e553e6591a2342d0527b6e3/test_ecdsa.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 67, 2977, 67, 19603, 12, 2890, 4672, 6557, 273, 7773, 18, 4507, 67, 2010, 12, 7228, 18, 50, 734, 67, 5709, 31026, 79, 21, 13, 468, 6557, 18, 4507, 67, 856, 1435, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 67, 2977, 67, 19603, 12, 2890, 4672, 6557, 273, 7773, 18, 4507, 67, 2010, 12, 7228, 18, 50, 734, 67, 5709, 31026, 79, 21, 13, 468, 6557, 18, 4507, 67, 856, 1435, 365, 18, ...
self.pipeline.set_state(gst.STATE_PAUSED)
if self.isPlaying: self.pipeline.set_state(gst.STATE_PAUSED)
def Forward(self, turnOn): if self.isForwarding == turnOn: #there is no change in the forwarding state return self.isForwarding = turnOn if turnOn: #Pause playback while seeking self.pipeline.set_state(gst.STATE_PAUSED) self.StartUpdateTimeout() else: self.SeekTo(self.GetPosition()) if self.isPlaying: #resume playback if it was playing before self.pipeline.set_state(gst.STATE_PLAYING)
c485c23df77f87fa4054eb2e7b5fae2be11a020c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10033/c485c23df77f87fa4054eb2e7b5fae2be11a020c/TransportManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17206, 12, 2890, 16, 7005, 1398, 4672, 309, 365, 18, 291, 21487, 422, 7005, 1398, 30, 468, 18664, 353, 1158, 2549, 316, 326, 20635, 919, 327, 225, 365, 18, 291, 21487, 273, 7005, 1398, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17206, 12, 2890, 16, 7005, 1398, 4672, 309, 365, 18, 291, 21487, 422, 7005, 1398, 30, 468, 18664, 353, 1158, 2549, 316, 326, 20635, 919, 327, 225, 365, 18, 291, 21487, 273, 7005, 1398, ...
page_info[u'title'] = tn.string
page_info[u'title'] = strip_ws(tn.renderContents())
def get_info(id, verbose=False): """ Get a dictionary of info about a particular entry. At a minimum, the entry will have an 'id' and a 'title' attribute. verbose: print out the page headers & parsed HTML for debugging purposes. """ page = urllib2.urlopen(URL_REGISTER % id) if verbose: print >>sys.stderr, page.info() content = page.read() try: soup = BeautifulSoup(content, convertEntities=BeautifulSoup.HTML_ENTITIES) except: if verbose: # Unicode or serious parse errors, so dump the raw HTML print >>sys.stderr, content raise if verbose: print >>sys.stderr, soup.prettify() page_info = { u'id': int(id), } # the site returns 200-OK responses where it means 404 # FIXME: Checking for a title is the best way to test an entry? tn = soup.find('td', {'class':"ListingHeader"}) if tn: page_info[u'title'] = tn.string else: raise Exception("No title! (probably 404, but the website sucks)") tn = soup.find('td', {'class':"ListingSubHeader"}) if tn: page_info[u'subtitle'] = tn.string else: print >>sys.stderr, "Subtitle not found" for field in soup.findAll('td', {'class':'listingfieldname'}): f_str = strip_ws(field.string) f_val = strip_ws(field.nextSibling.renderContents()) f_key = FIELD_MAP.get(f_str.lower()) if not f_key: # new field, we should add it to the FIELD_MAP print >>sys.stderr, 'Field not found in map: "%s"' % f_str continue if f_key == u'gps_ref': # parse the GPS references into X & Y values # TODO: are this in NZTM? NZMG? m = RE_GPS.match(f_val) if m: page_info['gps_x'] = int(m.group(1)) page_info['gsp_y'] = int(m.group(2)) else: page_info[f_key] = f_val return page_info
a0ce4e0ab4467c4000f81998f7ff83d9c86097dd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4573/a0ce4e0ab4467c4000f81998f7ff83d9c86097dd/historic-places-scraper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1376, 12, 350, 16, 3988, 33, 8381, 4672, 3536, 968, 279, 3880, 434, 1123, 2973, 279, 6826, 1241, 18, 2380, 279, 5224, 16, 326, 1241, 903, 1240, 392, 296, 350, 11, 471, 279, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1376, 12, 350, 16, 3988, 33, 8381, 4672, 3536, 968, 279, 3880, 434, 1123, 2973, 279, 6826, 1241, 18, 2380, 279, 5224, 16, 326, 1241, 903, 1240, 392, 296, 350, 11, 471, 279, ...
We can give the generator a special name for latex::
By default, quadratic fields come with a nice latex representation:: sage: K.<a> = QuadraticField(-7) sage: latex(a) \sqrt{-7} sage: latex(1/(1+a)) -\frac{1}{8} \sqrt{-7} + \frac{1}{8} sage: K.latex_variable_name() '\\sqrt{-7}' We can provide our own name as well::
def QuadraticField(D, names, check=True, embedding=True, latex_name=None): r""" Return a quadratic field obtained by adjoining a square root of `D` to the rational numbers, where `D` is not a perfect square. INPUT: - ``D`` - a rational number - ``names`` - variable name - ``check`` - bool (default: True) - ``embedding`` - bool or square root of D in an ambient field (default: True) OUTPUT: A number field defined by a quadratic polynomial. Unless otherwise specified, it has an embedding into `\RR` or `\CC` by sending the generator to the positive root. EXAMPLES:: sage: QuadraticField(3, 'a') Number Field in a with defining polynomial x^2 - 3 sage: K.<theta> = QuadraticField(3); K Number Field in theta with defining polynomial x^2 - 3 sage: RR(theta) 1.73205080756888 sage: QuadraticField(9, 'a') Traceback (most recent call last): ... ValueError: D must not be a perfect square. sage: QuadraticField(9, 'a', check=False) Number Field in a with defining polynomial x^2 - 9 Quadratic number fields derive from general number fields. :: sage: from sage.rings.number_field.number_field import is_NumberField sage: type(K) <class 'sage.rings.number_field.number_field.NumberField_quadratic_with_category'> sage: is_NumberField(K) True Quadratic number fields are cached:: sage: QuadraticField(-11, 'a') is QuadraticField(-11, 'a') True We can give the generator a special name for latex:: sage: K.<a> = QuadraticField(next_prime(10^10), latex_name=r'\sqrt{D}') sage: 1+a a + 1 sage: latex(1+a) \sqrt{D} + 1 """ D = QQ(D) if check: if D.is_square(): raise ValueError, "D must not be a perfect square." R = QQ['x'] f = R([-D, 0, 1]) if embedding is True: if D > 0: embedding = RLF(D).sqrt() else: embedding = CLF(D).sqrt() return NumberField(f, names, check=False, embedding=embedding, latex_name=latex_name)
3482002f1f3f5f575a21d282199449e31c67ba35 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/3482002f1f3f5f575a21d282199449e31c67ba35/number_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27258, 20004, 974, 12, 40, 16, 1257, 16, 866, 33, 5510, 16, 15853, 33, 5510, 16, 25079, 67, 529, 33, 7036, 4672, 436, 8395, 2000, 279, 26146, 652, 12700, 635, 1261, 5701, 310, 279, 857...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27258, 20004, 974, 12, 40, 16, 1257, 16, 866, 33, 5510, 16, 15853, 33, 5510, 16, 25079, 67, 529, 33, 7036, 4672, 436, 8395, 2000, 279, 26146, 652, 12700, 635, 1261, 5701, 310, 279, 857...
filepath = "/".join(ls)
filepath = u"/".join(ls)
def only_alnum(s): return filter(lambda c: c.isalnum(), s)
43ff494cce0c91ed6801915966316862d942a4ff /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9686/43ff494cce0c91ed6801915966316862d942a4ff/SqliteCacheDBHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1338, 67, 287, 2107, 12, 87, 4672, 327, 1034, 12, 14661, 276, 30, 276, 18, 291, 287, 2107, 9334, 272, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1338, 67, 287, 2107, 12, 87, 4672, 327, 1034, 12, 14661, 276, 30, 276, 18, 291, 287, 2107, 9334, 272, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
filename=self.findFileInDir(u"%s Season %d.%s" % (sanitiseFileName(available_metadata['title']), available_metadata['season'], ext), [graphicsdir], suffix=self.graphic_suffix[graphic_type], fuzzy_match=True)
filename=self.findFileInDir(u"%s Season %d.%s" % (self.sanitiseFileName(available_metadata['title']), available_metadata['season'], ext), [graphicsdir], suffix=self.graphic_suffix[graphic_type], fuzzy_match=True)
def processMythTvMetaData(self): '''Check each video file in the mythvideo directories download graphics files and meta data then update MythTV data base meta data with any new information. ''' # If there were directories specified move them and update the MythTV db meta data accordingly if self.config['video_dir']: if len(self.config['video_dir']) % 2 == 0: validFiles = self._moveVideoFiles(self.config['video_dir']) self.config[u'file_move_flag'] = False else: sys.stderr.write(u"\n! Error: When specifying target (file or directory) to move to a destination (directory) they must always be in pairs (target and destination directory).\nYou specified an uneven number of variables (%d) for target and destination pairs.\nVariable count (%s)\n" % (len(self.config['video_dir']), self.config['video_dir'])) sys.exit(1)
d7120a7dc6b48c0861502d071fe4f1897fab913e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/d7120a7dc6b48c0861502d071fe4f1897fab913e/jamu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12062, 451, 56, 90, 6998, 12, 2890, 4672, 9163, 1564, 1517, 6191, 585, 316, 326, 3399, 451, 9115, 6402, 4224, 17313, 1390, 471, 2191, 501, 1508, 1089, 8005, 451, 15579, 501, 1026, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12062, 451, 56, 90, 6998, 12, 2890, 4672, 9163, 1564, 1517, 6191, 585, 316, 326, 3399, 451, 9115, 6402, 4224, 17313, 1390, 471, 2191, 501, 1508, 1089, 8005, 451, 15579, 501, 1026, ...
simulation_gly_with_nh]
simulation_gly_with_nh, simulation_ala_no_h, simulation_ala_with_h, simulation_tyr_with_h]
def simulation_gly_with_nh(): pdb = """\
4762558562fd1fa43a255509aab4d76050c505c3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/696/4762558562fd1fa43a255509aab4d76050c505c3/tst_molecules.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14754, 67, 75, 715, 67, 1918, 67, 82, 76, 13332, 10892, 273, 3536, 64, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14754, 67, 75, 715, 67, 1918, 67, 82, 76, 13332, 10892, 273, 3536, 64, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
declared interfaces. Most of its public names are however imported here.
declared interfaces. Most of its public names are however imported here.
def meth(arg1, arg2): '''Documentation for meth '''
c80d74d4b1760f1a4b291d00a25b99642b4edb8a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10015/c80d74d4b1760f1a4b291d00a25b99642b4edb8a/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7917, 12, 3175, 21, 16, 1501, 22, 4672, 9163, 18905, 364, 7917, 9163, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 7917, 12, 3175, 21, 16, 1501, 22, 4672, 9163, 18905, 364, 7917, 9163, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def update_tag_task_added(self, sender, task_id):
def on_task_added(self, sender, task_id):
def add_tag(self, sender, tname): Log.debug("add tag %s" % (tname))
2f000587cf1f61e4600cf231c42fe3ceba3cd9bb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8234/2f000587cf1f61e4600cf231c42fe3ceba3cd9bb/tagtree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 2692, 12, 2890, 16, 5793, 16, 27829, 4672, 1827, 18, 4148, 2932, 1289, 1047, 738, 87, 6, 738, 261, 88, 529, 3719, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 2692, 12, 2890, 16, 5793, 16, 27829, 4672, 1827, 18, 4148, 2932, 1289, 1047, 738, 87, 6, 738, 261, 88, 529, 3719, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
userhome = pwent[5] if userhome[-1:] == '/': i = i + 1
userhome = pwent.pw_dir if userhome.endswith('/'): i += 1
def expanduser(path): """Expand ~ and ~user constructions. If user or $HOME is unknown, do nothing.""" if path[:1] != '~': return path i, n = 1, len(path) while i < n and path[i] != '/': i = i + 1 if i == 1: if not 'HOME' in os.environ: import pwd userhome = pwd.getpwuid(os.getuid())[5] else: userhome = os.environ['HOME'] else: import pwd try: pwent = pwd.getpwnam(path[1:i]) except KeyError: return path userhome = pwent[5] if userhome[-1:] == '/': i = i + 1 return userhome + path[i:]
77cdeaff556447a980fe8632e8cd010499ade2d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/77cdeaff556447a980fe8632e8cd010499ade2d0/posixpath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14717, 12, 803, 4672, 3536, 12271, 4871, 471, 4871, 1355, 16171, 87, 18, 225, 971, 729, 578, 271, 14209, 353, 5917, 16, 741, 5083, 12123, 309, 589, 10531, 21, 65, 480, 10091, 4278, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14717, 12, 803, 4672, 3536, 12271, 4871, 471, 4871, 1355, 16171, 87, 18, 225, 971, 729, 578, 271, 14209, 353, 5917, 16, 741, 5083, 12123, 309, 589, 10531, 21, 65, 480, 10091, 4278, 327, ...
scind.mean(i.astype(float), labels_per_point.astype(int), indexes))
scind.mean(i.astype(float), labels_per_point, indexes))
def convex_hull_ijv(pixel_labels, indexes): '''Return the convex hull for each label using an ijv labeling pixel_labels: the labeling of the pixels in i,j,v form where i & j are the coordinates of a pixel and v is the pixel's label number indexes: the indexes at which to measure the convex hull Returns a matrix and a vector. The matrix consists of one row per point in the convex hull. Each row has three columns, the label #, the i coordinate of the point and the j coordinate of the point. The result is organized first by label, then the points are arranged counter-clockwise around the perimeter. The vector is a vector of #s of points in the convex hull per label ''' if len(indexes) == 0: return np.zeros((0,2),int),np.zeros((0,),int) # # An array that converts from label # to index in "indexes" anti_indexes = np.zeros((np.max(indexes)+1,),int) anti_indexes[indexes] = range(len(indexes)) coords = pixel_labels[:,:2] i = coords[:, 0] j = coords[:, 1] labels_per_point = pixel_labels[:,2] # # Calculate the centers for each label # center_i = fixup_scipy_ndimage_result( scind.mean(i.astype(float), labels_per_point.astype(int), indexes)) center_j = fixup_scipy_ndimage_result( scind.mean(j.astype(float), labels_per_point.astype(int), indexes)) centers = np.column_stack((center_i, center_j)) # # Now make an array with one outline point per row and the following # columns: # # index of label # in indexes array # angle of the point relative to the center # i coordinate of the point # j coordinate of the point # anti_indexes_per_point = anti_indexes[labels_per_point] centers_per_point = centers[anti_indexes_per_point] angle = np.arctan2(i-centers_per_point[:,0],j-centers_per_point[:,1]) a = np.zeros((len(i),3), np.int32) a[:,0] = anti_indexes_per_point a[:,1:] = coords # # Sort the array first by label # (sort of), then by angle # order = np.lexsort((angle,anti_indexes_per_point)) a=a[order] anti_indexes_per_point = anti_indexes_per_point[order] angle = angle[order] centers_per_point = centers_per_point[order] # # Make the result matrix, leaving enough space so that all points might # be on the convex hull. # result = np.zeros((len(i),3), np.int32) result[:,0] = labels_per_point[order] # # Create an initial count vector # v = np.ones((a.shape[0],),dtype = np.int32) result_counts = scipy.sparse.coo_matrix((v,(a[:,0],v*0)), shape=(len(indexes),1)) result_counts = result_counts.toarray().flatten() r_anti_indexes_per_point = anti_indexes_per_point # save this # # Create a vector that indexes into the results for each label # result_index = np.zeros(result_counts.shape, np.int32) result_index[1:]=np.cumsum(result_counts[:-1]) # # Initialize the counts of convex hull points to a ridiculous number # counts = np.iinfo(np.int32).max first_pass = True while True: # # Figure out how many putative convex hull points there are for # each label. # # If the count for a label is 3 or less, it's a convex hull or # degenerate case. # # If the count hasn't changed in an iteration, then we've done # as well as we can hope to do. # v = np.ones((a.shape[0],),dtype = np.int32) new_counts = scipy.sparse.coo_matrix((v,(a[:,0],v*0)), shape=(len(indexes),1)) new_counts = new_counts.toarray().flatten() done_count = (2 if first_pass else 3) finish_me = ((new_counts > 0) & ((new_counts <= done_count) | (new_counts == counts))) indexes_to_finish = np.argwhere(finish_me).astype(np.int32) keep_me = (new_counts > done_count) & (new_counts < counts) indexes_to_keep = np.argwhere(keep_me).astype(np.int32) if len(indexes_to_finish): result_counts[finish_me] = new_counts[finish_me] # # Store the coordinates of each of the points to finish # finish_this_row = finish_me[a[:,0]] rows_to_finish = np.argwhere(finish_this_row).flatten() a_to_finish = a[rows_to_finish] atf_indexes = a_to_finish[:,0] # # Map label #s to the index into indexes_to_finish of that label # # anti_indexes_to_finish = np.zeros((len(indexes),), np.int32) anti_indexes_to_finish[indexes_to_finish] = range(len(indexes_to_finish)) # # Figure out the indices of each point in a label to be finished. # We figure out how much to subtract for each label, then # subtract that much from 0:N to get successive indexes at # each label. # Then we add the result_index to figure out where to store it # in the result table. # finish_idx_base = np.zeros((len(indexes_to_finish),), np.int32) finish_idx_base[1:]=np.cumsum(new_counts[indexes_to_finish])[:-1] finish_idx_bases = finish_idx_base[anti_indexes_to_finish[atf_indexes]] finish_idx = (np.array(range(a_to_finish.shape[0]))- finish_idx_bases) finish_idx = finish_idx + result_index[atf_indexes] result[finish_idx,1:] = a_to_finish[:,1:] if len(indexes_to_keep) == 0: break # # Figure out which points are still available # rows_to_keep = np.argwhere(keep_me[a[:,0].astype(np.int32)]).flatten() rows_to_keep = rows_to_keep.astype(np.int32) a = a[rows_to_keep] centers_per_point = centers_per_point[rows_to_keep] counts = new_counts # # The rule is that the area of the triangle from the center to # point N-1 to point N plus the area of the triangle from the center # to point N to point N+1 must be greater than the area of the # triangle from the center to point N-1 to point N+1 for a point # to be on the convex hull. # N-1 and N+1 have to be modulo "counts", so we make special arrays # to address those situations. # anti_indexes_to_keep = np.zeros((len(indexes),), np.int32) anti_indexes_to_keep[indexes_to_keep] = range(len(indexes_to_keep)) idx_base = np.zeros((len(indexes_to_keep),), np.int32) idx_base[1:]=np.cumsum(counts[keep_me])[0:-1] idx_bases = idx_base[anti_indexes_to_keep[a[:,0]]] counts_per_pt = counts[a[:,0]] idx = np.array(range(a.shape[0]), np.int32)-idx_bases n_minus_one = np.mod(idx+counts_per_pt-1,counts_per_pt)+idx_bases n_plus_one = np.mod(idx+1,counts_per_pt)+idx_bases # # Compute the triangle areas # t_left = triangle_areas(centers_per_point, a[n_minus_one,1:], a[:,1:]) t_right = triangle_areas(centers_per_point, a[:,1:], a[n_plus_one,1:]) t_lr = triangle_areas(centers_per_point, a[n_minus_one,1:],a[n_plus_one,1:]) # # Keep the points where the area of the left triangle plus the # area of the right triangle is bigger than the area of the triangle # composed of the points to the left and right. This means that # there's a little triangle sitting on top of t_lr with our point # on top and convex in relation to its neighbors. # keep_me = t_left+t_right > t_lr # # If all points on a line are co-linear with the center, then the # whole line goes away. Special handling for this to find the points # most distant from the center and on the same side # consider_me = t_left+t_right == 0 if np.any(consider_me): diff_i = a[:,1]-centers_per_point[:,0] diff_j = a[:,2]-centers_per_point[:,1] # # The manhattan distance is good enough # dist = np.abs(diff_i)+np.abs(diff_j) # The sign is different on different sides of a line including # the center. Multiply j by 2 to keep from colliding with i # # If both signs are zero, then the point is in the center # sign = np.sign(diff_i) + np.sign(diff_j)*2 n_minus_one_consider = n_minus_one[consider_me] n_plus_one_consider = n_plus_one[consider_me] left_is_worse = ( (dist[consider_me] > dist[n_minus_one_consider]) | (sign[consider_me] != sign[n_minus_one_consider])) right_is_worse = ((dist[consider_me] > dist[n_plus_one_consider]) | (sign[consider_me] != sign[n_plus_one_consider])) to_keep = left_is_worse & right_is_worse & (sign[consider_me] != 0) keep_me[consider_me] = to_keep a = a[keep_me,:] centers_per_point = centers_per_point[keep_me] first_pass = False # # Finally, we have to shrink the results. We number each of the # points for a label, then only keep those whose indexes are # less than the count for their label. # within_label_index = np.array(range(result.shape[0]), np.int32) counts_per_point = result_counts[r_anti_indexes_per_point] result_indexes_per_point = result_index[r_anti_indexes_per_point] within_label_index = (within_label_index - result_indexes_per_point) result = result[within_label_index < counts_per_point] return result, result_counts
31bc056c689075950705139026e754657d3b8eee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2600/31bc056c689075950705139026e754657d3b8eee/cpmorphology.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26213, 67, 76, 420, 67, 8302, 90, 12, 11743, 67, 5336, 16, 5596, 4672, 9163, 990, 326, 26213, 22474, 364, 1517, 1433, 1450, 392, 19313, 90, 1433, 310, 225, 4957, 67, 5336, 30, 326, 143...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26213, 67, 76, 420, 67, 8302, 90, 12, 11743, 67, 5336, 16, 5596, 4672, 9163, 990, 326, 26213, 22474, 364, 1517, 1433, 1450, 392, 19313, 90, 1433, 310, 225, 4957, 67, 5336, 30, 326, 143...
os.path.join('sparse', 'linalg', 'dsolve', '_superlu.py'),
os.path.join('sparse', 'linalg', 'dsolve', 'linsolve.py'),
def custom_mangling(filename): import_mangling = [ os.path.join('cluster', '__init__.py'), os.path.join('cluster', 'hierarchy.py'), os.path.join('cluster', 'vq.py'), os.path.join('fftpack', 'basic.py'), os.path.join('fftpack', 'pseudo_diffs.py'), os.path.join('integrate', 'odepack.py'), os.path.join('integrate', 'quadpack.py'), os.path.join('integrate', 'ode.py'), os.path.join('interpolate', 'fitpack.py'), os.path.join('interpolate', 'fitpack2.py'), os.path.join('interpolate', 'interpolate.py'), os.path.join('interpolate', 'interpolate_wrapper.py'), os.path.join('io', 'array_import.py'), os.path.join('io', '__init__.py'), os.path.join('linalg', 'basic.py'), os.path.join('linalg', 'decomp.py'), os.path.join('linalg', 'lapack.py'), os.path.join('linalg', 'flinalg.py'), os.path.join('linalg', 'iterative.py'), os.path.join('lib', 'blas', '__init__.py'), os.path.join('lib', 'lapack', '__init__.py'), os.path.join('ndimage', 'filters.py'), os.path.join('ndimage', 'fourier.py'), os.path.join('ndimage', 'interpolation.py'), os.path.join('ndimage', 'measurements.py'), os.path.join('ndimage', 'morphology.py'), os.path.join('optimize', 'minpack.py'), os.path.join('optimize', 'zeros.py'), os.path.join('optimize', 'lbfgsb.py'), os.path.join('optimize', 'cobyla.py'), os.path.join('optimize', 'slsqp.py'), os.path.join('optimize', 'nnls.py'), os.path.join('signal', '__init__.py'), os.path.join('signal', 'bsplines.py'), os.path.join('special', '__init__.py'), os.path.join('special', 'basic.py'), os.path.join('special', 'orthogonal.py'), os.path.join('spatial', '__init__.py'), os.path.join('spatial', 'distance.py'), os.path.join('sparse', 'linalg', 'isolve', 'iterative.py'), os.path.join('sparse', 'linalg', 'dsolve', '_superlu.py'), os.path.join('sparse', 'linalg', 'eigen', 'arpack', 'arpack.py'), os.path.join('sparse', 'linalg', 'eigen', 'arpack', 'speigs.py'), os.path.join('sparse', 'linalg', 'iterative', 'isolve', 'iterative.py'), ] if any(filename.endswith(x) for x in import_mangling): print(filename) f = open(filename, 'r') text = f.read() f.close() for mod in ['_vq', '_hierarchy_wrap', '_fftpack', 'convolve', '_flinalg', 'fblas', 'flapack', 'cblas', 'clapack', 'calc_lwork', '_cephes', 'specfun', 'orthogonal_eval', 'lambertw', 'ckdtree', '_distance_wrap', '_minpack', '_zeros', '_lbfgsb', '_cobyla', '_slsqp', '_nnls', 'sigtools', 'spline', '_fitpack', 'dfitpack', '_interpolate', '_odepack', '_quadpack', 'vode', '_dop', 'vonmises_cython', 'futil', 'mvn', '_nd_image', 'numpyio', '_zsuperlu', '_ssuperlu', '_dsuperlu', '_csuperlu', '_arpack', '_iterative', ]: text = re.sub(r'^(\s*)import %s' % mod, r'\1from . import %s' % mod, text, flags=re.M) text = re.sub(r'^(\s*)from %s import' % mod, r'\1from .%s import' % mod, text, flags=re.M) #text = text.replace('from matrixlib', 'from .matrixlib') f = open(filename, 'w') f.write(text) f.close()
6807076d27137c033cb6da8e50f8466c6d718782 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12971/6807076d27137c033cb6da8e50f8466c6d718782/py3tool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1679, 67, 81, 539, 2456, 12, 3459, 4672, 1930, 67, 81, 539, 2456, 273, 306, 1140, 18, 803, 18, 5701, 2668, 7967, 2187, 4940, 2738, 25648, 2074, 19899, 1140, 18, 803, 18, 5701, 2668, 79...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1679, 67, 81, 539, 2456, 12, 3459, 4672, 1930, 67, 81, 539, 2456, 273, 306, 1140, 18, 803, 18, 5701, 2668, 7967, 2187, 4940, 2738, 25648, 2074, 19899, 1140, 18, 803, 18, 5701, 2668, 79...
res[line.id] = float(line.practical_amount or 0.0 / line.theoritical_amount) * 100
res[line.id] = float((line.practical_amount or 0.0) / line.theoritical_amount) * 100
def _perc(self, cr, uid, ids, name, args, context): res = {} for line in self.browse(cr, uid, ids): if line.theoritical_amount <> 0.00: res[line.id] = float(line.practical_amount or 0.0 / line.theoritical_amount) * 100 else: res[line.id] = 0.00 return res
2be2c91eff7d2c0616d61058eddc7c636e9b7123 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2be2c91eff7d2c0616d61058eddc7c636e9b7123/account_budget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 457, 71, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 833, 16, 819, 4672, 400, 273, 2618, 364, 980, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 4672, 309, 980, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 457, 71, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 833, 16, 819, 4672, 400, 273, 2618, 364, 980, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 4672, 309, 980, ...
if ArgumentOptions.disable_md5check is False:
if Bool_DisableMD5Check is False:
def run(request, response, func=find_first_match): '''Get items from the request Queue, process them with func(), put the results along with the Thread's name into the response Queue. Stop running when item is None.''' while 1: tuple_item_key = request.get() if tuple_item_key is None: break (key, item) = tuple_item_key (url, file, download_size, checksum) = stripper(item) thread_name = threading.currentThread().getName() if key == 'Update': temp_file = file.split("_") PackageName = temp_file[0] PackageName += " - " + temp_file[len(temp_file) - 1] del temp_file #INFO: We pass None as a filename here because we don't want to do a tree search of # update files. Update files are changed daily and there is no point in doing a search of # them in the cache_dir response.put(func(cache_dir, None) ) #INFO: exit_status here would be False because for updates there's no need to do a # find_first_match # This is more with the above statement where None is passed as the filename exit_status = response.get() if exit_status == False: log.msg("Downloading %s.%s\n" % (PackageName, LINE_OVERWRITE_MID) ) if FetcherInstance.download_from_web(url, file, download_path) == True: log.success("\r%s done.%s\n" % (PackageName, LINE_OVERWRITE_FULL) ) if ArgumentOptions.zip_it: if FetcherInstance.compress_the_file(zip_update_file, file) != True: log.err("Couldn't archive %s to file %s.%s\n" % (file, zip_update_file, LINE_OVERWRITE_MID) ) sys.exit(1) else: log.verbose("%s added to archive %s.%s\n" % (file, zip_update_file, LINE_OVERWRITE_FULL) ) os.unlink(os.path.join(download_path, file) ) else: errlist.append(file) elif key == 'Upgrade': try: PackageName = file.split("_")[0] except IndexError: log.err("Not getting a package name here is problematic. Better bail out.\n") sys.exit(1) #INFO: For Package version, we don't want to fail try: PackageVersion = file.split("_")[1] except IndexError: PackageVersion = "NA" log.verbose("Weird!! Package version not present. Is it really a deb file?\n") response.put(func(cache_dir, file) ) #INFO: find_first_match() returns False or a file name with absolute path full_file_path = response.get() #INFO: If we find the file in the local cache_dir, we'll execute this block. if full_file_path != False: # We'll first check for its md5 checksum if ArgumentOptions.disable_md5check is False: if FetcherInstance.CheckHashDigest(full_file_path, checksum) is True: log.verbose("md5checksum correct for package %s.%s\n" % (PackageName, LINE_OVERWRITE_FULL) ) if ArgumentOptions.deb_bugs: bug_fetched = 0 log.verbose("Fetching bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_FULL) ) if FetchBugReportsDebian.FetchBugsDebian(PackageName) in [1,2]: log.verbose("Fetched bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_FULL) ) bug_fetched = 1 else: log.verbose("Couldn't fetch bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_MID) ) if ArgumentOptions.zip_it: if FetcherInstance.compress_the_file(zip_upgrade_file, full_file_path) is True: log.success("%s copied from local cache directory %s.%s\n" % (PackageName, cache_dir, LINE_OVERWRITE_MID) ) else: log.err("Couldn't add %s to archive %s.%s\n" % (file, zip_upgrade_file, LINE_OVERWRITE_MID) ) sys.exit(1) #INFO: If no zip option enabled, simply copy the downloaded package file # along with the downloaded bug reports. else: try: shutil.copy(full_file_path, download_path) log.success("%s copied from local cache directory %s.%s\n" % (PackageName, cache_dir, LINE_OVERWRITE_MID) ) except shutil.Error: log.verbose("%s already available in %s. Skipping copy!!!%s\n" % (file, download_path, LINE_OVERWRITE_MID) ) if bug_fetched == 1: for x in os.listdir(os.curdir): if (x.startswith(PackageName) and x.endswith(apt_bug_file_format) ): shutil.move(x, download_path) log.verbose("Moved %s file to %s folder.%s\n" % (x, download_path, LINE_OVERWRITE_FULL) ) #INFO: Damn!! The md5chesum didn't match :-( # The file is corrupted and we need to download a new copy from the internet else: log.verbose("%s checksum mismatch. Skipping file.%s\n" % (file, LINE_OVERWRITE_FULL) ) log.msg("Downloading %s - %s %s\n" % (PackageName, log.calcSize(download_size/1024), LINE_OVERWRITE_MID) ) if FetcherInstance.download_from_web(url, file, download_path) == True: log.success("\r%s done.%s\n" % (PackageName, LINE_OVERWRITE_FULL) ) #Add to cache_dir if possible if ArgumentOptions.cache_dir and os.access(ArgumentOptions.cache_dir, os.W_OK) == True: try: shutil.copy(file, cache_dir) log.verbose("%s copied to local cache directory %s.%s\n" % (file, ArgumentOptions.cache_dir, LINE_OVERWRITE_MID) ) except shutil.Error: log.verbose("Couldn't copy %s to %s.%s\n" % (file, ArgumentOptions.cache_dir, LINE_OVERWRITE_FULL) ) else: log.verbose("cache_dir %s is not writeable. Skipping copy to it.\n" % (ArgumentOptions.cache_dir) ) #Fetch bug reports if ArgumentOptions.deb_bugs: if FetchBugReportsDebian.FetchBugsDebian( PackageName ) in [1, 2]: log.verbose( "Fetched bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) else: log.verbose( "Couldn't fetch bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) if ArgumentOptions.zip_it: if FetcherInstance.compress_the_file( zip_upgrade_file, file ) != True: log.err( "Couldn't archive %s to file %s.%s\n" % ( file, zip_upgrade_file, LINE_OVERWRITE_SMALL ) ) sys.exit( 1 ) else: log.verbose( "%s added to archive %s.%s\n" % ( file, zip_upgrade_file, LINE_OVERWRITE_SMALL ) ) os.unlink( os.path.join( download_path, file ) ) #INFO: You're and idiot. # You should NOT disable md5checksum for any files else: if ArgumentOptions.deb_bugs: bug_fetched = 0 if FetchBugReportsDebian.FetchBugsDebian( PackageName ) in [1, 2]: log.verbose( "Fetched bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) bug_fetched = 1 else: log.verbose( "Couldn't fetch bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) #FIXME: Don't know why this was really required. If this has no changes, delete it. #file = full_file_path.split("/") #file = file[len(file) - 1] #file = download_path + "/" + file if ArgumentOptions.zip_it: if FetcherInstance.compress_the_file( zip_upgrade_file, file ) != True: log.err( "Couldn't archive %s to file %s.%s\n" % ( file, zip_upgrade_file, LINE_OVERWRITE_SMALL ) ) sys.exit( 1 ) else: log.verbose( "%s added to archive %s.%s\n" % ( file, zip_upgrade_file, LINE_OVERWRITE_SMALL ) ) os.unlink( os.path.join( download_path, file ) ) else: # Since zip file option is not enabled let's copy the file to the target folder try: shutil.copy( full_file_path, download_path ) log.success( "%s copied from local cache directory %s.%s\n" % ( file, cache_dir, LINE_OVERWRITE_SMALL ) ) except shutil.Error: log.verbose( "%s already available in dest_dir. Skipping copy!!!%s\n" % ( file, LINE_OVERWRITE_SMALL ) ) # And also the bug reports if bug_fetched == 1: for x in os.listdir( os.curdir ): if ( x.startswith( PackageName ) and x.endswith( apt_bug_file_format ) ): shutil.move( x, download_path ) log.verbose( "Moved %s file to %s folder.%s\n" % ( x, download_path, LINE_OVERWRITE_MID ) ) else: #INFO: This block gets executed if the file is not found in local cache_dir or cache_dir is None # We go ahead and try to download it from the internet log.verbose( "%s not available in local cache %s.%s\n" % ( file, ArgumentOptions.cache_dir, LINE_OVERWRITE_MID ) ) log.msg( "Downloading %s %s - %s %s\n" % ( PackageName, PackageVersion, log.calcSize( download_size / 1024 ), LINE_OVERWRITE_MID ) ) if FetcherInstance.download_from_web( url, file, download_path ) == True: #INFO: This block gets executed if md5checksum is allowed if ArgumentOptions.disable_md5check is False: #INFO: Debian moved to SHA256. So we use that now. Older systems could have md5 log.verbose( "File %s has checksum %s\n" % ( file, checksum ) ) if FetcherInstance.CheckHashDigest( file, checksum ) is True: if ArgumentOptions.cache_dir and os.access( ArgumentOptions.cache_dir, os.W_OK ) == True: try: shutil.copy( file, ArgumentOptions.cache_dir ) log.verbose( "%s copied to local cache directory %s.%s\n" % ( file, ArgumentOptions.cache_dir, LINE_OVERWRITE_MID ) ) except shutil.Error: log.verbose( "%s already available in %s. Skipping copy!!!%s\n" % ( file, ArgumentOptions.cache_dir, LINE_OVERWRITE_MID ) ) else: log.verbose( "cache_dir %s is not writeable. Skipping copy to it.\n" % ( ArgumentOptions.cache_dir ) ) if ArgumentOptions.deb_bugs: if FetchBugReportsDebian.FetchBugsDebian( PackageName ) in [1, 2]: log.verbose( "Fetched bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) else: log.verbose( "Couldn't fetch bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) if ArgumentOptions.zip_it: if FetcherInstance.compress_the_file( zip_upgrade_file, file ) != True: log.err( "Couldn't archive %s to file %s.%s\n" % ( file, zip_upgrade_file, LINE_OVERWRITE_SMALL ) ) sys.exit( 1 ) else: log.verbose( "%s added to archive %s.%s\n" % ( file, zip_upgrade_file, LINE_OVERWRITE_SMALL ) ) os.unlink( os.path.join( download_path, file ) ) else: #INFO MD5 Checksum is incorrect. log.err( "%s MD5 Checksum mismatch.\n" % ( PackageName ) ) errlist.append( PackageName ) else: if ArgumentOptions.deb_bugs: if FetchBugReportsDebian.FetchBugsDebian( PackageName ) in [1, 2]: log.verbose( "Fetched bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) else: log.verbose( "Couldn't fetch bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) if ArgumentOptions.zip_it: if FetcherInstance.compress_the_file( zip_upgrade_file, file ) != True: log.err( "Couldn't archive %s to file %s.%s\n" % ( file, zip_upgrade_file, LINE_OVERWRITE_SMALL ) ) sys.exit( 1 ) else: log.verbose( "%s added to archive %s.%s\n" % ( file, zip_upgrade_file, LINE_OVERWRITE_SMALL ) ) os.unlink( os.path.join( download_path, file ) ) log.success( "\r%s %s done.%s\n" % ( PackageName, PackageVersion, LINE_OVERWRITE_FULL ) ) else: errlist.append( PackageName ) else: raise FetchDataKeyError
da63a417a8560a39ca821994468a1533f4c1445a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12499/da63a417a8560a39ca821994468a1533f4c1445a/AptOfflineCoreLib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2293, 16, 766, 16, 1326, 33, 4720, 67, 3645, 67, 1916, 4672, 9163, 967, 1516, 628, 326, 590, 7530, 16, 1207, 2182, 598, 1326, 9334, 1378, 326, 1686, 7563, 598, 326, 4884, 180...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2293, 16, 766, 16, 1326, 33, 4720, 67, 3645, 67, 1916, 4672, 9163, 967, 1516, 628, 326, 590, 7530, 16, 1207, 2182, 598, 1326, 9334, 1378, 326, 1686, 7563, 598, 326, 4884, 180...
if lastTag[1] == tag.tagFormatConstructed and \ lastTag[0] != tag.tagClassUniversal:
if tagSet and \ tagSet[0][1] == tag.tagFormatConstructed and \ tagSet[0][0] != tag.tagClassUniversal:
def __call__(self, substrate, asn1Spec=None, tagSet=None, length=None, state=stDecodeTag, recursiveFlag=1): # Decode tag & length while state != stStop: if state == stDecodeTag: # Decode tag if not substrate: raise error.SubstrateUnderrunError( 'Short octet stream on tag decoding' ) t = ord(substrate[0]) tagClass = t&0xC0 tagFormat = t&0x20 tagId = t&0x1F substrate = substrate[1:] if tagId == 0x1F: tagId = 0L while 1: if not substrate: raise error.SubstrateUnderrunError( 'Short octet stream on long tag decoding' ) t = ord(substrate[0]) tagId = tagId << 7 | (t&0x7F) substrate = substrate[1:] if not t&0x80: break lastTag = tag.Tag( tagClass=tagClass, tagFormat=tagFormat, tagId=tagId ) if tagSet is None: tagSet = tag.TagSet((), lastTag) # base tag not recovered else: tagSet = lastTag + tagSet state = stDecodeLength if state == stDecodeLength: # Decode length if not substrate: raise error.SubstrateUnderrunError( 'Short octet stream on length decoding' ) firstOctet = ord(substrate[0]) if firstOctet == 128: size = 1 length = -1 elif firstOctet < 128: length, size = firstOctet, 1 else: size = firstOctet & 0x7F # encoded in size bytes length = 0 lengthString = substrate[1:size+1] # missing check on maximum size, which shouldn't be a # problem, we can handle more than is possible if len(lengthString) != size: raise error.SubstrateUnderrunError( '%s<%s at %s' % (size, len(lengthString), tagSet) ) for char in lengthString: length = (length << 8) | ord(char) size = size + 1 state = stGetValueDecoder substrate = substrate[size:] if length != -1 and len(substrate) < length: raise error.SubstrateUnderrunError( '%d-octet short' % (length - len(substrate)) ) if state == stGetValueDecoder: if asn1Spec is None: state = stGetValueDecoderByTag else: state = stGetValueDecoderByAsn1Spec # # There're two ways of creating subtypes in ASN.1 what influences # decoder operation. These methods are: # 1) Either base types used in or no IMPLICIT tagging has been # applied on subtyping. # 2) Subtype syntax drops base type information (by means of # IMPLICIT tagging. # The first case allows for complete tag recovery from substrate # while the second one requires original ASN.1 type spec for # decoding. # # In either case a set of tags (tagSet) is coming from substrate # in an incremental, tag-by-tag fashion (this is the case of # EXPLICIT tag which is most basic). Outermost tag comes first # from the wire. # if state == stGetValueDecoderByTag: concreteDecoder = self.__codecMap.get(tagSet) if concreteDecoder: state = stDecodeValue else: concreteDecoder = self.__codecMap.get(tagSet[:1]) if concreteDecoder: state = stDecodeValue else: state = stTryAsExplicitTag if state == stGetValueDecoderByAsn1Spec: if tagSet == eoo.endOfOctets.getTagSet(): concreteDecoder = self.__codecMap[tagSet] state = stDecodeValue continue if type(asn1Spec) == types.DictType: __chosenSpec = asn1Spec.get(tagSet) elif asn1Spec is not None: __chosenSpec = asn1Spec else: __chosenSpec = None if __chosenSpec is None or not\ __chosenSpec.getTypeMap().has_key(tagSet): state = stTryAsExplicitTag else: # use base type for codec lookup to recover untagged types baseTag = __chosenSpec.getTagSet().getBaseTag() if baseTag: # XXX ugly baseTagSet = tag.TagSet(baseTag, baseTag) else: baseTagSet = tag.TagSet() concreteDecoder = self.__codecMap.get( # tagged subtype baseTagSet ) if concreteDecoder: asn1Spec = __chosenSpec state = stDecodeValue else: state = stTryAsExplicitTag if state == stTryAsExplicitTag: if lastTag[1] == tag.tagFormatConstructed and \ lastTag[0] != tag.tagClassUniversal: # Assume explicit tagging state = stDecodeTag else: raise error.PyAsn1Error( '%s not in asn1Spec: %s' % (tagSet, asn1Spec) ) if state == stDecodeValue: if recursiveFlag: decodeFun = self else: decodeFun = None if length == -1: # indef length value, substrate = concreteDecoder.indefLenValueDecoder( substrate, asn1Spec, tagSet, length, stGetValueDecoder, decodeFun ) else: value, _substrate = concreteDecoder.valueDecoder( substrate[:length], asn1Spec, tagSet, length, stGetValueDecoder, decodeFun ) if recursiveFlag: substrate = substrate[length:] else: substrate = _substrate state = stStop return value, substrate
ac0e1df7971b0dd7a7c006951b9c15edfdca2c57 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/586/ac0e1df7971b0dd7a7c006951b9c15edfdca2c57/decoder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 2373, 340, 16, 12211, 21, 1990, 33, 7036, 16, 1047, 694, 33, 7036, 16, 769, 33, 7036, 16, 919, 33, 334, 6615, 1805, 16, 5904, 4678, 33, 21, 4672, 468, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 2373, 340, 16, 12211, 21, 1990, 33, 7036, 16, 1047, 694, 33, 7036, 16, 769, 33, 7036, 16, 919, 33, 334, 6615, 1805, 16, 5904, 4678, 33, 21, 4672, 468, ...
if not bytesToRead: return
def doReadOut(self): """Runs in thread.""" try: buffer, bytesToRead, ignore = win32pipe.PeekNamedPipe(self.hStdoutR, 0) if not bytesToRead: return hr, data = win32file.ReadFile(self.hStdoutR, bytesToRead, None) except win32api.error: self.stdoutClosed = 1 if self.stderrClosed: return main.CONNECTION_LOST else: return self.handleChunk(data)
738e86ae95b1bbf61033460a54f61f6a864ac772 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/738e86ae95b1bbf61033460a54f61f6a864ac772/win32.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 1994, 1182, 12, 2890, 4672, 3536, 9361, 316, 2650, 12123, 775, 30, 1613, 16, 1731, 23321, 16, 2305, 273, 5657, 1578, 14772, 18, 30950, 7604, 11546, 12, 2890, 18, 76, 27334, 54, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 1994, 1182, 12, 2890, 4672, 3536, 9361, 316, 2650, 12123, 775, 30, 1613, 16, 1731, 23321, 16, 2305, 273, 5657, 1578, 14772, 18, 30950, 7604, 11546, 12, 2890, 18, 76, 27334, 54, 16, ...
if category_suffix: encoding = None if category_suffix in ('autoreply', 'members'): encoding = 'multipart/form-data' form = Form('%s/%s' % (adminurl, category_suffix), encoding=encoding)
encoding = None if category in ('autoreply', 'members'): encoding = 'multipart/form-data' if subcat: form = Form('%s/%s/%s' % (adminurl, category, subcat), encoding=encoding)
def show_results(mlist, doc, category, category_suffix, cgidata): # Produce the results page adminurl = mlist.GetScriptURL('admin') categories = mlist.GetConfigCategories() label = _(categories[category][0]) # Set up the document's headers realname = mlist.real_name doc.SetTitle(_('%(realname)s Administration (%(label)s)')) doc.AddItem(Center(Header(2, _( '%(realname)s mailing list administration<br>%(label)s Section')))) doc.AddItem('<hr>') # This holds the two columns of links linktable = Table(valign='top', width='100%') linktable.AddRow([Center(Bold(_("Configuration Categories"))), Center(Bold(_("Other Administrative Activities")))]) linktable.AddCellInfo(linktable.GetCurrentRowIndex(), 0, colspan=2) # The `other links' are stuff in the right column. otherlinks = UnorderedList() otherlinks.AddItem(Link(mlist.GetScriptURL('admindb'), _('Tend to pending moderator requests'))) otherlinks.AddItem(Link(mlist.GetScriptURL('listinfo'), _('Go to the general list information page'))) otherlinks.AddItem(Link(mlist.GetScriptURL('edithtml'), _('Edit the public HTML pages'))) otherlinks.AddItem(Link(mlist.GetBaseArchiveURL(), _('Go to list archives')).Format() + '<br>&nbsp;<br>') if mm_cfg.OWNERS_CAN_DELETE_THEIR_OWN_LISTS: otherlinks.AddItem(Link(mlist.GetScriptURL('rmlist'), _('Delete this mailing list')).Format() + _(' (requires confirmation)<br>&nbsp;<br>')) otherlinks.AddItem(Link('%s/logout' % adminurl, # BAW: What I really want is a blank line, but # adding an &nbsp; won't do it because of the # bullet added to the list item. '<FONT SIZE="+2"><b>%s</b></FONT>' % _('Logout'))) # These are links to other categories and live in the left column categorylinks_1 = categorylinks = UnorderedList() categorylinks_2 = '' categorykeys = categories.keys() half = len(categorykeys) / 2 counter = 0 for k in categorykeys: label = _(categories[k][0]) url = '%s/%s' % (adminurl, k) if k == category: # Handle subcategories subcats = mlist.GetConfigSubCategories(k) if subcats: subcat = Utils.GetPathPieces()[-1] for k, v in subcats: if k == subcat: break else: # The first subcategory in the list is the default subcat = subcats[0][0] subcat_items = [] for sub, text in subcats: if sub == subcat: text = Bold('[%s]' % text).Format() subcat_items.append(Link(url + '/' + sub, text)) categorylinks.AddItem( Bold(label).Format() + UnorderedList(*subcat_items).Format()) else: categorylinks.AddItem(Link(url, Bold('[%s]' % label))) else: categorylinks.AddItem(Link(url, label)) counter += 1 if counter >= half: categorylinks_2 = categorylinks = UnorderedList() counter = -len(categorykeys) # Add all the links to the links table... linktable.AddRow([categorylinks_1, categorylinks_2, otherlinks]) linktable.AddRowInfo(linktable.GetCurrentRowIndex(), valign='top') # ...and add the links table to the document. doc.AddItem(linktable) doc.AddItem('<hr>') # Now we need to craft the form that will be submitted, which will contain # all the variable settings, etc. This is a bit of a kludge because we # know that the autoreply and members categories supports file uploads. if category_suffix: encoding = None if category_suffix in ('autoreply', 'members'): # These have file uploads encoding = 'multipart/form-data' form = Form('%s/%s' % (adminurl, category_suffix), encoding=encoding) else: form = Form(adminurl) form.AddItem( _('''Make your changes in the following section, then submit them using the <em>Submit Your Changes</em> button below.''') + '<p>') # The members and passwords categories are special in that they aren't # defined in terms of gui elements. Create those pages here. if category == 'members': # Figure out which subcategory we should display subcat = Utils.GetPathPieces()[-1] if subcat not in ('list', 'add', 'remove'): subcat = 'list' # Add member category specific tables form.AddItem(membership_options(mlist, subcat, cgidata, doc, form)) form.AddItem(Center(submit_button())) # In "list" subcategory, we can also search for members if subcat == 'list': form.AddItem(_('''Find members by <a href="http://www.python.org/doc/current/lib/re-syntax.html">Python regular expression</a>:''')) form.AddItem(TextBox('findmember', value=cgidata.getvalue('findmember', ''), size='50%')) form.AddItem(SubmitButton('findmember_btn', _('Search...'))) elif category == 'passwords': form.AddItem(Center(password_inputs())) form.AddItem(Center(submit_button())) else: form.AddItem(show_variables(mlist, category, cgidata, doc)) form.AddItem(Center(submit_button())) # Add the separator form.AddItem('<hr>') # And add the form doc.AddItem(form) doc.AddItem(linktable) doc.AddItem(mlist.GetMailmanFooter())
33e83ee21ddc441fc27ffc328291a023e9e8557d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/33e83ee21ddc441fc27ffc328291a023e9e8557d/admin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 4717, 12, 781, 376, 16, 997, 16, 3150, 16, 3150, 67, 8477, 16, 14947, 350, 396, 4672, 468, 23278, 326, 1686, 1363, 3981, 718, 273, 312, 1098, 18, 967, 3651, 1785, 2668, 3666,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 4717, 12, 781, 376, 16, 997, 16, 3150, 16, 3150, 67, 8477, 16, 14947, 350, 396, 4672, 468, 23278, 326, 1686, 1363, 3981, 718, 273, 312, 1098, 18, 967, 3651, 1785, 2668, 3666,...
'thetasym': 'j', 'thetav': 'j',
'thetasym': 'J', 'thetav': 'J',
def _applyAttributes(obj, attr): for k, v in attr.items(): if type(v) is TupleType and v[0]=='relative': #AR 20/5/2000 - remove 1.5.2-ism #v = v[1]+getattr(obj,k,0) if hasattr(obj, k): v = v[1]+getattr(obj,k) else: v = v[1] setattr(obj,k,v)
ce9d1480244c6018dfcae58c9fb0a28b60ff3155 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/ce9d1480244c6018dfcae58c9fb0a28b60ff3155/paraparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9010, 2498, 12, 2603, 16, 1604, 4672, 364, 417, 16, 331, 316, 1604, 18, 3319, 13332, 309, 618, 12, 90, 13, 353, 7257, 559, 471, 331, 63, 20, 65, 18920, 11626, 4278, 468, 985, 42...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9010, 2498, 12, 2603, 16, 1604, 4672, 364, 417, 16, 331, 316, 1604, 18, 3319, 13332, 309, 618, 12, 90, 13, 353, 7257, 559, 471, 331, 63, 20, 65, 18920, 11626, 4278, 468, 985, 42...
errors.add(captcha_errors)
errors.append(captcha_errors)
def addSurveyAnswer(self, REQUEST=None, notify_respondent=False, **kwargs): """Add someone's answer""" try: if self.expired(): raise SurveyQuestionnaireException("The survey has expired") except SurveyQuestionnaireException, ex: if REQUEST: self.setSessionErrorsTrans(str(ex)) return REQUEST.RESPONSE.redirect('%s/index_html' % self.absolute_url()) else: raise
a4551fc8df3c34a6a77489a334b027b52a76f5d7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/a4551fc8df3c34a6a77489a334b027b52a76f5d7/SurveyQuestionnaire.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 22165, 13203, 12, 2890, 16, 12492, 33, 7036, 16, 5066, 67, 31786, 33, 8381, 16, 2826, 4333, 4672, 3536, 986, 18626, 1807, 5803, 8395, 775, 30, 309, 365, 18, 15820, 13332, 1002, 1668...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 22165, 13203, 12, 2890, 16, 12492, 33, 7036, 16, 5066, 67, 31786, 33, 8381, 16, 2826, 4333, 4672, 3536, 986, 18626, 1807, 5803, 8395, 775, 30, 309, 365, 18, 15820, 13332, 1002, 1668...
raise
def getInstallMethod(self,productname): ''' returns the installer method '''
4da95b80289afa399d28f6d1f29b91e73483b147 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/4da95b80289afa399d28f6d1f29b91e73483b147/QuickInstallerTool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 6410, 1305, 12, 2890, 16, 5896, 529, 4672, 9163, 1135, 326, 16050, 707, 9163, 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, 336, 6410, 1305, 12, 2890, 16, 5896, 529, 4672, 9163, 1135, 326, 16050, 707, 9163, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def fl_set_xyplot_fixed_yaxis(obj, bm, tm): """ fl_set_xyplot_fixed_yaxis(obj, bm, tm) """ _fl_set_xyplot_fixed_yaxis(obj, bm, tm)
def fl_set_xyplot_fixed_yaxis(pObject, bm, tm): """ fl_set_xyplot_fixed_yaxis(pObject, bm, tm) """ _fl_set_xyplot_fixed_yaxis(pObject, bm, tm)
def fl_set_xyplot_fixed_yaxis(obj, bm, tm): """ fl_set_xyplot_fixed_yaxis(obj, bm, tm) """ _fl_set_xyplot_fixed_yaxis(obj, bm, tm)
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, 542, 67, 1698, 4032, 67, 12429, 67, 93, 4890, 12, 84, 921, 16, 18829, 16, 6118, 4672, 3536, 1183, 67, 542, 67, 1698, 4032, 67, 12429, 67, 93, 4890, 12, 84, 921, 16, 18829, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 542, 67, 1698, 4032, 67, 12429, 67, 93, 4890, 12, 84, 921, 16, 18829, 16, 6118, 4672, 3536, 1183, 67, 542, 67, 1698, 4032, 67, 12429, 67, 93, 4890, 12, 84, 921, 16, 18829, ...
5: "Reserved1", 6: "Reserved2", 7: "File is a directory" } host_os = {
7: "File is a directory", } OS_NAME = {
def createFields(self): yield Bit(self, "vol", "Archive volume") yield Bit(self, "has_comment", "Whether there is a comment") yield Bit(self, "is_locked", "Archive volume") yield Bit(self, "is_solid", "Whether files can be extracted separately") yield Bit(self, "unused", "Unused bit") yield Bit(self, "has_authenticity_information", "The integrity/authenticity of the archive can be checked") yield Bits(self, "internal", 10, "Reserved for 'internal use'") yield UInt16(self, "head_size", "Block size", text_handler=humanFilesize) yield UInt16(self, "reserved1", "Reserved word", text_handler=hexadecimal) yield UInt32(self, "reserved2", "Reserved dword", text_handler=hexadecimal) if self["has_comment"].value==1: yield CommentBlock(self, "comment", "Archive compressed comment")
9be6b66d3e7ceacca1ad4a124689b228fec9523a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/9be6b66d3e7ceacca1ad4a124689b228fec9523a/rar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 2314, 12, 2890, 4672, 2824, 6539, 12, 2890, 16, 315, 15416, 3113, 315, 7465, 3940, 7923, 2824, 6539, 12, 2890, 16, 315, 5332, 67, 3469, 3113, 315, 18247, 1915, 353, 279, 2879, 7923,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2314, 12, 2890, 4672, 2824, 6539, 12, 2890, 16, 315, 15416, 3113, 315, 7465, 3940, 7923, 2824, 6539, 12, 2890, 16, 315, 5332, 67, 3469, 3113, 315, 18247, 1915, 353, 279, 2879, 7923,...
- ``pr2`` - the projection of D onto other (giving a
- ``pr2`` - the projection of ``D`` onto ``other`` (giving a
def direct_product(self,other,maps=True): """ Wraps GAP's DirectProduct, Embedding, and Projection. Sage calls GAP's DirectProduct, which chooses an efficient representation for the direct product. The direct product of permutation groups will be a permutation group again. For a direct product D, the GAP operation Embedding(D,i) returns the homomorphism embedding the i-th factor into D. The GAP operation Projection(D,i) gives the projection of D onto the i-th factor. INPUT: - ``self, other`` - permutation groups This method returns a 5-tuple - a permutation groups and 4 morphisms. OUTPUT: - ``D`` - a direct product of the inputs, returned as a permutation group as well - ``iota1`` - an embedding of self into D - ``iota2`` - an embedding of other into D - ``pr1`` - the projection of D onto self (giving a splitting 1 - other - D - self - 1) - ``pr2`` - the projection of D onto other (giving a splitting 1 - self - D - other - 1) EXAMPLES:: sage: G = CyclicPermutationGroup(4) sage: D = G.direct_product(G,False) sage: D Permutation Group with generators [(1,2,3,4), (5,6,7,8)] sage: D,iota1,iota2,pr1,pr2 = G.direct_product(G) sage: D; iota1; iota2; pr1; pr2 Permutation Group with generators [(1,2,3,4), (5,6,7,8)] Homomorphism : Cyclic group of order 4 as a permutation group --> Permutation Group with generators [(1,2,3,4), (5,6,7,8)] Homomorphism : Cyclic group of order 4 as a permutation group --> Permutation Group with generators [(1,2,3,4), (5,6,7,8)] Homomorphism : Permutation Group with generators [(1,2,3,4), (5,6,7,8)] --> Cyclic group of order 4 as a permutation group Homomorphism : Permutation Group with generators [(1,2,3,4), (5,6,7,8)] --> Cyclic group of order 4 as a permutation group :: sage: g=D([(1,3),(2,4)]); g (1,3)(2,4) sage: d=D([(1,4,3,2),(5,7),(6,8)]); d (1,4,3,2)(5,7)(6,8) sage: iota1(g); iota2(g); pr1(d); pr2(d) (1,3)(2,4) (5,7)(6,8) (1,4,3,2) (1,3)(2,4) """ from sage.groups.perm_gps.permgroup_morphism import PermutationGroupMorphism_from_gap G1 = self._gap_init_() G2 = other._gap_init_() cmd1 = "G:=DirectProduct("+G1+","+G2+")" cmd2 = "iota1:=Embedding(G,1)" cmd3 = "iota2:=Embedding(G,2)" cmd4 = "pr1:=Projection(G,1)" cmd5 = "pr2:=Projection(G,2)" if not(maps): return PermutationGroup(gap_group=gap.eval(cmd1)) else: D = PermutationGroup_generic(gap_group=gap.eval(cmd1)) iota1 = PermutationGroupMorphism_from_gap(self,D, cmd2, "iota1") iota2 = PermutationGroupMorphism_from_gap(other,D, cmd3, "iota2") pr1 = PermutationGroupMorphism_from_gap(D,self, cmd4, "pr1") pr2 = PermutationGroupMorphism_from_gap(D,other, cmd5, "pr2") return D,iota1,iota2,pr1,pr2
6ac30ecf5071d4fb909072e90d2311932d8c2165 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/6ac30ecf5071d4fb909072e90d2311932d8c2165/permgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2657, 67, 5896, 12, 2890, 16, 3011, 16, 10711, 33, 5510, 4672, 3536, 678, 7506, 611, 2203, 1807, 9908, 4133, 16, 14564, 7459, 16, 471, 21288, 18, 225, 348, 410, 4097, 611, 2203, 1807, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2657, 67, 5896, 12, 2890, 16, 3011, 16, 10711, 33, 5510, 4672, 3536, 678, 7506, 611, 2203, 1807, 9908, 4133, 16, 14564, 7459, 16, 471, 21288, 18, 225, 348, 410, 4097, 611, 2203, 1807, ...
special.append(make_parameter(argnames[-1], excess_keyword=True))
special.append(make_parameter(argnames[-1], excess_keyword=1))
def parse_parameter_list(self, node): parameters = [] special = [] argnames = list(node.argnames) if node.kwargs: special.append(make_parameter(argnames[-1], excess_keyword=True)) argnames.pop() if node.varargs: special.append(make_parameter(argnames[-1], excess_positional=True)) argnames.pop() defaults = list(node.defaults) defaults = [None] * (len(argnames) - len(defaults)) + defaults function_parameters = self.token_parser.function_parameters( node.lineno) #print >>sys.stderr, function_parameters for argname, default in zip(argnames, defaults): if type(argname) is TupleType: parameter = pynodes.parameter_tuple() for tuplearg in argname: parameter.append(make_parameter(tuplearg)) argname = normalize_parameter_name(argname) else: parameter = make_parameter(argname) if default: n_default = pynodes.parameter_default() n_default.append(Text(function_parameters[argname])) parameter.append(n_default) parameters.append(parameter) if parameters or special: special.reverse() parameters.extend(special) parameter_list = pynodes.parameter_list() parameter_list.extend(parameters) self.function.append(parameter_list)
60143834ff3d2268481227cd1e61a432fb384a62 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/60143834ff3d2268481227cd1e61a432fb384a62/moduleparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 6775, 67, 1098, 12, 2890, 16, 756, 4672, 1472, 273, 5378, 4582, 273, 5378, 1501, 1973, 273, 666, 12, 2159, 18, 297, 1600, 753, 13, 309, 756, 18, 4333, 30, 4582, 18, 6923, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 6775, 67, 1098, 12, 2890, 16, 756, 4672, 1472, 273, 5378, 4582, 273, 5378, 1501, 1973, 273, 666, 12, 2159, 18, 297, 1600, 753, 13, 309, 756, 18, 4333, 30, 4582, 18, 6923, 1...
Widget.remove_viewport(self)
self._hack_remove_viewport()
def remove_viewport(self): Widget.remove_viewport(self) self.view.setPolicyDelegate_(nil) self.view.setResourceLoadDelegate_(nil) self.view.setFrameLoadDelegate_(nil) self.view.setUIDelegate_(nil)
fdc3a1303ee66506efb8ce258b83693e1df5b947 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/fdc3a1303ee66506efb8ce258b83693e1df5b947/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 28852, 12, 2890, 4672, 365, 6315, 76, 484, 67, 4479, 67, 28852, 1435, 365, 18, 1945, 18, 542, 2582, 9586, 67, 12, 20154, 13, 365, 18, 1945, 18, 542, 1420, 2563, 9586, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 28852, 12, 2890, 4672, 365, 6315, 76, 484, 67, 4479, 67, 28852, 1435, 365, 18, 1945, 18, 542, 2582, 9586, 67, 12, 20154, 13, 365, 18, 1945, 18, 542, 1420, 2563, 9586, 67, 1...
print ' '*_colwidth,
weeks.append('')
def prcal(year): """Print a year's calendar.""" header = weekheader(2) format3c('', `year`, '') for q in range(January, January+12, 3): print format3c(month_name[q], month_name[q+1], month_name[q+2]) format3c(header, header, header) data = [] height = 0 for month in range(q, q+3): cal = monthcalendar(year, month) if len(cal) > height: height = len(cal) data.append(cal) for i in range(height): for cal in data: if i >= len(cal): print ' '*_colwidth, else: prweek(cal[i], 2) print _spacing, print
ae7e10502b1c72951d51cfcc82ea8e73858e55c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ae7e10502b1c72951d51cfcc82ea8e73858e55c0/calendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 846, 771, 12, 6874, 4672, 3536, 5108, 279, 3286, 1807, 5686, 12123, 1446, 273, 4860, 3374, 12, 22, 13, 740, 23, 71, 2668, 2187, 1375, 6874, 9191, 28707, 364, 1043, 316, 1048, 12, 46, 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, 846, 771, 12, 6874, 4672, 3536, 5108, 279, 3286, 1807, 5686, 12123, 1446, 273, 4860, 3374, 12, 22, 13, 740, 23, 71, 2668, 2187, 1375, 6874, 9191, 28707, 364, 1043, 316, 1048, 12, 46, 3...
oldShelvePickler = shelve.Pickler def binaryDefaultPickler(f, binary=1): return oldShelvePickler(f, binary) shelve.Pickler = binaryDefaultPickler
def bool(val): return not not val
17f7d7e35b3dc9066d3bef2ee3f76fbdc4a0dfbe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/17f7d7e35b3dc9066d3bef2ee3f76fbdc4a0dfbe/message.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1426, 12, 1125, 4672, 327, 486, 486, 1244, 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, 1426, 12, 1125, 4672, 327, 486, 486, 1244, 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...
subject = self.merge_message(cr, uid, str(action.subject), action, context) body = self.merge_message(cr, uid, str(action.message), action, context)
subject = self.merge_message(cr, uid, action.subject, action, context) body = self.merge_message(cr, uid, action.message, action, context)
def run(self, cr, uid, ids, context={}): logger = netsvc.Logger() for action in self.browse(cr, uid, ids, context): obj_pool = self.pool.get(action.model_id.model) obj = obj_pool.browse(cr, uid, context['active_id'], context=context) cxt = { 'context':context, 'object': obj, 'time':time, 'cr': cr, 'pool' : self.pool, 'uid' : uid } expr = eval(str(action.condition), cxt) if not expr: continue if action.state=='client_action': if not action.action_id: raise osv.except_osv(_('Error'), _("Please specify an action to launch !")) result = self.pool.get(action.action_id.type).read(cr, uid, action.action_id.id, context=context) return result
3055b72703c431e3f9f6f6b9e3f847b2e4e216b6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/3055b72703c431e3f9f6f6b9e3f847b2e4e216b6/ir_actions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 1194, 273, 21954, 4227, 18, 3328, 1435, 225, 364, 1301, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 16, 819, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 1194, 273, 21954, 4227, 18, 3328, 1435, 225, 364, 1301, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 16, 819, ...
out.write('{""}};\n')
out.write('{"", 0, iface_void, iface_void} };\n')
def printIFaceTableCXXFile(f,out): constants = [] functions = {} properties = {} for name in f.order: features = f.features[name] if features["Category"] != "Deprecated": if features["FeatureType"] == "val": if not StartsWith(name, "SCLEX_"): constants.append( (name, features["Value"]) ) elif features["FeatureType"] in ["fun","get","set"]: functions[name] = features if features["FeatureType"] == "get": propname = string.replace(name, "Get", "", 1) properties[propname] = (name, properties.get(propname,(None,None))[1]) elif features["FeatureType"] == "set": propname = string.replace(name, "Set", "", 1) properties[propname] = (properties.get(propname,(None,None))[0], name) for propname, (getterName, setterName) in properties.items(): getter = getterName and functions[getterName] setter = setterName and functions[setterName] getterValue, getterIndex, getterIndexName, getterType = 0, None, None, None setterValue, setterIndex, setterIndexName, setterType = 0, None, None, None propType, propIndex, propIndexName = None, None, None isok = (getterName or setterName) and not (getter is setter) if isok and getter: getterValue = getter['Value'] getterType = getter['ReturnType'] getterIndex = getter['Param1Type'] or 'void' getterIndexName = getter['Param1Name'] isok = ((getter['Param2Type'] or 'void') == 'void') if isok and setter: setterValue = setter['Value'] setterType = setter['Param1Type'] or 'void' setterIndex = 'void' if (setter['Param2Type'] or 'void') <> 'void': setterIndex = setterType setterIndexName = setter['Param1Name'] setterType = setter['Param2Type'] isok = (setter['ReturnType'] == 'void') if isok and getter and setter: isok = (getterType == setterType) and (getterIndex == setterIndex) propType = getterType or setterType propIndex = getterIndex or setterIndex propIndexName = getterIndexName or setterIndexName if isok: # do the types appear to be useable? THIS IS OVERRIDDEN BELOW isok = (propType in ('int', 'position', 'colour', 'bool', 'string') and propIndex in ('void','int','position','string','bool')) # If there were getters on string properties (which there are not), # they would have to follow a different protocol, and would not have # matched the signature above. I suggest this is the signature for # a string getter and setter: # get int funcname(void,stringresult) # set void funcname(void,string) # # For an indexed string getter and setter, the indexer goes in # wparam and must not be called 'int length', since 'int length' # has special meaning. # A bool indexer has a special meaning. It means "if the script # assigns the language's nil value to the property, call the # setter with args (0,0); otherwise call it with (1, value)." # # Although there are no getters indexed by bool, I suggest the # following protocol: If getter(1,0) returns 0, return nil to # the script. Otherwise return getter(0,0). if isok: properties[propname] = (getterValue, setterValue, propType, propIndex) # If it is exposed as a property, it should not be exposed as a function. if getter: constants.append( ("SCI_" + string.upper(getterName), getterValue) ) del(functions[getterName]) if setter: constants.append( ("SCI_" + string.upper(setterName), setterValue) ) del(functions[setterName]) else: del(properties[propname]) out.write("\nstatic IFaceConstant ifaceConstants[] = {") if constants: constants.sort() first = 1 for name, value in constants: if first: first = 0 else: out.write(",") out.write('\n\t{"%s",%s}' % (name, value)) out.write("\n};\n") else: out.write('{"",0}};\n') # Write an array of function descriptions. This can be # used as a sort of compiled typelib. out.write("\nstatic IFaceFunction ifaceFunctions[] = {") if functions: funclist = functions.items() funclist.sort() first = 1 for name, features in funclist: if first: first = 0 else: out.write(",") paramTypes = [ features["Param1Type"] or "void", features["Param2Type"] or "void" ] returnType = features["ReturnType"] # Fix-up: if a param is an int named length, change to iface_type_length. if features["Param1Type"] == "int" and features["Param1Name"] == "length": paramTypes[0] = "length" if features["Param2Type"] == "int" and features["Param2Name"] == "length": paramTypes[1] = "length" out.write('\n\t{"%s", %s, iface_%s, {iface_%s, iface_%s}}' % ( name, features["Value"], returnType, paramTypes[0], paramTypes[1] )) out.write("\n};\n") else: out.write('{""}};\n') out.write("\nstatic IFaceProperty ifaceProperties[] = {") if properties: proplist = properties.items() proplist.sort() first = 1 for propname, (getter, setter, valueType, paramType) in proplist: if first: first = 0 else: out.write(",") out.write('\n\t{"%s", %s, %s, iface_%s, iface_%s}' % ( propname, getter, setter, valueType, paramType )) out.write("\n};\n") else: out.write('{""}};\n') out.write("\nenum {\n") out.write("\tifaceFunctionCount = %d,\n" % len(functions)) out.write("\tifaceConstantCount = %d,\n" % len(constants)) out.write("\tifacePropertyCount = %d\n" % len(properties)) out.write("};\n\n")
64414d33ba5e9732721cf1f248ad0e736d29315c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5233/64414d33ba5e9732721cf1f248ad0e736d29315c/IFaceTableGen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 5501, 623, 1388, 39, 5619, 812, 12, 74, 16, 659, 4672, 6810, 273, 5378, 4186, 273, 2618, 1790, 273, 2618, 225, 364, 508, 316, 284, 18, 1019, 30, 4467, 273, 284, 18, 7139, 63, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 5501, 623, 1388, 39, 5619, 812, 12, 74, 16, 659, 4672, 6810, 273, 5378, 4186, 273, 2618, 1790, 273, 2618, 225, 364, 508, 316, 284, 18, 1019, 30, 4467, 273, 284, 18, 7139, 63, 5...
ret = self.rpc(self.RPC_ADDMMIO, args)
ret = self.rpc(self.RPC_DELMMIO, args) self.chkret(ret) def clr_mmio(self): ret = self.rpc(self.RPC_CLRMMIO)
def delmmio(self, start, size): args = struct.pack(">Q", start) ret = self.rpc(self.RPC_ADDMMIO, args) self.chkret(ret)
8c1f021721abfb9072d339078af05a732423e3ff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12735/8c1f021721abfb9072d339078af05a732423e3ff/netrpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1464, 7020, 1594, 12, 2890, 16, 787, 16, 963, 4672, 833, 273, 1958, 18, 2920, 2932, 34, 53, 3113, 787, 13, 325, 273, 365, 18, 7452, 12, 2890, 18, 8087, 67, 24733, 8206, 4294, 16, 833...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1464, 7020, 1594, 12, 2890, 16, 787, 16, 963, 4672, 833, 273, 1958, 18, 2920, 2932, 34, 53, 3113, 787, 13, 325, 273, 365, 18, 7452, 12, 2890, 18, 8087, 67, 24733, 8206, 4294, 16, 833...
self.check_sizeof(class_oldstyle().method, h + 4*p)
self.check_sizeof(class_oldstyle().method, size(h + '4P'))
def method(): pass
41a7ce0a2eee3580ab22cb5e90413d34cf7a0a61 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/41a7ce0a2eee3580ab22cb5e90413d34cf7a0a61/test_sys.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 707, 13332, 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, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 707, 13332, 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, -100, -100, -100, -100, ...
position: relative; top: 3px;
def render_list(ids, links): states = load_customlink_states() n = 0 for entry in links: n += 1 try: if type(entry[1]) == type(True): idss = ids + [str(n)] if states.get(''.join(idss), entry[1] and 'on' or 'off') == 'on': # open display = "" img = "link_folder_open.gif" else: display = "display: none; " img = "link_folder.gif" html.write('<h3 onclick="toggle_folder(this, \'%s\');" ' % ''.join(idss)) html.write('onmouseover="this.style.cursor=\'pointer\';" ') html.write('onmouseout="this.style.cursor=\'auto\';">') html.write('<img src="images/%s">' % img) html.write("%s</h3>\n" % entry[0]) html.write('<div style="%s" class=sublist>' % display) render_list(idss, entry[2]) html.write('</div>\n') elif type(entry[1]) == str: if len(entry) > 2: html.write('<img src="images/%s">' % entry[2]) else: html.write('<img src="images/link_link.gif">') simplelink(entry[0], entry[1]) else: html.write("Second part of tuple must be list or string, not %s\n" % str(entry[1])) except Exception, e: html.write("invalid entry %s: %s<br>\n" % (entry, e))
483aa73e24c9cd13926fa2177e6b93e1db3e7b7e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5589/483aa73e24c9cd13926fa2177e6b93e1db3e7b7e/shipped.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 1098, 12, 2232, 16, 4716, 4672, 5493, 273, 1262, 67, 3662, 1232, 67, 7992, 1435, 290, 273, 374, 364, 1241, 316, 4716, 30, 290, 1011, 404, 775, 30, 309, 618, 12, 4099, 63, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 1098, 12, 2232, 16, 4716, 4672, 5493, 273, 1262, 67, 3662, 1232, 67, 7992, 1435, 290, 273, 374, 364, 1241, 316, 4716, 30, 290, 1011, 404, 775, 30, 309, 618, 12, 4099, 63, 2...
Hdot = N.array(map(self.derivs, self.tresult, yres))[:,2] epsilon = - Hdot/yres[:,2]
if self.k is not None: Hdot = N.array(map(self.derivs, self.tresult, self.yresult))[:,2,0] epsilon = - Hdot/self.yresult[:,2,0] else: Hdot = N.array(map(self.derivs, self.tresult, self.yresult))[:,2] epsilon = - Hdot/self.yresult[:,2]
def getepsilon(self): """Return an array of epsilon = -\dot{H}/H values for each timestep.""" if self.runcount == 0: raise ModelError("Model has not been run yet, cannot plot results!") #Only need one background value to find epsilon so #pick only one k result to check if self.yresult.shape[2]: yres = self.yresult[:,:,0] else: yres = self.yresult #Find Hdot Hdot = N.array(map(self.derivs, self.tresult, yres))[:,2] epsilon = - Hdot/yres[:,2] return epsilon
977611ad72b505657477cc0576117615de555e74 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7283/977611ad72b505657477cc0576117615de555e74/cosmomodels.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 13058, 10327, 12, 2890, 4672, 3536, 990, 392, 526, 434, 12263, 273, 300, 64, 9811, 95, 44, 4004, 44, 924, 364, 1517, 27072, 12123, 309, 365, 18, 86, 551, 592, 422, 374, 30, 1002, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13058, 10327, 12, 2890, 4672, 3536, 990, 392, 526, 434, 12263, 273, 300, 64, 9811, 95, 44, 4004, 44, 924, 364, 1517, 27072, 12123, 309, 365, 18, 86, 551, 592, 422, 374, 30, 1002, ...
nim.advanced.lnb[x].powerThreshold = ConfigInteger(default=50, limits=(0, 100))
nim.advanced.lnb[x].powerThreshold = ConfigInteger(default=hw.get_device_name() == "dm8000" and 15 or 50, limits=(0, 100))
def InitNimManager(nimmgr): InitSecParams() config.Nims = ConfigSubList() for x in range(len(nimmgr.nim_slots)): config.Nims.append(ConfigSubsection()) for slot in nimmgr.nim_slots: x = slot.slot nim = config.Nims[x] if slot.isCompatible("DVB-S"): choices = { "nothing": _("nothing connected"), "simple": _("simple"), "advanced": _("advanced")} if len(nimmgr.getNimListOfType(slot.type, exception = x)) > 0: choices["equal"] = _("equal to") choices["satposdepends"] = _("second cable of motorized LNB") if len(nimmgr.canConnectTo(x)) > 0: choices["loopthrough"] = _("loopthrough to") nim.configMode = ConfigSelection(choices = choices, default = "nothing")
2aa5cf5a1bfe64fbb1ef6b082920c82ff927007a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6652/2aa5cf5a1bfe64fbb1ef6b082920c82ff927007a/NimManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4378, 50, 381, 1318, 12, 82, 381, 13552, 4672, 4378, 2194, 1370, 1435, 225, 642, 18, 50, 12097, 273, 1903, 1676, 682, 1435, 364, 619, 316, 1048, 12, 1897, 12, 82, 381, 13552, 18, 82, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4378, 50, 381, 1318, 12, 82, 381, 13552, 4672, 4378, 2194, 1370, 1435, 225, 642, 18, 50, 12097, 273, 1903, 1676, 682, 1435, 364, 619, 316, 1048, 12, 1897, 12, 82, 381, 13552, 18, 82, ...
sage: pos = C.__get_pos__()
sage: pos = C.get_pos()
def _render_on_subplot(self, subplot): options = self.options() opts = {} opts['color'] = options['rgbcolor'] opts['fontsize'] = int(options['fontsize']) opts['verticalalignment'] = options['vertical_alignment'] opts['horizontalalignment'] = options['horizontal_alignment'] if options['axis_coords']: opts['transform'] = subplot.transAxes subplot.text(float(self.x), float(self.y), self.string, **opts)
6a66b5d7e64a05bbf5c2d6e7698434fcc0e6d13e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/6a66b5d7e64a05bbf5c2d6e7698434fcc0e6d13e/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 67, 265, 67, 24523, 12, 2890, 16, 19826, 4672, 702, 273, 365, 18, 2116, 1435, 1500, 273, 2618, 1500, 3292, 3266, 3546, 273, 702, 3292, 10948, 3266, 3546, 1500, 3292, 23055, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5902, 67, 265, 67, 24523, 12, 2890, 16, 19826, 4672, 702, 273, 365, 18, 2116, 1435, 1500, 273, 2618, 1500, 3292, 3266, 3546, 273, 702, 3292, 10948, 3266, 3546, 1500, 3292, 23055, 35...
pos=wxPoint(0, 0), size=wxSize(112, 99), style=0) self.staticBox2.SetConstraints(LayoutAnchors(self.staticBox2, false, true, true, false))
pos=wxPoint(0, 0), size=wxSize(112, 112), style=0) self.staticBox2.SetConstraints(LayoutAnchors(self.staticBox2, False, True, True, False))
def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSize(451, 455)) self.SetAutoLayout(true) self.SetSizeHints(425, 400, -1, -1) self.Center(wxBOTH) EVT_SIZE(self, self.OnStcstyleeditdlgSize)
aac0471ac41eaa175cbaa05604248123746b2b22 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/aac0471ac41eaa175cbaa05604248123746b2b22/STCStyleEditor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 67, 16277, 87, 12, 2890, 16, 846, 496, 4672, 468, 4374, 707, 16, 2727, 1404, 3874, 7075, 6353, 16186, 2738, 972, 12, 2890, 16, 612, 33, 27226, 734, 67, 882, 39, 15066, 10776...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2738, 67, 16277, 87, 12, 2890, 16, 846, 496, 4672, 468, 4374, 707, 16, 2727, 1404, 3874, 7075, 6353, 16186, 2738, 972, 12, 2890, 16, 612, 33, 27226, 734, 67, 882, 39, 15066, 10776...
else:
else:
def test(self, learner=None): # testing if self.results and learner: learners = [learner] else: learners = self.learnDict.values() if not learners: return
4a5d0b6408fb255b8754ad2849a498c83b9e6cc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/4a5d0b6408fb255b8754ad2849a498c83b9e6cc3/OWTestLearners.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 12, 2890, 16, 884, 24834, 33, 7036, 4672, 468, 7769, 309, 365, 18, 4717, 471, 884, 24834, 30, 16094, 414, 273, 306, 298, 24834, 65, 469, 30, 16094, 414, 273, 365, 18, 21346, 5014...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 12, 2890, 16, 884, 24834, 33, 7036, 4672, 468, 7769, 309, 365, 18, 4717, 471, 884, 24834, 30, 16094, 414, 273, 306, 298, 24834, 65, 469, 30, 16094, 414, 273, 365, 18, 21346, 5014...
s = int(raw_input()) if s == 1910:
cc = raw_input() if cc[0] == 'a': s = int(cc[1:])
def __init__(self, s): self.nickname = s
6b37284f853a674723743852db7cd69122794534 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14397/6b37284f853a674723743852db7cd69122794534/rotator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 272, 4672, 365, 18, 17091, 529, 273, 272, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 272, 4672, 365, 18, 17091, 529, 273, 272, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def AS_TYPE_64BIT(as_): return \
def AS_TYPE_64BIT(as): return \
def AS_TYPE_64BIT(as_): return \
6ff23bf28b074b9f360552e127533c0ee8bdd4d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/6ff23bf28b074b9f360552e127533c0ee8bdd4d5/STROPTS.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5355, 67, 2399, 67, 1105, 15650, 12, 345, 4672, 327, 521, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 5355, 67, 2399, 67, 1105, 15650, 12, 345, 4672, 327, 521, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if '"' in token: token = token.replace('"', '\\"') if ' ' in token or '\t' in token or '\n' in token or '\r' in token: token = '"%s"' % token
if not token: token = '""' else: if '"' in token: token = token.replace('"', '\\"') if ' ' in token or \ '\t' in token or \ '\n' in token or \ '\r' in token: token = '"%s"' % token
def argv_to_cmdline(argv): """ Convert a list of arguments to a single command line string.
953a0fc1147b5e2076f4a23255aa8db8a8e4b5e9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7261/953a0fc1147b5e2076f4a23255aa8db8a8e4b5e9/system.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5261, 67, 869, 67, 4172, 1369, 12, 19485, 4672, 3536, 4037, 279, 666, 434, 1775, 358, 279, 2202, 1296, 980, 533, 18, 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, 5261, 67, 869, 67, 4172, 1369, 12, 19485, 4672, 3536, 4037, 279, 666, 434, 1775, 358, 279, 2202, 1296, 980, 533, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if o in ("-t", "--tv_dir"):
elif o in ("-t", "--tv_dir"):
def usage(): print "sofabuddy.py [options]" print 'Example' print '\tsofabuddy.py -d "/media/downloads" -h "192.168.1.1"' print "Options" print "\t-?, --help\t\t\tWill bring up this message" print "\t-d, --download_dir\t\tOverride the default download directory" print "\t-n, --nuke_dir\t\t\tOverride the default nuke directory" print "\t-t, --tv_dir\t\t\tOverride the default tv directory" print "\t-l, --log_file\t\t\tChoose the location for your log file (default=/tmp/sofabuddy_log)" print "\t-h, --host=HOST\t\t\tChoose the ip address of your XBMC box (default=127.0.0.1)" pass
52e31e1e2c22ba1bc5c3d6708f78508e14749819 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13915/52e31e1e2c22ba1bc5c3d6708f78508e14749819/sofabuddy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 315, 87, 792, 12941, 449, 93, 18, 2074, 306, 2116, 4279, 1172, 296, 10908, 11, 1172, 2337, 3428, 792, 12941, 449, 93, 18, 2074, 300, 72, 2206, 5829, 19, 7813, 87, 6,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 315, 87, 792, 12941, 449, 93, 18, 2074, 306, 2116, 4279, 1172, 296, 10908, 11, 1172, 2337, 3428, 792, 12941, 449, 93, 18, 2074, 300, 72, 2206, 5829, 19, 7813, 87, 6,...
raise TokenUpgradeFailed({'status': server_response.status,
raise TokenUpgradeFailed({'status': response.status,
def UpgradeToSessionToken(self): """Upgrades a single use AuthSub token to a session token.
90074f96c051bd8621c77cd987af8a9ee557842e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10620/90074f96c051bd8621c77cd987af8a9ee557842e/service.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17699, 774, 2157, 1345, 12, 2890, 4672, 3536, 1211, 13088, 279, 2202, 999, 3123, 1676, 1147, 358, 279, 1339, 1147, 18, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 17699, 774, 2157, 1345, 12, 2890, 4672, 3536, 1211, 13088, 279, 2202, 999, 3123, 1676, 1147, 358, 279, 1339, 1147, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def showMessage(self, item):
def showMessage(self, item, olditem):
def showMessage(self, item): """ show item data in a messagebox """ self.showMessageBox(str(item.data(32).toString()))
037568dc5960fe0f55f627faf210c87f5ee28788 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6341/037568dc5960fe0f55f627faf210c87f5ee28788/debug.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 1079, 12, 2890, 16, 761, 16, 1592, 1726, 4672, 3536, 2405, 761, 501, 316, 279, 883, 2147, 3536, 365, 18, 4500, 27647, 12, 701, 12, 1726, 18, 892, 12, 1578, 2934, 10492, 1435, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 1079, 12, 2890, 16, 761, 16, 1592, 1726, 4672, 3536, 2405, 761, 501, 316, 279, 883, 2147, 3536, 365, 18, 4500, 27647, 12, 701, 12, 1726, 18, 892, 12, 1578, 2934, 10492, 1435, 371...
Column('name', Integer, ),
Column('name', Text, ),
def make_tables( me): t1 = Table('table1', me.meta, Column('name', Integer, ), Column('id', Integer, primary_key=True), Column('t2_id', Integer, ForeignKey('table2.id',) ) )
0f83da09f61ddca2ef8ebb0e70a73f03c5bed818 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10808/0f83da09f61ddca2ef8ebb0e70a73f03c5bed818/ref_AxA.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 9373, 12, 1791, 4672, 268, 21, 273, 3555, 2668, 2121, 21, 2187, 1791, 18, 3901, 16, 4753, 2668, 529, 2187, 3867, 16, 262, 16, 4753, 2668, 350, 2187, 2144, 16, 3354, 67, 856, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 9373, 12, 1791, 4672, 268, 21, 273, 3555, 2668, 2121, 21, 2187, 1791, 18, 3901, 16, 4753, 2668, 529, 2187, 3867, 16, 262, 16, 4753, 2668, 350, 2187, 2144, 16, 3354, 67, 856, ...
for i, a in enumerate(t.names): if i == 0: self.write(", ") self.write(a.name) if a.asname: self.write(" as "+a.asname)
interleave(lambda: self.write(", "), self.dispatch, t.names)
def _ImportFrom(self, t): self.fill("from ") self.write(t.module) self.write(" import ") for i, a in enumerate(t.names): if i == 0: self.write(", ") self.write(a.name) if a.asname: self.write(" as "+a.asname) # XXX(jpe) what is level for?
124df8398dfcb176fbf568130864aad9c8aac103 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/124df8398dfcb176fbf568130864aad9c8aac103/unparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5010, 1265, 12, 2890, 16, 268, 4672, 365, 18, 5935, 2932, 2080, 9369, 365, 18, 2626, 12, 88, 18, 2978, 13, 365, 18, 2626, 2932, 1930, 9369, 1554, 19574, 12, 14661, 30, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5010, 1265, 12, 2890, 16, 268, 4672, 365, 18, 5935, 2932, 2080, 9369, 365, 18, 2626, 12, 88, 18, 2978, 13, 365, 18, 2626, 2932, 1930, 9369, 1554, 19574, 12, 14661, 30, 365, 18, ...
def robustify(func): def robuster(*args, **kwargs): try: func(*args, **kwargs) except ftplib.error_temp: self=args[0] try: self.login(self.user, self.passwd, self.acct) except (socket.error, IOError): self.connect(self.host, self.port) self.login(self.user, self.passwd, self.acct) return func(*args, **kwargs) return robuster robustify=staticmethod(robustify)
def login(self, user='', passwd='', acct=''): self.user=user self.passwd=passwd self.acct=acct ftplib.FTP.login(self, user, passwd, acct)
f4eb437d00a665f662ae25d75ce8531afedea6b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5832/f4eb437d00a665f662ae25d75ce8531afedea6b7/ftpfs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3925, 12, 2890, 16, 729, 2218, 2187, 19093, 2218, 2187, 20774, 2218, 11, 4672, 365, 18, 1355, 33, 1355, 365, 18, 24002, 33, 24002, 365, 18, 1077, 299, 33, 1077, 299, 11038, 6673, 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, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3925, 12, 2890, 16, 729, 2218, 2187, 19093, 2218, 2187, 20774, 2218, 11, 4672, 365, 18, 1355, 33, 1355, 365, 18, 24002, 33, 24002, 365, 18, 1077, 299, 33, 1077, 299, 11038, 6673, 18, 1...
return HttpResponseRedirect('/finance/accounts/')
return HttpResponseRedirect(reverse('chezbob.finance.views.account_list'))
def redirect(request): return HttpResponseRedirect('/finance/accounts/')
6c9cd4ceb814e9aa7328b665d1c3ce54610b3939 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8066/6c9cd4ceb814e9aa7328b665d1c3ce54610b3939/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3136, 12, 2293, 4672, 327, 31780, 12, 9845, 2668, 343, 6664, 70, 947, 18, 926, 1359, 18, 7061, 18, 4631, 67, 1098, 26112, 225, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3136, 12, 2293, 4672, 327, 31780, 12, 9845, 2668, 343, 6664, 70, 947, 18, 926, 1359, 18, 7061, 18, 4631, 67, 1098, 26112, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def documentPackage0(path, builder=DocBuilder0()):
def documentPackage0(pathOrName, builder=GraphPdfDocBuilder0()):
def documentPackage0(path, builder=DocBuilder0()): """Generate documentation for one Python package in some format. Rigiht now, 'path' must be a filesystem path, later it will also be a package name whose path will be resolved by importing the top-level module. The doc file will always be saved in the current directory. """ name = path if string.find(path, os.sep) > -1: name = os.path.splitext(os.path.basename(path))[0] else: package = __import__(name) name = path path = os.path.dirname(package.__file__) cwd = os.getcwd() builder.beginPackage(name) os.path.walk(path, _packageWalkCallback, builder) builder.endPackage(name) os.chdir(cwd)
55005c7079d87799b39b50803338d97c2a77c532 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/55005c7079d87799b39b50803338d97c2a77c532/graphicsdoc0.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1668, 2261, 20, 12, 803, 29239, 16, 2089, 33, 4137, 18562, 1759, 1263, 20, 1435, 4672, 3536, 4625, 7323, 364, 1245, 6600, 2181, 316, 2690, 740, 18, 225, 534, 360, 77, 647, 2037, 16, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1668, 2261, 20, 12, 803, 29239, 16, 2089, 33, 4137, 18562, 1759, 1263, 20, 1435, 4672, 3536, 4625, 7323, 364, 1245, 6600, 2181, 316, 2690, 740, 18, 225, 534, 360, 77, 647, 2037, 16, 29...
start_path = "'" + start_path + "'"
start_path = "'/'"
def run(port): ## Create the config file if secure: if not os.path.exists(private_pem) or not os.path.exists(public_pem): print "In order to use an SECURE encrypted notebook, you must first run notebook.setup()." print "Now running notebook.setup()" notebook_setup() if not os.path.exists(private_pem) or not os.path.exists(public_pem): print "Failed to setup notebook. Please try notebook.setup() again manually." strport = 'tls:%s:privateKey=%s:certKey=%s'%(port, private_pem, public_pem) else: strport = 'tcp:%s'%port
477d8882ef122e2c24000251116cbcf93eb5d829 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/477d8882ef122e2c24000251116cbcf93eb5d829/run_notebook.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 655, 4672, 7541, 1788, 326, 642, 585, 309, 8177, 30, 309, 486, 1140, 18, 803, 18, 1808, 12, 1152, 67, 20313, 13, 578, 486, 1140, 18, 803, 18, 1808, 12, 482, 67, 20313, 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, 1086, 12, 655, 4672, 7541, 1788, 326, 642, 585, 309, 8177, 30, 309, 486, 1140, 18, 803, 18, 1808, 12, 1152, 67, 20313, 13, 578, 486, 1140, 18, 803, 18, 1808, 12, 482, 67, 20313, 4672...
identity.__doc__ = projection_func_identity.__doc__
def identity(self): """ Returns the identity projection.
346f358354c345210a872f113663df4917187850 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/346f358354c345210a872f113663df4917187850/polyhedra.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4215, 12, 2890, 4672, 3536, 2860, 326, 4215, 8106, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4215, 12, 2890, 4672, 3536, 2860, 326, 4215, 8106, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
""" Unpacks iwparam. """
""" Unpacks iw_freq. """
def parse(self, data): """ Unpacks iwparam. """ size = struct.calcsize(self.fmt) m, e, dummy, pad = struct.unpack(self.fmt, data[:size]) # XXX well, its not *the* frequency - we need a better name if e == 0: return m else: return float(m)*10**e
8ce3a1b005a75d86738d1e1d8019999b3463b2b0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3159/8ce3a1b005a75d86738d1e1d8019999b3463b2b0/iwlibs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 501, 4672, 3536, 25411, 87, 25522, 67, 10212, 18, 3536, 963, 273, 1958, 18, 12448, 1467, 12, 2890, 18, 8666, 13, 312, 16, 425, 16, 9609, 16, 4627, 273, 1958, 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, 1109, 12, 2890, 16, 501, 4672, 3536, 25411, 87, 25522, 67, 10212, 18, 3536, 963, 273, 1958, 18, 12448, 1467, 12, 2890, 18, 8666, 13, 312, 16, 425, 16, 9609, 16, 4627, 273, 1958, 18, ...
self.config.printWarning(1, "%s: File doesn't exist" % rfi.filename)
def __verifyFileInstall(self, rfi, db, pathPrefix=''): """Return 1 if file with RpmFileInfo rfi should be installed.
a4a130dd21a62e71a1a4cee6655eaab63daafb17 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/a4a130dd21a62e71a1a4cee6655eaab63daafb17/package.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 8705, 812, 6410, 12, 2890, 16, 9075, 77, 16, 1319, 16, 30262, 2218, 11, 4672, 3536, 990, 404, 309, 585, 598, 534, 7755, 11995, 9075, 77, 1410, 506, 5876, 18, 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, 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, 8705, 812, 6410, 12, 2890, 16, 9075, 77, 16, 1319, 16, 30262, 2218, 11, 4672, 3536, 990, 404, 309, 585, 598, 534, 7755, 11995, 9075, 77, 1410, 506, 5876, 18, 2, -100, -100, -100,...
sage: b = function('f', x).diff(x).diff(x)
sage: b = f(x).diff(x, x)
def derivative(self, ex, operator): """ EXAMPLES::
a2648bce7d829c98198521873589084f0019ebd3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/a2648bce7d829c98198521873589084f0019ebd3/expression_conversions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16417, 12, 2890, 16, 431, 16, 3726, 4672, 3536, 5675, 8900, 11386, 2866, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16417, 12, 2890, 16, 431, 16, 3726, 4672, 3536, 5675, 8900, 11386, 2866, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
'macro': XRefRole(), 'data': XRefRole(), 'type': XRefRole(),
'type': XRefRole()
def describe_signature(self, signode, (rv, func)): signode += addnodes.desc_type('', '') self.attach_type(signode, rv) signode += nodes.Text(u' ') self._attach_function(signode, func) return func.name
7f5e4a271faea175a9cf51e8caf64f6063af15a4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5532/7f5e4a271faea175a9cf51e8caf64f6063af15a4/cpp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6401, 67, 8195, 12, 2890, 16, 1573, 390, 16, 261, 4962, 16, 1326, 3719, 30, 1573, 390, 1011, 527, 4690, 18, 5569, 67, 723, 2668, 2187, 28707, 365, 18, 7331, 67, 723, 12, 2977, 390, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6401, 67, 8195, 12, 2890, 16, 1573, 390, 16, 261, 4962, 16, 1326, 3719, 30, 1573, 390, 1011, 527, 4690, 18, 5569, 67, 723, 2668, 2187, 28707, 365, 18, 7331, 67, 723, 12, 2977, 390, 1...
if os.path.exists("/etc/hosts.bck"):
if os.path.exists(self.settings["chroot_path"]+"/etc/hosts.bck"):
def clean(self): if self.settings.has_key("AUTORESUME") \ and os.path.exists(self.settings["autoresume_path"]+"clean"): print "Resume point detected, skipping clean operation..." else: for x in self.settings["cleanables"]: print "Cleaning chroot: "+x+"... " cmd("rm -rf "+self.settings["destpath"]+x,"Couldn't clean "+x,env=self.env)
bec68c110eb07178464af2537e22bf14b5ab675d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7327/bec68c110eb07178464af2537e22bf14b5ab675d/generic_stage_target.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 12, 2890, 4672, 309, 365, 18, 4272, 18, 5332, 67, 856, 2932, 37, 1693, 8607, 30590, 7923, 521, 471, 1140, 18, 803, 18, 1808, 12, 2890, 18, 4272, 9614, 6079, 25158, 67, 803, 6, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 12, 2890, 4672, 309, 365, 18, 4272, 18, 5332, 67, 856, 2932, 37, 1693, 8607, 30590, 7923, 521, 471, 1140, 18, 803, 18, 1808, 12, 2890, 18, 4272, 9614, 6079, 25158, 67, 803, 6, ...
if int(self.opts.get('vim', 'foreground_jump')):
if self.registry.foreground_jump.value():
def edit_foreground(self): """ Put vim into the foreground """ # Check the configuration option. if int(self.opts.get('vim', 'foreground_jump')): # Call the method of the vim communication window. self.cw.foreground(self.currentserver)
06d963e67d943cc73d3e40bcefeeb2d02dc58ce2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2233/06d963e67d943cc73d3e40bcefeeb2d02dc58ce2/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 67, 1405, 2915, 12, 2890, 4672, 3536, 4399, 18727, 1368, 326, 16231, 3536, 468, 2073, 326, 1664, 1456, 18, 309, 365, 18, 9893, 18, 1405, 2915, 67, 24574, 18, 1132, 13332, 468, 3049...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 67, 1405, 2915, 12, 2890, 4672, 3536, 4399, 18727, 1368, 326, 16231, 3536, 468, 2073, 326, 1664, 1456, 18, 309, 365, 18, 9893, 18, 1405, 2915, 67, 24574, 18, 1132, 13332, 468, 3049...
def help(self, s): os.system('maxima -r "describe(%s);"'%s)
def help(self, s): os.system('maxima -r "describe(%s);"'%s)
8b098931549684ba56ac6f9f4ed813420490b4e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/8b098931549684ba56ac6f9f4ed813420490b4e3/maxima.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2809, 12, 2890, 16, 272, 4672, 1140, 18, 4299, 2668, 1896, 13888, 300, 86, 315, 22748, 9275, 87, 1769, 5187, 9, 87, 13, 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, 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, 2809, 12, 2890, 16, 272, 4672, 1140, 18, 4299, 2668, 1896, 13888, 300, 86, 315, 22748, 9275, 87, 1769, 5187, 9, 87, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
def debug(fn): rval = maybeutf(fn) print fn, rval return rval return debug
return maybeutf
def maybeutf(fn): header = file(fn).read(4) if header.startswith(codecs.BOM_UTF8): return 'utf_8' elif header.startswith(codecs.BOM_UTF16_BE): return 'utf_16_be' elif header.startswith(codecs.BOM_UTF16_LE): return 'utf_16_le' # some hacks to guess BOM-less UTF-16 text elif header[0::2] == '\x00\x00' and header[1::2] != '\x00\x00': return 'utf_16_be' elif header[1::2] == '\x00\x00' and header[0::2] != '\x00\x00': return 'utf_16_le' # anything else is undetermined, can't match # utf-8 against <?xm because it's the same in # all of the latin/romanish codecs firstline = file(fn).readline() if firstline.startswith('<?xml version="1.0" encoding="UTF-8"?>'): return 'utf_8' if firstline.startswith('// !$*UTF8*$!'): return 'utf_8' return encoding
3e29fe61931c46b273b829f5494f5f340bb4f5be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/3e29fe61931c46b273b829f5494f5f340bb4f5be/project-tool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6944, 3158, 12, 4293, 4672, 1446, 273, 585, 12, 4293, 2934, 896, 12, 24, 13, 309, 1446, 18, 17514, 1918, 12, 710, 2143, 18, 38, 1872, 67, 5159, 28, 4672, 327, 296, 3158, 67, 28, 11, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6944, 3158, 12, 4293, 4672, 1446, 273, 585, 12, 4293, 2934, 896, 12, 24, 13, 309, 1446, 18, 17514, 1918, 12, 710, 2143, 18, 38, 1872, 67, 5159, 28, 4672, 327, 296, 3158, 67, 28, 11, ...
glpane.qglColor(RGBf_to_QColor(labels_color)) fm = QFontMetrics(labelFont) label_text = QString(strand.name) textsize = fm.width(label_text) textpos = atom.posn()-chunk.center+halfbond+10.0*glpane.out dright = 0.0025*textsize*glpane.scale*glpane.right if dot(glpane.right,halfbond)<0.0: textpos -= dright glDisable(GL_LIGHTING)
atom1 = chunk.ladder.axis_rail.baseatoms[pos-1] atom2 = chunk.ladder.axis_rail.baseatoms[pos] dpos = atom2.posn()-atom1.posn() last_dpos = dpos dvec = norm(cross(dpos,glpane.out)) pos0 = atom0.posn()-chunk.center s_atom0 = chunk.ladder.strand_rails[0].baseatoms[pos] s_atom1 = chunk.ladder.strand_rails[1].baseatoms[pos] bvec = norm(s_atom0.posn()-s_atom1.posn()) pos3 = pos0+7.0*dvec pos4 = pos0-7.0*dvec pos1 = pos3 pos2 = pos4 """ base_color = self.getBaseColor(s_atom0.getDnaBaseName()) glColor3f(base_color[0],base_color[1],base_color[2]) glVertex3f(pos0[0], pos0[1], pos0[2]) glVertex3f(pos1[0], pos1[1], pos1[2]) base_color = self.getBaseColor(s_atom1.getDnaBaseName()) glColor3f(base_color[0],base_color[1],base_color[2]) glVertex3f(pos0[0], pos0[1], pos0[2]) glVertex3f(pos2[0], pos2[1], pos2[2]) glColor3f(0,0,0) """ glEnd() textpos = pos0+0.5*(pos1-pos0) label_text = QString(s_atom0.getDnaBaseName()) dx, dy = realTextSize(label_text, fm) textpos -= 0.5*(dx+dy) base_color = self.getBaseColor(s_atom0.getDnaBaseName()) glColor3f(base_color[0],base_color[1],base_color[2])
def drawchunk_realtime(self, glpane, chunk): """ Draws the chunk style that may depend on a current view. These are experimental features, work in progress as of 080319. For the DNA style, draws base orientation indicators and strand labels. 080321 piotr: added better label positioning and """ from utilities.constants import lightgreen from PyQt4.Qt import QFont, QString, QColor, QFontMetrics from widgets.widget_helpers import RGBf_to_QColor from dna.model.DnaLadderRailChunk import DnaStrandChunk
fa2693b26ceef2777006115304d0a340bfb6e06a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/fa2693b26ceef2777006115304d0a340bfb6e06a/DnaCylinderChunks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 6551, 67, 7688, 957, 12, 2890, 16, 5118, 29009, 16, 2441, 4672, 3536, 10184, 87, 326, 2441, 2154, 716, 2026, 2447, 603, 279, 783, 1476, 18, 8646, 854, 23070, 4467, 16, 1440, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 6551, 67, 7688, 957, 12, 2890, 16, 5118, 29009, 16, 2441, 4672, 3536, 10184, 87, 326, 2441, 2154, 716, 2026, 2447, 603, 279, 783, 1476, 18, 8646, 854, 23070, 4467, 16, 1440, 316, ...
Packages the given binary data in an API frame and _writes the
Packages the given binary data in an API frame and writes the
def _write(self, data): """ _write: binary data -> None Packages the given binary data in an API frame and _writes the result to the serial port """ self.serial._write(APIFrame(data).output())
0da4cb78992c03caebe18e8795dbb1c1e08e13e8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3676/0da4cb78992c03caebe18e8795dbb1c1e08e13e8/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 12, 2890, 16, 501, 4672, 3536, 389, 2626, 30, 3112, 501, 317, 599, 225, 7930, 1023, 326, 864, 3112, 501, 316, 392, 1491, 2623, 471, 7262, 326, 563, 358, 326, 2734, 1756, 353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 12, 2890, 16, 501, 4672, 3536, 389, 2626, 30, 3112, 501, 317, 599, 225, 7930, 1023, 326, 864, 3112, 501, 316, 392, 1491, 2623, 471, 7262, 326, 563, 358, 326, 2734, 1756, 353...
self.http.stop()
self.server.stop()
def test(self): s = self.connect() s.sendall('GET / HTTP/1.1\r\nHost: localhost\r\n\r\n') s.sendall('GET / HTTP/1.1\r\nHost: localhost\r\n\r\n') s.close() self.http.stop() gevent.sleep(0.02) # stopping what already stopped is OK self.http.stop()
b9d930ec135c6f617f8874d9ec2c540d777d4b53 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10423/b9d930ec135c6f617f8874d9ec2c540d777d4b53/test__http.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 12, 2890, 4672, 272, 273, 365, 18, 3612, 1435, 272, 18, 4661, 454, 2668, 3264, 342, 2239, 19, 21, 18, 21, 64, 86, 64, 82, 2594, 30, 17365, 64, 86, 64, 82, 64, 86, 64, 82, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 12, 2890, 4672, 272, 273, 365, 18, 3612, 1435, 272, 18, 4661, 454, 2668, 3264, 342, 2239, 19, 21, 18, 21, 64, 86, 64, 82, 2594, 30, 17365, 64, 86, 64, 82, 64, 86, 64, 82, 6...
results_in_any_collection = search_pattern(req, p1, f1, m1, of=of, dbg=dbg)
results_in_any_collection = search_pattern(req, p1, f1, m1, ap=ap, of=of, dbg=dbg)
def perform_request_search(req=None, cc=cdsname, c=None, p="", f="", rg="10", sf="", so="d", sp="", of="hb", ot="", as="0", p1="", f1="", m1="", op1="", p2="", f2="", m2="", op2="", p3="", f3="", m3="", sc="0", jrec="0", recid="-1", recidb="-1", sysno="", id="-1", idb="-1", sysnb="", action="SEARCH", d1y="", d1m="", d1d="", d2y="", d2m="", d2d="", dbg="0"): """Perform search, without checking for authentication. Return list of recIDs found, if of=id. Otherwise create web page.""" # wash all passed arguments: cc = wash_url_argument(cc, 'str') sc = wash_url_argument(sc, 'int') (cc, colls_to_display, colls_to_search) = wash_colls(cc, c, sc) # which colls to search and to display? p = wash_pattern(wash_url_argument(p, 'str')) f = wash_field(wash_url_argument(f, 'str')) rg = wash_url_argument(rg, 'int') sf = wash_url_argument(sf, 'str') so = wash_url_argument(so, 'str') sp = wash_url_argument(sp, 'string') of = wash_url_argument(of, 'str') if type(ot) is list: ot = string.join(ot,",") ot = wash_url_argument(ot, 'str') as = wash_url_argument(as, 'int') p1 = wash_pattern(wash_url_argument(p1, 'str')) f1 = wash_field(wash_url_argument(f1, 'str')) m1 = wash_url_argument(m1, 'str') op1 = wash_url_argument(op1, 'str') p2 = wash_pattern(wash_url_argument(p2, 'str')) f2 = wash_field(wash_url_argument(f2, 'str')) m2 = wash_url_argument(m2, 'str') op2 = wash_url_argument(op2, 'str') p3 = wash_pattern(wash_url_argument(p3, 'str')) f3 = wash_field(wash_url_argument(f3, 'str')) m3 = wash_url_argument(m3, 'str') jrec = wash_url_argument(jrec, 'int') recid = wash_url_argument(recid, 'int') recidb = wash_url_argument(recidb, 'int') sysno = wash_url_argument(sysno, 'str') id = wash_url_argument(id, 'int') idb = wash_url_argument(idb, 'int') sysnb = wash_url_argument(sysnb, 'str') action = wash_url_argument(action, 'str') d1y = wash_url_argument(d1y, 'str') d1m = wash_url_argument(d1m, 'str') d1d = wash_url_argument(d1d, 'str') d2y = wash_url_argument(d2y, 'str') d2m = wash_url_argument(d2m, 'str') d2d = wash_url_argument(d2d, 'str') day1, day2 = wash_dates(d1y, d1m, d1d, d2y, d2m, d2d) dbg = wash_url_argument(dbg, 'int') # backwards compatibility: id, idb, sysnb -> recid, recidb, sysno (if applicable) if sysnb != "" and sysno == "": sysno = sysnb if id > 0 and recid == -1: recid = id if idb > 0 and recidb == -1: recidb = idb # TODO deduce passed search limiting criterias (if applicable) pl = "" # no limits by default if action != "Browse": # we do not want to add options while browsing fieldargs = cgi.parse_qs(req.args) for fieldcode in get_fieldcodes(): if fieldargs.has_key(fieldcode): for val in fieldargs[fieldcode]: pl += "+%s:\"%s\" " % (fieldcode, val) # deduce recid from sysno argument (if applicable): if sysno: # ALEPH SYS number was passed, so deduce MySQL recID for the record: recid = get_mysql_recid_from_aleph_sysno(sysno) # deduce collection we are in (if applicable): if recid>0: cc = guess_primary_collection_of_a_record(recid) # deduce user id (if applicable): try: uid = getUid(req) except: uid = 0 ## 0 - start output page_start(req, of, cc, as, uid) if recid>0: ## 1 - detailed record display if of == "hb": of = "hd" if record_exists(recid): if recidb<=recid: # sanity check recidb=recid+1 print_records(req, range(recid,recidb), -1, -9999, of, ot) else: # record does not exist if of.startswith("h"): print_warning(req, "Requested record does not seem to exist.") elif action == "Browse": ## 2 - browse needed if of.startswith("h"): req.write(create_search_box(cc, colls_to_display, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, pl, d1y, d1m, d1d, d2y, d2m, d2d, action)) if as==1 or (p1 or p2 or p3): browse_pattern(req, colls_to_search, p1, f1, rg) browse_pattern(req, colls_to_search, p2, f2, rg) browse_pattern(req, colls_to_search, p3, f3, rg) else: browse_pattern(req, colls_to_search, p, f, rg) else: ## 3 - search needed if of.startswith("h"): req.write(create_search_box(cc, colls_to_display, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, pl, d1y, d1m, d1d, d2y, d2m, d2d, action)) t1 = os.times()[4] results_in_any_collection = HitList() if as == 1 or (p1 or p2 or p3): ## 3A - advanced search results_in_any_collection = search_pattern(req, p1, f1, m1, of=of, dbg=dbg) if results_in_any_collection._nbhits == 0: return page_end(req, of) if p2: results_tmp = search_pattern(req, p2, f2, m2, of=of, dbg=dbg) if op1 == "a": # add results_in_any_collection.intersect(results_tmp) elif op1 == "o": # or results_in_any_collection.union(results_tmp) elif op1 == "n": # not results_in_any_collection.difference(results_tmp) else: if of.startswith("h"): print_warning(req, "Invalid set operation %s." % op1, "Error") results_in_any_collection.calculate_nbhits() if results_in_any_collection._nbhits == 0: return page_end(req, of) if p3: results_tmp = search_pattern(req, p3, f3, m3, of=of, dbg=dbg) if op2 == "a": # add results_in_any_collection.intersect(results_tmp) elif op2 == "o": # or results_in_any_collection.union(results_tmp) elif op2 == "n": # not results_in_any_collection.difference(results_tmp) else: if of.startswith("h"): print_warning(req, "Invalid set operation %s." % op2, "Error") results_in_any_collection.calculate_nbhits() else: ## 3B - simple search results_in_any_collection = search_pattern(req, p, f, of=of, dbg=dbg) if results_in_any_collection._nbhits == 0: return page_end(req, of)
ecbca079c2ffbb7166e391821982c873c23535a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2139/ecbca079c2ffbb7166e391821982c873c23535a2/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 2293, 67, 3072, 12, 3658, 33, 7036, 16, 4946, 33, 71, 2377, 529, 16, 276, 33, 7036, 16, 293, 1546, 3113, 284, 1546, 3113, 14524, 1546, 2163, 3113, 9033, 1546, 3113, 1427, 154...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 2293, 67, 3072, 12, 3658, 33, 7036, 16, 4946, 33, 71, 2377, 529, 16, 276, 33, 7036, 16, 293, 1546, 3113, 284, 1546, 3113, 14524, 1546, 2163, 3113, 9033, 1546, 3113, 1427, 154...
self._rbs.SetTwoSided(1)
def _create_geometry(self): normal_colour = (192, 192, 192) selected_colour = (255, 0, 246) blocked_colour = (16, 16, 16)
be9ba1db959f178154eaf49ceb623144d4157946 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4494/be9ba1db959f178154eaf49ceb623144d4157946/devide_canvas_object.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 14330, 12, 2890, 4672, 2212, 67, 27408, 273, 261, 15561, 16, 20217, 16, 20217, 13, 3170, 67, 27408, 273, 261, 10395, 16, 374, 16, 4248, 26, 13, 14547, 67, 27408, 273, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 14330, 12, 2890, 4672, 2212, 67, 27408, 273, 261, 15561, 16, 20217, 16, 20217, 13, 3170, 67, 27408, 273, 261, 10395, 16, 374, 16, 4248, 26, 13, 14547, 67, 27408, 273, 26...
if not np.equal(None):
if not np.equal(vmid, None):
def __init__(self, stretch='linear', exponent=5, vmid=None, vmin=None, vmax=None, clip=False): ''' Initalize an APLpyNormalize instance.
2a0745b5413139e4f91ab1539eb69cfe145d0715 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13232/2a0745b5413139e4f91ab1539eb69cfe145d0715/normalize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 31435, 2218, 12379, 2187, 9100, 33, 25, 16, 4268, 350, 33, 7036, 16, 17501, 33, 7036, 16, 17831, 33, 7036, 16, 6807, 33, 8381, 4672, 9163, 4378, 287, 554...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 31435, 2218, 12379, 2187, 9100, 33, 25, 16, 4268, 350, 33, 7036, 16, 17501, 33, 7036, 16, 17831, 33, 7036, 16, 6807, 33, 8381, 4672, 9163, 4378, 287, 554...
if self.filter is None or self.filter(d):
if self.filter is None or self.filter(dict):
def search(self): """Search for another record.""" dict = self._readnext() if self.filter is None or self.filter(d): if self.i >= self.first: self.results.append(dict) self.i += 1
07652619c22fd4c5d8562426a14bf07160e4c115 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/07652619c22fd4c5d8562426a14bf07160e4c115/FileStorage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 4672, 3536, 2979, 364, 4042, 1409, 12123, 2065, 273, 365, 6315, 896, 4285, 1435, 309, 365, 18, 2188, 353, 599, 578, 365, 18, 2188, 12, 1576, 4672, 309, 365, 18, 77, 154...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 4672, 3536, 2979, 364, 4042, 1409, 12123, 2065, 273, 365, 6315, 896, 4285, 1435, 309, 365, 18, 2188, 353, 599, 578, 365, 18, 2188, 12, 1576, 4672, 309, 365, 18, 77, 154...
response.extend((str(part), _formatHeaders(msg.getHeaders(True))))
doLast.extend((str(part), _formatHeaders(msg.getHeaders(True))))
def _sendMessageFetchResponse(self, msgId, msg, query, uid): seenUID = False response = [] for part in query: if part.type == 'envelope': response.extend(('ENVELOPE', getEnvelope(msg))) elif part.type == 'flags': response.extend(('FLAGS', msg.getFlags())) elif part.type == 'internaldate': response.extend(('INTERNALDATE', msg.getInternalDate())) elif part.type == 'rfc822header': response.extend(('RFC822.HEADER', _formatHeaders(msg.getHeaders(True)))) elif part.type == 'rfc822text': response.extend(('RFC822.TEXT', msg.getBodyFile())) elif part.type == 'rfc822size': response.extend(('RFC822.SIZE', str(msg.getSize()))) elif part.type == 'rfc822': hdrs = _formatHeaders(msg.getHeaders(True)) body = msg.getBodyFile().read() response.extend(('RFC822', hdrs + '\r\n' + body)) elif part.type == 'uid': seenUID = True response.extend(('UID', str(msg.getUID()))) elif part.type == 'bodystructure': response.extend(('BODYSTRUCTURE', getBodyStructure(msg, True))) elif part.type == 'body': subMsg = msg for p in part.part or (): subMsg = subMsg.getSubPart(p) if part.header: if not part.header.fields: response.extend((str(part), _formatHeaders(msg.getHeaders(True)))) else: hdrs = subMsg.getHeaders(part.header.negate, *part.header.fields) response.extend((str(part), _formatHeaders(hdrs))) elif part.text: response.extend((str(part), subMsg.getBodyFile())) elif part.mime: response.extend((str(part), _formatHeaders(msg.getHeaders(True)))) elif part.empty: response.extend((str(part), _formatHeaders(msg.getHeaders(True)) + '\r\n' + subMsg.getBodyFile().read())) else: # Simplified bodystructure request response.extend(('BODY', getBodyStructure(msg, False)))
eb8d902d2b64789da87345b7689551f2803c111a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/eb8d902d2b64789da87345b7689551f2803c111a/imap4.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4661, 1079, 5005, 1064, 12, 2890, 16, 1234, 548, 16, 1234, 16, 843, 16, 4555, 4672, 5881, 3060, 273, 1083, 766, 273, 5378, 364, 1087, 316, 843, 30, 309, 1087, 18, 723, 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, 389, 4661, 1079, 5005, 1064, 12, 2890, 16, 1234, 548, 16, 1234, 16, 843, 16, 4555, 4672, 5881, 3060, 273, 1083, 766, 273, 5378, 364, 1087, 316, 843, 30, 309, 1087, 18, 723, 422, 296, ...
try: roles=getattr(object,entry_name+'__roles__')
try: roles=getattr(object, entry_name+'__roles__')
def publish(self, module_name, after_list, published='web_objects',
a6863194e242f53539ff23280b108ddf824f1f52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a6863194e242f53539ff23280b108ddf824f1f52/Publish.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3808, 12, 2890, 16, 1605, 67, 529, 16, 1839, 67, 1098, 16, 9487, 2218, 4875, 67, 6911, 2187, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3808, 12, 2890, 16, 1605, 67, 529, 16, 1839, 67, 1098, 16, 9487, 2218, 4875, 67, 6911, 2187, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
common.inprint("DEBUG_ASSERT(s" + str(i) + ".hasValues());")
common.inprint("SH_DEBUG_ASSERT(s" + str(i) + ".hasValues());")
def scalarcons(self, args, size, extraTplArg=[]): common.inprint(self.tpl(size)) if len(extraTplArg) > 0: common.inprint("template<" + ", ".join(extraTplArg) + ">") #common.inprint("inline") common.inprint(self.tplcls(size) + "::" + self.name + "(" + ', '.join([' '.join(x) for x in args]) + ")") common.inprint(" : Generic<" + self.sizevar(size) + ", T>" + "(new VariableNode(Binding, " + self.sizevar(size) + ", StorageTypeInfo<T>::value_type, Semantic))") common.inprint("{") common.indent() common.inprint("if (Binding == SH_CONST) {") common.indent() if size > 1: values = "" for i in range(0, size): if i > 0: values += ", " if args[0][0] == "const host_type": values += "s" + str(i) else: common.inprint("DEBUG_ASSERT(s" + str(i) + ".hasValues());") values += "s" + str(i) + ".getValue(0)" common.inprint("host_type data[" + str(size) + "] = {" + values + "};") common.inprint("setValues(data);") else: if args[0][0] == "const host_type": common.inprint("setValue(0, s0);") else: common.inprint("DEBUG_ASSERT(s0.hasValues());") common.inprint("setValue(0, s0.getValue(0));") common.deindent() common.inprint("} else {") common.indent() if args[0][0] != "const host_type": for i in range(0, size): common.inprint("(*this)[" + str(i) + "] = s" + str(i) + ";") else: data = "" for i in range(0, size): if data != "": data += ", " data += "s" + str(i) common.inprint("(*this) = Attrib<" + self.sizevar(size) + ", SH_CONST, T, Semantic>(" + data + ");") common.deindent() common.inprint("}") common.deindent() common.inprint("}") common.inprint("")
7d15a506ac58e12f157fb7126a1f6d927a347dec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/7d15a506ac58e12f157fb7126a1f6d927a347dec/AttribImpl.hpp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4981, 8559, 12, 2890, 16, 833, 16, 963, 16, 2870, 20588, 4117, 33, 8526, 4672, 2975, 18, 267, 1188, 12, 2890, 18, 10933, 12, 1467, 3719, 309, 562, 12, 7763, 20588, 4117, 13, 405, 374, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4981, 8559, 12, 2890, 16, 833, 16, 963, 16, 2870, 20588, 4117, 33, 8526, 4672, 2975, 18, 267, 1188, 12, 2890, 18, 10933, 12, 1467, 3719, 309, 562, 12, 7763, 20588, 4117, 13, 405, 374, ...
So here we assume all rdiff-backup events were recorded in "increments" increments, and if it's in-between we pick the older one here. """ global _rest_time base_incs = get_inclist(Globals.rbdir.append("increments")) if not base_incs: return _mirror_time inctimes = [inc.getinctime() for inc in base_incs] inctimes.append(_mirror_time)
So if restore_to_time is inbetween two increments, return the older one. """ inctimes = cls.get_increment_times()
def get_rest_time(cls, restore_to_time): """Return older time, if restore_to_time is in between two inc times
fb2e575f371d9d84b36d50d62d0102872d2fb0d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8033/fb2e575f371d9d84b36d50d62d0102872d2fb0d8/restore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8792, 67, 957, 12, 6429, 16, 5217, 67, 869, 67, 957, 4672, 3536, 990, 12156, 813, 16, 309, 5217, 67, 869, 67, 957, 353, 316, 3086, 2795, 7290, 4124, 2, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8792, 67, 957, 12, 6429, 16, 5217, 67, 869, 67, 957, 4672, 3536, 990, 12156, 813, 16, 309, 5217, 67, 869, 67, 957, 353, 316, 3086, 2795, 7290, 4124, 2, -100, -100, -100, -10...
application = service.Application("Axiom Service") service.IService(S).setServiceParent(application) twistd.startApplication(self, application)
self.application = application = self._constructApplication() self._startApplication()
def postOptions(self):
64547264e4551504169bd38961218fedd7cd5360 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6981/64547264e4551504169bd38961218fedd7cd5360/axiomatic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 1320, 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, 1603, 1320, 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, -...