rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
if expandToUnit==text.UNIT_CHARACTER:
self._storyLength=self.obj.IAccessibleTextObject.NCharacters if self._startOffset>=self._storyLength: self._text="" elif expandToUnit==text.UNIT_CHARACTER:
def __init__(self,obj,position,expandToUnit=None,limitToUnit=None): super(IA2TextTextInfo,self).__init__(obj,position,expandToUnit,limitToUnit) if position==text.POSITION_CARET: self._startOffset=self._endOffset=self.obj.IAccessibleTextObject.CaretOffset elif position==text.POSITION_SELECTION: (self._startOffset,self._endOffset)=self.obj.IAccessibleTextObject.Selection(0) elif isinstance(position,text.OffsetsPosition): self._startOffset=position.start self._endOffset=position.end else: raise NotImplementedError("Position: %s"%position) if expandToUnit==text.UNIT_CHARACTER: (self._startOffset,self._endOffset,self._text)=self.obj.IAccessibleTextObject.TextAtOffset(self._startOffset,IA2Handler.TEXT_BOUNDARY_CHAR) elif expandToUnit==text.UNIT_WORD: (self._startOffset,self._endOffset,self._text)=self.obj.IAccessibleTextObject.TextAtOffset(self._startOffset,IA2Handler.TEXT_BOUNDARY_WORD) elif expandToUnit==text.UNIT_LINE: (self._startOffset,self._endOffset,self._text)=self.obj.IAccessibleTextObject.TextAtOffset(self._startOffset,IA2Handler.TEXT_BOUNDARY_LINE) elif expandToUnit==text.UNIT_PARAGRAPH: (self._startOffset,self._endOffset,self._text)=self.obj.IAccessibleTextObject.TextAtOffset(self._startOffset,IA2Handler.TEXT_BOUNDARY_PARAGRAPH) elif expandToUnit in [text.UNIT_SCREEN,text.UNIT_STORY]: self._startOffset=0 self._endOffset=self.obj.IAccessibleTextObject.NCharacters elif expandToUnit is not None: raise NotImplementedError("unit: %s"%expandToUnit) if limitToUnit==text.UNIT_CHARACTER: (self._lowOffsetLimit,self._highOffsetLimit)=self.obj.IAccessibleTextObject.TextAtOffset(self._startOffset,IA2Handler.TEXT_BOUNDARY_CHAR)[0:2] elif limitToUnit==text.UNIT_WORD: (self._lowOffsetLimit,self._highOffsetLimit)=self.obj.IAccessibleTextObject.TextAtOffset(self._startOffset,IA2Handler.TEXT_BOUNDARY_WORD)[0:2] elif limitToUnit==text.UNIT_LINE: (self._lowOffsetLimit,self._highOffsetLimit)=self.obj.IAccessibleTextObject.TextAtOffset(self._startOffset,IA2Handler.TEXT_BOUNDARY_LINE)[0:2] elif limitToUnit==text.UNIT_PARAGRAPH: (self._lowOffsetLimit,self._highOffsetLimit)=self.obj.IAccessibleTextObject.TextAtOffset(self._startOffset,IA2Handler.TEXT_BOUNDARY_PARAGRAPH)[0:2] elif limitToUnit in [text.UNIT_SCREEN,text.UNIT_STORY,None]: self._lowOffsetLimit=0 self._highOffsetLimit=self.obj.IAccessibleTextObject.NCharacters else: raise NotImplementedError("limitToUnit: %s"%limitToUnit)
3807ddf58f8d150e2632e0fb199585f07dc43303 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9340/3807ddf58f8d150e2632e0fb199585f07dc43303/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2603, 16, 3276, 16, 12320, 774, 2802, 33, 7036, 16, 3595, 774, 2802, 33, 7036, 4672, 2240, 12, 15188, 22, 1528, 1528, 966, 16, 2890, 2934, 972, 2738, 972...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2603, 16, 3276, 16, 12320, 774, 2802, 33, 7036, 16, 3595, 774, 2802, 33, 7036, 4672, 2240, 12, 15188, 22, 1528, 1528, 966, 16, 2890, 2934, 972, 2738, 972...
else:
if not attrs:
def _info2attrmask(self,path,info,hinfo=None): """Convert a file/directory info dict to a win32 file attribute mask.""" attrs = 0 st_mode = info.get("st_mode",None) if st_mode: if statinfo.S_ISDIR(st_mode): attrs |= FILE_ATTRIBUTE_DIRECTORY elif statinfo.S_ISREG(st_mode): attrs |= FILE_ATTRIBUTE_NORMAL elif hinfo: if hinfo.contents.IsDirectory: attrs |= FILE_ATTRIBUTE_DIRECTORY else: attrs |= FILE_ATTRIBUTE_NORMAL else: if self.fs.isdir(path): attrs |= FILE_ATTRIBUTE_DIRECTORY else: attrs |= FILE_ATTRIBUTE_NORMAL return attrs
a008902d917f21db8f4bad651056e87b7b30eb9a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5578/a008902d917f21db8f4bad651056e87b7b30eb9a/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1376, 22, 1747, 4455, 12, 2890, 16, 803, 16, 1376, 16, 76, 1376, 33, 7036, 4672, 3536, 2723, 279, 585, 19, 5149, 1123, 2065, 358, 279, 5657, 1578, 585, 1566, 3066, 12123, 3422, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1376, 22, 1747, 4455, 12, 2890, 16, 803, 16, 1376, 16, 76, 1376, 33, 7036, 4672, 3536, 2723, 279, 585, 19, 5149, 1123, 2065, 358, 279, 5657, 1578, 585, 1566, 3066, 12123, 3422, 27...
self.initial = initial
self._initial = initial
def __init__(self,validate=None,desc=None,initial=None, **kw): self.validate = validate or isAnything self.desc = desc self.initial = initial for k,v in kw.items(): setattr(self,k,v)
0b36a262a6c8b32d9a6e6b835e994e7bd79470c4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/0b36a262a6c8b32d9a6e6b835e994e7bd79470c4/attrmap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5662, 33, 7036, 16, 5569, 33, 7036, 16, 6769, 33, 7036, 16, 2826, 9987, 4672, 365, 18, 5662, 273, 1954, 578, 3484, 4274, 365, 18, 5569, 273, 3044, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5662, 33, 7036, 16, 5569, 33, 7036, 16, 6769, 33, 7036, 16, 2826, 9987, 4672, 365, 18, 5662, 273, 1954, 578, 3484, 4274, 365, 18, 5569, 273, 3044, 365, ...
f.write('add_drivers+="ehci_hcd uhci_hcd ohci_hcd "\n') f.write('add_drivers+="usb_storage usbhid "\n')
f.write('MODULES+="ehci_hcd uhci_hcd ohci_hcd "\n') f.write('MODULES+="usb_storage usbhid "\n')
def __write_initrd_conf(self, path): if not os.path.exists(os.path.dirname(path)): makedirs(os.path.dirname(path)) f = open(path, "a")
acef794c9225371e11d3e4b6e84805ef2911cc77 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9342/acef794c9225371e11d3e4b6e84805ef2911cc77/live.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2626, 67, 2738, 13623, 67, 3923, 12, 2890, 16, 589, 4672, 309, 486, 1140, 18, 803, 18, 1808, 12, 538, 18, 803, 18, 12287, 12, 803, 3719, 30, 12151, 12, 538, 18, 803, 18, 12287,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2626, 67, 2738, 13623, 67, 3923, 12, 2890, 16, 589, 4672, 309, 486, 1140, 18, 803, 18, 1808, 12, 538, 18, 803, 18, 12287, 12, 803, 3719, 30, 12151, 12, 538, 18, 803, 18, 12287,...
shutil.rmtree(TMPDIR, ignore_errors=True)
shutil.rmtree(TMPDIR, ignore_errors = True)
def clean_tmpdir(): if os.path.isdir(TMPDIR): shutil.rmtree(TMPDIR, ignore_errors=True)
49a8f8b77663338c17f1905de31637cf4e70a177 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1351/49a8f8b77663338c17f1905de31637cf4e70a177/helper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 67, 5645, 1214, 13332, 309, 1140, 18, 803, 18, 291, 1214, 12, 28259, 4537, 4672, 11060, 18, 86, 17371, 12, 28259, 4537, 16, 2305, 67, 4324, 273, 1053, 13, 282, 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, 2721, 67, 5645, 1214, 13332, 309, 1140, 18, 803, 18, 291, 1214, 12, 28259, 4537, 4672, 11060, 18, 86, 17371, 12, 28259, 4537, 16, 2305, 67, 4324, 273, 1053, 13, 282, 2, -100, -100, -10...
'text:style-name': 'rststyle-textbody'})
'text:style-name': 'rststyle-lineblock'})
def visit_line_block(self, node): #ipshell('At visit_line_block') s1 = node.astext() lines = s1.split('\n') el = self.append_child('text:p', attrib={ 'text:style-name': 'rststyle-textbody'}) el.text = lines[0] first = True if len(lines) > 1: for line in lines[1:]: if line == '': if first: first = False continue first = True el1 = SubElement(el, 'text:line-break') el1.tail = line
4faf6971101b60593e7441cf10e465a223402e92 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5620/4faf6971101b60593e7441cf10e465a223402e92/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 1369, 67, 2629, 12, 2890, 16, 756, 4672, 468, 625, 10304, 2668, 861, 3757, 67, 1369, 67, 2629, 6134, 272, 21, 273, 756, 18, 689, 408, 1435, 2362, 273, 272, 21, 18, 4939, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 1369, 67, 2629, 12, 2890, 16, 756, 4672, 468, 625, 10304, 2668, 861, 3757, 67, 1369, 67, 2629, 6134, 272, 21, 273, 756, 18, 689, 408, 1435, 2362, 273, 272, 21, 18, 4939, 26...
return swi.swi('OS_File', '5s;i', p) in [2, 3]
try: return swi.swi('OS_File', '5s;i', p) in [2, 3] except swi.error: return 0
def isdir(p): """
1b98592a77c77df4b3dffbab159ee7f4958e0e9f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/1b98592a77c77df4b3dffbab159ee7f4958e0e9f/riscospath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9783, 12, 84, 4672, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9783, 12, 84, 4672, 3536, 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, -10...
name))
requiringPo))
def _requiringFromTransaction(self, requiringPo, requirement, errorlist): """processes the dependency resolution for a dep where requiring package is in the transaction set""" (name, arch, epoch, version, release) = requiringPo.pkgtup (needname, needflags, needversion) = requirement checkdeps = 0 missingdep = 0 upgraded = {}
96c4e680bb57aed9d76204d59ba85b7eca6dcde8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5445/96c4e680bb57aed9d76204d59ba85b7eca6dcde8/depsolve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4523, 11256, 1265, 3342, 12, 2890, 16, 29468, 29198, 16, 12405, 16, 555, 1098, 4672, 3536, 18675, 326, 4904, 7861, 364, 279, 5993, 1625, 29468, 2181, 353, 316, 326, 2492, 444, 8395, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4523, 11256, 1265, 3342, 12, 2890, 16, 29468, 29198, 16, 12405, 16, 555, 1098, 4672, 3536, 18675, 326, 4904, 7861, 364, 279, 5993, 1625, 29468, 2181, 353, 316, 326, 2492, 444, 8395, ...
'/usr/include/db3',
'/usr/local/include/db3',
def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
a647e0fa3055513c79b00658bd623bf2157daa96 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a647e0fa3055513c79b00658bd623bf2157daa96/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.IntField.__init__(self, 169) else quickfix.IntField.__init__(self, 169, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 2872, 29, 13, 469, 9549, 904, 18, 1702, 974, 16186, 2738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 2872, 29, 13, 469, 9549, 904, 18, 1702, 974, 16186, 2738, ...
"""Return a list of all real repositories (i.e. excluding aliases)."""
"""Return a set of all real repositories (i.e. excluding aliases)."""
def get_real_repositories(self, authname): """Return a list of all real repositories (i.e. excluding aliases).""" repositories = set() for reponame in self.get_all_repositories(): try: repos = self.get_repository(reponame, authname) if repos is not None: repositories.add(repos) except TracError: "Skip invalid repositories" return repositories
461f5dc4e51d91f4653abb9d1d5bae0d4fd78afc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9317/461f5dc4e51d91f4653abb9d1d5bae0d4fd78afc/api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7688, 67, 26626, 12, 2890, 16, 1357, 529, 4672, 3536, 990, 279, 444, 434, 777, 2863, 14531, 261, 77, 18, 73, 18, 19560, 6900, 13, 12123, 14531, 273, 444, 1435, 364, 283, 500, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7688, 67, 26626, 12, 2890, 16, 1357, 529, 4672, 3536, 990, 279, 444, 434, 777, 2863, 14531, 261, 77, 18, 73, 18, 19560, 6900, 13, 12123, 14531, 273, 444, 1435, 364, 283, 500, ...
self.initfp(f)
try: self.initfp(f) except: if self._i_opened_the_file: f.close() raise
def __init__(self, f): self._i_opened_the_file = None if isinstance(f, basestring): f = __builtin__.open(f, 'rb') self._i_opened_the_file = f # else, assume it is an open file object already self.initfp(f)
ab1f4674ad14eb1430489a458c7654aa1ac9c51e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/ab1f4674ad14eb1430489a458c7654aa1ac9c51e/wave.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 284, 4672, 365, 6315, 77, 67, 25304, 67, 5787, 67, 768, 273, 599, 309, 1549, 12, 74, 16, 10699, 4672, 284, 273, 1001, 24553, 25648, 3190, 12, 74, 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, 1001, 2738, 972, 12, 2890, 16, 284, 4672, 365, 6315, 77, 67, 25304, 67, 5787, 67, 768, 273, 599, 309, 1549, 12, 74, 16, 10699, 4672, 284, 273, 1001, 24553, 25648, 3190, 12, 74, 16, 2...
def test404NonExistant(self):
def test404NonExistent(self):
def test404NonExistant(self): response = self.client.get('/datarequests/10000000000/') self.failUnlessEqual(response.status_code , 404)
f31e36862c952d11ec731bf6b3f2e4850c7323d1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2706/f31e36862c952d11ec731bf6b3f2e4850c7323d1/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 11746, 3989, 4786, 319, 12, 2890, 4672, 766, 273, 365, 18, 2625, 18, 588, 2668, 19, 892, 11420, 19, 23899, 9449, 2473, 13, 365, 18, 6870, 984, 2656, 5812, 12, 2740, 18, 2327, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 11746, 3989, 4786, 319, 12, 2890, 4672, 766, 273, 365, 18, 2625, 18, 588, 2668, 19, 892, 11420, 19, 23899, 9449, 2473, 13, 365, 18, 6870, 984, 2656, 5812, 12, 2740, 18, 2327, 67,...
def __load_modules(self): if self.kmod_srcdir:
def _load_modules(self): if self.kmod_srcdir and self.modules_build_succeed:
def __load_modules(self): if self.kmod_srcdir: load_kvm_modules(module_dir=self.kmod_srcdir, extra_modules=self.extra_modules) else: load_kvm_modules(module_dir=self.userspace_srcdir, extra_modules=self.extra_modules)
7f086351a5671c6cab0b425e56b647c8c4418ab1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10349/7f086351a5671c6cab0b425e56b647c8c4418ab1/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 945, 67, 6400, 12, 2890, 4672, 309, 365, 18, 79, 1711, 67, 4816, 1214, 471, 365, 18, 6400, 67, 3510, 67, 87, 5286, 5288, 30, 1262, 67, 79, 3489, 67, 6400, 12, 2978, 67, 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, 389, 945, 67, 6400, 12, 2890, 4672, 309, 365, 18, 79, 1711, 67, 4816, 1214, 471, 365, 18, 6400, 67, 3510, 67, 87, 5286, 5288, 30, 1262, 67, 79, 3489, 67, 6400, 12, 2978, 67, 1214, ...
async_count++; var name = "async_object_no_" + async_count; var f = asyncCallbackHandler(name, callback); asyncObj = getAsyncObject(f); eval(name + '=asyncObj;');
var id = async_id(); var f = asyncCallbackHandler(id); var asyncObj = getAsyncObject(f); async_oblist[id] = [asyncObj,callback];
def async_lib(): s = r"""
a3ff91a3ace186cba86f20991b852556b86c646a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/a3ff91a3ace186cba86f20991b852556b86c646a/js.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4326, 67, 2941, 13332, 272, 273, 436, 8395, 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, 4326, 67, 2941, 13332, 272, 273, 436, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
piecehash = sha.new()
piecehash = sha1.sha1()
def scan_file(self, filename, use_chunks=True, max_chunks=255, chunk_size=256, progresslistener=None): print "\nScanning file..." # Filename and size self.filename = os.path.basename(filename) self.size = int(os.stat(filename).st_size) # Calculate piece length if use_chunks: minlength = chunk_size*1024 self.piecelength = 1024 while self.size / self.piecelength > max_chunks or self.piecelength < minlength: self.piecelength *= 2 print "Using piecelength", self.piecelength, "(" + str(self.piecelength / 1024) + " KiB)" numpieces = self.size / self.piecelength if numpieces < 2: use_chunks = False # Hashes fp = open(filename, "rb") md5hash = md5.new() sha1hash = sha.new() sha256hash = None # Try to use hashlib try: md5hash = hashlib.md5() sha1hash = hashlib.sha1() sha256hash = hashlib.sha256() except: print "Hashlib not available. No support for SHA-256." piecehash = sha.new() piecenum = 0 length = 0 self.pieces = [] self.piecetype = "sha1" num_reads = math.ceil(self.size / 4096.0) reads_per_progress = int(math.ceil(num_reads / 100.0)) reads_left = reads_per_progress progress = 0 while True: data = fp.read(4096) if data == "": break # Progress updating if progresslistener: reads_left -= 1 if reads_left <= 0: reads_left = reads_per_progress progress += 1 result = progresslistener.Update(progress) if get_first(result) == False: print "Canceling scan!" return False # Process the data if md5hash != None: md5hash.update(data) if sha1hash != None: sha1hash.update(data) if sha256hash != None: sha256hash.update(data) if use_chunks: left = len(data) while left > 0: if length + left <= self.piecelength: piecehash.update(data) length += left left = 0 else: numbytes = self.piecelength - length piecehash.update(data[:numbytes]) length += numbytes data = data[numbytes:] left -= numbytes if length == self.piecelength: print "Done with piece hash", len(self.pieces) self.pieces.append(piecehash.hexdigest()) piecehash = sha.new() length = 0 if use_chunks: if length > 0: print "Done with piece hash", len(self.pieces) self.pieces.append(piecehash.hexdigest()) piecehash = sha.new() print "Total number of pieces:", len(self.pieces) fp.close() self.hashlist["md5"] = md5hash.hexdigest() self.hashlist["sha1"] = sha1hash.hexdigest() if sha256hash != None: self.hashlist["sha256"] = sha256hash.hexdigest()
2af4eda499322233eb01b256c6240b48cd0ad9f1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6425/2af4eda499322233eb01b256c6240b48cd0ad9f1/metalinkc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4135, 67, 768, 12, 2890, 16, 1544, 16, 999, 67, 14691, 33, 5510, 16, 943, 67, 14691, 33, 10395, 16, 2441, 67, 1467, 33, 5034, 16, 4007, 12757, 33, 7036, 4672, 1172, 1548, 82, 1541, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4135, 67, 768, 12, 2890, 16, 1544, 16, 999, 67, 14691, 33, 5510, 16, 943, 67, 14691, 33, 10395, 16, 2441, 67, 1467, 33, 5034, 16, 4007, 12757, 33, 7036, 4672, 1172, 1548, 82, 1541, 1...
'compatDisable' : 'wscript ../../tool/compatDisable.vbs'
'compatDisable' : 'wscript ../../tool/compatDisable.vbs', 'killSelenium' : 'wscript ../../tool/killselenium.vbs'
def __init__(self, testType="remote", seleniumConf=None, testConf=None, autConf=None, browserConf=None, mailConf=None): defaultSeleniumConf = { 'startSelenium' : 'java -jar ../../selenium/current/selenium-server.jar', 'seleniumHost' : 'http://localhost:4444' } defaultTestConf = { 'simulateTest' : False, 'getReportFrom' : 'testLog', 'testLogDir' : '../../logs', 'testReportDir' : '../../reports', #'classPath' : '../../selenium/current/selenium-java-client-driver.jar:../../rhino/current/js.jar', 'seleniumClientDriverJar' : '../../selenium/current/selenium-java-client-driver.jar', 'rhinoJar' : '../../rhino/current/js.jar', 'classPathSeparator' : ';', 'proxyEnable' : 'wscript ../../tool/proxyEnable.vbs', 'proxyDisable' : 'wscript ../../tool/proxyDisable.vbs', 'compatEnable' : 'wscript ../../tool/compatEnable.vbs', 'compatDisable' : 'wscript ../../tool/compatDisable.vbs' } self.testType = testType self.seleniumConf = self.getConfig(defaultSeleniumConf, seleniumConf) self.testConf = self.getConfig(defaultTestConf, testConf) self.mailConf = mailConf self.autConf = autConf self.browserConf = browserConf self.trunkrev = None self.buildStatus = {}
026c42e9c4f1c50b1d3bcb01734a6f1b07ab1969 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/026c42e9c4f1c50b1d3bcb01734a6f1b07ab1969/qxtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1842, 559, 1546, 7222, 3113, 29480, 3976, 33, 7036, 16, 1842, 3976, 33, 7036, 16, 2059, 3976, 33, 7036, 16, 4748, 3976, 33, 7036, 16, 4791, 3976, 33, 703...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 559, 1546, 7222, 3113, 29480, 3976, 33, 7036, 16, 1842, 3976, 33, 7036, 16, 2059, 3976, 33, 7036, 16, 4748, 3976, 33, 7036, 16, 4791, 3976, 33, 703...
sum1 = [x for x in range(len(fields)) if getattr(self, fields[x])][0] sum2 = [x for x in range(len(fields)) if getattr(other, fields[x])][0] return sum1 < sum2
try: most1 = [x for x in range(len(fields)) if getattr(self, fields[x])][0] except: most1 = 0 try: most2 = [x for x in range(len(fields)) if getattr(other, fields[x])][0] except: most2 = 0 return most1 < most2
def __cmp__(self, other): fields = ['image', 'classes', 'bundles', 'attributes', 'hostname'] sum1 = [x for x in range(len(fields)) if getattr(self, fields[x])][0] sum2 = [x for x in range(len(fields)) if getattr(other, fields[x])][0] return sum1 < sum2
9d37273b46ca395dd8b4dc6be38f77d1e4061098 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/9d37273b46ca395dd8b4dc6be38f77d1e4061098/Metadata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9625, 972, 12, 2890, 16, 1308, 4672, 1466, 273, 10228, 2730, 2187, 296, 4701, 2187, 296, 22773, 2187, 296, 4350, 2187, 296, 10358, 3546, 2142, 21, 273, 306, 92, 364, 619, 316, 1048...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9625, 972, 12, 2890, 16, 1308, 4672, 1466, 273, 10228, 2730, 2187, 296, 4701, 2187, 296, 22773, 2187, 296, 4350, 2187, 296, 10358, 3546, 2142, 21, 273, 306, 92, 364, 619, 316, 1048...
new_prodlot = prodlot_obj.create(cr, uid, {'name': sequence, 'ref': '%d'%idx})
new_prodlot = prodlot_obj.create(cr, uid, {'name': sequence, 'ref': '%d'%idx}, {'product_id': move.product_id.id})
def _track_lines(self, cr, uid, data, context): move_id = data['id'] pool = pooler.get_pool(cr.dbname) prodlot_obj = pool.get('stock.production.lot') move_obj = pool.get('stock.move') production_obj = pool.get('mrp.production') ir_sequence_obj = pool.get('ir.sequence') sequence = ir_sequence_obj.get(cr, uid, 'stock.lot.serial') if not sequence: raise wizard.except_wizard(_('Error!'), _('No production sequence defined')) if data['form']['tracking_prefix']: sequence=data['form']['tracking_prefix']+'/'+(sequence or '') move = move_obj.browse(cr, uid, [move_id])[0] quantity=data['form']['quantity'] if quantity <= 0 or move.product_qty == 0: return {} uos_qty=quantity/move.product_qty*move.product_uos_qty quantity_rest = move.product_qty%quantity uos_qty_rest = quantity_rest/move.product_qty*move.product_uos_qty update_val = { 'product_qty': quantity, 'product_uos_qty': uos_qty, } new_move = [] for idx in range(int(move.product_qty//quantity)): if idx: current_move = move_obj.copy(cr, uid, move.id, {'state': move.state, 'production_id': move.production_id.id}) new_move.append(current_move) else: current_move = move.id new_prodlot = prodlot_obj.create(cr, uid, {'name': sequence, 'ref': '%d'%idx}, {'product_id': move.product_id.id}) update_val['prodlot_id'] = new_prodlot move_obj.write(cr, uid, [current_move], update_val) production_ids = production_obj.search(cr, uid, [('move_lines', 'in', [move.id])]) if quantity_rest > 0: idx = int(move.product_qty//quantity) update_val['product_qty']=quantity_rest update_val['product_uos_qty']=uos_qty_rest if idx: current_move = move_obj.copy(cr, uid, move.id, {'state': move.state, 'production_id': move.production_id.id}) new_move.append(current_move) else: current_move = move.id new_prodlot = prodlot_obj.create(cr, uid, {'name': sequence, 'ref': '%d'%idx}) update_val['prodlot_id'] = new_prodlot move_obj.write(cr, uid, [current_move], update_val) products = production_obj.read(cr, uid, production_ids, ['move_lines']) for p in products: for new in new_move: if new not in p['move_lines']: p['move_lines'].append(new) production_obj.write(cr, uid, [p['id']], {'move_lines': [(6, 0, p['move_lines'])]}) return {}
412e0749805f48728706dab2d4bb4927b09da5c9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/412e0749805f48728706dab2d4bb4927b09da5c9/wizard_track_line.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4101, 67, 3548, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 3635, 67, 350, 273, 501, 3292, 350, 3546, 225, 2845, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4101, 67, 3548, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 3635, 67, 350, 273, 501, 3292, 350, 3546, 225, 2845, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979...
def random_element(self, type = "vector"):
def random_element(self, elem_type = "vector"):
def random_element(self, type = "vector"): """ Return a random element for self.
62424369e932ac59629cb4d40b7e47ae2a712293 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/62424369e932ac59629cb4d40b7e47ae2a712293/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2744, 67, 2956, 12, 2890, 16, 3659, 67, 723, 273, 315, 7737, 6, 4672, 3536, 2000, 279, 2744, 930, 364, 365, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2744, 67, 2956, 12, 2890, 16, 3659, 67, 723, 273, 315, 7737, 6, 4672, 3536, 2000, 279, 2744, 930, 364, 365, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.spam_folder = IMAPFolder(options["imap", "spam_folder"], self.imap_server, self.stats)
spam_folder_name = options["imap", "spam_folder"] if options["globals", "verbose"]: print "[imapfilter] spam folder:", spam_folder_name self.spam_folder = IMAPFolder( spam_folder_name, self.imap_server, self.stats)
def Filter(self): assert self.imap_server, "Cannot do anything without IMAP server." if not self.spam_folder: self.spam_folder = IMAPFolder(options["imap", "spam_folder"], self.imap_server, self.stats) if not self.unsure_folder: self.unsure_folder = IMAPFolder(options["imap", "unsure_folder"], self.imap_server, self.stats) ham_folder_name = options["imap", "ham_folder"] if ham_folder_name and not self.ham_folder: self.ham_folder = IMAPFolder(ham_folder_name, self.imap_server, self.stats)
c891a2b79be42129f3e0569e5483c731b4900168 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9857/c891a2b79be42129f3e0569e5483c731b4900168/sb_imapfilter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4008, 12, 2890, 4672, 1815, 365, 18, 12161, 67, 3567, 16, 315, 4515, 741, 6967, 2887, 6246, 2203, 1438, 1199, 309, 486, 365, 18, 1752, 301, 67, 5609, 30, 24824, 67, 5609, 67, 529, 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, 4008, 12, 2890, 4672, 1815, 365, 18, 12161, 67, 3567, 16, 315, 4515, 741, 6967, 2887, 6246, 2203, 1438, 1199, 309, 486, 365, 18, 1752, 301, 67, 5609, 30, 24824, 67, 5609, 67, 529, 273,...
CopyLog('chandler.log', log)
CopyLog(chandlerLog, log)
def doPerformanceTests(hardhatScript, mode, workingDir, outputDir, buildVersion, log): chandlerDir = os.path.join(workingDir, "chandler") testDir = os.path.join(chandlerDir, 'tools', 'QATestScripts', 'Performance') if buildenv['version'] == 'debug': python = buildenv['python_d'] pythonOpts = '' elif buildenv['version'] == 'release': python = buildenv['python'] pythonOpts = '-O' os.chdir(chandlerDir) result = 'success' testFiles = glob.glob(os.path.join(testDir, 'Perf*.py')) for testFile in testFiles: args = [python, pythonOpts, os.path.join(chandlerDir, 'Chandler.py'), '--create', '--profileDir=%s' % chandlerDir, '--scriptFile=%s' % testFile] try: try: os.remove('chandler.log') except OSError: pass outputlist = hardhatutil.executeCommandReturnOutput(args) # Hack: find if any line contains '#TINDERBOX# Status = FAILED' and # if so raise the exception to signal test failure for line in outputList: if line.find('#TINDERBOX# Status = FAIL') >= 0 or \ line.find('#TINDERBOX# Status = UNCHECKED') >= 0: raise hardhatutil.ExternalCommandErrorWithOutputList([0, outputList]) hardhatutil.dumpOutputList(outputlist, log) except hardhatutil.ExternalCommandErrorWithOutputList, e: print "perf tests failed", e log.write("***Error during performance tests***\n") log.write("Test log:\n") hardhatutil.dumpOutputList(e.outputList, log) log.write("exit code=%s\n" % e.args) log.write("NOTE: If the tests themselves passed but the exit code\n") log.write(" reports failure, it means a shutdown problem.\n") log.write("chandler.log:\n") try: CopyLog('chandler.log', log) except: pass forceBuildNextCycle(log, workingDir) return "test_failed" except Exception, e: print "perf tests failed", e log.write("***Error during performance tests***\n") log.write("Exception:\n") log.write(str(e) + "\n") forceBuildNextCycle(log, workingDir) return "test_failed" else: log.write("Performance tests exit code=0\n") return result
78f649aa26e0440cc322968217defb741c25dc9f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/78f649aa26e0440cc322968217defb741c25dc9f/newchandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 25024, 14650, 12, 20379, 11304, 3651, 16, 1965, 16, 5960, 1621, 16, 21412, 16, 1361, 1444, 16, 613, 4672, 462, 464, 749, 1621, 273, 1140, 18, 803, 18, 5701, 12, 20478, 1621, 16, 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, 741, 25024, 14650, 12, 20379, 11304, 3651, 16, 1965, 16, 5960, 1621, 16, 21412, 16, 1361, 1444, 16, 613, 4672, 462, 464, 749, 1621, 273, 1140, 18, 803, 18, 5701, 12, 20478, 1621, 16, 3...
binaries.append(p)
def doop_source(self, pkg):
0ef270283d494acfb65d58fb8123811e47c21a74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/0ef270283d494acfb65d58fb8123811e47c21a74/britney.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 556, 67, 3168, 12, 2890, 16, 3475, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 556, 67, 3168, 12, 2890, 16, 3475, 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, ...
def expand_directory(self, item, stop_when_image_found, go_buttons_enabled, update_title, print_found_msg):
def expand_directory(self, item, stop_when_image_found, go_buttons_enabled, update_window_title, print_found_msg):
def expand_directory(self, item, stop_when_image_found, go_buttons_enabled, update_title, print_found_msg): if self.stop_now == False and self.closing_app == False: folderlist = [] filelist = [] if os.access(item, os.R_OK) == False: return False for item2 in os.listdir(item): if item2[0] != '.' and self.closing_app == False: item2 = item + "/" + item2 item_fullpath2 = os.path.abspath(item2) if os.path.isfile(item_fullpath2): if self.valid_image(item_fullpath2) == True: filelist.append(item2) if stop_when_image_found == True: self.stop_now = True if self.verbose == True and print_found_msg == True: self.images_found += 1 print _("Found:"), item_fullpath2, "[" + str(self.images_found) + "]" elif os.path.isdir(item_fullpath2) and self.recursive == True: folderlist.append(item_fullpath2) # Sort the filelist and folderlist alphabetically, and recurse into folderlist: if len(filelist) > 0: filelist.sort(locale.strcoll) for item2 in filelist: if not item2 in self.image_list: self.image_list.append(item2) if go_buttons_enabled == False: if len(self.image_list) > 1: self.set_go_navigation_sensitivities(True) go_buttons_enabled = True if len(folderlist) > 0: folderlist.sort(locale.strcoll) for item2 in folderlist: self.expand_directory(item2, stop_when_image_found, go_buttons_enabled, update_title, print_found_msg) if update_title == True: self.set_window_title() if not self.closing_app: while gtk.events_pending(): gtk.main_iteration(True)
681ff2956bbe575389c88847543556c56536fcbf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/681ff2956bbe575389c88847543556c56536fcbf/mirage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4542, 67, 5149, 12, 2890, 16, 761, 16, 2132, 67, 13723, 67, 2730, 67, 7015, 16, 1960, 67, 16016, 67, 5745, 16, 1089, 67, 5668, 67, 2649, 16, 1172, 67, 7015, 67, 3576, 4672, 309, 365,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4542, 67, 5149, 12, 2890, 16, 761, 16, 2132, 67, 13723, 67, 2730, 67, 7015, 16, 1960, 67, 16016, 67, 5745, 16, 1089, 67, 5668, 67, 2649, 16, 1172, 67, 7015, 67, 3576, 4672, 309, 365,...
print "StreamRequest Refused"
print "StreamRequest REFUSED"
def _process(self): self.result = False self.myAgent.jabber.send(self.iq) #print "SIB SENT:", str(self.iq) msg = self._receive(True, 3) if msg: self.result = False if msg.getType() =="result": print "StreamRequest Agreed" print msg
9f0b7c0364d086fd6fa03dbe1cb839f880130866 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10121/9f0b7c0364d086fd6fa03dbe1cb839f880130866/Agent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 12, 2890, 4672, 365, 18, 2088, 273, 1083, 365, 18, 4811, 3630, 18, 78, 378, 744, 18, 4661, 12, 2890, 18, 18638, 13, 468, 1188, 315, 9894, 348, 2222, 2773, 16, 609, 12, 289...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2567, 12, 2890, 4672, 365, 18, 2088, 273, 1083, 365, 18, 4811, 3630, 18, 78, 378, 744, 18, 4661, 12, 2890, 18, 18638, 13, 468, 1188, 315, 9894, 348, 2222, 2773, 16, 609, 12, 289...
to_text = table + '\n\n' + to_text
to_text = table + "\n\n" + to_text
def treat(to_pl): try: to_text = to_pl.get() interwikis = to_pl.interwiki() except wikipedia.IsRedirectPage: pass from_pl = '' for interwiki in interwikis: if interwiki.code() == from_lang: from_pl = interwiki if from_pl == '': print 'Interwiki link to ' + from_lang + ' not found.' raise NoInterwiki('Interwiki link not found.') try: interwikis = to_pl.interwiki() except wikipedia.IsRedirectPage: pass from_text = from_pl.get() wikipedia.setAction(msg[msglang] + from_lang + ':' + from_pl.linkname()) # search start of table table = get_table(from_text) table = translate(table) # add table to top of the article, seperated by a blank lines to_text = table + '\n\n' + to_text if not debug: print 'Changing page %s' % (to_pl) to_pl.put(to_text)
4fdfce26072f0411d6e124ab82fef024a3154034 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/4fdfce26072f0411d6e124ab82fef024a3154034/copy_table.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10116, 12, 869, 67, 412, 4672, 775, 30, 358, 67, 955, 273, 358, 67, 412, 18, 588, 1435, 1554, 11999, 291, 273, 358, 67, 412, 18, 2761, 13044, 1435, 1335, 21137, 18, 2520, 5961, 1964, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10116, 12, 869, 67, 412, 4672, 775, 30, 358, 67, 955, 273, 358, 67, 412, 18, 588, 1435, 1554, 11999, 291, 273, 358, 67, 412, 18, 2761, 13044, 1435, 1335, 21137, 18, 2520, 5961, 1964, ...
if(button.rect.top == 130):
if(button.rect_in_container.top == 130):
def _cb_button_click_choice(self, button): global FIN_MC if(button.rect.top == 130): self.s_correct.play() FIN_MC = True # Damos por finalizada la pregunta else: self.s_incorrect.play()
cc6d24d8d879fb1634a3f01aabf0d4cf9bcdc9de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3492/cc6d24d8d879fb1634a3f01aabf0d4cf9bcdc9de/challenges.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7358, 67, 5391, 67, 7475, 67, 11569, 12, 2890, 16, 3568, 4672, 2552, 17563, 67, 20022, 309, 12, 5391, 18, 2607, 67, 267, 67, 3782, 18, 3669, 422, 404, 5082, 4672, 365, 18, 87, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7358, 67, 5391, 67, 7475, 67, 11569, 12, 2890, 16, 3568, 4672, 2552, 17563, 67, 20022, 309, 12, 5391, 18, 2607, 67, 267, 67, 3782, 18, 3669, 422, 404, 5082, 4672, 365, 18, 87, 6...
mysql_cur.execute("SELECT * FROM cc WHERE bug_id = %s" % bugid)
mysql_cur.execute("SELECT * FROM cc WHERE bug_id = %s", bugid)
def convert(_db, _host, _user, _password, _env, _force): activityFields = FieldTranslator() # account for older versions of bugzilla if BZ_VERSION == '2.11': print 'Using Buzvilla v%s schema.' % BZ_VERSION activityFields['removed'] = 'oldvalue' activityFields['added'] = 'newvalue' # init Bugzilla environment print "Bugzilla MySQL('%s':'%s':'%s':'%s'): connecting..." % (_db, _host, _user, _password) mysql_con = MySQLdb.connect(host=_host, user=_user, passwd=_password, db=_db, compress=1, cursorclass=MySQLdb.cursors.DictCursor) mysql_cur = mysql_con.cursor() # init Trac environment print "Trac SQLite('%s'): connecting..." % (_env) trac = TracDatabase(_env) # force mode... if _force == 1: print "cleaning all tickets..." c = trac.db().cursor() c.execute("""DELETE FROM ticket_change""") trac.db().commit() c.execute("""DELETE FROM ticket""") trac.db().commit() c.execute("""DELETE FROM attachment""") os.system('rm -rf %s' % trac.env.get_attachments_dir()) os.mkdir(trac.env.get_attachments_dir()) trac.db().commit() print print "1. import severities..." severities = (('blocker', '1'), ('critical', '2'), ('major', '3'), ('normal', '4'), ('minor', '5'), ('trivial', '6'), ('enhancement', '7')) trac.setSeverityList(severities) print print "2. import components..." sql = "SELECT value, initialowner AS owner FROM components" if PRODUCTS: sql += " WHERE %s" % productFilter('program', PRODUCTS) mysql_cur.execute(sql) components = mysql_cur.fetchall() for component in components: component['owner'] = trac.getLoginName(mysql_cur, component['owner']) trac.setComponentList(components, 'value') print print "3. import priorities..." priorities = (('P1', '1'), ('P2', '2'), ('P3', '3'), ('P4', '4'), ('P5', '5')) trac.setPriorityList(priorities) print print "4. import versions..." sql = "SELECT DISTINCTROW value FROM versions" if PRODUCTS: sql += " WHERE %s" % productFilter('program', PRODUCTS) mysql_cur.execute(sql) versions = mysql_cur.fetchall() trac.setVersionList(versions, 'value') print print "5. import milestones..." mysql_cur.execute("SELECT value FROM milestones") milestones = mysql_cur.fetchall() if milestones[0] == '---': trac.setMilestoneList(milestones, 'value') else: trac.setMilestoneList([], '') print print '6. retrieving bugs...' sql = "SELECT * FROM bugs " if PRODUCTS: sql += " WHERE %s" % productFilter('product', PRODUCTS) sql += " ORDER BY bug_id" mysql_cur.execute(sql) bugs = mysql_cur.fetchall() print print "7. import bugs and bug activity..." for bug in bugs: bugid = bug['bug_id'] ticket = {} keywords = [] ticket['id'] = bugid ticket['time'] = bug['creation_ts'] ticket['changetime'] = bug['delta_ts'] ticket['component'] = bug['component'] ticket['severity'] = bug['bug_severity'] ticket['priority'] = bug['priority'] ticket['owner'] = trac.getLoginName(mysql_cur, bug['assigned_to']) ticket['reporter'] = trac.getLoginName(mysql_cur, bug['reporter']) mysql_cur.execute("SELECT * FROM cc WHERE bug_id = %s" % bugid) cc_records = mysql_cur.fetchall() cc_list = [] for cc in cc_records: cc_list.append(trac.getLoginName(mysql_cur, cc['who'])) ticket['cc'] = string.join(cc_list, ', ') ticket['version'] = bug['version'] if bug['target_milestone'] == '---': ticket['milestone'] = '' else: ticket['milestone'] = bug['target_milestone'] bug_status = bug['bug_status'].lower() ticket['status'] = statusXlator[bug_status] ticket['resolution'] = bug['resolution'].lower() # a bit of extra work to do open tickets if bug_status == 'open': if owner != '': ticket['status'] = 'assigned' else: ticket['status'] = 'new' ticket['summary'] = bug['short_desc'] keywords = string.split(bug['keywords'], ' ') mysql_cur.execute("SELECT * FROM longdescs WHERE bug_id = %s" % bugid) longdescs = list(mysql_cur.fetchall()) # check for empty 'longdescs[0]' field... if len(longdescs) == 0: ticket['description'] = '' else: ticket['description'] = longdescs[0]['thetext'] del longdescs[0] for desc in longdescs: ignore = False for comment in IGNORE_COMMENTS: if re.match(comment, desc['thetext']): ignore = True if ignore: continue trac.addTicketComment(ticket=bugid, time=desc['bug_when'], author=trac.getLoginName(mysql_cur, desc['who']), value=desc['thetext']) mysql_cur.execute("SELECT * FROM bugs_activity WHERE bug_id = %s ORDER BY bug_when" % bugid) bugs_activity = mysql_cur.fetchall() resolution = '' ticketChanges = [] for activity in bugs_activity: field_name = trac.getFieldName(mysql_cur, activity['fieldid']).lower() removed = activity[activityFields['removed']] added = activity[activityFields['added']] # statuses and resolutions are in lowercase in trac if field_name == 'resolution' or field_name == 'bug_status': removed = removed.lower() added = added.lower() # remember most recent resolution, we need this later if field_name == 'resolution': resolution = added.lower() keywordChange = False oldKeywords = string.join(keywords, " ") # convert bugzilla field names... if field_name == 'bug_severity': field_name = 'severity' elif field_name == 'assigned_to': field_name = 'owner' elif field_name == 'bug_status': field_name = 'status' if removed in STATUS_KEYWORDS: kw = STATUS_KEYWORDS[removed] if kw in keywords: keywords.remove(kw) else: oldKeywords = string.join(keywords + [ kw ], " ") keywordChange = True if added in STATUS_KEYWORDS: kw = STATUS_KEYWORDS[added] keywords.append(kw) keywordChange = True added = statusXlator[added] removed = statusXlator[removed] elif field_name == 'short_desc': field_name = 'summary' elif field_name == 'product': if removed in PRODUCT_KEYWORDS: kw = PRODUCT_KEYWORDS[removed] if kw in keywords: keywords.remove(kw) else: oldKeywords = string.join(keywords + [ kw ], " ") keywordChange = True if added in PRODUCT_KEYWORDS: kw = PRODUCT_KEYWORDS[added] keywords.append(kw) keywordChange = True ticketChange = {} ticketChange['ticket'] = bugid ticketChange['time'] = activity['bug_when'] ticketChange['author'] = trac.getLoginName(mysql_cur, activity['who']) ticketChange['field'] = field_name ticketChange['oldvalue'] = removed ticketChange['newvalue'] = added if keywordChange: newKeywords = string.join(keywords, " ") ticketChangeKw = ticketChange ticketChangeKw['field'] = 'keywords' ticketChangeKw['oldvalue'] = oldKeywords ticketChangeKw['newvalue'] = newKeywords #trac.addTicketChange(ticket=bugid, time=activity['bug_when'], # author=trac.getLoginName(mysql_cur, activity['who']), # field='keywords', oldvalue=oldKeywords, newvalue=newKeywords) ticketChanges.append(ticketChangeKw) if field_name in IGNORED_ACTIVITY_FIELDS: continue # skip changes that have no effect (think translation!) if added == removed: continue # bugzilla splits large summary changes into two records for oldChange in ticketChanges: if (field_name == 'summary' and oldChange['field'] == ticketChange['field'] and oldChange['time'] == ticketChange['time'] and oldChange['author'] == ticketChange['author']): oldChange['oldvalue'] += " " + ticketChange['oldvalue'] oldChange['newvalue'] += " " + ticketChange['newvalue'] break else: #trac.addTicketChange(ticket=bugid, time=activity['bug_when'], # author=trac.getLoginName(mysql_cur, activity['who']), # field=field_name, oldvalue=removed, newvalue=added) ticketChanges.append (ticketChange) for ticketChange in ticketChanges: trac.addTicketChange (**ticketChange) # for some reason, bugzilla v2.11 seems to clear the resolution # when you mark a bug as closed. let's remember it and restore # it if the ticket is closed but there's no resolution. if not ticket['resolution'] and ticket['status'] == 'closed': ticket['resolution'] = resolution if bug['bug_status'] in STATUS_KEYWORDS: kw = STATUS_KEYWORDS[bug['bug_status']] # may have already been added during activity import if kw not in keywords: keywords.append(kw) if bug['product'] in PRODUCT_KEYWORDS: kw = PRODUCT_KEYWORDS[bug['product']] # may have already been added during activity import if kw not in keywords: keywords.append(kw) mysql_cur.execute("SELECT * FROM attachments WHERE bug_id = %s" % bugid) attachments = mysql_cur.fetchall() for a in attachments: author = trac.getLoginName(mysql_cur, a['submitter_id']) tracAttachment = Attachment(a['filename'], a['thedata']) trac.addAttachment(bugid, tracAttachment, a['description'], author) ticket['keywords'] = string.join(keywords) ticketid = trac.addTicket(**ticket) print "Success!"
d0a718cdc641402f4871e728629c7ce1e81b3158 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/d0a718cdc641402f4871e728629c7ce1e81b3158/bugzilla2trac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 24899, 1966, 16, 389, 2564, 16, 389, 1355, 16, 389, 3664, 16, 389, 3074, 16, 389, 5734, 4672, 5728, 2314, 273, 2286, 12233, 1435, 225, 468, 2236, 364, 12156, 5244, 434, 7934, 15990...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 24899, 1966, 16, 389, 2564, 16, 389, 1355, 16, 389, 3664, 16, 389, 3074, 16, 389, 5734, 4672, 5728, 2314, 273, 2286, 12233, 1435, 225, 468, 2236, 364, 12156, 5244, 434, 7934, 15990...
'lang': Unicode, 'language': Unicode, 'link': Unicode, 'longdesc': Unicode, 'marginheight': Unicode, 'marginwidth': Unicode, 'maxlength': Unicode, 'media': Unicode, 'method': Unicode,
'lang': String, 'language': String, 'link': String, 'longdesc': URI, 'marginheight': Integer, 'marginwidth': Integer, 'maxlength': Integer, 'media': String, 'method': String,
def encode(value): return value
c802a777b027205443eadd7a1022a19096f8674b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12681/c802a777b027205443eadd7a1022a19096f8674b/schema.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2017, 12, 1132, 4672, 327, 460, 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, 2017, 12, 1132, 4672, 327, 460, 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, -10...
self.miller_set = self.construct_miller_set()
self.miller_set, self.free_flags_for_f_atoms = self.construct_miller_set(True)
def compute_f_atoms(self): """Get f calc from the xray structure""" if self.miller_set is None: self.miller_set = self.construct_miller_set() tmp = self.miller_set.structure_factors_from_scatterers( xray_structure = self.xray_structure ) f_atoms = tmp.f_calc() return f_atoms
97587dac2238019ad20934209e113db575aba440 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/696/97587dac2238019ad20934209e113db575aba440/twin_f_model.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 67, 74, 67, 14937, 12, 2890, 4672, 3536, 967, 284, 7029, 628, 326, 619, 435, 3695, 8395, 309, 365, 18, 81, 24462, 67, 542, 353, 599, 30, 365, 18, 81, 24462, 67, 542, 16, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 67, 74, 67, 14937, 12, 2890, 4672, 3536, 967, 284, 7029, 628, 326, 619, 435, 3695, 8395, 309, 365, 18, 81, 24462, 67, 542, 353, 599, 30, 365, 18, 81, 24462, 67, 542, 16, 365, ...
a_stat = statcache.stat(a_path)
a_stat = os.stat(a_path)
def phase2(self): # Distinguish files, directories, funnies self.common_dirs = [] self.common_files = [] self.common_funny = []
a7087d0f5a4e57594c0ede8137bd2e4abdbd916f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a7087d0f5a4e57594c0ede8137bd2e4abdbd916f/filecmp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6855, 22, 12, 2890, 4672, 468, 19893, 14344, 1468, 1390, 16, 6402, 16, 9831, 82, 606, 365, 18, 6054, 67, 8291, 273, 5378, 365, 18, 6054, 67, 2354, 273, 5378, 365, 18, 6054, 67, 12125, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6855, 22, 12, 2890, 4672, 468, 19893, 14344, 1468, 1390, 16, 6402, 16, 9831, 82, 606, 365, 18, 6054, 67, 8291, 273, 5378, 365, 18, 6054, 67, 2354, 273, 5378, 365, 18, 6054, 67, 12125, ...
return coords[2] - 6
return coords[0] + self._ARROWWIDTH
def _x(self): coords = self._canvas.bbox(self._TAG) assert coords return coords[2] - 6 # BAW: kludge
b5d3dfa0fc243824fd8097dc3b4950e5aafd4feb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b5d3dfa0fc243824fd8097dc3b4950e5aafd4feb/StripViewer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 92, 12, 2890, 4672, 6074, 273, 365, 6315, 15424, 18, 20737, 12, 2890, 6315, 7927, 13, 1815, 6074, 327, 6074, 63, 20, 65, 397, 365, 6315, 985, 11226, 10023, 8227, 468, 605, 12999, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 92, 12, 2890, 4672, 6074, 273, 365, 6315, 15424, 18, 20737, 12, 2890, 6315, 7927, 13, 1815, 6074, 327, 6074, 63, 20, 65, 397, 365, 6315, 985, 11226, 10023, 8227, 468, 605, 12999, ...
context.get('language', 'en_US'), ids)
context.get('language', False) or 'en_US', ids)
def _read_flat(self, cursor, user, ids, fields_names, context=None, load='_classic_read'): if context is None: context = {} if not ids: return []
69b82031339dcc0e185837a53f85750d4c52e1d6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/69b82031339dcc0e185837a53f85750d4c52e1d6/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 15401, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 1466, 67, 1973, 16, 819, 33, 7036, 16, 1262, 2218, 67, 1106, 335, 67, 896, 11, 4672, 309, 819, 353, 599, 30, 819, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 15401, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 1466, 67, 1973, 16, 819, 33, 7036, 16, 1262, 2218, 67, 1106, 335, 67, 896, 11, 4672, 309, 819, 353, 599, 30, 819, 27...
reads, writes, excepts = select.select(rList, wList, eList, timeout)
try: reads, writes, excepts = select.select(rList, wList, eList, timeout) except select.error, info: (errno, errText) = info if errno == 4: continue else: raise
def __LoopStandalone(self): self.continueLooping = 1 while self.continueLooping: rList = self.readEvents.keys() wList = self.writeEvents.keys() eList = self.exceptEvents.keys()
9e1e6718ee9c3f89cc91ca6a94e55d52c0187a13 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7565/9e1e6718ee9c3f89cc91ca6a94e55d52c0187a13/erl_eventhandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 6452, 20612, 12451, 12, 2890, 4672, 365, 18, 17143, 6452, 310, 273, 404, 1323, 365, 18, 17143, 6452, 310, 30, 436, 682, 273, 365, 18, 896, 3783, 18, 2452, 1435, 341, 682, 273, 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, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 6452, 20612, 12451, 12, 2890, 4672, 365, 18, 17143, 6452, 310, 273, 404, 1323, 365, 18, 17143, 6452, 310, 30, 436, 682, 273, 365, 18, 896, 3783, 18, 2452, 1435, 341, 682, 273, 36...
create_html_link(self.build_search_url(p="recid:%d" % recID, rm="wrd",
create_html_link(self.build_search_url(p="recid:%d" % recID, rm="wrd",
def tmpl_print_record_brief_links(self, ln, recID, weburl): """Displays links for brief record on-the-fly
d80e9e5b545268d60103014de3d2c09f38531285 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2139/d80e9e5b545268d60103014de3d2c09f38531285/websearch_templates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 1188, 67, 3366, 67, 25888, 67, 7135, 12, 2890, 16, 7211, 16, 1950, 734, 16, 3311, 718, 4672, 3536, 16900, 4716, 364, 324, 17802, 1409, 603, 17, 5787, 17, 29670, 2, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 1188, 67, 3366, 67, 25888, 67, 7135, 12, 2890, 16, 7211, 16, 1950, 734, 16, 3311, 718, 4672, 3536, 16900, 4716, 364, 324, 17802, 1409, 603, 17, 5787, 17, 29670, 2, -100, -10...
tmp = [x for x in self.lastroot.value.split(';') if x != '']
tmp = [x for x in config.radio.lastroot.value.split(';') if x != '']
def restoreRoot(self): tmp = [x for x in self.lastroot.value.split(';') if x != ''] current = [x.toString() for x in self.servicePath] if tmp != current or self.rootChanged: cnt = 0 for i in tmp: self.servicePathRadio.append(eServiceReference(i)) cnt += 1 if cnt: path = self.servicePathRadio.pop() self.enterPath(path) else: self.showFavourites() self.saveRoot() self.rootChanged = False
c372fb3326e2c8386eb34723ea7cf354642aaa99 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/c372fb3326e2c8386eb34723ea7cf354642aaa99/ChannelSelection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5217, 2375, 12, 2890, 4672, 1853, 273, 306, 92, 364, 619, 316, 642, 18, 17006, 18, 2722, 3085, 18, 1132, 18, 4939, 2668, 4359, 13, 309, 619, 480, 875, 65, 783, 273, 306, 92, 18, 1049...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2375, 12, 2890, 4672, 1853, 273, 306, 92, 364, 619, 316, 642, 18, 17006, 18, 2722, 3085, 18, 1132, 18, 4939, 2668, 4359, 13, 309, 619, 480, 875, 65, 783, 273, 306, 92, 18, 1049...
btags = btags + '.' * lb
btags += '+' * lb
def fancy_replace(a, alo, ahi, b, blo, bhi): if TRACE: print '*** fancy_replace', alo, ahi, blo, bhi dump('>', a, alo, ahi) dump('<', b, blo, bhi) # don't synch up unless the lines have a similarity score of at # least cutoff; best_ratio tracks the best score seen so far best_ratio, cutoff = 0.74, 0.75 cruncher = SequenceMatcher(IS_CHARACTER_JUNK) eqi, eqj = None, None # 1st indices of equal lines (if any) # search for the pair that matches best without being identical # (identical lines must be junk lines, & we don't want to synch up # on junk -- unless we have to) for j in xrange(blo, bhi): bj = b[j] cruncher.set_seq2(bj) for i in xrange(alo, ahi): ai = a[i] if ai == bj: if eqi is None: eqi, eqj = i, j continue cruncher.set_seq1(ai) # computing similarity is expensive, so use the quick # upper bounds first -- have seen this speed up messy # compares by a factor of 3. # note that ratio() is only expensive to compute the first # time it's called on a sequence pair; the expensive part # of the computation is cached by cruncher if cruncher.real_quick_ratio() > best_ratio and \ cruncher.quick_ratio() > best_ratio and \ cruncher.ratio() > best_ratio: best_ratio, best_i, best_j = cruncher.ratio(), i, j if best_ratio < cutoff: # no non-identical "pretty close" pair if eqi is None: # no identical pair either -- treat it as a straight replace plain_replace(a, alo, ahi, b, blo, bhi) return # no close pair, but an identical pair -- synch up on that best_i, best_j, best_ratio = eqi, eqj, 1.0 else: # there's a close pair, so forget the identical pair (if any) eqi = None # a[best_i] very similar to b[best_j]; eqi is None iff they're not # identical if TRACE: print '*** best_ratio', best_ratio, best_i, best_j dump('>', a, best_i, best_i+1) dump('<', b, best_j, best_j+1) # pump out diffs from before the synch point fancy_helper(a, alo, best_i, b, blo, best_j) # do intraline marking on the synch pair aelt, belt = a[best_i], b[best_j] if eqi is None: # pump out a '-', '+', '?' triple for the synched lines; atags = btags = "" cruncher.set_seqs(aelt, belt) for tag, ai1, ai2, bj1, bj2 in cruncher.get_opcodes(): la, lb = ai2 - ai1, bj2 - bj1 if tag == 'replace': atags = atags + '.' * la btags = btags + '.' * lb elif tag == 'delete': atags = atags + '.' * la elif tag == 'insert': btags = btags + '.' * lb elif tag == 'equal': atags = atags + ' ' * la btags = btags + ' ' * lb else: raise ValueError, 'unknown tag ' + `tag` la, lb = len(atags), len(btags) if la < lb: atags = atags + ' ' * (lb - la) elif lb < la: btags = btags + ' ' * (la - lb) combined = map(lambda x,y: _combine[x+y], atags, btags) printq(aelt, belt, string.rstrip(string.join(combined, ''))) else: # the synch pair is identical print ' ', aelt, # pump out diffs from after the synch point fancy_helper(a, best_i+1, ahi, b, best_j+1, bhi)
df515be0d6b1ab35a9760d6fd5114726eccf14b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/df515be0d6b1ab35a9760d6fd5114726eccf14b1/ndiff.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31701, 67, 2079, 12, 69, 16, 279, 383, 16, 279, 12266, 16, 324, 16, 324, 383, 16, 324, 12266, 4672, 309, 12734, 30, 1172, 296, 14465, 31701, 67, 2079, 2187, 279, 383, 16, 279, 12266, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31701, 67, 2079, 12, 69, 16, 279, 383, 16, 279, 12266, 16, 324, 16, 324, 383, 16, 324, 12266, 4672, 309, 12734, 30, 1172, 296, 14465, 31701, 67, 2079, 2187, 279, 383, 16, 279, 12266, ...
arg = command line argument to add value = value to pass to the argument (None for no argument)
arg = command line argument to add. value = value to pass to the argument (None for no argument).
def add_arg(self, arg, value): """ Add a command line argument to the executable. arg = command line argument to add value = value to pass to the argument (None for no argument) """ self.__arguments[arg] = value
43adc4d722e280c921ddb7c38f99393e57936591 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3589/43adc4d722e280c921ddb7c38f99393e57936591/pipeline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 3175, 12, 2890, 16, 1501, 16, 460, 4672, 3536, 1436, 279, 1296, 980, 1237, 358, 326, 9070, 18, 1501, 273, 1296, 980, 1237, 358, 527, 18, 460, 273, 460, 358, 1342, 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, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 3175, 12, 2890, 16, 1501, 16, 460, 4672, 3536, 1436, 279, 1296, 980, 1237, 358, 326, 9070, 18, 1501, 273, 1296, 980, 1237, 358, 527, 18, 460, 273, 460, 358, 1342, 358, 326, ...
for child in node.childNodes: node.removeChild(child)
while node.childNodes.length: node.removeChild(node.firstChild)
def clearNode(node): """ Remove all children from the given node. """ if node.hasChildNodes(): for child in node.childNodes: node.removeChild(child)
78fa117caf0b47607cbedce4e06d720ca32eb070 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/78fa117caf0b47607cbedce4e06d720ca32eb070/domhelpers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2424, 907, 12, 2159, 4672, 3536, 3581, 777, 2325, 628, 326, 864, 756, 18, 3536, 309, 756, 18, 5332, 22460, 13332, 1323, 756, 18, 3624, 3205, 18, 2469, 30, 756, 18, 4479, 1763, 12, 2159...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2424, 907, 12, 2159, 4672, 3536, 3581, 777, 2325, 628, 326, 864, 756, 18, 3536, 309, 756, 18, 5332, 22460, 13332, 1323, 756, 18, 3624, 3205, 18, 2469, 30, 756, 18, 4479, 1763, 12, 2159...
command = '%s %s' % (executable,jobArguments)
command = [ executable, jobArguments ]
def execute(self, arguments): """The main execution method of the Job Wrapper """ self.log.info('Job Wrapper is starting execution phase for job %s' %(self.jobID)) os.environ['DIRACROOT'] = self.localSiteRoot self.log.verbose('DIRACROOT = %s' %(self.localSiteRoot)) os.environ['DIRACPYTHON'] = sys.executable self.log.verbose('DIRACPYTHON = %s' %(sys.executable)) os.environ['DIRACSITE'] = self.localSite self.log.verbose('DIRACSITE = %s' %(self.localSite))
ff44fc4c4b3f86e39e0e5f22da442e9d516c0f5a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/ff44fc4c4b3f86e39e0e5f22da442e9d516c0f5a/JobWrapper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 1775, 4672, 3536, 1986, 2774, 4588, 707, 434, 326, 3956, 18735, 3536, 365, 18, 1330, 18, 1376, 2668, 2278, 18735, 353, 5023, 4588, 6855, 364, 1719, 738, 87, 11, 8975,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 1775, 4672, 3536, 1986, 2774, 4588, 707, 434, 326, 3956, 18735, 3536, 365, 18, 1330, 18, 1376, 2668, 2278, 18735, 353, 5023, 4588, 6855, 364, 1719, 738, 87, 11, 8975,...
print 'Cannot open file ' + file + ' for reading'
print 'Cannot open file ' + filename + ' for reading'
def process_project_file(filename): '''Process a given project file. The method opens the original file for reading. And writes changes to new file. Only after succesful modifications the original file is overwritten. ''' outfile = filename + '.bak' try: #print 'Opening file ' + filename + ' for parsing...' fread = open(filename, 'r') except IOError, (errno, strerror): print 'Cannot open file ' + file + ' for reading' print 'Error: ' + strerror return False try: fwrite = open(outfile, 'w') except IOError, (errno, strerror): print 'Cannot open file ' + infile + ' for writing' print 'Error: ' + strerror fread.close() return False print 'Parse VS project file...' dom = minidom.parse(fread) print 'Checking project file version...', proj_version = determine_project_version(dom) if proj_version == '8.00' or proj_version == '9.00': print 'Detected VS ' + proj_version succeeded = add_manifest(dom) if succeeded: xml_str = dom.toprettyxml() fwrite.write(xml_str) fwrite.close() else: print 'Not supported VS project file!' return False shutil.move(outfile, filename) return True
3d2905f0f65bfe52f6d82bd3edc087b4121dd6ea /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5857/3d2905f0f65bfe52f6d82bd3edc087b4121dd6ea/fix_manifest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 4406, 67, 768, 12, 3459, 4672, 9163, 2227, 279, 864, 1984, 585, 18, 225, 1021, 707, 10400, 326, 2282, 585, 364, 6453, 18, 7835, 7262, 3478, 358, 394, 585, 18, 5098, 1839, 866...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 4406, 67, 768, 12, 3459, 4672, 9163, 2227, 279, 864, 1984, 585, 18, 225, 1021, 707, 10400, 326, 2282, 585, 364, 6453, 18, 7835, 7262, 3478, 358, 394, 585, 18, 5098, 1839, 866...
def _check_stdtridf(self):
def check_stdtridf(self):
def _check_stdtridf(self): cephes.stdtridf(0.7,1)
2a0571808f9b68627e9152f6f1037281e69d9d98 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/2a0571808f9b68627e9152f6f1037281e69d9d98/test_cephes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 5084, 313, 350, 74, 12, 2890, 4672, 5898, 844, 281, 18, 5084, 313, 350, 74, 12, 20, 18, 27, 16, 21, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 866, 67, 5084, 313, 350, 74, 12, 2890, 4672, 5898, 844, 281, 18, 5084, 313, 350, 74, 12, 20, 18, 27, 16, 21, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
lineNo = int(dlg.GetValue())
lineNo = int(dlg.GetValue()) - 1
def OnGotoLine(self, event): dlg = wx.TextEntryDialog(self, 'Enter line number:', 'Goto line', '') try: if dlg.ShowModal() == wx.ID_OK: if dlg.GetValue(): try: lineNo = int(dlg.GetValue()) except ValueError: wx.LogError('Integer line number required') else: self.GotoLine(lineNo) finally: dlg.Destroy()
8767faf4ac1cda481bd3f69f905bbc3a43d10167 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/8767faf4ac1cda481bd3f69f905bbc3a43d10167/SourceViews.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 43, 6302, 1670, 12, 2890, 16, 871, 4672, 25840, 273, 7075, 18, 1528, 1622, 6353, 12, 2890, 16, 296, 10237, 980, 1300, 30, 2187, 296, 43, 6302, 980, 2187, 28707, 775, 30, 309, 258...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 43, 6302, 1670, 12, 2890, 16, 871, 4672, 25840, 273, 7075, 18, 1528, 1622, 6353, 12, 2890, 16, 296, 10237, 980, 1300, 30, 2187, 296, 43, 6302, 980, 2187, 28707, 775, 30, 309, 258...
x = 1 self.assert_('x' in dir())
self.assertRaises(TypeError, dir, 42, 42) local_var = 1 self.assert_('local_var' in dir())
def test_dir(self): x = 1 self.assert_('x' in dir()) import sys self.assert_('modules' in dir(sys)) self.assertRaises(TypeError, dir, 42, 42)
26e1e03d92483262f97843eb00ceee312734e071 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/26e1e03d92483262f97843eb00ceee312734e071/test_builtin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1214, 12, 2890, 4672, 225, 365, 18, 11231, 12649, 6141, 12, 19030, 16, 1577, 16, 14856, 16, 14856, 13, 282, 1191, 67, 1401, 273, 404, 365, 18, 11231, 67, 2668, 3729, 67, 1401...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1214, 12, 2890, 4672, 225, 365, 18, 11231, 12649, 6141, 12, 19030, 16, 1577, 16, 14856, 16, 14856, 13, 282, 1191, 67, 1401, 273, 404, 365, 18, 11231, 67, 2668, 3729, 67, 1401...
if filename:
if (state in ('stopped', 'finished', 'uploading', 'uploading-paused') and filename):
def upgrade89(cursor): """Set videoFilename column for downloaded items.""" import datetime from miro.plat.utils import FilenameType # for Items, calculate from the downloader for row in cursor.execute("SELECT id, downloader_id FROM item " "WHERE NOT is_file_item AND videoFilename = ''").fetchall(): item_id, downloader_id = row if downloader_id is None: continue cursor.execute("SELECT status FROM remote_downloader " "WHERE id=?", (downloader_id,)) status = cursor.fetchall()[0][0] status = eval(status, __builtins__, {'datetime': datetime}) filename = status.get('filename') if filename: if FilenameType is not unicode: filename = filename.decode('utf-8') cursor.execute("UPDATE item SET videoFilename=? WHERE id=?", (filename, item_id)) # for FileItems, just copy from filename cursor.execute("UPDATE item set videoFilename=filename " "WHERE is_file_item")
82637e37a42fc943f9a7fd7491366d808848504f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/82637e37a42fc943f9a7fd7491366d808848504f/databaseupgrade.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8400, 6675, 12, 9216, 4672, 3536, 694, 6191, 5359, 1057, 364, 13549, 1516, 12123, 1930, 3314, 628, 312, 11373, 18, 412, 270, 18, 5471, 1930, 16671, 559, 225, 468, 364, 10240, 16, 4604, 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, 8400, 6675, 12, 9216, 4672, 3536, 694, 6191, 5359, 1057, 364, 13549, 1516, 12123, 1930, 3314, 628, 312, 11373, 18, 412, 270, 18, 5471, 1930, 16671, 559, 225, 468, 364, 10240, 16, 4604, 6...
if distro not in distros: distro = defaultdistro
if not distro: checkdists = searchdistros elif distro not in distros: checkdists = [defaultdistro] else: checkdists = [distro]
def pkginfo(pkg): _pkg = ''.join([x for x in pkg.strip().split(None,1)[0] if x.isalnum() or x in '.-']) distro = defaultdistro if len(pkg.strip().split()) > 1: distro = ''.join([x for x in pkg.strip().split(None,2)[1] if x.isalnum() or x in '-.']) if distro not in distros: distro = defaultdistro pkg = _pkg data = commands.getoutput(aptcommand % (distro, distro, distro, 'show', pkg)) data2 = commands.getoutput(aptcommand % (distro, distro, distro, 'showsrc', pkg)) if not data or 'E: No packages found' in data: return 'Package %s does not exist in %s' % (pkg, distro) maxp = {'Version': '0'} packages = [x.strip() for x in data.split('\n\n')] for p in packages: if not p.strip(): continue parser = FeedParser.FeedParser() parser.feed(p) p = parser.close() if apt_pkg.VersionCompare(maxp['Version'], p['Version']) < 0: maxp = p del parser maxp2 = {'Version': '0'} packages2 = [x.strip() for x in data2.split('\n\n')] for p in packages2: if not p.strip(): continue parser = FeedParser.FeedParser() parser.feed(p) p = parser.close() if apt_pkg.VersionCompare(maxp2['Version'], p['Version']) < 0: maxp2 = p del parser archs = '' if maxp2['Architecture'] not in ('all','any'): archs = ' (Only available for %s)' % maxp2['Architecture'] return("%s: %s. In component %s, is %s. Version %s (%s), package size %s kB, installed size %s kB%s" % (maxp['Package'], maxp['Description'].split('\n')[0], component(maxp['Section']), maxp['Priority'], maxp['Version'], distro, int(maxp['Size'])/1024, maxp['Installed-Size'], archs))
1f3df0eb3cc6aef0bdd5aebdba2fc378d4552fd4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3105/1f3df0eb3cc6aef0bdd5aebdba2fc378d4552fd4/plugin_ng.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3475, 1376, 12, 10657, 4672, 389, 10657, 273, 875, 18, 5701, 3816, 92, 364, 619, 316, 3475, 18, 6406, 7675, 4939, 12, 7036, 16, 21, 25146, 20, 65, 309, 619, 18, 291, 287, 2107, 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, 3475, 1376, 12, 10657, 4672, 389, 10657, 273, 875, 18, 5701, 3816, 92, 364, 619, 316, 3475, 18, 6406, 7675, 4939, 12, 7036, 16, 21, 25146, 20, 65, 309, 619, 18, 291, 287, 2107, 1435, ...
'ar': u'Summary', 'bg': u'Summary', 'bs': u'Summary', 'ca': u'Summary', 'cs': u'Summary', 'de': u'Summary',
def __init__(self): family.Family.__init__(self) self.name = 'wikinews'
f2f8d48eb4ad704131fbd5831369722ae5f55c7a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4404/f2f8d48eb4ad704131fbd5831369722ae5f55c7a/wikinews_family.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 6755, 18, 9203, 16186, 2738, 972, 12, 2890, 13, 365, 18, 529, 273, 296, 11999, 267, 359, 87, 11, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 6755, 18, 9203, 16186, 2738, 972, 12, 2890, 13, 365, 18, 529, 273, 296, 11999, 267, 359, 87, 11, 2, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if not prefix: return None
if not prefix: return None, None
def getperfexpPkgDir(): """Return the full path to the site-packages directory under the perfexp installation prefix (standard distutils installation). If 'prefix' is supplied, use it instead of the computed location of the installed perfexp script. """ prefix = None perfexp_execdir = os.path.dirname(os.path.realpath(sys.argv[0])) # first check whether we are in source tree pos = perfexp.find('src') if pos > 0: prefix = perfexp_execdir[:pos] if os.path.exists(os.path.join(prefix,'analysis','metrics')): return os.path.join(prefix, 'src'), prefix # else look for installed version pos = perfexp.find('perfexp') # installed location if pos > 0: prefix = perfexp_execdir[:pos] if not os.path.exists(os.path.join(prefix,'analysis','metrics')): prefix = None if not prefix: return None # give up libdirname = distutils.sysconfig.get_config_var('LIB') if libdirname is None: # True for python versions < 2.5 libdirname = 'lib' thedir = os.path.join(prefix,libdirname,'python' + distutils.sysconfig.get_python_version(), 'site-packages', 'perfexp') newdir='' if not os.path.exists(thedir): files = [] # Look for the parent of site-packages for file in os.listdir(prefix): fulldir = os.path.join(prefix, file) if os.path.isdir(fulldir): for x in os.listdir(fulldir): if os.path.isdir(os.path.join(fulldir,x)): if x.startswith('python' + distutils.sysconfig.get_python_version()): fulldir = os.path.join(fulldir, x) elif x == 'python': fulldir = os.path.join(fulldir, x) else: continue for y in os.listdir(fulldir): if y == 'site-packages': newdir = os.path.join(fulldir, 'site-packages', 'perfexp') break if newdir: thedir = newdir break if not os.path.exists(thedir): print >> sys.stderr, 'Cannot find the location where perfexp modules have been installed, please add the path to your PYTHONPATH environment variable.' sys.exit(1) theparent = os.path.dirname(thedir) return (thedir, theparent)
9ff3517ff523c7af94a6d1a74fb7dcbd067d9cfb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8354/9ff3517ff523c7af94a6d1a74fb7dcbd067d9cfb/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 19825, 2749, 11264, 1621, 13332, 3536, 990, 326, 1983, 589, 358, 326, 2834, 17, 10308, 1867, 3613, 326, 14184, 2749, 13193, 1633, 261, 10005, 2411, 5471, 13193, 2934, 225, 971, 296, 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, 336, 19825, 2749, 11264, 1621, 13332, 3536, 990, 326, 1983, 589, 358, 326, 2834, 17, 10308, 1867, 3613, 326, 14184, 2749, 13193, 1633, 261, 10005, 2411, 5471, 13193, 2934, 225, 971, 296, 3...
Returns the product of the elements in `args`, as an element of `self`. EXAMPLES:
Returns the product of the elements in ``args``, as an element of ``self``. EXAMPLES::
def prod(self, args): r""" n-ary product
eda1aa3ffdb57ef7907cbd3de37a32cfd1f0fe01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/eda1aa3ffdb57ef7907cbd3de37a32cfd1f0fe01/monoids.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10791, 12, 2890, 16, 833, 4672, 436, 8395, 290, 17, 814, 3017, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10791, 12, 2890, 16, 833, 4672, 436, 8395, 290, 17, 814, 3017, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
status,reason,data=wikipedia.putPage(mylang,inname,newtext)
status,reason,data=wikipedia.putPage(mylang,inname,newtext,comment='Rob Hooft: robot '+mods)
def treesearch(code,name): arr={(code,name):None} # First make one step based on the language itself try: n=treestep(arr,code,name,abort_on_redirect=1) except wikipedia.IsRedirectPage: print "Is redirect page" return if n==0 and not arr[code,name]: print "Mother doesn't exist" return # Then add translations if we survived. autotranslate(name,arr) modifications=1 while modifications: modifications=0 for newcode,newname in arr.keys(): if arr[newcode,newname] is None: modifications+=treestep(arr,newcode,newname) return arr
59f7c6407a69905bde42718cd2f9079d191f582a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/59f7c6407a69905bde42718cd2f9079d191f582a/treelang.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9787, 3392, 991, 12, 710, 16, 529, 4672, 2454, 5899, 12, 710, 16, 529, 4672, 7036, 97, 468, 5783, 1221, 1245, 2235, 2511, 603, 326, 2653, 6174, 775, 30, 290, 33, 27427, 395, 881, 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, 9787, 3392, 991, 12, 710, 16, 529, 4672, 2454, 5899, 12, 710, 16, 529, 4672, 7036, 97, 468, 5783, 1221, 1245, 2235, 2511, 603, 326, 2653, 6174, 775, 30, 290, 33, 27427, 395, 881, 12, ...
self.__treeview_track.drag_dest_set(gtk.DEST_DEFAULT_ALL, [('text/uri-list', 0, 0)], gtk.gdk.ACTION_COPY)
self.__treeview_track.drag_dest_set(gtk.DEST_DEFAULT_ALL, [('text/uri-list', 0, 0)], gtk.gdk.ACTION_COPY | gtk.gdk.ACTION_MOVE)
def __init__(self): self.__treeview_track = None self.__treeview_file = None self.__device_engine = None self.__transferManager = None
6c060eaf5613b05b928d47584a790f9dad86090b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2271/6c060eaf5613b05b928d47584a790f9dad86090b/MTPnavigator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 16186, 3413, 1945, 67, 4101, 273, 599, 365, 16186, 3413, 1945, 67, 768, 273, 599, 365, 16186, 5964, 67, 8944, 273, 599, 365, 16186, 13866, 1318, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 16186, 3413, 1945, 67, 4101, 273, 599, 365, 16186, 3413, 1945, 67, 768, 273, 599, 365, 16186, 5964, 67, 8944, 273, 599, 365, 16186, 13866, 1318, 273...
Search.__init__(self, api_key, api_secret, session_key)
_Search.__init__(self, api_key, api_secret, session_key)
def __init__(self, track_title, artist_name, api_key, api_secret, session_key): Search.__init__(self, api_key, api_secret, session_key) self._track_title = track_title self._artist_name = artist_name
903c9b1622fe56617e5099f20abdc69f2090f8e0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9926/903c9b1622fe56617e5099f20abdc69f2090f8e0/pylast.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3298, 67, 2649, 16, 15469, 67, 529, 16, 1536, 67, 856, 16, 1536, 67, 5875, 16, 1339, 67, 856, 4672, 389, 2979, 16186, 2738, 972, 12, 2890, 16, 1536, 67...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3298, 67, 2649, 16, 15469, 67, 529, 16, 1536, 67, 856, 16, 1536, 67, 5875, 16, 1339, 67, 856, 4672, 389, 2979, 16186, 2738, 972, 12, 2890, 16, 1536, 67...
form_initialdata.send(self.__class__, form=self, initial=initial, contact = kwargs.get('contact', None))
form_initialdata.send(ContactInfoForm, form=self, initial=initial, contact = kwargs.get('contact', None))
def __init__(self, *args, **kwargs): initial = kwargs.get('initial', {}) form_initialdata.send(self.__class__, form=self, initial=initial, contact = kwargs.get('contact', None)) kwargs['initial'] = initial
489f1b5f5554e0aeac06e4da1d3537961a8b4c0d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/171/489f1b5f5554e0aeac06e4da1d3537961a8b4c0d/forms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 2172, 273, 1205, 18, 588, 2668, 6769, 2187, 2618, 13, 646, 67, 6769, 892, 18, 4661, 12, 28097, 1204, 16, 646, 33, 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, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 2172, 273, 1205, 18, 588, 2668, 6769, 2187, 2618, 13, 646, 67, 6769, 892, 18, 4661, 12, 28097, 1204, 16, 646, 33, 2890, ...
print "OSError:", repr(detail)
print "OSError:", detail
def __init__(self, rootLogDir=r"C:\Temp\logdir", debug=False): self.debug = debug self.rootLogDir = os.path.normpath(rootLogDir) try: os.mkdir(self.rootLogDir, 0777) except OSError, detail: if(detail.errno==17): #if directory already exists, swallow the error pass else: print "OSError:", repr(detail) self.writeTarget = ""
271d522752034820780b68b25478fc02e10c0cbf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3638/271d522752034820780b68b25478fc02e10c0cbf/logwriter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1365, 1343, 1621, 33, 86, 6, 39, 5581, 7185, 64, 1330, 1214, 3113, 1198, 33, 8381, 4672, 225, 365, 18, 4148, 273, 1198, 365, 18, 3085, 1343, 1621, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1365, 1343, 1621, 33, 86, 6, 39, 5581, 7185, 64, 1330, 1214, 3113, 1198, 33, 8381, 4672, 225, 365, 18, 4148, 273, 1198, 365, 18, 3085, 1343, 1621, 273, ...
import networkx if isinstance(arg1, (networkx.XGraph, networkx.Graph)): Graph.__init__(self, arg1, *args, **kwds) if hasattr(arg1, 'node_type'): self.left = [] self.right = [] for v in arg1.nodes_iter(): if arg1.node_type[v] == 'Bottom': self.left.append(v) elif arg1.node_type[v] == 'Top': self.right.append(v) else: raise TypeError("NetworkX node_type defies bipartite assumtion (is not 'Top' or 'Bottom')")
def __init__(self, *args, **kwds): r""" Bipartite graph.
b404ee282cda16be0b9bf0d21fd7c885e9c9f1b0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/b404ee282cda16be0b9bf0d21fd7c885e9c9f1b0/bipartite_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 25577, 4672, 436, 8395, 605, 5762, 1137, 2667, 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, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 25577, 4672, 436, 8395, 605, 5762, 1137, 2667, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
"""Adds a AlphaHelix to the default Model object.
"""Adds an AlphaHelix to the default Model object.
def add_alpha_helix(self, alpha_helix): """Adds a AlphaHelix to the default Model object. """ assert self.default_model is not None self.default_model.add_alpha_helix(alpha_helix)
a181eacbeb3c68b8f7caba918a821d3f3e6c50f6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10674/a181eacbeb3c68b8f7caba918a821d3f3e6c50f6/Structure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 5429, 67, 76, 26342, 12, 2890, 16, 4190, 67, 76, 26342, 4672, 3536, 3655, 392, 24277, 44, 26342, 358, 326, 805, 3164, 733, 18, 3536, 1815, 365, 18, 1886, 67, 2284, 353, 486, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 5429, 67, 76, 26342, 12, 2890, 16, 4190, 67, 76, 26342, 4672, 3536, 3655, 392, 24277, 44, 26342, 358, 326, 805, 3164, 733, 18, 3536, 1815, 365, 18, 1886, 67, 2284, 353, 486, ...
try: typ, dat = self._simple_command('CLOSE') except EOFError: typ, dat = None, [None]
typ, dat = self._simple_command('CLOSE')
def close(self): """Close currently selected mailbox.
b10c0e30e74484a3863b7dcd5a9fd8e9e5849364 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/b10c0e30e74484a3863b7dcd5a9fd8e9e5849364/imaplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 3536, 4605, 4551, 3170, 14187, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 3536, 4605, 4551, 3170, 14187, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
for file_name in ("libtbx.python", "python"):
python_dispatchers = ["libtbx.python"] for module in self.module_list: if (module.has_top_level_cvs_directory()): python_dispatchers.append("python") break for file_name in python_dispatchers:
def refresh(self): self.assemble_pythonpath() self.write_setpath_files() self.pickle() if (self.is_ready_for_build()): self.write_SConstruct() if (os.name != "nt"): self.write_run_tests_csh() self.clear_bin_directory() if (not os.path.isdir(self.bin_path)): os.makedirs(self.bin_path) for file_name in ("libtbx.python", "python"): self.write_dispatcher_in_bin( source_file=self.python_exe, target_file=file_name) for module in self.module_list: module.process_command_line_directories() os.environ["LIBTBX_BUILD"] = self.build_path # to support libtbx.load_env for path in self.pythonpath: sys.path.insert(0, path) for module in self.module_list: module.process_libtbx_refresh_py() self.process_exe() self.write_python_and_show_path_duplicates() self.write_command_version_duplicates()
654f412bfe1e17e1a1fa68f04c086ba667f5f402 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/654f412bfe1e17e1a1fa68f04c086ba667f5f402/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4460, 12, 2890, 4672, 365, 18, 29676, 67, 8103, 803, 1435, 365, 18, 2626, 67, 542, 803, 67, 2354, 1435, 365, 18, 20847, 1435, 309, 261, 2890, 18, 291, 67, 1672, 67, 1884, 67, 3510, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4460, 12, 2890, 4672, 365, 18, 29676, 67, 8103, 803, 1435, 365, 18, 2626, 67, 542, 803, 67, 2354, 1435, 365, 18, 20847, 1435, 309, 261, 2890, 18, 291, 67, 1672, 67, 1884, 67, 3510, 1...
self.atom('summary', type='html', text=post.intro.render(),
self.atom('summary', type='html', text=post.intro.to_html(),
def _dump_post(self, post): url = url_for(post, _external=True) entry = self.atom('entry', {'xml:base': url}) self.atom('title', text=post.title, type='text', parent=entry) self.atom('id', text=post.uid, parent=entry) self.atom('updated', text=format_iso8601(post.last_update), parent=entry) self.atom('published', text=format_iso8601(post.pub_date), parent=entry) self.atom('link', href=url, parent=entry)
8c73f90880f6ba507a9c7923ae6cc234e62e7761 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12815/8c73f90880f6ba507a9c7923ae6cc234e62e7761/zxa.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8481, 67, 2767, 12, 2890, 16, 1603, 4672, 880, 273, 880, 67, 1884, 12, 2767, 16, 389, 9375, 33, 5510, 13, 1241, 273, 365, 18, 7466, 2668, 4099, 2187, 13666, 2902, 30, 1969, 4278, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8481, 67, 2767, 12, 2890, 16, 1603, 4672, 880, 273, 880, 67, 1884, 12, 2767, 16, 389, 9375, 33, 5510, 13, 1241, 273, 365, 18, 7466, 2668, 4099, 2187, 13666, 2902, 30, 1969, 4278, ...
if 'html' in environ.get('HTTP_ACCEPT',''):
if 'html' in environ.get('HTTP_ACCEPT','') or \ '*/*' in environ.get('HTTP_ACCEPT',''):
def wsgi_application(self, environ, start_response, exc_info=None): """ This exception as a WSGI application """ if self.headers: headers = list(self.headers) else: headers = [] if 'html' in environ.get('HTTP_ACCEPT',''): replace_header(headers, 'content-type', 'text/html') content = self.html(environ) else: replace_header(headers, 'content-type', 'text/plain') content = self.plain(environ) if isinstance(content, unicode): content = content.encode('utf8') cur_content_type = ( response.header_value(headers, 'content-type') or 'text/html') reponse.replace_header( headers, 'content-type', cur_content_type + '; charset=utf8') start_response('%s %s' % (self.code, self.title), headers, exc_info) return [content]
1759bc18bca0598598fe9cd82a1c061acd816f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2097/1759bc18bca0598598fe9cd82a1c061acd816f35/httpexceptions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 341, 17537, 67, 3685, 12, 2890, 16, 5473, 16, 787, 67, 2740, 16, 3533, 67, 1376, 33, 7036, 4672, 3536, 1220, 1520, 487, 279, 7649, 13797, 2521, 3536, 309, 365, 18, 2485, 30, 1607, 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, 341, 17537, 67, 3685, 12, 2890, 16, 5473, 16, 787, 67, 2740, 16, 3533, 67, 1376, 33, 7036, 4672, 3536, 1220, 1520, 487, 279, 7649, 13797, 2521, 3536, 309, 365, 18, 2485, 30, 1607, 273,...
""" s = str(n) size = s[-3:] while len(s) > 3: s = s[:-3] size = '%s,%s' % (s[-3:], size) size = '%s (%s)' % (size, str(Size(n))) return size """
def fmtsize(n): """ s = str(n) size = s[-3:] while len(s) > 3: s = s[:-3] size = '%s,%s' % (s[-3:], size) size = '%s (%s)' % (size, str(Size(n))) return size """ return int(n)
20742370d1a08cc5f982b88b4e2dc8a71de7ebf0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2550/20742370d1a08cc5f982b88b4e2dc8a71de7ebf0/tfmainline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1325, 1467, 12, 82, 4672, 3639, 327, 509, 12, 82, 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, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1325, 1467, 12, 82, 4672, 3639, 327, 509, 12, 82, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
@param userURL: a logical C{URL}.
@param logicalURL: a logical C{URL}.
def getAddress(self, logicalURL): """Return physical URL of server for logical URL of user.
6aaa854ce9cf321d5ab41f378daa3166eb57dd4c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6aaa854ce9cf321d5ab41f378daa3166eb57dd4c/sip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14808, 12, 2890, 16, 6374, 1785, 4672, 3536, 990, 11640, 1976, 434, 1438, 364, 6374, 1976, 434, 729, 18, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 14808, 12, 2890, 16, 6374, 1785, 4672, 3536, 990, 11640, 1976, 434, 1438, 364, 6374, 1976, 434, 729, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def __init__(self, workspace, buildspace, verbose, vm, timeout, processor):
def __init__(self, workspace, buildspace, verbose, vm, timeout, processor, suppress_dialogs):
def __init__(self, workspace, buildspace, verbose, vm, timeout, processor): self.workspace = workspace self.buildspace = buildspace self.verbose = verbose self.vm_root = vm self.timeout = timeout self.processor = processor
8d4776218f1aea33f8fe37984468a1d55548879f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6651/8d4776218f1aea33f8fe37984468a1d55548879f/test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 6003, 16, 1361, 2981, 16, 3988, 16, 4268, 16, 2021, 16, 6659, 16, 12257, 67, 25909, 14072, 4672, 365, 18, 14915, 273, 6003, 365, 18, 3510, 2981, 273, 136...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6003, 16, 1361, 2981, 16, 3988, 16, 4268, 16, 2021, 16, 6659, 16, 12257, 67, 25909, 14072, 4672, 365, 18, 14915, 273, 6003, 365, 18, 3510, 2981, 273, 136...
RdR = self.maxstep
RdR = maxstep
def determine_step(self, r, f, du): # Finite difference step using temporary point tmp_r = r.copy() tmp_r += (du * self.dR) self.tmp.set_positions(tmp_r) # Decide how much to move along the line du Fp1 = np.vdot(f, du) Fp2 = np.vdot(self.tmp.get_forces(), du) CR = (Fp1 - Fp2) / self.dR #RdR = Fp1*0.1 if CR < 0.0: #print "negcurve" RdR = self.maxstep #if(abs(RdR) > self.maxstep): # RdR = self.sign(RdR) * self.maxstep else: Fp = (Fp1 + Fp2) * 0.5 RdR = Fp / CR if abs(RdR) > self.maxstep: RdR = np.sign(RdR) * self.maxstep else: RdR += self.dR * 0.5 return du * RdR
3b8a479a1213ddf0aa0f4ea71d26373fec347d2a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5572/3b8a479a1213ddf0aa0f4ea71d26373fec347d2a/lbfgs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4199, 67, 4119, 12, 2890, 16, 436, 16, 284, 16, 9978, 4672, 468, 9458, 1137, 7114, 2235, 1450, 6269, 1634, 1853, 67, 86, 273, 436, 18, 3530, 1435, 1853, 67, 86, 1011, 261, 2544, 380, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4199, 67, 4119, 12, 2890, 16, 436, 16, 284, 16, 9978, 4672, 468, 9458, 1137, 7114, 2235, 1450, 6269, 1634, 1853, 67, 86, 273, 436, 18, 3530, 1435, 1853, 67, 86, 1011, 261, 2544, 380, ...
assert hasattr(suite, '__path__')
assert hasattr(obj, '__path__')
def isdirmodule(obj): try: assert hasattr(suite, '__path__') assert ismodule(obj) except: return False return True
7fd7f68caeab13a548eb6b4a27bfbcc6e021491a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2635/7fd7f68caeab13a548eb6b4a27bfbcc6e021491a/introspect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9783, 2978, 12, 2603, 4672, 775, 30, 1815, 3859, 12, 2603, 16, 4940, 803, 972, 6134, 1815, 353, 2978, 12, 2603, 13, 1335, 30, 327, 1083, 327, 1053, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9783, 2978, 12, 2603, 4672, 775, 30, 1815, 3859, 12, 2603, 16, 4940, 803, 972, 6134, 1815, 353, 2978, 12, 2603, 13, 1335, 30, 327, 1083, 327, 1053, 225, 2, -100, -100, -100, -100, -100...
pattern = join(self.packageResourceFolder, packageName + pat)
pattern = join(self.resourceFolder, packageName + pat)
def _addResources(self): "Add Welcome/ReadMe/License files, .lproj folders and scripts."
d932aaa96ea8845f4755fa2da90712cb71b9e9c4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/d932aaa96ea8845f4755fa2da90712cb71b9e9c4/buildpkg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 3805, 12, 2890, 4672, 315, 986, 678, 16312, 19, 1994, 4667, 19, 13211, 1390, 16, 263, 80, 17995, 9907, 471, 8873, 1199, 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, 389, 1289, 3805, 12, 2890, 4672, 315, 986, 678, 16312, 19, 1994, 4667, 19, 13211, 1390, 16, 263, 80, 17995, 9907, 471, 8873, 1199, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100...
for uris, authinfo in domains.items():
for uris, authinfo in domains.iteritems():
def find_user_password(self, realm, authuri): domains = self.passwd.get(realm, {}) authuri = self.reduce_uri(authuri) for uris, authinfo in domains.items(): for uri in uris: if self.is_suburi(uri, authuri): return authinfo return None, None
f93398dbde0a0cc127e42f8807ab4a1de0566370 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f93398dbde0a0cc127e42f8807ab4a1de0566370/urllib2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 1355, 67, 3664, 12, 2890, 16, 11319, 16, 1357, 1650, 4672, 10128, 273, 365, 18, 24002, 18, 588, 12, 24056, 16, 2618, 13, 1357, 1650, 273, 365, 18, 12498, 67, 1650, 12, 1944, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 1355, 67, 3664, 12, 2890, 16, 11319, 16, 1357, 1650, 4672, 10128, 273, 365, 18, 24002, 18, 588, 12, 24056, 16, 2618, 13, 1357, 1650, 273, 365, 18, 12498, 67, 1650, 12, 1944, ...
figure(1) errorbar(phase.keys(),phase.values(),rootNdeg)
keys = phase.keys() keys.sort() errorbar(keys,[phase[k] for k in keys],rootNdeg)
def plot_systematics(filelist,cp,dir,epoch,dag,opts): flist = [] for file in filelist: if os.path.split(file)[-1][:8] == "out-bin-": flist.append(file) freq = [] freqfile = cp.get('noisecomp','freq-file') for line in open(freqfile,'r').readlines(): freq.append(float(line.strip())) hfr1 = {} hfi1 = {} htr1 = {} hti1 = {} htrfr = {} htifi = {} htrfi = {} htifr = {} Ai = {} Ar = {} N = {} amp = {} amphf = {} Nt = 0 for f in freq: hfr1[f] = 0.0 hfi1[f] = 0.0 htr1[f] = 0.0 hti1[f] = 0.0 htrfr[f] = 0 htifi[f] = 0 htrfi[f] = 0 htifr[f] = 0 Ai[f] = 0.0 Ar[f] = 0.0 N[f] = 0.0 amp[f] = 0.0 amphf[f] = 0.0 freqcnt = 0; print "\tfirst pass through systematics files..." for file in flist: try: input = open(file,'r') except: print "WARNING: file " + file + " doesn't exist" continue for line in input.readlines(): tmp = line.split() if len(tmp) == 1: Nt += 1 continue ampt = float(tmp[0])**2 + float(tmp[1])**2 ampf = float(tmp[2])**2 + float(tmp[3])**2 N[freq[freqcnt]] += 1.0 amp[freq[freqcnt]] += ampt/2.0 + ampf/2.0 amphf[freq[freqcnt]] += ampf htr1[freq[freqcnt]] += float(tmp[0]) hti1[freq[freqcnt]] += float(tmp[1]) hfr1[freq[freqcnt]] += float(tmp[2]) hfi1[freq[freqcnt]] += float(tmp[3]) htrfr[freq[freqcnt]] += float(tmp[0])*float(tmp[2])#/ampf htifi[freq[freqcnt]] += float(tmp[1])*float(tmp[3])#/ampf htrfi[freq[freqcnt]] += float(tmp[0])*float(tmp[3])#/ampf htifr[freq[freqcnt]] += float(tmp[1])*float(tmp[2])#/ampf freqcnt += 1 if freqcnt >= len(freq): freqcnt = 0 #if N[freq[freqcnt]] > 100: break #Actually make it the mean for f in freq: #print "...found " + str(N[f]) + " of " + str(Nt) + " for " + str(f) htr1[f] /= N[f] hti1[f] /= N[f] hfr1[f] /= N[f] hfi1[f] /= N[f] #Ai[f] = (htifr[f]-htrfi[f])/N[f] #Ar[f] = (htrfr[f]+htifi[f])/N[f] Ai[f] = (htifr[f]-htrfi[f])/(amp[f]) Ar[f] = (htrfr[f]+htifi[f])/(amp[f]) amp[f] = sqrt(amp[f]/N[f]) fname = "Ar_Ai_"+epoch[1]+"-"+epoch[2]+".txt" fl = open(fname,'w') fl.write("#freq h(t) re sys\th(t) im sys\th(t) mag sys\th(t) phase sys\n") mag = {} phase = {} for f in freq: mag[f] = sqrt(Ar[f]*Ar[f]+Ai[f]*Ai[f]) phase[f] = atan2(Ai[f],Ar[f])*180.0/3.14159 fl.write(str(f) + "\t"+str(Ar[f])+"\t"+str(Ai[f])+"\t"+str(mag[f])+"\t"+str(phase[f])+"\n") fl.close() realHistVecs = {} imagHistVecs = {} binVec = [] nbins = int(ceil(float(N.values()[0])/50.0)); for f in freq: realHistVecs[f] = zeros(2*nbins) imagHistVecs[f] = zeros(2*nbins) for b in range(-nbins,nbins): binVec.append(float(b)/nbins) xr1 = {} xi1 = {} xr2 = {} xi2 = {} xr3 = {} xi3 = {} xr4 = {} xi4 = {} N = {} for f in freq: xr1[f] = 0.0 xi1[f] = 0.0 xr2[f] = 0.0 xi2[f] = 0.0 xr3[f] = 0.0 xi3[f] = 0.0 xr4[f] = 0.0 xi4[f] = 0.0 N[f] = 0.0 freqcnt = 0; print "\tsecond pass through systematics files..." #Compute the moments of the distribution for file in flist: try: input = open(file,'r') except: print "WARNING: file " + file + " doesn't exist" continue for line in input.readlines(): tmp = line.split() if len(tmp) == 1: continue N[freq[freqcnt]] += 1.0 htr = float(tmp[0]) hti = float(tmp[1]) hfr = float(tmp[2]) hfi = float(tmp[3]) xr = htr-Ar[freq[freqcnt]]*hfr + Ai[freq[freqcnt]]*hfi xi = hti-Ar[freq[freqcnt]]*hfi - Ai[freq[freqcnt]]*hfr bin(binVec,realHistVecs[freq[freqcnt]],xr/amp[freq[freqcnt]]) bin(binVec,imagHistVecs[freq[freqcnt]],xi/amp[freq[freqcnt]]) xr1[freq[freqcnt]] += xr xi1[freq[freqcnt]] += xi xr2[freq[freqcnt]] += xr*xr xi2[freq[freqcnt]] += xi*xi xr3[freq[freqcnt]] += xr*xr*xr xi3[freq[freqcnt]] += xi*xi*xi xr4[freq[freqcnt]] += xr*xr*xr*xr xi4[freq[freqcnt]] += xi*xi*xi*xi freqcnt += 1 if freqcnt >= len(freq): freqcnt = 0 #if N[freq[freqcnt]] > 100: break #Put them in units of the noise amplitude for f in freq: xr1[f] /= N[f]*amp[f] xi1[f] /= N[f]*amp[f] xr2[f] = sqrt(xr2[f]/N[f])/amp[f] xi2[f] = sqrt(xi2[f]/N[f])/amp[f] if xr3[f]: xr3[f] = pow(abs(xr3[f]/N[f]),1.0/3.0)/amp[f]*xr3[f]/abs(xr3[f]) else: xr3[f] = 0.0 if xi3[f]: xi3[f] = pow(abs(xi3[f]/N[f]),1.0/3.0)/amp[f]*xi3[f]/abs(xi3[f]) else: xi3[f] = 0.0 xr4[f] = pow(abs(xr4[f]/N[f]-3.0*pow(xr2[f]*amp[f],4)),1.0/4.0)/amp[f]*(xr4[f]/N[f]-3.0*pow(xr2[f]*amp[f],4))/abs(xr4[f]/N[f]-3.0*pow(xr2[f]*amp[f],4)) xi4[f] = pow(abs(xi4[f]/N[f]-3.0*pow(xi2[f]*amp[f],4)),1.0/4.0)/amp[f]*(xi4[f]/N[f]-3.0*pow(xi2[f]*amp[f],4))/abs(xi4[f]/N[f]-3.0*pow(xi2[f]*amp[f],4)) fname = "x1_x2_x3_x4_"+epoch[1]+"-"+epoch[2]+".txt" fl = open(fname,'w') fl.write("#freq \t xr \t xi \t xr^2 \t xi^2 \t xr^3 \t xi^3 \t xr^4 \t xi^4 \n") for f in freq: fl.write(str(f) + '\t' + str(xr1[f]) + '\t' + str(xi1[f]) + '\t' + str(xr2[f]) + '\t' + str(xi2[f]) + '\t' + str(xr3[f]) + '\t' + str(xi3[f]) + '\t' + str(xr4[f]) + '\t' + str(xi4[f]) + '\n') rootN = [] rootNdeg = [] for f in N.values(): rootN.append(1/sqrt(f)) rootNdeg.append(180/sqrt(f)/3.14159) fl.close() # Plot the results print "\tplotting..." # Plot the systematic in magnitude magfigname = "sys_mag"+epoch[1]+"-"+epoch[2]+".png" figure(1) errorbar(mag.keys(),mag.values(),rootN) title('h(t) and h(f) magnitude systematics '+epoch[1]+"-"+epoch[2]+'\n') xlabel('Freq') ylabel('Mag') grid() savefig(dir + '/'+ magfigname) thumb = 'thumb-'+magfigname savefig(dir + '/'+ thumb,dpi=20) clf() close() # Plot the systematic in phase phasefigname = "sys_phase"+epoch[1]+"-"+epoch[2]+".png" figure(1) errorbar(phase.keys(),phase.values(),rootNdeg) title('h(t) and h(f) phase systematics '+epoch[1]+"-"+epoch[2]+'\n') xlabel('Freq') ylabel('Phase (degrees)') grid() savefig(dir + '/'+ phasefigname) thumb = 'thumb-'+phasefigname savefig(dir + '/'+ thumb,dpi=20) clf() close() # Plot the residual moments x1figname = "sys_x1_"+epoch[1]+"-"+epoch[2]+".png" figure(1) plot(xr1.keys(),xr1.values()) plot(xi1.keys(),xi1.values(),'r') legend(['real','imaginary']) title('mean '+epoch[1]+"-"+epoch[2]+'\n') xlabel('Freq') ylabel('mean') grid() savefig(dir + '/'+ x1figname) thumb = 'thumb-'+x1figname savefig(dir + '/'+ thumb,dpi=20) clf() close() # Plot the residual moments x2figname = "sys_x2_"+epoch[1]+"-"+epoch[2]+".png" figure(1) plot(xr2.keys(),xr2.values()) plot(xi2.keys(),xi2.values(),'r') legend(['real','imaginary']) title('residual noise sqrt of second moment '+epoch[1]+"-"+epoch[2]+'\n') xlabel('Freq') ylabel('sigma') grid() savefig(dir + '/'+ x2figname) thumb = 'thumb-'+x2figname savefig(dir + '/'+ thumb,dpi=20) clf() close() # Plot the residual moments x3figname = "sys_x3_"+epoch[1]+"-"+epoch[2]+".png" figure(1) plot(xr3.keys(),xr3.values()) plot(xi3.keys(),xi3.values(),'r') legend(['real','imaginary']) title('residual noise cube root of third moment '+epoch[1]+"-"+epoch[2]+'\n') xlabel('Freq') ylabel('cube root of skew') grid() savefig(dir + '/'+ x3figname) thumb = 'thumb-'+x3figname savefig(dir + '/'+ thumb,dpi=20) clf() close() # Plot the residual moments x4figname = "sys_x4_"+epoch[1]+"-"+epoch[2]+".png" figure(1) plot(xr4.keys(),xr4.values()) plot(xi4.keys(),xi4.values(),'r') legend(['real','imaginary']) title('residual noise fourth root of excess kurtosis '+epoch[1]+"-"+epoch[2]+'\n') xlabel('Freq') ylabel('fourth root of excess kurtosis') grid() savefig(dir + '/'+ x4figname) thumb = 'thumb-'+x4figname savefig(dir + '/'+ thumb,dpi=20) clf() close() pgname = dir + '/' + "sys_plots"+epoch[1]+"-"+epoch[2]+".html" page = open(pgname,'w') page.write('<h2>Plots of systematic errors between h(t) and h(f) '+epoch[1]+"-"+epoch[2]+'</h2><hr><br><br>\n') page.write('<h3>Systematics in magnitude and phase and moments of the residual distributions</h3><hr>\n') page.write('<img src='+magfigname+' width=600>\n') page.write('<img src='+phasefigname+' width=600>\n') page.write('<img src='+x1figname+' width=600>\n') page.write('<img src='+x2figname+' width=600>\n') page.write('<img src='+x3figname+' width=600>\n') page.write('<img src='+x4figname+' width=600><br><br>\n') page.write('<h3>Raw distribution of residual noise</h3><hr><br>\n') for f in freq: figname = "n_hist_"+str(f)+'_'+epoch[1]+"-"+epoch[2]+".png" figure(1) plot(binVec,realHistVecs[f]) plot(binVec,imagHistVecs[f],'r') legend(['real','imaginary']) title('residual noise distribution '+epoch[1]+"-"+epoch[2]+'\n'+'freq = '+str(f)) ylabel('Number') xlabel('n / amp of h(t)') thumb = 'thumb-'+figname savefig(dir + '/'+ thumb,dpi=20) grid() savefig(dir + '/'+ figname) clf() close() page.write('<a href='+figname+'><img src='+thumb+'></a>\n') page.close
da21469de3d5dc0444d38910fa554bbd3b46754d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5758/da21469de3d5dc0444d38910fa554bbd3b46754d/strain.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 67, 4299, 270, 2102, 12, 7540, 5449, 16, 4057, 16, 1214, 16, 12015, 16, 30204, 16, 4952, 4672, 284, 1098, 273, 5378, 364, 585, 316, 26204, 30, 309, 1140, 18, 803, 18, 4939, 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, 3207, 67, 4299, 270, 2102, 12, 7540, 5449, 16, 4057, 16, 1214, 16, 12015, 16, 30204, 16, 4952, 4672, 284, 1098, 273, 5378, 364, 585, 316, 26204, 30, 309, 1140, 18, 803, 18, 4939, 12, ...
[3, 1, 2, 6, 4, 5, 9, 7, 8, 12, 10, 11, 15, 13, 14, 18, 16, 17, 21, 19, 20]
[2, 3, 1, 5, 6, 4, 8, 9, 7, 11, 12, 10, 14, 15, 13, 17, 18, 16, 20, 21, 19]
def tau123(T1, T2): """ Compute the tau_i representation for a bitrade (T1, T2). See the functions tau1, tau2, and tau3 for the mathematical definitions. RETURNS: (cells_map, t1, t2, t3) where cells_map is a map to/from the filled cells of T1, and t1, t2, t3 are the tau1, tau2, tau3 permutations. EXAMPLES: sage: from sage.combinat.matrices.latin import * sage: (a, b, c, G) = pq_group_bitrade_generators(3, 7) sage: (T1, T2) = bitrade_from_group(a, b, c, G) sage: print T1 [0 6 4] [1 0 5] [2 1 6] [3 2 0] [4 3 1] [5 4 2] [6 5 3] sage: print T2 [6 4 0] [0 5 1] [1 6 2] [2 0 3] [3 1 4] [4 2 5] [5 3 6] sage: (cells_map, t1, t2, t3) = tau123(T1, T2) sage: print cells_map {1: (0, 0), 2: (0, 1), 3: (0, 2), 4: (1, 0), 5: (1, 1), 6: (1, 2), 7: (2, 0), 8: (2, 1), 9: (2, 2), 10: (3, 0), 11: (3, 1), 12: (3, 2), 13: (4, 0), (2, 1): 8, 15: (4, 2), 16: (5, 0), 17: (5, 1), 18: (5, 2), 19: (6, 0), 20: (6, 1), 21: (6, 2), (5, 1): 17, (4, 0): 13, (1, 2): 6, (3, 0): 10, (5, 0): 16, (2, 2): 9, (4, 1): 14, (1, 1): 5, (3, 2): 12, (0, 0): 1, (6, 0): 19, 14: (4, 1), (4, 2): 15, (1, 0): 4, (0, 1): 2, (6, 1): 20, (3, 1): 11, (2, 0): 7, (6, 2): 21, (5, 2): 18, (0, 2): 3} sage: print cells_map_as_square(cells_map, max(T1.nrows(), T1.ncols())) [ 1 2 3 -1 -1 -1 -1] [ 4 5 6 -1 -1 -1 -1] [ 7 8 9 -1 -1 -1 -1] [10 11 12 -1 -1 -1 -1] [13 14 15 -1 -1 -1 -1] [16 17 18 -1 -1 -1 -1] [19 20 21 -1 -1 -1 -1] sage: t1 [3, 1, 2, 6, 4, 5, 9, 7, 8, 12, 10, 11, 15, 13, 14, 18, 16, 17, 21, 19, 20] sage: t2 [19, 17, 12, 1, 20, 15, 4, 2, 18, 7, 5, 21, 10, 8, 3, 13, 11, 6, 16, 14, 9] sage: print t3 [5, 9, 13, 8, 12, 16, 11, 15, 19, 14, 18, 1, 17, 21, 4, 20, 3, 7, 2, 6, 10] sage: t1.to_cycles() [(1, 3, 2), (4, 6, 5), (7, 9, 8), (10, 12, 11), (13, 15, 14), (16, 18, 17), (19, 21, 20)] sage: t2.to_cycles() [(1, 19, 16, 13, 10, 7, 4), (2, 17, 11, 5, 20, 14, 8), (3, 12, 21, 9, 18, 6, 15)] sage: t3.to_cycles() [(1, 5, 12), (2, 9, 19), (3, 13, 17), (4, 8, 15), (6, 16, 20), (7, 11, 18), (10, 14, 21)] The product t1*t2*t3 is the identity, i.e. it fixes every point: sage: len((t1*t2*t3).fixed_points()) == T1.nr_filled_cells() True """ assert is_bitrade(T1, T2) cells_map = T1.filled_cells_map() t1 = tau1(T1, T2, cells_map) t2 = tau2(T1, T2, cells_map) t3 = tau3(T1, T2, cells_map) return (cells_map, t1, t2, t3)
9087d14f978c663baae98e9a365c4a3aa2a6f24c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/9087d14f978c663baae98e9a365c4a3aa2a6f24c/latin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12284, 12936, 12, 56, 21, 16, 399, 22, 4672, 3536, 8155, 326, 12284, 67, 77, 4335, 364, 279, 2831, 354, 323, 261, 56, 21, 16, 399, 22, 2934, 2164, 326, 4186, 12284, 21, 16, 12284, 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, 12284, 12936, 12, 56, 21, 16, 399, 22, 4672, 3536, 8155, 326, 12284, 67, 77, 4335, 364, 279, 2831, 354, 323, 261, 56, 21, 16, 399, 22, 2934, 2164, 326, 4186, 12284, 21, 16, 12284, 22...
... for ar in sorted(sa.filter(first, last)):
... def key(ar): ... return (ar.datetime, ar.section.title) ... for ar in sorted(sa.filter(first, last), key=key):
>>> def print_for(first, last):
688b811c9dbde97a533c6669d2f9060b4e4020b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/688b811c9dbde97a533c6669d2f9060b4e4020b2/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 1172, 67, 1884, 12, 3645, 16, 1142, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 1172, 67, 1884, 12, 3645, 16, 1142, 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,...
return self.adaptor.list_bioentry_ids(self.dbid)
return self.keys()
def get_all_primary_ids(self): """All the primary_ids of the sequences in the database (OBSOLETE).
a8f59afd6241b110dcb129cea5960e9675161e82 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7167/a8f59afd6241b110dcb129cea5960e9675161e82/BioSeqDatabase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 454, 67, 8258, 67, 2232, 12, 2890, 4672, 3536, 1595, 326, 3354, 67, 2232, 434, 326, 8463, 316, 326, 2063, 261, 5704, 3584, 4311, 2934, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 454, 67, 8258, 67, 2232, 12, 2890, 4672, 3536, 1595, 326, 3354, 67, 2232, 434, 326, 8463, 316, 326, 2063, 261, 5704, 3584, 4311, 2934, 2, -100, -100, -100, -100, -100, -100, -...
print(4)
def __floordiv__(self, other): print(4) return self._o2(other, operator.floordiv)
c30383522dc8fd9e0b710819bb5b57eb24ea6f5f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8535/c30383522dc8fd9e0b710819bb5b57eb24ea6f5f/vec2d.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 74, 383, 517, 427, 972, 12, 2890, 16, 1308, 4672, 327, 365, 6315, 83, 22, 12, 3011, 16, 3726, 18, 74, 383, 517, 427, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 74, 383, 517, 427, 972, 12, 2890, 16, 1308, 4672, 327, 365, 6315, 83, 22, 12, 3011, 16, 3726, 18, 74, 383, 517, 427, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100...
def __init__(self, parent, value):
def __init__(self, parent, value, check=True):
def __init__(self, parent, value): """ Create element of a finite field.
a646b8a7ad52843bf28012bd4b9e16e460533dfb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/a646b8a7ad52843bf28012bd4b9e16e460533dfb/finite_field_element.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 460, 16, 866, 33, 5510, 4672, 3536, 1788, 930, 434, 279, 25922, 652, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 460, 16, 866, 33, 5510, 4672, 3536, 1788, 930, 434, 279, 25922, 652, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
resourceDict[name] = classAdAgent.getAttributeInt(name)
resourceDict[name] = classAdAgent.getAttributeInt( name )
def selectJob(self, resourceDescription): """ Main job selection function to find the highest priority job matching the resource capacity """
059c4744ef6766e0575a5cd4d6f09d892a66a7df /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/059c4744ef6766e0575a5cd4d6f09d892a66a7df/MatcherHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 2278, 12, 2890, 16, 1058, 3291, 4672, 3536, 12740, 1719, 4421, 445, 358, 1104, 326, 9742, 4394, 1719, 3607, 326, 1058, 7519, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 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, 2027, 2278, 12, 2890, 16, 1058, 3291, 4672, 3536, 12740, 1719, 4421, 445, 358, 1104, 326, 9742, 4394, 1719, 3607, 326, 1058, 7519, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
href = 'http://aros-exec.org/'
href = 'http://aros-exec.org/'
def makePage( _T, _N, _M, MIRRORS_DATA, lang, charset ): navigation = Tree \ ( [ A( _N['home'], href=makeURL( '', lang ) ), Tree \ ( [ A( 'English', href='%(BASE)s' ), A( 'Deutsch', href='%(BASE)sde/' ), A( 'Fran&#231;ais', href='%(BASE)sfr/' ), A( 'Italiano', href='%(BASE)sit/' ), A( 'Nederlands', href='%(BASE)snl/' ), A( 'Polski', href='%(BASE)spl/' ), A( 'Portugu&#234;s', href='%(BASE)spt/' ), A( '&#1056;&#1091;&#1089;&#1089;&#1082;&#1080;&#1081;', href='%(BASE)sru/' ), A( 'Suomi', href='%(BASE)sfi/' ), A( 'Svenska', href='%(BASE)ssv/' ) ] ), BR(), A( _N['news'], href=makeURL( 'news/', lang ) ), Tree ( A( _N['archive'], href=makeURL( 'news/archive/', lang ) ) ), BR(), A( _N['introduction'], href=makeURL( 'introduction/', lang ) ), Tree \ ( [ #A( _N['status'], href=makeURL('introduction/status/everything.html' ), A( _N['screenshots'], href=makeURL( 'pictures/screenshots/', lang) ), A( _N['ports'], href=makeURL( 'introduction/ports', lang ) ), A( _N['license'], href='%(BASE)slicense.html' ) ] ), BR(), A( _N['download'], href=makeURL( 'download', lang ) ), BR(), _N['documentation'], Tree \ ( [ A( _N['users'], href=makeURL( 'documentation/users/', lang ) ), Tree \ ( [ A( _N['installation'], href=makeURL( 'documentation/users/installation', lang ) ), A( _N['using'], href=makeURL( 'documentation/users/using', lang ) ), A( _N['shell'], href=makeURL( 'documentation/users/shell/index', lang ) ), A( _N['faq'], href=makeURL( 'documentation/users/faq', lang ) ), #_N['ports'], #A( _N['links'], href=makeURL( 'documentation/users/links', lang ) ) ] ), A( _N['developers'], href=makeURL( 'documentation/developers/index', lang ) ), Tree \ ( [ A( _N['contribute'], href=makeURL( 'documentation/developers/contribute', lang ) ), A( 'Roadmap', href=makeURL( 'documentation/developers/roadmap', lang ) ), A( _N['bug-tracker'], href='http://sourceforge.net/tracker/?atid=439463&group_id=43586&func=browse' ), A( _N['working-with-subversion'], href=makeURL( 'documentation/developers/svn', lang ) ), A( _N['compiling'], href=makeURL( 'documentation/developers/compiling', lang ) ), A( _N['application-development-manual'], href=makeURL( 'documentation/developers/app-dev/index', lang ) ), A( _N['zune-application-development-manual'], href=makeURL( 'documentation/developers/zune-application-development', lang ) ), A( _N['system-development-manual'], href=makeURL( 'documentation/developers/system-development', lang ) ), A( _N['debugging-manual'], href=makeURL( 'documentation/developers/debugging', lang ) ), A( _N['reference'], href=makeURL( 'documentation/developers/autodocs/index', lang ) ), A( _N['specifications'], href=makeURL( 'documentation/developers/specifications/', lang ) ), A( _N['ui-style-guide'], href=makeURL( 'documentation/developers/ui', lang ) ), A( _N['documenting'], href=makeURL( 'documentation/developers/documenting', lang ) ), A( _N['porting'], href=makeURL( 'documentation/developers/porting', lang ) ), A( _N['translating'], href=makeURL( 'documentation/developers/translating', lang ) ), A( _N['summaries'], href=makeURL( 'documentation/developers/summaries/', lang ) ), A( _N['links'], href=makeURL( 'documentation/developers/links', lang ) ) ] ) ] ), BR(), A( _N['contact'], href=makeURL( 'contact', lang ) ), Tree \ ( [ A( _N['mailing-lists'], href=makeURL( 'contact', lang, 'mailing-lists' ) ), #A( _N['forums'], href=makeURL( 'contact', lang, 'forums' ) ), A( _N['irc-channels'], href=makeURL( 'contact', lang, 'irc-channels' ) ) ] ), BR(), A( _N['credits'], href=makeURL( 'credits', lang ) ), A( 'Acknowledgements', href=makeURL( 'acknowledgements', lang ) ), BR(), _N['pictures'], Tree \ ( [ A( _N['developers'], href=makeURL( 'pictures/developers/', lang ) ), A( _N['developers-together'], href=makeURL( 'pictures/developers-together/', lang ) ) ] ), BR(), A( _N['sponsors'],href=makeURL( 'sponsors', lang ) ), A( _N['linking'], href=makeURL( 'linking', lang ) ), A( _N['links'], href=makeURL( 'links', lang ) ) ] ) counter = Img( src = 'http://www.hepe.com/cgi-bin/wwwcount.cgi?df=aros.dat&dd=C&ft=0' ) menulinks = Table\ ( cellspacing = 5, cellpadding = 0, contents = [ TR ( TD ( 'Links' ) ), TR ( TD ( A ( 'AROS-Exec', href = 'http://aros-exec.org/' ) ) ), TR ( TD ( A ( 'AROS Archives', href = 'http://archives.aros-exec.org/' ) ) ), TR ( TD ( A ( 'Team AROS', href = 'http://www.teamaros.org/' ) ) ) ] ) sponsors = Table\ ( cellspacing = 5, cellpadding = 0, contents = [ TR ( TD ( A ( Img( src = '%(ROOT)simages/trustec-small.png', border = 0 ), href = 'http://www.trustsec.de/' ) ) ), TR ( TD ( A ( Img( src = '%(ROOT)simages/genesi-small.gif', border = 0 ), href = 'http://www.pegasosppc.com/' ) ) ), TR ( TD ( A \ ( Img \ ( src = 'http://sflogo.sourceforge.net/sflogo.php?group_id=43586&type=1', width = 88, height = 31, border = 0, alt = 'SourceForge Logo' ), href = 'http://sourceforge.net/' ) ) ) ] ) bar = Table( border = 0, cellpadding = 0, cellspacing = 0, valign = 'top', contents = [ TR( valign = 'top', contents = [ TD( rowspan = 8, width = 10 ), TD() ] ), TR( valign = 'top', contents = TD( navigation ) ), TR( TD(), height=15 ), TR( valign = 'top', contents = TD( align = 'center', contents = menulinks ) ), TR( TD(), height=30 ), TR( valign = 'top', contents = TD( align = 'center', contents = counter ) ), TR( TD(), height=15 ), TR( valign = 'top', contents = TD( align = 'center', contents = sponsors ) ), TR( TD(), height=30 ), TR \ ( valign = 'top', contents = TD \ ( align = 'center', contents = A \ ( Img \ ( src = '%(ROOT)simages/noeupatents-small.png', border = 0 ), href = 'http://petition.eurolinux.org/' ) ) ) ] ) statsPHP = ''' <?php //define("_BBC_PAGE_NAME", "my page title"); define("_BBCLONE_DIR", "%(ROOT)smybbclone/"); define("COUNTER", _BBCLONE_DIR."index.php"); if (file_exists(COUNTER)) include_once(COUNTER); ?> ''' page = HTML( [ Head( [ Charset( charset ), Title( 'AROS Research Operating System' ), Link( href = '%(ROOT)saros.css', type = 'text/css', rel = 'stylesheet' ), Meta( name = 'keywords', content = 'AROS, AmigaOS, OS, operating system, research, open source, portage' ) ] ), Body( style = 'margin: 0px;', bgcolor = '#ffffff', contents = [ Table( border = 0, cellspacing = 0, cellpadding = 0, width = '100%%', height = '100%%', contents = [ TR( [ TD( valign = 'top', width = 184, rowspan = 4, contents = Img( width = 184, height = 190, src = '%(ROOT)simages/kitty_1.png' ) ), TD( valign = 'top', width = 65, rowspan = 4, contents = Img( width = 65, height = 190, src = '%(ROOT)simages/kitty_2.png' ) ), TD( valign = 'top', width = 53, rowspan = 4, contents = Img( width = 53, height = 190, src = '%(ROOT)simages/kitty_3.png' ) ), TD( valign = 'top', align = 'left', width = 344, background = '%(ROOT)simages/dark_bg.png', contents = Img( width = 344, height = 81, src = '%(ROOT)simages/aros.png' ) ), TD( valign = 'top', align = 'right', width = '100%%', background = '%(ROOT)simages/dark_bg.png', #contents = Table( # border = 0, cellpadding = 0, cellspacing = 2, # contents = [ # TR( # TD( Font( size = '-2', color = '#ffffff', contents = B( _T['mirrors'] ) ) ) # ), # TR( # TD( MIRRORS_DATA ) # ) # ] #) contents = Img( width = '100%%', height = 1, src = '%(ROOT)simages/spacer.gif' ) ) ] ), TR( TD( background = '%(ROOT)simages/dark_bg.png', align = 'center', colspan = 2, contents = Img( width = 367, height = 36, src = '%(ROOT)simages/aros_text.png' ) ) ), TR( [ TD( background = '%(ROOT)simages/horizontal_border.png', width = 344, contents = Img( width = 344, height = 33, src = '%(ROOT)simages/h_arc.png' ) ), TD( background = '%(ROOT)simages/horizontal_border.png' ) ] ), TR( TD( width = 1, height = 40, colspan = 2, bgcolor = '#ffffff', contents = Font( size = '-1', color = '#aaaaaa', contents = Img( width = '100%%', height = 40, src = '%(ROOT)simages/spacer.gif' ) ) ) ), TR( [ TD( rowspan = 2, valign = 'top', width = 184, height = '100%%', background = '%(ROOT)simages/bright_bg.png', style = 'width: 184px; height: 100%%', contents = [ bar ] ), TD( background = '%(ROOT)simages/vertical_border.png', width = 65, height = 393, contents = Img( width = 65, height = 393, src = '%(ROOT)simages/v_arc.png' ) ), TD( colspan = 3, rowspan = 1, valign = 'top', height = '100%%', contents = [ Img( width = '100%%', height = 1, src = '%(ROOT)simages/spacer.gif' ), BR(), Table( border = 0, cellspacing = 0, cellpadding = 0, width = '100%%', bgcolor = '#ffffff', contents = TR( TD( '%(CONTENT)s' ) ) ) ] ) ] ), TR( [ TD( width = 65, height = '100%%', style = 'height: 100%%', background = '%(ROOT)simages/vertical_border.png', contents = Img( width = 1, height = '100%%', src = '%(ROOT)simages/spacer.gif' ) ), TD( colspan = 3, valign = 'bottom', align = 'center', contents = Font( size = '-1', color = '#aaaaaa', contents = [ BR(), _M['copyright'], BR(), _M['trademarks'], BR(), BR() ] ) ) ] ) ] ), statsPHP ] ) ] ) return str( page )
b75093c6c662b38b22b7b38d06e518bd3c7405ce /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4747/b75093c6c662b38b22b7b38d06e518bd3c7405ce/page.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 1964, 12, 389, 56, 16, 389, 50, 16, 389, 49, 16, 490, 7937, 2784, 55, 67, 4883, 16, 3303, 16, 4856, 262, 30, 10394, 273, 4902, 521, 261, 306, 432, 12, 389, 50, 3292, 8712, 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, 1221, 1964, 12, 389, 56, 16, 389, 50, 16, 389, 49, 16, 490, 7937, 2784, 55, 67, 4883, 16, 3303, 16, 4856, 262, 30, 10394, 273, 4902, 521, 261, 306, 432, 12, 389, 50, 3292, 8712, 17...
to_remove.append(id) if id in to_remove: playlist.remove_id(id)
not_removed.append(id_) for id_ in not_removed: logging.warn("RemoveVideosFromPlaylist: Id not found -- %s", id_)
def handle_remove_videos_from_playlist(self, message): try: playlist = SavedPlaylist.get_by_id(message.playlist_id) except database.ObjectNotFoundError: logging.warn("RemoveVideosFromPlaylist: Playlist not found -- %s", message.playlist_id) return to_remove = [] for id in message.video_ids: if not playlist.contains_id(id): logging.warn("RemoveVideosFromPlaylist: Id not found -- %s", id) else: to_remove.append(id) if id in to_remove: playlist.remove_id(id)
ba391dd3b362bd89a46f1c12954ad33362732e23 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/ba391dd3b362bd89a46f1c12954ad33362732e23/messagehandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 4479, 67, 6768, 538, 67, 2080, 67, 1601, 1098, 12, 2890, 16, 883, 4672, 775, 30, 16428, 273, 348, 8158, 30194, 18, 588, 67, 1637, 67, 350, 12, 2150, 18, 1601, 1098, 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, 1640, 67, 4479, 67, 6768, 538, 67, 2080, 67, 1601, 1098, 12, 2890, 16, 883, 4672, 775, 30, 16428, 273, 348, 8158, 30194, 18, 588, 67, 1637, 67, 350, 12, 2150, 18, 1601, 1098, 67, 350...
{'lumerg':'Equivalent to lumen*second', 'talbot':'Equivalent to lumen*second.'},
{'lumerg':'Equivalent to lumen*second', 'talbot':'Equivalent to lumen*second.'},
def evalunitdict(): """ Replace all the string values of the unitdict variable by their evaluated forms, and builds some other tables for ease of use. This function is mainly used internally, for efficiency (and flexibility) purposes, making it easier to describe the units. EXAMPLES:: sage: sage.symbolic.units.evalunitdict() """ from sage.misc.all import sage_eval for key, value in unitdict.iteritems(): unitdict[key] = dict([(a,sage_eval(repr(b))) for a, b in value.iteritems()]) # FEATURE IDEA: create a function that would allow users to add # new entries to the table without having to know anything about # how the table is stored internally. # # Format the table for easier use. # for k, v in unitdict.iteritems(): for a in v: unit_to_type[a] = k for w in unitdict.iterkeys(): for j in unitdict[w].iterkeys(): if type(unitdict[w][j]) == tuple: unitdict[w][j] = unitdict[w][j][0] value_to_unit[w] = dict(zip(unitdict[w].itervalues(), unitdict[w].iterkeys()))
d9145e61c2e167a847618a21778e0e532a04af5d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/d9145e61c2e167a847618a21778e0e532a04af5d/units.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5302, 4873, 1576, 13332, 3536, 6910, 777, 326, 533, 924, 434, 326, 2836, 1576, 2190, 635, 3675, 12697, 10138, 16, 471, 10736, 2690, 1308, 4606, 364, 28769, 434, 999, 18, 1220, 445, 353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5302, 4873, 1576, 13332, 3536, 6910, 777, 326, 533, 924, 434, 326, 2836, 1576, 2190, 635, 3675, 12697, 10138, 16, 471, 10736, 2690, 1308, 4606, 364, 28769, 434, 999, 18, 1220, 445, 353, ...
res_users u,
res_users u
def data_get(self, password, db): security.check_super(password) cr = pooler.get_db(db).cursor() cr.execute('''SELECT to_char(t.date, 'YYYY-MM-DD') as date, u.name as username, u.login as login, sum(t.duration) as hours FROM use_control_time t, res_users u, WHERE u.id = t.user_id AND active = %s AND (uploaded = %s OR uploaded IS NULL) GROUP BY to_char(t.date, 'YYYY-MM-DD'), u.name, u.login ''', (True, False) ) data = cr.fetchall() cr.execute('UPDATE use_control_time SET uploaded=%s WHERE active = %s AND (uploaded = %s OR uploaded IS NULL)', (True, True, False)) cr.execute('SELECT name FROM ir_module_module WHERE state=%s', ('installed',)) modules = map(lambda x: x[0], cr.fetchall())
71b1ea0d3092a922cad7d4e4719d9cb2bd432eb3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/71b1ea0d3092a922cad7d4e4719d9cb2bd432eb3/services.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 67, 588, 12, 2890, 16, 2201, 16, 1319, 4672, 4373, 18, 1893, 67, 9565, 12, 3664, 13, 4422, 273, 2845, 264, 18, 588, 67, 1966, 12, 1966, 2934, 9216, 1435, 4422, 18, 8837, 2668, 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, 501, 67, 588, 12, 2890, 16, 2201, 16, 1319, 4672, 4373, 18, 1893, 67, 9565, 12, 3664, 13, 4422, 273, 2845, 264, 18, 588, 67, 1966, 12, 1966, 2934, 9216, 1435, 4422, 18, 8837, 2668, 6...
document = self.__parser.parse()
document = self.__parser.parse(result)
def __change_location(self, result): # Find page from url pageCls = None for key, value in self.PAGES.items(): regexp = re.compile('^%s$' % key) m = regexp.match(result.geturl()) if m: pageCls = value break
123e16b563720caf95d436c1d12ef7f1e8ff52a2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7471/123e16b563720caf95d436c1d12ef7f1e8ff52a2/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3427, 67, 3562, 12, 2890, 16, 563, 4672, 468, 4163, 1363, 628, 880, 1363, 20822, 273, 599, 364, 498, 16, 460, 316, 365, 18, 11219, 55, 18, 3319, 13332, 7195, 273, 283, 18, 11100,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3427, 67, 3562, 12, 2890, 16, 563, 4672, 468, 4163, 1363, 628, 880, 1363, 20822, 273, 599, 364, 498, 16, 460, 316, 365, 18, 11219, 55, 18, 3319, 13332, 7195, 273, 283, 18, 11100,...
cty.c_int, [cty.c_int],
cty.c_int, [cty.c_int],
def flimage_enable_pnm(): """ flimage_enable_pnm() """ _flimage_enable_pnm()
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 2730, 67, 7589, 67, 7449, 81, 13332, 3536, 1183, 2730, 67, 7589, 67, 7449, 81, 1435, 3536, 225, 389, 2242, 2730, 67, 7589, 67, 7449, 81, 1435, 282, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 2730, 67, 7589, 67, 7449, 81, 13332, 3536, 1183, 2730, 67, 7589, 67, 7449, 81, 1435, 3536, 225, 389, 2242, 2730, 67, 7589, 67, 7449, 81, 1435, 282, 2, -100, -100, -100, -100, -10...
return self.getSyndicationTool().syndicateSomething(self.absolute_url(), syndication_tool.get_local_channels())
syndication_tool = self.getSyndicationTool() return syndication_tool.syndicateSomething(self.absolute_url(), syndication_tool.get_local_channels())
def localchannels_rdf(self): """ """ return self.getSyndicationTool().syndicateSomething(self.absolute_url(), syndication_tool.get_local_channels())
dea896a27032c1a923242747b80a142b47ac2ba8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3287/dea896a27032c1a923242747b80a142b47ac2ba8/NySite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1191, 9114, 67, 19299, 12, 2890, 4672, 3536, 3536, 327, 365, 18, 588, 10503, 72, 829, 6364, 7675, 11982, 72, 2659, 24332, 12, 2890, 18, 12547, 67, 718, 9334, 6194, 72, 829, 67, 6738, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1191, 9114, 67, 19299, 12, 2890, 4672, 3536, 3536, 327, 365, 18, 588, 10503, 72, 829, 6364, 7675, 11982, 72, 2659, 24332, 12, 2890, 18, 12547, 67, 718, 9334, 6194, 72, 829, 67, 6738, 1...
if not sys.stderr.closed:
if not getattr(sys.stderr, 'closed', False):
def write_err(self, *args): try: if not hasattr(sys.stdout, 'closed') or not sys.stdout.closed: sys.stdout.flush() for a in args: sys.stderr.write(str(a)) # stderr may be buffered under win32 when redirected to files, # including stdout. if not sys.stderr.closed: sys.stderr.flush() except IOError, inst: if inst.errno != errno.EPIPE: raise
128cbbfafe8e9a30c1ad816eb7d12470b5f437e6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/128cbbfafe8e9a30c1ad816eb7d12470b5f437e6/ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 370, 12, 2890, 16, 380, 1968, 4672, 775, 30, 309, 486, 3859, 12, 9499, 18, 10283, 16, 296, 12204, 6134, 578, 486, 2589, 18, 10283, 18, 12204, 30, 2589, 18, 10283, 18, 11330, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 370, 12, 2890, 16, 380, 1968, 4672, 775, 30, 309, 486, 3859, 12, 9499, 18, 10283, 16, 296, 12204, 6134, 578, 486, 2589, 18, 10283, 18, 12204, 30, 2589, 18, 10283, 18, 11330, ...
record(args[1], options)
record({'url':args[1]}, options)
def main(): usage = '''Usage: %prog url|play|record [OPTIONS] URL %prog search [OPTIONS] STRING... %prog
bf49a576dad44c5dac61e78545433b042e40e29b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11589/bf49a576dad44c5dac61e78545433b042e40e29b/arte+7.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 4084, 273, 9163, 5357, 30, 738, 14654, 880, 96, 1601, 96, 3366, 306, 12422, 65, 1976, 738, 14654, 1623, 306, 12422, 65, 9469, 2777, 738, 14654, 225, 2, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 2774, 13332, 4084, 273, 9163, 5357, 30, 738, 14654, 880, 96, 1601, 96, 3366, 306, 12422, 65, 1976, 738, 14654, 1623, 306, 12422, 65, 9469, 2777, 738, 14654, 225, 2, -100, -100, -100, -10...
warning_lines, error_lines = rest2html(file, htmlfile, os.path.join(self.project.directory, self.project.stylesheet))
warning_lines, error_lines = rest2html( file, htmlfile, os.path.join(self.project.directory, self.project.stylesheet))
def publishFileAsHTML(self, file): if file != '': wxBeginBusyCursor() try: t = time.localtime(time.time()) st = time.strftime('%d-%b-%Y, %H:%M:%S: ', t) wxLogMessage('%sProcessing %s.' % (st, file)) htmlfile = self.htmlfile(file) warning_lines = [] error_lines = [] try: warning_lines, error_lines = rest2html(file, htmlfile, os.path.join(self.project.directory, self.project.stylesheet)) finally: linecount = self.editor.GetLineCount() self.editor.MarkerDeleteAll(0) self.editor.MarkerDeleteAll(1) if warning_lines != []: for line in warning_lines: if line < linecount: self.editor.MarkerAdd(line, 0) self.editor.GotoLine(warning_lines[-1]) if error_lines != []: for line in error_lines: if line < linecount: self.editor.MarkerAdd(line, 1) self.editor.GotoLine(error_lines[-1]) self.editor.IsModified = false htmlfile_basename = os.path.basename(htmlfile) if os.path.exists(htmlfile): if self.nb.GetPageCount() > 1: self.nb.DeletePage(1) # init html preview page htmlprv = browser.HtmlPanel(self.nb, self, self.log, htmlfile) self.nb.AddPage(htmlprv, 'Preview: %s' % htmlfile_basename) if warning_lines == error_lines == []: self.nb.SetSelection(1) t = time.localtime(time.time()) st = time.strftime('%d-%b-%Y, %H:%M:%S: ', t) wxLogMessage('%sFinished.' % st) finally: wxEndBusyCursor()
0386dacaa4983ab8619dec87afda0aae584bc1ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/0386dacaa4983ab8619dec87afda0aae584bc1ad/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3808, 812, 1463, 4870, 12, 2890, 16, 585, 4672, 309, 585, 480, 875, 30, 7075, 8149, 29289, 6688, 1435, 775, 30, 268, 273, 813, 18, 3729, 957, 12, 957, 18, 957, 10756, 384, 273, 813, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3808, 812, 1463, 4870, 12, 2890, 16, 585, 4672, 309, 585, 480, 875, 30, 7075, 8149, 29289, 6688, 1435, 775, 30, 268, 273, 813, 18, 3729, 957, 12, 957, 18, 957, 10756, 384, 273, 813, ...
tilemap = TilemapLayer(tileset, 20, 10) m.add_layer(tilemap.to_layer()) tile = Tile("/home/ingo/cvs/supertux/supertux/data/images/tilesets/bonus1.png", CL_Color(255, 255, 255, 255), CL_Color(255, 0, 0, 128)) tileset.add_tile(0, tile) tileset.add_tile(1, tile) tileset.add_tile(2, tile)
def activate(self, workspace): #editor_tilemap_set_current(self.interactive.to_layer()) workspace.set_current_map(self.editormap)
43b90ffa52b9aa64a24adec670111ff4dee36213 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6395/43b90ffa52b9aa64a24adec670111ff4dee36213/editor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10235, 12, 2890, 16, 6003, 4672, 468, 9177, 67, 15368, 1458, 67, 542, 67, 2972, 12, 2890, 18, 24761, 18, 869, 67, 6363, 10756, 6003, 18, 542, 67, 2972, 67, 1458, 12, 2890, 18, 4619, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10235, 12, 2890, 16, 6003, 4672, 468, 9177, 67, 15368, 1458, 67, 542, 67, 2972, 12, 2890, 18, 24761, 18, 869, 67, 6363, 10756, 6003, 18, 542, 67, 2972, 67, 1458, 12, 2890, 18, 4619, ...
(run, run == 1 and "" or "s", timeTaken))
(run, run != 1 and "s" or "", timeTaken))
def run(self, test): "Run the given test case or test suite." result = self._makeResult() startTime = time.time() test(result) stopTime = time.time() timeTaken = float(stopTime - startTime) result.printErrors() self.stream.writeln(result.separator2) run = result.testsRun self.stream.writeln("Ran %d test%s in %.3fs" % (run, run == 1 and "" or "s", timeTaken)) self.stream.writeln() if not result.wasSuccessful(): self.stream.write("FAILED (") failed, errored = map(len, (result.failures, result.errors)) if failed: self.stream.write("failures=%d" % failed) if errored: if failed: self.stream.write(", ") self.stream.write("errors=%d" % errored) self.stream.writeln(")") else: self.stream.writeln("OK") return result
0a3fc02e30ba9e0293ca014e7761fcb522b54b11 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/0a3fc02e30ba9e0293ca014e7761fcb522b54b11/unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 1842, 4672, 315, 1997, 326, 864, 1842, 648, 578, 1842, 11371, 1199, 563, 273, 365, 6315, 6540, 1253, 1435, 8657, 273, 813, 18, 957, 1435, 1842, 12, 2088, 13, 2132, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 4672, 315, 1997, 326, 864, 1842, 648, 578, 1842, 11371, 1199, 563, 273, 365, 6315, 6540, 1253, 1435, 8657, 273, 813, 18, 957, 1435, 1842, 12, 2088, 13, 2132, ...
str = str + c
token.append(c)
def parseaddr(address): import string str = '' email = '' comment = '' backslash = 0 dquote = 0 space = 0 paren = 0 bracket = 0 seen_bracket = 0 for c in address: if backslash: str = str + c backslash = 0 continue if c == '\\': backslash = 1 continue if dquote: if c == '"': dquote = 0 else: str = str + c continue if c == '"': dquote = 1 continue if c in string.whitespace: space = 1 continue if space: str = str + ' ' space = 0 if paren: if c == '(': paren = paren + 1 str = str + c continue if c == ')': paren = paren - 1 if paren == 0: comment = comment + str str = '' continue if c == '(': paren = paren + 1 if bracket: email = email + str str = '' elif not seen_bracket: email = email + str str = '' continue if bracket: if c == '>': bracket = 0 email = email + str str = '' continue if c == '<': bracket = 1 seen_bracket = 1 comment = comment + str str = '' email = '' continue if c == '#' and not bracket and not paren: # rest is comment break str = str + c if str: if seen_bracket: if bracket: email = str else: comment = comment + str else: if paren: comment = comment + str else: email = email + str return string.strip(comment), string.strip(email)
ad36df39a17a332d23f762ca1cf22c7316382793 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/ad36df39a17a332d23f762ca1cf22c7316382793/rfc822.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 4793, 12, 2867, 4672, 1930, 533, 609, 273, 875, 2699, 273, 875, 2879, 273, 875, 23253, 273, 374, 302, 6889, 273, 374, 3476, 273, 374, 22146, 273, 374, 9843, 273, 374, 5881, 67, 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, 1109, 4793, 12, 2867, 4672, 1930, 533, 609, 273, 875, 2699, 273, 875, 2879, 273, 875, 23253, 273, 374, 302, 6889, 273, 374, 3476, 273, 374, 22146, 273, 374, 9843, 273, 374, 5881, 67, 2...
self.initfp(f)
try: self.initfp(f) except: if self._i_opened_the_file: f.close() raise
def __init__(self, f): self._i_opened_the_file = None if isinstance(f, basestring): f = __builtin__.open(f, 'wb') self._i_opened_the_file = f self.initfp(f)
518ed85496f3566260fba038f98a7da6c8575f01 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/518ed85496f3566260fba038f98a7da6c8575f01/wave.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 284, 4672, 365, 6315, 77, 67, 25304, 67, 5787, 67, 768, 273, 599, 309, 1549, 12, 74, 16, 10699, 4672, 284, 273, 1001, 24553, 25648, 3190, 12, 74, 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, 1001, 2738, 972, 12, 2890, 16, 284, 4672, 365, 6315, 77, 67, 25304, 67, 5787, 67, 768, 273, 599, 309, 1549, 12, 74, 16, 10699, 4672, 284, 273, 1001, 24553, 25648, 3190, 12, 74, 16, 2...
or just
or just ::
def fn(...): ...
446ff5c812110e5e63c63c13e72c7f38954e8420 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11054/446ff5c812110e5e63c63c13e72c7f38954e8420/profilehooks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2295, 5825, 4672, 1372, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2295, 5825, 4672, 1372, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def makepatch(patch, idx, total):
def makepatch(patch, idx, total, patchname=None):
def makepatch(patch, idx, total): desc = [] node = None body = '' for line in patch: if line.startswith('#'): if line.startswith('# Node ID'): node = line.split()[-1] continue if line.startswith('diff -r') or line.startswith('diff --git'): break desc.append(line) if not node: raise ValueError
5f8789270dde0ad495a09fe99904cd9d88a6585b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/5f8789270dde0ad495a09fe99904cd9d88a6585b/patchbomb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29796, 881, 505, 12, 2272, 16, 2067, 16, 2078, 16, 4729, 529, 33, 7036, 4672, 3044, 273, 5378, 756, 273, 599, 1417, 273, 875, 364, 980, 316, 4729, 30, 309, 980, 18, 17514, 1918, 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, 29796, 881, 505, 12, 2272, 16, 2067, 16, 2078, 16, 4729, 529, 33, 7036, 4672, 3044, 273, 5378, 756, 273, 599, 1417, 273, 875, 364, 980, 316, 4729, 30, 309, 980, 18, 17514, 1918, 2668, ...
muY, sigmaY = numpy.mean(y), numpy.std(y) muX, covX = numpy.mean(A, axis = 0), numpy.cov(A, rowvar = 0)
self.muY, self.sigmaY = numpy.mean(y), numpy.std(y) self.muX, self.covX = numpy.mean(A, axis = 0), numpy.cov(A, rowvar = 0)
def __call__(self, data, weight=None): # missing values handling (impute missing) imputer = orange.ImputerConstructor_model() imputer.learnerContinuous = orange.MajorityLearner() imputer.learnerDiscrete = orange.BayesLearner() imputer = imputer(data) data = imputer(data)
2f0d6c2e9c037aae88c832940eb40e18d9619a80 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/2f0d6c2e9c037aae88c832940eb40e18d9619a80/orngRegression.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 501, 16, 3119, 33, 7036, 4672, 468, 3315, 924, 5057, 261, 381, 2507, 3315, 13, 709, 458, 264, 273, 578, 726, 18, 1170, 458, 264, 6293, 67, 2284, 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, 1001, 1991, 972, 12, 2890, 16, 501, 16, 3119, 33, 7036, 4672, 468, 3315, 924, 5057, 261, 381, 2507, 3315, 13, 709, 458, 264, 273, 578, 726, 18, 1170, 458, 264, 6293, 67, 2284, 1435, ...
v0 = self.valuesList[0] v1 = self.valuesList[1] v2 = self.valuesList[2]
v0 = int(self.valuesList[0]) v1 = int(self.valuesList[1]) v2 = int(self.valuesList[2])
def _grabPoints(self): """ Reads vertex indices from a pset file. """ f = file(self.ucdFile) lines = f.readlines() fileLen = len(lines) firstline = lines[0].split() numVerts = int(firstline[0]) numCells = int(firstline[1]) numVertAttrs = int(firstline[2]) vertInd = 0 ucdInd = 0 # Get vertex coordinates for lineCount in range(1, numVerts+1): vertex = self.indices[vertInd] if vertex == ucdInd: data = line[lineCount].split() pointCoords.append(float(data[1]), float(data[2]), float(data[3])) vertInd += 1 ucdInd += 1
ace54b3397b4474efcd5c466bf6bb37dfeef58a6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8645/ace54b3397b4474efcd5c466bf6bb37dfeef58a6/grabpoints.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2752, 70, 5636, 12, 2890, 4672, 3536, 29185, 5253, 4295, 628, 279, 293, 542, 585, 18, 3536, 284, 273, 585, 12, 2890, 18, 89, 4315, 812, 13, 2362, 273, 284, 18, 896, 3548, 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, 389, 2752, 70, 5636, 12, 2890, 4672, 3536, 29185, 5253, 4295, 628, 279, 293, 542, 585, 18, 3536, 284, 273, 585, 12, 2890, 18, 89, 4315, 812, 13, 2362, 273, 284, 18, 896, 3548, 1435, ...
for (k, v) in output_formats.items(): if data.get("GENERATE_" + k, v[0]) == "YES":
for (k, v) in output_formats.iteritems(): if data.get("GENERATE_" + k, v[0]).upper() == "YES":
def DoxyEmitter(source, target, env): """Doxygen Doxyfile emitter""" # possible output formats and their default values and output locations output_formats = { "HTML": ("YES", "html"), "LATEX": ("YES", "latex"), "RTF": ("NO", "rtf"), "MAN": ("YES", "man"), "XML": ("NO", "xml"), } data = DoxyfileParse(source[0].get_contents(), str(source[0].dir)) targets = [] out_dir = data.get("OUTPUT_DIRECTORY", ".") # add our output locations for (k, v) in output_formats.items(): if data.get("GENERATE_" + k, v[0]) == "YES": # Grmpf ... need to use a File object here. The problem is, that # Dir.scan() is implemented to just return the directory entries # and does *not* invoke the source-file scanners .. ARGH !! dir = env.Dir( os.path.join(str(source[0].dir), out_dir, data.get(k + "_OUTPUT", v[1])) ) node = env.File( os.path.join(str(dir), ".stamp" ) ) env.Clean(node, dir) targets.append( node ) if data.has_key("GENERATE_TAGFILE"): targets.append(env.File( os.path.join(str(source[0].dir), data["GENERATE_TAGFILE"]) )) # don't clobber targets for node in targets: env.Precious(node) return (targets, source)
1be18a2af8b3880d492f80349c68c4d9cf1ae16a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2548/1be18a2af8b3880d492f80349c68c4d9cf1ae16a/Doxygen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2256, 1698, 13476, 12, 3168, 16, 1018, 16, 1550, 4672, 3536, 3244, 1698, 4507, 2256, 1698, 768, 11520, 8395, 468, 3323, 876, 6449, 471, 3675, 805, 924, 471, 876, 7838, 876, 67, 11962, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2256, 1698, 13476, 12, 3168, 16, 1018, 16, 1550, 4672, 3536, 3244, 1698, 4507, 2256, 1698, 768, 11520, 8395, 468, 3323, 876, 6449, 471, 3675, 805, 924, 471, 876, 7838, 876, 67, 11962, 27...
return self.tools.get_value(iter, 0)
if iter: return self.tools.get_value(iter, 0) else: return None
def current_tool(self): (model, iter) = self.tools_view.get_selection().get_selected() return self.tools.get_value(iter, 0)
40fe35fda164dec7c63e8465a9972594df525352 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14800/40fe35fda164dec7c63e8465a9972594df525352/prefs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 783, 67, 6738, 12, 2890, 4672, 261, 2284, 16, 1400, 13, 273, 365, 18, 6642, 67, 1945, 18, 588, 67, 10705, 7675, 588, 67, 8109, 1435, 327, 365, 18, 6642, 18, 588, 67, 1132, 12, 2165, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 783, 67, 6738, 12, 2890, 4672, 261, 2284, 16, 1400, 13, 273, 365, 18, 6642, 67, 1945, 18, 588, 67, 10705, 7675, 588, 67, 8109, 1435, 327, 365, 18, 6642, 18, 588, 67, 1132, 12, 2165, ...
opts.info("Domain %s destroyed for failed in rebooting" % d) doms.remove(d)
recreating[d] += 1 if recreating[d] > RECREATING_TIMEOUT: opts.info("Domain %s destroyed for failing to reboot" % d) doms.remove(d)
def wait_reboot(opts, doms, rcs): if serverType == SERVER_XEN_API: opts.err("Cannot wait for reboot w/ XenAPI (yet)") while doms: alive = server.xend.domains(0) reboot = [] for d in doms: if d in alive: rc = server.xend.domain.getRestartCount(d) if rc == rcs[d]: continue reboot.append(d) else: opts.info("Domain %s destroyed for failed in rebooting" % d) doms.remove(d) for d in reboot: opts.info("Domain %s rebooted" % d) doms.remove(d) time.sleep(1) opts.info("All domains rebooted")
54e2389ee9dcef9d98d5cd8ad3dc4009d032f413 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6195/54e2389ee9dcef9d98d5cd8ad3dc4009d032f413/shutdown.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2529, 67, 266, 7137, 12, 4952, 16, 4092, 87, 16, 436, 2143, 4672, 309, 1438, 559, 422, 15061, 67, 60, 1157, 67, 2557, 30, 1500, 18, 370, 2932, 4515, 2529, 364, 22852, 341, 19, 1139, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2529, 67, 266, 7137, 12, 4952, 16, 4092, 87, 16, 436, 2143, 4672, 309, 1438, 559, 422, 15061, 67, 60, 1157, 67, 2557, 30, 1500, 18, 370, 2932, 4515, 2529, 364, 22852, 341, 19, 1139, ...
wpa = rpm.mpw(13)
wpa = mpw(13)
def test03_Signs(self): if verbose: print '\n', '-=' * 30 print "Running %s.test03_Signs..." % \ self.__class__.__name__
02c21bd38bc4c3cd104df46a866a86ecb963492c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1057/02c21bd38bc4c3cd104df46a866a86ecb963492c/test_methods.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 4630, 67, 2766, 87, 12, 2890, 4672, 309, 3988, 30, 1172, 2337, 82, 2187, 2400, 2218, 380, 5196, 1172, 315, 7051, 738, 87, 18, 3813, 4630, 67, 2766, 87, 7070, 738, 521, 365, 16186...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 4630, 67, 2766, 87, 12, 2890, 4672, 309, 3988, 30, 1172, 2337, 82, 2187, 2400, 2218, 380, 5196, 1172, 315, 7051, 738, 87, 18, 3813, 4630, 67, 2766, 87, 7070, 738, 521, 365, 16186...
solutions, which will contain `|V| + (n-2)*|E|` entries, so
solutions, which will contain `|V| + (n-2)*|E|` entries, so
def all_graph_colorings(G,n,count_only=False): r""" Computes all `n`-colorings of the graph `G` by casting the graph coloring problem into an exact cover problem, and passing this into an implementation of the Dancing Links algorithm described by Knuth (who attributes the idea to Hitotumatu and Noshita). The construction works as follows: (columns) * The first `|V|` columns correspond to a vertex -- a `1` in this column indicates that that vertex has a color. * After those `|V|` columns, we add `n*|E|` columns -- a `1` in these columns indicate that a particular edge is incident to a vertex with a certain color. (rows) * For each vertex, add `n` rows; one for each color `c`. Place a `1` in the column corresponding to the vertex, and a `1` in the appropriate column for each edge incident to the vertex, indicating that that edge is incident to the color `c`. * If `n > 2`, the above construction cannot be exactly covered since each edge will be incident to only two vertices (and hence two colors) - so we add `n*|E|` rows, each one containing a `1` for each of the `n*|E|` columns. These get added to the cover solutions "for free" during the backtracking. Note that this construction results in `n*|V| + 2*n*|E| + n*|E|` entries in the matrix. The Dancing Links algorithm uses a sparse representation, so if the graph is simple, `|E| \leq |V|^2` and `n <= |V|`, this construction runs in `O(|V|^3)` time. Back-conversion to a coloring solution is a simple scan of the solutions, which will contain `|V| + (n-2)*|E|` entries, so runs in `O(|V|^3)` time also. For most graphs, the conversion will be much faster -- for example, a planar graph will be transformed for `4`-coloring in linear time since `|E| = O(|V|)`. REFERENCES: http://www-cs-staff.stanford.edu/~uno/papers/dancing-color.ps.gz EXAMPLES:: sage: from sage.graphs.graph_coloring import all_graph_colorings sage: G = Graph({0:[1,2,3],1:[2]}) sage: n = 0 sage: for C in all_graph_colorings(G,3): ... parts = [C[k] for k in C] ... for P in parts: ... l = len(P) ... for i in range(l): ... for j in range(i+1,l): ... if G.has_edge(P[i],P[j]): ... raise RuntimeError, "Coloring Failed." ... n+=1 sage: print "G has %s 3-colorings."%n G has 12 3-colorings. TESTS:: sage: G = Graph({0:[1,2,3],1:[2]}) sage: for C in all_graph_colorings(G,0): print C sage: for C in all_graph_colorings(G,-1): print C Traceback (most recent call last): ... ValueError: n must be non-negative. """ if n == 0: return if n < 0: raise ValueError, "n must be non-negative." V = G.vertices() E = G.edges() nV=len(V) nE=len(E) ones = [] N = xrange(n) Vd= {} colormap = {} k = 0 for i in range(nV): v = V[i] Vd[v] = i for c in N: ones.append([k, [i]]) colormap[k] = (v,c) k+=1 kk = nV for e in E: for c in N: v0 = n*Vd[e[0]]+c v1 = n*Vd[e[1]]+c ones[v0][1].append(kk+c) ones[v1][1].append(kk+c) kk+=n if n > 2: for i in range(n*nE): ones.append([k+i, [nV+i]]) colors = rainbow(n) for i in range(len(ones)): ones[i] = ones[i][1] try: for a in DLXCPP(ones): if count_only: yield 1 continue coloring = {} for x in a: if colormap.has_key(x): v,c = colormap[x] if coloring.has_key(colors[c]): coloring[colors[c]].append(v) else: coloring[colors[c]] = [v] yield coloring except RuntimeError: raise RuntimeError, "Too much recursion! Graph coloring failed."
0d7c50e7966c0248757876bb79ed98d62c5f0550 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/0d7c50e7966c0248757876bb79ed98d62c5f0550/graph_coloring.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 777, 67, 4660, 67, 3266, 899, 12, 43, 16, 82, 16, 1883, 67, 3700, 33, 8381, 4672, 436, 8395, 14169, 281, 777, 1375, 82, 68, 17, 3266, 899, 434, 326, 2667, 1375, 43, 68, 635, 27660, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 777, 67, 4660, 67, 3266, 899, 12, 43, 16, 82, 16, 1883, 67, 3700, 33, 8381, 4672, 436, 8395, 14169, 281, 777, 1375, 82, 68, 17, 3266, 899, 434, 326, 2667, 1375, 43, 68, 635, 27660, ...
first, second = self._coset_reduction_data() gcd_u_N = first[u][1] gcd_v_N = first[v][1]
def _reduce_cusp(self, c): """ Compute a canonical form for the cusp $uu/vv$. INPUT: cusp OUTPUT: cusp
ee19a19f73bdcdc6c0b1860d28d316c82faa2cd5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/ee19a19f73bdcdc6c0b1860d28d316c82faa2cd5/congroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12498, 67, 71, 407, 84, 12, 2890, 16, 276, 4672, 3536, 8155, 279, 7378, 646, 364, 326, 27964, 84, 271, 24286, 19, 15530, 8, 18, 225, 12943, 30, 27964, 84, 11550, 30, 27964, 84, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12498, 67, 71, 407, 84, 12, 2890, 16, 276, 4672, 3536, 8155, 279, 7378, 646, 364, 326, 27964, 84, 271, 24286, 19, 15530, 8, 18, 225, 12943, 30, 27964, 84, 11550, 30, 27964, 84, ...
self.UpdateImage(target_image_path)
try: self.UpdateImage(target_image_path) except: if self.use_delta_updates: Warning('Delta update failed, disabling delta updates and retrying.') self.use_delta_updates = False self.source_image = '' self.UpdateImage(target_image_path) else: raise
def testFullUpdateKeepStateful(self): """Tests if we can update normally.
f8b650ac1aba3ceb165e12de80069cde81ab29b7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/f8b650ac1aba3ceb165e12de80069cde81ab29b7/cros_au_test_harness.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 5080, 1891, 11523, 1119, 2706, 12, 2890, 4672, 3536, 14650, 309, 732, 848, 1089, 15849, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 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, 1842, 5080, 1891, 11523, 1119, 2706, 12, 2890, 4672, 3536, 14650, 309, 732, 848, 1089, 15849, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
str(size), digest[1], str(offset), data)
str(size), digest, str(offset), data)
def proc_evt_file_write(self, evt): fid = evt.arg('file_id') finfo = self.get_file_info(fid) if finfo is None: self.on_error("File with given id (%s) does not exist." % fid) return # NOTE: be careful here. finfo is not ordinary dict! It never rewrites # existing items with None's. finfo['codec'] = evt.arg('codec', None) codec = finfo.get('codec', None) offset = evt.arg('offset', None) seqoff = finfo.get('offset', 0) if offset is None: offset = seqoff elif offset != seqoff: if offset == 0: # task might want to re-upload file from offset 0. log.info('Rewriting file %s.' % fid) else: log.warning("Given offset (%s) does not match calculated (%s).", offset, seqoff) data = evt.arg('data') try: cdata = event.decode(codec, data) except: self.on_exception("Unable to decode data.") return if cdata is None: self.on_error("No data found.") return size = len(cdata) self.set_file_info(fid, offset=offset+size) # FIXME: make this config.option digest_method = 'md5' digest = digests.make_digest(evt.arg('digest', None)) if digest is None or digest[0] != digest_method: d = digests.DigestConstructor(digest_method) d.update(cdata) digest = (digest_method, d.hexdigest()) if codec != "base64": data = event.encode("base64", cdata) if finfo.has_key('be:uploading_as'): method, id, path, filename = finfo['be:uploading_as'] else: filename = finfo.get('name', self.task_data['task_env']['TASKNAME'] + '/' + fid) method = 'task_upload_file' id = evt.task_id if finfo.has_key('be:upload_as'): upload_as = finfo['be:upload_as'] if upload_as[0] == 'result_file': if upload_as[2]: filename = upload_as[2] id = upload_as[1] method = 'result_upload_file' # I would prefer following, but rsplit is not in python2.3: # (path, filename) = ('/' + filename).rsplit('/', 1) filename = '/' + filename sep_ix = filename.rfind('/') (path, filename) = (filename[:sep_ix], filename[sep_ix+1:]) path = path[1:] or '/' finfo['be:uploading_as'] = (method, id, path, filename)
6289be5b706f7736b6cfe42c91d79ea1fdbb6059 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13148/6289be5b706f7736b6cfe42c91d79ea1fdbb6059/beakerlc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5418, 67, 73, 11734, 67, 768, 67, 2626, 12, 2890, 16, 6324, 4672, 13444, 273, 6324, 18, 3175, 2668, 768, 67, 350, 6134, 15190, 273, 365, 18, 588, 67, 768, 67, 1376, 12, 27268, 13, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5418, 67, 73, 11734, 67, 768, 67, 2626, 12, 2890, 16, 6324, 4672, 13444, 273, 6324, 18, 3175, 2668, 768, 67, 350, 6134, 15190, 273, 365, 18, 588, 67, 768, 67, 1376, 12, 27268, 13, 30...