rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
return filter(lambda x: x is not None, self._attrMap['kind']._enum)
return filter(lambda x: x is not None, self._attrMap['kind'].validate._enum)
def availableFlagNames(self): '''return a list of the things we can display''' return filter(lambda x: x is not None, self._attrMap['kind']._enum)
b2fe21ccb856f97caee633ef3318c5bd62bac27b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/b2fe21ccb856f97caee633ef3318c5bd62bac27b/flags.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2319, 4678, 1557, 12, 2890, 4672, 9163, 2463, 279, 666, 434, 326, 9198, 732, 848, 2562, 26418, 327, 1034, 12, 14661, 619, 30, 619, 353, 486, 599, 16, 365, 6315, 1747, 863, 3292, 9224, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2319, 4678, 1557, 12, 2890, 4672, 9163, 2463, 279, 666, 434, 326, 9198, 732, 848, 2562, 26418, 327, 1034, 12, 14661, 619, 30, 619, 353, 486, 599, 16, 365, 6315, 1747, 863, 3292, 9224, ...
graph.setData(self.data, str(self.attributesLB.text(i)))
graph.setData(self.data, selected[i])
def createGraphs(self): for graph in self.graphs: graph.hide() self.graphs = []
152b6a1694ed8efaaf9229db0c07c7fd00fd2d14 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/152b6a1694ed8efaaf9229db0c07c7fd00fd2d14/OWDistributionsMatrix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 4137, 87, 12, 2890, 4672, 364, 2667, 316, 365, 18, 30016, 30, 2667, 18, 11248, 1435, 365, 18, 30016, 273, 5378, 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, 752, 4137, 87, 12, 2890, 4672, 364, 2667, 316, 365, 18, 30016, 30, 2667, 18, 11248, 1435, 365, 18, 30016, 273, 5378, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return wikipedia.decodeEsperantoX(getText)
return wikipedia.decodeEsperantoX(getText)
def post_get_convert(self, site, getText): if site.lang == 'eo':
d80769d86c1fc35eac60949d3ec116329b831997 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/d80769d86c1fc35eac60949d3ec116329b831997/wikipedia_family.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 67, 588, 67, 6283, 12, 2890, 16, 2834, 16, 6701, 4672, 309, 2834, 18, 4936, 422, 296, 4361, 4278, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 67, 588, 67, 6283, 12, 2890, 16, 2834, 16, 6701, 4672, 309, 2834, 18, 4936, 422, 296, 4361, 4278, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
run_unittest(ImportTest)
run_unittest(ImportTest, UnicodePathsTests)
def test_main(verbose=None): run_unittest(ImportTest)
ad12b73249fa71084d479a4a9298e32e53d54e09 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/ad12b73249fa71084d479a4a9298e32e53d54e09/test_import.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5254, 12, 11369, 33, 7036, 4672, 1086, 67, 4873, 3813, 12, 5010, 4709, 16, 9633, 4466, 14650, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5254, 12, 11369, 33, 7036, 4672, 1086, 67, 4873, 3813, 12, 5010, 4709, 16, 9633, 4466, 14650, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
def _get_handler(self, segment):
def _get_handler(self, segment, resource):
def _get_handler(self, segment): name = segment.name if self.has_resource(name): resource = self.get_resource(name) if name == 'segments': return Segments(resource) elif name == 'deletable': return Deletable(resource) elif name.count('.') == 1: # Maybe it is a segment file segments = self.get_handler('segments') name, extension = name.split('.') if name in segments.segments: # It really looks like a segment file if extension == 'fnm': return Lucene.FieldInfos(resource) elif extension == 'fdx': ndocs = segments.segments[name] return Lucene.FieldIndex(resource, num_docs=ndocs) elif extension == 'fdt': ndocs = segments.segments[name] return Lucene.FieldData(resource, num_docs=ndocs) elif extension == 'tis': return Lucene.TermInfoFile(resource) elif extension == 'tii': return Lucene.TermInfoIndex(resource) elif extension == 'frq': tis = self.get_handler('%s.tis' % name) num_terms = tis.term_count return Lucene.FreqFile(resource, num_terms=num_terms) elif extension == 'prx': tis = self.get_handler('%s.tis' % name) num_terms = tis.term_count return Lucene.ProxFile(resource, num_terms=num_terms) elif extension == 'tvx': ndocs = segments.segments[name] return Lucene.DocumentIndex(resource, num_docs=ndocs) elif extension == 'tvd': ndocs = segments.segments[name] return Lucene.Document(resource, num_docs=ndocs) elif extension == 'tvf': tvd = self.get_handler('%s.tvd' % name) nfields = tvd.get_nfields() return Lucene.Field(resource, num_fields=nfields) elif extension == 'del': return Lucene.DeletedDocuments(resource) elif extension[0] == 'f': # XXX Normalization pass return Folder._get_handler(self, segment)
482914637eb1a6c73258013dff2e05da9c811f3b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/482914637eb1a6c73258013dff2e05da9c811f3b/Index.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 4176, 12, 2890, 16, 3267, 16, 1058, 4672, 508, 273, 3267, 18, 529, 309, 365, 18, 5332, 67, 3146, 12, 529, 4672, 1058, 273, 365, 18, 588, 67, 3146, 12, 529, 13, 309, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 4176, 12, 2890, 16, 3267, 16, 1058, 4672, 508, 273, 3267, 18, 529, 309, 365, 18, 5332, 67, 3146, 12, 529, 4672, 1058, 273, 365, 18, 588, 67, 3146, 12, 529, 13, 309, 5...
self.logger.info("Single Pass for Install Succeded")
self.logger.info("Single Pass for Install Succeeded")
def Install(self, packages, states): ''' Try and fix everything that RPMng.VerifyPackages() found wrong for each Package Entry. This can result in individual RPMs being installed (for the first time), deleted, downgraded or upgraded.
78aa59d824454beacf68e3fc6914b39153372cc4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11867/78aa59d824454beacf68e3fc6914b39153372cc4/YUMng.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10284, 12, 2890, 16, 5907, 16, 5493, 4672, 9163, 6161, 471, 2917, 7756, 716, 534, 12728, 3368, 18, 8097, 11425, 1435, 1392, 7194, 364, 1517, 7508, 3841, 18, 225, 1220, 848, 563, 316, 732...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10284, 12, 2890, 16, 5907, 16, 5493, 4672, 9163, 6161, 471, 2917, 7756, 716, 534, 12728, 3368, 18, 8097, 11425, 1435, 1392, 7194, 364, 1517, 7508, 3841, 18, 225, 1220, 848, 563, 316, 732...
self.trace += " remove %s from path %s\n" %(nid,str(paths))
if DEBUG: self.trace += " remove %s from path %s\n" %(nid,str(paths))
def __delete_node(self,nid,paths=None): '''Delete occurence of node nid for given paths. if paths is None, then the node is removed for every paths it belongs to. Deleting a node means : 1. Deleting all the next_nodes 2. Deleting all the children. 3. Deleting the node itself. 4. Re-adding all the next_nodes ''' error = 'Delete node %s (p=%s)\n' %(nid,paths) if self.is_displayed(nid): # and nid not in self.deleting_queue: if not paths: paths = self.get_paths_for_node(nid) self.trace += " remove %s from path %s\n" %(nid,str(paths)) #0. we first delete next_nodes, left first paths.sort() paths.reverse() for p in paths: error += "We are in the process of deleting %s %s\n" %(nid,str(p)) nexts = self.__next_nodes(nid,p) # 1. recursively delete all children, left-leaf first # and also delete all next_nodes (that we will readd afterward) for n in nexts: self.__delete_node(n[0],[n[1]]) children = self.node_all_children(nid) i = len(children) while i > 0: i -= 1 cpath = p + (i,) real_cpaths = self.get_paths_for_node(children[i]) if not cpath in real_cpaths: error += "thus, I want to remove children %s\n" %children error += "but %s is not in paths of %s\n " %(str(cpath),children[i]) error += "children paths are : %s" %real_cpaths
d1e2e3781c819eab079c7a3534f1638eeb7d7317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/d1e2e3781c819eab079c7a3534f1638eeb7d7317/filteredtree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3733, 67, 2159, 12, 2890, 16, 31030, 16, 4481, 33, 7036, 4672, 9163, 2613, 9145, 25267, 434, 756, 19416, 364, 864, 2953, 18, 309, 2953, 353, 599, 16, 1508, 326, 756, 353, 3723, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3733, 67, 2159, 12, 2890, 16, 31030, 16, 4481, 33, 7036, 4672, 9163, 2613, 9145, 25267, 434, 756, 19416, 364, 864, 2953, 18, 309, 2953, 353, 599, 16, 1508, 326, 756, 353, 3723, 3...
w_self = space.wrap(self) w_result = space.lookup(w_self, space.str_w(w_attr)) if w_result is None: return space.getattr(self.w_function, w_attr) else: return space.get(w_result, w_self)
if space.str_w(w_attr) != '__doc__': try: return space.call_method(space.w_object, '__getattribute__', space.wrap(self), w_attr) except OperationError, e: if not e.match(space, space.w_AttributeError): raise return space.getattr(self.w_function, w_attr)
def descr_method_getattribute(self, w_attr): space = self.space w_self = space.wrap(self) w_result = space.lookup(w_self, space.str_w(w_attr)) if w_result is None: return space.getattr(self.w_function, w_attr) else: return space.get(w_result, w_self)
65a3e4ae12ab15bc4d2fbfe52c2b8ce03c6a7f91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/65a3e4ae12ab15bc4d2fbfe52c2b8ce03c6a7f91/function.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18426, 67, 2039, 67, 588, 4589, 12, 2890, 16, 341, 67, 1747, 4672, 3476, 273, 365, 18, 2981, 341, 67, 2890, 273, 3476, 18, 4113, 12, 2890, 13, 341, 67, 2088, 273, 3476, 18, 8664, 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, 18426, 67, 2039, 67, 588, 4589, 12, 2890, 16, 341, 67, 1747, 4672, 3476, 273, 365, 18, 2981, 341, 67, 2890, 273, 3476, 18, 4113, 12, 2890, 13, 341, 67, 2088, 273, 3476, 18, 8664, 12,...
port = cfg['port'] ssl_port = cfg['ssl_port']
ssl_port = cfg['port']
def __init__(self): cfg = initConfig() host = cfg['hostname'] or "localhost" port = cfg['port'] ssl_port = cfg['ssl_port'] cert_file = ConsumerIdentity.certpath() key_file = ConsumerIdentity.keypath() UEPConnection.__init__(self, host, port, ssl_port, cert_file=cert_file, key_file=key_file) self.uuid = self.consumerId()
8e868f0d6fe58e86ce33b0b78be35acefb7f8339 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11137/8e868f0d6fe58e86ce33b0b78be35acefb7f8339/certlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2776, 273, 1208, 809, 1435, 1479, 273, 2776, 3292, 10358, 3546, 578, 315, 13014, 6, 5832, 67, 655, 273, 2776, 3292, 655, 3546, 3320, 67, 768, 273, 9326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2776, 273, 1208, 809, 1435, 1479, 273, 2776, 3292, 10358, 3546, 578, 315, 13014, 6, 5832, 67, 655, 273, 2776, 3292, 655, 3546, 3320, 67, 768, 273, 9326, ...
"[TARGETDIR]Lib;[TARGETDIR]DLLs;[TARGETDIR]lib-tk", "REGISTRY"),
r"[TARGETDIR]Lib;[TARGETDIR]DLLs;[TARGETDIR]Lib\lib-tk", "REGISTRY"),
# File extensions, associated with the REGISTRY.def component
a1bfcc6fb10b93a39e42b54300605d3976dc9168 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a1bfcc6fb10b93a39e42b54300605d3976dc9168/msi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 1387, 4418, 16, 3627, 598, 326, 11980, 25042, 18, 536, 1794, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 468, 1387, 4418, 16, 3627, 598, 326, 11980, 25042, 18, 536, 1794, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.exclusions.add(item)
if not isDeleting: self.exclusions.add(item)
def remove(self, item): """ Remove an item from the collection. """
ffbafa2c10bbb63bff531dba7da53521f8e95bf8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/ffbafa2c10bbb63bff531dba7da53521f8e95bf8/collections.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 12, 2890, 16, 761, 4672, 3536, 3581, 392, 761, 628, 326, 1849, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 12, 2890, 16, 761, 4672, 3536, 3581, 392, 761, 628, 326, 1849, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
return self.__component.getSize () elif attr == "extents": return self.__component.getExtents ()
extents = self.__component.getExtents() size = (extents[2], extents[3]) return size
def __getattr__ (self, attr): if False: pass
b81fa787c7ef65429bbe336b72c602f94d4f21aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10139/b81fa787c7ef65429bbe336b72c602f94d4f21aa/tree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1747, 972, 261, 2890, 16, 1604, 4672, 309, 1083, 30, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1747, 972, 261, 2890, 16, 1604, 4672, 309, 1083, 30, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
get_transaction().commit()
transaction.get().commit()
def logout(self): noSecurityManager() get_transaction().commit() if not self._quiet: ZopeTestCase._print('done (%.3fs)\n' % (time.time() - self._start,))
3d47e0a275a64d15743c2df764df65513954fb46 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/3d47e0a275a64d15743c2df764df65513954fb46/NaayaTestCase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12735, 12, 2890, 4672, 1158, 4368, 1318, 1435, 2492, 18, 588, 7675, 7371, 1435, 309, 486, 365, 6315, 20380, 30, 2285, 1306, 4709, 2449, 6315, 1188, 2668, 8734, 6142, 18, 23, 2556, 5153, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12735, 12, 2890, 4672, 1158, 4368, 1318, 1435, 2492, 18, 588, 7675, 7371, 1435, 309, 486, 365, 6315, 20380, 30, 2285, 1306, 4709, 2449, 6315, 1188, 2668, 8734, 6142, 18, 23, 2556, 5153, ...
data = "".join(bonsaiQuery.readlines())
def __init__(self, bonsaiQuery): try: # this is a fix for non-ascii characters # readlines() + join is being used because read() is not guaranteed # to work. because bonsai does not give us an encoding to work with # it impossible to be 100% sure what to decode it as but latin1 covers # the broadest base data = "".join(bonsaiQuery.readlines()) data = data.decode("latin1") data = data.encode("ascii", "replace") self.dom = minidom.parseString(data) log.msg(data) except: raise InvalidResultError("Malformed XML in result")
11e4f3bba7de1cd8a3f6529b490d24bdd74108b2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13067/11e4f3bba7de1cd8a3f6529b490d24bdd74108b2/bonsaipoller.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 324, 7008, 10658, 1138, 4672, 775, 30, 468, 333, 353, 279, 2917, 364, 1661, 17, 9184, 3949, 468, 17546, 1435, 397, 1233, 353, 3832, 1399, 2724, 855, 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, 2738, 972, 12, 2890, 16, 324, 7008, 10658, 1138, 4672, 775, 30, 468, 333, 353, 279, 2917, 364, 1661, 17, 9184, 3949, 468, 17546, 1435, 397, 1233, 353, 3832, 1399, 2724, 855, 1435, ...
return self._simple_command(name, arg1, arg2)
return apply(self._simple_command, (name,) + args)
def xatom(self, name, arg1=None, arg2=None): """Allow simple extension commands notified by server in CAPABILITY response.
46586822058b54c93e36247f31b13b4d7286f0a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/46586822058b54c93e36247f31b13b4d7286f0a2/imaplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 619, 7466, 12, 2890, 16, 508, 16, 1501, 21, 33, 7036, 16, 1501, 22, 33, 7036, 4672, 3536, 7009, 4143, 2710, 4364, 18791, 635, 1438, 316, 29720, 22879, 766, 18, 2, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 619, 7466, 12, 2890, 16, 508, 16, 1501, 21, 33, 7036, 16, 1501, 22, 33, 7036, 4672, 3536, 7009, 4143, 2710, 4364, 18791, 635, 1438, 316, 29720, 22879, 766, 18, 2, -100, -100, -100, -10...
if not len (text):
if not len (text) or text.lower() == "disabled":
def GetLabelText (self, text): if not len (text): text = _("Disabled") return text
ae3a20e0a55da939f7f2eeb74762fa3fa898a83c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1272/ae3a20e0a55da939f7f2eeb74762fa3fa898a83c/Settings.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 2224, 1528, 261, 2890, 16, 977, 4672, 309, 486, 562, 261, 955, 13, 578, 977, 18, 8167, 1435, 422, 315, 9278, 6877, 977, 273, 389, 2932, 8853, 7923, 327, 977, 2, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 2224, 1528, 261, 2890, 16, 977, 4672, 309, 486, 562, 261, 955, 13, 578, 977, 18, 8167, 1435, 422, 315, 9278, 6877, 977, 273, 389, 2932, 8853, 7923, 327, 977, 2, -100, -100, -100, ...
provideUtility(PreferredCharsetResolver, IUnicodeEncodingConflictResolver)
provideUtility(PreferredCharsetResolver, IUnicodeEncodingConflictResolver)
def afterSetUp(self): zope.component.provideAdapter(DefaultTraversable, (None,)) zope.component.provideAdapter(HTTPCharsets, (None,)) provideUtility(PreferredCharsetResolver, IUnicodeEncodingConflictResolver)
9ee8932389e2937ac17156196be900f498e09cdc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9658/9ee8932389e2937ac17156196be900f498e09cdc/testZopePageTemplate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1839, 694, 1211, 12, 2890, 4672, 998, 1306, 18, 4652, 18, 685, 6768, 4216, 12, 1868, 15844, 429, 16, 261, 7036, 16, 3719, 998, 1306, 18, 4652, 18, 685, 6768, 4216, 12, 3693, 19329, 16,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1839, 694, 1211, 12, 2890, 4672, 998, 1306, 18, 4652, 18, 685, 6768, 4216, 12, 1868, 15844, 429, 16, 261, 7036, 16, 3719, 998, 1306, 18, 4652, 18, 685, 6768, 4216, 12, 3693, 19329, 16,...
l = len(chunks[0])
l = len(chunks[-1])
def _wrap_chunks(self, chunks): """_wrap_chunks(chunks : [string]) -> [string]
dc2b58fec1136c01f1e1810f095012c92e0fed82 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/dc2b58fec1136c01f1e1810f095012c92e0fed82/textwrap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4113, 67, 14691, 12, 2890, 16, 6055, 4672, 3536, 67, 4113, 67, 14691, 12, 14691, 294, 306, 1080, 5717, 317, 306, 1080, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4113, 67, 14691, 12, 2890, 16, 6055, 4672, 3536, 67, 4113, 67, 14691, 12, 14691, 294, 306, 1080, 5717, 317, 306, 1080, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if self.prefix[0:6] == 'Liber:': self.prefix = self.prefix[6:] wikipedia.output("Using prefix %s" % self.prefix) gen = self.PagesGenerator() site = wikipedia.getSite()
if self.prefix[0:6] == 'Liber:': self.prefix = self.prefix[6:] wikipedia.output(u"Using prefix %s" % self.prefix) gen = self.PagesGenerator() site = wikipedia.getSite()
def run(self): # Set the edit summary message wikipedia.setAction(wikipedia.translate(wikipedia.getSite(), self.msg))
d67bfeea9d6dffa809c6e92da5ceee1d1a77a309 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/d67bfeea9d6dffa809c6e92da5ceee1d1a77a309/djvutext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 468, 1000, 326, 3874, 4916, 883, 21137, 18, 542, 1803, 12, 11999, 13744, 18, 13929, 12, 11999, 13744, 18, 588, 4956, 9334, 365, 18, 3576, 3719, 2, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 468, 1000, 326, 3874, 4916, 883, 21137, 18, 542, 1803, 12, 11999, 13744, 18, 13929, 12, 11999, 13744, 18, 588, 4956, 9334, 365, 18, 3576, 3719, 2, -100, -100, -100,...
if hasattr(self,'dom'): del self.dom self.TextInfo=super(MSHTML,self).TextInfo
if hasattr(self,'domElement'): self.TextInfo=super(MSHTML,self).TextInfo
def event_looseFocus(self): if hasattr(self,'dom'): del self.dom self.TextInfo=super(MSHTML,self).TextInfo
e414733012e267c4ac0a4ed4c2b245743e7a1b97 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9340/e414733012e267c4ac0a4ed4c2b245743e7a1b97/MSHTML.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 67, 383, 2584, 9233, 12, 2890, 4672, 309, 3859, 12, 2890, 11189, 9859, 11, 4672, 1464, 365, 18, 9859, 365, 18, 1528, 966, 33, 9565, 12, 49, 2664, 2838, 16, 2890, 2934, 1528, 966, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 871, 67, 383, 2584, 9233, 12, 2890, 4672, 309, 3859, 12, 2890, 11189, 9859, 11, 4672, 1464, 365, 18, 9859, 365, 18, 1528, 966, 33, 9565, 12, 49, 2664, 2838, 16, 2890, 2934, 1528, 966, ...
idx = 0
changes = []
def insert_ticket_data(self, req, id, ticket, reporter_id): """Insert ticket data into the hdf""" evals = util.mydict(zip(ticket.keys(), map(lambda x: util.escape(x), ticket.values()))) util.add_to_hdf(evals, req.hdf, 'ticket')
d1c0c206b8a3a21eda1d0176db9e3475fd0d5996 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/d1c0c206b8a3a21eda1d0176db9e3475fd0d5996/Ticket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 67, 16282, 67, 892, 12, 2890, 16, 1111, 16, 612, 16, 9322, 16, 11528, 67, 350, 4672, 3536, 4600, 9322, 501, 1368, 326, 24217, 8395, 22654, 273, 1709, 18, 4811, 1576, 12, 4450, 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, 2243, 67, 16282, 67, 892, 12, 2890, 16, 1111, 16, 612, 16, 9322, 16, 11528, 67, 350, 4672, 3536, 4600, 9322, 501, 1368, 326, 24217, 8395, 22654, 273, 1709, 18, 4811, 1576, 12, 4450, 12...
qooxdooVersions = self.libraries[library][version].getManifest()["info"]["qooxdoo-versions"] for ver in qooxdooVersions: demoDict["tags"].append("qxVersion_" + ver)
def getDemoData(self, library, version, variant): demoDict = { "name": variant + ".html", "nr": variant.capitalize(), "tags": [library], "title": library + " " + version + " " + variant } qooxdooVersions = self.libraries[library][version].getManifest()["info"]["qooxdoo-versions"] for ver in qooxdooVersions: demoDict["tags"].append("qxVersion_" + ver)
4f201391e36bc8bf01749f5a9c6942efa4d667f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/4f201391e36bc8bf01749f5a9c6942efa4d667f5/repository.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2343, 351, 83, 751, 12, 2890, 16, 5313, 16, 1177, 16, 5437, 4672, 21477, 5014, 273, 288, 315, 529, 6877, 5437, 397, 3552, 2620, 3113, 315, 11611, 6877, 5437, 18, 5909, 7053, 554, 9334, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2343, 351, 83, 751, 12, 2890, 16, 5313, 16, 1177, 16, 5437, 4672, 21477, 5014, 273, 288, 315, 529, 6877, 5437, 397, 3552, 2620, 3113, 315, 11611, 6877, 5437, 18, 5909, 7053, 554, 9334, ...
def createElt(self, xml):
def createElts(self, xml):
# def printHTML(self):
e58799d897a7951bd79acce5f6f08838bacfdfb8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/e58799d897a7951bd79acce5f6f08838bacfdfb8/HTMLDisplay.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 377, 1652, 1172, 4870, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 377, 1652, 1172, 4870, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.assertEqual(result, ['Entity/Label', 'Software/ProductName', 'Hardware/OperatingSystem', 'Registry/Value/display name', 'Drive/TotalSpace', 'Hardware/ProcessorType', 'Software/Products'])
self.assertEqual(result, ['Inventory/Date', 'Entity/Label', 'Software/ProductName', 'Hardware/OperatingSystem', 'Registry/Value/display name', 'Drive/TotalSpace', 'Hardware/ProcessorType', 'Software/Products'])
def test240getPossiblesCriterionsInMainModule(self): result = self.client.getPossiblesCriterionsInMainModule() self.assertEqual(result, ['Entity/Label', 'Software/ProductName', 'Hardware/OperatingSystem', 'Registry/Value/display name', 'Drive/TotalSpace', 'Hardware/ProcessorType', 'Software/Products'])
86db21d6a7e11a20154975bab039780a4ef71b0d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5988/86db21d6a7e11a20154975bab039780a4ef71b0d/mmcagent-dyngroup-empty.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 28784, 588, 1616, 6044, 1040, 39, 1091, 1115, 382, 6376, 3120, 12, 2890, 4672, 563, 273, 365, 18, 2625, 18, 588, 1616, 6044, 1040, 39, 1091, 1115, 382, 6376, 3120, 1435, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 28784, 588, 1616, 6044, 1040, 39, 1091, 1115, 382, 6376, 3120, 12, 2890, 4672, 563, 273, 365, 18, 2625, 18, 588, 1616, 6044, 1040, 39, 1091, 1115, 382, 6376, 3120, 1435, 365, 18, ...
self.add_var_opt('gps-start-time', int(time)-int(pad))
if pad: self.add_var_opt('gps-start-time', int(time)-int(pad)) else: self.add_var_opt('gps-start-time', int(time))
def set_start(self,time,pad = None): """ Set the start time of the datafind query. @param time: GPS start time of query. """ self.add_var_opt('gps-start-time', int(time)-int(pad)) self.__start = time self.__set_output()
07948688953957b924cda55fd154fe61db885b0d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3589/07948688953957b924cda55fd154fe61db885b0d/pipeline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 1937, 12, 2890, 16, 957, 16, 6982, 273, 599, 4672, 3536, 1000, 326, 787, 813, 434, 326, 501, 4720, 843, 18, 632, 891, 813, 30, 29783, 787, 813, 434, 843, 18, 3536, 309, 4627...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 1937, 12, 2890, 16, 957, 16, 6982, 273, 599, 4672, 3536, 1000, 326, 787, 813, 434, 326, 501, 4720, 843, 18, 632, 891, 813, 30, 29783, 787, 813, 434, 843, 18, 3536, 309, 4627...
control.myBitmapControl.SetBitmap(bmp) control.SetupScrolling()
control.SetBitmap(bmp)
def BeginControlEdit(self, item, attributeName, control):
437d63b1f1092af5bfcc3c0a62a6e1dad6b67fd0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/437d63b1f1092af5bfcc3c0a62a6e1dad6b67fd0/AttributeEditors.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14323, 3367, 4666, 12, 2890, 16, 761, 16, 9734, 16, 3325, 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, ...
[ 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, 14323, 3367, 4666, 12, 2890, 16, 761, 16, 9734, 16, 3325, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
<input class="admin_wvar" type="text" name="colNAME" value="%s" /><br>
<input class="admin_w200" type="text" name="colNAME" value="%s" /><br>
def perform_addcollection(colID, ln=cdslang, colNAME='', dbquery='', rest='', callback="yes", confirm=-1): """form to add a new collection. colNAME - the name of the new collection dbquery - the dbquery of the new collection rest - the group allowed to access the new collection""" output = "" subtitle = """Create new collection&nbsp;&nbsp;&nbsp;<small>[<a href="%s/admin/websearch/guide.html#2.1">?</a>]</small>""" % (weburl) text = """ <span class="adminlabel">Collection name</span> <input class="admin_wvar" type="text" name="colNAME" value="%s" /><br> """ % colNAME output = createhiddenform(action="%s/admin/websearch/websearchadmin.py/addcollection" % weburl, text=text, colID=colID, ln=ln, button="Add collection", confirm=0) if colNAME: if confirm in ["0", 0]: text = """<b>Add collection with default name: '%s'.</b> """ % (colNAME) output += createhiddenform(action="%s/admin/websearch/websearchadmin.py/addcollection" % weburl, text=text, colID=colID, colNAME=colNAME, dbquery=dbquery, rest=rest, button="Confirm", confirm=1) elif confirm in ["1", 1]: res = add_col(colNAME, '', '') if res: output += """<b><span class="info">Added new collection with default name '%s'</span></b> """ % colNAME else: output += """<b><span class="info">Sorry, could not add collection, most likely the collection already exists.</span></b> """ elif confirm in ["0", 0]: output += """<b><span class="info">Please give the collection a name.</span></b> """ try: body = [output, extra] except NameError: body = [output] if callback: return perform_index(colID, ln=ln, mtype="perform_addcollection", content=addadminbox(subtitle, body)) else: return addadminbox(subtitle, body)
f6160160ea8915b75fb34d9a1b108d7ad76d9b0c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2139/f6160160ea8915b75fb34d9a1b108d7ad76d9b0c/websearchadminlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 1289, 5548, 12, 1293, 734, 16, 7211, 33, 4315, 2069, 539, 16, 645, 1985, 2218, 2187, 1319, 2271, 2218, 2187, 3127, 2218, 2187, 1348, 1546, 9707, 3113, 6932, 29711, 21, 4672, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 1289, 5548, 12, 1293, 734, 16, 7211, 33, 4315, 2069, 539, 16, 645, 1985, 2218, 2187, 1319, 2271, 2218, 2187, 3127, 2218, 2187, 1348, 1546, 9707, 3113, 6932, 29711, 21, 4672, 35...
assert_almost_equal(np.log(x), y)
assert_almost_equal_spec(np.log(x), y)
def test_special_values(self): xl = [] yl = []
c60575349b5810b393eb3092a591ac429325074c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/c60575349b5810b393eb3092a591ac429325074c/test_umath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9371, 67, 2372, 12, 2890, 4672, 15643, 273, 5378, 677, 80, 273, 5378, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9371, 67, 2372, 12, 2890, 4672, 15643, 273, 5378, 677, 80, 273, 5378, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
self.assertEqual(form.name._default, None) self.assertEqual(form.city._default, None) self.assertEqual(form.age._default, None) self.assertEqual(form.is_admin._default, False)
self.assertEqual(form.name.default, None) self.assertEqual(form.city.default, None) self.assertEqual(form.age.default, None) self.assertEqual(form.is_admin.default, False)
def test_default_value(self): form_class = model_form(Author)
bb581265a44720c84617388c8a0bc078898a6f24 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8614/bb581265a44720c84617388c8a0bc078898a6f24/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1886, 67, 1132, 12, 2890, 4672, 646, 67, 1106, 273, 938, 67, 687, 12, 3594, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1886, 67, 1132, 12, 2890, 4672, 646, 67, 1106, 273, 938, 67, 687, 12, 3594, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
item.decay = 0
item.decay = 0
def startElement( self, name, atts ): if name == "item": self.itemid = str(atts.getValue("id")); if atts.has_key("hue"): self.hue = int(hex2dec(str(atts.getValue("hue")))); else: self.hue = 0 if atts.has_key("amount"): self.amount = int(atts.getValue("amount")); else: self.amount = 0 self.statements = [] elif name == "attribute": type = "str" if atts.has_key("type"): type = str(atts.getValue("type")) if atts.has_key("value") and atts.has_key("key"): self.statements.append( str(atts.getValue("key")) + "," + type + ","+ str(atts.getValue("value")) ) elif name == "pos": item = wolfpack.additem( "%x" % hex2dec( self.itemid ) ) if not item or item == None: return if self.hue > 0: item.color = self.hue if self.amount > 0: item.amount = self.amount for p in self.statements: parts = p.split(",") if hasattr(item, parts[0]): if parts[1] == "str": value = parts[2] elif parts[1] == "int": value = int(parts[2]) setattr(item, parts[0], value)
ef810a1acbbe1a267657de88a5347d9d60996492 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/ef810a1acbbe1a267657de88a5347d9d60996492/decoration.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13591, 12, 365, 16, 508, 16, 15687, 262, 30, 309, 508, 422, 315, 1726, 6877, 365, 18, 17252, 273, 609, 12, 270, 3428, 18, 24805, 2932, 350, 7923, 1769, 309, 15687, 18, 5332, 67, 856, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13591, 12, 365, 16, 508, 16, 15687, 262, 30, 309, 508, 422, 315, 1726, 6877, 365, 18, 17252, 273, 609, 12, 270, 3428, 18, 24805, 2932, 350, 7923, 1769, 309, 15687, 18, 5332, 67, 856, ...
else
else:
def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 755) else quickfix.StringField.__init__(self, 755, 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, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 2371, 2539, 13, 469, 30, 9549, 904, 18, 780, 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, 1, 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, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 2371, 2539, 13, 469, 30, 9549, 904, 18, 780, 974, 16186, 2738...
Returns C{(points, facets, markers, holelists)}, where C{points} is a list
Returns C{(points, facets, facet_holestarts, markers)}, where C{points} is a list
def generate_extrusion(rz_points, base_shape, closure=EXT_OPEN, point_idx_offset=0, ring_point_indices=None, ring_markers=None, rz_closure_marker=0, minus_z_closure_marker=0, plus_z_closure_marker=0): """Extrude a given connected C{base_shape} (a list of (x,y) points) along the z axis. For each step in the extrusion, the base shape is multiplied by a radius and shifted in the z direction. Radius and z offset are given by C{rz_points}, which is a list of (r, z) tuples. Returns C{(points, facets, markers, holelists)}, where C{points} is a list of (3D) points and facets is a list of polygons. Each polygon is, in turn, represented by a tuple of indices into C{points}. If C{point_idx_offset} is not zero, these indices start at that number. C{markers} is a list equal in length to C{facets}, each specifying the facet marker of that facet. C{holelists} is also equal in length to C{facets}, each element is a list of hole starting points for the corresponding facet. Use L{MeshInfo.set_facets_ex} to add the extrusion to a L{MeshInfo} structure. The extrusion proceeds by generating quadrilaterals connecting each ring. If any given radius in C{rz_points} is 0, triangle fans are produced instead of quads to provide non-degenerate closure. If C{closure} is L{EXT_OPEN}, no efforts are made to put end caps on the extrusion. Specifying C{closure} as L{EXT_CLOSE_IN_Z} is (almost) equivalent to adding points with zero radius at the beginning at end of the rz_points list. The z coordinates are equal to the existing first and last points in that list. (This case is handled more efficiently by just generating big flat facets. Since these facets are always flat, triangle fans are unnecessary.) If C{closure} is L{EXT_CLOSED_IN_RZ}, then a torus-like structure is assumed and the last ring is just connected to the first. If C{ring_markers} is not None, it is an list of markers added to each ring. There should be len(rz_points)-1 entries in this list. If rings are added because of closure options, they receive the corresponding C{XXX_closure_marker}. If C{facet_markers} is given, this function returns (points, facets, markers), where markers is is a list containing a marker for each generated facet. Unspecified markers generally default to 0. If C{ring_point_indices} is given, it must be a list of the same length as C{rz_points}. Each entry in the list may either be None, or a list of point indices. This list must contain the same number of points as the C{base_shape}; it is taken as the indices of pre-existing points that are to be used for the given ring, instead of generating new points. """ assert len(rz_points) > 0 if ring_markers is not None: assert len(rz_points) == len(ring_markers)+1 def gen_ring(ring_idx, r, z): p_indices = None if ring_point_indices is not None: p_indices = ring_point_indices[ring_idx] first_idx = point_idx_offset+len(points) if r == 0: if p_indices is not None: assert len(p_indices) == 1 else: p_indices = [first_idx] points.append((0,0, z)) else: if p_indices is not None: assert len(p_indices) == len(base_shape) else: p_indices = range(first_idx, first_idx+len(base_shape)) points.extend([(x*r, y*r, z) for (x,y) in base_shape]) return p_indices def pair_with_successor(l): n = len(l) return [(l[i], l[(i+1)%n]) for i in range(n)] def add_polygons(new_polys, marker): """Add several new facets, each polygon in new_polys corresponding to a new facet. """ facets.extend([poly] for poly in new_polys) markers.extend(len(new_polys)*[marker]) holelists.extend(len(new_polys)*[[]]) def add_facet(facet_polygons, holestarts, marker): """Add a single facet, with each polygon in C{facet_polygons} belonging to a single facet. """ facets.append(facet_polygons) markers.append(marker) holelists.append(holestarts) def connect_ring(r, z, ring, prev_r, prev_z, prev_ring, marker): if _is_same_float(z, prev_z): assert not _is_same_float(r, prev_r) # we're moving purely outward--this doesn't need fans, only plane # surfaces. Special casing this leads to more freedom for TetGen # and hence better meshes. if prev_r == 0: # make opening surface assert len(prev_ring) == 1 if r != 0: add_polygons(ring, marker=marker) elif r == 0: # make closing surface assert len(ring) == 1 add_polygons(prev_ring, marker=marker) else: # make single-surface interface with hole add_facet([ring, prev_ring], holestarts=[(0,0,z)], marker=marker) else: if prev_r == 0: # make opening fan assert len(prev_ring) == 1 start_pt = prev_ring[0] if r != 0: add_polygons( [(start_pt, succ, pt) for pt, succ in pair_with_successor(ring)], marker=marker) elif r == 0: # make closing fan assert len(ring) == 1 end_pt = ring[0] add_polygons( [(pt, succ, end_pt) for pt, succ in pair_with_successor(prev_ring)], marker=marker) else: # make quad strip prev_pairs = pair_with_successor(prev_ring) my_pairs = pair_with_successor(ring) add_polygons( [(a, b, c, d) for ((a,b), (d,c)) in zip(prev_pairs, my_pairs)], marker=marker) points = [] facets = [] markers = [] holelists = [] first_r, first_z = rz_points[0] first_ring = prev_ring = gen_ring(0, first_r, first_z) prev_r, prev_z = first_r, first_z if closure == EXT_CLOSE_IN_Z: add_polygons([tuple(first_ring)], minus_z_closure_marker) for i, (r, z) in enumerate(rz_points[1:]): ring = gen_ring(i+1, r, z) if ring_markers is not None: ring_marker = ring_markers[i] else: ring_marker = 0 connect_ring(r, z, ring, prev_r, prev_z, prev_ring, ring_marker) prev_ring = ring prev_r, prev_z = r, z if closure == EXT_CLOSE_IN_Z: add_polygons([tuple(prev_ring[::-1])], plus_z_closure_marker) if closure == EXT_CLOSED_IN_RZ: connect_ring(first_r, first_ring, prev_r, prev_ring, rz_closure_marker) return points, facets, markers, holelists
3ced297c55913885e4b6094b0c0e25c20e66ad10 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11985/3ced297c55913885e4b6094b0c0e25c20e66ad10/tet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 14523, 7063, 12, 86, 94, 67, 4139, 16, 1026, 67, 4867, 16, 7213, 33, 4142, 67, 11437, 16, 1634, 67, 3465, 67, 3348, 33, 20, 16, 9221, 67, 1153, 67, 6836, 33, 7036, 16, 92...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 14523, 7063, 12, 86, 94, 67, 4139, 16, 1026, 67, 4867, 16, 7213, 33, 4142, 67, 11437, 16, 1634, 67, 3465, 67, 3348, 33, 20, 16, 9221, 67, 1153, 67, 6836, 33, 7036, 16, 92...
print "write io from a string" self.o = None elif type(_obj) == types.InstanceType: print "write io from instance of %s" % (_obj.__class__) ioWrapper.__init__(self, _obj) self._o = libxml2mod.xmlCreateOutputBuffer(self, enc) else: file = libxml2mod.outputBufferGetPythonFile(_obj) if file != None: ioWrapper.__init__(self, file) else: ioWrapper.__init__(self, _obj) self._o = _obj
print "write io from a string" self.o = None elif type(_obj) == types.InstanceType: print "write io from instance of %s" % (_obj.__class__) ioWrapper.__init__(self, _obj) self._o = libxml2mod.xmlCreateOutputBuffer(self, enc) else: file = libxml2mod.outputBufferGetPythonFile(_obj) if file != None: ioWrapper.__init__(self, file) else: ioWrapper.__init__(self, _obj) self._o = _obj
def __init__(self, _obj, enc = ""):
37e63946dc2745dc1e546ac273e43512fb4685fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12659/37e63946dc2745dc1e546ac273e43512fb4685fc/libxml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 389, 2603, 16, 2446, 273, 1408, 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,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 389, 2603, 16, 2446, 273, 1408, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
full_file_name = os.path.join( focus_dir, file )
full_file_name = os.path.join( focus_dir, file ) try:
def refresh_file_list(self): pardir_button = self.xml.get_widget('pardir_button') pardir_button.set_sensitive( self.cur_dir != '/' ) self.file_list.clear() previous_focus_dir = None previous_backup = None show_hidden_files = client.get_bool("/apps/flyback/show_hidden_files") sort_dirs_first = client.get_bool("/apps/flyback/sort_dirs_first") if self.selected_backup: focus_dir = self.backup.parent_backup_dir +'/'+ self.selected_backup.strftime(BACKUP_DIR_DATE_FORMAT) + self.cur_dir i = self.available_backups.index(self.selected_backup) if i<len(self.available_backups)-1: previous_backup = self.available_backups[i+1] previous_focus_dir = self.backup.parent_backup_dir +'/'+ previous_backup.strftime(BACKUP_DIR_DATE_FORMAT) + self.cur_dir else: if self.available_backups: previous_backup = self.available_backups[0] previous_focus_dir = self.backup.parent_backup_dir +'/'+ previous_backup.strftime(BACKUP_DIR_DATE_FORMAT) + self.cur_dir focus_dir = self.cur_dir
a2ebb9799525acf258fa677d58dad5d19bf4ca2f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/317/a2ebb9799525acf258fa677d58dad5d19bf4ca2f/flyback.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4460, 67, 768, 67, 1098, 12, 2890, 4672, 779, 1214, 67, 5391, 273, 365, 18, 2902, 18, 588, 67, 6587, 2668, 84, 1060, 481, 67, 5391, 6134, 779, 1214, 67, 5391, 18, 542, 67, 23481, 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, 4460, 67, 768, 67, 1098, 12, 2890, 4672, 779, 1214, 67, 5391, 273, 365, 18, 2902, 18, 588, 67, 6587, 2668, 84, 1060, 481, 67, 5391, 6134, 779, 1214, 67, 5391, 18, 542, 67, 23481, 12,...
klass=self.aq_inner.aq_parent.aq_parent._zclass_
def manage_edit(self, meta_type='', icon='', file='', REQUEST=None): """Set basic item properties. """ klass=self.aq_inner.aq_parent.aq_parent._zclass_ if meta_type: self.setClassAttr('meta_type', meta_type) if file: # and hasattr(file, 'content_type'): if hasattr(klass, 'ziconImage'): klass.ziconImage.manage_upload(file) else: self.setClassAttr('ziconImage', OFS.Image.Image('ziconImage','',file)) if not icon: self.setClassAttr('icon', REQUEST['URL1']+'/ziconImage')
e15046bc07bbc7acdb100b4ed05c4d3e3af5048f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e15046bc07bbc7acdb100b4ed05c4d3e3af5048f/Basic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 4619, 12, 2890, 16, 2191, 67, 723, 2218, 2187, 4126, 2218, 2187, 585, 2218, 2187, 12492, 33, 7036, 4672, 3536, 694, 5337, 761, 1790, 18, 3536, 309, 2191, 67, 723, 30, 365, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 4619, 12, 2890, 16, 2191, 67, 723, 2218, 2187, 4126, 2218, 2187, 585, 2218, 2187, 12492, 33, 7036, 4672, 3536, 694, 5337, 761, 1790, 18, 3536, 309, 2191, 67, 723, 30, 365, 1...
rpm_args.append('-bs')
rpm_cmd.append('-bs')
def run (self):
64988d2ae018b34f23a3cbdc33a117147f1438da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/64988d2ae018b34f23a3cbdc33a117147f1438da/bdist_rpm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 261, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1086, 261, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
while r == -1: r = self.multi.select(100.0)
timeout = CONNECT_TIMEOUT while r == -1 and timeout > 0: r = self.multi.select(1.0) timeout -= 1 if timeout == 0: raise CommException("Connection timeout: %s" % self.url) timeout = CONNECT_TIMEOUT
def perform(self): if not self.cont: return r = -1 while r == -1: r = self.multi.select(100.0) ret = E_CALL_MULTI_PERFORM while ret == E_CALL_MULTI_PERFORM: ret, num_handles = self.multi.perform() self.cont = num_handles
2f79c69879b4b5f565eb8023d680f91d6b787641 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/373/2f79c69879b4b5f565eb8023d680f91d6b787641/comm_curl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 12, 2890, 4672, 309, 486, 365, 18, 1213, 30, 327, 436, 273, 300, 21, 2021, 273, 21593, 67, 9503, 1323, 436, 422, 300, 21, 471, 2021, 405, 374, 30, 436, 273, 365, 18, 7027, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 12, 2890, 4672, 309, 486, 365, 18, 1213, 30, 327, 436, 273, 300, 21, 2021, 273, 21593, 67, 9503, 1323, 436, 422, 300, 21, 471, 2021, 405, 374, 30, 436, 273, 365, 18, 7027, 18, ...
return 1
return integer.Integer(1)
def denominator(self): r""" Return the least common multiple of the denominators of the elements of self.
2f32844762d307fb2633480c1b2b2908fdda55d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/2f32844762d307fb2633480c1b2b2908fdda55d9/matrix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15030, 12, 2890, 4672, 436, 8395, 2000, 326, 4520, 2975, 3229, 434, 326, 10716, 30425, 434, 326, 2186, 434, 365, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15030, 12, 2890, 4672, 436, 8395, 2000, 326, 4520, 2975, 3229, 434, 326, 10716, 30425, 434, 326, 2186, 434, 365, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
L=[] line = self.readline() while line!="": L.append(line) line = self.readline() return L
buf = self.read() return string.split(buf, '\n')
def readlines(self):
f1409e06ab5e40cc3e2a8762690b55a092008400 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f1409e06ab5e40cc3e2a8762690b55a092008400/gzip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17546, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 17546, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
[P[i] for i in range(2,len(v)) if v[i] == 0]
[P[i] for i in range(2,len(v)) if v[i] == 0 and N%P[i] != 0]
def supersingular_primes(self, B): """ Return a list of all supersingular primes for this elliptic curve up to and possibly including B.
017e91e454278f30d1766f8b9153198ad9d2a588 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/017e91e454278f30d1766f8b9153198ad9d2a588/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1169, 414, 17830, 67, 683, 4485, 12, 2890, 16, 605, 4672, 3536, 2000, 279, 666, 434, 777, 1169, 414, 17830, 846, 4485, 364, 333, 415, 549, 21507, 8882, 731, 358, 471, 10016, 6508, 605, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1169, 414, 17830, 67, 683, 4485, 12, 2890, 16, 605, 4672, 3536, 2000, 279, 666, 434, 777, 1169, 414, 17830, 846, 4485, 364, 333, 415, 549, 21507, 8882, 731, 358, 471, 10016, 6508, 605, ...
print "Unknown argument %s" % arg
wikipedia.output(u"Unknown argument %s" % arg)
def main(): import os index = None djvu = None pages = None # what would have been changed. debug = False ask = False # Parse command line arguments for arg in wikipedia.handleArgs(): if arg.startswith("-debug"): debug = True elif arg.startswith("-ask"): ask = True elif arg.startswith("-djvu:"): djvu = arg[6:] elif arg.startswith("-index:"): index = arg[7:] elif arg.startswith("-pages:"): pages = arg[7:] else: print "Unknown argument %s" % arg # Check the djvu file exists if djvu: os.stat(djvu) if not index: import os.path index = os.path.basename(djvu) if djvu and index: site = wikipedia.getSite() index_page = wikipedia.Page(site, index) if site.family.name != 'wikisource': raise wikipedia.PageNotFound(u"Found family '%s'; Wikisource required." % site.family.name) if not index_page.exists() and index_page.namespace() == 0: index_namespace = wikipedia.Page(site, 'MediaWiki:Proofreadpage index namespace').get() index_page = wikipedia.Page(wikipedia.getSite(), u"%s:%s" % (index_namespace, index)) if not index_page.exists(): raise wikipedia.NoPage("Page '%s' does not exist" % index) wikipedia.output(u"uploading text from %s to %s" % (djvu, index_page) ) bot = DjVuTextBot(djvu, index, pages) if not bot.has_text(): raise ValueError("No text layer in djvu file") bot.ask = ask bot.run() else: wikipedia.showHelp()
d67bfeea9d6dffa809c6e92da5ceee1d1a77a309 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/d67bfeea9d6dffa809c6e92da5ceee1d1a77a309/djvutext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 1930, 1140, 770, 273, 599, 19754, 90, 89, 273, 599, 4689, 273, 599, 468, 4121, 4102, 1240, 2118, 3550, 18, 1198, 273, 1083, 6827, 273, 1083, 225, 468, 2884, 1296, 980, 1775,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 1930, 1140, 770, 273, 599, 19754, 90, 89, 273, 599, 4689, 273, 599, 468, 4121, 4102, 1240, 2118, 3550, 18, 1198, 273, 1083, 6827, 273, 1083, 225, 468, 2884, 1296, 980, 1775,...
kernel_fetch_cmd = ("cp %s/isolinux/%s %s" % (self.nfs_mount, self.kernel, self.image_path))
kernel_fetch_cmd = ("cp %s/%s/%s %s" % (self.nfs_mount, self.boot_path, self.kernel, self.image_path))
def setup_nfs(self): """ Copy the vmlinuz and initrd.img from nfs. """ print "Copying the vmlinuz and initrd.img from nfs"
295f8a35ea41100c5c7582c4a6b666d666dbf25a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12268/295f8a35ea41100c5c7582c4a6b666d666dbf25a/unattended.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 82, 2556, 12, 2890, 4672, 3536, 5631, 326, 331, 781, 6860, 94, 471, 1208, 13623, 18, 6081, 628, 290, 2556, 18, 3536, 1172, 315, 2951, 310, 326, 331, 781, 6860, 94, 471, 1208,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 82, 2556, 12, 2890, 4672, 3536, 5631, 326, 331, 781, 6860, 94, 471, 1208, 13623, 18, 6081, 628, 290, 2556, 18, 3536, 1172, 315, 2951, 310, 326, 331, 781, 6860, 94, 471, 1208,...
'tag:txt and not tolstoy': set([33, 258, 354, 305, 242, 154]),
'tag:txt AND NOT tolstoy': set([33, 258, 354, 305, 242, 154]),
def universal_set(self): ''' Should return the set of all matches. ''' return set([])
e4b0e9f5186874eac5b874627e01d8e31d865487 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/e4b0e9f5186874eac5b874627e01d8e31d865487/search_query_parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26182, 67, 542, 12, 2890, 4672, 9163, 9363, 327, 326, 444, 434, 777, 1885, 18, 9163, 327, 444, 3816, 5717, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 26182, 67, 542, 12, 2890, 4672, 9163, 9363, 327, 326, 444, 434, 777, 1885, 18, 9163, 327, 444, 3816, 5717, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.queue.append((pkg, op))
queue.append((pkg, op, len(bt)))
def run(self): loopctrl = {}
e9831a12235fcae7ab1b6189a4d00b2b6f1634cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8317/e9831a12235fcae7ab1b6189a4d00b2b6f1634cf/transaction.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 2798, 16277, 273, 2618, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 2798, 16277, 273, 2618, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
lineCount = int(self.logBox.index(END).split('.')[0]) - 1
lineCount = float(self.logBox.index(END).split('.')[0]) - 1
def output(self, text, urgency = 1, colors = None, newline = True): """ urgency levels: 0 - Debug output. Won't be shown in normal mode. 1 - Will be shown in log window. 2 - Will be shown in error box.
e9eb6c48609e1740eca7b678623a1c0cb86a9589 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/e9eb6c48609e1740eca7b678623a1c0cb86a9589/tkinter_interface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 876, 12, 2890, 16, 977, 16, 8896, 75, 2075, 273, 404, 16, 5740, 273, 599, 16, 9472, 273, 1053, 4672, 3536, 8896, 75, 2075, 7575, 30, 374, 300, 4015, 876, 18, 678, 265, 1404, 506, 121...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 876, 12, 2890, 16, 977, 16, 8896, 75, 2075, 273, 404, 16, 5740, 273, 599, 16, 9472, 273, 1053, 4672, 3536, 8896, 75, 2075, 7575, 30, 374, 300, 4015, 876, 18, 678, 265, 1404, 506, 121...
stageSig = ipIsr.ISR_FLAT,
stageSig = isrLib.ISR_DFLAT,
def FlatCorrection(exposure, flat, policy, stageSig = ipIsr.ISR_FLAT, stageName = 'lsst.ip.isr.flatcorrection'): # common input test metadata = exposure.getMetadata() if chunkMetadata.exists(stageSig): pexLog.Trace(stageName, 4, '%s has already been run' % (stageSig)) return fmetadata = flat.getMetadata() filenameKeyword = policy.getString('filenameKeyword') filename = fmetadata(filenameKeyword) scalingKeyword = policy.getString('flatScaleKeyword') # e.g. MEAN flatscaling = dmetadata.getDouble(scalingKeyword) mi = exposure.getMaskedImage() #fmi = afwImage.MaskedImageF(flat.getMaskedImage(), True) #if flatscaling != 1.: # fmi /= flatscaling #mi /= fmi mi.scaledDivides(1./flatscaling, flat.getMaskedImage()) # common outputs stageSummary = 'using %s with scale=%.2f' % (filename, flatscaling) pexLog.Trace(stageName, 4, '%s %s' % (stageSig, stageSummary)) metadata.setString(stageSig, '%s; %s' % (stageSummary, time.asctime()))
9178ba52aa57399136f285c8a065b1707c990801 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6526/9178ba52aa57399136f285c8a065b1707c990801/IsrStages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20396, 20884, 12, 22739, 16, 3569, 16, 3329, 16, 6009, 8267, 225, 273, 353, 86, 5664, 18, 5127, 54, 67, 4577, 12190, 16, 6009, 461, 273, 296, 3251, 334, 18, 625, 18, 291, 86, 18, 154...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20396, 20884, 12, 22739, 16, 3569, 16, 3329, 16, 6009, 8267, 225, 273, 353, 86, 5664, 18, 5127, 54, 67, 4577, 12190, 16, 6009, 461, 273, 296, 3251, 334, 18, 625, 18, 291, 86, 18, 154...
node.setAttribute("index", "index")
node.setAttribute("index", "yes")
def fixup_refmodindexes_chunk(container): # node is probably a <para>; let's see how often it isn't: if container.tagName != PARA_ELEMENT: sys.stderr.write("--- fixup_refmodindexes_chunk(%s)\n" % container) module_entries = find_all_elements(container, "module") if not module_entries: return index_entries = find_all_elements_from_set(container, REFMODINDEX_ELEMENTS) removes = [] for entry in index_entries: children = entry.childNodes if len(children) != 0: sys.stderr.write( "--- unexpected number of children for %s node:\n" % entry.tagName) sys.stderr.write(entry.toxml() + "\n") continue found = 0 module_name = entry.getAttribute("name") for node in module_entries: if len(node.childNodes) != 1: continue this_name = node.childNodes[0].data if this_name == module_name: found = 1 node.setAttribute("index", "index") if found: removes.append(entry) for node in removes: container.removeChild(node)
304ebb260c7d5886ccb4a4738c3e4f83f60820f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/304ebb260c7d5886ccb4a4738c3e4f83f60820f6/docfixer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 416, 67, 1734, 1711, 11265, 67, 6551, 12, 3782, 4672, 468, 756, 353, 8656, 279, 411, 25072, 34, 31, 2231, 1807, 2621, 3661, 16337, 518, 5177, 1404, 30, 309, 1478, 18, 2692, 461, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 416, 67, 1734, 1711, 11265, 67, 6551, 12, 3782, 4672, 468, 756, 353, 8656, 279, 411, 25072, 34, 31, 2231, 1807, 2621, 3661, 16337, 518, 5177, 1404, 30, 309, 1478, 18, 2692, 461, ...
cpus.append(int(c)) cfg['cpus'] = cpus except ValueError, e: raise XendConfigError('cpus = %s: %s' % (cfg['cpus'], e))
if c[0] == '^': cpus = [x for x in cpus if x != int(c[1:])] else: cpus.append(int(c)) cfg['cpus'] = cpus except ValueError, e: raise XendConfigError('cpus = %s: %s' % (cfg['cpus'], e))
def _parse_sxp(self, sxp_cfg): """ Populate this XendConfig using the parsed SXP.
08ed26a8af7ca6fe5e8d209f39b551732f46ebac /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6195/08ed26a8af7ca6fe5e8d209f39b551732f46ebac/XendConfig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 87, 23829, 12, 2890, 16, 13280, 84, 67, 7066, 4672, 3536, 22254, 333, 1139, 409, 809, 1450, 326, 2707, 348, 60, 52, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 87, 23829, 12, 2890, 16, 13280, 84, 67, 7066, 4672, 3536, 22254, 333, 1139, 409, 809, 1450, 326, 2707, 348, 60, 52, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100...
if idebug:
if game.idebug:
def movebaddy(enemy): "Tactical movement for the bad guys." next = coord(); look = coord() irun = False # This should probably be just (game.quadrant in game.state.kcmdr) + (game.state.kscmdr==game.quadrant) if game.skill >= SKILL_EXPERT: nbaddys = (((game.quadrant in game.state.kcmdr)*2 + (game.state.kscmdr==game.quadrant)*2+game.klhere*1.23+game.irhere*1.5)/2.0) else: nbaddys = (game.quadrant in game.state.kcmdr) + (game.state.kscmdr==game.quadrant) dist1 = enemy.kdist mdist = int(dist1 + 0.5); # Nearest integer distance # If SC, check with spy to see if should hi-tail it if enemy.type=='S' and \ (enemy.power <= 500.0 or (game.condition=="docked" and not damaged(DPHOTON))): irun = True motion = -QUADSIZE else: # decide whether to advance, retreat, or hold position forces = enemy.power+100.0*len(game.enemies)+400*(nbaddys-1) if not game.shldup: forces += 1000; # Good for enemy if shield is down! if not damaged(DPHASER) or not damaged(DPHOTON): if damaged(DPHASER): # phasers damaged forces += 300.0 else: forces -= 0.2*(game.energy - 2500.0) if damaged(DPHOTON): # photon torpedoes damaged forces += 300.0 else: forces -= 50.0*game.torps else: # phasers and photon tubes both out! forces += 1000.0 motion = 0 if forces <= 1000.0 and game.condition != "docked": # Typical situation motion = ((forces + randreal(200))/150.0) - 5.0 else: if forces > 1000.0: # Very strong -- move in for kill motion = (1.0 - randreal())**2 * dist1 + 1.0 if game.condition=="docked" and (game.options & OPTION_BASE): # protected by base -- back off ! motion -= game.skill*(2.0-randreal()**2) if idebug: proutn("=== MOTION = %d, FORCES = %1.2f, " % (motion, forces)) # don't move if no motion if motion==0: return # Limit motion according to skill if abs(motion) > game.skill: if motion < 0: motion = -game.skill else: motion = game.skill # calculate preferred number of steps nsteps = abs(int(motion)) if motion > 0 and nsteps > mdist: nsteps = mdist; # don't overshoot if nsteps > QUADSIZE: nsteps = QUADSIZE; # This shouldn't be necessary if nsteps < 1: nsteps = 1; # This shouldn't be necessary if idebug: proutn("NSTEPS = %d:" % nsteps) # Compute preferred values of delta X and Y m = game.sector - enemy.location if 2.0 * abs(m.i) < abs(m.j): m.i = 0 if 2.0 * abs(m.j) < abs(game.sector.i-enemy.location.i): m.j = 0 m = (motion * m).sgn() next = enemy.location # main move loop for ll in range(nsteps): if idebug: proutn(" %d" % (ll+1)) # Check if preferred position available look = next + m if m.i < 0: krawli = 1 else: krawli = -1 if m.j < 0: krawlj = 1 else: krawlj = -1 success = False attempts = 0; # Settle mysterious hang problem while attempts < 20 and not success: attempts += 1 if look.i < 0 or look.i >= QUADSIZE: if motion < 0 and tryexit(enemy, look, irun): return if krawli == m.i or m.j == 0: break look.i = next.i + krawli krawli = -krawli elif look.j < 0 or look.j >= QUADSIZE: if motion < 0 and tryexit(enemy, look, irun): return if krawlj == m.j or m.i == 0: break look.j = next.j + krawlj krawlj = -krawlj elif (game.options & OPTION_RAMMING) and game.quad[look.i][look.j] != '.': # See if enemy should ram ship if game.quad[look.i][look.j] == game.ship and \ (enemy.type == 'C' or enemy.type == 'S'): collision(rammed=True, enemy=enemy) return if krawli != m.i and m.j != 0: look.i = next.i + krawli krawli = -krawli elif krawlj != m.j and m.i != 0: look.j = next.j + krawlj krawlj = -krawlj else: break; # we have failed else: success = True if success: next = look if idebug: proutn(`next`) else: break; # done early if idebug: skip(1) if enemy.move(next): if not damaged(DSRSENS) or game.condition == "docked": proutn(_("*** %s from Sector %s") % (cramen(enemy.type), enemy.location)) if enemy.kdist < dist1: proutn(_(" advances to ")) else: proutn(_(" retreats to ")) prout("Sector %s." % next)
eafdd35f1af1e4e93d3609a0adbe768b562907e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3176/eafdd35f1af1e4e93d3609a0adbe768b562907e0/sst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3635, 70, 31934, 12, 275, 351, 93, 4672, 315, 56, 621, 1706, 26017, 364, 326, 5570, 3058, 1900, 1199, 1024, 273, 2745, 5621, 2324, 273, 2745, 1435, 277, 2681, 273, 1083, 468, 1220, 1410,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3635, 70, 31934, 12, 275, 351, 93, 4672, 315, 56, 621, 1706, 26017, 364, 326, 5570, 3058, 1900, 1199, 1024, 273, 2745, 5621, 2324, 273, 2745, 1435, 277, 2681, 273, 1083, 468, 1220, 1410,...
include_file = open(path)
include_file = io.FileInput(state.document.settings, source_path=path)
def include(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): """Include a reST file as part of the content of this reST file.""" source_dir = os.path.dirname( os.path.abspath(state.document.current_source)) path = ''.join(arguments[0].splitlines()) if path.find(' ') != -1: error = state_machine.reporter.error( '"%s" directive path contains whitespace.' % name, nodes.literal_block(block_text, block_text), line=lineno) return [error] path = os.path.normpath(os.path.join(source_dir, path)) path = utils.relative_path(None, path) try: include_file = open(path) except IOError, error: severe = state_machine.reporter.severe( 'Problems with "%s" directive path:\n%s.' % (name, error), nodes.literal_block(block_text, block_text), line=lineno) return [severe] include_text = include_file.read() include_file.close() if options.has_key('literal'): literal_block = nodes.literal_block(include_text, include_text, source=path) literal_block.line = 1 return literal_block else: include_lines = statemachine.string2lines(include_text, convert_whitespace=1) state_machine.insert_input(include_lines, path) return []
1e15a329f6f8624c3a22acb5beaca62d0f12274e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/1e15a329f6f8624c3a22acb5beaca62d0f12274e/misc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2341, 12, 529, 16, 1775, 16, 702, 16, 913, 16, 7586, 16, 913, 67, 3348, 16, 1203, 67, 955, 16, 919, 16, 919, 67, 9149, 4672, 3536, 8752, 279, 283, 882, 585, 487, 1087, 434, 326, 91...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2341, 12, 529, 16, 1775, 16, 702, 16, 913, 16, 7586, 16, 913, 67, 3348, 16, 1203, 67, 955, 16, 919, 16, 919, 67, 9149, 4672, 3536, 8752, 279, 283, 882, 585, 487, 1087, 434, 326, 91...
if injection: injpoint=map(lambda a: getinjpar(injection,a),range(len(paramnames))) injvals=map(str,injpoint) out=reduce(lambda a,b:a+'||'+b,injvals) print 'Injected values:' print out summary_file.add_section('Injection values') for parnum in range(len(paramnames)): summary_file.set('Injection values',paramnames[parnum],getinjpar(injection,parnum))
def getinjpar(inj,parnum): if paramnames[parnum]=='mchirp' or paramnames[parnum]=='mc': return inj.mchirp if paramnames[parnum]=='mass1' or paramnames[parnum]=='m1': (m1,m2)=mc2ms(inj.mchirp,inj.eta) return m1 if paramnames[parnum]=='mass2' or paramnames[parnum]=='m2': (m1,m2)=mc2ms(inj.mchirp,inj.eta) return m2 if paramnames[parnum]=='eta': return inj.eta if paramnames[parnum]=='time': return inj.get_end() if paramnames[parnum]=='phi0': return inj.phi0 if paramnames[parnum]=='dist' or paramnames[parnum]=='distance': return inj.distance if paramnames[parnum]=='RA' or paramnames[parnum]=='long': return inj.longitude if paramnames[parnum]=='dec' or paramnames[parnum]=='lat': return inj.latitude if paramnames[parnum]=='psi': return inj.polarization if paramnames[parnum]=='iota': return inj.inclination return None
6b7383178dfc3e0bc72b88b696c5636f91f41a6d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/6b7383178dfc3e0bc72b88b696c5636f91f41a6d/cbcBayesSkyRes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 267, 78, 1065, 12, 267, 78, 16, 1065, 2107, 4672, 309, 579, 1973, 63, 1065, 2107, 65, 18920, 81, 343, 481, 84, 11, 578, 579, 1973, 63, 1065, 2107, 65, 18920, 13952, 4278, 327, 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, 267, 78, 1065, 12, 267, 78, 16, 1065, 2107, 4672, 309, 579, 1973, 63, 1065, 2107, 65, 18920, 81, 343, 481, 84, 11, 578, 579, 1973, 63, 1065, 2107, 65, 18920, 13952, 4278, 327, 3...
cartslugs = cart.cartitem_set.values_list('product__slug', flat=True)
itemslugs = item_query.values_list('product__slug', flat=True)
def _valid_cart_products(self, cart): validslugs = self.validProducts.values_list('slug', flat=True) cartslugs = cart.cartitem_set.values_list('product__slug', flat=True) return ProductPriceLookup.objects.filter( discountable=True, productslug__in=validslugs, productslug__in=cartslugs ).values_list('productslug', flat=True)
8c795bf9422fa9c3b95f1c704168895e2826c9d9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/171/8c795bf9422fa9c3b95f1c704168895e2826c9d9/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 877, 67, 11848, 67, 18736, 12, 2890, 16, 7035, 4672, 923, 2069, 9024, 273, 365, 18, 877, 13344, 18, 2372, 67, 1098, 2668, 6436, 2187, 3569, 33, 5510, 13, 1516, 80, 9024, 273, 761,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 877, 67, 11848, 67, 18736, 12, 2890, 16, 7035, 4672, 923, 2069, 9024, 273, 365, 18, 877, 13344, 18, 2372, 67, 1098, 2668, 6436, 2187, 3569, 33, 5510, 13, 1516, 80, 9024, 273, 761,...
o = db.tag_object_by_id (self.dadgadID, '/%s/testrating' % user, 5) self.assertEqual (o, 0) _status, v = db.get_tag_value_by_id (self.dadgadID, 'testrating') self.assertEqual (v, 5) def testSetTagByAbout (self):
o = db.tag_object_by_id(self.dadgadID, '/%s/testrating' % user, 5) self.assertEqual(o, 0) _status, v = db.get_tag_value_by_id(self.dadgadID, 'testrating') self.assertEqual(v, 5) def testSetTagByAbout(self):
def testSetTagByID (self): db = self.db user = db.credentials.username o = db.delete_abstract_tag ('testrating') o = db.create_abstract_tag ('testrating', "%s's testrating (0-10; more is better)" % self.user) o = db.tag_object_by_id (self.dadgadID, '/%s/testrating' % user, 5) self.assertEqual (o, 0) _status, v = db.get_tag_value_by_id (self.dadgadID, 'testrating') self.assertEqual (v, 5)
e75848841ac96982524448e932e12fd6ff9cbe0c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12637/e75848841ac96982524448e932e12fd6ff9cbe0c/fdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 694, 1805, 13331, 261, 2890, 4672, 1319, 273, 365, 18, 1966, 729, 273, 1319, 18, 11687, 18, 5053, 320, 273, 1319, 18, 3733, 67, 17801, 67, 2692, 7707, 1078, 313, 1776, 6134, 320, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 694, 1805, 13331, 261, 2890, 4672, 1319, 273, 365, 18, 1966, 729, 273, 1319, 18, 11687, 18, 5053, 320, 273, 1319, 18, 3733, 67, 17801, 67, 2692, 7707, 1078, 313, 1776, 6134, 320, ...
def matvec(self, mode, m, n, u): if mode == 1: v = u * self.K elif mode == 2: v = u * self.K.T return np.asarray(v)[0]
def matvec(self, mode, m, n, u): if mode == 1: v = u * self.K elif mode == 2: v = u * self.K.T return np.asarray(v)[0]
050e51e40375a50ef9329bb9d36473caded32284 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13857/050e51e40375a50ef9329bb9d36473caded32284/demo_image.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4834, 8799, 12, 2890, 16, 1965, 16, 312, 16, 290, 16, 582, 4672, 309, 1965, 422, 404, 30, 331, 273, 582, 380, 365, 18, 47, 1327, 1965, 422, 576, 30, 331, 273, 582, 380, 365, 18, 47...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4834, 8799, 12, 2890, 16, 1965, 16, 312, 16, 290, 16, 582, 4672, 309, 1965, 422, 404, 30, 331, 273, 582, 380, 365, 18, 47, 1327, 1965, 422, 576, 30, 331, 273, 582, 380, 365, 18, 47...
self.homelink_url = self.site_url + '/dashboard'
self.homelink_url = self.navigation_root_url + '/dashboard'
def update(self): super(PersonalBarViewlet, self).update()
5233c45a3a86c88a837f4a63ad3ae8d988113bc0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12185/5233c45a3a86c88a837f4a63ad3ae8d988113bc0/common.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 4672, 2240, 12, 8346, 287, 5190, 1767, 1810, 16, 365, 2934, 2725, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 4672, 2240, 12, 8346, 287, 5190, 1767, 1810, 16, 365, 2934, 2725, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.shape = (M, N)
assert M == int(M) and M > 0 assert N == int(N) and N > 0 self.shape = (int(M), int(N))
def __init__(self, A=None): """ Create a new dictionary-of-keys sparse matrix. An optional argument A is accepted, which initializes the dok_matrix with it. This can be a tuple of dimensions (m, n) or a (dense) array to copy. """ dict.__init__(self) spmatrix.__init__(self) self.shape = (0, 0) # If _validate is True, ensure __setitem__ keys are integer tuples self._validate = True if A is not None: if type(A) == tuple: # Interpret as dimensions try: dims = A (M, N) = dims self.shape = (M, N) return except (TypeError, ValueError): pass if isspmatrix(A): # For sparse matrices, this is too inefficient; we need # something else. raise NotImplementedError, "initializing a dok_matrix with " \ "a sparse matrix is not yet supported" elif isdense(A): A = asarray(A) if rank(A) == 2: M, N = A.shape self.shape = (M, N) for i in range(M): for j in range(N): if A[i, j] != 0: self[i, j] = A[i, j] elif rank(A) == 1: M = A.shape[0] self.shape = (M, 1) for i in range(M): if A[i] != 0: self[i, 0] = A[i] else: raise TypeError, "array for initialization must have rank 2" else: raise TypeError, "argument should be a tuple of dimensions " \ "or a sparse or dense matrix"
42a797e36c22c530c85f0fd893fc9733248799dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/42a797e36c22c530c85f0fd893fc9733248799dd/sparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 432, 33, 7036, 4672, 3536, 1788, 279, 394, 3880, 17, 792, 17, 2452, 9387, 3148, 18, 225, 1922, 3129, 1237, 432, 353, 8494, 16, 1492, 11643, 326, 302, 601...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 432, 33, 7036, 4672, 3536, 1788, 279, 394, 3880, 17, 792, 17, 2452, 9387, 3148, 18, 225, 1922, 3129, 1237, 432, 353, 8494, 16, 1492, 11643, 326, 302, 601...
log.success("\r%s %s done.\n" % (file, " ") ) if zip_bool:
log.success("\n%s done.\n" % (PackageName) ) if ArgumentOptions.zip_it:
def __init__(self, width, lock): DownloadFromWeb.__init__(self, width=width) #ProgressBar.__init__(self, width) #self.width = width Archiver.__init__(self, lock=lock) #self.lock = lock
dc571040cf87102fdc4b4b1660de813cb7fb298e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12499/dc571040cf87102fdc4b4b1660de813cb7fb298e/pypt_core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1835, 16, 2176, 4672, 13059, 1265, 4079, 16186, 2738, 972, 12, 2890, 16, 1835, 33, 2819, 13, 468, 31547, 16186, 2738, 972, 12, 2890, 16, 1835, 13, 468, 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, 1835, 16, 2176, 4672, 13059, 1265, 4079, 16186, 2738, 972, 12, 2890, 16, 1835, 33, 2819, 13, 468, 31547, 16186, 2738, 972, 12, 2890, 16, 1835, 13, 468, 2...
while step < len(code): op = ord(code[step])
while step < len(co.co_code): op = ord(co.co_code[step])
def getargs(co): """Get information about the arguments accepted by a code object. Three things are returned: (args, varargs, varkw), where 'args' is a list of argument names (possibly containing nested lists), and 'varargs' and 'varkw' are the names of the * and ** arguments or None.""" if not iscode(co): raise TypeError('arg is not a code object') code = co.co_code nargs = co.co_argcount names = co.co_varnames args = list(names[:nargs]) step = 0 # The following acrobatics are for anonymous (tuple) arguments. for i in range(nargs): if args[i][:1] in ('', '.'): stack, remain, count = [], [], [] while step < len(code): op = ord(code[step]) step = step + 1 if op >= dis.HAVE_ARGUMENT: opname = dis.opname[op] value = ord(code[step]) + ord(code[step+1])*256 step = step + 2 if opname in ('UNPACK_TUPLE', 'UNPACK_SEQUENCE'): remain.append(value) count.append(value) elif opname == 'STORE_FAST': stack.append(names[value]) # Special case for sublists of length 1: def foo((bar)) # doesn't generate the UNPACK_TUPLE bytecode, so if # `remain` is empty here, we have such a sublist. if not remain: stack[0] = [stack[0]] break else: remain[-1] = remain[-1] - 1 while remain[-1] == 0: remain.pop() size = count.pop() stack[-size:] = [stack[-size:]] if not remain: break remain[-1] = remain[-1] - 1 if not remain: break args[i] = stack[0] varargs = None if co.co_flags & CO_VARARGS: varargs = co.co_varnames[nargs] nargs = nargs + 1 varkw = None if co.co_flags & CO_VARKEYWORDS: varkw = co.co_varnames[nargs] return args, varargs, varkw
9c1794b7c371677c0a6a144a62be5edb8cd52193 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/9c1794b7c371677c0a6a144a62be5edb8cd52193/inspect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1968, 12, 2894, 4672, 3536, 967, 1779, 2973, 326, 1775, 8494, 635, 279, 981, 733, 18, 225, 935, 992, 9198, 854, 2106, 30, 261, 1968, 16, 19732, 16, 569, 9987, 3631, 1625, 296, 196...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1968, 12, 2894, 4672, 3536, 967, 1779, 2973, 326, 1775, 8494, 635, 279, 981, 733, 18, 225, 935, 992, 9198, 854, 2106, 30, 261, 1968, 16, 19732, 16, 569, 9987, 3631, 1625, 296, 196...
if "force" in kwargs:
if "force" in kwargs and kwargs["force"]:
def append_process(xmldoc, **kwargs): process = llwapp.append_process(xmldoc, program = process_program_name, version = __version__, cvs_repository = "lscsoft", cvs_entry_time = __date__, comment = kwargs["comment"]) params = [ ("--program", "lstring", kwargs["program"]), ("--coincidence-algorithm", "lstring", kwargs["coincidence_algorithm"]) ] if "stringcusp_params" in kwargs: params += [("--stringcusp-params", "lstring", kwargs["stringcusp_params"])] if "force" in kwargs: params += [("--force", "lstring", "")] if kwargs["coincidence_algorithm"] in ("stringcusp",): for key, value in kwargs["thresholds"].iteritems(): if key[0] < key[1]: params += [("--thresholds", "lstring", "%s,%s=%s" % (key[0], key[1], ",".join(map(str, value))))] llwapp.append_process_params(xmldoc, process, params) return process
3057323867d0a3ba5d445b73b507c84eae00789b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3592/3057323867d0a3ba5d445b73b507c84eae00789b/ligolw_burca.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 67, 2567, 12, 2902, 2434, 16, 2826, 4333, 4672, 1207, 273, 6579, 91, 2910, 18, 6923, 67, 2567, 12, 2902, 2434, 16, 5402, 273, 1207, 67, 12890, 67, 529, 16, 1177, 273, 1001, 1589, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 67, 2567, 12, 2902, 2434, 16, 2826, 4333, 4672, 1207, 273, 6579, 91, 2910, 18, 6923, 67, 2567, 12, 2902, 2434, 16, 5402, 273, 1207, 67, 12890, 67, 529, 16, 1177, 273, 1001, 1589, ...
if not citation_list[k]: del citation_list[k]
if not citation_list[k]: del citation_list[k]
def ref_analyzer(citation_informations, initialresult, initial_citationlist, initial_referencelist,config): """Analyze the citation informations and calculate the citation weight and cited by list dictionary """ pubrefntag = record_pri_number_tag = config.get(config.get("rank_method", "function"),"publication_reference_number_tag") pubreftag = record_pri_number_tag = config.get(config.get("rank_method", "function"),"publication_reference_tag") #pubrefntag is prob 999C5r, pubreftag 999c5s citation_list = initial_citationlist reference_list = initial_referencelist result = initialresult d_reports_numbers = citation_informations[0] d_references_report_numbers = citation_informations[1] d_references_s = citation_informations[2] #of type: {77: ['Nucl. Phys. B 72 (1974) 461','blah blah'], 93: ['..'], ..} d_records_s = citation_informations[3] t1 = os.times()[4] for recid, refnumbers in d_references_report_numbers.iteritems(): for refnumber in refnumbers: p = refnumber f = 'reportnumber' rec_id = get_recids_matching_query(p, f) if rec_id and rec_id[0]: if result.has_key(rec_id[0]): result[rec_id[0]] += 1 # Citation list should have rec_id[0] but check anyway if citation_list.has_key(rec_id[0]): citation_list[rec_id[0]].append(recid) else: citation_list[rec_id[0]] = [recid] if reference_list.has_key(recid): reference_list[recid].append(rec_id[0]) else: reference_list[recid] = [rec_id[0]] t2 = os.times()[4] for recid, refss in d_references_s.iteritems(): for refs in refss: p = refs f = 'publref' rec_id = get_recids_matching_query(p, f) if rec_id and not recid in citation_list[rec_id[0]]: result[rec_id[0]] += 1 citation_list[rec_id[0]].append(recid) if rec_id and not rec_id[0] in reference_list[recid]: reference_list[recid].append(rec_id[0]) t3 = os.times()[4] for rec_id, recnumbers in d_reports_numbers.iteritems(): for recnumber in recnumbers: p = recnumber recid_list = get_recids_matching_query(p, pubrefntag) if recid_list: for recid in recid_list: if not citation_list.has_key(rec_id): citation_list[rec_id] = [] if not recid in citation_list[rec_id]: result[rec_id] += 1 citation_list[rec_id].append(recid) if not reference_list.has_key(recid): reference_list[recid] = [] if not rec_id in reference_list[recid]: reference_list[recid].append(rec_id) t4 = os.times()[4] for recid, recs in d_records_s.iteritems(): tmp = recs.find("-") if tmp < 0: recs_modified = recs else: recs_modified = recs[:tmp] p = recs_modified rec_ids = get_recids_matching_query(p, pubreftag) if rec_ids: for rec_id in rec_ids: if not rec_id in citation_list[recid]: result[recid] += 1 citation_list[recid].append(rec_id) if not recid in reference_list[rec_id]: reference_list[rec_id].append(recid) #remove empty lists in citation and reference keys = citation_list.keys() for k in keys: if not citation_list[k]: del citation_list[k] keys = reference_list.keys() for k in keys: if not reference_list[k]: del reference_list[k] selfdic = get_self_citations(citation_list,config) #selfdic consists of #key k -> list of values [v1,v2,..] #where k is a record with author A and k cites v1,v2.. and A appears in v1,v2.. #create a reverse "x cited by y" self cit dict selfcitedbydic = {} for k in selfdic.keys(): vlist = selfdic[k] for v in vlist: if selfcitedbydic.has_key(v): tmplist = selfcitedbydic[v] tmplist.append(k) else: tmplist = [k] selfcitedbydic[v] = tmplist if task_get_option('verbose') >= 9: write_message("citation_list (x is cited by y): "+str(citation_list),sys.stderr) write_message("reference_list (x cites y): "+str(reference_list),sys.stderr) write_message("selfcitedbydic (x is cited by y and one of the authors of x same as y's): "+str(selfcitedbydic),sys.stderr) write_message("selfdic (x cites y and one of the authors of x same as y's): "+str(selfdic),sys.stderr) insert_cit_ref_list_intodb(citation_list, reference_list, selfcitedbydic, selfdic) t5 = os.times()[4] print "\nExecution time for analyzing the citation information generating the dictionary: " print "checking ref number: ", (t2-t1) print "checking ref ypvt: ", (t3-t2) print "checking rec number: ", (t4-t3) print "checking rec ypvt: ", (t5-t4) print "total time of ref_analyze: ", (t5-t1) return result
b82d6c8f41670ffe5ba1c83b204132adcec68756 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/b82d6c8f41670ffe5ba1c83b204132adcec68756/bibrank_citation_indexer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1278, 67, 13647, 12, 71, 8773, 67, 267, 687, 1012, 16, 2172, 2088, 16, 2172, 67, 71, 8773, 1098, 16, 2172, 67, 266, 586, 1331, 5449, 16, 1425, 4672, 3536, 31984, 326, 21145, 26978, 471...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1278, 67, 13647, 12, 71, 8773, 67, 267, 687, 1012, 16, 2172, 2088, 16, 2172, 67, 71, 8773, 1098, 16, 2172, 67, 266, 586, 1331, 5449, 16, 1425, 4672, 3536, 31984, 326, 21145, 26978, 471...
u = urllib2.urlopen("http://www.python.org")
u = _urlopen_with_retry("http://www.python.org")
def test_http_basic(self): u = urllib2.urlopen("http://www.python.org") self.assertTrue(u.fp._sock.fp._sock.gettimeout() is None)
77becf87a4ab41f96c4ed8c8bd87c21fb457be95 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/77becf87a4ab41f96c4ed8c8bd87c21fb457be95/test_urllib2net.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2505, 67, 13240, 12, 2890, 4672, 582, 273, 389, 295, 18589, 67, 1918, 67, 9620, 2932, 2505, 2207, 5591, 18, 8103, 18, 3341, 7923, 365, 18, 11231, 5510, 12, 89, 18, 7944, 6315...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2505, 67, 13240, 12, 2890, 4672, 582, 273, 389, 295, 18589, 67, 1918, 67, 9620, 2932, 2505, 2207, 5591, 18, 8103, 18, 3341, 7923, 365, 18, 11231, 5510, 12, 89, 18, 7944, 6315...
file.Write("\n
file.Write("\n
def WritePepperGLES2Implementation(self, filename): """Writes the Pepper OpenGLES interface implementation."""
fa34f7f0b969cee4616b0a88cc66de6c8ff3746d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fa34f7f0b969cee4616b0a88cc66de6c8ff3746d/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 28828, 457, 43, 11386, 22, 13621, 12, 2890, 16, 1544, 4672, 3536, 8368, 326, 453, 881, 457, 3502, 43, 11386, 1560, 4471, 12123, 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, 2598, 28828, 457, 43, 11386, 22, 13621, 12, 2890, 16, 1544, 4672, 3536, 8368, 326, 453, 881, 457, 3502, 43, 11386, 1560, 4471, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
'_time__=misc.cputime(); __wall__=misc.walltime(); R = ZZ[\'x\']; print "Time: CPU %.2f s, Wall: %.2f s"%(misc.cputime(__time__), misc.walltime(__wall__)); (x,) = R._first_ngens(1)'
'__time__=misc.cputime(); __wall__=misc.walltime(); R = ZZ[\'x\']; print "Time: CPU %.2f s, Wall: %.2f s"%(misc.cputime(__time__), misc.walltime(__wall__)); (x,) = R._first_ngens(1)'
def preparse(line, reset=True, do_time=False, ignore_prompts=False): r""" EXAMPLES: sage: preparse("ZZ.<x> = ZZ['x']") "ZZ = ZZ['x']; (x,) = ZZ._first_ngens(1)" sage: preparse("ZZ.<x> = ZZ['y']") "ZZ = ZZ['y']; (x,) = ZZ._first_ngens(1)" sage: preparse("ZZ.<x,y> = ZZ[]") "ZZ = ZZ['x, y']; (x, y,) = ZZ._first_ngens(2)" sage: preparse("ZZ.<x,y> = ZZ['u,v']") "ZZ = ZZ['u,v']; (x, y,) = ZZ._first_ngens(2)" sage: preparse("ZZ.<x> = QQ[2^(1/3)]") 'ZZ = QQ[Integer(2)**(Integer(1)/Integer(3))]; (x,) = ZZ._first_ngens(1)' sage: QQ[2^(1/3)] Number Field in a with defining polynomial x^3 - 2 sage: preparse("a^b") 'a**b' sage: preparse("a^^b") 'a^b' sage: 8^1 8 sage: 8^^1 9 sage: 9^^1 8 sage: preparse("A \ B") 'A ._backslash_(B)' sage: preparse("time R.<x> = ZZ[]", do_time=True) '_time__=misc.cputime(); __wall__=misc.walltime(); R = ZZ[\'x\']; print "Time: CPU %.2f s, Wall: %.2f s"%(misc.cputime(__time__), misc.walltime(__wall__)); (x,) = R._first_ngens(1)' """ global quote_state if reset: quote_state = None L = line.lstrip() if len(L) > 0 and L[0] in ['#', '!']: return line if L.startswith('...'): i = line.find('...') return line[:i+3] + preparse(line[i+3:], reset=reset, do_time=do_time, ignore_prompts=ignore_prompts) if ignore_prompts: # Get rid of leading sage: and >>> so that pasting of examples from # the documentation works. line = strip_prompts(line) # This part handles lines with semi-colons all at once # Then can also handle multiple lines more efficiently, but # that optimization can be done later. L, literals, quote_state = strip_string_literals(line, quote_state) # Ellipsis Range # [1..n] try: L = parse_ellipsis(L, preparse_step=False) except SyntaxError: pass if implicit_mul_level: # Implicit Multiplication # 2x -> 2*x L = implicit_mul(L, level = implicit_mul_level) # Wrapping # 1 + 0.5 -> Integer(1) + RealNumber('0.5') L = preparse_numeric_literals(L) # Generators # R.0 -> R.gen(0) L = re.sub(r'([_a-zA-Z]\w*|[)\]])\.(\d+)', r'\1.gen(\2)', L) # Use ^ for exponentiation and ^^ for xor # (A side effect is that **** becomes xor as well.) L = L.replace('^', '**').replace('****', '^') # Make it easy to match statement ends L = ';%s;' % L.replace('\n', ';\n;') if do_time: # Separate time statement L = re.sub(r';(\s*)time +(\w)', r';time;\1\2', L) # Construction with generators # R.<...> = obj() # R.<.... = R[] L = preparse_generators(L) # Calculus functions # f(x,y) = x^3 - sin(y) L = preparse_calculus(L) # Backslash L = re.sub(r'''\\\s*([^*/;:\\#'"]+)''', r'._backslash_(\1)', L) if do_time: # Time keyword L = re.sub(r';time;(\s*)(\S[^;]*)', r'\1__time__=misc.cputime(); __wall__=misc.walltime(); \2; print ' + '"Time: CPU %%.2f s, Wall: %%.2f s"%%(misc.cputime(__time__), misc.walltime(__wall__))', L) # Remove extra ;'s L = L.replace(';\n;', '\n')[1:-1] line = L % literals return line
38576fcbed0ad76f26faffd5ad5f3494c857c96a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/38576fcbed0ad76f26faffd5ad5f3494c857c96a/preparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 2670, 12, 1369, 16, 2715, 33, 5510, 16, 741, 67, 957, 33, 8381, 16, 2305, 67, 17401, 1092, 33, 8381, 4672, 436, 8395, 5675, 8900, 11386, 30, 272, 410, 30, 675, 2670, 2932, 27096, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 2670, 12, 1369, 16, 2715, 33, 5510, 16, 741, 67, 957, 33, 8381, 16, 2305, 67, 17401, 1092, 33, 8381, 4672, 436, 8395, 5675, 8900, 11386, 30, 272, 410, 30, 675, 2670, 2932, 27096, ...
res = Resource(self.large_url[0], 'http-get:*:%s:%s' % (self.mimetype,';'.join([dlna_pn]+dlna_tags)))
if self.store.proxy == False: res = Resource(self.large_url[0], 'http-get:*:%s:%s' % (self.mimetype,';'.join([dlna_pn]+dlna_tags))) else: res = Resource(self.url+'?attachment=large', 'http-get:*:%s:%s' % (self.mimetype,';'.join([dlna_pn]+dlna_tags))) self.item.attachments['large'] = ProxyImage(self.large_url[0])
def process(result): for size in result.getiterator('size'): #print size.get('label'), size.get('source') if size.get('label') == 'Original': self.original_url = (size.get('source'),size.get('width')+'x'+size.get('height')) self.url = self.original_url[0] elif size.get('label') == 'Large': self.large_url = (size.get('source'),size.get('width')+'x'+size.get('height')) self.url = self.large_url[0] elif size.get('label') == 'Medium': self.medium_url = (size.get('source'),size.get('width')+'x'+size.get('height')) elif size.get('label') == 'Small': self.small_url = (size.get('source'),size.get('width')+'x'+size.get('height')) elif size.get('label') == 'Thumbnail': self.thumb_url = (size.get('source'),size.get('width')+'x'+size.get('height'))
73c28ccf68f8b60798e81e4544ed7810a1750ecc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11626/73c28ccf68f8b60798e81e4544ed7810a1750ecc/flickr_storage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2088, 4672, 364, 963, 316, 563, 18, 588, 9838, 2668, 1467, 11, 4672, 468, 1188, 963, 18, 588, 2668, 1925, 19899, 963, 18, 588, 2668, 3168, 6134, 309, 963, 18, 588, 2668, 1925...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2088, 4672, 364, 963, 316, 563, 18, 588, 9838, 2668, 1467, 11, 4672, 468, 1188, 963, 18, 588, 2668, 1925, 19899, 963, 18, 588, 2668, 3168, 6134, 309, 963, 18, 588, 2668, 1925...
print "Translation:", translation
if debug: print "Translation:", translation
def __calc_azi(xi, yi): return math.atan2(yi, xi)
5dda94f6f020457616aeb9c18c84293aeaff5080 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/762/5dda94f6f020457616aeb9c18c84293aeaff5080/calc_dgs_params.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12448, 67, 1561, 77, 12, 27005, 16, 16805, 4672, 327, 4233, 18, 270, 304, 22, 12, 93, 77, 16, 14087, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12448, 67, 1561, 77, 12, 27005, 16, 16805, 4672, 327, 4233, 18, 270, 304, 22, 12, 93, 77, 16, 14087, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.assertEquals(self.wordlist.search(self.length, cs), [self.word]) self.assertEquals(self.wordlist.search(self.length2, cs), [self.word2])
self.assertEquals(self.wordlist.search(self.length, cs)[0][0], self.word) self.assertEquals(self.wordlist.search(self.length2, cs)[0][0], self.word2)
def testSearchBasic(self): self.wordlist.add_word(self.word) self.assertEquals(self.wordlist.search(self.length, []), [self.word]) self.assertEquals(self.wordlist.search(self.length, self.constraints), [self.word]) cs = [(0, "p"), (1, "a")] self.wordlist.add_word(self.word2) self.assertEquals(self.wordlist.search(self.length, cs), [self.word]) self.assertEquals(self.wordlist.search(self.length2, cs), [self.word2])
0d43c15b13d87a1e3cc7de254bf6ccd1134f9c09 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6427/0d43c15b13d87a1e3cc7de254bf6ccd1134f9c09/test_word.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2979, 8252, 12, 2890, 4672, 365, 18, 1095, 1098, 18, 1289, 67, 1095, 12, 2890, 18, 1095, 13, 365, 18, 11231, 8867, 12, 2890, 18, 1095, 1098, 18, 3072, 12, 2890, 18, 2469, 16, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2979, 8252, 12, 2890, 4672, 365, 18, 1095, 1098, 18, 1289, 67, 1095, 12, 2890, 18, 1095, 13, 365, 18, 11231, 8867, 12, 2890, 18, 1095, 1098, 18, 3072, 12, 2890, 18, 2469, 16, 5...
courtID = options.parseID
courtID = int(options.parseID)
def main(): usage = "usage: %prog (-s SCRAPEID | -p PARSEID) [-v | -V]" parser = OptionParser(usage) parser.add_option('-s', '--scrape', dest='scrapeID', metavar='SCRAPEID', help="The court to scrape and parse") parser.add_option('-p', '--parse', dest='parseID', metavar='PARSEID', help="The court to only parse") parser.add_option('-v', '--verbose', action="store_true", dest='verbose', default=False, help="Display status messages after execution") parser.add_option('-V', '--vverbose', action="store_true", dest='vverbose', default=False, help="Display status messages after execution, and display verbose variable values during execution") (options, args) = parser.parse_args() if not options.scrapeID and not options.parseID: parser.error("You must specify a court to scrape and/or parse") if options.verbose: verbose = 1 elif options.vverbose: verbose = 2 if options.parseID: # we are only parsing. courtID = options.parseID if verbose >= 1: result = "It worked\n" print parseCourt(courtID, result, verbose) elif options.scrapeID: # we scrape and parse. Currently no option to only scrape. courtID = options.scrapeID print scrape_and_parse(courtID, verbose) return 0
df600e907bde60c25475e107484eb7bf06e36696 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6762/df600e907bde60c25475e107484eb7bf06e36696/scrape_and_parse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 4084, 273, 315, 9167, 30, 738, 14654, 24927, 87, 8795, 2849, 1423, 734, 571, 300, 84, 30161, 734, 13, 23059, 90, 571, 300, 58, 4279, 2082, 273, 18862, 12, 9167, 13, 2082, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 4084, 273, 315, 9167, 30, 738, 14654, 24927, 87, 8795, 2849, 1423, 734, 571, 300, 84, 30161, 734, 13, 23059, 90, 571, 300, 58, 4279, 2082, 273, 18862, 12, 9167, 13, 2082, ...
foobar, self._selected = self.current.get_selection().get_selected_rows()
foobar, self._selected = self.current_selection.get_selected_rows()
def on_drag_drop(self, treeview, drag_context, x, y, selection, info, timestamp): model = treeview.get_model() foobar, self._selected = self.current.get_selection().get_selected_rows() data = pickle.loads(selection.data) drop_info = treeview.get_dest_row_at_pos(x, y)
8cbdded67d2cd4af1d043eab95abc449dd591f9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2312/8cbdded67d2cd4af1d043eab95abc449dd591f9b/sonata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 15997, 67, 7285, 12, 2890, 16, 2151, 1945, 16, 8823, 67, 2472, 16, 619, 16, 677, 16, 4421, 16, 1123, 16, 2858, 4672, 938, 273, 2151, 1945, 18, 588, 67, 2284, 1435, 18261, 94...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 15997, 67, 7285, 12, 2890, 16, 2151, 1945, 16, 8823, 67, 2472, 16, 619, 16, 677, 16, 4421, 16, 1123, 16, 2858, 4672, 938, 273, 2151, 1945, 18, 588, 67, 2284, 1435, 18261, 94...
zipname = u"images/%s" % stripNS(image["title"]).replace("'", '-')
zipname = u"images/%s" % image["title"].replace("'", '-')
def job(job_id): url = image["thumburl"] or image["url"] assert url ext = url.rsplit('.')[-1] size = self.imagesize if size is not None: ext = '%dpx.%s' % (size, ext) else: ext = '.%s' % ext filename = os.path.join(self.tmpdir, utils.fsescape(image["title"] + ext)) if not utils.fetch_url(url, ignore_errors=True, output_filename=filename): log.warn('Could not get image %r' % image["name"]) return self.zf_lock.acquire() try: zipname = u"images/%s" % stripNS(image["title"]).replace("'", '-') self.zf.write(filename, zipname.encode("utf-8")) finally: self.zf_lock.release()
6f31e619d0ab1ae87e77c19888def7bffa648037 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12391/6f31e619d0ab1ae87e77c19888def7bffa648037/fzipcreator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1719, 12, 4688, 67, 350, 4672, 880, 273, 1316, 9614, 21639, 718, 11929, 578, 1316, 9614, 718, 11929, 1815, 880, 1110, 273, 880, 18, 86, 4939, 2668, 1093, 13, 18919, 21, 65, 963, 273, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1719, 12, 4688, 67, 350, 4672, 880, 273, 1316, 9614, 21639, 718, 11929, 578, 1316, 9614, 718, 11929, 1815, 880, 1110, 273, 880, 18, 86, 4939, 2668, 1093, 13, 18919, 21, 65, 963, 273, 3...
for entry in self.querySet.values(*self.fields):
for entry in self.querySet.values(*[fieldString for field,fieldString in self.fields]):
def __init__(self, xSize, ySize, xPadding, yPadding, xOffset, yOffset, xMin, xMax, yMin, yMax, xbin, ybin, xText, yText, ref, residue, querySet):
ad439b9482d995dc4c6b1723d32515ef05247abd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6163/ad439b9482d995dc4c6b1723d32515ef05247abd/ConfDistFuncs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 619, 1225, 16, 677, 1225, 16, 619, 9485, 16, 677, 9485, 16, 619, 2335, 16, 677, 2335, 16, 619, 2930, 16, 619, 2747, 16, 677, 2930, 16, 677, 2747, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 619, 1225, 16, 677, 1225, 16, 619, 9485, 16, 677, 9485, 16, 619, 2335, 16, 677, 2335, 16, 619, 2930, 16, 619, 2747, 16, 677, 2930, 16, 677, 2747, 16, ...
raise self.failureException, (msg or '%s == %s' % (first, second))
raise self.failureException, \ (msg or '%s == %s' % (`first`, `second`))
def failIfEqual(self, first, second, msg=None): """Fail if the two objects are equal as determined by the '==' operator. """ if first == second: raise self.failureException, (msg or '%s == %s' % (first, second))
360d5ab86c191c5c1aa410c49f0cc8a908489f17 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/360d5ab86c191c5c1aa410c49f0cc8a908489f17/unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2321, 2047, 5812, 12, 2890, 16, 1122, 16, 2205, 16, 1234, 33, 7036, 4672, 3536, 3754, 309, 326, 2795, 2184, 854, 3959, 487, 11383, 635, 326, 22853, 3726, 18, 3536, 309, 1122, 422, 2205, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2321, 2047, 5812, 12, 2890, 16, 1122, 16, 2205, 16, 1234, 33, 7036, 4672, 3536, 3754, 309, 326, 2795, 2184, 854, 3959, 487, 11383, 635, 326, 22853, 3726, 18, 3536, 309, 1122, 422, 2205, ...
logger.info("copy quota values to user:" + uid)
logger.debug("copy quota values to user:" + uid)
def setUserQuotaDefaults(self, uid, group): # @todo: unfinished, does nothing yet. logger = logging.getLogger() logger.info("Set user quota defaults: user: " + uid + " group: " + group) keys = [] # don't set the quota if one has been set before. logger.info(self.getDetailedUser(uid)["objectClass"]) logger.info("Value of: self.hasDiskQuotaObjectClass(uid)" + str(self.hasDiskQuotaObjectClass(uid))) if self.hasDiskQuotaObjectClass(uid): logger.info("User already has quota Object class") return keys groupdefaults = self.getDetailedGroup(group) # @todo, check components before action if "quota" in groupdefaults.keys(): # copy quota values to user logger.info("copy quota values to user:" + uid) self.addDiskQuotaObjectClass(uid) self.changeUserAttributes(uid, "quota", groupdefaults["quota"]) keys.append('quota') if "networkquota" in groupdefaults.keys(): # copy networkquota values to user logger.info("copy network quota values to user:" + uid) self.addDiskQuotaObjectClass(uid) self.changeUserAttributes(uid, "networkquota", groupdefaults["networkquota"]) keys.append('networkquota') return keys
c1b148277eaa33380684c03817015cbdb8ea5c22 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5988/c1b148277eaa33380684c03817015cbdb8ea5c22/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14365, 10334, 7019, 12, 2890, 16, 4555, 16, 1041, 4672, 468, 632, 9012, 30, 640, 13527, 16, 1552, 5083, 4671, 18, 1194, 273, 2907, 18, 588, 3328, 1435, 1194, 18, 1376, 2932, 694, 729, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14365, 10334, 7019, 12, 2890, 16, 4555, 16, 1041, 4672, 468, 632, 9012, 30, 640, 13527, 16, 1552, 5083, 4671, 18, 1194, 273, 2907, 18, 588, 3328, 1435, 1194, 18, 1376, 2932, 694, 729, ...
scripts[1:1] = rthooks
scripts[-1:-1] = rthooks
def assemble(self): print "running Analysis", os.path.basename(self.out) paths = self.pathex for i in range(len(paths)): # FIXME: isn't self.pathex already norm-abs-pathed? paths[i] = absnormpath(paths[i]) ################################################### # Scan inputs and prepare: dirs = {} # input directories pynms = [] # python filenames with no extension for script in self.inputs: if not os.path.exists(script): print "Analysis: script %s not found!" % script sys.exit(1) d, base = os.path.split(script) if not d: d = os.getcwd() d = absnormpath(d) pynm, ext = os.path.splitext(base) dirs[d] = 1 pynms.append(pynm) ################################################### # Initialize analyzer and analyze scripts analyzer = mf.ImportTracker(dirs.keys()+paths, self.hookspath, self.excludes) #print analyzer.path scripts = [] # will contain scripts to bundle for i in range(len(self.inputs)): script = self.inputs[i] print "Analyzing:", script analyzer.analyze_script(script) scripts.append((pynms[i], script, 'PYSOURCE')) ################################################### # Fills pure, binaries and rthookcs lists to TOC pure = [] # pure python modules binaries = [] # binaries to bundle rthooks = [] # rthooks if needed for modnm, mod in analyzer.modules.items(): # FIXME: why can we have a mod == None here? if mod is not None: hooks = findRTHook(modnm) #XXX if hooks: rthooks.extend(hooks) if isinstance(mod, mf.BuiltinModule): pass else: fnm = mod.__file__ if isinstance(mod, mf.ExtensionModule): binaries.append((mod.__name__, fnm, 'EXTENSION')) elif modnm == '__main__': pass else: pure.append((modnm, fnm, 'PYMODULE')) binaries.extend(bindepend.Dependencies(binaries)) self.fixMissingPythonLib(binaries) scripts[1:1] = rthooks self.scripts = TOC(scripts) self.pure = TOC(pure) self.binaries = TOC(binaries) try: # read .toc oldstuff = eval(open(self.out, 'r').read()) except: oldstuff = None if oldstuff != (self.inputs, self.pathex, self.hookspath, self.excludes, scripts, pure, binaries): outf = open(self.out, 'w') pprint.pprint( (self.inputs, self.pathex, self.hookspath, self.excludes, self.scripts, self.pure, self.binaries), outf) outf.close() wf = open(WARNFILE, 'w') for ln in analyzer.getwarnings(): wf.write(ln+'\n') wf.close() print "Warnings written to %s" % WARNFILE return 1 print self.out, "no change!" return 0
4b65427697dd8a14d7bbe6f7bb217f5b9caa9cad /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11925/4b65427697dd8a14d7bbe6f7bb217f5b9caa9cad/Build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19540, 12, 2890, 4672, 1172, 315, 8704, 16318, 3113, 1140, 18, 803, 18, 13909, 12, 2890, 18, 659, 13, 2953, 273, 365, 18, 803, 338, 364, 277, 316, 1048, 12, 1897, 12, 4481, 3719, 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, 19540, 12, 2890, 4672, 1172, 315, 8704, 16318, 3113, 1140, 18, 803, 18, 13909, 12, 2890, 18, 659, 13, 2953, 273, 365, 18, 803, 338, 364, 277, 316, 1048, 12, 1897, 12, 4481, 3719, 30, ...
this_input_cache = input_cache[:files_per_meas_likelihood]
node.add_input_cache([cache_entry for cache_entry, parent in input_cache[:files_per_meas_likelihood]]) for parent in set(parent for cache_entry, parent in input_cache[:files_per_meas_likelihood]): node.add_parent(parent)
def make_meas_likelihood_fragment(dag, parents, tag, files_per_meas_likelihood = None): if files_per_meas_likelihood is None: files_per_meas_likelihood = meas_likelihoodjob.files_per_meas_likelihood nodes = set() input_cache = power.collect_output_caches(parents) while input_cache: node = MeasLikelihoodNode(meas_likelihoodjob) this_input_cache = input_cache[:files_per_meas_likelihood] del input_cache[:files_per_meas_likelihood] for cache_entry, parent in this_input_cache: node.add_input_cache([cache_entry]) node.add_parent(parent) seg = power.cache_span(node.get_input_cache()) node.set_name("lalapps_string_meas_likelihood_%s_%d_%d" % (tag, int(seg[0]), int(abs(seg)))) node.set_output(tag) dag.add_node(node) nodes.add(node) return nodes
e50861f46d5439c1c9fb86984403b1d72f14577f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/e50861f46d5439c1c9fb86984403b1d72f14577f/cosmicstring.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 21992, 67, 18269, 67, 11956, 12, 30204, 16, 6298, 16, 1047, 16, 1390, 67, 457, 67, 21992, 67, 18269, 273, 599, 4672, 309, 1390, 67, 457, 67, 21992, 67, 18269, 353, 599, 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, 1221, 67, 21992, 67, 18269, 67, 11956, 12, 30204, 16, 6298, 16, 1047, 16, 1390, 67, 457, 67, 21992, 67, 18269, 273, 599, 4672, 309, 1390, 67, 457, 67, 21992, 67, 18269, 353, 599, 30, ...
'labeled_adjacency_matrix' -- a square SAGE matrix M, with M[i][j] equal to the label of the single edge \{i,j\}
'weighted_adjacency_matrix' -- a square SAGE matrix M, with M[i][j] equal to the weight of the single edge \{i,j\}
def show(self, pos=None, layout=None, vertex_labels=True,\ edge_labels=False, vertex_size=200, graph_border=False,\ vertex_colors=None, edge_colors=None, partition=None,\ scaling_term=0.05, talk=False, iterations=50,\ color_by_label=False, heights=None, **kwds): """ Shows the (di)graph.
ec09881a92ec8dd2b80398dcd1c90d9d7fbb1acd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/ec09881a92ec8dd2b80398dcd1c90d9d7fbb1acd/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 12, 2890, 16, 949, 33, 7036, 16, 3511, 33, 7036, 16, 5253, 67, 5336, 33, 5510, 17211, 3591, 67, 5336, 33, 8381, 16, 5253, 67, 1467, 33, 6976, 16, 2667, 67, 8815, 33, 8381, 1721...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 12, 2890, 16, 949, 33, 7036, 16, 3511, 33, 7036, 16, 5253, 67, 5336, 33, 5510, 17211, 3591, 67, 5336, 33, 8381, 16, 5253, 67, 1467, 33, 6976, 16, 2667, 67, 8815, 33, 8381, 1721...
self._objects[name] = math.Vector2(position.x, position.y)
self._objects[name] = math.Vector2(position.x - robotPos.x, position.y - robotPos.y)
def _getObjectInstances(self, sim, name, interface): objects = sim.scene.getObjectsByInterface(interface) if objects is None or len(objects) == 0: return if len(objects) == 1: position = objects[0].position self._objects[name] = math.Vector2(position.x, position.y) else: for i, obj in enumerate(objects): self._objects[name + str(i+1)] = math.Vector2(obj.position.x, obj.position.y)
316893cbdbea56d6c59b04f5501d03b8c8688635 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10608/316893cbdbea56d6c59b04f5501d03b8c8688635/slam.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 921, 5361, 12, 2890, 16, 3142, 16, 508, 16, 1560, 4672, 2184, 273, 3142, 18, 23694, 18, 588, 4710, 858, 1358, 12, 5831, 13, 309, 2184, 353, 599, 578, 562, 12, 6911, 13, 422...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 921, 5361, 12, 2890, 16, 3142, 16, 508, 16, 1560, 4672, 2184, 273, 3142, 18, 23694, 18, 588, 4710, 858, 1358, 12, 5831, 13, 309, 2184, 353, 599, 578, 562, 12, 6911, 13, 422...
if "f8" in keys:
if "f8" in keys or 'Q' in keys: loop.quit()
def update_ui(self): #self.update_status() canvas = self.frame.render( (self.size),True ) ### GRRRRRRRRRRRRRRRRRRRRR ->^^^^ ui.draw_screen((self.size),canvas) keys = ui.get_input() # Should make a keyhandler method, but this will do until I get around to # that stage if "f8" in keys: return False if "f5" in keys: wireless.Scan() for k in keys: if k == "window resize": self.size = ui.get_cols_rows() continue self.frame.keypress( self.size, k ) return True
b1475ce12c0b990f7b6a595934f0c2377bb8c973 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12280/b1475ce12c0b990f7b6a595934f0c2377bb8c973/wicd-curses.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 4881, 12, 2890, 4672, 468, 2890, 18, 2725, 67, 2327, 1435, 5953, 273, 365, 18, 3789, 18, 5902, 12, 261, 2890, 18, 1467, 3631, 5510, 262, 11849, 225, 15228, 17950, 17950, 17950,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 4881, 12, 2890, 4672, 468, 2890, 18, 2725, 67, 2327, 1435, 5953, 273, 365, 18, 3789, 18, 5902, 12, 261, 2890, 18, 1467, 3631, 5510, 262, 11849, 225, 15228, 17950, 17950, 17950,...
threadinfos = ( ThreadInformation( root_post = instance, category = instance.category,
threadinfos = ( ThreadInformation( root_post = thread, category = thread.category,
def update_thread_information(instance, **kwargs): """ Updates the thread information every time a post is saved. """ thread = instance.get_thread() threadinfos = ThreadInformation.objects.filter( root_post = thread ) if len(threadinfos) < 1: if thread.is_hidden != 0: # If thread is still hidden, don't bother creating a # ThreadInformation object. return threadinfos = ( ThreadInformation( root_post = instance, category = instance.category, thread_type = THREAD_TYPE_DEFAULT, ), ) for threadinfo in threadinfos: threadinfo.update_cache() threadinfo.save()
fb1f22cdcf3a9f30c2947f9b2bd6df79b7218aa9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11563/fb1f22cdcf3a9f30c2947f9b2bd6df79b7218aa9/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 5930, 67, 13117, 12, 1336, 16, 2826, 4333, 4672, 3536, 15419, 326, 2650, 1779, 3614, 813, 279, 1603, 353, 5198, 18, 3536, 2650, 273, 791, 18, 588, 67, 5930, 1435, 2650, 18227, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 5930, 67, 13117, 12, 1336, 16, 2826, 4333, 4672, 3536, 15419, 326, 2650, 1779, 3614, 813, 279, 1603, 353, 5198, 18, 3536, 2650, 273, 791, 18, 588, 67, 5930, 1435, 2650, 18227, ...
env['LANG'] = 'C'
env['LC_ALL'] = 'C'
def get_fsencoding(env): output = subprocess.check_output( [sys.executable, "-c", "import sys; print(sys.getfilesystemencoding())"], env=env) return output.rstrip().decode('ascii')
ef6ff662c933f43df5bba40032de2d718f4e1fd8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/ef6ff662c933f43df5bba40032de2d718f4e1fd8/test_sys.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2556, 5999, 12, 3074, 4672, 876, 273, 6652, 18, 1893, 67, 2844, 12, 306, 9499, 18, 17751, 16, 3701, 71, 3113, 315, 5666, 2589, 31, 1172, 12, 9499, 18, 588, 17846, 5999, 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, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2556, 5999, 12, 3074, 4672, 876, 273, 6652, 18, 1893, 67, 2844, 12, 306, 9499, 18, 17751, 16, 3701, 71, 3113, 315, 5666, 2589, 31, 1172, 12, 9499, 18, 588, 17846, 5999, 1435, ...
for module in self.pipeline.module_list:
for module in p.module_list:
def get_wf_vt_zip(self, host, port, db_name, vt_id, version): """get_wf_vt_zip(host:str, port:str, db_name:str, vt_id:str, version:str) -> str Returns a vt file containing the single workflow defined by version encoded as base64 string """ self.server_logger.info("Request: get_wf_vt_zip(%s,%s,%s,%s,%s)"%(host, port, db_name, vt_id, version)) try: locator = DBLocator(host=host, port=int(port), database=db_name, user='vtserver', passwd='', obj_id=int(vt_id), obj_type=None, connection_id=None) (v, _ , _) = io.load_vistrail(locator) p = v.getPipeline(long(version)) if p: vistrail = Vistrail() action_list = [] for module in self.pipeline.module_list: action_list.append(('add', module)) for connection in self.pipeline.connection_list: action_list.append(('add', connection)) action = core.db.action.create_action(action_list) vistrail.add_action(action, 0L) vistrail.addTag("Imported workflow", action.id) pipxmlstr = io.serialize(vistrail) result = base64.b64encode(pipxmlstr) else: result = "Error: Pipeline was not materialized" self.server_logger.info(result) except Exception, e: result = "Error: %s"%str(e) self.server_logger.info(result) return result
dae8793fcd0a6aee486e37fdd0768fc0f29b34ee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6341/dae8793fcd0a6aee486e37fdd0768fc0f29b34ee/application_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 15581, 67, 11734, 67, 4450, 12, 2890, 16, 1479, 16, 1756, 16, 1319, 67, 529, 16, 7966, 67, 350, 16, 1177, 4672, 3536, 588, 67, 15581, 67, 11734, 67, 4450, 12, 2564, 30, 701,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15581, 67, 11734, 67, 4450, 12, 2890, 16, 1479, 16, 1756, 16, 1319, 67, 529, 16, 7966, 67, 350, 16, 1177, 4672, 3536, 588, 67, 15581, 67, 11734, 67, 4450, 12, 2564, 30, 701,...
mtime = os.stat(filename).st_mtime
try: mtime = os.stat(filename).st_mtime except OSError: continue
def reloader_loop(extra_files): """When this function is run from the main thread, it will force other threads to exit when any modules currently loaded change. :param extra_files: a list of additional files it should watch. """ mtimes = {} while True: for filename in filter(None, [getattr(module, '__file__', None) for module in sys.modules.values()] + extra_files): while not os.path.isfile(filename): filename = os.path.dirname(filename) if not filename: break if not filename: continue if filename[-4:] in ('.pyc', '.pyo'): filename = filename[:-1] mtime = os.stat(filename).st_mtime if filename not in mtimes: mtimes[filename] = mtime continue if mtime > mtimes[filename]: sys.exit(3) time.sleep(1)
f9e2fad30d34a6b0737539434c03c07c2bc658d4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14437/f9e2fad30d34a6b0737539434c03c07c2bc658d4/serving.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 283, 6714, 67, 6498, 12, 7763, 67, 2354, 4672, 3536, 9434, 333, 445, 353, 1086, 628, 326, 2774, 2650, 16, 518, 903, 2944, 1308, 7403, 358, 2427, 1347, 1281, 4381, 4551, 4203, 2549, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 283, 6714, 67, 6498, 12, 7763, 67, 2354, 4672, 3536, 9434, 333, 445, 353, 1086, 628, 326, 2774, 2650, 16, 518, 903, 2944, 1308, 7403, 358, 2427, 1347, 1281, 4381, 4551, 4203, 2549, 18, ...
return self.labelMap[sourceLabel] return self.labelMap.get(None, None) def getTargetBranch(self, version): targetLabel = self.getTargetLabel(version)
targetLabel = self.labelMap[sourceLabel] else: targetLabel = self.labelMap.get(None, None)
def getTargetLabel(self, version): sourceLabel = version.trailingLabel() if sourceLabel in self.labelMap: return self.labelMap[sourceLabel] return self.labelMap.get(None, None)
48090a0a611c5a2a32181ce3ce6d2db11fdc4a5e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/48090a0a611c5a2a32181ce3ce6d2db11fdc4a5e/clone.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8571, 2224, 12, 2890, 16, 1177, 4672, 1084, 2224, 273, 1177, 18, 26453, 2224, 1435, 309, 1084, 2224, 316, 365, 18, 1925, 863, 30, 327, 365, 18, 1925, 863, 63, 3168, 2224, 65, 327, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8571, 2224, 12, 2890, 16, 1177, 4672, 1084, 2224, 273, 1177, 18, 26453, 2224, 1435, 309, 1084, 2224, 316, 365, 18, 1925, 863, 30, 327, 365, 18, 1925, 863, 63, 3168, 2224, 65, 327, 365,...
if node['cols'] != 4: raise nodes.SkipNode
self.pep_table = node['cols'] == 4
def visit_tgroup(self, node): if node['cols'] != 4: raise nodes.SkipNode self.entry = 0
2573a79f3d2df077ce0b7a0886efd1c95d1353da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/2573a79f3d2df077ce0b7a0886efd1c95d1353da/peps.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 88, 1655, 12, 2890, 16, 756, 4672, 365, 18, 29363, 67, 2121, 273, 756, 3292, 6842, 3546, 422, 1059, 365, 18, 4099, 273, 374, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 88, 1655, 12, 2890, 16, 756, 4672, 365, 18, 29363, 67, 2121, 273, 756, 3292, 6842, 3546, 422, 1059, 365, 18, 4099, 273, 374, 2, -100, -100, -100, -100, -100, -100, -100, -100...
for num in usage:
for num in packages:
def processViews(views, loadDeps, runDeps, output): global classes print ">>> Analysing %s views..." % len(views) classCounts = {} # Generating data structures for possible modules classMods = {} # for id in views: # Hint: IDs # # apiviewer # feedreader # webmail # apiviewer-feedreader # apiviewer-webmail # feedreader-webmail # apiviewer-feedreader-webmail # # Find all classes allIncludes = [] for id in views: allIncludes.extend(views[id]) allClasses = resolveDependencies(allIncludes, [], loadDeps, runDeps) print " - Using %s classes" % len(allClasses) # Caching dependencies of each view deps = {} for viewId in views: # Exclude all features of other views # and handle dependencies the smart way => # also exclude classes only needed by the # already excluded features exclude = [] for subViewId in views: if subViewId != viewId: exclude.extend(views[subViewId]) # Finally resolve the dependencies deps[viewId] = resolveDependencies(views[viewId], exclude, loadDeps, runDeps) print " - %s use %s classes" % (viewId, len(deps[viewId])) # Build bitmask ids for views # 1,2,4,8,16,32,64,128 bits = {} pos = 1 for id in views: bits[id] = pos pos = pos * 2 print bits
81b747f6b630b33c32656070c873a9a09a9e6100 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5718/81b747f6b630b33c32656070c873a9a09a9e6100/generator2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 9959, 12, 7061, 16, 1262, 14430, 16, 1086, 14430, 16, 876, 4672, 2552, 3318, 225, 1172, 315, 23012, 1922, 3646, 310, 738, 87, 7361, 7070, 738, 562, 12, 7061, 13, 225, 667, 9211, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9959, 12, 7061, 16, 1262, 14430, 16, 1086, 14430, 16, 876, 4672, 2552, 3318, 225, 1172, 315, 23012, 1922, 3646, 310, 738, 87, 7361, 7070, 738, 562, 12, 7061, 13, 225, 667, 9211, ...
def calcCurvChange(self,edge): stats = EdgeStatistics() try: l=curvatureList(edge,self.dx,self.skip) except: l=[] if len(l)>1: for i in range(len(l)-1): segment = l[i+1][0] - l[i][0] stats(-math.log((abs(l[i+1][1]-l[i][1])/segment)+1),segment) else: stats(0,1) setattr(edge, self.attrName, stats)
def calcCurvChange(self, edge): edge.curvChange = fitLine(edge.tangents)[2]
def calcCurvChange(self,edge): stats = EdgeStatistics() try: l=curvatureList(edge,self.dx,self.skip) except: l=[] if len(l)>1: for i in range(len(l)-1): segment = l[i+1][0] - l[i][0] stats(-math.log((abs(l[i+1][1]-l[i][1])/segment)+1),segment) else: stats(0,1) setattr(edge, self.attrName, stats)
cc61968bb327c2e574e29cea7778ae764b801d93 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10394/cc61968bb327c2e574e29cea7778ae764b801d93/statistics.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 2408, 90, 3043, 12, 2890, 16, 7126, 4672, 3177, 273, 11342, 8569, 1435, 775, 30, 328, 33, 1397, 90, 1231, 682, 12, 7126, 16, 2890, 18, 13437, 16, 2890, 18, 7457, 13, 1335, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 2408, 90, 3043, 12, 2890, 16, 7126, 4672, 3177, 273, 11342, 8569, 1435, 775, 30, 328, 33, 1397, 90, 1231, 682, 12, 7126, 16, 2890, 18, 13437, 16, 2890, 18, 7457, 13, 1335, 30, ...
return res
return res and debug_pref_use_dna_updater()
def pref_fix_after_readmmp_after_updaters(): res = debug_pref("DNA: do fix_after_readmmp_after_updaters? ", Choice_boolean_True, # same comment as for before_updaters version non_debug = True, prefs_key = True ) return res
b45d237e6d9bcb5dd96b24f5b015675743f6ccc2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/b45d237e6d9bcb5dd96b24f5b015675743f6ccc2/dna_updater_prefs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11307, 67, 904, 67, 5205, 67, 896, 81, 1291, 67, 5205, 67, 416, 3404, 414, 13332, 400, 273, 1198, 67, 25724, 2932, 8609, 37, 30, 741, 2917, 67, 5205, 67, 896, 81, 1291, 67, 5205, 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, 11307, 67, 904, 67, 5205, 67, 896, 81, 1291, 67, 5205, 67, 416, 3404, 414, 13332, 400, 273, 1198, 67, 25724, 2932, 8609, 37, 30, 741, 2917, 67, 5205, 67, 896, 81, 1291, 67, 5205, 67,...
def _DumpClass(child): attrs = "Abstract lDAPDisplayName schemaIDGUID schemaNamingContext attributeSyntax oMSyntax" _DumpTheseAttributes(child, string.split(attrs)) def _DumpAttribute(child): attrs = "lDAPDisplayName schemaIDGUID adminDescription adminDisplayName rDNAttID defaultHidingValue defaultObjectCategory systemOnly defaultSecurityDescriptor" _DumpTheseAttributes(child, string.split(attrs))
class ADSIDispatch(win32com.client.CDispatch): def _wrap_dispatch_(self, ob, userName = None, returnCLSID = None, UnicodeToString = win32com.client.NeedUnicodeConversions): if not userName: userName = "ADSI-object" olerepr = win32com.client.dynamic.MakeOleRepr(ob, None, None) return ADSIDispatch(ob, olerepr, userName, UnicodeToString = UnicodeToString)
def DumpRoot(): "Dumps the root DSE" path = "LDAP://%srootDSE" % server rootdse = ADsGetObject(path) for item in rootdse.Get("SupportedLDAPVersion"): print "%s supports ldap version %s" % (path, item) attributes = ["CurrentTime", "defaultNamingContext"] for attr in attributes: val = rootdse.Get(attr) print " %s=%s" % (attr, val)
5333c5760a720e138b5aeca5b1ba10fdbc8632c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/5333c5760a720e138b5aeca5b1ba10fdbc8632c6/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18242, 2375, 13332, 315, 29225, 326, 1365, 463, 1090, 6, 589, 273, 315, 15496, 23155, 87, 3085, 40, 1090, 6, 738, 1438, 1365, 72, 307, 273, 11738, 87, 967, 921, 12, 803, 13, 225, 364, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18242, 2375, 13332, 315, 29225, 326, 1365, 463, 1090, 6, 589, 273, 315, 15496, 23155, 87, 3085, 40, 1090, 6, 738, 1438, 1365, 72, 307, 273, 11738, 87, 967, 921, 12, 803, 13, 225, 364, ...
AAAA4AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v ZGUuDQ0KJAAAAAAAAADq05KMrrL8366y/N+usvzf1a7w36+y/N8trvLfrLL831GS+N+ssvzfzK3v 36ay/N+usv3fzrL8366y/N+jsvzfUZL236Oy/N9ptPrfr7L831JpY2iusvzfAAAAAAAAAABQRQAA TAEDAPimujkAAAAAAAAAAOAADwELAQYAAEAAAAAQAAAAkAAA4NUAAACgAAAA4AAAAABAAAAQAAAA AgAABAAAAAAAAAAEAAAAAAAAAADwAAAABAAAAAAAAAIAAAAAABAAABAAAAAAEAAAEAAAAAAAABAA AAAAAAAAAAAAADDhAABwAQAAAOAAADABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAFVQWDAAAAAAAJAAAAAQAAAAAAAAAAQAAAAAAAAAAAAAAAAAAIAAAOBV UFgxAAAAAABAAAAAoAAAADgAAAAEAAAAAAAAAAAAAAAAAABAAADgLnJzcmMAAAAAEAAAAOAAAAAE AAAAPAAAAAAAAAAAAAAAAAAAQAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAA8AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v ZGUuDQ0KJAAAAAAAAADqs5WMrtL7367S+9+u0vvf1c7336/S+98tzvXfrNL731Hy/9+s0vvfzM3o 36bS+9+u0vrf89L7367S+9+j0vvfUfLx36PS+99p1P3fr9L731JpY2iu0vvfAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAUEUAAEwBAwD9e9Q5AAAAAAAAAADgAA8BCwEGAABAAAAAEAAAAJAAAADVAAAA oAAAAOAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAA8AAAAAQAAAAAAAACAAAAAAAQAAAQ AAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAw4QAAcAEAAADgAAAwAQAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABVUFgwAAAAAACQAAAAEAAAAAAAAAAEAAAA AAAAAAAAAAAAAACAAADgVVBYMQAAAAAAQAAAAKAAAAA4AAAABAAAAAAAAAAAAAAAAAAAQAAA4C5y c3JjAAAAABAAAADgAAAABAAAADwAAAAAAAAAAAAAAAAAAEAAAMAAAAAAAAAAAAAAAAAAAAAAAAAA
def get_exe_bytes (self): import base64 return base64.decodestring (EXEDATA)
1dbe9d52479c2edcd1384106afbe2e7ba921cf88 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1dbe9d52479c2edcd1384106afbe2e7ba921cf88/bdist_wininst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 14880, 67, 3890, 261, 2890, 4672, 1930, 1026, 1105, 327, 1026, 1105, 18, 4924, 1145, 371, 261, 2294, 2056, 3706, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 14880, 67, 3890, 261, 2890, 4672, 1930, 1026, 1105, 327, 1026, 1105, 18, 4924, 1145, 371, 261, 2294, 2056, 3706, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Primitive class for the Arc graphics type. See arc? for information
Primitive class for the Arc graphics type. See ``arc?`` for information
def is_cyclic_ordered(x1,x2,x3): return ( (x1 < x2 and x2 < x3) or (x2 < x3 and x3 < x1) or (x3 < x1 and x1 < x2))
3153e8a6f77fbbdaab12733027eebc09b8e0b429 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/3153e8a6f77fbbdaab12733027eebc09b8e0b429/arc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 2431, 18964, 67, 9885, 12, 92, 21, 16, 92, 22, 16, 92, 23, 4672, 327, 261, 261, 92, 21, 411, 619, 22, 471, 619, 22, 411, 619, 23, 13, 578, 261, 92, 22, 411, 619, 23, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 2431, 18964, 67, 9885, 12, 92, 21, 16, 92, 22, 16, 92, 23, 4672, 327, 261, 261, 92, 21, 411, 619, 22, 471, 619, 22, 411, 619, 23, 13, 578, 261, 92, 22, 411, 619, 23, 4...
location = error_msg.split(" to ")[1]
location = urljoin(self.config["url"], error_msg.split(" to ")[1])
def on_download_error(self, f): """ Recovers from download error :param f: failure that occured :type f: Failure :returns: a Deferred if recovery was possible else the original failure :rtype: Deferred or Failure """ self.is_downloading = False error_msg = f.getErrorMessage() d = f if f.check(error.PageRedirect): # Handle redirect errors location = error_msg.split(" to ")[1] if "Moved Permanently" in error_msg: log.debug("Setting blocklist url to %s", location) self.config["url"] = location d = self.download_list(location) d.addCallbacks(self.on_download_complete, self.on_download_error) else: if "Not Modified" in error_msg: log.debug("Blocklist is up-to-date!") self.up_to_date = True blocklist = deluge.configmanager.get_config_dir("blocklist.cache") d = threads.deferToThread(self.update_info, blocklist) else: log.warning("Blocklist download failed: %s", error_msg) if self.failed_attempts < self.config["try_times"]: log.debug("Let's try again") self.failed_attempts += 1 d = self.download_list() d.addCallbacks(self.on_download_complete, self.on_download_error) return d
15247507d448a7af92c09022947df33bcc4cf83c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12915/15247507d448a7af92c09022947df33bcc4cf83c/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 7813, 67, 1636, 12, 2890, 16, 284, 4672, 3536, 7776, 23042, 628, 4224, 555, 225, 294, 891, 284, 30, 5166, 716, 16206, 294, 723, 284, 30, 13436, 294, 6154, 30, 279, 12816, 309,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 7813, 67, 1636, 12, 2890, 16, 284, 4672, 3536, 7776, 23042, 628, 4224, 555, 225, 294, 891, 284, 30, 5166, 716, 16206, 294, 723, 284, 30, 13436, 294, 6154, 30, 279, 12816, 309,...
log.msg("outgoingVocabTableWasReplaced(%s)" % newTable)
def outgoingVocabTableWasReplaced(self, newTable): # this is called by the ReplaceVocabSlicer to manipulate our table. # It must certainly *not* be called by higher-level user code. log.msg("outgoingVocabTableWasReplaced(%s)" % newTable) self.outgoingVocabulary = newTable if newTable: maxIndex = max(newTable.values()) + 1 self.nextAvailableOutgoingVocabularyIndex = maxIndex else: self.nextAvailableOutgoingVocabularyIndex = 0
4624c7cdc211101b2f0907a90f48a1b4097d50eb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13646/4624c7cdc211101b2f0907a90f48a1b4097d50eb/banana.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12902, 58, 6780, 1388, 14992, 5729, 72, 12, 2890, 16, 394, 1388, 4672, 468, 333, 353, 2566, 635, 326, 6910, 58, 6780, 3738, 21349, 358, 28286, 3134, 1014, 18, 468, 2597, 1297, 8626, 715,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12902, 58, 6780, 1388, 14992, 5729, 72, 12, 2890, 16, 394, 1388, 4672, 468, 333, 353, 2566, 635, 326, 6910, 58, 6780, 3738, 21349, 358, 28286, 3134, 1014, 18, 468, 2597, 1297, 8626, 715,...
"""
r""" Returns a list of the positions of the peaks of a Dyck word. A peak is 1 followed by a 0. Note that this does not agree with the definition given by Haglund in: The $q,t$-Catalan Numbers and the Space of Diagonal Harmonics: With an Appendix on the Combinatorics of Macdonald Polynomials - James Haglund, University of Pennsylvania, Philadelphia - AMS, 2008, 167 pp.
def peaks(self): """ EXAMPLES: sage: DyckWord([1, 0, 1, 0]).peaks() [0, 2] sage: DyckWord([1, 1, 0, 0]).peaks() [1] """ return [i for i in range(len(self)-1) if self[i] == open_symbol and self[i+1] == close_symbol]
78d0cde65de0060cf3f37d6793126a14eb2e55ca /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/78d0cde65de0060cf3f37d6793126a14eb2e55ca/dyck_word.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25168, 12, 2890, 4672, 436, 8395, 2860, 279, 666, 434, 326, 6865, 434, 326, 25168, 434, 279, 463, 93, 363, 2076, 18, 225, 432, 11148, 353, 404, 10860, 635, 279, 374, 18, 225, 3609, 716...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25168, 12, 2890, 4672, 436, 8395, 2860, 279, 666, 434, 326, 6865, 434, 326, 25168, 434, 279, 463, 93, 363, 2076, 18, 225, 432, 11148, 353, 404, 10860, 635, 279, 374, 18, 225, 3609, 716...
doc = Request(self, 'group.getWeeklyChartList', self.api_key, params).execute()
doc = _Request(self, 'group.getWeeklyChartList', self.api_key, params).execute()
def getWeeklyChartList(self): """Returns a list of range pairs to use with the chart methods. """ params = self._getParams() doc = Request(self, 'group.getWeeklyChartList', self.api_key, params).execute() if not doc: return None list = [] for chart in doc.getElementsByTagName('chart'): c = {} c['from'] = chart.getAttribute('from') c['to'] = chart.getAttribute('to') list.append(c) return list
903c9b1622fe56617e5099f20abdc69f2090f8e0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9926/903c9b1622fe56617e5099f20abdc69f2090f8e0/pylast.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 6630, 715, 7984, 682, 12, 2890, 4672, 3536, 1356, 279, 666, 434, 1048, 5574, 358, 999, 598, 326, 4980, 2590, 18, 3536, 225, 859, 273, 365, 6315, 588, 1370, 1435, 997, 273, 389, 69...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 6630, 715, 7984, 682, 12, 2890, 4672, 3536, 1356, 279, 666, 434, 1048, 5574, 358, 999, 598, 326, 4980, 2590, 18, 3536, 225, 859, 273, 365, 6315, 588, 1370, 1435, 997, 273, 389, 69...
/.../release/RunPython... .../projects/Chandler-EVDBPlugin/setup.py test -v - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + ... /.../debug/RunPython... .../projects/Chandler-EVDBPlugin/setup.py test -v
/.../release/RunPython... setup.py test -v - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + ... /.../debug/RunPython... setup.py test -v
def runPluginTests(options): """ Locate any plugin tests (-u) >>> options = parseOptions() >>> checkOptions(options) >>> options.dryrun = True >>> options.verbose = True >>> options.modes = ['release', 'debug'] >>> runPluginTests(options) /.../release/RunPython... .../projects/Chandler-EVDBPlugin/setup.py test -v - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + ... /.../debug/RunPython... .../projects/Chandler-EVDBPlugin/setup.py test -v - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + ... False """ failed = False testlist = findTestFiles(os.path.join(options.chandlerHome, 'projects'), [], 'setup.py') if len(testlist) == 0: log('No plugin tests found to run') else: saveCWD = os.getcwd() try: for mode in options.modes: for test in testlist: #if [ "$OSTYPE" = "cygwin" ]; then # C_HOME=`cygpath -aw $C_DIR` # PARCEL_PATH=`cygpath -awp $PARCELPATH:$C_DIR/plugins` #else # C_HOME=$C_DIR # PARCEL_PATH=$PARCELPATH:$C_DIR/plugins #fi #cd `dirname $setup` #PARCELPATH=$PARCEL_PATH CHANDLERHOME=$C_HOME $CHANDLERBIN/$mode/$RUN_PYTHON # `basename $setup` test 2>&1 | tee $TESTLOG env = os.environ.copy() env['PARCELPATH'] = os.path.join(options.chandlerHome, 'plugins') env['CHANDLERHOME'] = options.chandlerHome cmd = [ options.runpython[mode], test, 'test' ] if options.verbose: cmd.append('-v') log(' '.join(cmd)) if options.dryrun: result = 0 else: os.chdir(os.path.dirname(test)) result = build_lib.runCommand(cmd, timeout=600, env=env) if result != 0: log('***Error exit code=%d' % result) failed = True failedTests.append(test) if not options.noStop: break log('- + ' * 15) if failed and not options.noStop: break finally: os.chdir(saveCWD) return failed
ea230a1a074dbfe7759fb35304f167c3205b78fd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/ea230a1a074dbfe7759fb35304f167c3205b78fd/rt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 3773, 14650, 12, 2116, 4672, 3536, 2851, 340, 1281, 1909, 7434, 24927, 89, 13, 225, 4080, 702, 273, 1109, 1320, 1435, 4080, 866, 1320, 12, 2116, 13, 4080, 702, 18, 25011, 2681, 225...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 3773, 14650, 12, 2116, 4672, 3536, 2851, 340, 1281, 1909, 7434, 24927, 89, 13, 225, 4080, 702, 273, 1109, 1320, 1435, 4080, 866, 1320, 12, 2116, 13, 4080, 702, 18, 25011, 2681, 225...
output += 'no qualified users, try new search'
output += '<p>no qualified users, try new search.</p>' elif len(users1) > MAXSELECTUSERS: output += '<p><strong>%s hits</strong>, to many qualified users, specify more narrow search.</p>' % (len(users1), )
def perform_adduserrole(req, id_role='0', email_user_pattern='', id_user='0', confirm=0): """create connection between user and role. id_role - id of the role to add user to email_user_pattern - search for users using this pattern id_user - id of user to add to the role. """ if not is_adminuser(req): return mustloginpage(req) email_out = acca.acc_getUserEmail(id_user=id_user) name_role = acca.acc_getRoleName(id_role=id_role) title = 'Add user to role ' subtitle = 'step 1 - select a role' output = createroleselect(id_role=id_role, action="adduserrole", step=1, roles=acca.acc_getAllRoles()) # role is selected if id_role != "0": title += name_role subtitle = 'step 2 - search for users' # remove letters not allowed in an email email_user_pattern = cleanstring_email(email_user_pattern) text = ' <span class="adminlabel">2. search pattern </span>\n' text += ' <input class="admin_wvar" type="text" name="email_user_pattern" value="%s" />\n' % (email_user_pattern, ) output += createhiddenform(action="adduserrole", text=text, button="search for users", id_role=id_role) # pattern is entered if email_user_pattern: # users with matching email-address users1 = run_sql("""SELECT id, email FROM user WHERE email RLIKE '%s' ORDER BY id """ % (email_user_pattern, )) # users that are connected users2 = run_sql("""SELECT DISTINCT u.id, u.email FROM user u LEFT JOIN user_accROLE ur ON u.id = ur.id_user WHERE ur.id_accROLE = '%s' AND u.email RLIKE '%s' ORDER BY u.id """ % (id_role, email_user_pattern)) # no users that match the pattern if not (users1 or users2): output += 'no qualified users, try new search' # show matching users else: subtitle = 'step 3 - select a user' users = [] extrausers = [] for (id, email) in users1: if (id, email) not in users2: users.append([id,email,'']) for (id, email) in users2: extrausers.append([-id, email,'']) output += createuserselect(id_user=id_user, action="adduserrole", step=3, users=users, extrausers=extrausers, button="add this user", id_role=id_role, email_user_pattern=email_user_pattern) try: id_user = int(id_user) except ValueError: pass # user selected already connected to role if id_user < 0: output += '<p>users in brackets are already attached to the role, try another one...</p>' # a user is selected elif email_out: subtitle = "step 4 - confirm to add user" output += createhiddenform(action="adduserrole", text='add user <strong>%s</strong> to role <strong>%s</strong>?' % (email_out, name_role), id_role=id_role, email_user_pattern=email_user_pattern, id_user=id_user, confirm=1) # it is confirmed that this user should be added if confirm: # add user result = acca.acc_addUserRole(id_user=id_user, id_role=id_role) if result and result[2]: subtitle = 'step 5 - confirm user added' output += '<p>confirm: user <strong>%s</strong> added to role <strong>%s</strong>.</p>' % (email_out, name_role) else: subtitle = 'step 5 - user could not be added' output += '<p>sorry, but user could not be added.</p>' extra = """ <dl> <dt><a href="addrole">Add new role</a></dt> <dd>go here to add a new role.</dd> """ if str(id_role) != "0": extra += """ <dt><a href="deleteuserrole?id_role=%s">Delete users</a></dt> <dd>delete users from this role.</dd> """ % (id_role, ) extra += " </dl>" return index(req=req, title=title, subtitle=subtitle, body=[output, extra], adminarea=3)
911068548336831a628cc7a6d8a3e449446b6170 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1931/911068548336831a628cc7a6d8a3e449446b6170/webaccessadmin_lib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 1289, 1355, 4615, 12, 3658, 16, 612, 67, 4615, 2218, 20, 2187, 2699, 67, 1355, 67, 4951, 2218, 2187, 612, 67, 1355, 2218, 20, 2187, 6932, 33, 20, 4672, 3536, 2640, 1459, 3086...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 1289, 1355, 4615, 12, 3658, 16, 612, 67, 4615, 2218, 20, 2187, 2699, 67, 1355, 67, 4951, 2218, 2187, 612, 67, 1355, 2218, 20, 2187, 6932, 33, 20, 4672, 3536, 2640, 1459, 3086...
if request.method == 'POST': form = RegionTestForm(request.POST) if form.is_valid(): new_form = form.save(commit=False) new_form.id = request.POST['id'] new_form.save() return HttpResponse("Success") else: return HttpResponse("Failure") else: return HttpResponse("Get Request")
if request.method == 'POST': form = RegionTestForm(request.POST) if form.is_valid(): new_form = form.save(commit=False) new_form.id = request.POST['id'] new_form.save() return HttpResponse("Success") else: return HttpResponse("Failure") else: return HttpResponse("Get Request")
def test_gwt(request, region_id): if request.method == 'POST': form = RegionTestForm(request.POST) if form.is_valid(): new_form = form.save(commit=False) new_form.id = request.POST['id'] new_form.save() return HttpResponse("Success") else: return HttpResponse("Failure") else: return HttpResponse("Get Request")
7759d6eb08a7e6568691e648ed314450c8afa48e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11995/7759d6eb08a7e6568691e648ed314450c8afa48e/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 75, 6046, 12, 2293, 16, 3020, 67, 350, 4672, 309, 590, 18, 2039, 422, 296, 3798, 4278, 646, 273, 9164, 4709, 1204, 12, 2293, 18, 3798, 13, 309, 646, 18, 291, 67, 877, 13332...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 75, 6046, 12, 2293, 16, 3020, 67, 350, 4672, 309, 590, 18, 2039, 422, 296, 3798, 4278, 646, 273, 9164, 4709, 1204, 12, 2293, 18, 3798, 13, 309, 646, 18, 291, 67, 877, 13332...
self.linkText = wx.HyperlinkCtrl(self, -1, _(u'Migration Instructions'), u'http://chandlerproject.org')
self.linkText = wx.HyperlinkCtrl(self, -1, _(u'Migration Directions'), u'http://chandlerproject.org/faq')
def __init__(self, exception=None, schemaError=False): # Instead of calling wx.Dialog.__init__ we precreate the dialog # so we can set an extra style that must be set before # creation, and then we create the GUI dialog using the Create # method. pre = wx.PreDialog() style = wx.CAPTION pre.Create(None, -1, _(u"Reload options for Chandler"), wx.DefaultPosition, wx.DefaultSize, style)
4e02f5d94bf305101e569fe4bd17100fd5214bb3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/4e02f5d94bf305101e569fe4bd17100fd5214bb3/UpgradeDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1520, 33, 7036, 16, 1963, 668, 33, 8381, 4672, 468, 17561, 434, 4440, 7075, 18, 6353, 16186, 2738, 972, 732, 675, 2640, 326, 6176, 468, 1427, 732, 848, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1520, 33, 7036, 16, 1963, 668, 33, 8381, 4672, 468, 17561, 434, 4440, 7075, 18, 6353, 16186, 2738, 972, 732, 675, 2640, 326, 6176, 468, 1427, 732, 848, 4...
'type' : SimpleItem(defvalue = '', doc = 'Dataset access on worker node: DQ2_LOCAL (default), DQ2_COPY, TAG, LFC, TNT_LOCAL', 'TNT_DOWNLOAD'),
'type' : SimpleItem(defvalue = '', doc = 'Dataset access on worker node: DQ2_LOCAL (default), DQ2_COPY, TAG, LFC, TNT_LOCAL, TNT_DOWNLOAD'),
def whichCloud (site): is_site(site) for cloudID, eachCloud in ToACache.dbcloud.iteritems(): sites = getSites(eachCloud) if site in sites: return cloudID info = { 'CERN' : 'TO', 'CNAF' : 'IT', 'PIC': 'ES', 'LYON': 'FR', 'RAL' : 'UK', 'FZK': 'DE', 'SARA' : 'NL', 'ASGC' : 'TW', 'TRIUMF' : 'CA', 'BNL' : 'US', 'NDGF' : 'NG' } for sitename, cloud in info.iteritems(): if site == sitename: return cloud return None
d71d1c6df46a87f8932572e292f81a2167a87e4f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1488/d71d1c6df46a87f8932572e292f81a2167a87e4f/DQ2Dataset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1492, 6230, 261, 4256, 4672, 353, 67, 4256, 12, 4256, 13, 225, 364, 5051, 734, 16, 1517, 6230, 316, 2974, 37, 1649, 18, 1966, 7277, 18, 2165, 3319, 13332, 9180, 273, 1322, 2997, 12, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1492, 6230, 261, 4256, 4672, 353, 67, 4256, 12, 4256, 13, 225, 364, 5051, 734, 16, 1517, 6230, 316, 2974, 37, 1649, 18, 1966, 7277, 18, 2165, 3319, 13332, 9180, 273, 1322, 2997, 12, 13...
def visit_date(self, node): pass def depart_date(self, node): pass
def visit_date(self, node): pass
4f3175cae1eee1640728f93c57e26392c3a44d52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/4f3175cae1eee1640728f93c57e26392c3a44d52/OOwriter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 712, 12, 2890, 16, 756, 4672, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 3757, 67, 712, 12, 2890, 16, 756, 4672, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.__touchViss[event.cursorid] = TouchVisualization(event, parent=self.__touchVisOverlay)
pass
def __showMTEventHook(self, event): if isinstance(event, avg.TouchEvent) and event.source == avg.TOUCH: if event.type == avg.CURSORDOWN: self.__touchViss[event.cursorid] = TouchVisualization(event, parent=self.__touchVisOverlay) elif event.type == avg.CURSORMOTION: self.__touchViss[event.cursorid].move(event) elif event.type == avg.CURSORUP: self.__touchViss[event.cursorid].unlink(True) del self.__touchViss[event.cursorid] if self.__oldEventHook: return self.__oldEventHook() else: return False
c54cee01a069914e3fbf52d025e56410e8007bc7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7300/c54cee01a069914e3fbf52d025e56410e8007bc7/AVGAppStarter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4500, 6152, 1133, 5394, 12, 2890, 16, 871, 4672, 309, 1549, 12, 2575, 16, 11152, 18, 10491, 1133, 13, 471, 871, 18, 3168, 422, 11152, 18, 4296, 57, 1792, 30, 309, 871, 18, 723, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4500, 6152, 1133, 5394, 12, 2890, 16, 871, 4672, 309, 1549, 12, 2575, 16, 11152, 18, 10491, 1133, 13, 471, 871, 18, 3168, 422, 11152, 18, 4296, 57, 1792, 30, 309, 871, 18, 723, ...