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
"Return the system identifier for the current event." return None
"Return the system identifier for the current event." return None
def getSystemId(self):
d3d7bb4bfc15c5224e3fb0c3fea8be0163db5c70 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/d3d7bb4bfc15c5224e3fb0c3fea8be0163db5c70/xmlreader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12996, 548, 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, 12996, 548, 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, -...
'OR planned_date IS NULL)) '\
')) '\
def products_by_location(self, cursor, user, location_ids, product_ids=None, with_childs=False, skip_zero=True, context=None): """ Compute for each location and product the stock quantity in the default uom of the product.
93e4602fa0fbb259aef89b41945d6e51956f82b1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9298/93e4602fa0fbb259aef89b41945d6e51956f82b1/product.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10406, 67, 1637, 67, 3562, 12, 2890, 16, 3347, 16, 729, 16, 2117, 67, 2232, 16, 3017, 67, 2232, 33, 7036, 16, 598, 67, 3624, 87, 33, 8381, 16, 2488, 67, 7124, 33, 5510, 16, 819, 33...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10406, 67, 1637, 67, 3562, 12, 2890, 16, 3347, 16, 729, 16, 2117, 67, 2232, 16, 3017, 67, 2232, 33, 7036, 16, 598, 67, 3624, 87, 33, 8381, 16, 2488, 67, 7124, 33, 5510, 16, 819, 33...
xincludate(dom)
xincludate(dom, argv[0])
def xincludate(dom, dropns = []): remove_attrs = [] for i in xrange(dom.documentElement.attributes.length): attr = dom.documentElement.attributes.item(i) if attr.prefix == 'xmlns': if attr.localName in dropns: remove_attrs.append(attr) else: dropns.append(attr.localName) for attr in remove_attrs: dom.documentElement.removeAttributeNode(attr) for include in dom.getElementsByTagNameNS(NS_XI, 'include'): href = include.getAttribute('href') subdom = xml.dom.minidom.parse(href) xincludate(subdom, dropns) if './' in href: subdom.documentElement.setAttribute('xml:base', href) include.parentNode.replaceChild(subdom.documentElement, include)
69abf631df39849a6e35cc67fa6422f97925acd3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7593/69abf631df39849a6e35cc67fa6422f97925acd3/xincludator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 619, 267, 830, 89, 712, 12, 9859, 16, 3640, 2387, 273, 5378, 4672, 1206, 67, 7039, 273, 5378, 364, 277, 316, 12314, 12, 9859, 18, 5457, 1046, 18, 4350, 18, 2469, 4672, 1604, 273, 4092,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 619, 267, 830, 89, 712, 12, 9859, 16, 3640, 2387, 273, 5378, 4672, 1206, 67, 7039, 273, 5378, 364, 277, 316, 12314, 12, 9859, 18, 5457, 1046, 18, 4350, 18, 2469, 4672, 1604, 273, 4092,...
os.makedirs(os.path.dirname(cachep), mode=0777)
try: os.makedirs(os.path.dirname(cachep), mode=0777) except: time.sleep(5) os.makedirs(os.path.dirname(cachep), mode=0777)
def open(self): time.sleep(5) self._main_prefix = self._card_prefix = None if islinux: try: self.open_linux() except DeviceError: time.sleep(3) self.open_linux() if iswindows: try: self.open_windows() except DeviceError: time.sleep(3) self.open_windows() if isosx: try: self.open_osx() except DeviceError: time.sleep(3) self.open_osx() if self._card_prefix is not None: try: cachep = os.path.join(self._card_prefix, self.CACHE_XML) if not os.path.exists(cachep): os.makedirs(os.path.dirname(cachep), mode=0777) f = open(cachep, 'wb') f.write(u'''<?xml version="1.0" encoding="UTF-8"?>
133d1d761baeb0bd8f24d0cb9409a0043337d85c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/133d1d761baeb0bd8f24d0cb9409a0043337d85c/driver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 12, 2890, 4672, 813, 18, 19607, 12, 25, 13, 365, 6315, 5254, 67, 3239, 273, 365, 6315, 3327, 67, 3239, 273, 599, 309, 353, 20132, 30, 775, 30, 365, 18, 3190, 67, 20132, 1435, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 12, 2890, 4672, 813, 18, 19607, 12, 25, 13, 365, 6315, 5254, 67, 3239, 273, 365, 6315, 3327, 67, 3239, 273, 599, 309, 353, 20132, 30, 775, 30, 365, 18, 3190, 67, 20132, 1435, 1...
def son2_item_event(self, widget, event=None): if event.type == gtk.gdk.BUTTON_PRESS: if event.button == 1: gcompris.sound.play_ogg("melody/son2") return gtk.FALSE def son3_item_event(self, widget, event=None): if event.type == gtk.gdk.BUTTON_PRESS: if event.button == 1: gcompris.sound.play_ogg("melody/son3") return gtk.FALSE def son4_item_event(self, widget, event=None): if event.type == gtk.gdk.BUTTON_PRESS: if event.button == 1: gcompris.sound.play_ogg("melody/son4") return gtk.FALSE
def son1_item_event(self, widget, event=None): if event.type == gtk.gdk.BUTTON_PRESS: if event.button == 1: gcompris.sound.play_ogg("melody/son1") return gtk.FALSE
d0b9a61ff7e201727e6e488e54d1db34d86881e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/d0b9a61ff7e201727e6e488e54d1db34d86881e4/melody.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18882, 21, 67, 1726, 67, 2575, 12, 2890, 16, 3604, 16, 871, 33, 7036, 4672, 309, 871, 18, 723, 422, 22718, 18, 75, 2883, 18, 20068, 67, 22526, 30, 309, 871, 18, 5391, 422, 404, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18882, 21, 67, 1726, 67, 2575, 12, 2890, 16, 3604, 16, 871, 33, 7036, 4672, 309, 871, 18, 723, 422, 22718, 18, 75, 2883, 18, 20068, 67, 22526, 30, 309, 871, 18, 5391, 422, 404, 30, ...
i = M.rfind('[C\x1b[C\n') if i != -1: M = M[i+len('[C\x1b[C\n'):] x.append(M)
if UNAME == 'Darwin': phrase = L else: phrase = '[C\x1b[C\n' i = M.rfind(phrase) if i > 1: M = M[i+len(phrase):] x.append(M.strip())
def eval(self, code, strip=True): self._synchronize() code = str(code) code = code.strip() code = code.replace('\n',' ') x = [] for L in code.split('\n'): if L != '': try: s = self.__in_seq + 1 pr = '\[%s\]>'%s #M = self._eval_line(L, wait_for_prompt=pr) M = self._eval_line(L, wait_for_prompt=self._prompt) i = M.rfind('[C\x1b[C\n') if i != -1: M = M[i+len('[C\x1b[C\n'):] x.append(M) self.__in_seq = s except KeyboardInterrupt: self._keyboard_interrupt() except TypeError, s: return 'error evaluating "%s":\n%s'%(code,s) return '\n'.join(x)
3c18e73031891983df373fa01c7337f27e0c190c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/3c18e73031891983df373fa01c7337f27e0c190c/lisp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5302, 12, 2890, 16, 981, 16, 2569, 33, 5510, 4672, 365, 6315, 87, 2600, 554, 1435, 981, 273, 609, 12, 710, 13, 981, 273, 981, 18, 6406, 1435, 981, 273, 981, 18, 2079, 2668, 64, 82, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5302, 12, 2890, 16, 981, 16, 2569, 33, 5510, 4672, 365, 6315, 87, 2600, 554, 1435, 981, 273, 609, 12, 710, 13, 981, 273, 981, 18, 6406, 1435, 981, 273, 981, 18, 2079, 2668, 64, 82, ...
th.append(xul.Splitter(_class="tree-splitter"))
th.append(xul.Splitter(_class=u"tree-splitter"))
def __init__(self, headerLabels, mapper, items=None, **kwargs): t = xul.Tree(**kwargs) th = xul.TreeCols() for cell in headerLabels: th.append(xul.TreeCol(flex=1, label=cell)) th.append(xul.Splitter(_class="tree-splitter")) t.append(th) tc = xul.TreeChildren() t.append(tc) self.tree = t self.treeChildren = tc self.clientIDtoItem = {} self.wrappedHandlers = {}
4be5471eb689be3e6968aa3370e51532dc413281 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2333/4be5471eb689be3e6968aa3370e51532dc413281/composite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1446, 5888, 16, 5815, 16, 1516, 33, 7036, 16, 2826, 4333, 4672, 268, 273, 619, 332, 18, 2471, 12, 636, 4333, 13, 286, 273, 619, 332, 18, 2471, 8011, 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, 1001, 2738, 972, 12, 2890, 16, 1446, 5888, 16, 5815, 16, 1516, 33, 7036, 16, 2826, 4333, 4672, 268, 273, 619, 332, 18, 2471, 12, 636, 4333, 13, 286, 273, 619, 332, 18, 2471, 8011, 14...
'DBPort': {'signature': update_signature}}
'DBPort': {'signature': update_signature}, 'DBGroup': {'workflow': update_workflow}}
def update_sigstring(old_obj, translate_dict): return old_obj.db_spec
b3a2a5134793632fcea9ab31592d997a27d91755 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6341/b3a2a5134793632fcea9ab31592d997a27d91755/v0_9_4.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 7340, 1080, 12, 1673, 67, 2603, 16, 4204, 67, 1576, 4672, 327, 1592, 67, 2603, 18, 1966, 67, 2793, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 7340, 1080, 12, 1673, 67, 2603, 16, 4204, 67, 1576, 4672, 327, 1592, 67, 2603, 18, 1966, 67, 2793, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
@xfail
def test_table_style_parsing_1(): """http://code.pediapress.com/wiki/ticket/172""" s = '{| class="prettytable"\n|-\n|blub\n|align="center"|+bla\n|}\n' r=parse(s) cells = r.find(parser.Cell) print "VLIST:", cells[1].vlist assert cells[1].vlist == dict(align="center"), "bad vlist"
89e40ec3e97700072d194cfac87c6a7de1270a76 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12391/89e40ec3e97700072d194cfac87c6a7de1270a76/test_parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2121, 67, 4060, 67, 24979, 67, 21, 13332, 3536, 2505, 2207, 710, 18, 1845, 77, 438, 663, 18, 832, 19, 13044, 19, 16282, 19, 28406, 8395, 272, 273, 2292, 96, 667, 1546, 19073,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2121, 67, 4060, 67, 24979, 67, 21, 13332, 3536, 2505, 2207, 710, 18, 1845, 77, 438, 663, 18, 832, 19, 13044, 19, 16282, 19, 28406, 8395, 272, 273, 2292, 96, 667, 1546, 19073,...
self.tags = {}
self.tags = odict()
def __init__(self, name): self.name = name self.value = None self.tags = {}
6de1b29629397bc7328f1a44da7530ea2ff53dac /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2770/6de1b29629397bc7328f1a44da7530ea2ff53dac/annotationparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 4672, 365, 18, 529, 273, 508, 365, 18, 1132, 273, 599, 365, 18, 4156, 273, 2618, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 4672, 365, 18, 529, 273, 508, 365, 18, 1132, 273, 599, 365, 18, 4156, 273, 2618, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
return "[%json]" % r
return "[%s]" % r
def dump_list(item): r = "" for element in item: if r: r += "," r += dumps(element) return "[%json]" % r
e880137ada44591f4ec05036b28036095c7dcd24 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14305/e880137ada44591f4ec05036b28036095c7dcd24/compactjson.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 67, 1098, 12, 1726, 4672, 436, 273, 1408, 364, 930, 316, 761, 30, 309, 436, 30, 436, 1011, 5753, 436, 1011, 6711, 12, 2956, 13, 327, 30048, 87, 4279, 738, 436, 225, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 67, 1098, 12, 1726, 4672, 436, 273, 1408, 364, 930, 316, 761, 30, 309, 436, 30, 436, 1011, 5753, 436, 1011, 6711, 12, 2956, 13, 327, 30048, 87, 4279, 738, 436, 225, 2, -100, -1...
"audioconvert ! audioresample ! " + _WAV_PCM_PARSE + " ! wavenc name=stw_wavenc"
"audioconvert ! wavenc name=stw_wavenc"
def source_to_wav(source, sink): """ Converts a given source element to wav format and sends it to sink element. To convert a media file to a wav using gst-launch: source ! decodebin ! audioconvert ! audioresample ! $_WAV_PCM_PARSE ! wavenc """ bin = gst.parse_launch( "decodebin name=stw_decodebin !" "audioconvert ! audioresample ! " + _WAV_PCM_PARSE + " ! wavenc name=stw_wavenc" ) oper = GstOperation(sink, bin) decoder = bin.get_by_name("stw_decodebin") encoder = bin.get_by_name("stw_wavenc") oper.bin.add(source) oper.bin.add(sink) source.link(decoder) encoder.link(sink) return oper
70ec8e50990300492f63464d4188f59deba13fd8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2207/70ec8e50990300492f63464d4188f59deba13fd8/audio.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1084, 67, 869, 67, 24801, 12, 3168, 16, 9049, 4672, 3536, 20377, 279, 864, 1084, 930, 358, 19342, 740, 471, 9573, 518, 358, 9049, 930, 18, 225, 2974, 1765, 279, 3539, 585, 358, 279, 19...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1084, 67, 869, 67, 24801, 12, 3168, 16, 9049, 4672, 3536, 20377, 279, 864, 1084, 930, 358, 19342, 740, 471, 9573, 518, 358, 9049, 930, 18, 225, 2974, 1765, 279, 3539, 585, 358, 279, 19...
return "--output=%s:%s" % shellEscape(bz2mode, xmlbz2)
return "--output=%s:%s" % shellEscape((bz2mode, xmlbz2))
def buildFilters(self, runner): """Construct the output filter options for dumpTextPass.php""" xmlbz2 = self._path(runner, "bz2") if runner.config.bzip2[-6:] == "dbzip2": bz2mode = "dbzip2" else: bz2mode = "bzip2" return "--output=%s:%s" % shellEscape(bz2mode, xmlbz2)
ed93a88b0e3d072036883711475f8385cbb47336 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9870/ed93a88b0e3d072036883711475f8385cbb47336/worker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 5422, 12, 2890, 16, 8419, 4672, 3536, 7249, 326, 876, 1034, 702, 364, 4657, 1528, 6433, 18, 2684, 8395, 2025, 25292, 22, 273, 365, 6315, 803, 12, 18156, 16, 315, 25292, 22, 7923, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 5422, 12, 2890, 16, 8419, 4672, 3536, 7249, 326, 876, 1034, 702, 364, 4657, 1528, 6433, 18, 2684, 8395, 2025, 25292, 22, 273, 365, 6315, 803, 12, 18156, 16, 315, 25292, 22, 7923, ...
del self.hrefs[item.href]
if item.href in self.hrefs: del self.hrefs[item.href]
def remove(self, item): """Removes :param:`item` from the manifest.""" if item in self.ids: item = self.ids[item] del self.ids[item.id] del self.hrefs[item.href] self.items.remove(item) if item in self.oeb.spine: self.oeb.spine.remove(item)
4f4902481142953bd622de7d3beb3908eed9d22f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/4f4902481142953bd622de7d3beb3908eed9d22f/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 12, 2890, 16, 761, 4672, 3536, 6220, 294, 891, 28288, 1726, 68, 628, 326, 5643, 12123, 309, 761, 316, 365, 18, 2232, 30, 761, 273, 365, 18, 2232, 63, 1726, 65, 1464, 365, 18, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 12, 2890, 16, 761, 4672, 3536, 6220, 294, 891, 28288, 1726, 68, 628, 326, 5643, 12123, 309, 761, 316, 365, 18, 2232, 30, 761, 273, 365, 18, 2232, 63, 1726, 65, 1464, 365, 18, 2...
real_dst = get_safe_path(real_dst)
real_dst = get_safe_path(os.path.join(dst, _basename(src)))
def move(src, dst, overwrite=False): """Recursively move a file or directory to another location. This is similar to the Unix "mv" command. If the destination is a directory or a symlink to a directory, the source is moved inside the directory. The destination path must not already exist. If the destination already exists but is not a directory, it may be overwritten depending on os.rename() semantics. If the destination is on our current filesystem, then rename() is used. Otherwise, src is copied to the destination and then removed. A lot more could be done here... A look at a mv.c shows a lot of the issues this implementation glosses over. """ real_dst = dst if not overwrite and os.path.isdir(dst): real_dst = os.path.join(dst, _basename(src)) if os.path.exists(real_dst): raise Error("Destination path '%s' already exists" % real_dst) if not overwrite: real_dst = get_safe_path(real_dst) try: os.rename(src, real_dst) except OSError: if os.path.isdir(src): if _destinsrc(src, dst): raise Error("Cannot move a directory '%s' into itself '%s'." % (src, dst)) for _ in copytree(src, real_dst, symlinks=True, overwrite=overwrite): yield rmtree(src) else: for _ in copy2(src, real_dst, symlinks=True, overwrite=overwrite): yield os.unlink(src)
d01a6613f2a34c6fb5b92c1d661f9ab32a7c2086 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5729/d01a6613f2a34c6fb5b92c1d661f9ab32a7c2086/shutil_generatorized.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3635, 12, 4816, 16, 3046, 16, 6156, 33, 8381, 4672, 3536, 12474, 3635, 279, 585, 578, 1867, 358, 4042, 2117, 18, 1220, 353, 7281, 358, 326, 9480, 315, 17509, 6, 1296, 18, 225, 971, 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, 3635, 12, 4816, 16, 3046, 16, 6156, 33, 8381, 4672, 3536, 12474, 3635, 279, 585, 578, 1867, 358, 4042, 2117, 18, 1220, 353, 7281, 358, 326, 9480, 315, 17509, 6, 1296, 18, 225, 971, 326...
id+=1 make_collapsible_html('action', actionName, output, id, status)
indice +=1 make_collapsible_html('action', actionName, output, indice, status)
def pretty_print(m): output = m.group(1) actionName = m.group(2) status = m.group(3) # handle pretty-printing of static-analysis tools if actionName == 'cc_checker': output = print_log_cc_checker(output)
c0bf364b2176965a73f059454a07e5f91cef6f55 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7314/c0bf364b2176965a73f059454a07e5f91cef6f55/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7517, 67, 1188, 12, 81, 4672, 876, 273, 312, 18, 1655, 12, 21, 13, 15451, 273, 312, 18, 1655, 12, 22, 13, 1267, 273, 312, 18, 1655, 12, 23, 13, 468, 1640, 7517, 17, 1188, 310, 434,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7517, 67, 1188, 12, 81, 4672, 876, 273, 312, 18, 1655, 12, 21, 13, 15451, 273, 312, 18, 1655, 12, 22, 13, 1267, 273, 312, 18, 1655, 12, 23, 13, 468, 1640, 7517, 17, 1188, 310, 434,...
assert total0 + total == 10
assert total0 + total == 16
def heuristic(graph): for block in graph.iterblocks(): for op in block.operations: if op.opname in ('malloc',): return inline.inlining_heuristic(graph) return sys.maxint, False
f93c66c3c64cfb2dea79949eba08e72d1fe33126 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/f93c66c3c64cfb2dea79949eba08e72d1fe33126/test_mallocprediction.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25833, 12, 4660, 4672, 364, 1203, 316, 2667, 18, 2165, 7996, 13332, 364, 1061, 316, 1203, 18, 17542, 30, 309, 1061, 18, 556, 529, 316, 7707, 81, 9853, 2187, 4672, 327, 6370, 18, 267, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25833, 12, 4660, 4672, 364, 1203, 316, 2667, 18, 2165, 7996, 13332, 364, 1061, 316, 1203, 18, 17542, 30, 309, 1061, 18, 556, 529, 316, 7707, 81, 9853, 2187, 4672, 327, 6370, 18, 267, 7...
processor = WikiProcessor(Formatter(context), language)
processor = WikiProcessor(Formatter(self.env, context), language)
def code_formatter(language, text): processor = WikiProcessor(Formatter(context), language) html = processor.process(text) raw = nodes.raw('', html, format='html') return raw
c5b1deb08fea44d28556e249e49f9c7ef56ab987 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2831/c5b1deb08fea44d28556e249e49f9c7ef56ab987/rst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 981, 67, 12354, 12, 4923, 16, 977, 4672, 6659, 273, 28268, 5164, 12, 5074, 12, 2890, 18, 3074, 16, 819, 3631, 2653, 13, 1729, 273, 6659, 18, 2567, 12, 955, 13, 1831, 273, 2199, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 981, 67, 12354, 12, 4923, 16, 977, 4672, 6659, 273, 28268, 5164, 12, 5074, 12, 2890, 18, 3074, 16, 819, 3631, 2653, 13, 1729, 273, 6659, 18, 2567, 12, 955, 13, 1831, 273, 2199, 18, 1...
added = difference(OOSet(new), OOSet(old)) removed = difference(OOSet(old), OOSet(new)) event = TranscriptEvent('incrementalchange', field=field, added=list(added), removed=list(removed)) self.add(event)
added = list(difference(OOSet(new), OOSet(old))) removed = list(difference(OOSet(old), OOSet(new))) if removed or added: event = TranscriptEvent('incrementalchange', field=field, added=added, removed=removed) self.add(event)
def addIncrementalChange(self, field, old, new):
9e22e6fea850ff3ce24b05c1719f568d4cc202a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/9e22e6fea850ff3ce24b05c1719f568d4cc202a3/Transcript.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 10798, 287, 3043, 12, 2890, 16, 652, 16, 1592, 16, 394, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 10798, 287, 3043, 12, 2890, 16, 652, 16, 1592, 16, 394, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
sets = server.call(session, 'product_attribute_set.list') for set in sets: if set['name']=='Default': attr_set_id=set['set_id']
def do_export(self, cr, uid, data, context): #=============================================================================== # Init #=============================================================================== prod_new = 0 prod_update = 0 logger = netsvc.Logger() pool = pooler.get_pool(cr.dbname) if data['model'] == 'ir.ui.menu': prod_ids = pool.get('product.product').search(cr, uid, [('exportable','=',True)]) else: prod_ids=[] prod_not=[] for id in data['ids']: exportable_product=pool.get('product.product').search(cr, uid, [('id','=',id),('exportable','=',True)]) if len(exportable_product)==1: prod_ids.append(exportable_product[0]) else : prod_not.append(id) if len(prod_not) > 0: raise wizard.except_wizard("Error", "you asked to export non-exportable products : IDs %s" % prod_not) #=============================================================================== # Server communication #=============================================================================== magento_web_id=pool.get('magento.web').search(cr,uid,[('magento_id','=',1)]) try: magento_web=pool.get('magento.web').browse(cr,uid,magento_web_id[0]) server = xmlrpclib.ServerProxy("%sindex.php/api/xmlrpc" % magento_web.magento_url) except: raise wizard.except_wizard("UserError", "You must have a declared website with a valid URL, a Magento username and password") try: try: session=server.login(magento_web.api_user, magento_web.api_pwd) except xmlrpclib.Fault,error: raise wizard.except_wizard("MagentoError", "Magento returned %s" % error) except: raise wizard.except_wizard("ConnectionError", "Couldn't connect to Magento with URL %sindex.php/api/xmlrpc" % magento_web.magento_url) #=============================================================================== # Product packaging #=============================================================================== for product in pool.get('product.product').browse(cr, uid, prod_ids, context=context): #Getting Magento categories category_tab ={'0':1} key=1 last_category = product.categ_id while(type(last_category.parent_id.id) == (int)): category_tab[str(key)]=last_category.magento_id last_category=pool.get('product.category').browse(cr, uid, last_category.parent_id.id) key=key+1 #Getting tax class tax_class_id = 1 if(product.magento_tax_class_id != 0): tax_class_id=product.magento_tax_class_id #Getting the set attribute #TODO: customize this code in order to pass custom attribute sets (configurable products) sets = server.call(session, 'product_attribute_set.list') for set in sets: if set['name']=='Default': attr_set_id=set['set_id'] #product Data sku='mag'+str(product.id) product_data={ 'name': product.name, 'price' : product.list_price, 'weight': product.weight_net, 'category_ids': category_tab, #fix product.categ_id.magento_id ), 'description' : product.description, 'short_description' : product.description_sale, 'websites':['base'], 'tax_class_id': tax_class_id, 'status': 1, } stock_data={ 'qty': product.virtual_available, 'is_in_stock': product.virtual_available, } #=============================================================================== # Product upload to Magento #=============================================================================== try: if(product.magento_id == 0): new_id=server.call(session, 'product.create', ['simple',attr_set_id, sku, product_data]) pool.get('product.product').write_magento_id(cr, uid, product.id, {'magento_id': new_id}) server.call(session,'product_stock.update',[sku,stock_data]) prod_new += 1 else: server.call(session, 'product.update',[sku,product_data]) server.call(session,'product_stock.update',[sku,stock_data]) prod_update += 1 except xmlrpclib.Fault,error: logger.notifyChannel("Magento Export", netsvc.LOG_ERROR, "Magento API return an error on product id %s . Error %s" % (product.id,error)) server.endSession(session) return {'prod_new':prod_new, 'prod_update':prod_update}
c22e2be938d8f48c3d5134a11f7e07771df0a3c7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7339/c22e2be938d8f48c3d5134a11f7e07771df0a3c7/magento_product_synchronize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 6530, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 225, 468, 9917, 14468, 12275, 468, 225, 4378, 468, 9917, 14468, 12275, 225, 10791, 67, 2704, 273, 374, 10791, 67, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 6530, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 225, 468, 9917, 14468, 12275, 468, 225, 4378, 468, 9917, 14468, 12275, 225, 10791, 67, 2704, 273, 374, 10791, 67, 2...
detail_html = ''
detail_html = ''
def check_quality(uri, user, pwd, dbname, modules): uid = login(uri, dbname, user, pwd) if uid: conn = xmlrpclib.ServerProxy(uri + '/xmlrpc/object') qualityresult = {} final = {} test_detail = {} for module in modules: quality_result = execute(conn,'execute', dbname, uid, pwd,'module.quality.check','check_quality',module) detail_html = '' html = '''<html><html><html><html><body><a name="TOP"></a>''' html +="<h1> Module : %s </h1>"%(quality_result['name']) html += "<h2> Final score : %s</h2>"%(quality_result['final_score']) html += "<div id='tabs'>" html += "<ul>" for x,y,detail in quality_result['check_detail_ids']: test = detail.get('name') msg = detail.get('message','') score = round(float(detail.get('score',0)),2) html += "<li><a href=\"#%s\">%s</a></li>"%(test.replace(' ','-'),test) detail_html +="<div id=\"%s\"><h3>%s (Score : %s)</h3>%s</div>"%(test.replace(' ','-'),test,score,detail.get('detail')) test_detail[test] = (score,msg,detail.get('detail','')) html += "</ul>%s</body></html></html></html></html></html>"%(detail_html) html += "</div>" final[quality_result['name']] = (quality_result['final_score'],html,test_detail) fp = open('quality_log.pck','wb') pck_obj = pickle.dump(final,fp) fp.close() print "LOG PATH%s"%(os.path.realpath('quality_log.pck')) return final else: print 'Login Failed...' clean() sys.exit(1)
394b361dedd1707263f6181bd5d85f013837d7c7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/394b361dedd1707263f6181bd5d85f013837d7c7/base_quality_interrogation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 16495, 12, 1650, 16, 729, 16, 14720, 16, 18448, 16, 4381, 4672, 4555, 273, 3925, 12, 1650, 16, 18448, 16, 729, 16, 14720, 13, 309, 4555, 30, 1487, 273, 2025, 13832, 830, 495, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 16495, 12, 1650, 16, 729, 16, 14720, 16, 18448, 16, 4381, 4672, 4555, 273, 3925, 12, 1650, 16, 18448, 16, 729, 16, 14720, 13, 309, 4555, 30, 1487, 273, 2025, 13832, 830, 495, ...
if neg_opt.has_key(option):
is_string = type(value) is StringType if neg_opt.has_key(option) and is_string:
def _set_command_options (self, command_obj, option_dict=None): """Set the options for 'command_obj' from 'option_dict'. Basically this means copying elements of a dictionary ('option_dict') to attributes of an instance ('command').
6277b9c1b2f3c6fa72131120e5a6c420a6db4503 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/6277b9c1b2f3c6fa72131120e5a6c420a6db4503/dist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 3076, 67, 2116, 261, 2890, 16, 1296, 67, 2603, 16, 1456, 67, 1576, 33, 7036, 4672, 3536, 694, 326, 702, 364, 296, 3076, 67, 2603, 11, 628, 296, 3482, 67, 1576, 10332, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 3076, 67, 2116, 261, 2890, 16, 1296, 67, 2603, 16, 1456, 67, 1576, 33, 7036, 4672, 3536, 694, 326, 702, 364, 296, 3076, 67, 2603, 11, 628, 296, 3482, 67, 1576, 10332, 2...
self.n = ct.rank()+1
self.n = ct.rank()
def __init__(self, ct): self.ct = ct self.n = ct.rank()+1
6b5ea644697d97c262a8bb2b154e92bd1324d8d6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/6b5ea644697d97c262a8bb2b154e92bd1324d8d6/root_system.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5691, 4672, 365, 18, 299, 273, 5691, 365, 18, 82, 273, 5691, 18, 11500, 1435, 15, 21, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5691, 4672, 365, 18, 299, 273, 5691, 365, 18, 82, 273, 5691, 18, 11500, 1435, 15, 21, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
from Products.PageTemplates.TALES import Undefined
def test_BadCall( self ):
e51f91f71691702ddecb74678ede922b90901600 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1843/e51f91f71691702ddecb74678ede922b90901600/test_FSPageTemplate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6434, 1477, 12, 365, 262, 30, 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, 1842, 67, 6434, 1477, 12, 365, 262, 30, 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, ...
def default_fifo_quantity_out(self, cursor, user, context=None):
def default_fifo_quantity(self, cursor, user, context=None):
def default_fifo_quantity_out(self, cursor, user, context=None): return 0.0
bebd25a96f9e259c8f07abf1640de5a71b1e5a82 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9303/bebd25a96f9e259c8f07abf1640de5a71b1e5a82/move.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 805, 67, 74, 20299, 67, 16172, 12, 2890, 16, 3347, 16, 729, 16, 819, 33, 7036, 4672, 327, 374, 18, 20, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 805, 67, 74, 20299, 67, 16172, 12, 2890, 16, 3347, 16, 729, 16, 819, 33, 7036, 4672, 327, 374, 18, 20, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def DeleteArray(id):
def DeleteArray(hashid):
def DeleteArray(id): raise DeprecatedIDCError, "Use python pickles instead."
4f22943d42ee1d5013421d280b3bd776bee83fb9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3410/4f22943d42ee1d5013421d280b3bd776bee83fb9/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2504, 1076, 12, 2816, 350, 4672, 1002, 9336, 734, 39, 668, 16, 315, 3727, 5790, 6002, 1040, 3560, 1199, 225, 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, 2504, 1076, 12, 2816, 350, 4672, 1002, 9336, 734, 39, 668, 16, 315, 3727, 5790, 6002, 1040, 3560, 1199, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self._addPathnames([prefix])
self._addPathnames([prefix])
def prepareTargetRepository(self): """ Do anything required to host the target repository. """
e4c93505b0a6c1af78401309313fbf4693ac46ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5981/e4c93505b0a6c1af78401309313fbf4693ac46ed/target.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 2326, 3305, 12, 2890, 4672, 3536, 2256, 6967, 1931, 358, 1479, 326, 1018, 3352, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 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, 2911, 2326, 3305, 12, 2890, 4672, 3536, 2256, 6967, 1931, 358, 1479, 326, 1018, 3352, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
elif partition.getFlag(parted.PARTITION_LOGICAL):
elif partition.type == parted.PARTITION_LOGICAL:
def __init__(self, partition): self.partition = partition self.size = partition.getSize() self.start = partition.geometry.start self.end = partition.geometry.end self.description = "" self.used_space = "" if partition.number != -1: self.name = partition.path if partition.fileSystem is None: # no filesystem, check flags if partition.getFlag(parted.PARTITION_SWAP): self.type = ("Linux swap") elif partition.getFlag(parted.PARTITION_RAID): self.type = ("RAID") elif partition.getFlag(parted.PARTITION_LVM): self.type = ("Linux LVM") elif partition.getFlag(parted.PARTITION_HPSERVICE): self.type = ("HP Service") elif partition.getFlag(parted.PARTITION_PALO): self.type = ("PALO") elif partition.getFlag(parted.PARTITION_PREP): self.type = ("PReP") elif partition.getFlag(parted.PARTITION_MSFT_RESERVED): self.type = ("MSFT Reserved") elif partition.getFlag(parted.PARTITION_EXTENDED): self.type = ("Extended Partition") elif partition.getFlag(parted.PARTITION_LOGICAL): self.type = ("Logical Partition") elif partition.getFlag(parted.PARTITION_FREESPACE): self.type = ("Free Space") else: self.type =("Unknown") else: self.type = partition.fileSystem.type else: self.type = "" self.name = _("unallocated")
c4993745f76e2dbbb7e80145e7a6166e91f08d7e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1953/c4993745f76e2dbbb7e80145e7a6166e91f08d7e/screen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3590, 4672, 365, 18, 10534, 273, 3590, 365, 18, 1467, 273, 3590, 18, 588, 1225, 1435, 365, 18, 1937, 273, 3590, 18, 14330, 18, 1937, 365, 18, 409, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3590, 4672, 365, 18, 10534, 273, 3590, 365, 18, 1467, 273, 3590, 18, 588, 1225, 1435, 365, 18, 1937, 273, 3590, 18, 14330, 18, 1937, 365, 18, 409, 273, ...
if size is not None: if i==-1 and len(c) > size: i=size-1 elif size <= i: i = size -1
def readline(self, size=-1): if size < 0: size = sys.maxint bufs = [] readsize = min(100, size) # Read from the file in small chunks while True: if size == 0: return "".join(bufs) # Return resulting line
0bad1f821b8419d53dfcfeb05d061c69ee8d82e9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0bad1f821b8419d53dfcfeb05d061c69ee8d82e9/gzip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12023, 12, 2890, 16, 963, 29711, 21, 4672, 309, 963, 411, 374, 30, 963, 273, 2589, 18, 1896, 474, 1681, 87, 273, 5378, 855, 1467, 273, 1131, 12, 6625, 16, 963, 13, 565, 468, 2720, 62...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12023, 12, 2890, 16, 963, 29711, 21, 4672, 309, 963, 411, 374, 30, 963, 273, 2589, 18, 1896, 474, 1681, 87, 273, 5378, 855, 1467, 273, 1131, 12, 6625, 16, 963, 13, 565, 468, 2720, 62...
rules.AddRule(rule_str, relative_dir + "'s include_rules")
if not len(relative_dir): rule_description = "the top level include_rules" else: rule_description = relative_dir + "'s include_rules" rules.AddRule(rule_str, rule_description)
def ApplyRules(existing_rules, deps, includes, cur_dir): """Applies the given deps and include rules, returning the new rules. Args: existing_rules: A set of existing rules that will be combined. deps: The list of imports from the "deps" section of the DEPS file. include: The list of rules from the "include_rules" section of DEPS. cur_dir: The current directory. We will create an implicit rule that allows inclusion from this directory. Returns: A new set of rules combining the existing_rules with the other arguments. """ rules = existing_rules # First apply the implicit "allow" rule for the current directory. if cur_dir.lower().startswith(BASE_DIRECTORY): relative_dir = cur_dir[len(BASE_DIRECTORY):] # Normalize path separators to slashes. relative_dir = relative_dir.replace("\\", "/") source = relative_dir if len(source) == 0: source = "." # Make the help string a little more meaningful. rules.AddRule("+" + relative_dir, "Default rule for " + source) else: raise Exception("Internal error: base directory is not at the beginning" + " for\n %s and base dir\n %s" % (cur_dir, BASE_DIRECTORY)) # Next apply the DEPS additions, these are all allowed. for (index, key) in enumerate(deps): rules.AddRule("+" + key, relative_dir + "'s deps for " + key) # Last, apply the additional explicit rules. for (index, rule_str) in enumerate(includes): rules.AddRule(rule_str, relative_dir + "'s include_rules") return rules
c40671f2093ca48862fb1212226c8ccb95d0adc9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9392/c40671f2093ca48862fb1212226c8ccb95d0adc9/checkdeps.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5534, 4478, 12, 11711, 67, 7482, 16, 8740, 16, 6104, 16, 662, 67, 1214, 4672, 3536, 13029, 326, 864, 8740, 471, 2341, 2931, 16, 5785, 326, 394, 2931, 18, 225, 6634, 30, 2062, 67, 7482,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5534, 4478, 12, 11711, 67, 7482, 16, 8740, 16, 6104, 16, 662, 67, 1214, 4672, 3536, 13029, 326, 864, 8740, 471, 2341, 2931, 16, 5785, 326, 394, 2931, 18, 225, 6634, 30, 2062, 67, 7482,...
buildscript.execute(['git', 'pull', 'origin', self.branch], 'git', cwd=cwd)
if self.branch: buildscript.execute(['git', 'pull', 'origin', self.branch], 'git', cwd=cwd) else: buildscript.execute(['git', 'pull', 'origin', 'master'], 'git', cwd=cwd)
def _update(self, buildscript, copydir=None): cwd = self.get_checkoutdir(copydir) if self.config.sticky_date: commit = self._get_commit_from_date() branch = 'jhbuild-date-branch' branch_cmd = ['git', 'checkout', branch] try: buildscript.execute(branch_cmd, 'git', cwd=cwd) except CommandError: branch_cmd = ['git', 'checkout', '-b', branch] buildscript.execute(branch_cmd, 'git', cwd=cwd) buildscript.execute(['git', 'reset', '--hard', commit], 'git', cwd=cwd)
013aadbab9838e7015376f20492ff709d1bbc818 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4596/013aadbab9838e7015376f20492ff709d1bbc818/git.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 12, 2890, 16, 1361, 4263, 16, 1610, 1214, 33, 7036, 4672, 7239, 273, 365, 18, 588, 67, 17300, 1214, 12, 3530, 1214, 13, 309, 365, 18, 1425, 18, 334, 13055, 67, 712, 30, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 16, 1361, 4263, 16, 1610, 1214, 33, 7036, 4672, 7239, 273, 365, 18, 588, 67, 17300, 1214, 12, 3530, 1214, 13, 309, 365, 18, 1425, 18, 334, 13055, 67, 712, 30, 32...
if (m_1 + m_2 + m_3 <> 0): return 0 prefid = Integer((-1) ** (int(j_1 - j_2 - m_3)))
if m_1 + m_2 + m_3 != 0: return 0 prefid = Integer((-1) ** int(j_1 - j_2 - 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
2aae1a34350173041dcaa920c230128b23fb8288 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/2aae1a34350173041dcaa920c230128b23fb8288/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,...
self.assertTrue(re.match('<TestThread\(.*, \w+ -?\d+\)>', repr(t)))
self.assertTrue(re.match('<TestThread\(.*, stopped -?\d+\)>', repr(t)))
def test_various_ops(self): # This takes about n/3 seconds to run (about n/3 clumps of tasks, # times about 1 second per clump). NUMTASKS = 10
bc89827ee2bb5ec925f12ef2ea6508800b502daf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/bc89827ee2bb5ec925f12ef2ea6508800b502daf/test_threading.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4093, 1481, 67, 4473, 12, 2890, 4672, 468, 1220, 5530, 2973, 290, 19, 23, 3974, 358, 1086, 261, 21071, 290, 19, 23, 927, 23868, 434, 4592, 16, 468, 4124, 2973, 404, 2205, 153...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4093, 1481, 67, 4473, 12, 2890, 4672, 468, 1220, 5530, 2973, 290, 19, 23, 3974, 358, 1086, 261, 21071, 290, 19, 23, 927, 23868, 434, 4592, 16, 468, 4124, 2973, 404, 2205, 153...
actions = ( ('FileMenu', None, _('_File')),
actions = ( ('FileMenu', None, _('_File')),
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # Constants self.open_mode_smart = 0 self.open_mode_fit = 1 self.open_mode_1to1 = 2 self.open_mode_last = 3 self.max_zoomratio = 5 # 5 x self.zoomratio_for_zoom_to_fit self.min_zoomratio = 0.1 # 0.1 x self.zoomratio_for_zoom_to_fit
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 225, 775, 30, 24972, 18, 5425, 2668, 81, 481, 410, 2187, 1173, 13640, 19, 14419, 19, 6339, 2187, 5252, 33, 21, 13, 1335, 30, 24972, 18, 5425, 2668, 81,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 225, 775, 30, 24972, 18, 5425, 2668, 81, 481, 410, 2187, 1173, 13640, 19, 14419, 19, 6339, 2187, 5252, 33, 21, 13, 1335, 30, 24972, 18, 5425, 2668, 81,...
'to "../.." relative to the script file, which will ' 'normally be the repository root.')
'to "../../.." relative to the script file, which ' 'will normally be the repository root.')
def main(options, args): global VERBOSE if options.verbose: VERBOSE = True # Optional base directory of the repository. global BASE_DIRECTORY if not options.base_directory: BASE_DIRECTORY = os.path.abspath( os.path.join(os.path.abspath(sys.argv[0]), "..\..")) else: BASE_DIRECTORY = os.path.abspath(sys.argv[2]) # Figure out which directory we have to check. if len(args) == 0: # No directory to check specified, use the repository root. start_dir = BASE_DIRECTORY elif len(args) == 1: # Directory specified. Start here. It's supposed to be relative to the # base directory. start_dir = os.path.abspath(os.path.join(BASE_DIRECTORY, args[0])) else: # More than one argument, we don't handle this. PrintUsage() sys.exit(1) print "Using base directory:", BASE_DIRECTORY print "Checking:", start_dir base_rules = Rules() # The base directory should be lower case from here on since it will be used # for substring matching on the includes, and we compile on case-insensitive # systems. Plus, we always use slashes here since the include parsing code # will also normalize to slashes. BASE_DIRECTORY = BASE_DIRECTORY.lower() BASE_DIRECTORY = BASE_DIRECTORY.replace("\\", "/") start_dir = start_dir.replace("\\", "/") success = CheckDirectory(base_rules, start_dir) success = False if not success: print "\nFAILED\n" sys.exit(1) print "\nSUCCESS\n" sys.exit(0)
c40671f2093ca48862fb1212226c8ccb95d0adc9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9392/c40671f2093ca48862fb1212226c8ccb95d0adc9/checkdeps.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2116, 16, 833, 4672, 2552, 27857, 309, 702, 18, 11369, 30, 27857, 273, 1053, 225, 468, 4055, 1026, 1867, 434, 326, 3352, 18, 2552, 10250, 67, 17229, 309, 486, 702, 18, 1969, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2116, 16, 833, 4672, 2552, 27857, 309, 702, 18, 11369, 30, 27857, 273, 1053, 225, 468, 4055, 1026, 1867, 434, 326, 3352, 18, 2552, 10250, 67, 17229, 309, 486, 702, 18, 1969, ...
outer_row = aa_rows[row['aa']] for field in self.angles: outer_row.update(row)
outer_row = aa_rows[row[aa_field]] outer_row.update(row) if self.prefix != '%s': for row in results: row['aa'] = row[aa_field] del row[aa_field]
def _execute(self): """ Private method for executing query, always runs query and then updates cache """ annotations = {} aa_rows = {} # main aggregate functions for field in self.angles: annotations['min_%s' % field] = Min(field) annotations['max_%s' % field] = Max(field) annotations['avg_%s' % field] = DirectionalAvg(field) for field in self.fields: annotations['min_%s' % field] = Min(field) annotations['max_%s' % field] = Max(field) annotations['avg_%s' % field] = Avg(field) annotations['stddev_%s' % field] = StdDev(field) # query with all aggregate values that can be calculated in a standard # query. save query in a list so that its members can be modified query = self.queryset query = query.values('aa') query = query.annotate(**annotations) results = list(query) # construction 2nd query for DirectionStdDev calculations for each # dihedral angle. only needed if there is at least one dihedral angle if self.angles: annotations = {} for row in results: aa_rows[row['aa']] = row for field in self.angles: avg=row['avg_%s' % field] if avg: annotations['stddev_%s' % field] = DirectionalStdDev(field, avg=avg) else: outer_row['stddev_%s' % field] = None if annotations: query = self.queryset query = query.values('aa') query = query.annotate(**annotations) # update the original results with the results of the 2nd query for row in query: outer_row = aa_rows[row['aa']] for field in self.angles: outer_row.update(row) self.results = results return results
74f9b2a1bd92e5595f4550b8f493b12de94b2b27 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6163/74f9b2a1bd92e5595f4550b8f493b12de94b2b27/directional_stddev.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8837, 12, 2890, 4672, 3536, 8726, 707, 364, 11274, 843, 16, 3712, 7597, 843, 471, 1508, 4533, 1247, 3536, 5617, 273, 2618, 12391, 67, 3870, 273, 2618, 225, 468, 2774, 7047, 4186, 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, 389, 8837, 12, 2890, 4672, 3536, 8726, 707, 364, 11274, 843, 16, 3712, 7597, 843, 471, 1508, 4533, 1247, 3536, 5617, 273, 2618, 12391, 67, 3870, 273, 2618, 225, 468, 2774, 7047, 4186, 36...
try: data = version except: continue
data = version
def _verify_doc(self, doc): doc_broken = False if getattr(doc, 'getFileItems', None): for lang, item in doc.getFileItems(): filename = item._get_data_name() if not filename: continue data = item.get_data(as_string=False) if data.is_broken(): logger.debug('Broken %s: %s, lang: %s, filename: %s', doc.meta_type, doc.absolute_url(1), lang, filename) doc_broken = True if not getattr(item, 'getVersions', None): continue for key, version in item.getVersions().items(): try: data = version[2][0] except: continue if not getattr(data, 'filename', []): continue if data.is_broken(): logger.debug('Broken version %s: %s, lang: %s, version id: %s, version filename: %s', doc.meta_type, doc.absolute_url(1), lang, key, getattr(data, 'filename', [])) doc_broken = True if getattr(doc, 'hasVersion', None) and doc.hasVersion() and doc.version != doc: if self._verify_doc(doc.version): doc_broken = True
3a33c9ab07b7321ba6449801e0802cc4c0707fc4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/3a33c9ab07b7321ba6449801e0802cc4c0707fc4/search_broken_files.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8705, 67, 2434, 12, 2890, 16, 997, 4672, 997, 67, 70, 19906, 273, 1083, 309, 3869, 12, 2434, 16, 296, 29925, 3126, 2187, 599, 4672, 364, 3303, 16, 761, 316, 997, 18, 29925, 3126, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8705, 67, 2434, 12, 2890, 16, 997, 4672, 997, 67, 70, 19906, 273, 1083, 309, 3869, 12, 2434, 16, 296, 29925, 3126, 2187, 599, 4672, 364, 3303, 16, 761, 316, 997, 18, 29925, 3126, ...
key = hexrepr(mapkey) value = hexrepr(mapvalue)
key = hexrepr(mapkey, key_precision) value = hexrepr(mapvalue, value_precision)
def python_mapdef_code(varname, map, comments=1): l = [] append = l.append if map.has_key("IDENTITY"): append("%s = codecs.make_identity_dict(range(%d))" % (varname, map["IDENTITY"])) append("%s.update({" % varname) splits = 1 del map["IDENTITY"] identity = 1 else: append("%s = {" % varname) splits = 0 identity = 0 mappings = map.items() mappings.sort() i = 0 for mapkey, mapvalue in mappings: mapcomment = '' if isinstance(mapkey, tuple): (mapkey, mapcomment) = mapkey if isinstance(mapvalue, tuple): (mapvalue, mapcomment) = mapvalue if mapkey is None: continue if (identity and mapkey == mapvalue and mapkey < 256): # No need to include identity mappings, since these # are already set for the first 256 code points. continue key = hexrepr(mapkey) value = hexrepr(mapvalue) if mapcomment and comments: append(' %s: %s,\t# %s' % (key, value, mapcomment)) else: append(' %s: %s,' % (key, value)) i += 1 if i == 4096: # Split the definition into parts to that the Python # parser doesn't dump core if splits == 0: append('}') else: append('})') append('%s.update({' % varname) i = 0 splits = splits + 1 if splits == 0: append('}') else: append('})') return l
bd20ea55bc7a044a773e6824f7fcef4f5669d44c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bd20ea55bc7a044a773e6824f7fcef4f5669d44c/gencodec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5790, 67, 1458, 536, 67, 710, 12, 1401, 529, 16, 852, 16, 5678, 33, 21, 4672, 225, 328, 273, 5378, 714, 273, 328, 18, 6923, 309, 852, 18, 5332, 67, 856, 2932, 29413, 6, 4672, 714, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5790, 67, 1458, 536, 67, 710, 12, 1401, 529, 16, 852, 16, 5678, 33, 21, 4672, 225, 328, 273, 5378, 714, 273, 328, 18, 6923, 309, 852, 18, 5332, 67, 856, 2932, 29413, 6, 4672, 714, ...
object.convertToNumArray()
obj.convertToNumArray()
def setData(self, *dataList, **options): """ Set data to the plot
cd4aefd6501a46432131840f7455b36b75e33c79 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/cd4aefd6501a46432131840f7455b36b75e33c79/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7929, 12, 2890, 16, 380, 892, 682, 16, 2826, 2116, 4672, 3536, 1000, 501, 358, 326, 3207, 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, 7929, 12, 2890, 16, 380, 892, 682, 16, 2826, 2116, 4672, 3536, 1000, 501, 358, 326, 3207, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
stream, parser = get_parser(data, stream_id, sessid)
stream, parser = get_parser(data, data['streams'][stream_id], sessid)
def handle_form(): """Process submitted data. See comments for details. """ prune_old() form = cgi.FieldStorage() if 'file' in form and form['file'].file: # compute session id sessid = get_sessid() if not sessid: rand = str(time.time())+form['file'].filename+str(random.random()) sessid = hashlib.md5(rand).hexdigest() # write uploaded file f = open(tmp_dir+sessid+'.file','wb') while f.tell()<2**22: # 4MB limit chunk = form['file'].file.read(32768) # 32KB chunks if not chunk: break f.write(chunk) if f.tell() == 0: f.close() print_form('Nothing uploaded.') return f.close() # write session variables try: fn = unicode(form['file'].filename,'utf-8') except UnicodeDecodeError: fn = unicode(form['file'].filename,'iso-8859-1') # stream "None" represents the original stream save_data({'filename':fn,'streams':[(None, None, fn)]}, sessid) # send session id and reset variables c = SimpleCookie() c['sess'] = sessid c['hpath'] = '/' # clear path var. c['stream'] = '0' # clear stream var print c # send cookie to client (headers) print_page() # print AJAX frame page elif get_sessid(): # or perhaps you already have a file to parse? if not 'hpath' in form: print_page() return # redirect stderr, so we can catch parser errors sys.stderr = StringIO() # load variables hpath = cgi.escape(form.getfirst('hpath','/')) stream_id = int(form.getfirst('stream','0')) path = hpath.split(':')[stream_id] sessid = get_sessid() try: data = cPickle.load(file(tmp_dir+sessid+'.sess','rb')) except IOError: print_error('Your file was deleted due to inactivity. ' 'Please upload a new one.') return stream, parser = get_parser(data, stream_id, sessid) if parser is None: return # sorry, couldn't parse file! if 'save' in form: # "Download Raw" f = FileFromInputStream(stream) fld = parser[path] f.seek(fld.absolute_address/8) size = alignValue(fld.size, 8)/8 sys.stdout.write('Content-Type: application/octet-stream\r\n') sys.stdout.write('Content-Length: %i\r\n'%size) sys.stdout.write('Content-Disposition: attachment; ' 'filename=%s\r\n\r\n'%path.strip('/').split('/')[-1]) sys.stdout.write(f.read(size)) return elif 'savesub' in form: # "Download Substream" stream = parser[path.rstrip('/')].getSubIStream() filename = path.strip('/').split('/')[-1] tags = getattr(stream,'tags',[]) for tag in tags: if tag[0] == 'filename': filename = tag[1] sys.stdout.write('Content-Type: application/octet-stream\r\n') sys.stdout.write('Content-Disposition: attachment; ' 'filename=%s\r\n\r\n'%filename) sys.stdout.write(FileFromInputStream(stream).read()) return elif 'addStream' in form: # "Parse Substream" spath = cgi.escape(form['addStream'].value) new_stream = parser[spath.rstrip('/')].getSubIStream() streamdata = FileFromInputStream(new_stream).read() new_parser = guessParser(new_stream) if new_parser: stream = new_stream parser = new_parser tags = getattr(stream,'tags',[]) streamname = data['streams'][stream_id][2]+':' data['streams'].append((tags, streamdata, streamname+spath)) save_data(data, sessid) path = '/' hpath += ':/' stream_id = len(data['streams'])-1 else: sys.stderr.write("Cannot parse substream %s: " "No suitable parser\n"%spath) elif 'delStream' in form: # "Delete Stream" n = int(form['delStream'].value) paths = hpath.split(':') del paths[n] del data['streams'][n] if n >= len(data['streams']): stream_id = 0 else: stream_id = n path = paths[stream_id] hpath = ':'.join(paths) save_data(data, sessid) stream, parser = get_parser(data, stream_id, sessid) # update client's variables c = SimpleCookie() c['hpath'] = hpath c['stream'] = str(stream_id) print c # send cookie to client # send headers print 'Content-Type: text/html' print # breadcrumb trail path up top print_path(path, data, stream_id) # fields print '''<table id="maintable" border="1">
60cbc1f820023a307121da60cd35ce7090e9d798 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/60cbc1f820023a307121da60cd35ce7090e9d798/hachoir.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 687, 13332, 3536, 2227, 9638, 501, 18, 225, 2164, 5678, 364, 3189, 18, 225, 3536, 13293, 67, 1673, 1435, 646, 273, 276, 10052, 18, 974, 3245, 1435, 309, 296, 768, 11, 316, 64...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 687, 13332, 3536, 2227, 9638, 501, 18, 225, 2164, 5678, 364, 3189, 18, 225, 3536, 13293, 67, 1673, 1435, 646, 273, 276, 10052, 18, 974, 3245, 1435, 309, 296, 768, 11, 316, 64...
users1 = run_sql("""SELECT id, email FROM user WHERE email RLIKE '%s' ORDER BY email """ % (email_user_pattern, ))
users1 = run_sql("""SELECT id, email FROM user WHERE email RLIKE %s ORDER BY email """, (email_user_pattern, ))
def perform_addroleuser(req, email_user_pattern='', id_user='0', id_role='0', confirm=0): """delete connection between role and user. id_role - id of role to disconnect id_user - id of user to disconnect. """ (auth_code, auth_message) = is_adminuser(req) if auth_code != 0: return mustloginpage(req, auth_message) email_out = acca.acc_get_user_email(id_user=id_user) name_role = acca.acc_get_role_name(id_role=id_role) # used to sort roles, and also to determine right side links con_roles = [] not_roles = [] title = 'Connect user to roles' subtitle = 'step 1 - search for users' # clean email search string email_user_pattern = cleanstring_email(email_user_pattern) text = ' <span class="adminlabel">1. search for user </span>\n' text += ' <input class="admin_wvar" type="text" name="email_user_pattern" value="%s" />\n' % (email_user_pattern, ) output = createhiddenform(action='addroleuser', text=text, button='search for users', id_role=id_role) if email_user_pattern: subtitle = 'step 2 - select user' users1 = run_sql("""SELECT id, email FROM user WHERE email RLIKE '%s' ORDER BY email """ % (email_user_pattern, )) users = [] for (id, email) in users1: users.append([id, email, '']) # no users if not users: output += '<p>no qualified users, try new search.</p>' # too many users elif len(users) > MAXSELECTUSERS: output += '<p><strong>%s hits</strong>, too many qualified users, specify more narrow search. (limit %s)</p>' % (len(users), MAXSELECTUSERS) # ok number of users else: output += createuserselect(id_user=id_user, action='addroleuser', step=2, users=users, button='select user', email_user_pattern=email_user_pattern) if int(id_user): subtitle = 'step 3 - select role' # roles the user is connected to role_ids = acca.acc_get_user_roles(id_user=id_user) # all the roles, lists are sorted on the background of these... all_roles = acca.acc_get_all_roles() # sort the roles in connected and not connected roles for (id, name, description) in all_roles: if (id, ) in role_ids: con_roles.append([-id, name, description]) else: not_roles.append([id, name, description]) # create roleselect output += createroleselect(id_role=id_role, action='addroleuser', step=3, roles=not_roles, extraroles=con_roles, extrastamp='(connected)', button='add this role', email_user_pattern=email_user_pattern, id_user=id_user) if int(id_role) < 0: name_role = acca.acc_get_role_name(id_role=-int(id_role)) output += '<p>role %s already connected to the user, try another one...<p>' % (name_role, ) elif int(id_role): subtitle = 'step 4 - confirm to add role to user' output += createhiddenform(action='addroleuser', text='add role <strong>%s</strong> to user <strong>%s</strong>?' % (name_role, email_out), email_user_pattern=email_user_pattern, id_user=id_user, id_role=id_role, confirm=1) if confirm: # add role result = acca.acc_add_user_role(id_user=id_user, id_role=id_role) if result and result[2]: subtitle = 'step 5 - confirm role added' output += '<p>confirm: role <strong>%s</strong> added to user <strong>%s</strong>.</p>' % (name_role, email_out) else: subtitle = 'step 5 - role could not be added' output += '<p>sorry, but role could not be added</p>' extra = """ <dl> <dt><a href="addrole">Create new role</a></dt> <dd>go here to add a new role.</dd> """ if int(id_user) and con_roles: extra += """ </dl> <dl> <dt><a href="deleteuserrole?id_user=%s&amp;reverse=1">Remove roles</a></dt> <dd>disconnect roles from user %s.</dd> </dl> """ % (id_user, email_out) if int(id_role): if int(id_role) < 0: id_role = -int(id_role) extra += """ <dl> <dt><a href="deleteuserrole?id_role=%s">Remove users</a></dt> <dd>disconnect users from role %s.<dd> </dl> """ % (id_role, name_role) return index(req=req, title=title, subtitle=subtitle, body=[output, extra], adminarea=5)
6ea5d72a403945bb48459d4ea7eed6856c3451fb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1931/6ea5d72a403945bb48459d4ea7eed6856c3451fb/webaccessadmin_lib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 1289, 4615, 1355, 12, 3658, 16, 2699, 67, 1355, 67, 4951, 2218, 2187, 612, 67, 1355, 2218, 20, 2187, 612, 67, 4615, 2218, 20, 2187, 6932, 33, 20, 4672, 3536, 3733, 1459, 3086...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 1289, 4615, 1355, 12, 3658, 16, 2699, 67, 1355, 67, 4951, 2218, 2187, 612, 67, 1355, 2218, 20, 2187, 612, 67, 4615, 2218, 20, 2187, 6932, 33, 20, 4672, 3536, 3733, 1459, 3086...
sage: G = Graph(); G.add_vertex(); G
sage: G = Graph(); G.add_vertex()
def add_vertex(self, name=None): """ Creates an isolated vertex. If the vertex already exists, then nothing is done.
83b209455c18f02969e2eb638936d98e1292aba4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/83b209455c18f02969e2eb638936d98e1292aba4/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 15281, 12, 2890, 16, 508, 33, 7036, 4672, 3536, 10210, 392, 25790, 5253, 18, 225, 971, 326, 5253, 1818, 1704, 16, 1508, 5083, 353, 2731, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 15281, 12, 2890, 16, 508, 33, 7036, 4672, 3536, 10210, 392, 25790, 5253, 18, 225, 971, 326, 5253, 1818, 1704, 16, 1508, 5083, 353, 2731, 18, 2, -100, -100, -100, -100, -100, -...
else
else:
def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 526) else quickfix.StringField.__init__(self, 526, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 1381, 5558, 13, 469, 30, 9549, 904, 18, 780, 974, 16186, 2738...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 1381, 5558, 13, 469, 30, 9549, 904, 18, 780, 974, 16186, 2738...
print prettyInt(n)+" non-sanctioned non-registered sites reported " \
print prettyInt(n)+" non-sanctioned non-registered storage resources reported " \
def DataTransferSumup(range_end = datetime.date.today(), range_begin = None, output = "text", header = True): if not gGrid or gGrid.lower() == 'local': try: gridDisplayName = gConfig.get("local", "grid_name") except: gridDisplayName = "" else: gridDisplayName = 'OSG' if not range_end: if not range_begin: range_end = datetime.date.today() else: range_end = range_begin + datetime.timedelta(days=+1) if not range_begin: range_begin = range_end + datetime.timedelta(days=-1) timediff = range_end - range_begin regSites = GetListOfOSGSEs(); disabledSites = GetListOfDisabledOSGSites() reportingSitesDate = GetSiteLastReportingDate(range_begin, True) pingSites = [] for data in reportingSitesDate: if ( len(data) > 0 ): (name,lastreport) = data.split("\t") pingSites.append(name) exceptionSites = ['AGLT2_CE_2', 'BNL-LCG2', 'BNL_ATLAS_1', 'BNL_ATLAS_2', 'FNAL_GPGRID_2', 'USCMS-FNAL-XEN', 'USCMS-FNAL-WC1-CE2', 'USCMS-FNAL-WC1-CE3', 'USCMS-FNAL-WC1-CE4', 'BNL_LOCAL', 'BNL_OSG', 'BNL_PANDA', 'GLOW-CMS', 'UCSDT2-B', 'Purdue-Lear' ] #exceptionSites = ['BNL_ATLAS_1', 'BNL_ATLAS_2', 'USCMS-FNAL-WC1-CE2', 'USCMS-FNAL-WC1-CE3', 'USCMS-FNAL-WC1-CE4', 'BNL_LOCAL', 'BNL_OSG', 'BNL_PANDA', 'GLOW-CMS', 'UCSDT2-B'] reportingSites = GetListOfDataTransferReportingSites(range_begin,range_end) #print "reporting sites",reportingSites allSites = None if regSites != None: allSites = [name for name in regSites if name not in exceptionSites] #print "allSites is ", allSites missingSites, emptySites = None, None if allSites: missingSites = [name for name in allSites if name not in \ reportingSites and name not in pingSites] emptySites = [name for name in allSites if name not in reportingSites \ and name in pingSites] extraSites = [name for name in reportingSites if allSites and name not in \ allSites and disabledSites and name not in disabledSites] knownExtras = [name for name in extraSites if name in exceptionSites and \ name not in regSites] extraSites = [name for name in extraSites if name not in exceptionSites] reportingDisabled = None if disabledSites != None: reportingDisabled = [name for name in reportingSites if name in \ disabledSites] #print allSites #print reportingSites #print missingSites #print extraSites if allSites != None: print "As of %s, there are %s registered SRMv2 %s sites." % \ (DateToString(datetime.date.today(),False), prettyInt(len(allSites)), gridDisplayName) print "\nBetween %s - %s (midnight - midnight UTC):\n" % \ (DateToString(range_begin, False), DateToString(range_end, False)) n = len(reportingSites) print prettyInt(n)+" sites reported\n" #[njobs,wallduration,div] = GetTotals(range_begin,range_end) [njobs,wallduration] = GetDataTransferTotals(range_begin,range_end) if (njobs != "NULL"): njobs = int(njobs); wallduration = float(wallduration) else: njobs = 0 wallduration = 0 print "Total number of transfers: "+prettyInt(njobs) print "Total transfer duration: "+niceNum( wallduration / 3600, 1 )+ " hours" if reportingSites != None and extraSites != None and knownExtras != None \ and allSites != None: n = len(reportingSites)-len(extraSites)-len(knownExtras) print "%s registered sites reported (%s%% of %s sites)" % \ (prettyInt(n), niceNum(n*100/len(allSites),1), gridDisplayName) if missingSites != None and allSites != None: n = len(missingSites) print "%s registered sites have NOT reported (%s%% of %s sites)" % \ (prettyInt(n), niceNum(n*100/len(allSites),1), gridDisplayName) if emptySites != None and allSites != None: n = len(emptySites) print "%s registered sites have reported but have no activity (%s%% " \ "of %s sites)" % (prettyInt(n), niceNum(n*100/len(allSites), 1), gridDisplayName) print n = len(extraSites); if not gGrid or gGrid.lower() != "local": print prettyInt(n)+" non-sanctioned non-registered sites reported " \ "(might indicate a discrepancy between OIM and Gratia)." elif allSites != None: print prettyInt(n)+" non-sanctioned non-registered sites reported." if reportingDisabled != None: n = len(reportingDisabled) print prettyInt(n)+" disabled sites have reported." if emptySites != None: print "\nThe sites with no activity are: \n"+prettyList(emptySites) if missingSites != None: print "\nThe non reporting sites are: \n"+prettyList(missingSites) if allSites != None: print "\nThe non registered sites are: \n"+prettyList(extraSites) if reportingDisabled != None: print "\nThe disabled sites that are reporting: \n" + \ prettyList(reportingDisabled) print "\n" return missingSites
6d8a4b1e13b56fd714149dae3171a05103390c56 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/637/6d8a4b1e13b56fd714149dae3171a05103390c56/AccountingReports.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1910, 5912, 3495, 416, 12, 3676, 67, 409, 273, 3314, 18, 712, 18, 30064, 9334, 1048, 67, 10086, 273, 599, 16, 876, 273, 315, 955, 3113, 1446, 273, 1053, 4672, 225, 309, 486, 314, 6313,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1910, 5912, 3495, 416, 12, 3676, 67, 409, 273, 3314, 18, 712, 18, 30064, 9334, 1048, 67, 10086, 273, 599, 16, 876, 273, 315, 955, 3113, 1446, 273, 1053, 4672, 225, 309, 486, 314, 6313,...
vars = {
vars = {
/.notdef { 0 0 hsbw endchar } |-
d96cc8339091f674ea0fc313632dcc5c333eeb78 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11856/d96cc8339091f674ea0fc313632dcc5c333eeb78/mftrace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 342, 18, 902, 536, 288, 374, 374, 12670, 70, 91, 679, 3001, 289, 571, 17, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 342, 18, 902, 536, 288, 374, 374, 12670, 70, 91, 679, 3001, 289, 571, 17, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
"""This class is an asyncore.disptacher subclass. It creates a socket listening on a local port, dispatching the resultant connection DTPHandler.
"""This class is an asyncore.disptacher subclass. It creates a socket listening on a local port, dispatching the resultant connection DTPHandler.
def close_all(self, map=None, ignore_all=False): """'clean' shutdown: instead of using the current asyncore.close_all() function which only close sockets, we iterates over all existent channels calling close() method for each one of them, avoiding memory leaks. This is how close_all function will appear in the fixed version of asyncore that will be included into Python 2.6. """ if map is None: map = self._map for x in map.values(): try: x.close() except OSError, x: if x[0] == errno.EBADF: pass elif not ignore_all: raise except (asyncore.ExitNow, KeyboardInterrupt, SystemExit): raise except: if not ignore_all: raise map.clear()
367a95e4363ae8b7515230480fff6ef354b95226 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3782/367a95e4363ae8b7515230480fff6ef354b95226/FTPServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 67, 454, 12, 2890, 16, 852, 33, 7036, 16, 2305, 67, 454, 33, 8381, 4672, 3536, 11, 6200, 11, 5731, 30, 3560, 434, 1450, 326, 783, 4326, 479, 18, 4412, 67, 454, 1435, 445, 1492,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 67, 454, 12, 2890, 16, 852, 33, 7036, 16, 2305, 67, 454, 33, 8381, 4672, 3536, 11, 6200, 11, 5731, 30, 3560, 434, 1450, 326, 783, 4326, 479, 18, 4412, 67, 454, 1435, 445, 1492,...
res+=indent("%s('%s',\n" % (fieldtype % map,name), indent_level)
res+=indent("%s('%s',\n" % (fieldtype % {'type':fieldType.capitalize()},name), indent_level)
def getFieldFormatted(self,name,fieldtype,map={},doc=None,indent_level=0): ''' returns the formatted field definitions for the schema ''' res = '' # add comment if doc: res+=indent(doc,indent_level,'#')+'\n'+res res+=indent("%s('%s',\n" % (fieldtype % map,name), indent_level) map_keys=map.keys() map_keys.sort() res+=indent(',\n'.join(['%s=%s' % (key,map[key]) for key in map_keys]),indent_level+1) + ',\n' res+=indent('),\n',indent_level) return res
69455fa25d35355037b42a3cf60479c640958209 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11941/69455fa25d35355037b42a3cf60479c640958209/ArchetypesGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5031, 18298, 12, 2890, 16, 529, 16, 1518, 723, 16, 1458, 28793, 2434, 33, 7036, 16, 9355, 67, 2815, 33, 20, 4672, 9163, 1135, 326, 4955, 652, 6377, 364, 326, 1963, 9163, 400, 273, 875,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5031, 18298, 12, 2890, 16, 529, 16, 1518, 723, 16, 1458, 28793, 2434, 33, 7036, 16, 9355, 67, 2815, 33, 20, 4672, 9163, 1135, 326, 4955, 652, 6377, 364, 326, 1963, 9163, 400, 273, 875,...
def write(self, text, alert=sys._MessageBox):
def write(self, text, alert=sys._MessageBox, fname=sys.executable + '.log'):
def write(self, text, alert=sys._MessageBox): if self._file is None and self._error is None: fname = sys.executable + '.log' try: self._file = open(fname, 'a') except Exception, details: self._error = details import atexit atexit.register(alert, 0, "The logfile '%s' could be opened:\n %s" % (fname, details), "Errors occurred") else: import atexit atexit.register(alert, 0, "See the logfile '%s' for details" % fname, "Errors occurred") if self._file is not None: self._file.write(text) self._file.flush()
d8b10017175a244cd3d305edee1c280d0af1348c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1361/d8b10017175a244cd3d305edee1c280d0af1348c/boot_common.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 977, 16, 6881, 33, 9499, 6315, 27647, 16, 5299, 33, 9499, 18, 17751, 397, 2418, 1330, 11, 4672, 309, 365, 6315, 768, 353, 599, 471, 365, 6315, 1636, 353, 599, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 977, 16, 6881, 33, 9499, 6315, 27647, 16, 5299, 33, 9499, 18, 17751, 397, 2418, 1330, 11, 4672, 309, 365, 6315, 768, 353, 599, 471, 365, 6315, 1636, 353, 599, 30, ...
def __del__(self, obj):
def __delete__(self, obj):
def __del__(self, obj): if self.prop in obj.properties: del obj.properties[self.prop]
73da8d05c8853936f73fafcba4e855a4614ee866 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12287/73da8d05c8853936f73fafcba4e855a4614ee866/cachecontrol.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3733, 972, 12, 2890, 16, 1081, 4672, 309, 365, 18, 5986, 316, 1081, 18, 4738, 30, 1464, 1081, 18, 4738, 63, 2890, 18, 5986, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3733, 972, 12, 2890, 16, 1081, 4672, 309, 365, 18, 5986, 316, 1081, 18, 4738, 30, 1464, 1081, 18, 4738, 63, 2890, 18, 5986, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100,...
raise WalkerEror
raise WalkerError
def trailer(self, nodelist): raise WalkerEror
f0af0e7a466797d9ed3fa7d635b9b1e91d5c2674 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f0af0e7a466797d9ed3fa7d635b9b1e91d5c2674/transformer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25899, 12, 2890, 16, 30068, 4672, 1002, 7564, 264, 29228, 280, 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, 25899, 12, 2890, 16, 30068, 4672, 1002, 7564, 264, 29228, 280, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
checker = OutputChecker()
def test_freeze(): """ Some tests of freeze, first we have to install some stuff. Note that the test is a little crude at the end because Python 2.5+ adds egg info to the standard library, so stuff like wsgiref will show up in the freezing. (Probably that should be accounted for in pip, but currently it is not). TODO: refactor this test into multiple tests? (and maybe different test style instead of using doctest output checker) """ env = reset_env() checker = OutputChecker() write_file('initools-req.txt', textwrap.dedent("""\ INITools==0.2 # and something else to test out: simplejson<=1.7.4 """)) result = run_pip('install', '-r', env.scratch_path/'initools-req.txt') result = run_pip('freeze', expect_stderr=True) expected = textwrap.dedent("""\ Script result: pip freeze -- stdout: -------------------- INITools==0.2 simplejson==1.7.4... <BLANKLINE>""") assert checker.check_output(expected, str(result), ELLIPSIS), [expected,str(result)] # Now lets try it with an svn checkout:: result = env.run('svn', 'co', '-r3472', 'http://svn.colorstudy.com/INITools/trunk', 'initools-trunk') result = env.run('python', 'setup.py', 'develop', cwd=env.scratch_path/ 'initools-trunk') result = run_pip('freeze', expect_stderr=True) expected = textwrap.dedent("""\ Script result: ...pip freeze -- stdout: -------------------- -e svn+http://svn.colorstudy.com/INITools/trunk@3472#egg=INITools-0.2.1dev_r3472-py2...-dev_r3472 simplejson==1.7.4... <BLANKLINE>""") assert checker.check_output(expected, str(result), ELLIPSIS), result # Now, straight from trunk (but not editable/setup.py develop):: result = env.run('easy_install', 'http://svn.colorstudy.com/INITools/trunk') result = run_pip('freeze', expect_stderr=True) expected = textwrap.dedent("""\ Script result: ...pip freeze -- stderr: -------------------- Warning: cannot find svn location for INITools==...dev-r... <BLANKLINE> -- stdout: -------------------- ## FIXME: could not find svn URL in dependency_links for this package: INITools==...dev-r... simplejson==1.7.4... <BLANKLINE>""") assert checker.check_output(expected, str(result), ELLIPSIS), result # Bah, that's no good! Let's give it a hint:: result = run_pip('freeze', '-f', 'http://svn.colorstudy.com/INITools/trunk#egg=INITools-dev', expect_stderr=True) expected = textwrap.dedent("""\ Script result: ...pip freeze -f http://svn.colorstudy.com/INITools/trunk#egg=INITools-dev -- stdout: -------------------- -f http://svn.colorstudy.com/INITools/trunk#egg=INITools-dev # Installing as editable to satisfy requirement INITools==...dev-r...: -e svn+http://svn.colorstudy.com/INITools/trunk@...#egg=INITools-...dev_r... simplejson==1.7.4... <BLANKLINE>""") assert checker.check_output(expected, str(result), ELLIPSIS), result
23d3d0fdb48cf271676f74c50d5d52819a2e9e01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12982/23d3d0fdb48cf271676f74c50d5d52819a2e9e01/test_freeze.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 29631, 13332, 3536, 10548, 7434, 434, 16684, 16, 1122, 732, 1240, 358, 3799, 2690, 10769, 18, 225, 3609, 716, 326, 1842, 353, 279, 12720, 4422, 1317, 622, 326, 679, 2724, 6600, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 29631, 13332, 3536, 10548, 7434, 434, 16684, 16, 1122, 732, 1240, 358, 3799, 2690, 10769, 18, 225, 3609, 716, 326, 1842, 353, 279, 12720, 4422, 1317, 622, 326, 679, 2724, 6600, ...
pagenum = self.notebook.page_num(box)
def add_tab(self, *args): """Adds a new tab to the terminal notebook. """ box = GuakeTerminalBox() box.terminal.grab_focus() box.terminal.connect('button-press-event', self.show_context_menu) box.terminal.connect('child-exited', self.on_terminal_exited, box) box.show()
2d18e1b6fb53ac8a1ea498e80b756b46bd4bc26a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11147/2d18e1b6fb53ac8a1ea498e80b756b46bd4bc26a/guake.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 7032, 12, 2890, 16, 380, 1968, 4672, 3536, 3655, 279, 394, 3246, 358, 326, 8651, 14718, 18, 3536, 3919, 273, 6467, 911, 11336, 3514, 1435, 3919, 18, 15979, 18, 2752, 70, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 7032, 12, 2890, 16, 380, 1968, 4672, 3536, 3655, 279, 394, 3246, 358, 326, 8651, 14718, 18, 3536, 3919, 273, 6467, 911, 11336, 3514, 1435, 3919, 18, 15979, 18, 2752, 70, 67, 1...
return False
return None
def getCookie(self, remember=True): """Login to wikipedia. remember Remember login (default: True) Returns cookie data if succesful, False otherwise.""" data = {"wpName": self.username, "wpPassword": self.password, "wpLoginattempt": "Aanmelden & Inschrijven", # dutch button label seems to work for all wikis "wpRemember": str(int(bool(remember)))} data = wikipedia.urlencode(data.items()) headers = { "Content-type": "application/x-www-form-urlencoded", "User-agent": "RobHooftWikiRobot/1.0" } pagename = self.site.login_address() conn = httplib.HTTPConnection(self.site.hostname()) conn.request("POST", pagename, data, headers) response = conn.getresponse() conn.close() data = response.read() n=0 Reat=re.compile(': (.*?);') L = [] for eat in response.msg.getallmatchingheaders('set-cookie'): m = Reat.search(eat) if m: n += 1 L.append(m.group(1))
d8726f0a89eb09437143b02cca49e64816eb817a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/d8726f0a89eb09437143b02cca49e64816eb817a/login.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24643, 12, 2890, 16, 11586, 33, 5510, 4672, 3536, 5358, 358, 21137, 18, 225, 11586, 565, 23133, 3925, 261, 1886, 30, 1053, 13, 225, 2860, 3878, 501, 309, 8667, 764, 2706, 16, 1083, 3541,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24643, 12, 2890, 16, 11586, 33, 5510, 4672, 3536, 5358, 358, 21137, 18, 225, 11586, 565, 23133, 3925, 261, 1886, 30, 1053, 13, 225, 2860, 3878, 501, 309, 8667, 764, 2706, 16, 1083, 3541,...
username = getUsernameSlcs1(comp['CN'],dn,domains[comp['O']])
username = getUsername(comp['CN'],dn,domains[comp['O']])
def getUsernameSlcs1(user, dn, domain): #the DC stuff has to be at the start of the string?? if(isSlcs1(dn)): user = user.split(' ')[:-1] username = '' for string in user: username += string.lower() username = checkLength(user, username, domain) #username = checkExisting(username, domain) return username else: return user.replace(' ','').lower()
aac6216d29f27f38350e4a7b85eaea698d79c9c3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1913/aac6216d29f27f38350e4a7b85eaea698d79c9c3/dnToUserDomain.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17827, 3738, 2143, 21, 12, 1355, 16, 8800, 16, 2461, 4672, 468, 5787, 21533, 10769, 711, 358, 506, 622, 326, 787, 434, 326, 533, 14646, 309, 12, 291, 3738, 2143, 21, 12, 5176, 3719, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17827, 3738, 2143, 21, 12, 1355, 16, 8800, 16, 2461, 4672, 468, 5787, 21533, 10769, 711, 358, 506, 622, 326, 787, 434, 326, 533, 14646, 309, 12, 291, 3738, 2143, 21, 12, 5176, 3719, 30...
self.cdrom_mount)
self.cdrom_cd1_mount)
def setup_pxe_boot(self): """ Sets up a PXE boot environment using the built in qemu TFTP server. Copies the PXE Linux bootloader pxelinux.0 from the host (needs the pxelinux package or equivalent for your distro), and vmlinuz and initrd.img files from the CD to a directory that qemu will serve trough TFTP to the VM. """ print "Setting up PXE boot using TFTP root %s" % self.tftp
36fda64645777edd6c627843022cb1e821dc1735 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10349/36fda64645777edd6c627843022cb1e821dc1735/unattended.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 4430, 73, 67, 7137, 12, 2890, 4672, 3536, 11511, 731, 279, 453, 60, 41, 4835, 3330, 1450, 326, 6650, 316, 1043, 24995, 399, 17104, 1438, 18, 28506, 606, 326, 453, 60, 41, 133...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 4430, 73, 67, 7137, 12, 2890, 4672, 3536, 11511, 731, 279, 453, 60, 41, 4835, 3330, 1450, 326, 6650, 316, 1043, 24995, 399, 17104, 1438, 18, 28506, 606, 326, 453, 60, 41, 133...
zoom_label1.set_markup("<i>_('Fastest')</i>")
zoom_label1.set_markup('<i>' + _('Fastest') + '</i>')
def show_prefs(self, action): self.prefs_dialog = gtk.Dialog(title=_("Mirage Preferences"), parent=self.window) self.prefs_dialog.set_has_separator(False) self.prefs_dialog.set_resizable(False) # Add "Interface" prefs:
d92ca7acc3759af0a364169a3c92fca3d6461efe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/d92ca7acc3759af0a364169a3c92fca3d6461efe/mirage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 1484, 2556, 12, 2890, 16, 1301, 4672, 365, 18, 1484, 2556, 67, 12730, 273, 22718, 18, 6353, 12, 2649, 33, 67, 2932, 49, 481, 410, 28310, 6, 3631, 982, 33, 2890, 18, 5668, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 1484, 2556, 12, 2890, 16, 1301, 4672, 365, 18, 1484, 2556, 67, 12730, 273, 22718, 18, 6353, 12, 2649, 33, 67, 2932, 49, 481, 410, 28310, 6, 3631, 982, 33, 2890, 18, 5668, 1...
d_som5.attr_list["corner_angles"] = corner_angles
d_som5.attr_list["corner_geom"] = corner_angles
def run(config, tim=None): """ This method is where the data reduction process gets done. @param config: Object containing the data reduction configuration information. @type config: L{hlr_utils.Configure} @param tim: (OPTIONAL) Object that will allow the method to perform timing evaluations. @type tim: C{sns_time.DiffTime} """ import common_lib import dr_lib import DST if tim is not None: tim.getTime(False) old_time = tim.getOldTime() if config.data is None: raise RuntimeError("Need to pass a data filename to the driver "\ +"script.") # Read in geometry if one is provided if config.inst_geom is not None: if config.verbose: print "Reading in instrument geometry file" inst_geom_dst = DST.getInstance("application/x-NxsGeom", config.inst_geom) else: inst_geom_dst = None config.so_axis = "time_of_flight" try: if len(config.mask_file) > 1: if config.verbose: print "Creating combined mask file" if tim is not None: tim.getTime(False) config.mask_file = hlr_utils.merge_roi_files(config.mask_file) if tim is not None: tim.getTime(msg="After creating combined mask file") else: config.mask_file = config.mask_file[0] except TypeError: # No mask files provided, do nothing pass # Steps 1-3: Produce a scaled summed dark current dataset dc_som = dr_lib.scaled_summed_data(config.dkcur, config, dataset_type="dark_current", timer=tim) # Perform Steps 3-6 on black can data if config.bcan is not None: b_som1 = dr_lib.calibrate_dgs_data(config.bcan, config, dc_som, dataset_type="black_can", inst_geom_dst=inst_geom_dst, tib_const=config.tib_const, timer=tim) else: b_som1 = None # Perform Steps 3-6 on empty can data if config.ecan is not None: e_som1 = dr_lib.calibrate_dgs_data(config.ecan, config, dc_som, dataset_type="empty_can", inst_geom_dst=inst_geom_dst, tib_const=config.tib_const, timer=tim) else: e_som1 = None # Perform Steps 3-6 on normalization data if config.norm is not None: n_som1 = dr_lib.calibrate_dgs_data(config.norm, config, dc_som, dataset_type="normalization", inst_geom_dst=inst_geom_dst, tib_const=config.tib_const, timer=tim) else: n_som1 = None # Perform Steps 3-6 on sample data d_som1 = dr_lib.calibrate_dgs_data(config.data, config, dc_som, inst_geom_dst=inst_geom_dst, tib_const=config.tib_const, timer=tim) # Perform Steps 7-16 on sample data if config.data_trans_coeff is None: data_trans_coeff = None else: data_trans_coeff = config.data_trans_coeff.toValErrTuple() d_som2 = dr_lib.process_dgs_data(d_som1, config, b_som1, e_som1, data_trans_coeff, timer=tim) del d_som1 # Perform Steps 7-16 on normalization data if n_som1 is not None: if config.norm_trans_coeff is None: norm_trans_coeff = None else: norm_trans_coeff = config.norm_trans_coeff.toValErrTuple() n_som2 = dr_lib.process_dgs_data(n_som1, config, b_som1, e_som1, norm_trans_coeff, dataset_type="normalization", timer=tim) else: n_som2 = n_som1 del n_som1, b_som1, e_som1 # Step 17: Integrate normalization spectra if n_som2 is not None: if config.verbose: print "Integrating normalization spectra" if tim is not None: tim.getTime(False) if config.norm_int_range is None: start_val = float("inf") end_val = float("inf") else: start_val = common_lib.energy_to_wavelength(\ (config.norm_int_range[1], 0.0))[0] end_val = common_lib.energy_to_wavelength(\ (config.norm_int_range[0], 0.0))[0] norm_int = dr_lib.integrate_spectra(n_som2, start=start_val, end=end_val, width=True) if tim is not None: tim.getTime(msg="After integrating normalization spectra ") if config.dump_norm: file_comment = "Normalization Integration range: %0.3fA, %0.3fA" \ % (start_val, end_val) hlr_utils.write_file(config.output, "text/num-info", norm_int, output_ext="norm", data_ext=config.ext_replacement, path_replacement=config.path_replacement, verbose=config.verbose, message="normalization values", comments=[file_comment], tag="Integral", units="counts") else: norm_int = n_som2 del n_som2 # Step 18: Normalize sample data by integrated values if norm_int is not None: if config.verbose: print "Normalizing data by normalization data" if tim is not None: tim.getTime(False) d_som3 = common_lib.div_ncerr(d_som2, norm_int) if tim is not None: tim.getTime(msg="After normalizing data ") else: d_som3 = d_som2 del d_som2, norm_int # Step 19: Calculate the initial energy if config.initial_energy is not None: d_som3.attr_list["Initial_Energy"] = config.initial_energy # Steps 20-21: Calculate the energy transfer if config.verbose: print "Calculating energy transfer" if tim is not None: tim.getTime(False) #import profile #profiler = profile.Profile() #d_som4 = profiler.runcall(dr_lib.energy_transfer, d_som3, "DGS", # "Initial_Energy", lojac=True, # scale=config.lambda_ratio) #profiler.dump_stats("et_profile.dat") d_som4 = dr_lib.energy_transfer(d_som3, "DGS", "Initial_Energy", lojac=True, scale=config.lambda_ratio) if tim is not None: tim.getTime(msg="After calculating energy transfer ") del d_som3 # Rebin energy transfer spectra if config.verbose: print "Rebinning to final energy transfer axis" if tim is not None: tim.getTime(False) d_som5 = common_lib.rebin_axis_1D(d_som4, config.E_bins.toNessiList()) if tim is not None: tim.getTime(msg="After rebinning energy transfer ") del d_som4 if config.dump_et_comb: d_som5_1 = dr_lib.sum_all_spectra(d_som5) hlr_utils.write_file(config.output, "text/Spec", d_som5_1, output_ext="et", data_ext=config.ext_replacement, path_replacement=config.path_replacement, verbose=config.verbose, message="combined energy transfer information") del d_som5_1 # Get the corner geometry information if config.verbose: print "Reading in corner geometry information" if tim is not None: tim.getTime(False) corner_angles = hlr_utils.get_corner_geometry(config.corner_geom) if tim is not None: tim.getTime(msg="After reading in corner geometry information ") if config.make_spe: d_som5.attr_list["corner_angles"] = corner_angles hlr_utils.write_file(config.output, "text/PHX", d_som5, output_ext="phx", data_ext=config.ext_replacement, path_replacement=config.path_replacement, verbose=config.verbose, message="PHX information") hlr_utils.write_file(config.output, "text/SPE", d_som5, output_ext="spe", data_ext=config.ext_replacement, path_replacement=config.path_replacement, verbose=config.verbose, message="SPE information") if config.verbose: print "Creating S(Q, E)" if tim is not None: tim.getTime(False) d_som5_2 = dr_lib.create_E_vs_Q_dgs(d_som5, config.initial_energy.toValErrTuple(), config.Q_bins.toNessiList(), corner_angles=corner_angles, split=config.split, configure=config, timer=tim) # Writing 2D DAVE file if not config.split: hlr_utils.write_file(config.output, "text/Dave2d", d_som5_2, output_ext="sqe", data_ext=config.ext_replacement, path_replacement=config.path_replacement, verbose=config.verbose, message="S(Q,E)") if tim is not None: tim.getTime(msg="After calculating S(Q,E) spectrum ") del d_som5_2 if config.qmesh: # Create Qvec vs E spectrum if config.verbose: print "Creating S(Qvec, E)" if tim is not None: tim.getTime(False) dr_lib.create_Qvec_vs_E_dgs(d_som5, config.initial_energy.toValErrTuple(), config, corner_angles=corner_angles, make_fixed=config.fixed, output=config.output, timer=tim) if tim is not None: tim.getTime(msg="After calculating final spectrum ") # Write out RMD file d_som5.attr_list["config"] = config hlr_utils.write_file(config.output, "text/rmd", d_som5, output_ext="rmd", data_ext=config.ext_replacement, path_replacement=config.path_replacement, verbose=config.verbose, message="metadata") if tim is not None: tim.setOldTime(old_time) tim.getTime(msg="Total Running Time")
245d0770e960899f6acd8fce74daad0df72c9baa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/763/245d0770e960899f6acd8fce74daad0df72c9baa/dgs_reduction.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 1425, 16, 1658, 33, 7036, 4672, 3536, 1220, 707, 353, 1625, 326, 501, 20176, 1207, 5571, 2731, 18, 225, 632, 891, 642, 30, 1033, 4191, 326, 501, 20176, 1664, 1779, 18, 632, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 1425, 16, 1658, 33, 7036, 4672, 3536, 1220, 707, 353, 1625, 326, 501, 20176, 1207, 5571, 2731, 18, 225, 632, 891, 642, 30, 1033, 4191, 326, 501, 20176, 1664, 1779, 18, 632, 7...
if self.downloading_art: return self.downloading_art = True
def download_image_to_filename(self, artist, album, dest_filename, all_images=False): if len(artist) == 0 and len(album) == 0: return try: if self.downloading_art: return self.downloading_art = True artist = urllib.quote(artist) album = urllib.quote(album) amazon_key = "12DR2PGAQT303YTEWP02" search_url = "http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&AWSAccessKeyId=" + amazon_key + "&Operation=ItemSearch&SearchIndex=Music&Artist=" + artist + "&ResponseGroup=Images&Keywords=" + album request = urllib2.Request(search_url) request.add_header('Accept-encoding', 'gzip') opener = urllib2.build_opener() f = opener.open(request).read() curr_pos = 200 # Skip header.. if self.stop_art_update: self.downloading_art = False return # Check if any results were returned; if not, search # again with just the artist name: img_url = f[f.find("<URL>", curr_pos)+len("<URL>"):f.find("</URL>", curr_pos)] if len(img_url) == 0: search_url = "http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&AWSAccessKeyId=" + amazon_key + "&Operation=ItemSearch&SearchIndex=Music&Artist=" + artist + "&ResponseGroup=Images" request = urllib2.Request(search_url) request.add_header('Accept-encoding', 'gzip') opener = urllib2.build_opener() f = opener.open(request).read() img_url = f[f.find("<URL>", curr_pos)+len("<URL>"):f.find("</URL>", curr_pos)] if self.stop_art_update: self.downloading_art = False return # And if that fails, try one last time with just the album name: if len(img_url) == 0: search_url = "http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&AWSAccessKeyId=" + amazon_key + "&Operation=ItemSearch&SearchIndex=Music&ResponseGroup=Images&Keywords=" + album request = urllib2.Request(search_url) request.add_header('Accept-encoding', 'gzip') opener = urllib2.build_opener() f = opener.open(request).read() img_url = f[f.find("<URL>", curr_pos)+len("<URL>"):f.find("</URL>", curr_pos)] if self.stop_art_update: self.downloading_art = False return if all_images: curr_img = 1 img_url = " " while len(img_url) > 0 and curr_pos > 0: img_url = "" curr_pos = f.find("<LargeImage>", curr_pos+10) img_url = f[f.find("<URL>", curr_pos)+len("<URL>"):f.find("</URL>", curr_pos)] if len(img_url) > 0: urllib.urlretrieve(img_url, dest_filename.replace("<imagenum>", str(curr_img))) curr_img += 1 # Skip the next LargeImage: curr_pos = f.find("<LargeImage>", curr_pos+10) else: curr_pos = f.find("<LargeImage>", curr_pos+10) img_url = f[f.find("<URL>", curr_pos)+len("<URL>"):f.find("</URL>", curr_pos)] if len(img_url) > 0: if self.stop_art_update: self.downloading_art = False return urllib.urlretrieve(img_url, dest_filename) except: pass self.downloading_art = False
7887607cb534b053442ac9710ec7241659a64004 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2312/7887607cb534b053442ac9710ec7241659a64004/sonata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 67, 2730, 67, 869, 67, 3459, 12, 2890, 16, 15469, 16, 14844, 16, 1570, 67, 3459, 16, 777, 67, 7369, 33, 8381, 4672, 309, 562, 12, 25737, 13, 422, 374, 471, 562, 12, 25090, 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, 4224, 67, 2730, 67, 869, 67, 3459, 12, 2890, 16, 15469, 16, 14844, 16, 1570, 67, 3459, 16, 777, 67, 7369, 33, 8381, 4672, 309, 562, 12, 25737, 13, 422, 374, 471, 562, 12, 25090, 13, ...
time.sleep(sleep)
def __send_message(smtpserver, from_addr, to_addr_list, msg, sleep, smtpuser, smtppassword, use_tls): """Message sending dispatcher. """ if smtpserver.startswith('/'): # Use the sendmail tool __send_message_sendmail(smtpserver, msg) else: # Use the SMTP server (we have host and port information) __send_message_smtp(smtpserver, from_addr, to_addr_list, msg, smtpuser, smtppassword, use_tls) # give recipients a chance of receiving patches in the correct order time.sleep(sleep)
4a545fa1dd24bf0e23477b5e8afd2c5500bfe600 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12366/4a545fa1dd24bf0e23477b5e8afd2c5500bfe600/mail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4661, 67, 2150, 12, 20278, 3567, 16, 628, 67, 4793, 16, 358, 67, 4793, 67, 1098, 16, 1234, 16, 5329, 16, 17660, 1355, 16, 17660, 3664, 16, 999, 67, 17116, 4672, 3536, 1079, 5431,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4661, 67, 2150, 12, 20278, 3567, 16, 628, 67, 4793, 16, 358, 67, 4793, 67, 1098, 16, 1234, 16, 5329, 16, 17660, 1355, 16, 17660, 3664, 16, 999, 67, 17116, 4672, 3536, 1079, 5431,...
self.languages_by_size = [ 'fr', 'en', 'tr', 'lt', 'vi', 'ru', 'io', 'zh', 'el', 'pl', 'fi', 'no', 'hu', 'it', 'ta', 'sv', 'de', 'ko', 'lo', 'pt', 'nl', 'ku', 'ja', 'es', 'id', 'te', 'ro', 'et', 'gl', 'bg', 'ca', 'ar', 'vo', 'uk', 'fa', 'is', 'sr', 'af', 'sw', 'scn', 'fy', 'th', 'br', 'oc', 'simple', 'li', 'cs', 'he', 'sl', 'hy', 'sq', 'tt', 'la', 'zh-min-nan', 'da', 'ast', 'tk', 'ur', 'wa', 'hsb' 'kk', 'ml', 'ky', 'hr', 'wo', 'kn', 'ang', 'eo', 'hi', 'gn', 'ga', 'ia', 'az', 'co', 'sk', 'csb', 'st', 'ms', 'nds', 'kl', 'sd', 'ug', 'ti', 'tl', 'mk', 'ka', 'an', 'my', 'gu', 'km', 'lv', 'cy', 'ts', 'qu', 'eu', 'fo', 'bs', 'am', 'rw', 'mr', 'su', 'chr', 'mn', 'nah', 'om', 'ie', 'yi', 'be', 'iu', 'mg', 'sh', 'gd', 'nn', 'bn', 'zu', 'si', 'pa', 'mt', 'dv', 'tpi', 'mi', 'roa-rup', 'jv', 'tg', 'ps', 'ik', 'so', 'uz', 'ha', 'gv', 'ss', 'kw', 'sa', 'ay', 'na', 'jbo', 'ne', 'tn', 'sm', 'sg', 'lb', 'ks', 'fj', 'ln', 'za', 'dz', 'als', ]
self.languages_by_size = [ 'fr', 'en', 'tr', 'lt', 'vi', 'ru', 'io', 'zh', 'el', 'pl', 'fi', 'no', 'hu', 'it', 'ta', 'sv', 'de', 'ko', 'lo', 'pt', 'nl', 'ku', 'ja', 'es', 'id', 'te', 'ro', 'et', 'gl', 'bg', 'ca', 'ar', 'vo', 'uk', 'fa', 'is', 'sr', 'af', 'sw', 'scn', 'fy', 'th', 'br', 'oc', 'simple', 'li', 'cs', 'he', 'sl', 'hy', 'sq', 'tt', 'la', 'zh-min-nan', 'da', 'ast', 'tk', 'ur', 'wa', 'hsb' 'kk', 'ml', 'ky', 'hr', 'wo', 'kn', 'ang', 'eo', 'hi', 'gn', 'ga', 'ia', 'az', 'co', 'sk', 'csb', 'st', 'ms', 'nds', 'kl', 'sd', 'ug', 'ti', 'tl', 'mk', 'ka', 'an', 'my', 'gu', 'km', 'lv', 'cy', 'ts', 'qu', 'eu', 'fo', 'bs', 'am', 'rw', 'mr', 'su', 'chr', 'mn', 'nah', 'om', 'ie', 'yi', 'be', 'iu', 'mg', 'sh', 'gd', 'nn', 'bn', 'zu', 'si', 'pa', 'mt', 'dv', 'tpi', 'mi', 'roa-rup', 'jv', 'tg', 'ps', 'ik', 'so', 'uz', 'ha', 'gv', 'ss', 'kw', 'sa', 'ay', 'na', 'jbo', 'ne', 'tn', 'sm', 'sg', 'lb', 'ks', 'fj', 'ln', 'za', 'dz', 'als', ]
def __init__(self): family.Family.__init__(self) self.name = 'wiktionary'
54befa18293a07a41d29aa2e1b9df0ee99e4e979 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/54befa18293a07a41d29aa2e1b9df0ee99e4e979/wiktionary_family.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 6755, 18, 9203, 16186, 2738, 972, 12, 2890, 13, 365, 18, 529, 273, 296, 11999, 24252, 814, 11, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 6755, 18, 9203, 16186, 2738, 972, 12, 2890, 13, 365, 18, 529, 273, 296, 11999, 24252, 814, 11, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
"proxy_username", "proxy_password", "pkgpolicy", "plugins", "metadata_expire")
"proxy_username", "proxy_password", "pkgpolicy", "plugins", "metadata_expire")
def __init__(self, parent_conf, stanza, initdict=None): DictType.__init__(self, initdict) self.conf = parent_conf self.stanza = stanza
427871e48b993cbe1bec0e26f0693386c8014c95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/427871e48b993cbe1bec0e26f0693386c8014c95/oldpyrpm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 67, 3923, 16, 21650, 16, 1208, 1576, 33, 7036, 4672, 9696, 559, 16186, 2738, 972, 12, 2890, 16, 1208, 1576, 13, 365, 18, 3923, 273, 982, 67, 3923, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 67, 3923, 16, 21650, 16, 1208, 1576, 33, 7036, 4672, 9696, 559, 16186, 2738, 972, 12, 2890, 16, 1208, 1576, 13, 365, 18, 3923, 273, 982, 67, 3923, ...
connection.execute(sql.text("BEGIN"))
def do_begin_twophase(self, connection, xid): # Two phase transactions seem to require that the transaction is explicitly started. # The implicit transactions that usually work aren't enough. connection.execute(sql.text("BEGIN")) self.do_begin(connection.connection)
c931b9d9d1e6dd7ed1fd2dbb5437ab31dd872721 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1074/c931b9d9d1e6dd7ed1fd2dbb5437ab31dd872721/postgres.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 10086, 67, 11246, 23169, 448, 12, 2890, 16, 1459, 16, 19031, 4672, 468, 16896, 6855, 8938, 19264, 358, 2583, 716, 326, 2492, 353, 8122, 5746, 18, 468, 1021, 10592, 8938, 716, 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, 741, 67, 10086, 67, 11246, 23169, 448, 12, 2890, 16, 1459, 16, 19031, 4672, 468, 16896, 6855, 8938, 19264, 358, 2583, 716, 326, 2492, 353, 8122, 5746, 18, 468, 1021, 10592, 8938, 716, 11...
attrs = attrs.keys() attrs.sort()
attrs = sorted(attrs.keys())
def _set_attrs(self, attrs): for attr in self.ATTRS: if attr in attrs: setattr(self, attr, attrs[attr]) del attrs[attr] else: if attr == 'default': setattr(self, attr, NO_DEFAULT) else: setattr(self, attr, None) if attrs: attrs = attrs.keys() attrs.sort() raise OptionError( "invalid keyword arguments: %s" % ", ".join(attrs), self)
5ac7fba982781427c68fc9587941db9806092b6e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/5ac7fba982781427c68fc9587941db9806092b6e/optparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 7039, 12, 2890, 16, 3422, 4672, 364, 1604, 316, 365, 18, 12043, 55, 30, 309, 1604, 316, 3422, 30, 9241, 12, 2890, 16, 1604, 16, 3422, 63, 1747, 5717, 1464, 3422, 63, 17...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 7039, 12, 2890, 16, 3422, 4672, 364, 1604, 316, 365, 18, 12043, 55, 30, 309, 1604, 316, 3422, 30, 9241, 12, 2890, 16, 1604, 16, 3422, 63, 1747, 5717, 1464, 3422, 63, 17...
metadataToObtain.append(lfn)
metadataToObtain.append( lfn )
def __getCatalogFileMetadata(self,files): lfnFileID = {} metadataToObtain = [] for fileID,metadata in files.items(): if not (metadata['Size'] and metadata['Checksum']): lfn = metadata['LFN'] metadataToObtain.append(lfn) lfnFileID[lfn] = fileID if not metadataToObtain: return S_OK() res = self.ReplicaManager.getCatalogFileMetadata(metadataToObtain) if not res['OK']: gLogger.error("__getCatalogFileMetadata: Failed to obtain file metadata",res['Message']) return res successful = res['Value']['Successful'] failed = res['Value']['Failed'] terminalIDs = [] problematicFiles = [] for lfn,error in failed.items(): gLogger.error("__getCatalogFileMetadata: Failed to get file metadata","%s %s" % (lfn,error)) if re.search("No such file or directory",error): fileID = lfnFileID[lfn] lfn = files[fileID]['LFN'] pfn = files[fileID]['PFN'] se = files[fileID]['SE'] problematicFiles.append(lfn) terminalIDs.append(fileID) if terminalIDs: self.__reportProblematicFiles(problematicFiles,'LFNCatalogMissing') self.__setMigratingReplicaStatus(terminalIDs,'Failed') fileMetadata = {} for lfn,metadata in successful.items(): size = metadata['Size'] checksum = metadata['CheckSumValue'] fileMetadata[lfnFileID[lfn]] = {'Size':size,'Checksum':checksum} return S_OK(fileMetadata)
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, 1001, 588, 9769, 812, 2277, 12, 2890, 16, 2354, 4672, 328, 4293, 812, 734, 273, 2618, 1982, 774, 20019, 273, 5378, 364, 585, 734, 16, 4165, 316, 1390, 18, 3319, 13332, 309, 486, 261, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 9769, 812, 2277, 12, 2890, 16, 2354, 4672, 328, 4293, 812, 734, 273, 2618, 1982, 774, 20019, 273, 5378, 364, 585, 734, 16, 4165, 316, 1390, 18, 3319, 13332, 309, 486, 261, 4...
actual_project =_SimpleRunCommand(cmd).rstrip()
actual_project = _SimpleRunCommand(cmd).rstrip()
def GetCommitId(self): """Get the commit id for this ebuild."""
804ad7df2772bbb0df99bab523e0e6acca66ef39 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/804ad7df2772bbb0df99bab523e0e6acca66ef39/cros_mark_as_stable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 5580, 548, 12, 2890, 4672, 3536, 967, 326, 3294, 612, 364, 333, 425, 3510, 12123, 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, 968, 5580, 548, 12, 2890, 4672, 3536, 967, 326, 3294, 612, 364, 333, 425, 3510, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if (not SDK.has_key(version)):
if (not version in SDK):
def SdkLocateMax(): if (sys.platform != "win32"): return for version,key1,key2,subdir in MAXVERSIONINFO: if (PkgSkip(version)==0): if (SDK.has_key(version)==0): GetSdkDir("maxsdk"+version.lower()[3:], version) GetSdkDir("maxsdk"+version.lower()[3:], version+"CS") if (not SDK.has_key(version)): top = GetRegistryKey(key1,key2) if (top != 0): SDK[version] = top + "maxsdk" if (os.path.isdir(top + "\\" + subdir)!=0): SDK[version+"CS"] = top + subdir
fdcc1205b8a0b6802b88877ecb24913b8464ac72 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7242/fdcc1205b8a0b6802b88877ecb24913b8464ac72/makepandacore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3426, 1333, 340, 2747, 13332, 309, 261, 9499, 18, 9898, 480, 315, 8082, 1578, 6, 4672, 327, 364, 1177, 16, 856, 21, 16, 856, 22, 16, 1717, 1214, 316, 4552, 5757, 5923, 30, 309, 261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3426, 1333, 340, 2747, 13332, 309, 261, 9499, 18, 9898, 480, 315, 8082, 1578, 6, 4672, 327, 364, 1177, 16, 856, 21, 16, 856, 22, 16, 1717, 1214, 316, 4552, 5757, 5923, 30, 309, 261, ...
sbox += self.field_polynomials("k",i) sbox += self.field_polynomials("s",i-1, r)
sbox += self.field_polynomials("k", i) sbox += self.field_polynomials("s", i-1, r)
def key_schedule_polynomials(self, i): """ Return polynomials for the $i$-th round of the key schedule.
62424369e932ac59629cb4d40b7e47ae2a712293 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/62424369e932ac59629cb4d40b7e47ae2a712293/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 67, 10676, 67, 3915, 13602, 87, 12, 2890, 16, 277, 4672, 3536, 2000, 16991, 87, 364, 326, 271, 77, 8, 17, 451, 3643, 434, 326, 498, 4788, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 498, 67, 10676, 67, 3915, 13602, 87, 12, 2890, 16, 277, 4672, 3536, 2000, 16991, 87, 364, 326, 271, 77, 8, 17, 451, 3643, 434, 326, 498, 4788, 18, 2, -100, -100, -100, -100, -100, -1...
def get_lang_obj(code): """Tries to get a Language object based on a language code from an HTTP header. Since the header can be in the form 'af-za' or 'af', we first try with the 'lang_COUNTRY' form and otherwise fallback to 'lang'. Also, language codes are normalized to the form 'af_ZA', because this is how Pootle stores language codes.""" if not code: return None code_parts = code.split('-') if len(code_parts) > 1: code2 = "%(lang)s_%(country)s" % {'lang': code_parts[0], 'country': upper(code_parts[1])} try: return Language.objects.get(code=code2) except ObjectDoesNotExist: pass try: return Language.objects.get(code=code_parts[0]) except ObjectDoesNotExist:
def get_lang_from_cookie(request, supported): """See if the user's browser sent a cookie with a her preferred language.""" lang_code = request.COOKIES.get(settings.LANGUAGE_COOKIE_NAME) if lang_code and lang_code in supported: return lang_code else:
def get_lang_obj(code): """Tries to get a Language object based on a language code from an HTTP header. Since the header can be in the form 'af-za' or 'af', we first try with the 'lang_COUNTRY' form and otherwise fallback to 'lang'. Also, language codes are normalized to the form 'af_ZA', because this is how Pootle stores language codes.""" if not code: return None code_parts = code.split('-') if len(code_parts) > 1: code2 = "%(lang)s_%(country)s" % {'lang': code_parts[0], 'country': upper(code_parts[1])} # First try with the lang_COUNTRY code, and if it fails # then try with the language code only try: return Language.objects.get(code=code2) except ObjectDoesNotExist: pass try: return Language.objects.get(code=code_parts[0]) except ObjectDoesNotExist: return None
22217057e0d5202ecc0d82ce297829c564eab061 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11388/22217057e0d5202ecc0d82ce297829c564eab061/user_lang_discovery.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4936, 67, 2603, 12, 710, 4672, 3536, 13652, 358, 336, 279, 9889, 733, 2511, 603, 279, 2653, 981, 628, 392, 2239, 1446, 18, 225, 7897, 326, 1446, 848, 506, 316, 326, 646, 296, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4936, 67, 2603, 12, 710, 4672, 3536, 13652, 358, 336, 279, 9889, 733, 2511, 603, 279, 2653, 981, 628, 392, 2239, 1446, 18, 225, 7897, 326, 1446, 848, 506, 316, 326, 646, 296, ...
banner_objects = []
banner_brains = []
def getBanners(self): """ Returns a list of objects that provide ICarouselBanner. """ banner_objects = [] if IFolderish.providedBy(self.context): banner_objects = self.context.objectValues() elif IATTopic.providedBy(self.context): banner_objects = [brain.getObject() for brain \ in self.context.queryCatalog()] return [b for b in banner_objects if ICarouselBanner.providedBy(b)]
2e6b96fbde808a09623eec4935376e1e36858479 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10575/2e6b96fbde808a09623eec4935376e1e36858479/folder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2882, 19637, 12, 2890, 4672, 3536, 2860, 279, 666, 434, 2184, 716, 5615, 467, 16321, 16405, 27398, 18, 3536, 225, 14090, 67, 15397, 2679, 273, 5378, 309, 467, 3899, 1468, 18, 29206, 858, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2882, 19637, 12, 2890, 4672, 3536, 2860, 279, 666, 434, 2184, 716, 5615, 467, 16321, 16405, 27398, 18, 3536, 225, 14090, 67, 15397, 2679, 273, 5378, 309, 467, 3899, 1468, 18, 29206, 858, ...
return r'\caption{%s}\\' '\n' % self.caption return r'\caption[]{%s (... continued)}\\' '\n' % self.caption
return r'\caption{%s}\\' '\n' % caption return r'\caption[]{%s (... continued)}\\' '\n' % caption
def get_caption(self): if not self.caption: return '' if 1 == self._translator.thead_depth(): return r'\caption{%s}\\' '\n' % self.caption return r'\caption[]{%s (... continued)}\\' '\n' % self.caption
975a7baefa62e45824db20fa2fef3b13aef67e9c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8194/975a7baefa62e45824db20fa2fef3b13aef67e9c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 15386, 12, 2890, 4672, 309, 486, 365, 18, 15386, 30, 327, 875, 309, 404, 422, 365, 6315, 17879, 18, 24604, 67, 5979, 13332, 327, 436, 8314, 15386, 95, 9, 87, 97, 10471, 2337, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15386, 12, 2890, 4672, 309, 486, 365, 18, 15386, 30, 327, 875, 309, 404, 422, 365, 6315, 17879, 18, 24604, 67, 5979, 13332, 327, 436, 8314, 15386, 95, 9, 87, 97, 10471, 2337, ...
dispatcher=FactoryDispatcher(product, self.aq_parent, REQUEST)
dispatcher_class=getattr( getattr(Products, name, None), '__FactoryDispatcher__', FactoryDispatcher) dispatcher=dispatcher_class(product, self.aq_parent, REQUEST)
def __bobo_traverse__(self, REQUEST, name): product=self.aq_acquire('_getProducts')()._product(name) dispatcher=FactoryDispatcher(product, self.aq_parent, REQUEST) return dispatcher.__of__(self)
a593fea82fd275dda0573d6b643f08fb9cf2e980 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a593fea82fd275dda0573d6b643f08fb9cf2e980/FactoryDispatcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 70, 947, 83, 67, 2033, 2476, 972, 12, 2890, 16, 12492, 16, 508, 4672, 3017, 33, 2890, 18, 69, 85, 67, 1077, 1039, 2668, 67, 588, 13344, 6134, 1435, 6315, 5896, 12, 529, 13, 282...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 70, 947, 83, 67, 2033, 2476, 972, 12, 2890, 16, 12492, 16, 508, 4672, 3017, 33, 2890, 18, 69, 85, 67, 1077, 1039, 2668, 67, 588, 13344, 6134, 1435, 6315, 5896, 12, 529, 13, 282...
else
else:
def _get_currency(self, cr, uid, context): user = pooler.get_pool(cr.dbname).get('res.users').browse(cr, uid, [uid])[0] if user.company: return user.company_id.currency_id.id else return pooler.get_pool(cr.dbname).get('res.currency').search(cr, uid, [('rate','=',1.0)])[0]
15fe85f663e578410cd76fa34f94571cce3074e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7397/15fe85f663e578410cd76fa34f94571cce3074e3/invoice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 7095, 12, 2890, 16, 4422, 16, 4555, 16, 819, 4672, 729, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979, 2934, 588, 2668, 455, 18, 5577, 16063, 25731, 12, 3353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 7095, 12, 2890, 16, 4422, 16, 4555, 16, 819, 4672, 729, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979, 2934, 588, 2668, 455, 18, 5577, 16063, 25731, 12, 3353, ...
self.tk.call(self._w, 'indicator', 'delete', entry)
self.tk.call(self._w, 'indicator', 'delete', entry)
def indicator_delete(self, entry):
86af7ef7e3f4448abc89aa941517a84075d99a38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/86af7ef7e3f4448abc89aa941517a84075d99a38/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10664, 67, 3733, 12, 2890, 16, 1241, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10664, 67, 3733, 12, 2890, 16, 1241, 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...
if self.do_list()
if self.do_list():
def parse(self): (self.options, self.args) = self.parser.parse_args() if self.do_list() print self.format_available_repos() return False if len(self.args) == 0: self.parser.print_help() return False return True
f6145a51eb7647265a21bec123d1b354731895ef /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8331/f6145a51eb7647265a21bec123d1b354731895ef/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 4672, 261, 2890, 18, 2116, 16, 365, 18, 1968, 13, 273, 365, 18, 4288, 18, 2670, 67, 1968, 1435, 309, 365, 18, 2896, 67, 1098, 13332, 1172, 365, 18, 2139, 67, 5699, 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, 1109, 12, 2890, 4672, 261, 2890, 18, 2116, 16, 365, 18, 1968, 13, 273, 365, 18, 4288, 18, 2670, 67, 1968, 1435, 309, 365, 18, 2896, 67, 1098, 13332, 1172, 365, 18, 2139, 67, 5699, 67...
self.button.update_editor()
def OnLeftDown(self, evt): # if the button is supposed to toggle, set the toggle_state # to the opposite of what it currently is if self.button.factory.toggle: self.toggle_state = not self.toggle_state
556b76753288c35096011f1e2936040220215372 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13166/556b76753288c35096011f1e2936040220215372/svg_button_editor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 3910, 4164, 12, 2890, 16, 6324, 4672, 468, 309, 326, 3568, 353, 18405, 358, 10486, 16, 444, 326, 10486, 67, 2019, 468, 358, 326, 20759, 434, 4121, 518, 4551, 353, 309, 365, 18, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 3910, 4164, 12, 2890, 16, 6324, 4672, 468, 309, 326, 3568, 353, 18405, 358, 10486, 16, 444, 326, 10486, 67, 2019, 468, 358, 326, 20759, 434, 4121, 518, 4551, 353, 309, 365, 18, 5...
TRUE = _micropolisengine.TRUE FALSE = _micropolisengine.FALSE
def _swig_repr(self): try: strthis = "proxy of " + self.this.__repr__() except: strthis = "" return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
6a61e7c91d7cad2ac82ba6753dd74db43bb2586f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10557/6a61e7c91d7cad2ac82ba6753dd74db43bb2586f/micropolisengine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5328, 360, 67, 12715, 12, 2890, 4672, 775, 30, 609, 2211, 273, 315, 5656, 434, 315, 397, 365, 18, 2211, 16186, 12715, 972, 1435, 1335, 30, 609, 2211, 273, 1408, 327, 3532, 9, 87, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5328, 360, 67, 12715, 12, 2890, 4672, 775, 30, 609, 2211, 273, 315, 5656, 434, 315, 397, 365, 18, 2211, 16186, 12715, 972, 1435, 1335, 30, 609, 2211, 273, 1408, 327, 3532, 9, 87, ...
print "Subscribing registered systems to the %s channel" % (PLATFORM_INDEPENDENT)
print timestamp(), "Subscribing registered systems to the %s channel." % (PLATFORM_INDEPENDENT)
def main(): if options.demo: key = False current_channels = {} current_channel_labels = ['rhel-x86_64-server-5'] else: # Login to Satellite server key = login(options.user, options.password) # Build existing channel list current_channels = client.channel.list_all_channels(key) current_channel_labels = [] for channel in current_channels: current_channel_labels.append(channel['label']) if options.debug: print "DEBUG: Channels on current Satellite server:", current_channel_labels if client.api.get_version() < 5.1: # TODO: Haven't tested with Spacewalk, not sure how it is reported print "This script uses features not available with Satellite versions older than 5.1" sys.exit(1) if not options.client_actions_only: # This begins the server actions section if not os.path.exists(options.localdir): try: os.makedirs(options.localdir) except: print "Error: Unable to create %s" % (options.localdir) raise if (not options.delete) and (not options.no_rsync): # Sync local Dell repo with public Dell repo returncode = get_dell_repo(DELL_REPO_URL, options.localdir) if not returncode == 0: print "rsync process exited with returncode:", returncode # Build child channels based on dell repo as needed systems = build_channel_list(options.localdir, SYSTEM_VENDOR_ID) systems['platform_independent'] = PLATFORM_INDEPENDENT # Iterate through list of supported RHEL versions and archs, create parent channels if needed channels = {} print "Checking base channels on Satellite server" for parent in SUPPORTED_CHANNELS: if options.verbose: print "Checking base channel", parent # Check each supported base channel, skip if it does not exist on Satellite server if parent not in current_channel_labels: if options.verbose: print "-%s is not a current base channel, skipping." % (parent) continue else: channels[parent] = SUPPORTED_CHANNELS[parent] channels[parent]['child_channels'] = [] # Initialize key for child channels if options.verbose: print "+%s found on Satellite server, checking child channels." % (parent) if channels[parent]['arch'] == 'i386': # This is because Satellite stores x86 as 'ia32' arch = 'channel-ia32' else: arch = 'channel-' + channels[parent]['arch'] subdir = channels[parent]['subdir'] print " Checking child channels for %s" % parent for system in systems: # use system name plus parent to create a unique child channel c_label = DELL_INFO['label'] + '-' + system + '-' + parent c_name = DELL_INFO['name'] + ' on ' + systems[system] + ' for ' + parent c_summary = DELL_INFO['summary'] + ' on ' + systems[system] + ' running ' + parent c_arch = arch c_dir = options.localdir + system + '/' + subdir if options.verbose: print " Checking child channel:", c_label if channel_exists(key, c_label, current_channels): if options.delete: # Delete child channels if requested if options.demo: print "Deleting channel:", c_label else: delete_channel(key, c_label) else: if options.debug: print "DEBUG: checking for dir:", c_dir if options.verbose: print "Child channel already exists:", c_label if os.path.isdir(c_dir): channels[parent]['child_channels'].append(system) else: if not options.delete: # Build child channels if needed if options.debug: print "DEBUG: checking for dir:", c_dir if os.path.isdir(c_dir): channels[parent]['child_channels'].append(system) if options.debug: print "DEBUG: %s exists for %s, creating channel" % (subdir, system) if options.demo: if options.verbose: print "Creating child channel:", c_label else: create_channel(key, c_label, c_name, c_summary, c_arch, parent) else: if options.debug: print "DEBUG: %s does not exists for %s" % (subdir, system) if (not options.delete) and (not options.no_packages): # Iterate through channels, pushing rpms from the local repo as needed # TODO: check if rpm is already uploaded and orphaned or part of another channel if options.debug: print "DEBUG: Channel mapping:", channels print "Syncing rpms as needed" for parent in channels: print " Syncing rpms for child channels in %s" % parent for child in channels[parent]['child_channels']: dir = options.localdir + child + '/' + channels[parent]['subdir'] channel = DELL_INFO['label'] + '-' + child + '-' + parent if options.verbose: print " Syncing rpms to child channel", channel if options.debug: print "DEBUG: Looking for rpms in", dir rpms = gen_rpm_list(dir) # Get all packages in child channel existing_packages = client.channel.software.list_all_packages(key, channel) if options.debug: print "DEBUG: Existing packages in", channel, existing_packages for rpm in rpms: if options.debug: print "DEBUG: Working on:", rpm # Strip off '.rpm' at end of file to match against existing entries rpm_name = rpm.split('.rpm')[0] # Now strip off any preceeding paths rpm_name = rpm_name.split('/')[-1] # Iterate through existing packages, and skip existing ones if options.verbose: print "Checking if %s is already on the Satellite server in %s" % (rpm_name, channel) for package in existing_packages: existing_rpm_name = reconstruct_name(package) if options.debug: print "DEBUG: Checking match for %s and %s" % (rpm_name, existing_rpm_name) if existing_rpm_name == rpm_name: # This means the intended rpm is already in Satellite, so skip if options.verbose: print "- %s already in Satellite, skipping" % (rpm_name) break else: if options.verbose: print "+ %s is not in Satellite, adding" % (rpm_name) if options.debug: print "DEBUG: Calling: push_rpm(",rpm, channel, options.user, options.password, options.satserver, ")" returncode = push_rpm(rpm, channel, options.user, options.password, options.satserver) if not returncode == 0: print "rhnpush process exited with returncode:", returncode if returncode == 255: print "You may force package uploads with --force" sys.exit(1) print "Completed uploading rpms." if (not options.server_actions_only) and (not options.demo) and (not options.delete): # This is the client actions section print "Subscribing registered systems to the %s channel" % (PLATFORM_INDEPENDENT) client_systems = subscribe_clients(key) print "Scheduling software installation and actions on clients" client_systems = schedule_actions(key, client_systems) print "Waiting for client actions to complete" client_systems = get_action_results(key, client_systems) print "All actions completed.\n" show_client_results(client_systems) if not options.demo: logout(key)
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, 2774, 13332, 309, 702, 18, 27928, 30, 498, 273, 1083, 783, 67, 9114, 273, 2618, 783, 67, 4327, 67, 5336, 273, 10228, 30138, 292, 17, 92, 5292, 67, 1105, 17, 3567, 17, 25, 3546, 469, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 309, 702, 18, 27928, 30, 498, 273, 1083, 783, 67, 9114, 273, 2618, 783, 67, 4327, 67, 5336, 273, 10228, 30138, 292, 17, 92, 5292, 67, 1105, 17, 3567, 17, 25, 3546, 469, ...
self.indexSet = self.cartanType.index_set()
self.index_set = self.cartanType.index_set()
def __init__(self, type): self.cartanType = CartanType(type) self._name = "The crystal of letters for type %s"%type self.indexSet = self.cartanType.index_set() self.module_generators = [self(1)]
35daa2ce800f484aa708f1cc267bf33e55f68eb5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/35daa2ce800f484aa708f1cc267bf33e55f68eb5/crystals.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 618, 4672, 365, 18, 11848, 304, 559, 273, 17695, 304, 559, 12, 723, 13, 365, 6315, 529, 273, 315, 1986, 4422, 31365, 434, 13768, 364, 618, 738, 87, 28385...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 618, 4672, 365, 18, 11848, 304, 559, 273, 17695, 304, 559, 12, 723, 13, 365, 6315, 529, 273, 315, 1986, 4422, 31365, 434, 13768, 364, 618, 738, 87, 28385...
log.write('%s\n' % ('*' * 78)) log.write('DATE: %s\n' % datetime.now()) if context is not None: user = context.user log.write('URI : %s\n' % str(context.uri)) log.write('USER: %s\n' % (user and user.name or None)) log.write('\n') request = context.request log.write(request.request_line_to_str()) log.write(request.headers_to_str()) log.write('\n') print_exc(file=log) log.flush()
request = context.request log.write(request.request_line_to_str()) log.write(request.headers_to_str()) log.write('\n') print_exc(file=log) log.flush() def log_debug(self, message): log = self.debug_log if log is None: return log.write('%s %s\n' % (datetime.now(), message)) log.flush()
def log_error(self, context=None): # TODO This method may be called from different threads, lock log = self.error_log if log is not None: # The separator log.write('\n') log.write('%s\n' % ('*' * 78)) # The date log.write('DATE: %s\n' % datetime.now()) # The request data if context is not None: # The URI and user user = context.user log.write('URI : %s\n' % str(context.uri)) log.write('USER: %s\n' % (user and user.name or None)) log.write('\n') # The request request = context.request log.write(request.request_line_to_str()) log.write(request.headers_to_str())
6429db5a9f1119fde95c21a6a70b31250de1a0c9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/6429db5a9f1119fde95c21a6a70b31250de1a0c9/server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 67, 1636, 12, 2890, 16, 819, 33, 7036, 4672, 468, 2660, 1220, 707, 2026, 506, 2566, 628, 3775, 7403, 16, 2176, 613, 273, 365, 18, 1636, 67, 1330, 309, 613, 353, 486, 599, 30, 46...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 67, 1636, 12, 2890, 16, 819, 33, 7036, 4672, 468, 2660, 1220, 707, 2026, 506, 2566, 628, 3775, 7403, 16, 2176, 613, 273, 365, 18, 1636, 67, 1330, 309, 613, 353, 486, 599, 30, 46...
self._books_toolbar._search_entry.grab_focus()
self._books_toolbar.search_entry.grab_focus()
def find_books(self, search_text): self._books_toolbar._enable_button(False) textbuffer = self.textview.get_buffer() textbuffer.set_text(_('Performing lookup, please wait') + '...') self.book_selected = False self.ls.clear() search_tuple = search_text.lower().split() if len(search_tuple) == 0: self._alert(_('Error'), _('You must enter at least one search word.')) self._books_toolbar._search_entry.grab_focus() return FL = urllib.quote('fl[]') SORT = urllib.quote('sort[]') search_url = 'http://www.archive.org/advancedsearch.php?q=' + \ urllib.quote('(title:(' + search_text.lower() + ') OR creator:(' + search_text.lower() +')) AND format:(DJVU)') search_url += '&' + FL + '=creator&' + FL + '=description&' + FL + '=format&' + FL + '=identifier&' + FL + '=language' search_url += '&' + FL + '=publisher&' + FL + '=subject&' + FL + '=title&' + FL + '=volume' search_url += '&' + SORT + '=title&' + SORT + '&' + SORT + '=&rows=500&save=yes&fmt=csv&xmlsearch=Search' gobject.idle_add(self.download_csv, search_url)
ec2d816270546616258518cdc9befcfd8fb8204c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5566/ec2d816270546616258518cdc9befcfd8fb8204c/GetIABooksActivity.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 12567, 12, 2890, 16, 1623, 67, 955, 4672, 365, 6315, 12567, 67, 18849, 6315, 7589, 67, 5391, 12, 8381, 13, 977, 4106, 273, 365, 18, 955, 1945, 18, 588, 67, 4106, 1435, 977, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12567, 12, 2890, 16, 1623, 67, 955, 4672, 365, 6315, 12567, 67, 18849, 6315, 7589, 67, 5391, 12, 8381, 13, 977, 4106, 273, 365, 18, 955, 1945, 18, 588, 67, 4106, 1435, 977, ...
'product_uom_qty': product_uos_qty}, 'domain':{}}
'product_uom_qty': product_uos_qty}, 'domain': {}}
def uos_change(self, cr, uid, ids, product_uos, product_uos_qty=0, product_id=None): product_obj = self.pool.get('product.product') if not product_id: return {'value': {'product_uom': product_uos, 'product_uom_qty': product_uos_qty}, 'domain':{}}
fa29dc7d9e6d87f49bc3316e2b56fa977448ad6c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/fa29dc7d9e6d87f49bc3316e2b56fa977448ad6c/sale.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 582, 538, 67, 3427, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 3017, 67, 89, 538, 16, 3017, 67, 89, 538, 67, 85, 4098, 33, 20, 16, 3017, 67, 350, 33, 7036, 4672, 3017, 67, 2603, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 582, 538, 67, 3427, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 3017, 67, 89, 538, 16, 3017, 67, 89, 538, 67, 85, 4098, 33, 20, 16, 3017, 67, 350, 33, 7036, 4672, 3017, 67, 2603, ...
tmplist = [(l, -machineDistance(l["arch"], arch)) for l in list ] tmplist.sort()
tmplist = [(l, machineDistance(l["arch"], arch)) for l in list ] tmplist.sort(pkgmdcmp)
def orderList(list, arch): """Order RpmPackage list by "distance" to arch (ascending) and EVR (descending), in that order.""" tmplist = [(l, -machineDistance(l["arch"], arch)) for l in list ] tmplist.sort() tmplist.reverse() list[:] = [l[0] for l in tmplist]
5f261428ab3a26e11bd6ac05a75855bd39fb033d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/5f261428ab3a26e11bd6ac05a75855bd39fb033d/functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1353, 682, 12, 1098, 16, 6637, 4672, 3536, 2448, 534, 7755, 2261, 666, 635, 315, 8969, 6, 358, 6637, 261, 3691, 2846, 13, 471, 512, 10986, 261, 5569, 2846, 3631, 316, 716, 1353, 12123, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1353, 682, 12, 1098, 16, 6637, 4672, 3536, 2448, 534, 7755, 2261, 666, 635, 315, 8969, 6, 358, 6637, 261, 3691, 2846, 13, 471, 512, 10986, 261, 5569, 2846, 3631, 316, 716, 1353, 12123, ...
return a iterator which yields only fragments within the range.
return an iterator which yields only fragments within the range.
def iter_fragments(fragiter, start_frag_id = None, stop_frag_id = None): """Given a fragment iterator and a start and end fragment id, return a iterator which yields only fragments within the range. """ if start_frag_id and stop_frag_id: dpred = lambda f: fragment_id_lt(f.fragment_id, start_frag_id) tpred = lambda f: fragment_id_le(f.fragment_id, stop_frag_id) return itertools.takewhile(tpred, itertools.dropwhile(dpred, fragiter)) elif start_frag_id and not stop_frag_id: dpred = lambda f: fragment_id_lt(f.fragment_id, start_frag_id) return itertools.dropwhile(dpred, fragiter) elif not start_frag_id and stop_frag_id: tpred = lambda f: fragment_id_le(f.fragment_id, stop_frag_id) return itertools.takewhile(tpred, fragiter) return fragiter
a181eacbeb3c68b8f7caba918a821d3f3e6c50f6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10674/a181eacbeb3c68b8f7caba918a821d3f3e6c50f6/Structure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 67, 29528, 12, 17073, 2165, 16, 787, 67, 17073, 67, 350, 273, 599, 16, 2132, 67, 17073, 67, 350, 273, 599, 4672, 3536, 6083, 279, 5481, 2775, 471, 279, 787, 471, 679, 5481, 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, 1400, 67, 29528, 12, 17073, 2165, 16, 787, 67, 17073, 67, 350, 273, 599, 16, 2132, 67, 17073, 67, 350, 273, 599, 4672, 3536, 6083, 279, 5481, 2775, 471, 279, 787, 471, 679, 5481, 612, ...
framereq = self.req.load("http://relink.us/frame.php?"+link_string, cookies=True)
framereq = self.req.load("http://relink.us/frame.php?"+link_string, cookies=True)
def proceed(self, url, location): container_id = self.parent.url.split("/")[-1].split("id=")[-1] url = "http://relink.us/view.php?id="+container_id self.html = self.req.load(url, cookies=True) temp_links = []
2599ae0c23fd9f0766ba22a1741d458a08985823 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9838/2599ae0c23fd9f0766ba22a1741d458a08985823/RelinkUs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11247, 12, 2890, 16, 880, 16, 2117, 4672, 1478, 67, 350, 273, 365, 18, 2938, 18, 718, 18, 4939, 2932, 4898, 13, 18919, 21, 8009, 4939, 2932, 350, 1546, 13, 18919, 21, 65, 880, 273, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11247, 12, 2890, 16, 880, 16, 2117, 4672, 1478, 67, 350, 273, 365, 18, 2938, 18, 718, 18, 4939, 2932, 4898, 13, 18919, 21, 8009, 4939, 2932, 350, 1546, 13, 18919, 21, 65, 880, 273, 3...
icon_size = 0
def DrawMenu_Selection(self, menuw, settings, x0, y0, width, height): val = settings menu = menuw.menustack[-1]
da357c70833b3ac92b415741c7c88fd4eea72965 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/da357c70833b3ac92b415741c7c88fd4eea72965/skin_aubin1.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 4599, 67, 6233, 12, 2890, 16, 3824, 91, 16, 1947, 16, 619, 20, 16, 677, 20, 16, 1835, 16, 2072, 4672, 1244, 273, 1947, 3824, 273, 3824, 91, 18, 27617, 641, 484, 18919, 21, 65,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10184, 4599, 67, 6233, 12, 2890, 16, 3824, 91, 16, 1947, 16, 619, 20, 16, 677, 20, 16, 1835, 16, 2072, 4672, 1244, 273, 1947, 3824, 273, 3824, 91, 18, 27617, 641, 484, 18919, 21, 65,...
srcendpoint[0]=['', 32]
srcendpoint[0]=['', '32']
def main(): user=os.environ['LOGNAME'] host='localhost' password='' database='' starttime=0 interval=60 length=1 addr='' mask=32 port='' proto='' hitter=[] srcendpoint=[] dstendpoint=[] try: opts, args = getopt.gnu_getopt(sys.argv[1:], "u:h:p:d:T:I:L:A:M:P:R:H:S:D:", ["user=", "host=", "password=", "database=", "time=", "interval=", "length=", "address=", "mask=", "port=", "protocol=", "hitters=", "src=", "dst="]) except getopt.GetoptError: print "Ungueltige Option." usage() sys.exit(2) for o, a in opts: if o in ("-u", "--user"): user=a if o in ("-h", "--host"): host=a if o in ("-p", "--password"): password=a if o in ("-d", "--database"): database=a if o in ("-T", "--time"): starttime = string.atoi(a) if o in ("-I", "--interval"): interval = string.atoi(a) if o in ("-L", "--length"): length = string.atoi(a) if o in ("-A", "--address"): addr=a if o in ("-M", "--mask"): mask=string.atoi(a) if o in ("-P", "--port"): port=str(string.atoi(a)) if o in ("-R", "--protocol"): proto=str(string.atoi(a)) if o in ("-H", "--hitters"): if string.lower(a) == "srcip": hitter = ["srcIp", "dst"] elif string.lower(a) == "dstip": hitter = ["dstIp", "src"] elif string.lower(a) == "dstport": hitter = ["dstPort", "src"] elif string.lower(a) == "srcport": hitter = ["srcPort", "dst"] if o in ("-S", "--src"): srcendpoint=a.split(':') if srcendpoint[0]=='*': srcendpoint[0]=['', 32] else: srcendpoint[0]=srcendpoint[0].split("/") if len(srcendpoint[0])==1: srcendpoint[0].append(32) if len(srcendpoint)==1: srcendpoint.append('') if o in ("-D", "--dst"): dstendpoint=a.split(':') if dstendpoint[0]=='*': dstendpoint[0]=['', 32] else: endendpoint[0]=endendpoint[0].split("/") if len(endendpoint[0])==1: endendpoint[0].append(32) if len(dstendpoint)==1: dstendpoint.append('') if interval<1 or starttime<0 or length<1: print('Startzeit, Interval und Länge müssen positiv sein') return starttime = (starttime//interval)*interval if (database): try: connection = MySQLdb.connect(host,user,password,database) except MySQLdb.OperationalError, message: print ('%d: Konnte nicht mit Datenbank verbinden: %s' % (message[0], message[1])) return c = connection.cursor() inspect(c, starttime, interval, length, addr, mask, port, proto, hitter, srcendpoint, dstendpoint) else: usage()
36da5ebce86e3ad89a7e51790f261c3c224af8d8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2286/36da5ebce86e3ad89a7e51790f261c3c224af8d8/inspect-anomaly.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 729, 33, 538, 18, 28684, 3292, 4842, 1985, 3546, 1479, 2218, 13014, 11, 2201, 2218, 11, 2063, 2218, 11, 23437, 33, 20, 3673, 33, 4848, 769, 33, 21, 3091, 2218, 11, 3066, 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, 2774, 13332, 729, 33, 538, 18, 28684, 3292, 4842, 1985, 3546, 1479, 2218, 13014, 11, 2201, 2218, 11, 2063, 2218, 11, 23437, 33, 20, 3673, 33, 4848, 769, 33, 21, 3091, 2218, 11, 3066, 3...
wa.cback = connectControl(wa, master, value, callback and callbackOnType, "textChanged(const QString &)", CallFront_lineEdit(wa), fvcb = value and valueType)[1]
wa.cback = connectControl(wa, master, value, callbackOnType and callback, "textChanged(const QString &)", CallFront_lineEdit(wa), fvcb = value and valueType)[1]
def lineEdit(widget, master, value, label=None, labelWidth=None, orientation='vertical', box=None, tooltip=None, callback=None, valueType = unicode, validator=None, controlWidth = None, callbackOnType = False, focusInCallback = None): if box or label: b = widgetBox(widget, box, orientation) widgetLabel(b, label, labelWidth) hasHBox = orientation == 'horizontal' or not orientation else: b = widget hasHBox = False if focusInCallback or callback and not callbackOnType: if not hasHBox: bi = widgetBox(b, "", 0) else: bi = box wa = LineEditWFocusOut(bi, master, callback, focusInCallback) else: wa = QLineEdit(b) wa.enterButton = None if value: wa.setText(unicode(master.getdeepattr(value))) if controlWidth: wa.setFixedWidth(controlWidth) if tooltip: QToolTip.add(wa, tooltip) if validator: wa.setValidator(validator) wa.cback = connectControl(wa, master, value, callback and callbackOnType, "textChanged(const QString &)", CallFront_lineEdit(wa), fvcb = value and valueType)[1] wa.box = b return wa
0eb6f11acef0b90e11c4bafb9e83aa44e09ea65b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/0eb6f11acef0b90e11c4bafb9e83aa44e09ea65b/OWGUI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 980, 4666, 12, 6587, 16, 4171, 16, 460, 16, 1433, 33, 7036, 16, 1433, 2384, 33, 7036, 16, 9820, 2218, 17824, 2187, 3919, 33, 7036, 16, 11915, 33, 7036, 16, 1348, 33, 7036, 16, 13692, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 980, 4666, 12, 6587, 16, 4171, 16, 460, 16, 1433, 33, 7036, 16, 1433, 2384, 33, 7036, 16, 9820, 2218, 17824, 2187, 3919, 33, 7036, 16, 11915, 33, 7036, 16, 1348, 33, 7036, 16, 13692, ...
wdname = self.kind.capitalize() + 'WorkingDir' modname = 'vcpx.repository.' + self.kind
def workingDir(self): """ Return an instance of the specific WorkingDir for this kind of repository. """
6a9bd83e9d215c86dfac7591e8d0edd54323c1d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5981/6a9bd83e9d215c86dfac7591e8d0edd54323c1d5/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5960, 1621, 12, 2890, 4672, 3536, 2000, 392, 791, 434, 326, 2923, 22732, 1621, 364, 333, 3846, 434, 3352, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5960, 1621, 12, 2890, 4672, 3536, 2000, 392, 791, 434, 326, 2923, 22732, 1621, 364, 333, 3846, 434, 3352, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Returns a Huffman code for each one of the given elements. INPUT: - ``dic`` (dictionary) -- associates to each letter of the alphabet a frequency or a number of occurrences.
Constructs a Huffman code corresponding to an alphabet with the given weight table. INPUT: - ``dic`` -- a dictionary that associates to each symbol of an alphabet a numeric value. If we consider the frequency of each alphabetic symbol, then ``dic`` is considered as the frequency table of the alphabet with each numeric (non-negative integer) value being the number of occurrences of a symbol. The numeric values can also represent weights of the symbols. In that case, the numeric values are not necessarily integers, but can be real numbers. In general, we refer to ``dic`` as a weight table.
def _build_code(self, dic): r""" Returns a Huffman code for each one of the given elements. INPUT: - ``dic`` (dictionary) -- associates to each letter of the alphabet a frequency or a number of occurrences.
1b9c6cbddf459d54e7643b46fc74830b6a3ea80c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1b9c6cbddf459d54e7643b46fc74830b6a3ea80c/huffman.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3510, 67, 710, 12, 2890, 16, 11681, 4672, 436, 8395, 2860, 279, 670, 28581, 981, 364, 1517, 1245, 434, 326, 864, 2186, 18, 225, 12943, 30, 225, 300, 12176, 15859, 10335, 261, 15556,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3510, 67, 710, 12, 2890, 16, 11681, 4672, 436, 8395, 2860, 279, 670, 28581, 981, 364, 1517, 1245, 434, 326, 864, 2186, 18, 225, 12943, 30, 225, 300, 12176, 15859, 10335, 261, 15556,...
gp.oldpath = line[10:].rstrip()
gp.oldpath = line[10:]
def readgitpatch(lr): """extract git-style metadata about patches from <patchname>""" # Filter patch for git information gp = None gitpatches = [] # Can have a git patch with only metadata, causing patch to complain dopatch = 0 lineno = 0 for line in lr: lineno += 1 if line.startswith('diff --git'): m = gitre.match(line) if m: if gp: gitpatches.append(gp) src, dst = m.group(1, 2) gp = patchmeta(dst) gp.lineno = lineno elif gp: if line.startswith('--- '): if gp.op in ('COPY', 'RENAME'): dopatch |= GP_FILTER gitpatches.append(gp) gp = None dopatch |= GP_PATCH continue if line.startswith('rename from '): gp.op = 'RENAME' gp.oldpath = line[12:].rstrip() elif line.startswith('rename to '): gp.path = line[10:].rstrip() elif line.startswith('copy from '): gp.op = 'COPY' gp.oldpath = line[10:].rstrip() elif line.startswith('copy to '): gp.path = line[8:].rstrip() elif line.startswith('deleted file'): gp.op = 'DELETE' # is the deleted file a symlink? gp.setmode(int(line.rstrip()[-6:], 8)) elif line.startswith('new file mode '): gp.op = 'ADD' gp.setmode(int(line.rstrip()[-6:], 8)) elif line.startswith('new mode '): gp.setmode(int(line.rstrip()[-6:], 8)) elif line.startswith('GIT binary patch'): dopatch |= GP_BINARY gp.binary = True if gp: gitpatches.append(gp) if not gitpatches: dopatch = GP_PATCH return (dopatch, gitpatches)
be5497a5fc601c2dd2fa6a4688b100383b0f1202 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/be5497a5fc601c2dd2fa6a4688b100383b0f1202/patch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 6845, 2272, 12, 10826, 4672, 3536, 8004, 5071, 17, 4060, 1982, 2973, 16482, 628, 411, 2272, 529, 2984, 3660, 225, 468, 4008, 4729, 364, 5071, 1779, 4178, 273, 599, 5071, 30278, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 6845, 2272, 12, 10826, 4672, 3536, 8004, 5071, 17, 4060, 1982, 2973, 16482, 628, 411, 2272, 529, 2984, 3660, 225, 468, 4008, 4729, 364, 5071, 1779, 4178, 273, 599, 5071, 30278, 273, ...
generic_load_model_test(modelfile, cpath, 'optimica')
_generic_load_model_trial(modelfile, cpath, 'optimica')
def test_load_model_optimica(): """Test the load_model(...) function of an Optimica problem.""" modelfile = "VDP.mo" cpath = "VDP_pack.VDP_Opt_Min_Time" generic_load_model_test(modelfile, cpath, 'optimica')
6878d7b8434bc55c9db4c9ed255419de5cd16b3d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7711/6878d7b8434bc55c9db4c9ed255419de5cd16b3d/test_jmi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 945, 67, 2284, 67, 16689, 26433, 13332, 3536, 4709, 326, 1262, 67, 2284, 5825, 13, 445, 434, 392, 19615, 26433, 6199, 12123, 938, 768, 273, 315, 58, 8640, 18, 8683, 6, 276, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 945, 67, 2284, 67, 16689, 26433, 13332, 3536, 4709, 326, 1262, 67, 2284, 5825, 13, 445, 434, 392, 19615, 26433, 6199, 12123, 938, 768, 273, 315, 58, 8640, 18, 8683, 6, 276, 8...
print "Attempts will continue to submit the last %d songs." % len(self.queue)
log("Attempts will continue to submit the last %d songs." % len(self.queue))
def submit_song_helper(self): if self.__enabled: print "Plugin re-enabled - accepting new songs." if self.submission_tid != -1: gobject.source_remove(self.submission_tid); self.submission_tid = -1 else: print "Plugin disabled - not accepting any new songs." if len(self.queue) > 0: self.submission_tid = gobject.timeout_add(120 * 1000, self.submit_song_helper) print "Attempts will continue to submit the last %d songs." % len(self.queue)
6813e514c46661f83b0631485a195a56144fb77d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/6813e514c46661f83b0631485a195a56144fb77d/qlscrobbler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4879, 67, 816, 75, 67, 4759, 12, 2890, 4672, 309, 365, 16186, 5745, 30, 1172, 315, 3773, 283, 17, 5745, 300, 25806, 394, 272, 7260, 1199, 309, 365, 18, 12684, 67, 18081, 480, 300, 21, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4879, 67, 816, 75, 67, 4759, 12, 2890, 4672, 309, 365, 16186, 5745, 30, 1172, 315, 3773, 283, 17, 5745, 300, 25806, 394, 272, 7260, 1199, 309, 365, 18, 12684, 67, 18081, 480, 300, 21, ...
self.data.comments[-1] = self.data.comments[-1] + line[5:]
self.data.comments[-1] += line[5:]
def comment(self, line): if line[5:8] == '-!-': # Make a new comment self.data.comments.append(line[9:]) elif line[5:8] == ' ': # add to the previous comment if not self.data.comments: # TCMO_STRGA in Release 37 has comment with no topic self.data.comments.append(line[9:]) else: self.data.comments[-1] = self.data.comments[-1] + line[9:] elif line[5:8] == '---': # If there are no comments, and it's not the closing line, # make a new comment. if not self.data.comments or self.data.comments[-1][:3] != '---': self.data.comments.append(line[5:]) else: self.data.comments[-1] = self.data.comments[-1] + line[5:] else: # copyright notice self.data.comments[-1] = self.data.comments[-1] + line[5:]
a076fb069aa689427988c32e2093d8c8c4274506 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7167/a076fb069aa689427988c32e2093d8c8c4274506/SProt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2879, 12, 2890, 16, 980, 4672, 309, 980, 63, 25, 30, 28, 65, 422, 2400, 5, 17, 4278, 282, 468, 4344, 279, 394, 2879, 365, 18, 892, 18, 9231, 18, 6923, 12, 1369, 63, 29, 30, 5717, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2879, 12, 2890, 16, 980, 4672, 309, 980, 63, 25, 30, 28, 65, 422, 2400, 5, 17, 4278, 282, 468, 4344, 279, 394, 2879, 365, 18, 892, 18, 9231, 18, 6923, 12, 1369, 63, 29, 30, 5717, ...
('ELEVATION_MIN', '67109928' ), ('ELEVATION_MAX', '83887572' ),
('ELEVATION_MIN', '1064' ), ('ELEVATION_MAX', '1492' ),
def lcp_1(): ds = gdal.Open('data/test_FARSITE_UTM12.LCP') if ds.RasterCount != 8: gdaltest.post_reason('wrong number of bands') return 'fail' metadata = [ ('LATITUDE', '49'), ('LINEAR_UNIT', 'Meters'), ('DESCRIPTION', 'This is a test LCP file created with FARSITE 4.1.054, using data downloaded from the USGS \r\nNational Map for LANDFIRE (2008-05-06). Data were reprojected to UTM zone 12 on NAD83 \r\nusing gdalwarp (GDAL 1.4.2).\r\n') ] md = ds.GetMetadata() for item in metadata: if md[item[0]] != item[1]: gdaltest.post_reason('wrong metadataitem for dataset. md[\'%s\']=\'%s\', expected \'%s\'' % (item[0], md[item[0]], item[1])) return 'fail' check_gt = (285807.932887174887583,30,0,5379230.386217921040952,0,-30) new_gt = ds.GetGeoTransform() for i in range(6): if abs(new_gt[i]-check_gt[i]) > 1e-5: print print 'old = ', check_gt print 'new = ', new_gt gdaltest.post_reason( 'Geotransform differs.' ) return 'fail' dataPerBand = [ ( 18645, [ ('ELEVATION_UNIT', '0' ), ('ELEVATION_UNIT_NAME', 'Meters' ), ('ELEVATION_MIN', '67109928' ), ('ELEVATION_MAX', '83887572' ), ('ELEVATION_NUM_CLASSES', '-1' ), ('ELEVATION_FILE', '' ) ] ), ( 16431, [ ('SLOPE_UNIT', '0' ), ('SLOPE_UNIT_NAME', 'Degrees' ), ('SLOPE_MIN', '0' ), ('SLOPE_MAX', '34' ), ('SLOPE_NUM_CLASSES', '36' ), ('SLOPE_FILE', 'slope.asc' ) ] ), ( 18851, [ ('ASPECT_UNIT', '2' ), ('ASPECT_UNIT_NAME', 'Azimuth degrees' ), ('ASPECT_MIN', '0' ), ('ASPECT_MAX', '16777573' ), ('ASPECT_NUM_CLASSES', '-1' ), ('ASPECT_FILE', 'aspect.asc' ) ] ), ( 26182, [ ('FUEL_MODEL_OPTION', '0' ), ('FUEL_MODEL_OPTION_DESC', 'no custom models AND no conversion file needed' ), ('FUEL_MODEL_MIN', '1' ), ('FUEL_MODEL_MAX', '99' ), ('FUEL_MODEL_NUM_CLASSES', '6' ), ('FUEL_MODEL_VALUES', '1,2,5,8,10,99' ), ('FUEL_MODEL_FILE', 'fbfm13.asc' ) ] ), ( 30038, [ ('CANOPY_COV_UNIT', '0' ), ('CANOPY_COV_UNIT_NAME', 'Categories (0-4)' ), ('CANOPY_COV_MIN', '0' ), ('CANOPY_COV_MAX', '95' ), ('CANOPY_COV_NUM_CLASSES', '10' ), ('CANOPY_COV_FILE', 'cancov.asc' ) ] ), ( 22077, [ ('CANOPY_HT_UNIT', '3' ), ('CANOPY_HT_UNIT_NAME', 'Meters x 10' ), ('CANOPY_HT_MIN', '0' ), ('CANOPY_HT_MAX', '16777591' ), ('CANOPY_HT_NUM_CLASSES', '5' ), ('CANOPY_HT_FILE', 'canht.asc' ) ] ), ( 30388, [ ('CBH_UNIT', '3' ), ('CBH_UNIT_NAME', 'Meters x 10' ), ('CBH_MIN', '0' ), ('CBH_MAX', '100' ), ('CBH_NUM_CLASSES', '33' ), ('CBH_FILE', 'cbh.asc' ) ] ), ( 23249, [ ('CBD_UNIT', '3' ), ('CBD_UNIT_NAME', 'kg/m^3 x 100' ), ('CBD_MIN', '0' ), ('CBD_MAX', '21' ), ('CBD_NUM_CLASSES', '20' ), ('CBD_FILE', 'cbd.asc' ) ] ) ] for i in range(8): band = ds.GetRasterBand(i+1) if band.Checksum() != dataPerBand[i][0]: gdaltest.post_reason('wrong checksum for band %d. Got %d, expected %d' % (i+1, band.Checksum(), dataPerBand[i][0])) return 'fail' md = band.GetMetadata() for item in dataPerBand[i][1]: if md[item[0]] != item[1]: gdaltest.post_reason('wrong metadataitem for band %d. md[\'%s\']=\'%s\', expected \'%s\'' % (i+1, item[0], md[item[0]], item[1])) return 'fail' ds = None return 'success'
d2e8ee10ac2ea02f628e0a02c8f7aa48c0f9c537 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10290/d2e8ee10ac2ea02f628e0a02c8f7aa48c0f9c537/lcp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 4057, 67, 21, 13332, 225, 3780, 273, 15551, 287, 18, 3678, 2668, 892, 19, 3813, 67, 42, 985, 20609, 67, 1693, 49, 2138, 18, 48, 4258, 6134, 309, 3780, 18, 18637, 1380, 480, 1725, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 4057, 67, 21, 13332, 225, 3780, 273, 15551, 287, 18, 3678, 2668, 892, 19, 3813, 67, 42, 985, 20609, 67, 1693, 49, 2138, 18, 48, 4258, 6134, 309, 3780, 18, 18637, 1380, 480, 1725, ...
phone = FallbackPrefsSerices.Service(self, 'phone')
phone = FallbackPrefsServices.Service(self, 'phone')
def __init__(self): phone = FallbackPrefsSerices.Service(self, 'phone') phone['ring-tone'] = {'default': 'music1'} phone['ring-volume'] = {'default': 10, 'silent': 0} self.services = {'phone': phone} self.profiles = ['default', 'silent', 'outdoor'] self.activated_profiles = ['default']
dcdaafb6e4e378ae4d765c2a422a29f3b25a0c05 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4712/dcdaafb6e4e378ae4d765c2a422a29f3b25a0c05/prefs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 7353, 273, 21725, 1386, 2556, 5676, 18, 1179, 12, 2890, 16, 296, 10540, 6134, 7353, 3292, 8022, 17, 88, 476, 3546, 273, 13666, 1886, 4278, 296, 81, 14894...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 7353, 273, 21725, 1386, 2556, 5676, 18, 1179, 12, 2890, 16, 296, 10540, 6134, 7353, 3292, 8022, 17, 88, 476, 3546, 273, 13666, 1886, 4278, 296, 81, 14894...
if not self.copy_debug: shutil.rmtree(dsymbundle)
shutil.rmtree(dsymbundle)
def ProcessFile(self, file): """dump_syms on Mac needs to be run on a dSYM bundle produced by dsymutil(1), so run dsymutil here and pass the bundle name down to the superclass method instead.""" dsymbundle = file + ".dSYM" if os.path.exists(dsymbundle): shutil.rmtree(dsymbundle) # dsymutil takes --arch=foo instead of -a foo like everything else os.system("dsymutil %s %s >/dev/null" % (' '.join([a.replace('-a ', '--arch=') for a in self.archs]), file)) res = Dumper.ProcessFile(self, dsymbundle) if not self.copy_debug: shutil.rmtree(dsymbundle) return res
35a9da7dbe8b00eb4a43e9cce59d1ce6450c3fdc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/35a9da7dbe8b00eb4a43e9cce59d1ce6450c3fdc/symbolstore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4389, 812, 12, 2890, 16, 585, 4672, 3536, 8481, 67, 9009, 959, 603, 13217, 4260, 358, 506, 1086, 603, 279, 302, 7474, 49, 3440, 14929, 635, 3780, 2942, 1367, 12, 21, 3631, 1427, 1086, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4389, 812, 12, 2890, 16, 585, 4672, 3536, 8481, 67, 9009, 959, 603, 13217, 4260, 358, 506, 1086, 603, 279, 302, 7474, 49, 3440, 14929, 635, 3780, 2942, 1367, 12, 21, 3631, 1427, 1086, ...
pixmaps.append('data/pixmaps/%s' % pix)
if pix.endswith('png'): pixmaps.append('data/pixmaps/%s' % pix)
def log(message): if VERBOSE: print 'Pida:', message
96553a7c2878d55b929e8a7b961bd933149fe180 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2233/96553a7c2878d55b929e8a7b961bd933149fe180/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 12, 2150, 4672, 309, 27857, 30, 1172, 296, 12478, 69, 30, 2187, 883, 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, ...
[ 1, 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, 613, 12, 2150, 4672, 309, 27857, 30, 1172, 296, 12478, 69, 30, 2187, 883, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
BayesProxyListener(serverName, serverPort, proxyPort)
for (server, serverPort), proxyPort in zip(servers, proxyPorts): BayesProxyListener(server, serverPort, proxyPort)
def main(serverName, serverPort, proxyPort, uiPort, launchUI, databaseFilename, useDB): """Runs the proxy forever or until a 'KILL' command is received or someone hits Ctrl+Break.""" BayesProxyListener(serverName, serverPort, proxyPort) UserInterfaceListener(uiPort) if launchUI: webbrowser.open_new("http://localhost:%d/" % uiPort) asyncore.loop()
b4db8e8cff9ae2da9617fcf4ec43e2aa8aa06995 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/b4db8e8cff9ae2da9617fcf4ec43e2aa8aa06995/pop3proxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 3567, 461, 16, 1438, 2617, 16, 2889, 2617, 16, 5915, 2617, 16, 8037, 5370, 16, 2063, 5359, 16, 999, 2290, 4672, 3536, 9361, 326, 2889, 21238, 578, 3180, 279, 296, 47, 15125, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3567, 461, 16, 1438, 2617, 16, 2889, 2617, 16, 5915, 2617, 16, 8037, 5370, 16, 2063, 5359, 16, 999, 2290, 4672, 3536, 9361, 326, 2889, 21238, 578, 3180, 279, 296, 47, 15125, ...
goodargs = argsreduce(cond, *((q,)+args+(loc,))) loc, goodargs = goodargs[-1], goodargs[:-1] place(output,cond,self._ppf(*goodargs) + loc)
if any(cond): goodargs = argsreduce(cond, *((q,)+args+(loc,))) loc, goodargs = goodargs[-1], goodargs[:-1] place(output,cond,self._isf(*goodargs) + loc)
def isf(self,q,*args,**kwds): """Inverse survival function (1-sf) at q of the given RV
4ca9f7d91b2d0cf6aa79bb5c23d73807cff34ffb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/4ca9f7d91b2d0cf6aa79bb5c23d73807cff34ffb/distributions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 74, 12, 2890, 16, 85, 16, 14, 1968, 16, 636, 25577, 4672, 3536, 16376, 25397, 5162, 445, 261, 21, 17, 21668, 13, 622, 1043, 434, 326, 864, 534, 58, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 74, 12, 2890, 16, 85, 16, 14, 1968, 16, 636, 25577, 4672, 3536, 16376, 25397, 5162, 445, 261, 21, 17, 21668, 13, 622, 1043, 434, 326, 864, 534, 58, 2, -100, -100, -100, -100, -1...
self._cached_image_data_widths = self._get_index_mapper_data_bounds()
def _compute_cached_image(self, selection_masks=None): """ Updates the cached image. """ if not self._mapped_image_cache_valid: cached_mapped_image = \ self.value_mapper.map_screen(self.value.data) * 255 if selection_masks is not None: # construct a composite mask mask = zeros(cached_mapped_image.shape[:2], dtype=bool) for m in selection_masks: mask = mask | m invmask = invert(mask) # do a cheap alpha blend with our specified color cached_mapped_image[invmask,0:3] = \ self.fade_alpha*(cached_mapped_image[invmask,0:3] - self.fade_background) + self.fade_background self._cached_mapped_image = cached_mapped_image self._cached_image_data_widths = self._get_index_mapper_data_bounds() self._mapped_image_cache_valid = True
352b007239a2021364e35ca32a3e864fb48033d4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13167/352b007239a2021364e35ca32a3e864fb48033d4/cmap_image_plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9200, 67, 7097, 67, 2730, 12, 2890, 16, 4421, 67, 29102, 33, 7036, 4672, 3536, 15419, 326, 3472, 1316, 18, 3536, 309, 486, 365, 6315, 13654, 67, 2730, 67, 2493, 67, 877, 30, 3472,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9200, 67, 7097, 67, 2730, 12, 2890, 16, 4421, 67, 29102, 33, 7036, 4672, 3536, 15419, 326, 3472, 1316, 18, 3536, 309, 486, 365, 6315, 13654, 67, 2730, 67, 2493, 67, 877, 30, 3472,...