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
(rc,exists) = semanage_iface_exists(self.sh, k)
(rc, exists) = semanage_iface_exists(self.sh, k)
def __delete(self, interface): (rc,k) = semanage_iface_key_create(self.sh, interface) if rc < 0: raise ValueError(_("Could not create key for %s") % interface)
8ad29a27255b6eb5a4f8e1083ce9832034f3e205 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7147/8ad29a27255b6eb5a4f8e1083ce9832034f3e205/seobject.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3733, 12, 2890, 16, 1560, 4672, 261, 1310, 16, 79, 13, 273, 6111, 304, 410, 67, 31479, 67, 856, 67, 2640, 12, 2890, 18, 674, 16, 1560, 13, 309, 4519, 411, 374, 30, 1002, 2068, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 3733, 12, 2890, 16, 1560, 4672, 261, 1310, 16, 79, 13, 273, 6111, 304, 410, 67, 31479, 67, 856, 67, 2640, 12, 2890, 18, 674, 16, 1560, 13, 309, 4519, 411, 374, 30, 1002, 2068, ...
pdict: dictionary containing other parameters of conten-type header
pdict: dictionary containing other parameters of content-type header
def parse_multipart(fp, pdict): """Parse multipart input. Arguments: fp : input file pdict: dictionary containing other parameters of conten-type header Returns a dictionary just like parse_qs(): keys are the field names, each value is a list of values for that field. This is easy to use but not much good if you are expecting megabytes to be uploaded -- in that case, use the FieldStorage class instead which is much more flexible. Note that content-type is the raw, unparsed contents of the content-type header. XXX This does not parse nested multipart parts -- use FieldStorage for that. XXX This should really be subsumed by FieldStorage altogether -- no point in having two implementations of the same parsing algorithm. """ boundary = "" if 'boundary' in pdict: boundary = pdict['boundary'] if not valid_boundary(boundary): raise ValueError, ('Invalid boundary in multipart form: %r' % (boundary,)) nextpart = "--" + boundary lastpart = "--" + boundary + "--" partdict = {} terminator = "" while terminator != lastpart: bytes = -1 data = None if terminator: # At start of next part. Read headers first. headers = mimetools.Message(fp) clength = headers.getheader('content-length') if clength: try: bytes = int(clength) except ValueError: pass if bytes > 0: if maxlen and bytes > maxlen: raise ValueError, 'Maximum content length exceeded' data = fp.read(bytes) else: data = "" # Read lines until end of part. lines = [] while 1: line = fp.readline() if not line: terminator = lastpart # End outer loop break if line[:2] == "--": terminator = line.strip() if terminator in (nextpart, lastpart): break lines.append(line) # Done with part. if data is None: continue if bytes < 0: if lines: # Strip final line terminator line = lines[-1] if line[-2:] == "\r\n": line = line[:-2] elif line[-1:] == "\n": line = line[:-1] lines[-1] = line data = "".join(lines) line = headers['content-disposition'] if not line: continue key, params = parse_header(line) if key != 'form-data': continue if 'name' in params: name = params['name'] else: continue if name in partdict: partdict[name].append(data) else: partdict[name] = [data] return partdict
674aba85e0591f612245e4981255e47224f67217 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/674aba85e0591f612245e4981255e47224f67217/cgi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 16404, 12, 7944, 16, 293, 1576, 4672, 3536, 3201, 10263, 810, 18, 225, 13599, 30, 4253, 282, 294, 810, 585, 293, 1576, 30, 3880, 4191, 1308, 1472, 434, 913, 17, 723, 1446, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 16404, 12, 7944, 16, 293, 1576, 4672, 3536, 3201, 10263, 810, 18, 225, 13599, 30, 4253, 282, 294, 810, 585, 293, 1576, 30, 3880, 4191, 1308, 1472, 434, 913, 17, 723, 1446, 22...
def __init__(self, formname):
def __init__(self, formname, args=None):
def __init__(self, formname): self.formname=formname
515d1d3f970c02fcfd3020cb20455268154035ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2304/515d1d3f970c02fcfd3020cb20455268154035ec/dispatcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 646, 529, 16, 833, 33, 7036, 4672, 365, 18, 687, 529, 33, 687, 529, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 646, 529, 16, 833, 33, 7036, 4672, 365, 18, 687, 529, 33, 687, 529, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
print "[keyUp]", self["streams"].getIndex()
def keyUp(self): print "[keyUp]", self["streams"].getIndex() if self.focus == FOCUS_CONFIG: self["config"].instance.moveSelection(self["config"].instance.moveUp) elif self.focus == FOCUS_STREAMS: if self["streams"].getIndex() == 0: self["config"].instance.setSelectionEnable(True) self["streams"].style = "notselected" self["config"].setCurrentIndex(len(self["config"].getList())-1) self.focus = FOCUS_CONFIG else: self["streams"].selectPrevious()
68c456f12b1e72cf982997d4d528281734021a85 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/68c456f12b1e72cf982997d4d528281734021a85/AudioSelection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 1211, 12, 2890, 4672, 309, 365, 18, 13923, 422, 478, 10809, 3378, 67, 7203, 30, 365, 9614, 1425, 6, 8009, 1336, 18, 8501, 6233, 12, 2890, 9614, 1425, 6, 8009, 1336, 18, 8501, 1211...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 1211, 12, 2890, 4672, 309, 365, 18, 13923, 422, 478, 10809, 3378, 67, 7203, 30, 365, 9614, 1425, 6, 8009, 1336, 18, 8501, 6233, 12, 2890, 9614, 1425, 6, 8009, 1336, 18, 8501, 1211...
return "~%d" % bitrate
return "~%d kbps" % bitrate
def get_bitrate_from_settings(self): bitrate = 0 aprox = True mode = self.get_string("mp3-mode")
fb263caf044aa99ff978564e088e8ab6a2b54428 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2369/fb263caf044aa99ff978564e088e8ab6a2b54428/soundconverter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3682, 5141, 67, 2080, 67, 4272, 12, 2890, 4672, 2831, 5141, 273, 374, 513, 303, 92, 273, 1053, 1965, 273, 365, 18, 588, 67, 1080, 2932, 1291, 23, 17, 3188, 7923, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3682, 5141, 67, 2080, 67, 4272, 12, 2890, 4672, 2831, 5141, 273, 374, 513, 303, 92, 273, 1053, 1965, 273, 365, 18, 588, 67, 1080, 2932, 1291, 23, 17, 3188, 7923, 2, -100, -1...
if Info.IsLibrary: return
def CreateLibraryConstructorCode(Info, AutoGenC, AutoGenH): if Info.IsLibrary: return # # Library Constructors # ConstructorPrototypeString = TemplateString() ConstructorCallingString = TemplateString() for Lib in Info.DependentLibraryList: if len(Lib.ConstructorList) <= 0: continue Dict = {'Function':Lib.ConstructorList} if Lib.ModuleType == 'BASE': ConstructorPrototypeString.Append(gLibraryStructorPrototype['BASE'], Dict) ConstructorCallingString.Append(gLibraryStructorCall['BASE'], Dict) elif Lib.ModuleType in ['PEI_CORE','PEIM']: ConstructorPrototypeString.Append(gLibraryStructorPrototype['PEI'], Dict) ConstructorCallingString.Append(gLibraryStructorCall['PEI'], Dict) elif Lib.ModuleType in ['DXE_CORE','DXE_DRIVER','DXE_SMM_DRIVER','DXE_RUNTIME_DRIVER', 'DXE_SAL_DRIVER','UEFI_DRIVER','UEFI_APPLICATION']: ConstructorPrototypeString.Append(gLibraryStructorPrototype['DXE'], Dict) ConstructorCallingString.Append(gLibraryStructorCall['DXE'], Dict) if str(ConstructorPrototypeString) == '': ConstructorPrototypeList = [] else: ConstructorPrototypeList = [str(ConstructorPrototypeString)] if str(ConstructorCallingString) == '': ConstructorCallingList = [] else: ConstructorCallingList = [str(ConstructorCallingString)] Dict = { 'Type' : 'Constructor', 'FunctionPrototype' : ConstructorPrototypeList, 'FunctionCall' : ConstructorCallingList } if Info.ModuleType == 'BASE': AutoGenC.Append(gLibraryString['BASE'], Dict) elif Info.ModuleType in ['PEI_CORE','PEIM']: AutoGenC.Append(gLibraryString['PEI'], Dict) elif Info.ModuleType in ['DXE_CORE','DXE_DRIVER','DXE_SMM_DRIVER','DXE_RUNTIME_DRIVER', 'DXE_SAL_DRIVER','UEFI_DRIVER','UEFI_APPLICATION']: AutoGenC.Append(gLibraryString['DXE'], Dict)
c0df5fc3f54d659cf283e68f6c5e03b271e178cb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/914/c0df5fc3f54d659cf283e68f6c5e03b271e178cb/GenC.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 9313, 6293, 1085, 12, 966, 16, 8064, 7642, 39, 16, 8064, 7642, 44, 4672, 468, 468, 18694, 14291, 1383, 468, 11417, 15846, 780, 273, 5035, 780, 1435, 11417, 19677, 780, 273, 5035, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 9313, 6293, 1085, 12, 966, 16, 8064, 7642, 39, 16, 8064, 7642, 44, 4672, 468, 468, 18694, 14291, 1383, 468, 11417, 15846, 780, 273, 5035, 780, 1435, 11417, 19677, 780, 273, 5035, 7...
print "tree %s" % (hg.hex(changes[0]))
print "tree %s" % (hg.short(changes[0]))
def catcommit(repo, n, prefix, changes=None): nlprefix = '\n' + prefix; (p1, p2) = repo.changelog.parents(n) (h, h1, h2) = map(hg.hex, (n, p1, p2)) (i1, i2) = map(repo.changelog.rev, (p1, p2)) if not changes: changes = repo.changelog.read(n) print "tree %s" % (hg.hex(changes[0])) if i1 != -1: print "parent %s" % (h1) if i2 != -1: print "parent %s" % (h2) date_ar = changes[2] date = int(float(date_ar[0])) lines = changes[4].splitlines() if lines and lines[-1].startswith('committer:'): committer = lines[-1].split(': ')[1].rstrip() else: committer = changes[1] print "author %s %s %s" % (changes[1], date, date_ar[1]) print "committer %s %s %s" % (committer, date, date_ar[1]) print "" if prefix != "": print "%s%s" % (prefix, changes[4].replace('\n', nlprefix).strip()) else: print changes[4] if prefix: sys.stdout.write('\0')
1c5a771c9609237f9deb3e7d05682937d58d4a9e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/1c5a771c9609237f9deb3e7d05682937d58d4a9e/hgk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6573, 7371, 12, 7422, 16, 290, 16, 1633, 16, 3478, 33, 7036, 4672, 7741, 3239, 273, 2337, 82, 11, 397, 1633, 31, 261, 84, 21, 16, 293, 22, 13, 273, 3538, 18, 24083, 12970, 18, 12606,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6573, 7371, 12, 7422, 16, 290, 16, 1633, 16, 3478, 33, 7036, 4672, 7741, 3239, 273, 2337, 82, 11, 397, 1633, 31, 261, 84, 21, 16, 293, 22, 13, 273, 3538, 18, 24083, 12970, 18, 12606,...
if self._localInt == 0xffffffff:
if self._localInt == 0xffffffffL:
def __getEncryptionKey(self, mibInstrumController, privKey): desKey = privKey[:8] preIV = privKey[8:16]
7acbf4b0de2efb15cd8378b2aa0484551f4a2e39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/587/7acbf4b0de2efb15cd8378b2aa0484551f4a2e39/des.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 26740, 12, 2890, 16, 312, 495, 382, 701, 379, 2933, 16, 22849, 4672, 2832, 653, 273, 22849, 10531, 28, 65, 675, 8188, 273, 22849, 63, 28, 30, 2313, 65, 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, 588, 26740, 12, 2890, 16, 312, 495, 382, 701, 379, 2933, 16, 22849, 4672, 2832, 653, 273, 22849, 10531, 28, 65, 675, 8188, 273, 22849, 63, 28, 30, 2313, 65, 2, -100, -100, -100, ...
log.debug( 'appending parent:\n%s\ncontent:\n%s', parent, content)
log.debug('appending parent:\n%s\ncontent:\n%s', parent, content)
def __append(self, parent, content): """ Append the specified L{content} to the I{parent}. @param content: The content to append. @type content: L{Object} """ log.debug( 'appending parent:\n%s\ncontent:\n%s', parent, content) if content.value is None: child = self.node(content.tag, content.type) if self.nil_supported: child.setnil() parent.append(child) return if isinstance(content.value, dict): content.value = \ Object.__factory__.instance(dict=content.value) if isinstance(content.value, Object): object = content.value child = self.node(content.tag, content.type) parent.append(child) for key in object: cont = Content(key, object[key]) self.append(child, cont) return if isinstance(content.value, (list,tuple)): collection = content.value if len(collection): self.suspend(content) for item in collection: cont = Content(content.tag, item) self.append(parent, cont) self.resume(content) return if content.tag.startswith('_'): parent.set(content.tag[1:], unicode(content.value)) return child = self.node(content.tag, content.type) child.setText(unicode(content.value)) parent.append(child)
5e3434d1f7080ff39c5730be43ca6d351c8dcbb0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5930/5e3434d1f7080ff39c5730be43ca6d351c8dcbb0/marshaller.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 6923, 12, 2890, 16, 982, 16, 913, 4672, 3536, 6181, 326, 1269, 511, 95, 1745, 97, 358, 326, 467, 95, 2938, 5496, 632, 891, 913, 30, 1021, 913, 358, 714, 18, 632, 723, 913, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 6923, 12, 2890, 16, 982, 16, 913, 4672, 3536, 6181, 326, 1269, 511, 95, 1745, 97, 358, 326, 467, 95, 2938, 5496, 632, 891, 913, 30, 1021, 913, 358, 714, 18, 632, 723, 913, 30, ...
'''This takes a user name or uid and returns the corrisponding uid or False'''
'''This takes a user name or uid and returns the corresponding uid or False'''
def normUid(entry): '''This takes a user name or uid and returns the corrisponding uid or False''' try: try: return int(entry.get('owner')) except: return int(pwd.getpwnam(entry.get('owner'))[2]) except (OSError, KeyError): log.error('UID normalization failed for %s' % (entry.get('name'))) return False
de73f711db795b8709b10cfb827f99001210c199 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11867/de73f711db795b8709b10cfb827f99001210c199/POSIX.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4651, 11994, 12, 4099, 4672, 9163, 2503, 5530, 279, 729, 508, 578, 4555, 471, 1135, 326, 4656, 4555, 578, 1083, 26418, 775, 30, 775, 30, 327, 509, 12, 4099, 18, 588, 2668, 8443, 26112, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4651, 11994, 12, 4099, 4672, 9163, 2503, 5530, 279, 729, 508, 578, 4555, 471, 1135, 326, 4656, 4555, 578, 1083, 26418, 775, 30, 775, 30, 327, 509, 12, 4099, 18, 588, 2668, 8443, 26112, ...
uos_name = self.pool.get('product.uom').read(self.cr,self.uid,entry.uos_id.id,['name'])
uos_name = self.pool.get('product.uom').read(self.cr,self.uid,entry.uos_id.id,['name'],self.context.copy())
def invoice_lines(self,invoice): result =[] sub_total={} info=[] invoice_list=[] res={} list_in_seq={} ids = self.pool.get('account.invoice.line').search(self.cr, self.uid, [('invoice_id', '=', invoice.id)]) ids.sort() for id in range(0,len(ids)): info = self.pool.get('account.invoice.line').browse(self.cr, self.uid,ids[id], self.context.copy()) list_in_seq[info]=info.sequence i=1 j=0 final=sorted(list_in_seq.items(), lambda x, y: cmp(x[1], y[1])) invoice_list=[x[0] for x in final] sum_flag={} sum_flag[j]=-1 for entry in invoice_list: res={}
47dab5031ed30952745db2b2a15be7faf0425f14 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/47dab5031ed30952745db2b2a15be7faf0425f14/special_message_invoice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9179, 67, 3548, 12, 2890, 16, 16119, 4672, 563, 273, 8526, 720, 67, 4963, 12938, 1123, 33, 8526, 9179, 67, 1098, 33, 8526, 400, 12938, 666, 67, 267, 67, 5436, 12938, 3258, 273, 365, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9179, 67, 3548, 12, 2890, 16, 16119, 4672, 563, 273, 8526, 720, 67, 4963, 12938, 1123, 33, 8526, 9179, 67, 1098, 33, 8526, 400, 12938, 666, 67, 267, 67, 5436, 12938, 3258, 273, 365, 18...
lo = lo + i * av[0] hi = hi + j * av[1]
lo = lo + long(i) * av[0] hi = hi + long(j) * av[1]
def getwidth(self):
d46b2a42eda94cbac3b610e36d5f97230d629068 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d46b2a42eda94cbac3b610e36d5f97230d629068/sre_parse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 2819, 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, 336, 2819, 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, -1...
self._defaultfunc(name, size)
return self._defaultfunc(name, size)
def read(self, size=None, currentThread=threading.currentThread): name = currentThread().getName() catchers = self._catchers if not catchers.has_key(name): self._defaultfunc(name, size) else: catcher = catchers[name] catcher.read(size)
fca147d38f9f15298332912486a5cae86e9caed9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11400/fca147d38f9f15298332912486a5cae86e9caed9/threadedprint.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 963, 33, 7036, 16, 11800, 33, 5930, 310, 18, 2972, 3830, 4672, 508, 273, 11800, 7675, 17994, 1435, 1044, 414, 273, 365, 6315, 14683, 414, 309, 486, 1044, 414, 18, 53...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 963, 33, 7036, 16, 11800, 33, 5930, 310, 18, 2972, 3830, 4672, 508, 273, 11800, 7675, 17994, 1435, 1044, 414, 273, 365, 6315, 14683, 414, 309, 486, 1044, 414, 18, 53...
context['files'] = files
context['files'] = page.object_list
def view_diff(request, diffset_id, interdiffset_id=None, extra_context={}, template_name='diffviewer/view_diff.html'): diffset = get_object_or_404(DiffSet, pk=diffset_id) interdiffset = get_object_or_none(DiffSet, pk=interdiffset_id) highlighting = get_enable_highlighting(request.user) try: files = get_diff_files(diffset, None, interdiffset, highlighting) # Break the list of files into pages paginator = ObjectPaginator(files, settings.DIFFVIEWER_PAGINATE_BY, orphans=settings.DIFFVIEWER_PAGINATE_ORPHANS) page = int(request.GET.get('page', 1)) if request.GET.get('file', False): file_id = int(request.GET['file']) file_number = 0 for i, f in enumerate(files): if f['filediff'].id == file_id: file_number = i break for i in range(paginator.pages): if paginator.last_on_page(i) > file_number: page = i + 1 break files = paginator.get_page(page - 1) if request.GET.get('expand', False): collapseall = False elif request.GET.get('collapse', False): collapseall = True elif request.COOKIES.has_key('collapsediffs'): collapseall = (request.COOKIES['collapsediffs'] == "True") else: collapseall = True context = { 'diffset': diffset, 'interdiffset': interdiffset, 'diffset_pair': (diffset, interdiffset), } context.update(extra_context) # XXX We can probably make this even more awesome and completely skip # the get_diff_files call, caching basically the entire context. for file in files: file['fragment'] = mark_safe(build_diff_fragment(request, file, None, highlighting, collapseall, context)) context['files'] = files # Add the pagination context context['is_paginated'] = paginator.pages > 1 context['page'] = page context['pages'] = paginator.pages context['page_numbers'] = [n + 1 for n in range(paginator.pages)] context['has_next'] = page < paginator.pages context['next_page'] = page + 1 context['has_previous'] = page > 1 context['previous_page'] = page - 1 response = render_to_response(template_name, RequestContext(request, context)) response.set_cookie('collapsediffs', collapseall) return response except Exception, e: return exception_traceback(request, e, template_name)
d9eb5431222f495e8c785a1d057944c9e2a9e815 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1600/d9eb5431222f495e8c785a1d057944c9e2a9e815/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 67, 5413, 12, 2293, 16, 1901, 988, 67, 350, 16, 1554, 11593, 988, 67, 350, 33, 7036, 16, 2870, 67, 2472, 28793, 1542, 67, 529, 2218, 5413, 25256, 19, 1945, 67, 5413, 18, 2620, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 67, 5413, 12, 2293, 16, 1901, 988, 67, 350, 16, 1554, 11593, 988, 67, 350, 33, 7036, 16, 2870, 67, 2472, 28793, 1542, 67, 529, 2218, 5413, 25256, 19, 1945, 67, 5413, 18, 2620, ...
def write_trees(self, out): """ Write an HTML page containing the module and class hierarchies to the given streams. """ self.write_header(out, 'Trees') self.write_navbar(out, 'trees') self.write_breadcrumbs(out, 'trees', 'trees.html') out('<!-- ==================== ' 'MODULE HIERARCHY ==================== -->\n') out('<h2>Module Hierarchy</h2>\n') self.write_module_tree(out) defines_classes = len(self.class_list) > 0 if defines_classes: out('<!-- ==================== ' 'CLASS HIERARCHY ==================== -->\n') out('<h2>Class Hierarchy</h2>\n') self.write_class_tree(out)
def write_module_tree(self, out): self.write_treepage_header(out, 'Module Hierarchy', 'module-tree.html') out('<h1 class="epydoc">Module Hierarchy</h1>\n') out('<ul class="nomargin-top">\n') for doc in self.module_list: if (doc.package in (None, UNKNOWN) or doc.package not in self.module_set): self.write_module_tree_item(out, doc) out('</ul>\n')
def write_class(self, out, doc): """ Write an HTML page containing the API documentation for the given class to C{out}. @param doc: A L{ClassDoc} containing the API documentation for the class that should be described. """ longname = doc.canonical_name shortname = doc.canonical_name[-1]
5c410b5b6e25df3bdbc6da266f7773518165cb02 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/5c410b5b6e25df3bdbc6da266f7773518165cb02/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 1106, 12, 2890, 16, 596, 16, 997, 4672, 3536, 2598, 392, 3982, 1363, 4191, 326, 1491, 7323, 364, 326, 864, 667, 358, 385, 95, 659, 5496, 225, 632, 891, 997, 30, 432, 511, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 1106, 12, 2890, 16, 596, 16, 997, 4672, 3536, 2598, 392, 3982, 1363, 4191, 326, 1491, 7323, 364, 326, 864, 667, 358, 385, 95, 659, 5496, 225, 632, 891, 997, 30, 432, 511, 9...
<class 'base.TransformGroup'>
<class 'sage.plot.plot3d.base.TransformGroup'>
def plot3d(self, stickers=True): """ sage: C = RubiksCube().move("R*U") sage: C.plot3d() <class 'base.TransformGroup'> sage: C.plot() Graphics object consisting of 55 graphics primitives """ while len(self.colors) < 7: self.colors.append((.1, .1, .1)) side_colors = [Texture(color=c, ambient=.75) for c in self.colors] start_colors = sum([[c]*8 for c in side_colors], []) facets = self._group.facets(self._state) facet_colors = [0]*48 for i in range(48): facet_colors[facets[i]-1] = start_colors[i] all_colors = side_colors + facet_colors pm = [-1,0,1] C = sum([self.cubie(.15, .025, x, y, z, all_colors, stickers) for x in pm for y in pm for z in pm], Box(.35, .35, .35, color=self.colors[-1])) return C.rotateZ(1.5) #.scale([1,-1,1]).rotateZ(1.5)
3f30d16a885e61624121e35a9f4da6b9d5384359 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/3f30d16a885e61624121e35a9f4da6b9d5384359/cubegroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 23, 72, 12, 2890, 16, 25608, 414, 33, 5510, 4672, 3536, 272, 410, 30, 385, 273, 534, 373, 1766, 87, 39, 4895, 7675, 8501, 2932, 54, 14, 57, 7923, 272, 410, 30, 385, 18, 4032, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 23, 72, 12, 2890, 16, 25608, 414, 33, 5510, 4672, 3536, 272, 410, 30, 385, 273, 534, 373, 1766, 87, 39, 4895, 7675, 8501, 2932, 54, 14, 57, 7923, 272, 410, 30, 385, 18, 4032, ...
from AppKit import NSWindow, NSApp, NSFloatingWindowLevel window_ref = self.MacGetTopLevelWindowRef() print "window_ref =", window_ref nsw = NSWindow.alloc().initWithWindowRef_(window_ref) print "nsw =", nsw nsw.setLevel_(NSFloatingWindowLevel)
try: from AppKit import NSWindow, NSApp, NSFloatingWindowLevel window_ref = self.MacGetTopLevelWindowRef() nsw = NSWindow.alloc().initWithWindowRef_(window_ref) nsw.setLevel_(NSFloatingWindowLevel) except ImportError: print "No AppKit module => can't make progress window stay on top."
def __init__(self, *args, **kwds): if sys.platform.startswith("win"): kwds["style"] = wx.DEFAULT_FRAME_STYLE | wx.STAY_ON_TOP wx.Frame.__init__(self, *args, **kwds) self.Show() if wx.Platform == '__WXMAC__' and hasattr(self, 'MacGetTopLevelWindowRef'): from AppKit import NSWindow, NSApp, NSFloatingWindowLevel window_ref = self.MacGetTopLevelWindowRef() print "window_ref =", window_ref nsw = NSWindow.alloc().initWithWindowRef_(window_ref) print "nsw =", nsw nsw.setLevel_(NSFloatingWindowLevel)
dacea941023ad877912138fb44ad26b96b8d5a9a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2870/dacea941023ad877912138fb44ad26b96b8d5a9a/progress.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 25577, 4672, 309, 2589, 18, 9898, 18, 17514, 1918, 2932, 8082, 6, 4672, 17149, 9614, 4060, 11929, 273, 7075, 18, 5280, 67, 15072, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 25577, 4672, 309, 2589, 18, 9898, 18, 17514, 1918, 2932, 8082, 6, 4672, 17149, 9614, 4060, 11929, 273, 7075, 18, 5280, 67, 15072, 67, ...
def execute(self, query, args=()):
def execute(self, query, args=None):
def execute(self, query, args=()): self.ping() self.log_query(query, args) try: return MySQLdb.cursors.Cursor.execute(self, query, args) except Exception, e: raise MythDBError(MythDBError.DB_RAW, e.args)
b5a261e77f1c90fbb191da67b9effd2cbf5860f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13713/b5a261e77f1c90fbb191da67b9effd2cbf5860f2/MythBase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 843, 16, 833, 33, 7036, 4672, 365, 18, 1382, 1435, 365, 18, 1330, 67, 2271, 12, 2271, 16, 833, 13, 775, 30, 327, 13485, 1966, 18, 2789, 1383, 18, 6688, 18, 8837, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 843, 16, 833, 33, 7036, 4672, 365, 18, 1382, 1435, 365, 18, 1330, 67, 2271, 12, 2271, 16, 833, 13, 775, 30, 327, 13485, 1966, 18, 2789, 1383, 18, 6688, 18, 8837, ...
pass def getsockopt(self):
peeraddr = _c.sockaddr() peeraddrlen = _c.socklen_t(sizeof(peeraddr)) res = _c.socketgetsockname(self._fd, pointer(peeraddr), pointer(peeraddrlen)) if res < 0: raise error(_c.errno.value) return makesockaddr(peeraddr) def getsockopt(self, level, optname, buflen=-1):
def getsockname(self): pass
921db8b6dbac72c6f0cd04e09524f88af6674b1a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/921db8b6dbac72c6f0cd04e09524f88af6674b1a/_socket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5571, 975, 529, 12, 2890, 4672, 1342, 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, 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, 5571, 975, 529, 12, 2890, 4672, 1342, 225, 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...
gen_uuid = 0
gen_uuid = 1 if len(value) > 2: if str(value[2]) == "1": gen_uuid = 0
def tcm_createvirtdev(option, opt_str, value, parser): cfs_unsplit = str(value[0]) cfs_path_tmp = cfs_unsplit.split('/') hba_cfs = cfs_path_tmp[0] print " ConfigFS HBA: " + hba_cfs cfs_hba_path = tcm_get_cfs_prefix(hba_cfs) if (os.path.isdir(cfs_hba_path) == False): ret = os.mkdir(cfs_hba_path) if not ret: print "Successfully added TCM/ConfigFS HBA: " + hba_cfs else: tcm_err("Unable to create TCM/ConfigFS HBA: " + cfs_hba_path) dev_vfs_alias = cfs_path_tmp[1] print " ConfigFS Device Alias: " + dev_vfs_alias cfs_dev_path = tcm_get_cfs_prefix(cfs_unsplit) if (os.path.isdir(cfs_dev_path)): tcm_err("TCM/ConfigFS storage object already exists: " + cfs_dev_path) cfs_path = cfs_path_tmp[0] + "/" + cfs_path_tmp[1] tmp_params = str(value[1]) dev_params = tmp_params.split(' ') plugin_params = dev_params print "Device Params " + str(plugin_params) ret = os.mkdir(cfs_dev_path) if ret: tcm_err("Failed to create ConfigFS Storage Object: " + cfs_dev_path + " ret: " + ret)
cc22692a483a5220eefabea9a19c72d5e409a655 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8449/cc22692a483a5220eefabea9a19c72d5e409a655/tcm_node.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1715, 81, 67, 2640, 14035, 5206, 12, 3482, 16, 2153, 67, 701, 16, 460, 16, 2082, 4672, 276, 2556, 67, 318, 4939, 273, 609, 12, 1132, 63, 20, 5717, 276, 2556, 67, 803, 67, 5645, 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, 1715, 81, 67, 2640, 14035, 5206, 12, 3482, 16, 2153, 67, 701, 16, 460, 16, 2082, 4672, 276, 2556, 67, 318, 4939, 273, 609, 12, 1132, 63, 20, 5717, 276, 2556, 67, 803, 67, 5645, 273, ...
if os.path.isdir(path):
if os.path.isdir(path) and path not in sys.path:
def AddToPath(path): path = os.path.realpath(path) if os.path.isdir(path): sys.path.append(path)
89ba024b9843719bf06a9c3efaaf1b137dee2a12 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6787/89ba024b9843719bf06a9c3efaaf1b137dee2a12/m5config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1436, 774, 743, 12, 803, 4672, 589, 273, 1140, 18, 803, 18, 7688, 803, 12, 803, 13, 309, 1140, 18, 803, 18, 291, 1214, 12, 803, 13, 471, 589, 486, 316, 2589, 18, 803, 30, 2589, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1436, 774, 743, 12, 803, 4672, 589, 273, 1140, 18, 803, 18, 7688, 803, 12, 803, 13, 309, 1140, 18, 803, 18, 291, 1214, 12, 803, 13, 471, 589, 486, 316, 2589, 18, 803, 30, 2589, 18,...
doc = Request(self, 'track.getTopFans', self.api_key, params).execute()
doc = _Request(self, 'track.getTopFans', self.api_key, params).execute()
def getTopFansWithWeights(self, limit = None): """Returns the top fans for this track as a sequence of (User, weight). """ params = self._getParams() doc = Request(self, 'track.getTopFans', self.api_key, params).execute() if not doc: return None list = [] elements = doc.getElementsByTagName('user') for element in elements: if limit and len(list) >= limit: break name = self._extract(element, 'name') weight = self._extract(element, 'weight') list.append((User(name, *self.auth_data), weight)) return list
903c9b1622fe56617e5099f20abdc69f2090f8e0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9926/903c9b1622fe56617e5099f20abdc69f2090f8e0/pylast.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13729, 42, 634, 1190, 16595, 12, 2890, 16, 1800, 273, 599, 4672, 3536, 1356, 326, 1760, 284, 634, 364, 333, 3298, 487, 279, 3102, 434, 261, 1299, 16, 3119, 2934, 3536, 225, 859, 273, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13729, 42, 634, 1190, 16595, 12, 2890, 16, 1800, 273, 599, 4672, 3536, 1356, 326, 1760, 284, 634, 364, 333, 3298, 487, 279, 3102, 434, 261, 1299, 16, 3119, 2934, 3536, 225, 859, 273, 3...
wikipedia.output("Stopping work on %s."%self.originPage)
wikipedia.output(u"======Aborted processing %s======" % self.originPage.aslink(True))
def finish(self, bot = None): """Round up the subject, making any necessary changes. This method should be called exactly once after the todo list has gone empty.
0954c7b265a8965bb83f56824b4c5725105efde1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/0954c7b265a8965bb83f56824b4c5725105efde1/interwiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 12, 2890, 16, 2512, 273, 599, 4672, 3536, 11066, 731, 326, 3221, 16, 10480, 1281, 4573, 3478, 18, 1220, 707, 1410, 506, 2566, 8950, 3647, 1839, 326, 10621, 666, 711, 22296, 1008, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 12, 2890, 16, 2512, 273, 599, 4672, 3536, 11066, 731, 326, 3221, 16, 10480, 1281, 4573, 3478, 18, 1220, 707, 1410, 506, 2566, 8950, 3647, 1839, 326, 10621, 666, 711, 22296, 1008, 1...
nodelist = list(env.nodes)
nodelist = env.toposort()
def apply(self, env): did_something = True while did_something: nodelist = list(env.nodes) did_something = False for node in nodelist: if node.op == T._max_and_argmax: if len(node.outputs[1].clients)==0: try: axis=get_constant_value(node.inputs[1]) except ValueError: return False
dd81cc346f1ceb39a24f8db85930f4bce20257ce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/dd81cc346f1ceb39a24f8db85930f4bce20257ce/opt_uncanonicalize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 12, 2890, 16, 1550, 4672, 5061, 67, 30289, 273, 1053, 1323, 5061, 67, 30289, 30, 30068, 273, 1550, 18, 3669, 538, 499, 1435, 5061, 67, 30289, 273, 1083, 364, 756, 316, 30068, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 12, 2890, 16, 1550, 4672, 5061, 67, 30289, 273, 1053, 1323, 5061, 67, 30289, 30, 30068, 273, 1550, 18, 3669, 538, 499, 1435, 5061, 67, 30289, 273, 1083, 364, 756, 316, 30068, 30, ...
line = line[ line.rfind('/') +1: line.find('.avi')]
line = line[ line.rfind('/') +1: line.find('.mpg')]
def view_schedule(self,arg=None, menuw=None): '''Set up the view recording menu or the delete scheduled item menu''' items = [] line = '0' itemcount = 0 global killflag fd = open(record_daemon.SCHEDULE,'r') #delete old scheduled items from the file since we wont need them #this could be done more efficiently from record_daemon if arg == 0: newstringlist = fd.readline() oldchecker = fd.readlines() fd.close() fd = open(record_daemon.SCHEDULE,'w') for st in oldchecker: #check if item is recording timecomp= st[st.find('-'): st.rfind(',')].split(',') timecomp[0] = timecomp[0].replace('-','').replace(':','').replace(' ','') length = string.atoi(timecomp[1]) currenttime = string.atoi(time.strftime('%m%d%H%M%S', time.localtime())) recording = currenttime < self.addtime(string.atoi(timecomp[0]),length) #delete old items that are not recording if st.find('#') == -1 or (recording and killflag != 1): newstringlist += st killflag = 0 fd.write(newstringlist) fd.close() fd = open(record_daemon.SCHEDULE,'r') fd.readline() while line != '': oldline = line line = fd.readline() if line.find('#') != -1: recordingflag = 1 else: recordingflag = 0 #get only the title, the record time and the channel line = line[ line.rfind('/') +1: line.find('.avi')] #line = line[ line.rfind('/') +1: line.find('.mpg')] line = line.replace('_',' ') line = line.replace(',','\t\t ')
44004b0a2b617f9d22ce84ede0f05d53100f90c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/44004b0a2b617f9d22ce84ede0f05d53100f90c6/record_schedule.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 67, 10676, 12, 2890, 16, 3175, 33, 7036, 16, 3824, 91, 33, 7036, 4672, 9163, 694, 731, 326, 1476, 14949, 3824, 578, 326, 1430, 9755, 761, 3824, 26418, 225, 1516, 273, 5378, 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, 1476, 67, 10676, 12, 2890, 16, 3175, 33, 7036, 16, 3824, 91, 33, 7036, 4672, 9163, 694, 731, 326, 1476, 14949, 3824, 578, 326, 1430, 9755, 761, 3824, 26418, 225, 1516, 273, 5378, 980, ...
out = path break return out
out.append(path) if out: return out else: return ["/usr/lib/python2.3/site-packages",]
def deduce_site_packages_location(): """Return the most probable location of site-packages directory deduced from the sys variable. Otherwise return example directory. Suitable to advise people how to create Python invenio module symlink.""" out = "/usr/lib/python2.3/site-packages" # example directory for path in sys.path: if path.endswith("site-packages"): out = path # put proper directory instead of the example one break return out
b76252ebbf556fc9659045b25d4cbdd18cc6b0c5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/b76252ebbf556fc9659045b25d4cbdd18cc6b0c5/testimport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11140, 3965, 67, 4256, 67, 10308, 67, 3562, 13332, 3536, 990, 326, 4486, 3137, 429, 2117, 434, 2834, 17, 10308, 1867, 11140, 26372, 628, 326, 2589, 2190, 18, 225, 5272, 327, 3454, 1867, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11140, 3965, 67, 4256, 67, 10308, 67, 3562, 13332, 3536, 990, 326, 4486, 3137, 429, 2117, 434, 2834, 17, 10308, 1867, 11140, 26372, 628, 326, 2589, 2190, 18, 225, 5272, 327, 3454, 1867, ...
assert False
pass
def endTagOther(self, name): assert False
12f2f9a355464eeaf8e11a4e4ffdf61729dc525d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4487/12f2f9a355464eeaf8e11a4e4ffdf61729dc525d/parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29765, 8290, 12, 2890, 16, 508, 4672, 1815, 1083, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29765, 8290, 12, 2890, 16, 508, 4672, 1815, 1083, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
loginpage(mlist, doc, None, cgidata)
loginpage(mlist, doc, None, language)
def main(): doc = Document() doc.set_language(mm_cfg.DEFAULT_SERVER_LANGUAGE) parts = Utils.GetPathPieces() lenparts = parts and len(parts) if not parts or lenparts < 1: title = _('CGI script error') doc.SetTitle(title) doc.AddItem(Header(2, title)) doc.addError(_('Invalid options to CGI script.')) doc.AddItem('<hr>') doc.AddItem(MailmanLogo()) print doc.Format() return # get the list and user's name listname = parts[0].lower() # open list try: mlist = MailList.MailList(listname, lock=0) except Errors.MMListError, e: # Avoid cross-site scripting attacks safelistname = Utils.websafe(listname) title = _('CGI script error') doc.SetTitle(title) doc.AddItem(Header(2, title)) doc.addError(_('No such list <em>%(safelistname)s</em>')) doc.AddItem('<hr>') doc.AddItem(MailmanLogo()) print doc.Format() syslog('error', 'No such list "%s": %s\n', listname, e) return # The total contents of the user's response cgidata = cgi.FieldStorage(keep_blank_values=1) # Set the language for the page. If we're coming from the listinfo cgi, # we might have a 'language' key in the cgi data. That was an explicit # preference to view the page in, so we should honor that here. If that's # not available, use the list's default language. language = cgidata.getvalue('language', mlist.preferred_language) i18n.set_language(language) doc.set_language(language) if lenparts < 2: user = cgidata.getvalue('email') if not user: # If we're coming from the listinfo page and we left the email # address field blank, it's not an error. listinfo.html names the # button UserOptions; we can use that as the descriminator. if not cgidata.getvalue('UserOptions'): doc.addError(_('No address given')) loginpage(mlist, doc, None, cgidata) print doc.Format() return else: user = Utils.LCDomain(Utils.UnobscureEmail(SLASH.join(parts[1:]))) # Avoid cross-site scripting attacks safeuser = Utils.websafe(user) # Sanity check the user, but be careful about leaking membership # information when we're using private rosters. if not mlist.isMember(user) and mlist.private_roster == 0: doc.addError(_('No such member: %(safeuser)s.')) loginpage(mlist, doc, None, cgidata) print doc.Format() return # Find the case preserved email address (the one the user subscribed with) lcuser = user.lower() try: cpuser = mlist.getMemberCPAddress(lcuser) except Errors.NotAMemberError: # This happens if the user isn't a member but we've got private rosters cpuser = None if lcuser == cpuser: cpuser = None # And now we know the user making the request, so set things up to for the # user's stored preferred language, overridden by any form settings for # their new language preference. userlang = cgidata.getvalue('language', mlist.getMemberLanguage(user)) doc.set_language(userlang) i18n.set_language(userlang) # See if this is VARHELP on topics. varhelp = None if cgidata.has_key('VARHELP'): varhelp = cgidata['VARHELP'].value elif os.environ.get('QUERY_STRING'): # POST methods, even if their actions have a query string, don't get # put into FieldStorage's keys :-( qs = cgi.parse_qs(os.environ['QUERY_STRING']).get('VARHELP') if qs and type(qs) == types.ListType: varhelp = qs[0] if varhelp: topic_details(mlist, doc, user, cpuser, userlang, varhelp) return # Are we processing an unsubscription request from the login screen? if cgidata.has_key('login-unsub'): # Because they can't supply a password for unsubscribing, we'll need # to do the confirmation dance. if mlist.isMember(user): mlist.ConfirmUnsubscription(user, userlang) doc.addError(_('The confirmation email has been sent.'), tag='') else: # Not a member if mlist.private_roster == 0: # Public rosters doc.addError(_('No such member: %(safeuser)s.')) else: syslog('mischief', 'Unsub attempt of non-member w/ private rosters: %s', user) doc.addError(_('The confirmation email has been sent.'), tag='') loginpage(mlist, doc, user, cgidata) print doc.Format() return # Are we processing a password reminder from the login screen? if cgidata.has_key('login-remind'): if mlist.isMember(user): mlist.MailUserPassword(user) doc.addError( _('A reminder of your password has been emailed to you.'), tag='') else: # Not a member if mlist.private_roster == 0: # Public rosters doc.addError(_('No such member: %(safeuser)s.')) else: syslog('mischief', 'Reminder attempt of non-member w/ private rosters: %s', user) doc.addError( _('A reminder of your password has been emailed to you.'), tag='') loginpage(mlist, doc, user, cgidata) print doc.Format() return # Authenticate, possibly using the password supplied in the login page password = cgidata.getvalue('password', '').strip() if not mlist.WebAuthenticate((mm_cfg.AuthUser, mm_cfg.AuthListAdmin, mm_cfg.AuthSiteAdmin), password, user): # Not authenticated, so throw up the login page again. If they tried # to authenticate via cgi (instead of cookie), then print an error # message. if cgidata.has_key('password'): doc.addError(_('Authentication failed.')) # So as not to allow membership leakage, prompt for the email # address and the password here. if mlist.private_roster <> 0: syslog('mischief', 'Login failure with private rosters: %s', user) user = None loginpage(mlist, doc, user, cgidata) print doc.Format() return # From here on out, the user is okay to view and modify their membership # options. The first set of checks does not require the list to be # locked. if cgidata.has_key('logout'): print mlist.ZapCookie(mm_cfg.AuthUser, user) loginpage(mlist, doc, user, cgidata) print doc.Format() return if cgidata.has_key('emailpw'): mlist.MailUserPassword(user) options_page( mlist, doc, user, cpuser, userlang, _('A reminder of your password has been emailed to you.')) print doc.Format() return if cgidata.has_key('othersubs'): hostname = mlist.host_name title = _('List subscriptions for %(user)s on %(hostname)s') doc.SetTitle(title) doc.AddItem(Header(2, title)) doc.AddItem(_('''Click on a link to visit your options page for the requested mailing list.''')) # Troll through all the mailing lists that match host_name and see if # the user is a member. If so, add it to the list. onlists = [] for gmlist in lists_of_member(mlist, user) + [mlist]: url = gmlist.GetOptionsURL(user) link = Link(url, gmlist.real_name) onlists.append((gmlist.real_name, link)) onlists.sort() items = OrderedList(*[link for name, link in onlists]) doc.AddItem(items) print doc.Format() return if cgidata.has_key('change-of-address'): # We could be changing the user's full name, email address, or both. # Watch out for non-ASCII characters in the member's name. membername = cgidata.getvalue('fullname') # Canonicalize the member's name membername = Utils.canonstr(membername, language) newaddr = cgidata.getvalue('new-address') confirmaddr = cgidata.getvalue('confirm-address') oldname = mlist.getMemberName(user) set_address = set_membername = 0 # See if the user wants to change their email address globally globally = cgidata.getvalue('changeaddr-globally') # We will change the member's name under the following conditions: # - membername has a value # - membername has no value, but they /used/ to have a membername if membername and membername <> oldname: # Setting it to a new value set_membername = 1 if not membername and oldname: # Unsetting it set_membername = 1 # We will change the user's address if both newaddr and confirmaddr # are non-blank, have the same value, and aren't the currently # subscribed email address (when compared case-sensitively). If both # are blank, but membername is set, we ignore it, otherwise we print # an error. msg = '' if newaddr and confirmaddr: if newaddr <> confirmaddr: options_page(mlist, doc, user, cpuser, userlang, _('Addresses did not match!')) print doc.Format() return if newaddr == cpuser: options_page(mlist, doc, user, cpuser, userlang, _('You are already using that email address')) print doc.Format() return # If they're requesting to subscribe an address which is already a # member, and they're /not/ doing it globally, then refuse. # Otherwise, we'll agree to do it globally (with a warning # message) and let ApprovedChangeMemberAddress() handle already a # member issues. if mlist.isMember(newaddr): safenewaddr = Utils.websafe(newaddr) if globally: listname = mlist.real_name msg += _("""\
d7486f36a2c21a3bf7f4e4354844f858131b0e0e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/d7486f36a2c21a3bf7f4e4354844f858131b0e0e/options.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 997, 273, 4319, 1435, 997, 18, 542, 67, 4923, 12, 7020, 67, 7066, 18, 5280, 67, 4370, 67, 15547, 13, 225, 2140, 273, 6091, 18, 967, 743, 16539, 8610, 1435, 562, 6019, 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, 2774, 13332, 997, 273, 4319, 1435, 997, 18, 542, 67, 4923, 12, 7020, 67, 7066, 18, 5280, 67, 4370, 67, 15547, 13, 225, 2140, 273, 6091, 18, 967, 743, 16539, 8610, 1435, 562, 6019, 273,...
utils.scp_remote_escape(path))
" ".join(paths))
def _encode_remote_path(self, path): """ Given a file path, encodes it as a remote path, in the style used by rsync and scp. """ return '%s@%s:"%s"' % (self.user, self.hostname, utils.scp_remote_escape(path))
664339d283d0ac31a5eaab7be6143031f519d4e7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12268/664339d283d0ac31a5eaab7be6143031f519d4e7/abstract_ssh.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3015, 67, 7222, 67, 803, 12, 2890, 16, 589, 4672, 3536, 16803, 279, 585, 589, 16, 16834, 518, 487, 279, 2632, 589, 16, 316, 326, 2154, 1399, 635, 3597, 1209, 471, 30361, 18, 3536,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3015, 67, 7222, 67, 803, 12, 2890, 16, 589, 4672, 3536, 16803, 279, 585, 589, 16, 16834, 518, 487, 279, 2632, 589, 16, 316, 326, 2154, 1399, 635, 3597, 1209, 471, 30361, 18, 3536,...
"/EMAN2/Ctf_Correction.py": "EMAN2 CTF Correction"}
"/EMAN2/Ctf_Correction.py": "EMAN2 CTF Correction", "/EMAN2/Nonlinear_Anisotropic_Diffusion.py": "IMOD Nonlinear Anisotropic Diffusion"}
def dataset(request, datasetId): """ Shows the thumbnails in a dataset, provides a link back to EMDB entry (project) """ conn = getConnection(request) dataset = conn.getDataset(datasetId) entryId = None # look for parent project that has EMDB entry name (EMDB ID) for p in dataset.listParents(single = False): try: emdbId = long(p.getName()) entryId = str(emdbId) break except: pass # add some scripts that we can run on a dataset scriptService = conn.getScriptService() scripts = [] scriptNames = {"/EMAN2/Run_Spider_Procedure.py": "Run Spider Procedure", "/EMAN2/Eman_Filters.py": "Process with EMAN2 Filter", "/EMAN2/Ctf_Correction.py": "EMAN2 CTF Correction"} for path, display in scriptNames.items(): scriptId = scriptService.getScriptID(path) if scriptId and scriptId > 0: s = {} s["name"] = display s["id"] = scriptId scripts.append(s) return render_to_response('webemdb/data/dataset.html', {'dataset': dataset, 'entryId': entryId, 'scripts': scripts})
025f8cd82607015d6cf849d5025588b76eab174a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12409/025f8cd82607015d6cf849d5025588b76eab174a/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3709, 12, 2293, 16, 3709, 548, 4672, 3536, 9674, 87, 326, 30526, 316, 279, 3709, 16, 8121, 279, 1692, 1473, 358, 7141, 2290, 1241, 261, 4406, 13, 3536, 1487, 273, 6742, 12, 2293, 13, 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, 3709, 12, 2293, 16, 3709, 548, 4672, 3536, 9674, 87, 326, 30526, 316, 279, 3709, 16, 8121, 279, 1692, 1473, 358, 7141, 2290, 1241, 261, 4406, 13, 3536, 1487, 273, 6742, 12, 2293, 13, 2...
On Unix, there are three possible config files: pydistutils.cfg in the Distutils installation directory (ie. where the top-level Distutils __inst__.py file lives), .pydistutils.cfg in the user's home directory, and setup.cfg in the current directory. On Windows and Mac OS, there are two possible config files: pydistutils.cfg in the Python installation directory (sys.prefix) and setup.cfg in the current directory.
There are three possible config files: distutils.cfg in the Distutils installation directory (ie. where the top-level Distutils __inst__.py file lives), a file in the user's home directory named .pydistutils.cfg on Unix and pydistutils.cfg on Windows/Mac, and setup.cfg in the current directory.
def find_config_files (self): """Find as many configuration files as should be processed for this platform, and return a list of filenames in the order in which they should be parsed. The filenames returned are guaranteed to exist (modulo nasty race conditions).
0574e576a0658179a19dc1f66d98c52dae198c4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0574e576a0658179a19dc1f66d98c52dae198c4b/dist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 1425, 67, 2354, 261, 2890, 4672, 3536, 3125, 487, 4906, 1664, 1390, 487, 1410, 506, 5204, 364, 333, 4072, 16, 471, 327, 279, 666, 434, 9066, 316, 326, 1353, 316, 1492, 2898, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 1425, 67, 2354, 261, 2890, 4672, 3536, 3125, 487, 4906, 1664, 1390, 487, 1410, 506, 5204, 364, 333, 4072, 16, 471, 327, 279, 666, 434, 9066, 316, 326, 1353, 316, 1492, 2898, ...
def remove_package(self, name):
def remove_package(self, name, recurse=False):
def remove_package(self, name): shortname, version = _splitname(name) current_version = os.environ.get('SETPKG_VERSION_%s' % shortname, None) if current_version is None: raise PackageError(shortname, "package is not currently set") package = self.shelf[shortname] if version: if package.version != version: raise InvalidPackageVersion(package, version, "cannot be removed because it is not currently set (active version is %s)" % (package.version,)) for var, values in package.environ.iteritems(): for value in values: popenv(var, value, expand=False) self._status('removing', package.fullname) del self.shelf[shortname] # clear package --> version cache self._removed.append(package) #pprint.pprint(package.environ)
b0d601c6503d24853799ea87031f53a9a5173822 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14112/b0d601c6503d24853799ea87031f53a9a5173822/setpkg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 5610, 12, 2890, 16, 508, 16, 11502, 33, 8381, 4672, 23879, 16, 1177, 273, 389, 4939, 529, 12, 529, 13, 783, 67, 1589, 273, 1140, 18, 28684, 18, 588, 2668, 4043, 8784, 43, 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, 1206, 67, 5610, 12, 2890, 16, 508, 16, 11502, 33, 8381, 4672, 23879, 16, 1177, 273, 389, 4939, 529, 12, 529, 13, 783, 67, 1589, 273, 1140, 18, 28684, 18, 588, 2668, 4043, 8784, 43, 6...
def __tag(self, pipeline, source, tags):
def __tag(self, tags):
def __tag(self, pipeline, source, tags): if self.song and self.song.fill_metadata: if self.song.multisong: proxy = type(self.song)(self.song["~filename"]) proxy.multisong = False proxy.update(self.song) else: proxy = self.song
a7537478887627e35dd912191d6723e66e6aa168 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/a7537478887627e35dd912191d6723e66e6aa168/player.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2692, 12, 2890, 16, 2342, 4672, 309, 365, 18, 816, 75, 471, 365, 18, 816, 75, 18, 5935, 67, 4165, 30, 309, 365, 18, 816, 75, 18, 23978, 932, 30, 2889, 273, 618, 12, 2890, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2692, 12, 2890, 16, 2342, 4672, 309, 365, 18, 816, 75, 471, 365, 18, 816, 75, 18, 5935, 67, 4165, 30, 309, 365, 18, 816, 75, 18, 23978, 932, 30, 2889, 273, 618, 12, 2890, 18,...
divergent. ::
divergent::
def integral(expression, v=None, a=None, b=None, algorithm='maxima'): r""" Returns the indefinite integral with respect to the variable `v`, ignoring the constant of integration. Or, if endpoints `a` and `b` are specified, returns the definite integral over the interval `[a, b]`. If ``self`` has only one variable, then it returns the integral with respect to that variable. INPUT: - ``v`` - (optional) a variable or variable name - ``a`` - (optional) lower endpoint of definite integral - ``b`` - (optional) upper endpoint of definite integral - ``algorithm`` - (default: 'maxima') one of - 'maxima' - use maxima (the default) - 'sympy' - use sympy (also in Sage) - 'mathematica_free' - use http://integrals.wolfram.com/ EXAMPLES:: sage: x = var('x') sage: h = sin(x)/(cos(x))^2 sage: h.integral(x) 1/cos(x) :: sage: f = x^2/(x+1)^3 sage: f.integral() 1/2*(4*x + 3)/(x^2 + 2*x + 1) + log(x + 1) :: sage: f = x*cos(x^2) sage: f.integral(x, 0, sqrt(pi)) 0 sage: f.integral(a=-pi, b=pi) 0 :: sage: f(x) = sin(x) sage: f.integral(x, 0, pi/2) 1 The variable and endpoints are both optional:: sage: integral(sin(x)) -cos(x) sage: integral(sin(x), var('y')) y*sin(x) sage: integral(sin(x), pi, 2*pi) -2 sage: integral(sin(x), var('y'), pi, 2*pi) pi*sin(x) Constraints are sometimes needed:: sage: var('x, n') (x, n) sage: integral(x^n,x) Traceback (most recent call last): ... TypeError: Computation failed since Maxima requested additional constraints (try the command 'assume(n+1>0)' before integral or limit evaluation, for example): Is n+1 zero or nonzero? sage: assume(n > 0) sage: integral(x^n,x) x^(n + 1)/(n + 1) sage: forget() Usually the constraints are of sign, but others are possible:: sage: assume(n==-1) sage: integral(x^n,x) log(x) Note that an exception is raised when a definite integral is divergent. :: sage: forget() sage: integrate(1/x^3,x,0,1) Traceback (most recent call last): ... ValueError: Integral is divergent. sage: integrate(1/x^3,x,-1,3) Traceback (most recent call last): ... ValueError: Integral is divergent. .. note:: Above, putting assume(n == -1) does not yield the right behavior. The examples in the Maxima documentation:: sage: var('x, y, z, b') (x, y, z, b) sage: integral(sin(x)^3) 1/3*cos(x)^3 - cos(x) sage: integral(x/sqrt(b^2-x^2)) x*log(2*b + 2*sqrt(b^2 - x^2)) sage: integral(x/sqrt(b^2-x^2), x) -sqrt(b^2 - x^2) sage: integral(cos(x)^2 * exp(x), x, 0, pi) 3/5*e^pi - 3/5 sage: integral(x^2 * exp(-x^2), x, -oo, oo) 1/2*sqrt(pi) We integrate the same function in both Mathematica and Sage (via Maxima):: sage: _ = var('x, y, z') sage: f = sin(x^2) + y^z sage: g = mathematica(f) # optional -- requires mathematica sage: print g # optional -- requires mathematica z 2 y + Sin[x ] sage: print g.Integrate(x) # optional -- requires mathematica z Pi 2 x y + Sqrt[--] FresnelS[Sqrt[--] x] 2 Pi sage: print f.integral(x) y^z*x + 1/8*((I - 1)*sqrt(2)*erf((1/2*I - 1/2)*sqrt(2)*x) + (I + 1)*sqrt(2)*erf((1/2*I + 1/2)*sqrt(2)*x))*sqrt(pi) Alternatively, just use algorithm='mathematica_free' to integrate via Mathematica over the internet (does NOT require a Mathematica license!):: sage: _ = var('x, y, z') sage: f = sin(x^2) + y^z sage: f.integrate(algorithm="mathematica_free") # optional -- requires internet sqrt(pi)*sqrt(1/2)*fresnels(sqrt(2)*x/sqrt(pi)) + y^z*x We can also use Sympy:: sage: _ = var('x, y, z') sage: (x^y-z).integrate(y) -y*z + x^y/log(x) sage: (x^y-z).integrate(y,algorithm="sympy") -y*z + x^y/log(x) We integrate the above function in maple now:: sage: g = maple(f); g # optional -- requires maple sin(x^2)+y^z sage: g.integrate(x) # optional -- requires maple 1/2*2^(1/2)*Pi^(1/2)*FresnelS(2^(1/2)/Pi^(1/2)*x)+y^z*x We next integrate a function with no closed form integral. Notice that the answer comes back as an expression that contains an integral itself. :: sage: A = integral(1/ ((x-4) * (x^3+2*x+1)), x); A 1/73*log(x - 4) - 1/73*integrate((x^2 + 4*x + 18)/(x^3 + 2*x + 1), x) We now show that floats are not converted to rationals automatically since we by default have keepfloat: true in maxima. :: sage: integral(e^(-x^2),x, 0, 0.1) 0.0562314580091*sqrt(pi) ALIASES: integral() and integrate() are the same. EXAMPLES: Here is example where we have to use assume:: sage: a,b = var('a,b') sage: integrate(1/(x^3 *(a+b*x)^(1/3)), x) Traceback (most recent call last): ... TypeError: Computation failed since Maxima requested additional constraints (try the command 'assume(a>0)' before integral or limit evaluation, for example): Is a positive or negative? So we just assume that `a>0` and the integral works:: sage: assume(a>0) sage: integrate(1/(x^3 *(a+b*x)^(1/3)), x) 2/9*sqrt(3)*b^2*arctan(1/3*(2*(b*x + a)^(1/3) + a^(1/3))*sqrt(3)/a^(1/3))/a^(7/3) + 2/9*b^2*log((b*x + a)^(1/3) - a^(1/3))/a^(7/3) - 1/9*b^2*log((b*x + a)^(2/3) + (b*x + a)^(1/3)*a^(1/3) + a^(2/3))/a^(7/3) + 1/6*(4*(b*x + a)^(5/3)*b^2 - 7*(b*x + a)^(2/3)*a*b^2)/((b*x + a)^2*a^2 - 2*(b*x + a)*a^3 + a^4) TESTS: The following integral was broken prior to Maxima 5.15.0 - see #3013 :: sage: integrate(sin(x)*cos(10*x)*log(x)) 1/18*log(x)*cos(9*x) - 1/22*log(x)*cos(11*x) - 1/18*integrate(cos(9*x)/x, x) + 1/22*integrate(cos(11*x)/x, x) It is no longer possible to use certain functions without an explicit variable. Instead, evaluate the function at a variable, and then take the integral:: sage: integrate(sin) Traceback (most recent call last): ... TypeError sage: integrate(sin(x)) -cos(x) sage: integrate(sin(x), 0, 1) -cos(1) + 1 Check if #780 is fixed:: sage: _ = var('x,y') sage: f = log(x^2+y^2) sage: res = integral(f,x,0.0001414, 1.); res 2.0*y*arctan(1/y) - 2.0*y*arctan(0.0001414/y) - 0.0001414*log(y^2 + 1.999396e-08) + log(y^2 + 1.0) - 1.9997172 sage: nres = numerical_integral(f.subs(y=2), 0.0001414, 1.); nres (1.4638323264144..., 1.6251803529759...e-14) sage: res.subs(y=2).n() 1.46383232641 sage: nres = numerical_integral(f.subs(y=.5), 0.0001414, 1.); nres (-0.66951170887280698, 7.7686781108547113e-15) sage: res.subs(y=.5).n() -0.669511708873 """ if b is None and a is not None: # two arguments, must be endpoints a, b = v, a v = None if v is None: v = expression.default_variable() if isinstance(expression, SFunction): # a bare function like sin expression = expression(v) elif not is_SymbolicVariable(v): v = var(repr(v)) #raise TypeError, 'must integrate with respect to a variable' if (a is None) ^ (b is None): raise TypeError, 'only one endpoint given' if algorithm == 'maxima': if a is None: result = expression._maxima_().integrate(v) else: try: result = expression._maxima_().integrate(v, a, b) except TypeError, error: s = str(error) if "divergent" in s or 'Principal Value' in s: raise ValueError, "Integral is divergent." else: raise elif algorithm == 'mathematica_free': import urllib, re # We need to integrate against x vars = [str(x) for x in expression.variables()] if any(len(x)>1 for x in vars): raise NotImplementedError, "Mathematica online integrator can only handle single letter variables." x = var('x') if repr(v) != 'x': for i in range(ord('a'), ord('z')+1): if chr(i) not in vars: shadow_x = var(chr(i)) break expression = expression.subs({x:shadow_x}).subs({dvar: x}) params = urllib.urlencode({'expr': expression._mathematica_init_(), 'random': 'false'}) page = urllib.urlopen("http://integrals.wolfram.com/index.jsp", params).read() page = page[page.index('"inputForm"'):page.index('"outputForm"')] page = re.sub("\s", "", page) mexpr = re.match(r".*Integrate.*==</em><br/>(.*)</p>", page).groups()[0] try: ans = SR(mexpr.lower().replace('[', '(').replace(']', ')')) if repr(v) != 'x': ans = ans.subs({x:v}).subs({shadow_x:x}) return ans except TypeError: raise ValueError, "Unable to parse: %s" % mexpr elif algorithm == 'sympy': import sympy ex = expression._sympy_() v = v._sympy_() if a is None: result = sympy.integrate(ex, v) else: result = sympy.integrate(ex, (v, a._sympy_(), b._sympy_())) else: raise ValueError, "unknown algorithm: %s" % algorithm if a is None: return expression.parent()(result) else: return SR(result)
3ec2dc407b9aa884f4bd5bcde2e9ac1844da87ea /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/3ec2dc407b9aa884f4bd5bcde2e9ac1844da87ea/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21423, 12, 8692, 16, 331, 33, 7036, 16, 279, 33, 7036, 16, 324, 33, 7036, 16, 4886, 2218, 1896, 13888, 11, 4672, 436, 8395, 2860, 326, 316, 5649, 1137, 21423, 598, 8762, 358, 326, 2190...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21423, 12, 8692, 16, 331, 33, 7036, 16, 279, 33, 7036, 16, 324, 33, 7036, 16, 4886, 2218, 1896, 13888, 11, 4672, 436, 8395, 2860, 326, 316, 5649, 1137, 21423, 598, 8762, 358, 326, 2190...
counts = unpack('<qq', extra[4:20])
counts = unpack('<QQ', extra[4:20])
def _decodeExtra(self): # Try to decode the extra field. extra = self.extra unpack = struct.unpack while extra: tp, ln = unpack('<hh', extra[:4]) if tp == 1: if ln >= 24: counts = unpack('<qqq', extra[4:28]) elif ln == 16: counts = unpack('<qq', extra[4:20]) elif ln == 8: counts = unpack('<q', extra[4:12]) elif ln == 0: counts = () else: raise RuntimeError, "Corrupt extra field %s"%(ln,)
8758505b352b3425ba646bdbff7a34c21eb6618a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/8758505b352b3425ba646bdbff7a34c21eb6618a/zipfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3922, 7800, 12, 2890, 4672, 468, 6161, 358, 2495, 326, 2870, 652, 18, 2870, 273, 365, 18, 7763, 6167, 273, 1958, 18, 17309, 1323, 2870, 30, 8071, 16, 7211, 273, 6167, 2668, 32, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3922, 7800, 12, 2890, 4672, 468, 6161, 358, 2495, 326, 2870, 652, 18, 2870, 273, 365, 18, 7763, 6167, 273, 1958, 18, 17309, 1323, 2870, 30, 8071, 16, 7211, 273, 6167, 2668, 32, 21...
return None
return {} if self._edit_grp.group != group: try: editable = self._create_dummy_edje(group) except Exception, e: return {} else: editable = self._edit_grp
def export_get_parts(self): if not self._edit_grp.group: return None
3f644b5b69cc4224d8cdda4bb754bf492f566745 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12343/3f644b5b69cc4224d8cdda4bb754bf492f566745/rpc_handlers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 588, 67, 6019, 12, 2890, 4672, 309, 486, 365, 6315, 4619, 67, 17532, 18, 1655, 30, 327, 599, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 588, 67, 6019, 12, 2890, 4672, 309, 486, 365, 6315, 4619, 67, 17532, 18, 1655, 30, 327, 599, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.guts = blks2.wfm_rcv_pll (usrp_rate, 1)
self.guts = blks2.wfm_rcv_pll (usrp_rate, audio_decim)
def __init__(self,frame,panel,vbox,argv): stdgui2.std_top_block.__init__ (self,frame,panel,vbox,argv)
4371a89e16ac97da2be084311459176a63ee0151 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9733/4371a89e16ac97da2be084311459176a63ee0151/txrx.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3789, 16, 13916, 16, 90, 2147, 16, 19485, 4672, 2044, 20292, 22, 18, 5084, 67, 3669, 67, 2629, 16186, 2738, 972, 261, 2890, 16, 3789, 16, 13916, 16, 90, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3789, 16, 13916, 16, 90, 2147, 16, 19485, 4672, 2044, 20292, 22, 18, 5084, 67, 3669, 67, 2629, 16186, 2738, 972, 261, 2890, 16, 3789, 16, 13916, 16, 90, ...
""" INTERNAL: Returns a tuple of sets off all edges which are
""" INTERNAL: Returns a tuple of sets of all edges which are
def _known_edges(self): """ INTERNAL: Returns a tuple of sets off all edges which are pending, currently scheduled, scheduled next or already finished. """
c823e9da42cbdb12182c745b2c2c77a574bfdad1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4007/c823e9da42cbdb12182c745b2c2c77a574bfdad1/requestingbundles.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2994, 67, 8746, 12, 2890, 4672, 3536, 18139, 30, 2860, 279, 3193, 434, 1678, 434, 777, 5231, 1492, 854, 4634, 16, 4551, 9755, 16, 9755, 1024, 578, 1818, 6708, 18, 3536, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2994, 67, 8746, 12, 2890, 4672, 3536, 18139, 30, 2860, 279, 3193, 434, 1678, 434, 777, 5231, 1492, 854, 4634, 16, 4551, 9755, 16, 9755, 1024, 578, 1818, 6708, 18, 3536, 2, -100, -...
def countMatchedDeletionsFunctor(cls, cnv_segment_obj, cnv_qc_call, param_obj): """
def countMatchedDeletionsFunctor(cls, param_obj, cnv_segment_obj=None, cnv_qc_call=None): """ 2009-12-9 store qc data in param_obj.array_id2qc_data
def countMatchedDeletionsFunctor(cls, cnv_segment_obj, cnv_qc_call, param_obj): """ 2009-11-4 a functor to be called in """ if not hasattr(param_obj, 'no_of_valid_deletions'): setattr(param_obj, 'no_of_valid_deletions', 0) qc_chromosome, qc_start, qc_stop = cnv_qc_call[:3] cnv_qc_call_id = cnv_qc_call[-1] param_obj.cnv_qc_call_id_set.add(cnv_qc_call_id) param_obj.no_of_valid_deletions += 1
1440ce5092ec2e1bfdd9b1e187e40f109bf0000b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9645/1440ce5092ec2e1bfdd9b1e187e40f109bf0000b/misc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1056, 15400, 9019, 1115, 42, 6931, 280, 12, 6429, 16, 579, 67, 2603, 16, 6227, 90, 67, 9273, 67, 2603, 33, 7036, 16, 6227, 90, 67, 30675, 67, 1991, 33, 7036, 4672, 3536, 4044, 29, 17...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1056, 15400, 9019, 1115, 42, 6931, 280, 12, 6429, 16, 579, 67, 2603, 16, 6227, 90, 67, 9273, 67, 2603, 33, 7036, 16, 6227, 90, 67, 30675, 67, 1991, 33, 7036, 4672, 3536, 4044, 29, 17...
newPolicyFile = os.path.join(self.dirs.get("work"), configurationFileName+".tmp")
newPolicyFile = os.path.join("/tmp", configurationFileName+".tmp."+str(os.getpid()))
def deploySetup(self): self.logger.log(Log.DEBUG, "AbePipelineConfigurator:deploySetup")
7cbc6828c82c2dba31bd3657220d0a02242e1833 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6549/7cbc6828c82c2dba31bd3657220d0a02242e1833/AbePipelineConfigurator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7286, 7365, 12, 2890, 4672, 365, 18, 4901, 18, 1330, 12, 1343, 18, 9394, 16, 315, 37, 2196, 8798, 17182, 30, 12411, 7365, 7923, 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, 7286, 7365, 12, 2890, 4672, 365, 18, 4901, 18, 1330, 12, 1343, 18, 9394, 16, 315, 37, 2196, 8798, 17182, 30, 12411, 7365, 7923, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def _runTest(self, filenameIn, filenameOut, filenameOutE):
def _runTest(self, filenameIn, filenameOut, filenameOutE, faultGroup=None):
def _runTest(self, filenameIn, filenameOut, filenameOutE):
149fca5247c306be318259fcfa1075a1cae91da6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8645/149fca5247c306be318259fcfa1075a1cae91da6/TestRefineUniform.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2681, 4709, 12, 2890, 16, 1544, 382, 16, 1544, 1182, 16, 1544, 1182, 41, 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...
[ 1, 1, 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, 389, 2681, 4709, 12, 2890, 16, 1544, 382, 16, 1544, 1182, 16, 1544, 1182, 41, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.notifier = Notifier(root_uris[0], ManagementInterface().publish_xcapdiff)
self.notifier = Notifier(root_uris[0], self._mi.publish_xcapdiff)
def __init__(self): BaseStorage.__init__(self) self.notifier = Notifier(root_uris[0], ManagementInterface().publish_xcapdiff)
910c777396dba13f3ba8678600764ffcd471eb81 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3446/910c777396dba13f3ba8678600764ffcd471eb81/openser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 3360, 3245, 16186, 2738, 972, 12, 2890, 13, 365, 18, 902, 1251, 273, 2288, 1251, 12, 3085, 67, 23510, 63, 20, 6487, 13303, 1358, 7675, 6543, 67, 92, 59...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 3360, 3245, 16186, 2738, 972, 12, 2890, 13, 365, 18, 902, 1251, 273, 2288, 1251, 12, 3085, 67, 23510, 63, 20, 6487, 13303, 1358, 7675, 6543, 67, 92, 59...
self.player.stop() self.player = None if self.video_display is not None: self.remove_video_display() self.video_display = None
self.stop(save_resume_time=False)
def _select_current(self): item_info = self.playlist[self.position] if not app.config.get(prefs.PLAY_IN_MIRO): if self.is_playing: self.player.stop() self.player = None if self.video_display is not None: self.remove_video_display() self.video_display = None # FIXME - do this to avoid "currently playing green thing. # should be a better way. self.playlist = None app.widgetapp.open_file(item_info.video_path) messages.MarkItemWatched(item_info.id).send_to_backend() return
1969859534f07eccecd3fa130f59941b597cf517 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/1969859534f07eccecd3fa130f59941b597cf517/playback.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4025, 67, 2972, 12, 2890, 4672, 761, 67, 1376, 273, 365, 18, 1601, 1098, 63, 2890, 18, 3276, 65, 309, 486, 595, 18, 1425, 18, 588, 12, 1484, 2556, 18, 52, 7868, 67, 706, 67, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4025, 67, 2972, 12, 2890, 4672, 761, 67, 1376, 273, 365, 18, 1601, 1098, 63, 2890, 18, 3276, 65, 309, 486, 595, 18, 1425, 18, 588, 12, 1484, 2556, 18, 52, 7868, 67, 706, 67, 7...
p = Diffdump() p.set_image(os.path.join(directory, '12287_1_E1_001.img')) print p.readheader() p = Diffdump() p.set_image(os.path.join(directory, '12287_1_E1_001.img')) print p.gain()
image = os.path.join(directory, '12287_1_E1_001.img') p.set_image(image) header = p.readheader() print 'Frame %s collected at: %s' % \ (os.path.split(image)[-1], header['date']) print 'Phi: %6.2f %6.2f' % \ (header['phi_start'], header['phi_end']) print 'Wavelength: %6.4f Distance: %6.2f' % \ (header['wavelength'], header['distance']) print 'Pixel size: %f %f' % header['pixel'] print 'Detector class: %s' % header['detector_class']
def parse_output(self, output): '''A test function for diffdump output.''' fudge = {'adsc':{'wavelength':1.0, 'pixel':1.0}, 'raxis':{'wavelength':1.0, 'pixel':1.0}, 'saturn':{'wavelength':1.0, 'pixel':1.0}, 'marccd':{'wavelength':1.0, 'pixel':0.001}, 'mar':{'wavelength':1.0, 'pixel':1.0}}
459f74626f6fe57a39517ef17db93ba86a726757 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3290/459f74626f6fe57a39517ef17db93ba86a726757/Diffdump.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 2844, 12, 2890, 16, 876, 4672, 9163, 37, 1842, 445, 364, 3122, 8481, 876, 1093, 6309, 225, 284, 27110, 273, 13666, 361, 1017, 4278, 27828, 91, 16775, 4278, 21, 18, 20, 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, 1109, 67, 2844, 12, 2890, 16, 876, 4672, 9163, 37, 1842, 445, 364, 3122, 8481, 876, 1093, 6309, 225, 284, 27110, 273, 13666, 361, 1017, 4278, 27828, 91, 16775, 4278, 21, 18, 20, 16, 29...
msgfp = open(msgfile) p = Parser(_class=Message.Message) msg = p.parse(msgfp) msgfp.close() os.unlink(msgfile)
msg = data = None try: msgfp = open(msgfile) except IOError, e: if e.errno <> errno.ENOENT: raise else: p = Parser(_class=Message.Message) msg = p.parse(msgfp) msgfp.close() os.unlink(msgfile)
def dequeue(self, filebase): # Calculate the .db and .msg filenames from the given filebase. msgfile = os.path.join(self.__whichq, filebase + '.msg') dbfile = os.path.join(self.__whichq, filebase + '.db') # Read the message text and parse it into a message object tree. When # done, unlink the msg file. msgfp = open(msgfile) p = Parser(_class=Message.Message) msg = p.parse(msgfp) msgfp.close() os.unlink(msgfile) # Now, read the metadata using the appropriate external metadata # format. When done, unlink the metadata file. data = self._ext_read(dbfile) os.unlink(dbfile) return msg, data
f04bb42e60fb9800b99c0b7bb36f198636d7b3ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/f04bb42e60fb9800b99c0b7bb36f198636d7b3ea/Switchboard.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29964, 12, 2890, 16, 585, 1969, 4672, 468, 9029, 326, 263, 1966, 471, 263, 3576, 9066, 628, 326, 864, 585, 1969, 18, 1234, 768, 273, 1140, 18, 803, 18, 5701, 12, 2890, 16186, 12784, 85...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29964, 12, 2890, 16, 585, 1969, 4672, 468, 9029, 326, 263, 1966, 471, 263, 3576, 9066, 628, 326, 864, 585, 1969, 18, 1234, 768, 273, 1140, 18, 803, 18, 5701, 12, 2890, 16186, 12784, 85...
except IOError, e
except IOError, e:
def _base_on(self, base_on): """helper function to extract ext3 file system from a live CD ISO""" isoloop = DiskMount(LoopbackDisk(base_on, 0), self._mkdtemp())
832c78e2d6f54e130b845dd7d63fa457b0f513ea /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9342/832c78e2d6f54e130b845dd7d63fa457b0f513ea/live.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1969, 67, 265, 12, 2890, 16, 1026, 67, 265, 4672, 3536, 4759, 445, 358, 2608, 1110, 23, 585, 2619, 628, 279, 8429, 21508, 9351, 8395, 353, 12854, 556, 273, 12951, 8725, 12, 6452, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1969, 67, 265, 12, 2890, 16, 1026, 67, 265, 4672, 3536, 4759, 445, 358, 2608, 1110, 23, 585, 2619, 628, 279, 8429, 21508, 9351, 8395, 353, 12854, 556, 273, 12951, 8725, 12, 6452, ...
rtl=u64(read(8))
rtl=U64(read(8))
def next(self, index=0): file=self._file seek=file.seek read=file.read pos=self._pos
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 12, 2890, 16, 770, 33, 20, 4672, 585, 33, 2890, 6315, 768, 6520, 33, 768, 18, 16508, 855, 33, 768, 18, 896, 949, 33, 2890, 6315, 917, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 12, 2890, 16, 770, 33, 20, 4672, 585, 33, 2890, 6315, 768, 6520, 33, 768, 18, 16508, 855, 33, 768, 18, 896, 949, 33, 2890, 6315, 917, 2, -100, -100, -100, -100, -100, -100, -10...
initialcount=175
initialcount=176
def initialize_glyphs(): global initial_glyphs, initialcount, count for number in initial_glyphs: toto="_00%02d" % int(number) initial_glyphs.insert(0,toto) initial_glyphs.remove(number) if font_name=="gregorio": glyphs_to_append=("_1025", "_2049") initialcount=175 elif font_name=="parmesan": glyphs_to_append=("_1025", "_2049") initialcount=175 elif font_name=="greciliae": glyphs_to_append=("_2049", "_1025") initialcount=176 elif font_name=="gregoria": glyphs_to_append=("_2049", "_1025") initialcount=175 for glyphnumber in glyphs_to_append: initial_glyphs.append(glyphnumber) count=initialcount
ca968780b7f802e10783c30301121d89b2a8411b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7096/ca968780b7f802e10783c30301121d89b2a8411b/squarize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 67, 19426, 87, 13332, 2552, 2172, 67, 19426, 87, 16, 2172, 1883, 16, 1056, 364, 1300, 316, 2172, 67, 19426, 87, 30, 268, 6302, 1546, 67, 713, 9, 3103, 72, 6, 738, 509, 12, 2696...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 67, 19426, 87, 13332, 2552, 2172, 67, 19426, 87, 16, 2172, 1883, 16, 1056, 364, 1300, 316, 2172, 67, 19426, 87, 30, 268, 6302, 1546, 67, 713, 9, 3103, 72, 6, 738, 509, 12, 2696...
print "showing help for command", cmd_class
def _parse_command_opts (self, parser, args): """Parse the command-line options for a single command. 'parser' must be a FancyGetopt instance; 'args' must be the list of arguments, starting with the current command (whose options we are about to parse). Returns a new version of 'args' with the next command at the front of the list; will be the empty list if there are no more commands on the command line. Returns None if the user asked for help on this command. """ # late import because of mutual dependence between these modules from distutils.cmd import Command
6d215ffa766b89b984583672030de4cf40513b35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/6d215ffa766b89b984583672030de4cf40513b35/dist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 3076, 67, 4952, 261, 2890, 16, 2082, 16, 833, 4672, 3536, 3201, 326, 1296, 17, 1369, 702, 364, 279, 2202, 1296, 18, 296, 4288, 11, 1297, 506, 279, 478, 12514, 967, 3838,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2670, 67, 3076, 67, 4952, 261, 2890, 16, 2082, 16, 833, 4672, 3536, 3201, 326, 1296, 17, 1369, 702, 364, 279, 2202, 1296, 18, 296, 4288, 11, 1297, 506, 279, 478, 12514, 967, 3838,...
this = apply(_quickfix.new_OnBehalfOfSubID, args)
this = _quickfix.new_OnBehalfOfSubID(*args)
def __init__(self, *args): this = apply(_quickfix.new_OnBehalfOfSubID, 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, 1398, 1919, 20222, 951, 1676, 734, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1398, 1919, 20222, 951, 1676, 734, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211,...
issue = self.restrictedTraverse(issue_url)
issue = self.getPhysicalRoot().restrictedTraverse(issue_url)
def delete_reference(self, issue_url, RESPONSE=None): """ delete a reference given by its position """
cbfcdddd0df8db8b1ae3eabc005a48a85aaf872c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/cbfcdddd0df8db8b1ae3eabc005a48a85aaf872c/Issue.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 6180, 12, 2890, 16, 5672, 67, 718, 16, 20645, 33, 7036, 4672, 3536, 1430, 279, 2114, 864, 635, 2097, 1754, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 6180, 12, 2890, 16, 5672, 67, 718, 16, 20645, 33, 7036, 4672, 3536, 1430, 279, 2114, 864, 635, 2097, 1754, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print "lineposition, clineposition", lineposition, clineposition
def draw(self): orientation = self.orientation # this could be done cleverly using the other widgets, but what the .... x,y = self.x, self.y fmt = self.labelFormat (delta, startpoint) = scaleParameters(self.minimum, self.maximum, self.nLabels) G = Group() # orientation independent data (direct values for vertical case, convert for horizontal case linedata = [] textdata = [] # the main axis linedata.append( (0, 0, 0, self.length) ) # the cross lines and labels lineposition = startpoint - self.minimum factor = self.factor() print "factor is", factor while lineposition+self.minimum<self.maximum: text = string.strip(fmt % (lineposition+self.minimum)) clineposition = factor * lineposition print "lineposition, clineposition", lineposition, clineposition linedata.append( (0, clineposition, self.width, clineposition) ) textdata.append( (0, clineposition, text) ) lineposition = lineposition + delta print "done with lines" if orientation=="vertical": for (x1, y1, x2, y2) in linedata: G.add(Line(x+x1, y+y1, x+x2, y+y2)) for (x1, y1, t) in textdata: S = String(x+x1-self.extraOffset, y+y1, t) S.textAnchor = "end" G.add(S) elif orientation=="horizontal": for (y1, x1, y2, x2) in linedata: G.add(Line(x+x1, y+y1, x+x2, y+y2)) for (y1, x1, t) in textdata: S = String(x+x1, y+y1-self.extraOffset, t) S.textAnchor = "middle" G.add(S) else: raise ValueError, "bad orientation " + repr(orientation) return G
327f24d7ce4c06f78a1d4f28a5935f6ef1825af0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/327f24d7ce4c06f78a1d4f28a5935f6ef1825af0/barchart.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 12, 2890, 4672, 9820, 273, 365, 18, 19235, 468, 333, 3377, 506, 2731, 1619, 502, 715, 1450, 326, 1308, 10965, 16, 1496, 4121, 326, 1372, 18, 619, 16, 93, 273, 365, 18, 92, 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, 3724, 12, 2890, 4672, 9820, 273, 365, 18, 19235, 468, 333, 3377, 506, 2731, 1619, 502, 715, 1450, 326, 1308, 10965, 16, 1496, 4121, 326, 1372, 18, 619, 16, 93, 273, 365, 18, 92, 16, ...
gLogger.error("ReplicationScheduler._execute: Failed to get replica information.",res['Message'])
gLogger.error( "ReplicationScheduler._execute: Failed to get replica information.", res['Message'] )
def execute(self): """ The main agent execution method """ # This allows dynamic changing of the throughput timescale self.throughputTimescale = self.am_getOption('ThroughputTimescale',3600) self.throughputTimescale = 60*60*1 #print 'ThroughputTimescale:',self.throughputTimescale ###################################################################################### # # Obtain information on the current state of the channel queues # res = self.TransferDB.getChannelQueues() if not res['OK']: errStr = "ReplicationScheduler._execute: Failed to get channel queues from TransferDB." gLogger.error(errStr, res['Message']) return S_OK() if not res['Value']: gLogger.info("ReplicationScheduler._execute: No active channels found for replication.") return S_OK() channels = res['Value'] res = self.TransferDB.getChannelObservedThroughput(self.throughputTimescale) if not res['OK']: errStr = "ReplicationScheduler._execute: Failed to get observed throughput from TransferDB." gLogger.error(errStr,res['Message']) return S_OK() if not res['Value']: gLogger.info("ReplicationScheduler._execute: No active channels found for replication.") return S_OK() bandwidths = res['Value'] self.strategyHandler = StrategyHandler(bandwidths,channels,self.section) requestsPresent = True while requestsPresent: ###################################################################################### # # The first step is to obtain a transfer request from the RequestDB which should be scheduled. # gLogger.info("ReplicationScheduler._execute: Contacting RequestDB for suitable requests.") res = self.RequestDB.getRequest('transfer') if not res['OK']: gLogger.error("ReplicationScheduler._execute: Failed to get a request list from RequestDB.", res['Message']) continue if not res['Value']: gLogger.info("ReplicationScheduler._execute: No requests found in RequestDB.") requestsPresent = False return S_OK() requestString = res['Value']['RequestString'] requestName = res['Value']['RequestName'] gLogger.info("ReplicationScheduler._execute: Obtained Request %s from RequestDB." % (requestName))
9005c0a96ba1bc0698c543bcb4c1886f4eeee344 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9005c0a96ba1bc0698c543bcb4c1886f4eeee344/ReplicationScheduler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 4672, 3536, 1021, 2774, 4040, 4588, 707, 3536, 225, 468, 1220, 5360, 5976, 12770, 434, 326, 24677, 1658, 31402, 365, 18, 10064, 458, 10178, 31402, 273, 365, 18, 301, 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, 1836, 12, 2890, 4672, 3536, 1021, 2774, 4040, 4588, 707, 3536, 225, 468, 1220, 5360, 5976, 12770, 434, 326, 24677, 1658, 31402, 365, 18, 10064, 458, 10178, 31402, 273, 365, 18, 301, 67, ...
global roottree, localtree, porttree, ebuild_initialized, root localtree=vartree("/")
global local_virts, root_virts, roottree, localtree, ebuild_initialized, root, virtuals local_virts=getvirtual("/")
def ebuild_init(): "performs db/variable initialization for the ebuild system. Not required for other scripts." global roottree, localtree, porttree, ebuild_initialized, root localtree=vartree("/") if root=="/": #root is local, and build dep database is the runtime dep database roottree=localtree else: #root is non-local, initialize non-local database as roottree roottree=vartree(root) porttree=portagetree("/") ebuild_initialized=1
6b6f3f10455e0e947af20441193a5ea22d28a31b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2807/6b6f3f10455e0e947af20441193a5ea22d28a31b/portage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 425, 3510, 67, 2738, 13332, 315, 457, 9741, 1319, 19, 6105, 10313, 364, 326, 425, 3510, 2619, 18, 225, 2288, 1931, 364, 1308, 8873, 1199, 2552, 1191, 67, 14035, 87, 16, 1365, 67, 14035, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 425, 3510, 67, 2738, 13332, 315, 457, 9741, 1319, 19, 6105, 10313, 364, 326, 425, 3510, 2619, 18, 225, 2288, 1931, 364, 1308, 8873, 1199, 2552, 1191, 67, 14035, 87, 16, 1365, 67, 14035, ...
ts.get_available_actions(self.req,
self._ts_get_available_actions(ts,
def test_available_actions_create_only(self): ts = TicketSystem(self.env) self.perm.grant_permission('anonymous', 'TICKET_CREATE') self.req.perm = perm.PermissionCache(self.env) self.assertEqual(['leave'], ts.get_available_actions(self.req, {'status': 'new'})) self.assertEqual(['leave'], ts.get_available_actions(self.req, {'status': 'assigned'})) self.assertEqual(['leave'], ts.get_available_actions(self.req, {'status': 'accepted'})) self.assertEqual(['leave'], ts.get_available_actions(self.req, {'status': 'reopened'})) self.assertEqual(['leave', 'reopen'], ts.get_available_actions(self.req, {'status': 'closed'}))
4b1c974fc51a3689f934bd513f21feadc4fe0a2a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9317/4b1c974fc51a3689f934bd513f21feadc4fe0a2a/api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5699, 67, 4905, 67, 2640, 67, 3700, 12, 2890, 4672, 3742, 273, 22023, 3163, 12, 2890, 18, 3074, 13, 365, 18, 12160, 18, 16243, 67, 9827, 2668, 19070, 2187, 296, 56, 16656, 15...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5699, 67, 4905, 67, 2640, 67, 3700, 12, 2890, 4672, 3742, 273, 22023, 3163, 12, 2890, 18, 3074, 13, 365, 18, 12160, 18, 16243, 67, 9827, 2668, 19070, 2187, 296, 56, 16656, 15...
parcelMenuResourceXRC = resources.FindResource ('ViewerParcelMenu', 'wxMenu') assert parcelMenuResourceXRC != None self.displayName = '' node = parcelMenuResourceXRC.GetChildren() while node != None: if node.GetName() == 'label': self.displayName = node.GetChildren().GetContent() break node = menuNode.GetNext() """ Make sure we find a label """ assert self.displayName != ''
""" All parcels must have a resource file. Although they are not required to have a resource menu, or have a label defined. """ assert (resources) ignoreErrors = wxLogNull () parcelMenuResourceXRC = resources.FindResource ('ViewerParcelMenu','wxMenu') del ignoreErrors """ Make sure you call the base class before defining your own displayName. """ assert not hasattr (self, 'displayName') self.displayName = _('UnnamedParcel') if parcelMenuResourceXRC != None: node = parcelMenuResourceXRC.GetChildren() while node != None: if node.GetName() == 'label': self.displayName = node.GetChildren().GetContent() break node = menuNode.GetNext()
def __init__(self): """ modulePath is the path to the module, which must exist. """ Parcel.__init__(self) module = sys.modules[self.__class__.__module__] self.modulename = os.path.basename (module.__file__) self.modulename = os.path.splitext (self.modulename)[0] self.modulePath = os.sep.join(module.__name__.split(".")) + ".xrc" assert (os.path.exists (self.modulePath)) """ Go dig the module name out of the XRC, which requires FindResource. """ assert hasattr (app.applicationResources, 'FindResource') resources = wxXmlResource(self.modulePath) parcelMenuResourceXRC = resources.FindResource ('ViewerParcelMenu', 'wxMenu') assert parcelMenuResourceXRC != None self.displayName = '' node = parcelMenuResourceXRC.GetChildren() while node != None: if node.GetName() == 'label': self.displayName = node.GetChildren().GetContent() break node = menuNode.GetNext() """ Make sure we find a label """ assert self.displayName != ''
f5e87d5c0238741856d539943762ba2c53928478 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/f5e87d5c0238741856d539943762ba2c53928478/ViewerParcel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 3536, 18164, 353, 326, 589, 358, 326, 1605, 16, 1492, 1297, 1005, 18, 3536, 2280, 2183, 16186, 2738, 972, 12, 2890, 13, 1605, 273, 2589, 18, 6400, 63, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 3536, 18164, 353, 326, 589, 358, 326, 1605, 16, 1492, 1297, 1005, 18, 3536, 2280, 2183, 16186, 2738, 972, 12, 2890, 13, 1605, 273, 2589, 18, 6400, 63, ...
data.nFileSizeLow = info.get("size",0) & 0xffffff
data.nFileSizeLow = info.get("size",0) & 0xffffffff
def _info2finddataw(self,path,info,data=None,hinfo=None): """Convert a file/directory info dict into a WIN32_FIND_DATAW struct.""" if data is None: data = libdokan.WIN32_FIND_DATAW() data.dwFileAttributes = self._info2attrmask(path,info,hinfo) data.ftCreateTime = _datetime2filetime(info.get("created_time",None)) data.ftAccessTime = _datetime2filetime(info.get("accessed_time",None)) data.ftWriteTime = _datetime2filetime(info.get("modified_time",None)) data.nFileSizeHigh = info.get("size",0) >> 32 data.nFileSizeLow = info.get("size",0) & 0xffffff data.cFileName = info.get("name","") data.cAlternateFileName = "" return data
6217e5839383b07332179b06cf9ee93f752d1721 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5578/6217e5839383b07332179b06cf9ee93f752d1721/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1376, 22, 926, 449, 396, 91, 12, 2890, 16, 803, 16, 1376, 16, 892, 33, 7036, 16, 76, 1376, 33, 7036, 4672, 3536, 2723, 279, 585, 19, 5149, 1123, 2065, 1368, 279, 678, 706, 1578,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1376, 22, 926, 449, 396, 91, 12, 2890, 16, 803, 16, 1376, 16, 892, 33, 7036, 16, 76, 1376, 33, 7036, 4672, 3536, 2723, 279, 585, 19, 5149, 1123, 2065, 1368, 279, 678, 706, 1578,...
else:
if mod_cls is None:
def resolve_name(self, what, name): """ Determine what module to import and what attribute to document.
cf7e13123d6e24dc0c114c21ae3e1cf9680d2723 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7032/cf7e13123d6e24dc0c114c21ae3e1cf9680d2723/autodoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2245, 67, 529, 12, 2890, 16, 4121, 16, 508, 4672, 3536, 10229, 4121, 1605, 358, 1930, 471, 4121, 1566, 358, 1668, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2245, 67, 529, 12, 2890, 16, 4121, 16, 508, 4672, 3536, 10229, 4121, 1605, 358, 1930, 471, 4121, 1566, 358, 1668, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
"""Implements a file object on top of a regular socket object."""
"""Faux file object attached to a socket object.""" default_bufsize = 8192
_s = "def %s(self, *args): return self._sock.%s(*args)\n\n"
27d975d627ac3873241741299112e1d228e86e3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/27d975d627ac3873241741299112e1d228e86e3f/socket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 389, 87, 273, 315, 536, 738, 87, 12, 2890, 16, 380, 1968, 4672, 327, 365, 6315, 15031, 7866, 87, 30857, 1968, 5153, 82, 64, 82, 6, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 389, 87, 273, 315, 536, 738, 87, 12, 2890, 16, 380, 1968, 4672, 327, 365, 6315, 15031, 7866, 87, 30857, 1968, 5153, 82, 64, 82, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
>>> ExtendedContext.logical_and(10, 01) Decimal('0') >>> ExtendedContext.logical_and(Decimal(10), 01) Decimal('0') >>> ExtendedContext.logical_and(10, Decimal(01)) Decimal('0')
>>> ExtendedContext.logical_and(110, 1101) Decimal('100') >>> ExtendedContext.logical_and(Decimal(110), 1101) Decimal('100') >>> ExtendedContext.logical_and(110, Decimal(1101)) Decimal('100')
def logical_and(self, a, b): """Applies the logical operation 'and' between each operand's digits.
a61b6df0b256190049644dd9f63cb498da511ee7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/a61b6df0b256190049644dd9f63cb498da511ee7/decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6374, 67, 464, 12, 2890, 16, 279, 16, 324, 4672, 3536, 13029, 326, 6374, 1674, 296, 464, 11, 3086, 1517, 9886, 1807, 6815, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6374, 67, 464, 12, 2890, 16, 279, 16, 324, 4672, 3536, 13029, 326, 6374, 1674, 296, 464, 11, 3086, 1517, 9886, 1807, 6815, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
latest_version = self.top_key_tuple[1][2]
latest_version = self.top_key_tuple[1][0][2]
def _handle_success(self, client, msg, candidate): """ INTERNAL: Handle successful FCP requests. """ #print "_handle_success -- ", candidate if not self._needs_bundle(candidate): #print "_handle_success -- doesn't need bundle." candidate[5] = msg self.finished_candidates.append(candidate) return if (candidate[2] and self._multiple_block(candidate)): #print "_handle_success -- multiple block..." # Cases: # 0) No redundant edge exists, -> requeue # 1) Redundant edge request running, single block -> requeue # 2) Redundant edge request running, full -> finish # 3) Redundant edge request queued, full -> flip to single_block # 4) Redundant edge request queued, single_block -> nop edge = candidate[3] redundant_edge = (edge[0], edge[1], int(not edge[2])) if (not self.parent.ctx.graph is None and self.parent.ctx.graph.is_redundant(edge)): for value in self.pending_candidates(): if (value[3] == redundant_edge and not value[2]): # Bail out because there's already a request for that # data running. candidate[5] = msg # Make sure the candidate will re-run if the running # request fails. candidate[1] = 0 self.next_candidates.insert(0, candidate) #print "_handle_success -- already another running." self.parent.ctx.ui_.status(("Other salted key is " + "running. Didn't " + "requeue: %s\n") % str(candidate[3])) return self.parent.ctx.ui_.status("Requeuing full download for: %s\n" % str(candidate[3])) # Reset the CHK because the control bytes were zorched. candidate[0] = self.parent.ctx.graph.get_chk(candidate[3]) candidate[1] += 1 candidate[2] = False candidate[5] = None # Reset! self.rep_invariant() self.current_candidates.insert(0, candidate) self._force_single_block(redundant_edge) self.rep_invariant() return
e8ef6048fdca2ea53d00e8b038ed74eb48bc7902 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4007/e8ef6048fdca2ea53d00e8b038ed74eb48bc7902/requestingbundles.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4110, 67, 4768, 12, 2890, 16, 1004, 16, 1234, 16, 5500, 4672, 3536, 18139, 30, 5004, 6873, 478, 4258, 3285, 18, 3536, 468, 1188, 4192, 4110, 67, 4768, 1493, 3104, 5500, 309, 486, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4110, 67, 4768, 12, 2890, 16, 1004, 16, 1234, 16, 5500, 4672, 3536, 18139, 30, 5004, 6873, 478, 4258, 3285, 18, 3536, 468, 1188, 4192, 4110, 67, 4768, 1493, 3104, 5500, 309, 486, ...
raise Error, 'Writing data at the wrong time'
raise Error, 'Writing data at the wrong time'
def write(self, data):
a220e67a9ed94d66b81e393a3bb9e6acd10068c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a220e67a9ed94d66b81e393a3bb9e6acd10068c1/binhex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 501, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 501, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self.assertEqual(list(tree.keys()), keys)
sorted_keys = keys[:] sorted_keys.sort() self.assertEqual(list(tree.keys()), sorted_keys)
def _checkRanges(self, tree, keys): self.assertEqual(len(tree), len(keys)) self.assertEqual(list(tree.keys()), keys) for k in keys: self.assert_(tree.has_key(k)) if keys: lokey = min(keys) hikey = max(keys) self.assertEqual(lokey, tree.minKey()) self.assertEqual(hikey, tree.maxKey()) else: lokey = hikey = 42
6d37f216bcd1982dfe1fc67ff9df9c9cfcf30f18 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/6d37f216bcd1982dfe1fc67ff9df9c9cfcf30f18/testBTrees.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 9932, 12, 2890, 16, 2151, 16, 1311, 4672, 365, 18, 11231, 5812, 12, 1897, 12, 3413, 3631, 562, 12, 2452, 3719, 3115, 67, 2452, 273, 1311, 10531, 65, 3115, 67, 2452, 18, 3804...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1893, 9932, 12, 2890, 16, 2151, 16, 1311, 4672, 365, 18, 11231, 5812, 12, 1897, 12, 3413, 3631, 562, 12, 2452, 3719, 3115, 67, 2452, 273, 1311, 10531, 65, 3115, 67, 2452, 18, 3804...
if self.esmtp_features: self.esmtp_features.append('7bit')
def sendmail(self,from_addr,to_addrs,msg,options=[]): """ This command performs an entire mail transaction. The arguments are: - from_addr : The address sending this mail. - to_addrs : a list of addresses to send this mail to - msg : the message to send. - encoding : list of ESMTP options (such as 8bitmime)
9cc6c7b00f7761dd722ad6a9440a98985710edf2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/9cc6c7b00f7761dd722ad6a9440a98985710edf2/smtplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 4408, 12, 2890, 16, 2080, 67, 4793, 16, 869, 67, 23305, 16, 3576, 16, 2116, 33, 8526, 4672, 3536, 1220, 1296, 11199, 392, 7278, 4791, 2492, 18, 1021, 1775, 854, 30, 300, 628, 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, 1366, 4408, 12, 2890, 16, 2080, 67, 4793, 16, 869, 67, 23305, 16, 3576, 16, 2116, 33, 8526, 4672, 3536, 1220, 1296, 11199, 392, 7278, 4791, 2492, 18, 1021, 1775, 854, 30, 300, 628, 67,...
users.append({'title': 'Student',
users.append({'title': user_title,
def generatetags(self, request, tl, one, two, module, extra, prog): """ generate nametags """
6305be2cb7ea98c932cb1d1d140656cb64a72c53 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12041/6305be2cb7ea98c932cb1d1d140656cb64a72c53/nametagmodule.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1215, 270, 278, 1341, 12, 2890, 16, 590, 16, 8332, 16, 1245, 16, 2795, 16, 1605, 16, 2870, 16, 11243, 4672, 3536, 2103, 15135, 278, 1341, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 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, 1215, 270, 278, 1341, 12, 2890, 16, 590, 16, 8332, 16, 1245, 16, 2795, 16, 1605, 16, 2870, 16, 11243, 4672, 3536, 2103, 15135, 278, 1341, 3536, 2, -100, -100, -100, -100, -100, -100, -...
print("Package %s is Not an RPM Skipping" % frpm)
print _("Package %s is Not an RPM Skipping") % frpm
def _upload(self): (self.options, files) = self.parser.parse_args() # ignore the command and pick the files files = files[2:] if not self.options.id: print("repo id required. Try --help") sys.exit(0) if self.options.dir: files += utils.processDirectory(self.options.dir, "rpm") if not files: print("Need to provide atleast one file to perform upload") sys.exit(0) uploadinfo = {} uploadinfo['repo'] = self.options.id for frpm in files: try: pkginfo = utils.processRPM(frpm) except FileError, e: print('Error: %s' % e) continue if not pkginfo.has_key('nvrea'): print("Package %s is Not an RPM Skipping" % frpm) continue pkgstream = base64.b64encode(open(frpm).read()) try: status = self.pconn.upload(self.options.id, pkginfo, pkgstream) if status: print _(" Successful uploaded [%s] to Repo [ %s ]" % (pkginfo['pkgname'], self.options.id)) else: print _(" Failed to Upload %s to Repo [ %s ]" % self.options.id) except RestlibException, re: log.error("Error: %s" % re) raise #continue except Exception, e: log.error("Error: %s" % e) raise #continue
3031d7f1572d6916f4f024e22264c3de668d641f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10692/3031d7f1572d6916f4f024e22264c3de668d641f/core_repo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6327, 12, 2890, 4672, 261, 2890, 18, 2116, 16, 1390, 13, 273, 365, 18, 4288, 18, 2670, 67, 1968, 1435, 468, 2305, 326, 1296, 471, 6002, 326, 1390, 1390, 273, 1390, 63, 22, 26894, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6327, 12, 2890, 4672, 261, 2890, 18, 2116, 16, 1390, 13, 273, 365, 18, 4288, 18, 2670, 67, 1968, 1435, 468, 2305, 326, 1296, 471, 6002, 326, 1390, 1390, 273, 1390, 63, 22, 26894, ...
Any number of Group instances can be passed as arguments. The Sprite will be removed from the Groups it is currently a member of.
Any number of Group instances can be passed as arguments. The Sprite will be removed from the Groups it is currently a member of.
def remove(self, *groups): """remove the sprite from groups Sprite.remove(*groups): return None
d9760f3e4782abb02dd98080337626eefdad67ee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1298/d9760f3e4782abb02dd98080337626eefdad67ee/sprite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 12, 2890, 16, 380, 4650, 4672, 3536, 4479, 326, 16839, 628, 3252, 5878, 796, 18, 4479, 30857, 4650, 4672, 327, 599, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 12, 2890, 16, 380, 4650, 4672, 3536, 4479, 326, 16839, 628, 3252, 5878, 796, 18, 4479, 30857, 4650, 4672, 327, 599, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
system.remote.release()
system.action_release()
def system_return(self, fqdn=None, full_name=None, mylog=True): if not fqdn: return (0,"You must supply a system") if not full_name: return (0,"You must supply a user name")
a69952b916f6d1bf62ce7feebb5fcf28a6505df0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14755/a69952b916f6d1bf62ce7feebb5fcf28a6505df0/controllers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2619, 67, 2463, 12, 2890, 16, 19897, 33, 7036, 16, 1983, 67, 529, 33, 7036, 16, 3399, 1330, 33, 5510, 4672, 309, 486, 19897, 30, 327, 261, 20, 10837, 6225, 1297, 14467, 279, 2619, 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2619, 67, 2463, 12, 2890, 16, 19897, 33, 7036, 16, 1983, 67, 529, 33, 7036, 16, 3399, 1330, 33, 5510, 4672, 309, 486, 19897, 30, 327, 261, 20, 10837, 6225, 1297, 14467, 279, 2619, 7923...
res = self.checkArgumentFormat(path) if not res['OK']: return res urls = res['Value'] gLogger.debug("SRM2Storage.isFile: Checking whether %s path(s) are file(s)." % len(urls)) resDict = self.__gfalls_wrapper(urls,0)['Value']
res = self.checkArgumentFormat( path ) if not res['OK']: return res urls = res['Value'] gLogger.debug( "SRM2Storage.isFile: Checking whether %s path(s) are file(s)." % len( urls ) ) resDict = self.__gfalls_wrapper( urls, 0 )['Value']
def isFile(self,path): """Check if the given path exists and it is a file """ res = self.checkArgumentFormat(path) if not res['OK']: return res urls = res['Value']
70e66af095cb6701e39b1e701e4a2ce4d012b4f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/70e66af095cb6701e39b1e701e4a2ce4d012b4f7/SRM2Storage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11655, 12, 2890, 16, 803, 4672, 3536, 1564, 309, 326, 864, 589, 1704, 471, 518, 353, 279, 585, 3536, 400, 273, 365, 18, 1893, 1379, 1630, 12, 803, 13, 309, 486, 400, 3292, 3141, 3546, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11655, 12, 2890, 16, 803, 4672, 3536, 1564, 309, 326, 864, 589, 1704, 471, 518, 353, 279, 585, 3536, 400, 273, 365, 18, 1893, 1379, 1630, 12, 803, 13, 309, 486, 400, 3292, 3141, 3546, ...
print self.log_dir+'stdout' self.job.stdout.redirect(self.log_dir+'/stdout') self.job.stderr.redirect(self.log_dir+'/stderr')
print os.path.join(self.log_dir, 'stdout') self.job.stdout.redirect(os.path.join(self.log_dir, 'stdout')) self.job.stderr.redirect(os.path.join(self.log_dir, 'stderr'))
def build(self, make_opts = ''): """build the kernel make_opts additional options to make, if any """ os.chdir(self.build_dir) print self.log_dir+'stdout' self.job.stdout.redirect(self.log_dir+'/stdout') self.job.stderr.redirect(self.log_dir+'/stderr') self.set_cross_cc() # setup_config_file(config_file, config_overrides)
d0cbe3ef3e9910ba3893f6cf88408eaf750bec98 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12268/d0cbe3ef3e9910ba3893f6cf88408eaf750bec98/kernel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 12, 2890, 16, 1221, 67, 4952, 273, 875, 4672, 3536, 3510, 326, 5536, 225, 1221, 67, 4952, 3312, 702, 358, 1221, 16, 309, 1281, 3536, 1140, 18, 343, 1214, 12, 2890, 18, 3510, 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, 1361, 12, 2890, 16, 1221, 67, 4952, 273, 875, 4672, 3536, 3510, 326, 5536, 225, 1221, 67, 4952, 3312, 702, 358, 1221, 16, 309, 1281, 3536, 1140, 18, 343, 1214, 12, 2890, 18, 3510, 67, ...
raise SMTPRecipientsRefused
raise SMTPRecipientsRefused(string.join( map(lambda x:"%s: %s" % (x[0], x[1][1]), senderrs.items()), '; '))
def sendmail(self, from_addr, to_addrs, msg, mail_options=[], rcpt_options=[]): """This command performs an entire mail transaction.
74c43ebc98f40402792cce0ccbc1eba2b34fb327 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/74c43ebc98f40402792cce0ccbc1eba2b34fb327/smtplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 4408, 12, 2890, 16, 628, 67, 4793, 16, 358, 67, 23305, 16, 1234, 16, 4791, 67, 2116, 22850, 6487, 4519, 337, 67, 2116, 33, 8526, 4672, 3536, 2503, 1296, 11199, 392, 7278, 4791, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 4408, 12, 2890, 16, 628, 67, 4793, 16, 358, 67, 23305, 16, 1234, 16, 4791, 67, 2116, 22850, 6487, 4519, 337, 67, 2116, 33, 8526, 4672, 3536, 2503, 1296, 11199, 392, 7278, 4791, 2...
jobs[:-10] : get last 10 jobs.
jobs[-10:] : get last 10 jobs.
def __getslice__(self, i1,i2): """ Get a slice. Examples: jobs[2:] : get first two jobs, jobs[:-10] : get last 10 jobs. """ return _wrap(self._impl.__getslice__(i1,i2))
d9cb2bab04c83c269bfd3d329df974e47fe95bd7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/d9cb2bab04c83c269bfd3d329df974e47fe95bd7/JobRegistry.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 6665, 972, 12, 2890, 16, 277, 21, 16, 77, 22, 4672, 3536, 968, 279, 2788, 18, 19830, 30, 6550, 63, 22, 26894, 294, 336, 1122, 2795, 6550, 16, 6550, 18919, 2163, 26894, 294, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6665, 972, 12, 2890, 16, 277, 21, 16, 77, 22, 4672, 3536, 968, 279, 2788, 18, 19830, 30, 6550, 63, 22, 26894, 294, 336, 1122, 2795, 6550, 16, 6550, 18919, 2163, 26894, 294, ...
if target:
if target is not None:
def targetId(self): target = self.getTargetObject() if target: return target.getId() return ''
87fc88bf2da85a2f5d9c635a6ccde046e3d92931 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/87fc88bf2da85a2f5d9c635a6ccde046e3d92931/ReferenceEngine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27729, 12, 2890, 4672, 1018, 273, 365, 18, 588, 2326, 921, 1435, 309, 1018, 353, 486, 599, 30, 327, 1018, 18, 26321, 1435, 327, 875, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27729, 12, 2890, 4672, 1018, 273, 365, 18, 588, 2326, 921, 1435, 309, 1018, 353, 486, 599, 30, 327, 1018, 18, 26321, 1435, 327, 875, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
def test(): root = Tk() def doit(root=root): d = SimpleDialog(root,
if __name__ == '__main__': def test(): root = Tk() def doit(root=root): d = SimpleDialog(root,
def test(): root = Tk() def doit(root=root): d = SimpleDialog(root, text="This is a test dialog. " "Would this have been an actual dialog, " "the buttons below would have been glowing " "in soft pink light.\n" "Do you believe this?", buttons=["Yes", "No", "Cancel"], default=0, cancel=2, title="Test Dialog") print d.go() t = Button(root, text='Test', command=doit) t.pack() q = Button(root, text='Quit', command=t.quit) q.pack() t.mainloop()
cdda51e96b6d7f06d42dc2eb02ae714bd1efa6e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/cdda51e96b6d7f06d42dc2eb02ae714bd1efa6e4/SimpleDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 309, 1001, 529, 972, 422, 4940, 5254, 972, 4278, 225, 1652, 1842, 13332, 1365, 273, 399, 79, 1435, 1652, 741, 305, 12, 3085, 33, 3085, 4672, 302, 273, 4477, 6353, 12, 3085, 16, 977, 1546, 25...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 309, 1001, 529, 972, 422, 4940, 5254, 972, 4278, 225, 1652, 1842, 13332, 1365, 273, 399, 79, 1435, 1652, 741, 305, 12, 3085, 33, 3085, 4672, 302, 273, 4477, 6353, 12, 3085, 16, 977, 1546, 25...
f = open('qa-job.serialize', 'wb') f.write(self.pb_job.SerializeToString()) f.close()
def setUp(self): super(ReadBackGetterTest, self).setUp()
b52667a0f7d743823705c46d7c6756f695ecac6c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12268/b52667a0f7d743823705c46d7c6756f695ecac6c/job_serializer_unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 2240, 12, 1994, 2711, 8461, 4709, 16, 365, 2934, 542, 1211, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 2240, 12, 1994, 2711, 8461, 4709, 16, 365, 2934, 542, 1211, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return Infsign[result_sign]
return _Infsign[result_sign]
def __pow__(self, other, modulo=None, context=None): """Return self ** other [ % modulo].
7ea2d399fb15e34ed3695ca0160f84f982b9194c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/7ea2d399fb15e34ed3695ca0160f84f982b9194c/decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 23509, 972, 12, 2890, 16, 1308, 16, 26109, 33, 7036, 16, 819, 33, 7036, 4672, 3536, 990, 365, 2826, 1308, 306, 738, 26109, 8009, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 23509, 972, 12, 2890, 16, 1308, 16, 26109, 33, 7036, 16, 819, 33, 7036, 4672, 3536, 990, 365, 2826, 1308, 306, 738, 26109, 8009, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
cell = Cell(Cell.new, item, start, end, rowspan, None, cal)
cell = Cell(Cell.new, item, start, end, rowspan, 1, cal)
def render_namespace(items, times): nitems, iitems = len(items), 0 # blocks = [(nrows, ncols), ..] blocks, table, state = [], [], [] nrows = 0 for time in times[:-1]: cells = [] # add the busy cells for rowspan in state: if rowspan > 0: cells.append(Cell(Cell.busy)) else: cells.append(Cell(Cell.free, content={'start': Time.encode(time)})) # add new cells icell = 0 while iitems < nitems: start, end, item, cal = items[iitems] if start != time: break # look for a free cell while icell < len(cells): if cells[icell].type == Cell.free: break icell = icell + 1 # add cell rowspan = times.index(end) - times.index(start) cell = Cell(Cell.new, item, start, end, rowspan, None, cal) if icell >= len(cells): state.append(rowspan) cells.append(cell) else: state[icell] = rowspan cells[icell] = cell # next item iitems = iitems + 1 ncols = len(cells) # empty row? if ncols == 0: cells.append(Cell(Cell.free, content={'start': Time.encode(time)})) # next row, reduce the current rowspans nrows = nrows + 1 for i in range(ncols): rowspan = state[i] if rowspan > 0: state[i] = rowspan - 1 # a new block? if state.count(0) == ncols: state = [] blocks.append((nrows, ncols)) nrows = 0 # Add current row cells to table table.append((0, cells)) # calculate the number of columns total_ncols = mcm(map(lambda x: x[1], blocks)) # add colspan to each row and fill the incomplete rows with free cells base = 0 for nrows, ncols in blocks: if ncols == 0: colspan = total_ncols else: colspan = total_ncols/ncols irow = 0 while irow < nrows: cells = table[base + irow][1] icol = len(cells) while icol < ncols: start = Time.encode(times[base+irow]) cells.append(Cell(Cell.free, content={'start': start})) icol = icol + 1 table[base + irow] = (colspan, cells) irow = irow + 1 base = base + nrows #################################################################### # FOR EACH ROW for index, row in enumerate(table): i = 0 # FOR EACH CELL while i<len(row[1]): cell = row[1][i] ######################################################## # EXTEND FREE CELL if cell.type == Cell.free: j = i + 1 while j<len(row[1]) and row[1][j].type==Cell.free: row[1][j].type = Cell.busy j = j + 1 if j-i > 1: cell.colspan = j - i i = j ######################################################## # EXTEND NEW CELL elif cell.type == Cell.new: new_extended = [] colspan = len(row[1]) - i # MAX COLSPAN REACHED ( = 1) if colspan <= 1: break # FOR EACH LINE BELOW, USED FOR CELL TO EXTEND for n in range(cell.rowspan): if colspan <= 1: break # GET CURRENT TESTED ROW row_index = index+n irow = table[row_index] # REDUCE max colspan if necessary ilen = len(irow[1]) if ilen < colspan: colspan = ilen # TRY TO EXTEND k = 1 while k < colspan: if irow[1][i+k].type != Cell.free: colspan = k break k = k + 1 new_extended.append((row_index, i)) if colspan > 1: for row_index, k in new_extended: table[row_index][1][k].colspan = colspan for col in range(1, colspan): table[row_index][1][k+col].type = Cell.busy i = i + colspan else: i = i + 1 # end else: i = i + 1 ###################################################################### # render_namespace ###################################################################### url = ';edit_event_form?method=grid_weekly_view&' ns_rows = [] for (colspan, cells) in table: ns_cells = [] for cell in cells: # Don't add busy cells as they don't appear in template if cell.type == Cell.busy: continue if not cell.colspan: cell.colspan = colspan ns_cell = cell.to_dict() # Add start time to url used to add events new_url = None if cell.content and 'start' in cell.content: new_url = '%sstart=%s' % (url, cell.content['start']) ns_cell['newurl'] = new_url ns_cells.append(ns_cell) ns_rows.append({'cells': ns_cells, 'colspan': colspan}) return ns_rows, total_ncols
1d613a42339f87a03d37293214879a0488e9bfef /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/1d613a42339f87a03d37293214879a0488e9bfef/gridlayout.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 4937, 12, 3319, 16, 4124, 4672, 290, 3319, 16, 277, 3319, 273, 562, 12, 3319, 3631, 374, 468, 4398, 273, 306, 12, 82, 3870, 16, 21330, 3631, 6116, 65, 4398, 16, 1014, 16, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 4937, 12, 3319, 16, 4124, 4672, 290, 3319, 16, 277, 3319, 273, 562, 12, 3319, 3631, 374, 468, 4398, 273, 306, 12, 82, 3870, 16, 21330, 3631, 6116, 65, 4398, 16, 1014, 16, 9...
self.attrLenDict = dict([(i,1) for i in range(self.attributeCount+1)])
def finishedAddingResults(self): self.skipUpdate = 1
f10affaa9c4633b4a9c5fd43c64cd44e147bfdb4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6366/f10affaa9c4633b4a9c5fd43c64cd44e147bfdb4/OWMosaicOptimization.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6708, 13962, 3447, 12, 2890, 4672, 365, 18, 7457, 1891, 273, 404, 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, 6708, 13962, 3447, 12, 2890, 4672, 365, 18, 7457, 1891, 273, 404, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
func = lambda p:self.got_peers_callback(infohash,p) self.dht.getPeers(infohash,func)
try: from Tribler.Core.DecentralizedTracking.kadtracker.identifier import Id, IdError infohash_id = Id(infohash) func = lambda p:self.got_peers_callback(infohash,p) self.dht.get_peers(infohash_id,func) except (IdError): print >>sys.stderr,"Rerequester: _dht_rerequest: self.info_hash is not a valid identifier" return
def lookup(self,infohash): if DEBUG: print >>sys.stderr,"mainlineDHTChecker: Lookup",`infohash`
d07ac17bbe99094c57402a769bdf7648a30a2b18 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9686/d07ac17bbe99094c57402a769bdf7648a30a2b18/mainlineDHTChecker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3689, 12, 2890, 16, 1376, 2816, 4672, 309, 6369, 30, 1172, 1671, 9499, 18, 11241, 10837, 5254, 1369, 40, 5062, 8847, 30, 8834, 3113, 68, 1376, 2816, 68, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 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, 3689, 12, 2890, 16, 1376, 2816, 4672, 309, 6369, 30, 1172, 1671, 9499, 18, 11241, 10837, 5254, 1369, 40, 5062, 8847, 30, 8834, 3113, 68, 1376, 2816, 68, 2, -100, -100, -100, -100, -100, ...
return S_ERROR('Item number out of range')
return S_ERROR( 'Item number out of range' )
def export_getRequestPageSummaryWeb(self, selectDict, sortList, startItem, maxItems): """ Get the summary of the request information for a given page in the request monitor in a generic format """ resultDict = {} last_update = None if selectDict.has_key('LastUpdate'): last_update = selectDict['LastUpdate'] del selectDict['LastUpdate'] # Sorting instructions. Only one for the moment. if sortList: orderAttribute = sortList[0][0]+":"+sortList[0][1] else: orderAttribute = None
fbaa0cc38e2ebaeb3cf9a01c58d193b76f63bf22 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/fbaa0cc38e2ebaeb3cf9a01c58d193b76f63bf22/TransferDBMonitoringHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 588, 691, 1964, 4733, 4079, 12, 2890, 16, 2027, 5014, 16, 1524, 682, 16, 787, 1180, 16, 943, 3126, 4672, 3536, 968, 326, 4916, 434, 326, 590, 1779, 364, 279, 864, 1363, 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, 3359, 67, 588, 691, 1964, 4733, 4079, 12, 2890, 16, 2027, 5014, 16, 1524, 682, 16, 787, 1180, 16, 943, 3126, 4672, 3536, 968, 326, 4916, 434, 326, 590, 1779, 364, 279, 864, 1363, 316, ...
def createQTable(cache, data, dimensions, outputAttr = -1, threshold = 0, MQCNotation = False, derivativeAsMeta = False, differencesAsMeta = False, originalAsMeta = False):
def createQTable(cache, data, dimensions, outputAttr = -1, threshold = 0, MQCNotation = False, derivativeAsMeta = False, differencesAsMeta = False, correlationsAsMeta = False, originalAsMeta = False):
def createQTable(cache, data, dimensions, outputAttr = -1, threshold = 0, MQCNotation = False, derivativeAsMeta = False, differencesAsMeta = False, originalAsMeta = False): nDimensions = len(dimensions) needQ = outputAttr < 0 or derivativeAsMeta if needQ: qVar = createClassVar([cache.attributes[i][0] for i in dimensions], MQCNotation) if outputAttr >= 0: classVar = orange.FloatVariable("df/d"+cache.attributes[outputAttr][0]) else: classVar = qVar dom = orange.Domain(data.domain.attributes, classVar) dom.addmetas(data.domain.getmetas()) setattr(dom, "constraintAttributes", [cache.contAttributes[i] for i in dimensions]) if derivativeAsMeta: derivativeID = orange.newmetaid() dom.addmeta(derivativeID, qVar) else: derivativeID = 0 metaIDs = [] if differencesAsMeta: for dim in dimensions: metaVar = orange.FloatVariable("df/d"+cache.attributes[dim][0]) metaID = orange.newmetaid() dom.addmeta(metaID, metaVar) metaIDs.append(metaID) if originalAsMeta: originalID = orange.newmetaid() dom.addmeta(originalID, data.domain.classVar) else: originalID = 0 paded = orange.ExampleTable(dom, data) for pad, alldeltas in zip(paded, cache.deltas): deltas = [alldeltas[d] for d in dimensions] if needQ: qs = "".join([(delta > threshold and "0") or (delta < -threshold and "1") or (delta == "?" and "?") or "2" for delta in deltas]) q = ("?" in qs and "?") or int(qs, 3) if outputAttr >= 0: pad.setclass(alldeltas[outputAttr]) else: pad.setclass(q) if derivativeAsMeta: pad.setmeta(derivativeID, q) if differencesAsMeta: for a in zip(metaIDs, deltas): pad.setmeta(*a) return paded, derivativeID, metaIDs, originalID
45c3545d7cec5ecfb8951397d1a6a5002a7e27f7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/45c3545d7cec5ecfb8951397d1a6a5002a7e27f7/orngPade.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 53, 1388, 12, 2493, 16, 501, 16, 5769, 16, 876, 3843, 273, 300, 21, 16, 5573, 273, 374, 16, 26095, 39, 14818, 273, 1083, 16, 16417, 1463, 2781, 273, 1083, 16, 16440, 1463, 2781, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 53, 1388, 12, 2493, 16, 501, 16, 5769, 16, 876, 3843, 273, 300, 21, 16, 5573, 273, 374, 16, 26095, 39, 14818, 273, 1083, 16, 16417, 1463, 2781, 273, 1083, 16, 16440, 1463, 2781, ...
Calculate plot points for a function f in the interval xrange. The adaptive refinement algorithm for plotting a function f. See the docstring for plot for a description of the algorithm.
Calculate plot points for a function f in the interval xrange. The adaptive refinement algorithm is also automatically invoked with a *relative* adaptive tolerance of adaptive_tolerance; see below.
def generate_plot_points(f, xrange, plot_points=5, adaptive_tolerance=0.01, adaptive_recursion=5, randomize = True): r""" Calculate plot points for a function f in the interval xrange. The adaptive refinement algorithm for plotting a function f. See the docstring for plot for a description of the algorithm. INPUT: - ``f`` - a function of one variable - ``p1, p2`` - two points to refine between - ``plot_points`` - (default: 5) the minimal number of plot points. - ``adaptive_recursion`` - (default: 5) how many levels of recursion to go before giving up when doing adaptive refinement. Setting this to 0 disables adaptive refinement. - ``adaptive_tolerance`` - (default: 0.01) how large a difference should be before the adaptive refinement code considers it significant. See the documentation for plot() for more information. OUTPUT: - a list of points (x, f(x)) in the interval xrange, which aproximate the function f. TESTS:: sage: from sage.plot.plot import generate_plot_points sage: generate_plot_points(sin, (0, pi), plot_points=2, adaptive_recursion=0) [(0.0, 0.0), (3.1415926535897931, 1.2246...e-16)] sage: generate_plot_points(sin(x).function(x), (-pi, pi), randomize=False) [(-3.1415926535897931, -1.2246...e-16), (-2.748893571891069, -0.3826834323650898...), (-2.3561944901923448, -0.707106781186547...), (-2.1598449493429825, -0.831469612302545...), (-1.9634954084936207, -0.92387953251128674), (-1.7671458676442586, -0.98078528040323043), (-1.5707963267948966, -1.0), (-1.3744467859455345, -0.98078528040323043), (-1.1780972450961724, -0.92387953251128674), (-0.98174770424681035, -0.831469612302545...), (-0.78539816339744828, -0.707106781186547...), (-0.39269908169872414, -0.38268343236508978), (0.0, 0.0), (0.39269908169872414, 0.38268343236508978), (0.78539816339744828, 0.707106781186547...), (0.98174770424681035, 0.831469612302545...), (1.1780972450961724, 0.92387953251128674), (1.3744467859455345, 0.98078528040323043), (1.5707963267948966, 1.0), (1.7671458676442586, 0.98078528040323043), (1.9634954084936207, 0.92387953251128674), (2.1598449493429825, 0.831469612302545...), (2.3561944901923448, 0.707106781186547...), (2.748893571891069, 0.3826834323650898...), (3.1415926535897931, 1.2246...e-16)] This shows that lowering adaptive_tolerance and raising adaptive_recursion both increase the number of subdivision points:: sage: x = var('x') sage: f(x) = sin(1/x) sage: [len(generate_plot_points(f, (-pi, pi), adaptive_tolerance=i)) for i in [0.01, 0.001, 0.0001]] [42, 67, 104] sage: [len(generate_plot_points(f, (-pi, pi), adaptive_recursion=i)) for i in [5, 10, 15]] [34, 144, 897] """ x, data = var_and_list_of_values(xrange, plot_points) xmin = data[0] xmax = data[-1] delta = float(xmax-xmin) / plot_points random = current_randstate().python_random().random exceptions = 0; msg='' exception_indices = [] for i in range(len(data)): xi = data[i] # Slightly randomize the interior sample points if # randomize is true if randomize and i > 0 and i < plot_points-1: xi += delta*(random() - 0.5) try: data[i] = (float(xi), float(f(xi))) if str(data[i][1]) in ['nan', 'NaN', 'inf', '-inf']: sage.misc.misc.verbose("%s\nUnable to compute f(%s)"%(msg, x),1) exceptions += 1 exception_indices.append(i) except (ZeroDivisionError, TypeError, ValueError, OverflowError), msg: sage.misc.misc.verbose("%s\nUnable to compute f(%s)"%(msg, x),1) if i == 0: for j in range(1, 99): xj = xi + delta*j/100.0 try: data[i] = (float(xj), float(f(xj))) # nan != nan if data[i][1] != data[i][1]: continue break except (ZeroDivisionError, TypeError, ValueError, OverflowError), msg: pass else: exceptions += 1 exception_indices.append(i) elif i == plot_points-1: for j in range(1, 99): xj = xi - delta*j/100.0 try: data[i] = (float(xj), float(f(xj))) # nan != nan if data[i][1] != data[i][1]: continue break except (ZeroDivisionError, TypeError, ValueError, OverflowError), msg: pass else: exceptions += 1 exception_indices.append(i) else: exceptions += 1 exception_indices.append(i) exceptions += 1 exception_indices.append(i) data = [data[i] for i in range(len(data)) if i not in exception_indices] # adaptive refinement i, j = 0, 0 adaptive_tolerance = delta * float(adaptive_tolerance) adaptive_recursion = int(adaptive_recursion) while i < len(data) - 1: for p in adaptive_refinement(f, data[i], data[i+1], adaptive_tolerance=adaptive_tolerance, adaptive_recursion=adaptive_recursion): data.insert(i+1, p) i += 1 i += 1 if (len(data) == 0 and exceptions > 0) or exceptions > 10: sage.misc.misc.verbose("WARNING: When plotting, failed to evaluate function at %s points."%exceptions, level=0) sage.misc.misc.verbose("Last error message: '%s'"%msg, level=0) return data
53bc30b3387bfc0f18049d2b64fd1492c7912453 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/53bc30b3387bfc0f18049d2b64fd1492c7912453/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 4032, 67, 4139, 12, 74, 16, 12314, 16, 3207, 67, 4139, 33, 25, 16, 5855, 688, 67, 25456, 33, 20, 18, 1611, 16, 5855, 688, 67, 31347, 33, 25, 16, 2744, 554, 273, 1053, 467...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 4032, 67, 4139, 12, 74, 16, 12314, 16, 3207, 67, 4139, 33, 25, 16, 5855, 688, 67, 25456, 33, 20, 18, 1611, 16, 5855, 688, 67, 31347, 33, 25, 16, 2744, 554, 273, 1053, 467...
_logger.debug('Failed to set activity properties for %s: %s', self._id, e)
_logger.debug('Failed to set activity properties for %r: %s', self, e)
def properties_set(e=None): if e is None: _logger.debug('Successfully set activity properties for %s', self._id) # signal it back to local processes too # FIXME: if we stopped ignoring Telepathy # ActivityPropertiesChanged signals from ourselves, we could # just use that... self.set_properties(props, changed) else: _logger.debug('Failed to set activity properties for %s: %s', self._id, e)
25577b1486c01197df936bb991230734bc38df7b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3113/25577b1486c01197df936bb991230734bc38df7b/activity.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1790, 67, 542, 12, 73, 33, 7036, 4672, 309, 425, 353, 599, 30, 389, 4901, 18, 4148, 2668, 18303, 444, 5728, 1790, 364, 738, 87, 2187, 365, 6315, 350, 13, 468, 4277, 518, 1473, 358, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1790, 67, 542, 12, 73, 33, 7036, 4672, 309, 425, 353, 599, 30, 389, 4901, 18, 4148, 2668, 18303, 444, 5728, 1790, 364, 738, 87, 2187, 365, 6315, 350, 13, 468, 4277, 518, 1473, 358, 1...
"""
"""
def execute(self, inputs, update = 0, last = 0): """ Created: 15.04.2006, KP Description: Execute the filter with given inputs and return the output """ if not ProcessingFilter.ProcessingFilter.execute(self, inputs): return None image = self.getInput(1) image = self.convertVTKtoITK(image)
6d7b572696d4ecdce2049b45a6e109836f3272c9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2877/6d7b572696d4ecdce2049b45a6e109836f3272c9/SegmentationFilters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 4540, 16, 1089, 273, 374, 16, 1142, 273, 374, 4672, 3536, 12953, 30, 4711, 18, 3028, 18, 6976, 26, 16, 1475, 52, 6507, 30, 7903, 326, 1034, 598, 864, 4540, 471, 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, 1836, 12, 2890, 16, 4540, 16, 1089, 273, 374, 16, 1142, 273, 374, 4672, 3536, 12953, 30, 4711, 18, 3028, 18, 6976, 26, 16, 1475, 52, 6507, 30, 7903, 326, 1034, 598, 864, 4540, 471, 3...
cy = gc.height()-cy fy = gc.height()-fy
def set_on_gc(self, gc, bbox=None): if self.transforms is not None: for func, f_args in self.transforms: if isinstance(f_args, tuple): func(gc, *f_args) else: func(gc, f_args)
f0e3b2b220fce5b431cdba0dd9ae38944e9aa225 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13166/f0e3b2b220fce5b431cdba0dd9ae38944e9aa225/renderer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 265, 67, 13241, 12, 2890, 16, 8859, 16, 8472, 33, 7036, 4672, 225, 309, 365, 18, 25657, 353, 486, 599, 30, 364, 1326, 16, 284, 67, 1968, 316, 365, 18, 25657, 30, 309, 1549, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 265, 67, 13241, 12, 2890, 16, 8859, 16, 8472, 33, 7036, 4672, 225, 309, 365, 18, 25657, 353, 486, 599, 30, 364, 1326, 16, 284, 67, 1968, 316, 365, 18, 25657, 30, 309, 1549, ...
self.error(0, row+1, ERROR_INVALID_SCHEMA_ID)
self.error(row, 0, ERROR_INVALID_SCHEMA_ID)
def import_timetable(self, sh, row, section): schemas = ITimetableSchemaContainer(ISchoolYear(section)) schema_id = self.getRequiredTextFromCell(sh, row, 1) if schema_id not in schemas: self.error(0, row+1, ERROR_INVALID_SCHEMA_ID) return schema = schemas[schema_id] timetable = schema.createTimetable(ITerm(section)) timetables = ITimetables(section).timetables timetables[schema_id] = timetable
57d3328c0c1a99c8d6574f10fa1d32e8fe0d442c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7127/57d3328c0c1a99c8d6574f10fa1d32e8fe0d442c/importer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 8584, 278, 429, 12, 2890, 16, 699, 16, 1027, 16, 2442, 4672, 12783, 273, 467, 10178, 278, 429, 3078, 2170, 12, 5127, 343, 1371, 5593, 12, 3464, 3719, 1963, 67, 350, 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, 1930, 67, 8584, 278, 429, 12, 2890, 16, 699, 16, 1027, 16, 2442, 4672, 12783, 273, 467, 10178, 278, 429, 3078, 2170, 12, 5127, 343, 1371, 5593, 12, 3464, 3719, 1963, 67, 350, 273, 365,...
fd.close()
if fd: fd.close()
def verify(self): """Verify that the provided path points to a valid Trac environment directory.""" try: fd = open(os.path.join(self.path, 'VERSION'), 'r') assert fd.read(26) == 'Trac Environment Version 1' finally: fd.close()
66f39cc259ba29cad0244481559e4416fdb13bf0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/66f39cc259ba29cad0244481559e4416fdb13bf0/env.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 12, 2890, 4672, 3536, 8097, 716, 326, 2112, 589, 3143, 358, 279, 923, 2197, 71, 3330, 1867, 12123, 775, 30, 5194, 273, 1696, 12, 538, 18, 803, 18, 5701, 12, 2890, 18, 803, 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, 3929, 12, 2890, 4672, 3536, 8097, 716, 326, 2112, 589, 3143, 358, 279, 923, 2197, 71, 3330, 1867, 12123, 775, 30, 5194, 273, 1696, 12, 538, 18, 803, 18, 5701, 12, 2890, 18, 803, 16, ...
== [inplace.log1p_inplace, alloc]
== [T.log1p, alloc]
def test_log1p(): m = theano.config.mode if m == 'FAST_COMPILE': m = 'FAST_RUN' m = compile.mode.get_mode(m) m = m.excluding('fusion') # check some basic cases x = dvector() f = function([x], T.log(1+(x)), mode=m) assert [node.op for node in f.maker.env.toposort()] == [T.log1p] f = function([x], T.log(1+(-x)), mode=m) assert [node.op for node in f.maker.env.toposort()] == [T.neg, inplace.log1p_inplace] f = function([x], -T.log(1+(-x)), mode=m) assert [node.op for node in f.maker.env.toposort()] == [T.neg, inplace.log1p_inplace, inplace.neg_inplace] # check trickier cases (and use different dtype) y = fmatrix() f = function([x,y], T.log(fill(y,1)+(x)), mode=m) print f.maker.env.toposort() # the first three ops are Shape_i, Shape_i, and Dimshuffle theano.printing.debugprint(f) assert [node.op for node in f.maker.env.toposort()][3:] \ == [inplace.log1p_inplace, alloc] f = function([x,y], T.log(0+(x) + fill(y,1.0)), mode=m) theano.printing.debugprint(f) assert [node.op for node in f.maker.env.toposort()][3:] \ == [inplace.log1p_inplace, alloc] f = function([x,y], T.log(2+(x) - fill(y,1.0)), mode=m) theano.printing.debugprint(f) assert [node.op for node in f.maker.env.toposort()][3:] \ == [inplace.log1p_inplace, alloc] f([1e-7, 10], [[0, 0], [0, 0]]) #debugmode will verify values if 0: # at one point this worked, but it has been broken since # the constant up-casting made 1 -> 1.0+0.0j # I was never sure if this optimization should work on complex numbers or not. z = zmatrix() f = function([z], T.log(1+(z)), mode=m) theano.printing.debugprint(f) assert [node.op for node in f.maker.env.toposort()] == [T.log1p] if 1: # should work for int z = imatrix() f = function([z], T.log(1+(z)), mode=m) theano.printing.debugprint(f) assert [node.op for node in f.maker.env.toposort()] == [T.log1p]
6efb14d5b50778175ec5c937b5269ee07a6dbce3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/6efb14d5b50778175ec5c937b5269ee07a6dbce3/test_opt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1330, 21, 84, 13332, 312, 273, 326, 31922, 18, 1425, 18, 3188, 309, 312, 422, 296, 2046, 882, 67, 31075, 900, 4278, 312, 273, 296, 2046, 882, 67, 15238, 11, 312, 273, 4074, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1330, 21, 84, 13332, 312, 273, 326, 31922, 18, 1425, 18, 3188, 309, 312, 422, 296, 2046, 882, 67, 31075, 900, 4278, 312, 273, 296, 2046, 882, 67, 15238, 11, 312, 273, 4074, ...
def evaluate_lenet5(learning_rate=0.0001, n_iter=1000, dataset='mnist.pkl.gz'): print 'learning_rate = ', learning_rate
def evaluate_lenet5(learning_rate=0.01, n_iter=200, dataset='mnist.pkl.gz'):
def evaluate_lenet5(learning_rate=0.0001, n_iter=1000, dataset='mnist.pkl.gz'): print 'learning_rate = ', learning_rate rng = numpy.random.RandomState(23455) train_batches, valid_batches, test_batches = load_dataset(dataset) ishape = (28,28) # this is the size of MNIST images batch_size = 20 # sized of the minibatch # allocate symbolic variables for the data x = theano.floatX.xmatrix(theano.config.floatX) # rasterized images y = T.lvector() # the labels are presented as 1D vector of [long int] labels ###################### # BUILD ACTUAL MODEL # ###################### # Reshape matrix of rasterized images of shape (batch_size,28*28) # to a 4D tensor, compatible with our LeNetConvPoolLayer layer0_input = x.reshape((batch_size,1,28,28)) # Construct the first convolutional pooling layer: # filtering reduces the image size to (28-5+1,28-5+1)=(24,24) # maxpooling reduces this further to (24/2,24/2) = (12,12) # 4D output tensor is thus of shape (20,6,12,12) layer0 = LeNetConvPoolLayer(rng, input=layer0_input, image_shape=(batch_size,1,28,28), filter_shape=(6,1,5,5), poolsize=(2,2)) # Construct the second convolutional pooling layer # filtering reduces the image size to (12-5+1,12-5+1)=(8,8) # maxpooling reduces this further to (8/2,8/2) = (4,4) # 4D output tensor is thus of shape (20,32,4,4) layer1 = LeNetConvPoolLayer(rng, input=layer0.output, image_shape=(batch_size,6,12,12), filter_shape=(32,6,5,5), poolsize=(2,2)) # the SigmoidalLayer being fully-connected, it operates on 2D matrices of # shape (batch_size,num_pixels) (i.e matrix of rasterized images). # This will generate a matrix of shape (20,32*4*4) = (20,512) layer2_input = layer1.output.flatten(2) # construct a fully-connected sigmoidal layer layer2 = SigmoidalLayer(rng, input=layer2_input, n_in=32*4*4, n_out=500) # classify the values of the fully-connected sigmoidal layer layer3 = LogisticRegression(input=layer2.output, n_in=500, n_out=10) # the cost we minimize during training is the NLL of the model cost = layer3.negative_log_likelihood(y) # create a function to compute the mistakes that are made by the model test_model = theano.function([x,y], layer3.errors(y)) # create a list of all model parameters to be fit by gradient descent params = layer3.params+ layer2.params+ layer1.params + layer0.params learning_rate = numpy.asarray(learning_rate, dtype=theano.config.floatX) # train_model is a function that updates the model parameters by SGD train_model = theano.function([x, y], cost, updates=[(p, p - learning_rate*gp) for p,gp in zip(params, T.grad(cost, params))]) ############### # TRAIN MODEL # ############### n_minibatches = len(train_batches) # early-stopping parameters patience = 10000 # look as this many examples regardless patience_increase = 2 # wait this much longer when a new best is # found improvement_threshold = 0.995 # a relative improvement of this much is # considered significant validation_frequency = n_minibatches # go through this many # minibatche before checking the network # on the validation set; in this case we # check every epoch best_params = None best_validation_loss = float('inf') best_iter = 0 test_score = 0. start_time = time.clock() # have a maximum of `n_iter` iterations through the entire dataset for iter in xrange(n_iter * n_minibatches): #for iter in xrange(2 * n_minibatches): # get epoch and minibatch index epoch = iter / n_minibatches minibatch_index = iter % n_minibatches # get the minibatches corresponding to `iter` modulo # `len(train_batches)` x,y = train_batches[ minibatch_index ] print 'training @ iter = ', iter cost_ij = train_model(x,y) if (iter+1) % validation_frequency == 0: # compute zero-one loss on validation set this_validation_loss = 0. for x,y in valid_batches: # sum up the errors for each minibatch this_validation_loss += test_model(x,y) # get the average by dividing with the number of minibatches this_validation_loss /= len(valid_batches) print('epoch %i, minibatch %i/%i, validation error %f %%' % \ (epoch, minibatch_index+1, n_minibatches, \ this_validation_loss*100.)) # if we got the best validation score until now if this_validation_loss < best_validation_loss: #improve patience if loss improvement is good enough if this_validation_loss < best_validation_loss * \ improvement_threshold : patience = max(patience, iter * patience_increase) # save best validation score and iteration number best_validation_loss = this_validation_loss best_iter = iter # test it on the test set test_score = 0. for x,y in test_batches: test_score += test_model(x,y) test_score /= len(test_batches) print((' epoch %i, minibatch %i/%i, test error of best ' 'model %f %%') % (epoch, minibatch_index+1, n_minibatches, test_score*100.)) if patience <= iter : break end_time = time.clock() print('Optimization complete.') print('Best validation score of %f %% obtained at iteration %i,'\ 'with test performance %f %%' % (best_validation_loss * 100., best_iter, test_score*100.)) print('The code ran for %f minutes' % ((end_time-start_time)/60.))
865ed2ce1ebc93572eeaf6cd553710102fe1bfc8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/242/865ed2ce1ebc93572eeaf6cd553710102fe1bfc8/convolutional_mlp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5956, 67, 1897, 278, 25, 12, 21455, 67, 5141, 33, 20, 18, 1611, 16, 290, 67, 2165, 33, 6976, 16, 3709, 2218, 13607, 376, 18, 5465, 80, 18, 9764, 11, 4672, 11418, 273, 3972, 18, 9188,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5956, 67, 1897, 278, 25, 12, 21455, 67, 5141, 33, 20, 18, 1611, 16, 290, 67, 2165, 33, 6976, 16, 3709, 2218, 13607, 376, 18, 5465, 80, 18, 9764, 11, 4672, 11418, 273, 3972, 18, 9188,...
CREATE INDEX %(partitionName)s_signature_date_processed_key ON %(partitionName)s (signature, date_processed);
CREATE INDEX %(partitionName)s_signature_date_processed_build_key ON %(partitionName)s (signature, date_processed, build);
def __init__ (self, logger, **kwargs): super(ReportsTable, self).__init__(name='reports', logger=logger, creationSql=""" CREATE TABLE reports ( id serial NOT NULL, client_crash_date timestamp with time zone, date_processed timestamp without time zone, uuid character varying(50) NOT NULL, product character varying(30), version character varying(16), build character varying(30), signature character varying(255), url character varying(255), install_age integer, last_crash integer, uptime integer, cpu_name character varying(100), cpu_info character varying(100), reason character varying(255), address character varying(20), os_name character varying(100), os_version character varying(100), email character varying(100), build_date timestamp without time zone, user_id character varying(50), started_datetime timestamp without time zone, completed_datetime timestamp without time zone, success boolean, truncated boolean, processor_notes text, user_comments character varying(1024), app_notes character varying(1024), distributor character varying(20), distributor_version character varying(20) ); --CREATE TRIGGER reports_insert_trigger -- BEFORE INSERT ON reports -- FOR EACH ROW EXECUTE PROCEDURE partition_insert_trigger();""", partitionCreationSqlTemplate=""" CREATE TABLE %(partitionName)s ( CONSTRAINT %(partitionName)s_date_check CHECK (TIMESTAMP without time zone '%(startDate)s' <= date_processed and date_processed < TIMESTAMP without time zone '%(endDate)s'), CONSTRAINT %(partitionName)s_unique_uuid unique (uuid), PRIMARY KEY(id) ) INHERITS (reports); CREATE INDEX %(partitionName)s_date_processed_key ON %(partitionName)s (date_processed); CREATE INDEX %(partitionName)s_uuid_key ON %(partitionName)s (uuid); CREATE INDEX %(partitionName)s_signature_key ON %(partitionName)s (signature); CREATE INDEX %(partitionName)s_url_key ON %(partitionName)s (url); CREATE INDEX %(partitionName)s_product_version_key ON %(partitionName)s (product, version); --CREATE INDEX %(partitionName)s_uuid_date_processed_key ON %(partitionName)s (uuid, date_processed); CREATE INDEX %(partitionName)s_signature_date_processed_key ON %(partitionName)s (signature, date_processed); """ ) self.columns = "uuid", "client_crash_date", "date_processed", "product", "version", "build", "url", "install_age", "last_crash", "uptime", "email", "build_date", "user_id", "user_comments", "app_notes", "distributor", "distributor_version" self.insertSql = """insert into TABLENAME (uuid, client_crash_date, date_processed, product, version, build, url, install_age, last_crash, uptime, email, build_date, user_id, user_comments, app_notes, distributor, distributor_version) values (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)"""
8a49d63ee2cddda0fb7bb78c5a100e3c4818d05d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12383/8a49d63ee2cddda0fb7bb78c5a100e3c4818d05d/schema.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 1194, 16, 2826, 4333, 4672, 2240, 12, 18631, 1388, 16, 365, 2934, 972, 2738, 972, 12, 529, 2218, 20195, 2187, 1194, 33, 4901, 16, 6710, 5101, 1546, 3660, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 1194, 16, 2826, 4333, 4672, 2240, 12, 18631, 1388, 16, 365, 2934, 972, 2738, 972, 12, 529, 2218, 20195, 2187, 1194, 33, 4901, 16, 6710, 5101, 1546, 3660, ...
self.assertEquals(so_dir, os.getcwd())
self.assertEquals(so_dir, other_tmp_dir)
def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') self.write_file(c_file, 'void initfoo(void) {};\n') ext = Extension('foo', [c_file], optional=False) dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) cmd = build_ext(dist) cmd.ensure_finalized() self.assertEquals(len(cmd.get_outputs()), 1)
cbb4f9ef58ec7673f7c64b16496879b914b0972a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/cbb4f9ef58ec7673f7c64b16496879b914b0972a/test_build_ext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 588, 67, 12295, 12, 2890, 4672, 1853, 67, 1214, 273, 365, 18, 24816, 72, 5814, 1435, 276, 67, 768, 273, 1140, 18, 803, 18, 5701, 12, 5645, 67, 1214, 16, 296, 11351, 18, 71,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 588, 67, 12295, 12, 2890, 4672, 1853, 67, 1214, 273, 365, 18, 24816, 72, 5814, 1435, 276, 67, 768, 273, 1140, 18, 803, 18, 5701, 12, 5645, 67, 1214, 16, 296, 11351, 18, 71,...
self.result = QTestResult()
self.result = QTestResult(self.update_status)
def __init__(self): QtGui.QMainWindow.__init__(self) self.setWindowTitle("QTest") self.cases = [] self.result = QTestResult() self.runner = QTestRunner(self.result) self.setCentralWidget(self.result) load = QtGui.QAction('&Open', self) load.setShortcut('Ctrl+O') load.setStatusTip('Load test cases') self.connect(load, QtCore.SIGNAL('triggered()'), self.load_testcases) menubar = self.menuBar() file_menu = menubar.addMenu('&File') file_menu.addAction(load)
0fd2fa56d826146eb52b50413485e4d24bbf6f8f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14942/0fd2fa56d826146eb52b50413485e4d24bbf6f8f/qtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 23425, 18, 53, 6376, 3829, 16186, 2738, 972, 12, 2890, 13, 225, 365, 18, 542, 3829, 4247, 2932, 53, 4709, 7923, 225, 365, 18, 22186, 273, 5378, 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, 1001, 2738, 972, 12, 2890, 4672, 23425, 18, 53, 6376, 3829, 16186, 2738, 972, 12, 2890, 13, 225, 365, 18, 542, 3829, 4247, 2932, 53, 4709, 7923, 225, 365, 18, 22186, 273, 5378, 365, 18...
save_path = info["move_on_completed_path"] if info ["move_completed"] else info["save_path"]
save_path = info["move_on_completed_path"] if info ["move_on_completed"] else info["save_path"]
def execute_commands(self, torrent_id, event): torrent = component.get("TorrentManager").torrents[torrent_id] info = torrent.get_status(["name", "save_path", "move_completed", "move_on_completed_path"])
d69b8e1099ad314eb6155c0aa14355882da7b507 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12915/d69b8e1099ad314eb6155c0aa14355882da7b507/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 67, 7847, 12, 2890, 16, 17351, 67, 350, 16, 871, 4672, 17351, 273, 1794, 18, 588, 2932, 27266, 547, 1318, 20387, 13039, 547, 87, 63, 13039, 547, 67, 350, 65, 1123, 273, 17351, 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, 1836, 67, 7847, 12, 2890, 16, 17351, 67, 350, 16, 871, 4672, 17351, 273, 1794, 18, 588, 2932, 27266, 547, 1318, 20387, 13039, 547, 87, 63, 13039, 547, 67, 350, 65, 1123, 273, 17351, 18...
bgQueue.get_nowait()
item = bgQueue.get_nowait() if item[0] == espeakDLL.espeak_SetParameter: params.append(item) for item in params: bgQueue.put(item)
def stop(): global isSpeaking, bgQueue # Kill all speech from now. while not bgQueue.empty(): bgQueue.get_nowait() isSpeaking = False player.stop()
f5c75495a065bddd4d331b9b0b6d9f6593c353be /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9340/f5c75495a065bddd4d331b9b0b6d9f6593c353be/_espeak.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 13332, 2552, 11604, 347, 6159, 16, 7611, 3183, 468, 20520, 777, 24556, 628, 2037, 18, 1323, 486, 7611, 3183, 18, 5531, 13332, 761, 273, 7611, 3183, 18, 588, 67, 3338, 1540, 1435, 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, 2132, 13332, 2552, 11604, 347, 6159, 16, 7611, 3183, 468, 20520, 777, 24556, 628, 2037, 18, 1323, 486, 7611, 3183, 18, 5531, 13332, 761, 273, 7611, 3183, 18, 588, 67, 3338, 1540, 1435, 3...
converter.condense_and_sort(sources)
def main(): global sources jumps = [] start = 0 source_file = None if len (sys.argv) > 1: if sys.argv[1] in ['--help','help'] or len(sys.argv) < 2: print __doc__ sys.exit(1) #Some overlap here with sources.Converter methods. elif '-ss' in sys.argv: # play one file starting at -ss position pos = sys.argv.index("-ss") sys.argv.remove("-ss") source = Source() start = int(sys.argv.pop(pos)) source.jumps.append(start) path = sys.argv[1] source.path = path sources.append(source) elif '-sl' in sys.argv: # play one file and jump through all jump positions pos = sys.argv.index("-sl") sys.argv.remove("-sl") source = Source() source.jumps.from_comma(sys.argv.pop(pos)) #jumps = string_to_jumps(sys.argv.pop(pos)) source.path = sys.argv.pop(pos) #playlist.append( [source, jumps] ) sources.append(source) elif '-m3u' in sys.argv: pos = sys.argv.index("-m3u") sys.argv.remove("-m3u") filename = sys.argv.pop(pos) f = codecs.open(filename, encoding='utf8') #this could also be accomplished with Converter.from_m3u #but this is a good introduction to Sources objects for line in f.readlines(): line = unicode(line) if line.startswith('#') or len(line.strip()) == 0: pass else: source_file = line.strip() source_file = source_file.replace('"', '') source = Source(source_file) sources.append( Source ) f.close elif '-mlist' in sys.argv: """ this is a standard journal file that contains media playback entries can parse these based on directory or based on file if directory, merge all files into a journal osbrowser.node.create_journal otherwise just open it as a journal file """ pos = sys.argv.index("-mlist") sys.argv.remove("-mlist") playlist_file = sys.argv.pop(pos) j = load_journal(playlist_file) entries = j.to_entries() temp = Sources() converter = Converter(temp) converter.from_entries(entries) converter.condense_and_sort(sources) else: #files passed in via command line: #get rid of the command argument: del sys.argv[0] #go through all arguments remaining... could have been passed #multiple items via a wildcard #print sys.argv for path in sys.argv: if os.path.isdir(path): for i in os.listdir(path): new_path = os.path.join(path, i) source = Source(new_path) sources.append( source ) else: sources.append( Source(path) ) #print sources if "-save" in sys.argv: # *2009.08.30 09:58:05 # a quick place to add in functionality to save the resulting # m3u file # might want to generalize this. o = file("playlist.m3u", 'w') for i in playlist: #if re.match('\/c\/media\/binaries', i): if i[0].startswith('/c/media/binaries'): i = i[0].replace('/c/media/binaries/music', '/Volumes/Binaries/music') print i else: print "NO MATCH: %s" % i[0] i = '' if not re.search('JPG', i): o.write(i) o.write('\n') exit() window.set_visible(True) window.user_response = '' player.list_go(0) pyglet.app.run()
9811c199903bf95d5073ee2a5fe40b2ce8ce858f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6696/9811c199903bf95d5073ee2a5fe40b2ce8ce858f/player.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2552, 5550, 225, 525, 23868, 273, 5378, 787, 273, 374, 1084, 67, 768, 273, 599, 309, 562, 261, 9499, 18, 19485, 13, 405, 404, 30, 309, 2589, 18, 19485, 63, 21, 65, 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, 2774, 13332, 2552, 5550, 225, 525, 23868, 273, 5378, 787, 273, 374, 1084, 67, 768, 273, 599, 309, 562, 261, 9499, 18, 19485, 13, 405, 404, 30, 309, 2589, 18, 19485, 63, 21, 65, 316, ...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.DoubleField.__init__(self, 921) else quickfix.DoubleField.__init__(self, 921, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 5265, 974, 16186, 2738, 972, 12, 2890, 16, 2468, 5340, 13, 469, 9549, 904, 18, 5265, 974, 16186, 2738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 5265, 974, 16186, 2738, 972, 12, 2890, 16, 2468, 5340, 13, 469, 9549, 904, 18, 5265, 974, 16186, 2738, ...
l.settings()[l.SLOT_FIRST_IMAGE_V2+l.SLOT_OFFSET_COMMON_TEXT].set_value("1-01-A-01.tif") l.settings()[l.SLOT_FIRST_IMAGE_V2+l.SLOT_OFFSET_IMAGE_NAME].set_value("my_image")
l.settings()[l.SLOT_FIRST_IMAGE_V3+l.SLOT_OFFSET_COMMON_TEXT].set_value("1-01-A-01.tif") l.settings()[l.SLOT_FIRST_IMAGE_V3+l.SLOT_OFFSET_IMAGE_NAME].set_value("my_image")
def test_01_01load_image_text_match(self): l=LI.LoadImages() l.settings()[l.SLOT_MATCH_METHOD].set_value(LI.MS_EXACT_MATCH) l.settings()[l.SLOT_LOCATION].value = LI.DIR_OTHER l.settings()[l.SLOT_LOCATION_OTHER].value =\ os.path.join(T.example_images_directory(),"ExampleSBSImages") l.settings()[l.SLOT_FIRST_IMAGE_V2+l.SLOT_OFFSET_COMMON_TEXT].set_value("1-01-A-01.tif") l.settings()[l.SLOT_FIRST_IMAGE_V2+l.SLOT_OFFSET_IMAGE_NAME].set_value("my_image") image_set_list = I.ImageSetList() pipeline = P.Pipeline() pipeline.add_listener(self.error_callback) l.prepare_run(pipeline, image_set_list, None) self.assertEqual(image_set_list.count(),1,"Expected one image set in the list") image_set = image_set_list.get_image_set(0) self.assertEqual(len(image_set.get_names()),1) self.assertEqual(image_set.get_names()[0],"my_image") self.assertTrue(image_set.get_image("my_image"))
1842279c159b85f8be31eabf25aea8d9a9f09b54 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2870/1842279c159b85f8be31eabf25aea8d9a9f09b54/test_loadimages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1611, 67, 1611, 945, 67, 2730, 67, 955, 67, 1916, 12, 2890, 4672, 328, 33, 2053, 18, 2563, 8946, 1435, 328, 18, 4272, 1435, 63, 80, 18, 55, 1502, 56, 67, 11793, 67, 5327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1611, 67, 1611, 945, 67, 2730, 67, 955, 67, 1916, 12, 2890, 4672, 328, 33, 2053, 18, 2563, 8946, 1435, 328, 18, 4272, 1435, 63, 80, 18, 55, 1502, 56, 67, 11793, 67, 5327, ...
_log(logging.getLogger(log).warn, msg, args, tb=kwargs.get("tb"))
log = logging.getLogger(logname) if log.isEnabledFor(logging.WARN): _log(log.warn, msg, args, tb=kwargs.get("tb"))
def warn (log, msg, *args, **kwargs): """ Log a warning. return: None """ _log(logging.getLogger(log).warn, msg, args, tb=kwargs.get("tb"))
faf1ea81ce85e52a6f731442dc751ffe1189caab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/faf1ea81ce85e52a6f731442dc751ffe1189caab/log.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1894, 261, 1330, 16, 1234, 16, 380, 1968, 16, 2826, 4333, 4672, 3536, 1827, 279, 3436, 18, 225, 327, 30, 599, 3536, 613, 273, 2907, 18, 588, 3328, 12, 1330, 529, 13, 309, 613, 18, 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, 1894, 261, 1330, 16, 1234, 16, 380, 1968, 16, 2826, 4333, 4672, 3536, 1827, 279, 3436, 18, 225, 327, 30, 599, 3536, 613, 273, 2907, 18, 588, 3328, 12, 1330, 529, 13, 309, 613, 18, 29...
xyz=(-28,2,village_height),age=probability.fertility_age,sex='male',orientation=Quaternion(Vector3D([1,0,0]),Vector3D([0,-1,0])).as_list())
xyz=(-28,2,settlement_height),age=probability.fertility_age,sex='male',orientation=Quaternion(Vector3D([1,0,0]),Vector3D([0,-1,0])).as_list())
def default(mapeditor):
6bdd58dfdd1a3af7fac09b4b31a0e9971c80df9e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12932/6bdd58dfdd1a3af7fac09b4b31a0e9971c80df9e/define_world.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 805, 12, 1458, 9177, 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, 805, 12, 1458, 9177, 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, -1...
for (x,y,r) in actors[:3]:
for a in actors: (x,y,r) = a[:3]
def draw_actors(self, actors): for (x,y,r) in actors[:3]: (x,y) = Helper.screen_coords(x,y) gfxdraw.aacircle(self.screen, x,y, Helper.screen_radius(r), DRAW_COLOUR)
82658c98866edc637a4dea23d2dd512a05244468 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14940/82658c98866edc637a4dea23d2dd512a05244468/drawing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 67, 621, 1383, 12, 2890, 16, 27141, 4672, 364, 279, 316, 27141, 30, 261, 92, 16, 93, 16, 86, 13, 273, 279, 10531, 23, 65, 261, 92, 16, 93, 13, 273, 9705, 18, 9252, 67, 9076, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 67, 621, 1383, 12, 2890, 16, 27141, 4672, 364, 279, 316, 27141, 30, 261, 92, 16, 93, 16, 86, 13, 273, 279, 10531, 23, 65, 261, 92, 16, 93, 13, 273, 9705, 18, 9252, 67, 9076, ...