rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
s = DummyScheduler() c = Connecter(up, down, s, 5, 6)
c = Connecter(up, down)
def test_close_remote_of_remote_start(): up = DummyTransfer() down = DummyTransfer() s = DummyScheduler() c = Connecter(up, down, s, 5, 6) e = DummyEncrypter() c.set_encrypter(e) dc = DummyConnection('a' * 20) c.got_message(dc, 'upload') assert len(down.cs_made) == 1 and down.cs_made[0].get_id() == 'a' * 20 c.got_message(dc, 'booga') assert down.m == [(down.cs_made[0], 'booga')] down.cs_made[0].send_message('booga 2') assert dc.m == ['booga 2'] c.connection_lost(dc) assert down.cs_lost == down.cs_made
e515f2d77bfcdfdf465f07113b3fb94b00f492ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4538/e515f2d77bfcdfdf465f07113b3fb94b00f492ad/Connecter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4412, 67, 7222, 67, 792, 67, 7222, 67, 1937, 13332, 731, 273, 28622, 5912, 1435, 2588, 273, 28622, 5912, 1435, 276, 273, 8289, 264, 12, 416, 16, 2588, 13, 425, 273, 28622, 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, 1842, 67, 4412, 67, 7222, 67, 792, 67, 7222, 67, 1937, 13332, 731, 273, 28622, 5912, 1435, 2588, 273, 28622, 5912, 1435, 276, 273, 8289, 264, 12, 416, 16, 2588, 13, 425, 273, 28622, 13...
ContStr = group("[rR]?'" + any(r'\\.', r"[^\n'\\]") + group("'", r'\\\r?\n'), '[rR]?"' + any(r'\\.', r'[^\n"\\]') + group('"', r'\\\r?\n'))
ContStr = group(r"[rR]?'[^\n'\\]*(?:\\.[^\n'\\]*)*" + group("'", r'\\\r?\n'), r'[rR]?"[^\n"\\]*(?:\\.[^\n"\\]*)*' + group('"', r'\\\r?\n'))
def maybe(*choices): return apply(group, choices) + '?'
4734c32e125db05ac02797e356644aada7f2fd70 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4734c32e125db05ac02797e356644aada7f2fd70/tokenize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6944, 30857, 11937, 4672, 327, 2230, 12, 1655, 16, 7246, 13, 397, 6787, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6944, 30857, 11937, 4672, 327, 2230, 12, 1655, 16, 7246, 13, 397, 6787, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
check(u'abc'.encode(codecname), 'abc') check(u'xdef'.encode(codecname), 'abcdef') check(u'defx'.encode(codecname), 'defabc') check(u'dxf'.encode(codecname), 'dabcf') check(u'dxfx'.encode(codecname), 'dabcfabc')
def test_encodex(self): self.assertEquals(u'abc'.encode(codecname), 'abc') self.assertEquals(u'xdef'.encode(codecname), 'abcdef') self.assertEquals(u'defx'.encode(codecname), 'defabc') self.assertEquals(u'dxf'.encode(codecname), 'dabcf') self.assertEquals(u'dxfx'.encode(codecname), 'dabcfabc')
def check(a, b): if a != b: print '*** check failed: %s != %s' % (repr(a), repr(b)) else: print '%s == %s: OK' % (a, b)
bb2734ab65970eba1d361932f12843799496d1ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bb2734ab65970eba1d361932f12843799496d1ea/test_charmapcodec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 69, 16, 324, 4672, 309, 279, 480, 324, 30, 1172, 296, 14465, 866, 2535, 30, 738, 87, 480, 738, 87, 11, 738, 261, 12715, 12, 69, 3631, 8480, 12, 70, 3719, 469, 30, 1172, 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, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 69, 16, 324, 4672, 309, 279, 480, 324, 30, 1172, 296, 14465, 866, 2535, 30, 738, 87, 480, 738, 87, 11, 738, 261, 12715, 12, 69, 3631, 8480, 12, 70, 3719, 469, 30, 1172, 19...
extraFiles = string.join(self.addToInputSandbox,';') if paramsDict.has_key('InputSandbox'):
extraFiles = string.join( self.addToInputSandbox, ';' ) if paramsDict.has_key( 'InputSandbox' ):
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,...
wx.PostEvent(self.tabsSplitter, wx.SizeEvent(self.tabsSplitter.GetSize()))
wx.PostEvent(self.tabsSplitter, wx.SizeEvent(self.tabsSplitter.GetSize()))
def __init__(self, parent, id, inspector, newMenu, componentPalette, app, palette): self._created = False self._init_ctrls(parent)
1a2a77a0ec629149cb4c0da2a67e163ec9f6e12c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/1a2a77a0ec629149cb4c0da2a67e163ec9f6e12c/Editor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 612, 16, 22700, 16, 394, 4599, 16, 1794, 25863, 16, 595, 16, 12127, 4672, 365, 6315, 4824, 273, 1083, 365, 6315, 2738, 67, 16277, 87, 12, 2938, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 612, 16, 22700, 16, 394, 4599, 16, 1794, 25863, 16, 595, 16, 12127, 4672, 365, 6315, 4824, 273, 1083, 365, 6315, 2738, 67, 16277, 87, 12, 2938, ...
print "Syntax Error:\n%s in %s at line %d, offset %d"%(str(se), se.filename, se.lineno, se.offset)+"\n(ToDo: Dialog)" if se.lineno<=tb.get_line_count(): new_place=tb.get_iter_at_line_offset(se.lineno-1,0) if se.offset<=new_place.get_chars_in_line(): new_place.set_line_offset(se.offset)
ln=se.lineno lo=se.offset if type(ln) is not types.IntType: ln=0 if type(lo) is not types.IntType: lo=0 print "Syntax Error:\n%s in %s at line %d, offset %d"%(str(se), se.filename, ln, lo)+"\n(ToDo: Dialog)" if ln>0 and ln<=tb.get_line_count(): new_place=tb.get_iter_at_line_offset(ln-1,0) if lo>0 and lo<=new_place.get_chars_in_line(): new_place.set_line_offset(lo)
def check_script(self, widget, data=None): if not self.editing_state: return 0 current_page=self.main_notebook.get_current_page() if not current_page in [0,1]: return 0 script=self.get_scripts()[current_page] try: compile(script, ("Experiment Script", "Result Script")[current_page], "exec") except SyntaxError, se: if current_page==0: tb=self.experiment_script_textbuffer tv=self.experiment_script_textview elif current_page==1: tb=self.data_handling_script_textbuffer tv=self.data_handling_script_textview print "Syntax Error:\n%s in %s at line %d, offset %d"%(str(se), se.filename, se.lineno, se.offset)+"\n(ToDo: Dialog)" if se.lineno<=tb.get_line_count(): new_place=tb.get_iter_at_line_offset(se.lineno-1,0) if se.offset<=new_place.get_chars_in_line(): new_place.set_line_offset(se.offset) tb.place_cursor(new_place) tv.scroll_to_iter(new_place, 0.2, False, 0,0) except Exception, e: print "Compilation Error:\n"+str(e)+"\n(ToDo: Dialog)"
fcbf9b6a09257e38835b91538b2fa92be7c5af1d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2646/fcbf9b6a09257e38835b91538b2fa92be7c5af1d/DamarisGUI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 4263, 12, 2890, 16, 3604, 16, 501, 33, 7036, 4672, 309, 486, 365, 18, 4619, 310, 67, 2019, 30, 327, 374, 225, 783, 67, 2433, 33, 2890, 18, 5254, 67, 24422, 18, 588, 67, 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, 866, 67, 4263, 12, 2890, 16, 3604, 16, 501, 33, 7036, 4672, 309, 486, 365, 18, 4619, 310, 67, 2019, 30, 327, 374, 225, 783, 67, 2433, 33, 2890, 18, 5254, 67, 24422, 18, 588, 67, 29...
if (OMIT.count("MILES")==0): WARNINGS.append("Miles audio not yet supported by makepanda") WARNINGS.append("I have automatically added this command-line option: --no-miles") OMIT.append("MILES")
def parseopts(args): global COMPILER,OPTIMIZE,OMIT,THIRDPARTY,INSTALLER,COPYEXTRAS,VERSION1,VERSION2,VERSION3,COMPRESSOR global DirectXSDK,VERBOSE longopts = [ "help","package-info","compiler=","directx-sdk=","thirdparty=", "optimize=","everything","nothing","installer","quiet","verbose", "complete","default","v1=","v2=","v3=","lzma"] anything = 0 for pkg in PACKAGES: longopts.append("no-"+pkg.lower()) for pkg in PACKAGES: longopts.append("use-"+pkg.lower()) try: opts, extras = getopt.getopt(args, "", longopts) for option,value in opts: if (option=="--help"): raise "usage" if (option=="--package-info"): raise "package-info" if (option=="--compiler"): COMPILER=value if (option=="--directx-sdk"): DirectXSDK=value if (option=="--thirdparty"): THIRDPARTY=value if (option=="--optimize"): OPTIMIZE=value if (option=="--quiet"): VERBOSE-=1 if (option=="--verbose"): VERBOSE+=1 if (option=="--installer"): INSTALLER=1 if (option=="--complete"): COMPLETE=1 if (option=="--everything"): OMIT=[] if (option=="--nothing"): OMIT=PACKAGES[:] if (option=="--v1"): VERSION1=int(value) if (option=="--v2"): VERSION2=int(value) if (option=="--v3"): VERSION3=int(value) if (option=="--lzma"): COMPRESSOR="lzma" for pkg in PACKAGES: if (option=="--use-"+pkg.lower()): if (OMIT.count(pkg)): OMIT.delete(pkg) for pkg in PACKAGES: if (option=="--no-"+pkg.lower()): if (OMIT.count(pkg)==0): OMIT.append(pkg) anything = 1 except "package-info": packageInfo() except: usage(0) if (anything==0): usage(0) if (OPTIMIZE=="1"): OPTIMIZE=1 elif (OPTIMIZE=="2"): OPTIMIZE=2 elif (OPTIMIZE=="3"): OPTIMIZE=3 elif (OPTIMIZE=="4"): OPTIMIZE=4 else: usage("Invalid setting for OPTIMIZE"); if (COMPILERS.count(COMPILER)==0): usage("Invalid setting for COMPILER: "+COMPILER);
aa9700942409f59dfc63d4542d0bad0a01230726 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/aa9700942409f59dfc63d4542d0bad0a01230726/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 4952, 12, 1968, 4672, 2552, 5423, 1102, 14668, 16, 15620, 3445, 15641, 16, 1872, 1285, 16, 2455, 7937, 40, 2778, 5538, 16, 28865, 654, 16, 24875, 22639, 55, 16, 5757, 21, 16, 5757,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 4952, 12, 1968, 4672, 2552, 5423, 1102, 14668, 16, 15620, 3445, 15641, 16, 1872, 1285, 16, 2455, 7937, 40, 2778, 5538, 16, 28865, 654, 16, 24875, 22639, 55, 16, 5757, 21, 16, 5757,...
self.struct = None
def _ok_or_preview(self, doneMsg=False): QApplication.setOverrideCursor( QCursor(Qt.WaitCursor) ) self.win.assy.current_command_info(cmdname = self.cmdname) #bruce 060616 try: self._build_struct() if doneMsg: env.history.message(self.cmd + self.done_msg()) self.struct = None except CadBug, e: env.history.message(redmsg("Bug in the CAD system: " + " - ".join(map(str, e.args)))) self.remove_struct() except PluginBug, e: env.history.message(redmsg("Bug in the plug-in: " + " - ".join(map(str, e.args)))) self.remove_struct() except UserError, e: env.history.message(redmsg("User error: " + " - ".join(map(str, e.args)))) self.remove_struct() except Exception, e: env.history.message(self.cmd + redmsg(" - ".join(map(str, e.args)))) self.remove_struct() QApplication.restoreOverrideCursor() # Restore the cursor self.win.win_update()
66962c42a595257b71ca8770ae89014c45e65f88 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/66962c42a595257b71ca8770ae89014c45e65f88/GeneratorBaseClass.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 601, 67, 280, 67, 12102, 12, 2890, 16, 2731, 3332, 33, 8381, 4672, 2238, 3208, 18, 542, 6618, 6688, 12, 2238, 6688, 12, 23310, 18, 5480, 6688, 13, 262, 365, 18, 8082, 18, 428, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 601, 67, 280, 67, 12102, 12, 2890, 16, 2731, 3332, 33, 8381, 4672, 2238, 3208, 18, 542, 6618, 6688, 12, 2238, 6688, 12, 23310, 18, 5480, 6688, 13, 262, 365, 18, 8082, 18, 428, 9...
return unicode(s, encoding)
if encoding: return unicode(s, encoding)
def really_unicode(s): try: return unicode(s) except UnicodeDecodeError: pass encoding = chardet.detect(s[:1024])['encoding'] try: return unicode(s, encoding) except UnicodeDecodeError: pass encoding = chardet.detect(s)['encoding'] try: return unicode(s, encoding) except UnicodeDecodeError: pass return unicode(repr(str(s)))[1:-1]
61c6e36083395cd9b01abd32ea843da31f8764f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1036/61c6e36083395cd9b01abd32ea843da31f8764f2/helpers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8654, 67, 9124, 12, 87, 4672, 775, 30, 327, 5252, 12, 87, 13, 1335, 26311, 30, 1342, 2688, 273, 462, 1060, 278, 18, 16518, 12, 87, 10531, 2163, 3247, 5717, 3292, 5999, 3546, 775, 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, 8654, 67, 9124, 12, 87, 4672, 775, 30, 327, 5252, 12, 87, 13, 1335, 26311, 30, 1342, 2688, 273, 462, 1060, 278, 18, 16518, 12, 87, 10531, 2163, 3247, 5717, 3292, 5999, 3546, 775, 30, ...
if on == 1 and sn != 2: return self._fix_nan(context) if sn == 1 and on != 2: return other._fix_nan(context)
if on == 1 and sn == 0: return self._fix(context) if sn == 1 and on == 0: return other._fix(context)
def max_mag(self, other, context=None): """Compares the values numerically with their sign ignored.""" other = _convert_other(other, raiseit=True)
20496fab6e0a86537543bcf9c27e44cbca2dc2df /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/20496fab6e0a86537543bcf9c27e44cbca2dc2df/decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 943, 67, 4527, 12, 2890, 16, 1308, 16, 819, 33, 7036, 4672, 3536, 19199, 326, 924, 6389, 1230, 598, 3675, 1573, 5455, 12123, 1308, 273, 389, 6283, 67, 3011, 12, 3011, 16, 1002, 305, 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, 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, 943, 67, 4527, 12, 2890, 16, 1308, 16, 819, 33, 7036, 4672, 3536, 19199, 326, 924, 6389, 1230, 598, 3675, 1573, 5455, 12123, 1308, 273, 389, 6283, 67, 3011, 12, 3011, 16, 1002, 305, 33...
if s != None: p.add_constraint( Sum( f_edge_used(s,u) for u in self.neighbors(s) ), max = 1, min = 1) if t != None: p.add_constraint( Sum( f_edge_used(t,u) for u in self.neighbors(t) ), max = 1, min = 1)
if s is not None: p.add_constraint( Sum(f_edge_used(s,u) for u in self.neighbors(s)), max=1, min=1) if t is not None: p.add_constraint( Sum(f_edge_used(t,u) for u in self.neighbors(t)), max=1, min=1)
def longest_path(self, s = None, t = None, weighted = False, algorithm = "MILP", solver = None, verbose = 0): r""" Returns a longest path of ``self``.
851087dd5fd3776eb2db10b18fb5402a16a5dd17 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/851087dd5fd3776eb2db10b18fb5402a16a5dd17/generic_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12163, 67, 803, 12, 2890, 16, 272, 273, 599, 16, 268, 273, 599, 16, 13747, 273, 1083, 16, 4886, 273, 315, 49, 2627, 52, 3113, 12776, 273, 599, 16, 3988, 273, 374, 4672, 436, 8395, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12163, 67, 803, 12, 2890, 16, 272, 273, 599, 16, 268, 273, 599, 16, 13747, 273, 1083, 16, 4886, 273, 315, 49, 2627, 52, 3113, 12776, 273, 599, 16, 3988, 273, 374, 4672, 436, 8395, 28...
if ordinal:
if ordinal is not None:
def encode(self, writer, taxonomy=None): """Encode a Field.
7dd12ee9f07dc53d89a72a3a0ab1646f5bb5e328 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14989/7dd12ee9f07dc53d89a72a3a0ab1646f5bb5e328/field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2017, 12, 2890, 16, 2633, 16, 9260, 33, 7036, 4672, 3536, 5509, 279, 2286, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2017, 12, 2890, 16, 2633, 16, 9260, 33, 7036, 4672, 3536, 5509, 279, 2286, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
vals = {'ref': '%s,%s' % (model, base_calendar_id2real_id(context['active_id']))}
ref = {'ref': '%s,%s' % (model, base_calendar_id2real_id(context['active_id']))}
def do_invite(self, cr, uid, ids, context={}): for att_id in ids: datas = self.read(cr, uid, att_id) model = False model_field = False if not context or not context.get('model'): return {} else: model = context.get('model') model_field = context.get('attendee_field', False) obj = self.pool.get(model) res_obj = obj.browse(cr, uid, context['active_id']) type = datas.get('type') att_obj = self.pool.get('calendar.attendee') vals = {} mail_to = [] if not model == 'calendar.attendee': vals = {'ref': '%s,%s' % (model, base_calendar_id2real_id(context['active_id']))} if type == 'internal': user_obj = self.pool.get('res.users') if not datas.get('user_ids'): raise osv.except_osv(_('Error!'), ("Please select any User")) for user_id in datas.get('user_ids'): user = user_obj.browse(cr, uid, user_id) vals.update({'user_id': user_id, 'email': user.address_id.email}) if user.address_id.email: mail_to.append(user.address_id.email) elif type == 'external' and datas.get('email'): vals.update({'email': datas['email']}) mail_to.append(datas['email']) elif type == 'partner': add_obj = self.pool.get('res.partner.address') for contact in add_obj.browse(cr, uid, datas['contact_ids']): vals.update({ 'partner_address_id': contact.id, 'email': contact.email}) if contact.email: mail_to.append(contact.email) if model == 'calendar.attendee': att = att_obj.browse(cr, uid, context['active_id']) vals.update({ 'parent_ids' : [(4, att.id)], 'ref': att.ref }) if datas.get('send_mail'): if not mail_to: name = map(lambda x: x[1], filter(lambda x: type==x[0], \ self._columns['type'].selection)) raise osv.except_osv(_('Error!'), ("%s must have an email \
4009482974533250261bd1f0321a448fb21804ca /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4009482974533250261bd1f0321a448fb21804ca/base_calendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 27154, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 364, 2403, 67, 350, 316, 3258, 30, 5386, 273, 365, 18, 896, 12, 3353, 16, 4555, 16, 2403, 67, 350, 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, 741, 67, 27154, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 364, 2403, 67, 350, 316, 3258, 30, 5386, 273, 365, 18, 896, 12, 3353, 16, 4555, 16, 2403, 67, 350, 13, ...
if not action.srcmodel_id: obj_pool = self.pool.get(action.model_id.model) obj_pool.write(cr, uid, [context.get('active_id')], res)
if not action.record_id: if not action.srcmodel_id: obj_pool = self.pool.get(action.model_id.model) obj_pool.write(cr, uid, [context.get('active_id')], res) else: obj_pool = self.pool.get(action.srcmodel_id.model) obj_pool.write(cr, uid, [context.get('active_id')], res)
def run(self, cr, uid, ids, context={}): logger = netsvc.Logger() for action in self.browse(cr, uid, ids, context): if action.state=='client_action': if not action.action_id: raise osv.except_osv(_('Error'), _("Please specify an action to launch !")) return self.pool.get(action.action_id.type).read(cr, uid, action.action_id.id, context=context) if action.state=='python': localdict = { 'self': self.pool.get(action.model_id.model), 'context': context, 'time': time, 'ids': ids, 'cr': cr, 'uid': uid } exec action.code in localdict if 'action' in localdict: return localdict['action']
aad22a8b35cb123b868e793f94d990cad9ee98b2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12853/aad22a8b35cb123b868e793f94d990cad9ee98b2/ir_actions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 1194, 273, 21954, 4227, 18, 3328, 1435, 364, 1301, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 16, 819, 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, 1086, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 1194, 273, 21954, 4227, 18, 3328, 1435, 364, 1301, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 16, 819, 4672,...
(res, other, warning, translate, data_id, res_id) = \ process_liness(self, datas, [], current_module, self._name, fields_def)
(res, position, warning, res_id) = \ process_liness(self, datas, [], current_module, self._name, fields_def, position=position)
fields_def = self.fields_get(cr, uid, context=context)
efd0cb9412db0c0bcc806b9b089c26c097a70bff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/efd0cb9412db0c0bcc806b9b089c26c097a70bff/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1466, 67, 536, 273, 365, 18, 2821, 67, 588, 12, 3353, 16, 4555, 16, 819, 33, 2472, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1466, 67, 536, 273, 365, 18, 2821, 67, 588, 12, 3353, 16, 4555, 16, 819, 33, 2472, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self.assertTrue(u.fp.fp._sock.gettimeout() is None)
self.assertTrue(u.fp.fp.raw._sock.gettimeout() is None)
def test_ftp_basic(self): u = urllib2.urlopen("ftp://ftp.mirror.nl/pub/mirror/gnu/") self.assertTrue(u.fp.fp._sock.gettimeout() is None)
c0404d239db124170a2e3b3718f475f022680f09 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/c0404d239db124170a2e3b3718f475f022680f09/test_urllib2net.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 11727, 67, 13240, 12, 2890, 4672, 582, 273, 11527, 22, 18, 295, 18589, 2932, 11727, 2207, 11727, 18, 27197, 18, 14039, 19, 10174, 19, 27197, 19, 1600, 89, 4898, 13, 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, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 11727, 67, 13240, 12, 2890, 4672, 582, 273, 11527, 22, 18, 295, 18589, 2932, 11727, 2207, 11727, 18, 27197, 18, 14039, 19, 10174, 19, 27197, 19, 1600, 89, 4898, 13, 365, 18, ...
class URLMinibuffer(CompletionMinibuffer):
class OpenFileGUI(SelectAction): alias = "gui-find-file" name = "&File..." tooltip = "Open a file" icon = "icons/folder_page.png" default_menu = (("File/Open", 2), 1) key_bindings = {'default': "C-O", 'emacs': "C-X C-S-F" } def action(self, index=-1, multiplier=1): wildcard="*" cwd=self.frame.cwd() dlg = wx.FileDialog( self.frame, message="Open File", defaultDir=cwd, defaultFile="", wildcard=wildcard, style=wx.OPEN) if dlg.ShowModal() == wx.ID_OK: paths = dlg.GetPaths() for path in paths: assert self.dprint("open file %s:" % path) self.frame.open("file:%s" % path) dlg.Destroy() class LocalFileMinibuffer(CompletionMinibuffer):
def action(self, index=-1, multiplier=1): self.frame.open("about:untitled")
005e02b9d41fe64146b671aaaac7bf0745ff5434 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11522/005e02b9d41fe64146b671aaaac7bf0745ff5434/mainmenu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 12, 2890, 16, 770, 29711, 21, 16, 15027, 33, 21, 4672, 365, 18, 3789, 18, 3190, 2932, 21071, 30, 10032, 305, 1259, 7923, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 12, 2890, 16, 770, 29711, 21, 16, 15027, 33, 21, 4672, 365, 18, 3789, 18, 3190, 2932, 21071, 30, 10032, 305, 1259, 7923, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
elif is_on_path("sbcl"):
if is_on_path("sbcl"):
def cl_detect(): if is_on_path("clisp"): return "clisp" elif is_on_path("lisp"): if is_on_path("cmuclinvoke.sh"): return "cmuclinvoke.sh" elif is_on_path("sbcl"): if is_on_path("sbclinvoke.sh"): return "sbclinvoke.sh" return None
d07178870bb75e174ae61212bef34ec7ff16c614 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/d07178870bb75e174ae61212bef34ec7ff16c614/test_cltrans.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 927, 67, 16518, 13332, 309, 353, 67, 265, 67, 803, 2932, 830, 23831, 6, 4672, 327, 315, 830, 23831, 6, 1327, 353, 67, 265, 67, 803, 2932, 80, 23831, 6, 4672, 309, 353, 67, 265, 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, 927, 67, 16518, 13332, 309, 353, 67, 265, 67, 803, 2932, 830, 23831, 6, 4672, 327, 315, 830, 23831, 6, 1327, 353, 67, 265, 67, 803, 2932, 80, 23831, 6, 4672, 309, 353, 67, 265, 67, ...
real_price = get_real_price(price_unit_res, product.id, pricelist)
real_price = get_real_price(price_unit_res, product.id, qty, uom, pricelist)
def get_real_price(res_dict, product_id, pricelist): item_obj = self.pool.get('product.pricelist.item') price_type_obj = self.pool.get('product.price.type') product_obj = self.pool.get('product.product') template_obj = self.pool.get('product.template') field_name = 'list_price'
95124a4a3f5b4124e6d6fd7b365643e639e0c5f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/95124a4a3f5b4124e6d6fd7b365643e639e0c5f7/product_visible_discount.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7688, 67, 8694, 12, 455, 67, 1576, 16, 3017, 67, 350, 16, 846, 335, 5449, 4672, 761, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 5896, 18, 683, 335, 5449, 18, 1726, 6134, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7688, 67, 8694, 12, 455, 67, 1576, 16, 3017, 67, 350, 16, 846, 335, 5449, 4672, 761, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 5896, 18, 683, 335, 5449, 18, 1726, 6134, ...
self.file.write(odelim + line)
self.__write(odelim + line)
def read_lines_to_outerboundary(self): """Internal: read lines until outerboundary.""" next = "--" + self.outerboundary last = next + "--" delim = "" while 1: line = self.fp.readline() if not line: self.done = -1 break if line[:2] == "--": strippedline = line.strip() if strippedline == next: break if strippedline == last: self.done = 1 break odelim = delim if line[-2:] == "\r\n": delim = "\r\n" line = line[:-2] elif line[-1] == "\n": delim = "\n" line = line[:-1] else: delim = "" self.file.write(odelim + line)
9f92bf9e5f618782db742393dbb8c7738b9d372c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9f92bf9e5f618782db742393dbb8c7738b9d372c/cgi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 3548, 67, 869, 67, 14068, 16604, 12, 2890, 4672, 3536, 3061, 30, 855, 2362, 3180, 6390, 16604, 12123, 1024, 273, 26306, 397, 365, 18, 14068, 16604, 1142, 273, 1024, 397, 26306, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 3548, 67, 869, 67, 14068, 16604, 12, 2890, 4672, 3536, 3061, 30, 855, 2362, 3180, 6390, 16604, 12123, 1024, 273, 26306, 397, 365, 18, 14068, 16604, 1142, 273, 1024, 397, 26306, ...
True if the page except for language links and category links has less than 4 characters, False otherwise. Can raise the same exceptions as get()
True if the page has less than 4 characters, except for language links and category links, False otherwise. Can raise the same exceptions as get()
def isEmpty(self): """ True if the page except for language links and category links has less than 4 characters, False otherwise. Can raise the same exceptions as get() """ txt = self.get() txt = removeLanguageLinks(txt) txt = removeCategoryLinks(txt, site = self.site()) if len(txt) < 4: return True else: return False
9713dd7c3d5b4f48fcbbf8a43b2c252a090bfd62 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/9713dd7c3d5b4f48fcbbf8a43b2c252a090bfd62/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2709, 12, 2890, 4672, 3536, 1053, 309, 326, 1363, 711, 5242, 2353, 1059, 3949, 16, 1335, 364, 2653, 4716, 471, 3150, 4716, 16, 1083, 3541, 18, 4480, 1002, 326, 1967, 4798, 487, 336, 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, 2709, 12, 2890, 4672, 3536, 1053, 309, 326, 1363, 711, 5242, 2353, 1059, 3949, 16, 1335, 364, 2653, 4716, 471, 3150, 4716, 16, 1083, 3541, 18, 4480, 1002, 326, 1967, 4798, 487, 336, 1435...
args = ex.args()
args = ex.operands()
def derivative(self, ex, operator): """ EXAMPLES::
a40a41a9fdcee3d12fe2d15c4194f860cf9d6d3f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/a40a41a9fdcee3d12fe2d15c4194f860cf9d6d3f/expression_conversions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16417, 12, 2890, 16, 431, 16, 3726, 4672, 3536, 5675, 8900, 11386, 2866, 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, 16417, 12, 2890, 16, 431, 16, 3726, 4672, 3536, 5675, 8900, 11386, 2866, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
r""" Moebius (or M\"obius) function $\mu(n)$. INPUT: n -- positive integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A008683;a Moebius function mu(n). sage: a(0) Traceback (most recent call last): ... ValueError: input n (=0) must be a positive integer sage: a(2) -1 sage: a(12) 0 sage: a.list(12) [1, -1, -1, 0, -1, 1, -1, 0, 0, 1, -1, 0] AUTHOR: -- Jaap Spies (2007-01-13) """ def __init__(self):
def __init__(self): r""" Moebius (or M\"obius) function $\mu(n)$. INPUT: n -- positive integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A008683;a Moebius function mu(n). sage: a(0) Traceback (most recent call last): ... ValueError: input n (=0) must be a positive integer sage: a(2) -1 sage: a(12) 0 sage: a.list(12) [1, -1, -1, 0, -1, 1, -1, 0, 0, 1, -1, 0] AUTHOR: -- Jaap Spies (2007-01-13) """
def _eval(self, n): return arith.sigma(n,2)
d2510d4232e17c9cea8d1a0271c6be68a81d317b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/d2510d4232e17c9cea8d1a0271c6be68a81d317b/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 327, 225, 419, 483, 18, 13201, 12, 82, 16, 22, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 327, 225, 419, 483, 18, 13201, 12, 82, 16, 22, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
start_script = \ " cd %s/lib/python%s/site-packages/openerp-server\n\ exec %s ./openerp-server.py $@\n" % (sys.prefix, py_short_version, sys.executable) f = open('openerp-server', 'w') f.write(start_script) f.close()
class openerp_server_install(install): def run(self): start_script = " f = open('openerp-server', 'w') f.write(start_script) f.close() install.run(self)
def data_files(): '''Build list of data files to be installed''' files = [] if os.name == 'nt': os.chdir('bin') for (dp,dn,names) in os.walk('addons'): files.append((dp, map(lambda x: opj('bin', dp, x), names))) for (dp,dn,names) in os.walk('i18n'): files.append((dp, map(lambda x: opj('bin', dp, x), names))) os.chdir('..') for (dp,dn,names) in os.walk('doc'): files.append((dp, map(lambda x: opj(dp, x), names))) files.append(('.', [('bin/import_xml.rng')])) else: man_directory = opj('share', 'man') files.append((opj(man_directory, 'man1'), ['man/openerp-server.1'])) files.append((opj(man_directory, 'man5'), ['man/openerp_serverrc.5'])) doc_directory = opj('share', 'doc', 'openerp-server-%s' % version) files.append((doc_directory, [f for f in glob.glob('doc/*') if os.path.isfile(f)])) files.append((opj(doc_directory, 'migrate', '3.3.0-3.4.0'), [f for f in glob.glob('doc/migrate/3.3.0-3.4.0/*') if os.path.isfile(f)])) files.append((opj(doc_directory, 'migrate', '3.4.0-4.0.0'), [f for f in glob.glob('doc/migrate/3.4.0-4.0.0/*') if os.path.isfile(f)])) openerp_site_packages = opj('lib', 'python%s' % py_short_version, 'site-packages', 'openerp-server') files.append((opj(openerp_site_packages, 'i18n'), glob.glob('bin/i18n/*'))) files.append((opj(openerp_site_packages, 'addons', 'custom'), glob.glob('bin/addons/custom/*xml') + glob.glob('bin/addons/custom/*rml') + glob.glob('bin/addons/custom/*xsl'))) files.append((openerp_site_packages, [('bin/import_xml.rng')])) for addon in find_addons(): add_path = addon.replace('.', os.path.sep).replace('openerp-server', 'bin', 1) addon_path = opj('lib', 'python%s' % py_short_version, 'site-packages', add_path.replace('bin', 'openerp-server', 1)) pathfiles = [ ( addon_path, glob.glob(opj(add_path, '*xml')) + glob.glob(opj(add_path, '*csv')) + glob.glob(opj(add_path, '*sql')) ), ( opj(addon_path, 'data'), glob.glob(opj(add_path, 'data', '*xml')) ), ( opj(addon_path, 'report'), glob.glob(opj(add_path, 'report', '*xml')) + glob.glob(opj(add_path, 'report', '*rml')) + glob.glob(opj(add_path, 'report', '*sxw')) + glob.glob(opj(add_path, 'report', '*xsl')) ), ( opj(addon_path, 'security'), glob.glob(opj(add_path, 'security', '*csv')) + glob.glob(opj(add_path, 'security', '*xml')) ), ( opj(addon_path, 'rng'), glob.glob(opj(add_path, 'rng', '*rng')) ) ] files.extend(pathfiles) return files
5495baea3dc5e179db8264c282c87982dfddd5f7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12853/5495baea3dc5e179db8264c282c87982dfddd5f7/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 67, 2354, 13332, 9163, 3116, 666, 434, 501, 1390, 358, 506, 5876, 26418, 1390, 273, 5378, 309, 1140, 18, 529, 422, 296, 496, 4278, 1140, 18, 343, 1214, 2668, 4757, 6134, 364, 261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 67, 2354, 13332, 9163, 3116, 666, 434, 501, 1390, 358, 506, 5876, 26418, 1390, 273, 5378, 309, 1140, 18, 529, 422, 296, 496, 4278, 1140, 18, 343, 1214, 2668, 4757, 6134, 364, 261, ...
STR_C = 0x0001 STR_PASCAL = 0x0002 STR_LEN2 = 0x0004 STR_UNICODE = 0x0008 STR_LEN4 = 0x0010 STR_ULEN2 = 0x0020 STR_ULEN4 = 0x0040
STR_C = 0x0001 """C-style ASCII string""" STR_PASCAL = 0x0002 """Pascal-style ASCII string (length byte)""" STR_LEN2 = 0x0004 """Pascal-style, length is 2 bytes""" STR_UNICODE = 0x0008 """Unicode string""" STR_LEN4 = 0x0010 """Pascal-style, length is 4 bytes""" STR_ULEN2 = 0x0020 """Pascal-style Unicode, length is 2 bytes""" STR_ULEN4 = 0x0040 """Pascal-style Unicode, length is 4 bytes"""
def __str__(self): return idc.GetString(self.ea, self.length, self.type)
15a72289f7818b9af9e54703db7915ed66e0e427 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4773/15a72289f7818b9af9e54703db7915ed66e0e427/idautils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 612, 71, 18, 967, 780, 12, 2890, 18, 24852, 16, 365, 18, 2469, 16, 365, 18, 723, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 612, 71, 18, 967, 780, 12, 2890, 18, 24852, 16, 365, 18, 2469, 16, 365, 18, 723, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
retval = self.client.checkin(paths, log_message, recurse, keep_locks)
kwargs = {"keep_locks": keep_locks} try: kwargs["depth"] = (recurse and pysvn.depth.infinity or pysvn.depth.empty) except AttributeError: kwargs["recurse"] = recurse retval = self.client.checkin(paths, log_message, **kwargs)
def commit(self, paths, log_message="", recurse=True, keep_locks=False): """ Commit a list of files to the repository.
c0a5725d5c16e369013f4d3a2300d0d3e6a3e29e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5119/c0a5725d5c16e369013f4d3a2300d0d3e6a3e29e/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3294, 12, 2890, 16, 2953, 16, 613, 67, 2150, 1546, 3113, 11502, 33, 5510, 16, 3455, 67, 23581, 33, 8381, 4672, 3536, 10269, 279, 666, 434, 1390, 358, 326, 3352, 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, 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, 3294, 12, 2890, 16, 2953, 16, 613, 67, 2150, 1546, 3113, 11502, 33, 5510, 16, 3455, 67, 23581, 33, 8381, 4672, 3536, 10269, 279, 666, 434, 1390, 358, 326, 3352, 18, 2, -100, -100, -100...
defaultName = 'wx.PyWizardPage'
defaultName = 'wx.wizard.PyWizardPage'
\tdef GetPrev(self):
b69356508054fc9760f797ebed8c2603130041bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/b69356508054fc9760f797ebed8c2603130041bb/wxPythonEditorModels.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 521, 88, 536, 968, 9958, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 521, 88, 536, 968, 9958, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
autoremovalnames += catalog[catalogname]['autoremoveitems']
autoremovalnames += catalog[catalogname]['autoremoveitems']
def getAutoRemovalItems(installinfo, cataloglist): ''' Gets a list of items marked for automatic removal from the catalogs in cataloglist. Filters those against items in the managed_installs list, which should contain everything that is supposed to be installed. ''' autoremovalnames = [] for catalogname in cataloglist: if catalogname in catalog.keys(): autoremovalnames += catalog[catalogname]['autoremoveitems'] #print "Managed Installs: ", installinfo.get('managed_installs',[]) already_processed_names = [item['name'] for item in installinfo.get('managed_installs',[])] #print "Removals: ", installinfo.get('removals',[]) already_processed_names += [item['manifestitem'] for item in installinfo.get('removals',[])] autoremovalnames = [item for item in autoremovalnames if item not in already_processed_names] #print "Auto removal names: ", autoremovalnames return autoremovalnames
7c6102dd5d667ac7c01daba22c0efac542777ce2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6241/7c6102dd5d667ac7c01daba22c0efac542777ce2/updatecheck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26707, 24543, 3126, 12, 5425, 1376, 16, 6222, 1098, 4672, 9163, 11881, 279, 666, 434, 1516, 9350, 364, 5859, 14817, 628, 326, 26455, 316, 6222, 1098, 18, 14475, 5348, 5314, 1516, 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, 26707, 24543, 3126, 12, 5425, 1376, 16, 6222, 1098, 4672, 9163, 11881, 279, 666, 434, 1516, 9350, 364, 5859, 14817, 628, 326, 26455, 316, 6222, 1098, 18, 14475, 5348, 5314, 1516, 316, 326,...
valss['journal_id'] = data['journal_id']
vals['journal_id'] = data['journal_id']
def get_in(self, cr, uid, ids, context=None): """ Create the entry of statement in journal. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param context: A standard dictionary @return :Return of operation of product """ statement_obj = self.pool.get('account.bank.statement') res_obj = self.pool.get('res.users') product_obj = self.pool.get('product.product') bank_statement = self.pool.get('account.bank.statement.line') for data in self.read(cr, uid, ids, context=context): vals = {} curr_company = res_obj.browse(cr, uid, uid, context=context).company_id.id statement_id = statement_obj.search(cr, uid, [('journal_id', '=', data['journal_id']), ('company_id', '=', curr_company), ('user_id', '=', uid), ('state', '=', 'open')], context=context) if not statement_id: raise osv.except_osv(_('Error !'), _('You have to open at least one cashbox'))
dab7efb97727fff7fae12b3c0a1c66195c0bbae6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/dab7efb97727fff7fae12b3c0a1c66195c0bbae6/pos_box_entries.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 267, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 3536, 1788, 326, 1241, 434, 3021, 316, 13001, 18, 632, 891, 365, 30, 1021, 733, 4407, 18, 632, 891, 442...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 267, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 3536, 1788, 326, 1241, 434, 3021, 316, 13001, 18, 632, 891, 365, 30, 1021, 733, 4407, 18, 632, 891, 442...
"""Run the specified startup target in the current thread"""
""" Run the specified startup target in the current thread """
def invokeTarget(self, target): """Run the specified startup target in the current thread""" target(self)
a4177140d86f97bf70e8b70ed3ab5654fb939104 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/a4177140d86f97bf70e8b70ed3ab5654fb939104/startup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4356, 2326, 12, 2890, 16, 1018, 4672, 3536, 1939, 326, 1269, 11850, 1018, 316, 326, 783, 2650, 3536, 1018, 12, 2890, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4356, 2326, 12, 2890, 16, 1018, 4672, 3536, 1939, 326, 1269, 11850, 1018, 316, 326, 783, 2650, 3536, 1018, 12, 2890, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
s.sendmail(email_from, email_to + email_cc + email_bcc, msg.as_string())
s.sendmail(email_from, flatten([email_to, email_cc, email_bcc]), msg.as_string())
def email_send(email_from, email_to, subject, body, email_cc=None, email_bcc=None, on_error=False, reply_to=False, tinycrm=False): """Send an email.""" if not email_cc: email_cc=[] if not email_bcc: email_bcc=[] import smtplib from email.MIMEText import MIMEText from email.MIMEMultipart import MIMEMultipart from email.Header import Header from email.Utils import formatdate, COMMASPACE msg = MIMEText(body or '', _charset='utf-8') msg['Subject'] = Header(subject.decode('utf8'), 'utf-8') msg['From'] = email_from del msg['Reply-To'] if reply_to: msg['Reply-To'] = msg['From']+', '+reply_to msg['To'] = COMMASPACE.join(email_to) if email_cc: msg['Cc'] = COMMASPACE.join(email_cc) if email_bcc: msg['Bcc'] = COMMASPACE.join(email_bcc) msg['Date'] = formatdate(localtime=True) if tinycrm: msg['Message-Id'] = '<'+str(time.time())+'-tinycrm-'+str(tinycrm)+'@'+socket.gethostname()+'>' try: s = smtplib.SMTP() s.connect(config['smtp_server']) if config['smtp_user'] or config['smtp_password']: s.login(config['smtp_user'], config['smtp_password']) s.sendmail(email_from, email_to + email_cc + email_bcc, msg.as_string()) s.quit() except Exception, e: import logging logging.getLogger().info(str(e)) return True
1fc4cef247429c3f70264dafbdacfad7a1b426f4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12853/1fc4cef247429c3f70264dafbdacfad7a1b426f4/misc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2699, 67, 4661, 12, 3652, 67, 2080, 16, 2699, 67, 869, 16, 3221, 16, 1417, 16, 2699, 67, 952, 33, 7036, 16, 2699, 67, 31345, 33, 7036, 16, 603, 67, 1636, 33, 8381, 16, 4332, 67, 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, 2699, 67, 4661, 12, 3652, 67, 2080, 16, 2699, 67, 869, 16, 3221, 16, 1417, 16, 2699, 67, 952, 33, 7036, 16, 2699, 67, 31345, 33, 7036, 16, 603, 67, 1636, 33, 8381, 16, 4332, 67, 86...
curpath = '.'
curpath = os.curdir
def cmd_auto_find(argv, path_to_tx): "Automatically identify translation files." """ This command goes through all files in this directory and its subdirectories and tries to find matches to the expression given. The expression should contain '<lang>' to identify the language, or, if the --regex option is defined, should be a full regular expression. By default, the command will print `set_source_file` and `set_translation` commands, which you can examine and run manually. If --execute is specified, the commands will be executed. """ usage="usage: %prog [tx_options] auto_find -r <resource> -l <language> [options] '<expression>'" description=("Walk through all files in subdirectories for files matching " "<expression> and auto-associate them with a language. You may " "use the keyword '<lang>' in your expression to signify the language " "locale, for example: 'po/<lang>.po'. Alternatively, you may use a " "full-powered regular expression with --regex.") parser = OptionParser(usage=usage, description=description) # Mandatory parser.add_option("-r","--resource", action="store", dest="resource_slug", default=None, help="Specify resource name") # Optional parser.add_option("-e","--execute", action="store_true", dest="execute", default=False, help="Execute the commands instead of just printing them.") parser.add_option("-E","--regex", action="store_true", dest="regex", default=False, help="Set if the expression is a POSIX regex.") parser.add_option("-l","--language", action="store", dest="slang", default="en", help="The language of the source file (default: 'en')") parser.add_option("-n","--no-source", action="store_true", dest="nosource", default=False, help="Disable searching for a source file.") (options, args) = parser.parse_args(argv) resource = options.resource_slug source_language = options.slang execute = options.execute if not resource: parser.error("Please specify a resource.") if len(args) != 1: parser.error("Please specify an expression.") expr = args[0] expr_re = '.*%s.*' % expr if not options.regex: # Force expr to be a valid regex expr (escaped) but keep <lang> intact expr_re = re.escape(expr) expr_re = re.sub(r"\\<lang\\>", '<lang>', expr_re) expr_re = re.sub(r"<lang>", '(?P<lang>[^/]+)', '.*%s$' % expr_re) expr_rec = re.compile(expr_re) # The path everything will be relative to curpath = '.' if not execute: utils.MSG("Only printing the commands which will be run if the " "--execute switch is specified.") # First, let's construct a dictionary of all matching files. # Note: Only the last matching file of a language will be stored. source_file = None translation_files = {} for root, dirs, files in os.walk(curpath): for f in files: f_path = os.path.join(root, f) match = expr_rec.match(f_path) if match: lang = match.group('lang') if lang == source_language: source_file = f_path else: translation_files[lang] = f_path # The set_source_file commands needs to be handled first. # If source file search is enabled, go ahead and find it: if not options.nosource: if not source_file: parser.error(
2e83b390e6793bc34d93f68c35b18cdbd4f1187d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11326/2e83b390e6793bc34d93f68c35b18cdbd4f1187d/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1797, 67, 6079, 67, 4720, 12, 19485, 16, 589, 67, 869, 67, 978, 4672, 315, 31910, 9786, 4794, 1390, 1199, 225, 3536, 1220, 1296, 13998, 3059, 777, 1390, 316, 333, 1867, 471, 2097, 31220,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1797, 67, 6079, 67, 4720, 12, 19485, 16, 589, 67, 869, 67, 978, 4672, 315, 31910, 9786, 4794, 1390, 1199, 225, 3536, 1220, 1296, 13998, 3059, 777, 1390, 316, 333, 1867, 471, 2097, 31220,...
WINDOWS_MAIN_MEM = WINDOWS_CARD_A_MEM = ['PB602', 'PB902']
WINDOWS_MAIN_MEM = WINDOWS_CARD_A_MEM = ['PB602', 'PB603', 'PB902']
def can_handle(cls, dev, debug=False): return dev[3] == 'Elonex' and dev[4] == 'eBook'
6931d463d4219327ddd1d14eee8c401e52f75150 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/6931d463d4219327ddd1d14eee8c401e52f75150/driver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 848, 67, 4110, 12, 6429, 16, 4461, 16, 1198, 33, 8381, 4672, 327, 4461, 63, 23, 65, 422, 296, 4958, 265, 338, 11, 471, 4461, 63, 24, 65, 422, 296, 73, 9084, 11, 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, 848, 67, 4110, 12, 6429, 16, 4461, 16, 1198, 33, 8381, 4672, 327, 4461, 63, 23, 65, 422, 296, 4958, 265, 338, 11, 471, 4461, 63, 24, 65, 422, 296, 73, 9084, 11, 2, -100, -100, -100...
if songs: self.playList.setSongs(songs) self.playerEngine.setPlayList(songs) self.playerEngine.playIndex() FConfiguration().savedPlayList = songs
self.playList.setSongs(songs) self.playerEngine.setPlayList(songs) self.playerEngine.playIndex() FConfiguration().savedPlayList = songs
def onSelectDirectoryRow(self, widget, event): #left double click if is_double_click(event): selection = widget.get_selection() model, selected = selection.get_selected() if selected: name = model.get_value(selected, DirectoryList.POS_NAME) path = model.get_value(selected, DirectoryList.POS_PATH) type = model.get_value(selected, DirectoryList.POS_TYPE) if type == DirectoryList.TYPE_FILE: print "type", type song = Song(name, path, Song.TYPE_FILE) self.playList.setSongs([song]) self.playerEngine.setPlayList([song]) self.playerEngine.playIndex() elif type == DirectoryList.TYPE_FOLDER: print "type", type songs = self.directoryList.getAllSongsByDirectory(path) if songs: self.playList.setSongs(songs) self.playerEngine.setPlayList(songs) self.playerEngine.playIndex() FConfiguration().savedPlayList = songs else: print "type", type song = Song(name, path, Song.TYPE_URL) self.playerEngine.stopState() self.playList.setSongs([song]) self.playerEngine.setPlayList([song]) self.playerEngine.playIndex() self.playerEngine.playState()
d18b7c737d6cde87b020bf158868e1bfa6e989b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14563/d18b7c737d6cde87b020bf158868e1bfa6e989b1/foobnix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 3391, 2853, 1999, 12, 2890, 16, 3604, 16, 871, 4672, 468, 4482, 1645, 4682, 309, 353, 67, 9056, 67, 7475, 12, 2575, 4672, 225, 4421, 273, 3604, 18, 588, 67, 10705, 1435, 938, 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, 603, 3391, 2853, 1999, 12, 2890, 16, 3604, 16, 871, 4672, 468, 4482, 1645, 4682, 309, 353, 67, 9056, 67, 7475, 12, 2575, 4672, 225, 4421, 273, 3604, 18, 588, 67, 10705, 1435, 938, 16, ...
Let's get the maps as well:
Let's get the maps as well::
def composite_fields(self, other, names=None, both_maps=False, preserve_embedding=True): """ List of all possible composite number fields formed from self and other, as well as possibly embeddings into the compositum. See the documentation for both_maps below.
2aebed6fc49cc7755aa4327f8a8d992d698ca838 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/2aebed6fc49cc7755aa4327f8a8d992d698ca838/number_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9635, 67, 2821, 12, 2890, 16, 1308, 16, 1257, 33, 7036, 16, 3937, 67, 10711, 33, 8381, 16, 9420, 67, 23744, 33, 5510, 4672, 3536, 987, 434, 777, 3323, 9635, 1300, 1466, 20010, 628, 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, 9635, 67, 2821, 12, 2890, 16, 1308, 16, 1257, 33, 7036, 16, 3937, 67, 10711, 33, 8381, 16, 9420, 67, 23744, 33, 5510, 4672, 3536, 987, 434, 777, 3323, 9635, 1300, 1466, 20010, 628, 365...
value = {
value = {
def open_wiki_page(self, cr, uid, ids, context):
f60ec8bc68c45657c8ab2fca93a3a6b01de0f75a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f60ec8bc68c45657c8ab2fca93a3a6b01de0f75a/wiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 13044, 67, 2433, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 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, ...
[ 1, 1, 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, 1696, 67, 13044, 67, 2433, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if tt=='' or tt == 'machine' or tt == 'default' or tt == 'macdef': if toplevel == 'macdef': break elif login and password:
if (tt=='' or tt == 'machine' or tt == 'default' or tt =='macdef'): if login and password:
# Look for a machine, default, or macdef top-level keyword
366a1df7f1a940a77d2d3b8ac6425fe7353f43c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/366a1df7f1a940a77d2d3b8ac6425fe7353f43c6/netrc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 10176, 364, 279, 5228, 16, 805, 16, 578, 5318, 536, 1760, 17, 2815, 4932, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 10176, 364, 279, 5228, 16, 805, 16, 578, 5318, 536, 1760, 17, 2815, 4932, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
sal_tax_parent = mod_obj._get_id(cr, uid, 'account', 'vat_code_base_sales')
sal_tax_parent = mod_obj._get_id(cr, uid, 'account', 'tax_code_base_sales')
def execute(self, cr, uid, ids, context=None): if context is None: context = {} super(account_installer, self).execute(cr, uid, ids, context=context) record = self.browse(cr, uid, ids, context=context)[0] company_id = self.pool.get('res.users').browse(cr, uid, [uid], context)[0].company_id for res in self.read(cr, uid, ids): if record.charts == 'configurable': mod_obj = self.pool.get('ir.model.data') fp = tools.file_open(opj('account','configurable_account_chart.xml')) tools.convert_xml_import(cr, 'account', fp, {}, 'init',True, None) fp.close() self.generate_configurable_chart(cr, uid, ids, context=context) obj_tax = self.pool.get('account.tax') obj_product = self.pool.get('product.product') ir_values = self.pool.get('ir.values') s_tax = (res.get('sale_tax',0.0))/100 p_tax = (res.get('purchase_tax',0.0))/100 tax_val = {} default_tax = []
3ac06a178ac1b3e9a98090f621c16012c5ba4454 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/3ac06a178ac1b3e9a98090f621c16012c5ba4454/installer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 309, 819, 353, 599, 30, 819, 273, 2618, 2240, 12, 4631, 67, 20163, 16, 365, 2934, 8837, 12, 3353, 16, 4555, 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, 1836, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 309, 819, 353, 599, 30, 819, 273, 2618, 2240, 12, 4631, 67, 20163, 16, 365, 2934, 8837, 12, 3353, 16, 4555, 16,...
return range(1, (self.results.count / self.results.rows + 2))
return range(1, int(ceil(float(self.results.count) / self.results.rows) + 1))
def page_range(self): return range(1, (self.results.count / self.results.rows + 2))
b40c63ecba2c285257c9983d7d256d45f82308c0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3331/b40c63ecba2c285257c9983d7d256d45f82308c0/paginator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1363, 67, 3676, 12, 2890, 4672, 327, 1048, 12, 21, 16, 509, 12, 311, 330, 12, 5659, 12, 2890, 18, 4717, 18, 1883, 13, 342, 365, 18, 4717, 18, 3870, 13, 397, 404, 3719, 225, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1363, 67, 3676, 12, 2890, 4672, 327, 1048, 12, 21, 16, 509, 12, 311, 330, 12, 5659, 12, 2890, 18, 4717, 18, 1883, 13, 342, 365, 18, 4717, 18, 3870, 13, 397, 404, 3719, 225, 2, -100...
"""Return the time of the file, if valid. Otherwise, -1.""" return File_time(self) if self.obj else -1
"""Return the last modification time of the file, if valid.""" return File_time(self)
def time(self): """Return the time of the file, if valid. Otherwise, -1.""" return File_time(self) if self.obj else -1
ee81737e7facd5c47077ebba89c462bc1ecd3835 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11986/ee81737e7facd5c47077ebba89c462bc1ecd3835/cindex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 813, 12, 2890, 4672, 3536, 990, 326, 813, 434, 326, 585, 16, 309, 923, 18, 5272, 16, 300, 21, 12123, 327, 1387, 67, 957, 12, 2890, 13, 309, 365, 18, 2603, 469, 300, 21, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 813, 12, 2890, 4672, 3536, 990, 326, 813, 434, 326, 585, 16, 309, 923, 18, 5272, 16, 300, 21, 12123, 327, 1387, 67, 957, 12, 2890, 13, 309, 365, 18, 2603, 469, 300, 21, 2, -100, -1...
class ProcessTable(DBTable): tableName = lsctables.ProcessTable.tableName validcolumns = lsctables.ProcessTable.validcolumns constraints = lsctables.ProcessTable.constraints next_id = lsctables.ProcessTable.next_id RowType = lsctables.ProcessTable.RowType how_to_index = lsctables.ProcessTable.how_to_index def get_ids_by_program(self, program): """ Return a set of the process IDs from rows whose program string equals the given program. """ return set(id for (id,) in self.cursor.execute("SELECT process_id FROM process WHERE program == ?", (program,)))
def applyKeyMapping(self): """ Used as the second half of the key reassignment algorithm. Loops over each row in the table, replacing references to old row keys with the new values from the _idmap_ table. """ assignments = ", ".join("%s = (SELECT new FROM _idmap_ WHERE old == %s)" % (colname, colname) for coltype, colname in zip(self.dbcolumntypes, self.dbcolumnnames) if coltype in ligolwtypes.IDTypes and (self.next_id is None or colname != self.next_id.column_name)) if assignments: # SQLite documentation says ROWID is monotonically # increasing starting at 1 for the first row unless # it ever wraps around, then it is randomly # assigned. ROWID is a 64 bit integer, so the only # way it will wrap is if somebody sets it to a very # high number manually. This library does not do # that, so I don't bother checking. self.cursor.execute("UPDATE %s SET %s WHERE ROWID > %d" % (self.dbtablename, assignments, self.last_maxrowid)) self.last_maxrowid = self.maxrowid() or 0
d52d52cf911b80586b72ec1d9f62df78ed48e11a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3589/d52d52cf911b80586b72ec1d9f62df78ed48e11a/dbtables.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 653, 3233, 12, 2890, 4672, 3536, 10286, 487, 326, 2205, 8816, 434, 326, 498, 283, 12960, 4886, 18, 3176, 4473, 1879, 1517, 1027, 316, 326, 1014, 16, 13993, 5351, 358, 1592, 1027, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 653, 3233, 12, 2890, 4672, 3536, 10286, 487, 326, 2205, 8816, 434, 326, 498, 283, 12960, 4886, 18, 3176, 4473, 1879, 1517, 1027, 316, 326, 1014, 16, 13993, 5351, 358, 1592, 1027, 1...
Private implementation of search() method, allowing specifying the uid to use for the access right check.
Private implementation of search() method, allowing specifying the uid to use for the access right check.
def _search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False, access_rights_uid=None): """ Private implementation of search() method, allowing specifying the uid to use for the access right check. This is useful for example when filling in the selection list for a drop-down and avoiding access rights errors, by specifying ``access_rights_uid=1`` to bypass access rights check, but not ir.rules! :param access_rights_uid: optional user ID to use when checking access rights (not for ir.rules, this is only for ir.model.access) """ raise NotImplementedError(_('The search method is not implemented on this object !'))
baaf9e4490dca16d8a8a66d81b525984f67c6493 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/baaf9e4490dca16d8a8a66d81b525984f67c6493/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3072, 12, 2890, 16, 4422, 16, 729, 16, 833, 16, 1384, 33, 20, 16, 1800, 33, 7036, 16, 1353, 33, 7036, 16, 819, 33, 7036, 16, 1056, 33, 8381, 16, 2006, 67, 23700, 67, 1911, 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, 389, 3072, 12, 2890, 16, 4422, 16, 729, 16, 833, 16, 1384, 33, 20, 16, 1800, 33, 7036, 16, 1353, 33, 7036, 16, 819, 33, 7036, 16, 1056, 33, 8381, 16, 2006, 67, 23700, 67, 1911, 33,...
self.shift_pressed = (modifiers & key.MOD_SHIFT) self.ctrl_pressed = (modifiers & key.MOD_CTRL) self.alt_pressed = (modifiers & key.MOD_ALT)
self.shift_pressed = bool(modifiers & key.MOD_SHIFT) self.ctrl_pressed = bool(modifiers & key.MOD_CTRL) self.alt_pressed = bool(modifiers & key.MOD_ALT)
def __init__(self, x, y, dx=0, dy=0, buttons=None, modifiers=None, scroll_x=0, scroll_y=0): """ **buttons** is a list of buttons """ self.x = x self.y = y self.dx = dx self.dy = dy self.modifiers = modifiers self.buttons = buttons self.scroll_x = scroll_x self.scroll_y = scroll_y if modifiers is not None: self.shift_pressed = (modifiers & key.MOD_SHIFT) self.ctrl_pressed = (modifiers & key.MOD_CTRL) self.alt_pressed = (modifiers & key.MOD_ALT) else: self.shift_pressed = self.ctrl_pressed = self.alt_pressed = False return
c3ace548ce0fac0ab278c7cec88143137d42e8ad /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13166/c3ace548ce0fac0ab278c7cec88143137d42e8ad/window.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 619, 16, 677, 16, 6633, 33, 20, 16, 7732, 33, 20, 16, 9502, 33, 7036, 16, 10429, 33, 7036, 16, 5532, 67, 92, 33, 20, 16, 5532, 67, 93, 33, 20, 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, 1001, 2738, 972, 12, 2890, 16, 619, 16, 677, 16, 6633, 33, 20, 16, 7732, 33, 20, 16, 9502, 33, 7036, 16, 10429, 33, 7036, 16, 5532, 67, 92, 33, 20, 16, 5532, 67, 93, 33, 20, 4672...
with private names and those defined in other modules. + C.__doc__ for all classes C in M.__dict__.values(), except those with private names and those defined in other modules.
defined in other modules. + C.__doc__ for all classes C in M.__dict__.values(), except those defined in other modules.
def _test(): import doctest, M # replace M with your module's name return doctest.testmod(M) # ditto
69ea6631db2503d0aa159a5cd267f7e1a492a14a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/69ea6631db2503d0aa159a5cd267f7e1a492a14a/doctest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 13332, 1930, 31263, 395, 16, 490, 6647, 468, 1453, 490, 598, 3433, 1605, 1807, 508, 327, 31263, 395, 18, 3813, 1711, 12, 49, 13, 282, 468, 302, 305, 869, 225, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 13332, 1930, 31263, 395, 16, 490, 6647, 468, 1453, 490, 598, 3433, 1605, 1807, 508, 327, 31263, 395, 18, 3813, 1711, 12, 49, 13, 282, 468, 302, 305, 869, 225, 2, -100, -100,...
pass
if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] elif type(self.include_dirs) is StringType: self.include_dirs = string.split(self.include_dirs, os.pathsep) if self.libraries is None: self.libraries = [] elif type(self.libraries) is StringType: self.libraries = [self.libraries] if self.library_dirs is None: self.library_dirs = [] elif type(self.library_dirs) is StringType: self.library_dirs = string.split(self.library_dirs, os.pathsep)
def finalize_options (self): pass
a74a60185abdc1b7a7bd28405049473f357b5fc8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a74a60185abdc1b7a7bd28405049473f357b5fc8/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12409, 67, 2116, 261, 2890, 4672, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 12409, 67, 2116, 261, 2890, 4672, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
list = [] items = [] jid = str(request.getTo()) if self._handlers.has_key(jid): for each in self._handlers[jid].keys(): items.append((jid,each)) for each in self._handlers[''].keys(): items.append(('',each)) if items != []: for each in items: i = self._handlers[each[0]][each[1]]['disco'](conn,request,'list') if i != None: list.append(Node(tag='item',attrs={'jid':i[0],'node':i[1],'name':i[2]})) iq = request.buildReply('result') iq.setQueryPayload(list) conn.send(iq) else: conn.send(Error(request,ERR_ITEM_NOT_FOUND)) raise NodeProcessed
if typ == 'items': list = [] items = [] jid = str(request.getTo()) if self._handlers.has_key(jid): for each in self._handlers[jid].keys(): items.append((jid,each)) for each in self._handlers[''].keys(): items.append(('',each)) if items != []: for each in items: i = self._handlers[each[0]][each[1]]['disco'](conn,request,'list') if i != None: list.append(Node(tag='item',attrs={'jid':i[0],'node':i[1],'name':i[2]})) iq = request.buildReply('result') iq.setQueryPayload(list) conn.send(iq) else: conn.send(Error(request,ERR_ITEM_NOT_FOUND)) raise NodeProcessed elif typ == 'info': return {'ids':[],'features':[]}
def _DiscoHandler(self,conn,request,typ): """The internal method to process service discovery requests""" # This is the disco manager handler. # We must: # Generate a list of commands and return the list # * This handler does not handle individual commands disco requests. # Pseudo: # Enumerate the 'item' disco of each command for the specified jid # Build responce and send # To make this code easy to write we add an 'list' disco type, it returns a tuple or 'none' if not advertised list = [] items = [] jid = str(request.getTo()) # Get specific jid based results if self._handlers.has_key(jid): for each in self._handlers[jid].keys(): items.append((jid,each)) # Get generic results for each in self._handlers[''].keys(): items.append(('',each)) if items != []: for each in items: i = self._handlers[each[0]][each[1]]['disco'](conn,request,'list') if i != None: list.append(Node(tag='item',attrs={'jid':i[0],'node':i[1],'name':i[2]})) iq = request.buildReply('result') iq.setQueryPayload(list) conn.send(iq) else: conn.send(Error(request,ERR_ITEM_NOT_FOUND)) raise NodeProcessed
4cc75b8bb77c2e922fbd171921b4dde774b9e960 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7194/4cc75b8bb77c2e922fbd171921b4dde774b9e960/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1669, 2894, 1503, 12, 2890, 16, 4646, 16, 2293, 16, 12846, 4672, 3536, 1986, 2713, 707, 358, 1207, 1156, 11030, 3285, 8395, 468, 1220, 353, 326, 1015, 2894, 3301, 1838, 18, 468, 166...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1669, 2894, 1503, 12, 2890, 16, 4646, 16, 2293, 16, 12846, 4672, 3536, 1986, 2713, 707, 358, 1207, 1156, 11030, 3285, 8395, 468, 1220, 353, 326, 1015, 2894, 3301, 1838, 18, 468, 166...
result = getProxyInfo(payloadProxy) if not result['OK']: return result pilotProxy = result['Value']['path']
def submitJob(self,executableFile,jdl,proxy,localID): """ Method to submit job, should be overridden in sub-class. """ self.log.verbose('Setting up proxy for payload') result = self.writeProxyToFile(proxy) if not result['OK']: return result
1ba35e121d5087d2aa2d8b93b8de601860b4491f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/1ba35e121d5087d2aa2d8b93b8de601860b4491f/InProcessComputingElement.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4879, 2278, 12, 2890, 16, 17751, 812, 16, 78, 5761, 16, 5656, 16, 3729, 734, 4672, 3536, 2985, 358, 4879, 1719, 16, 1410, 506, 11000, 316, 720, 17, 1106, 18, 3536, 365, 18, 1330, 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, 4879, 2278, 12, 2890, 16, 17751, 812, 16, 78, 5761, 16, 5656, 16, 3729, 734, 4672, 3536, 2985, 358, 4879, 1719, 16, 1410, 506, 11000, 316, 720, 17, 1106, 18, 3536, 365, 18, 1330, 18, ...
if sys.version < '2.2':
if get_python_version() < '2.2':
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 sys.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)
4d70440b2a4ed0d0a7bca14040503f01edcfffd0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/4d70440b2a4ed0d0a7bca14040503f01edcfffd0/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, 1140, 18, 1397, 1214, 469, 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, 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, 1140, 18, 1397, 1214, 469, 30, ...
def run_once(self, args_list = ''): if len(args_list) != 0:
def run_once(self, args_list=''): if args_list:
def run_once(self, args_list = ''): if len(args_list) != 0: args = args_list else: args = '--mode rotate'
5be36a40346aa37f38195c9e395db61c8793e00a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10349/5be36a40346aa37f38195c9e395db61c8793e00a/scrashme.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 8243, 12, 2890, 16, 833, 67, 1098, 2218, 11, 4672, 309, 833, 67, 1098, 30, 833, 273, 833, 67, 1098, 469, 30, 833, 273, 3534, 3188, 8534, 11, 2, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 8243, 12, 2890, 16, 833, 67, 1098, 2218, 11, 4672, 309, 833, 67, 1098, 30, 833, 273, 833, 67, 1098, 469, 30, 833, 273, 3534, 3188, 8534, 11, 2, -100, -100, -100, -100, -100...
a1 = array(a)
a1 = array(a)
def eigh(a,lower=1,eigvals_only=0,overwrite_a=0): """ Solve real symmetric or complex hermitian eigenvalue problem. Inputs: a -- A hermitian N x N matrix. lower -- values in a are read from lower triangle [1: UPLO='L' (default) / 0: UPLO='U'] eigvals_only -- don't compute eigenvectors. overwrite_a -- content of a may be destroyed Outputs: w,v -- w: eigenvalues, v: eigenvectors [for eigvals_only == False] w -- eigenvalues [for eigvals_only == True (default)]. Definitions: a * v[:,i] = w[i] * vr[:,i] v.H * v = identity """ if eigvals_only or overwrite_a: a1 = asarray_chkfinite(a) overwrite_a = overwrite_a or (_datanotshared(a1,a)) else: a1 = array(a) if (a1.dtype.char in typecodes['AllFloat']) and not isfinite(a1).all(): raise ValueError, "array must not contain infs or NaNs" overwrite_a = 1 if len(a1.shape) != 2 or a1.shape[0] != a1.shape[1]: raise ValueError, 'expected square matrix' if a1.dtype.char in 'FD': heev, = get_lapack_funcs(('heev',),(a1,)) if heev.module_name[:7] == 'flapack': lwork = calc_lwork.heev(heev.prefix,a1.shape[0],lower) w,v,info = heev(a1,lwork = lwork, compute_v = not eigvals_only, lower = lower, overwrite_a = overwrite_a) else: # 'clapack' w,v,info = heev(a1, compute_v = not eigvals_only, lower = lower, overwrite_a = overwrite_a) if info<0: raise ValueError,\ 'illegal value in %-th argument of internal heev'%(-info) if info>0: raise LinAlgError,"eig algorithm did not converge" else: # a1.dtype.char in 'fd': syev, = get_lapack_funcs(('syev',),(a1,)) if syev.module_name[:7] == 'flapack': lwork = calc_lwork.syev(syev.prefix,a1.shape[0],lower) w,v,info = syev(a1,lwork = lwork, compute_v = not eigvals_only, lower = lower, overwrite_a = overwrite_a) else: # 'clapack' w,v,info = syev(a1, compute_v = not eigvals_only, lower = lower, overwrite_a = overwrite_a) if info<0: raise ValueError,\ 'illegal value in %-th argument of internal syev'%(-info) if info>0: raise LinAlgError,"eig algorithm did not converge" if eigvals_only: return w return w, v
cd400c1c2f5100b19fcf298f15e60d171a9932cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/cd400c1c2f5100b19fcf298f15e60d171a9932cb/decomp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 425, 2031, 12, 69, 16, 8167, 33, 21, 16, 22663, 4524, 67, 3700, 33, 20, 16, 19274, 67, 69, 33, 20, 4672, 3536, 348, 5390, 2863, 15108, 578, 7233, 366, 1035, 305, 2779, 16719, 1132, 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, 425, 2031, 12, 69, 16, 8167, 33, 21, 16, 22663, 4524, 67, 3700, 33, 20, 16, 19274, 67, 69, 33, 20, 4672, 3536, 348, 5390, 2863, 15108, 578, 7233, 366, 1035, 305, 2779, 16719, 1132, 6...
return 'CAST(%s AS %s)' % (column, type)
if sqlite_version >= 30203: return 'CAST(%s AS %s)' % (column, type) elif type == 'int': return '1*' + column else: return column
def cast(self, column, type): return 'CAST(%s AS %s)' % (column, type)
958206034c28c6beb675d6058d12dd6945d8b1fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/958206034c28c6beb675d6058d12dd6945d8b1fd/sqlite_backend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4812, 12, 2890, 16, 1057, 16, 618, 4672, 327, 296, 21871, 9275, 87, 5355, 738, 87, 2506, 738, 261, 2827, 16, 618, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4812, 12, 2890, 16, 1057, 16, 618, 4672, 327, 296, 21871, 9275, 87, 5355, 738, 87, 2506, 738, 261, 2827, 16, 618, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
('/b/OL1M', '/b/OL1M/fake')
(u'/b/OL1M', u'/b/OL1M/fake')
>>> def fake_get_object(key): return fakes[key]
350b3c7c6ebaa34f67f7f02d0c90659464ff5032 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3913/350b3c7c6ebaa34f67f7f02d0c90659464ff5032/processors.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 10517, 67, 588, 67, 1612, 12, 856, 4672, 327, 284, 3223, 63, 856, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 10517, 67, 588, 67, 1612, 12, 856, 4672, 327, 284, 3223, 63, 856, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
allmatches = re.findall("\\b" + word + "\\w+", searchtext )
allmatches = re.findall("\\b" + re.escape(word) + "\\w+", searchtext )
def matches(self, word, range): if TabCompletionPlugin.classprefs.allOpenDocs: #search after keyword in all open documents #TODO: make allOpenDocs a settings alternative #TODO: only add textbuffers to bufferlist searchtext = "" bufferlist = BufferList.getBuffers() for i in bufferlist: if not i.permanent: searchtext = searchtext + i.stc.GetText() + "\n" else: searchtext = self.mode.GetText() allmatches = re.findall("\\b" + word + "\\w+", searchtext ) allmatches.append(self.word(range)) allmatches = set(allmatches) allmatches = list(allmatches) allmatches.sort() return allmatches
adefe88f59355a31f386c67ce6bc06413c2835bd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11522/adefe88f59355a31f386c67ce6bc06413c2835bd/tab_wordcompletion.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1885, 12, 2890, 16, 2076, 16, 1048, 4672, 309, 9483, 11238, 3773, 18, 1106, 1484, 2556, 18, 454, 3678, 12656, 30, 468, 3072, 1839, 4932, 316, 777, 1696, 7429, 468, 6241, 30, 1221, 777, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1885, 12, 2890, 16, 2076, 16, 1048, 4672, 309, 9483, 11238, 3773, 18, 1106, 1484, 2556, 18, 454, 3678, 12656, 30, 468, 3072, 1839, 4932, 316, 777, 1696, 7429, 468, 6241, 30, 1221, 777, ...
print >> outfile, actions_views
if actions_views: print >> outfile, actions_views
def generateArchetypesClass(self, element, **kw): """this is the all singing all dancing core generator logic for a full featured Archetypes class """ log.info("%sGenerating class '%s'.", ' '*self.infoind, element.getName())
52ebe1916529d8eafce3d423b9cf178d4480a8c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11941/52ebe1916529d8eafce3d423b9cf178d4480a8c3/ArchetypesGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 12269, 15180, 797, 12, 2890, 16, 930, 16, 2826, 9987, 4672, 3536, 2211, 353, 326, 777, 4864, 310, 777, 302, 304, 2822, 2922, 4456, 4058, 364, 279, 1983, 2572, 72, 16959, 15180, 667...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12269, 15180, 797, 12, 2890, 16, 930, 16, 2826, 9987, 4672, 3536, 2211, 353, 326, 777, 4864, 310, 777, 302, 304, 2822, 2922, 4456, 4058, 364, 279, 1983, 2572, 72, 16959, 15180, 667...
origins.append([sx[i]/dar[0], center[1], center[2]])
origins.append([sx[i], center[1], center[2]])
def _add_slices(self, item, sgrid, contours=False): cvector = item.get('cvector') center = sgrid.GetCenter() dar = self._axis.get('daspect') sx, sy, sz = item.get('slices') if len(shape(sx)) == 2 and shape(sx) == shape(sy) == shape(sz): s = Surface(sx,sy,sz) sgrid2 = self._get_2d_structured_grid(s) plane = vtk.vtkStructuredGridGeometryFilter() plane.SetInput(sgrid2) plane.Update() data = self._cut_data(plane) implds = vtk.vtkImplicitDataSet() implds.SetDataSet(data.GetOutput()) implds.Modified() cut = vtk.vtkCutter() cut.SetInput(sgrid) cut.SetCutFunction(implds) cut.GenerateValues(10, -2,2) cut.GenerateCutScalarsOn() cut.Update() mapper = vtk.vtkPolyDataMapper() mapper.SetInput(cut.GetOutput()) mapper.SetLookupTable(self._axis._vtk_colormap) caxis = self._axis.get('caxis') if None in caxis: caxis = data.GetOutput().GetScalarRange() mapper.SetScalarRange(caxis) mapper.Update() actor = vtk.vtkActor() actor.SetMapper(mapper) self._set_shading(item, data, actor) self._set_actor_properties(item, actor) self._axis._renderer.AddActor(actor) self._axis._vtk_apd.AddInput(cut.GetOutput()) self._axis._vtk_apd.AddInput(data.GetOutput()) else: origins = [] normals = [] sx = ravel(sx)/dar[0] sy = ravel(sy)/dar[1] sz = ravel(sz)/dar[2] for i in range(len(sx)): normals.append([1,0,0]) origins.append([sx[i]/dar[0], center[1], center[2]]) for i in range(len(sy)): normals.append([0,1,0]) origins.append([center[0], sy[i]/dar[1], center[2]]) for i in range(len(sz)): normals.append([0,0,1]) origins.append([center[0], center[1], sz[i]/dar[2]]) for i in range(len(normals)): plane = vtk.vtkPlane() plane.SetOrigin(origins[i]) plane.SetNormal(normals[i]) cut = vtk.vtkCutter() cut.SetInput(sgrid) cut.SetCutFunction(plane) cut.Update() data = self._cut_data(cut) mapper = vtk.vtkPolyDataMapper() if contours: iso = vtk.vtkContourFilter() iso.SetInput(data.GetOutput()) if cvector is not None: for i in range(len(cvector)): iso.SetValue(i, cvector[i]) else: zmin, zmax = data.GetOutput().GetScalarRange() iso.GenerateValues(item.get('clevels'), zmin, zmax) iso.Update() mapper.SetInput(iso.GetOutput()) else: mapper.SetInput(data.GetOutput()) mapper.SetLookupTable(self._axis._vtk_colormap) caxis = self._axis.get('caxis') if None in caxis: caxis = sgrid.GetScalarRange() mapper.SetScalarRange(caxis) mapper.Update() actor = vtk.vtkActor() actor.SetMapper(mapper) if not contours: self._set_shading(item, data, actor) self._set_actor_properties(item, actor) self._axis._renderer.AddActor(actor) self._axis._vtk_apd.AddInput(cut.GetOutput())
8c9ac01e2abd6033fd126340689a7f8bfe3e4050 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4727/8c9ac01e2abd6033fd126340689a7f8bfe3e4050/vtk_.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 67, 21562, 12, 2890, 16, 761, 16, 272, 5222, 16, 28109, 33, 8381, 4672, 276, 7737, 273, 761, 18, 588, 2668, 71, 7737, 6134, 4617, 273, 272, 5222, 18, 967, 8449, 1435, 302, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1289, 67, 21562, 12, 2890, 16, 761, 16, 272, 5222, 16, 28109, 33, 8381, 4672, 276, 7737, 273, 761, 18, 588, 2668, 71, 7737, 6134, 4617, 273, 272, 5222, 18, 967, 8449, 1435, 302, ...
if isinstance(source, unicode) and fixedAttrtrans: xmllib.attrtrans = originalAttrtrans
def _generateTree(source): """Given some XML source, generates a lightweight DOM tree rooted at a `_RootNode`.""" # Fix xmllib if necessary. if isinstance(source, unicode) and fixedAttrtrans: originalAttrtrans = xmllib.attrtrans xmllib.attrtrans = fixedAttrtrans # Lots of HTML files start with a DOCTYPE declaration like this: # <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> # The fact that the DTD URL is missing is deliberate - it acts as a hint # to the browser that it should emulate historical browser behaviour. It # also breaks xmllib, so we see whether we can spot it here and cope. doctypeRE = r'(?i)^(\s*<!DOCTYPE\s+HTML\s+PUBLIC\s+"[^"]+"\s*>)' match = re.search(doctypeRE, source) if match: source = source[match.end():] doctype = match.group(1) else: doctype = '' # Another hack for HTML: the DOCTYPE usually gives HTML (in upper case) # as the root tag name, but xmllib will complain if you then use <html> # (lowercase) for the tag. We fix up the DOCTYPE here if it looks like # that's the case. rootRE = r'(?i)^\s*<!DOCTYPE\s+([-a-z0-9._:]+)\s+[^<]{1,200}<(\1)' match = re.search(rootRE, source) if match and match.group(1) != match.group(2): source = source[:match.start(1)] + match.group(2) + \ source[match.end(1):] # Parse the XML and generate the tree. g = _TreeGenerator() g.feed(source) g.close() # Put xmllib back again. if isinstance(source, unicode) and fixedAttrtrans: xmllib.attrtrans = originalAttrtrans # Get the tree and put the DOCTYPE back in if we hacked it out above. tree = g.getTree() if doctype: tree.children.insert(0, _TextNode(doctype)) # Return the tree. return tree
95117ab14b92f368778b02fa24ac3de99678e63d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/95117ab14b92f368778b02fa24ac3de99678e63d/PyMeldLite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7163, 2471, 12, 3168, 4672, 3536, 6083, 2690, 3167, 1084, 16, 6026, 279, 9052, 4865, 4703, 2151, 1365, 329, 622, 279, 1375, 67, 29658, 68, 12123, 225, 468, 12139, 2025, 2941, 309, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7163, 2471, 12, 3168, 4672, 3536, 6083, 2690, 3167, 1084, 16, 6026, 279, 9052, 4865, 4703, 2151, 1365, 329, 622, 279, 1375, 67, 29658, 68, 12123, 225, 468, 12139, 2025, 2941, 309, 4...
if options.unitSuite and (not failed or options.noStop): if runUnitSuite(options): failed = True if options.funcSuite and (not failed or options.noStop): if runFuncTest(options): failed = True if options.func and (not failed or options.noStop): if runFuncTestsSingly(options): failed = True if options.recorded and (not failed or options.noStop): if runRecordedScripts(options): failed = True if options.perf and (not failed or options.noStop): if runPerfTests(options): failed = True if len(failedTests) > 0: log('+-' * 32) log('The following tests failed:') log('\n'.join(failedTests)) log('')
if options.funcSuite and (not failed or options.noStop): if runFuncTest(options): failed = True if options.func and (not failed or options.noStop): if runFuncTestsSingly(options): failed = True if options.recorded and (not failed or options.noStop): if runRecordedScripts(options): failed = True if options.perf and (not failed or options.noStop): if runPerfTests(options): failed = True if len(failedTests) > 0: log('+-' * 32) log('The following tests failed:') log('\n'.join(failedTests)) log('')
def main(options): """ >>> options = parseOptions() >>> options.dryrun = True >>> options.verbose = True >>> main(options) False Try and run a test that does not exist >>> options.single = 'TestFoo.py' >>> main(options) Test(s) not found False Try different single tests single unit test: >>> options.single = 'TestCrypto' >>> main(options) /.../RunPython... application/tests/TestCrypto.py -v - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + False unit test and functional test: >>> options.single = 'TestCrypto,TestSharing' >>> main(options) /.../RunChandler... --create --catch=tests --profileDir=test_profile --parcelPath=tools/QATestScripts/DataFiles --chandlerTests=TestSharing -D2 -M0 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /.../RunPython... application/tests/TestCrypto.py -v - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + False unit, functional and two perf tests, one of which is a startup test: >>> options.single = 'TestCrypto,TestSharing,PerfImportCalendar,startup_large' >>> main(options) /.../RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/QATestScripts/DataFiles --catsPerfLog=test_profile/time.log --scriptFile=tools/QATestScripts/Performance/PerfImportCalendar.py --create PerfImportCalendar.py 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 /.../RunChandler... --create --catch=tests --profileDir=test_profile --parcelPath=tools/QATestScripts/DataFiles --chandlerTests=TestSharing -D2 -M0 ... /.../RunPython... application/tests/TestCrypto.py -v ... Creating repository for startup time tests ... Startup_with_large_calendar ... ... False Try and specify an invalid mode >>> options.single = '' >>> options.mode = 'foo' >>> main(options) foo removed from mode list False Run unit tests with --dryrun >>> options.mode = None >>> options.unit = True >>> main(options) /.../RunPython... .../tests/TestReferenceAttributes.py -v ... /.../RunPython... setup.py test -v ... False Run unitSuite with --dryrun >>> options.mode = None >>> options.unit = False >>> options.unitSuite = True >>> main(options) /.../RunPython... tools/run_tests.py -v application i18n osaf repository - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + False Run functional tests with --dryrun >>> options.unit = False >>> options.unitSuite = False >>> options.funcSuite = True >>> main(options) /.../RunChandler... --create --catch=tests --profileDir=test_profile --parcelPath=tools/QATestScripts/DataFiles --scriptFile=tools/cats/Functional/FunctionalTestSuite.py -D2 -M0 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + False Run functional tests each in its on process >>> options.funcSuite = False >>> options.func = True >>> main(options) /.../RunChandler... --create --catch=tests --profileDir=test_profile --parcelPath=tools/QATestScripts/DataFiles --chandlerTests=TestCreateAccounts -D2 -M0 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + ... False Run performance tests with --dryrun >>> options.func = False >>> options.perf = True >>> options.profile = False >>> main(options) /.../RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/QATestScripts/DataFiles --catsPerfLog=test_profile/time.log --scriptFile=tools/QATestScripts/Performance/PerfImportCalendar.py --create PerfImportCalendar.py ... ... /.../RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/QATestScripts/DataFiles --catsPerfLog=test_profile/time.log --scriptFile=tools/QATestScripts/Performance/PerfLargeDataResizeCalendar.py --restore=test_profile/__repository__.001 PerfLargeDataResizeCalendar.py ... ... Creating repository for startup time tests ... Startup ... ... False """ checkOptions(options) if options.mode is None: options.modes = modes = ['release', 'debug'] # silently clear any missing modes if default list is specified for mode in modes: if not os.path.isdir(os.path.join(options.chandlerBin, mode)): options.modes.remove(mode) else: options.mode = options.mode.strip().lower() options.modes = [ options.mode ] # complain about any missing modes if mode was explicitly stated if not os.path.isdir(os.path.join(options.chandlerBin, options.mode)): options.modes.remove(options.mode) log('%s removed from mode list' % options.mode) failed = False try: # Empty the log file so that we won't be confused by old results later f = open(os.path.join(options.profileDir, 'chandler.log'), 'w') f.close() except IOError: pass # Remove old perf log files (we leave the the latest) for f in glob.glob(os.path.join(options.profileDir, '*.log.*')): try: os.remove(f) except OSError: pass if options.single: failed = runSingles(options) else: if options.unit: failed = runUnitTests(options) if not failed or options.noStop: if runPluginTests(options): failed = True if options.unitSuite and (not failed or options.noStop): if runUnitSuite(options): failed = True if options.funcSuite and (not failed or options.noStop): if runFuncTest(options): failed = True if options.func and (not failed or options.noStop): if runFuncTestsSingly(options): failed = True if options.recorded and (not failed or options.noStop): if runRecordedScripts(options): failed = True if options.perf and (not failed or options.noStop): if runPerfTests(options): failed = True if len(failedTests) > 0: log('+-' * 32) log('The following tests failed:') log('\n'.join(failedTests)) log('') return failed
7803508a297b00980b5e6aa0745b3705d83b3d3b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/7803508a297b00980b5e6aa0745b3705d83b3d3b/rt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2116, 4672, 3536, 4080, 702, 273, 1109, 1320, 1435, 4080, 702, 18, 25011, 2681, 225, 273, 1053, 4080, 702, 18, 11369, 273, 1053, 4080, 2774, 12, 2116, 13, 1083, 225, 6161, 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, 2774, 12, 2116, 4672, 3536, 4080, 702, 273, 1109, 1320, 1435, 4080, 702, 18, 25011, 2681, 225, 273, 1053, 4080, 702, 18, 11369, 273, 1053, 4080, 2774, 12, 2116, 13, 1083, 225, 6161, 471,...
def add_func(col): if self.engine.has_table(reftable.name): reftable.drop() reftable.create()
if self.engine.has_table(reftable.name): reftable.drop() reftable.create() def add_func(col):
def add_func(col): # create FK's target if self.engine.has_table(reftable.name): reftable.drop() reftable.create() self.table.append_column(col) return create_column(col.name,self.table)
483546fee200356da8d8500ed912a4ef33d0e876 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9035/483546fee200356da8d8500ed912a4ef33d0e876/test_changeset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 644, 12, 1293, 4672, 468, 752, 478, 47, 1807, 1018, 309, 365, 18, 8944, 18, 5332, 67, 2121, 12, 266, 1222, 429, 18, 529, 4672, 283, 1222, 429, 18, 7285, 1435, 283, 1222, 429...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 644, 12, 1293, 4672, 468, 752, 478, 47, 1807, 1018, 309, 365, 18, 8944, 18, 5332, 67, 2121, 12, 266, 1222, 429, 18, 529, 4672, 283, 1222, 429, 18, 7285, 1435, 283, 1222, 429...
print "synthetic S Pick deleted"
msg = "synthetic S Pick deleted" appendTextview(self.textviewStdOut, msg)
def delSsynth(self): try: del self.dicts[self.stPt]['Ssynth'] print "synthetic S Pick deleted" except: pass
4e8f536428831ce605c623aa5fc17a6b33b5b712 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10346/4e8f536428831ce605c623aa5fc17a6b33b5b712/obspyck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1464, 55, 11982, 451, 12, 2890, 4672, 775, 30, 1464, 365, 18, 16287, 63, 2890, 18, 334, 16484, 23962, 55, 11982, 451, 3546, 1234, 273, 315, 11982, 16466, 348, 23038, 4282, 6, 714, 1528, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1464, 55, 11982, 451, 12, 2890, 4672, 775, 30, 1464, 365, 18, 16287, 63, 2890, 18, 334, 16484, 23962, 55, 11982, 451, 3546, 1234, 273, 315, 11982, 16466, 348, 23038, 4282, 6, 714, 1528, ...
""" if n == 0: return _("download complete!") return _("finishing in %s") % (str(Duration(n))) """
def fmttime(n): """ if n == 0: return _("download complete!") return _("finishing in %s") % (str(Duration(n))) """ if n == 0: return 'complete!' try: n = int(n) assert n >= 0 and n < 5184000 # 60 days except: return '<unknown>' m, s = divmod(n, 60) h, m = divmod(m, 60) d, h = divmod(h, 24) if d > 0: return '%dd %02d:%02d:%02d' % (d, h, m, s) else: return '%02d:%02d:%02d' % (h, m, s)
20742370d1a08cc5f982b88b4e2dc8a71de7ebf0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2550/20742370d1a08cc5f982b88b4e2dc8a71de7ebf0/tfmainline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10940, 748, 494, 12, 82, 4672, 565, 309, 290, 422, 374, 30, 327, 296, 6226, 5124, 775, 30, 290, 273, 509, 12, 82, 13, 1815, 290, 1545, 374, 471, 290, 411, 1381, 29242, 3784, 225, 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, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10940, 748, 494, 12, 82, 4672, 565, 309, 290, 422, 374, 30, 327, 296, 6226, 5124, 775, 30, 290, 273, 509, 12, 82, 13, 1815, 290, 1545, 374, 471, 290, 411, 1381, 29242, 3784, 225, 468...
WINDOWS_CARD_A_MEM = 'MASS_STORAGE'
WINDOWS_CARD_A_MEM = 'MASS_STORGE'
def windows_sort_drives(self, drives): main = drives.get('main', None) card = drives.get('carda', None) if card and main and card < main: drives['main'] = card drives['carda'] = main
1e1bd8c74222db88bc1795719d3423ba42b0d826 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/1e1bd8c74222db88bc1795719d3423ba42b0d826/driver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9965, 67, 3804, 67, 3069, 3606, 12, 2890, 16, 5081, 3606, 4672, 2774, 273, 5081, 3606, 18, 588, 2668, 5254, 2187, 599, 13, 5270, 273, 5081, 3606, 18, 588, 2668, 3327, 69, 2187, 599, 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, 9965, 67, 3804, 67, 3069, 3606, 12, 2890, 16, 5081, 3606, 4672, 2774, 273, 5081, 3606, 18, 588, 2668, 5254, 2187, 599, 13, 5270, 273, 5081, 3606, 18, 588, 2668, 3327, 69, 2187, 599, 13...
if self._docmap.has_key(see[0]): str += self._uid_to_href(see[0], see[1]) + ', ' else: str += see[1] + ', '
str += dom_to_html(see, container)
def _seealso(self, seealso): 'Convert a SEEALSO node to HTML' #!!!!!!!!!!!!!!!!!!!!!!!!!!!! NO SEEALSO YET return '' if not seealso: return '' str = '<dl><dt><b>See also:</b>\n </dt><dd>' for see in seealso: if self._docmap.has_key(see[0]): str += self._uid_to_href(see[0], see[1]) + ', ' else: str += see[1] + ', ' return str[:-2] + '</dd>\n</dl>\n\n'
ad5bc28e61fc8837c138ad9d0c6ffb1dd1b518ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/ad5bc28e61fc8837c138ad9d0c6ffb1dd1b518ec/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5946, 31144, 12, 2890, 16, 2621, 31144, 4672, 296, 2723, 279, 3174, 41, 1013, 3584, 756, 358, 3982, 11, 468, 23045, 23045, 23045, 23045, 23045, 23045, 23045, 3741, 3174, 41, 1013, 358...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5946, 31144, 12, 2890, 16, 2621, 31144, 4672, 296, 2723, 279, 3174, 41, 1013, 3584, 756, 358, 3982, 11, 468, 23045, 23045, 23045, 23045, 23045, 23045, 23045, 3741, 3174, 41, 1013, 358...
def fl_set_canvas_colormap(ob, colormap): """ fl_set_canvas_colormap(ob, colormap) """ _fl_set_canvas_colormap(ob, colormap) _fl_set_canvas_visual = cfuncproto(so_libforms, "fl_set_canvas_visual", None, [cty.POINTER(FL_OBJECT), cty.POINTER(Visual)],
def fl_set_canvas_colormap(pObject, colormap): """ fl_set_canvas_colormap(pObject, colormap) """ _fl_set_canvas_colormap(pObject, colormap) _fl_set_canvas_visual = cfuncproto(so_libforms, "fl_set_canvas_visual", None, [cty.POINTER(FL_OBJECT), cty.POINTER(Visual)],
def fl_set_canvas_colormap(ob, colormap): """ fl_set_canvas_colormap(ob, colormap) """ _fl_set_canvas_colormap(ob, colormap)
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, 15424, 67, 1293, 18804, 12, 947, 16, 24806, 4672, 3536, 1183, 67, 542, 67, 15424, 67, 1293, 18804, 12, 947, 16, 24806, 13, 3536, 225, 389, 2242, 67, 542, 67, 15424, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 15424, 67, 1293, 18804, 12, 947, 16, 24806, 4672, 3536, 1183, 67, 542, 67, 15424, 67, 1293, 18804, 12, 947, 16, 24806, 13, 3536, 225, 389, 2242, 67, 542, 67, 15424, ...
m = re.search("(<doi_record>.*</doi_record>)", xml_page, re.S) if not m: raise ParseException, "Unable to extract metadata - malformed XML"
def handle(url): page = urlopen(canon_url(url)).read() m = re.search(r'<a href="http://dx.doi.org/([^"]+)"', page) # this page might requires a login. Luckily there seems to be a # link "View Abstract" which can take us to a page we can read if not m: soup = BeautifulSoup.BeautifulSoup(page) for link in soup.findAll('a'): if link.string and string.lower(link.string) in ('view abstract'): page = urlopen(canon_url("http://www.sciencedirect.com" + link['href'])).read() m = re.search(r'<a href="http://dx.doi.org/([^"]+)"', page) break if not m: raise ParseException, "Cannot find DOI in page" doi = m.group(1) # if not re.search(r'^10[.](1016|1006|1053)/',doi): # raise ParseException, "Cannot find an Elsevier DOI (10.1006, 10.1016, 10.1053) DOI" xml_url = crossref_xml_url(doi) xml_page = urlopen(xml_url).read() xml_page = xml_page.decode('utf-8') m = re.search("DOI not found in CrossRef", xml_page) if m: raise ParseException, "Unable to locate that DOI (%s) in crossref" % doi # # Emergency bodge to fix completely toileted XML from crossref # m = re.search("(<doi_record>.*</doi_record>)", xml_page, re.S) if not m: raise ParseException, "Unable to extract metadata - malformed XML" xml_page = m.group(1) yield "begin_crossref" yield xml_page yield "end_crossref" yield "begin_tsv" try: abstract = scrape_abstract(page) except: abstract = '' if abstract: print "abstract\t%s" % (abstract) yield "end_tsv" yield "status\tok"
7f924bbf89fb1d753f51b33c847280de903e9ff7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13110/7f924bbf89fb1d753f51b33c847280de903e9ff7/sciencedirect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 718, 4672, 225, 1363, 273, 19613, 12, 4169, 265, 67, 718, 12, 718, 13, 2934, 896, 1435, 225, 312, 273, 283, 18, 3072, 12, 86, 11, 32, 69, 3897, 1546, 2505, 2207, 13437, 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, 1640, 12, 718, 4672, 225, 1363, 273, 19613, 12, 4169, 265, 67, 718, 12, 718, 13, 2934, 896, 1435, 225, 312, 273, 283, 18, 3072, 12, 86, 11, 32, 69, 3897, 1546, 2505, 2207, 13437, 18,...
self.LOG.warn('Can\'t handle multi-item moving yet, skipping "%s"!' % (path,))
self.LOG.warn("Can't handle multi-item moving yet, skipping %s!" % (pretty_path(path),))
def guarded(call, *args): "Helper for filesystem calls." self.LOG.debug('%s("%s")' % ( call.__name__, '", "'.join(args), )) if not self.options.dry_run: try: call(*args) except EnvironmentError, exc: self.fatal('%s("%s") failed [%s]' % ( call.__name__, '", "'.join(args), exc, ))
7be5c896b244abd96852611847844ab3d05894ff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4865/7be5c896b244abd96852611847844ab3d05894ff/rtmv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3058, 17212, 12, 1991, 16, 380, 1968, 4672, 315, 2276, 364, 6496, 4097, 1199, 365, 18, 4842, 18, 4148, 29909, 87, 27188, 87, 31241, 738, 261, 745, 16186, 529, 972, 16, 19197, 2491, 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, 3058, 17212, 12, 1991, 16, 380, 1968, 4672, 315, 2276, 364, 6496, 4097, 1199, 365, 18, 4842, 18, 4148, 29909, 87, 27188, 87, 31241, 738, 261, 745, 16186, 529, 972, 16, 19197, 2491, 18, ...
mimetypes = self.desktop_entry.getMimeTypes()
try: mimetypes = self.desktop_entry.getMimeTypes() except AttributeError: mimetypes = None
def menu_get_zg_files(self): # Get information from zeitgeist appname = self.desktop_entry.getFileName().split('/')[-1] recent_files = zg.get_recent_for_app(appname, days=30, number_of_results=8) most_used_files = zg.get_most_used_for_app(appname, days=30, number_of_results=8) # For programs that work badly with zeitgeist (openoffice for now), # mimetypes should be used to identify recent and most used as well. if self.identifier in zg.workrounds: if self.identifier == 'openoffice-writer' and \ not self.globals.settings['separate_ooo_apps']: mimetypes = zg.workrounds['openoffice-writer'] + \ zg.workrounds['openoffice-calc'] + \ zg.workrounds['openoffice-presentation'] + \ zg.workrounds['openoffice-draw'] elif zg.workrounds[self.identifier] == 'all': mimetypes = self.desktop_entry.getMimeTypes() else: mimetypes = zg.workrounds[self.identifier] recent_files += zg.get_recent_for_mimetypes(mimetypes, days=30, number_of_results=8) most_used_files += zg.get_most_used_for_mimetypes(mimetypes, days=30, number_of_results=8) # Related files contains files that can be used by the program and # has been used by other programs (but not this program) today. related_files = [] mimetypes = self.desktop_entry.getMimeTypes() if mimetypes: related_candidates = zg.get_recent_for_mimetypes(mimetypes, days=1, number_of_results=20) other_recent = zg.get_recent_for_app(appname, days=1, number_of_results=20) related_files = [rf for rf in related_candidates \ if not (rf in recent_files or \ rf in other_recent)] related_files = related_files[:3] return recent_files, most_used_files, related_files
40520842686be0bdd673c90536329a779e454dc4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7075/40520842686be0bdd673c90536329a779e454dc4/groupbutton.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3824, 67, 588, 67, 94, 75, 67, 2354, 12, 2890, 4672, 468, 968, 1779, 628, 26637, 305, 908, 376, 22323, 273, 365, 18, 31949, 67, 4099, 18, 588, 4771, 7675, 4939, 2668, 2473, 13, 18919, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3824, 67, 588, 67, 94, 75, 67, 2354, 12, 2890, 4672, 468, 968, 1779, 628, 26637, 305, 908, 376, 22323, 273, 365, 18, 31949, 67, 4099, 18, 588, 4771, 7675, 4939, 2668, 2473, 13, 18919, ...
if redirTarget.startswith('http://'):
if redirTarget.startswith('http://') or redirTarget.startswith('https://'):
def resolveRedirect(self): ''' Requests the header from the server. If the page is an HTTP redirect, returns the redirect target URL as a string. Otherwise returns None. ''' conn = httplib.HTTPConnection(self.host) conn.request('HEAD', '%s%s' % (self.path, self.query), None, self.header) response = conn.getresponse()
46ff32518545c6ad27cd8294f343c9506652ef85 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/46ff32518545c6ad27cd8294f343c9506652ef85/weblinkchecker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2245, 5961, 12, 2890, 4672, 9163, 7090, 326, 1446, 628, 326, 1438, 18, 971, 326, 1363, 353, 392, 2239, 3136, 16, 1135, 326, 3136, 1018, 1976, 487, 279, 533, 18, 5272, 1135, 599, 18, 91...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2245, 5961, 12, 2890, 4672, 9163, 7090, 326, 1446, 628, 326, 1438, 18, 971, 326, 1363, 353, 392, 2239, 3136, 16, 1135, 326, 3136, 1018, 1976, 487, 279, 533, 18, 5272, 1135, 599, 18, 91...
shortlog = wiki_to_oneliner(message, env, db, shorten=True)
shortlog = wiki_to_oneliner(message, env, db, shorten=True, absurls=absurls)
def get_changes(env, repos, revs, full=None, req=None, format=None): db = env.get_db_cnx() changes = {} for rev in revs: try: changeset = repos.get_changeset(rev) except NoSuchChangeset: changes[rev] = {} continue wiki_format = env.config['changeset'].getbool('wiki_format_messages') message = changeset.message or '--' if wiki_format: shortlog = wiki_to_oneliner(message, env, db, shorten=True) else: shortlog = Markup.escape(shorten_line(message)) if full: if wiki_format: message = wiki_to_html(message, env, req, db, absurls=(format == 'rss'), escape_newlines=True) else: message = html.PRE(message) else: message = shortlog if format == 'rss': if isinstance(shortlog, Markup): shortlog = shortlog.plaintext(keeplinebreaks=False) message = unicode(message) changes[rev] = { 'date_seconds': changeset.date, 'date': format_datetime(changeset.date), 'age': pretty_timedelta(changeset.date), 'author': changeset.author or 'anonymous', 'message': message, 'shortlog': shortlog, } return changes
5f0cdaaf067e5b822073eb581af02fe04e5915e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/5f0cdaaf067e5b822073eb581af02fe04e5915e5/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 6329, 12, 3074, 16, 13686, 16, 5588, 87, 16, 1983, 33, 7036, 16, 1111, 33, 7036, 16, 740, 33, 7036, 4672, 1319, 273, 1550, 18, 588, 67, 1966, 67, 10305, 92, 1435, 3478, 273,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 6329, 12, 3074, 16, 13686, 16, 5588, 87, 16, 1983, 33, 7036, 16, 1111, 33, 7036, 16, 740, 33, 7036, 4672, 1319, 273, 1550, 18, 588, 67, 1966, 67, 10305, 92, 1435, 3478, 273,...
for tp, tp_cstr in [numpy.float32, numpy.float64]:
for tp in [numpy.float32, numpy.float64]: from pycuda.tools import dtype_to_ctype tp_cstr = dtype_to_ctype(tp)
def test_fp_textures(self): if pycuda.autoinit.device.compute_capability() < (1, 3): return
3f89de4d827afa77f8bf028be0070a16cb83ee77 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12870/3f89de4d827afa77f8bf028be0070a16cb83ee77/test_driver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 7944, 67, 955, 1823, 12, 2890, 4672, 309, 2395, 71, 13177, 18, 5854, 885, 305, 18, 5964, 18, 9200, 67, 13568, 1435, 411, 261, 21, 16, 890, 4672, 327, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 7944, 67, 955, 1823, 12, 2890, 4672, 309, 2395, 71, 13177, 18, 5854, 885, 305, 18, 5964, 18, 9200, 67, 13568, 1435, 411, 261, 21, 16, 890, 4672, 327, 2, -100, -100, -100, -...
return self._pSource.GetStructuredPointsOutput()
return self._vtkImporter.GetOutput()
def getOutput(self, idx): return self._pSource.GetStructuredPointsOutput()
a63bd4507690f2bf9b18a3f2ebd2537f2ddeb043 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4494/a63bd4507690f2bf9b18a3f2ebd2537f2ddeb043/geodesicActiveContour.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11062, 12, 2890, 16, 2067, 4672, 327, 365, 6315, 84, 1830, 18, 967, 30733, 5636, 1447, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 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, 11062, 12, 2890, 16, 2067, 4672, 327, 365, 6315, 84, 1830, 18, 967, 30733, 5636, 1447, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
eq(msg.get_param('title', unquote=0),
eq(msg.get_param('title', unquote=False),
def test_get_param(self): eq = self.assertEqual msg = self._msgobj('msg_29.txt') eq(msg.get_param('title'), ('us-ascii', 'en', 'This is even more ***fun*** isn\'t it!')) eq(msg.get_param('title', unquote=0), ('us-ascii', 'en', '"This is even more ***fun*** isn\'t it!"'))
b36834747c3a469dec3b8cd4b2797d3571eb7537 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b36834747c3a469dec3b8cd4b2797d3571eb7537/test_email.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 588, 67, 891, 12, 2890, 4672, 7555, 273, 365, 18, 11231, 5812, 1234, 273, 365, 6315, 3576, 2603, 2668, 3576, 67, 5540, 18, 5830, 6134, 7555, 12, 3576, 18, 588, 67, 891, 2668,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 588, 67, 891, 12, 2890, 4672, 7555, 273, 365, 18, 11231, 5812, 1234, 273, 365, 6315, 3576, 2603, 2668, 3576, 67, 5540, 18, 5830, 6134, 7555, 12, 3576, 18, 588, 67, 891, 2668,...
tpgt = str(value[1]); initiator_iqn = str(value[2]);
iqn = iqn.lower(); tpgt = str(value[1]); initiator_iqn = str(value[2]); initiator_iqn = initiator_iqn.lower();
def lio_target_disable_lunwp(option, opt_str, value, parser): iqn = str(value[0]); tpgt = str(value[1]); initiator_iqn = str(value[2]); mapped_lun = str(value[3]); disable_op = "echo 0 > " + lio_root + "/" + iqn + "/tpgt_" + tpgt + "/acls/" + initiator_iqn + "/lun_" + mapped_lun + "/write_protect" ret = os.system(disable_op) if ret: lio_err("Unable to disable WriteProtect for Mapped LUN: " + mapped_lun + " for " + initiator_iqn + " on iSCSI Target Portal Group: " + iqn + " " + tpgt) else: print "Successfully disabled WRITE PROTECT for Mapped LUN: " + mapped_lun + " for " + initiator_iqn + " on iSCSI Target Portal Group: " + iqn + " " + tpgt return
8d2b86866ac7b63c771216f124c47e465d40f82b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8449/8d2b86866ac7b63c771216f124c47e465d40f82b/lio_node.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 1594, 67, 3299, 67, 8394, 67, 80, 318, 8612, 12, 3482, 16, 2153, 67, 701, 16, 460, 16, 2082, 4672, 277, 15785, 273, 609, 12, 1132, 63, 20, 19226, 277, 15785, 273, 277, 15785, 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, 328, 1594, 67, 3299, 67, 8394, 67, 80, 318, 8612, 12, 3482, 16, 2153, 67, 701, 16, 460, 16, 2082, 4672, 277, 15785, 273, 609, 12, 1132, 63, 20, 19226, 277, 15785, 273, 277, 15785, 18...
</style>\n</head>\n<body>\n"
.devlist {position:'+x2changes[1]+';width:190px;}\n\ </style>\n</head>\n<body>\n'
def createHTML(): global sysvals, data data.normalizeTime() # html function templates headline_stamp = '<div class="stamp">{0} {1} {2} {3}</div>\n' html_zoombox = '<center><button id="zoomin">ZOOM IN</button><button id="zoomout">ZOOM OUT</button><button id="zoomdef">ZOOM 1:1</button></center>\n<div id="dmesgzoombox" class="zoombox">\n' html_timeline = '<div id="{0}" class="timeline" style="height:{1}px">\n' html_device = '<div id="{0}" title="{1}" class="thread" style="left:{2}%;top:{3}%;height:{4}%;width:{5}%;">{6}</div>\n' html_phase = '<div class="phase" style="left:{0}%;width:{1}%;top:{2}%;height:{3}%;background-color:{4}">{5}</div>\n' html_legend = '<div class="square" style="left:{0}%;background-color:{1}">&nbsp;{2}</div>\n' html_timetotal = '<table class="time1">\n<tr>'\ '<td class="gray">{2} Suspend Time: <b>{0} ms</b></td>'\ '<td class="gray">{2} Resume Time: <b>{1} ms</b></td>'\ '</tr>\n</table>\n' html_timegroups = '<table class="time2">\n<tr>'\ '<td class="green">Kernel Suspend: {0} ms</td>'\ '<td class="purple">Firmware Suspend: {1} ms</td>'\ '<td class="purple">Firmware Resume: {2} ms</td>'\ '<td class="yellow">Kernel Resume: {3} ms</td>'\ '</tr>\n</table>\n' # device timeline (dmesg) if(data.usedmesg): data.vprint("Creating Device Timeline...") devtl = Timeline() # Generate the header for this timeline t0 = data.start tMax = data.end tTotal = tMax - t0 if(tTotal == 0): print("ERROR: No timeline data") sys.exit() suspend_time = "%.0f"%(-data.start*1000) resume_time = "%.0f"%(data.end*1000) if data.fwValid: devtl.html['timeline'] = html_timetotal.format(suspend_time, resume_time, "Total") sktime = "%.3f"%((data.dmesg['suspend_cpu']['end'] - data.dmesg['suspend_general']['start'])*1000) sftime = "%.3f"%(data.fwSuspend / 1000000.0) rftime = "%.3f"%(data.fwResume / 1000000.0) rktime = "%.3f"%((data.dmesg['resume_general']['end'] - data.dmesg['resume_cpu']['start'])*1000) devtl.html['timeline'] += html_timegroups.format(sktime, sftime, rftime, rktime) else: devtl.html['timeline'] = html_timetotal.format(suspend_time, resume_time, "Kernel") # determine the maximum number of rows we need to draw timelinerows = 0 for phase in data.dmesg: list = data.dmesg[phase]['list'] rows = setTimelineRows(list, list) data.dmesg[phase]['row'] = rows if(rows > timelinerows): timelinerows = rows # calculate the timeline height and create its bounding box devtl.setRows(timelinerows + 1) devtl.html['timeline'] += html_zoombox; devtl.html['timeline'] += html_timeline.format("dmesg", devtl.height); # draw the colored boxes for each of the phases for b in data.dmesg: phase = data.dmesg[b] left = "%.3f" % (((phase['start']-data.start)*100)/tTotal) width = "%.3f" % (((phase['end']-phase['start'])*100)/tTotal) devtl.html['timeline'] += html_phase.format(left, width, "%.3f"%devtl.scaleH, "%.3f"%(100-devtl.scaleH), data.dmesg[b]['color'], "") # draw the time scale, try to make the number of labels readable devtl.html['scale'] = createTimeScale(t0, tMax, data.tSuspended) devtl.html['timeline'] += devtl.html['scale'] for b in data.dmesg: phaselist = data.dmesg[b]['list'] for d in phaselist: name = d if(d in data.altdevname): name = data.altdevname[d] dev = phaselist[d] height = (100.0 - devtl.scaleH)/data.dmesg[b]['row'] top = "%.3f" % ((dev['row']*height) + devtl.scaleH) left = "%.3f" % (((dev['start']-data.start)*100)/tTotal) width = "%.3f" % (((dev['end']-dev['start'])*100)/tTotal) len = " (%0.3f ms) " % ((dev['end']-dev['start'])*1000) color = "rgba(204,204,204,0.5)" devtl.html['timeline'] += html_device.format(dev['id'], name+len+b, left, top, "%.3f"%height, width, name) # timeline is finished devtl.html['timeline'] += "</div>\n</div>\n" # draw a legend which describes the phases by color devtl.html['legend'] = "<div class=\"legend\">\n" pdelta = 100.0/data.phases.__len__() pmargin = pdelta / 4.0 for phase in data.phases: order = "%.2f" % ((data.dmesg[phase]['order'] * pdelta) + pmargin) name = string.replace(phase, "_", " &nbsp;") devtl.html['legend'] += html_legend.format(order, data.dmesg[phase]['color'], name) devtl.html['legend'] += "</div>\n" hf = open(sysvals.htmlfile, 'w') thread_height = 0 # write the html header first (html head, css code, everything up to the start of body) html_header = "<!DOCTYPE html>\n<html>\n<head>\n\ <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\n\ <title>AnalyzeSuspend</title>\n\ <style type='text/css'>\n\ body {overflow-y: scroll;}\n\ .stamp {width: 100%;text-align:center;background-color:gray;line-height:30px;color:white;font: 25px Arial;}\n\ .callgraph {margin-top: 30px;box-shadow: 5px 5px 20px black;}\n\ .callgraph article * {padding-left: 28px;}\n\ h1 {color:black;font: bold 30px Times;}\n\ table {width:100%;}\n\ .gray {background-color:rgba(80,80,80,0.1);}\n\ .green {background-color:rgba(204,255,204,0.4);}\n\ .purple {background-color:rgba(128,0,128,0.2);}\n\ .yellow {background-color:rgba(255,255,204,0.4);}\n\ .time1 {font: 22px Arial;border:1px solid;}\n\ .time2 {font: 15px Arial;border-bottom:1px solid;border-left:1px solid;border-right:1px solid;}\n\ td {text-align: center;}\n\ .tdhl {color: red;}\n\ .hide {display: none;}\n\ .pf {display: none;}\n\ .pf:checked + label {background: url(\'data:image/svg+xml;utf,<?xml version=\"1.0\" standalone=\"no\"?><svg xmlns=\"http://www.w3.org/2000/svg\" height=\"18\" width=\"18\" version=\"1.1\"><circle cx=\"9\" cy=\"9\" r=\"8\" stroke=\"black\" stroke-width=\"1\" fill=\"white\"/><rect x=\"4\" y=\"8\" width=\"10\" height=\"2\" style=\"fill:black;stroke-width:0\"/><rect x=\"8\" y=\"4\" width=\"2\" height=\"10\" style=\"fill:black;stroke-width:0\"/></svg>\') no-repeat left center;}\n\ .pf:not(:checked) ~ label {background: url(\'data:image/svg+xml;utf,<?xml version=\"1.0\" standalone=\"no\"?><svg xmlns=\"http://www.w3.org/2000/svg\" height=\"18\" width=\"18\" version=\"1.1\"><circle cx=\"9\" cy=\"9\" r=\"8\" stroke=\"black\" stroke-width=\"1\" fill=\"white\"/><rect x=\"4\" y=\"8\" width=\"10\" height=\"2\" style=\"fill:black;stroke-width:0\"/></svg>\') no-repeat left center;}\n\ .pf:checked ~ *:not(:nth-child(2)) {display: none;}\n\ .zoombox {position: relative; width: 100%; overflow-x: scroll;}\n\ .timeline {position: relative; font-size: 14px;cursor: pointer;width: 100%; overflow: hidden; background-color:#dddddd;}\n\ .thread {position: absolute; height: "+"%.3f"%thread_height+"%; overflow: hidden; line-height: 30px; border:1px solid;text-align:center;white-space:nowrap;background-color:rgba(204,204,204,0.5);}\n\ .thread:hover {background-color:white;border:1px solid red;z-index:10;}\n\ .phase {position: absolute;overflow: hidden;border:0px;text-align:center;}\n\ .t {position: absolute; top: 0%; height: 100%; border-right:1px solid black;}\n\ .legend {position: relative; width: 100%; height: 40px; text-align: center;margin-bottom:20px}\n\ .legend .square {position:absolute;top:10px; width: 0px;height: 20px;border:1px solid;padding-left:20px;}\n\ button {height:40px;width:200px;margin-bottom:20px;margin-top:20px;font-size:24px;}\n\ </style>\n</head>\n<body>\n" hf.write(html_header) # write the test title and general info header if(data.stamp['time'] != ""): hf.write(headline_stamp.format(data.stamp['host'], data.stamp['kernel'], data.stamp['mode'], data.stamp['time'])) # write the dmesg data (device timeline) if(data.usedmesg): hf.write(devtl.html['timeline']) hf.write(devtl.html['legend']) hf.write('<div id="devicedetail"></div>\n') hf.write('<div id="devicetree"></div>\n') # write the ftrace data (callgraph) if(data.useftrace): hf.write('<section id="callgraphs" class="callgraph">\n') # write out the ftrace data converted to html html_func_top = '<article id="{0}" class="atop" style="background-color:{1}">\n<input type="checkbox" class="pf" id="f{2}" checked/><label for="f{2}">{3} {4}</label>\n' html_func_start = '<article>\n<input type="checkbox" class="pf" id="f{0}" checked/><label for="f{0}">{1} {2}</label>\n' html_func_end = '</article>\n' html_func_leaf = '<article>{0} {1}</article>\n' num = 0 for p in data.phases: list = data.dmesg[p]['list'] for devname in data.sortedDevices(p): if('ftrace' not in list[devname]): continue name = devname if(devname in data.altdevname): name = data.altdevname[devname] devid = list[devname]['id'] cg = list[devname]['ftrace'] flen = "(%.3f ms)" % ((cg.end - cg.start)*1000) hf.write(html_func_top.format(devid, data.dmesg[p]['color'], num, name+" "+p, flen)) num += 1 for line in cg.list: if(line.length < 0.000000001): flen = "" else: flen = "(%.3f ms)" % (line.length*1000) if(line.freturn and line.fcall): hf.write(html_func_leaf.format(line.name, flen)) elif(line.freturn): hf.write(html_func_end) else: hf.write(html_func_start.format(num, line.name, flen)) num += 1 hf.write(html_func_end) hf.write("\n\n </section>\n") # write the footer and close addScriptCode(hf) hf.write("</body>\n</html>\n") hf.close() return True
0c52bda8f6c5785b5982bc3636b627b4ccd59c3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5327/0c52bda8f6c5785b5982bc3636b627b4ccd59c3f/analyze_suspend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 4870, 13332, 2552, 2589, 4524, 16, 501, 225, 501, 18, 12237, 950, 1435, 225, 468, 1729, 445, 5539, 910, 1369, 67, 14317, 273, 2368, 2892, 667, 1546, 14317, 6441, 95, 20, 97, 288, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 4870, 13332, 2552, 2589, 4524, 16, 501, 225, 501, 18, 12237, 950, 1435, 225, 468, 1729, 445, 5539, 910, 1369, 67, 14317, 273, 2368, 2892, 667, 1546, 14317, 6441, 95, 20, 97, 288, ...
cmdline.append("--copy-unsafe-links")
cmdline += [ "--copy-unsafe-links" ] cmdline += [ "--exclude=pg_log/*" ] cmdline += [ "--exclude=pg_xlog/archive_status/*" ] cmdline += [ "--include=pg_xlog/archive_status" ] cmdline += [ "--exclude=pg_xlog/*" ]
def exec_rsync_keep_links(self, source_dir, dst_loc, exclude_list): """rsync a potentially symlinked directory under PGDATA""" keep_symlinks = self.cf.getint("keep_symlinks", 1)
c488b698c160c235e1be01295c1f3d2724872c98 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14597/c488b698c160c235e1be01295c1f3d2724872c98/walmgr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1196, 67, 5453, 1209, 67, 10102, 67, 7135, 12, 2890, 16, 1084, 67, 1214, 16, 3046, 67, 1829, 16, 4433, 67, 1098, 4672, 3536, 5453, 1209, 279, 13935, 10563, 329, 1867, 3613, 22116, 4883, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1196, 67, 5453, 1209, 67, 10102, 67, 7135, 12, 2890, 16, 1084, 67, 1214, 16, 3046, 67, 1829, 16, 4433, 67, 1098, 4672, 3536, 5453, 1209, 279, 13935, 10563, 329, 1867, 3613, 22116, 4883, ...
write( self.service.manager.getThreadMessages(self.forum_id, self.post_id).addCallback(self._cbPostData) )
write( self.manager.getThreadMessages(self.forum_id, self.post_id).addCallback(self._cbPostData) )
def stream(self, write, request): self.forum_id = int(request.args.get('forum_id',[0])[0]) self.post_id = int(request.args.get('post_id',[0])[0]) print "Getting posts for thread %d for forum: %d" % (self.post_id, self.forum_id) write( self.service.manager.getThreadMessages(self.forum_id, self.post_id).addCallback(self._cbPostData) )
bd6102d819612a9b6694f73898b35fa12f91d912 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bd6102d819612a9b6694f73898b35fa12f91d912/gadgets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1407, 12, 2890, 16, 1045, 16, 590, 4672, 365, 18, 11725, 67, 350, 273, 509, 12, 2293, 18, 1968, 18, 588, 2668, 11725, 67, 350, 2187, 63, 20, 5717, 63, 20, 5717, 365, 18, 2767, 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, 1407, 12, 2890, 16, 1045, 16, 590, 4672, 365, 18, 11725, 67, 350, 273, 509, 12, 2293, 18, 1968, 18, 588, 2668, 11725, 67, 350, 2187, 63, 20, 5717, 63, 20, 5717, 365, 18, 2767, 67, ...
scatt_axp = ax.scatter(np.log10(periods_axp), np.log10(pdots_axp), \
scatt_axp = ax.scatter(periods_axp, pdots_axp, \
def plot_data(pulsars, hightlight=[], binaries=False, rrats=False, \ magnetars=False, snrs=False, axp=False, sgr=False, \ edots=[], ages=[], bsurfs=[]): """Plot P-Pdot diagram using list of pulsars provided. binaries - boolean, initially plot binary markers rrats - boolean, initially plot RRAT markers magnetars - boolean, initially plot magnetar markers snrs - boolean, initially plot SNR markers edots - values for lines of constant edot ages - values for lines of constant ages bsurfs - values for lines of constant surfave b-field """ global scatt_psrs, scatt_psrs_hl periods = np.array([x.p for x in pulsars \ if x.p is not None and x.pdot is not None]) pdots = np.array([x.pdot for x in pulsars \ if x.p is not None and x.pdot is not None]) ax = plt.axes() scatt_psrs = ax.scatter(np.log10(periods), np.log10(pdots), c='k', s=6, \ label='pulsars', picker=PICKER, zorder=0) # Pulsars to highlight numhl = 0 if len(highlight): periods_hl = np.array([h.p for h in highlight \ if h.p is not None and h.pdot is not None]) pdots_hl = np.array([h.pdot for h in highlight \ if h.p is not None and h.pdot is not None]) scatt_psrs_hl = ax.scatter(np.log10(periods_hl), np.log10(pdots_hl), \ c='r', s=50, label='highlight', picker=PICKER, \ marker=(5,1,0), edgecolors='r', zorder=1) numhl = periods_hl.size # Mark binaries periods_bnry = np.array([x.p for x in pulsars \ if x.p is not None and x.pdot is not None \ and x.binary==True]) pdots_bnry = np.array([x.pdot for x in pulsars \ if x.p is not None and x.pdot is not None \ and x.binary==True]) global scatt_binaries if periods_bnry.size: scatter_options = MARKER_OPTIONS.copy() scatter_options.update(BINARY_MARKER) scatt_binaries = ax.scatter(np.log10(periods_bnry), np.log10(pdots_bnry), \ **scatter_options) if not binaries: # Hide binaries for now scatt_binaries.set_visible(False) else: scatt_binaries = None # Mark RRATs periods_rrat = np.array([x.p for x in pulsars+highlight \ if x.p is not None and x.pdot is not None \ and x.rrat==True]) pdots_rrat = np.array([x.pdot for x in pulsars+highlight \ if x.p is not None and x.pdot is not None \ and x.rrat==True]) global scatt_rrats if periods_rrat.size: scatter_options = MARKER_OPTIONS.copy() scatter_options.update(RRAT_MARKER) scatt_rrats = ax.scatter(np.log10(periods_rrat), np.log10(pdots_rrat), \ **scatter_options) if not rrats: # Hide RRATs for now scatt_rrats.set_visible(False) else: scatt_rrats = None # Mark magnetars periods_mag = np.array([x.p for x in pulsars \ if x.p is not None and x.pdot is not None \ and x.magnetar==True]) pdots_mag = np.array([x.pdot for x in pulsars \ if x.p is not None and x.pdot is not None \ and x.magnetar==True]) global scatt_magnetars if periods_mag.size: scatter_options = MARKER_OPTIONS.copy() scatter_options.update(MAGNETAR_MARKER) scatt_magnetars = ax.scatter(np.log10(periods_mag), np.log10(pdots_mag), \ **scatter_options) if not magnetars: # Hide magnetars for now scatt_magnetars.set_visible(False) else: scatt_magnetars = None # Mark sgrs periods_sgr = np.array([x.p for x in pulsars \ if x.p is not None and x.pdot is not None \ and x.sgr==True]) pdots_sgr = np.array([x.pdot for x in pulsars \ if x.p is not None and x.pdot is not None \ and x.sgr==True]) global scatt_sgr if periods_sgr.size: scatter_options = MARKER_OPTIONS.copy() scatter_options.update(SGR_MARKER) scatt_sgr = ax.scatter(np.log10(periods_sgr), np.log10(pdots_sgr), \ **scatter_options) if not sgr: # Hide sgr for now scatt_sgr.set_visible(False) else: scatt_sgr = None # Mark axps periods_axp = np.array([x.p for x in pulsars \ if x.p is not None and x.pdot is not None \ and x.axp==True]) pdots_axp = np.array([x.pdot for x in pulsars \ if x.p is not None and x.pdot is not None \ and x.axp==True]) global scatt_axp if periods_axp.size: scatter_options = MARKER_OPTIONS.copy() scatter_options.update(AXP_MARKER) scatt_axp = ax.scatter(np.log10(periods_axp), np.log10(pdots_axp), \ **scatter_options) if not axp: # Hide axp for now scatt_axp.set_visible(False) else: scatt_axp = None # Mark SNRs periods_snr = np.array([x.p for x in pulsars \ if x.p is not None and x.pdot is not None \ and x.snr==True]) pdots_snr = np.array([x.pdot for x in pulsars \ if x.p is not None and x.pdot is not None \ and x.snr==True]) global scatt_snrs if periods_snr.size: scatter_options = MARKER_OPTIONS.copy() scatter_options.update(SNR_MARKER) scatt_snrs = ax.scatter(np.log10(periods_snr), np.log10(pdots_snr), \ **scatter_options) if not snrs: # Hide SNRs for now scatt_snrs.set_visible(False) else: scatt_snrs = None plt.xlabel("log Period") plt.ylabel(r"log $\mathsf{\dot P}$") plt.title(r"$\mathsf{P-\dot P}$ Diagram") plt.xlim(np.log10((0.001, 100))) plt.ylim(np.log10((10**-22, 10**-8))) draw_lines(bsurfs, edots, ages) print "Plot Inventory:" print "\tNumber of pulsars:", (periods.size + numhl) print "\tNumber highlighted:", numhl print "\tNumber of RRATs:", periods_rrat.size print "\tNumber of magnetars:", periods_mag.size print "\tNumber of binaries:", periods_bnry.size print "\tNumber of SNR associations:", periods_snr.size
eea39b5ffa200e203a272a577114678d00cc2707 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3485/eea39b5ffa200e203a272a577114678d00cc2707/pyppdot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 67, 892, 12, 84, 332, 87, 5913, 16, 366, 750, 5099, 22850, 6487, 4158, 5646, 33, 8381, 16, 8354, 2323, 33, 8381, 16, 521, 4447, 2758, 5913, 33, 8381, 16, 4556, 5453, 33, 8381, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 67, 892, 12, 84, 332, 87, 5913, 16, 366, 750, 5099, 22850, 6487, 4158, 5646, 33, 8381, 16, 8354, 2323, 33, 8381, 16, 521, 4447, 2758, 5913, 33, 8381, 16, 4556, 5453, 33, 8381, ...
if os.isfile(logoutfile):
if isfile(logoutfile):
def fromtoday(fname): #Is the file today's? fdate = time.strftime("%Y%m%d", time.localtime(os.path.getmtime(fname))) today = time.strftime("%Y%m%d", time.localtime()) return fdate == today
a676b5a036664696b95ecdfb2c7d1b9b3882d6d9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1574/a676b5a036664696b95ecdfb2c7d1b9b3882d6d9/timekpr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 30064, 12, 12749, 4672, 468, 2520, 326, 585, 10074, 1807, 35, 284, 712, 273, 813, 18, 701, 9982, 27188, 61, 9, 81, 9, 72, 3113, 813, 18, 3729, 957, 12, 538, 18, 803, 18, 588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 30064, 12, 12749, 4672, 468, 2520, 326, 585, 10074, 1807, 35, 284, 712, 273, 813, 18, 701, 9982, 27188, 61, 9, 81, 9, 72, 3113, 813, 18, 3729, 957, 12, 538, 18, 803, 18, 588, ...
if limit is not None and offset is not None: limit = limit + offset
query = self.Session.query(self.mapped_class).filter(filter)
def _query(self, filter=None, limit=None, offset=None, order_by=None): """ Query the database using the passed filter and return instances of the mapped class. """ if filter: filter = filter.to_sql_expr() if limit is not None and offset is not None: limit = limit + offset
e5b5b15475e93b5984f1986c1e1f96b9499e7dcf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11978/e5b5b15475e93b5984f1986c1e1f96b9499e7dcf/protocol.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2271, 12, 2890, 16, 1034, 33, 7036, 16, 1800, 33, 7036, 16, 1384, 33, 7036, 16, 1353, 67, 1637, 33, 7036, 4672, 3536, 2770, 326, 2063, 1450, 326, 2275, 1034, 471, 327, 3884, 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, 389, 2271, 12, 2890, 16, 1034, 33, 7036, 16, 1800, 33, 7036, 16, 1384, 33, 7036, 16, 1353, 67, 1637, 33, 7036, 4672, 3536, 2770, 326, 2063, 1450, 326, 2275, 1034, 471, 327, 3884, 434, ...
prop, pointId = findPickedProp(obj)
prop, unusedPickPosition = findPickedProp(obj)
def findPickedProp(obj): (x,y) = obj.GetEventPosition() # we use a cell picker, because we don't want the point # to fall through the polygons, if you know what I mean picker = vtk.vtkCellPicker() picker.SetTolerance(0.005) print "%d %d" % (x,y) picker.Pick(x,y,0.0,self._threedRenderer) return (picker.GetActor(), picker.GetPickPosition())
64e0c66e88d6f7361ea850990639dcc4718efcea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4494/64e0c66e88d6f7361ea850990639dcc4718efcea/slice3dVWR.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 17968, 329, 4658, 12, 2603, 4672, 261, 92, 16, 93, 13, 273, 1081, 18, 967, 1133, 2555, 1435, 468, 732, 999, 279, 2484, 18141, 16, 2724, 732, 2727, 1404, 2545, 326, 1634, 468, 358...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 17968, 329, 4658, 12, 2603, 4672, 261, 92, 16, 93, 13, 273, 1081, 18, 967, 1133, 2555, 1435, 468, 732, 999, 279, 2484, 18141, 16, 2724, 732, 2727, 1404, 2545, 326, 1634, 468, 358...
try:
try:
def OnSelect(self, event): """ Event triggered when the selection changes in the tree """ if self.valid: idx = self.GetSelection() if self.designer:
746f53548fb8bb54a235b1bfa31a4bdb769818e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/746f53548fb8bb54a235b1bfa31a4bdb769818e8/Inspector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 3391, 12, 2890, 16, 871, 4672, 3536, 2587, 10861, 1347, 326, 4421, 3478, 316, 326, 2151, 3536, 309, 365, 18, 877, 30, 2067, 273, 365, 18, 967, 6233, 1435, 309, 365, 18, 16934, 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, 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, 2755, 3391, 12, 2890, 16, 871, 4672, 3536, 2587, 10861, 1347, 326, 4421, 3478, 316, 326, 2151, 3536, 309, 365, 18, 877, 30, 2067, 273, 365, 18, 967, 6233, 1435, 309, 365, 18, 16934, 26...
def _scipy_pydoc_help_call(self,*args,**kwds): _old_pydoc_help_call.__doc__
def _ppimport_pydoc_help_call(self,*args,**kwds):
def _scipy_pydoc_help_call(self,*args,**kwds): _old_pydoc_help_call.__doc__ return _old_pydoc_help_call(self, *map(_ppresolve_ignore_failure,args), **kwds)
932e8becfb3ad5bd3f7bb1de237c15e79aa1f00c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/932e8becfb3ad5bd3f7bb1de237c15e79aa1f00c/ppimport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11858, 5666, 67, 2074, 2434, 67, 5201, 67, 1991, 12, 2890, 16, 14, 1968, 16, 636, 25577, 4672, 327, 389, 1673, 67, 2074, 2434, 67, 5201, 67, 1991, 12, 2890, 16, 380, 1458, 24899, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11858, 5666, 67, 2074, 2434, 67, 5201, 67, 1991, 12, 2890, 16, 14, 1968, 16, 636, 25577, 4672, 327, 389, 1673, 67, 2074, 2434, 67, 5201, 67, 1991, 12, 2890, 16, 380, 1458, 24899, ...
return PyShellEditorWindow.close(self)
return OutputWindow.close(self)
def close(self): # Extend base class method if self.executing: # XXX Need to ask a question here if not tkMessageBox.askokcancel( "Kill?", "The program is still running; do you want to kill it?", default="ok", master=self.text): return "cancel" self.canceled = 1 if self.reading: self.top.quit() return "cancel" return PyShellEditorWindow.close(self)
969035ff7419582fe7ddefff1f15d6d4dd196eaa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/969035ff7419582fe7ddefff1f15d6d4dd196eaa/PyShell.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 468, 27686, 1026, 667, 707, 309, 365, 18, 4177, 8490, 30, 468, 11329, 12324, 358, 6827, 279, 5073, 2674, 309, 486, 13030, 27647, 18, 835, 601, 10996, 12, 315, 19045...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 468, 27686, 1026, 667, 707, 309, 365, 18, 4177, 8490, 30, 468, 11329, 12324, 358, 6827, 279, 5073, 2674, 309, 486, 13030, 27647, 18, 835, 601, 10996, 12, 315, 19045...
return self._untagged_response(typ, name)
return self._untagged_response(typ, dat, name)
def search(self, charset, criteria): """Search mailbox for matching messages.
26367a001ddaca576aba1a3f31a7c035c53199e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/26367a001ddaca576aba1a3f31a7c035c53199e8/imaplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 4856, 16, 3582, 4672, 3536, 2979, 14187, 364, 3607, 2743, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 4856, 16, 3582, 4672, 3536, 2979, 14187, 364, 3607, 2743, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
file_type = REQUEST.get('file_type', 'csv')
file_type = REQUEST.get('file_type', 'CSV')
def download(self, REQUEST=None, RESPONSE=None): """returns all the answers in a csv file"""
c66b15d7f066bcb73d8c3cf928c2816a04e05cd7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/c66b15d7f066bcb73d8c3cf928c2816a04e05cd7/MegaSurvey.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 12, 2890, 16, 12492, 33, 7036, 16, 20645, 33, 7036, 4672, 3536, 6154, 777, 326, 12415, 316, 279, 6101, 585, 8395, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 12, 2890, 16, 12492, 33, 7036, 16, 20645, 33, 7036, 4672, 3536, 6154, 777, 326, 12415, 316, 279, 6101, 585, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
oClassId = classId
oClassId = classId oLoadOrRun = ''
def depsToConsole(classDepsIter): oPackageId = oClassId = oLoadOrRun = '' self._console.indent() self._console.indent()
d33814d33d0344a421b129b84941c6497ea6ed93 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/d33814d33d0344a421b129b84941c6497ea6ed93/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8740, 774, 10215, 12, 1106, 14430, 2360, 4672, 320, 2261, 548, 273, 320, 797, 548, 273, 320, 2563, 1162, 1997, 273, 875, 365, 6315, 8698, 18, 9355, 1435, 365, 6315, 8698, 18, 9355, 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, 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, 8740, 774, 10215, 12, 1106, 14430, 2360, 4672, 320, 2261, 548, 273, 320, 797, 548, 273, 320, 2563, 1162, 1997, 273, 875, 365, 6315, 8698, 18, 9355, 1435, 365, 6315, 8698, 18, 9355, 1435,...
finc=chanfreqs1d[1]-chanfreqs1d[0]
if width==-1: finc=chanfreqs1d[-1]-chanfreqs1d[-2] else: finc=chanfreqs1d[1]-chanfreqs1d[0]
def getfreqs(self,nchan,spw,start,width, dummy=False): """ returns a list of frequencies to be used in output clean image """ #pdb.set_trace() freqlist=[] finc=1 loc_nchan=0
93b23fce9d48a029a398a23df73f95174e378bb5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2098/93b23fce9d48a029a398a23df73f95174e378bb5/cleanhelper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 10212, 87, 12, 2890, 16, 82, 7472, 16, 1752, 91, 16, 1937, 16, 2819, 16, 9609, 33, 8381, 4672, 3536, 1135, 279, 666, 434, 18138, 358, 506, 1399, 316, 876, 2721, 1316, 3536, 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, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 10212, 87, 12, 2890, 16, 82, 7472, 16, 1752, 91, 16, 1937, 16, 2819, 16, 9609, 33, 8381, 4672, 3536, 1135, 279, 666, 434, 18138, 358, 506, 1399, 316, 876, 2721, 1316, 3536, 468, ...
return Seq(self.data[i:j], self.alphabet)
return Seq.Seq(self.data[i:j], self.alphabet)
def __getslice__(self, i, j): i = max(i, 0); j = max(j, 0) return Seq(self.data[i:j], self.alphabet)
120cffaeac7b68aac30310621f41004c244350af /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7167/120cffaeac7b68aac30310621f41004c244350af/Pattern.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 6665, 972, 12, 2890, 16, 277, 16, 525, 4672, 277, 273, 943, 12, 77, 16, 374, 1769, 525, 273, 943, 12, 78, 16, 374, 13, 327, 14367, 18, 6926, 12, 2890, 18, 892, 63, 77, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 6665, 972, 12, 2890, 16, 277, 16, 525, 4672, 277, 273, 943, 12, 77, 16, 374, 1769, 525, 273, 943, 12, 78, 16, 374, 13, 327, 14367, 18, 6926, 12, 2890, 18, 892, 63, 77, ...
% (name, rp.path), 7)
% (name, repr(rp.path)), 7)
def clear_rp(self, rp): """Delete all the extended attributes in rpath""" try: for name in rp.conn.xattr.listxattr(rp.path): try: rp.conn.xattr.removexattr(rp.path, name) except IOError, exc: # SELinux attributes cannot be removed, and we don't want # to bail out or be too noisy at low log levels. if exc[0] == errno.EACCES: log.Log("Warning: unable to remove xattr %s from %s" % (name, rp.path), 7) continue else: raise except IOError, exc: if exc[0] == errno.EOPNOTSUPP or exc[0] == errno.EPERM: return # if not supported, consider empty else: raise
1a3b965ed028f2af11c9c1d9a82894cb61b65cbe /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/783/1a3b965ed028f2af11c9c1d9a82894cb61b65cbe/eas_acls.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2424, 67, 13832, 12, 2890, 16, 8715, 4672, 3536, 2613, 777, 326, 7021, 1677, 316, 436, 803, 8395, 775, 30, 364, 508, 316, 8715, 18, 4646, 18, 92, 1747, 18, 1098, 92, 1747, 12, 13832, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2424, 67, 13832, 12, 2890, 16, 8715, 4672, 3536, 2613, 777, 326, 7021, 1677, 316, 436, 803, 8395, 775, 30, 364, 508, 316, 8715, 18, 4646, 18, 92, 1747, 18, 1098, 92, 1747, 12, 13832, ...
if ncv > n or ncv < k: raise ValueError("ncv must be k<=ncv<=n, ncv=%s" % ncv)
def __init__(self, n, k, tp, matvec, sigma=None, ncv=None, v0=None, maxiter=None, which="LM", tol=0): if k <= 0: raise ValueError("k must be positive, k=%d" % k) if k == n: raise ValueError("k must be less than rank(A), k=%d" % k)
1d32d4cdb84f6044496b4c1f6f9853da1369a31f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12971/1d32d4cdb84f6044496b4c1f6f9853da1369a31f/arpack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 290, 16, 417, 16, 8071, 16, 4834, 8799, 16, 7299, 33, 7036, 16, 8194, 90, 33, 7036, 16, 331, 20, 33, 7036, 16, 25743, 33, 7036, 16, 1492, 1546, 17063, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 290, 16, 417, 16, 8071, 16, 4834, 8799, 16, 7299, 33, 7036, 16, 8194, 90, 33, 7036, 16, 331, 20, 33, 7036, 16, 25743, 33, 7036, 16, 1492, 1546, 17063, ...
self._writer.end_element('table')
self._writer.end('table')
def _write_test_metadata(self, test): self._start_suite_or_test_metadata(test) if test.timeout.secs < 0: tout = '' else: tout = utils.secs_to_timestr(test.timeout.secs) if test.timeout.message: tout += ' | ' + test.timeout.message self._write_metadata_row('Timeout', tout) self._write_metadata_row('Tags', ', '.join(test.tags)) self._writer.end_element('table')
ae8e13a64ddfd683dd727e786e12b0d23ee62439 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6988/ae8e13a64ddfd683dd727e786e12b0d23ee62439/testdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 3813, 67, 4165, 12, 2890, 16, 1842, 4672, 365, 6315, 1937, 67, 30676, 67, 280, 67, 3813, 67, 4165, 12, 3813, 13, 309, 1842, 18, 4538, 18, 21317, 411, 374, 30, 358, 322...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2626, 67, 3813, 67, 4165, 12, 2890, 16, 1842, 4672, 365, 6315, 1937, 67, 30676, 67, 280, 67, 3813, 67, 4165, 12, 3813, 13, 309, 1842, 18, 4538, 18, 21317, 411, 374, 30, 358, 322...
item = Entries_interactions.objects.get(id=eyedee).entry
item = get_object_or_404(Entries_interactions, id=eyedee)
def config_item_modified(request, eyedee =None, timestamp = 'now', type=TYPE_MODIFIED): #if eyedee = None, dump with a 404 timestamp = timestamp.replace("@"," ") if type == TYPE_MODIFIED: mod_or_bad = "modified" else: mod_or_bad = "bad" item = Entries_interactions.objects.get(id=eyedee).entry #if everything is blank except current_exists, do something special cursor = connection.cursor() if timestamp == 'now': cursor.execute("select client_id from reports_interaction, reports_entries_interactions, reports_client "+ "WHERE reports_client.current_interaction_id = reports_entries_interactions.interaction_id "+ "AND reports_entries_interactions.interaction_id = reports_interaction.id "+ "AND reports_entries_interactions.entry_id = %s " + "AND reports_entries_interactions.type = %s", [eyedee, type]) associated_client_list = Client.objects.active(timestamp).filter(id__in=[x[0] for x in cursor.fetchall()]) else: interact_queryset = Interaction.objects.interaction_per_client(timestamp) interactionlist = [] [interactionlist.append(x.id) for x in interact_queryset] if not interactionlist == []: cursor.execute("select client_id from reports_interaction, reports_entries_interactions, reports_client "+ "WHERE reports_entries_interactions.interaction_id IN %s "+ "AND reports_entries_interactions.interaction_id = reports_interaction.id "+ "AND reports_entries_interactions.modified_id = %s " + "AND reports_entries_interactions.type = %s ", [interactionlist, eyedee, type]) associated_client_list = Client.objects.active(timestamp).filter(id__in=[x[0] for x in cursor.fetchall()]) else: associated_client_list = [] if timestamp == 'now': timestamp = datetime.now().isoformat('@') return render_to_response('config_items/index.html', {'item':item, 'mod_or_bad':mod_or_bad, 'associated_client_list':associated_client_list, 'timestamp' : timestamp, 'timestamp_date' : timestamp[:10], 'timestamp_time' : timestamp[11:19]})
eceeda42cac9fd0063b8a6535addc7ed7f0099a6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11867/eceeda42cac9fd0063b8a6535addc7ed7f0099a6/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 642, 67, 1726, 67, 7342, 12, 2293, 16, 16098, 20953, 273, 7036, 16, 2858, 273, 296, 3338, 2187, 618, 33, 2399, 67, 21143, 4672, 468, 430, 16098, 20953, 273, 599, 16, 4657, 598, 279, 77...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 642, 67, 1726, 67, 7342, 12, 2293, 16, 16098, 20953, 273, 7036, 16, 2858, 273, 296, 3338, 2187, 618, 33, 2399, 67, 21143, 4672, 468, 430, 16098, 20953, 273, 599, 16, 4657, 598, 279, 77...
try: srcCluster = loadCluster('localhost', options('general.src_cluster')) dstCluster = loadCluster('localhost', options('general.dst_cluster')) fileList = downloadTag(srcCluster, dstCluster, options('general.tag_name')) tsk = task.updateTask(tsk.progress()) tagTaskName = tagData('localhost',
srcCluster = loadCluster('localhost', options('general.src_cluster')) dstCluster = loadCluster('localhost', options('general.dst_cluster')) tagFile = tag.queryTag('localhost', options('general.src_cluster'), options('general.tag_name')) metadataKeys = [k.split('.', 1)[1] for k in tagFile.keys() if k.startswith('metadata.')] metadata = dict([(k, tagFile('metadata.' + k)) for k in metadataKeys]) fileList = downloadTag(srcCluster, dstCluster, options('general.tag_name')) tsk = task.updateTask(tsk.progress()) tagTaskName = tag.tagData('localhost',
def main(options, _args): tsk = task.updateTask(task.loadTask(options('general.task_name') ).setState(task.TASK_RUNNING ).addMessage(task.MSG_SILENT, 'Starting download')) try: srcCluster = loadCluster('localhost', options('general.src_cluster')) dstCluster = loadCluster('localhost', options('general.dst_cluster')) fileList = downloadTag(srcCluster, dstCluster, options('general.tag_name')) tsk = task.updateTask(tsk.progress()) tagTaskName = tagData('localhost', options('general.dst_cluster'), options('general.tag_name'), None, fileList, False, options('general.expand'), False, True) endState, tsk = blockOnTaskAndForward('localhost', options('general.dst_cluster'), tagTaskName, tsk) if endState == task.TASK_FAILED: tsk = task.updateTask(tsk.setState(task.TASK_FAILED)) else: tsk = task.updateTask(tsk.progress().setState(task.TASK_COMPLETED)) except Exception, err: tsk = tsk.setState(task.TASK_FAILED).addException(str(err), err, errors.getStacktrace())
e805d0d58e4a2d46ac5fa17313b0cc8ecdf6d08f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5741/e805d0d58e4a2d46ac5fa17313b0cc8ecdf6d08f/downloadTagR.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2116, 16, 389, 1968, 4672, 3742, 79, 273, 1562, 18, 2725, 2174, 12, 4146, 18, 945, 2174, 12, 2116, 2668, 12259, 18, 4146, 67, 529, 6134, 262, 18, 542, 1119, 12, 4146, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2116, 16, 389, 1968, 4672, 3742, 79, 273, 1562, 18, 2725, 2174, 12, 4146, 18, 945, 2174, 12, 2116, 2668, 12259, 18, 4146, 67, 529, 6134, 262, 18, 542, 1119, 12, 4146, 18, 1...
PyArrayObject *arr = NULL;\\ if (!obj) return -2;\\ if (!PyArray_Check(obj)) return -1;\\ if (!(arr=(PyArrayObject *)obj)) {fprintf(stderr,\"TRYCOMPLEXPYARRAYTEMPLATE:\");PRINTPYOBJERR(obj);return 0;}\\ if (arr->descr->type==typecode) {\\ *(ctype *)(arr->data)=(*v).r;\\ *(ctype *)(arr->data+sizeof(ctype))=(*v).i;\\ return 1;\\ }\\ switch (arr->descr->type_num) {\\ case PyArray_CDOUBLE: *(double *)(arr->data)=(*v).r;*(double *)(arr->data+sizeof(double))=(*v).i;break;\\ case PyArray_CFLOAT: *(float *)(arr->data)=(*v).r;*(float *)(arr->data+sizeof(float))=(*v).i;break;\\ case PyArray_DOUBLE: *(double *)(arr->data)=(*v).r; break;\\ TRYCOMPLEXPYARRAYTEMPLATELONG\\ case PyArray_FLOAT: *(float *)(arr->data)=(*v).r; break;\\ case PyArray_INT: *(int *)(arr->data)=(*v).r; break;\\ case PyArray_SHORT: *(short *)(arr->data)=(*v).r; break;\\ TRYCOMPLEXPYARRAYTEMPLATECHAR\\ case PyArray_UBYTE: *(unsigned char *)(arr->data)=(*v).r; break;\\ case PyArray_SBYTE: *(signed char *)(arr->data)=(*v).r; break;\\ case PyArray_OBJECT: (arr->descr->setitem)(pyobj_from_complex_ default: return -2;\\ };\\ return -1;
#ifdef NUMARRAY
e976023c94992967c9e8060117a5f6795102525d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/e976023c94992967c9e8060117a5f6795102525d/cfuncs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 430, 536, 9443, 8552, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 430, 536, 9443, 8552, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
(field, field)
(field.decode('utf-8'), field.decode('utf-8'))
def get_preferences_fields_view(self, cursor, user, context=None): res = {} fields_names = self._preferences_fields + self._context_fields fields_names.pop(fields_names.index('status_bar')) fields = self.fields_get(cursor, user, fields_names=fields_names, context=context)
9381da5b0c7dfc036cc6284fb09460227fca4f26 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/9381da5b0c7dfc036cc6284fb09460227fca4f26/user.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 23219, 67, 2821, 67, 1945, 12, 2890, 16, 3347, 16, 729, 16, 819, 33, 7036, 4672, 400, 273, 2618, 1466, 67, 1973, 273, 365, 6315, 23219, 67, 2821, 397, 365, 6315, 2472, 67, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 23219, 67, 2821, 67, 1945, 12, 2890, 16, 3347, 16, 729, 16, 819, 33, 7036, 4672, 400, 273, 2618, 1466, 67, 1973, 273, 365, 6315, 23219, 67, 2821, 397, 365, 6315, 2472, 67, 2...
self.sendLine('AUTH ' + s + ' ' + challenge)
self.sendLine('AUTH ' + auth + ' ' + challenge)
def authenticate(self, code, resp, items): if self.secret and items.get('AUTH'): schemes = items['AUTH'].split()
f75030b75edbe6c90136972acbf7050669ff7506 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f75030b75edbe6c90136972acbf7050669ff7506/smtp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8929, 12, 2890, 16, 981, 16, 1718, 16, 1516, 4672, 309, 365, 18, 5875, 471, 1516, 18, 588, 2668, 7131, 11, 4672, 20436, 273, 1516, 3292, 7131, 29489, 4939, 1435, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8929, 12, 2890, 16, 981, 16, 1718, 16, 1516, 4672, 309, 365, 18, 5875, 471, 1516, 18, 588, 2668, 7131, 11, 4672, 20436, 273, 1516, 3292, 7131, 29489, 4939, 1435, 2, -100, -100, -100, -...
update_changes(verbose, timeout, not (loop or make_daemon), per_page, commit_each)
if rebuild_index: rebuild(verbose, per_page, commit_each) else: update_changes(verbose, timeout, not (loop or make_daemon), per_page, commit_each)
def handle(self, verbose=False, make_daemon=False, loop=False, timeout=10, rebuild_index=False, per_page=1000, commit_each=False, *args, **options): utils.load_indexes()
37d63969ac742928cd0a05ebf798f66bfa0d226e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4645/37d63969ac742928cd0a05ebf798f66bfa0d226e/index.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 16, 3988, 33, 8381, 16, 1221, 67, 21511, 33, 8381, 16, 2798, 33, 8381, 16, 2021, 33, 2163, 16, 13419, 67, 1615, 33, 8381, 16, 1534, 67, 2433, 33, 18088, 16, 3294, 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 16, 3988, 33, 8381, 16, 1221, 67, 21511, 33, 8381, 16, 2798, 33, 8381, 16, 2021, 33, 2163, 16, 13419, 67, 1615, 33, 8381, 16, 1534, 67, 2433, 33, 18088, 16, 3294, 67,...
if is_framework_layout(path):
if is_framework_layout(sys.prefix):
def strip_prefix(path, prefix): """ If ``path`` begins with ``prefix``, return ``path`` with ``prefix`` stripped off. Otherwise return None.""" prefixes = [prefix] # Yep, we are special casing the framework layout of MacPython here if is_framework_layout(path): for location in ('/Library', '/usr/local'): if path.startswith(location): prefixes.append(location) for prefix in prefixes: if path.startswith(prefix): return prefix, path.replace(prefix + os.path.sep, '') return None, None
293c6d430d7f1782741dfe35239798c6676e04d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12982/293c6d430d7f1782741dfe35239798c6676e04d3/pip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2569, 67, 3239, 12, 803, 16, 1633, 4672, 3536, 971, 12176, 803, 10335, 17874, 598, 12176, 3239, 68, 9191, 327, 12176, 803, 10335, 598, 12176, 3239, 10335, 13300, 3397, 18, 225, 5272, 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, 2569, 67, 3239, 12, 803, 16, 1633, 4672, 3536, 971, 12176, 803, 10335, 17874, 598, 12176, 3239, 68, 9191, 327, 12176, 803, 10335, 598, 12176, 3239, 10335, 13300, 3397, 18, 225, 5272, 327, ...
@param chan: The name of the channel to operate on. If it has no prefix, C{'
@param chan: The name of the channel to operate on.
def mode(self, chan, set, modes, limit = None, user = None, mask = None): """ Change the modes on a user or channel.
bda01226f2a3881515623e1ab1131e75340f6fbb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12595/bda01226f2a3881515623e1ab1131e75340f6fbb/irc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1965, 12, 2890, 16, 3861, 16, 444, 16, 12382, 16, 1800, 273, 599, 16, 729, 273, 599, 16, 3066, 273, 599, 4672, 3536, 7576, 326, 12382, 603, 279, 729, 578, 1904, 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, 1965, 12, 2890, 16, 3861, 16, 444, 16, 12382, 16, 1800, 273, 599, 16, 729, 273, 599, 16, 3066, 273, 599, 4672, 3536, 7576, 326, 12382, 603, 279, 729, 578, 1904, 18, 2, -100, -100, -1...
def getAssets(self, assetMacros=None):
def getAssets(self, assetMacros={}):
def getAssets(self, assetMacros=None):
903be73d15fc83f4997001e909a9ea894da63548 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/903be73d15fc83f4997001e909a9ea894da63548/Class.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 10726, 12, 2890, 16, 3310, 9990, 6973, 33, 7036, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 10726, 12, 2890, 16, 3310, 9990, 6973, 33, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
mode == 'clip'
mode = 'clip'
def flagdata2(vis = None, flagbackup = None, selectdata = None, spw = None, field = None, antenna = None, uvrange = None, timerange = None, correlation = None, scan = None, feed = None, array = None, manualflag = None, mf_spw = None, mf_field = None, mf_antenna = None, mf_uvrange = None, mf_timerange = None, mf_correlation = None, mf_scan = None, mf_feed = None, mf_array = None, clip = None, clipexpr = None, clipminmax = None, clipcolumn = None, clipoutside = None, channelavg = None, shadow = None, diameter = None, quack = None, quackinterval = None, quackmode = None, quackincrement = None, autoflag = None, algorithm = None, column = None, expr = None, thr = None, window = None, rfi = None, rfi_clipexpr = None, rfi_clipcolumn = None, rfi_time_amp_cutoff = None, rfi_freq_amp_cutoff = None, rfi_freqlinefit = None, rfi_auto_cross = None, rfi_num_time = None, rfi_start_chan = None, rfi_end_chan = None, rfi_bs_cutoff = None, rfi_ant_cutoff = None, rfi_flag_level = None, summary = None, minrel = None, maxrel = None, minabs = None, maxabs = None, unflag = None): casalog.origin('flagdata2') fg.done() fg.clearflagselection(0)
915eb1326133d44916ec51646dcde4ac6301d5ca /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2098/915eb1326133d44916ec51646dcde4ac6301d5ca/task_flagdata2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2982, 892, 22, 12, 3516, 273, 599, 16, 2982, 9572, 273, 599, 16, 2027, 892, 273, 599, 16, 1694, 91, 273, 599, 16, 652, 273, 599, 16, 392, 2253, 6582, 273, 599, 16, 14303, 3676, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2982, 892, 22, 12, 3516, 273, 599, 16, 2982, 9572, 273, 599, 16, 2027, 892, 273, 599, 16, 1694, 91, 273, 599, 16, 652, 273, 599, 16, 392, 2253, 6582, 273, 599, 16, 14303, 3676, 273, ...