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
self.gridlayout15.addWidget(self.label_11,0,0,1,1)
self.gridlayout22.addWidget(self.label_11,0,0,1,1)
def setupUi(self, UserPrefsDialog): UserPrefsDialog.setObjectName("UserPrefsDialog") UserPrefsDialog.resize(QtCore.QSize(QtCore.QRect(0,0,917,661).size()).expandedTo(UserPrefsDialog.minimumSizeHint()))
752b48c67dcf97437d2cb83fa267b09487665da0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/752b48c67dcf97437d2cb83fa267b09487665da0/UserPrefsDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13943, 12, 2890, 16, 2177, 1386, 2556, 6353, 4672, 2177, 1386, 2556, 6353, 18, 542, 16707, 2932, 1299, 1386, 2556, 6353, 7923, 2177, 1386, 2556, 6353, 18, 15169, 12, 23310, 4670, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13943, 12, 2890, 16, 2177, 1386, 2556, 6353, 4672, 2177, 1386, 2556, 6353, 18, 542, 16707, 2932, 1299, 1386, 2556, 6353, 7923, 2177, 1386, 2556, 6353, 18, 15169, 12, 23310, 4670, 18,...
self.assertRaises( RuntimeError, winsound.PlaySound, None, winsound.SND_PURGE )
pass
def test_stopasync(self): if _have_soundcard(): winsound.PlaySound( 'SystemQuestion', winsound.SND_ALIAS | winsound.SND_ASYNC | winsound.SND_LOOP ) time.sleep(0.5) try: winsound.PlaySound( 'SystemQuestion', winsound.SND_ALIAS | winsound.SND_NOSTOP ) except RuntimeError: pass else: # the first sound might already be finished pass winsound.PlaySound(None, winsound.SND_PURGE) else: self.assertRaises( RuntimeError, winsound.PlaySound, None, winsound.SND_PURGE )
dca8c128361e6acbd0a08b804c081168ac751857 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/dca8c128361e6acbd0a08b804c081168ac751857/test_winsound.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5681, 3810, 12, 2890, 4672, 309, 389, 21516, 67, 29671, 3327, 13332, 31307, 772, 18, 11765, 24331, 12, 296, 3163, 11665, 2187, 31307, 772, 18, 55, 2908, 67, 23784, 571, 31307, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5681, 3810, 12, 2890, 4672, 309, 389, 21516, 67, 29671, 3327, 13332, 31307, 772, 18, 11765, 24331, 12, 296, 3163, 11665, 2187, 31307, 772, 18, 55, 2908, 67, 23784, 571, 31307, ...
self.pack_start (self.spinner, FALSE, FALSE, 0)
self.pack_start (self.spinner, False, False, 0)
def __init__ (self, callback, lower, upper, integer): gtk.VBox.__init__ (self) diff = upper - lower self.isInteger = integer if integer: step = 1 page = (diff+4) / 5 self.digits = 0 else: self.digits = -int(math.floor(math.log10(diff) + 0.5)) + 3 step = math.pow(10, -self.digits + 1) page = step * 10 if self.digits < 0: self.digits = 0 self.callback = callback self.adjustment = gtk.Adjustment (lower, lower, upper, step, page) self.spinner = gtk.SpinButton (self.adjustment, step, self.digits) self.spinner.set_numeric (TRUE) self.spinner.show() self.pack_start (self.spinner, FALSE, FALSE, 0) if not integer or diff >= 20: self.slider = gtk.HScale (self.adjustment) self.slider.set_size_request (200, -1) self.slider.set_draw_value (FALSE) self.slider.show() self.pack_start (self.slider, FALSE, FALSE, 0) self.adjConn = self.adjustment.connect ("value-changed", callback)
ab8126074d7036807d1d842171687cc01617a181 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4580/ab8126074d7036807d1d842171687cc01617a181/driconf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 1348, 16, 2612, 16, 3854, 16, 3571, 4672, 22718, 18, 58, 3514, 16186, 2738, 972, 261, 2890, 13, 3122, 273, 3854, 300, 2612, 365, 18, 291, 4522, 273, 357...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 261, 2890, 16, 1348, 16, 2612, 16, 3854, 16, 3571, 4672, 22718, 18, 58, 3514, 16186, 2738, 972, 261, 2890, 13, 3122, 273, 3854, 300, 2612, 365, 18, 291, 4522, 273, 357...
while step < len(code): op = ord(code[step])
while step < len(co.co_code): op = ord(co.co_code[step])
def getargs(co): """Get information about the arguments accepted by a code object. Three things are returned: (args, varargs, varkw), where 'args' is a list of argument names (possibly containing nested lists), and 'varargs' and 'varkw' are the names of the * and ** arguments or None.""" if not iscode(co): raise TypeError('arg is not a code object') code = co.co_code nargs = co.co_argcount names = co.co_varnames args = list(names[:nargs]) step = 0 # The following acrobatics are for anonymous (tuple) arguments. for i in range(nargs): if args[i][:1] in ('', '.'): stack, remain, count = [], [], [] while step < len(code): op = ord(code[step]) step = step + 1 if op >= dis.HAVE_ARGUMENT: opname = dis.opname[op] value = ord(code[step]) + ord(code[step+1])*256 step = step + 2 if opname in ('UNPACK_TUPLE', 'UNPACK_SEQUENCE'): remain.append(value) count.append(value) elif opname == 'STORE_FAST': stack.append(names[value]) # Special case for sublists of length 1: def foo((bar)) # doesn't generate the UNPACK_TUPLE bytecode, so if # `remain` is empty here, we have such a sublist. if not remain: stack[0] = [stack[0]] break else: remain[-1] = remain[-1] - 1 while remain[-1] == 0: remain.pop() size = count.pop() stack[-size:] = [stack[-size:]] if not remain: break remain[-1] = remain[-1] - 1 if not remain: break args[i] = stack[0] varargs = None if co.co_flags & CO_VARARGS: varargs = co.co_varnames[nargs] nargs = nargs + 1 varkw = None if co.co_flags & CO_VARKEYWORDS: varkw = co.co_varnames[nargs] return args, varargs, varkw
48b04f8a037fd669331241100a899163d25a0f09 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/48b04f8a037fd669331241100a899163d25a0f09/inspect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1968, 12, 2894, 4672, 3536, 967, 1779, 2973, 326, 1775, 8494, 635, 279, 981, 733, 18, 225, 935, 992, 9198, 854, 2106, 30, 261, 1968, 16, 19732, 16, 569, 9987, 3631, 1625, 296, 196...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1968, 12, 2894, 4672, 3536, 967, 1779, 2973, 326, 1775, 8494, 635, 279, 981, 733, 18, 225, 935, 992, 9198, 854, 2106, 30, 261, 1968, 16, 19732, 16, 569, 9987, 3631, 1625, 296, 196...
settings_overrides={'strict_visitor': 1})
settings_spec=self)
def test_publish(self): if self.run_in_debugger: pdb.set_trace() output = docutils.core.publish_string( source=self.input, reader_name='standalone', parser_name='restructuredtext', writer_name=self.writer_name, settings_overrides={'strict_visitor': 1}) self.compare_output(self.input, output, self.expected)
4a6c3a0877bc3e7284c742bf52b06d1b00f0ac40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/4a6c3a0877bc3e7284c742bf52b06d1b00f0ac40/DocutilsTestSupport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6543, 12, 2890, 4672, 309, 365, 18, 2681, 67, 267, 67, 4148, 693, 30, 10892, 18, 542, 67, 5129, 1435, 876, 273, 997, 5471, 18, 3644, 18, 6543, 67, 1080, 12, 1084, 33, 2890,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6543, 12, 2890, 4672, 309, 365, 18, 2681, 67, 267, 67, 4148, 693, 30, 10892, 18, 542, 67, 5129, 1435, 876, 273, 997, 5471, 18, 3644, 18, 6543, 67, 1080, 12, 1084, 33, 2890,...
def getCachedFileFromMarker(self, marker):
def getCachedFileFromMarker(self, marker, suffix=None):
def getCachedFileFromMarker(self, marker): """Check whether a basket exists for marker and suffix.
650bd5e1b291f0846625e3656d53a7ea56cf16d7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9162/650bd5e1b291f0846625e3656d53a7ea56cf16d7/cachemanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20543, 812, 1265, 7078, 12, 2890, 16, 5373, 16, 3758, 33, 7036, 4672, 3536, 1564, 2856, 279, 12886, 1704, 364, 5373, 471, 3758, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20543, 812, 1265, 7078, 12, 2890, 16, 5373, 16, 3758, 33, 7036, 4672, 3536, 1564, 2856, 279, 12886, 1704, 364, 5373, 471, 3758, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if matches.size(): b = matches.begin() docid = b.get_docid()
if len(matches): docid = matches[0].docid
def add_text(self, identifier, text, mime_type='text/plain'): ''' "identifier" is (classname, itemid, property) ''' if mime_type != 'text/plain': return if not text: text = ''
20d000381e857a74e48e80d4e59a7719b7bb006e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1906/20d000381e857a74e48e80d4e59a7719b7bb006e/indexer_xapian.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 955, 12, 2890, 16, 2756, 16, 977, 16, 4892, 67, 723, 2218, 955, 19, 7446, 11, 4672, 9163, 315, 5644, 6, 353, 225, 261, 18340, 16, 16862, 16, 1272, 13, 9163, 309, 4892, 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, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 955, 12, 2890, 16, 2756, 16, 977, 16, 4892, 67, 723, 2218, 955, 19, 7446, 11, 4672, 9163, 315, 5644, 6, 353, 225, 261, 18340, 16, 16862, 16, 1272, 13, 9163, 309, 4892, 67, ...
self.datequery_result(webpage, datedir, pagenum+1)
nextdownloads = self.datequery_result(webpage, relpath, pagenum+1) downloaded.extend(nextdownloads) return downloaded
def datequery_result(self, webpage, datedir, pagenum): filehandle = open('%s/index_%d.html' % (datedir, pagenum), 'w') filehandle.write(webpage) filehandle.close()
f55a79144368a66b96fa92a55d8cec444dbad926 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5095/f55a79144368a66b96fa92a55d8cec444dbad926/supremecourt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1509, 2271, 67, 2088, 12, 2890, 16, 3311, 2433, 16, 302, 690, 481, 16, 4262, 7924, 4672, 585, 4110, 273, 1696, 29909, 87, 19, 1615, 10185, 72, 18, 2620, 11, 738, 261, 12563, 481, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1509, 2271, 67, 2088, 12, 2890, 16, 3311, 2433, 16, 302, 690, 481, 16, 4262, 7924, 4672, 585, 4110, 273, 1696, 29909, 87, 19, 1615, 10185, 72, 18, 2620, 11, 738, 261, 12563, 481, 16, ...
'Set the background of `widget` to `color`.'
'Set the background of `widget` to a color or image.'
def _set_background(self, widget, ccontext = None, bounds = None): 'Set the background of `widget` to `color`.' if not widget.window: return False if ccontext is None: ccontext = widget.window.cairo_create() if bounds is None: bounds = widget.window.get_size() if self._black and widget is self.pres: bg = (0, 0, 0) elif self._logo and widget is self.pres: if not hasattr(self,"_logo_pbuf"): try: self._logo_pbuf = gtk.gdk.pixbuf_new_from_file_at_size( config.get("screen", "logo"), int(bounds[0]/1.5), int(bounds[1]/1.5)) except gobject.GError: print "Error: Could not open logo file." self._logo_pbuf = None bg = c2dec(config.getcolor("screen", "logo_bg")) ccontext.set_source_rgb(bg[0], bg[1], bg[2]) ccontext.paint() if self._logo_pbuf <> None: ccontext.set_source_pixbuf(self._logo_pbuf, (bounds[0]-self._logo_pbuf.get_width())/2,\ (bounds[1]-self._logo_pbuf.get_height())/2) ccontext.paint() return else: bgtype = config.get("screen", "bg_type") bgimage = config.get("screen", "bg_image") bgcolor1 = config.getcolor("screen", "bg_color_1") bgcolor2 = config.getcolor("screen", "bg_color_2") if bgtype == 'image': bgkey = str(bounds[0])+'x'+str(bounds[1]) try: if self.bg_dirty or bgkey not in self.bg_img: pixbuf = gtk.gdk.pixbuf_new_from_file(bgimage) self.bg_img[bgkey] = pixbuf.scale_simple(bounds[0], bounds[1], gtk.gdk.INTERP_BILINEAR) except gobject.GError: print "Error: Could not open background file." if hasattr(self, 'bg_img') and bgkey in self.bg_img: del self.bg_img[bgkey] bg = (0,0,0) #Set back to the default config.setcolor("screen", "bg_color_1", (0, 13107, 19660)) config.setcolor("screen", "bg_color_2", (0, 26214, 39321)) else: ccontext.set_source_pixbuf(self.bg_img[bgkey], 0, 0) ccontext.paint() return finally: self.bg_dirty = False elif bgtype == 'color': color = (c2dec(bgcolor1), c2dec(bgcolor2)) if len(color) >= 3 and isinstance(color[0], (float, int)): # Draw a solid color ccontext.set_source_rgb(color[0], color[1], color[2]) ccontext.paint() elif isinstance(color[0], tuple): # Draw a gradiant if config.get("screen", "bg_angle") == u"\u2193": #Down gr_x1 = gr_y1 = gr_x2 = 0 gr_y2 = bounds[1] elif config.get("screen", "bg_angle") == u'\u2199': #Down-Left gr_x2 = gr_y1 = 0 (gr_x1, gr_y2) = bounds elif config.get("screen", "bg_angle") == u'\u2192': #Right gr_x1 = gr_y1 = gr_y2 = 0 gr_x2 = bounds[0] else: # Down-Right gr_x1 = gr_y1 = 0 (gr_x2, gr_y2) = bounds gradient = cairo.LinearGradient(gr_x1, gr_y1, gr_x2, gr_y2) for i in range(len(color)): gradient.add_color_stop_rgb(1.0*i/(len(color)-1), color[i][0], color[i][1], color[i][2]) ccontext.rectangle(0,0, bounds[0], bounds[1]) ccontext.set_source(gradient) ccontext.fill() else: print "_set_background: Incorrect color"
8d23729024fa76f4a1017ef684bb5b59fc46d99c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5029/8d23729024fa76f4a1017ef684bb5b59fc46d99c/screen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 9342, 12, 2890, 16, 3604, 16, 276, 2472, 273, 599, 16, 4972, 273, 599, 4672, 296, 694, 326, 5412, 434, 1375, 6587, 68, 358, 279, 2036, 578, 1316, 1093, 309, 486, 3604, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9342, 12, 2890, 16, 3604, 16, 276, 2472, 273, 599, 16, 4972, 273, 599, 4672, 296, 694, 326, 5412, 434, 1375, 6587, 68, 358, 279, 2036, 578, 1316, 1093, 309, 486, 3604, ...
response = xmlrpclib.dumps(response, methodresponse=1)
response = xmlrpclib.dumps(response, methodresponse=1, allow_none = self.allow_none)
def _marshaled_dispatch(self, data, dispatch_method = None): """Dispatches an XML-RPC method from marshalled (XML) data.
44fa98d1ff28f6996bb6ec8ada530657e180b1c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/44fa98d1ff28f6996bb6ec8ada530657e180b1c0/SimpleXMLRPCServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3108, 329, 67, 10739, 12, 2890, 16, 501, 16, 3435, 67, 2039, 273, 599, 4672, 3536, 5325, 281, 392, 3167, 17, 8087, 707, 628, 10893, 1259, 261, 4201, 13, 501, 18, 2, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3108, 329, 67, 10739, 12, 2890, 16, 501, 16, 3435, 67, 2039, 273, 599, 4672, 3536, 5325, 281, 392, 3167, 17, 8087, 707, 628, 10893, 1259, 261, 4201, 13, 501, 18, 2, -100, -100, ...
def_newitem = { 'oversion':0, 'npeers': 0, 'ntorrents': 0, 'nprefs': 0, 'nqueries':0 }
def updateDB(self, old_version): if old_version == 1 or old_version == 2 or old_version == 3: def_newitem = { 'oversion':0, 'npeers': 0, 'ntorrents': 0, 'nprefs': 0, 'nqueries':0 } keys = self._keys() for key in keys: self._updateItem(key, def_newitem)
8b66d78efc96d552825220bd0d697e94d4dc141d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9686/8b66d78efc96d552825220bd0d697e94d4dc141d/cachedb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 2290, 12, 2890, 16, 1592, 67, 1589, 4672, 309, 1592, 67, 1589, 422, 404, 578, 1592, 67, 1589, 422, 576, 578, 1592, 67, 1589, 422, 890, 30, 225, 1311, 273, 365, 6315, 2452, 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 2290, 12, 2890, 16, 1592, 67, 1589, 4672, 309, 1592, 67, 1589, 422, 404, 578, 1592, 67, 1589, 422, 576, 578, 1592, 67, 1589, 422, 890, 30, 225, 1311, 273, 365, 6315, 2452, 1435, ...
>>> a = Protection()
>>> a = Protection('','horde','3.0.5','portage')
def get_protectedname(self, destination, filename): ''' Woh. Somewhere, we've decided that we're trying to overwrite a file that we really want to save. So, we need a new name for the file that we want to install - which is where we come in.
623e115340b2dccbf16ad0f515bcb7a6b35c7bfa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10458/623e115340b2dccbf16ad0f515bcb7a6b35c7bfa/protect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1117, 529, 12, 2890, 16, 2929, 16, 1544, 4672, 9163, 678, 16699, 18, 225, 348, 362, 359, 14852, 16, 732, 8081, 2109, 13898, 716, 732, 4565, 8374, 358, 6156, 279, 585, 716, 732...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1117, 529, 12, 2890, 16, 2929, 16, 1544, 4672, 9163, 678, 16699, 18, 225, 348, 362, 359, 14852, 16, 732, 8081, 2109, 13898, 716, 732, 4565, 8374, 358, 6156, 279, 585, 716, 732...
self.db.getWriteAccess()
def __getview(self): db = self.db._db view = db.view(self.classname) mkprops = view.structure() if mkprops and self.db.fastopen: return view.ordered(1) # is the definition the same? for nm, rutyp in self.ruprops.items(): for mkprop in mkprops: if mkprop.name == nm: break else: mkprop = None if mkprop is None: print "%s missing prop %s (%s)" % (self.classname, nm, rutyp.__class__.__name__) break if _typmap[rutyp.__class__] != mkprop.type: print "%s - prop %s (%s) has wrong mktyp (%s)" % (self.classname, nm, rutyp.__class__.__name__, mkprop.type) break else: return view.ordered(1) # need to create or restructure the mk view # id comes first, so MK will order it for us self.db.getWriteAccess() self.db.dirty = 1 s = ["%s[id:I" % self.classname] for nm, rutyp in self.ruprops.items(): mktyp = _typmap[rutyp.__class__] s.append('%s:%s' % (nm, mktyp)) if mktyp == 'V': s[-1] += ('[fid:I]') s.append('_isdel:I,activity:I,creation:I,creator:I]') v = self.db._db.getas(','.join(s)) self.db.commit() return v.ordered(1)
f01fcdcf7e1e6dd3255f017cff52859dcf4680c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f01fcdcf7e1e6dd3255f017cff52859dcf4680c1/back_metakit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1945, 12, 2890, 4672, 1319, 273, 365, 18, 1966, 6315, 1966, 1476, 273, 1319, 18, 1945, 12, 2890, 18, 18340, 13, 5028, 9693, 273, 1476, 18, 7627, 1435, 309, 5028, 9693, 471, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1945, 12, 2890, 4672, 1319, 273, 365, 18, 1966, 6315, 1966, 1476, 273, 1319, 18, 1945, 12, 2890, 18, 18340, 13, 5028, 9693, 273, 1476, 18, 7627, 1435, 309, 5028, 9693, 471, ...
print "searching cache for ", troveName
def getMetadata(self, troveList, label, cacheFile = None, cacheOnly = False, saveOnly = False): metadata = {} if cacheFile and not saveOnly: try: print "opening cache" cacheFp = open(cacheFile, "r") cache = pickle.load(cacheFp) cacheFp.close() except IOError, EOFError: print "got an error, returning" if cacheOnly: return {} else: print "reading cache" print cache lStr = label.asString()
08f4b50b7b59c04afbfa7e1bc89323cb1d41ea4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/08f4b50b7b59c04afbfa7e1bc89323cb1d41ea4a/conaryclient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11159, 12, 2890, 16, 23432, 537, 682, 16, 1433, 16, 18748, 273, 599, 16, 1247, 3386, 273, 1083, 16, 1923, 3386, 273, 1083, 4672, 1982, 273, 2618, 309, 18748, 471, 486, 1923, 3386, 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, 11159, 12, 2890, 16, 23432, 537, 682, 16, 1433, 16, 18748, 273, 599, 16, 1247, 3386, 273, 1083, 16, 1923, 3386, 273, 1083, 4672, 1982, 273, 2618, 309, 18748, 471, 486, 1923, 3386, 30, ...
if file_ not in knownFiles and filetypes.is_video_filename(filenameToUnicode(file_)):
if (file_ not in known_files and not file_.startswith(incomplete_dir) and filetypes.is_video_filename(filenameToUnicode(file_))):
def update(self): self.ufeed.confirmDBThread() moviesDir = config.get(prefs.MOVIES_DIRECTORY) # Files known about by real feeds knownFiles = set() for item in views.toplevelItems: if item.feed_id is not self.ufeed.id: knownFiles.add(item.get_filename()) if item.isContainerItem: item.find_new_children()
d1ffddc5f472a5d87bc879f742e109f831dca38e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/d1ffddc5f472a5d87bc879f742e109f831dca38e/feed.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 4672, 365, 18, 696, 73, 329, 18, 10927, 2290, 3830, 1435, 7344, 29028, 1621, 273, 642, 18, 588, 12, 1484, 2556, 18, 5980, 4136, 3991, 67, 17229, 13, 468, 6471, 4846, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 4672, 365, 18, 696, 73, 329, 18, 10927, 2290, 3830, 1435, 7344, 29028, 1621, 273, 642, 18, 588, 12, 1484, 2556, 18, 5980, 4136, 3991, 67, 17229, 13, 468, 6471, 4846, 29...
print 'NEW POST: %s: %s (%s)' % (entry.title, entry.link.replace("http://www.streetgeek.com.au/portal/modules.php?name=Forums&file=viewtopic&p=", "http://fj.streetgeek.com.au/"), feed) irc.action(CHANNEL, 'found a new post on %s: %s: %s' % (str(feed), str(entry.title.strip()), str(entry.link.strip().replace("http://www.streetgeek.com.au/portal/modules.php?name=Forums&file=viewtopic&p=", "http://fj.streetgeek.com.au/"))))
link = str(entry.link.replace("http://www.streetgeek.com.au/portal/modules.php?name=Forums&file=viewtopic&p=", "http://fj.streetgeek.com.au/")) print 'NEW POST: %s: %s (%s)' % (entry.title, link, feed) irc.action(CHANNEL, 'found a new post on %s: %s: %s' % (str(feed), str(entry.title), link))
def announce_post(irc, feed, entry): global CHANNEL print 'NEW POST: %s: %s (%s)' % (entry.title, entry.link.replace("http://www.streetgeek.com.au/portal/modules.php?name=Forums&file=viewtopic&p=", "http://fj.streetgeek.com.au/"), feed) irc.action(CHANNEL, 'found a new post on %s: %s: %s' % (str(feed), str(entry.title.strip()), str(entry.link.strip().replace("http://www.streetgeek.com.au/portal/modules.php?name=Forums&file=viewtopic&p=", "http://fj.streetgeek.com.au/"))))
f05ae9855eec1f1cfc94d94ca2b3a82d5debb107 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12995/f05ae9855eec1f1cfc94d94ca2b3a82d5debb107/feedbot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14281, 67, 2767, 12, 481, 71, 16, 4746, 16, 1241, 4672, 2552, 27417, 1692, 273, 609, 12, 4099, 18, 1232, 18, 2079, 2932, 2505, 2207, 5591, 18, 22424, 908, 3839, 18, 832, 18, 8377, 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, 14281, 67, 2767, 12, 481, 71, 16, 4746, 16, 1241, 4672, 2552, 27417, 1692, 273, 609, 12, 4099, 18, 1232, 18, 2079, 2932, 2505, 2207, 5591, 18, 22424, 908, 3839, 18, 832, 18, 8377, 19, ...
elif n == 10:
elif number == 10:
def number_mayan(self, n): x = 42.5 x1, x2, xc, x3, x4 = x + 5, x + 15, x + 20, x + 25, x + 35 y = 60 y1s, y5s, y10s, y20s = y, y - 10, y - 20, y - 40 if n == 5: svg_string = self._svg_bar(x, y1s) elif n == 7: svg_string = self._svg_bar(x, y1s) svg_string += self._svg_circle(x2, y5s, 3) svg_string += self._svg_circle(x3, y5s, 3) elif n == 10: svg_string = self._svg_bar(x, y1s) svg_string += self._svg_bar(x, y5s) elif n == 11: svg_string = self._svg_bar(x, y1s) svg_string += self._svg_bar(x, y5s) svg_string += self._svg_circle(x+20, y10s, 3) elif n == 14: svg_string = self._svg_bar(x, y1s) svg_string += self._svg_bar(x, y5s) svg_string += self._svg_circle(x1, y10s, 3) svg_string += self._svg_circle(x2, y10s, 3) svg_string += self._svg_circle(x3, y10s, 3) svg_string += self._svg_circle(x4, y10s, 3) elif n == 15: svg_string = self._svg_bar(x, y1s) svg_string += self._svg_bar(x, y5s) svg_string += self._svg_bar(x, y10s) elif n == 21: svg_string = self._svg_circle(xc, y1s, 3) svg_string += self._svg_circle(xc, y20s, 3) elif n == 22: svg_string = self._svg_circle(x2, y1s, 3) svg_string += self._svg_circle(x3, y1s, 3) svg_string += self._svg_circle(xc, y20s, 3) elif n == 33: svg_string = self._svg_bar(x, y1s) svg_string += self._svg_bar(x, y5s) svg_string += self._svg_circle(x1, y10s, 3) svg_string += self._svg_circle(xc, y10s, 3) svg_string += self._svg_circle(x4, y10s, 3) svg_string += self._svg_circle(xc, y20s, 3) return svg_string
3abdde2d4415b99e072401aa95cc310d13046e05 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7609/3abdde2d4415b99e072401aa95cc310d13046e05/gencards.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1300, 67, 24877, 304, 12, 2890, 16, 290, 4672, 619, 273, 14856, 18, 25, 619, 21, 16, 619, 22, 16, 15192, 16, 619, 23, 16, 619, 24, 273, 619, 397, 1381, 16, 619, 397, 4711, 16, 619,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1300, 67, 24877, 304, 12, 2890, 16, 290, 4672, 619, 273, 14856, 18, 25, 619, 21, 16, 619, 22, 16, 15192, 16, 619, 23, 16, 619, 24, 273, 619, 397, 1381, 16, 619, 397, 4711, 16, 619,...
are passed to it in the `edges`.
are passed to it in the 'edges' generator.
def kcliquesByEdges(edges, k): """Generate k-cliques from edges. Generator function that generates a list of cliques of size k in the order they are formed when edges are added in the order defined by the `edges` argument. If many cliques are formed by adding one edge, the order of the cliques is arbitrary. This generator will pass through any EvaluationEvent objects that are passed to it in the `edges`. Parameters ---------- edges : iterable with elements (node_1, node_2, weight) The edges that form the network. `edges` may also contain EvaluationEvent objects, which are simply passed through. k : int The function returns `k`-cliques, that is, induced full subnets of `k` nodes. Yield ----- kclique : KClique object When a new k-clique is formed, it is returned as a KClique object. Notes ----- If an edge is included in `edges` multiple times, the all k-cliques in the network constructed do far will be returned every time. Most of the time this is not what is wanted, so take care not the supply multiple edges. (LK 31.7.2009) """ newNet=pynet.SymmNet() # Edges are added to an empty network one by one for edge in edges: if isinstance(edge, EvaluationEvent): yield edge else: # First we find all new triangles that are born when the new edge is added triangleEnds=set() # We keep track of the tip nodes of the new triangles for adjacentNode in newNet[edge[0]]: # Neighbor of one node of the edge ... if newNet[adjacentNode,edge[1]] != 0: #...is a neighbor of the other node of the edge... triangleEnds.add(adjacentNode) #...then the neighbor is a tip of a new triangle # New k-cliques are now (k-2)-cliques at the triangle end points plus # the two nodes at the tips of the edge we are adding to the network for kclique in kcliquesAtSubnet(triangleEnds,newNet,k-2): yield kclique+KClique([edge[0],edge[1]]) newNet[edge[0],edge[1]]=edge[2] # Finally we add the new edge to the network
aedcbc095d687b4ff7e65010866f483adf54eb65 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/768/aedcbc095d687b4ff7e65010866f483adf54eb65/percolator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 417, 4857, 29896, 858, 10697, 12, 8746, 16, 417, 4672, 3536, 4625, 417, 17, 4857, 29896, 628, 5231, 18, 225, 10159, 445, 716, 6026, 279, 666, 434, 4942, 29896, 434, 963, 417, 316, 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, 417, 4857, 29896, 858, 10697, 12, 8746, 16, 417, 4672, 3536, 4625, 417, 17, 4857, 29896, 628, 5231, 18, 225, 10159, 445, 716, 6026, 279, 666, 434, 4942, 29896, 434, 963, 417, 316, 326, ...
indx = indx / thisN
indx = indx // thisN
def _scalarfunc(*params): params = squeeze(asarray(params)) return func(params,*args)
020b04c6dfb7d4314335367d321d657d08ec516e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12971/020b04c6dfb7d4314335367d321d657d08ec516e/optimize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8748, 644, 30857, 2010, 4672, 859, 273, 17173, 12, 345, 1126, 12, 2010, 3719, 327, 1326, 12, 2010, 16, 14, 1968, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8748, 644, 30857, 2010, 4672, 859, 273, 17173, 12, 345, 1126, 12, 2010, 3719, 327, 1326, 12, 2010, 16, 14, 1968, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
dsect.y = xi dsect.x = xj
dsect.j = xi dsect.i = xj
def getcourse(isprobe, akey): "Get a course and distance from the user." key = 0 dquad = copy.copy(game.quadrant) navmode = "unspecified" itemp = "curt" dsect = coord() iprompt = False if game.landed and not isprobe: prout(_("Dummy! You can't leave standard orbit until you")) proutn(_("are back aboard the ship.")) scanner.chew() return False while navmode == "unspecified": if damaged(DNAVSYS): if isprobe: prout(_("Computer damaged; manual navigation only")) else: prout(_("Computer damaged; manual movement only")) scanner.chew() navmode = "manual" key = IHEOL break if isprobe and akey != -1: # For probe launch, use pre-scanned value first time key = akey akey = -1 else: key = scanner.next() if key == IHEOL: proutn(_("Manual or automatic- ")) iprompt = True scanner.chew() elif key == IHALPHA: if scanner.sees("manual"): navmode = "manual" key = scanner.next() break elif scanner.sees("automatic"): navmode = "automatic" key = scanner.next() break else: huh() scanner.chew() return False else: # numeric if isprobe: prout(_("(Manual navigation assumed.)")) else: prout(_("(Manual movement assumed.)")) navmode = "manual" break if navmode == "automatic": while key == IHEOL: if isprobe: proutn(_("Target quadrant or quadrant&sector- ")) else: proutn(_("Destination sector or quadrant&sector- ")) scanner.chew() iprompt = True key = scanner.next() if key != IHREAL: huh() return False xi = int(round(scanner.real))-1 key = scanner.next() if key != IHREAL: huh() return False xj = int(round(scanner.real))-1 key = scanner.next() if key == IHREAL: # both quadrant and sector specified xk = int(round(scanner.real))-1 key = scanner.next() if key != IHREAL: huh() return False xl = int(round(scanner.real))-1 dquad.x = xi dquad.y = xj dsect.y = xk dsect.x = xl else: # only one pair of numbers was specified if isprobe: # only quadrant specified -- go to center of dest quad dquad.x = xi dquad.y = xj dsect.y = dsect.x = 4 # preserves 1-origin behavior else: # only sector specified dsect.y = xi dsect.x = xj itemp = "normal" if not VALID_QUADRANT(dquad.y,dquad.x) or not VALID_SECTOR(dsect.x,dsect.y): huh() return False skip(1) if not isprobe: if itemp > "curt": if iprompt: prout(_("Helmsman Sulu- \"Course locked in for Sector %s.\"") % dsect) else: prout(_("Ensign Chekov- \"Course laid in, Captain.\"")) # the actual deltas get computed here delta = coord() delta.x = dquad.y-game.quadrant.y + 0.1*(dsect.x-game.sector.y) delta.y = game.quadrant.x-dquad.x + 0.1*(game.sector.x-dsect.y) else: # manual while key == IHEOL: proutn(_("X and Y displacements- ")) scanner.chew() iprompt = True key = scanner.next() itemp = "verbose" if key != IHREAL: huh() return False delta.y = scanner.real key = scanner.next() if key != IHREAL: huh() return False delta.x = scanner.real # Check for zero movement if delta.x == 0 and delta.y == 0: scanner.chew() return False if itemp == "verbose" and not isprobe: skip(1) prout(_("Helmsman Sulu- \"Aye, Sir.\"")) # Course actually laid in. game.dist = delta.distance() game.direc = delta.bearing() if game.direc < 0.0: game.direc += 12.0 scanner.chew() return True
e67cf36a789c4ab1cd905a9a08e91d219395f538 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3176/e67cf36a789c4ab1cd905a9a08e91d219395f538/sst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 5566, 12, 291, 27230, 16, 279, 856, 4672, 315, 967, 279, 4362, 471, 3888, 628, 326, 729, 1199, 498, 273, 374, 302, 21733, 273, 1610, 18, 3530, 12, 13957, 18, 21733, 6890, 13, 8775...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5566, 12, 291, 27230, 16, 279, 856, 4672, 315, 967, 279, 4362, 471, 3888, 628, 326, 729, 1199, 498, 273, 374, 302, 21733, 273, 1610, 18, 3530, 12, 13957, 18, 21733, 6890, 13, 8775...
if not launchUI:
if not launchUI and not force_UI:
def run(): try: opts, args = getopt.getopt(sys.argv[1:], 'hbPtcvl:e:i:d:p:o:') except getopt.error, msg: print >>sys.stderr, str(msg) + '\n\n' + __doc__ sys.exit() doTrain = False doClassify = False doExpunge = options["imap", "expunge"] imapDebug = 0 sleepTime = 0 promptForPass = False launchUI = False server = "" username = "" for opt, arg in opts: if opt == '-h': print >>sys.stderr, __doc__ sys.exit() elif opt == "-b": launchUI = True elif opt == '-t': doTrain = True elif opt == '-P': promptForPass = True elif opt == '-c': doClassify = True elif opt == '-v': options["globals", "verbose"] = True elif opt == '-e': if arg == 'y': doExpunge = True else: doExpunge = False elif opt == '-i': imapDebug = int(arg) elif opt == '-l': sleepTime = int(arg) * 60 elif opt == '-o': options.set_from_cmdline(arg, sys.stderr) bdbname, useDBM = storage.database_type(opts) # Let the user know what they are using... v = get_current_version(); print "%s.\n" % (v.get_long_version("SpamBayes IMAP Filter"),) if options["globals", "verbose"]: print "Loading database %s..." % (bdbname), classifier = storage.open_storage(bdbname, useDBM) message_db = message.open_storage(*message.database_type()) if options["globals", "verbose"]: print "Done." if options["imap", "server"]: # The options class is ahead of us here: # it knows that imap:server will eventually be able to have # multiple values, but for the moment, we just use the first one server = options["imap", "server"] if len(server) > 0: server = server[0] username = options["imap", "username"] if len(username) > 0: username = username[0] if not promptForPass: pwd = options["imap", "password"] if len(pwd) > 0: pwd = pwd[0] else: pwd = None if not launchUI: print "You need to specify both a server and a username." sys.exit() if promptForPass: pwd = getpass() if server.find(':') > -1: server, port = server.split(':', 1) port = int(port) else: if options["imap", "use_ssl"]: port = 993 else: port = 143 imap_filter = IMAPFilter(classifier) # Web interface. We have changed the rules about this many times. # With 1.0.x, the rule is that the interface is served if we are # not classifying or training. However, this runs into the problem # that if we run with -l, we might still want to edit the options, # and we don't want to start a separate instance, because then the # database is accessed from two processes. # With 1.1.x, the rule is that the interface is also served if the # -l option is used, which means it is only not served if we are # doing a one-off classification/train. In that case, there would # probably not be enough time to get to the interface and interact # with it (and we don't want it to die halfway through!), and we # don't want to slow classification/training down, either. if sleepTime or not (doClassify or doTrain): if server == "": imap = None else: imap = IMAPSession(server, port, imapDebug, doExpunge) # Load stats manager. stats = Stats(options, message_db) httpServer = UserInterfaceServer(options["html_ui", "port"]) httpServer.register(IMAPUserInterface(classifier, imap, pwd, IMAPSession, stats=stats)) launchBrowser=launchUI or options["html_ui", "launch_browser"] if sleepTime: # Run in a separate thread, as we have more work to do. thread.start_new_thread(Dibbler.run, (), {"launchBrowser":launchBrowser}) else: Dibbler.run(launchBrowser=launchBrowser) if doClassify or doTrain: while True: imap = IMAPSession(server, port, imapDebug, doExpunge) if imap.connected: imap.login(username, pwd) imap_filter.imap_server = imap if doTrain: if options["globals", "verbose"]: print "Training" imap_filter.Train() if doClassify: if options["globals", "verbose"]: print "Classifying" imap_filter.Filter() imap.logout() else: # Failed to connect. This may be a temporary problem, # so just continue on and try again. If we are only # running once we will end, otherwise we'll try again # in sleepTime seconds. pass if sleepTime: time.sleep(sleepTime) else: break
4750d4f3615d798d5f3f56cfd02d7010a4608505 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/4750d4f3615d798d5f3f56cfd02d7010a4608505/sb_imapfilter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 13332, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 296, 76, 70, 52, 5111, 10872, 30, 73, 30, 77, 30, 72, 30, 84, 30, 83, 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, 1086, 13332, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 296, 76, 70, 52, 5111, 10872, 30, 73, 30, 77, 30, 72, 30, 84, 30, 83, 2...
else: rv = _CommitTransaction(ta)
def _rename_atomic(src, dst): ta = _CreateTransaction(None, 0, 0, 0, 0, 1000, 'Werkzeug rename') if ta == -1: return False try: retry = 0 rv = False while not rv and retry < 100: rv = _MoveFileTransacted(src, dst, None, None, _MOVEFILE_REPLACE_EXISTING | _MOVEFILE_WRITE_THROUGH, ta) if rv == 0: time.sleep(0.001) retry += 1 else: rv = _CommitTransaction(ta) return rv finally: _CloseHandle(ta)
4c4bfaca7eaef810aff0a09e0385bdaa2eb0106b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14437/4c4bfaca7eaef810aff0a09e0385bdaa2eb0106b/posixemulation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 18539, 67, 27718, 12, 4816, 16, 3046, 4672, 13561, 273, 389, 1684, 3342, 12, 7036, 16, 374, 16, 374, 16, 374, 16, 374, 16, 4336, 16, 296, 59, 264, 79, 31688, 6472, 6134, 309, 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, 389, 18539, 67, 27718, 12, 4816, 16, 3046, 4672, 13561, 273, 389, 1684, 3342, 12, 7036, 16, 374, 16, 374, 16, 374, 16, 374, 16, 4336, 16, 296, 59, 264, 79, 31688, 6472, 6134, 309, 13...
return "ERROR"
return "ERROR",reply
def socks5ParseResponse(r): if len(r)<8: return None version, reply, rsv, atype = struct.unpack("!BBBB",r[:4]) assert version==5 assert rsv==0 if reply != 0x00: return "ERROR" assert atype in (0x01,0x04) expected_len = 4 + ({1:4,4:16}[atype]) + 2 if len(r) < expected_len: return None elif len(r) > expected_len: raise ValueError("Overlong socks5 reply!") addr = r[4:-2] if atype == 0x01: return "%d.%d.%d.%d"%tuple(map(ord,addr)) else: # not really the right way to format IPv6 return "IPv6: %s"%(":".join([hex(ord(c)) for c in addr]))
ba578f0ed63128d4d245b1d40c0ac01d90f8a0da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7483/ba578f0ed63128d4d245b1d40c0ac01d90f8a0da/tor-resolve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7313, 87, 25, 3201, 1064, 12, 86, 4672, 309, 562, 12, 86, 13, 32, 28, 30, 327, 599, 1177, 16, 4332, 16, 3597, 90, 16, 30965, 273, 1958, 18, 17309, 2932, 5, 9676, 9676, 3113, 86, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7313, 87, 25, 3201, 1064, 12, 86, 4672, 309, 562, 12, 86, 13, 32, 28, 30, 327, 599, 1177, 16, 4332, 16, 3597, 90, 16, 30965, 273, 1958, 18, 17309, 2932, 5, 9676, 9676, 3113, 86, 10...
return
return 'break'
def run_module_event(self, event): """Run the module after setting up the environment.
f127a38d2121d6ead50e5fa216c34bc47785f6dc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/f127a38d2121d6ead50e5fa216c34bc47785f6dc/ScriptBinding.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 2978, 67, 2575, 12, 2890, 16, 871, 4672, 3536, 1997, 326, 1605, 1839, 3637, 731, 326, 3330, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1086, 67, 2978, 67, 2575, 12, 2890, 16, 871, 4672, 3536, 1997, 326, 1605, 1839, 3637, 731, 326, 3330, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
raise "\nERROR: Invalid Tree Item. "
raise Exception("\nERROR: Invalid Tree Item. ")
def SetItemBackgroundColour(self, item, col): """Sets the item background colour."""
e1463b9df091ad0e9d76292564d4389882b28de1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/e1463b9df091ad0e9d76292564d4389882b28de1/customtreectrl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 1180, 8199, 26404, 12, 2890, 16, 761, 16, 645, 4672, 3536, 2785, 326, 761, 5412, 15046, 12123, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1000, 1180, 8199, 26404, 12, 2890, 16, 761, 16, 645, 4672, 3536, 2785, 326, 761, 5412, 15046, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
appname = getattr(Context.g_module, Context.APPNAME, 'noname') version = getattr(Context.g_module, Context.VERSION, '1.0') tmp_folder = appname + '-' + version try: self.arch_name except: self.arch_name = tmp_folder + '.' + self.ext_algo.get(self.algo, self.algo)
arch_name = self.get_arch_name()
def archive(self): """ Create the archive (override or subclass) """ import tarfile
464a87414a1fb565e4e69a8076e1356940ff17e1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2886/464a87414a1fb565e4e69a8076e1356940ff17e1/Scripting.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5052, 12, 2890, 4672, 3536, 1788, 326, 5052, 261, 10601, 578, 10177, 13, 3536, 1930, 25857, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 5052, 12, 2890, 4672, 3536, 1788, 326, 5052, 261, 10601, 578, 10177, 13, 3536, 1930, 25857, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
"""Test that reactor.stop terminates reactor.run""" reactor.callLater(0.1, self.stop) reactor.run() reactor.callLater(0.1, self.stop) reactor.run()
"""Test that reactor.crash terminates reactor.run""" reactor.callLater(0.1, self.crash) reactor.run() reactor.callLater(0.1, self.crash) reactor.run()
def testRun(self): """Test that reactor.stop terminates reactor.run""" reactor.callLater(0.1, self.stop) reactor.run() # returns once .stop is called reactor.callLater(0.1, self.stop) reactor.run() # returns once .stop is called
0be193f40bb591ab4fea5811eacda01a0a047326 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0be193f40bb591ab4fea5811eacda01a0a047326/test_internet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1997, 12, 2890, 4672, 3536, 4709, 716, 19178, 18, 5681, 30559, 19178, 18, 2681, 8395, 19178, 18, 1991, 20607, 12, 20, 18, 21, 16, 365, 18, 5681, 13, 19178, 18, 2681, 1435, 468, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1997, 12, 2890, 4672, 3536, 4709, 716, 19178, 18, 5681, 30559, 19178, 18, 2681, 8395, 19178, 18, 1991, 20607, 12, 20, 18, 21, 16, 365, 18, 5681, 13, 19178, 18, 2681, 1435, 468, 1...
sage: q = qsieve(n, block=False, time=True) sage: q Proper factors so far: [] sage: q
sage: q = qsieve(n, block=False, time=True) sage: q Proper factors so far: [] sage: q
def data_to_list(out, n, time): """ Convert output of Hart's sieve and n to a list and time. INPUT: out -- snapshot of text output of Hart's QuadraticSieve program n -- the integer being factored OUTPUT: list -- proper factors found so far str -- time information """ i = out.find('FACTORS:') if i == -1: return [], '', out # whole thing else: verbose = out[:i] out = out[i+len('FACTORS:')+1:].strip() if time: w = out.split('\n') for i in range(len(w)): if 'user' in w[i]: break if i < len(w): t = w[i].strip() out = '\n'.join([w[j] for j in range(i)]) else: t = '' else: t = '' Z = sage.rings.integer.Integer v = out.split() v = list(set([Z(m) for m in v if Z(m) != n])) v.sort() return v, t, verbose
e7f0d75b37635d6b3b81be7b0cf491b4009d0c25 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/e7f0d75b37635d6b3b81be7b0cf491b4009d0c25/qsieve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 67, 869, 67, 1098, 12, 659, 16, 290, 16, 813, 4672, 3536, 4037, 876, 434, 670, 485, 1807, 272, 21271, 471, 290, 358, 279, 666, 471, 813, 18, 225, 12943, 30, 596, 1493, 4439, 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, 501, 67, 869, 67, 1098, 12, 659, 16, 290, 16, 813, 4672, 3536, 4037, 876, 434, 670, 485, 1807, 272, 21271, 471, 290, 358, 279, 666, 471, 813, 18, 225, 12943, 30, 596, 1493, 4439, 434...
return Decimal((sign, self._int, self._exp))._fix(context=context)
return Decimal((sign, self._int, self._exp))._fix(context)
def __neg__(self, context=None): """Returns a copy with the sign switched.
05069e441412309fa5da59f2e1f6132b4e2386f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/05069e441412309fa5da59f2e1f6132b4e2386f6/decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 14518, 972, 12, 2890, 16, 819, 33, 7036, 4672, 3536, 1356, 279, 1610, 598, 326, 1573, 31665, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 14518, 972, 12, 2890, 16, 819, 33, 7036, 4672, 3536, 1356, 279, 1610, 598, 326, 1573, 31665, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.name = name
def __init__(self, config_file, dir='', name='datafind'): self.name = name # unfortunately the logs directory has to be created before we call LSCDataFindJob try: os.mkdir(self.name) os.mkdir(self.name + '/logs') except: pass pipeline.LSCDataFindJob.__init__(self, self.name, self.name + '/logs', config_file) self.setup_cacheconv(config_file)
4f059de02ba49cc10932529819f1976c7ed0ae64 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/4f059de02ba49cc10932529819f1976c7ed0ae64/stfu_pipe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 642, 67, 768, 16, 1577, 2218, 2187, 508, 2218, 892, 4720, 11, 4672, 565, 468, 640, 24233, 326, 5963, 1867, 711, 358, 506, 2522, 1865, 732, 745, 511, 2312...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 642, 67, 768, 16, 1577, 2218, 2187, 508, 2218, 892, 4720, 11, 4672, 565, 468, 640, 24233, 326, 5963, 1867, 711, 358, 506, 2522, 1865, 732, 745, 511, 2312...
"You have an obsolete version of setuptools installed. Please\n" "remove it from your system entirely before rerunning this script." )
"The required version of setuptools (>=%s) is not installed, and\n" "can't be installed while this script is running. Please install\n" "a more recent version first.\n\n(Currently using %r)" ) % (min_version, get_setuptools_version())
def use_setuptools( version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, min_version=None
21bc510cae2ea2ea23b0f5d17df554274cea2c04 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9086/21bc510cae2ea2ea23b0f5d17df554274cea2c04/ez_setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 999, 67, 542, 30693, 12, 1177, 33, 5280, 67, 5757, 16, 4224, 67, 1969, 33, 5280, 67, 1785, 16, 358, 67, 1214, 33, 538, 18, 1397, 1214, 16, 1131, 67, 1589, 33, 7036, 2, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 999, 67, 542, 30693, 12, 1177, 33, 5280, 67, 5757, 16, 4224, 67, 1969, 33, 5280, 67, 1785, 16, 358, 67, 1214, 33, 538, 18, 1397, 1214, 16, 1131, 67, 1589, 33, 7036, 2, -100, -100, ...
except NameError:
except AttributeError:
def plot(self,det,axis,start=None,stop=None): bin = self.detector[det] try: bin.data except NameError: self.arrayRead(det) sumaxis = [2,1,0] sumaxis.remove(axis) low,high = self.__ranges(det,start,stop) #Get requested data subdata = (slice(low[0],high[0]),slice(low[1],high[1]),slice(low[2],high[2])) plotdata = self.data[subdata] for x in sumaxis: plotdata = sum(plotdata,x) #Renormalize data (renormalization theory not required) print str(low) + " " +str(high) if (bin.type in [1,7,11,17]): #Cylinder bins plotdata = plotdata/((high[0]**2*high[2]*high[1]/(2*pi))-(low[0]**2*low[2]*low[1]/(2*pi))) elif (bin.type in [0,3,4,5,10,13,14,15,16]): #Cartesian bins plotdata = plotdata/((high[0]-low[0])*(high[1]-low[1])*(high[1]-low[1])) xdata = linspace(bin.start[axis]+bin.delta[axis]/2,bin.stop[axis]+bin.delta[axis]/2, num=bin.num[axis], endpoint=False)[slice(low[axis],high[axis])] plot(xdata,plotdata,label=bin.name)
d785280b5a2acb60771b8b2db31c180e8e66ae71 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/509/d785280b5a2acb60771b8b2db31c180e8e66ae71/flukaplot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 12, 2890, 16, 8238, 16, 4890, 16, 1937, 33, 7036, 16, 5681, 33, 7036, 4672, 225, 4158, 273, 365, 18, 8238, 1229, 63, 8238, 65, 775, 30, 4158, 18, 892, 1335, 6394, 30, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 12, 2890, 16, 8238, 16, 4890, 16, 1937, 33, 7036, 16, 5681, 33, 7036, 4672, 225, 4158, 273, 365, 18, 8238, 1229, 63, 8238, 65, 775, 30, 4158, 18, 892, 1335, 6394, 30, 365, 18, ...
`s \geq` the sturm bound for `\Gamma_0` at
`s \geq` the Sturm bound for `\Gamma_0` at
def sturm_bound(self, M=None): r""" For a space M of modular forms, this function returns an integer B such that two modular forms in either self or M are equal if and only if their q-expansions are equal to precision B (note that this is 1+ the usual Sturm bound, since `O(q^\mathrm{prec})` has precision prec). If M is none, then M is set equal to self. EXAMPLES:: sage: S37=CuspForms(37,2) sage: S37.sturm_bound() 8 sage: M = ModularForms(11,2) sage: M.sturm_bound() 3 sage: ModularForms(Gamma1(15),2).sturm_bound() 33 .. note::
7cfc69b99a5e57fd68044d80a9e5bb2180a14c73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/7cfc69b99a5e57fd68044d80a9e5bb2180a14c73/space.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 384, 27430, 67, 3653, 12, 2890, 16, 490, 33, 7036, 4672, 436, 8395, 2457, 279, 3476, 490, 434, 681, 2490, 10138, 16, 333, 445, 1135, 392, 3571, 605, 4123, 716, 2795, 681, 2490, 10138, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 384, 27430, 67, 3653, 12, 2890, 16, 490, 33, 7036, 4672, 436, 8395, 2457, 279, 3476, 490, 434, 681, 2490, 10138, 16, 333, 445, 1135, 392, 3571, 605, 4123, 716, 2795, 681, 2490, 10138, ...
if answer == gtk.RESPONSE_OK:
if answer == gtk.RESPONSE_YES:
def Resolve(self): for conflict in self.Conflicts: if conflict[0] == 'ConflictFeature': answer = self.AskUser(self.Plugin, conflict) if answer == gtk.RESPONSE_OK: disableConflicts = conflict[2][0].DisableConflicts con = PluginConflict(conflict[2][0], disableConflicts) if con.Resolve(): conflict[2][0].Enabled = False else: return False else: return False
36d6b37e455460b3e47684e2c9154bf3ea58f2c9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7183/36d6b37e455460b3e47684e2c9154bf3ea58f2c9/Conflicts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9910, 12, 2890, 4672, 364, 7546, 316, 365, 18, 30897, 30, 309, 7546, 63, 20, 65, 422, 296, 10732, 4595, 4278, 5803, 273, 365, 18, 23663, 1299, 12, 2890, 18, 3773, 16, 7546, 13, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9910, 12, 2890, 4672, 364, 7546, 316, 365, 18, 30897, 30, 309, 7546, 63, 20, 65, 422, 296, 10732, 4595, 4278, 5803, 273, 365, 18, 23663, 1299, 12, 2890, 18, 3773, 16, 7546, 13, 309, ...
elif encoding and encoding!='identity':
elif encoding and encoding!='identity' and not rewrite:
def process_headers (self): # Headers are terminated by a blank line .. now in the regexp, # we want to say it's either a newline at the beginning of # the document, or it's a lot of headers followed by two newlines. # The cleaner alternative would be to read one line at a time # until we get to a blank line... m = re.match(r'^((?:[^\r\n]+\r?\n)*\r?\n)', self.recv_buffer) if not m: return # handle continue requests (XXX should be in process_response?) response = self.response.split() if response and response[1] == '100': # it's a Continue request, so go back to waiting for headers # XXX for HTTP/1.1 clients, forward this self.state = 'response' return # filter headers self.headers = applyfilter(FILTER_RESPONSE_HEADER, rfc822.Message(StringIO(self.read(m.end()))), attrs=self.nofilter) # check for unusual compressed files if not self.headers.has_key('Content-Type') and \ (self.document.endswith(".bz2") or \ self.document.endswith(".tgz") or \ self.document.endswith(".gz")): gm = mimetypes.guess_type(self.document, False) if gm[0] and gm[1]: self.headers['Content-Encoding'] = gm[1] self.headers['Content-Type'] = gm[0] # will content be rewritten? rewrite = False for ro in config['mime_content_rewriting']: if ro.match(self.headers.get('Content-Type', "")): rewrite = True break #debug(HURT_ME_PLENTY, "S/Headers ", `self.headers.headers`) if self.headers.has_key('Content-Length'): if rewrite: remove_headers(self.headers, ['Content-Length']) self.bytes_remaining = None else: self.bytes_remaining = int(self.headers['Content-Length']) else: self.bytes_remaining = None
ef38c5f9723295584bfe497badcf732d2a0b1525 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/ef38c5f9723295584bfe497badcf732d2a0b1525/HttpServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2485, 261, 2890, 4672, 468, 12158, 854, 14127, 635, 279, 7052, 980, 6116, 2037, 316, 326, 7195, 16, 468, 732, 2545, 358, 12532, 518, 1807, 3344, 279, 9472, 622, 326, 8435, 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, 1207, 67, 2485, 261, 2890, 4672, 468, 12158, 854, 14127, 635, 279, 7052, 980, 6116, 2037, 316, 326, 7195, 16, 468, 732, 2545, 358, 12532, 518, 1807, 3344, 279, 9472, 622, 326, 8435, 434,...
timeouts = (0, 0, timeout*1000, 0, timeout*1000)
timeouts = (0, 0, int(timeout*1000), 0, int(timeout*1000))
def __init__(self, port, #number of device, numbering starts at #zero. if everything fails, the user #can specify a device string, note #that this isn't portable anymore baudrate=9600, #baudrate bytesize=EIGHTBITS, #number of databits parity=PARITY_NONE, #enable parity checking stopbits=STOPBITS_ONE, #number of stopbits timeout=None, #set a timeout value, None for waiting forever xonxoff=0, #enable software flow control rtscts=0, #enable RTS/CTS flow control ): """initialize comm port"""
466d166ed499866ce00ead2fd3fd4e1dc0b389d3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2937/466d166ed499866ce00ead2fd3fd4e1dc0b389d3/serialwin32.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1756, 16, 5375, 468, 2696, 434, 2346, 16, 1300, 310, 2542, 622, 468, 7124, 18, 309, 7756, 6684, 16, 326, 729, 468, 4169, 4800, 279, 2346, 533, 16, 4721, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1756, 16, 5375, 468, 2696, 434, 2346, 16, 1300, 310, 2542, 622, 468, 7124, 18, 309, 7756, 6684, 16, 326, 729, 468, 4169, 4800, 279, 2346, 533, 16, 4721, ...
self.last_event_x = event.x - self.get_transformed_position()[0] - self.padding scroller_position = event.x - self.get_transformed_position()[0] - self.padding
self.last_event_x = event.x - self.get_transformed_position()[0] - self.padding - self.scroller_height/2 scroller_position = event.x - self.get_transformed_position()[0] - self.padding - self.scroller_height/2
def on_scroll_move(self, source, event): if self.h == False : if self.last_event_y is None: return clutter.grab_pointer(self.scroller) self.last_event_y = event.y - self.get_transformed_position()[1] - self.padding scroller_position = event.y - self.get_transformed_position()[1] - self.padding self.scroller_position_percent = scroller_position/(self.height - 2*self.padding - self.scroller_height) else : if self.last_event_x is None: return clutter.grab_pointer(self.scroller) self.last_event_x = event.x - self.get_transformed_position()[0] - self.padding scroller_position = event.x - self.get_transformed_position()[0] - self.padding self.scroller_position_percent = scroller_position/(self.height - 2*self.padding - self.scroller_height) self.queue_relayout()
ee7c4622a4459d4bb3b702544f874e5bacb6e698 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5279/ee7c4622a4459d4bb3b702544f874e5bacb6e698/scrollbar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 12033, 67, 8501, 12, 2890, 16, 1084, 16, 871, 4672, 309, 365, 18, 76, 422, 1083, 294, 309, 365, 18, 2722, 67, 2575, 67, 93, 353, 599, 30, 327, 927, 18220, 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, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 12033, 67, 8501, 12, 2890, 16, 1084, 16, 871, 4672, 309, 365, 18, 76, 422, 1083, 294, 309, 365, 18, 2722, 67, 2575, 67, 93, 353, 599, 30, 327, 927, 18220, 18, 2752, 70, 67...
def verify(self, patterns=[]):
def verify(self, patterns=[], all=False):
def verify(self, patterns=[]): """verify that the installed files match the packaged checksum optionally verify they match only if they are in the 'pattern' list returns a tuple """ fi = self.hdr.fiFromHeader() results = {} # fn = problem_obj?
92d0aa1485b02ac095fbe307bcfc3ad935fd8352 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5445/92d0aa1485b02ac095fbe307bcfc3ad935fd8352/packages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 12, 2890, 16, 6884, 22850, 6487, 777, 33, 8381, 4672, 3536, 8705, 716, 326, 5876, 1390, 845, 326, 2298, 11349, 6697, 8771, 3929, 2898, 845, 1338, 309, 2898, 854, 316, 326, 296, 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, 3929, 12, 2890, 16, 6884, 22850, 6487, 777, 33, 8381, 4672, 3536, 8705, 716, 326, 5876, 1390, 845, 326, 2298, 11349, 6697, 8771, 3929, 2898, 845, 1338, 309, 2898, 854, 316, 326, 296, 495...
return self.getdelimited('[', ']\r', 0)
return '[%s]' % self.getdelimited('[', ']\r', 0)
def getdomainliteral(self): """Parse an RFC-822 domain-literal.""" return self.getdelimited('[', ']\r', 0)
c98d48a7e336d591c4a47fe3d7b83d0b405d4112 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/c98d48a7e336d591c4a47fe3d7b83d0b405d4112/rfc822.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 4308, 13107, 12, 2890, 4672, 3536, 3201, 392, 8372, 17, 24532, 2461, 17, 13107, 12123, 327, 21848, 87, 3864, 738, 365, 18, 588, 3771, 1038, 329, 2668, 63, 2187, 12671, 64, 86, 2187,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 4308, 13107, 12, 2890, 4672, 3536, 3201, 392, 8372, 17, 24532, 2461, 17, 13107, 12123, 327, 21848, 87, 3864, 738, 365, 18, 588, 3771, 1038, 329, 2668, 63, 2187, 12671, 64, 86, 2187,...
so.axis[i-1].val = xvals[i]
so.axis[i].val = xvals[i]
def result_insert(result,descr,value,map_so,axis="y",pap=0,xvals=None): """ This function takes value and puts it into the result in an appropriate fashion. The description is used for decision making. Parameters: ---------- """ if descr == None: result_type = get_type(result) else: result_type = descr if (result_type == SOM_type): if axis.lower() == "y": so = SOM.SO(map_so.dim()) so.y = value[0] so.var_y = value[1] so.id = map_so.id so.axis = map_so.axis result.append(so) elif axis.lower() == "x": so = SOM.SO(map_so.dim()) so.id = map_so.id so.y = map_so.y so.var_y = map_so.var_y for i in range(map_so.dim()): if i == pap: so.axis[pap].val = value[0] if map_so.axis[pap].var != None: so.axis[pap].var = value[1] else: so.axis[i].val = map_so.axis[i].val if map_so.axis[i].var != None: so.axis[i].var = map_so.axis[i].var result.append(so) elif axis.lower() == "all": so = SOM.SO(map_so.dim()) so.id = map_so.id so.y = value[0] so.var_y = value[1] for i in range(len(xvals)): if i % 2 == 0: so.axis[i].val = xvals[i] elif i % 2 != 0: if map_so.axis[i-1].var == None: so.axis[i-1].val = xvals[i] else: so.axis[i-1].var = xvals[i] result.append(so) elif (result_type == SO_type): if axis.lower() == "y": result.y = value[0] result.var_y = value[1] result.id = map_so.id result.axis = map_so.axis elif axis.lower() == "x": result.id = map_so.id result.y = map_so.y result.var_y = map_so.var_y for i in range(map_so.dim()): if i == pap: result.axis[pap].val = value[0] if map_so.axis[pap].var != None: result.axis[pap].var = value[1] else: result.axis[i].val = map_so.axis[i].val if map_so.axis[i].var != None: result.axis[i].var = map_so.axis[i].var elif axis.lower() == "all": result.id = map_so.id result.y = value[0] result.var_y = value[1] for i in range(len(xvals)): if i % 2 == 0: result.axis[i].val = xvals[i] elif i % 2 != 0: if map_so.axis[i-1].var == None: result.axis[i-1].val = xvals[i] else: result.axis[i-1].var = xvals[i] elif (result_type == num_type): result.append(value[0]) result.append(value[1]) else: raise TypeError, "Object type not recognized by result_insert"\ +" function."
77b15cff46bb604871cdfb2e027bc5bcafe49f1c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/763/77b15cff46bb604871cdfb2e027bc5bcafe49f1c/hlr_data_helper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 563, 67, 6387, 12, 2088, 16, 28313, 16, 1132, 16, 1458, 67, 2048, 16, 4890, 1546, 93, 3113, 84, 438, 33, 20, 16, 92, 4524, 33, 7036, 4672, 3536, 1220, 445, 5530, 460, 471, 8200, 518,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 563, 67, 6387, 12, 2088, 16, 28313, 16, 1132, 16, 1458, 67, 2048, 16, 4890, 1546, 93, 3113, 84, 438, 33, 20, 16, 92, 4524, 33, 7036, 4672, 3536, 1220, 445, 5530, 460, 471, 8200, 518,...
def _createnode(self): ''' create a node based on the contents of the form ''' cl = self.db.classes[self.classname] props, dummy = parsePropsFromForm(self.db, cl, self.form) if not props.has_key('status'): try: unread_id = self.db.status.lookup('unread') except KeyError: pass else: props['status'] = unread_id if props.has_key('assignedto'): assignedto_id = props['assignedto'] if props.has_key('nosy') and not assignedto_id in props['nosy']: props['nosy'].append(assignedto_id) else: props['nosy'] = [assignedto_id] message = self._handle_message() if message: props['messages'] = [message] return cl.create(**props) def _changenode(self, props): ''' change the node based on the contents of the form ''' cl = self.db.classes[self.classname] try: unread_id = self.db.status.lookup('unread') resolved_id = self.db.status.lookup('resolved') chatting_id = self.db.status.lookup('chatting') except KeyError: pass else: if (props['status'] == unread_id or props['status'] == resolved_id): props['status'] = chatting_id if props.has_key('assignedto'): assignedto_id = props['assignedto'] if not assignedto_id in props['nosy']: props['nosy'].append(assignedto_id) message = self._handle_message() if message: props['messages'] = cl.get(self.nodeid, 'messages') + [message] cl.set(self.nodeid, **props) def _handle_message(self): ''' generate and edit message ''' files = [] if self.form.has_key('__file'): file = self.form['__file'] if file.filename: mime_type = mimetypes.guess_type(file.filename)[0] if not mime_type: mime_type = "application/octet-stream" files.append(self.db.file.create(type=mime_type, name=file.filename, content=file.file.read())) cn = self.classname cl = self.db.classes[self.classname] props = cl.getprops() note = None if self.form.has_key('__note'): note = self.form['__note'].value if not props.has_key('messages'): return if not isinstance(props['messages'], hyperdb.Multilink): return if not props['messages'].classname == 'msg': return if not (self.form.has_key('nosy') or note): return if note: if '\n' in note: summary = re.split(r'\n\r?', note)[0] else: summary = note m = ['%s\n'%note] else: summary = _('This %(classname)s has been edited through' ' the web.\n')%{'classname': cn} m = [summary] content = '\n'.join(m) message_id = self.db.msg.create(author=self.getuid(), recipients=[], date=date.Date('.'), summary=summary, content=content, files=files) return message_id def _post_editnode(self, nid): ''' do the linking part of the node creation ''' cn = self.classname cl = self.db.classes[cn] keys = self.form.keys() for key in keys: if key == ':multilink': value = self.form[key].value if type(value) != type([]): value = [value] for value in value: designator, property = value.split(':') link, nodeid = roundupdb.splitDesignator(designator) link = self.db.classes[link] value = link.get(nodeid, property) value.append(nid) link.set(nodeid, **{property: value}) elif key == ':link': value = self.form[key].value if type(value) != type([]): value = [value] for value in value: designator, property = value.split(':') link, nodeid = roundupdb.splitDesignator(designator) link = self.db.classes[link] link.set(nodeid, **{property: nid}) def newnode(self, message=None): ''' Add a new node to the database. The form works in two modes: blank form and submission (that is, the submission goes to the same URL). **Eventually this means that the form will have previously entered information in it if submission fails. The new node will be created with the properties specified in the form submission. For multilinks, multiple form entries are handled, as are prop=value,value,value. You can't mix them though. If the new node is to be referenced from somewhere else immediately (ie. the new node is a file that is to be attached to a support issue) then supply one of these arguments in addition to the usual form entries: :link=designator:property :multilink=designator:property ... which means that once the new node is created, the "property" on the node given by "designator" should now reference the new node's id. The node id will be appended to the multilink. ''' cn = self.classname cl = self.db.classes[cn] keys = self.form.keys() if [i for i in keys if i[0] != ':']: props = {} try: nid = self._createnode() self._post_editnode(nid) message = _('%(classname)s created ok')%{'classname': cn} except: self.db.rollback() s = StringIO.StringIO() traceback.print_exc(None, s) message = '<pre>%s</pre>'%cgi.escape(s.getvalue()) self.pagehead(_('New %(classname)s')%{'classname': self.classname.capitalize()}, message) newitem = htmltemplate.NewItemTemplate(self, self.TEMPLATES, self.classname) newitem.render(self.form) self.pagefoot() newissue = newnode newuser = newnode def newfile(self, message=None): ''' Add a new file to the database. This form works very much the same way as newnode - it just has a file upload. ''' cn = self.classname cl = self.db.classes[cn] keys = self.form.keys() if [i for i in keys if i[0] != ':']: try: file = self.form['content'] mime_type = mimetypes.guess_type(file.filename)[0] if not mime_type: mime_type = "application/octet-stream" nid = cl.create(content=file.file.read(), type=mime_type, name=file.filename) self._post_editnode(nid) message = _('%(classname)s created ok')%{'classname': cn} except: self.db.rollback() s = StringIO.StringIO() traceback.print_exc(None, s) message = '<pre>%s</pre>'%cgi.escape(s.getvalue()) self.pagehead(_('New %(classname)s')%{'classname': self.classname.capitalize()}, message) newitem = htmltemplate.NewItemTemplate(self, self.TEMPLATES, self.classname) newitem.render(self.form) self.pagefoot()
def showfile(self): ''' display a file ''' nodeid = self.nodeid cl = self.db.file mime_type = cl.get(nodeid, 'type') if mime_type == 'message/rfc822': mime_type = 'text/plain' self.header(headers={'Content-Type': mime_type}) self.write(cl.get(nodeid, 'content'))
a43f362c984960504ee2a5274edaf031a40df05f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/a43f362c984960504ee2a5274edaf031a40df05f/cgi_client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 768, 12, 2890, 4672, 9163, 2562, 279, 585, 9163, 756, 350, 273, 365, 18, 2159, 350, 927, 273, 365, 18, 1966, 18, 768, 4892, 67, 723, 273, 927, 18, 588, 12, 2159, 350, 16, 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, 2405, 768, 12, 2890, 4672, 9163, 2562, 279, 585, 9163, 756, 350, 273, 365, 18, 2159, 350, 927, 273, 365, 18, 1966, 18, 768, 4892, 67, 723, 273, 927, 18, 588, 12, 2159, 350, 16, 296, ...
if (sig.getAppearance() == RED) :
sigState = sig.getAppearance() if (sigState == RED) :
def cvtAppearanceText(self, sig) : rep = "" if (sig.getHeld()) : rep = rep + "Held " if (sig.getLit()) : rep = rep + "Lit " if (sig.getAppearance() == RED) : rep = rep + "Red " elif (sig.getAppearance() == FLASHRED) : rep = rep + "Flashing Red " elif (sig.getAppearance() == YELLOW) : rep = rep + "Yellow " elif (sig.getAppearance() == FLASHYELLOW) : rep = rep + "Flashing Yellow " elif (sig.getAppearance() == GREEN) : rep = rep + "Green " elif (sig.getAppearance() == FLASHGREEN) : rep = rep + "Flashing Green " elif (sig.getAppearance() == DARK) : rep = rep + "Dark " else : rep = rep + "Unknown " #self.msgText("Found signal " + self.giveSignalName(sig) + " displaying: " + rep + "\n") return rep
ea0545abfec3c873ac30e3d94a5ae0a9a6e544ba /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1660/ea0545abfec3c873ac30e3d94a5ae0a9a6e544ba/RobotThrottle2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8951, 88, 1294, 27668, 1528, 12, 2890, 16, 3553, 13, 294, 2071, 273, 1408, 309, 261, 7340, 18, 588, 44, 488, 10756, 294, 2071, 273, 2071, 397, 315, 44, 488, 315, 309, 261, 7340, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8951, 88, 1294, 27668, 1528, 12, 2890, 16, 3553, 13, 294, 2071, 273, 1408, 309, 261, 7340, 18, 588, 44, 488, 10756, 294, 2071, 273, 2071, 397, 315, 44, 488, 315, 309, 261, 7340, 18, ...
address.fullName = section.fullName
try: address.fullName = section.fullName except AttributeError: pass
def saveAttributeFromWidget(self, item, widget, validate): if validate: section = item.getAttributeValue (self.whichAttribute()) widgetString = widget.GetValue() processedAddresses, validAddresses = self.parseEmailAddresses (item, widgetString) section.setAttributeValue('emailAddresses', validAddresses) for address in validAddresses: address.fullName = section.fullName widget.SetValue (processedAddresses)
9f33ff4eb39cebb8a6ee5bed9c613b2c0216bb03 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/9f33ff4eb39cebb8a6ee5bed9c613b2c0216bb03/Detail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 1499, 1265, 4609, 12, 2890, 16, 761, 16, 3604, 16, 1954, 4672, 309, 1954, 30, 2442, 273, 761, 18, 588, 14942, 261, 2890, 18, 12784, 1499, 10756, 3604, 780, 273, 3604, 18, 967, 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, 1923, 1499, 1265, 4609, 12, 2890, 16, 761, 16, 3604, 16, 1954, 4672, 309, 1954, 30, 2442, 273, 761, 18, 588, 14942, 261, 2890, 18, 12784, 1499, 10756, 3604, 780, 273, 3604, 18, 967, 62...
j = string.find(sys.version, ")", i)
j = sys.version.find(")", i)
def get_platform (): """Return a string that identifies the current platform. This is used mainly to distinguish platform-specific build directories and platform-specific built distributions. Typically includes the OS name and version and the architecture (as supplied by 'os.uname()'), although the exact information included depends on the OS; eg. for IRIX the architecture isn't particularly important (IRIX only runs on SGI hardware), but for Linux the kernel version isn't particularly important. Examples of returned values: linux-i586 linux-alpha (?) solaris-2.6-sun4u irix-5.3 irix64-6.2 Windows will return one of: win-x86_64 (64bit Windows on x86_64 (AMD64)) win-ia64 (64bit Windows on Itanium) win32 (all others - specifically, sys.platform is returned) For other non-POSIX platforms, currently just returns 'sys.platform'. """ if os.name == 'nt': # sniff sys.version for architecture. prefix = " bit (" i = string.find(sys.version, prefix) if i == -1: return sys.platform j = string.find(sys.version, ")", i) look = sys.version[i+len(prefix):j].lower() if look=='amd64': return 'win-x86_64' if look=='itanium': return 'win-ia64' return sys.platform if os.name != "posix" or not hasattr(os, 'uname'): # XXX what about the architecture? NT is Intel or Alpha, # Mac OS is M68k or PPC, etc. return sys.platform # Try to distinguish various flavours of Unix (osname, host, release, version, machine) = os.uname() # Convert the OS name to lowercase, remove '/' characters # (to accommodate BSD/OS), and translate spaces (for "Power Macintosh") osname = osname.lower().replace('/', '') machine = machine.replace(' ', '_') machine = machine.replace('/', '-') if osname[:5] == "linux": # At least on Linux/Intel, 'machine' is the processor -- # i386, etc. # XXX what about Alpha, SPARC, etc? return "%s-%s" % (osname, machine) elif osname[:5] == "sunos": if release[0] >= "5": # SunOS 5 == Solaris 2 osname = "solaris" release = "%d.%s" % (int(release[0]) - 3, release[2:]) # fall through to standard osname-release-machine representation elif osname[:4] == "irix": # could be "irix64"! return "%s-%s" % (osname, release) elif osname[:3] == "aix": return "%s-%s.%s" % (osname, version, release) elif osname[:6] == "cygwin": osname = "cygwin" rel_re = re.compile (r'[\d.]+') m = rel_re.match(release) if m: release = m.group() elif osname[:6] == "darwin": # # For our purposes, we'll assume that the system version from # distutils' perspective is what MACOSX_DEPLOYMENT_TARGET is set # to. This makes the compatibility story a bit more sane because the # machine is going to compile and link as if it were # MACOSX_DEPLOYMENT_TARGET. from distutils.sysconfig import get_config_vars cfgvars = get_config_vars() macver = os.environ.get('MACOSX_DEPLOYMENT_TARGET') if not macver: macver = cfgvars.get('MACOSX_DEPLOYMENT_TARGET') if not macver: # Get the system version. Reading this plist is a documented # way to get the system version (see the documentation for # the Gestalt Manager) try: f = open('/System/Library/CoreServices/SystemVersion.plist') except IOError: # We're on a plain darwin box, fall back to the default # behaviour. pass else: m = re.search( r'<key>ProductUserVisibleVersion</key>\s*' + r'<string>(.*?)</string>', f.read()) f.close() if m is not None: macver = '.'.join(m.group(1).split('.')[:2]) # else: fall back to the default behaviour if macver: from distutils.sysconfig import get_config_vars release = macver osname = "macosx" if (release + '.') < '10.4.' and \ get_config_vars().get('UNIVERSALSDK', '').strip(): # The universal build will build fat binaries, but not on # systems before 10.4 machine = 'fat' elif machine in ('PowerPC', 'Power_Macintosh'): # Pick a sane name for the PPC architecture. machine = 'ppc' return "%s-%s-%s" % (osname, release, machine)
98ec5c93eb4b2e2f94abad95916bbbc38e6273b8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/98ec5c93eb4b2e2f94abad95916bbbc38e6273b8/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9898, 1832, 30, 3536, 990, 279, 533, 716, 25283, 326, 783, 4072, 18, 225, 1220, 353, 1399, 31457, 358, 23926, 4072, 17, 12524, 1361, 6402, 471, 4072, 17, 12524, 6650, 23296, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9898, 1832, 30, 3536, 990, 279, 533, 716, 25283, 326, 783, 4072, 18, 225, 1220, 353, 1399, 31457, 358, 23926, 4072, 17, 12524, 1361, 6402, 471, 4072, 17, 12524, 6650, 23296, 18,...
if c.logic == 1: for m in assy.selmols: for a in m.atoms.values():
if c.logic == 0: for m in assy.selmols[:]: for a in m.atoms.values():
def partselect(self, assy): """Loop thru all the atoms that are visible and select any that are 'in' the shape, ignoring the thickness parameter. pick the parts that contain them """ #---This function has been modified by Huaicai on 10/05/04 to fix bugs of shift & Ctrl drag#---selection of molecules c=self.curves[0] if c.logic == 2 or c.logic == 0: # drag selection for mol in assy.molecules: if mol.display == diINVISIBLE: continue for a in mol.atoms.itervalues(): if a.display == diINVISIBLE: continue if c.isin(a.posn()): a.molecule.pick() break if c.logic == 0: #ctrl drag selection, modified by Huaicai to fix the selection bug 10/05/04 for m in assy.selmols: for a in m.atoms.values(): if not c.isin(a.posn()): a.molecule.unpick() break if c.logic == 1: # Shift drag slection --everything selected inside dragging area unselected # The following lines are commented out by Huaicai 10/05/04 to fix the bugs #for a in assy.selatoms.values(): #if c.isin(a.posn()): a.molecule.unpick() for m in assy.selmols: for a in m.atoms.values(): if c.isin(a.posn()): m.unpick() break
6ccd717748b0fa2f763c67910e695080fc831885 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/6ccd717748b0fa2f763c67910e695080fc831885/shape.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1087, 4025, 12, 2890, 16, 1551, 93, 4672, 3536, 6452, 286, 8653, 777, 326, 9006, 716, 854, 6021, 471, 2027, 1281, 716, 854, 296, 267, 11, 326, 2179, 16, 14398, 326, 27199, 1569, 18, 60...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1087, 4025, 12, 2890, 16, 1551, 93, 4672, 3536, 6452, 286, 8653, 777, 326, 9006, 716, 854, 6021, 471, 2027, 1281, 716, 854, 296, 267, 11, 326, 2179, 16, 14398, 326, 27199, 1569, 18, 60...
portal_path = self.get_portal_path(metatype)
portal_path = self.get_portal_path(portal)
def list_fs_skinfiles(self, metatype, skin_id, schemes=False): """ return the list of the filesystem templates """ portal_path = self.get_portal_path(metatype) skel_handler, error = skel_parser().parse(readFile(join(portal_path, 'skel', 'skel.xml'), 'r')) if skel_handler.root.layout is not None: for skin in skel_handler.root.layout.skins: if skin.id == skin_id: if schemes: return [s.id for s in skin.schemes] else: return [f.id for f in skin.templates] return []
0116da894b0fd06e2befe1c4b6331ce460957cbc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3287/0116da894b0fd06e2befe1c4b6331ce460957cbc/NaayaUpdater.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 2556, 67, 7771, 267, 2354, 12, 2890, 16, 5100, 6361, 16, 18705, 67, 350, 16, 20436, 33, 8381, 4672, 3536, 327, 326, 666, 434, 326, 6496, 5539, 3536, 11899, 67, 803, 273, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 2556, 67, 7771, 267, 2354, 12, 2890, 16, 5100, 6361, 16, 18705, 67, 350, 16, 20436, 33, 8381, 4672, 3536, 327, 326, 666, 434, 326, 6496, 5539, 3536, 11899, 67, 803, 273, 365, ...
self.transparency = transparency
self.transparency = transparency
def __init__(self, author=None, category=None, content=None, atom_id=None, link=None, published=None, title=None, updated=None, transparency=None, comments=None, event_status=None, send_event_notifications=None, visibility=None, recurrence=None, recurrence_exception=None, where=None, when=None, who=None, quick_add=None, extended_property=None, original_event=None, batch_operation=None, batch_id=None, batch_status=None, sequence=None, reminder=None, sync_event=None, uid=None, guests_can_invite_others=None, guests_can_modify=None, guests_can_see_guests=None, extension_elements=None, extension_attributes=None, text=None):
6a016768dbbd7d5ee9c62bcd2d2ce3bf7f6d1048 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6580/6a016768dbbd7d5ee9c62bcd2d2ce3bf7f6d1048/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2869, 33, 7036, 16, 3150, 33, 7036, 16, 913, 33, 7036, 16, 3179, 67, 350, 33, 7036, 16, 1692, 33, 7036, 16, 9487, 33, 7036, 16, 2077, 33, 7036, 16, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2869, 33, 7036, 16, 3150, 33, 7036, 16, 913, 33, 7036, 16, 3179, 67, 350, 33, 7036, 16, 1692, 33, 7036, 16, 9487, 33, 7036, 16, 2077, 33, 7036, 16, 3...
files=os.listdir(destdir) files=[filename for filename in files if filename[0] != '.'] for i in files: if os.path.isfile(normpath(destdir+"/"+i)): self.gen_digest_file(normpath(destdir+"/"+i))
files=os.listdir(destdir) files=[filename for filename in files if filename[0] != '.'] for i in files: if os.path.isfile(normpath(destdir+"/"+i)): self.gen_digest_file(normpath(destdir+"/"+i))
def generate_digests(self): for pkgset in self.settings["grp"]: if self.settings["grp/"+pkgset+"/type"] == "pkgset": destdir=normpath(self.settings["target_path"]+"/"+pkgset+"/All") print "Digesting files in the pkgset....." digests=glob.glob(destdir+'/*.digests') for i in digests: if os.path.exists(i): os.remove(i) files=os.listdir(destdir) #ignore files starting with '.' using list comprehension files=[filename for filename in files if filename[0] != '.'] for i in files: if os.path.isfile(normpath(destdir+"/"+i)): self.gen_digest_file(normpath(destdir+"/"+i)) else: destdir=normpath(self.settings["target_path"]+"/"+pkgset) print "Digesting files in the srcset....." digests=glob.glob(destdir+'/*.digests') for i in digests: if os.path.exists(i): os.remove(i)
6b4b951fcef85764cdb9b58bed286358fbc800f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7327/6b4b951fcef85764cdb9b58bed286358fbc800f7/grp_target.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 10171, 87, 12, 2890, 4672, 364, 3475, 542, 316, 365, 18, 4272, 9614, 17532, 11929, 30, 309, 365, 18, 4272, 9614, 17532, 4898, 15, 10657, 542, 9078, 19, 723, 11929, 422, 315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 10171, 87, 12, 2890, 4672, 364, 3475, 542, 316, 365, 18, 4272, 9614, 17532, 11929, 30, 309, 365, 18, 4272, 9614, 17532, 4898, 15, 10657, 542, 9078, 19, 723, 11929, 422, 315, ...
if self.greenlet is None:
if self.state == 'connected':
def unhold(self): if not self.on_hold or not self._hold_in_progress: return self._hold_in_progress = False streams = self.streams if self.streams is not None else self.proposed_streams if not streams: return for stream in streams: stream.unhold() if self.greenlet is None: self._send_unhold()
95660a14f98a86b53a44c1d34a8ff5fae0f69754 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5703/95660a14f98a86b53a44c1d34a8ff5fae0f69754/session.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 21056, 12, 2890, 4672, 309, 486, 365, 18, 265, 67, 21056, 578, 486, 365, 6315, 21056, 67, 267, 67, 8298, 30, 327, 365, 6315, 21056, 67, 267, 67, 8298, 273, 1083, 8205, 273, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 21056, 12, 2890, 4672, 309, 486, 365, 18, 265, 67, 21056, 578, 486, 365, 6315, 21056, 67, 267, 67, 8298, 30, 327, 365, 6315, 21056, 67, 267, 67, 8298, 273, 1083, 8205, 273, 365, ...
self.bounds.append( self.makeBound() )
self.bounds.append( self.makeRandomBound() )
def makeTree(self, numBounds): # Make tree creation repeatable, but different for every size random.seed(100 + 5 * numBounds) self.bounds = Box2dVectorData() for i in range(0, numBounds): self.bounds.append( self.makeBound() ) self.tree = Box2dTree( self.bounds )
4ad6372a07364aefd9c635be6abf8692f532b8cb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9042/4ad6372a07364aefd9c635be6abf8692f532b8cb/BoundedKDTree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 2471, 12, 2890, 16, 818, 5694, 4672, 468, 4344, 2151, 6710, 7666, 429, 16, 1496, 3775, 364, 3614, 963, 2744, 18, 12407, 12, 6625, 397, 1381, 380, 818, 5694, 13, 365, 18, 10576, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 2471, 12, 2890, 16, 818, 5694, 4672, 468, 4344, 2151, 6710, 7666, 429, 16, 1496, 3775, 364, 3614, 963, 2744, 18, 12407, 12, 6625, 397, 1381, 380, 818, 5694, 13, 365, 18, 10576, 2...
(updater, ) = cursor.fetchone()
for updater, in cursor: break else: cursor.execute("SELECT reporter FROM ticket WHERE id=%s", (tktid,)) for updater, in cursor: break
def get_recipients(self, tktid): notify_reporter = self.config.getbool('notification', 'always_notify_reporter') notify_owner = self.config.getbool('notification', 'always_notify_owner') notify_updater = self.config.getbool('notification', 'always_notify_updater')
1626244378da507226f8963d045280baafde59cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/1626244378da507226f8963d045280baafde59cb/notification.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 27925, 12, 2890, 16, 268, 8629, 350, 4672, 5066, 67, 266, 7988, 273, 365, 18, 1425, 18, 588, 6430, 2668, 9927, 2187, 296, 17737, 67, 12336, 67, 266, 7988, 6134, 5066, 67, 8443...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 27925, 12, 2890, 16, 268, 8629, 350, 4672, 5066, 67, 266, 7988, 273, 365, 18, 1425, 18, 588, 6430, 2668, 9927, 2187, 296, 17737, 67, 12336, 67, 266, 7988, 6134, 5066, 67, 8443...
out_app(kml.add_point(loc.id, self.utXmlEncode(loc.title), self.utXmlEncode(loc.description), '%s/getSymbolPicture?id=%s' % (self.absolute_url(), loc.geo_type), loc.longitude, loc.latitude, self.utXmlEncode(self.getSymbolTitle(loc.geo_type)), self.absolute_url(), loc.absolute_url(), loc.url, self.utXmlEncode(loc.address)))
out_app(kml.add_point(self.utToUtf8(loc.id), self.utXmlEncode(loc.title), self.utXmlEncode(loc.description), '%s/getSymbolPicture?id=%s' % (self.absolute_url(), self.utToUtf8(loc.geo_type)), self.utToUtf8(loc.longitude), self.utToUtf8(loc.latitude), self.utXmlEncode(self.getSymbolTitle(loc.geo_type)), self.utToUtf8(self.absolute_url()), self.utToUtf8(loc.absolute_url()), self.utToUtf8(loc.url), self.utXmlEncode(loc.address)))
def locations_kml(self, path='', show='', REQUEST=None): """ """ path = path or '/' show = eval(show)
5604a013a8d2846eebf2df818d6030886e545962 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/5604a013a8d2846eebf2df818d6030886e545962/GeoMapTool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7838, 67, 79, 781, 12, 2890, 16, 589, 2218, 2187, 2405, 2218, 2187, 12492, 33, 7036, 4672, 3536, 3536, 589, 273, 589, 578, 2023, 2405, 273, 5302, 12, 4500, 13, 2, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7838, 67, 79, 781, 12, 2890, 16, 589, 2218, 2187, 2405, 2218, 2187, 12492, 33, 7036, 4672, 3536, 3536, 589, 273, 589, 578, 2023, 2405, 273, 5302, 12, 4500, 13, 2, -100, -100, -100, -10...
"""And replace frist ':' to space join +k channel,by Yuxans Yao 2007/07/13 11:45""" for channel in self.channels.keys():
for channel in self.serve_channels:
def on_welcome(self, c, e): """Whenever this bot joins a server, this is executed""" """And replace frist ':' to space join +k channel,by Yuxans Yao 2007/07/13 11:45""" for channel in self.channels.keys(): Debug("Joining", channel) c.join(channel.replace(':',' ',1))
8cebb5f4645543d8fae3fd0878d44268cabdc0cf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10749/8cebb5f4645543d8fae3fd0878d44268cabdc0cf/moobot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 91, 16312, 12, 2890, 16, 276, 16, 425, 4672, 3536, 2888, 4009, 502, 333, 2512, 13471, 279, 1438, 16, 333, 353, 7120, 8395, 364, 1904, 316, 365, 18, 30104, 67, 9114, 30, 4015, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 91, 16312, 12, 2890, 16, 276, 16, 425, 4672, 3536, 2888, 4009, 502, 333, 2512, 13471, 279, 1438, 16, 333, 353, 7120, 8395, 364, 1904, 316, 365, 18, 30104, 67, 9114, 30, 4015, ...
return "CPU_ARCH:=" + arch[arc_v.get()][0]
return "CPU_ARCH:= " + arch[arc_v.get()][0]
def repl_arch(m): return "CPU_ARCH:=" + arch[arc_v.get()][0]
e2b0b7a15665e7f5130b4f9e830fd32651df813f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2128/e2b0b7a15665e7f5130b4f9e830fd32651df813f/configure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6831, 67, 991, 12, 81, 4672, 327, 315, 15222, 67, 10586, 30, 33, 315, 397, 6637, 63, 11828, 67, 90, 18, 588, 1435, 6362, 20, 65, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6831, 67, 991, 12, 81, 4672, 327, 315, 15222, 67, 10586, 30, 33, 315, 397, 6637, 63, 11828, 67, 90, 18, 588, 1435, 6362, 20, 65, 225, 2, -100, -100, -100, -100, -100, -100, -100, -10...
finalOutputSandbox = currentFiles+';'+extraFiles uniqueOutputSandbox = uniqueElements(finalOutputSandbox.split(';')) paramsDict['OutputSandbox']['value'] = string.join(uniqueOutputSandbox,';') self.log.verbose('Final unique Output Sandbox %s' %(string.join(uniqueOutputSandbox,';')))
finalOutputSandbox = currentFiles + ';' + extraFiles uniqueOutputSandbox = uniqueElements( finalOutputSandbox.split( ';' ) ) paramsDict['OutputSandbox']['value'] = string.join( uniqueOutputSandbox, ';' ) self.log.verbose( 'Final unique Output Sandbox %s' % ( string.join( uniqueOutputSandbox, ';' ) ) )
def _toJDL(self,xmlFile=''): #messy but need to account for xml file being in /tmp/guid dir """Creates a JDL representation of itself as a Job. """ #Check if we have to do old bootstrap... classadJob = ClassAd('[]')
50b3322668816ba92ea3f9b253d993dc34c53a21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/50b3322668816ba92ea3f9b253d993dc34c53a21/Job.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 869, 46, 8914, 12, 2890, 16, 2902, 812, 2218, 11, 4672, 468, 81, 403, 93, 1496, 1608, 358, 2236, 364, 2025, 585, 3832, 316, 342, 5645, 19, 14066, 1577, 3536, 2729, 279, 804, 8914,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 869, 46, 8914, 12, 2890, 16, 2902, 812, 2218, 11, 4672, 468, 81, 403, 93, 1496, 1608, 358, 2236, 364, 2025, 585, 3832, 316, 342, 5645, 19, 14066, 1577, 3536, 2729, 279, 804, 8914,...
def fl_set_object_lalign(ob, align): """ fl_set_object_lalign(ob, align) """ _fl_set_object_lalign(ob, align)
def fl_set_object_lalign(pObject, align): """ fl_set_object_lalign(pObject, align) """ _fl_set_object_lalign(pObject, align)
def fl_set_object_lalign(ob, align): """ fl_set_object_lalign(ob, align) """ _fl_set_object_lalign(ob, align)
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 1612, 67, 80, 7989, 12, 84, 921, 16, 5689, 4672, 3536, 1183, 67, 542, 67, 1612, 67, 80, 7989, 12, 84, 921, 16, 5689, 13, 3536, 225, 389, 2242, 67, 542, 67, 1612,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1183, 67, 542, 67, 1612, 67, 80, 7989, 12, 84, 921, 16, 5689, 4672, 3536, 1183, 67, 542, 67, 1612, 67, 80, 7989, 12, 84, 921, 16, 5689, 13, 3536, 225, 389, 2242, 67, 542, 67, 1612,...
if options.verbose: print " * Invalid Encoding. Required encoding: %s" % scriptEncoding else: print "\n * Invalid Encoding in file %s. Required encoding: %s" % (filePath, scriptEncoding)
print " * Invalid Encoding. Required encoding %s in %s" % (encoding, filePath)
def read(filePath, encoding): try: return codecs.open(filePath, "r", encoding).read() except ValueError: if options.verbose: print " * Invalid Encoding. Required encoding: %s" % scriptEncoding else: print "\n * Invalid Encoding in file %s. Required encoding: %s" % (filePath, scriptEncoding) sys.exit(1)
a010f477a9728103939f44844174bf55d0d4072e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5718/a010f477a9728103939f44844174bf55d0d4072e/filetool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 22787, 16, 2688, 4672, 775, 30, 327, 17437, 18, 3190, 12, 22787, 16, 315, 86, 3113, 2688, 2934, 896, 1435, 225, 1335, 2068, 30, 1172, 315, 565, 380, 1962, 13400, 18, 10647, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 22787, 16, 2688, 4672, 775, 30, 327, 17437, 18, 3190, 12, 22787, 16, 315, 86, 3113, 2688, 2934, 896, 1435, 225, 1335, 2068, 30, 1172, 315, 565, 380, 1962, 13400, 18, 10647, 26...
def fl_add_thumbwheel(type, x, y, w, h, label): """ fl_add_thumbwheel(type, x, y, w, h, label) -> object """ retval = _fl_add_thumbwheel(type, x, y, w, h, label)
def fl_add_thumbwheel(wheel_type, x, y, w, h, label): """ fl_add_thumbwheel(wheel_type, x, y, w, h, label) -> pObject """ retval = _fl_add_thumbwheel(wheel_type, x, y, w, h, label)
def fl_add_thumbwheel(type, x, y, w, h, label): """ fl_add_thumbwheel(type, x, y, w, h, label) -> object """ retval = _fl_add_thumbwheel(type, x, y, w, h, label) return retval
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 1289, 67, 21639, 21344, 12, 21344, 67, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 4672, 3536, 1183, 67, 1289, 67, 21639, 21344, 12, 21344, 67, 723, 16, 619, 16, 677...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 1289, 67, 21639, 21344, 12, 21344, 67, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 4672, 3536, 1183, 67, 1289, 67, 21639, 21344, 12, 21344, 67, 723, 16, 619, 16, 677...
for c, x in enumerate(self.metadata): mi, formats = x if self.is_canceled(): break if self.db.has_book(mi): self.duplicates.append((mi, formats)) else: self.db.import_book(mi, formats, notify=False) self.number_of_books_added += 1 self.emit(SIGNAL('pupdate(PyQt_PyObject)'), c)
for c, formats in enumerate(self.books): self.get_metadata.from_formats(c, formats) self.wait_for_condition() for c, x in enumerate(self.metadata): mi, formats = x if self.is_canceled(): break if self.db.has_book(mi): self.duplicates.append((mi, formats)) else: self.db.import_book(mi, formats, notify=False) self.number_of_books_added += 1 self.emit(SIGNAL('pupdate(PyQt_PyObject)'), c) finally: self.disconnect(self.get_metadata, SIGNAL('metadataf(PyQt_PyObject, PyQt_PyObject)'), self.metadata_delivered) self.get_metadata = None
def run(self): root = os.path.abspath(self.path) for dirpath in os.walk(root): if self.is_canceled(): return self.emit(SIGNAL('update(PyQt_PyObject)'), _('Searching in')+' '+dirpath[0]) self.books += list(self.db.find_books_in_directory(dirpath[0], self.single_book_per_directory)) self.books = [formats for formats in self.books if formats] # Reset progress bar self.emit(SIGNAL('searching_done()')) for c, formats in enumerate(self.books): self.get_metadata.from_formats(c, formats) self.wait_for_condition() # Add books to database for c, x in enumerate(self.metadata): mi, formats = x if self.is_canceled(): break if self.db.has_book(mi): self.duplicates.append((mi, formats)) else: self.db.import_book(mi, formats, notify=False) self.number_of_books_added += 1 self.emit(SIGNAL('pupdate(PyQt_PyObject)'), c)
7dba0088e8bcfd55cbbb46f6dbd7b59c08d34703 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/7dba0088e8bcfd55cbbb46f6dbd7b59c08d34703/add.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1365, 273, 1140, 18, 803, 18, 5113, 803, 12, 2890, 18, 803, 13, 364, 17803, 316, 1140, 18, 11348, 12, 3085, 4672, 309, 365, 18, 291, 67, 10996, 329, 13332, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1365, 273, 1140, 18, 803, 18, 5113, 803, 12, 2890, 18, 803, 13, 364, 17803, 316, 1140, 18, 11348, 12, 3085, 4672, 309, 365, 18, 291, 67, 10996, 329, 13332, 327, ...
c = c0.cyan+x*(c1.cyan - c0.cyan)/dx m = c0.magenta+x*(c1.magenta - c0.magenta)/dx y = c0.yellow+x*(c1.yellow - c0.yellow)/dx k = c0.black+x*(c1.black - c0.black)/dx d = c0.density+x*(c1.density - c0.density)/dx a = c0.alpha+x*(c1.alpha - c0.alpha)/dx return CMYKColor(c,m,y,k, density=d, alpha=a)
if cmykDistance(c0,c1)<1e-8: assert c0.spotName == c1.spotName, "Identical cmyk, but different spotName" c = c0.cyan m = c0.magenta y = c0.yellow k = c0.black d = c0.density+x*(c1.density - c0.density)/dx a = c0.alpha+x*(c1.alpha - c0.alpha)/dx return CMYKColor(c,m,y,k, density=d, spotName=c0.spotName, alpha=a) elif cmykDistance(c0,_CMYK_white)<1e-8: c = c1.cyan m = c1.magenta y = c1.yellow k = c1.black d = x*c1.density/dx a = x*c1.alpha/dx return CMYKColor(c,m,y,k, density=d, spotName=c1.spotName, alpha=a) elif cmykDistance(c1,_CMYK_white)<1e-8: c = c0.cyan m = c0.magenta y = c0.yellow k = c0.black d = x*c0.density/dx d = c0.density*(1-x/dx) a = c0.alpha*(1-x/dx) return PCMYKColor(c,m,y,k, density=d, spotName=c0.spotName, alpha=a) else: c = c0.cyan+x*(c1.cyan - c0.cyan)/dx m = c0.magenta+x*(c1.magenta - c0.magenta)/dx y = c0.yellow+x*(c1.yellow - c0.yellow)/dx k = c0.black+x*(c1.black - c0.black)/dx d = c0.density+x*(c1.density - c0.density)/dx a = c0.alpha+x*(c1.alpha - c0.alpha)/dx return CMYKColor(c,m,y,k, density=d, alpha=a)
def linearlyInterpolatedColor(c0, c1, x0, x1, x): """ Linearly interpolates colors. Can handle RGB, CMYK and PCMYK colors - give ValueError if colours aren't the same. Doesn't currently handle 'Spot Color Interpolation'. """ if c0.__class__ != c1.__class__: raise ValueError("Color classes must be the same for interpolation!\nGot %r and %r'"%(c0,c1)) if x1<x0: x0,x1,c0,c1 = x1,x0,c1,c0 # normalized so x1>x0 if x<x0-1e-8 or x>x1+1e-8: # fudge factor for numerical problems raise ValueError, "Can't interpolate: x=%f is not between %f and %f!" % (x,x0,x1) if x<=x0: return c0 elif x>=x1: return c1 cname = c0.__class__.__name__ dx = float(x1-x0) x = x-x0 if cname == 'Color': # RGB r = c0.red+x*(c1.red - c0.red)/dx g = c0.green+x*(c1.green- c0.green)/dx b = c0.blue+x*(c1.blue - c0.blue)/dx a = c0.alpha+x*(c1.alpha - c0.alpha)/dx return Color(r,g,b,alpha=a) elif cname == 'CMYKColor': c = c0.cyan+x*(c1.cyan - c0.cyan)/dx m = c0.magenta+x*(c1.magenta - c0.magenta)/dx y = c0.yellow+x*(c1.yellow - c0.yellow)/dx k = c0.black+x*(c1.black - c0.black)/dx d = c0.density+x*(c1.density - c0.density)/dx a = c0.alpha+x*(c1.alpha - c0.alpha)/dx return CMYKColor(c,m,y,k, density=d, alpha=a) elif cname == 'PCMYKColor': if cmykDistance(c0,c1)<1e-8: #colors same do density and preserve spotName if any assert c0.spotName == c1.spotName, "Identical cmyk, but different spotName" c = c0.cyan m = c0.magenta y = c0.yellow k = c0.black d = c0.density+x*(c1.density - c0.density)/dx return PCMYKColor(c*100,m*100,y*100,k*100, density=d*100, spotName=c0.spotName, alpha=c0.alpha) elif cmykDistance(c0,_CMYK_white)<1e-8: #special c0 is white c = c1.cyan m = c1.magenta y = c1.yellow k = c1.black d = x*c1.density/dx return PCMYKColor(c*100,m*100,y*100,k*100, density=d*100, spotName=c1.spotName, alpha=c1.alpha) elif cmykDistance(c1,_CMYK_white)<1e-8: #special c1 is white c = c0.cyan m = c0.magenta y = c0.yellow k = c0.black d = x*c0.density/dx d = c0.density*(1-x/dx) return PCMYKColor(c*100,m*100,y*100,k*100, density=d*100, spotName=c0.spotName, alpha=c0.alpha) else: c = c0.cyan+x*(c1.cyan - c0.cyan)/dx m = c0.magenta+x*(c1.magenta - c0.magenta)/dx y = c0.yellow+x*(c1.yellow - c0.yellow)/dx k = c0.black+x*(c1.black - c0.black)/dx d = c0.density+x*(c1.density - c0.density)/dx a = c0.alpha+x*(c1.alpha - c0.alpha)/dx return PCMYKColor(c*100,m*100,y*100,k*100, density=d*100, alpha=a) else: raise ValueError, "Can't interpolate: Unknown color class %s!" % cname
81a5eae032fdd2eb280ecdd70193e51cdd02c67e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3878/81a5eae032fdd2eb280ecdd70193e51cdd02c67e/colors.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9103, 715, 15665, 690, 2957, 12, 71, 20, 16, 276, 21, 16, 619, 20, 16, 619, 21, 16, 619, 4672, 3536, 13921, 715, 7326, 815, 5740, 18, 4480, 1640, 11510, 16, 15871, 61, 47, 471, 453, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9103, 715, 15665, 690, 2957, 12, 71, 20, 16, 276, 21, 16, 619, 20, 16, 619, 21, 16, 619, 4672, 3536, 13921, 715, 7326, 815, 5740, 18, 4480, 1640, 11510, 16, 15871, 61, 47, 471, 453, ...
Or you can turn on the drawing of a frame around the plots:
You can also label the axes: sage: show(plot(sin,-4,4), axes_labels=('x','y')) You can turn on the drawing of a frame around the plots:
def show(self, xmin=None, xmax=None, ymin=None, ymax=None, figsize=DEFAULT_FIGSIZE, filename=None, dpi=DEFAULT_DPI, axes=None, axes_labels=None,frame=False, fontsize=None, aspect_ratio=None): """ Show this graphics image with the default image viewer. OPTIONAL INPUT: filename -- (default: None) string dpi -- dots per inch figsize -- [width, height] aspect_ratio -- the perceived width divided by the perceived height. If the aspect ratio is set to 1, circles will look round. If it is set to 2 they will look twice as wide as they are tall. This is the aspect_ratio of the image, not of the frame that contains it. If you want to set the aspect ratio of the frame, use figsize. axes -- (default: True) fontsize -- (default: current setting -- 10) positive integer; used for axes labels; if you make this very large, you may have to increase figsize to see all labels.
3b699194ad65bafdc62bbbd6503423708ba63dd2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/3b699194ad65bafdc62bbbd6503423708ba63dd2/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 12, 2890, 16, 13777, 33, 7036, 16, 14016, 33, 7036, 16, 15763, 33, 7036, 16, 15275, 33, 7036, 16, 14697, 33, 5280, 67, 5236, 4574, 16, 1544, 33, 7036, 16, 16361, 33, 5280, 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, 2405, 12, 2890, 16, 13777, 33, 7036, 16, 14016, 33, 7036, 16, 15763, 33, 7036, 16, 15275, 33, 7036, 16, 14697, 33, 5280, 67, 5236, 4574, 16, 1544, 33, 7036, 16, 16361, 33, 5280, 67, ...
cmd = j.backend.ganga_cmd cmd += " -o\"[DefaultJobRepository]local_root=" + j.backend.ganga_dir + "/repository\" " cmd += "-o\"[FileWorkspace]topdir=" + j.backend.ganga_dir + "/workspace\" " cmd += j.backend.ganga_dir + script_name channel = j.backend._transport.open_session() channel.exec_command(cmd) out = x = "" out2 = x2 = "" while not channel.exit_status_ready(): if channel.recv_ready(): x = channel.recv(1024) out += x if channel.recv_stderr_ready(): x2 = channel.recv_stderr(1024) out2 += x2 if out.find("*** FINISHED ***") != -1: break if (x.find("GRID pass") != -1 or x2.find("GRID pass") != -1) : grid_ok = True password = getpass.getpass('Enter GRID pass phrase: ') channel.send( password ) password = "" x = x2 = "" if out.find("*** FINISHED ***") != -1: status, exitcode, outputdir, id = j.backend.grabremoteinfo(out)
stdout, stderr = j.backend.run_remote_script( script_name, "" ) if stdout.find("***_FINISHED_***") != -1: status, outputdir, id, be = j.backend.grabremoteinfo(stdout)
def updateMonitoringInformation( jobs ):
f28943d46a1275727d8c070b84ce3598227b3c8b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1488/f28943d46a1275727d8c070b84ce3598227b3c8b/Remote.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 18410, 5369, 12, 6550, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 18410, 5369, 12, 6550, 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, -10...
if (not src_acct.currency_id) or src_acct.currency_id.id == reference_currency_id:
if (not dest_acct.currency_id) or dest_acct.currency_id.id == reference_currency_id:
def _create_account_move_line(self, cr, uid, move, src_account_id, dest_account_id, reference_amount, reference_currency_id, context=None): """ Generate the account.move.line values to post to track the stock valuation difference due to the processing of the given stock move. """ # prepare default values considering that the destination accounts have the reference_currency_id as their main currency partner_id = (move.picking_id.address_id and move.picking_id.address_id.partner_id and move.picking_id.address_id.partner_id.id) or False debit_line_vals = { 'name': move.name, 'product_id': move.product_id and move.product_id.id or False, 'quantity': move.product_qty, 'ref': move.picking_id and move.picking_id.name or False, 'date': time.strftime('%Y-%m-%d') , 'partner_id': partner_id, 'debit': reference_amount, 'account_id': dest_account_id, } credit_line_vals = { 'name': move.name, 'product_id': move.product_id and move.product_id.id or False, 'quantity': move.product_qty, 'ref': move.picking_id and move.picking_id.name or False, 'date': time.strftime('%Y-%m-%d') , 'partner_id': partner_id, 'credit': reference_amount, 'account_id': src_account_id, }
fc1a40a1eeeab3e7e352cc62423fc91f2add2df1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/fc1a40a1eeeab3e7e352cc62423fc91f2add2df1/stock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 4631, 67, 8501, 67, 1369, 12, 2890, 16, 4422, 16, 4555, 16, 3635, 16, 1705, 67, 4631, 67, 350, 16, 1570, 67, 4631, 67, 350, 16, 2114, 67, 8949, 16, 2114, 67, 7095, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 4631, 67, 8501, 67, 1369, 12, 2890, 16, 4422, 16, 4555, 16, 3635, 16, 1705, 67, 4631, 67, 350, 16, 1570, 67, 4631, 67, 350, 16, 2114, 67, 8949, 16, 2114, 67, 7095, 6...
details=bzf)
details=ioe)
def __init__(self, zip_file, mode="r", compression="deflated", allow_zip_64=False, encoding="CP437", thread_synchronize=True): """Create a FS that maps on to a zip file.
8c720fc1577bf773c8c45b5880a730e137f383e1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5578/8c720fc1577bf773c8c45b5880a730e137f383e1/zipfs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3144, 67, 768, 16, 1965, 1546, 86, 3113, 9154, 1546, 536, 80, 690, 3113, 1699, 67, 4450, 67, 1105, 33, 8381, 16, 2688, 1546, 4258, 24, 6418, 3113, 2650, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3144, 67, 768, 16, 1965, 1546, 86, 3113, 9154, 1546, 536, 80, 690, 3113, 1699, 67, 4450, 67, 1105, 33, 8381, 16, 2688, 1546, 4258, 24, 6418, 3113, 2650, ...
full_results = 'RETURN:<p style="font-size:smaller;">Details:<br>'
full_results = '\nRETURN:<p style="font-size:smaller;">Details:<br>'
def send_to_graph(results_server, results_link, title, date, browser_config, results): tbox = title url_format = "http://%s/%s" link_format= "<a href=\"%s\">%s</a>" #value, testname, tbox, timeval, date, branch, buildid, type, data result_format = "%.2f,%s,%s,%d,%d,%s,%s,%s,%s,\n" result_format2 = "%.2f,%s,%s,%d,%d,%s,%s,%s,\n" links = '' for res in results: browser_dump, counter_dump = results[res] utils.debug("Working with test: " + res) utils.debug("Sending results: " + " ".join(browser_dump)) filename = tempfile.mktemp() tmpf = open(filename, "w") if res in ('ts', 'twinopen'): i = 0 for val in browser_dump: val_list = val.split('|') for v in val_list: tmpf.write(result_format % (float(v), res, tbox, i, date, browser_config['branch'], browser_config['buildid'], "discrete", "ms")) i += 1 else: # each line of the string is of the format i;page_name;median;mean;min;max;time vals\n name = '' if ((res == 'tp') or (res == 'tp_js')): name = '_loadtime' for bd in browser_dump: bd.rstrip('\n') page_results = bd.splitlines() i = 0 for mypage in page_results: r = mypage.split(';') #skip this line if it isn't the correct format if len(r) == 1: continue r[1] = r[1].rstrip('/') if r[1].find('/') > -1 : page = r[1].split('/')[1] else: page = r[1] try: val = float(r[2]) except ValueError: print 'WARNING: value error for median in tp' val = 0 tmpf.write(result_format % (val, res + name, tbox, i, date, browser_config['branch'], browser_config['buildid'], "discrete", page)) i += 1 tmpf.flush() tmpf.close() links += post_chunk(results_server, results_link, res, filename) os.remove(filename) for cd in counter_dump: for count_type in cd: val_list = cd[count_type] chunks = chunk_list(val_list) chunk_link = '' i = 0 for chunk in chunks: filename = tempfile.mktemp() tmpf = open(filename, "w") for val in chunk: tmpf.write(result_format2 % (float(val), res + "_" + count_type.replace("%", "Percent"), tbox, i, date, browser_config['branch'], browser_config['buildid'], "discrete")) i += 1 tmpf.flush() tmpf.close() chunk_link = post_chunk(results_server, results_link, '%s_%s (%d values)' % (res, count_type, len(chunk)), filename) os.remove(filename) links += chunk_link first_results = '' last_results = '' full_results = 'RETURN:<p style="font-size:smaller;">Details:<br>' lines = links.split('\n') for line in lines: if line == "": continue values = line.split(":") linkName = values[1] if linkName in ('tp_pbytes', 'tp_%cpu'): continue if float(values[2]) > 0: linkName += ":&nbsp;" + str(values[2]) url = url_format % (results_server, values[0]) link = link_format % (url, linkName) first_results = first_results + "RETURN:" + link + '<br>' else: url = url_format % (results_server, values[0]) link = link_format % (url, linkName) last_results = last_results + '| ' + link + ' ' full_results = first_results + full_results + last_results + '|</p>' print full_results
1512403eef36069fb4d42731d52758d3e48179f0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11102/1512403eef36069fb4d42731d52758d3e48179f0/run_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 869, 67, 4660, 12, 4717, 67, 3567, 16, 1686, 67, 1232, 16, 2077, 16, 1509, 16, 4748, 67, 1425, 16, 1686, 4672, 268, 2147, 273, 2077, 880, 67, 2139, 273, 315, 2505, 23155, 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, 1366, 67, 869, 67, 4660, 12, 4717, 67, 3567, 16, 1686, 67, 1232, 16, 2077, 16, 1509, 16, 4748, 67, 1425, 16, 1686, 4672, 268, 2147, 273, 2077, 880, 67, 2139, 273, 315, 2505, 23155, 8...
inc_dir = os.curdir
inc_dir = argv0_path
def get_config_h_filename(): """Return full pathname of installed pyconfig.h file.""" if python_build: inc_dir = os.curdir else: inc_dir = get_python_inc(plat_specific=1) if get_python_version() < '2.2': config_h = 'config.h' else: # The name of the config.h file changed in 2.2 config_h = 'pyconfig.h' return os.path.join(inc_dir, config_h)
30d163f9d7e8b6ca2155b934ac5db61858e1e830 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/30d163f9d7e8b6ca2155b934ac5db61858e1e830/sysconfig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1425, 67, 76, 67, 3459, 13332, 3536, 990, 1983, 9806, 434, 5876, 2395, 1425, 18, 76, 585, 12123, 309, 5790, 67, 3510, 30, 7290, 67, 1214, 273, 5261, 20, 67, 803, 469, 30, 72...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1425, 67, 76, 67, 3459, 13332, 3536, 990, 1983, 9806, 434, 5876, 2395, 1425, 18, 76, 585, 12123, 309, 5790, 67, 3510, 30, 7290, 67, 1214, 273, 5261, 20, 67, 803, 469, 30, 72...
wikipedia.output( username + u" has enough edits to be welcomed")
wikipedia.output(username + u" has enough edits to be welcomed")
def parselog(raw): done = list() users = list() pos = 0 load = True # I search with a regex how many user have not the talk page # and i put them in a list (i find it more easy and secure) while load == True: reg = '\(<a href=\"/w/index.php\?title=' + talk + '(.*?)&(amp;|)action=edit\"' p = re.compile(reg, re.UNICODE) x = p.search(raw, pos) if x == None: if len(done) >= 1: load = False wikipedia.output(u"\nLoaded all users...") continue elif len(done) == 0: load = False wikipedia.output(u"There is nobody to welcomed...") continue pos = x.end() username = x.group(1) if username not in done: done.append(username) UN = wikipedia.Page(welcomesite, username) UNT = wikipedia.Page(welcomesite, talk + username) con = '/wiki/' + contib + '/'+ UN.urlname() contribs = welcomesite.getUrl(con) contribnum = contribs.count('<li>') #This is not an accurate count, it just counts the first #50 contributions if contribnum >= number: wikipedia.output( username + u" has enough edits to be welcomed") users.append([username, contribnum]) elif contribnum < number: if contribnum == 0: wikipedia.output( username + u" has no contributions") else: wikipedia.output( username + u" has only " + str(contribnum) + u" contributions") return users
bf50a20b7e53b37ac1a5a7ffeb2895c56bcf1f38 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/bf50a20b7e53b37ac1a5a7ffeb2895c56bcf1f38/welcome.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 779, 1786, 717, 12, 1899, 4672, 2731, 273, 666, 1435, 3677, 273, 666, 1435, 949, 273, 374, 1262, 273, 1053, 468, 467, 1623, 598, 279, 3936, 3661, 4906, 729, 1240, 486, 326, 26591, 1363, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 779, 1786, 717, 12, 1899, 4672, 2731, 273, 666, 1435, 3677, 273, 666, 1435, 949, 273, 374, 1262, 273, 1053, 468, 467, 1623, 598, 279, 3936, 3661, 4906, 729, 1240, 486, 326, 26591, 1363, ...
Return values of `L(s, \chi_d)` for each quadratic character `\chi_d` for
Return values of `L(s, \chi_k)` for each quadratic character `\chi_k` whose discriminant `d` satisfies
def twist_values(self, s, dmin, dmax, L=''): r""" Return values of `L(s, \chi_d)` for each quadratic character `\chi_d` for `d_{\min} \leq d \leq d_{\max}`.
d7c08559ae2b2db2af151ddbb309aac5cf9d330f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/d7c08559ae2b2db2af151ddbb309aac5cf9d330f/lcalc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2339, 376, 67, 2372, 12, 2890, 16, 272, 16, 302, 1154, 16, 302, 1896, 16, 511, 2218, 11, 4672, 436, 8395, 2000, 924, 434, 1375, 48, 12, 87, 16, 521, 24010, 67, 79, 22025, 364, 1517, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2339, 376, 67, 2372, 12, 2890, 16, 272, 16, 302, 1154, 16, 302, 1896, 16, 511, 2218, 11, 4672, 436, 8395, 2000, 924, 434, 1375, 48, 12, 87, 16, 521, 24010, 67, 79, 22025, 364, 1517, ...
except ValueError,IndexError: print "[error]: m00, wrong wrong wrong! ;-)"
value=int(value) except: print bold ("> Error: m00, wrong move! Try again..")
def e17_winlist(): try: import pyetun_winlist other=pyetun_winlist.get_list_other_desktops() icon=pyetun_winlist.get_show_iconified_windows() jump=pyetun_winlist.get_jump_desk() print "> Alt-tab Settings:" if other[0]=="POLICY=1": print bold_yellow("=> "), print "List other desktops windows: ENABLED (1)" elif other[0]=="POLICY=0": print bold_yellow("=> "), print "List other desktops windows: DISABLED (0)" if icon[0]=="POLICY=1": print bold_yellow("=> "), print "Show iconified windows: TRUE (1)" elif icon[0]=="POLICY=0": print bold_yellow("=> "), print "Show iconified windows: FALSE (0)" if jump[0]=="POLICY=1": print bold_yellow("=> "), print "Jump to desktops while selecting: TRUE (1)" elif jump[0]=="POLICY=0": print bold_yellow("=> "), print "Jump to desktops while selecting: FALSE (0)" if other[0]=="POLICY=0": print bold(" NOTE:"), print "You need ENABLE [L]IST OTHER DESKTOPS WINDOWS to use this option.." print bold_red("> Options: ") print bold_green("[L]IST OTHER DESKTOPS WINDOWS <0 or 1>") print bold_green("[S]SHOW ICONIFIED WINDOWS <0 or 1>") print bold_green("[J]UMP TO DESKTOPS WHILE SELECTING <0 or 1>") print "> CTRL+C - Main Menu" valu=raw_input("Option: ") while 1: try: t=valu.split(" ") opt=t[0] value=t[1] except ValueError,IndexError: print "[error]: m00, wrong wrong wrong! ;-)" e17_winlist() value=int(value) if opt=="l": if value>=0 and value<=1: pyetun_winlist.set_list_other_desktops(value) print bold("Done!") e17_winlist() else: print bold("[error]: Value between 0 and 1") e17_winlist() elif opt=="s": if value>=0 and value<=1: pyetun_winlist.set_show_iconified_windows(value) print bold("Done!") e17_winlist() elif opt=="j": if value>=0 and value<=1: pyetun_winlist.set_jump_desk(value) print bold("Done!") e17_winlist() else: print bold("[error]: Value between 0 and 1") e17_winlist() else: print bold("[error] m000 wrong option!") e17_winlist() except KeyboardInterrupt: print "\nOops! exiting ;)" console()
2fa3dd7d543e4707edab295f78b69a8e8ed810f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2281/2fa3dd7d543e4707edab295f78b69a8e8ed810f2/pyetun.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 425, 4033, 67, 8082, 1098, 13332, 775, 30, 1930, 2395, 278, 318, 67, 8082, 1098, 1308, 33, 2074, 278, 318, 67, 8082, 1098, 18, 588, 67, 1098, 67, 3011, 67, 31949, 87, 1435, 4126, 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, 425, 4033, 67, 8082, 1098, 13332, 775, 30, 1930, 2395, 278, 318, 67, 8082, 1098, 1308, 33, 2074, 278, 318, 67, 8082, 1098, 18, 588, 67, 1098, 67, 3011, 67, 31949, 87, 1435, 4126, 33, ...
global_key = self.get_key_for_user() cache_dict = cache.get(global_key) if cache_dict is None: return if key in cache_dict: del cache_dict[key] cache.set(global_key, cache_dict, self.cache_time)
return cache.delete(self._prefix_user_key(key))
def __delitem__(self, key): global_key = self.get_key_for_user() cache_dict = cache.get(global_key) if cache_dict is None: return
941587095d5f96c224fcc018848a40ba2dbe7e68 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12041/941587095d5f96c224fcc018848a40ba2dbe7e68/userbits.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 1726, 972, 12, 2890, 16, 498, 4672, 2552, 67, 856, 273, 365, 18, 588, 67, 856, 67, 1884, 67, 1355, 1435, 1247, 67, 1576, 273, 1247, 18, 588, 12, 6347, 67, 856, 13, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 1726, 972, 12, 2890, 16, 498, 4672, 2552, 67, 856, 273, 365, 18, 588, 67, 856, 67, 1884, 67, 1355, 1435, 1247, 67, 1576, 273, 1247, 18, 588, 12, 6347, 67, 856, 13, 309, ...
else: d_feed = feed.Feed(default[0], initiallyAutoDownloadable=default[1])
for default in default_audio_feeds: self._add_default(default, u"audio")
def _install_default_feeds(self): logging.info("Adding default feeds")
6342be3c51e45e3f900a6bf37f53bb67b265ea13 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/6342be3c51e45e3f900a6bf37f53bb67b265ea13/theme.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5425, 67, 1886, 67, 7848, 87, 12, 2890, 4672, 2907, 18, 1376, 2932, 13962, 805, 27684, 7923, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5425, 67, 1886, 67, 7848, 87, 12, 2890, 4672, 2907, 18, 1376, 2932, 13962, 805, 27684, 7923, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
str, "\\N{SPACE", 'unicode-escape', 'strict'
str, b"\\N{SPACE", 'unicode-escape', 'strict'
def test_strict_eror_handling(self): # bogus character name self.assertRaises( UnicodeError, str, "\\N{blah}", 'unicode-escape', 'strict' ) # long bogus character name self.assertRaises( UnicodeError, str, "\\N{%s}" % ("x" * 100000), 'unicode-escape', 'strict' ) # missing closing brace self.assertRaises( UnicodeError, str, "\\N{SPACE", 'unicode-escape', 'strict' ) # missing opening brace self.assertRaises( UnicodeError, str, "\\NSPACE", 'unicode-escape', 'strict' )
e560a3660e775406196138e35838041e5b7b5780 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/e560a3660e775406196138e35838041e5b7b5780/test_ucn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 13948, 67, 264, 280, 67, 26822, 12, 2890, 4672, 468, 324, 28774, 3351, 508, 365, 18, 11231, 12649, 6141, 12, 9633, 668, 16, 609, 16, 8422, 50, 95, 3083, 9795, 1532, 16, 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, 1842, 67, 13948, 67, 264, 280, 67, 26822, 12, 2890, 4672, 468, 324, 28774, 3351, 508, 365, 18, 11231, 12649, 6141, 12, 9633, 668, 16, 609, 16, 8422, 50, 95, 3083, 9795, 1532, 16, 296, ...
print "%s hasn't got a valid nickname, what shall i do?" % username
wikipedia.output(u"%s hasn't got a valid nickname, what shall i do?" % username )
def report(lang, rep_page, username, com): another_page = wikipedia.Page(lang, rep_page) if another_page.exists(): text_get = another_page.get() else: text_get = '' pos = 0 # The talk page includes "_" between the two names, in this way i replace them to " " regex = talk.replace('_', ' ') + username n = re.compile(regex, re.UNICODE) y = n.search(text_get, pos) if y == None: # Adding the log :) rep_text = rep(username) another_page.put(text_get + rep_text, comment = com, minorEdit = True) print "...Reported..." else: pos = y.end() print "The user is already in the report page."
379a1c075a443c2c6135e1a371699920ae8e15d3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/379a1c075a443c2c6135e1a371699920ae8e15d3/welcome.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 12, 4936, 16, 2071, 67, 2433, 16, 2718, 16, 532, 4672, 4042, 67, 2433, 273, 21137, 18, 1964, 12, 4936, 16, 2071, 67, 2433, 13, 309, 4042, 67, 2433, 18, 1808, 13332, 977, 67, 58...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 12, 4936, 16, 2071, 67, 2433, 16, 2718, 16, 532, 4672, 4042, 67, 2433, 273, 21137, 18, 1964, 12, 4936, 16, 2071, 67, 2433, 13, 309, 4042, 67, 2433, 18, 1808, 13332, 977, 67, 58...
s.connect(('', 42000))
s.connect(('localhost', 42000))
def get_monitor_output(self): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(('', 42000)) L = [] while 1: buf = s.recv(8192) if buf: L.append(buf) else: break s.close() return "".join(L)
3b6a81109ca7cbe2d26943e0ff06eb086a004592 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/3b6a81109ca7cbe2d26943e0ff06eb086a004592/testMonitor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 10259, 67, 2844, 12, 2890, 4672, 272, 273, 2987, 18, 7814, 12, 7814, 18, 6799, 67, 18819, 16, 2987, 18, 3584, 3507, 67, 13693, 13, 272, 18, 3612, 12, 2668, 13014, 2187, 14856,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10259, 67, 2844, 12, 2890, 4672, 272, 273, 2987, 18, 7814, 12, 7814, 18, 6799, 67, 18819, 16, 2987, 18, 3584, 3507, 67, 13693, 13, 272, 18, 3612, 12, 2668, 13014, 2187, 14856,...
run_unittest(*test_classes)
_run_unittest(*test_classes)
def test_main(verbose=None): test_classes = (BuiltinTest, TestSorted) run_unittest(*test_classes) # verify reference counting if verbose and hasattr(sys, "gettotalrefcount"): import gc counts = [None] * 5 for i in xrange(len(counts)): run_unittest(*test_classes) gc.collect() counts[i] = sys.gettotalrefcount() print counts
2f6224bd829a8bdf7213cca18e8623c7bc8a7bf9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/2f6224bd829a8bdf7213cca18e8623c7bc8a7bf9/test_builtin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5254, 12, 11369, 33, 7036, 4672, 1842, 67, 4701, 273, 261, 28032, 4709, 16, 7766, 11739, 13, 225, 389, 2681, 67, 4873, 3813, 30857, 3813, 67, 4701, 13, 225, 468, 3929, 2114, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5254, 12, 11369, 33, 7036, 4672, 1842, 67, 4701, 273, 261, 28032, 4709, 16, 7766, 11739, 13, 225, 389, 2681, 67, 4873, 3813, 30857, 3813, 67, 4701, 13, 225, 468, 3929, 2114, ...
if mode1[0:1] == '04' or mode2[0:1] == '04':
if mode2.startswith('04') or mode1.startswith('04'):
def get_changes(self): #print "GitChangeset.get_changes" prev = self.props.has_key('parent') and self.props['parent'][0] or None for chg in self.git.diff_tree(prev, self.rev): (mode1,mode2,obj1,obj2,action,path) = chg kind = Node.FILE if mode1[0:1] == '04' or mode2[0:1] == '04': kind = Node.DIRECTORY
ff0ef4a0b7ee5f4115b9e845804b91a3cc0ca57e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14465/ff0ef4a0b7ee5f4115b9e845804b91a3cc0ca57e/git_fs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 6329, 12, 2890, 4672, 468, 1188, 315, 11540, 29743, 18, 588, 67, 6329, 6, 2807, 273, 365, 18, 9693, 18, 5332, 67, 856, 2668, 2938, 6134, 471, 365, 18, 9693, 3292, 2938, 3546, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6329, 12, 2890, 4672, 468, 1188, 315, 11540, 29743, 18, 588, 67, 6329, 6, 2807, 273, 365, 18, 9693, 18, 5332, 67, 856, 2668, 2938, 6134, 471, 365, 18, 9693, 3292, 2938, 3546, ...
if self._must_close: return True
def _check_close(self): if self._must_close: return True
282eab1e2a9a5c7b36139fad21705a9675ed7cfe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/282eab1e2a9a5c7b36139fad21705a9675ed7cfe/httplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 4412, 12, 2890, 4672, 309, 365, 6315, 11926, 67, 4412, 30, 327, 1053, 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, 389, 1893, 67, 4412, 12, 2890, 4672, 309, 365, 6315, 11926, 67, 4412, 30, 327, 1053, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
returnvals.append(raw_input('Project Name [%s]> ' % dp) or dp)
returnvals.append(raw_input('Project Name [%s]> ' % dp).strip() or dp)
def get_initenv_args(self): returnvals = [] print 'Creating a new Trac environment at %s' % self.envname print print 'Trac will first ask a few questions about your environment ' print 'in order to initalize and prepare the project database.' print print " Please enter the name of your project." print " This name will be used in page titles and descriptions." print dp = 'My Project' returnvals.append(raw_input('Project Name [%s]> ' % dp) or dp) print print ' Please specify the connection string for the database to use.' print ' By default, a local SQLite database is created in the environment ' print ' directory. It is also possible to use an already existing ' print ' PostgreSQL database (check the Trac documentation for the exact ' print ' connection string syntax).' print ddb = 'sqlite:db/trac.db' prompt = 'Database connection string [%s]> ' % ddb returnvals.append(raw_input(prompt) or ddb) print print ' Please specify the absolute path to the project Subversion repository.' print ' Repository must be local, and trac-admin requires read+write' print ' permission to initialize the Trac database.' print drp = '/var/svn/test' prompt = 'Path to repository [%s]> ' % drp returnvals.append(raw_input(prompt) or drp) print print ' Please enter location of Trac page templates.' print ' Default is the location of the site-wide templates installed with Trac.' print dt = default_dir('templates') prompt = 'Templates directory [%s]> ' % dt returnvals.append(raw_input(prompt) or dt) return returnvals
86b84c2ebfb020cdd200f65caf38a3c6ccf166f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/86b84c2ebfb020cdd200f65caf38a3c6ccf166f3/admin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2738, 3074, 67, 1968, 12, 2890, 4672, 327, 4524, 273, 5378, 1172, 296, 11092, 279, 394, 2197, 71, 3330, 622, 738, 87, 11, 738, 365, 18, 3074, 529, 1172, 1172, 296, 1609, 71, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2738, 3074, 67, 1968, 12, 2890, 4672, 327, 4524, 273, 5378, 1172, 296, 11092, 279, 394, 2197, 71, 3330, 622, 738, 87, 11, 738, 365, 18, 3074, 529, 1172, 1172, 296, 1609, 71, ...
function_tests++;
test.write("#ifdef %s\n" % (function_defines[name]))
d0cf7f6eea7331cc398c232d7879e4239d989e14 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12659/d0cf7f6eea7331cc398c232d7879e4239d989e14/gentest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1842, 18, 2626, 2932, 7, 430, 536, 738, 87, 64, 82, 6, 738, 261, 915, 67, 536, 1465, 63, 529, 22643, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 18, 2626, 2932, 7, 430, 536, 738, 87, 64, 82, 6, 738, 261, 915, 67, 536, 1465, 63, 529, 22643, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
cmd += ' -o ' + dll + ' -L' + GetOutputDir() + '/lib -L/usr/X11R6/lib'
cmd += ' -o ' + dll + ' -L' + GetOutputDir() + '/lib -L' + GetOutputDir() + '/tmp -L/usr/X11R6/lib'
def CompileLink(dll, obj, opts): if (COMPILER=="MSVC"): cmd = "link /nologo" if (platform.architecture()[0] == "64bit"): cmd += " /MACHINE:X64" if ("MFC" not in opts): cmd += " /NOD:MFC90.LIB" cmd += " /NOD:MFC80.LIB /NOD:LIBCI.LIB /DEBUG" cmd += " /nod:libc /nod:libcmtd /nod:atlthunk /nod:atls" if (GetOrigExt(dll) != ".exe"): cmd += " /DLL" optlevel = GetOptimizeOption(opts) if (optlevel==1): cmd += " /MAP /MAPINFO:EXPORTS /NOD:MSVCRT.LIB /NOD:MSVCPRT.LIB /NOD:MSVCIRT.LIB" if (optlevel==2): cmd += " /MAP:NUL /NOD:MSVCRT.LIB /NOD:MSVCPRT.LIB /NOD:MSVCIRT.LIB" if (optlevel==3): cmd += " /MAP:NUL /NOD:MSVCRTD.LIB /NOD:MSVCPRTD.LIB /NOD:MSVCIRTD.LIB" if (optlevel==4): cmd += " /MAP:NUL /LTCG /NOD:MSVCRTD.LIB /NOD:MSVCPRTD.LIB /NOD:MSVCIRTD.LIB" if ("MFC" in OPTS): if (optlevel<=2): cmd += " /NOD:MSVCRT.LIB /NOD:mfcs90.lib mfcs90.lib MSVCRT.lib" else: cmd += " /NOD:MSVCRTD.LIB /NOD:mfcs90.lib /NOD:mfcs90d.lib mfcs90d.lib MSVCRTD.lib" cmd += " /FIXED:NO /OPT:REF /STACK:4194304 /INCREMENTAL:NO " cmd += ' /OUT:' + BracketNameWithQuotes(dll) if (dll.endswith(".dll")): cmd += ' /IMPLIB:' + GetOutputDir() + '/lib/'+os.path.splitext(os.path.basename(dll))[0]+".lib" for (opt, dir) in LIBDIRECTORIES: if (opt=="ALWAYS") or (opts.count(opt)): cmd += ' /LIBPATH:' + BracketNameWithQuotes(dir) for x in obj: if (x.endswith(".dll")): cmd += ' ' + GetOutputDir() + '/lib/' + os.path.splitext(os.path.basename(x))[0] + ".lib" elif (x.endswith(".lib")): dname = os.path.splitext(dll)[0]+".dll" if (GetOrigExt(x) != ".ilb" and os.path.exists(GetOutputDir()+"/bin/" + os.path.splitext(os.path.basename(x))[0] + ".dll")): exit("Error: in makepanda, specify "+dname+", not "+x) cmd += ' ' + BracketNameWithQuotes(x) elif (x.endswith(".def")): cmd += ' /DEF:' + BracketNameWithQuotes(x) elif (x.endswith(".dat")): pass else: cmd += ' ' + BracketNameWithQuotes(x) if (GetOrigExt(dll)==".exe"): cmd += " " + GetOutputDir() + "/tmp/pandaIcon.res" for (opt, name) in LIBNAMES: if (opt=="ALWAYS") or (opts.count(opt)): cmd += " " + BracketNameWithQuotes(name) oscmd(cmd) SetVC90CRTVersion(dll+".manifest") mtcmd = "mt -manifest " + dll + ".manifest -outputresource:" + dll if (dll.endswith(".exe")==0): mtcmd = mtcmd + ";2" else: mtcmd = mtcmd + ";1" oscmd(mtcmd) if (COMPILER=="LINUX"): if (GetOrigExt(dll)==".exe"): cmd = 'g++ -o ' + dll + ' -L' + GetOutputDir() + '/lib -L' + GetOutputDir() + '/tmp -L/usr/X11R6/lib' else: if (sys.platform == "darwin"): cmd = 'g++ -undefined dynamic_lookup' if ("BUNDLE" in opts): cmd += ' -bundle ' else: cmd += ' -dynamiclib -install_name ' + os.path.basename(dll) cmd += ' -o ' + dll + ' -L' + GetOutputDir() + '/lib -L/usr/X11R6/lib' else: cmd = 'g++ -shared -o ' + dll + ' -L' + GetOutputDir() + '/lib -L/usr/X11R6/lib' for x in obj: if (GetOrigExt(x) != ".dat"): base = os.path.basename(x) if (base[-3:]==".so") and (base[:3]=="lib"): cmd += ' -l' + base[3:-3] elif (base[-2:]==".a") and (base[:3]=="lib"): cmd += ' -l' + base[3:-2] else: cmd += ' ' + x for (opt, dir) in LIBDIRECTORIES: if (opt=="ALWAYS") or (opt in opts): cmd += ' -L' + BracketNameWithQuotes(dir) for (opt, name) in LIBNAMES: if (opt=="ALWAYS") or (opt in opts): cmd += ' ' + BracketNameWithQuotes(name) cmd += " -lpthread" if (not sys.platform.startswith("freebsd")): cmd += " -ldl" if (sys.platform == "darwin" and not RTDIST): cmd += " -isysroot " + SDK["MACOSX"] + " -Wl,-syslibroot," + SDK["MACOSX"] + " -arch i386" if ("NOPPC" not in opts): cmd += " -arch ppc" oscmd(cmd) if (GetOrigExt(dll)==".exe" and GetOptimizeOption(opts)==4): oscmd("strip " + BracketNameWithQuotes(dll)) os.system("chmod +x " + BracketNameWithQuotes(dll))
13b23ef61880b74ab63bffb868c218fe0e2d0a88 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8543/13b23ef61880b74ab63bffb868c218fe0e2d0a88/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16143, 2098, 12, 27670, 16, 1081, 16, 1500, 4672, 309, 261, 31075, 14668, 31713, 3537, 13464, 6, 4672, 1797, 273, 315, 1232, 342, 82, 3966, 83, 6, 309, 261, 9898, 18, 991, 18123, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16143, 2098, 12, 27670, 16, 1081, 16, 1500, 4672, 309, 261, 31075, 14668, 31713, 3537, 13464, 6, 4672, 1797, 273, 315, 1232, 342, 82, 3966, 83, 6, 309, 261, 9898, 18, 991, 18123, 1435, ...
funcs = [open_db3hash, open_dbhash, open_gdbm, open_db185hash]
funcs = [open_db3hash, open_dbhash, open_gdbm, open_db185hash, open_dbm]
def open_best(*args): if sys.platform == "win32": # Note that Python 2.3 and later ship with the new bsddb interface # as the default bsddb module - so 2.3 can use the old name safely. funcs = [open_db3hash, open_gdbm] if sys.version_info >= (2,3): funcs.insert(0, open_dbhash) else: funcs = [open_db3hash, open_dbhash, open_gdbm, open_db185hash] for f in funcs: try: return f(*args) except ImportError: pass raise error("No dbm modules available!")
32ad8d5e3951864339cb0a34117e12c121ebae8b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9857/32ad8d5e3951864339cb0a34117e12c121ebae8b/dbmstorage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 12729, 30857, 1968, 4672, 309, 2589, 18, 9898, 422, 315, 8082, 1578, 6877, 468, 3609, 716, 6600, 576, 18, 23, 471, 5137, 24316, 598, 326, 394, 7081, 449, 70, 1560, 468, 487, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 12729, 30857, 1968, 4672, 309, 2589, 18, 9898, 422, 315, 8082, 1578, 6877, 468, 3609, 716, 6600, 576, 18, 23, 471, 5137, 24316, 598, 326, 394, 7081, 449, 70, 1560, 468, 487, ...
elif cmd == 'reloadConfig': self.interval = int(Config().getExt('Trigger', 'interval').strip())
elif cmd == 'reloadConfig': self.interval = int(Config().getExt('Trigger', 'interval').strip())
def command(self, cmd):
1bc3f8ee0f5585b25b04dc37e869f107a4a3f4c1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2550/1bc3f8ee0f5585b25b04dc37e869f107a4a3f4c1/Trigger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1296, 12, 2890, 16, 1797, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1296, 12, 2890, 16, 1797, 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, -10...
def connected( self, connected, writeEnabled ):
def setConnected( self, connected, writeEnabled ):
def connected( self, connected, writeEnabled ): self.connected = connected self.modifiedData = False self.writeEnabled = writeEnabled if connected: if writeEnabled: self.prompt = "(%s)-%s> " % ( self.masterURL, colorize( "Connected", "green" ) ) else: self.prompt = "(%s)-%s> " % ( self.masterURL, colorize( "Connected (RO)", "yellow" ) ) else: self.prompt = "(%s)-%s> " % ( self.masterURL, colorize( "Disconnected", "red" ) )
9dbda8470abf4aa5cefd085dbced5e3d3d122a7f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/9dbda8470abf4aa5cefd085dbced5e3d3d122a7f/CSCLI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 8932, 12, 365, 16, 5840, 16, 1045, 1526, 262, 30, 365, 18, 8537, 273, 5840, 365, 18, 7342, 751, 273, 1083, 365, 18, 2626, 1526, 273, 1045, 1526, 309, 5840, 30, 309, 1045, 1526, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 8932, 12, 365, 16, 5840, 16, 1045, 1526, 262, 30, 365, 18, 8537, 273, 5840, 365, 18, 7342, 751, 273, 1083, 365, 18, 2626, 1526, 273, 1045, 1526, 309, 5840, 30, 309, 1045, 1526, ...
or isinstance(p,sage.combinat.permutation.Permutation_class)):
or isinstance(p,Permutation_class)):
def __classcall_private__(cls,p): r""" This function tries to recognize the input (it can be either a list or a tuple of pairs, or a fix-point free involution given as a list or as a permutation), constructs the parent (enumerated set of PerfectMatchings of the ground set) and calls the __init__ function to construct our object.
8c73ada3e77a03c7e22ba4946a3c8d3f2ac08960 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/8c73ada3e77a03c7e22ba4946a3c8d3f2ac08960/perfect_matching.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1106, 1991, 67, 1152, 972, 12, 6429, 16, 84, 4672, 436, 8395, 1220, 445, 9327, 358, 21431, 326, 810, 261, 305, 848, 506, 3344, 279, 666, 578, 279, 3193, 434, 5574, 16, 578, 279, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1106, 1991, 67, 1152, 972, 12, 6429, 16, 84, 4672, 436, 8395, 1220, 445, 9327, 358, 21431, 326, 810, 261, 305, 848, 506, 3344, 279, 666, 578, 279, 3193, 434, 5574, 16, 578, 279, ...
dummy = self.store50['z']
dummy = self.store['z']
def raise__getitem__1(self): dummy = self.store50['z']
4f7397e773983ae72bd3ffebc2d43ad44a277e2e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2720/4f7397e773983ae72bd3ffebc2d43ad44a277e2e/storage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1002, 972, 31571, 972, 21, 12, 2890, 4672, 9609, 273, 365, 18, 2233, 3292, 94, 3546, 282, 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, 1002, 972, 31571, 972, 21, 12, 2890, 4672, 9609, 273, 365, 18, 2233, 3292, 94, 3546, 282, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if not self._options.delete_unversioned_trees or modified_files:
if (not self._options.delete_unversioned_trees or (modified_files and not self._options.force)):
def RunOnDeps(self, command, args): """Runs a command on each dependency in a client and its dependencies.
52ca2ded6aa92750a2d4f2c8509651d6fbf5cfef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6076/52ca2ded6aa92750a2d4f2c8509651d6fbf5cfef/gclient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1939, 1398, 14430, 12, 2890, 16, 1296, 16, 833, 4672, 3536, 9361, 279, 1296, 603, 1517, 4904, 316, 279, 1004, 471, 2097, 5030, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1939, 1398, 14430, 12, 2890, 16, 1296, 16, 833, 4672, 3536, 9361, 279, 1296, 603, 1517, 4904, 316, 279, 1004, 471, 2097, 5030, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100...
code.append(jast.InvokeStatic("System", "arraycopy", args))
code.append(jast.InvokeStatic("java.lang.System", "arraycopy", args))
def dumpMain(self): meths = [] if self.javamain: code = [] newargs = jast.Identifier("newargs") code.append(jast.Declare("String[]", newargs, jast.NewArray("String", ["args.length+1"]))) code.append(jast.Set(jast.Identifier("newargs[0]"), jast.StringConstant(self.name)))
8d294fc99afedf463a5c9211eb610bc8cfe1f713 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6753/8d294fc99afedf463a5c9211eb610bc8cfe1f713/PythonModule.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 6376, 12, 2890, 4672, 7917, 87, 273, 5378, 309, 365, 18, 19207, 301, 530, 30, 981, 273, 5378, 394, 1968, 273, 525, 689, 18, 3004, 2932, 2704, 1968, 7923, 981, 18, 6923, 12, 78, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 6376, 12, 2890, 4672, 7917, 87, 273, 5378, 309, 365, 18, 19207, 301, 530, 30, 981, 273, 5378, 394, 1968, 273, 525, 689, 18, 3004, 2932, 2704, 1968, 7923, 981, 18, 6923, 12, 78, ...
for output in self.call('listTaskOutput', {'taskID': srpm_task['id']}):
for output in self.call('listTaskOutput', { 'taskID': srpm_task['id'], }):
def call_get_latest_changelog(self, resource_path, _cookies=None, build_id=None, task_id=None, state=None): build_id = int(build_id); task_id = int(task_id); state = int(state);
0114ae5de894350cf673a533fb04d5d766086186 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12732/0114ae5de894350cf673a533fb04d5d766086186/kojiconnector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 67, 588, 67, 13550, 67, 24083, 12970, 12, 2890, 16, 1058, 67, 803, 16, 389, 16240, 33, 7036, 16, 1361, 67, 350, 33, 7036, 16, 1562, 67, 350, 33, 7036, 16, 919, 33, 7036, 4672, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 67, 588, 67, 13550, 67, 24083, 12970, 12, 2890, 16, 1058, 67, 803, 16, 389, 16240, 33, 7036, 16, 1361, 67, 350, 33, 7036, 16, 1562, 67, 350, 33, 7036, 16, 919, 33, 7036, 4672, ...
if( value == None ): return if key not in self._metas :
if value is None : return if key not in self._metaTypes :
def set_metadata(self, key, value, notify=True): """Sets the value of a meta data.""" if( value == None ): return if key not in self._metas : raise Exception("This key does not exist : " + key)
32182ef0ddf273b9a6767e2866166bde311fe575 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11338/32182ef0ddf273b9a6767e2866166bde311fe575/metadatadict.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 4165, 12, 2890, 16, 498, 16, 460, 16, 5066, 33, 5510, 4672, 3536, 2785, 326, 460, 434, 279, 2191, 501, 12123, 309, 460, 353, 599, 294, 327, 309, 498, 486, 316, 365, 6315, 39...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 4165, 12, 2890, 16, 498, 16, 460, 16, 5066, 33, 5510, 4672, 3536, 2785, 326, 460, 434, 279, 2191, 501, 12123, 309, 460, 353, 599, 294, 327, 309, 498, 486, 316, 365, 6315, 39...
blend = color1.Blend
blend = color1.RGB().Blend
def Sample(self, num): colors = self.colors max = num - 1.0 pos1, color1 = colors[0] pos2, color2 = colors[1] diff = float(pos2 - pos1) cur = 1 result = [] blend = color1.Blend for i in range(num): frac = i / max while frac > pos2: pos1 = pos2; color1 = color2 cur = cur + 1 pos2, color2 = colors[cur] diff = float(pos2 - pos1) blend = color1.Blend frac = (frac - pos1) / diff result.append(blend(color2, 1 - frac, frac)) return result
a64a665d8990fc6eee8a6940f8e3023d7ea545f7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3127/a64a665d8990fc6eee8a6940f8e3023d7ea545f7/gradient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11474, 12, 2890, 16, 818, 4672, 5740, 273, 365, 18, 9724, 943, 273, 818, 300, 404, 18, 20, 949, 21, 16, 2036, 21, 273, 5740, 63, 20, 65, 949, 22, 16, 2036, 22, 273, 5740, 63, 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, 11474, 12, 2890, 16, 818, 4672, 5740, 273, 365, 18, 9724, 943, 273, 818, 300, 404, 18, 20, 949, 21, 16, 2036, 21, 273, 5740, 63, 20, 65, 949, 22, 16, 2036, 22, 273, 5740, 63, 21, ...
fld.append((field.field, field.sequence))
fld.append((field.field, field.sequence, field.name))
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False): journal_pool = self.pool.get('account.journal')
68d68134dadd580d950c241903ac4683faaa99b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/68d68134dadd580d950c241903ac4683faaa99b3/account_move_line.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1466, 67, 1945, 67, 588, 12, 2890, 16, 4422, 16, 4555, 16, 1476, 67, 350, 33, 7036, 16, 1476, 67, 723, 2218, 687, 2187, 819, 28793, 12748, 33, 8381, 16, 27539, 33, 8381, 4672, 13001, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1466, 67, 1945, 67, 588, 12, 2890, 16, 4422, 16, 4555, 16, 1476, 67, 350, 33, 7036, 16, 1476, 67, 723, 2218, 687, 2187, 819, 28793, 12748, 33, 8381, 16, 27539, 33, 8381, 4672, 13001, ...
self.manage_permission(this_perm, [this_role])
self.manage_permission(this_perm, these_roles)
def setOp(self, op, usernames, category): """Set who can do a particular operation.""" if category is None: raise "Programmer error, emasculate programmer" this_perm = self._perms[op] this_role = self._roles_map[category] this_local_role = self._local_roles_map[op] self.manage_permission(this_perm, [this_role]) for username in usernames: username and \ self.manage_addLocalRoles(username,[this_local_role])
2262b1426eb2bef7e8d92c63a8c506f11ee616d3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1843/2262b1426eb2bef7e8d92c63a8c506f11ee616d3/CMFWikiPage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 3817, 12, 2890, 16, 1061, 16, 27675, 16, 3150, 4672, 3536, 694, 10354, 848, 741, 279, 6826, 1674, 12123, 309, 3150, 353, 599, 30, 1002, 315, 9459, 6592, 555, 16, 801, 345, 6569, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 3817, 12, 2890, 16, 1061, 16, 27675, 16, 3150, 4672, 3536, 694, 10354, 848, 741, 279, 6826, 1674, 12123, 309, 3150, 353, 599, 30, 1002, 315, 9459, 6592, 555, 16, 801, 345, 6569, 5...
m = re.match(r'GNU Fortran\s+95.*?([0-9-.]+)', version_string) if m: return ('gfortran', m.group(1)) m = re.match(r'GNU Fortran.*?([0-9-.]+)', version_string) if m: v = m.group(1) if v.startswith('0') or v.startswith('2') or v.startswith('3'): return ('g77', v)
ctype = self.compiler_type f90 = set_exe('compiler_f90') if not f90: f77 = set_exe('compiler_f77') if f77: log.warn('%s: no Fortran 90 compiler found' % ctype)
def gnu_version_match(self, version_string): """Handle the different versions of GNU fortran compilers""" m = re.match(r'GNU Fortran', version_string) if not m: return None m = re.match(r'GNU Fortran\s+95.*?([0-9-.]+)', version_string) if m: return ('gfortran', m.group(1)) m = re.match(r'GNU Fortran.*?([0-9-.]+)', version_string) if m: v = m.group(1) if v.startswith('0') or v.startswith('2') or v.startswith('3'): # the '0' is for early g77's return ('g77', v) else: # at some point in the 4.x series, the ' 95' was dropped # from the version string return ('gfortran', v)
88d8906f7b729e50947606558b12f05e24421e4d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/88d8906f7b729e50947606558b12f05e24421e4d/gnu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 314, 13053, 67, 1589, 67, 1916, 12, 2890, 16, 1177, 67, 1080, 4672, 3536, 3259, 326, 3775, 5244, 434, 611, 50, 57, 364, 13171, 1161, 330, 414, 8395, 312, 273, 283, 18, 1916, 12, 86, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 314, 13053, 67, 1589, 67, 1916, 12, 2890, 16, 1177, 67, 1080, 4672, 3536, 3259, 326, 3775, 5244, 434, 611, 50, 57, 364, 13171, 1161, 330, 414, 8395, 312, 273, 283, 18, 1916, 12, 86, ...
countOfUnfixedList += 1
def FixVpdOffset (self): # At first, the offset should start at 0 # Sort fixed offset list in order to find out where has free spaces for the pcd's offset # value is "*" to insert into. self.PcdFixedOffsetSizeList.sort(lambda x,y: cmp(x.PcdBinOffset, y.PcdBinOffset)) # # Sort the un-fixed pcd's offset by it's size. # self.PcdUnknownOffsetList.sort(lambda x,y: cmp(x.PcdBinSize, y.PcdBinSize)) # # Process all Offset value are "*" # if (len(self.PcdFixedOffsetSizeList) == 0) and (len(self.PcdUnknownOffsetList) != 0) : # The offset start from 0 NowOffset = 0 for Pcd in self.PcdUnknownOffsetList : Pcd.PcdBinOffset = NowOffset Pcd.PcdOffset = str(hex(Pcd.PcdBinOffset)) NowOffset += Pcd.PcdBinSize self.PcdFixedOffsetSizeList = self.PcdUnknownOffsetList return # Check the offset of VPD type pcd's offset start from 0. if self.PcdFixedOffsetSizeList[0].PcdBinOffset != 0 : EdkLogger.warn("BPDG", "The offset of VPD type pcd should start with 0, please check it.", None) # Judge whether the offset in fixed pcd offset list is overlapped or not. lenOfList = len(self.PcdFixedOffsetSizeList) count = 0 while (count < lenOfList - 1) : PcdNow = self.PcdFixedOffsetSizeList[count] PcdNext = self.PcdFixedOffsetSizeList[count+1] # Two pcd's offset is same if PcdNow.PcdBinOffset == PcdNext.PcdBinOffset : EdkLogger.error("BPDG", BuildToolError.ATTRIBUTE_GET_FAILURE, "The offset of %s at line: %s is same with %s at line: %s in file %s" %\ (PcdNow.PcdCName, PcdNow.Lineno, PcdNext.PcdCName, PcdNext.Lineno, PcdNext.FileName), None) # Overlapped if PcdNow.PcdBinOffset + PcdNow.PcdBinSize > PcdNext.PcdBinOffset : EdkLogger.error("BPDG", BuildToolError.ATTRIBUTE_GET_FAILURE, "The offset of %s at line: %s is overlapped with %s at line: %s in file %s" %\ (PcdNow.PcdCName, PcdNow.Lineno, PcdNext.PcdCName, PcdNext.Lineno, PcdNext.FileName), None) # Has free space, raise a warning message if PcdNow.PcdBinOffset + PcdNow.PcdBinSize < PcdNext.PcdBinOffset : EdkLogger.warn("BPDG", BuildToolError.ATTRIBUTE_GET_FAILURE, "The offsets have free space of between %s at line: %s and %s at line: %s in file %s" %\ (PcdNow.PcdCName, PcdNow.Lineno, PcdNext.PcdCName, PcdNext.Lineno, PcdNext.FileName), None) count += 1 LastOffset = self.PcdFixedOffsetSizeList[0].PcdBinOffset FixOffsetSizeListCount = 0 lenOfList = len(self.PcdFixedOffsetSizeList) lenOfUnfixedList = len(self.PcdUnknownOffsetList) ## # Insert the un-fixed offset pcd's list into fixed offset pcd's list if has free space between those pcds. # while (FixOffsetSizeListCount < lenOfList) : eachFixedPcd = self.PcdFixedOffsetSizeList[FixOffsetSizeListCount] NowOffset = eachFixedPcd.PcdBinOffset # Has free space if LastOffset < NowOffset : if lenOfUnfixedList != 0 : countOfUnfixedList = 0 while(countOfUnfixedList < lenOfUnfixedList) : #needFixPcdCName, needFixPcdOffset, needFixPcdSize, needFixPcdValue, needFixUnpackValue = self.PcdUnknownOffsetList[countOfUnfixedList][0:6] eachUnfixedPcd = self.PcdUnknownOffsetList[countOfUnfixedList] needFixPcdSize = eachUnfixedPcd.PcdBinSize needFixPcdOffset = eachUnfixedPcd.PcdOffset # Not been fixed if eachUnfixedPcd.PcdOffset == '*' : # The offset un-fixed pcd can write into this free space if needFixPcdSize <= (NowOffset - LastOffset) : # Change the offset value of un-fixed pcd eachUnfixedPcd.PcdOffset = str(hex(LastOffset)) eachUnfixedPcd.PcdBinOffset = LastOffset # Insert this pcd into fixed offset pcd list. self.PcdFixedOffsetSizeList.insert(FixOffsetSizeListCount,eachUnfixedPcd) # Delete the item's offset that has been fixed and added into fixed offset list self.PcdUnknownOffsetList.pop(countOfUnfixedList) # After item added, should enlarge the length of fixed pcd offset list lenOfList += 1 FixOffsetSizeListCount += 1 # Decrease the un-fixed pcd offset list's length countOfUnfixedList += 1 lenOfUnfixedList -= 1 # Modify the last offset value LastOffset += needFixPcdSize continue else : # It can not insert into those two pcds, need to check stiil has other space can store it. FixOffsetSizeListCount += 1 break else : continue # Set the FixOffsetSizeListCount = lenOfList for quit the loop else : FixOffsetSizeListCount = lenOfList # No free space, smoothly connect with previous pcd. elif LastOffset == NowOffset : LastOffset = NowOffset + eachFixedPcd.PcdBinSize FixOffsetSizeListCount += 1 # Usually it will not enter into this thunk, if so, means it overlapped. else : EdkLogger.error("BPDG", BuildToolError.ATTRIBUTE_NOT_AVAILABLE, "The offset value definition has overlapped at pcd: %s, it's offset is: %s, in file: %s line: %s" %\ (eachFixedPcd.PcdCName, eachFixedPcd.PcdOffset, eachFixedPcd.InputFileName, eachFixedPcd.Lineno), None) FixOffsetSizeListCount += 1 # Continue to process the un-fixed offset pcd's list, add this time, just append them behind the fixed pcd's offset list. lenOfUnfixedList = len(self.PcdUnknownOffsetList) lenOfList = len(self.PcdFixedOffsetSizeList) while (lenOfUnfixedList > 0) : # Still has items need to process # The last pcd instance LastPcd = self.PcdFixedOffsetSizeList[lenOfList-1] NeedFixPcd = self.PcdUnknownOffsetList[0] NeedFixPcd.PcdBinOffset = LastPcd.PcdBinOffset + LastPcd.PcdBinSize NeedFixPcd.PcdOffset = str(hex(NeedFixPcd.PcdBinOffset)) # Insert this pcd into fixed offset pcd list's tail. self.PcdFixedOffsetSizeList.insert(lenOfList, NeedFixPcd) # Delete the item's offset that has been fixed and added into fixed offset list self.PcdUnknownOffsetList.pop(0) lenOfList += 1 lenOfUnfixedList -= 1
662e219095e0387039bf7dfd32d2d3fdbba57513 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/914/662e219095e0387039bf7dfd32d2d3fdbba57513/GenVpd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12139, 58, 22353, 2335, 261, 2890, 4672, 468, 2380, 1122, 16, 326, 1384, 1410, 787, 622, 374, 468, 5928, 5499, 1384, 666, 316, 1353, 358, 1104, 596, 1625, 711, 4843, 7292, 364, 326, 293,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12139, 58, 22353, 2335, 261, 2890, 4672, 468, 2380, 1122, 16, 326, 1384, 1410, 787, 622, 374, 468, 5928, 5499, 1384, 666, 316, 1353, 358, 1104, 596, 1625, 711, 4843, 7292, 364, 326, 293,...
if f and f[:len(prefix)] == prefix:
if f:
def __export_row(self, cr, uid, row, fields, prefix, context=None): if not context: context={} lines = [] data = map(lambda x: '', range(len(fields))) done = [] for fpos in range(len(fields)): f = fields[fpos] if f and f[:len(prefix)] == prefix: r = row i = 0 while i<len(f): r = r[f[i]] if not r: break if isinstance(r, (browse_record_list, list)): first = True fields2 = map(lambda x: (x[:i+1]==f[:i+1] and x[i+1:]) or [], fields) if fields2 in done: break done.append(fields2) for row2 in r: lines2 = self.__export_row(cr, uid, row2, fields2, f[i+2:], context) if first: for fpos2 in range(len(fields)): if lines2 and lines2[0][fpos2]: data[fpos2] = lines2[0][fpos2] lines+= lines2[1:] first = False else: lines+= lines2 break i+=1 if i==len(f): data[fpos] = str(r or '') return [data] + lines
990cef5cc414168323c5be096b5aea5b92362f7e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12853/990cef5cc414168323c5be096b5aea5b92362f7e/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 6530, 67, 492, 12, 2890, 16, 4422, 16, 4555, 16, 1027, 16, 1466, 16, 1633, 16, 819, 33, 7036, 4672, 309, 486, 819, 30, 819, 12938, 2362, 273, 5378, 501, 273, 852, 12, 14661, 61...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6530, 67, 492, 12, 2890, 16, 4422, 16, 4555, 16, 1027, 16, 1466, 16, 1633, 16, 819, 33, 7036, 4672, 309, 486, 819, 30, 819, 12938, 2362, 273, 5378, 501, 273, 852, 12, 14661, 61...
if prog <> self.prog:
if prog != self.prog:
def handle(self, call): # Don't use unpack_header but parse the header piecewise # XXX I have no idea if I am using the right error responses! self.unpacker.reset(call) self.packer.reset() xid = self.unpacker.unpack_uint() self.packer.pack_uint(xid) temp = self.unpacker.unpack_enum() if temp <> CALL: return None # Not worthy of a reply self.packer.pack_uint(REPLY) temp = self.unpacker.unpack_uint() if temp <> RPCVERSION: self.packer.pack_uint(MSG_DENIED) self.packer.pack_uint(RPC_MISMATCH) self.packer.pack_uint(RPCVERSION) self.packer.pack_uint(RPCVERSION) return self.packer.get_buf() self.packer.pack_uint(MSG_ACCEPTED) self.packer.pack_auth((AUTH_NULL, make_auth_null())) prog = self.unpacker.unpack_uint() if prog <> self.prog: self.packer.pack_uint(PROG_UNAVAIL) return self.packer.get_buf() vers = self.unpacker.unpack_uint() if vers <> self.vers: self.packer.pack_uint(PROG_MISMATCH) self.packer.pack_uint(self.vers) self.packer.pack_uint(self.vers) return self.packer.get_buf() proc = self.unpacker.unpack_uint() methname = 'handle_' + repr(proc) try: meth = getattr(self, methname) except AttributeError: self.packer.pack_uint(PROC_UNAVAIL) return self.packer.get_buf() cred = self.unpacker.unpack_auth() verf = self.unpacker.unpack_auth() try: meth() # Unpack args, call turn_around(), pack reply except (EOFError, GarbageArgs): # Too few or too many arguments self.packer.reset() self.packer.pack_uint(xid) self.packer.pack_uint(REPLY) self.packer.pack_uint(MSG_ACCEPTED) self.packer.pack_auth((AUTH_NULL, make_auth_null())) self.packer.pack_uint(GARBAGE_ARGS) return self.packer.get_buf()
c672f8c377b9befd49fed010441b025deace386a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c672f8c377b9befd49fed010441b025deace386a/rpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 16, 745, 4672, 468, 7615, 1404, 999, 6167, 67, 3374, 1496, 1109, 326, 1446, 11151, 2460, 468, 11329, 467, 1240, 1158, 21463, 309, 467, 2125, 1450, 326, 2145, 555, 7220, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 16, 745, 4672, 468, 7615, 1404, 999, 6167, 67, 3374, 1496, 1109, 326, 1446, 11151, 2460, 468, 11329, 467, 1240, 1158, 21463, 309, 467, 2125, 1450, 326, 2145, 555, 7220, 5...
requirements += ' && other.OwnerDN = "%s" && other.OwnerGroup = "%s"' % ( ownerDN , ownerGroup ) requirements += ' && other.PilotType = "%s"' % pilotType
ownerGroupProperties = getPropertiesForGroup( ownerGroup ) if not 'JobSharing' in ownerGroupProperties: requirements += '&& other.OwnerGroup = %s' % ownerGroup requirements += ' && other.OwnerDN = %s ' % ownerDN requirements += ' && other.PilotType = %s' % pilotType
def insertJobInQueue(self,job): """ Check individual job and add to the Task Queue eventually. """ retVal = self.jobDB.getJobParameters(job,['Priority']) if retVal['OK']: if retVal['Value']: priority = retVal['Value']['Priority'] else: self.log.warn('No priority specified for job %d' % int(job)) priority = 0 else: priority=0
4b1fcb1237df1cd914390afd4550e57034e343e4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/4b1fcb1237df1cd914390afd4550e57034e343e4/TaskQueueAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 2278, 382, 3183, 12, 2890, 16, 4688, 4672, 3536, 2073, 7327, 1719, 471, 527, 358, 326, 3837, 7530, 18011, 18, 3536, 12197, 273, 365, 18, 4688, 2290, 18, 588, 2278, 2402, 12, 4688, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 2278, 382, 3183, 12, 2890, 16, 4688, 4672, 3536, 2073, 7327, 1719, 471, 527, 358, 326, 3837, 7530, 18011, 18, 3536, 12197, 273, 365, 18, 4688, 2290, 18, 588, 2278, 2402, 12, 4688, ...
if os.path.exists(iconname): icon_path = iconname elif os.path.exists('../share/pixmaps/' + iconname): icon_path = '../share/pixmaps/' + iconname elif os.path.exists('/usr/local/share/pixmaps/' + iconname): icon_path = '/usr/local/share/pixmaps/' + iconname elif os.path.exists('/usr/share/pixmaps/' + iconname): icon_path = '/usr/share/pixmaps/' + iconname try: icon_pixbuf = gtk.gdk.pixbuf_new_from_file(icon_path) except: pass self.about_dialog = gtk.AboutDialog() self.about_dialog.set_name('Mirage') self.about_dialog.set_version(__version__) self.about_dialog.set_comments(_('A fast GTK+ Image Viewer.')) self.about_dialog.set_license(__license__) self.about_dialog.set_authors(['Scott Horowitz <stonecrest@gmail.com>']) self.about_dialog.set_artists(['William Rea <sillywilly@gmail.com>']) self.about_dialog.set_website('http://mirageiv.berlios.de') self.about_dialog.set_logo(icon_pixbuf) self.about_dialog.connect('response', self.close_about) self.about_dialog.connect('delete_event', self.close_about) self.about_dialog.show_all() return def close_about(self, event, data=None): self.about_dialog.hide() return True def mousewheel_scrolled(self, widget, event): if event.type == gtk.gdk.SCROLL:
if os.path.exists(iconname): icon_path = iconname elif os.path.exists('../share/pixmaps/' + iconname): icon_path = '../share/pixmaps/' + iconname elif os.path.exists('/usr/local/share/pixmaps/' + iconname): icon_path = '/usr/local/share/pixmaps/' + iconname elif os.path.exists('/usr/share/pixmaps/' + iconname): icon_path = '/usr/share/pixmaps/' + iconname try: icon_pixbuf = gtk.gdk.pixbuf_new_from_file(icon_path) except: pass self.about_dialog = gtk.AboutDialog() self.about_dialog.set_name('Mirage') self.about_dialog.set_version(__version__) self.about_dialog.set_comments(_('A fast GTK+ Image Viewer.')) self.about_dialog.set_license(__license__) self.about_dialog.set_authors(['Scott Horowitz <stonecrest@gmail.com>']) self.about_dialog.set_artists(['William Rea <sillywilly@gmail.com>']) self.about_dialog.set_website('http://mirageiv.berlios.de') self.about_dialog.set_logo(icon_pixbuf) self.about_dialog.connect('response', self.close_about) self.about_dialog.connect('delete_event', self.close_about) self.about_dialog.show_all() return def close_about(self, event, data=None): self.about_dialog.hide() return True def mousewheel_scrolled(self, widget, event): if event.type == gtk.gdk.SCROLL:
def show_about(self, action): # Help > About
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 21071, 12, 2890, 16, 1301, 4672, 468, 11288, 405, 9771, 659, 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, ...
[ 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, 2405, 67, 21071, 12, 2890, 16, 1301, 4672, 468, 11288, 405, 9771, 659, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
raise NotImplementedError
return MS_RING_ON & win32file.GetCommModemStatus(self.hComPort) != 0
def getRI(self): """read terminal status line""" if not self.hComPort: raise portNotOpenError raise NotImplementedError
25aa5f3bfacd32a2162715fd6078f5883d04081e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10955/25aa5f3bfacd32a2162715fd6078f5883d04081e/serialwin32.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 2259, 12, 2890, 4672, 3536, 896, 8651, 1267, 980, 8395, 309, 486, 365, 18, 76, 799, 2617, 30, 1002, 1756, 1248, 3678, 668, 1002, 11206, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 2259, 12, 2890, 4672, 3536, 896, 8651, 1267, 980, 8395, 309, 486, 365, 18, 76, 799, 2617, 30, 1002, 1756, 1248, 3678, 668, 1002, 11206, 2, -100, -100, -100, -100, -100, -100, -100, ...
self.uri = foaf.replace(":","_").replace("/","_")
def __init__(self, foaf):
49b066a76d1e21202a028899861c176ca4476c0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2682/49b066a76d1e21202a028899861c176ca4476c0a/foaf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 18261, 1727, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 18261, 1727, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...