rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
def make_classes(filename, class_text, superclass = None, namespace = 'core', add_constructor_overloads = False, superclass_aterm = None):
def make_classes(filename, class_text, superclass = None, namespace = 'core', add_constructor_overloads = False, superclass_aterm = None, generate_is_functions = False):
def make_classes(filename, class_text, superclass = None, namespace = 'core', add_constructor_overloads = False, superclass_aterm = None): classes = parse_classes(class_text, superclass, use_base_class_name = True) # skip the classes with a namespace qualifier (they are defined elsewhere) classes = [c for c in classes if c.qualifier() == ''] class_definitions = [c.class_inline_definition(namespace, True, add_constructor_overloads) for c in classes] if path(filename).isdir(): for i in range(len(class_definitions)): fname = path(filename).normcase() / ('%s.h' % classes[i].name()) text = class_definitions[i] insert_text_in_file(fname, text, 'generated class %s' % classes[i].name()) else: ctext = '\n'.join(class_definitions) if superclass != None and superclass_aterm != None: text = Class(superclass_aterm, '%s()' % superclass, 'class %s' % superclass, superclass = None, use_base_class_name = False).class_inline_definition(namespace, True, add_constructor_overloads) # TODO: this code should be generated in a cleaner way text = re.sub('check_term', 'check_rule', text) ctext = text + ctext insert_text_in_file(filename, ctext, 'generated classes')
5ed2a19ec2a0549e3e5846be6cbf059eee0cdf07 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1522/5ed2a19ec2a0549e3e5846be6cbf059eee0cdf07/generate_classes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 4701, 12, 3459, 16, 667, 67, 955, 16, 12098, 273, 599, 16, 1981, 273, 296, 3644, 2187, 527, 67, 12316, 67, 1643, 17135, 273, 1083, 16, 12098, 67, 270, 1035, 273, 599, 16, 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, 1221, 67, 4701, 12, 3459, 16, 667, 67, 955, 16, 12098, 273, 599, 16, 1981, 273, 296, 3644, 2187, 527, 67, 12316, 67, 1643, 17135, 273, 1083, 16, 12098, 67, 270, 1035, 273, 599, 16, 2...
result = str(self)
result = unicode(self)
def gedcom(self): """ Return GEDCOM code for this line and all of its sub-lines """ result = str(self) for e in self.children_lines(): result += '\n' + e.gedcom() return result
2676f19fbbbabb51ef234a342e5a7a6ac612ff24 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14621/2676f19fbbbabb51ef234a342e5a7a6ac612ff24/simplepyged.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23036, 12, 2890, 4672, 3536, 2000, 611, 2056, 4208, 981, 364, 333, 980, 471, 777, 434, 2097, 720, 17, 3548, 3536, 563, 273, 5252, 12, 2890, 13, 364, 425, 316, 365, 18, 5906, 67, 3548, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23036, 12, 2890, 4672, 3536, 2000, 611, 2056, 4208, 981, 364, 333, 980, 471, 777, 434, 2097, 720, 17, 3548, 3536, 563, 273, 5252, 12, 2890, 13, 364, 425, 316, 365, 18, 5906, 67, 3548, ...
assert len(old.dbxrefs) == len(new.dbxrefs) assert Set(old.dbxrefs) == Set(new.dbxrefs)
if len(old.dbxrefs) > 0 and len(new.dbxrefs) > 0 : assert len(old.dbxrefs) == len(new.dbxrefs) assert Set(old.dbxrefs) == Set(new.dbxrefs)
def compare_records(old, new) : """Compare two SeqRecord or DBSeqRecord objects""" #Sequence: compare_sequences(old.seq, new.seq) #Basics: assert old.id == new.id assert old.name == new.name assert old.description == new.description #database cross references: assert len(old.dbxrefs) == len(new.dbxrefs) assert Set(old.dbxrefs) == Set(new.dbxrefs) #Should we allow change in order? #Features: assert len(old.features) == len(new.features) for old_f, new_f in zip(old.features, new.features) : compare_features(old_f, new_f) #Annotation: # #TODO - See Bug 2396 for why some annotations are never recorded. #However, we are also seeing some "extra" annotations appearing, #such as 'cross_references', 'dates', 'references', 'data_file_division' # #assert len(old.annotations) == len(new.annotations), \ # "Different annotations\nOld extra: %s\nNew extra: %s" % \ # (Set(old.annotations.keys()).difference(new.annotations.keys()), # Set(new.annotations.keys()).difference(old.annotations.keys())) # #In the short term, just compare any shared keys: for key in Set(old.annotations.keys()).intersection(new.annotations.keys()) : if key == "references" : assert len(old.annotations[key]) == len(new.annotations[key]) for old_r, new_r in zip(old.annotations[key], new.annotations[key]) : compare_references(old_r, new_r) elif type(old.annotations[key]) == type(new.annotations[key]) : assert old.annotations[key] == new.annotations[key] elif isinstance(old.annotations[key], str) \ and isinstance(new.annotations[key], list) : #Any annotation which is a single string gets turned into #a list containing one string by BioSQL at the moment. assert [old.annotations[key]] == new.annotations[key] elif isinstance(old.annotations[key], list) \ and isinstance(new.annotations[key], str) : assert old.annotations[key] == [new.annotations[key]]
f20baedb872711e8ab15883554470ab8e0afdb19 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7167/f20baedb872711e8ab15883554470ab8e0afdb19/test_BioSQL_SeqIO.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3400, 67, 7094, 12, 1673, 16, 394, 13, 294, 3536, 8583, 2795, 14367, 2115, 578, 2383, 6926, 2115, 2184, 8395, 468, 4021, 30, 3400, 67, 17190, 12, 1673, 18, 5436, 16, 394, 18, 5436, 13,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3400, 67, 7094, 12, 1673, 16, 394, 13, 294, 3536, 8583, 2795, 14367, 2115, 578, 2383, 6926, 2115, 2184, 8395, 468, 4021, 30, 3400, 67, 17190, 12, 1673, 18, 5436, 16, 394, 18, 5436, 13,...
path = settings.get_path('media', 'text')
path = settings.get('path', 'text')
def medialist(): answer = dict() answer['all'] = [] answer['audio'] = [] answer['video'] = [] answer['txt'] = [] path = settings.get_path('media', 'video') if isdir(path): for f in listdir(path): if f[0] != '.': answer['video'].append(f) path = settings.get_path('media', 'audio') if isdir(path): for f in listdir(path): if f[0] != '.': answer['audio'].append(f) path = settings.get_path('media', 'text') if isdir(path): for f in listdir(path): if f[0] != '.': answer['txt'].append(f) for i, liste in answer.items(): answer[i] = sorted(liste) return sendjson(answer)
51facfeb68610261965ab21601f5f4fb22a22223 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4363/51facfeb68610261965ab21601f5f4fb22a22223/server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6735, 649, 376, 13332, 5803, 273, 2065, 1435, 5803, 3292, 454, 3546, 273, 5378, 5803, 3292, 11509, 3546, 273, 5378, 5803, 3292, 9115, 3546, 273, 5378, 5803, 3292, 5830, 3546, 273, 5378, 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, 6735, 649, 376, 13332, 5803, 273, 2065, 1435, 5803, 3292, 454, 3546, 273, 5378, 5803, 3292, 11509, 3546, 273, 5378, 5803, 3292, 9115, 3546, 273, 5378, 5803, 3292, 5830, 3546, 273, 5378, 22...
if self.subwidget_list.has_key(name): self.tk.call(self._w, 'invoke', name)
if self.subwidget_list.has_key(name): self.tk.call(self._w, 'invoke', name)
def invoke(self, name):
b0e44d61d9e592e1acd6aa05eac9704ba5776f61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b0e44d61d9e592e1acd6aa05eac9704ba5776f61/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4356, 12, 2890, 16, 508, 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, 4356, 12, 2890, 16, 508, 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...
if 'manifest' in err.message: msg = str(err) else:
msg = str(err) if 'manifest' not in msg:
def run_wsgi(self, req):
c826e3de422a2da6f61c440779290c6f4d0691b8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/c826e3de422a2da6f61c440779290c6f4d0691b8/hgweb_mod.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 28539, 12, 2890, 16, 1111, 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, ...
[ 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, 1086, 67, 28539, 12, 2890, 16, 1111, 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...
gateGump.addText( 170, 150, "Trinsic " )
gateGump.addText( 170, 150, "Trinsic" )
def sendGump( char, item ): char.soundeffect( 0x58 ) # noclose, nomove gump gateGump = cGump( 1, 1, 0, 30, 30 ) # trammel gateGump.startPage( 1 ) gateGump.addBackground( 9200, 300, 255 ) gateGump.addText( 40, 40, "Pick your destination: (Trammel)" ) gateGump.addButton( 47, 207, 0xFA5, 0xFA7, 0 ) gateGump.addText( 80, 210, "CANCEL" ) # facets gateGump.addText( 70, 70, "Trammel", 12 ) gateGump.addPageButton( 48, 72, 0x4B9, 0x4BA, 1 ) gateGump.addText( 70, 90, "Felucca" ) gateGump.addPageButton( 48, 95, 0x4B9, 0x4BA, 2 ) gateGump.addText( 70, 110, "Ilshenar" ) gateGump.addPageButton( 48, 115, 0x4B9, 0x4BA, 3 ) # gates gateGump.addText( 170, 70, "Britain" ) gateGump.addButton( 150, 75, 0x837, 0x838, 5 ) gateGump.addText( 170, 90, "Magincia" ) gateGump.addButton( 150, 95, 0x837, 0x838, 6 ) gateGump.addText( 170, 110, "Moonglow" ) gateGump.addButton( 150, 115, 0x837, 0x838, 7 ) gateGump.addText( 170, 130, "Skara Brae" ) gateGump.addButton( 150, 135, 0x837, 0x838, 8 ) gateGump.addText( 170, 150, "Trinsic" ) gateGump.addButton( 150, 155, 0x837, 0x838, 9 ) gateGump.addText( 170, 170, "Vesper" ) gateGump.addButton( 150, 175, 0x837, 0x838, 10 ) gateGump.addText( 170, 190, "Yew" ) gateGump.addButton( 150, 195, 0x837, 0x838, 11 ) gateGump.addText( 170, 210, "Jhelom" ) gateGump.addButton( 150, 215, 0x837, 0x838, 12 ) # felucca gateGump.startPage( 2 ) gateGump.addBackground( 9200, 300, 255 ) gateGump.addText( 40, 40, "Pick your destination: (Felucca)" ) gateGump.addButton( 47, 207, 0xFA5, 0xFA7, 0 ) gateGump.addText( 80, 210, "CANCEL " ) # facets gateGump.addText( 70, 70, "Trammel " ) gateGump.addPageButton( 48, 72, 0x4B9, 0x4BA, 1 ) gateGump.addText( 70, 90, "Felucca ", 12 ) gateGump.addPageButton( 48, 95, 0x4B9, 0x4BA, 2 ) gateGump.addText( 70, 110, "Ilshenar " ) gateGump.addPageButton( 48, 115, 0x4B9, 0x4BA, 3 ) # gates gateGump.addText( 170, 70, "Britain " ) gateGump.addButton( 150, 75, 0x837, 0x838, 13 ) gateGump.addText( 170, 90, "Magincia " ) gateGump.addButton( 150, 95, 0x837, 0x838, 14 ) gateGump.addText( 170, 110, "Moonglow " ) gateGump.addButton( 150, 115, 0x837, 0x838, 15 ) gateGump.addText( 170, 130, "Skara Brae " ) gateGump.addButton( 150, 135, 0x837, 0x838, 16 ) gateGump.addText( 170, 150, "Trinsic " ) gateGump.addButton( 150, 155, 0x837, 0x838, 17 ) gateGump.addText( 170, 170, "Vesper " ) gateGump.addButton( 150, 175, 0x837, 0x838, 18 ) gateGump.addText( 170, 190, "Yew " ) gateGump.addButton( 150, 195, 0x837, 0x838, 19 ) gateGump.addText( 170, 210, "Jhelom " ) gateGump.addButton( 150, 215, 0x837, 0x838, 20 ) # ilshenar gateGump.startPage( 3 ) gateGump.addBackground( 9200, 300, 255 ) gateGump.addText( 40, 40, "Pick your destination: (Ilshenar)" ) gateGump.addButton( 47, 207, 0xFA5, 0xFA7, 0 ) gateGump.addText( 80, 210, "CANCEL " ) # facets gateGump.addText( 70, 70, "Trammel " ) gateGump.addPageButton( 48, 72, 0x4B9, 0x4BA, 1 ) gateGump.addText( 70, 90, "Felucca " ) gateGump.addPageButton( 48, 95, 0x4B9, 0x4BA, 2 ) gateGump.addText( 70, 110, "Ilshenar ", 12 ) gateGump.addPageButton( 48, 115, 0x4B9, 0x4BA, 3 ) # #gates gateGump.addText( 170, 70, "Compassion" ) gateGump.addButton( 150, 75, 0x837, 0x838, 21 ) gateGump.addText( 170, 90, "Honesty" ) gateGump.addButton( 150, 95, 0x837, 0x838, 22 ) gateGump.addText( 170, 110, "Honor" ) gateGump.addButton( 150, 115, 0x837, 0x838, 23 ) gateGump.addText( 170, 130, "Humility" ) gateGump.addButton( 150, 135, 0x837, 0x838, 24 ) gateGump.addText( 170, 150, "Justice" ) gateGump.addButton( 150, 155, 0x837, 0x838, 25 ) gateGump.addText( 170, 170, "Sacrifice" ) gateGump.addButton( 150, 175, 0x837, 0x838, 26 ) gateGump.addText( 170, 190, "Spirituality" ) gateGump.addButton( 150, 195, 0x837, 0x838, 27 ) gateGump.addText( 170, 210, "Valor" ) gateGump.addButton( 150, 215, 0x837, 0x838, 28 ) gateGump.addText( 170, 230, "Chaos" ) gateGump.addButton( 150, 235, 0x837, 0x838, 29 ) # set callback function and its arguments gateGump.setCallback( "moongate.gateCallback" ) # send it gateGump.setArgs( [ item ] ) gateGump.send( char ) # attach tag char.settag( "moongate", 1 )
fa762406a204038e4f2a446679a18b75f632c2ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/fa762406a204038e4f2a446679a18b75f632c2ac/moongate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 43, 2801, 12, 1149, 16, 761, 262, 30, 1149, 18, 87, 465, 536, 74, 386, 12, 374, 92, 8204, 262, 468, 30601, 2061, 16, 12457, 841, 314, 2801, 12611, 43, 2801, 273, 276, 43, 2801,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 43, 2801, 12, 1149, 16, 761, 262, 30, 1149, 18, 87, 465, 536, 74, 386, 12, 374, 92, 8204, 262, 468, 30601, 2061, 16, 12457, 841, 314, 2801, 12611, 43, 2801, 273, 276, 43, 2801,...
except rpmUtils.RpmUtilsError, e: log.exception("Cannot find/open srpm: %s. Error was: %s" % (srpm, str(e))) raise mock.exceptions.Error("Cannot find/open srpm: %s. Error was: %s" % (srpm, str(e)))
except (rpmUtils.RpmUtilsError,), e: raise mock.exception.Error, "Cannot find/open srpm: %s. Error: %s" % (srpm, ''.join(e))
def getSrpmHeader(srpms): ts = rpmUtils.transaction.initReadOnlyTransaction() for srpm in srpms: try: hdr = rpmUtils.miscutils.hdrFromPackage(ts, srpm) except rpmUtils.RpmUtilsError, e: log.exception("Cannot find/open srpm: %s. Error was: %s" % (srpm, str(e))) raise mock.exceptions.Error("Cannot find/open srpm: %s. Error was: %s" % (srpm, str(e))) if hdr[rpm.RPMTAG_SOURCEPACKAGE] != 1: raise mock.exceptions.Error("File is not an srpm: %s." % srpm ) yield hdr
7e6993f7f65419a9e605ea03e72cacafdd32860a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7328/7e6993f7f65419a9e605ea03e72cacafdd32860a/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1322, 86, 7755, 1864, 12, 11254, 84, 959, 4672, 3742, 273, 25228, 1989, 18, 7958, 18, 2738, 12066, 3342, 1435, 364, 9133, 7755, 316, 9133, 84, 959, 30, 775, 30, 7723, 273, 25228, 1989, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1322, 86, 7755, 1864, 12, 11254, 84, 959, 4672, 3742, 273, 25228, 1989, 18, 7958, 18, 2738, 12066, 3342, 1435, 364, 9133, 7755, 316, 9133, 84, 959, 30, 775, 30, 7723, 273, 25228, 1989, ...
settings = registry.forInterface(IRecensioSettings)
try: settings = registry.forInterface(IRecensioSettings) except KeyError: settings = dict()
def handleTransition(self, info): membership_tool = getToolByName(self.context, 'portal_membership') user = membership_tool.getAuthenticatedMember() mailhost = getToolByName(self.context, 'MailHost') root = getToolByName(self.context, 'portal_url').getPortalObject() mail_info = IMailSchema(root) mail_from = '%s <%s>' % (mail_info.email_from_name, mail_info.email_from_address) user_email = user.getProperty('email')
f46453582494b135951a948be11b1eb2e71d9fd6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10562/f46453582494b135951a948be11b1eb2e71d9fd6/workflow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 8850, 12, 2890, 16, 1123, 4672, 12459, 67, 6738, 273, 336, 6364, 5911, 12, 2890, 18, 2472, 16, 296, 24386, 67, 19679, 6134, 729, 273, 12459, 67, 6738, 18, 588, 15606, 4419, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 8850, 12, 2890, 16, 1123, 4672, 12459, 67, 6738, 273, 336, 6364, 5911, 12, 2890, 18, 2472, 16, 296, 24386, 67, 19679, 6134, 729, 273, 12459, 67, 6738, 18, 588, 15606, 4419, 1435, ...
print packages
def finalize_options(self): # By the time finalize_options is called, install.install_lib is # set to the fixed directory, so we set the installdir to install_lib. # The # install_data class uses ('install_data', 'install_dir') instead. self.set_undefined_options('install', ('install_lib', 'install_dir')) install_data.finalize_options(self)
abf4db591ca7da2003b01e4bbcaf319e375af1af /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1600/abf4db591ca7da2003b01e4bbcaf319e375af1af/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12409, 67, 2116, 12, 2890, 4672, 468, 2525, 326, 813, 12409, 67, 2116, 353, 2566, 16, 3799, 18, 5425, 67, 2941, 353, 468, 444, 358, 326, 5499, 1867, 16, 1427, 732, 444, 326, 3799, 1214...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12409, 67, 2116, 12, 2890, 4672, 468, 2525, 326, 813, 12409, 67, 2116, 353, 2566, 16, 3799, 18, 5425, 67, 2941, 353, 468, 444, 358, 326, 5499, 1867, 16, 1427, 732, 444, 326, 3799, 1214...
"expected-one-end-tag-but-got-another", {"expectedName": "body", "gotName": node.name})
"end-tag-too-early", {"name": token["name"]}) node = self.tree.openElements.pop() while node.name != token["name"]: node = self.tree.openElements.pop() def endTagHeading(self, token): for item in headingElements: if self.tree.elementInScope(item): self.tree.generateImpliedEndTags()
def endTagBody(self, token): if not self.tree.elementInScope("body"): self.parser.parseError() return elif self.tree.openElements[-1].name != "body": for node in self.tree.openElements[2:]: if node.name not in frozenset(("dd", "dt", "li", "optgroup", "option", "p", "rp", "rt", "tbody", "td", "tfoot", "th", "thead", "tr", "body", "html")): #Not sure this is the correct name for the parse error self.parser.parseError( "expected-one-end-tag-but-got-another", {"expectedName": "body", "gotName": node.name}) break self.parser.phase = self.parser.phases["afterBody"]
7b800000ab5eed9d02fde3c4b884769a0bfbf17a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4487/7b800000ab5eed9d02fde3c4b884769a0bfbf17a/html5parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29765, 2250, 12, 2890, 16, 1147, 4672, 309, 486, 365, 18, 3413, 18, 2956, 382, 3876, 2932, 3432, 6, 4672, 365, 18, 4288, 18, 2670, 668, 1435, 327, 1327, 365, 18, 3413, 18, 3190, 3471, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29765, 2250, 12, 2890, 16, 1147, 4672, 309, 486, 365, 18, 3413, 18, 2956, 382, 3876, 2932, 3432, 6, 4672, 365, 18, 4288, 18, 2670, 668, 1435, 327, 1327, 365, 18, 3413, 18, 3190, 3471, ...
dec_flags, next_input, decoded_chars = self._snapshot
dec_flags, next_input = self._snapshot
def tell(self): if not self._seekable: raise IOError("underlying stream is not seekable") if not self._telling: raise IOError("telling position disabled by next() call") self.flush() position = self.buffer.tell() decoder = self._decoder if decoder is None or self._snapshot is None: if self._decoded_text: # This should never happen. raise AssertionError("pending decoded text") return position
dbe28e573e5c1227777db9dd630fac7732b81374 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/dbe28e573e5c1227777db9dd630fac7732b81374/io.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9276, 12, 2890, 4672, 309, 486, 365, 6315, 16508, 429, 30, 1002, 8340, 2932, 9341, 6291, 1407, 353, 486, 6520, 429, 7923, 309, 486, 365, 6315, 88, 1165, 310, 30, 1002, 8340, 2932, 88, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9276, 12, 2890, 4672, 309, 486, 365, 6315, 16508, 429, 30, 1002, 8340, 2932, 9341, 6291, 1407, 353, 486, 6520, 429, 7923, 309, 486, 365, 6315, 88, 1165, 310, 30, 1002, 8340, 2932, 88, ...
fclose = rffi.llexternal('fopen', [FILEP], rffi.INT)
fclose = rffi.llexternal('fclose', [FILEP], rffi.INT)
def test_opaque_obj_2(self): FILEP = rffi.COpaquePtr('FILE') fopen = rffi.llexternal('fopen', [rffi.CCHARP, rffi.CCHARP], FILEP) fclose = rffi.llexternal('fopen', [FILEP], rffi.INT) tmppath = udir.join('test_ll2ctypes.test_opaque_obj_2') ll_file = fopen(str(tmppath), "w") assert ll_file fclose(ll_file) assert tmppath.check(file=1) #assert not ALLOCATED --- fails, because ll2ctypes misses the # fact that fclose() frees 'll_file'
4e10c6577c9359b4b9185ab131c800c928513946 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/4e10c6577c9359b4b9185ab131c800c928513946/test_ll2ctypes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 556, 14886, 67, 2603, 67, 22, 12, 2890, 4672, 7527, 52, 273, 436, 1403, 77, 18, 39, 3817, 14886, 5263, 2668, 3776, 6134, 9607, 273, 436, 1403, 77, 18, 80, 4149, 1174, 2668, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 556, 14886, 67, 2603, 67, 22, 12, 2890, 4672, 7527, 52, 273, 436, 1403, 77, 18, 39, 3817, 14886, 5263, 2668, 3776, 6134, 9607, 273, 436, 1403, 77, 18, 80, 4149, 1174, 2668, ...
@PYan[def ]@PYax[foo](bar): @PYan[pass]
@PY[k][def ]@PY[n+nf][foo](@PY[n][bar]): @PY[k][pass]
@PYan[def ]@PYax[foo](bar): @PYan[pass]
4d385e994dd93f663c8e5897bfa9d153388d863a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6148/4d385e994dd93f663c8e5897bfa9d153388d863a/latex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 632, 16235, 304, 63, 536, 308, 36, 16235, 651, 63, 11351, 29955, 3215, 4672, 632, 16235, 304, 63, 5466, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 632, 16235, 304, 63, 536, 308, 36, 16235, 651, 63, 11351, 29955, 3215, 4672, 632, 16235, 304, 63, 5466, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
implement this functionality
implement this functionality.
def gens(self): """ Placeholder function to return generators of an elliptic curve: derived classes such as EllipticCurve_rational_field implement this functionality
4f0514b45a47cdf92a6d781876aa0dd2f3653f54 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/4f0514b45a47cdf92a6d781876aa0dd2f3653f54/ell_generic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 314, 773, 12, 2890, 4672, 3536, 13022, 4505, 445, 358, 327, 13327, 434, 392, 415, 549, 21507, 8882, 30, 10379, 3318, 4123, 487, 10426, 549, 21507, 9423, 67, 7034, 287, 67, 1518, 2348, 33...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 314, 773, 12, 2890, 4672, 3536, 13022, 4505, 445, 358, 327, 13327, 434, 392, 415, 549, 21507, 8882, 30, 10379, 3318, 4123, 487, 10426, 549, 21507, 9423, 67, 7034, 287, 67, 1518, 2348, 33...
if not modname:
if not modname or '.' in modname:
def search_function(encoding): # Cache lookup entry = _cache.get(encoding, _unknown) if entry is not _unknown: return entry # Import the module: # # First try to find an alias for the normalized encoding # name and lookup the module using the aliased name, then try to # lookup the module using the standard import scheme, i.e. first # try in the encodings package, then at top-level. # norm_encoding = normalize_encoding(encoding) aliased_encoding = _aliases.get(norm_encoding) or \ _aliases.get(norm_encoding.replace('.', '_')) if aliased_encoding is not None: modnames = [aliased_encoding, norm_encoding] else: modnames = [norm_encoding] for modname in modnames: if not modname: continue try: mod = __import__('encodings.' + modname, globals(), locals(), _import_tail) except ImportError: pass else: break else: mod = None try: getregentry = mod.getregentry except AttributeError: # Not a codec module mod = None if mod is None: # Cache misses _cache[encoding] = None return None # Now ask the module for the registry entry entry = getregentry() if not isinstance(entry, codecs.CodecInfo): if not 4 <= len(entry) <= 7: raise CodecRegistryError,\ 'module "%s" (%s) failed to register' % \ (mod.__name__, mod.__file__) if not callable(entry[0]) or \ not callable(entry[1]) or \ (entry[2] is not None and not callable(entry[2])) or \ (entry[3] is not None and not callable(entry[3])) or \ (len(entry) > 4 and entry[4] is not None and not callable(entry[4])) or \ (len(entry) > 5 and entry[5] is not None and not callable(entry[5])): raise CodecRegistryError,\ 'incompatible codecs in module "%s" (%s)' % \ (mod.__name__, mod.__file__) if len(entry)<7 or entry[6] is None: entry += (None,)*(6-len(entry)) + (mod.__name__.split(".", 1)[1],) entry = codecs.CodecInfo(*entry) # Cache the codec registry entry _cache[encoding] = entry # Register its aliases (without overwriting previously registered # aliases) try: codecaliases = mod.getaliases() except AttributeError: pass else: for alias in codecaliases: if not _aliases.has_key(alias): _aliases[alias] = modname # Return the registry entry return entry
eb533353de86df950bf09fa515cb66ec9bd40906 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/eb533353de86df950bf09fa515cb66ec9bd40906/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 67, 915, 12, 5999, 4672, 225, 468, 4379, 3689, 1241, 273, 389, 2493, 18, 588, 12, 5999, 16, 389, 8172, 13, 309, 1241, 353, 486, 389, 8172, 30, 327, 1241, 225, 468, 6164, 326, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 67, 915, 12, 5999, 4672, 225, 468, 4379, 3689, 1241, 273, 389, 2493, 18, 588, 12, 5999, 16, 389, 8172, 13, 309, 1241, 353, 486, 389, 8172, 30, 327, 1241, 225, 468, 6164, 326, 1...
if operation == model[iter][2]: iterc = model.iter_children(iter)
if operation == model[__iter][2]: iterc = model.iter_children(__iter)
def get_operation_options(self, operation): """For the given operation ID, return a list of the selected option IDs.""" r = [] model = self.tree_store.get_model() iter = model.get_iter_root() while iter: #print "debug: get_operation_options: iter id = '%s', value='%s'" % (model[iter][2], model[iter][1]) if operation == model[iter][2]: iterc = model.iter_children(iter) if None == iterc: #print "debug: no children" return None while iterc: tuple = (model[iterc][2], model[iterc][1]) #print "debug: get_operation_options: tuple = '%s'" % (tuple,) r.append(tuple) iterc = model.iter_next(iterc) return r iter = model.iter_next(iter) return None
9d492cae068d04dccea7b824cceed2984729452a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7853/9d492cae068d04dccea7b824cceed2984729452a/GUI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7624, 67, 2116, 12, 2890, 16, 1674, 4672, 3536, 1290, 326, 864, 1674, 1599, 16, 327, 279, 666, 434, 326, 3170, 1456, 7115, 12123, 436, 273, 5378, 938, 273, 365, 18, 3413, 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, 336, 67, 7624, 67, 2116, 12, 2890, 16, 1674, 4672, 3536, 1290, 326, 864, 1674, 1599, 16, 327, 279, 666, 434, 326, 3170, 1456, 7115, 12123, 436, 273, 5378, 938, 273, 365, 18, 3413, 67, ...
e.g. splitFrag("abc and splitFrag("abcdef") = ("abcdef", "")
e.g. splitFragP("abc and splitFragP("abcdef") = ("abcdef", "")
def splitFragP(uriref, punct=0): """split a URI reference before the fragment Punctuation is kept. e.g. splitFrag("abc#def") = ("abc", "#def") and splitFrag("abcdef") = ("abcdef", "") """ i = rfind(uriref, "#") if i>= 0: return uriref[:i], uriref[i:] else: return uriref, ''
86683d9ef5aace84c7bcf2172757a06b9f3fbc5e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/86683d9ef5aace84c7bcf2172757a06b9f3fbc5e/uripath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1416, 19509, 52, 12, 295, 577, 74, 16, 25580, 33, 20, 4672, 3536, 4939, 279, 3699, 2114, 1865, 326, 5481, 225, 453, 15726, 353, 16555, 18, 225, 425, 18, 75, 18, 1416, 19509, 2932, 1894...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1416, 19509, 52, 12, 295, 577, 74, 16, 25580, 33, 20, 4672, 3536, 4939, 279, 3699, 2114, 1865, 326, 5481, 225, 453, 15726, 353, 16555, 18, 225, 425, 18, 75, 18, 1416, 19509, 2932, 1894...
'move_created_ids': [], 'state': 'draft'
'move_lines2' : [], 'move_created_ids' : [], 'move_created_ids2' : [], 'product_lines' : [], 'state': 'draft', 'picking_id': False
def copy(self, cr, uid, id, default=None,context=None): if not default: default = {} default.update({ 'name': self.pool.get('ir.sequence').get(cr, uid, 'mrp.production'), 'move_lines' : [], 'move_created_ids': [], 'state': 'draft' }) return super(mrp_production, self).copy(cr, uid, id, default, context)
bb5d7cf5725bb6642838fc70717cbdc8b540588c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/bb5d7cf5725bb6642838fc70717cbdc8b540588c/mrp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 12, 2890, 16, 4422, 16, 4555, 16, 612, 16, 805, 33, 7036, 16, 2472, 33, 7036, 4672, 309, 486, 805, 30, 805, 273, 2618, 805, 18, 2725, 12590, 296, 529, 4278, 365, 18, 6011, 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, 1610, 12, 2890, 16, 4422, 16, 4555, 16, 612, 16, 805, 33, 7036, 16, 2472, 33, 7036, 4672, 309, 486, 805, 30, 805, 273, 2618, 805, 18, 2725, 12590, 296, 529, 4278, 365, 18, 6011, 18, ...
logLines = file(log, "r").readlines()[-500:] combined = "".join(logLines)
if not isinstance(log, unicode): log = unicode(log, sys.getfilesystemencoding()) f = codecs.open(log, encoding='utf-8', mode="r", errors="ignore") combined = u"".join(f.readlines()[-500:])
def __init__(self, parent, ID, logList, size=wx.DefaultSize, pos=wx.DefaultPosition, style=wx.DEFAULT_DIALOG_STYLE):
2446672daf9ede71c5d70b4c3e2391f912b821ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/2446672daf9ede71c5d70b4c3e2391f912b821ae/Util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 1599, 16, 613, 682, 16, 963, 33, 27226, 18, 1868, 1225, 16, 949, 33, 27226, 18, 1868, 2555, 16, 2154, 33, 27226, 18, 5280, 67, 2565, 18683, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 1599, 16, 613, 682, 16, 963, 33, 27226, 18, 1868, 1225, 16, 949, 33, 27226, 18, 1868, 2555, 16, 2154, 33, 27226, 18, 5280, 67, 2565, 18683, 67...
cr.execute('select uid,res_type,res_id from wkf_instance where id=%s', (instance_id,))
cr.execute('select %s,res_type,res_id from wkf_instance where id=%s', (uid, instance_id,))
def trg_trigger(self, uid, res_type, res_id, cr): cr.execute('select instance_id from wkf_triggers where res_id=%s and model=%s', (res_id,res_type)) res = cr.fetchall() for (instance_id,) in res: cr.execute('select uid,res_type,res_id from wkf_instance where id=%s', (instance_id,)) ident = cr.fetchone() instance.update(cr, instance_id, ident)
64ffe9c6801181ede11dc388610990930d1a0160 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/64ffe9c6801181ede11dc388610990930d1a0160/wkf_service.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27229, 67, 10668, 12, 2890, 16, 4555, 16, 400, 67, 723, 16, 400, 67, 350, 16, 4422, 4672, 4422, 18, 8837, 2668, 4025, 791, 67, 350, 628, 26987, 74, 67, 313, 8060, 1625, 400, 67, 350,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27229, 67, 10668, 12, 2890, 16, 4555, 16, 400, 67, 723, 16, 400, 67, 350, 16, 4422, 4672, 4422, 18, 8837, 2668, 4025, 791, 67, 350, 628, 26987, 74, 67, 313, 8060, 1625, 400, 67, 350,...
ordiff = " or different atomtypes"
ordiff = " or different atomtype"
def bad_valence_explanation(self): #bruce 050806; revised 060703 ####@@@@ use more widely """Return the reason self's valence is bad (as a short text string), or '' if it's not bad. [#e Some callers might want an even shorter string; if so, we'll add an option to ask for that, and perhaps implement it by stripping off " -- " and whatever follows that.] """ # WARNING: keep the code of self.bad_valence() and self.bad_valence_explanation() in sync! bonds = self.bonds if self.element is Singlet: ok = (len(bonds) == 1) return (not ok) and "internal error: open bond with wrong number of bonds" or "" if self.atomtype.numbonds != len(bonds): ok = False return (not ok) and "wrong number of bonds" or "" minv, maxv = self.min_max_actual_valence() # min and max reasonable interpretations of actual valence, based on bond types want_valence = self.atomtype.valence ok = (minv <= want_valence <= maxv) if not ok: if len(self.element.atomtypes) > 1: ordiff = " or different atomtypes" else: ordiff = "" if maxv < want_valence: return "valence too small -- need higher bond orders" + ordiff elif minv > want_valence: return "valence too large -- need lower bond orders" + ordiff else: return "internal error in valence-checking code" else: return "" pass
31348f7eed0f20e9f6c9085a5d3ed19f3d851d70 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/31348f7eed0f20e9f6c9085a5d3ed19f3d851d70/chem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5570, 67, 1125, 802, 67, 338, 15854, 12, 2890, 4672, 468, 2848, 3965, 374, 3361, 3672, 26, 31, 283, 26779, 374, 4848, 27, 4630, 11849, 7, 30989, 30989, 999, 1898, 15481, 2357, 3536, 990,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5570, 67, 1125, 802, 67, 338, 15854, 12, 2890, 4672, 468, 2848, 3965, 374, 3361, 3672, 26, 31, 283, 26779, 374, 4848, 27, 4630, 11849, 7, 30989, 30989, 999, 1898, 15481, 2357, 3536, 990,...
size = 0
size = default_string_size
def GetValidTypeInfos(typename, items=[]): if typename in internal_types: return internal_types[typename] else: result = type_model.match(typename) if result: values = result.groups() if values[0] == "UNSIGNED" and int(values[1]) in [i * 8 for i in xrange(1, 9)]: typeinfos = ("UNS%s"%values[1], None, "uint%s"%values[1], True) elif values[0] == "INTEGER" and int(values[1]) in [i * 8 for i in xrange(1, 9)]: typeinfos = ("INTEGER%s"%values[1], None, "int%s"%values[1], False) elif values[0] == "REAL" and int(values[1]) in (32, 64): typeinfos = ("%s%s"%(values[0], values[1]), None, "real%s"%values[1], False) elif values[0] == "VISIBLE_STRING": size = default_string_size for item in items: size = max(size, len(item)) if values[1] != "": size = max(size, int(values[1])) typeinfos = ("UNS8", size, "visible_string", False) elif values[0] == "DOMAIN": size = 0 for item in items: size = max(size, len(item)) typeinfos = ("UNS8*", size, "domain", False) elif values[0] == "BOOLEAN": typeinfos = ("UNS8", None, "boolean", False) else: raise ValueError, """!!! %s isn't a valid type for CanFestival."""%typename internal_types[typename] = typeinfos else: raise ValueError, """!!! %s isn't a valid type for CanFestival."""%typename return typeinfos
e95fe99abbb027b82659526ae95b36d566696430 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/116/e95fe99abbb027b82659526ae95b36d566696430/gen_cfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 1556, 559, 7655, 12, 12846, 1069, 16, 1516, 33, 8526, 4672, 309, 26735, 316, 2713, 67, 2352, 30, 327, 2713, 67, 2352, 63, 12846, 1069, 65, 469, 30, 563, 273, 618, 67, 2284, 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, 968, 1556, 559, 7655, 12, 12846, 1069, 16, 1516, 33, 8526, 4672, 309, 26735, 316, 2713, 67, 2352, 30, 327, 2713, 67, 2352, 63, 12846, 1069, 65, 469, 30, 563, 273, 618, 67, 2284, 18, ...
ntext = attr.varType == orange.VarTypes.Discrete and attr.values[val] or val
if attr.varType == orange.VarTypes.Discrete: if val < len(attr.values): ntext = attr.values[val] else: ntext = "?" else: ntext = str(val)
def paint(self, painter): btext = str(self.text()) meth, val = self.master.methods.get(btext, (0, None)) if meth: if meth == 2: ntext = self.master.data.domain[btext].varType == orange.VarTypes.Discrete and "major" or "avg" elif meth < 5: ntext = self.master.indiShorts[meth] elif meth: attr = self.master.data.domain[btext] ntext = attr.varType == orange.VarTypes.Discrete and attr.values[val] or val self.setText(btext + " -> " + ntext) painter.font().setBold(meth) QListBoxPixmap.paint(self, painter) if meth: self.setText(btext)
9a17d29a487dbaadf13f997d2af69a0138ecde83 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/9a17d29a487dbaadf13f997d2af69a0138ecde83/OWImpute.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12574, 12, 2890, 16, 21295, 4672, 324, 955, 273, 609, 12, 2890, 18, 955, 10756, 7917, 16, 1244, 273, 365, 18, 7525, 18, 5163, 18, 588, 12, 70, 955, 16, 261, 20, 16, 599, 3719, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12574, 12, 2890, 16, 21295, 4672, 324, 955, 273, 609, 12, 2890, 18, 955, 10756, 7917, 16, 1244, 273, 365, 18, 7525, 18, 5163, 18, 588, 12, 70, 955, 16, 261, 20, 16, 599, 3719, 309, ...
verify(inc(1) == 2)
verify(inc(1) == 11)
def adder(y): return global_nest_x + y
251ef9666e44792a71c5f1cb83c5b1f3b110a46f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/251ef9666e44792a71c5f1cb83c5b1f3b110a46f/test_scope.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 264, 12, 93, 4672, 327, 2552, 67, 30953, 67, 92, 397, 677, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 264, 12, 93, 4672, 327, 2552, 67, 30953, 67, 92, 397, 677, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
hit_hints_displayed = 0
def search_pattern(req, p=None, f=None, colls=None, m=None, hit_hints=0): """Searches for pattern 'p' and field 'f' and returns dict of recIDs HitLists per each collection in 'colls'. - Optionally, the function accepts the match type argument 'm'. If it is set (e.g. from advanced search interface), then it performs this kind of matching. If it is not set, then a guess is made. - Calls search_in_bibwords() and/or search_in_bibxxx() functions. - If hit_hints is set, than print lots of hints on current search. Useful for debugging and/or when search gives zero hits. - Called by main().""" ## create result set: results = HitList() results_used = 0 # not-yet-used flag, to be able to circumvent set operations ## if p is not defined, return all hits in given collections: if not p: results_out = {} for coll in colls: results_out[coll] = HitList() results_out[coll]._set = collrecs_cache[coll]._set results_out[coll]._nbhits = collrecs_cache[coll]._nbhits return results_out ## now we are sure to have some p: good. ## create search units: opft_items = create_opft_search_units(req, p, f, m) #req.write("<p>%s" % opft_items) hit_hints_displayed = 0 # did we already displayed some search hint? ## search regardless of collection: for opft_item in opft_items: results_for_opft_item = {} oi, pi, fi, ti = opft_item[0], opft_item[1], opft_item[2], opft_item[3] # firstly, launch search for this pattern item: if ti == 'a' or ti == 'r': # we are doing either direct bibxxx search or phrase search or regexp search results_for_opft_item = search_in_bibxxx(req, pi, fi, ti) elif ti == 'w': # we are doing bibwords search results_for_opft_item = search_in_bibwords(req, pi, fi) else: print_warning(req, "The search type '%s' is not defined." % ti, "Error") return(1) if hit_hints: results_for_opft_item.calculate_nbhits() if results_for_opft_item._nbhits == 0: hit_hints_displayed = 1 text = "Search term <strong>%s</strong>" % pi if fi: text += " inside <em>%s</em> " % fi print_warning(req, "%s did not match any record. Nearest terms are: %s" % (text, create_nearest_words_links(req.args, pi, fi)), "") if dbg: print_warning(req, "Item <strong>%s:%s</strong> gave %d hits." % (fi, pi, results_for_opft_item._nbhits), "") # secondly, apply the set intersect/union/disjunction functions: if dbg: t1 = os.times()[4] if results_used: if oi == '+': results.intersect(results_for_opft_item) elif oi == '-': results.difference(results_for_opft_item) elif oi == '|': results.union(results_for_opft_item) else: print_warning(req, "Invalid set operation %s." % oi, "Error") else: results = results_for_opft_item results_used = 1 if dbg: t2 = os.times()[4] print_warning(req, "Set operation '%s' took %.2f seconds." % (oi, (t2 - t1)), "Profile") ## return all hits if no collection list specified (useful for WebSearch Admin to determine collection ## recID universe): if colls == None: results.calculate_nbhits() return results ## intersect with collection universe: if dbg: t1 = os.times()[4] results_out = {} if colls: for coll in colls: results_out[coll] = HitList() results_out[coll]._set = Numeric.bitwise_and(results._set, collrecs_cache[coll]._set) if dbg: t2 = os.times()[4] print_warning(req, "Intersecting with collection hitlist universe took %.2f seconds." % ((t2 - t1)), "Profile") ## count number of hits: for coll in colls: results_out[coll].calculate_nbhits() if hit_hints and not hit_hints_displayed: if results._nbhits == 0: # pattern not found in any public/private collection: text = """All search terms matched but boolean query returned no hits. Please combine your search terms differently.""" url_args = req.args for opft_item in opft_items: oi, pi, fi, ti = opft_item[0], opft_item[1], opft_item[2], opft_item[3] url_args_new = re.sub(r'(^|\&)p=.*?(\&|$)', r'\1p='+urllib.quote(pi)+r'\2', url_args) url_args_new = re.sub(r'(^|\&)f=.*?(\&|$)', r'\1f='+urllib.quote(fi)+r'\2', url_args_new) text += """<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="%s/search.py?%s">%s</a> - about %s hits""" % \ (weburl, url_args_new, pi, get_word_nbhits(pi, fi)) print_warning(req, text, "") else: # pattern found but perhaps not in the collections chosen by the user: num = 0 for coll in colls: num += results_out[coll]._nbhits if num == 0: # try to search in Home: results_Home = HitList() results_Home._set = Numeric.bitwise_and(results._set, collrecs_cache[cdsname]._set) results_Home.calculate_nbhits() if results_Home._nbhits > 0: # some hits found in Home, so propose this search: url_args = req.args url_args = re.sub(r'(^|\&)cc=.*?(\&|$)', r'\2', url_args) url_args = re.sub(r'(^|\&)c=.*?(\&[^c]+=|$)', r'\2', url_args) url_args = re.sub(r'^\&+', '', url_args) url_args = re.sub(r'\&+$', '', url_args) print_warning(req, """Matches found in other public collections: <a href="%s/search.py?%s">%d hits</a>.""" % (weburl, url_args, results_Home._nbhits), "") else: # no hits found in Home, recommend different search terms: text = """All search terms matched but boolean query returned no hits. Please combine your search terms differently.""" url_args = req.args for opft_item in opft_items: oi, pi, fi, ti = opft_item[0], opft_item[1], opft_item[2], opft_item[3] url_args_new = re.sub(r'(^|\&)p=.*?(\&|$)', r'\1p='+urllib.quote(pi)+r'\2', url_args) url_args_new = re.sub(r'(^|\&)f=.*?(\&|$)', r'\1f='+urllib.quote(fi)+r'\2', url_args_new) text += """<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="%s/search.py?%s">%s</a> - about %s hits""" % \ (weburl, url_args_new, pi, get_word_nbhits(pi, fi)) print_warning(req, text, "") return results_out
f839501b02b6f1b955e60deafa542ab8007124be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2139/f839501b02b6f1b955e60deafa542ab8007124be/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 67, 4951, 12, 3658, 16, 293, 33, 7036, 16, 284, 33, 7036, 16, 645, 3251, 33, 7036, 16, 312, 33, 7036, 16, 6800, 67, 24598, 33, 20, 4672, 3536, 16294, 364, 1936, 296, 84, 11, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 67, 4951, 12, 3658, 16, 293, 33, 7036, 16, 284, 33, 7036, 16, 645, 3251, 33, 7036, 16, 312, 33, 7036, 16, 6800, 67, 24598, 33, 20, 4672, 3536, 16294, 364, 1936, 296, 84, 11, ...
Can we handle this without having to add the inline?
def visit_image(self, node): """ Need to intervene in the case of inline images. We need MoinMoin to give us the actual src line to the image and then we can feed this to the default html4css1 writer. NOTE: Since the writer can't "open" this image the scale attribute doesn't work without directly specifying the height or width (or both). TODO: Need to handle figures similarly. Can we handle this without having to add the inline? """ uri = node['uri'].lstrip() if uri.startswith('inline:'): self.process_inline(node, 'uri') # If its not a uri containing a ':' then its probably destined for # wiki space. # elif ':' not in uri: # self.process_wiki_target('inline:%s' % (uri)) html4css1.HTMLTranslator.visit_image(self, node)
140a51a76919d72931a4f49d46229d9f62125389 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/140a51a76919d72931a4f49d46229d9f62125389/rst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 2730, 12, 2890, 16, 756, 4672, 3536, 12324, 358, 1554, 3995, 73, 316, 326, 648, 434, 6370, 4602, 18, 1660, 1608, 490, 885, 49, 885, 358, 8492, 584, 326, 3214, 1705, 980, 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, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 2730, 12, 2890, 16, 756, 4672, 3536, 12324, 358, 1554, 3995, 73, 316, 326, 648, 434, 6370, 4602, 18, 1660, 1608, 490, 885, 49, 885, 358, 8492, 584, 326, 3214, 1705, 980, 358,...
for i in range(0, len(initial_rooms)):
for rm in rooms_to_delete:
def save_classroom(self, program): """ Steps for saving a classroom: - Find the previous list of resources - Create a new list of resources - Move over resource assignments - Delete old resources """
f3b5b7f97286580553bc413f4a464b43d8cd7ffc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12041/f3b5b7f97286580553bc413f4a464b43d8cd7ffc/resources.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 1106, 13924, 12, 2890, 16, 5402, 4672, 3536, 7780, 1121, 364, 12392, 279, 667, 13924, 30, 300, 282, 4163, 326, 2416, 666, 434, 2703, 300, 282, 1788, 279, 394, 666, 434, 2703, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 1106, 13924, 12, 2890, 16, 5402, 4672, 3536, 7780, 1121, 364, 12392, 279, 667, 13924, 30, 300, 282, 4163, 326, 2416, 666, 434, 2703, 300, 282, 1788, 279, 394, 666, 434, 2703, ...
button.connect( 'clicked', self.custom_selection_button_clicked)
button.connect('clicked', self.custom_selection_button_clicked, label)
def new( self): if not hasattr( self, 'callback'): self.callback = None
5c7bd2ed7f418e7b0691fe3438c8e724a9d1e731 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12778/5c7bd2ed7f418e7b0691fe3438c8e724a9d1e731/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 12, 365, 4672, 309, 486, 3859, 12, 365, 16, 296, 3394, 11, 4672, 365, 18, 3394, 273, 599, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 12, 365, 4672, 309, 486, 3859, 12, 365, 16, 296, 3394, 11, 4672, 365, 18, 3394, 273, 599, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
info = grabURL(self.url,"GET")
info = grabURL(self.url,"GET", findHTTPAuth = findHTTPAuth)
def runDownloader(self, retry = False): if retry: pos = self.currentSize try: filehandle = file(self.filename,"r+b") filehandle.seek(pos) except: filehandle = file(self.filename,"w+b") self.currentSize = 0 totalSize = self.totalSize pos = 0 if totalSize > 0: filehandle.seek(totalSize-1) filehandle.write(' ') filehandle.seek(0) info = grabURL(self.url,"GET",pos, findHTTPAuth = findHTTPAuth) if info is None and pos > 0: pos = 0 self.currentSize = 0 info = grabURL(self.url,"GET") if info is None: self.state = "failed" self.reasonFailed = "Could not connect to server" return False else: #print "We don't have any INFO..." info = grabURL(self.url,"GET", findHTTPAuth = findHTTPAuth) if info is None: self.state = "failed" self.reasonFailed = "Could not connect to server" return False
51edeae78af17e160e98e10e9059e971b46b195b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/51edeae78af17e160e98e10e9059e971b46b195b/download.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 4164, 6714, 12, 2890, 16, 3300, 273, 1083, 4672, 309, 3300, 30, 949, 273, 365, 18, 2972, 1225, 775, 30, 585, 4110, 273, 585, 12, 2890, 18, 3459, 10837, 86, 15, 70, 7923, 585, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 4164, 6714, 12, 2890, 16, 3300, 273, 1083, 4672, 309, 3300, 30, 949, 273, 365, 18, 2972, 1225, 775, 30, 585, 4110, 273, 585, 12, 2890, 18, 3459, 10837, 86, 15, 70, 7923, 585, 4...
path = path.replace('/', os.sep)
path = self._absnorm(path)
def touch(self, path): """Emulates the UNIX touch command. Creates a file, if it does not exist. Otherwise changes its access and modification times to the current time. Fails if used with the directories or the parent directory of the given file does not exist. """ path = path.replace('/', os.sep) if os.path.isdir(path): raise DataError("Cannot touch '%s' because it is a directory" % path) if not os.path.exists(os.path.dirname(path)): raise DataError("Cannot touch '%s' because its parent directory " "does not exist" % path) if os.path.exists(path): mtime = round(time.time()) os.utime(path, (mtime, mtime)) self._info("Touched existing file '%s'" % path) else: open(path, 'w').close() self._info("Touched new file '%s'" % path)
8394d54a14ff248630063a73df253438178dff53 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7408/8394d54a14ff248630063a73df253438178dff53/OperatingSystem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6920, 12, 2890, 16, 589, 4672, 3536, 1514, 17099, 326, 23160, 6920, 1296, 18, 225, 10210, 279, 585, 16, 309, 518, 1552, 486, 1005, 18, 5272, 3478, 2097, 2006, 471, 11544, 4124, 358, 326,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6920, 12, 2890, 16, 589, 4672, 3536, 1514, 17099, 326, 23160, 6920, 1296, 18, 225, 10210, 279, 585, 16, 309, 518, 1552, 486, 1005, 18, 5272, 3478, 2097, 2006, 471, 11544, 4124, 358, 326,...
users = self._get_saved_user_info(CSV_FILE_DIR, CSV_FILE_NAME)
csv_file_dir = pwd.getpwnam(getpass.getuser()).pw_dir csv_file_dir += os.sep + '.bind10' + os.sep users = self._get_saved_user_info(csv_file_dir, CSV_FILE_NAME)
def login_to_cmdctl(self): '''Login to cmdctl with the username and password inputted from user. After the login is sucessful, the username and password will be saved in 'default_user.csv', when run the next time, username and password saved in 'default_user.csv' will be used first. ''' users = self._get_saved_user_info(CSV_FILE_DIR, CSV_FILE_NAME) for row in users: param = {'username': row[0], 'password' : row[1]} try: response = self.send_POST('/login', param) data = response.read().decode() except socket.error: raise FailToLogin()
6000bb171b66735393843be9a3cb2ab34f01c634 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6792/6000bb171b66735393843be9a3cb2ab34f01c634/bindcmd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3925, 67, 869, 67, 4172, 12930, 12, 2890, 4672, 9163, 5358, 358, 1797, 12930, 598, 326, 2718, 471, 2201, 810, 2344, 628, 729, 18, 7360, 326, 3925, 353, 1597, 614, 2706, 16, 326, 2718, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3925, 67, 869, 67, 4172, 12930, 12, 2890, 4672, 9163, 5358, 358, 1797, 12930, 598, 326, 2718, 471, 2201, 810, 2344, 628, 729, 18, 7360, 326, 3925, 353, 1597, 614, 2706, 16, 326, 2718, ...
+ BasePlugin.manage_options
+ BasePlugin.manage_options
def updLocalRoles(self, path=None, row=None, roles=[], **params): """Update the specified roles.""" if not path: return if not self.localRoles.has_key(path): return if row is not None: try: self.localRoles[path][row]['_roles'] = roles except (IndexError, TypeError): logger.warning("updLocalRoles error updating row %s from %s" % (str(row), str(path)), exc_info=True) return if params: paramKeys = params.keys().sort() for ii in self.localRoles[path]: if sorted(ii.keys()) != paramKeys: continue # both the subcriteria and source dictionary # must have the same set of keys regexes = {} for jj in paramKeys: regexes[jj] = re.compile(ii[jj]) for jj in paramKeys: found = regexes[jj].search(params[jj]) and True or False if not found: break # This doesn't match, so no point in testing more else: # Got here as true, so it matched all, save it ii['_roles'] = roles
658979dd708af1ad2a51acbb78e8a8578ea50bda /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11316/658979dd708af1ad2a51acbb78e8a8578ea50bda/permissions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2166, 2042, 6898, 12, 2890, 16, 589, 33, 7036, 16, 1027, 33, 7036, 16, 4900, 22850, 6487, 2826, 2010, 4672, 3536, 1891, 326, 1269, 4900, 12123, 309, 486, 589, 30, 327, 309, 486, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2166, 2042, 6898, 12, 2890, 16, 589, 33, 7036, 16, 1027, 33, 7036, 16, 4900, 22850, 6487, 2826, 2010, 4672, 3536, 1891, 326, 1269, 4900, 12123, 309, 486, 589, 30, 327, 309, 486, 365, 1...
output = [line for line in odata.split("\n") if line]
output = [line for line in odata.split("\n") if line.find('ERROR')]
def VerifyPackage(self, entry): '''Verify Package status for entry''' if not (entry.get('name') and entry.get('version')): print "Can't verify package, not enough data." return False cmdrc = system("/usr/bin/pkginfo -q -v \"%s\" %s" % (entry.get('version'), entry.get('name'))) if cmdrc != 0: self.CondPrint('debug', "Package %s version incorrect" % entry.get('name')) else: if entry.attrib.get('verify', 'true') == 'true': if self.setup['quick']: return True verp = Popen4("/usr/sbin/pkgchk -n %s" % (entry.get('name')), bufsize=16384) odata = '' vstat = verp.poll() while vstat == -1: odata += verp.fromchild.read() vstat = verp.poll() output = [line for line in odata.split("\n") if line] if vstat == 0: return True else: # if len([name for name in output if name.split()[-1] not in modlist]): # return True # else: self.CondPrint('debug', "Package %s content verification failed" % (entry.get('name'))) return False
5497b58292d88d49fe197fc5bdffbd06d86a348f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/5497b58292d88d49fe197fc5bdffbd06d86a348f/Solaris.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8553, 2261, 12, 2890, 16, 1241, 4672, 9163, 8097, 7508, 1267, 364, 1241, 26418, 309, 486, 261, 4099, 18, 588, 2668, 529, 6134, 471, 1241, 18, 588, 2668, 1589, 26112, 30, 1172, 315, 2568,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8553, 2261, 12, 2890, 16, 1241, 4672, 9163, 8097, 7508, 1267, 364, 1241, 26418, 309, 486, 261, 4099, 18, 588, 2668, 529, 6134, 471, 1241, 18, 588, 2668, 1589, 26112, 30, 1172, 315, 2568,...
reg_info = ioreg_info_dict[name] reg_desc = reg_info.getElements ('DESCRIPTION')[0].getData ()
try: reg_info = ioreg_info_dict[name] try: reg_desc = reg_info.getElements ('DESCRIPTION')[0].getData () except IndexError: reg_desc = '' except KeyError: reg_info = None
def dump_ioregs (root): path = ['AVRPART', 'MEMORY', 'IO_MEMORY'] io_mem = root.getSubTree (path) ioregs = io_mem.getElements () ioreg_info_dict = gather_io_info (root) print ' <ioregisters>' # Skip the first 6 elements since they are just give start and stop # addresses. for ioreg in ioregs[6:]: name = ioreg.name reg_info = ioreg_info_dict[name] reg_desc = reg_info.getElements ('DESCRIPTION')[0].getData () addr = ioreg.getElements ('IO_ADDR')[0].getData () if addr[0] == '$': addr = '0x' + addr[1:] if addr == "NA": addr = ioreg.getElements ('MEM_ADDR')[0].getData () else: # Add 0x20 so all addresses are memory mapped. addr = '0x%02x' % (int (addr, 16) + 0x20) print ' <ioreg name="%s" addr="%s">' % (name, addr) print_wrapped (' ','<description>%s</description>' % (reg_desc)) print ' <alt_name></alt_name>' for i in range (8): bit = 'BIT%d' % (i) bit_el = reg_info.getSubTree ([name, bit]) if bit_el is None: continue bit_name = bit_el.getElements ('NAME')[0].getData () bit_desc = bit_el.getElements ('DESCRIPTION')[0].getData () bit_access = bit_el.getElements ('ACCESS')[0].getData () bit_init_val = bit_el.getElements ('INIT_VAL')[0].getData () print ' <bit_field name="%s"' % (bit_name), print 'bit="%d"' % (i), print 'access="%s"' % (bit_access), print 'init="%s">' % (bit_init_val) if bit_desc: print_wrapped (' ', '<description>%s</description>' % (bit_desc)) print ' <alt_name></alt_name>' print ' </bit_field>' print ' </ioreg>' print ' </ioregisters>'
65496be2031264614c91230d0175c73a76f32ccd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4046/65496be2031264614c91230d0175c73a76f32ccd/Atmel2libc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 67, 77, 479, 564, 261, 3085, 4672, 589, 273, 10228, 5856, 54, 15055, 2187, 296, 24329, 2187, 296, 4294, 67, 24329, 3546, 2527, 67, 3917, 273, 1365, 18, 588, 1676, 2471, 261, 803, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 67, 77, 479, 564, 261, 3085, 4672, 589, 273, 10228, 5856, 54, 15055, 2187, 296, 24329, 2187, 296, 4294, 67, 24329, 3546, 2527, 67, 3917, 273, 1365, 18, 588, 1676, 2471, 261, 803, ...
print "\tS=%.2f" % s
print "S=%.2f" % s
def func(i): s = 0 n = 8e5 h = math.pi/2/n for j in xrange(int(n)): s += math.cos(i*j*h) s = abs(s*h) print "iteration #%i:" % i time.sleep(0.05) print "\tS=%.2f" % s return s
cca7769d1c8f553d026fb80fef74e4ac2bed403c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/696/cca7769d1c8f553d026fb80fef74e4ac2bed403c/symmetric_multi_processing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1326, 12, 77, 4672, 272, 273, 374, 290, 273, 1725, 73, 25, 366, 273, 4233, 18, 7259, 19, 22, 19, 82, 364, 525, 316, 12314, 12, 474, 12, 82, 3719, 30, 272, 1011, 4233, 18, 14445, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1326, 12, 77, 4672, 272, 273, 374, 290, 273, 1725, 73, 25, 366, 273, 4233, 18, 7259, 19, 22, 19, 82, 364, 525, 316, 12314, 12, 474, 12, 82, 3719, 30, 272, 1011, 4233, 18, 14445, 12...
movie.commit()
objectstore.commit()
def add_movie(self, t_movies, t_languages=None, t_tags=None): # remove empty fields (insert default value instead - mostly "NULL") for i in t_movies.keys(): if t_movies[i] == '': t_movies.pop(i) for i in ["color","cond","layers","region","media_num"]: if t_movies[i] == -1: t_movies.pop(i) for i in ["volume_id","collection_id"]: if t_movies.has_key(i) and int(t_movies[i]) == 0: t_movies[i] = None if t_movies.has_key("year") and int(t_movies["year"]) < 1986: t_movies[i] = None
4b0c89054066122c9a487231e3cc72eebb555d01 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2687/4b0c89054066122c9a487231e3cc72eebb555d01/sql.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 8683, 13120, 12, 2890, 16, 268, 67, 8683, 29028, 16, 268, 67, 14045, 33, 7036, 16, 268, 67, 4156, 33, 7036, 4672, 468, 1206, 1008, 1466, 261, 6387, 805, 460, 3560, 300, 23958,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 8683, 13120, 12, 2890, 16, 268, 67, 8683, 29028, 16, 268, 67, 14045, 33, 7036, 16, 268, 67, 4156, 33, 7036, 4672, 468, 1206, 1008, 1466, 261, 6387, 805, 460, 3560, 300, 23958,...
nuninst[arch] = sorted(broken) if len(nuninst[arch]) > 0:
for b in broken: if b not in nuninst[arch]: nuninst[arch].append(b) if len(nuninst[arch]) > len(nuninst_comp[arch]):
def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst()
fa6c1b506f7548b5fdf29486ef79b23c7680b1a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/fa6c1b506f7548b5fdf29486ef79b23c7680b1a2/britney.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 67, 10308, 12, 2890, 16, 5907, 16, 876, 4672, 2870, 273, 5378, 290, 318, 8591, 67, 2919, 273, 365, 18, 588, 67, 82, 318, 8591, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 67, 10308, 12, 2890, 16, 5907, 16, 876, 4672, 2870, 273, 5378, 290, 318, 8591, 67, 2919, 273, 365, 18, 588, 67, 82, 318, 8591, 1435, 2, -100, -100, -100, -100, -100, -100, -100, ...
pass
d = { 'type':'xbmc.python.script', 'summary': 'script summary', 'name': 'MythBox', 'id': 'script.mythbox', 'profile': 'special://profile/addon_data/script.mythbox/', 'path':'/tmp/script.mythbox' } return d.get('id', 'TODO')
def getAddonInfo(self, id): ''' Returns the value of an addon property as a string id : string - id of the property that the module needs to access *Note, choices are (author, changelog, description, disclaimer, fanart. icon, id, name, path profile, stars, summary, type, version) You can use the above as keywords for arguments. example: version = self.Addon.getAddonInfo('version')
7f2668803d8e9e838e320e71a0caf1d3990445d0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12279/7f2668803d8e9e838e320e71a0caf1d3990445d0/xbmcaddon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 27901, 966, 12, 2890, 16, 612, 4672, 9163, 2860, 326, 460, 434, 392, 15466, 1272, 487, 279, 533, 612, 3639, 294, 533, 300, 612, 434, 326, 1272, 716, 326, 1605, 4260, 358, 2006, 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, 336, 27901, 966, 12, 2890, 16, 612, 4672, 9163, 2860, 326, 460, 434, 392, 15466, 1272, 487, 279, 533, 612, 3639, 294, 533, 300, 612, 434, 326, 1272, 716, 326, 1605, 4260, 358, 2006, 22...
return "; ".join(["%s=%s" % (v,k) for v,k in self._cookies[index].iteritems()])
outputDatas = '' for k,v in self._cookies[index].iteritems(): if v: outputDatas += "%s=%s; " % (k,v) else: outputDatas += "%s=none; " % k return outputDatas
def cookies(self, sysop = False): """Return a string containing the user's current cookies.""" self._loadCookies(sysop = sysop) index = self._userIndex(sysop) if self._cookies[index]: return "; ".join(["%s=%s" % (v,k) for v,k in self._cookies[index].iteritems()]) else: return None
19920505ef93268589d63f4f24ce429f800ab7e6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/19920505ef93268589d63f4f24ce429f800ab7e6/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7237, 12, 2890, 16, 2589, 556, 273, 1083, 4672, 3536, 990, 279, 533, 4191, 326, 729, 1807, 783, 7237, 12123, 365, 6315, 945, 16089, 12, 9499, 556, 273, 2589, 556, 13, 770, 273, 365, 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, 7237, 12, 2890, 16, 2589, 556, 273, 1083, 4672, 3536, 990, 279, 533, 4191, 326, 729, 1807, 783, 7237, 12123, 365, 6315, 945, 16089, 12, 9499, 556, 273, 2589, 556, 13, 770, 273, 365, 63...
return matrix_field.Matrix_field_sparse
return matrix_field_sparse.Matrix_field_sparse
def _get_matrix_class(self): K = self.base_ring() if self.is_dense(): if isinstance(K, rational_field.RationalField): return matrix_rational_dense.Matrix_rational_dense if isinstance(K, finite_field.FiniteField_prime_modn) and K.characteristic() <= matrix_modn_dense.MAX_MODULUS: return matrix_modn_dense.Matrix_modn_dense else: return matrix_field.Matrix_field else: if isinstance(K, rational_field.RationalField): #return matrix.Matrix_sparse_rational return matrix_rational_sparse.Matrix_rational_sparse elif sage.rings.number_field.all.is_CyclotomicField(K): return matrix.Matrix_sparse_cyclotomic # TODO: last of the old matrices return matrix_field.Matrix_field_sparse
d657da8c227cc32fe8b468192ffa0d2e35390341 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/d657da8c227cc32fe8b468192ffa0d2e35390341/matrix_space.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 5667, 67, 1106, 12, 2890, 4672, 1475, 273, 365, 18, 1969, 67, 8022, 1435, 309, 365, 18, 291, 67, 25942, 13332, 309, 1549, 12, 47, 16, 436, 8371, 67, 1518, 18, 54, 8371,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 5667, 67, 1106, 12, 2890, 4672, 1475, 273, 365, 18, 1969, 67, 8022, 1435, 309, 365, 18, 291, 67, 25942, 13332, 309, 1549, 12, 47, 16, 436, 8371, 67, 1518, 18, 54, 8371,...
line = line[res.end(0):] return newline + line
pos = res.end(0) return newline + line[pos:]
def mime_decode(line): '''Decode a single line of quoted-printable text to 8bit.''' newline = '' while 1: res = mime_code.search(line) if res is None: break newline = newline + line[:res.start(0)] + \ chr(string.atoi(res.group(1), 16)) line = line[res.end(0):] return newline + line
2da64378fc8910a8cade10d25f8774ca051556f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/2da64378fc8910a8cade10d25f8774ca051556f9/mimify.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4892, 67, 3922, 12, 1369, 4672, 9163, 6615, 279, 2202, 980, 434, 9298, 17, 1188, 429, 977, 358, 1725, 3682, 1093, 6309, 9472, 273, 875, 1323, 404, 30, 400, 273, 4892, 67, 710, 18, 3072...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4892, 67, 3922, 12, 1369, 4672, 9163, 6615, 279, 2202, 980, 434, 9298, 17, 1188, 429, 977, 358, 1725, 3682, 1093, 6309, 9472, 273, 875, 1323, 404, 30, 400, 273, 4892, 67, 710, 18, 3072...
if rsoScalars.GetName(): print "sliceDirection.py: WARNING - ResliceOutput " \ "scalars are named." else: rsoScalars.SetName('ipw_reslice_output')
if rsoScalars: if rsoScalars.GetName(): print "sliceDirection.py: WARNING - ResliceOutput " \ "scalars are named." else: rsoScalars.SetName('ipw_reslice_output')
def addData(self, inputData): """Add inputData as a new layer. """ if inputData is None: raise Exception, "Hallo, the inputData is none. Doing nothing."
05f5911ec5d6632a55e783d373ada29ec4b152d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4494/05f5911ec5d6632a55e783d373ada29ec4b152d9/sliceDirection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21958, 12, 2890, 16, 24149, 4672, 3536, 986, 24149, 487, 279, 394, 3018, 18, 3536, 225, 309, 24149, 353, 599, 30, 1002, 1185, 16, 315, 44, 287, 383, 16, 326, 24149, 353, 6555, 18, 225,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21958, 12, 2890, 16, 24149, 4672, 3536, 986, 24149, 487, 279, 394, 3018, 18, 3536, 225, 309, 24149, 353, 599, 30, 1002, 1185, 16, 315, 44, 287, 383, 16, 326, 24149, 353, 6555, 18, 225,...
leave_event = MouseEvent(x=event.x, y=event.y,
leave_event = MouseEvent(x=event.x, y=event.y,
def _dispatch_stateful_event(self, event, suffix): """ Dispatches a mouse event based on the current event_state. Overrides the default Interactor._dispatch_stateful_event by adding some default behavior to send all events to our contained children. "suffix" is the name of the mouse event as a suffix to the event state name, e.g. "_left_down" or "_window_enter". """
bd271ed92d5497a448e4eeec5aa3686b19867930 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13166/bd271ed92d5497a448e4eeec5aa3686b19867930/container.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10739, 67, 2019, 2706, 67, 2575, 12, 2890, 16, 871, 16, 3758, 4672, 3536, 11552, 281, 279, 7644, 871, 2511, 603, 326, 783, 871, 67, 2019, 18, 225, 531, 9857, 326, 805, 5294, 3362,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10739, 67, 2019, 2706, 67, 2575, 12, 2890, 16, 871, 16, 3758, 4672, 3536, 11552, 281, 279, 7644, 871, 2511, 603, 326, 783, 871, 67, 2019, 18, 225, 531, 9857, 326, 805, 5294, 3362,...
group = transformNode(self.doc, "g", transform="") self.currGroup.appendChild(group)
currGroup, group = self.currGroup, transformNode(self.doc, "g", transform="") currGroup.appendChild(group)
def startGroup(self): if self.verbose: print "+++ begin SVGCanvas.startGroup" group = transformNode(self.doc, "g", transform="") self.currGroup.appendChild(group) self.currGroup = group if self.verbose: print "+++ end SVGCanvas.startGroup"
501bfb04bfdf39c5d6b8bebdade051927b8e7df6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/501bfb04bfdf39c5d6b8bebdade051927b8e7df6/renderSVG.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 1114, 12, 2890, 4672, 309, 365, 18, 11369, 30, 1172, 315, 9904, 15, 2376, 11281, 12971, 18, 1937, 1114, 6, 4306, 1114, 16, 1041, 273, 365, 18, 17016, 1114, 16, 2510, 907, 12, 2890...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 1114, 12, 2890, 4672, 309, 365, 18, 11369, 30, 1172, 315, 9904, 15, 2376, 11281, 12971, 18, 1937, 1114, 6, 4306, 1114, 16, 1041, 273, 365, 18, 17016, 1114, 16, 2510, 907, 12, 2890...
bucketTableName = self.__getTableName( "bucket", typeName )
def regenerateBuckets( self, typeName ): retVal = self._getConnection() if not retVal[ 'OK' ]: return retVal connObj = retVal[ 'Value' ] bucketTableName = self.__getTableName( "bucket", typeName ) rawTableName = self.__getTableName( "type", typeName ) retVal = self.__startTransaction( connObj ) if not retVal[ 'OK' ]: return retVal gLogger.info( "Deleting buckets for %s" % typeName ) retVal = self._update( "DELETE FROM `%s`" % bucketTableName, conn = connObj ) if not retVal[ 'OK' ]: return retVal #Generate the common part of the query #SELECT fields startTimeTableField = "`%s`.startTime" % rawTableName endTimeTableField = "`%s`.endTime" % rawTableName sqlSUMSelectList = [] sqlSelectList = [] for field in self.dbCatalog[ typeName ][ 'keys' ]: sqlSUMSelectList.append( "`%s`.`%s`" % ( rawTableName, field ) ) sqlSelectList.append( "`%s`.`%s`" % ( rawTableName, field ) ) for field in self.dbCatalog[ typeName ][ 'values' ]: sqlSUMSelectList.append( "SUM( `%s`.`%s` )" % ( rawTableName, field ) ) sqlSelectList.append( "`%s`.`%s`" % ( rawTableName, field ) ) sumSelectString = ", ".join( sqlSUMSelectList ) selectString = ", ".join( sqlSelectList ) #Grouping fields sqlGroupList = [] for field in self.dbCatalog[ typeName ][ 'keys' ]: sqlGroupList.append( "`%s`.`%s`" % ( rawTableName, field ) ) groupingString = ", ".join( sqlGroupList ) #List to contain all queries sqlQueries = [] dateInclusiveConditions = [] countedField = "`%s`.`%s`" % ( rawTableName, self.dbCatalog[ typeName ][ 'keys' ][0] ) lastTime = Time.toEpoch() for iRange in range( len( self.dbBucketsLength[ typeName ] ) ): bucketTimeSpan = self.dbBucketsLength[ typeName ][iRange][0] bucketLength = self.dbBucketsLength[ typeName ][iRange][1] startT = lastTime - bucketTimeSpan endT = lastTime lastTime -= bucketTimeSpan bucketizedStart = self.__bucketizeDataField( startTimeTableField, bucketLength ) bucketizedEnd = self.__bucketizeDataField( endTimeTableField, bucketLength ) timeSelectString = "%s, %s" % ( bucketizedStart, bucketizedEnd ) #Is the last bucket? if iRange == len( self.dbBucketsLength[ typeName ] ) -1: whereString = "%s <= %d" % ( endTimeTableField, endT ) else: whereString = "%s > %d AND %s <= %d" % ( startTimeTableField, startT, endTimeTableField, endT ) dateInclusiveConditions.append( "( %s )" % whereString ) groupString = "%s, %s, %s" % ( groupingString, bucketizedStart, bucketizedEnd ) sqlQuery = "SELECT %s, %s, COUNT(%s) FROM `%s` WHERE %s GROUP BY %s" % ( timeSelectString, sumSelectString, countedField, rawTableName, whereString, groupString )
b82c71ef5eaee5196fe71bb607e42f044e971388 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/b82c71ef5eaee5196fe71bb607e42f044e971388/AccountingDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20821, 14517, 12, 365, 16, 8173, 262, 30, 12197, 273, 365, 6315, 588, 1952, 1435, 309, 486, 12197, 63, 296, 3141, 11, 308, 30, 327, 12197, 1487, 2675, 273, 12197, 63, 296, 620, 11, 308...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20821, 14517, 12, 365, 16, 8173, 262, 30, 12197, 273, 365, 6315, 588, 1952, 1435, 309, 486, 12197, 63, 296, 3141, 11, 308, 30, 327, 12197, 1487, 2675, 273, 12197, 63, 296, 620, 11, 308...
return x in ['cc-6-1x1', 'cc-12-2x3', 'cc-18-sq3xsq3', 'cc-18-1x1', 'cc-54-sq3xsq3', 'cc-54-1x1', 'cc-162-1x1']
return x in ['cc6_1x1', 'cc12_2x3', 'cc18_sq3xsq3', 'cc18_1x1', 'cc54_sq3xsq3', 'cc54_1x1', 'cc162_sq3xsq3', 'cc162_1x1']
def valid_kpts(x): if isinstance(x, str): return x in ['cc-6-1x1', 'cc-12-2x3', 'cc-18-sq3xsq3', 'cc-18-1x1', 'cc-54-sq3xsq3', 'cc-54-1x1', 'cc-162-1x1'] x = np.array(x) #empty arg is no good if x.shape == (): return False #monkhorst-pack elif x.shape == (3,) and ((x.dtype == 'int32') or (x.dtype == 'int64')): return True #user-defined list elif x.shape[1] == 3 and (str(x.dtype))[0:7] == 'float64': return True else: return False
e80ef4463e5dbe7a763e17fc667b9f280b9a926f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5735/e80ef4463e5dbe7a763e17fc667b9f280b9a926f/validate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 923, 67, 79, 1092, 12, 92, 4672, 309, 1549, 12, 92, 16, 609, 4672, 327, 619, 316, 10228, 952, 26, 67, 21, 92, 21, 2187, 296, 952, 2138, 67, 22, 92, 23, 2187, 296, 952, 2643, 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, 923, 67, 79, 1092, 12, 92, 4672, 309, 1549, 12, 92, 16, 609, 4672, 327, 619, 316, 10228, 952, 26, 67, 21, 92, 21, 2187, 296, 952, 2138, 67, 22, 92, 23, 2187, 296, 952, 2643, 67, ...
if isinstance(s, StringType): unicode(s, charset.get_output_charset()) elif isinstance(s, UnicodeType): for charset in USASCII, charset, UTF8: try: s = s.encode(charset.get_output_charset()) break except UnicodeError: pass else: assert False, 'Could not encode to utf-8'
if charset <> '8bit': if isinstance(s, StringType): incodec = charset.input_codec or 'us-ascii' ustr = unicode(s, incodec) outcodec = charset.output_codec or 'us-ascii' ustr.encode(outcodec) elif isinstance(s, UnicodeType): for charset in USASCII, charset, UTF8: try: outcodec = charset.output_codec or 'us-ascii' s = s.encode(outcodec) break except UnicodeError: pass else: assert False, 'utf-8 conversion failed'
def append(self, s, charset=None): """Append a string to the MIME header.
67f8f2fe2a93081aaac8ddc1409df4b05daf4fab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/67f8f2fe2a93081aaac8ddc1409df4b05daf4fab/Header.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 12, 2890, 16, 272, 16, 4856, 33, 7036, 4672, 3536, 5736, 279, 533, 358, 326, 13195, 1446, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 12, 2890, 16, 272, 16, 4856, 33, 7036, 4672, 3536, 5736, 279, 533, 358, 326, 13195, 1446, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
'key': user.user_id(),
'key': userkey,
def get(self): user = users.get_current_user() client = gdata.docs.client.DocsClient(source='eveny-nebulae-v1') client.ClientLogin("trinity.testbot@gmail.com", "!@#$qwer", client.source) documents_feed = client.GetDocList(uri='/feeds/default/private/full/-/pending') if user: url = users.create_logout_url(self.request.uri) url_linktext = 'Logout' userkey = user.user_id()
aa9214f26c95d5e9400316ba56c88944fbf2090f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13529/aa9214f26c95d5e9400316ba56c88944fbf2090f/app.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 4672, 225, 729, 273, 3677, 18, 588, 67, 2972, 67, 1355, 1435, 1004, 273, 314, 892, 18, 8532, 18, 2625, 18, 12656, 1227, 12, 3168, 2218, 16728, 93, 17, 4644, 70, 5552, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 4672, 225, 729, 273, 3677, 18, 588, 67, 2972, 67, 1355, 1435, 1004, 273, 314, 892, 18, 8532, 18, 2625, 18, 12656, 1227, 12, 3168, 2218, 16728, 93, 17, 4644, 70, 5552, ...
{"type":tokenTypes["Characters"], "data":"This is a searchable index. Insert your search keywords here: "}) attributes = token["data"].copy()
{"type":tokenTypes["Characters"], "data":prompt}) attributes = token["data"].copy() if "action" in attributes: del attributes["action"] if "prompt" in attributes: del attributes["prompt"]
def startTagIsIndex(self, token): self.parser.parseError("deprecated-tag", {"name": "isindex"}) if self.tree.formPointer: return self.processStartTag(impliedTagToken("form", "StartTag")) self.processStartTag(impliedTagToken("hr", "StartTag")) self.processStartTag(impliedTagToken("p", "StartTag")) self.processStartTag(impliedTagToken("label", "StartTag")) # XXX Localization ... self.processCharacters( {"type":tokenTypes["Characters"], "data":"This is a searchable index. Insert your search keywords here: "}) attributes = token["data"].copy() #don't really need a copy here I think attributes["name"] = "isindex" self.processStartTag(impliedTagToken("input", "StartTag", attributes = attributes, selfClosing = token["selfClosing"])) self.processEndTag(impliedTagToken("label")) self.processEndTag(impliedTagToken("p")) self.processStartTag(impliedTagToken("hr", "StartTag")) self.processEndTag(impliedTagToken("form"))
3020a66862b5c04d850abb6b10186c1a39aee4c9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9368/3020a66862b5c04d850abb6b10186c1a39aee4c9/html5parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 1805, 2520, 1016, 12, 2890, 16, 1147, 4672, 365, 18, 4288, 18, 2670, 668, 2932, 14089, 17, 2692, 3113, 12528, 529, 6877, 315, 291, 1615, 6, 6792, 309, 365, 18, 3413, 18, 687, 4926...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 1805, 2520, 1016, 12, 2890, 16, 1147, 4672, 365, 18, 4288, 18, 2670, 668, 2932, 14089, 17, 2692, 3113, 12528, 529, 6877, 315, 291, 1615, 6, 6792, 309, 365, 18, 3413, 18, 687, 4926...
res.update({"False": "False", "True": "True", "user.id": "User"})
res.update({"False": "False", "True": "True", "User": "user.id"})
def _operand_get(self, cursor, user, obj_name='', level=3, recur=None, root_tech='', root=''): res = {} if not obj_name: obj_name = 'res.user' res.update({"False": "False", "True": "True", "user.id": "User"}) if not recur: recur = [] obj_fields = self.pool.get(obj_name).fields_get(cursor, user) key = obj_fields.keys() key.sort() for k in key:
415dc27e454010c170b6149badf91be14854a28f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/415dc27e454010c170b6149badf91be14854a28f/rule.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4063, 464, 67, 588, 12, 2890, 16, 3347, 16, 729, 16, 1081, 67, 529, 2218, 2187, 1801, 33, 23, 16, 8112, 33, 7036, 16, 1365, 67, 28012, 2218, 2187, 1365, 2218, 11, 4672, 400, 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, 389, 4063, 464, 67, 588, 12, 2890, 16, 3347, 16, 729, 16, 1081, 67, 529, 2218, 2187, 1801, 33, 23, 16, 8112, 33, 7036, 16, 1365, 67, 28012, 2218, 2187, 1365, 2218, 11, 4672, 400, 273...
return replacement
return debug_info_replacement
def replacement(self, **form): try: if 'debugcount' not in form: raise ValueError('You must provide a debugcount parameter') debugcount = form.pop('debugcount') try: debugcount = int(debugcount) except ValueError: raise ValueError('Bad value for debugcount') if debugcount not in self.debug_infos: raise ValueError('Debug %s no longer found (maybe it has expired?)' % debugcount) debug_info = self.debug_infos[debugcount] return func(self, debug_info=debug_info, **form) except ValueError, e: form['headers']['status'] = '500 Server Error' return '<html>There was an error: %s</html>' % e
d0441ff28d999e1ade91f96ba9f46dc821fc0f2d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11400/d0441ff28d999e1ade91f96ba9f46dc821fc0f2d/middleware.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6060, 12, 2890, 16, 2826, 687, 4672, 775, 30, 309, 296, 4148, 1883, 11, 486, 316, 646, 30, 1002, 2068, 2668, 6225, 1297, 5615, 279, 1198, 1883, 1569, 6134, 1198, 1883, 273, 646, 18, 51...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6060, 12, 2890, 16, 2826, 687, 4672, 775, 30, 309, 296, 4148, 1883, 11, 486, 316, 646, 30, 1002, 2068, 2668, 6225, 1297, 5615, 279, 1198, 1883, 1569, 6134, 1198, 1883, 273, 646, 18, 51...
tz_value = _strptime.strptime("PDT", "%Z")[8]
tz_value = _strptime.strptime(tz_name, "%Z")[8]
def test_bad_timezone(self): # Explicitly test possibility of bad timezone; # when time.tzname[0] == time.tzname[1] and time.daylight if sys.platform == "mac": return #MacOS9 has severely broken timezone support. try: original_tzname = time.tzname original_daylight = time.daylight time.tzname = ("PDT", "PDT") time.daylight = 1 tz_value = _strptime.strptime("PDT", "%Z")[8] self.failUnlessEqual(tz_value, -1) finally: time.tzname = original_tzname time.daylight = original_daylight
73cb9cf18ef43f0249d6cf8e9a816681aea3a7c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/73cb9cf18ef43f0249d6cf8e9a816681aea3a7c8/test_strptime.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 8759, 67, 12690, 12, 2890, 4672, 468, 24321, 715, 1842, 25547, 434, 5570, 6371, 31, 468, 1347, 813, 18, 12994, 529, 63, 20, 65, 422, 813, 18, 12994, 529, 63, 21, 65, 471, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 8759, 67, 12690, 12, 2890, 4672, 468, 24321, 715, 1842, 25547, 434, 5570, 6371, 31, 468, 1347, 813, 18, 12994, 529, 63, 20, 65, 422, 813, 18, 12994, 529, 63, 21, 65, 471, 8...
res = res + cast[imag.typecode()](1j)*imag
try: res = res + _unit_imag[imag.typecode()] * imag except KeyError: res = res + 1j*imag
def _parse_mimatrix(fid,bytes): dclass, cmplx, nzmax =_parse_array_flags(fid) dims = _get_element(fid)[0] name = ''.join(asarray(_get_element(fid)[0]).astype('c')) tupdims = tuple(dims[::-1]) if dclass in mxArrays: result, unused =_get_element(fid) if type == mxCHAR_CLASS: result = ''.join(asarray(result).astype('c')) else: if cmplx: imag, unused =_get_element(fid) result = result + cast[imag.typecode()](1j) * imag result = squeeze(transpose(reshape(result,tupdims))) elif dclass == mxCELL_CLASS: length = product(dims) result = zeros(length, PyObject) for i in range(length): sa, unused = _get_element(fid) result[i]= sa result = squeeze(transpose(reshape(result,tupdims))) if rank(result)==0: result = result.toscalar() elif dclass == mxSTRUCT_CLASS: length = product(dims) result = zeros(length, PyObject) namelength = _get_element(fid)[0] # get field names names = _get_element(fid)[0] splitnames = [names[i:i+namelength] for i in \ xrange(0,len(names),namelength)] fieldnames = [''.join(asarray(x).astype('c')).strip('\x00') for x in splitnames] for i in range(length): result[i] = mat_struct() for element in fieldnames: val,unused = _get_element(fid) result[i].__dict__[element] = val result = squeeze(transpose(reshape(result,tupdims))) if rank(result)==0: result = result.toscalar() # object is like a structure with but with a class name elif dclass == mxOBJECT_CLASS: class_name = ''.join(asarray(_get_element(fid)[0]).astype('c')) length = product(dims) result = zeros(length, PyObject) namelength = _get_element(fid)[0] # get field names names = _get_element(fid)[0] splitnames = [names[i:i+namelength] for i in \ xrange(0,len(names),namelength)] fieldnames = [''.join(asarray(x).astype('c')).strip('\x00') for x in splitnames] for i in range(length): result[i] = mat_obj() result[i]._classname = class_name for element in fieldnames: val,unused = _get_element(fid) result[i].__dict__[element] = val result = squeeze(transpose(reshape(result,tupdims))) if rank(result)==0: result = result.toscalar() elif dclass == mxSPARSE_CLASS: rowind, unused = _get_element(fid) colind, unused = _get_element(fid) res, unused = _get_element(fid) if cmplx: imag, unused = _get_element(fid) res = res + cast[imag.typecode()](1j)*imag if have_sparse: spmat = scipy.sparse.csc_matrix(res, (rowind[:len(res)], colind), M=dims[0],N=dims[1]) result = spmat else: result = (dims, rowind, colind, res) return result, name
82336923e46646b284fc869728411818f823ced2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/82336923e46646b284fc869728411818f823ced2/mio.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 81, 381, 1942, 12, 27268, 16, 3890, 4672, 302, 1106, 16, 5003, 412, 92, 16, 15062, 1896, 273, 67, 2670, 67, 1126, 67, 7133, 12, 27268, 13, 9914, 273, 389, 588, 67, 295...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 81, 381, 1942, 12, 27268, 16, 3890, 4672, 302, 1106, 16, 5003, 412, 92, 16, 15062, 1896, 273, 67, 2670, 67, 1126, 67, 7133, 12, 27268, 13, 9914, 273, 389, 588, 67, 295...
value += self._safe_read(amt)
value.append(self._safe_read(amt))
def _read_chunked(self, amt): assert self.chunked != _UNKNOWN chunk_left = self.chunk_left value = b""
1a95b47e43d223629375829a9ba19835213e394a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/1a95b47e43d223629375829a9ba19835213e394a/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 6551, 329, 12, 2890, 16, 25123, 4672, 1815, 365, 18, 6551, 329, 480, 389, 14737, 2441, 67, 4482, 273, 365, 18, 6551, 67, 4482, 460, 273, 324, 3660, 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, 389, 896, 67, 6551, 329, 12, 2890, 16, 25123, 4672, 1815, 365, 18, 6551, 329, 480, 389, 14737, 2441, 67, 4482, 273, 365, 18, 6551, 67, 4482, 460, 273, 324, 3660, 2, -100, -100, -100, ...
def __findSubdirByMeta(self,meta,value,subdirFlag=True):
def __findSubdirByMeta( self, meta, value, subdirFlag = True ):
def __findSubdirByMeta(self,meta,value,subdirFlag=True): """ Find directories for the given meta datum. If the the meta datum type is a list, combine values in OR. In case the meta datum is 'Any', finds all the subdirectories for which the meta datum is defined at all. """ if type(value) == types.DictType: selectList = [] for operation,operand in value.items(): if operation in ['>','<','>=','<=']: if type(operand) == types.ListType: return S_ERROR('Illegal query: list of values for comparison operation') if type(operand) in [types.IntType,types.LongType]: selectList.append( "Value%s%d" % (operation,operand) ) elif type(operand) == types.FloatType: selectList.append( "Value%s%f" % (operation,operand) ) else: selectList.append( "Value%s'%s'" % (operation,operand) ) elif operation == 'in' or operation == "=": if type(operand) == types.ListType: vString = ','.join( [ "'"+str(x)+"'" for x in operand] ) selectList.append("Value IN (%s)" % vString) else: selectList.append("Value='%s'" % operand ) elif operation == 'nin' or operation == "!=": if type(operand) == types.ListType: vString = ','.join( [ "'"+str(x)+"'" for x in operand] ) selectList.append("Value NOT IN (%s)" % vString) else: selectList.append("Value!='%s'" % operand ) selectString = ' AND '.join(selectList) req = " SELECT DirID FROM FC_Meta_%s WHERE %s" % (meta,selectString) elif type(value) == types.ListType: vString = ','.join( [ "'"+str(x)+"'" for x in value] ) req = " SELECT DirID FROM FC_Meta_%s WHERE Value IN (%s) " % (meta,vString) else: if value == "Any": req = " SELECT DirID FROM FC_Meta_%s " % meta else: req = " SELECT DirID FROM FC_Meta_%s WHERE Value='%s' " % (meta,value) print req result = self._query(req) if not result['OK']: return result if not result['Value']: return S_OK([]) dirList = [] for row in result['Value']: dirID = row[0] dirList.append(dirID) if subdirFlag: result = self.dtree.getSubdirectoriesByID(dirID) if not result['OK']: return result dirList += result['Value'] return S_OK(dirList)
127f98379e5064d0a5d5df2ba7ce74c780770faa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/127f98379e5064d0a5d5df2ba7ce74c780770faa/DirectoryMetadata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4720, 1676, 1214, 858, 2781, 12, 365, 16, 2191, 16, 460, 16, 16921, 4678, 273, 1053, 262, 30, 3536, 4163, 6402, 364, 326, 864, 2191, 12059, 18, 971, 326, 326, 2191, 12059, 618, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4720, 1676, 1214, 858, 2781, 12, 365, 16, 2191, 16, 460, 16, 16921, 4678, 273, 1053, 262, 30, 3536, 4163, 6402, 364, 326, 864, 2191, 12059, 18, 971, 326, 326, 2191, 12059, 618, 3...
class BasicPasswordManager(object):
class BasicPasswordManager(urllib2.HTTPPasswordMgr):
def _getPathsToSearch(self, urlStr, suffixes): url = laUrl(urlStr)
b657130cf1c67f6da5b037b3909be8003264d29d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8747/b657130cf1c67f6da5b037b3909be8003264d29d/lookaside.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 4466, 774, 2979, 12, 2890, 16, 25185, 16, 18333, 4672, 880, 273, 7125, 1489, 12, 718, 1585, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 4466, 774, 2979, 12, 2890, 16, 25185, 16, 18333, 4672, 880, 273, 7125, 1489, 12, 718, 1585, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
wikipedia.output(u'No changes necessary: references tags found.')
wikipedia.output(u'No changes necessary: references tag found.')
def needsTreatment(self, page): # Show the title of the page we're working on. # Highlight the title in purple. wikipedia.output(u"\n\n>>> \03{lightpurple}%s\03{default} <<<" % page.title()) try: oldText = page.get() oldTextCleaned = wikipedia.removeDisabledParts(oldText) if not self.refR.search(oldTextCleaned): wikipedia.output(u'No changes necessary: no ref tags found.') return False elif self.referencesR.search(oldTextCleaned): wikipedia.output(u'No changes necessary: references tags found.') return False else: for template in page.templates(): if template in self.referencesTemplates: wikipedia.output(u'No changes necessary: references template found.') return False wikipedia.output(u'Found ref without references.') return True except wikipedia.NoPage: wikipedia.output(u"Page %s does not exist?!" % page.aslink()) except wikipedia.IsRedirectPage: wikipedia.output(u"Page %s is a redirect; skipping." % page.aslink()) except wikipedia.LockedPage: wikipedia.output(u"Page %s is locked?!" % page.aslink()) return False
4f9a5c4c9ef35c7118dc79dc3fea9534ca34feaa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/4f9a5c4c9ef35c7118dc79dc3fea9534ca34feaa/noreferences.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4260, 56, 6150, 475, 12, 2890, 16, 1363, 4672, 468, 9674, 326, 2077, 434, 326, 1363, 732, 4565, 5960, 603, 18, 468, 31386, 326, 2077, 316, 5405, 1802, 18, 21137, 18, 2844, 12, 89, 1269...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4260, 56, 6150, 475, 12, 2890, 16, 1363, 4672, 468, 9674, 326, 2077, 434, 326, 1363, 732, 4565, 5960, 603, 18, 468, 31386, 326, 2077, 316, 5405, 1802, 18, 21137, 18, 2844, 12, 89, 1269...
return S_ERROR('Parameter not found') else: return S_ERROR('Failed to access database')
return S_ERROR( 'Parameter not found' ) else: return S_ERROR( 'Failed to access database' )
def getJobOptParameter(self,jobID,parameter): """ Get optimizer parameters for the given job. """
99c1bc850ba087890925b3180df206f65bb1d4b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/99c1bc850ba087890925b3180df206f65bb1d4b3/JobDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13024, 6179, 1662, 12, 2890, 16, 4688, 734, 16, 6775, 4672, 3536, 968, 13066, 1472, 364, 326, 864, 1719, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13024, 6179, 1662, 12, 2890, 16, 4688, 734, 16, 6775, 4672, 3536, 968, 13066, 1472, 364, 326, 864, 1719, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
parser.add_option("-l", "--user", action="store", dest="user",
optgrp.add_option("-S", action="store_true", dest="maxrc", help="return the largest of command return codes") optgrp.add_option("-b", "--dshbak", action="store_true", dest="gather", help="display results in a dshbak-like way") parser.add_option_group(optgrp) optgrp = optparse.OptionGroup(parser, "File copying") optgrp.add_option("-c", "--copy", action="store", dest="source_path", help="copy local file or directory to the nodes") optgrp.add_option("--dest", action="store", dest="dest_path", help="destination file or directory on the nodes") parser.add_option_group(optgrp) optgrp = optparse.OptionGroup(parser, "Ssh options") optgrp.add_option("-l", "--user", action="store", dest="user",
def clush_main(args): """Main clush script function""" # Default values nodeset_base, nodeset_exclude = NodeSet(), NodeSet() # # Argument management # usage = "%prog [options] command" parser = optparse.OptionParser(usage, version="%%prog %s" % version) parser.disable_interspersed_args() # Node selections optgrp = optparse.OptionGroup(parser, "Selecting target nodes") optgrp.add_option("-w", action="store", dest="nodes", help="nodes where to run the command") optgrp.add_option("-x", action="store", dest="exclude", help="exclude nodes from the node list") optgrp.add_option("-a", "--all", action="store_true", dest="nodes_all", help="run command on all nodes") optgrp.add_option("-g", "--group", action="store", dest="group", help="run command on a group of nodes") parser.add_option_group(optgrp) parser.add_option("-q", "--quiet", action="store_true", dest="quiet", help="be quiet, print essential output only") parser.add_option("-v", "--verbose", action="store_true", dest="verbose", help="be verbose, print informative messages") parser.add_option("-d", "--debug", action="store_true", dest="debug", help="output more messages for debugging purpose") parser.add_option("-N", action="store_false", dest="label", default=True, help="disable labeling of command line") parser.add_option("-l", "--user", action="store", dest="user", help="execute remote command as user") parser.add_option("-S", action="store_true", dest="maxrc", help="return the largest of command return codes") parser.add_option("-b", "--dshbak", action="store_true", dest="gather", help="display results in a dshbak-like way") # Copy parser.add_option("-c", "--copy", action="store", dest="source_path", help="copy local file or directory to the nodes") parser.add_option("--dest", action="store", dest="dest_path", help="destination file or directory on the nodes") parser.add_option("-f", "--fanout", action="store", dest="fanout", help="use a specified fanout", type="int") # Timeouts parser.add_option("-t", "--connect_timeout", action="store", dest="connect_timeout", help="limit time to connect to a node" ,type="int") parser.add_option("-u", "--command_timeout", action="store", dest="command_timeout", help="limit time for command to run on the node", type="int") (options, args) = parser.parse_args() # # Load config file # config = ClushConfig(options) # Apply command line overrides if options.quiet: config.set_main("verbosity", VERB_QUIET) if options.verbose: config.set_main("verbosity", VERB_VERB) if options.debug: config.set_main("verbosity", VERB_DEBUG) if options.fanout: config.set_main("fanout", overrides.fanout) if options.user: self.set_main("ssh_user", overrides.user) if options.connect_timeout: self.set_main("connect_timeout", overrides.connect_timeout) if options.command_timeout: self.set_main("command_timeout", overrides.command_timeout) # # Compute the nodeset # nodeset_base = NodeSet(options.nodes) nodeset_exclude = NodeSet(options.exclude) # Do we have nodes group? task = task_self() task.set_info("debug", config.get_verbosity() > 1) if options.nodes_all: command = config.get_nodes_all_command() task.shell(command, key="all") if options.group: command = config.get_nodes_group_command(options.group) task.shell(command, key="group") # Run needed external commands task.resume() for buf, keys in task.iter_buffers(): for line in buf.splitlines(): config.verbose_print(DEBUG, "Nodes from option %s: %s" % (','.join(keys), buf)) nodeset_base.add(line) # Do we have an exclude list? (-x ...) nodeset_base.difference_update(nodeset_exclude) if len(nodeset_base) < 1: parser.error('No node to run on.') config.verbose_print(VERB_DEBUG, "Final NodeSet is %s" % nodeset_base) # # Task management # stdin_isatty = sys.stdin.isatty() if stdin_isatty: # Standard input is a terminal and we want to perform some user # interactions in the main thread (using blocking calls), so # we run cluster commands in a new ClusterShell Task (a new # thread is created). task = Task() signal.signal(signal.SIGHUP, signal_handler) task.set_info("USER_handle_SIGHUP", True) else: # Perform everything in main thread. task.set_info("USER_handle_SIGHUP", False) timeout = 0 task.set_info("debug", config.get_verbosity() >= VERB_DEBUG) task.set_info("fanout", config.get_fanout() * 2) ssh_user = config.get_ssh_user() if ssh_user: task.set_info("ssh_user", ssh_user) ssh_path = config.get_ssh_path() if ssh_path: task.set_info("ssh_path", ssh_path) ssh_options = config.get_ssh_options() if ssh_options: task.set_info("ssh_options", ssh_options) connect_timeout = config.get_connect_timeout() task.set_info("connect_timeout", connect_timeout) timeout += connect_timeout command_timeout = config.get_command_timeout() task.set_info("command_timeout", command_timeout) if connect_timeout < 1e-3 or command_timeout < 1e-3: timeout = 0 else: timeout += command_timeout # Configure custom task related status task.set_info("USER_interactive", len(args) == 0 and not options.source_path) task.set_info("USER_running", False) if options.source_path and not options.dest_path: options.dest_path = options.source_path if options.source_path: if not options.dest_path: options.dest_path = options.source_path op = "copy source=%s dest=%s" % (options.source_path, options.dest_path) else: op = "command=\"%s\"" % ' '.join(args) config.verbose_print(VERB_VERB, "clush: nodeset=%s fanout=%d [timeout conn=%d " \ "cmd=%d] %s" % (nodeset_base, task.info("fanout")/2, task.info("connect_timeout"), task.info("command_timeout"), op)) if not task.info("USER_interactive"): if options.source_path: if not options.dest_path: options.dest_path = options.source_path run_copy(task, options.source_path, options.dest_path, nodeset_base, 0) else: run_command(task, ' '.join(args), nodeset_base, options.gather, timeout, options.label, config.get_verbosity()) if stdin_isatty: ttyloop(task, nodeset_base, options.gather, timeout, options.label, config.get_verbosity()) elif task.info("USER_interactive"): print >>sys.stderr, "ERROR: interactive mode requires a tty" os_.exit(1) # return the command retcode if options.maxrc: os._exit(task.max_retcode()) # return clush retcode else: os._exit(0)
96d07ce6e79c549159c502f12c931c42463ef2de /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11479/96d07ce6e79c549159c502f12c931c42463ef2de/clush.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 927, 1218, 67, 5254, 12, 1968, 4672, 3536, 6376, 927, 1218, 2728, 445, 8395, 225, 468, 2989, 924, 2199, 278, 67, 1969, 16, 2199, 278, 67, 10157, 273, 2029, 694, 9334, 2029, 694, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 927, 1218, 67, 5254, 12, 1968, 4672, 3536, 6376, 927, 1218, 2728, 445, 8395, 225, 468, 2989, 924, 2199, 278, 67, 1969, 16, 2199, 278, 67, 10157, 273, 2029, 694, 9334, 2029, 694, 1435, ...
self.smtpServer[email.server_id.id].sendmail(str(email.server_id.email), email.to, tools.ustr(email.serialized_message))
msg= self._set_error(cr, uid, email.server_id.id, context) if msg in error_msg.keys(): queue.write(cr, uid, [email.id], {'error':error_msg[msg], 'state':'error'}) continue else: self.smtpServer[email.server_id.id].sendmail(str(email.server_id.email), email.to, tools.ustr(email.serialized_message))
def _send_emails(self, cr, uid, ids, context={}): fp = os.popen('ping www.google.com -c 1 -w 5',"r") if not fp.read(): return False queue = self.pool.get('email.smtpclient.queue') history = self.pool.get('email.smtpclient.history') queue.write(cr, uid, ids, {'state':'sending'}) error = [] sent = [] remove = [] open_server = [] for email in queue.browse(cr, uid, ids):
f0013a2bab5b38545f27bdafa1ba5cf23c99024c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/f0013a2bab5b38545f27bdafa1ba5cf23c99024c/smtpclient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4661, 67, 22762, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 4253, 273, 1140, 18, 84, 3190, 2668, 1382, 8765, 18, 9536, 18, 832, 300, 71, 404, 300, 91, 1381, 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, 389, 4661, 67, 22762, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 4253, 273, 1140, 18, 84, 3190, 2668, 1382, 8765, 18, 9536, 18, 832, 300, 71, 404, 300, 91, 1381, 2...
log.debug("Started process %s" % self.pname)
log.debug("Started process %s: %s" % (self.pname, " ".join(self.cmd)))
def __init__(self, cmd, expect=EXPECT_EXIT_OK, drain=True): """Run cmd (should be a list of arguments) expect - if set verify expectation at end of test. drain - if true (default) drain stdout/stderr to files. """ if type(cmd) is type(""): cmd = [cmd] # Make it a list. self.cmd = [ str(x) for x in cmd ] popen2.Popen3.__init__(self, self.cmd, True) self.expect = expect self.pname = "%s-%d" % (os.path.split(self.cmd[0])[-1], self.pid) msg = "Process %s" % self.pname self.stdin = ExceptionWrapper(self.tochild, msg) self.stdout = Popen.OutStream(self.fromchild, self.outfile("out"), msg) self.stderr = Popen.OutStream(self.childerr, self.outfile("err"), msg) f = file(self.outfile("cmd"), "w") try: f.write(self.cmd_str()) finally: f.close() log.debug("Started process %s" % self.pname) if drain: self.drain()
3e3df38f1e52c70022c8b8d12e88f5772a29641f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/197/3e3df38f1e52c70022c8b8d12e88f5772a29641f/brokertest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1797, 16, 4489, 33, 2294, 1423, 1268, 67, 28682, 67, 3141, 16, 15427, 33, 5510, 4672, 3536, 1997, 1797, 261, 13139, 506, 279, 666, 434, 1775, 13, 4489, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1797, 16, 4489, 33, 2294, 1423, 1268, 67, 28682, 67, 3141, 16, 15427, 33, 5510, 4672, 3536, 1997, 1797, 261, 13139, 506, 279, 666, 434, 1775, 13, 4489, 3...
_("Numeric entity couldn't be converted to character.")})
_("Numeric entity couldn't be converted to character (codepoint: U+%08x).") % charAsInt}) else: char = u"\uFFFD" self.tokenQueue.append({"type": "ParseError", "data": _("Numeric entity represents an illegal codepoint: U+%08x.") % charAsInt})
def consumeNumberEntity(self, isHex): """This function returns either U+FFFD or the character based on the decimal or hexadecimal representation. It also discards ";" if present. If not present self.tokenQueue.append({"type": "ParseError"}) is invoked. """
3b3d37440d70ae4e98b98ada10860ecb71ad4bd2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10463/3b3d37440d70ae4e98b98ada10860ecb71ad4bd2/tokenizer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7865, 1854, 1943, 12, 2890, 16, 353, 7037, 4672, 3536, 2503, 445, 1135, 3344, 587, 15, 2246, 16894, 578, 326, 3351, 2511, 603, 326, 6970, 578, 20070, 4335, 18, 2597, 2546, 10388, 87, 114...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7865, 1854, 1943, 12, 2890, 16, 353, 7037, 4672, 3536, 2503, 445, 1135, 3344, 587, 15, 2246, 16894, 578, 326, 3351, 2511, 603, 326, 6970, 578, 20070, 4335, 18, 2597, 2546, 10388, 87, 114...
phiarray = n.empty((len(bandpasslist), len(bandpasslist[0].phi)), dtype='float')
phiarray = n.empty((len(bandpasslist), len(bandpasslist[0].wavelen)), dtype='float')
def setupPhiArray(self, bandpasslist): """Sets up a 2-d numpy phi array from bandpasslist suitable for input to manyMagCalc.
6368bc9141344c53f05c743661f18e35eea1ff29 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/91/6368bc9141344c53f05c743661f18e35eea1ff29/Sed.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 31905, 1076, 12, 2890, 16, 8937, 5466, 1098, 4672, 3536, 2785, 731, 279, 576, 17, 72, 3972, 7706, 526, 628, 8937, 5466, 1098, 10631, 364, 810, 358, 4906, 11372, 25779, 18, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3875, 31905, 1076, 12, 2890, 16, 8937, 5466, 1098, 4672, 3536, 2785, 731, 279, 576, 17, 72, 3972, 7706, 526, 628, 8937, 5466, 1098, 10631, 364, 810, 358, 4906, 11372, 25779, 18, 2, -100,...
def get_alphabetically_ordered_collection_list(level=0):
def get_alphabetically_ordered_collection_list(level=0, ln=cdslang):
def get_alphabetically_ordered_collection_list(level=0): """Returns nicely ordered (score respected) list of collections, more exactly list of tuples (collection name, printable collection name). Suitable for create_search_box().""" out = [] query = "SELECT id,name FROM collection ORDER BY name ASC" res = run_sql(query) for c_id, c_name in res: # make a nice printable name (e.g. truncate c_printable for for long collection names): if len(c_name)>30: c_printable = c_name[:30] + "..." else: c_printable = c_name if level: c_printable = " " + level * '-' + " " + c_printable out.append([c_name, c_printable]) return out
52e97757d0b9b7898bdc5d9d4e74647b1dbff5ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2139/52e97757d0b9b7898bdc5d9d4e74647b1dbff5ca/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 287, 8907, 6478, 67, 9885, 67, 5548, 67, 1098, 12, 2815, 33, 20, 16, 7211, 33, 4315, 2069, 539, 4672, 3536, 1356, 11562, 2357, 5901, 261, 6355, 400, 1789, 13, 666, 434, 6980, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 287, 8907, 6478, 67, 9885, 67, 5548, 67, 1098, 12, 2815, 33, 20, 16, 7211, 33, 4315, 2069, 539, 4672, 3536, 1356, 11562, 2357, 5901, 261, 6355, 400, 1789, 13, 666, 434, 6980, ...
parser.add_option("-a", "--account-name", type="string", dest="account_name", help="The account name from which to read account settings. Corresponds to section Account_NAME in the configuration file.")
parser.add_option("-a", "--account-name", type="string", dest="account_name", help="The name of the account to use.")
def _NH_SCEngineGotException(self, notification): self.output.put('An exception occured within the SIP core:\n'+notification.data.traceback)
00e4b910a24065a9280d35c46aae6f5f73364490 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5703/00e4b910a24065a9280d35c46aae6f5f73364490/sip_register.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 50, 44, 67, 2312, 4410, 15617, 503, 12, 2890, 16, 3851, 4672, 365, 18, 2844, 18, 458, 2668, 979, 1520, 16206, 3470, 326, 348, 2579, 2922, 5581, 82, 11, 15, 9927, 18, 892, 18, 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, 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, 50, 44, 67, 2312, 4410, 15617, 503, 12, 2890, 16, 3851, 4672, 365, 18, 2844, 18, 458, 2668, 979, 1520, 16206, 3470, 326, 348, 2579, 2922, 5581, 82, 11, 15, 9927, 18, 892, 18, 21...
psfClumpIxx, psfClumIxy, psfClumpIyy = IzzMin, 0, IzzMin
psfClumpIxx, psfClumpIxy, psfClumpIyy = IzzMin, 0, IzzMin
def goodPsfCandidate(source): """Should this object be included in the Ixx v. Iyy image?"""
7cf529eed24b34c640f1e4bd8ab65b773e9f961f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6523/7cf529eed24b34c640f1e4bd8ab65b773e9f961f/MeasureSources.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7494, 18124, 74, 11910, 12, 3168, 4672, 3536, 14309, 333, 733, 506, 5849, 316, 326, 467, 5279, 331, 18, 467, 6795, 1316, 35, 8395, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 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, 7494, 18124, 74, 11910, 12, 3168, 4672, 3536, 14309, 333, 733, 506, 5849, 316, 326, 467, 5279, 331, 18, 467, 6795, 1316, 35, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100...
P=1, Q=-1 fives the Fibonacci sequence.
P=1, Q=-1 gives the Fibonacci sequence.
def lucas_number1(n,P,Q): """ Returns then n-th Lucas number ``of the first kind'' (this is not standard terminology). The Lucas sequence $L^{(1)}_n$ is defined by the initial conditions $L^{(1)}_1=0$, $L^{(1)}_2=1$ and the recurrence relation $L^{(1)}_{n+2} = P*L^{(1)}_{n+1} - Q*L^{(1)}_n$. Wraps GAP's Lucas(...)[1]. P=1, Q=-1 fives the Fibonacci sequence. INPUT: n -- integer P, Q -- integer or rational numbers OUTPUT: integer or rational number EXAMPLES: sage: lucas_number1(5,1,-1) 5 sage: lucas_number1(6,1,-1) 8 sage: lucas_number1(7,1,-1) 13 sage: lucas_number1(7,1,-2) 43 sage: lucas_number1(5,2,3/5) 229/25 sage: lucas_number1(5,2,1.5) Traceback (most recent call last): ... TypeError: no canonical coercion from Real Field with 53 bits of precision to Rational Field There was a conjecture that the sequence $L_n$ defined by $L_{n+2} = L_{n+1} + L_n$, $L_1=1$, $L_2=3$, has the property that $n$ prime implies that $L_n$ is prime. sage: lucas = lambda n:(5/2)*lucas_number1(n,1,-1)+(1/2)*lucas_number2(n,1,-1) sage: [[lucas(n),is_prime(lucas(n)),n+1,is_prime(n+1)] for n in range(15)] [[1, False, 1, False], [3, True, 2, True], [4, False, 3, True], [7, True, 4, False], [11, True, 5, True], [18, False, 6, False], [29, True, 7, True], [47, True, 8, False], [76, False, 9, False], [123, False, 10, False], [199, True, 11, True], [322, False, 12, False], [521, True, 13, True], [843, False, 14, False], [1364, False, 15, False]] Can you use SAGE to find a counterexample to the conjecture? """ ans=gap.eval("Lucas(%s,%s,%s)[1]"%(QQ._coerce_(P),QQ._coerce_(Q),ZZ(n))) return sage_eval(ans)
124156ba54f96d76a32e2d36a03086ee3fd0aea4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/124156ba54f96d76a32e2d36a03086ee3fd0aea4/combinat.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 5286, 345, 67, 2696, 21, 12, 82, 16, 52, 16, 53, 4672, 3536, 2860, 1508, 290, 17, 451, 511, 5286, 345, 1300, 12176, 792, 326, 1122, 3846, 6309, 261, 2211, 353, 486, 4529, 16122, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 5286, 345, 67, 2696, 21, 12, 82, 16, 52, 16, 53, 4672, 3536, 2860, 1508, 290, 17, 451, 511, 5286, 345, 1300, 12176, 792, 326, 1122, 3846, 6309, 261, 2211, 353, 486, 4529, 16122, ...
def start_editing_cb(self, treeview, event):
def start_editing(self, treeview, event):
def start_editing_cb(self, treeview, event): """Make the treeview grab the focus and start editing the cell that the user has clicked to avoid confusion with two or three clicks before editing a keybinding.
de00492a8254b0d7a402011a0823338d7843934d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11147/de00492a8254b0d7a402011a0823338d7843934d/prefs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 4619, 310, 12, 2890, 16, 2151, 1945, 16, 871, 4672, 3536, 6464, 326, 2151, 1945, 11086, 326, 7155, 471, 787, 15755, 326, 2484, 716, 326, 729, 711, 17688, 358, 4543, 31067, 598, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 4619, 310, 12, 2890, 16, 2151, 1945, 16, 871, 4672, 3536, 6464, 326, 2151, 1945, 11086, 326, 7155, 471, 787, 15755, 326, 2484, 716, 326, 729, 711, 17688, 358, 4543, 31067, 598, ...
self._text_ctrl.Remove(self._text_ctrl.GetCaretPosition(), self._text_ctrl.GetLastPosition())
if (has_caret_accessors): self._text_ctrl.Remove(self._text_ctrl.GetCaretPosition(), self._text_ctrl.GetLastPosition())
def _write_status(self, status): self._text_ctrl.Freeze() self._text_ctrl.SetCaretPosition(0) self._text_ctrl.SetBasicStyle(self._basic_style) self._text_ctrl.SetDefaultStyle(self._default_style) self._set_kv("Full name", status.name) self._set_kv("Component", status.name.split('/')[-1]) self._set_kv("Hardware ID", status.hardware_id) self._set_kv("Level", stat_dict[status.level], self._last_status is not None and self._last_status.level != status.level) self._set_kv("Message", status.message, self._last_status is not None and self._last_status.message != status.message) self._text_ctrl.Newline() for value in status.values: changed = False if (self._last_values.has_key(value.key) and self._last_values[value.key] != value.value): changed = True self._set_kv(value.key, value.value, changed) self._last_values[value.key] = value.value self._text_ctrl.EndAllStyles() self._text_ctrl.Remove(self._text_ctrl.GetCaretPosition(), self._text_ctrl.GetLastPosition()) self._text_ctrl.Thaw() self._last_status = status
b8b89a6c02af50a92d4b90909cbe9df3af6f5f9f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10233/b8b89a6c02af50a92d4b90909cbe9df3af6f5f9f/viewer_panel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 2327, 12, 2890, 16, 1267, 4672, 365, 6315, 955, 67, 16277, 18, 9194, 8489, 1435, 225, 365, 6315, 955, 67, 16277, 18, 694, 39, 20731, 2555, 12, 20, 13, 225, 365, 6315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 2327, 12, 2890, 16, 1267, 4672, 365, 6315, 955, 67, 16277, 18, 9194, 8489, 1435, 225, 365, 6315, 955, 67, 16277, 18, 694, 39, 20731, 2555, 12, 20, 13, 225, 365, 6315, ...
def write(self, text): return self.irc.write(text)
def write(self, text, channels = None): return self.irc.write(text, channels)
def write(self, text): return self.irc.write(text)
c6c43fc22cddaf89dc6f1baff5e8c0504474ee3d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13981/c6c43fc22cddaf89dc6f1baff5e8c0504474ee3d/ircbot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 977, 4672, 327, 365, 18, 481, 71, 18, 2626, 12, 955, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 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, 1045, 12, 2890, 16, 977, 4672, 327, 365, 18, 481, 71, 18, 2626, 12, 955, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def followup(self, inj, ifo ):
def followup(self, inj, ifo, tag = None ):
def followup(self, inj, ifo ): """ Do the followup procedure for the missed injection 'inj' and create the several time-series for INSPIRAL, THINCA and the trigbank. The return value is the name of the created html file @param inj: sim_inspiral table of the missed injection @param ifo : The current IFO """ def fillTable(page, contents ): """ Making life easier... """
098f1967c466e5dd8f2c3c2287152a59fa7af9cc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3592/098f1967c466e5dd8f2c3c2287152a59fa7af9cc/followup_missed.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2805, 416, 12, 2890, 16, 316, 78, 16, 21479, 16, 1047, 273, 599, 262, 30, 3536, 2256, 326, 2805, 416, 12131, 364, 326, 25143, 10380, 296, 267, 78, 11, 471, 752, 326, 11392, 813, 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, 2805, 416, 12, 2890, 16, 316, 78, 16, 21479, 16, 1047, 273, 599, 262, 30, 3536, 2256, 326, 2805, 416, 12131, 364, 326, 25143, 10380, 296, 267, 78, 11, 471, 752, 326, 11392, 813, 17, ...
self.match_files(self.unmatched_files.files)
def _finalize_loading(self, error): if error: self.metadata.clear() self.metadata['album'] = _("[couldn't load album %s]") % self.id del self._new_metadata del self._new_tracks self.update() else: if not self._requests: for old_track, new_track in zip(self.tracks, self._new_tracks): for file in old_track.linked_files: new_track.linked_files.append(file) file.parent = new_track file.metadata.copy(new_track.metadata) file.update(signal=False) for track in self.tracks[len(self._new_tracks):]: for file in track.linked_files: file.move(self.unmatched_files) self.metadata = self._new_metadata self.tracks = self._new_tracks del self._new_metadata del self._new_tracks self.loaded = True for track in self.tracks: for file in track.linked_files: if file.orig_metadata: self.match_release_event(file.orig_metadata) break self.update() self.tagger.window.set_statusbar_message('Album %s loaded', self.id, timeout=3000) self.match_files(self.unmatched_files.files)
0c55a459eb50ce4b26b7ab5b2ee645981f862c2d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12415/0c55a459eb50ce4b26b7ab5b2ee645981f862c2d/album.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 30343, 67, 15174, 12, 2890, 16, 555, 4672, 309, 555, 30, 365, 18, 4165, 18, 8507, 1435, 365, 18, 4165, 3292, 25090, 3546, 273, 389, 2932, 63, 15195, 82, 1404, 1262, 14844, 738, 87...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 30343, 67, 15174, 12, 2890, 16, 555, 4672, 309, 555, 30, 365, 18, 4165, 18, 8507, 1435, 365, 18, 4165, 3292, 25090, 3546, 273, 389, 2932, 63, 15195, 82, 1404, 1262, 14844, 738, 87...
self.chat_transport.start(remote_sdp[self._chat_sdp_index])
self.chat_transport.start(remote_sdp.media[self._chat_sdp_index])
def _update_chat(self, remote_sdp): if self.chat_transport.is_active: # TODO: what do we do with new SDP? pass else: self.chat_transport.start(remote_sdp[self._chat_sdp_index])
de0d1b5abb0da93ebe0cb7de23b22fac6927b5c0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5703/de0d1b5abb0da93ebe0cb7de23b22fac6927b5c0/session.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 67, 10880, 12, 2890, 16, 2632, 67, 6427, 84, 4672, 309, 365, 18, 10880, 67, 13049, 18, 291, 67, 3535, 30, 468, 2660, 30, 4121, 741, 732, 741, 598, 394, 348, 8640, 35, 1342...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2725, 67, 10880, 12, 2890, 16, 2632, 67, 6427, 84, 4672, 309, 365, 18, 10880, 67, 13049, 18, 291, 67, 3535, 30, 468, 2660, 30, 4121, 741, 732, 741, 598, 394, 348, 8640, 35, 1342...
events = p.wait(4, 1)
events = p.wait(4, 1000)
def testControlAndWait(self): port = socket.socket() port.bind(('127.0.0.1', 0)) port.listen(1)
09f1fc70826634fec0dd123a6028d58c0f14463b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/09f1fc70826634fec0dd123a6028d58c0f14463b/test_epoll.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 3367, 1876, 5480, 12, 2890, 4672, 1756, 273, 2987, 18, 7814, 1435, 1756, 18, 4376, 12, 2668, 14260, 18, 20, 18, 20, 18, 21, 2187, 374, 3719, 1756, 18, 18085, 12, 21, 13, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 3367, 1876, 5480, 12, 2890, 4672, 1756, 273, 2987, 18, 7814, 1435, 1756, 18, 4376, 12, 2668, 14260, 18, 20, 18, 20, 18, 21, 2187, 374, 3719, 1756, 18, 18085, 12, 21, 13, 2, -10...
return self._parseExpr().data
return self._stripArray(self._parseExpr().data)
def _parse(self): dataLexeme = self.lexer.nextExprHdr() self._debugLog(dataLexeme, isRexpr=False) if dataLexeme.rTypeCode == DT_SEXP: return self._parseExpr().data else: raise NotImplementedError()
3e66c7a7cf3384248fc78eb4b3b177eb3e6c2421 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8984/3e66c7a7cf3384248fc78eb4b3b177eb3e6c2421/rparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 12, 2890, 4672, 501, 14756, 4698, 273, 365, 18, 31731, 18, 4285, 4742, 14659, 1435, 365, 6315, 4148, 1343, 12, 892, 14756, 4698, 16, 353, 54, 8638, 33, 8381, 13, 309, 501, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 4672, 501, 14756, 4698, 273, 365, 18, 31731, 18, 4285, 4742, 14659, 1435, 365, 6315, 4148, 1343, 12, 892, 14756, 4698, 16, 353, 54, 8638, 33, 8381, 13, 309, 501, 1...
if instance_class: params['DBInstanceClass'] = instance_class
if dbinstance_class: params['DBInstanceClass'] = dbinstance_class
def restore_dbinstance_from_point_in_time(self, source_instance_id, target_instance_id, use_latest=False, restore_time=None, dbinstance_class=None, port=None, availability_zone=None): """ Create a new DBInstance from a point in time. :type source_instance_id: string :param source_instance_id: The identifier for the source DBInstance. :type target_instance_id: string :param target_instance_id: The identifier of the new DBInstance.
2a904608f3c2030ab6df8aae3faab9a94c7e62b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1098/2a904608f3c2030ab6df8aae3faab9a94c7e62b1/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5217, 67, 1966, 1336, 67, 2080, 67, 1153, 67, 267, 67, 957, 12, 2890, 16, 1084, 67, 1336, 67, 350, 16, 1018, 67, 1336, 67, 350, 16, 999, 67, 13550, 33, 8381, 16, 5217, 67, 957, 33,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5217, 67, 1966, 1336, 67, 2080, 67, 1153, 67, 267, 67, 957, 12, 2890, 16, 1084, 67, 1336, 67, 350, 16, 1018, 67, 1336, 67, 350, 16, 999, 67, 13550, 33, 8381, 16, 5217, 67, 957, 33,...
description = """Itools is a Python package that encapsulates several Python tools developed by the Itaapy company and other developers. The provided tools are:
description = """itools is a Python library, it groups a number of packages into a single meta-package for easier development and deployment. The packages included are:
def finalize_options (self): self.set_undefined_options('install', ('install_purelib', 'install_dir'), ('root', 'root'), ('force', 'force'), )
5a6ec107366afa260d2d078099d28e46810baf2d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/5a6ec107366afa260d2d078099d28e46810baf2d/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12409, 67, 2116, 261, 2890, 4672, 365, 18, 542, 67, 5978, 67, 2116, 2668, 5425, 2187, 7707, 5425, 67, 84, 594, 2941, 2187, 296, 5425, 67, 1214, 19899, 7707, 3085, 2187, 296, 3085, 19899,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12409, 67, 2116, 261, 2890, 4672, 365, 18, 542, 67, 5978, 67, 2116, 2668, 5425, 2187, 7707, 5425, 67, 84, 594, 2941, 2187, 296, 5425, 67, 1214, 19899, 7707, 3085, 2187, 296, 3085, 19899,...
if __version__ < '0.3.3':
if StrictVersion(__version__) < StrictVersion('0.3.3'):
def render(self, req, mimetype, content, filename=None, rev=None): try: from docutils import nodes from docutils.core import publish_string from docutils.parsers import rst from docutils.__init__ import __version__ except ImportError: raise TrarError, 'Docutils >= %s not found' % docutils_required if __version__ < '0.3.3': raise TracError, 'Docutils version >= %s required, %s found' \ % ('0.3.3', __version__)
e65aa6e81830def4622a4704c97cfcf427ca2a54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/e65aa6e81830def4622a4704c97cfcf427ca2a54/rst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1111, 16, 12595, 16, 913, 16, 1544, 33, 7036, 16, 5588, 33, 7036, 4672, 775, 30, 628, 997, 5471, 1930, 2199, 628, 997, 5471, 18, 3644, 1930, 3808, 67, 1080, 628, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1111, 16, 12595, 16, 913, 16, 1544, 33, 7036, 16, 5588, 33, 7036, 4672, 775, 30, 628, 997, 5471, 1930, 2199, 628, 997, 5471, 18, 3644, 1930, 3808, 67, 1080, 628, ...
result.addError(self, self.__exc_info())
result.addError(self, self._exc_info())
def run(self, result=None): if result is None: result = self.defaultTestResult() result.startTest(self) testMethod = getattr(self, self.__testMethodName) try: try: self.setUp() except KeyboardInterrupt: raise except: result.addError(self, self.__exc_info()) return
dcb7d97fc6f9b6b40c3037899d0a94b46e4e2b77 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/dcb7d97fc6f9b6b40c3037899d0a94b46e4e2b77/unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 563, 33, 7036, 4672, 309, 563, 353, 599, 30, 563, 273, 365, 18, 1886, 4709, 1253, 1435, 563, 18, 1937, 4709, 12, 2890, 13, 1842, 1305, 273, 3869, 12, 2890, 16, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 563, 33, 7036, 4672, 309, 563, 353, 599, 30, 563, 273, 365, 18, 1886, 4709, 1253, 1435, 563, 18, 1937, 4709, 12, 2890, 13, 1842, 1305, 273, 3869, 12, 2890, 16, 36...
@type portType: type which implements C{IListeningPort}
@type portType: type which implements L{IListeningPort}
def listenWith(self, portType, *args, **kw): """Start an instance of the given C{portType} listening.
2049631dd0aa73ddfc33a2c3c8f41078e4f4fcf8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/2049631dd0aa73ddfc33a2c3c8f41078e4f4fcf8/interfaces.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6514, 1190, 12, 2890, 16, 1756, 559, 16, 380, 1968, 16, 2826, 9987, 4672, 3536, 1685, 392, 791, 434, 326, 864, 385, 95, 655, 559, 97, 13895, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6514, 1190, 12, 2890, 16, 1756, 559, 16, 380, 1968, 16, 2826, 9987, 4672, 3536, 1685, 392, 791, 434, 326, 864, 385, 95, 655, 559, 97, 13895, 18, 2, -100, -100, -100, -100, -100, -100, ...
Receive requests for data matching given key via lineReceived, asks it's factory for the data with dictionary-style access, and returns the data to the requester.
chat = [ ]
def unquote(s): return urllib.unquote(s)
4c012f7357c0ef904a6dac6411f062bedd7a6228 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4c012f7357c0ef904a6dac6411f062bedd7a6228/test_postfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25611, 12, 87, 4672, 327, 11527, 18, 318, 6889, 12, 87, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25611, 12, 87, 4672, 327, 11527, 18, 318, 6889, 12, 87, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
ki[x,y]=1.0 kernel=customKernel(ki,(n,n)) mi=convolveImage(transformImage(grad, '\l x: sqrt(sq(x[0])+sq(x[1]))'),kernel) gi=convolveImage(grad,kernel) gad=GrayImage(grad.size())
ki[x,y] = 1.0 kernel = customKernel(ki,(n,n)) mi = convolveImage(transformImage(grad, '\l x: sqrt(sq(x[0])+sq(x[1]))'),kernel) gi = convolveImage(grad,kernel) gad = GrayImage(grad.size())
def calcGradAngDisp(grad,n): ki=GrayImage(2*n+1,2*n+1) for x in range(0,ki.width()): for y in range(0,ki.height()): ki[x,y]=1.0 kernel=customKernel(ki,(n,n)) mi=convolveImage(transformImage(grad, '\l x: sqrt(sq(x[0])+sq(x[1]))'),kernel) gi=convolveImage(grad,kernel) gad=GrayImage(grad.size()) for x in range(0,gad.width()): for y in range(0,gad.height()): if (mi[x,y]>0): gad[x,y]=math.hypot(gi[x,y][0],gi[x,y][1])/mi[x,y] return gad
8925518c2ae9f74de3b734317beccbc4670dbd43 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10394/8925518c2ae9f74de3b734317beccbc4670dbd43/statistics.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 30420, 22757, 1669, 84, 12, 9974, 16, 82, 4672, 29027, 33, 23521, 2040, 12, 22, 14, 82, 15, 21, 16, 22, 14, 82, 15, 21, 13, 364, 619, 316, 1048, 12, 20, 16, 15299, 18, 2819, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 30420, 22757, 1669, 84, 12, 9974, 16, 82, 4672, 29027, 33, 23521, 2040, 12, 22, 14, 82, 15, 21, 16, 22, 14, 82, 15, 21, 13, 364, 619, 316, 1048, 12, 20, 16, 15299, 18, 2819, ...
with open(file) as line:
for line in self.file_filter(file):
def set_config(self): """ Get config data from config files """
935626521615ded00a3448f9d631da6b7d652500 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11428/935626521615ded00a3448f9d631da6b7d652500/shr_backup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 1425, 12, 2890, 4672, 3536, 968, 642, 501, 628, 642, 1390, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 1425, 12, 2890, 4672, 3536, 968, 642, 501, 628, 642, 1390, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
fetch1 = start1 = pieces[0][0] if (self.seq1_strand == "-"): start1 = self.seq1_file.length - (start1+len(text1)) a.add_component(Component(self.seq1_src,fetch1,len(text1),self.seq1_strand,text=text1)) fetch2 = start2 = pieces[0][1] if (self.seq2_strand == "-"): start2 = self.seq2_file.length - (start2+len(text2)) a.add_component(Component(self.seq2_src,fetch2,len(text2),self.seq2_strand,text=text2))
a.add_component(Component(self.seq1_src,start1,size1,self.seq1_strand,text=text1)) a.add_component(Component(self.seq2_src,start2,size2,self.seq2_strand,text=text2))
def build_alignment(self,score,pieces): """converts a score and pieces to an alignment""" # build text self.open_seqs() text1 = text2 = "" end1 = end2 = None for (start1,start2,length,pctId) in pieces: if (end1 != None): if (start1 == end1): # insertion in sequence 2 text1 += self.seq1_gap * (start2-end2) text2 += self.seq2_file.get(end2,start2-end2) else: # insertion in sequence 1 text1 += self.seq1_file.get(end1,start1-end1) text2 += self.seq2_gap * (start1-end1)
b6156e7a74efb127970249c0d1159ffca2ec5cab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2104/b6156e7a74efb127970249c0d1159ffca2ec5cab/lav.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 14409, 12, 2890, 16, 6355, 16, 31016, 4672, 3536, 6283, 87, 279, 4462, 471, 10167, 358, 392, 8710, 8395, 468, 1361, 977, 365, 18, 3190, 67, 22437, 1435, 977, 21, 273, 977, 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, 1361, 67, 14409, 12, 2890, 16, 6355, 16, 31016, 4672, 3536, 6283, 87, 279, 4462, 471, 10167, 358, 392, 8710, 8395, 468, 1361, 977, 365, 18, 3190, 67, 22437, 1435, 977, 21, 273, 977, 22...
refs = []
refs = cellset()
def bodyprereferences(self): offsets = 0 refs = [] for child in self: refs.extend(_setmovepointer(child.prereferences(), offsets)) ioffsets = child.offsets() if ioffsets is None: refs.append(None) break offsets += ioffsets return set(refs)
71e0598bb7dc6d9b90f66161eeb283e8ddccc073 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2040/71e0598bb7dc6d9b90f66161eeb283e8ddccc073/esotope-bfc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1417, 683, 822, 2980, 12, 2890, 4672, 8738, 273, 374, 9047, 273, 2484, 542, 1435, 364, 1151, 316, 365, 30, 9047, 18, 14313, 24899, 542, 8501, 10437, 12, 3624, 18, 683, 822, 2980, 9334, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1417, 683, 822, 2980, 12, 2890, 4672, 8738, 273, 374, 9047, 273, 2484, 542, 1435, 364, 1151, 316, 365, 30, 9047, 18, 14313, 24899, 542, 8501, 10437, 12, 3624, 18, 683, 822, 2980, 9334, ...
if doc.canonical_name[0].startswith('script-'): return ['Script %s' % str(doc.canonical_name)[7:]] elif doc.canonical_name is UNKNOWN:
if doc.canonical_name is UNKNOWN:
def breadcrumbs(self, doc): crumbs = [self._crumb(doc)]
97b116664d741f73a71e763cb163ea0cee2d5080 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/97b116664d741f73a71e763cb163ea0cee2d5080/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18414, 12, 2890, 16, 997, 4672, 4422, 10099, 273, 306, 2890, 6315, 3353, 3592, 12, 2434, 25887, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 18414, 12, 2890, 16, 997, 4672, 4422, 10099, 273, 306, 2890, 6315, 3353, 3592, 12, 2434, 25887, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
[1, 2, 3, 0, 5, 4]
[1, 2, 0, 4, 3]
def __call__(self, i): """ Returns the image of the integer i under this permutation. Alternately, if i is a list, tuple or string, returns the result of self acting on i.
6a7098ccb2401245a8a6f84f18602cde2d40ff44 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/6a7098ccb2401245a8a6f84f18602cde2d40ff44/permgroup_element.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 277, 4672, 3536, 2860, 326, 1316, 434, 326, 3571, 277, 3613, 333, 17440, 18, 21498, 5173, 16, 309, 277, 353, 279, 666, 16, 3193, 578, 533, 16, 1135, 326,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 277, 4672, 3536, 2860, 326, 1316, 434, 326, 3571, 277, 3613, 333, 17440, 18, 21498, 5173, 16, 309, 277, 353, 279, 666, 16, 3193, 578, 533, 16, 1135, 326,...
fixed_font = pygame.font.SysFont("Fixed", size=self.font_size)
fixed_font = pygame.font.SysFont("Fixed, Monospace, Courier", size=self.font_size)
def paint_notes(self): screen_size = self.screen.get_size() margin_x = self.screen.get_size()[0]/50 margin_y = self.screen.get_size()[1]/50 if not self.notes_surface: if self.font_size == None: self.font_size = self.screen.get_size()[1] / 12 font = pygame.font.SysFont("Helvetica, Sans, Arial", size=self.font_size) fixed_font = pygame.font.SysFont("Fixed", size=self.font_size)
296bd71dea92a4e3d38aa7085c4cb4b53e96aed5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3598/296bd71dea92a4e3d38aa7085c4cb4b53e96aed5/xpressent-remote.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12574, 67, 12903, 12, 2890, 4672, 5518, 67, 1467, 273, 365, 18, 9252, 18, 588, 67, 1467, 1435, 7333, 67, 92, 273, 365, 18, 9252, 18, 588, 67, 1467, 1435, 63, 20, 18537, 3361, 7333, 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, 12574, 67, 12903, 12, 2890, 4672, 5518, 67, 1467, 273, 365, 18, 9252, 18, 588, 67, 1467, 1435, 7333, 67, 92, 273, 365, 18, 9252, 18, 588, 67, 1467, 1435, 63, 20, 18537, 3361, 7333, 6...
stdout, stderr = proc.communicate(stdin)
stdout, stderr = proc.communicate()
def run(editor, tool): import os.path from subprocess import Popen, PIPE import tempfile editor.message('Running ' + tool.title) fd, filename = tempfile.mkstemp() os.write(fd, tool.script) os.close(fd) stdin = get_stdin(editor, tool.input) command_to_run = ['/usr/bin/env', 'sh', filename] env = {} env.update(os.environ) env['FILENAME'] = editor.uri env['OFFSET'] = str(editor.cursor.get_offset()) proc = Popen(command_to_run, stdout=PIPE, stderr=PIPE, bufsize=1, stdin=PIPE if stdin else None, cwd=editor.project_root, env=env) on_finish = lambda: os.remove(filename) if tool.output == 'to-console': from snaked.core.console import consume_output consume_output(editor, proc, on_finish) else: stdout, stderr = proc.communicate(stdin) on_finish() process_stdout(editor, stdout, stderr, tool.output)
854896ef0d7e188eb92eda3c90b46755c6435032 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14800/854896ef0d7e188eb92eda3c90b46755c6435032/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 9177, 16, 5226, 4672, 1930, 1140, 18, 803, 628, 6652, 1930, 14339, 16, 11716, 1930, 13275, 225, 4858, 18, 2150, 2668, 7051, 296, 397, 5226, 18, 2649, 13, 225, 5194, 16, 1544, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 9177, 16, 5226, 4672, 1930, 1140, 18, 803, 628, 6652, 1930, 14339, 16, 11716, 1930, 13275, 225, 4858, 18, 2150, 2668, 7051, 296, 397, 5226, 18, 2649, 13, 225, 5194, 16, 1544, ...
return
return 0
def _init_builtin_signature(self, func): """ Construct the signature for a builtin function or method from its docstring. If the docstring uses the standard convention of including a signature in the first line of the docstring (and formats that signature according to standard conventions), then it will be used to extract a signature. Otherwise, the signature will be set to a single varargs variable named C{"..."}.
7140f1248773f589eaa5826bd2b3d64a09ab01f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/7140f1248773f589eaa5826bd2b3d64a09ab01f2/objdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 67, 24553, 67, 8195, 12, 2890, 16, 1326, 4672, 3536, 14291, 326, 3372, 364, 279, 15273, 445, 578, 707, 628, 2097, 14525, 18, 225, 971, 326, 14525, 4692, 326, 4529, 15797, 434,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 67, 24553, 67, 8195, 12, 2890, 16, 1326, 4672, 3536, 14291, 326, 3372, 364, 279, 15273, 445, 578, 707, 628, 2097, 14525, 18, 225, 971, 326, 14525, 4692, 326, 4529, 15797, 434,...
def show_changes_over_revisions(self, widget, data=None): rev_first = self.revisions[0]["revision"].value - 1 rev_last = self.revisions[-1]["revision"].value path_item = self.paths[0] url = self.caller.root_url + path_item from rabbitvcs.ui.changes import Changes Changes( url, rev_first, url, rev_last )
def view_diff_over_revisions(self, widget, data=None): rev_first = self.revisions[0]["revision"].value - 1 rev_last = self.revisions[-1]["revision"].value path_item = self.paths[0] url = self.caller.root_url + path_item self.caller.view_diff_for_path(url, latest_revision_number=rev_last, earliest_revision_number=rev_first)
14fca6f349c8c10fe6350a3532e07c51bbc19369 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5119/14fca6f349c8c10fe6350a3532e07c51bbc19369/log.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 67, 5413, 67, 1643, 67, 29892, 12, 2890, 16, 3604, 16, 501, 33, 7036, 4672, 5588, 67, 3645, 273, 365, 18, 29892, 63, 20, 6362, 6, 13057, 6, 8009, 1132, 300, 404, 5588, 67, 2722...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 67, 5413, 67, 1643, 67, 29892, 12, 2890, 16, 3604, 16, 501, 33, 7036, 4672, 5588, 67, 3645, 273, 365, 18, 29892, 63, 20, 6362, 6, 13057, 6, 8009, 1132, 300, 404, 5588, 67, 2722...
return "-0x%x" % abs(self._value) elif self._type == OPERAND_REGISTER:
return "-0x%x" % abs(self.value) elif self.type == OPERAND_REGISTER:
def _toText(self): if self._type == OPERAND_IMMEDIATE: if self._value >= 0: return "0x%x" % self._value else: return "-0x%x" % abs(self._value) elif self._type == OPERAND_REGISTER: return self.GetName() elif self._type == OPERAND_ABSOLUTE_ADDRESS: return '[0x%x]' % self._disp elif self._type == OPERAND_FAR_MEMORY: return '%s:%s' % (hex(self._seg), hex(self._off)) elif (self._type == OPERAND_MEMORY): result = "[" if self._base != None: result += Registers[self._base] + "+" if self._index != None: result += Registers[self._index] if self._scale > 1: result += "*%d" % self._scale if self._disp >= 0: result += "+0x%x" % self._disp else: result += "-0x%x" % abs(self._disp) return result + "]"
b8902f36bad23fcde94df6909e52326a5452b7ff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4918/b8902f36bad23fcde94df6909e52326a5452b7ff/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 869, 1528, 12, 2890, 4672, 309, 365, 6315, 723, 422, 17205, 4307, 67, 3445, 15971, 1777, 30, 309, 365, 6315, 1132, 1545, 374, 30, 327, 315, 20, 92, 9, 92, 6, 738, 365, 6315, 113...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 869, 1528, 12, 2890, 4672, 309, 365, 6315, 723, 422, 17205, 4307, 67, 3445, 15971, 1777, 30, 309, 365, 6315, 1132, 1545, 374, 30, 327, 315, 20, 92, 9, 92, 6, 738, 365, 6315, 113...
if nb_words_around == 0: break
def matches_any(w1): if compiled_pattern.search(' ' + w1 + ' '): return True else: return False
1233768c20983e54b91fe5f7f61eb55279e8b5b5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12027/1233768c20983e54b91fe5f7f61eb55279e8b5b5/bibformat_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1885, 67, 2273, 12, 91, 21, 4672, 309, 7743, 67, 4951, 18, 3072, 2668, 296, 397, 341, 21, 397, 296, 296, 4672, 327, 1053, 469, 30, 327, 1083, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1885, 67, 2273, 12, 91, 21, 4672, 309, 7743, 67, 4951, 18, 3072, 2668, 296, 397, 341, 21, 397, 296, 296, 4672, 327, 1053, 469, 30, 327, 1083, 2, -100, -100, -100, -100, -100, -100, -...
del self[int(math.ceil(self.fraction * self.n)) + 1:]
del self[self.max:]
def append(self, value): hi = list.__len__(self) lo = 0 while lo < hi: mid = (lo + hi) // 2 if value > self[mid]: hi = mid else: lo = mid + 1 list.insert(self, lo, value) self.n += 1 del self[int(math.ceil(self.fraction * self.n)) + 1:]
100ea3653688b7e8410f2d89e206c93e259f5bd5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3592/100ea3653688b7e8410f2d89e206c93e259f5bd5/itertools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 12, 2890, 16, 460, 4672, 10118, 273, 666, 16186, 1897, 972, 12, 2890, 13, 437, 273, 374, 1323, 437, 411, 10118, 30, 7501, 273, 261, 383, 397, 10118, 13, 368, 576, 309, 460, 405, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 12, 2890, 16, 460, 4672, 10118, 273, 666, 16186, 1897, 972, 12, 2890, 13, 437, 273, 374, 1323, 437, 411, 10118, 30, 7501, 273, 261, 383, 397, 10118, 13, 368, 576, 309, 460, 405, ...
class _TemporarilyImmutableSet(object):
class _TemporarilyImmutableSet(BaseSet):
def _as_temporarily_immutable(self): # Return self wrapped in a temporarily immutable set return _TemporarilyImmutableSet(self)
18952fe218a31e2eef50fe38038baad8fa07c355 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/18952fe218a31e2eef50fe38038baad8fa07c355/sets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 345, 67, 874, 3831, 10243, 67, 381, 5146, 12, 2890, 4672, 468, 2000, 365, 5805, 316, 279, 18917, 11732, 444, 327, 389, 1837, 3831, 10243, 16014, 694, 12, 2890, 13, 2, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 345, 67, 874, 3831, 10243, 67, 381, 5146, 12, 2890, 4672, 468, 2000, 365, 5805, 316, 279, 18917, 11732, 444, 327, 389, 1837, 3831, 10243, 16014, 694, 12, 2890, 13, 2, -100, -100, ...
for cpu in cpu_online_map():
for cpu in autotest_utils.cpu_online_map():
def execute(self): # Check if the kernel supports cpu hotplug if autotest_utils.running_config(): autotest_utils.check_for_kernel_feature('HOTPLUG_CPU') # Check cpu nums, if equals 1, quit. if autotest_utils.count_cpus() == 1: print 'Just only single cpu online, quiting...' sys.exit() # Have a simple and quick check first, FIX me please. utils.system('dmesg -c > /dev/null') for cpu in cpu_online_map(): if os.path.isfile('/sys/devices/system/cpu/cpu%s/online' % cpu): utils.system('echo 0 > /sys/devices/system/cpu/cpu%s/online' % cpu, 1) utils.system('dmesg -c') time.sleep(3) utils.system('echo 1 > /sys/devices/system/cpu/cpu%s/online' % cpu, 1) utils.system('dmesg -c') time.sleep(3) # Begin this cpu hotplug test big guru. os.chdir(self.srcdir) profilers = self.job.profilers if not profilers.only(): utils.system('./runtests.sh')
89bfb7028cd84e27cc06ce68acc6ee65f498ecef /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/89bfb7028cd84e27cc06ce68acc6ee65f498ecef/cpu_hotplug.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 4672, 468, 2073, 309, 326, 5536, 6146, 8326, 12811, 22045, 309, 2059, 352, 395, 67, 5471, 18, 8704, 67, 1425, 13332, 2059, 352, 395, 67, 5471, 18, 1893, 67, 1884, 67, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 4672, 468, 2073, 309, 326, 5536, 6146, 8326, 12811, 22045, 309, 2059, 352, 395, 67, 5471, 18, 8704, 67, 1425, 13332, 2059, 352, 395, 67, 5471, 18, 1893, 67, 1884, 67, 8...
'string, got a non-ascii byte: 0xe9$',
'string, got a non-ASCII byte: 0xe9$',
def test_from_format(self): # Ensure that PyUnicode_FromFormat() raises an error for a non-ascii # format string. from _testcapi import format_unicode
daa93cd9da888f62cf38feb688241c8d7e0d38ce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/daa93cd9da888f62cf38feb688241c8d7e0d38ce/test_unicode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2080, 67, 2139, 12, 2890, 4672, 468, 7693, 716, 4707, 16532, 67, 1265, 1630, 1435, 14183, 392, 555, 364, 279, 1661, 17, 9184, 468, 740, 533, 18, 628, 389, 3813, 71, 2425, 193...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2080, 67, 2139, 12, 2890, 4672, 468, 7693, 716, 4707, 16532, 67, 1265, 1630, 1435, 14183, 392, 555, 364, 279, 1661, 17, 9184, 468, 740, 533, 18, 628, 389, 3813, 71, 2425, 193...
resdata = rh.createResourceStruct (filteredResources, formatAsTree=resources_tree, updateOnlyExistingSprites=True)
resdata = rh.createResourceStruct (filteredResources, formatAsTree=resources_tree, updateOnlyExistingSprites=True)
def addResourceInfoToPackages(script): for package in script.packages: package_resources = [] # TODO: the next is a hack, since package.classes are still id's package_classes = [x for x in script.classesObj if x.id in package.classes] for clazz in package_classes: package_resources.extend(clazz.resources) package.data.resources = rh.createResourceStruct(package_resources, formatAsTree=resources_tree, updateOnlyExistingSprites=True) return
db2e6d2276d7101707474e21424fb55f9658ed21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/db2e6d2276d7101707474e21424fb55f9658ed21/CodeGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23812, 966, 774, 11425, 12, 4263, 4672, 364, 2181, 316, 2728, 18, 10308, 30, 2181, 67, 4683, 273, 5378, 468, 2660, 30, 326, 1024, 353, 279, 11769, 16, 3241, 2181, 18, 4701, 854, 4859, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23812, 966, 774, 11425, 12, 4263, 4672, 364, 2181, 316, 2728, 18, 10308, 30, 2181, 67, 4683, 273, 5378, 468, 2660, 30, 326, 1024, 353, 279, 11769, 16, 3241, 2181, 18, 4701, 854, 4859, ...
if query == '' and et == '' and gz and es == '' and sd == '' and ed == '':
if query == '' and et == '' and not gz and es == '' and sd == '' and ed == '':
def getEventsListing(self, query='', languages=[], et='', gz='', es='', skey='', rkey=0, sd='', ed='', p_context=None, ps_start='', **kwargs): """ Returns a list of events """ if gz != '' and not isinstance(gz, list): gz = [gz] try: ps_start = int(ps_start) except: ps_start = 0 if skey not in ('start_date', ): skey = 'start_date' catalog_tool = self.getCatalogTool() search_args = dict( meta_type=[METATYPE_NYSEMEVENT], approved=1, sort_on=skey, sort_order=rkey == '1' and 'descending' or 'ascending' ) if query == '' and et == '' and gz and es == '' and sd == '' and ed == '': #no criteria then returns the 10 more recent brains = catalog_tool(**search_args) else: query = self.utStrEscapeForSearch(query) if languages: langs = languages else: langs = [self.gl_get_selected_language()] #Fulltext query for lang in langs: search_args['objectkeywords_' + lang] = query #Geographical coverage if gz: for lang in langs: for g in gz: lang_name = self.gl_get_language_name(lang) gz_trans = self.getCoverageGlossaryTrans(g, lang_name) search_args['coverage_' + lang] = gz_trans #Type sd = self.utConvertStringToDateTimeObj(sd) ed = self.utConvertStringToDateTimeObj(ed) if sd and ed: search_args['resource_date'] = [sd, ed] search_args['resource_date_range'] = 'minmax' elif sd: search_args['resource_date'] = sd search_args['resource_date_range'] = 'min' elif ed: search_args['resource_date'] = ed search_args['resource_date_range'] = 'max' if et: search_args['resource_type'] = et if es: search_args['resource_status'] = es brains = catalog_tool(**search_args)
dd7f43e0a57720ce394ab48a31b1f2c71e0cf467 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/dd7f43e0a57720ce394ab48a31b1f2c71e0cf467/SEMIDESite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31215, 19081, 12, 2890, 16, 843, 2218, 2187, 8191, 22850, 6487, 3393, 2218, 2187, 14136, 2218, 2187, 5001, 2218, 2187, 272, 856, 2218, 2187, 436, 856, 33, 20, 16, 8349, 2218, 2187, 1675, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31215, 19081, 12, 2890, 16, 843, 2218, 2187, 8191, 22850, 6487, 3393, 2218, 2187, 14136, 2218, 2187, 5001, 2218, 2187, 272, 856, 2218, 2187, 436, 856, 33, 20, 16, 8349, 2218, 2187, 1675, ...