rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
class EOF(EMR_UNKNOWN):
class _EOF(_EMR_UNKNOWN):
def __init__(self): EMR_UNKNOWN.__init__(self)
688318604ffe18a54bb261a3bde4bf6e1784a8de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8136/688318604ffe18a54bb261a3bde4bf6e1784a8de/pyemf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 7141, 54, 67, 14737, 16186, 2738, 972, 12, 2890, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 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, 1001, 2738, 972, 12, 2890, 4672, 7141, 54, 67, 14737, 16186, 2738, 972, 12, 2890, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Player.getElementByID("img1").releaseEventCapture()
Player.getElementByID("img1").releaseEventCapture(-1)
def noCaptureEvent(): global captureMouseDownCalled Helper = Player.getTestHelper() captureMouseDownCalled = False mainCaptureMouseDownCalled = False Player.getElementByID("img1").releaseEventCapture() Helper.fakeMouseEvent(avg.MOUSEBUTTONDOWN, True, False, False, 100, 10, 1)
47c987e33835684de6c8a1ea30a6d3172c370e5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7300/47c987e33835684de6c8a1ea30a6d3172c370e5f/Test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1158, 12372, 1133, 13332, 2552, 7477, 9186, 4164, 8185, 9705, 273, 19185, 18, 588, 4709, 2276, 1435, 7477, 9186, 4164, 8185, 273, 1083, 2774, 12372, 9186, 4164, 8185, 273, 1083, 19185, 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, 1158, 12372, 1133, 13332, 2552, 7477, 9186, 4164, 8185, 9705, 273, 19185, 18, 588, 4709, 2276, 1435, 7477, 9186, 4164, 8185, 273, 1083, 2774, 12372, 9186, 4164, 8185, 273, 1083, 19185, 18, ...
'complete_files_replicas' : SimpleItem(defvalue=None,protected=1,copyable=0,transient=1,hidden=1,doc='The hidden cache of the info of the file replicas of the complete datasets'),
'complete_files_replicas' : SimpleItem(defvalue={},protected=1,copyable=0,transient=1,hidden=1,doc='The hidden cache of the info of the file replicas of the complete datasets'),
def worker(id): dq2 = DQ2() while not wq.empty(): try: site = wq.get(block=True, timeout=1) logger.debug('resolving dataset files at %s' % site) replicaInfo = dq2.listFileReplicas(site, dataset) if replicaInfo: mylock.acquire() for guid in replicaInfo[0]['content']: if not replicas.has_key(guid): replicas[guid] = [] replicas[guid].append(site) mylock.release() except Empty: pass except DQException, err: logger.warning(str(err)) logger.warning('site %s excluded' % site) pass
0b9070738befa288e612f93b4f51423cf5e83189 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1488/0b9070738befa288e612f93b4f51423cf5e83189/StagerDataset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4322, 12, 350, 4672, 20803, 22, 273, 463, 53, 22, 1435, 1323, 486, 341, 85, 18, 5531, 13332, 775, 30, 2834, 273, 341, 85, 18, 588, 12, 2629, 33, 5510, 16, 2021, 33, 21, 13, 1194, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4322, 12, 350, 4672, 20803, 22, 273, 463, 53, 22, 1435, 1323, 486, 341, 85, 18, 5531, 13332, 775, 30, 2834, 273, 341, 85, 18, 588, 12, 2629, 33, 5510, 16, 2021, 33, 21, 13, 1194, 1...
el1 = etree.SubElement(self.automatic_styles, 'style:style', attrib={
el1 = SubElement(self.automatic_styles, 'style:style', attrib={
def visit_table(self, node): #self.trace_visit_node(node) #ipshell('At visit_table') self.table_count += 1 table_name = '%s%d' % (TableStylePrefix, self.table_count, ) el1 = etree.SubElement(self.automatic_styles, 'style:style', attrib={ 'style:name': '%s' % table_name, 'style:family': 'table', }) el1_1 = etree.SubElement(el1, 'style:table-properties', attrib={ #'style:width': '17.59cm', 'table:align': 'margins', }) # We use a single cell style for all cells in this table. # That's probably not correct, but seems to work. el2 = etree.SubElement(self.automatic_styles, 'style:style', attrib={ 'style:name': '%s.A1' % table_name, 'style:family': 'table-cell', }) line_style1 = '0.%03dcm solid #000000' % self.settings.table_border_thickness el2_1 = etree.SubElement(el2, 'style:table-cell-properties', attrib={ 'fo:padding': '0.049cm', 'fo:border-left': line_style1, 'fo:border-right': line_style1, 'fo:border-top': line_style1, 'fo:border-bottom': line_style1, }) el3 = etree.SubElement(self.current_element, 'table:table', attrib={ 'table:name': '%s' % table_name, 'table:style-name': '%s' % table_name, }) self.set_current_element(el3) self.current_table_style = el1 self.table_width = 0
277ba1af817dc725b8179dbbf649a815fdff5939 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/277ba1af817dc725b8179dbbf649a815fdff5939/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 2121, 12, 2890, 16, 756, 4672, 468, 2890, 18, 5129, 67, 11658, 67, 2159, 12, 2159, 13, 468, 625, 10304, 2668, 861, 3757, 67, 2121, 6134, 365, 18, 2121, 67, 1883, 1011, 404, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 2121, 12, 2890, 16, 756, 4672, 468, 2890, 18, 5129, 67, 11658, 67, 2159, 12, 2159, 13, 468, 625, 10304, 2668, 861, 3757, 67, 2121, 6134, 365, 18, 2121, 67, 1883, 1011, 404, ...
promisc = 0
promisc = "not implemented" sniff_promisc = 0 filter = "not implemented"
def reset(self): self.__dict__ = {}
ea674572065aeef03a6af7f9dcde6c13656862d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/ea674572065aeef03a6af7f9dcde6c13656862d2/scapy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 12, 2890, 4672, 365, 16186, 1576, 972, 273, 2618, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 2715, 12, 2890, 4672, 365, 16186, 1576, 972, 273, 2618, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
mval = ((int(self.Amount) - 1) / 3.0) * 2.0 + 1.0
if self.Effect == 'Hits': mval = int(self.Amount) / 4.0 else: mval = ((int(self.Amount) - 1) / 3.0) * 2.0 + 1.0
def gemUtility(self,skilltable={}): mval = 0.0 if self.Amount == '0' or self.Amount == '': pass elif self.Type == 'Stat': mval = ((int(self.Amount) - 1) / 3.0) * 2.0 + 1.0 elif self.Type == 'Resist' or self.Type == 'Power': mval = (int(self.Amount) - 1) * 2.0 if int(self.Amount) == 1: mval = 1.0 elif self.Type == 'Skill': mval = (int(self.Amount) - 1) * 5.0 if int(self.Amount) == 1: mval = 1.0 #if self.Effect == 'All Magic Skills': # for e in skilltable[effect]: # mval += amount * 5 elif self.Type == 'Focus': mval = 1.0 elif self.Type == 'Hits': return int(self.Amount) / 4.0 return mval
4d0eb471fff1a6e1fd1024ef90c7f282698052c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6671/4d0eb471fff1a6e1fd1024ef90c7f282698052c8/Item.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17474, 6497, 12, 2890, 16, 7771, 737, 2121, 12938, 4672, 312, 1125, 273, 374, 18, 20, 309, 365, 18, 6275, 422, 296, 20, 11, 578, 365, 18, 6275, 422, 875, 30, 1342, 1327, 365, 18, 559...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17474, 6497, 12, 2890, 16, 7771, 737, 2121, 12938, 4672, 312, 1125, 273, 374, 18, 20, 309, 365, 18, 6275, 422, 296, 20, 11, 578, 365, 18, 6275, 422, 875, 30, 1342, 1327, 365, 18, 559...
print 'Button command:' print disassemble.disassemble(buttonCmd)
def playButtonCmd(self, cellCommands, buttonCmd): """Play the specified button command.
04db36d9accb2f4ce2854e3c230476becb048687 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5222/04db36d9accb2f4ce2854e3c230476becb048687/machine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6599, 3616, 5931, 12, 2890, 16, 2484, 9127, 16, 3568, 5931, 4672, 3536, 11765, 326, 1269, 3568, 1296, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6599, 3616, 5931, 12, 2890, 16, 2484, 9127, 16, 3568, 5931, 4672, 3536, 11765, 326, 1269, 3568, 1296, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
wm_activate(None)
print '* reloading window manager...' start_wm()
def mousePressEvent(self, e): if e.button() == Qt.RightButton: id = contextMenu.exec_loop(e.globalPos()) if id == menuSettings: Popen(['ccsm']) elif id == menuEmerald: etm_menu_activate(None) elif id == menuReload: wm_activate(None)
ab81baed0421f5904d68ea4e5a79652b14c09cb7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/909/ab81baed0421f5904d68ea4e5a79652b14c09cb7/interface_qt3.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7644, 11840, 1133, 12, 2890, 16, 425, 4672, 309, 425, 18, 5391, 1435, 422, 7354, 18, 4726, 3616, 30, 612, 273, 819, 4599, 18, 4177, 67, 6498, 12, 73, 18, 6347, 1616, 10756, 309, 612, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7644, 11840, 1133, 12, 2890, 16, 425, 4672, 309, 425, 18, 5391, 1435, 422, 7354, 18, 4726, 3616, 30, 612, 273, 819, 4599, 18, 4177, 67, 6498, 12, 73, 18, 6347, 1616, 10756, 309, 612, ...
print result
log(result)
def run(self): """ <Purpose> The thread function that actually pings the machines
cafb94406cce24637e70cedf2c6152f49f60d24b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7274/cafb94406cce24637e70cedf2c6152f49f60d24b/ping_machines.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 3536, 411, 10262, 4150, 34, 1021, 2650, 445, 716, 6013, 293, 899, 326, 15942, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 3536, 411, 10262, 4150, 34, 1021, 2650, 445, 716, 6013, 293, 899, 326, 15942, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
output("WARNING: Hashname does not exist: %s" % self)
output("WARNING: Hashname does not exist: %s" % self.linkname())
def get(self, read_only = False): """The wiki-text of the page. This will retrieve the page if it has not been retrieved yet. This can raise the following exceptions that should be caught by the calling code:
7a6acda38a8b64d9bcf9cb65718efcbb5ae755da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/7a6acda38a8b64d9bcf9cb65718efcbb5ae755da/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 855, 67, 3700, 273, 1083, 4672, 3536, 1986, 9050, 17, 955, 434, 326, 1363, 18, 1220, 903, 4614, 326, 1363, 309, 518, 711, 486, 2118, 10295, 4671, 18, 1220, 848, 1002...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 855, 67, 3700, 273, 1083, 4672, 3536, 1986, 9050, 17, 955, 434, 326, 1363, 18, 1220, 903, 4614, 326, 1363, 309, 518, 711, 486, 2118, 10295, 4671, 18, 1220, 848, 1002...
pass
if params: target = params[0] else: target = self.nickname
def irc_WHOIS(self, prefix, params): """Whois query
e2c8b60bc2ec68b14c450480fe935d0baded2950 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e2c8b60bc2ec68b14c450480fe935d0baded2950/ircservice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 277, 1310, 67, 59, 7995, 5127, 12, 2890, 16, 1633, 16, 859, 4672, 3536, 2888, 19606, 843, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 277, 1310, 67, 59, 7995, 5127, 12, 2890, 16, 1633, 16, 859, 4672, 3536, 2888, 19606, 843, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if not wsc.check_user(uid):
if not wsc.check_user(uid, 'cfgwebsearch'):
def showoutputformats(req, colID, ln=cdslang, callback='yes', confirm=0): navtrail_previous_links = wsc.getnavtrail() + """&gt; <a class=navtrail href="%s/admin/websearch/websearchadmin.py/">Edit Collection Tree</a> """ % (weburl) try: uid = getUid(req) except MySQLdb.Error, e: return error_page(req) if not wsc.check_user(uid): return page(title="Edit Collection", body=wsc.perform_showoutputformats(colID=colID, ln=ln, callback=callback, confirm=confirm), uid=uid, language=ln, urlargs=req.args, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return auth_failed(uid, navtrail_previous_links)
ae002ee61a4180bf03cd4efb374fb3c6baac2e69 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/ae002ee61a4180bf03cd4efb374fb3c6baac2e69/websearchadmin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 2844, 11962, 12, 3658, 16, 645, 734, 16, 7211, 33, 4315, 2069, 539, 16, 1348, 2218, 9707, 2187, 6932, 33, 20, 4672, 8775, 15565, 67, 11515, 67, 7135, 273, 341, 1017, 18, 588, 115...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2844, 11962, 12, 3658, 16, 645, 734, 16, 7211, 33, 4315, 2069, 539, 16, 1348, 2218, 9707, 2187, 6932, 33, 20, 4672, 8775, 15565, 67, 11515, 67, 7135, 273, 341, 1017, 18, 588, 115...
i += 5
i += 6
def __idx_steps_convert(self,steps): """ Convert the list of step definitions to internal form """ ret = [] all = '' i = 2 stlen = len(steps) while i+5 <= stlen: x = steps[i:i+5] if not x[0]: break label = self.__step2label(x) html = self.__step2html(x) ret.append( [label,html] + list(x) ) all += ",%s" % label i += 5 all = all[1:] # remove first ',' for x in steps[i:]: if x: return S_ERROR('Skipped steps are not supported') while len(ret) < 7: ret.append(['','']) return S_OK([all,ret])
5b48fe35751e4cabb1a7b57fd2a6301d137aaba5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12767/5b48fe35751e4cabb1a7b57fd2a6301d137aaba5/ProductionRequest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3465, 67, 8986, 67, 6283, 12, 2890, 16, 8986, 4672, 3536, 4037, 326, 666, 434, 2235, 6377, 358, 2713, 646, 3536, 325, 273, 5378, 777, 273, 875, 277, 273, 576, 384, 1897, 273, 562...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3465, 67, 8986, 67, 6283, 12, 2890, 16, 8986, 4672, 3536, 4037, 326, 666, 434, 2235, 6377, 358, 2713, 646, 3536, 325, 273, 5378, 777, 273, 875, 277, 273, 576, 384, 1897, 273, 562...
for elem in xpath(ncx, '//*[@playOrder and ./ncx:content[@src]]'): href = selector(elem)[0] order = playorder.get(href, 0)
for i, elem in enumerate(xpath(ncx, '//*[@playOrder and ./ncx:content[@src]]')): href = urlnormalize(selector(elem)[0]) order = playorder.get(href, i)
def _update_playorder(self, ncx): hrefs = set(xpath(ncx, '//ncx:content/@src')) playorder = {} next = 1 selector = XPath('h:body//*[@id or @name]') for item in self.spine: base = item.href if base in hrefs: playorder[base] = next next += 1 for elem in selector(item.data): added = False for attr in ('id', 'name'): id = elem.get(attr) if not id: continue href = '#'.join([base, id]) if href in hrefs: playorder[href] = next added = True if added: next += 1 selector = XPath('ncx:content/@src') for elem in xpath(ncx, '//*[@playOrder and ./ncx:content[@src]]'): href = selector(elem)[0] order = playorder.get(href, 0) elem.attrib['playOrder'] = str(order) return
925b3ea1fcdf76b98b9048f09c8d5333f85deead /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/925b3ea1fcdf76b98b9048f09c8d5333f85deead/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 67, 1601, 1019, 12, 2890, 16, 8194, 92, 4672, 3897, 87, 273, 444, 12, 18644, 12, 14202, 92, 16, 12084, 14202, 92, 30, 1745, 19, 36, 4816, 26112, 6599, 1019, 273, 2618, 1024,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 67, 1601, 1019, 12, 2890, 16, 8194, 92, 4672, 3897, 87, 273, 444, 12, 18644, 12, 14202, 92, 16, 12084, 14202, 92, 30, 1745, 19, 36, 4816, 26112, 6599, 1019, 273, 2618, 1024,...
else: wavelen = self.wavelen fnu = self.fnu
wavelen = self.wavelen fnu = self.fnu else: wavelen = wavelen fnu = fnu
def calcFlux(self, bandpass, wavelen=None, fnu=None): """Calculate the F_b (integrated flux of an object, above the atmosphere), using phi. Passed wavelen/fnu arrays will be unchanged, but if uses self will check if fnu is set. Calculating the AB mag requires the wavelen/fnu pair to be on the same grid as bandpass; (temporary values of these are used)""" use_self = self.checkUseSelf(wavelen, fnu) if use_self: # Calculate fnu if required. if self.fnu == None: self.flambdaTofnu() else: wavelen = self.wavelen fnu = self.fnu # Go on with magnitude calculation. # Check bandpass and wavelen/fnu are on the same grid. if self.needResample(wavelen=wavelen, wavelen_match=bandpass.wavelen): # Here - not on the same grid so resample to match wavelen/fnu to bandpass. # Note that resampleSED allocates new memory for wavelen/fnu return values. wavelen, fnu = self.resampleSED(wavelen, fnu, wavelen_match=bandpass.wavelen) # Calculate bandpass phi value if required. if bandpass.phi == None: bandpass.sbTophi() # Calculate flux in bandpass and return this value. dlambda = wavelen[1] - wavelen[0] flux = (fnu*bandpass.phi).sum() * dlambda return flux
dfa6a134dca8ca8c27f8bf21f7aedeee70736b54 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/91/dfa6a134dca8ca8c27f8bf21f7aedeee70736b54/Sed.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 2340, 2616, 12, 2890, 16, 8937, 5466, 16, 341, 7882, 275, 33, 7036, 16, 2295, 89, 33, 7036, 4672, 3536, 8695, 326, 478, 67, 70, 261, 27423, 690, 11772, 434, 392, 733, 16, 5721, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2340, 2616, 12, 2890, 16, 8937, 5466, 16, 341, 7882, 275, 33, 7036, 16, 2295, 89, 33, 7036, 4672, 3536, 8695, 326, 478, 67, 70, 261, 27423, 690, 11772, 434, 392, 733, 16, 5721, ...
return "win32com/" + self.name
return "win32comext/" + self.name
def get_pywin32_dir(self): return "win32com/" + self.name
6bdda3ba83a5f691e3af1da556fd0e9b2bc1a7e2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/6bdda3ba83a5f691e3af1da556fd0e9b2bc1a7e2/setup_win32all_core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2074, 8082, 1578, 67, 1214, 12, 2890, 4672, 327, 315, 8082, 1578, 832, 4898, 397, 365, 18, 529, 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, 336, 67, 2074, 8082, 1578, 67, 1214, 12, 2890, 4672, 327, 315, 8082, 1578, 832, 4898, 397, 365, 18, 529, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
msg = "Fetched event %i of %i (event_id: %s, user: %s)" % \
msg = "Fetched event %i of %i (event_id: %s, account: %s, user: %s)"%\
def getEventFromSeishub(self, resource_name): #document = xml.xpath(".//document_id") #document_id = document[self.seishubEventCurrent].text # Hack to show xml resource as document id resource_url = self.server['BaseUrl'] + "/xml/seismology/event/" + \ resource_name resource_req = urllib2.Request(resource_url) auth = base64.encodestring('%s:%s' % ("obspyck", "obspyck"))[:-1] resource_req.add_header("Authorization", "Basic %s" % auth) fp = urllib2.urlopen(resource_req) resource_xml = parse(fp) fp.close() if resource_xml.xpath(u".//event_type/user"): user = resource_xml.xpath(u".//event_type/user")[0].text else: user = None
f1b07e9850f312d642204d84482875b77beec5ed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10346/f1b07e9850f312d642204d84482875b77beec5ed/obspyck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9832, 1265, 1761, 1468, 373, 12, 2890, 16, 1058, 67, 529, 4672, 468, 5457, 273, 2025, 18, 18644, 2932, 18, 759, 5457, 67, 350, 7923, 468, 5457, 67, 350, 273, 1668, 63, 2890, 18, 307, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9832, 1265, 1761, 1468, 373, 12, 2890, 16, 1058, 67, 529, 4672, 468, 5457, 273, 2025, 18, 18644, 2932, 18, 759, 5457, 67, 350, 7923, 468, 5457, 67, 350, 273, 1668, 63, 2890, 18, 307, ...
pending = unicode(ORDER_STATUS[1][1])
pending = unicode(ORDER_STATUS[1][0])
def pending_order_list(): """Returns a formatted list of pending orders""" pending = unicode(ORDER_STATUS[1][1]) orders = orders_at_status(pending) return { 'orders' : orders, 'multihost' : is_multihost_enabled() }
1dc14ceb350ba184acef248d3d71a18f9a5d6462 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/171/1dc14ceb350ba184acef248d3d71a18f9a5d6462/satchmo_adminorder_tags.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4634, 67, 1019, 67, 1098, 13332, 3536, 1356, 279, 4955, 666, 434, 4634, 11077, 8395, 4634, 273, 5252, 12, 7954, 67, 8608, 63, 21, 6362, 20, 5717, 11077, 273, 11077, 67, 270, 67, 2327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4634, 67, 1019, 67, 1098, 13332, 3536, 1356, 279, 4955, 666, 434, 4634, 11077, 8395, 4634, 273, 5252, 12, 7954, 67, 8608, 63, 21, 6362, 20, 5717, 11077, 273, 11077, 67, 270, 67, 2327, ...
data= [['A', 'B', 'C', (Paragraph("<b>A paragraph</b>",styleSheet["BodyText"]),), 'D'], ['00', '01', '02', '03', '04'], ['10', '11', '12', '13', '14'],
import os, reportlab.platypus I = Image(os.path.join(os.path.dirname(reportlab.platypus.__file__),'..','demos','pythonpoint','leftlogo.gif')) I.drawHeight = 1.25*inch*I.drawHeight / I.drawWidth I.drawWidth = 1.25*inch I.noImageCaching = 1 P = Paragraph("<para align=center spaceb=3>The <b>ReportLab Left <font color=red>Logo</font></b> Image</para>", styleSheet["BodyText"]) data= [['A', 'B', 'C', Paragraph("<b>A pa<font color=red>r</font>a<i>graph</i></b><super><font color=yellow>1</font></super>",styleSheet["BodyText"]), 'D'], ['00', '01', '02', [I,P], '04'], ['10', '11', '12', [I,P], '14'],
def test(): from reportlab.lib.units import inch rowheights = (24, 16, 16, 16, 16) rowheights2 = (24, 16, 16, 16, 30) colwidths = (50, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32) data = ( ('', 'Jan', 'Feb', 'Mar','Apr','May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), ('Mugs', 0, 4, 17, 3, 21, 47, 12, 33, 2, -2, 44, 89), ('T-Shirts', 0, 42, 9, -3, 16, 4, 72, 89, 3, 19, 32, 119), ('Key Ring', 0,0,0,0,0,0,1,0,0,0,2,13), ('Hats', 893, 912, '1,212', 643, 789, 159, 888, '1,298', 832, 453, '1,344','2,843') ) data2 = ( ('', 'Jan', 'Feb', 'Mar','Apr','May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), ('Mugs', 0, 4, 17, 3, 21, 47, 12, 33, 2, -2, 44, 89), ('T-Shirts', 0, 42, 9, -3, 16, 4, 72, 89, 3, 19, 32, 119), ('Key Ring', 0,0,0,0,0,0,1,0,0,0,2,13), ('Hats\nLarge', 893, 912, '1,212', 643, 789, 159, 888, '1,298', 832, 453, '1,344','2,843') ) styleSheet = getSampleStyleSheet() lst = [] lst.append(Paragraph("Tables", styleSheet['Heading1'])) lst.append(Paragraph(__doc__, styleSheet['BodyText'])) lst.append(Paragraph("The Tables (shown in different styles below) were created using the following code:", styleSheet['BodyText'])) lst.append(Preformatted(""" colwidths = (50, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32) rowheights = (24, 16, 16, 16, 16) data = ( ('', 'Jan', 'Feb', 'Mar','Apr','May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), ('Mugs', 0, 4, 17, 3, 21, 47, 12, 33, 2, -2, 44, 89), ('T-Shirts', 0, 42, 9, -3, 16, 4, 72, 89, 3, 19, 32, 119), ('Key Ring', 0,0,0,0,0,0,1,0,0,0,2,13), ('Hats', 893, 912, '1,212', 643, 789, 159, 888, '1,298', 832, 453, '1,344','2,843') ) t = Table(data, colwidths, rowheights) """, styleSheet['Code'], dedent=4)) lst.append(Paragraph(""" You can then give the Table a TableStyle object to control its format. The first TableStyle used was created as follows: """, styleSheet['BodyText'])) lst.append(Preformatted("""
9f5a788184a7139b9b717f8b6082af233464645d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/9f5a788184a7139b9b717f8b6082af233464645d/tables.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 13332, 628, 2605, 7411, 18, 2941, 18, 7705, 1930, 316, 343, 1027, 4210, 87, 273, 261, 3247, 16, 2872, 16, 2872, 16, 2872, 16, 2872, 13, 1027, 4210, 87, 22, 273, 261, 3247, 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, 1842, 13332, 628, 2605, 7411, 18, 2941, 18, 7705, 1930, 316, 343, 1027, 4210, 87, 273, 261, 3247, 16, 2872, 16, 2872, 16, 2872, 16, 2872, 13, 1027, 4210, 87, 22, 273, 261, 3247, 16, ...
fileName = 'tmpLSCsegFindWebPage.txt'
fileName = 'tmpDataFromURL_LSCsegFind.txt'
def GetSegments(self): fileName = 'tmpLSCsegFindWebPage.txt'
1797235e7620a9a25448f50b6ba04cf7e7df6b9e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/1797235e7620a9a25448f50b6ba04cf7e7df6b9e/LSCsegFind.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 7946, 12, 2890, 4672, 225, 3968, 273, 296, 5645, 48, 2312, 5680, 3125, 4079, 1964, 18, 5830, 11, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 7946, 12, 2890, 4672, 225, 3968, 273, 296, 5645, 48, 2312, 5680, 3125, 4079, 1964, 18, 5830, 11, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
def derivative(self, v, n=1, *args):
def derivative(self, *args):
def derivative(self, v, n=1, *args): """ EXAMPLES: sage: h = sin(x)/cos(x) sage: diff(h,x,x,x) 6*sin(x)^4/cos(x)^4 + 8*sin(x)^2/cos(x)^2 + 2 sage: diff(h,x,3) 6*sin(x)^4/cos(x)^4 + 8*sin(x)^2/cos(x)^2 + 2
43a32bc05bcb0311265e3e734e43ad89393fd3c3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/43a32bc05bcb0311265e3e734e43ad89393fd3c3/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16417, 12, 2890, 16, 380, 1968, 4672, 3536, 5675, 8900, 11386, 30, 272, 410, 30, 366, 273, 5367, 12, 92, 13176, 14445, 12, 92, 13, 272, 410, 30, 3122, 12, 76, 16, 92, 16, 92, 16, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16417, 12, 2890, 16, 380, 1968, 4672, 3536, 5675, 8900, 11386, 30, 272, 410, 30, 366, 273, 5367, 12, 92, 13176, 14445, 12, 92, 13, 272, 410, 30, 3122, 12, 76, 16, 92, 16, 92, 16, 9...
result += unicode(self.localcontext.get('translate', lambda x:x)(sps.pop(0)))
to_translate = tools.ustr(sps.pop(0)) result += tools.ustr(self.localcontext.get('translate', lambda x:x)(to_translate))
def _process_text(self, txt): if not self.localcontext: return str2xml(txt) if not txt: return '' result = '' sps = _regex.split(txt) while sps: # This is a simple text to translate result += unicode(self.localcontext.get('translate', lambda x:x)(sps.pop(0))) if sps: try: expr = sps.pop(0) txt = eval(expr,self.localcontext) if txt and (isinstance(txt, unicode) or isinstance(txt, str)): txt = unicode(txt) except Exception,e: tb_s = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback)) if type(txt)==type('') or type(txt)==type(u''): txt2 = str2xml(txt) result += unicode(txt2) elif (txt is not None) and (txt is not False): result += unicode(txt) return result
14b584718de83cf15504b5132d0fd20c55633f73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/14b584718de83cf15504b5132d0fd20c55633f73/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 67, 955, 12, 2890, 16, 6463, 4672, 309, 486, 365, 18, 3729, 2472, 30, 327, 609, 22, 2902, 12, 5830, 13, 309, 486, 6463, 30, 327, 875, 563, 273, 875, 272, 1121, 273, 389, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 67, 955, 12, 2890, 16, 6463, 4672, 309, 486, 365, 18, 3729, 2472, 30, 327, 609, 22, 2902, 12, 5830, 13, 309, 486, 6463, 30, 327, 875, 563, 273, 875, 272, 1121, 273, 389, ...
self.lines_pp = self.calculateLinesPerPage(dc, usable_page_height_mm)
self.lines_pp = self._calculateLinesPerPage(dc, usable_page_height_mm)
def calculateScale(self, dc): """Scale the DC This routine scales the DC based on the font size, determines the number of lines on a page, and saves some useful pixel locations like the top left corner and the width and height of the drawing area in logical coordinates. """ if self.debuglevel > 0: print dc.SetFont(self.stc.GetFont()) # Calculate pixels per inch of the various devices. The dc_ppi will be # equivalent to the page or screen PPI if the target is the printer or # a print preview, respectively. page_ppi_x, page_ppi_y = self.GetPPIPrinter() screen_ppi_x, screen_ppi_y = self.GetPPIScreen() dc_ppi_x, dc_ppi_y = dc.GetPPI() if self.debuglevel > 0: print("printer ppi: %dx%d" % (page_ppi_x, page_ppi_y)) print("screen ppi: %dx%d" % (screen_ppi_x, screen_ppi_y)) print("dc ppi: %dx%d" % (dc_ppi_x, dc_ppi_y)) # Calculate paper size. Note that this is the size in pixels of the # entire paper, which may be larger than the printable range of the # printer. We need to use the entire paper size because we calculate # margins ourselves. Note that GetPageSizePixels returns the # dimensions of the printable area. px, py, pw, ph = self.GetPaperRectPixels() page_width_inch = float(pw) / page_ppi_x page_height_inch = float(ph) / page_ppi_y if self.debuglevel > 0: print("page pixels: %dx%d" % (pw, ph)) print("page size: %fx%f in" % (page_width_inch, page_height_inch)) dw, dh = dc.GetSizeTuple() dc_pixels_per_inch_x = float(dw) / page_width_inch dc_pixels_per_inch_y = float(dh) / page_height_inch if self.debuglevel > 0: print("device pixels: %dx%d" % (dw, dh)) print("device pixels per inch: %fx%f" % (dc_pixels_per_inch_x, dc_pixels_per_inch_y)) # Calculate usable page size page_height_mm = page_height_inch * 25.4 margin_mm = self.top_left_margin[1] + self.bottom_right_margin[1] usable_page_height_mm = page_height_mm - margin_mm # Lines per page is then the number of lines (based on the point size # reported by wx) that will fit into the usable page height self.lines_pp = self.calculateLinesPerPage(dc, usable_page_height_mm) # The final DC scale factor is then the ratio of the total height in # pixels inside the margins to the number of pixels that it takes to # represent the number of lines dc_margin_pixels = float(dc_pixels_per_inch_y) * margin_mm / 25.4 dc_usable_pixels = dh - dc_margin_pixels page_to_dc = self.calculateScaleFactor(dc, dc_usable_pixels, self.lines_pp)
6ae8303bbb1a0f5f38a844558be6a34a650019a1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11522/6ae8303bbb1a0f5f38a844558be6a34a650019a1/stcprint.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4604, 5587, 12, 2890, 16, 6744, 4672, 3536, 5587, 326, 21533, 225, 1220, 12245, 18211, 326, 21533, 2511, 603, 326, 3512, 963, 16, 12949, 326, 1300, 434, 2362, 603, 279, 1363, 16, 471, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4604, 5587, 12, 2890, 16, 6744, 4672, 3536, 5587, 326, 21533, 225, 1220, 12245, 18211, 326, 21533, 2511, 603, 326, 3512, 963, 16, 12949, 326, 1300, 434, 2362, 603, 279, 1363, 16, 471, 14...
check if it's already installed (neither uninstallable nor uninstalled)
check if it's already installed (either 'to install', 'to upgrade' or 'installed')
def _already_installed(self, cr, uid, context=None): """ For each module (boolean fields in a res.config.installer), check if it's already installed (neither uninstallable nor uninstalled) and if it is, check it by default """ modules = self.pool.get('ir.module.module')
6f81510169140068e4a4ac59fa72eacc1ccc2fc6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/6f81510169140068e4a4ac59fa72eacc1ccc2fc6/res_config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 17583, 67, 13435, 12, 2890, 16, 4422, 16, 4555, 16, 819, 33, 7036, 4672, 3536, 2457, 1517, 1605, 261, 6494, 1466, 316, 279, 400, 18, 1425, 18, 20163, 3631, 866, 309, 518, 1807, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 17583, 67, 13435, 12, 2890, 16, 4422, 16, 4555, 16, 819, 33, 7036, 4672, 3536, 2457, 1517, 1605, 261, 6494, 1466, 316, 279, 400, 18, 1425, 18, 20163, 3631, 866, 309, 518, 1807, 18...
@type content: L{Object}
@type content: L{Content}
def start(self, content): """ Processing of I{content} has started, find and set the content's schema type using the resolver. @param content: The content for which proccessing has stated. @type content: L{Object} @return: True to continue appending @rtype: boolean @note: This will I{push} the type in the resolver. """ log.debug('starting content:\n%s', content) if content.type is None: name = content.tag if name.startswith('_'): name = '@'+name[1:] content.type = self.resolver.find(name, content.value) if content.type is None: raise TypeNotFound(content.tag) else: known = None if isinstance(content.value, Object): known = self.resolver.known(content.value) if known is None: log.debug('object has no type information', content.value) known = content.type self.sort(content.value, known) frame = Frame(content.type, resolved=known) self.resolver.push(frame) resolved = self.resolver.top().resolved content.value = self.translated(content.value, resolved) if self.skip(content): log.debug('skipping (optional) content:\n%s', content) self.resolver.pop() return False else: return True
ad01f21b6e51e0f4caf8326860cbf8690d8fc872 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5930/ad01f21b6e51e0f4caf8326860cbf8690d8fc872/marshaller.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 16, 913, 4672, 3536, 19652, 434, 467, 95, 1745, 97, 711, 5746, 16, 1104, 471, 444, 326, 913, 1807, 1963, 618, 1450, 326, 5039, 18, 632, 891, 913, 30, 1021, 913, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 16, 913, 4672, 3536, 19652, 434, 467, 95, 1745, 97, 711, 5746, 16, 1104, 471, 444, 326, 913, 1807, 1963, 618, 1450, 326, 5039, 18, 632, 891, 913, 30, 1021, 913, 364, 1...
monodisPath = None
def _getmonodis(macros, recipe, path): # For bootstrapping purposes, prefer the just-built version if # it exists if os.access('%(destdir)s/%(monodis)s' %macros, os.X_OK): return ('MONO_PATH=%(destdir)s%(prefix)s/lib' ' LD_LIBRARY_PATH=%(destdir)s%(libdir)s' ' %(destdir)s/%(monodis)s' %macros) elif os.access('%(monodis)s' %macros, os.X_OK): return '%(monodis)s' %macros else: recipe.warn('%s not available for dependency discovery' ' for path %s' %(macros.monodis, path)) return None
744af24062f912b0b640ed9b16c27a2f54ef00a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/744af24062f912b0b640ed9b16c27a2f54ef00a7/packagepolicy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 2586, 369, 291, 12, 5821, 6973, 16, 16100, 16, 589, 4672, 468, 2457, 7065, 1382, 13694, 16, 13256, 326, 2537, 17, 12406, 1177, 309, 468, 518, 1704, 309, 1140, 18, 3860, 2668, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 2586, 369, 291, 12, 5821, 6973, 16, 16100, 16, 589, 4672, 468, 2457, 7065, 1382, 13694, 16, 13256, 326, 2537, 17, 12406, 1177, 309, 468, 518, 1704, 309, 1140, 18, 3860, 2668, ...
"""
"""
def extractCloudInformation(self) : """ Extract cloud information. Return None or a tuple (sky type as a string of text, cloud type (if any) and suggested pixmap name) """ matches = self.match_WeatherPart(CLOUD_RE_STR) skytype = None ctype = None pixmap = None for wcloud in matches: if wcloud is not None: stype = wcloud[:3] if stype in ("CLR", "SKC", "CAV", "NSC"): skytype="Clear sky" pixmap="sun" elif stype == "BKN" : skytype="Broken clouds" pixmap="suncloud" elif stype == "SCT" : skytype="Scattered clouds" pixmap="suncloud" elif stype == "FEW" : skytype="Few clouds" pixmap="suncloud" elif stype == "OVC" : skytype="Overcast" pixmap="cloud" if ctype == None: ctype = CLOUDTYPES.get(wcloud[6:], None)
432e464601ad8d6fd1d2454b664a04836415266c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4602/432e464601ad8d6fd1d2454b664a04836415266c/pymetar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 6230, 5369, 12, 2890, 13, 294, 3536, 8152, 5051, 1779, 18, 2000, 599, 578, 279, 3193, 261, 22921, 618, 487, 279, 533, 434, 977, 16, 5051, 618, 261, 430, 1281, 13, 225, 471, 22168...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 6230, 5369, 12, 2890, 13, 294, 3536, 8152, 5051, 1779, 18, 2000, 599, 578, 279, 3193, 261, 22921, 618, 487, 279, 533, 434, 977, 16, 5051, 618, 261, 430, 1281, 13, 225, 471, 22168...
self._timings = [ ( 5, sec), (4, min), (3, hour) ]
self._timings = hour, min, sec self._last_time = datetime.datetime.now()
def schedule(self, hour=range(24), min=range(60), sec=0): if not isinstance(hour, (list, tuple)): hour = [ hour ] if not isinstance(min, (list, tuple)): min = [ min ] if not isinstance(sec, (list, tuple)): sec = [ sec ] self._timings = [ ( 5, sec), (4, min), (3, hour) ] self._schedule_next()
7ac4b3488b3bde80236b7a5efd6626814ec8357e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11722/7ac4b3488b3bde80236b7a5efd6626814ec8357e/timer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4788, 12, 2890, 16, 6126, 33, 3676, 12, 3247, 3631, 1131, 33, 3676, 12, 4848, 3631, 1428, 33, 20, 4672, 309, 486, 1549, 12, 12091, 16, 261, 1098, 16, 3193, 3719, 30, 6126, 273, 306, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4788, 12, 2890, 16, 6126, 33, 3676, 12, 3247, 3631, 1131, 33, 3676, 12, 4848, 3631, 1428, 33, 20, 4672, 309, 486, 1549, 12, 12091, 16, 261, 1098, 16, 3193, 3719, 30, 6126, 273, 306, ...
last_tb = getattr(sys, 'last_traceback', None) if last_tb and sys.last_type is not KeyboardInterrupt: SendStack(''.join(traceback.format_tb(last_tb)))
last_value = getattr(sys, 'last_value', None) if last_value and not isinstance(last_value, KeyboardInterrupt): last_tb = getattr(sys, 'last_traceback', None) if last_tb: SendStack(repr(last_value), ''.join(traceback.format_tb(last_tb)))
def CheckForException(): last_tb = getattr(sys, 'last_traceback', None) if last_tb and sys.last_type is not KeyboardInterrupt: SendStack(''.join(traceback.format_tb(last_tb)))
e4964832cf330f57c4ef6dc7be942d2533c840a7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6076/e4964832cf330f57c4ef6dc7be942d2533c840a7/breakpad.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 1290, 503, 13332, 1142, 67, 1132, 273, 3869, 12, 9499, 16, 296, 2722, 67, 1132, 2187, 599, 13, 309, 1142, 67, 1132, 471, 486, 1549, 12, 2722, 67, 1132, 16, 19424, 4672, 1142, 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, 2073, 1290, 503, 13332, 1142, 67, 1132, 273, 3869, 12, 9499, 16, 296, 2722, 67, 1132, 2187, 599, 13, 309, 1142, 67, 1132, 471, 486, 1549, 12, 2722, 67, 1132, 16, 19424, 4672, 1142, 67,...
info = None self.gui.interaction(message, frame, info)
self.gui.interaction(message, frame, modified_info)
def interaction(self, message, fid, iid): ##print "interaction: (%s, %s, %s)" % (`message`,`fid`, `iid`) frame = FrameProxy(self.conn, fid) info = None # XXX for now self.gui.interaction(message, frame, info)
9e22e342e65f2b4578206ff5858f36a023550ad6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/9e22e342e65f2b4578206ff5858f36a023550ad6/RemoteDebugger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13581, 12, 2890, 16, 883, 16, 13444, 16, 22819, 4672, 7541, 1188, 315, 30303, 30, 6142, 87, 16, 738, 87, 16, 738, 87, 2225, 738, 21863, 2150, 9191, 68, 27268, 9191, 1375, 77, 350, 2406...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13581, 12, 2890, 16, 883, 16, 13444, 16, 22819, 4672, 7541, 1188, 315, 30303, 30, 6142, 87, 16, 738, 87, 16, 738, 87, 2225, 738, 21863, 2150, 9191, 68, 27268, 9191, 1375, 77, 350, 2406...
`j_1\ge|m_1|`, `j_2\ge|m_2|`, `j_3\ge|m_3|`
`j_1 \ge |m_1|`, `j_2 \ge |m_2|`, `j_3 \ge |m_3|`
def wigner_3j(j_1, j_2, j_3, m_1, m_2, m_3, prec=None): r""" Calculate the Wigner 3j symbol `Wigner3j(j_1,j_2,j_3,m_1,m_2,m_3)`. INPUT: - ``j_1``, ``j_2``, ``j_3``, ``m_1``, ``m_2``, ``m_3`` - integer or half integer - ``prec`` - precision, default: None. Providing a precision can drastically speed up the calculation. OUTPUT: rational number times the square root of a rational number (if prec=None), or real number if a precision is given EXAMPLES:: sage: wigner_3j(2, 6, 4, 0, 0, 0) sqrt(5/143) sage: wigner_3j(2, 6, 4, 0, 0, 1) 0 sage: wigner_3j(0.5, 0.5, 1, 0.5, -0.5, 0) sqrt(1/6) sage: wigner_3j(40, 100, 60, -10, 60, -50) 95608/18702538494885*sqrt(21082735836735314343364163310/220491455010479533763) sage: wigner_3j(2500, 2500, 5000, 2488, 2400, -4888, prec=64) 7.60424456883448589e-12 It is an error to have arguments that are not integer or half integer values:: sage: wigner_3j(2.1, 6, 4, 0, 0, 0) Traceback (most recent call last): ... ValueError: j values must be integer or half integer sage: wigner_3j(2, 6, 4, 1, 0, -1.1) Traceback (most recent call last): ... ValueError: m values must be integer or half integer NOTES: The Wigner 3j symbol obeys the following symmetry rules: - invariant under any permutation of the columns (with the exception of a sign change where `J:=j_1+j_2+j_3`): .. math:: Wigner3j(j_1,j_2,j_3,m_1,m_2,m_3) =Wigner3j(j_3,j_1,j_2,m_3,m_1,m_2) =Wigner3j(j_2,j_3,j_1,m_2,m_3,m_1) =(-1)^J Wigner3j(j_3,j_2,j_1,m_3,m_2,m_1) =(-1)^J Wigner3j(j_1,j_3,j_2,m_1,m_3,m_2) =(-1)^J Wigner3j(j_2,j_1,j_3,m_2,m_1,m_3) - invariant under space inflection, i. e. .. math:: Wigner3j(j_1,j_2,j_3,m_1,m_2,m_3) =(-1)^J Wigner3j(j_1,j_2,j_3,-m_1,-m_2,-m_3) - symmetric with respect to the 72 additional symmetries based on the work by [Regge58] - zero for `j_1`, `j_2`, `j_3` not fulfilling triangle relation - zero for `m_1+m_2+m_3\neq 0` - zero for violating any one of the conditions `j_1\ge|m_1|`, `j_2\ge|m_2|`, `j_3\ge|m_3|` ALGORITHM: This function uses the algorithm of [Edmonds74] to calculate the value of the 3j symbol exactly. Note that the formula contains alternating sums over large factorials and is therefore unsuitable for finite precision arithmetic and only useful for a computer algebra system [Rasch03]. REFERENCES: - [Regge58] 'Symmetry Properties of Clebsch-Gordan Coefficients', T. Regge, Nuovo Cimento, Volume 10, pp. 544 (1958) - [Edmonds74] 'Angular Momentum in Quantum Mechanics', A. R. Edmonds, Princeton University Press (1974) - [Rasch03] 'Efficient Storage Scheme for Pre-calculated Wigner 3j, 6j and Gaunt Coefficients', J. Rasch and A. C. H. Yu, SIAM J. Sci. Comput. Volume 25, Issue 4, pp. 1416-1428 (2003) AUTHORS: - Jens Rasch (2009-03-24): initial version """ if int(j_1 * 2) != j_1 * 2 or int(j_2 * 2) != j_2 * 2 or \ int(j_3 * 2) != j_3 * 2: raise ValueError("j values must be integer or half integer") if int(m_1 * 2) != m_1 * 2 or int(m_2 * 2) != m_2 * 2 or \ int(m_3 * 2) != m_3 * 2: raise ValueError("m values must be integer or half integer") if (m_1 + m_2 + m_3 <> 0): return 0 prefid = Integer((-1) ** (int(j_1 - j_2 - m_3))) m_3 = -m_3 a1 = j_1 + j_2 - j_3 if (a1 < 0): return 0 a2 = j_1 - j_2 + j_3 if (a2 < 0): return 0 a3 = -j_1 + j_2 + j_3 if (a3 < 0): return 0 if (abs(m_1) > j_1) or (abs(m_2) > j_2) or (abs(m_3) > j_3): return 0 maxfact = max(j_1 + j_2 + j_3 + 1, j_1 + abs(m_1), j_2 + abs(m_2), \ j_3 + abs(m_3)) _calc_factlist(maxfact) argsqrt = Integer(_Factlist[int(j_1 + j_2 - j_3)] * \ _Factlist[int(j_1 - j_2 + j_3)] * \ _Factlist[int(-j_1 + j_2 + j_3)] * \ _Factlist[int(j_1 - m_1)] * \ _Factlist[int(j_1 + m_1)] * \ _Factlist[int(j_2 - m_2)] * \ _Factlist[int(j_2 + m_2)] * \ _Factlist[int(j_3 - m_3)] * \ _Factlist[int(j_3 + m_3)]) / \ _Factlist[int(j_1 + j_2 + j_3 + 1)] ressqrt = argsqrt.sqrt(prec) if type(ressqrt) is ComplexNumber: ressqrt = ressqrt.real() imin = max(-j_3 + j_1 + m_2, -j_3 + j_2 - m_1, 0) imax = min(j_2 + m_2, j_1 - m_1, j_1 + j_2 - j_3) sumres = 0 for ii in range(imin, imax + 1): den = _Factlist[ii] * \ _Factlist[int(ii + j_3 - j_1 - m_2)] * \ _Factlist[int(j_2 + m_2 - ii)] * \ _Factlist[int(j_1 - ii - m_1)] * \ _Factlist[int(ii + j_3 - j_2 + m_1)] * \ _Factlist[int(j_1 + j_2 - j_3 - ii)] sumres = sumres + Integer((-1) ** ii) / den res = ressqrt * sumres * prefid return res
88e8ded3e4e8fadbc380d719dcf3bdc6eab9d557 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/88e8ded3e4e8fadbc380d719dcf3bdc6eab9d557/wigner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 341, 724, 264, 67, 23, 78, 12, 78, 67, 21, 16, 525, 67, 22, 16, 525, 67, 23, 16, 312, 67, 21, 16, 312, 67, 22, 16, 312, 67, 23, 16, 13382, 33, 7036, 4672, 436, 8395, 9029, 326,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 341, 724, 264, 67, 23, 78, 12, 78, 67, 21, 16, 525, 67, 22, 16, 525, 67, 23, 16, 312, 67, 21, 16, 312, 67, 22, 16, 312, 67, 23, 16, 13382, 33, 7036, 4672, 436, 8395, 9029, 326,...
muleh rsi, flags=(OF,CF)
muleh ah, flags=(OF,CF)
def macroop MUL_B_P
abe8fb38446c64d40266dfe5aa49e124e2bd5cb3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6787/abe8fb38446c64d40266dfe5aa49e124e2bd5cb3/multiply_and_divide.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 490, 1506, 67, 38, 67, 52, 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, 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, 11522, 556, 490, 1506, 67, 38, 67, 52, 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, ...
"""Pick or unpick if click. Only one chunk can be selected.
"""Pick if click
def EndPick(self, event, selSense): """Pick or unpick if click. Only one chunk can be selected. """ if not self.picking: return self.picking = False
bbb7e6efcf31d9718acda8efdc5aea1e1aab6aa9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/bbb7e6efcf31d9718acda8efdc5aea1e1aab6aa9/fusechunksMode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4403, 17968, 12, 2890, 16, 871, 16, 357, 29713, 4672, 3536, 17968, 309, 4682, 3536, 309, 486, 365, 18, 11503, 310, 30, 327, 365, 18, 11503, 310, 273, 1083, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4403, 17968, 12, 2890, 16, 871, 16, 357, 29713, 4672, 3536, 17968, 309, 4682, 3536, 309, 486, 365, 18, 11503, 310, 30, 327, 365, 18, 11503, 310, 273, 1083, 2, -100, -100, -100, -100, -...
if terminate (buffer[:next-1]):
collect (buffer[:next-1]) if terminate (None):
def collect_net (next, buffer, collect, terminate): "consume a buffer of netstrings into a stallable collector sink" lb = len (buffer) if next > 0: if next > lb: collect (buffer) return next - lb, '', False # buffer more ... if buffer[next-1] == ',': if terminate (buffer[:next-1]): return 0, buffer[next:], True # stop now! else: raise NetstringError, '3 missing comma' prev = next else: prev = 0 while prev < lb: pos = buffer.find (':', prev) if pos < 0: if prev > 0: buffer = buffer[prev:] if not buffer.isdigit (): raise NetstringError, '1 not a netstring' return 0, buffer, False # buffer more ... try: next = pos + int (buffer[prev:pos]) + 2 except: raise NetstringError, '2 not a length' pos += 1 if next > lb: if pos < lb: collect (buffer[pos:]) return next - lb, '', False # buffer more elif buffer[next-1] == ',': if terminate (buffer[pos:next-1]): return 0, buffer[next:], True # stop now! else: raise NetstringError, '3 missing comma' prev = next # continue ... return 0, '', False # buffer consumed.
eaa126eb296782a33934aa3ea7847fd442944463 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2577/eaa126eb296782a33934aa3ea7847fd442944463/async_net.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3274, 67, 2758, 261, 4285, 16, 1613, 16, 3274, 16, 10850, 4672, 315, 21224, 279, 1613, 434, 2901, 10219, 1368, 279, 384, 454, 429, 8543, 9049, 6, 7831, 273, 562, 261, 4106, 13, 309, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3274, 67, 2758, 261, 4285, 16, 1613, 16, 3274, 16, 10850, 4672, 315, 21224, 279, 1613, 434, 2901, 10219, 1368, 279, 384, 454, 429, 8543, 9049, 6, 7831, 273, 562, 261, 4106, 13, 309, 10...
self._levelSlider.maxValue() - map.faceCount)
self._levelSlider.maxValue() - (self.map.faceCount - self._estimatedApexFaceCount))
def setMap(self, map): """Make the given map (which must belong to the current pyramid) the currently displayed level.""" self._detachMapStats(self.map)
2aedc541f20f95ef13bb24351c4ee389345b41a3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10394/2aedc541f20f95ef13bb24351c4ee389345b41a3/workspace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 863, 12, 2890, 16, 852, 4672, 3536, 6464, 326, 864, 852, 261, 12784, 1297, 10957, 358, 326, 783, 2395, 23083, 13, 326, 4551, 10453, 1801, 12123, 365, 6315, 8238, 497, 863, 4195, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 863, 12, 2890, 16, 852, 4672, 3536, 6464, 326, 864, 852, 261, 12784, 1297, 10957, 358, 326, 783, 2395, 23083, 13, 326, 4551, 10453, 1801, 12123, 365, 6315, 8238, 497, 863, 4195, 12,...
"Return the column number where the current event ends." return -1
"Return the column number where the current event ends." return -1
def getColumnNumber(self):
f9059ebede7acc7d498d0703dd97adede37c5016 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f9059ebede7acc7d498d0703dd97adede37c5016/xmlreader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6716, 1854, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6716, 1854, 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, -...
NewLib.SupModuleList = LibraryModule.Header[Arch].ModuleType.split()
NewLib.SupModuleList = DataType.SUP_MODULE_LIST
def UpdateLibraryClassOfModule(self, InfFileName, LibraryClass, Arch, InstanceFilePath): # # Update the library instance itself to add this libraryclass name # LibraryModule = self.InfDatabase[InstanceFilePath].Module LibList = LibraryModule.Header[Arch].LibraryClass NotFound = True for Lib in LibList: # # Find this LibraryClass # if Lib.LibraryClass == LibraryClass: NotFound = False; break; if NotFound: NewLib = LibraryClassClass() NewLib.LibraryClass = LibraryClass NewLib.SupModuleList = LibraryModule.Header[Arch].ModuleType.split() LibraryModule.Header[Arch].LibraryClass.append(NewLib)
266f17f8392b22227a041e9af22c719928e41a02 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/914/266f17f8392b22227a041e9af22c719928e41a02/EdkIIWorkspaceBuild.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2315, 9313, 797, 951, 3120, 12, 2890, 16, 13648, 4771, 16, 18694, 797, 16, 16959, 16, 5180, 5598, 4672, 468, 468, 2315, 326, 5313, 791, 6174, 358, 527, 333, 5313, 1106, 508, 468, 18694, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2315, 9313, 797, 951, 3120, 12, 2890, 16, 13648, 4771, 16, 18694, 797, 16, 16959, 16, 5180, 5598, 4672, 468, 468, 2315, 326, 5313, 791, 6174, 358, 527, 333, 5313, 1106, 508, 468, 18694, ...
if twin_fraction > 0.06:
if twin_fraction > 0.10:
def twin_the_data_and_analyse(twin_operator,twin_fraction=0.2): out_string = StringIO() miller_array = random_data(35).map_to_asu() miller_array = miller_array.f_as_f_sq() cb_op = sgtbx.change_of_basis_op( twin_operator ) miller_array_mod, miller_array_twin = miller_array.common_sets( miller_array.change_basis( cb_op ).map_to_asu() ) twinned_miller = miller_array_mod.customized_copy( data = (1.0-twin_fraction)*miller_array_mod.data() + twin_fraction*miller_array_twin.data(), sigmas = flex.sqrt( flex.pow( ((1.0-twin_fraction)*miller_array_mod.sigmas()),2.0)+\ flex.pow( ((twin_fraction)*miller_array_twin.sigmas()),2.0)) ) twinned_miller.set_observation_type( miller_array.observation_type()) twin_anal_object = t_a.twin_analyses(twinned_miller, out=out_string, verbose=-100) index = twin_anal_object.twin_summary.twin_results.most_worrysome_twin_law assert approx_equal( twin_anal_object.twin_summary.twin_results.britton_alpha[index], twin_fraction,eps=0.1) ## Untwinned data standards if twin_fraction==0: ## L-test assert approx_equal(twin_anal_object.l_test.mean_l, 0.50,eps=0.1) ## Wilson ratios assert approx_equal(twin_anal_object.twin_summary.twin_results.i_ratio, 2.00, eps=0.1) ## H-test assert approx_equal( twin_anal_object.twin_law_dependent_analyses[index].h_test.mean_h, 0.50,eps=0.1) ## Perfect twin standards if twin_fraction==0.5: assert approx_equal(twin_anal_object.l_test.mean_l, 0.375,eps=0.1) assert approx_equal(twin_anal_object.twin_summary.twin_results.i_ratio, 1.50,eps=0.1) assert approx_equal( twin_anal_object.twin_law_dependent_analyses[index].h_test.mean_h, 0.00,eps=0.1) ## Just make sure we actually detect significant twinning if twin_fraction > 0.06: assert (twin_anal_object.twin_summary.twin_results.maha_l > 3.0) ## The patterson origin peak should be smallish ... assert (twin_anal_object.twin_summary.twin_results.patterson_p_value > 0.01) answer = t_a.twin_analyses_brief( twinned_miller,out=out_string,verbose=-100 ) if twin_fraction > 0.06: assert answer is True
359a39b62fcb6ebf3f64bbb0181c65e9d94a205d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/359a39b62fcb6ebf3f64bbb0181c65e9d94a205d/tst_scaling.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2339, 267, 67, 5787, 67, 892, 67, 464, 67, 304, 3450, 307, 12, 88, 8082, 67, 9497, 16, 88, 8082, 67, 16744, 33, 20, 18, 22, 4672, 596, 67, 1080, 273, 15777, 1435, 225, 312, 24462, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2339, 267, 67, 5787, 67, 892, 67, 464, 67, 304, 3450, 307, 12, 88, 8082, 67, 9497, 16, 88, 8082, 67, 16744, 33, 20, 18, 22, 4672, 596, 67, 1080, 273, 15777, 1435, 225, 312, 24462, ...
security.declareProtected(view_management_screens, 'iter_assessments')
security.declareProtected(view, 'iter_assessments')
def wrap_answer(self, answer): if Globals.DevelopmentMode: reload(shadow)
a14e2289fd97c5950dc5c046f987bdae513f98b7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/a14e2289fd97c5950dc5c046f987bdae513f98b7/viewer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2193, 67, 13490, 12, 2890, 16, 5803, 4672, 309, 18901, 1031, 18, 26438, 2309, 30, 7749, 12, 19119, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2193, 67, 13490, 12, 2890, 16, 5803, 4672, 309, 18901, 1031, 18, 26438, 2309, 30, 7749, 12, 19119, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
ProtocolWrapper.__init__(self, factory, wrappedProtocol)
self.factory = factory self.wrappedProtocol = wrappedProtocol
def __init__(self, factory, wrappedProtocol): if debug: print 'TwistedProtocolWrapper.__init__' ProtocolWrapper.__init__(self, factory, wrappedProtocol)
889137356a591083e12049b08fbe8a118fbdaec8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/889137356a591083e12049b08fbe8a118fbdaec8/TwistedProtocolWrapper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3272, 16, 5805, 5752, 4672, 309, 1198, 30, 1172, 296, 23539, 25444, 5752, 3611, 16186, 2738, 7250, 4547, 3611, 16186, 2738, 972, 12, 2890, 16, 3272, 16, 58...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3272, 16, 5805, 5752, 4672, 309, 1198, 30, 1172, 296, 23539, 25444, 5752, 3611, 16186, 2738, 7250, 4547, 3611, 16186, 2738, 972, 12, 2890, 16, 3272, 16, 58...
stdout = PIPE p = Popen('/bin/bash', stdin=stdin, stdout=stdout) (stdin, stdout) = (p.stdin, p.stdout) stdin.write(command) stdin.close()
(stdout_r, stdout_w) = os.pipe() p = Popen('/bin/bash', stdin=stdin_r, stdout=stdout_w) os.write(stdin_w, command + '\nexit $?\n') os.close(stdin_w)
def _bash2(command, mode='o'): """Execute a bash command. Return the output, the return value, or both. mode may be o (output), v (return value), or ov (tuple (output, value).""" stdin, stdout = PIPE, None if 'o' in mode: stdout = PIPE p = Popen('/bin/bash', stdin=stdin, stdout=stdout) (stdin, stdout) = (p.stdin, p.stdout) stdin.write(command) stdin.close() output = [] ret = p.poll() if stdout: while ret is None: o = stdout.read() if o: output.append(o) ret = p.poll() if ret is None: time.sleep(0.01) output.append(stdout.read()) output = (''.join(output)).strip() elif ret is None: ret = p.wait() if 'ov' == mode: return (output, ret) elif 'o' in mode: return output elif 'v' in mode: return ret return None
5a69ba52c1208121d9a721ab66f39c188880af1e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5186/5a69ba52c1208121d9a721ab66f39c188880af1e/PythonUtils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 28734, 22, 12, 3076, 16, 1965, 2218, 83, 11, 4672, 3536, 5289, 279, 24817, 1296, 18, 2000, 326, 876, 16, 326, 327, 460, 16, 578, 3937, 18, 1965, 2026, 506, 320, 261, 2844, 3631, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 28734, 22, 12, 3076, 16, 1965, 2218, 83, 11, 4672, 3536, 5289, 279, 24817, 1296, 18, 2000, 326, 876, 16, 326, 327, 460, 16, 578, 3937, 18, 1965, 2026, 506, 320, 261, 2844, 3631, ...
Prepend a locale to the path. If path is omitted, the current path is used.
Prepend a locale to the path. If path is omitted, the request path is used.
def redirect_locale(request, path=None, locale=None): """ Prepend a locale to the path. If path is omitted, the current path is used. If locale is omitted the current locale is used, or the default from settings if the request does not contain LANGUAGE_CODE. """ if path is None: path = request.path_info path = strip_locale_prefix(path) if locale is None: try: locale = request.LANGUAGE_CODE except AttributeError: locale = settings.LANGUAGE_CODE return HttpResponseRedirect('/' + locale + path)
211a62ac0170f807cb05e9b8297a560026e03d52 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11458/211a62ac0170f807cb05e9b8297a560026e03d52/middleware.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3136, 67, 6339, 12, 2293, 16, 589, 33, 7036, 16, 2573, 33, 7036, 4672, 3536, 28466, 279, 2573, 358, 326, 589, 18, 971, 589, 353, 16195, 16, 326, 590, 589, 353, 1399, 18, 971, 2573, 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, 3136, 67, 6339, 12, 2293, 16, 589, 33, 7036, 16, 2573, 33, 7036, 4672, 3536, 28466, 279, 2573, 358, 326, 589, 18, 971, 589, 353, 16195, 16, 326, 590, 589, 353, 1399, 18, 971, 2573, 3...
if self._ipws[0]: inputData = self._ipws[0][0].GetInput() else: inputData = None
inputData = self._getPrimaryInput()
def _storeSurfacePoint(self, pointId, actor): polyData = actor.GetMapper().GetInput() if polyData: xyz = polyData.GetPoint(pointId) else: # something really weird went wrong return
de247dfb75384ee4df181797accdd53983a402e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4494/de247dfb75384ee4df181797accdd53983a402e5/slice3d_vwr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2233, 11508, 2148, 12, 2890, 16, 1634, 548, 16, 8327, 4672, 7573, 751, 273, 8327, 18, 967, 4597, 7675, 967, 1210, 1435, 309, 7573, 751, 30, 14779, 273, 7573, 751, 18, 967, 2148, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 2233, 11508, 2148, 12, 2890, 16, 1634, 548, 16, 8327, 4672, 7573, 751, 273, 8327, 18, 967, 4597, 7675, 967, 1210, 1435, 309, 7573, 751, 30, 14779, 273, 7573, 751, 18, 967, 2148, 1...
sage: g=graphs.ChvatalGraph()
sage: g = graphs.ChvatalGraph()
def canonical_label(self, partition=None, certify=False, verbosity=0, edge_labels=False): """ Returns the canonical label with respect to the partition. If no partition is given, uses the unit partition. INPUT: - ``partition`` - if given, the canonical label with respect to this partition will be computed. The default is the unit partition. - ``certify`` - if True, a dictionary mapping from the (di)graph to its canonical label will be given. - ``verbosity`` - gets passed to nice: prints helpful output. - ``edge_labels`` - default False, otherwise allows only permutations respecting edge labels. EXAMPLES:: sage: D = graphs.DodecahedralGraph() sage: E = D.canonical_label(); E Dodecahedron: Graph on 20 vertices sage: D.canonical_label(certify=True) (Dodecahedron: Graph on 20 vertices, {0: 0, 1: 19, 2: 16, 3: 15, 4: 9, 5: 1, 6: 10, 7: 8, 8: 14, 9: 12, 10: 17, 11: 11, 12: 5, 13: 6, 14: 2, 15: 4, 16: 3, 17: 7, 18: 13, 19: 18}) sage: D.is_isomorphic(E) True Multigraphs:: sage: G = Graph(multiedges=True,sparse=True) sage: G.add_edge((0,1)) sage: G.add_edge((0,1)) sage: G.add_edge((0,1)) sage: G.canonical_label() Multi-graph on 2 vertices sage: Graph('A?', implementation='c_graph').canonical_label() Graph on 2 vertices
0cd8a0e23c11504a7ef7a8e8e7682cb3ce9b8f6f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/0cd8a0e23c11504a7ef7a8e8e7682cb3ce9b8f6f/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7378, 67, 1925, 12, 2890, 16, 3590, 33, 7036, 16, 3320, 1164, 33, 8381, 16, 11561, 33, 20, 16, 3591, 67, 5336, 33, 8381, 4672, 3536, 2860, 326, 7378, 1433, 598, 8762, 358, 326, 3590, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7378, 67, 1925, 12, 2890, 16, 3590, 33, 7036, 16, 3320, 1164, 33, 8381, 16, 11561, 33, 20, 16, 3591, 67, 5336, 33, 8381, 4672, 3536, 2860, 326, 7378, 1433, 598, 8762, 358, 326, 3590, ...
errStr = lfc.sstrerror(lfc.cvar.serrno) gLogger.error("LcgFileCatalogClient__addFile: Failed to create GUID.", errStr)
errStr = lfc.sstrerror( lfc.cvar.serrno ) gLogger.error( "LcgFileCatalogClient__addFile: Failed to create GUID.", errStr )
def __addFile(self,lfn,pfn,size,se,guid,checksum): lfc.lfc_umask(0000) bdir = os.path.dirname(lfn) res = self.__executeOperation(bdir,'exists') # If we failed to find out whether the directory exists if not res['OK']: return S_ERROR(res['Message']) # If the directory doesn't exist if not res['Value']: #Make the directories recursively if needed res = self.__makeDirs(bdir) # If we failed to make the directory for the file if not res['OK']: return S_ERROR(res['Message']) #Create a new file fullLfn = '%s%s' % (self.prefix,lfn) value = lfc.lfc_creatg(fullLfn,guid,0664) if value != 0: errStr = lfc.sstrerror(lfc.cvar.serrno) gLogger.error("LcgFileCatalogClient__addFile: Failed to create GUID.", errStr) # Remove the file we just attempted to add res = self.__unlinkPath(lfn) if not res['OK']: gLogger.error("LcgFileCatalogClient.__addFile: Failed to remove file after failure.", res['Message']) return S_ERROR("LcgFileCatalogClient__addFile: Failed to create GUID: %s" % errStr) #Set the checksum and size of the file if not checksum: checksum = '' value = lfc.lfc_setfsizeg(guid,size,'AD',checksum) if value != 0: errStr = lfc.sstrerror(lfc.cvar.serrno) # Remove the file we just attempted to add res = self.__unlinkPath(lfn) if not res['OK']: gLogger.error("LcgFileCatalogClient.__addFile: Failed to remove file after failure to add checksum and size." % res['Message']) return S_ERROR("LcgFileCatalogClient.__addFile: Failed to set file size: %s" % errStr) return S_OK()
6280f3782654b93320f684f56a83a6624459bcec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/6280f3782654b93320f684f56a83a6624459bcec/LcgFileCatalogClient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1289, 812, 12, 2890, 16, 80, 4293, 16, 84, 4293, 16, 1467, 16, 307, 16, 14066, 16, 15149, 4672, 328, 7142, 18, 80, 7142, 67, 379, 835, 12, 2787, 13, 324, 1214, 273, 1140, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1289, 812, 12, 2890, 16, 80, 4293, 16, 84, 4293, 16, 1467, 16, 307, 16, 14066, 16, 15149, 4672, 328, 7142, 18, 80, 7142, 67, 379, 835, 12, 2787, 13, 324, 1214, 273, 1140, 18, ...
from xml.dom import getDOMImplementation dom = getDOMImplementation("4DOM")
def __init__(self, request, **kw): '''We should use this for creating the doc''' FormatterBase.__init__(self, request, **kw) from xml.dom import getDOMImplementation dom = getDOMImplementation("4DOM") self.doc = dom.createDocument(None, "article", dom.createDocumentType( "article", "-//OASIS//DTD DocBook V4.4//EN", "http://www.docbook.org/xml/4.4/docbookx.dtd")) self.root = self.doc.documentElement self.curdepth = 0 self.outputFormatter = DocBookOutputFormatter(self.doc) self.exchangeKeys = [] self.exchangeValues = []
6aa2a9f34779b601d8b46f2b13283cdc995dac85 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/6aa2a9f34779b601d8b46f2b13283cdc995dac85/xml_docbook.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 590, 16, 2826, 9987, 4672, 9163, 3218, 1410, 999, 333, 364, 4979, 326, 997, 26418, 14924, 2171, 16186, 2738, 972, 12, 2890, 16, 590, 16, 2826, 9987, 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, 1001, 2738, 972, 12, 2890, 16, 590, 16, 2826, 9987, 4672, 9163, 3218, 1410, 999, 333, 364, 4979, 326, 997, 26418, 14924, 2171, 16186, 2738, 972, 12, 2890, 16, 590, 16, 2826, 9987, 13, ...
if 'default' in cases: assert 'default' == cases[-1]
if Constant('default') in cases: assert Constant('default') == cases[-1]
def usevar(v, in_link=None): assert v in vars if in_link is not None: assert vars[v] is None or vars[v] is in_link
469d75ec007b0905ef004317ff50b75e25170f91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/469d75ec007b0905ef004317ff50b75e25170f91/model.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 999, 1401, 12, 90, 16, 316, 67, 1232, 33, 7036, 4672, 1815, 331, 316, 4153, 309, 316, 67, 1232, 353, 486, 599, 30, 1815, 4153, 63, 90, 65, 353, 599, 578, 4153, 63, 90, 65, 353, 316...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 999, 1401, 12, 90, 16, 316, 67, 1232, 33, 7036, 4672, 1815, 331, 316, 4153, 309, 316, 67, 1232, 353, 486, 599, 30, 1815, 4153, 63, 90, 65, 353, 599, 578, 4153, 63, 90, 65, 353, 316...
(self.tick_count, str(message), str(category),
(self.tick_count, str(message), str(category),
def _showwarning(message, category, filename, lineno, file=None, line=None): try: self.old_showwarning(message, category, filename, lineno, file, line) except TypeError: # cater to Python 2.5 and earlier self.old_showwarning(message, category, filename, lineno)
26f8d8d9c4b3c67dbaf4f4dece66623b40a7f065 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12871/26f8d8d9c4b3c67dbaf4f4dece66623b40a7f065/log.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4500, 8551, 12, 2150, 16, 3150, 16, 1544, 16, 7586, 16, 585, 33, 7036, 16, 980, 33, 7036, 4672, 775, 30, 365, 18, 1673, 67, 4500, 8551, 12, 2150, 16, 3150, 16, 1544, 16, 7586, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4500, 8551, 12, 2150, 16, 3150, 16, 1544, 16, 7586, 16, 585, 33, 7036, 16, 980, 33, 7036, 4672, 775, 30, 365, 18, 1673, 67, 4500, 8551, 12, 2150, 16, 3150, 16, 1544, 16, 7586, ...
this = apply(_quickfix.new_ConfirmStatus, args)
this = _quickfix.new_ConfirmStatus(*args)
def __init__(self, *args): this = apply(_quickfix.new_ConfirmStatus, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 11269, 1482, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 11269, 1482, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, 365, ...
if os.path.exists(fname):
if os.path.isfile(fname):
def find_library(name): if name in ('c', 'm'): return find_msvcrt() # See MSDN for the REAL search order. for directory in os.environ['PATH'].split(os.pathsep): fname = os.path.join(directory, name) if os.path.exists(fname): return fname if fname.lower().endswith(".dll"): continue fname = fname + ".dll" if os.path.exists(fname): return fname return None
5ec8ba960b0178bc1cc6eff47128c2c776e99d35 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/5ec8ba960b0178bc1cc6eff47128c2c776e99d35/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 12083, 12, 529, 4672, 309, 508, 316, 7707, 71, 2187, 296, 81, 11, 4672, 327, 1104, 67, 959, 90, 3353, 88, 1435, 468, 2164, 9238, 8609, 364, 326, 2438, 1013, 1623, 1353, 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, 1104, 67, 12083, 12, 529, 4672, 309, 508, 316, 7707, 71, 2187, 296, 81, 11, 4672, 327, 1104, 67, 959, 90, 3353, 88, 1435, 468, 2164, 9238, 8609, 364, 326, 2438, 1013, 1623, 1353, 18, ...
if self.exist:
if self.exist:
def OnShowVolume(self, pubsub_evt): if self.exist: self.volume.SetVisibility(1) ps.Publisher().sendMessage('Render volume viewer') else: self.LoadConfig(None) self.LoadVolume() self.exist = 1
d641a71591ea1defb285fdd7d6be7f10c66db928 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10228/d641a71591ea1defb285fdd7d6be7f10c66db928/volume.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 5706, 4545, 12, 2890, 16, 23288, 67, 73, 11734, 4672, 309, 365, 18, 7398, 30, 365, 18, 9491, 18, 694, 10135, 12, 21, 13, 4250, 18, 15960, 7675, 4661, 1079, 2668, 3420, 3940, 1415...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 5706, 4545, 12, 2890, 16, 23288, 67, 73, 11734, 4672, 309, 365, 18, 7398, 30, 365, 18, 9491, 18, 694, 10135, 12, 21, 13, 4250, 18, 15960, 7675, 4661, 1079, 2668, 3420, 3940, 1415...
gen = pop.gen() rep = pop.rep()
gen = pop.dvars().gen rep = pop.dvars().rep
def plot(self, pop, expr): gen = pop.gen() rep = pop.rep() data = pop.evaluate(expr) # if type(data) == type(0) or type(data) == type(0.): data = [data]
db4c9d7e7fcf2836ddd90adcfad0658882109589 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/401/db4c9d7e7fcf2836ddd90adcfad0658882109589/simuRPy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 12, 2890, 16, 1843, 16, 3065, 4672, 3157, 273, 1843, 18, 72, 4699, 7675, 4507, 2071, 273, 1843, 18, 72, 4699, 7675, 14462, 501, 273, 1843, 18, 21024, 12, 8638, 13, 468, 309, 618,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 12, 2890, 16, 1843, 16, 3065, 4672, 3157, 273, 1843, 18, 72, 4699, 7675, 4507, 2071, 273, 1843, 18, 72, 4699, 7675, 14462, 501, 273, 1843, 18, 21024, 12, 8638, 13, 468, 309, 618,...
if verbose: print "compiling string with syntax error"
def test_complex_args(self):
exec 'def f(a, a): pass'
8a99b5023931c5a01540bda67516235a8dfe8470 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8a99b5023931c5a01540bda67516235a8dfe8470/test_compile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1196, 296, 536, 284, 12, 69, 16, 279, 4672, 1342, 11, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1196, 296, 536, 284, 12, 69, 16, 279, 4672, 1342, 11, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
os.chmod(os.path.join(targetDir, os.path.basename(fileName)), RWX_ALL)
def copyFileChmodAll(fileName, targetDir): """ Copy the file fileName to target directory targetDir and chmod the file with the 666 permissions @param fileName full path to file @param targetDir destination directory """ try: shutil.copy(fileName, targetDir) os.chmod(os.path.join(targetDir, os.path.basename(fileName)), RWX_ALL) except Exception, e: print "[WARNING] Unable to copy file %s to output directory %s: %s" % (fileName, targetDir, e)
13b9a9b87ab9f25ee174dc029876ecccb77b01ad /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11651/13b9a9b87ab9f25ee174dc029876ecccb77b01ad/wrapper_processing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26955, 782, 1711, 1595, 12, 17812, 16, 19410, 4672, 3536, 5631, 326, 585, 3968, 358, 1018, 1867, 19410, 471, 13413, 326, 585, 598, 326, 1666, 6028, 4371, 632, 891, 3968, 1983, 589, 358, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26955, 782, 1711, 1595, 12, 17812, 16, 19410, 4672, 3536, 5631, 326, 585, 3968, 358, 1018, 1867, 19410, 471, 13413, 326, 585, 598, 326, 1666, 6028, 4371, 632, 891, 3968, 1983, 589, 358, ...
def __call__(self,inputs):
def __call__(self, inputs):
def __init__(self, inputs, outputs):
5fda268de0dda4bab796970bd52b0229fd793da1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11338/5fda268de0dda4bab796970bd52b0229fd793da1/systemnodes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4540, 16, 6729, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4540, 16, 6729, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if caldav_alarm_id: alarm_id = self.browse(cr, uid, is_exists).caldav_alarm_id.alarm_id self.write(cr, uid, case_id, {'alarm_id': alarm_id})
if val['caldav_alarm_id']: cal_alarm = self.browse(cr, uid, case_id).caldav_alarm_id alarm_id = cal_alarm.alarm_id and cal_alarm.alarm_id.id or False self.write(cr, uid, [case_id], {'alarm_id': alarm_id})
def import_cal(self, cr, uid, data, context={}): file_content = base64.decodestring(data) event_obj = self.pool.get('basic.calendar.event') event_obj.__attribute__.update(self.__attribute__)
596b4dfea94baa2cc5eda9f15b51a495a8adb2e9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/596b4dfea94baa2cc5eda9f15b51a495a8adb2e9/crm_meeting.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 771, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 12938, 4672, 585, 67, 1745, 273, 1026, 1105, 18, 4924, 1145, 371, 12, 892, 13, 871, 67, 2603, 273, 365, 18, 6011, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 771, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 12938, 4672, 585, 67, 1745, 273, 1026, 1105, 18, 4924, 1145, 371, 12, 892, 13, 871, 67, 2603, 273, 365, 18, 6011, 18, ...
IF(hijo.total='-',@subtotal:=padre.total/1.15,@subtotal:=padre.total+hijo.total/1.15) as 'subtotal',
IF(hijo.total='-',@subtotal:=padre.total/1.15,@subtotal:=(padre.total+hijo.total)/1.15) as 'subtotal',
def updateModels(self):
c94203f1ba49d9621d038b5e9928b908411642e6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11009/c94203f1ba49d9621d038b5e9928b908411642e6/cheques.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 8430, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 8430, 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, -...
raise error, 'option --%s not a unique prefix' % opt
raise GetoptError('option --%s not a unique prefix' % opt, opt)
def long_has_args(opt, longopts): optlen = len(opt) for i in range(len(longopts)): x, y = longopts[i][:optlen], longopts[i][optlen:] if opt != x: continue if y != '' and y != '=' and i+1 < len(longopts): if opt == longopts[i+1][:optlen]: raise error, 'option --%s not a unique prefix' % opt if longopts[i][-1:] in ('=', ): return 1, longopts[i][:-1] return 0, longopts[i] raise error, 'option --' + opt + ' not recognized'
a7904059d5d83aa20da1ab14c4b244a2aaeb5d0f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a7904059d5d83aa20da1ab14c4b244a2aaeb5d0f/getopt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1525, 67, 5332, 67, 1968, 12, 3838, 16, 1525, 4952, 4672, 2153, 1897, 273, 562, 12, 3838, 13, 364, 277, 316, 1048, 12, 1897, 12, 5748, 4952, 3719, 30, 619, 16, 677, 273, 1525, 4952, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1525, 67, 5332, 67, 1968, 12, 3838, 16, 1525, 4952, 4672, 2153, 1897, 273, 562, 12, 3838, 13, 364, 277, 316, 1048, 12, 1897, 12, 5748, 4952, 3719, 30, 619, 16, 677, 273, 1525, 4952, ...
<button name="%s" string="send_email" type="action" icon="gtk-apply" context="{'user_id':%s, 'user_type':'new', 'share_url': user%s_url}"/> """%(user.id, user.id, user.id, send_email_act_id, user.id, user.id)
<button name="do_send_email" string="Send Email" type="object" icon="gtk-apply" context="{'user_id':%s, 'user_type':'new', 'share_url': user%s_url}"/> """%(user.id, user.id, user.id, user.id, user.id)
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False,submenu=False): result = super(share_result, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar,submenu) user_obj = self.pool.get('res.users') data_obj = self.pool.get('ir.model.data') existing_user_ids = context.get('existing_user_ids', []) new_user_ids = context.get('new_user_ids', []) _arch_lst = """<form string="Share Users"> <separator colspan="4" string="Step 4: Share User Details"/> """ _fields = result['fields'] send_email_act = data_obj._get_id(cr, uid, 'base', 'share_email_act') send_email_act_id = data_obj.browse(cr, uid, send_email_act, context=context).res_id
ed4f2f3f1ea49ce5193367036970bb0e0c3381f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ed4f2f3f1ea49ce5193367036970bb0e0c3381f5/wizard_share.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1466, 67, 1945, 67, 588, 12, 2890, 16, 4422, 16, 4555, 16, 1476, 67, 350, 33, 7036, 16, 1476, 67, 723, 2218, 687, 2187, 819, 33, 7036, 16, 12748, 33, 8381, 16, 1717, 5414, 33, 8381, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1466, 67, 1945, 67, 588, 12, 2890, 16, 4422, 16, 4555, 16, 1476, 67, 350, 33, 7036, 16, 1476, 67, 723, 2218, 687, 2187, 819, 33, 7036, 16, 12748, 33, 8381, 16, 1717, 5414, 33, 8381, ...
def mapImageToPlane(self,image):
def mapImageToPlane(self, image):
def mapImageToPlane(self,image): """ Maps an Image object onto a Plane object
b02e75908a6bbb76d6965e9fcf5a405bd1478fe8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/b02e75908a6bbb76d6965e9fcf5a405bd1478fe8/plane.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 852, 2040, 774, 19505, 12, 2890, 16, 1316, 4672, 3536, 19837, 392, 3421, 733, 10170, 279, 3008, 8806, 733, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 852, 2040, 774, 19505, 12, 2890, 16, 1316, 4672, 3536, 19837, 392, 3421, 733, 10170, 279, 3008, 8806, 733, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if (not cur_point_within_frame) and (not last_point_within_frame):
def drawpoint_connect(self, aFullPNString, datapoint): #get datapoint x y values #convert to plot coordinates if self.trace_onoff[aFullPNString]==gtk.FALSE: return 0 x=self.convertx_to_plot(datapoint[0]) y=self.converty_to_plot(datapoint[1]) cur_point_within_frame=self.withinframes([x,y]) #getlastpoint, calculate change to the last lastx=self.lastx[aFullPNString] lasty=self.lasty[aFullPNString] self.lastx[aFullPNString]=x self.lasty[aFullPNString]=y last_point_within_frame=self.withinframes([lastx,lasty]) lastymax=self.lastymax[aFullPNString] lastymin=self.lastymin[aFullPNString] if lastx!=None : dx=abs(lastx-x)
8f18e3850a6316681f1074fff213ca716c4f5df5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/8f18e3850a6316681f1074fff213ca716c4f5df5/Plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 1153, 67, 3612, 12, 2890, 16, 279, 5080, 15124, 780, 16, 25252, 4672, 468, 588, 25252, 619, 677, 924, 468, 6283, 358, 3207, 5513, 309, 365, 18, 5129, 67, 265, 3674, 63, 69, 5080,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 1153, 67, 3612, 12, 2890, 16, 279, 5080, 15124, 780, 16, 25252, 4672, 468, 588, 25252, 619, 677, 924, 468, 6283, 358, 3207, 5513, 309, 365, 18, 5129, 67, 265, 3674, 63, 69, 5080,...
if value == "..": value = '/'.join(self.browser.wd.split('/')[:-1]) or '/' self.browse(None, value)
if self.view == self.VIEW_ARTIST: if value == "/": self.view_artist_level = 1 else: self.view_artist_level = self.view_artist_level + 1 self.browse(None, value)
def browserow(self, widget, path, column=0): if path is None: # Default to last item in selection: model, selected = self.browser_selection.get_selected_rows() if len(selected) >=1: path = (len(selected)-1,) else: path = (0,) value = self.browserdata.get_value(self.browserdata.get_iter(path), 1) if self.view == self.VIEW_ARTIST: if value == "/": self.view_artist_level = 1 elif value == "..": self.view_artist_level = self.view_artist_level - 1 else: self.view_artist_level = self.view_artist_level + 1 else: if value == "..": value = '/'.join(self.browser.wd.split('/')[:-1]) or '/' self.browse(None, value)
0da9815c248298a9268c10f25c59ea81e5bd319d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2312/0da9815c248298a9268c10f25c59ea81e5bd319d/sonata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4748, 543, 12, 2890, 16, 3604, 16, 589, 16, 1057, 33, 20, 4672, 309, 589, 353, 599, 30, 468, 2989, 358, 1142, 761, 316, 4421, 30, 938, 16, 3170, 273, 365, 18, 11213, 67, 10705, 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, 4748, 543, 12, 2890, 16, 3604, 16, 589, 16, 1057, 33, 20, 4672, 309, 589, 353, 599, 30, 468, 2989, 358, 1142, 761, 316, 4421, 30, 938, 16, 3170, 273, 365, 18, 11213, 67, 10705, 18, ...
+ "Assemble=" + AssemblerSh + " " + AssemblerFlags + "\n"
+ "Assemble=" + Assembler + " " + AssemblerFlags + "\n"
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32_VMS": CCompiler = "CCompiler" CCompilerFlags = " " elif Config == "ALPHA64_VMS": CCompiler = "CCompiler" CCompilerFlags = "/pointer_size=64 " elif StringTagged(Config, "SOLARIS") or Config == "SOLsun": CCompiler = "/usr/bin/CCompiler" CCompilerFlags = "-g -mt -xldscope=symbolic " else: # gcc platforms CCompiler = { "SOLgnu" : "/usr/sfw/bin/gcc", }.get(Config) or "gcc" CCompilerFlags = { "I386_INTERIX" : "-g ", # gcc -fPIC generates incorrect code on Interix "SOLgnu" : "-g ", # -fPIC? }.get(Config) or "-g -fPIC " CCompilerFlags = CCompilerFlags + ({ "AMD64_LINUX" : " -m64 -mno-align-double ", "AMD64_DARWIN" : " -arch x86_64 ", "PPC64_DARWIN" : " -arch ppc64 ", "ARM_DARWIN" : " -march=armv6 -mcpu=arm1176jzf-s ", "LINUXLIBC6" : " -m32 -mno-align-double ", "I386_LINUX" : " -m32 -mno-align-double ", "MIPS64_OPENBSD" : " -mabi=64 ", "SOLgnu" : " -m32 -mcpu=v9 ", "I386_SOLARIS" : " -xarch=pentium_pro -Kpic ", "AMD64_SOLARIS" : " -xarch=amd64 -Kpic ", "SOLsun" : " -xarch=v8plus -xcode=pic32 ", "SPARC32_SOLARIS" : " -xarch=v8plus -xcode=pic32 ", "SPARC64_SOLARIS" : " -xarch=v9 -xcode=pic32 ", "SPARC32_LINUX" : " -m32 -mcpu=v9 -munaligned-doubles ", "SPARC64_LINUX" : " -m64 -munaligned-doubles ", }.get(Config) or " ") Link = "$(CC) $(CFLAGS) *.mo *.io *.o " # link flags if StringTagged(Target, "DARWIN"): pass elif StringTagged(Target, "SOLARIS") or Target.startswith("SOL"): Link = Link + " -lrt -lm -lnsl -lsocket -lpthread " elif StringTagged(Target, "HPUX"): Link = Link + " -lrt -lm " elif StringTagged(Target, "INTERIX"): Link = Link + " -lm " else: Link = Link + " -lm -lpthread " # add -c to compiler but not link (i.e. not CCompilerFlags) Compile = "$(CC) $(CFLAGS) " if not StringTagged(Config, "VMS"): Compile = Compile + " -c " AssembleOnTarget = not vms AssembleOnHost = not AssembleOnTarget # pick assembler AssemblerFlags = " " if StringTagged(Target, "VMS") and AssembleOnTarget: AssemblerMk = "macro" # not right, come back to it later AssemblerSh = "macro" # not right, come back to it later AssemblerFlags = "/alpha " # not right, come back to it later elif Target == "I386_SOLARIS" or Target == "AMD64_SOLARIS": # # see http://gcc.gnu.org/ml/gcc/2010-05/msg00155.html # see http://gcc.gnu.org/install/specific.html#ix86-x-solaris210 # a = (" if test -x /usr/sfw/bin/gas ; then echo /usr/sfw/bin/gas ; \\\n" + " elif test -x /opt/csw/gnu/as ; then echo /opt/csw/gnu/as ; \\\n" + " else echo \"unable to find GNU assembler\" ; fi") AssemblerMk = "$(shell " + a + ")" AssemblerSh = "`" + a + "`" elif StringTagged(Target, "SOLARIS") or Target.startswith("SOL"): AssemblerMk = "/usr/ccs/bin/as" AssemblerSh = "/usr/ccs/bin/as" else: AssemblerMk = "as" AssemblerSh = "as" # set assembler flags if Target != "PPC32_OPENBSD" and Target != "PPC_LINUX": # "Tag" not right for LINUX due to LINUXLIBC6 # "Tag" not right for BSD or 64 either. if Target.find("LINUX") != -1 or Target.find("BSD") != -1: if Target.find("64") != -1 or (StringTagged(Target, "ALPHA") and not StringTagged(Target, "ALPHA32")): AssemblerFlags = AssemblerFlags + " --64" else: AssemblerFlags = AssemblerFlags + " --32" AssemblerFlags = (AssemblerFlags + ({ "AMD64_DARWIN" : " -arch x86_64 ", "PPC64_DARWIN" : " -arch ppc64 ", "ARM_DARWIN" : " -arch armv6 ", # -s puts symbols where linker won't automatically strip them "I386_SOLARIS" : " -s ", "AMD64_SOLARIS" : " -s -xarch=amd64 ", "SOLgnu" : " -s -xarch=v8plus ", "SOLsun" : " -s -xarch=v8plus ", "SPARC32_SOLARIS" : " -s -xarch=v8plus ", "SPARC64_SOLARIS" : " -s -xarch=v9 ", }.get(Target) or "")) GnuPlatformPrefix = { "ARM_DARWIN" : "arm-apple-darwin8-", "ALPHA32_VMS" : "alpha-dec-vms-", "ALPHA64_VMS" : "alpha64-dec-vms-", }.get(Target) or "" if not vms: CCompiler = GnuPlatformPrefix + CCompiler Link = GnuPlatformPrefix + Link if (not vms) or AssembleOnHost: AssemblerMk = GnuPlatformPrefix + AssemblerMk AssemblerSh = GnuPlatformPrefix + AssemblerSh # # squeeze runs of spaces and spaces at ends # CCompilerFlags = re.sub(" +", " ", CCompilerFlags) CCompilerFlags = re.sub(" +$", "", CCompilerFlags) CCompilerFlags = re.sub("^ +", "", CCompilerFlags) Compile = re.sub(" +", " ", Compile) Compile = re.sub(" +$", "", Compile) Compile = re.sub("^ +", "", Compile) Link = re.sub(" +", " ", Link) Link = re.sub(" +$", "", Link) AssemblerFlags = re.sub(" +", " ", AssemblerFlags) AssemblerFlags = re.sub(" +$", "", AssemblerFlags) BootDir = "./cm3-boot-" + Target + "-" + Version P = [ "m3cc", "import-libs", "m3core", "libm3", "sysutils", "m3middle", "m3quake", "m3objfile", "m3linker", "m3back", "m3front", "cm3" ] #DoPackage(["", "realclean"] + P) or sys.exit(1) DoPackage(["", "buildlocal"] + P) or sys.exit(1) try: shutil.rmtree(BootDir) except: pass try: os.mkdir(BootDir) except: pass # # This would probably be a good use of XSL (xml style sheets) # Make = open(os.path.join(BootDir, "make.sh"), "wb") VmsMake = open(os.path.join(BootDir, "vmsmake.com"), "wb") VmsLink = open(os.path.join(BootDir, "vmslink.opt"), "wb") Makefile = open(os.path.join(BootDir, "Makefile"), "wb") UpdateSource = open(os.path.join(BootDir, "updatesource.sh"), "wb") Objects = { } Makefile.write(".SUFFIXES:\n" + ".SUFFIXES: .c .is .ms .s .o .obj .io .mo\n\n" + "all: cm3\n\n" + "clean:\n" + "\trm -rf *.io *.mo *.o *.obj\n\n") for a in [UpdateSource, Make]: a.write("#!/bin/sh\n\n" + "set -e\n" + "set -x\n\n") for a in [Makefile]: a.write("# edit up here\n\n" + "CC ?= " + CCompiler + "\n" + "CFLAGS ?= " + CCompilerFlags + "\n" + "Compile=" + Compile + "\n" + "Assemble=" + AssemblerMk + " " + AssemblerFlags + "\n" + "Link=" + Link + "\n" + "\n# no more editing should be needed\n\n") for a in [Make]: a.write("# edit up here\n\n" + "CC=${CC:-" + CCompiler + "}\n" + "CFLAGS=${CFLAGS:-" + CCompilerFlags + "}\n" + "Compile=" + Compile + "\n" + "Assemble=" + AssemblerSh + " " + AssemblerFlags + "\n" + "Link=" + Link + "\n" + "\n# no more editing should be needed\n\n") for q in P: dir = GetPackagePath(q) for a in os.listdir(os.path.join(Root, dir, Config)): ext_c = a.endswith(".c") ext_h = a.endswith(".h") ext_s = a.endswith(".s") ext_ms = a.endswith(".ms") ext_is = a.endswith(".is") if not (ext_c or ext_h or ext_s or ext_ms or ext_is): continue fullpath = os.path.join(Root, dir, Config, a) if ext_h or ext_c or not vms or AssembleOnTarget: CopyFile(fullpath, BootDir) if ext_h: continue Object = GetObjectName(a) if Objects.get(Object): continue Objects[Object] = 1 if ext_c: VmsMake.write("$ " + Compile + " " + a + "\n") else: if AssembleOnHost: # must have cross assembler a = AssemblerMk + " " + fullpath + " -o " + BootDir + "/" + Object print(a) os.system(a) else: VmsMake.write("$ " + AssemblerMk + " " + a + "\n") VmsLink.write(Object + "/SELECTIVE_SEARCH\n") Makefile.write(".c.o:\n" + "\t$(Compile) -o $@ $<\n\n" + ".c.obj:\n" + "\t$(Compile) -o $@ $<\n\n" + ".is.io:\n" + "\t$(Assemble) -o $@ $<\n\n" + ".s.o:\n" + "\t$(Assemble) -o $@ $<\n\n" + ".ms.mo:\n" + "\t$(Assemble) -o $@ $<\n\n") Makefile.write("cm3:") Objects = Objects.keys() Objects.sort() k = 4 for a in Objects: k = k + 1 + len(a) if k > 76: # line wrap Makefile.write(" \\\n") k = 1 + len(a) Makefile.write(" " + a) Makefile.write("\n\t") VmsMake.write("$ set file/attr=(rfm=var,rat=none) *.o\n") VmsMake.write("$ set file/attr=(rfm=var,rat=none) *.obj\n") VmsMake.write("$ set file/attr=(rfm=var,rat=none) *.mo\n") VmsMake.write("$ set file/attr=(rfm=var,rat=none) *.io\n") VmsMake.write("$ link /executable=cm3.exe vmslink/options\n") for a in [Make, Makefile]: a.write("$(Link) -o cm3\n") for a in [ # # Add to this list as needed. # Adding more than necessary is ok -- assume the target system has no changes, # so we can replace whatever is there. # "m3-libs/libm3/src/os/POSIX/OSConfigPosix.m3", "m3-libs/libm3/src/random/m3makefile", "m3-libs/m3core/src/m3makefile", "m3-libs/m3core/src/Uwaitpid.quake", "m3-libs/m3core/src/thread.quake", "m3-libs/m3core/src/C/m3makefile", "m3-libs/m3core/src/C/" + Target + "/m3makefile", "m3-libs/m3core/src/C/Common/m3makefile", "m3-libs/m3core/src/Csupport/m3makefile", "m3-libs/m3core/src/float/m3makefile", "m3-libs/m3core/src/runtime/m3makefile", "m3-libs/m3core/src/runtime/common/m3makefile", "m3-libs/m3core/src/runtime/common/Compiler.tmpl", "m3-libs/m3core/src/runtime/common/m3text.h", "m3-libs/m3core/src/runtime/common/RTError.h", "m3-libs/m3core/src/runtime/common/RTMachine.i3", "m3-libs/m3core/src/runtime/common/RTProcess.h", "m3-libs/m3core/src/runtime/common/RTSignalC.c", "m3-libs/m3core/src/runtime/common/RTSignalC.h", "m3-libs/m3core/src/runtime/common/RTSignalC.i3", "m3-libs/m3core/src/runtime/common/RTSignal.i3", "m3-libs/m3core/src/runtime/common/RTSignal.m3", "m3-libs/m3core/src/runtime/" + Target + "/m3makefile", "m3-libs/m3core/src/runtime/" + Target + "/RTMachine.m3", "m3-libs/m3core/src/runtime/" + Target + "/RTSignal.m3", "m3-libs/m3core/src/runtime/" + Target + "/RTThread.m3", "m3-libs/m3core/src/text/TextLiteral.i3", "m3-libs/m3core/src/thread/m3makefile", "m3-libs/m3core/src/thread/PTHREAD/m3makefile", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThread.m3", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThreadC.i3", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThreadC.c", "m3-libs/m3core/src/time/POSIX/m3makefile", "m3-libs/m3core/src/unix/m3makefile", "m3-libs/m3core/src/unix/Common/m3makefile", "m3-libs/m3core/src/unix/Common/m3unix.h", "m3-libs/m3core/src/unix/Common/Udir.i3", "m3-libs/m3core/src/unix/Common/UdirC.c", "m3-libs/m3core/src/unix/Common/Usignal.i3", "m3-libs/m3core/src/unix/Common/Ustat.i3", "m3-libs/m3core/src/unix/Common/UstatC.c", "m3-libs/m3core/src/unix/Common/UtimeC.c", "m3-libs/m3core/src/unix/Common/Uucontext.i3", "m3-sys/cminstall/src/config-no-install/SOLgnu", "m3-sys/cminstall/src/config-no-install/SOLsun", "m3-sys/cminstall/src/config-no-install/Solaris.common", "m3-sys/cminstall/src/config-no-install/Unix.common", "m3-sys/cminstall/src/config-no-install/cm3cfg.common", "m3-sys/cminstall/src/config-no-install/" + Target, "m3-sys/m3cc/src/m3makefile", "m3-sys/m3cc/src/gcc/m3cg/parse.c", "m3-sys/m3middle/src/Target.i3", "m3-sys/m3middle/src/Target.m3", "scripts/python/pylib.py", "m3-libs/m3core/src/C/" + Target + "/Csetjmp.i3", "m3-libs/m3core/src/C/" + Target + "/m3makefile", "m3-libs/m3core/src/C/Common/Csetjmp.i3", "m3-libs/m3core/src/C/Common/Csignal.i3", "m3-libs/m3core/src/C/Common/Cstdio.i3", "m3-libs/m3core/src/C/Common/Cstring.i3", "m3-libs/m3core/src/C/Common/m3makefile", ]: source = os.path.join(Root, a) if FileExists(source): name = GetLastPathElement(a) reldir = RemoveLastPathElement(a) destdir = os.path.join(BootDir, reldir) dest = os.path.join(destdir, name) try: os.makedirs(destdir) except: pass CopyFile(source, dest) for b in [UpdateSource, Make]: b.write("mkdir -p /dev2/cm3/" + reldir + "\n") b.write("cp " + a + " /dev2/cm3/" + a + "\n") for a in [UpdateSource, Make, Makefile, VmsMake, VmsLink]: a.close() # write entirely new custom makefile for NT # We always have object files so just compile and link in one fell swoop. if StringTagged(Config, "NT") or Config == "NT386": DeleteFile("updatesource.sh") DeleteFile("make.sh") Makefile = open(os.path.join(BootDir, "Makefile"), "wb") Makefile.write("cm3.exe: *.io *.mo *.c\r\n" + " cl -Zi -MD *.c -link *.mo *.io -out:cm3.exe user32.lib kernel32.lib wsock32.lib comctl32.lib gdi32.lib advapi32.lib netapi32.lib\r\n") Makefile.close() if vms or StringTagged(Config, "NT") or Config == "NT386": _MakeZip(BootDir[2:]) else: _MakeTGZ(BootDir[2:])
80c2911fb3a8db0229ead96fcf41be3b36d96147 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9328/80c2911fb3a8db0229ead96fcf41be3b36d96147/pylib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26254, 13332, 225, 2552, 3998, 2042, 3998, 2042, 1011, 315, 300, 7137, 300, 10102, 300, 16125, 23, 6743, 67, 16374, 1546, 397, 1903, 225, 4049, 273, 315, 21, 6, 225, 468, 1220, 1779, 353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26254, 13332, 225, 2552, 3998, 2042, 3998, 2042, 1011, 315, 300, 7137, 300, 10102, 300, 16125, 23, 6743, 67, 16374, 1546, 397, 1903, 225, 4049, 273, 315, 21, 6, 225, 468, 1220, 1779, 353...
Takes a function and plots it in cylindrical coordinates in the domain specified by urange and vrange. This command is equivalent to:: sage: var('r,u,v') sage: T = (r*cos(u), r*sin(u), v, r)
Plots a function in cylindrical coordinates. This function is equivalent to:: sage: r,u,v=var('r,u,v') sage: f=u*v; urange=(u,0,pi); vrange=(v,0,pi) sage: T = (r*cos(u), r*sin(u), v, [u,v])
def cylindrical_plot3d(f, urange, vrange, **kwds): """ Takes a function and plots it in cylindrical coordinates in the domain specified by urange and vrange. This command is equivalent to:: sage: var('r,u,v') sage: T = (r*cos(u), r*sin(u), v, r) sage: plot3d(f, urange, vrange, transformation=T) INPUT: - ``f`` - a symbolic expression or function of two variables. - ``urange`` - a 3-tuple (u, u_min, u_max), the domain of the azimuth variable. - ``vrange`` - a 3-tuple (v, v_min, v_max), the domain of the elevation (z) variable. EXAMPLES: A portion of a cylinder of radius 2:: sage: var('fi,z') sage: cylindrical_plot3d(2,(fi,0,3*pi/2),(z,-2,2)) Some random figures: :: sage: cylindrical_plot3d(cosh(z),(fi,0,2*pi),(z,-2,2)) :: sage: cylindrical_plot3d(e^(-z^2)*(cos(4*fi)+2)+1,(fi,0,2*pi),(z,-2,2),plot_points=[80,80]).show(aspect_ratio=(1,1,1)) """ return plot3d(f, urange, vrange, transformation=Cylindrical('rho', ['phi', 'z']), **kwds)
f1a033cac620bf133b1f996c6db511753cab6f3d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f1a033cac620bf133b1f996c6db511753cab6f3d/plot3d.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27331, 728, 1512, 287, 67, 4032, 23, 72, 12, 74, 16, 8896, 726, 16, 331, 3676, 16, 2826, 25577, 4672, 3536, 3008, 6968, 279, 445, 316, 27331, 728, 1512, 287, 5513, 18, 225, 1220, 445, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27331, 728, 1512, 287, 67, 4032, 23, 72, 12, 74, 16, 8896, 726, 16, 331, 3676, 16, 2826, 25577, 4672, 3536, 3008, 6968, 279, 445, 316, 27331, 728, 1512, 287, 5513, 18, 225, 1220, 445, ...
ad = self.getaddress() if ad: return ad + self.getaddrlist() else: return []
result = [] while 1: ad = self.getaddress() if ad: result += ad else: break return result
def getaddrlist(self): """Parse all addresses.
78ec6245fafc8ef7e28921a1951782be3b00e371 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/78ec6245fafc8ef7e28921a1951782be3b00e371/_parseaddr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 4793, 1098, 12, 2890, 4672, 3536, 3201, 777, 6138, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 1652, 336, 4793, 1098, 12, 2890, 4672, 3536, 3201, 777, 6138, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
f.write('<li><a href="%s">%s</a>\n' % (linkname, displayname))
f.write('<li><a href="%s">%s</a>\n' % (urllib.quote(linkname), cgi.escape(displayname)))
def list_directory(self, path): """Helper to produce a directory listing (absent index.html).
8456f70bb3e365497c4759de9fb6acb8ededd8ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/8456f70bb3e365497c4759de9fb6acb8ededd8ca/SimpleHTTPServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 5149, 12, 2890, 16, 589, 4672, 3536, 2276, 358, 11402, 279, 1867, 11591, 261, 5113, 319, 770, 18, 2620, 2934, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 5149, 12, 2890, 16, 589, 4672, 3536, 2276, 358, 11402, 279, 1867, 11591, 261, 5113, 319, 770, 18, 2620, 2934, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
raise ValueError, "maketrans arguments must have same length"
raise ValueError, "maketrans arguments must have same length"
def maketrans(fromstr, tostr): """maketrans(frm, to) -> string Return a translation table (a string of 256 bytes long) suitable for use in string.translate. The strings frm and to must be of the same length. """ if len(fromstr) != len(tostr): raise ValueError, "maketrans arguments must have same length" global _idmapL if not _idmapL: _idmapL = map(None, _idmap) L = _idmapL[:] fromstr = map(ord, fromstr) for i in range(len(fromstr)): L[fromstr[i]] = tostr[i] return joinfields(L, "")
88d5ff255d5485ac38c4bf57c239535247da6f74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/88d5ff255d5485ac38c4bf57c239535247da6f74/string.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29796, 16354, 634, 12, 2080, 701, 16, 358, 701, 4672, 3536, 81, 581, 16354, 634, 12, 4840, 81, 16, 358, 13, 317, 533, 225, 2000, 279, 4794, 1014, 261, 69, 533, 434, 8303, 1731, 1525, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29796, 16354, 634, 12, 2080, 701, 16, 358, 701, 4672, 3536, 81, 581, 16354, 634, 12, 4840, 81, 16, 358, 13, 317, 533, 225, 2000, 279, 4794, 1014, 261, 69, 533, 434, 8303, 1731, 1525, ...
if isinstance(kwargs['x'], str) and kwargs['x'] == 'auto':
if isinstance(kwargs['x'], basestring) \ and kwargs['x'] == 'auto':
def setp(self, **kwargs): """ Set line properties. Legal keyword arguments: x, y, format. The x and y arguments hold the x and y points of a curve. The format string is just passed on to setformat, which parses the contents and sets the format information. """ PlotProperties.setp(self, **kwargs) # Here x,y values can be any SequenceType # The proper casting should be in the backends plotroutine
16957020dfab27764f858f60149c6a7e084c0a3f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4727/16957020dfab27764f858f60149c6a7e084c0a3f/common.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 84, 12, 2890, 16, 2826, 4333, 4672, 3536, 1000, 980, 1790, 18, 17167, 287, 4932, 1775, 30, 619, 16, 677, 16, 740, 18, 1021, 619, 471, 677, 1775, 6887, 326, 619, 471, 677, 3143, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 84, 12, 2890, 16, 2826, 4333, 4672, 3536, 1000, 980, 1790, 18, 17167, 287, 4932, 1775, 30, 619, 16, 677, 16, 740, 18, 1021, 619, 471, 677, 1775, 6887, 326, 619, 471, 677, 3143, ...
for r in self.s.rows: if self.fillOne(r): self.fillAll() return
def fillAll(self): # rows for r in self.s.rows: if self.fillOne(r): self.fillAll() return # waste if not self.s.waste.cards and self.s.talon.cards: self.s.talon.dealCards() if self.fillOne(self.s.waste): self.fillAll()
b39a6c690d1b090c3a26eac4c49f979651acc111 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11444/b39a6c690d1b090c3a26eac4c49f979651acc111/klondike.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3636, 1595, 12, 2890, 4672, 468, 2595, 364, 436, 316, 365, 18, 87, 18, 3870, 30, 309, 365, 18, 5935, 3335, 12, 86, 4672, 365, 18, 5935, 1595, 1435, 327, 468, 341, 14725, 309, 486, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3636, 1595, 12, 2890, 4672, 468, 2595, 364, 436, 316, 365, 18, 87, 18, 3870, 30, 309, 365, 18, 5935, 3335, 12, 86, 4672, 365, 18, 5935, 1595, 1435, 327, 468, 341, 14725, 309, 486, 36...
if not sngl.ifo in frametype: frametype = sngl.ifo + "_" + frametype
frametype=__patchFrameTypeDef__(frametype,sngl.ifo,sngl.time)
def get_RDS_R_L1(self): """ """ tmpList=list() for sngl in self.coinc.sngls: #Determine file type frametype,channelName=stfu_pipe.figure_out_type(sngl.time,sngl.ifo,'rds') if not sngl.ifo in frametype: frametype = sngl.ifo + "_" + frametype myMaskIndex="*/%s/*/%s/index.html"%(frametype,sngl.time) myMaskPNG="*/%s/*/%s/*.png"%(frametype,sngl.time) myMaskSummary="*/%s/*/%s/*summary.txt"%(frametype,sngl.time) tmpList.extend(fnmatch.filter(self.fsys,myMaskIndex)) tmpList.extend(fnmatch.filter(self.fsys,myMaskPNG)) tmpList.extend(fnmatch.filter(self.fsys,myMaskSummary)) return tmpList
cabde339221bbc8a748cfedf8ed7be0711b1e7f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/cabde339221bbc8a748cfedf8ed7be0711b1e7f9/makeCheckListWiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 54, 3948, 67, 54, 67, 48, 21, 12, 2890, 4672, 3536, 3536, 1853, 682, 33, 1098, 1435, 364, 272, 3368, 80, 316, 365, 18, 12645, 71, 18, 87, 3368, 3251, 30, 468, 8519, 585, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 54, 3948, 67, 54, 67, 48, 21, 12, 2890, 4672, 3536, 3536, 1853, 682, 33, 1098, 1435, 364, 272, 3368, 80, 316, 365, 18, 12645, 71, 18, 87, 3368, 3251, 30, 468, 8519, 585, 6...
if len(filter(lambda x:x, split(output, '\n'))) > num:
if len([x for x in output.split('\n') if x]) > num:
def VerifyService(self, entry): if entry.attrib['status'] == 'off': cmd = Popen4("/usr/sbin/update-rc.d -n -f %s remove" % (entry.attrib['name'])) num = 1 else: cmd = Popen4("/usr/sbin/update-rc.d -n -f %s remove" % (entry.attrib['name'])) num = 2 cstat = cmd.poll() output = '' while cstat == -1: output += cmd.fromchild.read() cstat = cmd.poll() >> 8 if len(filter(lambda x:x, split(output, '\n'))) > num: return False return True
47a54440f26f6dc5903e304284a1116ab32aa1c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/47a54440f26f6dc5903e304284a1116ab32aa1c3/Debian.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8553, 1179, 12, 2890, 16, 1241, 4672, 309, 1241, 18, 14588, 3292, 2327, 3546, 422, 296, 3674, 4278, 1797, 273, 14339, 24, 2932, 19, 13640, 19, 87, 4757, 19, 2725, 17, 1310, 18, 72, 300...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8553, 1179, 12, 2890, 16, 1241, 4672, 309, 1241, 18, 14588, 3292, 2327, 3546, 422, 296, 3674, 4278, 1797, 273, 14339, 24, 2932, 19, 13640, 19, 87, 4757, 19, 2725, 17, 1310, 18, 72, 300...
def recv_from (self, addr, buflen=1024, flags=0):
def recv_from(self, addr, buflen=1024, flags=0):
def recv_from (self, addr, buflen=1024, flags=0): self._checkClosed() if self._sslobj: raise ValueError("recv_from not allowed on instances of %s" % self.__class__) else: return socket.recv_from(self, addr, buflen, flags)
80e3b731afdd5339bee603af01a80f172af03c74 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/80e3b731afdd5339bee603af01a80f172af03c74/ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10665, 67, 2080, 12, 2890, 16, 3091, 16, 1681, 1897, 33, 2163, 3247, 16, 2943, 33, 20, 4672, 365, 6315, 1893, 7395, 1435, 309, 365, 6315, 1049, 383, 441, 30, 1002, 2068, 2932, 18334, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10665, 67, 2080, 12, 2890, 16, 3091, 16, 1681, 1897, 33, 2163, 3247, 16, 2943, 33, 20, 4672, 365, 6315, 1893, 7395, 1435, 309, 365, 6315, 1049, 383, 441, 30, 1002, 2068, 2932, 18334, 6...
atts['class'] = node['enumtype']
classes.append(node['enumtype']) if self.is_compactable(node) and not self.compact_simple: classes.append('simple')
def visit_enumerated_list(self, node): atts = {} if 'start' in node: atts['style'] = 'counter-reset: item %d;' % (node['start'] - 1) if 'enumtype' in node: atts['class'] = node['enumtype'] # @@@ To do: prefix, suffix. self.context.append((self.compact_simple, self.compact_p)) self.compact_p = False if self.is_compactable(node) and not self.compact_simple: atts['class'] = ' '.join(node.get('classes', []) + ['simple']) self.body.append(self.starttag(node, 'ol', **atts))
37a1331c890f033ea838e409c76d00b91e0392af /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1278/37a1331c890f033ea838e409c76d00b91e0392af/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 7924, 19007, 67, 1098, 12, 2890, 16, 756, 4672, 15687, 273, 2618, 309, 296, 1937, 11, 316, 756, 30, 15687, 3292, 4060, 3546, 273, 296, 7476, 17, 6208, 30, 761, 738, 72, 4359,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 7924, 19007, 67, 1098, 12, 2890, 16, 756, 4672, 15687, 273, 2618, 309, 296, 1937, 11, 316, 756, 30, 15687, 3292, 4060, 3546, 273, 296, 7476, 17, 6208, 30, 761, 738, 72, 4359,...
tickets = apply_ticket_permissions(self.env, req, milestone, tickets)
tickets = apply_ticket_permissions(self.env, req, milestone, tickets)
def process_request(self, req): req.perm.require('ROADMAP_VIEW')
517187fd8e15835f4c27204d1d2cef2e8fb9a563 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2831/517187fd8e15835f4c27204d1d2cef2e8fb9a563/roadmap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2293, 12, 2890, 16, 1111, 4672, 1111, 18, 12160, 18, 6528, 2668, 1457, 1880, 8352, 67, 12145, 6134, 2, 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, 1207, 67, 2293, 12, 2890, 16, 1111, 4672, 1111, 18, 12160, 18, 6528, 2668, 1457, 1880, 8352, 67, 12145, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
self.on_remove_stock(self, w)
self.on_remove_stock(w)
def on_tree_keypress(self, w, event): if event.keyval == 65535: self.on_remove_stock(self, w) return False
8b0a283e1bb7aee43a7b97cf0d6cae1810b29b9a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11078/8b0a283e1bb7aee43a7b97cf0d6cae1810b29b9a/preferences.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 3413, 67, 856, 1028, 12, 2890, 16, 341, 16, 871, 4672, 309, 871, 18, 856, 1125, 422, 10147, 30, 365, 18, 265, 67, 4479, 67, 15381, 12, 91, 13, 225, 327, 1083, 225, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 603, 67, 3413, 67, 856, 1028, 12, 2890, 16, 341, 16, 871, 4672, 309, 871, 18, 856, 1125, 422, 10147, 30, 365, 18, 265, 67, 4479, 67, 15381, 12, 91, 13, 225, 327, 1083, 225, 2, -100...
return _(filltxt + "\n" + outlinetxt)
return filltxt + "\n" + outlinetxt
def ColorInfo(): if len(self.document.selection) != 1 or self.document.CanUngroup(): fill_frame["style"]='ColorWatchDisabled' outline_frame["style"]='ColorWatchDisabled' fill_frame['background']=app.uimanager.currentColorTheme.bg outline_frame['background']=app.uimanager.currentColorTheme.bg return "" properties = self.document.CurrentProperties() filltxt='' outlinetxt='' try: fill_frame["style"]='ColorWatchNormal' fillcolor=rgb_to_tk(properties.fill_pattern.Color().RGB()) fill_frame["background"]=fillcolor filltxt='Fill: ' + properties.fill_pattern.Color().toString() except: fill_frame["style"]='ColorWatchTransp' filltxt='Fill: None' try: outline_frame["style"]='ColorWatchNormal' outline_frame["background"]=rgb_to_tk(properties.line_pattern.Color().RGB()) outlinetxt='Outline: '+ str(math.ceil(math.floor(10**4*properties.line_width/2.83465)/10)/1000) +' mm' except: outline_frame["style"]='ColorWatchTransp' outlinetxt='Outline: None' return _(filltxt + "\n" + outlinetxt)
5b0b1ea6519d06fdf8f2bc5a6c7256f8f274e195 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3123/5b0b1ea6519d06fdf8f2bc5a6c7256f8f274e195/mainwindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5563, 966, 13332, 309, 562, 12, 2890, 18, 5457, 18, 10705, 13, 480, 404, 578, 365, 18, 5457, 18, 2568, 984, 1655, 13332, 3636, 67, 3789, 9614, 4060, 11929, 2218, 2957, 5234, 8853, 11, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5563, 966, 13332, 309, 562, 12, 2890, 18, 5457, 18, 10705, 13, 480, 404, 578, 365, 18, 5457, 18, 2568, 984, 1655, 13332, 3636, 67, 3789, 9614, 4060, 11929, 2218, 2957, 5234, 8853, 11, ...
logging.getLogger('schema').info("Table '%s': column '%s': added a NOT NULL constraint" % (self._table, k))
self.__schema.debug("Table '%s': column '%s': added a NOT NULL constraint", self._table, k)
f_pg_def = res[0]
2601e23d09b38f3de363ad11deafc4840b5020b5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/2601e23d09b38f3de363ad11deafc4840b5020b5/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 284, 67, 8365, 67, 536, 273, 400, 63, 20, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 284, 67, 8365, 67, 536, 273, 400, 63, 20, 65, 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,...
'A problem was found in the global product registry but ' \
'A problem was found in the global product registry but '
def initialize(app): # Initialize the application # Initialize the cache: app.Control_Panel.initialize_cache() # The following items marked b/c are backward compatibility hacks # which make sure that expected system objects are added to the # bobobase. This is required because the bobobase in use may pre- # date the introduction of certain system objects such as those # which provide Lever support. # b/c: Ensure that Control Panel exists. if not hasattr(app, 'Control_Panel'): cpl=ApplicationManager() cpl._init() app._setObject('Control_Panel', cpl) get_transaction().note('Added Control_Panel') get_transaction().commit() # b/c: Ensure that a ProductFolder exists. if not hasattr(app.Control_Panel.aq_base, 'Products'): app.Control_Panel.Products=App.Product.ProductFolder() get_transaction().note('Added Control_Panel.Products') get_transaction().commit() # b/c: Ensure that std err msg exists. if not hasattr(app, 'standard_error_message'): import Document Document.manage_addDocument( app, 'standard_error_message', 'Standard Error Message', _standard_error_msg) get_transaction().note('Added standard_error_message') get_transaction().commit() # b/c: Ensure that Owner role exists. if hasattr(app, '__ac_roles__') and not ('Owner' in app.__ac_roles__): app.__ac_roles__=app.__ac_roles__ + ('Owner',) get_transaction().note('Added Owner role') get_transaction().commit() # Make sure we have Globals root=app._p_jar.root() if not root.has_key('ZGlobals'): import BTree app._p_jar.root()['ZGlobals']=BTree.BTree() get_transaction().note('Added Globals') get_transaction().commit() # Install the initial user. if hasattr(app, 'acl_users'): users = app.acl_users if hasattr(users, '_createInitialUser'): app.acl_users._createInitialUser() get_transaction().note('Created initial user') get_transaction().commit() install_products(app) # Check the global product registry for problems. Note that if the # check finds problems but fails to successfully rebuild the global # registry we abort the transaction so that we don't leave it in an # indeterminate state. try: if app.checkGlobalRegistry(): get_transaction().note('Rebuilt global product registry') get_transaction().commit() except: LOG('Zope', ERROR, 'A problem was found in the global product registry but ' \ 'the attempt to rebuild the registry failed.', error=sys.exc_info()) get_transaction().abort()
8b47dcb4d7182cde7f464983d969a7e5b5d45ee3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/8b47dcb4d7182cde7f464983d969a7e5b5d45ee3/Application.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 2910, 4672, 468, 9190, 326, 2521, 225, 468, 9190, 326, 1247, 30, 595, 18, 3367, 67, 5537, 18, 11160, 67, 2493, 1435, 225, 468, 1021, 3751, 1516, 9350, 324, 19, 71, 854, 12555...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 2910, 4672, 468, 9190, 326, 2521, 225, 468, 9190, 326, 1247, 30, 595, 18, 3367, 67, 5537, 18, 11160, 67, 2493, 1435, 225, 468, 1021, 3751, 1516, 9350, 324, 19, 71, 854, 12555...
sage: sage.calculus.calculus.arctan2(2,3)
sage: arctan2 = sage.calculus.calculus.arctan2 sage: arctan2(1,2) arctan(1/2) sage: float(arctan2(1,2)) 0.46364760900080609 sage: arctan2(2,3)
def arctan2(y, x): r""" Modified version of arctan function, since it is used by Maxima. \code{arctan2(y,x) = arctan(y/x)} This is mainly for internal use. EXAMPLES: sage: sage.calculus.calculus.arctan2(2,3) arctan(2/3) """ return arctan(y/x)
d1f03481eeb1ab289a64ddc19cb4a6cf446b5a97 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/d1f03481eeb1ab289a64ddc19cb4a6cf446b5a97/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27397, 22, 12, 93, 16, 619, 4672, 436, 8395, 21154, 1177, 434, 27397, 445, 16, 3241, 518, 353, 1399, 635, 4238, 13888, 18, 225, 521, 710, 95, 297, 299, 304, 22, 12, 93, 16, 92, 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, 27397, 22, 12, 93, 16, 619, 4672, 436, 8395, 21154, 1177, 434, 27397, 445, 16, 3241, 518, 353, 1399, 635, 4238, 13888, 18, 225, 521, 710, 95, 297, 299, 304, 22, 12, 93, 16, 92, 13, ...
'$CC -Wl,-t -o /dev/null 2>&1 -l' + name
'$CC -Wl,-t -o ' + ccout + ' 2>&1 -l' + name
def _findLib_gcc(name): expr = '[^\(\)\s]*lib%s\.[^\(\)\s]*' % name cmd = 'if type gcc &>/dev/null; then CC=gcc; else CC=cc; fi;' \ '$CC -Wl,-t -o /dev/null 2>&1 -l' + name try: fdout, outfile = tempfile.mkstemp() fd = os.popen(cmd) trace = fd.read() err = fd.close() finally: try: os.unlink(outfile) except OSError, e: if e.errno != errno.ENOENT: raise res = re.search(expr, trace) if not res: return None return res.group(0)
2bdf29ec28fa5f5284d57672d63fdd8402030a92 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2bdf29ec28fa5f5284d57672d63fdd8402030a92/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4720, 5664, 67, 75, 952, 12, 529, 4672, 3065, 273, 5271, 17134, 4713, 5153, 87, 5772, 2941, 9, 87, 5834, 15441, 4713, 5153, 87, 65, 4035, 738, 508, 1797, 273, 296, 430, 618, 314, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4720, 5664, 67, 75, 952, 12, 529, 4672, 3065, 273, 5271, 17134, 4713, 5153, 87, 5772, 2941, 9, 87, 5834, 15441, 4713, 5153, 87, 65, 4035, 738, 508, 1797, 273, 296, 430, 618, 314, ...
self.assertEqual(self.linter.is_report_enabled('RP0001'), True)
self.assertEqual(self.linter.report_is_enabled('RP0001'), True)
def test_enable_report(self): self.assertEqual(self.linter.is_report_enabled('RP0001'), True) self.linter.disable('RP0001') self.assertEqual(self.linter.is_report_enabled('RP0001'), False) self.linter.enable('RP0001') self.assertEqual(self.linter.is_report_enabled('RP0001'), True)
7a63f9b28bade89d2c46e6e763455173ab562536 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/928/7a63f9b28bade89d2c46e6e763455173ab562536/unittest_lint.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 7589, 67, 6006, 12, 2890, 4672, 365, 18, 11231, 5812, 12, 2890, 18, 80, 2761, 18, 6006, 67, 291, 67, 5745, 2668, 54, 52, 13304, 19899, 1053, 13, 365, 18, 80, 2761, 18, 8394...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7589, 67, 6006, 12, 2890, 4672, 365, 18, 11231, 5812, 12, 2890, 18, 80, 2761, 18, 6006, 67, 291, 67, 5745, 2668, 54, 52, 13304, 19899, 1053, 13, 365, 18, 80, 2761, 18, 8394...
movfp st(0), ufp1
def macroop FST_P { movfp st(0), ufp1 rdip t7 stfp ufp1, seg, riprel, disp
683d6d46f6da1e0e0f377a5be1a14f7b6b4233a4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6787/683d6d46f6da1e0e0f377a5be1a14f7b6b4233a4/load_or_store_floating_point.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 478, 882, 67, 52, 288, 9437, 625, 268, 27, 384, 7944, 582, 7944, 21, 16, 2291, 16, 436, 625, 2878, 16, 16232, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 478, 882, 67, 52, 288, 9437, 625, 268, 27, 384, 7944, 582, 7944, 21, 16, 2291, 16, 436, 625, 2878, 16, 16232, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
'history_line': [(0, 0, {'description': body['body'], 'email': msg['From']})],
'history_line': [(0, 0, {'description': body['body'], 'email': msg['From'][:84]})],
def msg_user(self, msg, id): body = self.msg_body_get(msg)
48ccd4e9897657b356f82c8cbff9b13e2ca2e8ba /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/48ccd4e9897657b356f82c8cbff9b13e2ca2e8ba/tinyerp-mailgate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1234, 67, 1355, 12, 2890, 16, 1234, 16, 612, 4672, 1417, 273, 365, 18, 3576, 67, 3432, 67, 588, 12, 3576, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1234, 67, 1355, 12, 2890, 16, 1234, 16, 612, 4672, 1417, 273, 365, 18, 3576, 67, 3432, 67, 588, 12, 3576, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
pprint.pprint(v)
pprint.pprint(v,self.stdout)
def _show_payload(self,k,v): if v: import pprint self._start(k) pprint.pprint(v) self._finish(k)
bc915edf828a5bbd246acf2f5a8aa5640a677698 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/bc915edf828a5bbd246acf2f5a8aa5640a677698/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4500, 67, 7648, 12, 2890, 16, 79, 16, 90, 4672, 309, 331, 30, 1930, 18771, 365, 6315, 1937, 12, 79, 13, 18771, 18, 84, 1188, 12, 90, 16, 2890, 18, 10283, 13, 365, 6315, 13749, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4500, 67, 7648, 12, 2890, 16, 79, 16, 90, 4672, 309, 331, 30, 1930, 18771, 365, 6315, 1937, 12, 79, 13, 18771, 18, 84, 1188, 12, 90, 16, 2890, 18, 10283, 13, 365, 6315, 13749, ...
"""To check the correctness of an element, we compare
""" To check the correctness of an element, we compare
def check(self, verbose=False): """To check the correctness of an element, we compare the theoretical dimension computed Weyl character formula with the actual one obtained by adding up the multiplicities. EXAMPLES: sage: F4 = WeylCharacterRing(['F',4]) sage: [F4(x).check(verbose = true) for x in F4.lattice().fundamental_weights()] [[52, 52], [1274, 1274], [273, 273], [26, 26]] """ theoretical = sum(self._hdict[k]*self._lattice.weyl_dimension(self._parent.VS(k)) for k in self._hdict) practical = sum(self._mdict[k] for k in self._mdict) if verbose: return [theoretical, practical] else: return theoretical == practical
af4f5f46d5016de6167398d67987ba1855db181e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/af4f5f46d5016de6167398d67987ba1855db181e/weyl_characters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 16, 3988, 33, 8381, 4672, 3536, 2974, 866, 326, 3434, 4496, 434, 392, 930, 16, 732, 3400, 326, 326, 479, 88, 1706, 4968, 8470, 678, 402, 80, 3351, 8013, 598, 326, 3214, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 16, 3988, 33, 8381, 4672, 3536, 2974, 866, 326, 3434, 4496, 434, 392, 930, 16, 732, 3400, 326, 326, 479, 88, 1706, 4968, 8470, 678, 402, 80, 3351, 8013, 598, 326, 3214, ...
self.tree.hlist.delete("entry", e.treeroot)
self.tree.hlist.delete_entry(e.treeroot)
def remove_entity(self, e): if (self.in_destroy): return if (hasattr(e, "treeroot")): self.cleanup_item(e.treeroot) self.tree.hlist.delete("entry", e.treeroot) del self.treedata[e.treeroot] pass return
63d1eac0908bc23c141e3886250e4e88ee87bdb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3867/63d1eac0908bc23c141e3886250e4e88ee87bdb1/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 1096, 12, 2890, 16, 425, 4672, 309, 261, 2890, 18, 267, 67, 11662, 4672, 327, 309, 261, 5332, 1747, 12, 73, 16, 315, 27427, 264, 1632, 6, 3719, 30, 365, 18, 16732, 67, 1726...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 1096, 12, 2890, 16, 425, 4672, 309, 261, 2890, 18, 267, 67, 11662, 4672, 327, 309, 261, 5332, 1747, 12, 73, 16, 315, 27427, 264, 1632, 6, 3719, 30, 365, 18, 16732, 67, 1726...
_CHROMIUMOS_OVERLAYS_DIRECTORY)
overlay_directory)
def main(argv): try: argv = gflags.FLAGS(argv) if len(argv) != 2: _PrintUsageAndDie('Must specify a valid command') else: command = argv[1] except gflags.FlagsError, e : _PrintUsageAndDie(str(e)) package_list = gflags.FLAGS.packages.split() if gflags.FLAGS.commit_ids: commit_id_list = gflags.FLAGS.commit_ids.split() else: commit_id_list = None _CheckSaneArguments(package_list, commit_id_list, command) os.chdir(_CHROMIUMOS_OVERLAYS_DIRECTORY) if command == 'clean': _Clean() elif command == 'commit': work_branch = _GitBranch(_STABLE_BRANCH_NAME) work_branch.CreateBranch() if not work_branch.Exists(): generate_test_report.Die('Unable to create stabilizing branch in %s' % _CHROMIUMOS_OVERLAYS_DIRECTORY) index = 0 try: for index in range(len(package_list)): # Gather the package and optional commit id to work on. package = package_list[index] commit_id = "" if commit_id_list: commit_id = commit_id_list[index] _Print('Working on %s' % package) worker = EBuildStableMarker(_EBuild(package, commit_id)) worker.RevEBuild(commit_id) worker.CommitChange(_GIT_COMMIT_MESSAGE % (package, commit_id)) except (OSError, IOError), e: print ('An exception occurred\n' 'Only the following packages were revved: %s\n' 'Note you will have to go into %s' 'and reset the git repo yourself.' % (package_list[:index], _CHROMIUMOS_OVERLAYS_DIRECTORY)) raise e elif command == 'push': _PushChange()
52ed3f969a6f70a1ba9767de39064db467fdc4b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/52ed3f969a6f70a1ba9767de39064db467fdc4b9/cros_mark_as_stable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 4672, 775, 30, 5261, 273, 314, 7133, 18, 17836, 12, 19485, 13, 309, 562, 12, 19485, 13, 480, 576, 30, 389, 5108, 5357, 1876, 23196, 2668, 10136, 4800, 279, 923, 1296, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 19485, 4672, 775, 30, 5261, 273, 314, 7133, 18, 17836, 12, 19485, 13, 309, 562, 12, 19485, 13, 480, 576, 30, 389, 5108, 5357, 1876, 23196, 2668, 10136, 4800, 279, 923, 1296, ...
def help(self, s): """ EXAMPLES: sage: maxima.help('gcd')
def _command_runner(self, command, s, redirect=True): """ Run \code{command} in a new Maxima session and return its output as an \code{AsciiArtString}. If redirect is set to False, then the output of the command is not returned as a string. Instead, it behaves like os.system. This is used for interactive things like Maxima's demos. See maxima.demo? EXAMPLES: sage: maxima._command_runner('describe', 'gcd')
def help(self, s): """ EXAMPLES: sage: maxima.help('gcd') #not tested -- Function: gcd (<p_1>, <p_2>, <x_1>, ...) ... """ if sage.server.support.EMBEDDED_MODE: os.system('maxima --very-quiet -r "describe(%s); "< /dev/null'%s) else: os.system('maxima --very-quiet -r "describe(%s);"'%s)
327892a197ad345f40545c760b7d91fabbe80a24 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/327892a197ad345f40545c760b7d91fabbe80a24/maxima.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3076, 67, 18156, 12, 2890, 16, 1296, 16, 272, 16, 3136, 33, 5510, 4672, 3536, 1939, 521, 710, 95, 3076, 97, 316, 279, 394, 4238, 13888, 1339, 471, 327, 2097, 876, 487, 392, 521, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3076, 67, 18156, 12, 2890, 16, 1296, 16, 272, 16, 3136, 33, 5510, 4672, 3536, 1939, 521, 710, 95, 3076, 97, 316, 279, 394, 4238, 13888, 1339, 471, 327, 2097, 876, 487, 392, 521, ...
self.tframe = TFrame(root, name = 'tools_frame', style='FlatFrame', borderwidth=2) self.tframe.pack(side = LEFT, fill=Y)
self.tframe = TFrame(root, name='tools_frame', style='FlatFrame', borderwidth=2) self.tframe.pack(side=LEFT, fill=Y)
def build_window(self): root = self.application.root p_frame = TFrame(root, style='FlatFrame') p_frame.pack(side = 'right', fill = Y) palette_frame = TFrame(p_frame, style='FlatFrame', borderwidth=3) palette_frame.pack(side = 'right', fill = Y) b = TLabel(p_frame, style='VLine3') self.pc=PluginContainer(p_frame,self.root, self) self.pc.rborder=b b = TLabel(root, style='VLine2') b.pack(side = 'right', fill = Y)
5bd05aab08ecc99debb8be46af1003105e4183ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3123/5bd05aab08ecc99debb8be46af1003105e4183ab/mainwindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 5668, 12, 2890, 4672, 1365, 273, 365, 18, 3685, 18, 3085, 225, 293, 67, 3789, 273, 399, 3219, 12, 3085, 16, 2154, 2218, 16384, 3219, 6134, 293, 67, 3789, 18, 2920, 12, 5564, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 5668, 12, 2890, 4672, 1365, 273, 365, 18, 3685, 18, 3085, 225, 293, 67, 3789, 273, 399, 3219, 12, 3085, 16, 2154, 2218, 16384, 3219, 6134, 293, 67, 3789, 18, 2920, 12, 5564, ...
if options.debug: print "DEBUG: + adding rpm:", name
if options.debug: print timestamp(), "DEBUG: + adding rpm:", name
def gen_rpm_list(path): '''Walk dir tree in path and return a list of rpms found''' rpms = [] if os.path.isdir(path): # Dir should exist, but just to be safe os.chdir(path) for root, dirs, files in os.walk("."): for name in files: if re.search('\.rpm$', name): rpms.append(os.path.join(root,name)) if options.debug: print "DEBUG: + adding rpm:", name else: if options.debug: print "DEBUG: - not an rpm:", name if options.debug: print "DEBUG: returning list of rpms:", rpms return rpms
07e2421549e748ccb09a392c60834eaea3e54917 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3457/07e2421549e748ccb09a392c60834eaea3e54917/dell-satellite-sync.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 67, 86, 7755, 67, 1098, 12, 803, 4672, 9163, 9463, 1577, 2151, 316, 589, 471, 327, 279, 666, 434, 8715, 959, 1392, 26418, 8715, 959, 273, 5378, 309, 1140, 18, 803, 18, 291, 1214,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 67, 86, 7755, 67, 1098, 12, 803, 4672, 9163, 9463, 1577, 2151, 316, 589, 471, 327, 279, 666, 434, 8715, 959, 1392, 26418, 8715, 959, 273, 5378, 309, 1140, 18, 803, 18, 291, 1214,...
"Returns the month for each date in self._dates."
"""Returns the month for each date in self._dates."""
def month(self): "Returns the month for each date in self._dates." return self._dates.month
fa55c4c696ec9c654bfe9099b550f554a05ac28b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/fa55c4c696ec9c654bfe9099b550f554a05ac28b/tseries.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3138, 12, 2890, 4672, 3536, 1356, 326, 3138, 364, 1517, 1509, 316, 365, 6315, 9683, 12123, 327, 365, 6315, 9683, 18, 7496, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 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, 3138, 12, 2890, 4672, 3536, 1356, 326, 3138, 364, 1517, 1509, 316, 365, 6315, 9683, 12123, 327, 365, 6315, 9683, 18, 7496, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
info =self._storage.undoInfo()
info = self._storage.undoInfo()
def checkTwoObjectUndoAgain(self): p32, p33, p52, p53 = map(pickle.dumps, (32, 33, 52, 53)) # Like the above, but the first revision of the objects are stored in # different transactions. oid1 = self._storage.new_oid() oid2 = self._storage.new_oid() revid1 = self._dostore(oid1, data=31) revid2 = self._dostore(oid2, data=51) # Update those same two objects self._storage.tpc_begin(self._transaction) revid1 = self._storage.store(oid1, revid1, p32, '', self._transaction) revid2 = self._storage.store(oid2, revid2, p52, '', self._transaction) # Finish the transaction self._storage.tpc_vote(self._transaction) self._storage.tpc_finish(self._transaction) assert revid1 == revid2 # Now attempt to undo the transaction containing two objects info =self._storage.undoInfo() tid = info[0]['id'] self._storage.tpc_begin(self._transaction) oids = self._storage.transactionalUndo(tid, self._transaction) self._storage.tpc_vote(self._transaction) self._storage.tpc_finish(self._transaction) assert len(oids) == 2 assert oid1 in oids and oid2 in oids data, revid1 = self._storage.load(oid1, '') assert pickle.loads(data) == 31 data, revid2 = self._storage.load(oid2, '') assert pickle.loads(data) == 51 # Like the above, but this time, the second transaction contains only # one object. self._storage.tpc_begin(self._transaction) revid1 = self._storage.store(oid1, revid1, p33, '', self._transaction) revid2 = self._storage.store(oid2, revid2, p53, '', self._transaction) # Finish the transaction self._storage.tpc_vote(self._transaction) self._storage.tpc_finish(self._transaction) assert revid1 == revid2 # Update in different transactions revid1 = self._dostore(oid1, revid=revid1, data=34) revid2 = self._dostore(oid2, revid=revid2, data=54) # Now attempt to undo the transaction containing two objects info =self._storage.undoInfo() tid = info[1]['id'] self._storage.tpc_begin(self._transaction) oids = self._storage.transactionalUndo(tid, self._transaction) self._storage.tpc_vote(self._transaction) self._storage.tpc_finish(self._transaction) assert len(oids) == 1 assert oid1 in oids and not oid2 in oids data, revid1 = self._storage.load(oid1, '') assert pickle.loads(data) == 33 data, revid2 = self._storage.load(oid2, '') assert pickle.loads(data) == 54
f8d1d748f6f1881c067d94a9a0868707bc5ec509 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/f8d1d748f6f1881c067d94a9a0868707bc5ec509/TransactionalUndoStorage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 11710, 921, 31224, 23530, 12, 2890, 4672, 293, 1578, 16, 293, 3707, 16, 293, 9401, 16, 293, 8643, 273, 852, 12, 20847, 18, 13302, 1121, 16, 261, 1578, 16, 13159, 16, 18106, 16, 15...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 11710, 921, 31224, 23530, 12, 2890, 4672, 293, 1578, 16, 293, 3707, 16, 293, 9401, 16, 293, 8643, 273, 852, 12, 20847, 18, 13302, 1121, 16, 261, 1578, 16, 13159, 16, 18106, 16, 15...
before_hook.expect_call()
before_hook.expect_call(self.test)
def test_call_run_once(self): # setup self.god.stub_function(self.test, 'drop_caches_between_iterations') self.god.stub_function(self.test, 'run_once') self.god.stub_function(self.test, 'postprocess_iteration') self.god.stub_function(self.test, 'analyze_perf_constraints') before_hook = self.god.create_mock_function('before_hook') after_hook = self.god.create_mock_function('after_hook')
822511ecc0d6dc2432fe77afc7093b5611545be9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12268/822511ecc0d6dc2432fe77afc7093b5611545be9/test_unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1991, 67, 2681, 67, 8243, 12, 2890, 4672, 468, 3875, 365, 18, 75, 369, 18, 12847, 67, 915, 12, 2890, 18, 3813, 16, 296, 7285, 67, 17703, 281, 67, 15019, 67, 19330, 6134, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1991, 67, 2681, 67, 8243, 12, 2890, 4672, 468, 3875, 365, 18, 75, 369, 18, 12847, 67, 915, 12, 2890, 18, 3813, 16, 296, 7285, 67, 17703, 281, 67, 15019, 67, 19330, 6134, 36...
print contribs
def testCrippen(self): mol = Chem.MolFromSmiles("NCO"); contribs = rdMD._CalcCrippenContribs(mol) print contribs
eb3d7200100aca05ea5a309a31e9472b8555fb9f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9195/eb3d7200100aca05ea5a309a31e9472b8555fb9f/testMolDescriptors.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 39, 21335, 1907, 12, 2890, 4672, 12629, 273, 26542, 18, 49, 355, 1265, 9552, 1449, 2932, 50, 3865, 8863, 13608, 87, 273, 9437, 6188, 6315, 25779, 39, 21335, 1907, 442, 665, 87, 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, 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, 39, 21335, 1907, 12, 2890, 4672, 12629, 273, 26542, 18, 49, 355, 1265, 9552, 1449, 2932, 50, 3865, 8863, 13608, 87, 273, 9437, 6188, 6315, 25779, 39, 21335, 1907, 442, 665, 87, 12,...
gMonitor.registerActivity("Iteration","Agent Loops/min","MigrationMonitoringAgent", "Loops", gMonitor.OP_SUM)
gMonitor.registerActivity( "Iteration", "Agent Loops/min", "MigrationMonitoringAgent", "Loops", gMonitor.OP_SUM )
def initialize(self): self.ReplicaManager = ReplicaManager() self.DataLog = DataLoggingClient() self.DataIntegrityClient = DataIntegrityClient() if self.am_getOption('DirectDB',False): from DIRAC.StorageManagementSystem.DB.MigrationMonitoringDB import MigrationMonitoringDB self.MigrationMonitoringDB = MigrationMonitoringDB() else: from DIRAC.StorageManagementSystem.Client.MigrationMonitoringClient import MigrationMonitoringClient self.MigrationMonitoringDB = MigrationMonitoringClient()
d0365a9152f6e7105162edd475d5401448bfdaed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/d0365a9152f6e7105162edd475d5401448bfdaed/MigrationMonitoringAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 2890, 4672, 365, 18, 14222, 1318, 273, 16928, 1318, 1435, 365, 18, 751, 1343, 273, 1910, 7735, 1227, 1435, 365, 18, 751, 30669, 1227, 273, 1910, 30669, 1227, 1435, 309, 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, 4046, 12, 2890, 4672, 365, 18, 14222, 1318, 273, 16928, 1318, 1435, 365, 18, 751, 1343, 273, 1910, 7735, 1227, 1435, 365, 18, 751, 30669, 1227, 273, 1910, 30669, 1227, 1435, 309, 365, 18...
self.exclude = None
self.exclude = []
def setDefault(self): self.mandatory = True self.exclude = None
393d17602b2adf1d0a044c508779a4dd97ce7fb6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5988/393d17602b2adf1d0a044c508779a4dd97ce7fb6/provisioning.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9277, 12, 2890, 4672, 365, 18, 889, 8452, 273, 1053, 365, 18, 10157, 273, 599, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 9277, 12, 2890, 4672, 365, 18, 889, 8452, 273, 1053, 365, 18, 10157, 273, 599, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
%s
%(start_string_prefix)s
def parse(self, text, lineno, memo, parent): """ Return 2 lists: nodes (text and inline elements), and system_messages.
9fe47ec4311156cad473d8ed8bf0dba5fd73c14e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/9fe47ec4311156cad473d8ed8bf0dba5fd73c14e/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 977, 16, 7586, 16, 11063, 16, 982, 4672, 3536, 2000, 576, 6035, 30, 2199, 261, 955, 471, 6370, 2186, 3631, 471, 2619, 67, 6833, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 977, 16, 7586, 16, 11063, 16, 982, 4672, 3536, 2000, 576, 6035, 30, 2199, 261, 955, 471, 6370, 2186, 3631, 471, 2619, 67, 6833, 18, 2, -100, -100, -100, -100, -100,...
'status': self.read_status_file(collection_id),
'status': self.read_status_file(collection_id, writer),
def do_render_status(self, post_data): try: collection_id = post_data['collection_id'] writer = post_data['writer'] except KeyError, exc: return self.error_response('POST argument required: %s' % exc) self.check_collection_id(collection_id) output_path = self.get_path(collection_id, self.output_filename, writer) if os.path.exists(output_path): return self.json_response({ 'collection_id': collection_id, 'writer': writer, 'state': 'finished', }) error_path = self.get_path(collection_id, self.error_filename, writer) if os.path.exists(error_path): text = unicode(open(error_path, 'rb').read(), 'utf-8', 'ignore') return self.json_response({ 'collection_id': collection_id, 'writer': writer, 'state': 'failed', 'error': text, }) return self.json_response({ 'collection_id': collection_id, 'writer': writer, 'state': 'progress', 'status': self.read_status_file(collection_id), })
a92d27f954e4bdf52bd4116e100d91fb9de35dde /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12391/a92d27f954e4bdf52bd4116e100d91fb9de35dde/serve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 5902, 67, 2327, 12, 2890, 16, 1603, 67, 892, 4672, 775, 30, 1849, 67, 350, 273, 1603, 67, 892, 3292, 5548, 67, 350, 3546, 2633, 273, 1603, 67, 892, 3292, 6299, 3546, 1335, 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, 741, 67, 5902, 67, 2327, 12, 2890, 16, 1603, 67, 892, 4672, 775, 30, 1849, 67, 350, 273, 1603, 67, 892, 3292, 5548, 67, 350, 3546, 2633, 273, 1603, 67, 892, 3292, 6299, 3546, 1335, 4...
Tx = ord(raw_binary[1])*65536+ord(raw_binary[2])*256+ord(raw_binary[3]) Ty = ord(raw_binary[4])*65536+ord(raw_binary[5])*256+ord(raw_binary[6]) Tz = ord(raw_binary[7])*65536+ord(raw_binary[8])*256+ord(raw_binary[9])
Tx = ord(raw_binary[10])*65536+ord(raw_binary[11])*256+ord(raw_binary[12]) Ty = ord(raw_binary[13])*65536+ord(raw_binary[14])*256+ord(raw_binary[15]) Tz = ord(raw_binary[16])*65536+ord(raw_binary[17])*256+ord(raw_binary[18])
def binary_to_ft( raw_binary ): counts_per_force = 192 counts_per_torque = 10560 #raw_binary[0] = error value #TODO: this error is a checksum byte that we should watch for #corrupted transmission Fx = ord(raw_binary[1])*65536+ord(raw_binary[2])*256+ord(raw_binary[3]) Fy = ord(raw_binary[4])*65536+ord(raw_binary[5])*256+ord(raw_binary[6]) Fz = ord(raw_binary[7])*65536+ord(raw_binary[8])*256+ord(raw_binary[9]) Tx = ord(raw_binary[1])*65536+ord(raw_binary[2])*256+ord(raw_binary[3]) Ty = ord(raw_binary[4])*65536+ord(raw_binary[5])*256+ord(raw_binary[6]) Tz = ord(raw_binary[7])*65536+ord(raw_binary[8])*256+ord(raw_binary[9]) _temp_val = [] for c,list in zip([counts_per_force, counts_per_torque], [[Fx,Fy,Fz], [Tx,Ty,Tz]]): for val in list: if val > 8388607: #Adjust for two's complement val -= 16777216 val /= float(c) #scale so the values are in N and Nm _temp_val.append(val) Fx = _temp_val[0] Fy = _temp_val[1] Fz = _temp_val[2] Tx = _temp_val[3] Ty = _temp_val[4] Tz = _temp_val[5] return [Fx,Fy,Fz,Tx,Ty,Tz]
a710c8247617d53bc6cf018cdaca8f9f31f5e166 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8117/a710c8247617d53bc6cf018cdaca8f9f31f5e166/FTSensor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3112, 67, 869, 67, 1222, 12, 1831, 67, 8578, 262, 30, 6880, 67, 457, 67, 5734, 225, 273, 20217, 6880, 67, 457, 67, 13039, 1857, 273, 1728, 4313, 20, 225, 468, 1899, 67, 8578, 63, 20,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3112, 67, 869, 67, 1222, 12, 1831, 67, 8578, 262, 30, 6880, 67, 457, 67, 5734, 225, 273, 20217, 6880, 67, 457, 67, 13039, 1857, 273, 1728, 4313, 20, 225, 468, 1899, 67, 8578, 63, 20,...
return ""
return []
def addState(key): if dominfo[key] == 1: states.append(key)
85049df8f5a7948ca68f8d0ce00717ab13a1f8b4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6195/85049df8f5a7948ca68f8d0ce00717ab13a1f8b4/XendVMMetrics.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 1119, 12, 856, 4672, 309, 4092, 1376, 63, 856, 65, 422, 404, 30, 5493, 18, 6923, 12, 856, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 527, 1119, 12, 856, 4672, 309, 4092, 1376, 63, 856, 65, 422, 404, 30, 5493, 18, 6923, 12, 856, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...