rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
def test_xml_backend( core_env, conf ) : returningval = True
def test_xml_backend( env, conf ) : crosscompiling=env.has_key('crossmingw') and env['crossmingw']
def test_xml_backend( core_env, conf ) : returningval = True if core_env['xmlbackend'] == 'both' or core_env['xmlbackend'] == 'xercesc' : failed = False if not failed and not conf.CheckCXXHeader('xercesc/util/PlatformUtils.hpp') : print "Could not find xerces c headers! Defaulting to the null xml backend" failed = True core_env['ENV'] = os.environ print('path of app: ' + core_env['ENV']['PATH']) if not failed and not conf.check_xerces_c( conf ) : print "xerces c code compile/link/run test failed! Check config.log for details..." failed = True if not failed : core_env.Append( CPPFLAGS=['-DUSE_XERCES_TRUE', '-DCLAM_USE_XML'] ) else : core_env['xmlbackend'] = 'none' returningval = False if core_env['xmlbackend'] == 'both' or core_env['xmlbackend'] == 'xmlpp' : failed = False if core_env['pkg_config_available'] : res = conf.pkg_config_check_existence( conf, name='libxml++-2.6' ) if res : core_env.ParseConfig( 'pkg-config --cflags --libs libxml++-2.6' ) else : failed = True else : failed = True if not failed and not conf.check_xmlpp( conf ) : print "\tERROR: libxml++ code compile/link/run test failed! Check config.log for details" failed = True if not failed: core_env.Append( CPPFLAGS=['-DUSE_XMLPP_TRUE','-DCLAM_USE_XML'] ) else : core_env['xmlbackend'] = 'none' returningval = False return returningval
3b2775acdc54a677de237741e3af8ce52371f3d0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1456/3b2775acdc54a677de237741e3af8ce52371f3d0/clam_dependent_libs_checks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2902, 67, 9993, 12, 1550, 16, 2195, 262, 294, 6828, 2919, 4973, 33, 3074, 18, 5332, 67, 856, 2668, 14653, 11987, 91, 6134, 471, 1550, 3292, 14653, 11987, 91, 3546, 225, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2902, 67, 9993, 12, 1550, 16, 2195, 262, 294, 6828, 2919, 4973, 33, 3074, 18, 5332, 67, 856, 2668, 14653, 11987, 91, 6134, 471, 1550, 3292, 14653, 11987, 91, 3546, 225, 309, ...
if not os.path.isdir(path) and not os.path.isfile(path):
if os.path.islink(path): continue if not os.path.isdir(path) and not (os.path.isfile(path)):
def rmTmp(statusObj, status): statusObj.logger.debug("\tremoving tmpdir") for (dirpath, dirnames, filenames) in os.walk(statusObj.tmpdir): for f in filenames + dirnames: path = os.path.join(dirpath, f) if not os.path.isdir(path) and not os.path.isfile(path): continue oldmode = stat.S_IMODE(os.stat(path)[stat.ST_MODE]) os.chmod(path, oldmode | stat.S_IRWXU) shutil.rmtree(statusObj.tmpdir)
2478b300ee845f47a0572a31358e29abecaf7936 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/36/2478b300ee845f47a0572a31358e29abecaf7936/extract_common.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6692, 9161, 12, 2327, 2675, 16, 1267, 4672, 1267, 2675, 18, 4901, 18, 4148, 31458, 88, 2764, 13767, 20213, 7923, 364, 261, 1214, 803, 16, 1577, 1973, 16, 9066, 13, 316, 1140, 18, 11348, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6692, 9161, 12, 2327, 2675, 16, 1267, 4672, 1267, 2675, 18, 4901, 18, 4148, 31458, 88, 2764, 13767, 20213, 7923, 364, 261, 1214, 803, 16, 1577, 1973, 16, 9066, 13, 316, 1140, 18, 11348, ...
@cart_length.setter
@pendulum_length.setter
def pendulum_length(self): """ Get length of the pendulum """ return stw.invertedPendulumGetPendulumLength(self.object)
fbaae56859576ba13e77a15d1487efad0194420b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14206/fbaae56859576ba13e77a15d1487efad0194420b/inverted_pendulum.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31472, 332, 379, 67, 2469, 12, 2890, 4672, 3536, 968, 769, 434, 326, 31472, 332, 379, 3536, 327, 384, 91, 18, 267, 25631, 52, 409, 332, 379, 967, 52, 409, 332, 379, 1782, 12, 2890, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 31472, 332, 379, 67, 2469, 12, 2890, 4672, 3536, 968, 769, 434, 326, 31472, 332, 379, 3536, 327, 384, 91, 18, 267, 25631, 52, 409, 332, 379, 967, 52, 409, 332, 379, 1782, 12, 2890, 1...
if TRNS[-1] == 'virtual_hosting':
if len(TRNS)>1 and TRNS[-1] == 'virtual_hosting':
def setskin(site, event): """ Depending on the skin property set on the subsite we override the default skin. """ storage = component.queryUtility(ISubsiteSkinStorage) if storage is None: return R = event.request path_info = R.PATH_INFO TRNS = R.TraversalRequestNameStack if TRNS[-1] == 'virtual_hosting': trnspath = TRNS[:-2] trnspath.reverse() path = "/".join(site.getPhysicalPath()+tuple(trnspath)) else: path = path_info skinname = storage.get(path, None) if skinname is None: return site.changeSkin(skinname, R)
6fbf132c7b729948c13247a07d77e961afb147d2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8861/6fbf132c7b729948c13247a07d77e961afb147d2/skinswitcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1678, 15984, 12, 4256, 16, 871, 4672, 3536, 4019, 2846, 603, 326, 18705, 1272, 444, 603, 326, 720, 4256, 732, 3849, 326, 805, 18705, 18, 3536, 2502, 273, 1794, 18, 2271, 6497, 12, 45, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1678, 15984, 12, 4256, 16, 871, 4672, 3536, 4019, 2846, 603, 326, 18705, 1272, 444, 603, 326, 720, 4256, 732, 3849, 326, 805, 18705, 18, 3536, 2502, 273, 1794, 18, 2271, 6497, 12, 45, ...
author_email='zope3-dev@zope.org',
author_email='zope-dev@zope.org',
def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
2f2e363f731a192f6672065b12083a54bced0e3d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9501/2f2e363f731a192f6672065b12083a54bced0e3d/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 30857, 86, 1973, 4672, 327, 1696, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 3631, 380, 86, 1973, 13, 2934, 896, 1435, 225, 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, 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, 855, 30857, 86, 1973, 4672, 327, 1696, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 3631, 380, 86, 1973, 13, 2934, 896, 1435, 225, 2, -100, -100, -100,...
tmp = None
tmp = None
def test_dis_del_on_close(self): # Tests that delete-on-close can be disabled dir = tempfile.mkdtemp()
2fc61a5cc83f50bb62889ba202d06060097f1c85 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/2fc61a5cc83f50bb62889ba202d06060097f1c85/test_tempfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2251, 67, 3771, 67, 265, 67, 4412, 12, 2890, 4672, 468, 7766, 87, 716, 1430, 17, 265, 17, 4412, 848, 506, 5673, 1577, 273, 13275, 18, 24816, 72, 5814, 1435, 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, 1842, 67, 2251, 67, 3771, 67, 265, 67, 4412, 12, 2890, 4672, 468, 7766, 87, 716, 1430, 17, 265, 17, 4412, 848, 506, 5673, 1577, 273, 13275, 18, 24816, 72, 5814, 1435, 2, -100, -100, ...
last_button_position = self.x + self.horizontal_padding
last_button_position = self.x + self.horizontal_padding + self.button_spacing
def _do_layout(self, component=None): if component is None: component = self.component
cd26d086eb854957e9f8da859dbc19d599a034a5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13167/cd26d086eb854957e9f8da859dbc19d599a034a5/plot_toolbar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 6741, 12, 2890, 16, 1794, 33, 7036, 4672, 309, 1794, 353, 599, 30, 1794, 273, 365, 18, 4652, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 6741, 12, 2890, 16, 1794, 33, 7036, 4672, 309, 1794, 353, 599, 30, 1794, 273, 365, 18, 4652, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
elif count > 400: print "Sorry, %s tickets and Pivotal won't import more than 400..." % count sys.exit(42) w = open(write, "wb") return (r, w)
else: print "Converting %s tickets..." % count return (r, write)
def getargs(): """ get database file to read and csv file to write from commandline """ try: read = sys.argv[1] write = sys.argv[2] print 'Reading "%s", writing "%s".' % (sys.argv[1], sys.argv[2]) if os.path.isfile(read) and not os.path.isfile(write): r = sqlite3.connect(read) count = r.execute("select count() from ticket").fetchall()[0][0] if count == 0: print "No tickets in data base..." sys.exit(0) elif count > 400: print "Sorry, %s tickets and Pivotal won't import more than 400..." % count sys.exit(42) w = open(write, "wb") return (r, w) else: print 'ERROR: Either file "%s" does not exist or file "%s" does already exist.' % (read, write) sys.exit(1) except IndexError: print 'Try "%s trac.db output.csv' % (sys.argv[0]) sys.exit(1)
bc8b0c81ad1d37c75fce07de5db358fc47e004a4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13572/bc8b0c81ad1d37c75fce07de5db358fc47e004a4/trac2pivotal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1968, 13332, 3536, 336, 2063, 585, 358, 855, 471, 6101, 585, 358, 1045, 628, 28305, 3536, 775, 30, 855, 273, 2589, 18, 19485, 63, 21, 65, 1045, 273, 2589, 18, 19485, 63, 22, 65, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1968, 13332, 3536, 336, 2063, 585, 358, 855, 471, 6101, 585, 358, 1045, 628, 28305, 3536, 775, 30, 855, 273, 2589, 18, 19485, 63, 21, 65, 1045, 273, 2589, 18, 19485, 63, 22, 65, ...
CallLater(5, auth_failed)
auth_failed()
def auth_failed(msg="Authentication failed."): if not self._closed: self.attempted_logins += 1 if self.attempted_logins >= self.max_login_attempts: msg = "530 " + msg + " Disconnecting." self.respond(msg) self.log(msg) self.close_when_done() else: self.respond("530 " + msg) self.log(msg) self.sleeping = False
788a0071ab45a8367ccf5fe97d060b43da1dd666 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/788a0071ab45a8367ccf5fe97d060b43da1dd666/ftpserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1357, 67, 7307, 12, 3576, 1546, 6492, 2535, 1199, 4672, 309, 486, 365, 6315, 12204, 30, 365, 18, 11764, 329, 67, 1330, 2679, 1011, 404, 309, 365, 18, 11764, 329, 67, 1330, 2679, 1545, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1357, 67, 7307, 12, 3576, 1546, 6492, 2535, 1199, 4672, 309, 486, 365, 6315, 12204, 30, 365, 18, 11764, 329, 67, 1330, 2679, 1011, 404, 309, 365, 18, 11764, 329, 67, 1330, 2679, 1545, ...
xt = x + pctdistance*radius*math.cos(thetam) yt = y + pctdistance*radius*math.sin(thetam) if is_string_like(autopct): s = autopct%(100.*frac) elif callable(autopct): s = autopct(100.*frac) else: raise TypeError('autopct must be callable or a format string') t = self.ax.text(xt, yt, s, horizontalalignment='center', verticalalignment='center')
xt = x + pctdistance * radius * math.cos( thetam ) yt = y + pctdistance * radius * math.sin( thetam ) if is_string_like( autopct ): s = autopct % ( 100. * frac ) elif callable( autopct ): s = autopct( 100. * frac ) else: raise TypeError( 'autopct must be callable or a format string' ) t = self.ax.text( xt, yt, s, horizontalalignment = 'center', verticalalignment = 'center' )
def pie(self, explode=None, colors=None, autopct=None, pctdistance=0.6, shadow=False ): start = time.time() labels = self.pdata.getLabels(use_plotdata=True) #labels.reverse() values = [l[1] for l in labels] x = numpy.array(values, numpy.float64) self.legendData = labels
423d7ba6a07ac9928874a4f9fd7da58c86c8cfcf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/423d7ba6a07ac9928874a4f9fd7da58c86c8cfcf/PieGraph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 1385, 12, 2890, 16, 3172, 33, 7036, 16, 5740, 33, 7036, 16, 2059, 556, 299, 33, 7036, 16, 19857, 8969, 33, 20, 18, 26, 16, 10510, 33, 8381, 262, 30, 225, 787, 273, 813, 18, 95...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 1385, 12, 2890, 16, 3172, 33, 7036, 16, 5740, 33, 7036, 16, 2059, 556, 299, 33, 7036, 16, 19857, 8969, 33, 20, 18, 26, 16, 10510, 33, 8381, 262, 30, 225, 787, 273, 813, 18, 95...
if token == "+=" or (token == "=" and key == "@INCLUDE"):
if token=="+=" or (token=="=" and key=="@INCLUDE"):
def append_data(data, key, new_data, token): if new_data or len(data[key]) == 0: data[key].append(token) else: data[key][-1] += token
1be18a2af8b3880d492f80349c68c4d9cf1ae16a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2548/1be18a2af8b3880d492f80349c68c4d9cf1ae16a/Doxygen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 67, 892, 12, 892, 16, 498, 16, 394, 67, 892, 16, 1147, 4672, 309, 394, 67, 892, 578, 562, 12, 892, 63, 856, 5717, 422, 374, 30, 501, 63, 856, 8009, 6923, 12, 2316, 13, 469, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 67, 892, 12, 892, 16, 498, 16, 394, 67, 892, 16, 1147, 4672, 309, 394, 67, 892, 578, 562, 12, 892, 63, 856, 5717, 422, 374, 30, 501, 63, 856, 8009, 6923, 12, 2316, 13, 469, ...
body { font: 90%% arial, swiss, helvetica }
body { font: 90%% arial, swiss, helvetica; margin: 0 }
def __init__(self, uiPort, bayes): uiArgs = (bayes,) Listener.__init__(self, uiPort, UserInterface, uiArgs)
bb67db5e2dc016a7be764205cf241b78d334ff9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/bb67db5e2dc016a7be764205cf241b78d334ff9b/pop3proxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5915, 2617, 16, 324, 528, 281, 4672, 5915, 2615, 273, 261, 70, 528, 281, 16, 13, 10652, 16186, 2738, 972, 12, 2890, 16, 5915, 2617, 16, 21369, 16, 5915, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 5915, 2617, 16, 324, 528, 281, 4672, 5915, 2615, 273, 261, 70, 528, 281, 16, 13, 10652, 16186, 2738, 972, 12, 2890, 16, 5915, 2617, 16, 21369, 16, 5915, ...
'expected': {'testsparsefloat': SP.csc_matrix(array([[-1+2j,0,2],[0,-3j,0]]))},
'expected': {'testsparsefloat': SP.coo_matrix(array([[-1+2j,0,2],[0,-3j,0]]))},
def _rt_check_case(name, expected, format): mat_stream = StringIO() savemat(mat_stream, expected, format=format) mat_stream.seek(0) _check_case(name, [mat_stream], expected)
fe9ca17b08307388f64d4152ff758a527f5587c8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/fe9ca17b08307388f64d4152ff758a527f5587c8/test_mio.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3797, 67, 1893, 67, 3593, 12, 529, 16, 2665, 16, 740, 4672, 4834, 67, 3256, 273, 15777, 1435, 4087, 351, 270, 12, 7373, 67, 3256, 16, 2665, 16, 740, 33, 2139, 13, 4834, 67, 3256...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3797, 67, 1893, 67, 3593, 12, 529, 16, 2665, 16, 740, 4672, 4834, 67, 3256, 273, 15777, 1435, 4087, 351, 270, 12, 7373, 67, 3256, 16, 2665, 16, 740, 33, 2139, 13, 4834, 67, 3256...
x = 1.0 | 2.0
x = 1.0 x |= 1.0
def rs(): x = 1.0 | 2.0
71e14f58518590b6a7bb580331ff9cf412527db2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14925/71e14f58518590b6a7bb580331ff9cf412527db2/test_regression.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3597, 13332, 619, 273, 404, 18, 20, 571, 576, 18, 20, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3597, 13332, 619, 273, 404, 18, 20, 571, 576, 18, 20, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
'PIF', func, *args, **kwargs)
class_name, func, *args, **kwargs)
def valid_object(class_name): """Decorator to verify if object is valid before calling method. @param func: function with params: (self, session, pif_ref) @rtype: callable object """ return lambda func: \ lambda *args, **kwargs: \ _check_ref(lambda r: \ XendAPIStore.get(r, class_name) is not None, 'PIF', func, *args, **kwargs)
60cdacb47da0235eea76691688563cd2706aaa29 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6195/60cdacb47da0235eea76691688563cd2706aaa29/XendAPI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 923, 67, 1612, 12, 1106, 67, 529, 4672, 3536, 10361, 358, 3929, 309, 733, 353, 923, 1865, 4440, 707, 18, 225, 632, 891, 1326, 30, 445, 598, 859, 30, 261, 2890, 16, 1339, 16, 293, 430...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 923, 67, 1612, 12, 1106, 67, 529, 4672, 3536, 10361, 358, 3929, 309, 733, 353, 923, 1865, 4440, 707, 18, 225, 632, 891, 1326, 30, 445, 598, 859, 30, 261, 2890, 16, 1339, 16, 293, 430...
return GROUP_MEMBER_DIRECT_URL % (domain, member_id, self._Bool2Str(direct_only))
return GROUP_MEMBER_DIRECT_URL % (domain, urllib.quote_plus(member_id), self._Bool2Str(direct_only))
def _ServiceUrl(self, service_type, is_existed, group_id, member_id, owner_email, start_key, direct_only=None, domain=None): if domain is None: domain = self.domain if service_type == 'group': if group_id != '' and is_existed: return GROUP_ID_URL % (domain, group_id) if member_id != '': if direct_only is not None: return GROUP_MEMBER_DIRECT_URL % (domain, member_id, self._Bool2Str(direct_only)) else: return GROUP_MEMBER_URL % (domain, member_id) if start_key != '': return GROUP_START_URL % (domain, start_key) return BASE_URL % (domain) if service_type == 'member': if member_id != '' and is_existed: return MEMBER_ID_URL % (domain, group_id, member_id) if start_key != '': return MEMBER_START_URL % (domain, group_id, start_key) return MEMBER_URL % (domain, group_id) if service_type == 'owner': if owner_email != '' and is_existed: return OWNER_ID_URL % (domain, group_id, owner_email) return OWNER_URL % (domain, group_id)
a4313b2e95974b9e4449afa950498d08d2e34e61 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5609/a4313b2e95974b9e4449afa950498d08d2e34e61/service.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1179, 1489, 12, 2890, 16, 1156, 67, 723, 16, 353, 67, 7398, 329, 16, 1041, 67, 350, 16, 3140, 67, 350, 16, 3410, 67, 3652, 16, 787, 67, 856, 16, 2657, 67, 3700, 33, 7036, 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, 389, 1179, 1489, 12, 2890, 16, 1156, 67, 723, 16, 353, 67, 7398, 329, 16, 1041, 67, 350, 16, 3140, 67, 350, 16, 3410, 67, 3652, 16, 787, 67, 856, 16, 2657, 67, 3700, 33, 7036, 16, ...
v = widget.get_text().strip()
v = widget.get_text().strip().encode('utf-8')
def text_changed(widget): v = widget.get_text().strip() if check_function != None: if not check_function(widget, v): return app.config.set(descriptor, v)
cb7b423e1a52c6befd7a6b2d78f45e0a38413137 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/cb7b423e1a52c6befd7a6b2d78f45e0a38413137/prefpanel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 977, 67, 6703, 12, 6587, 4672, 331, 273, 3604, 18, 588, 67, 955, 7675, 6406, 7675, 3015, 2668, 3158, 17, 28, 6134, 309, 866, 67, 915, 480, 599, 30, 309, 486, 866, 67, 915, 12, 6587, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 977, 67, 6703, 12, 6587, 4672, 331, 273, 3604, 18, 588, 67, 955, 7675, 6406, 7675, 3015, 2668, 3158, 17, 28, 6134, 309, 866, 67, 915, 480, 599, 30, 309, 486, 866, 67, 915, 12, 6587, ...
is the local parameter at P
is the local parameter at P
def local_coordinates_at_nonweierstrass(self, P, prec = 20, name = 't'): """ For a non-Weierstrass point P = (a,b) on the hyperelliptic curve y^2 = f(x), returns (x(t), y(t)) such that (y(t))^2 = f(x(t)), where t = x - a is the local parameter.
030d54071a81b42f8cb0b5bdab1d15f4f3edce25 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/030d54071a81b42f8cb0b5bdab1d15f4f3edce25/hyperelliptic_generic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1191, 67, 16941, 67, 270, 67, 5836, 1814, 20778, 313, 428, 12, 2890, 16, 453, 16, 13382, 273, 4200, 16, 508, 273, 296, 88, 11, 4672, 3536, 2457, 279, 1661, 17, 3218, 20778, 313, 428, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1191, 67, 16941, 67, 270, 67, 5836, 1814, 20778, 313, 428, 12, 2890, 16, 453, 16, 13382, 273, 4200, 16, 508, 273, 296, 88, 11, 4672, 3536, 2457, 279, 1661, 17, 3218, 20778, 313, 428, ...
security.declareProtected(permissions.View, 'Vocabulary')
security.declareProtected(CMFCorePermissions.View, 'Vocabulary')
def get_portal_metadata(self, field): """Returns the portal_metadata for a field. """ pmt = getToolByName(self, 'portal_metadata') policy = None try: spec = pmt.getElementSpec(field.accessor) policy = spec.getPolicy(self.portal_type)
460696da815e0d1149ab34005370b03bdbb656a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/460696da815e0d1149ab34005370b03bdbb656a6/BaseObject.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 24386, 67, 4165, 12, 2890, 16, 652, 4672, 3536, 1356, 326, 11899, 67, 4165, 364, 279, 652, 18, 3536, 293, 1010, 273, 336, 6364, 5911, 12, 2890, 16, 296, 24386, 67, 4165, 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, 24386, 67, 4165, 12, 2890, 16, 652, 4672, 3536, 1356, 326, 11899, 67, 4165, 364, 279, 652, 18, 3536, 293, 1010, 273, 336, 6364, 5911, 12, 2890, 16, 296, 24386, 67, 4165, 6134,...
if not re.search(r"{{-.*-}}", l):
if not re.search(r"{{-.*-.*}}", l):
def parseText(self): inDefinition = False inAnagram = False inSynonym = False inAntonym = False inPron = False wordType = "" wordSubType = ""
2e7db129055f80b1ee24b678ddba316192b6734b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11306/2e7db129055f80b1ee24b678ddba316192b6734b/wiktio2xml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1528, 12, 2890, 4672, 316, 1852, 273, 1083, 316, 979, 17049, 273, 1083, 316, 10503, 6435, 273, 1083, 316, 14925, 6435, 273, 1083, 316, 52, 1949, 273, 1083, 2076, 559, 273, 1408, 20...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1528, 12, 2890, 4672, 316, 1852, 273, 1083, 316, 979, 17049, 273, 1083, 316, 10503, 6435, 273, 1083, 316, 14925, 6435, 273, 1083, 316, 52, 1949, 273, 1083, 2076, 559, 273, 1408, 20...
try: try: l = map(lambda x: ({'link': x['link'], 'title': x['title'], 'date': x['modified'], 'summary': x['summary']}), self.get_feed_items()) except: l = map(lambda x: ({'link': x['link'], 'title': x['title'], 'date': x['modified']}), self.get_feed_items()) except: l = map(lambda x: ({'link': x['link'], 'title': x['title']}), self.get_feed_items()) return l
return self._getAllChannelItems({'summary': 'summary', 'date': 'modified'}) def _getAllChannelItems(self, extra_tags={}): """Returns a list of dictionaries for each channel item with a link and a title. Only the link and title values are stored in the dictionary. To get the information from other tags, use the extra_tags parameter. @param extra_tags: mapping between the dictionary key and the feed tag, e.g. {'date': 'modified'} """ mandatory_tags = ['link', 'title'] L = [] for feed_item in self.get_feed_items(): x = {} incomplete_feed = False for tag in mandatory_tags: v = feed_item.get(tag, None) if v is None: incomplete_feed = True break x[tag] = v if incomplete_feed: continue for key, tag in extra_tags.items(): v = feed_item.get(tag, None) if v is not None: x[key] = v L.append(x) return L
def getAllChannelItems(self): #returns a list of dictionaries, where a dictionary stores the link and the title of the item try: try: l = map(lambda x: ({'link': x['link'], 'title': x['title'], 'date': x['modified'], 'summary': x['summary']}), self.get_feed_items()) except: l = map(lambda x: ({'link': x['link'], 'title': x['title'], 'date': x['modified']}), self.get_feed_items()) except: l = map(lambda x: ({'link': x['link'], 'title': x['title']}), self.get_feed_items()) return l
9534383fd982c0b85001fa1f164d2513c2cc4136 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/9534383fd982c0b85001fa1f164d2513c2cc4136/RemoteChannel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5514, 2909, 3126, 12, 2890, 4672, 468, 6154, 279, 666, 434, 16176, 16, 1625, 279, 3880, 9064, 326, 1692, 471, 326, 2077, 434, 326, 761, 775, 30, 775, 30, 328, 273, 852, 12, 14661, 619,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5514, 2909, 3126, 12, 2890, 4672, 468, 6154, 279, 666, 434, 16176, 16, 1625, 279, 3880, 9064, 326, 1692, 471, 326, 2077, 434, 326, 761, 775, 30, 775, 30, 328, 273, 852, 12, 14661, 619,...
if len(cmd)<7: cmd = cmd+(None,)
if len(cmd)<7: cmd += (None,)
def _addCommand(self,cmd): if cmd[0] in ('BACKGROUND','ROWBACKGROUNDS','COLBACKGROUNDS'): self._bkgrndcmds.append(cmd) elif cmd[0] == 'SPAN': self._spanCmds.append(cmd) elif _isLineCommand(cmd): # we expect op, start, stop, weight, colour, cap, dashes, join cmd = tuple(cmd) if len(cmd)<5: raise ValueError('bad line command '+str(cmd))
255ca0769f581869e21f0653db9d81fb66048941 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/255ca0769f581869e21f0653db9d81fb66048941/tables.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 2189, 12, 2890, 16, 4172, 4672, 309, 1797, 63, 20, 65, 316, 7707, 8720, 20166, 17023, 11226, 8720, 43, 1457, 2124, 3948, 17023, 4935, 8720, 43, 1457, 2124, 3948, 11, 4672, 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, 389, 1289, 2189, 12, 2890, 16, 4172, 4672, 309, 1797, 63, 20, 65, 316, 7707, 8720, 20166, 17023, 11226, 8720, 43, 1457, 2124, 3948, 17023, 4935, 8720, 43, 1457, 2124, 3948, 11, 4672, 365...
data = response.read()
try: data = response.read() except Exception, err: logging.error('SOAP error (on %s): %s' % (url, err)) raise SOAPException(url)
def soap_call(url, msg, client_cert = None): if url.startswith('http://'): host, query = urllib.splithost(url[5:]) conn = httplib.HTTPConnection(host) else: host, query = urllib.splithost(url[6:]) conn = httplib.HTTPSConnection(host, key_file = client_cert, cert_file = client_cert) try: conn.request('POST', query, msg, {'Content-Type': 'text/xml'}) response = conn.getresponse() except Exception, err: logging.error('SOAP error (on %s): %s' % (url, err)) raise SOAPException(url) data = response.read() conn.close() if response.status not in (200, 204): # 204 ok for federation termination logging.warning('SOAP error (%s) (on %s)' % (response.status, url)) raise SOAPException(url) return data
051997e947d57156ad346cbfad3f93d1c3bc5ffc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11208/051997e947d57156ad346cbfad3f93d1c3bc5ffc/common.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9930, 67, 1991, 12, 718, 16, 1234, 16, 1004, 67, 7593, 273, 599, 4672, 309, 880, 18, 17514, 1918, 2668, 2505, 8931, 4672, 1479, 16, 843, 273, 11527, 18, 13106, 483, 669, 12, 718, 63, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9930, 67, 1991, 12, 718, 16, 1234, 16, 1004, 67, 7593, 273, 599, 4672, 309, 880, 18, 17514, 1918, 2668, 2505, 8931, 4672, 1479, 16, 843, 273, 11527, 18, 13106, 483, 669, 12, 718, 63, ...
pass
pass
def foo(x,y=10): pass
9b6db13f49754700b2d864e63d36e3d5b7ea6060 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6753/9b6db13f49754700b2d864e63d36e3d5b7ea6060/bugs100.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8431, 12, 92, 16, 93, 33, 2163, 4672, 1342, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8431, 12, 92, 16, 93, 33, 2163, 4672, 1342, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
analyzeInstalledPkgs()
analyzeInstalledPkgs()
def evidenceThisIsInstalled(pl): """ Checks to see if there is evidence that the item described by pl (any version) is currently installed. If any tests pass, the item might be installed. So this isn't the same as isInstalled() """ global pkgdata if pl.get('uninstall_method') == "removepackages": # we're supposed to use receipt info to remove # this, so we should check for relevent receipts if pl.get('receipts'): if pkgdata == {}: # build our database of installed packages analyzeInstalledPkgs() if pl['name'] in pkgdata['installed_names']: return True #if 'aliases' in pl: # for alias in pl['aliases']: # if alias in pkgdata['installed_names']: # return True elif 'installs' in pl: installitems = pl['installs'] foundallinstallitems = True for item in installitems: if 'path' in item: # we can only check by path; if the item has been moved # we're not clever enough to find it, and our removal # methods are currently even less clever if not os.path.exists(item['path']): # this item isn't on disk foundallinstallitems = False if foundallinstallitems: return True # if we got this far, we failed all the tests, so the item # must not be installed (or we dont't have the right info...) return False
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, 14481, 2503, 2520, 16747, 12, 412, 4672, 3536, 13074, 358, 2621, 309, 1915, 353, 14481, 716, 326, 761, 11893, 635, 886, 261, 2273, 1177, 13, 353, 4551, 5876, 18, 971, 1281, 7434, 1342, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14481, 2503, 2520, 16747, 12, 412, 4672, 3536, 13074, 358, 2621, 309, 1915, 353, 14481, 716, 326, 761, 11893, 635, 886, 261, 2273, 1177, 13, 353, 4551, 5876, 18, 971, 1281, 7434, 1342, 1...
if code == 500 and headers.get("content-type","text/xml") != "text/xml":
if code == 500 and not startswith(content_type, "text/xml"):
def call(self, addr, data, soapaction = '', encoding = None, http_proxy = None, config = Config):
09f854f9a4ae0928fd313f5d59a64d4315cc7e01 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/09f854f9a4ae0928fd313f5d59a64d4315cc7e01/SOAP.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 12, 2890, 16, 3091, 16, 501, 16, 9930, 1128, 273, 10226, 2688, 273, 599, 16, 1062, 67, 5656, 273, 599, 16, 642, 273, 1903, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 12, 2890, 16, 3091, 16, 501, 16, 9930, 1128, 273, 10226, 2688, 273, 599, 16, 1062, 67, 5656, 273, 599, 16, 642, 273, 1903, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100,...
result = client.inventory.inventoryExists('UUID7')
result = client.inventory.inventoryExists('UUID5')
def test104macosxInject(self): """ Inject a MAC OS X inventory """ os.system('gunzip -c ../data/ocs-os-x-10.4.xml.gz | $PULSE2/services/contrib/Ocsinventory_local.pl -u http://127.0.0.1:9999 --stdin') time.sleep(20) result = client.inventory.inventoryExists('UUID7') self.assertTrue(result)
db73fa9ceebe970bea994d0f51f7550ebd4caf67 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5988/db73fa9ceebe970bea994d0f51f7550ebd4caf67/mmcagent-inventory-inject.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 21869, 5821, 538, 92, 15598, 12, 2890, 4672, 3536, 20085, 279, 14246, 5932, 1139, 13086, 3536, 1140, 18, 4299, 2668, 19339, 4450, 300, 71, 6116, 19, 892, 19, 22280, 17, 538, 17, 92...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 21869, 5821, 538, 92, 15598, 12, 2890, 4672, 3536, 20085, 279, 14246, 5932, 1139, 13086, 3536, 1140, 18, 4299, 2668, 19339, 4450, 300, 71, 6116, 19, 892, 19, 22280, 17, 538, 17, 92...
(?:
(
def parse(self, text, lineno, memo, parent): """ Return 2 lists: nodes (text and inline elements), and system_messages.
039645ec5706bfe06b64e66663e62db9bc1abf30 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/039645ec5706bfe06b64e66663e62db9bc1abf30/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 977, 16, 7586, 16, 11063, 16, 982, 4672, 3536, 2000, 576, 6035, 30, 2199, 261, 955, 471, 6370, 2186, 3631, 471, 2619, 67, 6833, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 977, 16, 7586, 16, 11063, 16, 982, 4672, 3536, 2000, 576, 6035, 30, 2199, 261, 955, 471, 6370, 2186, 3631, 471, 2619, 67, 6833, 18, 2, -100, -100, -100, -100, -100,...
b_isos -= b_dec sel = b_isos <= 0.
b_isos -= b_decs sel = b_isos <= b_target
def __init__(self, fmodels, model, target_weights, log, time_step = 0.0005, number_of_macro_cycles = 500, temperature = 300., n_steps = 10, eq_cycles = None, b_target = 1.0, b_target_cycles = 5, tx = 1.0): fmodel = fmodels.fmodel_xray() assert fmodel.xray_structure is model.xray_structure xray_structure_last_updated = model.xray_structure.deep_copy_scatterers() xrs_start = fmodels.fmodel_xray().xray_structure.deep_copy_scatterers() xray_gradient = None reset_velocities = True f_calc_average = None wx = target_weights.xyz_weights_result.wx * \ target_weights.xyz_weights_result.wx_scale # if 1: b_isos = fmodel.xray_structure.scatterers().extract_u_iso()/adptbx.b_as_u(1) assert b_target_cycles != 0 b_dec = (flex.min(b_isos) - b_target)/number_of_macro_cycles # self.xray_structures = [] self.pdb_hierarchy = model.pdb_hierarchy for macro_cycle in xrange(number_of_macro_cycles): print >> log if(macro_cycle == 0): print >> log, "mc: %d r_work=%6.4f r_free=%6.4f"%( macro_cycle, fmodel.r_work(), fmodel.r_free()) assert fmodel.xray_structure is model.xray_structure cd_manager = cartesian_dynamics.cartesian_dynamics( structure = model.xray_structure, restraints_manager = model.restraints_manager, temperature = temperature, n_steps = n_steps, time_step = time_step, initial_velocities_zero_fraction = 0, fmodel = fmodel, xray_target_weight = wx, chem_target_weight = target_weights.xyz_weights_result.w, xray_structure_last_updated = xray_structure_last_updated, shift_update = 0.0, xray_gradient = xray_gradient, reset_velocities = reset_velocities, update_f_calc = False, log = log) reset_velocities = False xray_structure_last_updated = \ cd_manager.xray_structure_last_updated.deep_copy_scatterers() result = xrs_start.distances(other = model.xray_structure).min_max_mean().as_tuple() xray_gradient = cd_manager.xray_gradient assert model.xray_structure is cd_manager.structure fmodel.update_xray_structure( xray_structure = model.xray_structure, update_f_calc = True, update_f_mask = True) if(macro_cycle > 0): print >> log, "mc: %d r_work=%6.4f r_free=%6.4f deviation (max,mean)=%5.3f %5.3f"%( macro_cycle, fmodel.r_work(), fmodel.r_free(),result[1], result[2]) # if(eq_cycles is not None): if(macro_cycle > eq_cycles): self.xray_structures.append(model.xray_structure.deep_copy_scatterers()) else: self.xray_structures.append(model.xray_structure.deep_copy_scatterers()) # f_calc = fmodels.fmodel_xray().f_calc() if(f_calc_average is None): f_calc_average = f_calc else: a_prime = math.exp(-cd_manager.n_steps*time_step/tx) f_calc_data = f_calc.data() f_calc_average_data = f_calc_average.data() f_calc_average_data = a_prime * f_calc_average_data + (1.-a_prime) * f_calc_data f_calc_average = f_calc_average.array(data = f_calc_average_data) fmodel.update(f_calc = f_calc_average) # if 1: b_isos = fmodel.xray_structure.scatterers().extract_u_iso()/adptbx.b_as_u(1) b_isos -= b_dec sel = b_isos <= 0. b_isos = b_isos.set_selected(sel, b_target) fmodels.fmodel_xray().xray_structure.set_b_iso(values = b_isos) # if(macro_cycle > 0): print >> log, "mc: %d r_work=%6.4f r_free=%6.4f deviation (max,mean)=%5.3f %5.3f"%( macro_cycle, fmodel.r_work(), fmodel.r_free(),result[1], result[2]) # Modify occupancies in-place for i_model in xrange(len(self.xray_structures)): self.xray_structures[i_model].set_occupancies( value = (100./len(self.xray_structures))/100) # self.write_pdb(out = open("ta_multi_model.pdb", "w")) # if 0: fmodel_ = utils.fmodel_simple( xray_structures = self.xray_structures, f_obs = fmodel.f_obs, r_free_flags = fmodel.r_free_flags) print >> log, "FINAL Rwork=%6.4f Rfree=%6.4f" % ( fmodel_.r_work(), fmodel_.r_free())
fb3b5d6d8999a97a1cb5c62afb86ec753a024b62 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/696/fb3b5d6d8999a97a1cb5c62afb86ec753a024b62/time_averaging.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 284, 7665, 16, 938, 16, 1018, 67, 9727, 16, 613, 16, 813, 67, 4119, 273, 374, 18, 3784, 25, 16, 1300, 67, 792, 67, 26448, 67, 23976, 273, 6604, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 284, 7665, 16, 938, 16, 1018, 67, 9727, 16, 613, 16, 813, 67, 4119, 273, 374, 18, 3784, 25, 16, 1300, 67, 792, 67, 26448, 67, 23976, 273, 6604, 16, 1...
if rnd is round_up:
if rnd == round_up:
def round_int(x, n, rnd): if rnd is round_nearest: if x >= 0: t = x >> (n-1) if t & 1 and ((t & 2) or (x & h_mask[n<300][n])): return (t>>1)+1 else: return t>>1 else: return -round_int(-x, n, rnd) if rnd is round_floor: return x >> n if rnd is round_ceiling: return -((-x) >> n) if rnd is round_down: if x >= 0: return x >> n return -((-x) >> n) if rnd is round_up: if x >= 0: return -((-x) >> n) return x >> n
9780c6d916cc9309b6669c056423418d7104c66e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11851/9780c6d916cc9309b6669c056423418d7104c66e/libmpf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3643, 67, 474, 12, 92, 16, 290, 16, 20391, 4672, 309, 20391, 353, 3643, 67, 25785, 30, 309, 619, 1545, 374, 30, 268, 273, 619, 1671, 261, 82, 17, 21, 13, 309, 268, 473, 404, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3643, 67, 474, 12, 92, 16, 290, 16, 20391, 4672, 309, 20391, 353, 3643, 67, 25785, 30, 309, 619, 1545, 374, 30, 268, 273, 619, 1671, 261, 82, 17, 21, 13, 309, 268, 473, 404, 471, 1...
print "Could not find fftw library headers...!" return False
return config_error("Could not find fftw library headers...!")
def test_fftw_linux( env, conf ) : if env['double'] : # CLAM uses double for TData nonPrefixHeader = conf.CheckCHeader( 'fftw.h' ) prefixHeader = conf.CheckCHeader( 'dfftw.h' ) if not prefixHeader and not nonPrefixHeader : print "Could not find fftw library headers...!" return False double_prefixed = not nonPrefixHeader if double_prefixed : realHeader = 'rfftw.h' lib = 'fftw' realLib = 'rfftw' else: realHeader = 'drfftw.h' lib = 'dfftw' realLib = 'drfftw' if not conf.CheckCHeader( realHeader ) : print "Could not find '%s' headers!"%realHeader return False if not conf.CheckLib( lib, 'fftw_sizeof_fftw_real') : print "Could not find '%s'!"%lib return False if not conf.CheckLib( realLib, 'rfftw_create_plan' ) : print "Could not find' %s'!"%realLib return False if not double_prefixed : result = conf.check_fftw_double_wo_prefix() else : result = conf.check_fftw_double_w_prefix() if not result : print "fftw compile/link/run tests failed! Check config.log for details" return False if not double_prefixed : result = conf.check_rfftw_double_wo_prefix() else : result = conf.check_rfftw_double_w_prefix() if not result : print "rfftw compile/link/run tests failed! Check config.log for details" return False else : result = conf.CheckCHeader( 'sfftw.h' ) if not result : print "Could not find fftw library headers...!" return False result = conf.CheckCHeader( 'srfftw.h' ) if not result : print "Could not find some of the fftw library headers...!" return False result = conf.CheckLib( 'sfftw', 'fftw_sizeof_fftw_real') if not result : print "Could not find libsfftw" return False result = conf.CheckLib( 'srfftw', 'rfftw_create_plan' ) if not result : print "Could not find libsrfftw" return False result = conf.check_fftw_float_w_prefix() if not result : print "fftw compile/link/run tests failed! Check config.log for details" return False result = conf.check_rfftw_float_w_prefix() if not result : print "rfftw compile/link/run tests failed! Check config.log for details" return False env.Append( CPPFLAGS=['-DUSE_FFTW=1'] ) return True
3b2775acdc54a677de237741e3af8ce52371f3d0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1456/3b2775acdc54a677de237741e3af8ce52371f3d0/clam_dependent_libs_checks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 25174, 91, 67, 20132, 12, 1550, 16, 2195, 262, 294, 225, 309, 1550, 3292, 9056, 3546, 294, 468, 14934, 2192, 4692, 1645, 364, 399, 751, 1661, 2244, 1864, 273, 2195, 18, 1564, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 25174, 91, 67, 20132, 12, 1550, 16, 2195, 262, 294, 225, 309, 1550, 3292, 9056, 3546, 294, 468, 14934, 2192, 4692, 1645, 364, 399, 751, 1661, 2244, 1864, 273, 2195, 18, 1564, ...
self.currentSketch.Erase(dc)
self.paintPreview() self.Refresh()
def onMouseMotion(self, event): """ Created: 24.03.2005, KP Description: Update the mouse position and the rendering according to user action, e.g. draw a rubber band when zooming to selected region """ if not event.Dragging(): self.scrollPos = None self.zoomDragPos = None if (event.LeftIsDown() or event.MiddleIsDown()) and event.Dragging(): if self.scrollPos and self.action != ZOOM_TO_BAND and self.action != ADD_ANNOTATION and self.action != ADD_ROI: self.changeScrollByDifference(self.scrollPos, event.GetPosition()) self.scrollPos = event.GetPosition() if event.RightIsDown(): yPos = event.GetPosition()[1] if self.zoomDragPos: dy = yPos - self.zoomDragPos f = self.getZoomFactor() if dy > 0: f-=0.1 elif dy < 0: f+=0.1 scripting.visualizer.setZoomFactor(f) scripting.visualizer.Render() if event.Dragging(): self.zoomDragPos = yPos if event.LeftIsDown(): self.actionend = event.GetPosition() if self.action == ZOOM_TO_BAND or self.action == ADD_ANNOTATION or self.action == ADD_ROI: self.paintPreview() self.Refresh() pos = event.GetPosition() if self.currentSketch: self.actionend = pos x0, y0, w, h = self.GetClientRect() self.currentSketch.setTentativePoint((pos)) dc = wx.ClientDC(self) self.PrepareDC(dc) self.currentSketch.Erase(dc) self.currentSketch.Draw(dc) dc.EndDrawing() event.Skip()
820380c1e2dd1a0734e14ecc842649f9aaeb458a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2877/820380c1e2dd1a0734e14ecc842649f9aaeb458a/InteractivePanel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21000, 29360, 12, 2890, 16, 871, 4672, 3536, 12953, 30, 4248, 18, 4630, 18, 6976, 25, 16, 1475, 52, 6507, 30, 2315, 326, 7644, 1754, 471, 326, 9782, 4888, 358, 729, 1301, 16, 425, 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, 21000, 29360, 12, 2890, 16, 871, 4672, 3536, 12953, 30, 4248, 18, 4630, 18, 6976, 25, 16, 1475, 52, 6507, 30, 2315, 326, 7644, 1754, 471, 326, 9782, 4888, 358, 729, 1301, 16, 425, 18, ...
return None
return defaultValue
def getOption( self, opName, defaultValue = None ): """ Get option value with default applied
a07765898970cabae66e971ee8c4efe36dd53e5a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/a07765898970cabae66e971ee8c4efe36dd53e5a/CFG.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5651, 12, 365, 16, 1061, 461, 16, 4593, 273, 599, 262, 30, 3536, 968, 1456, 460, 598, 805, 6754, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 5651, 12, 365, 16, 1061, 461, 16, 4593, 273, 599, 262, 30, 3536, 968, 1456, 460, 598, 805, 6754, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
blah = g.simpleSQL.parseString(self.original) print "sublist", sublist
parsed = g.simpleSQL.parseString(self.original)
def replaceObj(tokens): for i in range(len(tokens)): if tokens[i].upper() == "OBJECT": tokens[i] = "Subchunks_${subc}.Object_${chunk}_${subc}"
89165e4932516195fffe2ec7d85c0e86b062c916 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6510/89165e4932516195fffe2ec7d85c0e86b062c916/sqlparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1453, 2675, 12, 7860, 4672, 364, 277, 316, 1048, 12, 1897, 12, 7860, 3719, 30, 309, 2430, 63, 77, 8009, 5797, 1435, 422, 315, 9422, 6877, 2430, 63, 77, 65, 273, 315, 1676, 14691, 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, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1453, 2675, 12, 7860, 4672, 364, 277, 316, 1048, 12, 1897, 12, 7860, 3719, 30, 309, 2430, 63, 77, 8009, 5797, 1435, 422, 315, 9422, 6877, 2430, 63, 77, 65, 273, 315, 1676, 14691, 67, ...
if value:
if value is None: return None elif value:
def fromPython(self, value, state): if value: return sqlbuilder.TRUE else: return sqlbuilder.FALSE
f1645d3ce9144ed1dd7d1429eb8db9fa83ab944e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6718/f1645d3ce9144ed1dd7d1429eb8db9fa83ab944e/col.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 15774, 12, 2890, 16, 460, 16, 919, 4672, 309, 460, 353, 599, 30, 327, 599, 1327, 460, 30, 327, 1847, 9574, 18, 18724, 469, 30, 327, 1847, 9574, 18, 21053, 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, 628, 15774, 12, 2890, 16, 460, 16, 919, 4672, 309, 460, 353, 599, 30, 327, 599, 1327, 460, 30, 327, 1847, 9574, 18, 18724, 469, 30, 327, 1847, 9574, 18, 21053, 2, -100, -100, -100, -...
OPTS.append("USEDLMALLOC")
def CreatePandaVersionFiles(): version1=int(VERSION.split(".")[0]) version2=int(VERSION.split(".")[1]) version3=int(VERSION.split(".")[2]) nversion=version1*1000000+version2*1000+version3 pandaversion_h = PANDAVERSION_H.replace("VERSION1",str(version1)) pandaversion_h = pandaversion_h.replace("VERSION2",str(version2)) pandaversion_h = pandaversion_h.replace("VERSION3",str(version3)) pandaversion_h = pandaversion_h.replace("NVERSION",str(nversion)) checkpandaversion_cxx = CHECKPANDAVERSION_CXX.replace("VERSION1",str(version1)) checkpandaversion_cxx = checkpandaversion_cxx.replace("VERSION2",str(version2)) checkpandaversion_cxx = checkpandaversion_cxx.replace("VERSION3",str(version3)) checkpandaversion_cxx = checkpandaversion_cxx.replace("NVERSION",str(nversion)) checkpandaversion_h = CHECKPANDAVERSION_H.replace("VERSION1",str(version1)) checkpandaversion_h = checkpandaversion_h.replace("VERSION2",str(version2)) checkpandaversion_h = checkpandaversion_h.replace("VERSION3",str(version3)) checkpandaversion_h = checkpandaversion_h.replace("NVERSION",str(nversion)) ConditionalWriteFile('built/include/pandaVersion.h', pandaversion_h) ConditionalWriteFile('built/include/checkPandaVersion.cxx', checkpandaversion_cxx) ConditionalWriteFile('built/include/checkPandaVersion.h', checkpandaversion_h) if (OMIT.count("PYTHON")==0): ConditionalWriteFile("built/tmp/pythonversion", os.path.basename(PYTHONSDK)) ConditionalWriteFile("built/tmp/null.cxx","")
01251288dcf2520dba0b477042a0fcf055944194 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/01251288dcf2520dba0b477042a0fcf055944194/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 52, 464, 69, 1444, 2697, 13332, 1177, 21, 33, 474, 12, 5757, 18, 4939, 2932, 1199, 25146, 20, 5717, 1177, 22, 33, 474, 12, 5757, 18, 4939, 2932, 1199, 25146, 21, 5717, 1177, 23, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 52, 464, 69, 1444, 2697, 13332, 1177, 21, 33, 474, 12, 5757, 18, 4939, 2932, 1199, 25146, 20, 5717, 1177, 22, 33, 474, 12, 5757, 18, 4939, 2932, 1199, 25146, 21, 5717, 1177, 23, ...
for clsname in ['SystemThread', 'SystemMutex', 'SystemCondition', 'CriticalSection', 'SimpleRefCount< ns3::SystemThread, ns3::empty >']:
for clsname in ['SystemThread', 'SystemMutex', 'SystemCondition', 'CriticalSection', 'SimpleRefCount< ns3::SystemThread, ns3::empty, ns3::DefaultDeleter<ns3::SystemThread> >']:
def main(): out = MyMultiSectionFactory(sys.argv[1], sys.argv[3:]) root_module = module_init() root_module.add_include('"everything.h"') register_types(root_module) ns3modulegen_core_customizations.Simulator_customizations(root_module) ns3modulegen_core_customizations.CommandLine_customizations(root_module) ns3modulegen_core_customizations.TypeId_customizations(root_module) ns3modulegen_core_customizations.add_std_ofstream(root_module) ns3modulegen_core_customizations.add_ipv4_address_tp_hash(root_module) for local_module in LOCAL_MODULES: mod = __import__(local_module) mod.register_types(root_module) ns3modulegen_core_customizations.generate_callback_classes(root_module.after_forward_declarations, callbacks_list.callback_classes) register_methods(root_module) for local_module in LOCAL_MODULES: mod = __import__(local_module) mod.register_methods(root_module) ns3modulegen_core_customizations.Object_customizations(root_module) ns3modulegen_core_customizations.Attribute_customizations(root_module) register_functions(root_module) for local_module in LOCAL_MODULES: mod = __import__(local_module) mod.register_functions(root_module) enabled_features = os.environ['NS3_ENABLED_FEATURES'].split(',') # if GtkConfigStore support is disabled, disable the class wrapper if 'GtkConfigStore' not in enabled_features: try: root_module.classes.remove(root_module['ns3::GtkConfigStore']) except KeyError: pass # if no sqlite, the class SqliteDataOutput is disabled if 'SqliteDataOutput' not in enabled_features: try: root_module.classes.remove(root_module['ns3::SqliteDataOutput']) except KeyError: pass if 'Threading' not in enabled_features: for clsname in ['SystemThread', 'SystemMutex', 'SystemCondition', 'CriticalSection', 'SimpleRefCount< ns3::SystemThread, ns3::empty >']: root_module.classes.remove(root_module['ns3::%s' % clsname]) if 'EmuNetDevice' not in enabled_features: for clsname in ['EmuNetDevice', 'EmuHelper']: root_module.classes.remove(root_module['ns3::%s' % clsname]) root_module.enums.remove(root_module['ns3::EmuNetDevice::EncapsulationMode']) if 'RealTime' not in enabled_features: for clsname in ['WallClockSynchronizer', 'RealtimeSimulatorImpl']: root_module.classes.remove(root_module['ns3::%s' % clsname]) root_module.enums.remove(root_module['ns3::RealtimeSimulatorImpl::SynchronizationMode']) if 'TapBridge' not in enabled_features: for clsname in ['TapBridge', 'TapBridgeHelper']: root_module.classes.remove(root_module['ns3::%s' % clsname]) root_module.enums.remove(root_module['ns3::TapBridge::Mode']) root_module.generate(out, '_ns3') out.close()
5ddd26cbf8f2506a9cd5f34eaa2b76c8e5df7a07 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7746/5ddd26cbf8f2506a9cd5f34eaa2b76c8e5df7a07/ns3modulegen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 596, 273, 8005, 5002, 5285, 1733, 12, 9499, 18, 19485, 63, 21, 6487, 2589, 18, 19485, 63, 23, 30, 5717, 1365, 67, 2978, 273, 1605, 67, 2738, 1435, 1365, 67, 2978, 18, 1289...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 596, 273, 8005, 5002, 5285, 1733, 12, 9499, 18, 19485, 63, 21, 6487, 2589, 18, 19485, 63, 23, 30, 5717, 1365, 67, 2978, 273, 1605, 67, 2738, 1435, 1365, 67, 2978, 18, 1289...
self.check_sizeof(reversed(''), h + l + p )
self.check_sizeof(reversed(''), size(h + 'PP'))
def method(): pass
5c5f6ea02a90835741c65e40e2b7c4e412c33d55 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/5c5f6ea02a90835741c65e40e2b7c4e412c33d55/test_sys.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 707, 13332, 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, 0, 0, 0, 0, 0, 0, ...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 707, 13332, 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, -100, -100, -100, -100, ...
cursor = self.conn.cursor()
try: cursor = self.conn.cursor() except MySQLdb.Error: self.conn = self.connect() cursor = self.conn.cursor()
def redo(self): """ __redo__ Tries to redo all operations pending (uncomitted) performed during an interrupted transaction.
f6d38da4b0910650112bd5df8a6e148fb35b760b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8887/f6d38da4b0910650112bd5df8a6e148fb35b760b/MergeSensorDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24524, 12, 2890, 4672, 3536, 1001, 1118, 83, 972, 225, 10000, 281, 358, 24524, 777, 5295, 4634, 261, 551, 362, 11541, 13, 9591, 4982, 392, 15711, 2492, 18, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 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, 24524, 12, 2890, 4672, 3536, 1001, 1118, 83, 972, 225, 10000, 281, 358, 24524, 777, 5295, 4634, 261, 551, 362, 11541, 13, 9591, 4982, 392, 15711, 2492, 18, 2, -100, -100, -100, -100, -10...
print status.ljust(20),str(timeStamp)
print status.ljust(20),timeStamp
def dump(self): """ Print out the contents of the internal cached information
c48197836d3a42ef2d691b4d6f40e4f4798ebd41 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/c48197836d3a42ef2d691b4d6f40e4f4798ebd41/JobReport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 12, 2890, 4672, 3536, 3038, 596, 326, 2939, 434, 326, 2713, 3472, 1779, 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, 4657, 12, 2890, 4672, 3536, 3038, 596, 326, 2939, 434, 326, 2713, 3472, 1779, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.log(traceback.format_exception(excType, excValue, tb))
self.log(string.join(traceback.format_exception(excType, excValue, tb),''))
def badMessage(self, line, excType, excValue, tb): """When I get a message that's so broken I can't use it. """ self.log(line) self.log(traceback.format_exception(excType, excValue, tb))
e104e20b17c55650869c262fd998da916864a21c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e104e20b17c55650869c262fd998da916864a21c/irc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5570, 1079, 12, 2890, 16, 980, 16, 3533, 559, 16, 3533, 620, 16, 8739, 4672, 3536, 9434, 467, 336, 279, 883, 716, 1807, 1427, 12933, 467, 848, 1404, 999, 518, 18, 3536, 365, 18, 1330, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5570, 1079, 12, 2890, 16, 980, 16, 3533, 559, 16, 3533, 620, 16, 8739, 4672, 3536, 9434, 467, 336, 279, 883, 716, 1807, 1427, 12933, 467, 848, 1404, 999, 518, 18, 3536, 365, 18, 1330, ...
Here is an example of a 3-dimensional polytope in 4d:: sage: lp = LatticePolytope(matrix([[1,1,-1,0],[1,-1,-1,0],[1,1,1,0],[3,3,3,0]])) sage: lp.vertices() [ 1 1 -1 0] [ 1 -1 -1 0] [ 1 1 1 0] [ 3 3 3 0] sage: ker = lp.vertices().integer_kernel().matrix()
Here is an example of a 3-dimensional polytope in a 4-dimensional space:: sage: m = matrix([(0,0,0,0), (1,1,1,3), (1,-1,1,3), (-1,-1,1,3)]) sage: p = LatticePolytope(m.transpose()) sage: p.vertices() [ 0 1 1 -1] [ 0 1 -1 -1] [ 0 1 1 1] [ 0 3 3 3] sage: ker = p.vertices().integer_kernel().matrix()
def facet_normal(self, i): r""" Return the inner normal to the ``i``-th facet of this polytope. If this polytope is not full-dimensional, facet normals will be parallel to the affine subspace spanned by this polytope. INPUT: - ``i`` -- integer, the index of the facet OUTPUT: - vectors -- the inner normal of the ``i``-th facet EXAMPLES: Let's take a look at facets of the octahedron and some polytopes inside it:: sage: o = lattice_polytope.octahedron(3) sage: o.vertices() [ 1 0 0 -1 0 0] [ 0 1 0 0 -1 0] [ 0 0 1 0 0 -1] sage: o.facet_normal(0) (-1, -1, 1) sage: o.facet_constant(0) 1 sage: m = copy(o.vertices()) sage: m[0,0] = 0 sage: m [ 0 0 0 -1 0 0] [ 0 1 0 0 -1 0] [ 0 0 1 0 0 -1] sage: p = LatticePolytope(m) sage: p.facet_normal(0) (-1, 0, 0) sage: p.facet_constant(0) 0 sage: m[0,3] = 0 sage: m [ 0 0 0 0 0 0] [ 0 1 0 0 -1 0] [ 0 0 1 0 0 -1] sage: p = LatticePolytope(m) sage: p.facet_normal(0) (0, -1, 1) sage: p.facet_constant(0) 1
d3f0e4ca34fafb6808137a2658880304a3db8f29 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/d3f0e4ca34fafb6808137a2658880304a3db8f29/lattice_polytope.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11082, 67, 6130, 12, 2890, 16, 277, 4672, 436, 8395, 2000, 326, 3443, 2212, 358, 326, 12176, 77, 10335, 17, 451, 11082, 434, 333, 7573, 869, 347, 18, 225, 971, 333, 7573, 869, 347, 353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11082, 67, 6130, 12, 2890, 16, 277, 4672, 436, 8395, 2000, 326, 3443, 2212, 358, 326, 12176, 77, 10335, 17, 451, 11082, 434, 333, 7573, 869, 347, 18, 225, 971, 333, 7573, 869, 347, 353...
argument `raw' is true.
argument `raw' is true. Additional substitutions may be provided using the vars keyword argument, which override any pre-existing defaults.
def get(self, section, option, raw=0): """Get an option value for a given section.
1f513386280039f6b48cee0b120d5d901ec92f20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/1f513386280039f6b48cee0b120d5d901ec92f20/ConfigParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 2442, 16, 1456, 16, 1831, 33, 20, 4672, 3536, 967, 392, 1456, 460, 364, 279, 864, 2442, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 2442, 16, 1456, 16, 1831, 33, 20, 4672, 3536, 967, 392, 1456, 460, 364, 279, 864, 2442, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
__dynamic__ = 0
__dynamic__ = 0
def __repr__(self): return "%.*g" % (self.prec, self)
9479174c90f03a075db9a923423b21776350dabe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/9479174c90f03a075db9a923423b21776350dabe/test_descr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 2213, 4509, 75, 6, 738, 261, 2890, 18, 4036, 16, 365, 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,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 2213, 4509, 75, 6, 738, 261, 2890, 18, 4036, 16, 365, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def main(): member = False for item in os.getgroups(): try: grptup = grp.getgrgid(item) except KeyError, e: continue if grptup[0] == 'mock': member = True if not member: print "You need to be a member of the mock group for this to work" sys.exit(1) if os.geteuid() == 0: error("Don't try to run mock as root!") sys.exit(1) config_path='/etc/mock' config_opts = {}
def setup_default_config_opts(config_opts):
def command_parse(): """return options and args from parsing the command line""" usage = """ usage: mock [options] /path/to/srpm optional commands: clean - clean out the specified chroot init - initialize the chroot, do not build anything""" parser = OptionParser(usage=usage, version=__VERSION__) parser.add_option("-r", action="store", type="string", dest="chroot", help="chroot name/config file name default: %default", default='default') parser.add_option("--no-clean", action ="store_true", dest="dirty", help="do not clean chroot before building") parser.add_option("--arch", action ="store", dest="arch", default=None, help="target build arch") parser.add_option("--debug", action ="store_true", dest="debug", default=False, help="Output copious debugging information") parser.add_option("--resultdir", action="store", type="string", default=None, help="path for resulting files to be put") parser.add_option("--statedir", action="store", type="string", default=None, help="path for state file is written") parser.add_option("--uniqueext", action="store", type="string", default=None, help="Arbitrary, unique extension to append to buildroot directory name") parser.add_option("--configdir", action="store", dest="configdir", default=None, help="Change where config files are found") parser.add_option("--quiet", action ="store_true", dest="quiet", default=False, help="quiet down output") return parser.parse_args()
950a02e8990b7b978bb944a4c62a252273c46a64 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7328/950a02e8990b7b978bb944a4c62a252273c46a64/mock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1296, 67, 2670, 13332, 3536, 2463, 702, 471, 833, 628, 5811, 326, 1296, 980, 8395, 225, 4084, 273, 3536, 4084, 30, 5416, 306, 2116, 65, 342, 803, 19, 869, 19, 11254, 7755, 3129, 4364, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1296, 67, 2670, 13332, 3536, 2463, 702, 471, 833, 628, 5811, 326, 1296, 980, 8395, 225, 4084, 273, 3536, 4084, 30, 5416, 306, 2116, 65, 342, 803, 19, 869, 19, 11254, 7755, 3129, 4364, ...
return self.run_command("git diff-index head") == ""
return self.run_command("git diff-index HEAD") == ""
def working_directory_is_clean(self): return self.run_command("git diff-index head") == ""
1dba577eed0c29e128c1af4205570ff68f79411d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/1dba577eed0c29e128c1af4205570ff68f79411d/scm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5960, 67, 5149, 67, 291, 67, 6200, 12, 2890, 4672, 327, 365, 18, 2681, 67, 3076, 2932, 6845, 3122, 17, 1615, 14792, 7923, 422, 1408, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5960, 67, 5149, 67, 291, 67, 6200, 12, 2890, 4672, 327, 365, 18, 2681, 67, 3076, 2932, 6845, 3122, 17, 1615, 14792, 7923, 422, 1408, 225, 2, -100, -100, -100, -100, -100, -100, -100, -...
return R(val, prec=prec, check=False)
if R == QQ: return R(val, prec=prec, check=False) else: return R(val, prec=prec, check=True)
def eisenstein_series_qexp(k, prec=10, K=QQ, var='q'): r""" Return the $q$-expansion of the normalized weight $k$ Eisenstein series to precision prec in the ring $K$. (The normalization chosen here is the one that forces the coefficient of $q$ to be 1.) Here's a rough description of how the algorithm works: we know $E_k = const + \sum_n sigma(n,k-1) q^n$. Now, we basically just compute all the $\sigma(n,k-1)$ simultaneously, as $\sigma$ is multiplicative. INPUT: k -- an even positive integer prec -- (default: 10) a nonnegative integer K -- (default: QQ) a ring in which -(2*k)/B_k is invertible var -- (default: 'q') variable name to use for q-expansion EXAMPLES: sage: eisenstein_series_qexp(2,5) -1/24 + q + 3*q^2 + 4*q^3 + 7*q^4 + O(q^5) sage: eisenstein_series_qexp(2,0) O(q^0) sage: eisenstein_series_qexp(2,5,GF(7)) 2 + q + 3*q^2 + 4*q^3 + O(q^5) sage: eisenstein_series_qexp(2,5,GF(7),var='T') 2 + T + 3*T^2 + 4*T^3 + O(T^5) AUTHORS: -- William Stein: original implementation -- Craig Citro (2007-06-01): rewrote for massive speedup """ k = Integer(k) if k%2 or k < 2: raise ValueError, "k (=%s) must be an even positive integer"%k prec = int(prec) if prec < 0: raise ValueError, "prec (=%s) must be an even nonnegative integer"%prec if (prec == 0): R = K[[var]] return R(0).add_bigoh(0) one = Integer(1) val = [one] * prec expt = k - one try: a0inv = - (2*k) / bernoulli(k) a0 = K(1/a0inv) except ZeroDivisionError: raise ValueError, "-(2*k)/B_k (=%s) must be invertible in the %r"%(a0inv, K) for p in prime_range(1,prec): int_p = int(p) ppow = int_p mult = p**expt term = mult*mult last = mult while (ppow < prec): ind = ppow while (ind < prec): val[ind] = (val[ind]*(term-one)).divide_knowing_divisible_by(last - one) ind += ppow ppow *= int_p last = term term *= mult val[0] = a0 R = K[[var]] return R(val, prec=prec, check=False)
3f654f0d6cc31f698355e396912d00da1863183b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/3f654f0d6cc31f698355e396912d00da1863183b/eis_series.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 425, 291, 275, 334, 13685, 67, 10222, 67, 85, 2749, 12, 79, 16, 13382, 33, 2163, 16, 1475, 33, 53, 53, 16, 569, 2218, 85, 11, 4672, 436, 8395, 2000, 326, 271, 85, 8, 17, 2749, 1216...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 291, 275, 334, 13685, 67, 10222, 67, 85, 2749, 12, 79, 16, 13382, 33, 2163, 16, 1475, 33, 53, 53, 16, 569, 2218, 85, 11, 4672, 436, 8395, 2000, 326, 271, 85, 8, 17, 2749, 1216...
for widget in ("save_game1", "save_game_as1", "properties1", "close1", "action1", "vis1"):
for widget in ("save_game1", "save_game_as1", "properties1", "close1", "call_flag", "draw", "resign", "force_to_move", "rotate_board1", "side_panel1", "show_cords", "hint_mode", "spy_mode"):
def on_game_started (handler, gmwidg, gamemodel): for widget in ("save_game1", "save_game_as1", "properties1", "close1", "action1", "vis1"): window[widget].set_property('sensitive', True) gmwidg.widgets["sidepanel"].connect("hide", \ lambda w: window["side_panel1"].set_active(False)) if gamemodel.timemodel != None: gmwidg.widgets["ccalign"].show() else: gmwidg.widgets["ccalign"].hide() gameDic[gmwidg] = gamemodel for player in gamemodel.players: player.connect("dead", engineDead, gmwidg) setMode(gmwidg, HINT, window["hint_mode"].get_active()) setMode(gmwidg, SPY, window["spy_mode"].get_active()) def game_loaded (gamemodel, uri): gmwidg.status("%s: %s" % (_("Loaded game"), str(uri)), True) gamemodel.connect("game_loaded", game_loaded) def game_saved (gamemodel, uri): gmwidg.status("%s: %s" % (_("Saved game"), str(uri)), True) gamemodel.connect("game_saved", game_saved) def game_ended (gamemodel, reason): m1 = { DRAW: _("The game ended in a draw"), WHITEWON: _("White player won the game"), BLACKWON: _("Black player won the game") }[gamemodel.status] m2 = { DRAW_INSUFFICIENT: _("caused by insufficient material"), DRAW_REPITITION: _("as the same position was repeated three" + \ " times in a row"), DRAW_50MOVES: _("as the last 50 moves brought nothing new"), DRAW_STALEMATE: _("because of stalemate"), DRAW_AGREE: _("as the players agreed to"), WON_RESIGN: _("as opponent resigned"), WON_CALLFLAG: _("as opponent ran out of time"), WON_MATE: _("on a mate"), UNKNOWN_REASON: _("by no known reason") }[reason] gmwidg.status("%s %s" % (m1,m2), idle_add=True) gamemodel.connect("game_ended", game_ended) def draw_sent (gamemodel, player): if player.__type__ == LOCAL: gmwidg.status(_("You sent a draw offer"), idle_add=True) gamemodel.connect("draw_sent", draw_sent) def flag_call_error (gamemodel, player, error): if player.__type__ == LOCAL: if error == NO_TIME_SETTINGS: gmwidg.status(_("You can't call flag in a game without" + \ " time settings"), idle_add=True) elif error == NOT_OUT_OF_TIME: gmwidg.status(_("You can't call flag when your opponent" + \ " is not out of time"), idle_add=True) gamemodel.connect("flag_call_error", flag_call_error)
8782da2ad0593a563114d2bfb77232c05ed25bee /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5339/8782da2ad0593a563114d2bfb77232c05ed25bee/Main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 13957, 67, 14561, 261, 4176, 16, 14125, 30902, 75, 16, 7920, 2284, 4672, 364, 3604, 316, 7566, 5688, 67, 13957, 21, 3113, 315, 5688, 67, 13957, 67, 345, 21, 3113, 315, 4738, 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, 603, 67, 13957, 67, 14561, 261, 4176, 16, 14125, 30902, 75, 16, 7920, 2284, 4672, 364, 3604, 316, 7566, 5688, 67, 13957, 21, 3113, 315, 5688, 67, 13957, 67, 345, 21, 3113, 315, 4738, 2...
if self.maxPitch<=self.minPitch:
if self._maxPitch<=self._minPitch:
def _set_voice(self,val): try: val=GUID(val) except: val=self._enginesList[0].gModeID mode=None for mode in self._enginesList: if mode.gModeID==val: break if mode is None: raise ValueError("no such mode: %s"%val) self._currentMode=mode self._ttsAudio=CoCreateInstance(CLSID_MMAudioDest,IAudioMultiMediaDevice) self._ttsAudio.DeviceNumSet(nvwave.outputDeviceNameToID(config.conf["speech"]["outputDevice"], True)) self._ttsCentral=POINTER(ITTSCentralW)() self._ttsEngines.Select(self._currentMode.gModeID,byref(self._ttsCentral),self._ttsAudio) self._ttsAttrs=self._ttsCentral.QueryInterface(ITTSAttributes) #Find out rate limits self.hasRate=bool(mode.dwFeatures&TTSFEATURE_SPEED) if self.hasRate: oldVal=DWORD() self._ttsAttrs.SpeedGet(byref(oldVal)) self._ttsAttrs.SpeedSet(TTSATTR_MINSPEED) newVal=DWORD() self._ttsAttrs.SpeedGet(byref(newVal)) self._minRate=newVal.value self._ttsAttrs.SpeedSet(TTSATTR_MAXSPEED) self._ttsAttrs.SpeedGet(byref(newVal)) # ViaVoice (and perhaps other synths) doesn't seem to like the speed being set to maximum. self._maxRate=newVal.value-1 self._ttsAttrs.SpeedSet(oldVal.value) if self.maxRate<=self.minRate: self.hasRate=False #Find out pitch limits self.hasPitch=bool(mode.dwFeatures&TTSFEATURE_PITCH) if self.hasPitch: oldVal=WORD() self._ttsAttrs.PitchGet(byref(oldVal)) self._ttsAttrs.PitchSet(TTSATTR_MINPITCH) newVal=WORD() self._ttsAttrs.PitchGet(byref(newVal)) self._minPitch=newVal.value self._ttsAttrs.PitchSet(TTSATTR_MAXPITCH) self._ttsAttrs.PitchGet(byref(newVal)) self._maxPitch=newVal.value self._ttsAttrs.PitchSet(oldVal.value) if self.maxPitch<=self.minPitch: self.hasPitch=False #Find volume limits self.hasVolume=bool(mode.dwFeatures&TTSFEATURE_VOLUME) if self.hasVolume: oldVal=DWORD() self._ttsAttrs.VolumeGet(byref(oldVal)) self._ttsAttrs.VolumeSet(TTSATTR_MINVOLUME) newVal=DWORD() self._ttsAttrs.VolumeGet(byref(newVal)) self._minVolume=newVal.value self._ttsAttrs.VolumeSet(TTSATTR_MAXVOLUME) self._ttsAttrs.VolumeGet(byref(newVal)) self._maxVolume=newVal.value self._ttsAttrs.VolumeSet(oldVal.value) if self.maxVolume<=self.minVolume: self.hasVolume=False
bf2f4290c175eb9d1ddc979bf8317530124edbd2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9340/bf2f4290c175eb9d1ddc979bf8317530124edbd2/sapi4.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 25993, 12, 2890, 16, 1125, 4672, 775, 30, 1244, 33, 17525, 12, 1125, 13, 1335, 30, 1244, 33, 2890, 6315, 275, 14660, 682, 63, 20, 8009, 75, 2309, 734, 1965, 33, 7036, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 25993, 12, 2890, 16, 1125, 4672, 775, 30, 1244, 33, 17525, 12, 1125, 13, 1335, 30, 1244, 33, 2890, 6315, 275, 14660, 682, 63, 20, 8009, 75, 2309, 734, 1965, 33, 7036, 3...
print self,ystart,tstart,tend,tstep_wanted,tstep_min
def __init__(self, ystart, tstart, tend, tstep_wanted, tstep_min, eps=1.0e-10, dxsav=0.0, solver="scipy_odeint"): """Initialize model variables, some with default values. Default solver is odeint.""" print self,ystart,tstart,tend,tstep_wanted,tstep_min self.ystart = ystart self.k = None #so we can test whether k is set if N.all(tstart < tend): self.tstart, self.tend = tstart, tend elif N.all(tstart==tend): raise ValueError, "End time is the same as start time!" else: raise ValueError, "Ending time is before starting time!" if tstep_wanted >= tstep_min: self.tstep_wanted, self.tstep_min = tstep_wanted, tstep_min else: raise ValueError, "Desired time step is smaller than specified minimum!" if eps < 1: self.eps = eps else: raise ValueError, "Not enough accuracy! Change eps < 1." if dxsav >=0.0: self.dxsav = dxsav else: raise ValueError, "Data saving step must be 0 or positive!" if solver in self.solverlist: self.solver = solver else: raise ValueError, "Solver not recognized!" self.tresult = None #Will hold last time result self.yresult = None #Will hold array of last y results self.runcount = 0 #How many times has the model been run? self.resultlist = [] #List of all completed results. self.plottitle = "A generic Cosmological Model" self.tname = "Time" self.ynames = ["First dependent variable"]
33d0a722fa4391d9e185f42e779ca432f17dd143 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7283/33d0a722fa4391d9e185f42e779ca432f17dd143/cosmomodels.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 677, 1937, 16, 268, 1937, 16, 268, 409, 16, 268, 4119, 67, 25861, 16, 268, 4119, 67, 1154, 16, 7785, 33, 21, 18, 20, 73, 17, 2163, 16, 6633, 87, 842,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 677, 1937, 16, 268, 1937, 16, 268, 409, 16, 268, 4119, 67, 25861, 16, 268, 4119, 67, 1154, 16, 7785, 33, 21, 18, 20, 73, 17, 2163, 16, 6633, 87, 842,...
print 'clipping on' print gc.bmp_array[:,:,0]
def test_clip_to_rect(self): gc = agg.GraphicsContextArray((10,10)) gc.move_to(0,0) gc.line_to(10,10) gc.clip_to_rect(5,5,5,5) gc.stroke_path() print 'clipping on' print gc.bmp_array[:,:,0] # make sure nothing was drawn in the corner assert(gc.bmp_array[-1,0,0] == 255)
e47282ce7056af747cbd7b863b37854c3c1dd9d6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13166/e47282ce7056af747cbd7b863b37854c3c1dd9d6/graphics_context_test_case.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 14161, 67, 869, 67, 2607, 12, 2890, 4672, 8859, 273, 10421, 18, 17558, 1042, 1076, 12443, 2163, 16, 2163, 3719, 8859, 18, 8501, 67, 869, 12, 20, 16, 20, 13, 8859, 18, 1369, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14161, 67, 869, 67, 2607, 12, 2890, 4672, 8859, 273, 10421, 18, 17558, 1042, 1076, 12443, 2163, 16, 2163, 3719, 8859, 18, 8501, 67, 869, 12, 20, 16, 20, 13, 8859, 18, 1369, ...
self._name = self.__class__
self._name = self.__class__.__name__
def _validateName(self): if self._name == None: self._name = self.__class__
8e4932318ca1c8374681ce5b47768de459d1cea5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5149/8e4932318ca1c8374681ce5b47768de459d1cea5/debuggable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5662, 461, 12, 2890, 4672, 309, 365, 6315, 529, 422, 599, 30, 365, 6315, 529, 273, 365, 16186, 1106, 972, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5662, 461, 12, 2890, 4672, 309, 365, 6315, 529, 422, 599, 30, 365, 6315, 529, 273, 365, 16186, 1106, 972, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
opening = rfind(text, '<a href', lastend, upto) if (opening != -1) or inanchor:
opening = rfind(text, '<a ', lastend, upto) got_anchor = opening != -1 href_too = False if got_anchor or inanchor: if got_anchor: href_too = -1 != rfind(text, 'href', opening, upto)
def within_literal(upto, after, state, text, rfind=rfind, lower=lower): """ Check text from state['lastend'] to upto for literal context: - within an enclosing '<pre>' preformatted region '</pre>' - within an enclosing '<code>' code fragment '</code>' - within a tag '<' body '>' - within an '<a href...>' tag's contents '</a>' We also update the state dict accordingly. """ # XXX This breaks on badly nested angle brackets and <pre></pre>, etc. lastend,inpre,incode,intag,inanchor = \ state['lastend'], state['inpre'], state['incode'], state['intag'], \ state['inanchor'] newintag = newincode = newinpre = newinanchor = 0 text = lower(text) # Check whether '<pre>' is currently (possibly, still) prevailing. opening = rfind(text, '<pre', lastend, upto) if (opening != -1) or inpre: if opening != -1: opening = opening + 4 else: opening = lastend if -1 == rfind(text, '</pre>', opening, upto): newinpre = 1 state['inpre'] = newinpre # Check whether '<code>' is currently (possibly, still) prevailing. opening = rfind(text, '<code', lastend, upto) if (opening != -1) or incode: if opening != -1: opening = opening + 5 # We must already be incode, start at beginning of this segment: else: opening = lastend if -1 == rfind(text, '</code>', opening, upto): newincode = 1 state['incode'] = newincode # Determine whether we're (possibly, still) within a tag. opening = rfind(text, '<', lastend, upto) if (opening != -1) or intag: # May also be intag - either way, we skip past last <tag>: if opening != -1: opening = opening + 1 # We must already be intag, start at beginning of this segment: else: opening = lastend if -1 == rfind(text, '>', opening, upto): newintag = 1 state['intag'] = newintag # Check whether '<a href...>' is currently (possibly, still) prevailing. #XXX make this more robust opening = rfind(text, '<a href', lastend, upto) if (opening != -1) or inanchor: if opening != -1: opening = opening + 5 else: opening = lastend if -1 == rfind(text, '</a>', opening, upto): newinanchor = 1 state['inanchor'] = newinanchor state['lastend'] = after return newinpre or newincode or newintag or newinanchor
96eab431726974763ae00ffd43c46fea3f00a4db /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5225/96eab431726974763ae00ffd43c46fea3f00a4db/ZWikiPage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3470, 67, 13107, 12, 3648, 83, 16, 1839, 16, 919, 16, 977, 16, 31257, 33, 86, 4720, 16, 2612, 33, 8167, 4672, 3536, 2073, 977, 628, 919, 3292, 2722, 409, 3546, 358, 582, 21910, 364, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3470, 67, 13107, 12, 3648, 83, 16, 1839, 16, 919, 16, 977, 16, 31257, 33, 86, 4720, 16, 2612, 33, 8167, 4672, 3536, 2073, 977, 628, 919, 3292, 2722, 409, 3546, 358, 582, 21910, 364, ...
"""
def pure_linear_model(cls, non_NA_genotype_ls, non_NA_phenotype_ls, non_NA_phenotype2count=None): """ 2008-11-10 split out of linear_model() """ #rpy.r.as_factor.local_mode(rpy.NO_CONVERSION) if not isinstance(non_NA_genotype_ls, numpy.ndarray): genotype_matrix = numpy.array(non_NA_genotype_ls) if len(genotype_matrix.shape)==1: #transform into 2D array genotype_matrix.resize([len(genotype_matrix), 1]) else: genotype_matrix = non_NA_genotype_ls no_of_rows, no_of_cols = genotype_matrix.shape #2008-11-10 do linear regression by numpy genotype_matrix = numpy.hstack((numpy.ones([len(genotype_matrix),1], numpy.int), genotype_matrix)) #the design variable for intercept has to be included. genotype_matrix2 = numpy.transpose(genotype_matrix) D = linalg.inv(numpy.inner(genotype_matrix2, genotype_matrix2)) #2nd matrix's shape is opposite to real matrix algebra.
15a5bd5f746ece2d4e49575c7e099c1664482fa1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9645/15a5bd5f746ece2d4e49575c7e099c1664482fa1/Association.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16618, 67, 12379, 67, 2284, 12, 6429, 16, 1661, 67, 11277, 67, 4507, 10570, 67, 3251, 16, 1661, 67, 11277, 67, 13819, 10570, 67, 3251, 16, 1661, 67, 11277, 67, 13819, 10570, 22, 1883, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16618, 67, 12379, 67, 2284, 12, 6429, 16, 1661, 67, 11277, 67, 4507, 10570, 67, 3251, 16, 1661, 67, 11277, 67, 13819, 10570, 67, 3251, 16, 1661, 67, 11277, 67, 13819, 10570, 22, 1883, ...
, (company_id, company_id))
, [company_id, company_id] + [arg[2] for arg in args])
def search_total_amount(self, cursor, user_id, name, args, context=None): company_obj = self.pool.get('company.company') user_obj = self.pool.get('res.user')
f11b025d678642733b46cc61c520d2a59b86f4f0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9267/f11b025d678642733b46cc61c520d2a59b86f4f0/invoice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 67, 4963, 67, 8949, 12, 2890, 16, 3347, 16, 729, 67, 350, 16, 508, 16, 833, 16, 819, 33, 7036, 4672, 9395, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 16840, 18, 16840, 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, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 67, 4963, 67, 8949, 12, 2890, 16, 3347, 16, 729, 67, 350, 16, 508, 16, 833, 16, 819, 33, 7036, 4672, 9395, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 16840, 18, 16840, 6134, ...
MAYA5 Maya version 5
MAX8 3D Studio Max version 8
def packageInfo(): print """ See panda3d/doc/INSTALL-PP for more detailed information. 3D modeling an painting packages: MAX5 3D Studio Max version 5 MAX6 3D Studio Max version 6 MAX7 3D Studio Max version 7 MAYA5 Maya version 5 MAYA6 Maya version 6 Audio playback: FMOD f mod "http://www.fmod.org/" A music and sound effects library (including playback). (for .wav, .mp3 and other files) MILES Miles Sound System from RAD Game Tools "http://www.radgametools.com/default.htm" A proprietary (non-opensource) audio library. (for .wav, .mp3, and other files). Compression/decompression: ZLIB z lib "http://www.gzip.org/zlib" A commression/decomression library. (for .zip and similar files and data) Font manipulation: FREETYPE free type "http://www.freetype.org/" A font manipulation library. (for .ttf files). Image support libraries: JPEG Join Photographic Experts Group "http://www.ijg.org" An image library. (.jpg and .jpeg files) PNG Portable Network Graphics "http://www.libpng.org" An image library. (.png files) TIFF Tagged Image File Format "ftp://ftp.sgi.com/graphics/tiff" An image library. (.tiff files) Misc libraries: FFTW Fast Fourier Transform (in the West) "http://www.fftw.org/" A library for computing DFT in one or more dimensions. NVIDIACG nVidia cg "http://developer.nvidia.com/page/cg_main.html" (for .??? files) A library for gpu programming (shaders and such). Network communication: SSL Open Secure Socket Layer "http://www.openssl.org/" A network encryption library. NSPR Netscape Portable Runtime "http://www.mozilla.org/projects/nspr/" Used for network sockets and threading. User input: VRPN Virtual Reality Peripheral Network "http://www.cs.unc.edu/Research/vrpn/" A controller/peripheral input library.
c92b9d824116f0d2cc2e67ded17a2f353593d4fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/c92b9d824116f0d2cc2e67ded17a2f353593d4fb/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2181, 966, 13332, 1172, 3536, 2164, 293, 464, 69, 23, 72, 19, 2434, 19, 28865, 17, 6584, 364, 1898, 6864, 1779, 18, 225, 890, 40, 938, 310, 392, 12574, 310, 5907, 30, 4552, 25, 1377, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2181, 966, 13332, 1172, 3536, 2164, 293, 464, 69, 23, 72, 19, 2434, 19, 28865, 17, 6584, 364, 1898, 6864, 1779, 18, 225, 890, 40, 938, 310, 392, 12574, 310, 5907, 30, 4552, 25, 1377, ...
if count > 3:
if count > 3:
def createPersons(): """Create a randomly generated persons.csv in the current directory. Format of the file: id, surname, name, groups, dob, comments where groups is a space separated list of groups this pupils is a member of """ f = open("persons.csv", "w") r = open("roster.txt", "w") names = sets.Set() subNames = subjects.keys() subNames.extend(subjects.keys()) team = 1 kids = [] for i in range(nr_pupils): year = i / (nr_pupils/years) + 1 groups = ["%s%d" % (subj, year) for subj in subjects.keys()] birthday = random_date(datetime.date(pupil_age_end - year + 1, 1, 1), datetime.date(pupil_age_end - year + 2, 1, 1)) for counter in range(20): surname, name = random_name() full = "%s %s" % (name, surname) if full not in names: break names.add(full) kids.append(full) groups_str = 'year%s %s' % (year, 'pupils') print >> f, '"","%s","%s","%s","%s",""' % (surname, name, groups_str, birthday) for count in range(0, nr_teachers): period = count if count > 3: team = 2 period = period - 4 students = kids[31:] else: students = kids[:30] for counter in range(20): surname, name = random_name() full = "%s %s" % (name, surname) if full not in names: break names.add(full) birthday = random_date(datetime.date(teacher_age_start, 1, 1), datetime.date(teacher_age_end, 1, 1)) print >> f, '"","%s","%s","%s teachers","%s",""' % (surname, name, subNames[count], birthday) timetable[count][period] = '%s %s | %s %s' % (\ subjects[subNames[count]], team, name, surname) print >> r, '%s %s' % (\ subjects[subNames[count]], team) for kid in students: print >> r, kid print >> r, "" r.close() f.close()
a1ba8dcd482f9a6a93ef17ceb8b89a53fa72b1ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/a1ba8dcd482f9a6a93ef17ceb8b89a53fa72b1ab/datagen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 8346, 87, 13332, 3536, 1684, 279, 20153, 4374, 6175, 87, 18, 6715, 316, 326, 783, 1867, 18, 225, 4077, 434, 326, 585, 30, 612, 16, 17007, 16, 508, 16, 3252, 16, 741, 70, 16, 567...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8346, 87, 13332, 3536, 1684, 279, 20153, 4374, 6175, 87, 18, 6715, 316, 326, 783, 1867, 18, 225, 4077, 434, 326, 585, 30, 612, 16, 17007, 16, 508, 16, 3252, 16, 741, 70, 16, 567...
lc.height.AsIs() lc.width.AsIs()
lc.height.SameAs(self.titlebar, wxHeight, 0) lc.width.SameAs(self.titlebar, wxHeight, 0)
def __init__(self, toplevel, parent = None, id = -1, size = wxDefaultSize): self.toplevel = toplevel MultiImageWindow.__init__(self, parent, id, size)
2bfa6072e0eee6ee9776fba1bb552eff467b0ecb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/2bfa6072e0eee6ee9776fba1bb552eff467b0ecb/classifier_display.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 28999, 16, 982, 273, 599, 16, 612, 273, 300, 21, 16, 963, 273, 7075, 1868, 1225, 4672, 365, 18, 3669, 2815, 273, 28999, 5991, 2040, 3829, 16186, 2738, 97...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 28999, 16, 982, 273, 599, 16, 612, 273, 300, 21, 16, 963, 273, 7075, 1868, 1225, 4672, 365, 18, 3669, 2815, 273, 28999, 5991, 2040, 3829, 16186, 2738, 97...
else: ratings[category] = value if category not in ["generic", "modified"]: values[category] = {value: True}
values[key] = value
def _form_ratings (form): for key, value in _get_prefix_vals(form, 'category_'): category = _get_category(key) if not category.is_valid_value(value): error['categoryvalue'] = True return False else: ratings[category] = value if category not in ["generic", "modified"]: values[category] = {value: True} return True
50054979a219f018eaae59244777067e7fa40860 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/50054979a219f018eaae59244777067e7fa40860/rating_html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 687, 67, 17048, 899, 261, 687, 4672, 364, 498, 16, 460, 316, 389, 588, 67, 3239, 67, 4524, 12, 687, 16, 296, 4743, 4623, 4672, 3150, 273, 389, 588, 67, 4743, 12, 856, 13, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 687, 67, 17048, 899, 261, 687, 4672, 364, 498, 16, 460, 316, 389, 588, 67, 3239, 67, 4524, 12, 687, 16, 296, 4743, 4623, 4672, 3150, 273, 389, 588, 67, 4743, 12, 856, 13, 309, ...
sort_on = 'sortable_title', sort_order = '')
sort_on = 'getObjPositionInParent', sort_order = '')
def folders(self): # import pdb; pdb.set_trace( ) subfolders = [] folderobjects = [] all_folders = self.catalog( ['Folder', 'Workspace', 'TabbedViewFolder'], depth=1, sort_on = 'sortable_title', sort_order = '') return all_folders
491b03086f05ddefa933acf2577cf12191306deb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11900/491b03086f05ddefa933acf2577cf12191306deb/overview.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9907, 12, 2890, 4672, 468, 1930, 10892, 31, 10892, 18, 542, 67, 5129, 12, 262, 720, 16064, 273, 5378, 3009, 6911, 273, 5378, 777, 67, 16064, 273, 365, 18, 7199, 12, 10228, 3899, 2187, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9907, 12, 2890, 4672, 468, 1930, 10892, 31, 10892, 18, 542, 67, 5129, 12, 262, 720, 16064, 273, 5378, 3009, 6911, 273, 5378, 777, 67, 16064, 273, 365, 18, 7199, 12, 10228, 3899, 2187, ...
"""Returns the session value for errors"""
def getSessionInfo(self, default=None): """Returns the session value for errors""" return self.__getSession(_SESSION_INFO, default)
5e2c32dd33871476397a4f10e62760ac351975c5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3287/5e2c32dd33871476397a4f10e62760ac351975c5/session_manager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7183, 966, 12, 2890, 16, 805, 33, 7036, 4672, 327, 365, 16186, 588, 2157, 24899, 7042, 67, 5923, 16, 805, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 7183, 966, 12, 2890, 16, 805, 33, 7036, 4672, 327, 365, 16186, 588, 2157, 24899, 7042, 67, 5923, 16, 805, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
EXAMPLES: sage: F4 = WeylCharacterRing(['F',4]) sage: [F4(x).check(verbose = true) for x in F4.lattice().fundamental_weights()] [[52, 52], [1274, 1274], [273, 273], [26, 26]]
EXAMPLES: sage: F4 = WeylCharacterRing(['F',4]) sage: [F4(x).check(verbose = true) for x in F4.lattice().fundamental_weights()] [[52, 52], [1274, 1274], [273, 273], [26, 26]]
def check(self, verbose=False): """To check the correctness of an element, we compare the theoretical dimension computed Weyl character formula with the actual one obtained by adding up the multiplicities. EXAMPLES: sage: F4 = WeylCharacterRing(['F',4]) sage: [F4(x).check(verbose = true) for x in F4.lattice().fundamental_weights()] [[52, 52], [1274, 1274], [273, 273], [26, 26]] """ theoretical = sum(self._hdict[k]*self._lattice.weyl_dimension(self._parent.VS(k)) for k in self._hdict) practical = sum(self._mdict[k] for k in self._mdict) if verbose: return [theoretical, practical] else: return theoretical == practical
0a30ee9b10542e4dc66149f6ffe87504cb679b84 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/0a30ee9b10542e4dc66149f6ffe87504cb679b84/weyl_characters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 16, 3988, 33, 8381, 4672, 3536, 774, 866, 326, 3434, 4496, 434, 392, 930, 16, 732, 3400, 326, 326, 479, 88, 1706, 4968, 8470, 678, 402, 80, 3351, 8013, 598, 326, 3214, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 16, 3988, 33, 8381, 4672, 3536, 774, 866, 326, 3434, 4496, 434, 392, 930, 16, 732, 3400, 326, 326, 479, 88, 1706, 4968, 8470, 678, 402, 80, 3351, 8013, 598, 326, 3214, ...
def fl_set_xyplot_fixed_xaxis(ob, lm, rm): """ fl_set_xyplot_fixed_xaxis(ob, lm, rm) """ _fl_set_xyplot_fixed_xaxis(ob, lm, rm)
def fl_set_xyplot_fixed_xaxis(obj, lm, rm): """ fl_set_xyplot_fixed_xaxis(obj, lm, rm) """ _fl_set_xyplot_fixed_xaxis(obj, lm, rm)
def fl_set_xyplot_fixed_xaxis(ob, lm, rm): """ fl_set_xyplot_fixed_xaxis(ob, lm, rm) """ _fl_set_xyplot_fixed_xaxis(ob, lm, rm)
8765c710f695de392f6fc7c664c746ec98668b1d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/8765c710f695de392f6fc7c664c746ec98668b1d/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 1698, 4032, 67, 12429, 67, 92, 4890, 12, 2603, 16, 14966, 16, 6692, 4672, 3536, 1183, 67, 542, 67, 1698, 4032, 67, 12429, 67, 92, 4890, 12, 2603, 16, 14966, 16, 66...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 1698, 4032, 67, 12429, 67, 92, 4890, 12, 2603, 16, 14966, 16, 6692, 4672, 3536, 1183, 67, 542, 67, 1698, 4032, 67, 12429, 67, 92, 4890, 12, 2603, 16, 14966, 16, 66...
txt = unicode(self.localcontext.get('translate', lambda x:x)(txt))
txt = unicode(txt)
def _process_text(self, txt): if not self.localcontext: return str2xml(txt) if not txt: return '' result = '' sps = _regex.split(txt) while sps: # This is a simple text to translate result += unicode(self.localcontext.get('translate', lambda x:x)(sps.pop(0))) if sps: try: expr = sps.pop(0) txt = eval(expr,self.localcontext) if txt and (isinstance(txt, unicode) or isinstance(txt, str)): txt = unicode(self.localcontext.get('translate', lambda x:x)(txt)) except Exception,e: tb_s = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback)) if type(txt)==type('') or type(txt)==type(u''): txt2 = str2xml(txt) result += unicode(txt2) elif (txt is not None) and (txt is not False): result += unicode(txt) return result
1798639ad477d0d4e4541909bf55b416f99edc9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/1798639ad477d0d4e4541909bf55b416f99edc9c/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 67, 955, 12, 2890, 16, 6463, 4672, 309, 486, 365, 18, 3729, 2472, 30, 327, 609, 22, 2902, 12, 5830, 13, 309, 486, 6463, 30, 327, 875, 563, 273, 875, 272, 1121, 273, 389, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 67, 955, 12, 2890, 16, 6463, 4672, 309, 486, 365, 18, 3729, 2472, 30, 327, 609, 22, 2902, 12, 5830, 13, 309, 486, 6463, 30, 327, 875, 563, 273, 875, 272, 1121, 273, 389, ...
def __init__(self,scene):
def __init__(self, scene):
def __init__(self,scene): """ Initialisation of the abstract Plot class @param scene: The Scene to render the plot in @type scene: Scene object """ if _debug: print "\t%s: Called Plot.__init__()" % rendererName pass
525240b057c0121c2cab7772950af46d6399ad7e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/525240b057c0121c2cab7772950af46d6399ad7e/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9065, 4672, 3536, 10188, 10742, 434, 326, 8770, 15211, 667, 225, 632, 891, 9065, 30, 1021, 29347, 358, 1743, 326, 3207, 316, 632, 723, 9065, 30, 29347, 733...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9065, 4672, 3536, 10188, 10742, 434, 326, 8770, 15211, 667, 225, 632, 891, 9065, 30, 1021, 29347, 358, 1743, 326, 3207, 316, 632, 723, 9065, 30, 29347, 733...
dest = os.path.join(link_dir, link[0]) target = os.path.join(target_dir, link[1])
dest = os.path.join(self.install_dir, link[0]) target = os.path.join(target_directory, link[1])
def run(self): scripts = self.get_finalized_command('install_scripts') appdata = self.get_finalized_command('install_app_data')
d9c1191ac20a9953e76d9fdba198bd1af4e4fc4a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2215/d9c1191ac20a9953e76d9fdba198bd1af4e4fc4a/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 8873, 273, 365, 18, 588, 67, 6385, 1235, 67, 3076, 2668, 5425, 67, 12827, 6134, 595, 892, 273, 365, 18, 588, 67, 6385, 1235, 67, 3076, 2668, 5425, 67, 2910, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 8873, 273, 365, 18, 588, 67, 6385, 1235, 67, 3076, 2668, 5425, 67, 12827, 6134, 595, 892, 273, 365, 18, 588, 67, 6385, 1235, 67, 3076, 2668, 5425, 67, 2910, 67, ...
self.app.bind("<Escape>", self.doCancel)
def createDialog(self): self.app = tk.Tk() self.app.protocol('WM_DELETE_WINDOW', self.denyWindowManagerClose) self.app.title(self.title) self.app.iconname('Dialog') self.app.geometry("+300+200") # # the main window # self.entryWidgets = [None]*len(self.options) self.labelWidgets = [None]*len(self.options) self.app.bind("<Escape>", self.doCancel) # all use grid management # top message # do not use a very long description please tk.Message(self.app, text=self.description, width=600).grid(row=0, column=0, columnspan = 2 * self.nCol, sticky=tk.N+tk.E+tk.S+tk.W, pady=20) # find out number of items etc colParam = 0 for opt in self.options: if opt.has_key('label'): colParam += 1 if opt.has_key('chooseFrom'): colParam += len( opt['chooseFrom']) -1 if opt.has_key('chooseOneOf'): colParam += len( opt['chooseOneOf']) -1 if colParam / self.nCol * self.nCol == colParam: colParam /= self.nCol else: colParam = colParam/self.nCol + 1 colCount = 0 colIndex = 0 # all entries for g in range(len(self.options)): opt = self.options[g] if not opt.has_key('label'): continue # --------- entryWidget ---------------------------------------------- # use different entry method for different types if opt.has_key('chooseOneOf'): # single choice self.labelWidgets[g] = tk.Label(self.app, text=opt['label']) self.labelWidgets[g].grid(column=colIndex*2, row=colCount%colParam+1, padx=10, rowspan = len(opt['chooseOneOf']), sticky=tk.E) self.entryWidgets[g] = tk.Listbox(self.app, width=40, selectmode=tk.SINGLE, \ exportselection=0, height=len(opt['chooseOneOf'])) self.entryWidgets[g].grid(column=colIndex*2+1, row=colCount%colParam+1, padx=10, rowspan = len(opt['chooseOneOf'])) colCount += len(opt['chooseOneOf']) for entry in opt['chooseOneOf']: self.entryWidgets[g].insert(tk.END, str(entry)) if self.values[g] is not None: self.entryWidgets[g].select_set( opt['chooseOneOf'].index(self.values[g])) elif opt.has_key('chooseFrom'): # multiple choice self.labelWidgets[g] = tk.Label(self.app, text=opt['label']) self.labelWidgets[g].grid(column=colIndex*2, row=colCount%colParam+1, padx=10, rowspan = len(opt['chooseFrom']), sticky=tk.E) self.entryWidgets[g] = tk.Listbox(self.app, width=40, selectmode=tk.EXTENDED, \ exportselection=0, height=len( opt['chooseFrom'])) self.entryWidgets[g].grid(column=colIndex*2+1, row=colCount%colParam+1, padx=10, rowspan = len(opt['chooseFrom'])) colCount += len(opt['chooseFrom']) for entry in opt['chooseFrom']: self.entryWidgets[g].insert(tk.END, str(entry)) if self.values[g] is not None: if type(self.values[g]) in [types.TupleType, types.ListType]: for val in self.values[g]: self.entryWidgets[g].select_set( opt['chooseFrom'].index(val)) else: self.entryWidgets[g].select_set( opt['chooseFrom'].index( self.values[g] )) elif (opt.has_key('arg') and opt['arg'][-1] != ':') or \ (opt.has_key('longarg') and opt['longarg'][-1] != '='): # true or false self.labelWidgets[g] = tk.Label(self.app, text=opt['label']) self.labelWidgets[g].grid(column=colIndex*2, row=colCount%colParam+1, padx=10, rowspan = 1, sticky=tk.E) # replace self.values[g] by a tk IntVar() because tk.Checkbutton has to store # its value in such a variable. self.values[g].get() will be used to return the # state of this Checkbutton. # c.f. http://infohost.nmt.edu/tcc/help/pubs/tkinter/control-variables.html iv = tk.IntVar() iv.set(self.values[g] == True) # self.values[g] can be None, True or False self.values[g] = iv self.entryWidgets[g] = tk.Checkbutton(self.app, height=1, text = "Yes / No", variable=self.values[g]) self.entryWidgets[g].grid(column=colIndex*2+1, row=colCount%colParam+1, padx=10, rowspan = 1) colCount += 1 self.entryWidgets[g].deselect() else: self.labelWidgets[g] = tk.Label(self.app, text=opt['label']) self.labelWidgets[g].grid(column=colIndex*2, row=colCount%colParam+1, padx=10, sticky=tk.E) self.entryWidgets[g] = tk.Entry(self.app, width=40) self.entryWidgets[g].grid(column=colIndex*2+1, row=colCount%colParam+1, padx=10) colCount += 1 # put default value into the entryWidget if self.values[g] is not None: self.entryWidgets[g].insert(0, prettyOutput(self.values[g])) colIndex = colCount /colParam self.entryWidgets[g].bind("<Return>", self.doGetText) self.entryWidgets[g].bind("<Escape>", self.doCancel) # help button helpButton = tk.Button(self.app, takefocus=1, text="Help") helpButton.bind("<Return>", self.doHelp) helpButton.bind("<Button-1>", self.doHelp) helpButton.grid(column=0, columnspan=self.nCol, row = colParam+1, pady=20) # ok button okButton = tk.Button(self.app, takefocus=1, text="Run!") okButton.bind("<Return>", self.doGetText) okButton.bind("<Button-1>", self.doGetText) okButton.grid( column=self.nCol, columnspan=self.nCol, row = colParam+1, pady=20) # cancel button cancelButton = tk.Button(self.app, takefocus=1, text="Cancel") cancelButton.bind("<Return>", self.doCancel) cancelButton.bind("<Button-1>", self.doCancel) cancelButton.grid( column=0, columnspan=2*self.nCol, row = colParam+1, pady=20)
b8dc92ef8ad792606f004235722b9585e2bbe014 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/401/b8dc92ef8ad792606f004235722b9585e2bbe014/simuOpt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 6353, 12, 2890, 4672, 365, 18, 2910, 273, 13030, 18, 56, 79, 1435, 365, 18, 2910, 18, 8373, 2668, 25173, 67, 6460, 67, 23407, 2187, 365, 18, 13002, 93, 3829, 1318, 4605, 13, 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, 752, 6353, 12, 2890, 4672, 365, 18, 2910, 273, 13030, 18, 56, 79, 1435, 365, 18, 2910, 18, 8373, 2668, 25173, 67, 6460, 67, 23407, 2187, 365, 18, 13002, 93, 3829, 1318, 4605, 13, 365, ...
",pground='650mbar',altitude='5000m',waterheight='2km',relhum=20,pwv="+str(user_pwv)+"mm)");
",pground='560mbar',altitude='5000m',waterheight='200m',relhum=20,pwv="+str(user_pwv)+"mm)");
def simdata( project=None, modifymodel=None, skymodel=None, inbright=None, indirection=None, incell=None, incenter=None, inwidth=None, # innchan=None, setpointings=None, ptgfile=None, integration=None, direction=None, mapsize=None, maptype=None, pointingspacing=None, caldirection=None, calflux=None, predict=None, refdate=None, complist=None, totaltime=None, antennalist=None, sdantlist=None, sdant=None, thermalnoise=None, user_pwv=None, t_ground=None, t_sky=None, tau0=None, leakage=None, image=None, vis=None, modelimage=None, cell=None, imsize=None, niter=None, threshold=None, weighting=None, outertaper=None, stokes=None, analyze=None, showarray=None, showuv=None, showpsf=None, showmodel=None, showconvolved=None, showclean=None, showresidual=None, showdifference=None, showfidelity=None, graphics=None, verbose=None, overwrite=None, async=False): # RI TODO for inbright=unchanged, need to scale input image to jy/pix casalog.origin('simdata') if verbose: casalog.filter(level="DEBUG2") a=inspect.stack() stacklevel=0 for k in range(len(a)): if (string.find(a[k][1], 'ipython console') > 0): stacklevel=k myf=sys._getframe(stacklevel).f_globals saveinputs=myf['saveinputs'] saveinputs('simdata',project+".simdata.last") # some hardcoded variables that may be reintroduced in future development relmargin=.5 # number of PB between edge of model and pointing centers scanlength=1 # number of integrations per scan # as of 20100507, newfig will delete the previous one # create the utility object: util=simutil(direction) # this is the dir of the observation - could be "" if verbose: util.verbose=True msg=util.msg if type(skymodel)==type([]): skymodel=skymodel[0] skymodel=skymodel.replace('$project',project) if((not os.path.exists(skymodel)) and (not os.path.exists(complist))): msg("No sky input found. At least one of skymodel or complist must be set.",priority="error") return False if((not os.path.exists(skymodel)) and (os.path.exists(complist))): msg("No skymodel found. Some functionality is not supported when predicting from only components.",priority="warn") if analyze: msg("In particular, fidelity image may be misleading due to division by small values",priority="warn") grscreen=False grfile=False if graphics=="both": grscreen=True grfile=True if graphics=="screen": grscreen=True if graphics=="file": grfile=True try:
12f7d2e47d0da043bce88f35a675713e6f2009ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2098/12f7d2e47d0da043bce88f35a675713e6f2009ef/task_simdata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3142, 892, 12, 1984, 33, 7036, 16, 5612, 2284, 33, 7036, 16, 15513, 2284, 33, 7036, 16, 316, 31070, 33, 7036, 16, 1547, 2769, 33, 7036, 16, 316, 3855, 33, 7036, 16, 316, 5693, 33, 70...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3142, 892, 12, 1984, 33, 7036, 16, 5612, 2284, 33, 7036, 16, 15513, 2284, 33, 7036, 16, 316, 31070, 33, 7036, 16, 1547, 2769, 33, 7036, 16, 316, 3855, 33, 7036, 16, 316, 5693, 33, 70...
class IDictionaryIsh(IKeyed, ISized): def __getitem__(key): """Get the value for the given key Raise a key error if the key if not in the collection. """ def get(key, default=None): """Get the value for the given key Raise a key error if the key if not in the collection and no default is specified. Return the default if specified and the key is not in the collection. """ def __setitem__(key, value): """Set the value for the given key""" def __delitem__(key): """delete the value for the given key Raise a key error if the key if not in the collection."""
class IDictionaryIsh(IKeyed, Interface.Standard.MinimalDictionary):
def __getitem__(index): """Return the key in the given index position
70f54df688f1f24815738cc3f414b25689a001b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/70f54df688f1f24815738cc3f414b25689a001b5/Interfaces.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 1615, 4672, 3536, 990, 326, 498, 316, 326, 864, 770, 1754, 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, 1001, 31571, 972, 12, 1615, 4672, 3536, 990, 326, 498, 316, 326, 864, 770, 1754, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
key_quadrant = int(plot_info[int(quantity_number)]['Key_Quadrant'])
key_pos = plot_info[int(quantity_number)]['Key_Position'] key_dist = 0.2*unit.v_cm
def scatter_plot(plot_info,data_set): #plot_info is details about the overall plot layout and text. #data_set is a dictionary keyed by test name containing lists of X and Y data points. #print plot_info #print data_set for quantity_number in plot_info: if data_set[quantity_number] == []: continue #print "No data in Scatter Plot Dataset." else: # Set variables for Plot extracted from the first group of lines in config file starting with 'q'. # Variables for plot. plot_title = plot_info[int(quantity_number)]['Scatter_Plot_Title'] print plot_title x_title = plot_info[int(quantity_number)]['X_Title'] y_title = plot_info[int(quantity_number)]['Y_Title'] min_x = float(plot_info[int(quantity_number)]['Plot_Min']) #print min_x max_x = float(plot_info[int(quantity_number)]['Plot_Max']) #print max_x min_y = float(plot_info[int(quantity_number)]['Plot_Min']) max_y = float(plot_info[int(quantity_number)]['Plot_Max']) percent_error = int(plot_info[int(quantity_number)]['%error']) title_quadrant = int(plot_info[int(quantity_number)]['Title_Quadrant']) key_quadrant = int(plot_info[int(quantity_number)]['Key_Quadrant']) plot_width = int(plot_info[int(quantity_number)]['Plot_Width(cm)']) #Create filename from fields in input file record. plot_file_name = plot_info[int(quantity_number)]['Plot_Filename'] #print plot_file_name # Determine the location for the key, alignment based on key_quadrant setting. if key_quadrant == 1: key_pos = "tl" key_dist = 0.00 elif key_quadrant == 2: key_pos = "tr" key_dist = 0.00 elif key_quadrant == 3: key_pos = "bl" key_dist = 0.00 elif key_quadrant == 4: key_pos = "br" key_dist = 0.00 else: print "A quadrant for the key location was not specified./nUsing the default top left quadrant." key_pos = "tl" key_dist = 0.00 #Begin Plotting #print exp_data #print mod_data # Initialize graph object g = graph.graphxy(width=plot_width, ratio=1/1, key=graph.key.key(pos=key_pos, dist=key_dist), x=graph.axis.linear(title=x_title, min=min_x, max=max_x), y=graph.axis.linear(title=y_title, min=min_y, max=max_y)) #Plot Midline and Error bounds lines. errorLineCenterPoints = [[min_x,min_y],[max_x,max_y]] #print errorLineCenterPoints lower_bound = max_y - max_y * percent_error / 100 #print lower_bound errorLineLowerPoints = [[min_x,min_y],[max_x,lower_bound]] #print errorLineLowerPoints upper_bound = max_y + max_y * percent_error / 100.0 #print upper_bound errorLineUpperPoints = [[min_x,min_y],[max_x,upper_bound]] #print errorLineUpperPoints g.plot(graph.data.points(errorLineCenterPoints, title=None, x=1, y=2), [graph.style.line([style.linewidth.Thin, style.linestyle.solid])]) g.plot(graph.data.points(errorLineLowerPoints, title=None, x=1, y=2), [graph.style.line([style.linewidth.Thin, style.linestyle.dashed])]) g.plot(graph.data.points(errorLineUpperPoints, title=None, x=1, y=2), [graph.style.line([style.linewidth.Thin, style.linestyle.dashed])]) #One line at a time added to plot from each data set. # Iterate over items in data dictionary key for keys that are not []. # Append data sets to scatter_plot_data_list scatter_plot_data_list = [] mystyle = graph.style.symbol( graph.style.symbol.changetriangletwice, size=0.1*unit.v_cm, symbolattrs=[graph.style.symbol.changefilledstroked, attr.changelist([color.rgb.red, color.rgb.green, color.rgb.blue])]) for data in data_set[quantity_number]: scatter_plot_data = [data[1]] #print scatter_plot_data g.plot(graph.data.points(scatter_plot_data, x=1, y=2, title=data[0].replace('_',' ')), [mystyle]) # Now plot the Title text, alignment based on title quadrant setting. if title_quadrant == 1: g.text(0.1, g.height - 0.2, plot_title, [text.halign.left, text.valign.top, text.size.small]) elif title_quadrant == 2: g.text(g.width-0.1, g.height - 0.2, plot_title, [text.halign.right, text.valign.top, text.size.normalsize]) elif title_quadrant == 3: g.text(0.1, 0.2, plot_title, [text.halign.left, text.valign.bottom, text.size.normalsize]) elif title_quadrant == 4: g.text(g.width-0.1, 0.2, plot_title, [text.halign.right, text.valign.bottom, text.size.normalsize]) else: print "A quadrant for the title location was not specified./nUsing the default top left quadrant." g.text(0.1, g.height - 0.2, plot_title, [text.halign.left, text.valign.top, text.size.small]) # Write the output plot_file_path = output_directory+plot_file_name #print plot_file_path g.writePDFfile(plot_file_path) print "Plot to: \n", plot_file_path+".PDF"
93e8fdd038707661dcc82494e49803ca362e12a7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12/93e8fdd038707661dcc82494e49803ca362e12a7/Validation_Data_Processor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14644, 67, 4032, 12, 4032, 67, 1376, 16, 892, 67, 542, 4672, 468, 4032, 67, 1376, 353, 3189, 2973, 326, 13914, 3207, 3511, 471, 977, 18, 468, 892, 67, 542, 353, 279, 3880, 17408, 635, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14644, 67, 4032, 12, 4032, 67, 1376, 16, 892, 67, 542, 4672, 468, 4032, 67, 1376, 353, 3189, 2973, 326, 13914, 3207, 3511, 471, 977, 18, 468, 892, 67, 542, 353, 279, 3880, 17408, 635, ...
saveTask(readMessages(task))
saveTask(task.readMessages())
def body(self): request = readQuery()
fa23a8474b6dad2c6e69bfe1e5ab45a28c26984a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5741/fa23a8474b6dad2c6e69bfe1e5ab45a28c26984a/task_ws.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1417, 12, 2890, 4672, 590, 273, 855, 1138, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1417, 12, 2890, 4672, 590, 273, 855, 1138, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
[compile.In(rng_R, value=numpy.random.RandomState(55), update=post_r, mutable=True)],
[compile.In(rng_R, value=numpy.random.RandomState(utt.fetch_seed()), update=post_r, mutable=True)],
def test_normal(self): """Test that raw_random.normal generates the same results as numpy.""" # Check over two calls to see if the random state is correctly updated. rng_R = random_state_type() # Use non-default parameters post_r, out = normal(rng_R, (2,3), 4.0, 2.0)
d5701303093e5943cc4df89bc18c7fecc19b0be2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/d5701303093e5943cc4df89bc18c7fecc19b0be2/test_raw_random.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6130, 12, 2890, 4672, 3536, 4709, 716, 1831, 67, 9188, 18, 6130, 6026, 326, 1967, 1686, 487, 3972, 12123, 468, 2073, 1879, 2795, 4097, 358, 2621, 309, 326, 2744, 919, 353, 8783...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6130, 12, 2890, 4672, 3536, 4709, 716, 1831, 67, 9188, 18, 6130, 6026, 326, 1967, 1686, 487, 3972, 12123, 468, 2073, 1879, 2795, 4097, 358, 2621, 309, 326, 2744, 919, 353, 8783...
if sys.platform == 'win32': name = '%PYTHONHOME%' else: name = '$PYTHONHOME' logger.warn('%s is set; this can cause problems creating environments' % name)
del os.environ['PYTHONHOME']
def main(): parser = optparse.OptionParser( version=virtualenv_version, usage="%prog [OPTIONS] DEST_DIR") parser.add_option( '-v', '--verbose', action='count', dest='verbose', default=0, help="Increase verbosity") parser.add_option( '-q', '--quiet', action='count', dest='quiet', default=0, help='Decrease verbosity') parser.add_option( '-p', '--python', dest='python', metavar='PYTHON_EXE', help='The Python interpreter to use, e.g., --python=python2.5 will use the python2.5 ' 'interpreter to create the new environment. The default is the interpreter that ' 'virtualenv was installed with (%s)' % sys.executable) parser.add_option( '--clear', dest='clear', action='store_true', help="Clear out the non-root install and start from scratch") parser.add_option( '--no-site-packages', dest='no_site_packages', action='store_true', help="Don't give access to the global site-packages dir to the " "virtual environment") parser.add_option( '--unzip-setuptools', dest='unzip_setuptools', action='store_true', help="Unzip Setuptools or Distribute when installing it") parser.add_option( '--relocatable', dest='relocatable', action='store_true', help='Make an EXISTING virtualenv environment relocatable. ' 'This fixes up scripts and makes all .pth files relative') parser.add_option( '--distribute', dest='use_distribute', action='store_true', help='Use Distribute instead of Setuptools. Set environ variable' 'VIRTUALENV_USE_DISTRIBUTE to make it the default ') if 'extend_parser' in globals(): extend_parser(parser) options, args = parser.parse_args() global logger if 'adjust_options' in globals(): adjust_options(options, args) verbosity = options.verbose - options.quiet logger = Logger([(Logger.level_for_integer(2-verbosity), sys.stdout)]) if options.python and not os.environ.get('VIRTUALENV_INTERPRETER_RUNNING'): env = os.environ.copy() interpreter = resolve_interpreter(options.python) if interpreter == sys.executable: logger.warn('Already using interpreter %s' % interpreter) else: logger.notify('Running virtualenv with interpreter %s' % interpreter) env['VIRTUALENV_INTERPRETER_RUNNING'] = 'true' file = __file__ if file.endswith('.pyc'): file = file[:-1] os.execvpe(interpreter, [interpreter, file] + sys.argv[1:], env) if not args: print 'You must provide a DEST_DIR' parser.print_help() sys.exit(2) if len(args) > 1: print 'There must be only one argument: DEST_DIR (you gave %s)' % ( ' '.join(args)) parser.print_help() sys.exit(2) home_dir = args[0] if os.environ.get('WORKING_ENV'): logger.fatal('ERROR: you cannot run virtualenv while in a workingenv') logger.fatal('Please deactivate your workingenv, then re-run this script') sys.exit(3) if os.environ.get('PYTHONHOME'): if sys.platform == 'win32': name = '%PYTHONHOME%' else: name = '$PYTHONHOME' logger.warn('%s is set; this can cause problems creating environments' % name) if options.relocatable: make_environment_relocatable(home_dir) return create_environment(home_dir, site_packages=not options.no_site_packages, clear=options.clear, unzip_setuptools=options.unzip_setuptools, use_distribute=options.use_distribute) if 'after_install' in globals(): after_install(options, home_dir)
2706740ad1fd5273c797235b4a4326aafed3bdb5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12981/2706740ad1fd5273c797235b4a4326aafed3bdb5/virtualenv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2082, 273, 2153, 2670, 18, 1895, 2678, 12, 1177, 33, 12384, 3074, 67, 1589, 16, 4084, 11613, 14654, 306, 12422, 65, 2030, 882, 67, 4537, 7923, 225, 2082, 18, 1289, 67, 3482,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2082, 273, 2153, 2670, 18, 1895, 2678, 12, 1177, 33, 12384, 3074, 67, 1589, 16, 4084, 11613, 14654, 306, 12422, 65, 2030, 882, 67, 4537, 7923, 225, 2082, 18, 1289, 67, 3482,...
for (key, val) in ns_domain(nszone, nstype, dns, nscache):
for (key, val) in ns_domain(nszone, nstype, dns, nscache).iteritems():
def Listing(self, nscache = None): """ base listing generator """ nstype = self['Type'] valid = ('A', 'AAAA', 'ANY', 'CNAME', 'PTR') if nstype not in valid: print 'Invalid or missing option Type (valid are %s)' % (valid, ) raise UserWarning self.default = None nszone = self['Zone'] if type(nszone) is not str or \ nszone[0] == '.' or nszone[-1] == '.': print 'Invalid or mission option Zone' raise UserWarning self.default = "" dns = self['DNSAddr'] self.default = '^.*$' keyinclude = re.compile(self['KeyInclude']) valinclude = re.compile(self['ValInclude']) self.default = '^$' keyexclude = re.compile(self['KeyExclude']) valexclude = re.compile(self['ValExclude']) for (key, val) in ns_domain(nszone, nstype, dns, nscache): if keyinclude.match(key) is None or \ valinclude.match(val) is None or \ keyexclude.match(key) is not None or \ valexclude.match(val) is not None: continue yield (key, val)
8984f687a384cdbc9015f72c1555e4c3ebbcaf2c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4762/8984f687a384cdbc9015f72c1555e4c3ebbcaf2c/lookup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 987, 310, 12, 2890, 16, 290, 1017, 807, 273, 599, 4672, 3536, 1026, 11591, 4456, 3536, 290, 27273, 273, 365, 3292, 559, 3546, 923, 273, 7707, 37, 2187, 296, 11909, 2187, 296, 15409, 2187...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 987, 310, 12, 2890, 16, 290, 1017, 807, 273, 599, 4672, 3536, 1026, 11591, 4456, 3536, 290, 27273, 273, 365, 3292, 559, 3546, 923, 273, 7707, 37, 2187, 296, 11909, 2187, 296, 15409, 2187...
self.threadFlag.set() self.receiveThread.join(2.0) self.socket.close() self.socket = None
if self.receiver: self.receiver.close() self.receiver = None
def __stop__(self): self.threadFlag.set() self.receiveThread.join(2.0) self.socket.close() self.socket = None
9e40e17714720e0105d3c05e7ae0a4fe82aed2c5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8076/9e40e17714720e0105d3c05e7ae0a4fe82aed2c5/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 5681, 972, 12, 2890, 4672, 365, 18, 5930, 4678, 18, 542, 1435, 365, 18, 18149, 3830, 18, 5701, 12, 22, 18, 20, 13, 365, 18, 7814, 18, 4412, 1435, 365, 18, 7814, 273, 599, 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, 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, 5681, 972, 12, 2890, 4672, 365, 18, 5930, 4678, 18, 542, 1435, 365, 18, 18149, 3830, 18, 5701, 12, 22, 18, 20, 13, 365, 18, 7814, 18, 4412, 1435, 365, 18, 7814, 273, 599, 2, ...
raise SeriousError, _('No ID entered')
raise SeriousError, self._('No ID entered')
def handle(self, typere=re.compile('[@:]type'), numre=re.compile('[@:]number')): """Show a node of a particular class/id.""" t = n = '' for key in self.form.keys(): if typere.match(key): t = self.form[key].value.strip() elif numre.match(key): n = self.form[key].value.strip() if not t: raise ValueError, 'No type specified' if not n: raise SeriousError, _('No ID entered') try: int(n) except ValueError: d = {'input': n, 'classname': t} raise SeriousError, _( '"%(input)s" is not an ID (%(classname)s ID required)')%d url = '%s%s%s'%(self.base, t, n) raise Redirect, url
ade743793a8c591cf5f28a2d1c898d9c49ebe4f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ade743793a8c591cf5f28a2d1c898d9c49ebe4f6/actions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 16, 268, 8300, 73, 33, 266, 18, 11100, 2668, 14782, 26894, 723, 19899, 818, 266, 33, 266, 18, 11100, 2668, 14782, 26894, 2696, 26112, 30, 3536, 5706, 279, 756, 434, 279, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 16, 268, 8300, 73, 33, 266, 18, 11100, 2668, 14782, 26894, 723, 19899, 818, 266, 33, 266, 18, 11100, 2668, 14782, 26894, 2696, 26112, 30, 3536, 5706, 279, 756, 434, 279, ...
number = tichy.TelNumber(number)
number = TelNumber(number)
def create(self, number='', text='', direction='out'): number = tichy.TelNumber(number) text = tichy.Text(text) return SMS(number, text, direction)
7bf9eaa103891d6d9cdc83eed77a05ef24aa06ce /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4712/7bf9eaa103891d6d9cdc83eed77a05ef24aa06ce/sms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 2890, 16, 1300, 2218, 2187, 977, 2218, 2187, 4068, 2218, 659, 11, 4672, 1300, 273, 399, 292, 1854, 12, 2696, 13, 977, 273, 268, 1354, 93, 18, 1528, 12, 955, 13, 327, 21297, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 2890, 16, 1300, 2218, 2187, 977, 2218, 2187, 4068, 2218, 659, 11, 4672, 1300, 273, 399, 292, 1854, 12, 2696, 13, 977, 273, 268, 1354, 93, 18, 1528, 12, 955, 13, 327, 21297, ...
if isinstance(pacc,IAccessible): pacc=pacc elif isinstance(res,comtypes.client.dynamic._Dispatch) or isinstance(res,IUnknown):
if isinstance(pacc,comtypes.client.dynamic._Dispatch) or isinstance(pacc,IUnknown):
def normalizeIAccessible(pacc): if isinstance(pacc,IAccessible): pacc=pacc elif isinstance(res,comtypes.client.dynamic._Dispatch) or isinstance(res,IUnknown): pacc=pacc.QueryInterface(IAccessible) else: raise ValueError("pacc %s is not, or can not be converted to, an IAccessible"%str(pacc)) if not isinstance(pacc,IAccessible2): try: pacc=pacc.QueryInterface(IAccessible2) except: pass if not isinstance(pacc,IAccessible2): try: s=pacc.QueryInterface(IServiceProvider) i=s.QueryService(byref(IAccessible._iid_),byref(IAccessible2._iid_)) pacc=POINTER(IAccessible2)(i) except: pass
7a42dff5f043caa45b8f8675862473c4d1237198 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9340/7a42dff5f043caa45b8f8675862473c4d1237198/IAccessibleHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3883, 45, 10451, 12, 8774, 952, 4672, 309, 1549, 12, 8774, 952, 16, 832, 2352, 18, 2625, 18, 14507, 6315, 5325, 13, 578, 1549, 12, 8774, 952, 16, 45, 4874, 4672, 6790, 952, 33, 8774, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3883, 45, 10451, 12, 8774, 952, 4672, 309, 1549, 12, 8774, 952, 16, 832, 2352, 18, 2625, 18, 14507, 6315, 5325, 13, 578, 1549, 12, 8774, 952, 16, 45, 4874, 4672, 6790, 952, 33, 8774, ...
"""
'''
def testPageViews(self): self.assertEqual(queryView(ob, 'test', request), None) test3 = os.path.join(tests_path, 'testfiles', 'test3.pt')
1cfc7ddd1cac0110cca3e909215477e1c59bbca3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9523/1cfc7ddd1cac0110cca3e909215477e1c59bbca3/test_directives.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1964, 9959, 12, 2890, 4672, 365, 18, 11231, 5812, 12, 2271, 1767, 12, 947, 16, 296, 3813, 2187, 590, 3631, 599, 13, 1842, 23, 273, 1140, 18, 803, 18, 5701, 12, 16341, 67, 803, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 1964, 9959, 12, 2890, 4672, 365, 18, 11231, 5812, 12, 2271, 1767, 12, 947, 16, 296, 3813, 2187, 590, 3631, 599, 13, 1842, 23, 273, 1140, 18, 803, 18, 5701, 12, 16341, 67, 803, ...
def __getParameters(self,param):
def __getParameters( self, param ):
def __getParameters(self,param): """Returns CE parameter, e.g. MaxTotalJobs """ if type(param)==type(' '): if param in self.ceParameters.keys(): return S_OK(self.ceParameters[param]) else: return S_ERROR('Parameter %s not found' %(param)) elif type(param)==type([]): result = {} for p in param: if param in self.ceParameters.keys(): result[param] = self.ceParameters[param] if len(result.keys()) == len(p): return S_OK(result) else: return S_ERROR('Not all specified parameters available')
3d103a1ec7530dcfac38e6ccc642be862e663b73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/3d103a1ec7530dcfac38e6ccc642be862e663b73/ComputingElement.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 2402, 12, 365, 16, 579, 262, 30, 3536, 1356, 29538, 1569, 16, 425, 18, 75, 18, 4238, 5269, 7276, 3536, 309, 618, 12, 891, 13, 631, 723, 2668, 296, 4672, 309, 579, 316, 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, 1001, 588, 2402, 12, 365, 16, 579, 262, 30, 3536, 1356, 29538, 1569, 16, 425, 18, 75, 18, 4238, 5269, 7276, 3536, 309, 618, 12, 891, 13, 631, 723, 2668, 296, 4672, 309, 579, 316, 365...
self.plotFile = self.movie.get_GNUplot_filename()
def setup(self): """Setup the Plot Tool dialog, including populating the combobox with plotting options. """ # To setup the Plot Tool, we need to do the following: # 1. Make sure there is a valid DPB file. This is temporary since the Plot Tool will # soon allow the user to open and plot any trace file. # 2. From the DPB filename, construct the trace filename and GNUplot filename. # 3. Read the header from the trace file to obtain: # - Date and time # - Trajectory (DPB) filename. This is redundant now, but will be necessary when # Plot Tool allows the user to open and plot any trace file. # - The number of columns of data in the trace file so we can... # 4. Populate the plot combobox with the graph names # Make sure there is a DPB file for the assy. if not self.movie or not self.movie.filename: msg = redmsg("No tracefile exists for this part. To create one, run a simulation.") env.history.message(cmd + msg) return 1 # Construct the trace file name. self.traceFile = self.movie.get_trace_filename() # Make sure the tracefile exists if not os.path.exists(self.traceFile): msg = redmsg("Trace file [" + self.traceFile + "] is missing. Plot aborted.") env.history.message(cmd + msg) return 1 # Construct the GNUplot filename. self.plotFile = self.movie.get_GNUplot_filename() # Now we read specific lines of the traceFile to read parts of the header we need. # I will change this soon so that we can find this header info without knowing what line they are on. # Mark 050310 #bruce 060105: changing this now, to fix bug 1266. # If we've opened the tracefile once during this session, we # must check to see if the trace file has changed on disk. # To avoid this issue we reopen it every time and make sure to close it # and don't use any sort of line cache. # Mark had a comment about this but I [bruce 060105] am not sure what he meant by it: # Doesn't appear to be an issue calling checkcache before getline. #linecache.checkcache() # He also had some commented out code such as "#linecache.getline(self.traceFile, 5)" # which I've removed (as of rev 1.32).
d7b7ec716f285241b2f07ff7b0c3092d6ef42db1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/d7b7ec716f285241b2f07ff7b0c3092d6ef42db1/PlotTool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12, 2890, 4672, 3536, 7365, 326, 15211, 13288, 6176, 16, 6508, 3650, 1776, 326, 3894, 27570, 598, 20947, 702, 18, 3536, 468, 2974, 3875, 326, 15211, 13288, 16, 732, 1608, 358, 741, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12, 2890, 4672, 3536, 7365, 326, 15211, 13288, 6176, 16, 6508, 3650, 1776, 326, 3894, 27570, 598, 20947, 702, 18, 3536, 468, 2974, 3875, 326, 15211, 13288, 16, 732, 1608, 358, 741, ...
tapeSE = ''
localTapeSE = ''
def execute(self,dataToResolve=None): """This method is called to obtain the TURLs for all requested input data firstly by available site protocols and redundantly via TURL construction. If TURLs are missing these are conveyed in the result to """
37bbccf6f5cb340b62addcc55bbe92709cbbc66f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/37bbccf6f5cb340b62addcc55bbe92709cbbc66f/InputDataByProtocol.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 892, 774, 8460, 33, 7036, 4672, 3536, 2503, 707, 353, 2566, 358, 7161, 326, 399, 15749, 364, 777, 3764, 810, 501, 1122, 715, 635, 2319, 2834, 16534, 471, 19530, 715, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 892, 774, 8460, 33, 7036, 4672, 3536, 2503, 707, 353, 2566, 358, 7161, 326, 399, 15749, 364, 777, 3764, 810, 501, 1122, 715, 635, 2319, 2834, 16534, 471, 19530, 715, ...
return apply(getattr(self.mod, self.name).%s, args)
return apply(getattr(self.mod, self.name).%s, args)
def %s(self, *args): return apply(getattr(self.mod, self.name).%s, args)
ce7c76df1b92a89c9b48d025af1313d1dcf28c4f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ce7c76df1b92a89c9b48d025af1313d1dcf28c4f/rexec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 738, 87, 12, 2890, 16, 380, 1968, 4672, 327, 2230, 12, 588, 1747, 12, 2890, 18, 1711, 16, 365, 18, 529, 2934, 9, 87, 16, 833, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 738, 87, 12, 2890, 16, 380, 1968, 4672, 327, 2230, 12, 588, 1747, 12, 2890, 18, 1711, 16, 365, 18, 529, 2934, 9, 87, 16, 833, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
'ja':'%d& 'zh':'%d& 'ko':'%d& 'minnan':'%d n&icirc;', 'ur':'%d&
'ja':u'%d年', 'zh':u'%d年', 'ko':u'%d년', 'minnan':u'%d nî', 'ur':u'%dسبم'
def __call__(self, m, d): import wikipedia return wikipedia.html2unicode((date_format[m][self.site.lang]) % d, site = self.site)
2f8392c560135a8fa55641f181fd3a11ca38d1c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/2f8392c560135a8fa55641f181fd3a11ca38d1c1/date.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 312, 16, 302, 4672, 1930, 21137, 327, 21137, 18, 2620, 22, 9124, 12443, 712, 67, 2139, 63, 81, 6362, 2890, 18, 4256, 18, 4936, 5717, 738, 302, 16, 2834, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 312, 16, 302, 4672, 1930, 21137, 327, 21137, 18, 2620, 22, 9124, 12443, 712, 67, 2139, 63, 81, 6362, 2890, 18, 4256, 18, 4936, 5717, 738, 302, 16, 2834, ...
env2.securityToken = "bar"
env2.securityToken = "bar"
def _testSecurityChecks(self): with JSContext() as env1: env1.securityToken = "foo" # Create a function in env1. env1.eval("spy=function(){return spy;}")
550f86f8e1997ee990877076421feaf1936da8eb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5451/550f86f8e1997ee990877076421feaf1936da8eb/PyV8.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 4368, 4081, 12, 2890, 4672, 598, 6756, 1042, 1435, 487, 1550, 21, 30, 1550, 21, 18, 7462, 1345, 273, 315, 11351, 6, 225, 468, 1788, 279, 445, 316, 1550, 21, 18, 1550, 21, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 4368, 4081, 12, 2890, 4672, 598, 6756, 1042, 1435, 487, 1550, 21, 30, 1550, 21, 18, 7462, 1345, 273, 315, 11351, 6, 225, 468, 1788, 279, 445, 316, 1550, 21, 18, 1550, 21, ...
if cellRect.InsideXY (x, y): if not hasattr (self, 'hoverImageRow') and not self.IsCellEditControlEnabled():
if (cellRect.InsideXY (x, y) and not hasattr (self, 'hoverImageRow') and not self.IsCellEditControlEnabled() and isinstance (item, ItemCollection.ItemCollection)):
def OnMouseEvents (self, event): """ This code is tricky, tread with care -- DJA """ event.Skip() #Let the grid also handle the event by default
8f05326ae069e4f4a4e9e27b1f11d62679a73ec3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/8f05326ae069e4f4a4e9e27b1f11d62679a73ec3/SideBar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 9186, 3783, 261, 2890, 16, 871, 4672, 3536, 1220, 981, 353, 433, 13055, 16, 268, 896, 598, 7671, 1493, 30029, 37, 3536, 871, 18, 6368, 1435, 468, 24181, 326, 3068, 2546, 1640, 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, 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, 9186, 3783, 261, 2890, 16, 871, 4672, 3536, 1220, 981, 353, 433, 13055, 16, 268, 896, 598, 7671, 1493, 30029, 37, 3536, 871, 18, 6368, 1435, 468, 24181, 326, 3068, 2546, 1640, 326,...
def fl_set_form_hotobject(form, ob): """ fl_set_form_hotobject(form, ob) """ _fl_set_form_hotobject(form, ob)
def fl_set_form_hotobject(pForm, pObject): """ fl_set_form_hotobject(pForm, pObject) """ _fl_set_form_hotobject(pForm, pObject)
def fl_set_form_hotobject(form, ob): """ fl_set_form_hotobject(form, ob) """ _fl_set_form_hotobject(form, ob)
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, 687, 67, 15224, 1612, 12, 84, 1204, 16, 293, 921, 4672, 3536, 1183, 67, 542, 67, 687, 67, 15224, 1612, 12, 84, 1204, 16, 293, 921, 13, 3536, 225, 389, 2242, 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, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 687, 67, 15224, 1612, 12, 84, 1204, 16, 293, 921, 4672, 3536, 1183, 67, 542, 67, 687, 67, 15224, 1612, 12, 84, 1204, 16, 293, 921, 13, 3536, 225, 389, 2242, 67, ...
content_type = 'application/atom+xml' extra_headers['Content-Type'] = content_type
if 'Content-Type' not in extra_headers: content_type = 'application/atom+xml' extra_headers['Content-Type'] = content_type
def PostOrPut(self, verb, data, uri, extra_headers=None, url_params=None, escape_params=True, redirects_remaining=4, media_source=None, converter=None): """Insert data into a GData service at the given URI.
e5b2f5684f8295067ec81124840fdb5c31d3bfb4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6580/e5b2f5684f8295067ec81124840fdb5c31d3bfb4/service.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5616, 1162, 6426, 12, 2890, 16, 6405, 16, 501, 16, 2003, 16, 2870, 67, 2485, 33, 7036, 16, 880, 67, 2010, 33, 7036, 16, 4114, 67, 2010, 33, 5510, 16, 18064, 67, 17956, 33, 24, 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, 5616, 1162, 6426, 12, 2890, 16, 6405, 16, 501, 16, 2003, 16, 2870, 67, 2485, 33, 7036, 16, 880, 67, 2010, 33, 7036, 16, 4114, 67, 2010, 33, 5510, 16, 18064, 67, 17956, 33, 24, 16, ...
self.ts.addErase(txmbr.po.idx)
self.ts.addErase(txmbr.po)
def populateTs(self, test=0, keepold=1): """take transactionData class and populate transaction set"""
79e06f1c84eda0c42ffaae3b68bbba3fc0545e93 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/79e06f1c84eda0c42ffaae3b68bbba3fc0545e93/depsolve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6490, 17218, 12, 2890, 16, 1842, 33, 20, 16, 3455, 1673, 33, 21, 4672, 3536, 22188, 2492, 751, 667, 471, 6490, 2492, 444, 8395, 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, 6490, 17218, 12, 2890, 16, 1842, 33, 20, 16, 3455, 1673, 33, 21, 4672, 3536, 22188, 2492, 751, 667, 471, 6490, 2492, 444, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print osfs.info(filename)
print osfs.getinfo(filename)
def getsize(self, path):
140736a38e4f2e6a6d4e672af17c693bc8bd4ba3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5579/140736a38e4f2e6a6d4e672af17c693bc8bd4ba3/fs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30208, 12, 2890, 16, 589, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30208, 12, 2890, 16, 589, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
for index in range (len(self.sequence)): if (VS.GetGameTime()-self.talktime>=self.sequence[index][0] and VS.GetGameTime()-self.talktime<=self.sequence[index][0]+self.sequence[index][1]): self.player.commAnimation(self.animations[self.sequence[index][2]][0]) self.anitime = VS.GetGameTime()+2
for index in range (len(self.sequence)): if (VS.GetGameTime()-self.talktime>=self.sequence[index][0] and VS.GetGameTime()-self.talktime<=self.sequence[index][0]+self.sequence[index][1]): self.player.commAnimation(self.animations[self.sequence[index][2]][0]) if (VS.GetGameTime()-self.talktime<=self.sequence[index][0]+1): VS.playSound(self.speech[index], self.player.Position(), (0,0,0)) self.anitime = VS.GetGameTime()+2
def tutorialIntermezzo (self): # maybe he can have sympathy and make it a lesson if he beats you # like stop before you destroy the player's ship and mouth off about how he hopes you learned # something, 'pirates won't be so forgiving' if (self.practice==0 and self.fight==1): VS.IOmessage (0,"Oswald","Privateer","#FF0000"+"So you want to learn how to dodge lasers, eh?") VS.IOmessage (4,"Oswald","Privateer","#FF0000"+"You aren't the first newbie I've had to put down, and you won't be the last!") # set comm animation parameters self.sequence = [[0,3,0],[4,5,0]] self.talktime = VS.GetGameTime() self.timer = VS.GetGameTime()+10 self.practice = 1 if (self.practice==0 and self.fight==2): VS.IOmessage (0,"Oswald","Privateer","#FF0000"+"That's over the border, boy!") VS.IOmessage (2,"Oswald","Privateer","#FF0000"+"May God have mercy upon my enemies, because I won't!") # set comm animation parameters self.sequence = [[0,2,0],[4,3,0]] self.talktime = VS.GetGameTime() self.timer = VS.GetGameTime()+5 self.practice = 1 if (self.practice==1 and VS.GetGameTime()<self.timer and VS.GetGameTime()>=self.anitime): for index in range (len(self.sequence)): if (VS.GetGameTime()-self.talktime>=self.sequence[index][0] and VS.GetGameTime()-self.talktime<=self.sequence[index][0]+self.sequence[index][1]): self.player.commAnimation(self.animations[self.sequence[index][2]][0]) self.anitime = VS.GetGameTime()+2 if (self.practice==1 and VS.GetGameTime()>=self.timer): self.practice = 4 if (self.practice==4 and self.player.GetHull()<=self.playerhull*0.90 and self.fight<2): self.drone.SetTarget(VS.Unit()) VS.AdjustRelation(self.drone.getFactionName(),self.player.getFactionName(),99,10) VS.AdjustRelation(self.player.getFactionName(),self.drone.getFactionName(),99,10) self.drone.LoadAIScript("sitting_duck") self.drone.PrimeOrders() self.practice = 5 if (self.practice==5): VS.IOmessage (0,"Oswald","Privateer",self.msgColor+"Enough of this!") VS.IOmessage (1,"Oswald","Privateer",self.msgColor+"I hope you've learned something.") VS.IOmessage (2,"Oswald","Privateer",self.msgColor+"Pirates won't be so forgiving.") VS.IOmessage (4,"Oswald","Privateer",self.msgColor+"And neither will I if you ever play tricks on me again!") # set comm animation parameters self.sequence = [[0,2,0],[4,2,0]] self.talktime = VS.GetGameTime() self.timer = VS.GetGameTime()+7 self.practice = 6 if (self.practice==6 and VS.GetGameTime()<self.timer and VS.GetGameTime()>=self.anitime): for index in range (len(self.sequence)): if (VS.GetGameTime()-self.talktime>=self.sequence[index][0] and VS.GetGameTime()-self.talktime<=self.sequence[index][0]+self.sequence[index][1]): self.player.commAnimation(self.animations[self.sequence[index][2]][0]) self.anitime = VS.GetGameTime()+2 if (self.practice==6 and VS.GetGameTime()>=self.timer): self.practice = 7 if (self.practice==7 and VS.GetGameTime()>=self.timer): VS.IOmessage (0,"Oswald","Privateer",self.msgColor+"Now let's get back to business, hotshot.") self.timer = VS.GetGameTime()+2 self.practice = 8 if (self.practice==8 and VS.GetGameTime()>=self.timer): self.practice = 99 if (self.practice>=99): self.droneshield = unit.getShieldPercent(self.drone) # make sure to reset the counter for the next practice loops self.practice = 0 self.stage = self.savestage return 0
66c46e79ea501cbc68b49d8dd0a03a57988f1683 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2883/66c46e79ea501cbc68b49d8dd0a03a57988f1683/quest_tutorial.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 22378, 2465, 3501, 6378, 83, 261, 2890, 4672, 468, 6944, 3904, 848, 1240, 5382, 803, 93, 471, 1221, 518, 279, 22766, 309, 3904, 506, 2323, 1846, 468, 3007, 2132, 1865, 1846, 5546, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 22378, 2465, 3501, 6378, 83, 261, 2890, 4672, 468, 6944, 3904, 848, 1240, 5382, 803, 93, 471, 1221, 518, 279, 22766, 309, 3904, 506, 2323, 1846, 468, 3007, 2132, 1865, 1846, 5546, 3...
this = apply(_quickfix.new_TotalNetValue, args)
this = _quickfix.new_TotalNetValue(*args)
def __init__(self, *args): this = apply(_quickfix.new_TotalNetValue, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 5269, 7308, 620, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 5269, 7308, 620, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, 3...
assumes x contains constant (for counting dof) need to check this again, is different in Greene p224
Assumes x contains constant (for counting dof and calculation of R^2). In the general description of LM test, Greene mentions that this test exaggerates the significance of results in small or moderately large samples. In this case the F-statistic is preferrable. *Verification* Chisquare test statistic is exactly (<1e-13) the same result as bptest in R-stats with defaults (studentize=True). Implementation This is calculated using the generic formula for LM test using $R^2$ (Greene, section 17.6) and not with the explicit formula Greene, section 11.4.3.
def het_breushpagan(y,x): '''Lagrange Multiplier Heteroscedasticity Test by Breush-Pagan Notes ----- assumes x contains constant (for counting dof) need to check this again, is different in Greene p224 References ---------- http://en.wikipedia.org/wiki/Breusch%E2%80%93Pagan_test Greene ''' x = np.asarray(x) y = np.asarray(y)**2 nobs, nvars = x.shape resols = sm.OLS(y, x).fit() fval = resols.fvalue fpval = resols.f_pvalue lm = nobs * resols.rsquared # Note: degrees of freedom for LM test is nvars minus constant return lm, stats.chi2.sf(lm, nvars-1), fval, fpval
65242e05db93602342fa77d2579bc8cae0fd6ea0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12658/65242e05db93602342fa77d2579bc8cae0fd6ea0/stattools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 366, 278, 67, 6073, 1218, 9095, 304, 12, 93, 16, 92, 4672, 9163, 26093, 3676, 5991, 5742, 670, 847, 538, 3263, 8160, 560, 7766, 635, 605, 266, 1218, 17, 10156, 304, 225, 29584, 9135, 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, 366, 278, 67, 6073, 1218, 9095, 304, 12, 93, 16, 92, 4672, 9163, 26093, 3676, 5991, 5742, 670, 847, 538, 3263, 8160, 560, 7766, 635, 605, 266, 1218, 17, 10156, 304, 225, 29584, 9135, 2...
self._compile(body, headers, lang)
self._compile(body, headers, include_dirs, lang)
def try_compile (self, body, headers=None, include_dirs=None, lang="c"): """Try to compile a source file built from 'body' and 'headers'. Return true on success, false otherwise. """ from distutils.ccompiler import CompileError self._check_compiler() try: self._compile(body, headers, lang) ok = 1 except CompileError: ok = 0
68a69970cef87dcc115d5fdb6c88d14301f66686 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/68a69970cef87dcc115d5fdb6c88d14301f66686/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 775, 67, 11100, 261, 2890, 16, 1417, 16, 1607, 33, 7036, 16, 2341, 67, 8291, 33, 7036, 16, 3303, 1546, 71, 6, 4672, 3536, 7833, 358, 4074, 279, 1084, 585, 6650, 628, 296, 3432, 11, 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, 775, 67, 11100, 261, 2890, 16, 1417, 16, 1607, 33, 7036, 16, 2341, 67, 8291, 33, 7036, 16, 3303, 1546, 71, 6, 4672, 3536, 7833, 358, 4074, 279, 1084, 585, 6650, 628, 296, 3432, 11, 4...
task.output.write(run_shell (["ssh", "root@%s" % self.name, "brctl show" ], config.remote_dry_run))
res = self.get_result("brctl --version; echo $?") task.output.write(res) assert res.split("\n")[-2] == "0", "brctl error"
def check(self, task): """ Checks if the host is reachable, login works and the needed software is installed """ from util import run_shell task.output.write("checking for openvz...\n") task.output.write(run_shell (["ssh", "root@%s" % self.name, "vzctl --version" ], config.remote_dry_run)) task.subtasks_done = task.subtasks_done + 1 task.output.write("checking for bridge utils...\n") task.output.write(run_shell (["ssh", "root@%s" % self.name, "brctl show" ], config.remote_dry_run)) task.subtasks_done = task.subtasks_done + 1 task.output.write("checking for dummynet...\n") task.output.write(run_shell (["ssh", "root@%s" % self.name, "ipfw -h" ], config.remote_dry_run)) task.subtasks_done = task.subtasks_done + 1 task.output.write("checking for tinc...\n") task.output.write(run_shell (["ssh", "root@%s" % self.name, "tincd --version" ], config.remote_dry_run)) task.subtasks_done = task.subtasks_done + 1
a6b3ac5d5b06ef067a9ca8931ca12d7e299c0fac /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3860/a6b3ac5d5b06ef067a9ca8931ca12d7e299c0fac/hosts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 16, 1562, 4672, 3536, 13074, 309, 326, 1479, 353, 19234, 16, 3925, 6330, 471, 326, 3577, 17888, 353, 5876, 3536, 628, 1709, 1930, 1086, 67, 10304, 1562, 18, 2844, 18, 2626...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 16, 1562, 4672, 3536, 13074, 309, 326, 1479, 353, 19234, 16, 3925, 6330, 471, 326, 3577, 17888, 353, 5876, 3536, 628, 1709, 1930, 1086, 67, 10304, 1562, 18, 2844, 18, 2626...
print '* Error: failed to import: ' + "".join(interfaces[interface][1]) sys.exit(1)
print '* Error: failed to import: ' + ', '.join(interfaces[interface][1]) exit(1)
def int_import(interface): try: print '* Using the ' + interfaces[interface][0] + ' Interface' for x in interfaces[interface][1]: exec('import ' + x) except ImportError: print '* Error: failed to import: ' + "".join(interfaces[interface][1]) sys.exit(1)
e7a5c0a35998318126872324182943e3afae53c0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/909/e7a5c0a35998318126872324182943e3afae53c0/fusion-icon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 509, 67, 5666, 12, 5831, 4672, 775, 30, 1172, 14609, 11637, 326, 296, 397, 7349, 63, 5831, 6362, 20, 65, 397, 296, 6682, 11, 364, 619, 316, 7349, 63, 5831, 6362, 21, 14542, 1196, 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, 509, 67, 5666, 12, 5831, 4672, 775, 30, 1172, 14609, 11637, 326, 296, 397, 7349, 63, 5831, 6362, 20, 65, 397, 296, 6682, 11, 364, 619, 316, 7349, 63, 5831, 6362, 21, 14542, 1196, 2668,...
letConfig = self._job.get('let',{})
letConfig = self._job.get('let',{})
def runCollectEnvironmentInfo(self): letConfig = self._job.get('let',{}) self._console.info("Environment information") self._console.indent() platformInfo = util.getPlatformInfo() self._console.info("Platform: %s %s" % (platformInfo[0], platformInfo[1])) self._console.info("Python version: %s" % sys.version) if 'QOOXDOO_PATH' in letConfig: qxPath = letConfig['QOOXDOO_PATH'] self._console.info("qooxdoo path: %s" % qxPath) versionFile = open(os.path.join(qxPath, "version.txt")) version = versionFile.read() self._console.info("Framework version: %s" % version.strip()) #TODO: Improve this check classFile = os.path.join(qxPath, "framework", "source", "class", "qx", "Class.js") self._console.info("Kit looks OK: %s" % os.path.isfile(classFile) ) if 'APPLICATION' in letConfig: appNamespace = letConfig['APPLICATION'] buildScriptFile = os.path.join("build", "script", appNamespace + ".js") self._console.info("Build version generated: %s" % os.path.isfile(buildScriptFile) ) sourceScriptFile = os.path.join("source", "script", appNamespace + ".js") self._console.info("Source version generated: %s" % os.path.isfile(sourceScriptFile) ) self._console.outdent()
9833ce63657d2ce9db93a0db63b529cc4facb6b5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/9833ce63657d2ce9db93a0db63b529cc4facb6b5/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 10808, 5494, 966, 12, 2890, 4672, 2231, 809, 273, 365, 6315, 4688, 18, 588, 2668, 1810, 2187, 2916, 13, 225, 365, 6315, 8698, 18, 1376, 2932, 5494, 1779, 7923, 365, 6315, 8698, 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, 1086, 10808, 5494, 966, 12, 2890, 4672, 2231, 809, 273, 365, 6315, 4688, 18, 588, 2668, 1810, 2187, 2916, 13, 225, 365, 6315, 8698, 18, 1376, 2932, 5494, 1779, 7923, 365, 6315, 8698, 18,...
raise NotImplementedError()
self.element = Lagrange(self.shape, self.degree) points = self.quadrature.get_points() basis = self.element.function_space() self.numBasisFuncs = len(basis) self.basis = numpy.transpose(basis.tabulate(points)) self.basisDeriv = numpy.transpose([basis.deriv_all(d).tabulate(points) for d in range(self.cellDim)])
def _setupBasisFns(self): """ Setup basis functions for reference cell. """ from FIAT.Lagrange import Lagrange
2ddd65492d4530b04c9d4575db1968d155b42609 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8645/2ddd65492d4530b04c9d4575db1968d155b42609/FIATLagrange.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8401, 11494, 291, 31126, 12, 2890, 4672, 3536, 10939, 10853, 4186, 364, 2114, 2484, 18, 3536, 628, 4011, 789, 18, 26093, 3676, 1930, 511, 346, 3676, 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, 0, 0, 0, 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, 8401, 11494, 291, 31126, 12, 2890, 4672, 3536, 10939, 10853, 4186, 364, 2114, 2484, 18, 3536, 628, 4011, 789, 18, 26093, 3676, 1930, 511, 346, 3676, 2, -100, -100, -100, -100, -100, ...
entry, modname, classes, c)
entry, modname, c)
def formattree(self, tree, modname, classes={}, parent=None): """Produce HTML for a class tree as given by inspect.getclasstree().""" result = '' for entry in tree: if type(entry) is type(()): c, bases = entry result = result + '<dt><font face="helvetica, arial"><small>' result = result + self.classlink(c, modname, classes) if bases and bases != (parent,): parents = [] for base in bases: parents.append(self.classlink(base, modname, classes)) result = result + '(' + join(parents, ', ') + ')' result = result + '\n</small></font></dt>' elif type(entry) is type([]): result = result + '<dd>\n%s</dd>\n' % self.formattree( entry, modname, classes, c) return '<dl>\n%s</dl>\n' % result
93cdc263dcadb71f7d53e01ec576fce416b7907a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/93cdc263dcadb71f7d53e01ec576fce416b7907a/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 3413, 12, 2890, 16, 2151, 16, 16037, 16, 3318, 28793, 982, 33, 7036, 4672, 3536, 25884, 3982, 364, 279, 667, 2151, 487, 864, 635, 5334, 18, 588, 830, 345, 334, 992, 1435, 12123, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 3413, 12, 2890, 16, 2151, 16, 16037, 16, 3318, 28793, 982, 33, 7036, 4672, 3536, 25884, 3982, 364, 279, 667, 2151, 487, 864, 635, 5334, 18, 588, 830, 345, 334, 992, 1435, 12123, 5...
def play_pause(self, new_state, old_state): if new_state in [phonon.Phonon.PausedState, phonon.Phonon.ErrorState, phonon.Phonon.StoppedState]:
def play_pause_icon(self, new_state, old_state): if new_state in self.NOT_PLAYING_STATES:
def play_pause(self, new_state, old_state): if new_state in [phonon.Phonon.PausedState, phonon.Phonon.ErrorState, phonon.Phonon.StoppedState]: self.play_pause_action.setIcon(kdeui.KIcon("media-playback-start")) self.connect(self.play_pause_action, QtCore.SIGNAL("triggered()"), self.media_object.play) else: self.play_pause_action.setIcon(kdeui.KIcon("media-playback-pause")) self.connect(self.play_pause_action, QtCore.SIGNAL("triggered()"), self.media_object.pause)
e8609d83f298adae3e6d51ef7f906875e3a29757 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5116/e8609d83f298adae3e6d51ef7f906875e3a29757/player.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6599, 67, 19476, 67, 3950, 12, 2890, 16, 394, 67, 2019, 16, 1592, 67, 2019, 4672, 309, 394, 67, 2019, 316, 365, 18, 4400, 67, 52, 7868, 1360, 67, 7998, 55, 30, 365, 18, 1601, 67, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6599, 67, 19476, 67, 3950, 12, 2890, 16, 394, 67, 2019, 16, 1592, 67, 2019, 4672, 309, 394, 67, 2019, 316, 365, 18, 4400, 67, 52, 7868, 1360, 67, 7998, 55, 30, 365, 18, 1601, 67, 1...