rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
machine_ids = select([machine.c.id])
to_delete = map(lambda x: x['machine'], outerjoin(has_table, machine, has_table.c.machine == machine.c.id).\ select(machine.c.id == None).\ execute().\ fetchall() )
def deleteHasTablesMissingMachines(machine): """ Remove every linked tables (has*) rows referencing missing machines """ for table in tables_elements: has_table = Table("has" + table, metadata, autoload = True) machine_ids = select([machine.c.id]) to_delete = has_table.delete(not_(has_table.c.machine.in_(machine_ids))) logger.debug("deleteHasTablesMissingMachines: on table %s: SQL request: %s" % (table, str(to_delete).replace('\n', ' '))) to_delete.execute()
df0709108e9c6cf71287d5a3857cb1bfbd153734 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5988/df0709108e9c6cf71287d5a3857cb1bfbd153734/clean-inventory.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 5582, 6905, 4841, 25222, 12, 9149, 4672, 3536, 3581, 3614, 8459, 4606, 261, 5332, 12437, 2595, 24509, 3315, 15942, 3536, 364, 1014, 316, 4606, 67, 6274, 30, 711, 67, 2121, 273, 3555,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 5582, 6905, 4841, 25222, 12, 9149, 4672, 3536, 3581, 3614, 8459, 4606, 261, 5332, 12437, 2595, 24509, 3315, 15942, 3536, 364, 1014, 316, 4606, 67, 6274, 30, 711, 67, 2121, 273, 3555,...
stem , numstring, postnum = numstem("".join(parts[:-1]))
stem , numstring, postnum = numstem(".".join(parts[:-1]))
def deconstruct_filename(filename): """ Break up a filename to get image type and number """ direc , name = os.path.split(filename) if len(direc) == 0: direc = None parts = os.path.split(name)[-1].split(".") # loop back from end compressed = False extn = "" postnum = "" ndigit = 4 if parts[-1] in ["gz","bz2"]: extn = "."+parts[-1] parts = parts[:-1] compressed=True if parts[-1] in FILETYPES.keys(): typ = FILETYPES[parts[-1]] extn = "." + parts[-1] + extn try: stem , numstring, postnum = numstem("".join(parts[:-1])) num = int(numstring) ndigit = len(numstring) except: # There is no number - hence make num be None, not 0 num = None stem = "".join(parts[:-1]) else: # Probably two type left if len(parts) == 1: # Probably GE format stem_numb parts2 = parts[0].split("_") try: num = int(parts2[-1]) ndigit = len(parts2[-1]) typ = 'GE' stem = "_".join(parts2[:-1])+"_" except: pass else: try: num = int(parts[-1]) ndigit = len(parts[-1]) typ = 'bruker' stem = ".".join(parts[:-1])+"." except: # unregistered type?? raise # raise Exception("Cannot decode "+filename) obj = filename_object( stem, num = num, directory = direc, format = typ, extension = extn, postnum = postnum, digits = ndigit ) return obj
b8c13e3451855b44528564c95f36ddc69bb89ee8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9619/b8c13e3451855b44528564c95f36ddc69bb89ee8/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 443, 10062, 67, 3459, 12, 3459, 4672, 3536, 17030, 731, 279, 1544, 358, 336, 1316, 618, 471, 1300, 3536, 302, 577, 71, 269, 508, 273, 1140, 18, 803, 18, 4939, 12, 3459, 13, 309, 562, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 443, 10062, 67, 3459, 12, 3459, 4672, 3536, 17030, 731, 279, 1544, 358, 336, 1316, 618, 471, 1300, 3536, 302, 577, 71, 269, 508, 273, 1140, 18, 803, 18, 4939, 12, 3459, 13, 309, 562, ...
self.dev.write("%d %d %d %d\n" % (self._videoChannel,
self.writeDev.write("%d %d %d %d\n" % (self._videoChannel,
def update(self): """Send all current settings to the device""" self.dev.write("%d %d %d %d\n" % (self._videoChannel, self._bypassSwitch, self._whiteAudioChannel, self._redAudioChannel)) self.dev.flush()
2ef21c2746951a2ed1cea8c8a3cf4e8db588a178 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/2ef21c2746951a2ed1cea8c8a3cf4e8db588a178/VideoSwitch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 4672, 3536, 3826, 777, 783, 1947, 358, 326, 2346, 8395, 365, 18, 2626, 8870, 18, 2626, 27188, 72, 738, 72, 738, 72, 738, 72, 64, 82, 6, 738, 261, 2890, 6315, 9115, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 4672, 3536, 3826, 777, 783, 1947, 358, 326, 2346, 8395, 365, 18, 2626, 8870, 18, 2626, 27188, 72, 738, 72, 738, 72, 738, 72, 64, 82, 6, 738, 261, 2890, 6315, 9115, 29...
return 1
return True
def peacemaking( char, skill ): if skill != PEACEMAKING: return 0 if char.socket.hastag( 'skill_delay' ): if wolfpack.time.currenttime() < char.socket.gettag( 'skill_delay' ): char.socket.clilocmessage( 500118, "", 0x3b2, 3 ) return 1 else: char.socket.deltag( 'skill_delay' ) # check instrument in backpack backpack = char.getbackpack() if not backpack: return 0 contents = backpack.content items = [] for item in contents: if isinstrument( item ): items.append( item ) # if we don't have an instrument in backpack, send target cursor to select an item - will be added if not len( items ): #char.socket.clilocmessage( 500617, "" 0x3b2, 3 ) #char.socket.attachtarget( "skills.peacemaking.selectinstrument" ) return 1 # if there are more than one instruments, select last used one last_time = 0 if len( items ) > 1: instrument = items[ 0 ] for item in items: if item.hastag( 'last_musicianship_use' ): use_time = item.gettag( 'last_musicianship_use' ) if use_time > last_time: last_time = use_time instrument = item else: instrument = items[ 0 ] char.socket.settag( 'peacemaking_instrument', instrument.serial ) char.socket.clilocmessage( 1049525, "", 0x3b2, 3 ) char.socket.attachtarget( "skills.peacemaking.response" ) return 1
ad2fb5c1af41304c615892963957d7cff3e3439e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/ad2fb5c1af41304c615892963957d7cff3e3439e/peacemaking.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2804, 623, 19718, 12, 1149, 16, 15667, 262, 30, 309, 15667, 480, 16628, 6312, 5535, 47, 1360, 30, 327, 374, 225, 309, 1149, 18, 7814, 18, 76, 689, 346, 12, 296, 7771, 737, 67, 10790, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2804, 623, 19718, 12, 1149, 16, 15667, 262, 30, 309, 15667, 480, 16628, 6312, 5535, 47, 1360, 30, 327, 374, 225, 309, 1149, 18, 7814, 18, 76, 689, 346, 12, 296, 7771, 737, 67, 10790, ...
self.write(facts)
self.write(self.facts)
def get_facts(self): if self.facts: # see bz #627707 # there is a little bit of a race between when we load the facts, and when # we decide to save them, so delete facts out from under a Fact object means # it wasn't detecting it missing in that case and not writing a new one self.write(facts) return self.facts self.facts = self.find_facts() return self.facts
e47c0e16a2368b20464cb82ce1046f274a402916 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11137/e47c0e16a2368b20464cb82ce1046f274a402916/facts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 27023, 12, 2890, 4672, 309, 365, 18, 27023, 30, 468, 2621, 24788, 468, 8898, 4700, 8642, 468, 1915, 353, 279, 12720, 2831, 434, 279, 17996, 3086, 1347, 732, 1262, 326, 18137, 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, 336, 67, 27023, 12, 2890, 4672, 309, 365, 18, 27023, 30, 468, 2621, 24788, 468, 8898, 4700, 8642, 468, 1915, 353, 279, 12720, 2831, 434, 279, 17996, 3086, 1347, 732, 1262, 326, 18137, 16...
return simu.extract(0)
pop = simu.extract(0) Stat(pop, alleleFreq=range(pop.totNumLoci())) import pprint pprint.pprint(pop.dvars().alleleFreq) return pop
def simuMitochondrial(N, numMito=3, gen=10): ''' ''' pop = population(N, loci=[5]*(3 + numMito), # one autosome, two sex chromosomes, and three mitochondrial chromosomes chromTypes=[Autosome, ChromosomeX, ChromosomeY] + [Customized]*numMito, # record indexes of parents for verification purpose ancGen=1, infoFields=['father_idx', 'mother_idx']) simu = simulator(pop, randomMating()) simu.evolve( preOps=[ # initialize alleles 0, 1, 2, 3 with different frequencies initByFreq([0.4] + [0.2]*3), ], ops=[ recombinator(rate=0.1), mitochondrialGenoTransmitter(), parentsTagger(), dumper(structure=False), ], gen = gen ) return simu.extract(0)
4287f29b54b11aa2102175cdf8109d2ad22e4042 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/401/4287f29b54b11aa2102175cdf8109d2ad22e4042/Mating_mitochondrial.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3142, 89, 49, 305, 9842, 1434, 566, 287, 12, 50, 16, 818, 49, 11250, 33, 23, 16, 3157, 33, 2163, 4672, 9163, 9163, 1843, 273, 11209, 12, 50, 16, 1515, 77, 22850, 25, 5772, 12, 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, 3142, 89, 49, 305, 9842, 1434, 566, 287, 12, 50, 16, 818, 49, 11250, 33, 23, 16, 3157, 33, 2163, 4672, 9163, 9163, 1843, 273, 11209, 12, 50, 16, 1515, 77, 22850, 25, 5772, 12, 23, ...
assert len(f.maker.env.toposort())==2 f=theano.function([x],[(4*x)/abs(2/x)], mode = mode)
if not isinstance(mode,theano.compile.debugmode.DebugMode): assert numpy.isfinite(f(0)) assert len(f.maker.env.toposort())==3 assert f.maker.env.toposort()[0].op==T.sgn f=theano.function([x],[(4*x)/abs(x/2)], mode = mode)
def test_abs_mul_div(self): """ test that if we have 4 * x / abs(2*x) it get simplifier during canonicalisation. """
f0fe6f5f6b838e706655b5833d42d6dd12285fbf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/f0fe6f5f6b838e706655b5833d42d6dd12285fbf/test_opt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5113, 67, 16411, 67, 2892, 12, 2890, 4672, 3536, 1842, 716, 309, 732, 1240, 1059, 380, 619, 342, 2417, 12, 22, 14, 92, 13, 518, 336, 9330, 1251, 4982, 7378, 10742, 18, 3536, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 67, 5113, 67, 16411, 67, 2892, 12, 2890, 4672, 3536, 1842, 716, 309, 732, 1240, 1059, 380, 619, 342, 2417, 12, 22, 14, 92, 13, 518, 336, 9330, 1251, 4982, 7378, 10742, 18, 3536, ...
print "="*20
print "=" * 20
def deleteJob( self, job ): try: if job in self.__jobs: del( self.__jobs[ job ] ) except Exception, e: print "="*20 print "EXCEPTION", e print "THIS SHOULDN'T HAPPEN" print "="*20
76604cb547c24d2712e0393bdd8c3d7348989097 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/76604cb547c24d2712e0393bdd8c3d7348989097/ThreadedMightyOptimizer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 2278, 12, 365, 16, 1719, 262, 30, 775, 30, 309, 1719, 316, 365, 16186, 10088, 30, 1464, 12, 365, 16186, 10088, 63, 1719, 308, 262, 1335, 1185, 16, 425, 30, 1172, 9671, 380, 4200,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 2278, 12, 365, 16, 1719, 262, 30, 775, 30, 309, 1719, 316, 365, 16186, 10088, 30, 1464, 12, 365, 16186, 10088, 63, 1719, 308, 262, 1335, 1185, 16, 425, 30, 1172, 9671, 380, 4200,...
print 'Installation successful.'
print 'Installation was successful.'
def install(): print 'Ininstalling Robot Framework...' setup = os.path.join(os.path.dirname(sys.argv[0]), 'setup.py') rc = os.system('%s %s install' % (sys.executable, setup)) if rc != 0: print 'Installation failed.' sys.exit(rc) print 'Installation successful.'
56d3deaea9a72eb97e547171ab884fdf16bf626b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6988/56d3deaea9a72eb97e547171ab884fdf16bf626b/install.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 13332, 1172, 296, 382, 5425, 310, 19686, 352, 13472, 7821, 3875, 273, 1140, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 9499, 18, 19485, 63, 20, 65, 3631, 296, 8401, 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, 3799, 13332, 1172, 296, 382, 5425, 310, 19686, 352, 13472, 7821, 3875, 273, 1140, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 9499, 18, 19485, 63, 20, 65, 3631, 296, 8401, 18, ...
npy_intp dims[] = {0,0}; dims[0] = ((npy_int32 *)%(a_nrows)s->data)[0]; dims[1] = %(b)s->dimensions[1]; %(z)s = (PyArrayObject*) PyArray_SimpleNew(2, dims, %(b)s->descr->type_num);
npy_intp dims[] = {0}; dims[0] = %(b)s->dimensions[0]; %(z)s = (PyArrayObject*) PyArray_SimpleNew(1, dims, %(b)s->descr->type_num);
def c_code(self, node, name, (a_val, a_ind, a_ptr, a_nrows, b), (z,), sub): return """ if (%(a_val)s->nd != 1) {PyErr_SetString(PyExc_NotImplementedError, "rank(a_val) != 1"); %(fail)s;} if (%(a_ind)s->nd != 1) {PyErr_SetString(PyExc_NotImplementedError, "rank(a_ind) != 1"); %(fail)s;} if (%(a_ptr)s->nd != 1) {PyErr_SetString(PyExc_NotImplementedError, "rank(a_ptr) != 1"); %(fail)s;} if (%(a_nrows)s->nd != 0) {PyErr_SetString(PyExc_NotImplementedError, "rank(nrows) != 0"); %(fail)s;} if (%(b)s->nd != 2) {PyErr_SetString(PyExc_NotImplementedError, "rank(b) != 2"); %(fail)s;}
46305ee5eb1cd7beebd74117366afb20cd152a02 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/46305ee5eb1cd7beebd74117366afb20cd152a02/test_debugmode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 67, 710, 12, 2890, 16, 756, 16, 508, 16, 261, 69, 67, 1125, 16, 279, 67, 728, 16, 279, 67, 6723, 16, 279, 67, 82, 3870, 16, 324, 3631, 261, 94, 16, 3631, 720, 4672, 327, 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, 276, 67, 710, 12, 2890, 16, 756, 16, 508, 16, 261, 69, 67, 1125, 16, 279, 67, 728, 16, 279, 67, 6723, 16, 279, 67, 82, 3870, 16, 324, 3631, 261, 94, 16, 3631, 720, 4672, 327, 353...
self.channel_count = codec_param.info.channel_count
self.channel_count = codec_param.info.channel_cnt
def __init__(self, codec_info, codec_param): self.name = codec_info.id self.priority = codec_info.priority self.clock_rate = codec_param.info.clock_rate self.channel_count = codec_param.info.channel_count self.avg_bps = codec_param.info.avg_bps self.frm_ptime = codec_param.info.frm_ptime self.ptime = codec_param.info.frm_ptime * \ codec_param.setting.frm_per_pkt self.ptime = codec_param.info.pt self.vad_enabled = codec_param.setting.vad self.plc_enabled = codec_param.setting.plc
11903e0fff398b4202a356ea16874a469d0cec21 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8531/11903e0fff398b4202a356ea16874a469d0cec21/pjsua.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9196, 67, 1376, 16, 9196, 67, 891, 4672, 365, 18, 529, 273, 9196, 67, 1376, 18, 350, 365, 18, 8457, 273, 9196, 67, 1376, 18, 8457, 365, 18, 18517, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9196, 67, 1376, 16, 9196, 67, 891, 4672, 365, 18, 529, 273, 9196, 67, 1376, 18, 350, 365, 18, 8457, 273, 9196, 67, 1376, 18, 8457, 365, 18, 18517, 67, ...
(quote(project_unixname),quote(project_description),quote(project_name)))
(quote(project_unixname or ''),quote(project_description or ''),quote(project_name or '')))
def register(self, project_unixname=None, project_description=None, project_name=None, **kw): require(has_neighborhood_access('create', self.neighborhood), 'Create access required') try: p = self.neighborhood.register_project(project_unixname.lower()) except forge_exc.ProjectConflict: flash( 'A project already exists with that name, please choose another.', 'error') ming.orm.ormsession.ThreadLocalORMSession.close_all() redirect('add_project?project_unixname=%s&project_description=%s&project_name=%s' % (quote(project_unixname),quote(project_description),quote(project_name))) except Exception, ex: c.project = None ming.orm.ormsession.ThreadLocalORMSession.close_all() flash('%s: %s' % (ex.__class__, str(ex)), 'error') redirect('add_project?project_unixname=%s&project_description=%s&project_name=%s' % (quote(project_unixname),quote(project_description),quote(project_name))) if project_name: p.name = project_name if project_description: p.short_description = project_description c.project = p ming.orm.ormsession.ThreadLocalORMSession.flush_all() # require(has_project_access('tool')) for i, tool in enumerate(kw): if kw[tool]: p.install_app(tool, ordinal=i) flash('Welcome to the SourceForge Beta System! ' 'To get started, fill out some information about your project.') redirect(p.script_name + 'admin/overview')
e9d2141cb3c2c4df2ead613c03033b485de27351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1036/e9d2141cb3c2c4df2ead613c03033b485de27351/project.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 12, 2890, 16, 1984, 67, 21136, 529, 33, 7036, 16, 1984, 67, 3384, 33, 7036, 16, 1984, 67, 529, 33, 7036, 16, 2826, 9987, 4672, 2583, 12, 5332, 67, 18168, 19619, 67, 3860, 2668, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 12, 2890, 16, 1984, 67, 21136, 529, 33, 7036, 16, 1984, 67, 3384, 33, 7036, 16, 1984, 67, 529, 33, 7036, 16, 2826, 9987, 4672, 2583, 12, 5332, 67, 18168, 19619, 67, 3860, 2668, ...
'Legs': set([ 'LegSymbol', 'LegCFICode', 'LegMaturityMonthYear', 'LegRatioQty', 'LegSide', 'LegRefID', ]), 'MiscFees': set([
'Legs': [ 'LegRefID', 'LegSymbol', 'LegCFICode', 'LegMaturityMonthYear', 'LegRatioQty', 'LegSide', ], 'MiscFees': [
def dtdecode(dt): return datetime.strptime(dt, DATETIMEFMT)
6b8d1fad4d635e8dda40fcb18a8ccd0b55c277a1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/726/6b8d1fad4d635e8dda40fcb18a8ccd0b55c277a1/fix42.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3681, 3922, 12, 7510, 4672, 327, 3314, 18, 701, 10650, 12, 7510, 16, 31337, 42, 6152, 13, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3681, 3922, 12, 7510, 4672, 327, 3314, 18, 701, 10650, 12, 7510, 16, 31337, 42, 6152, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if os.path.isfile(filename):
funcname = code.co_name sourceline = linecache.getline(filename, lineno) sourceline = string.strip(sourceline) if funcname in ("?", "", None): item = "%s, line %d: %s" % (modname, lineno, sourceline) else: item = "%s.%s(...), line %d: %s" % (modname, funcname, lineno, sourceline) return item def GetSubList(self): frame, lineno = self.info sublist = [] if frame.f_globals is not frame.f_locals: item = VariablesTreeItem("<locals>", frame.f_locals, self.flist) sublist.append(item) item = VariablesTreeItem("<globals>", frame.f_globals, self.flist) sublist.append(item) return sublist def OnDoubleClick(self): if self.flist: frame, lineno = self.info filename = frame.f_code.co_filename
def show_source(self, index): if not (0 <= index < len(self.stack)): return frame, lineno = self.stack[index] code = frame.f_code filename = code.co_filename if os.path.isfile(filename): edit = self.flist.open(filename) if edit: edit.gotoline(lineno)
7adf23e73617e7d0d5996d0a64346489ec32900a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/7adf23e73617e7d0d5996d0a64346489ec32900a/StackViewer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 3168, 12, 2890, 16, 770, 4672, 309, 486, 261, 20, 1648, 770, 411, 562, 12, 2890, 18, 3772, 3719, 30, 327, 2623, 16, 7586, 273, 365, 18, 3772, 63, 1615, 65, 981, 273, 2623, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 3168, 12, 2890, 16, 770, 4672, 309, 486, 261, 20, 1648, 770, 411, 562, 12, 2890, 18, 3772, 3719, 30, 327, 2623, 16, 7586, 273, 365, 18, 3772, 63, 1615, 65, 981, 273, 2623, ...
"H8": atom_info("H", 0, "H'"),
"H8": atom_info("H", 0, "H"),
def keys(self): return ("element_symbol", "ionic_state", "scattering_label")
46b20303e8ed53745807da84c39cb29f25aa3911 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/46b20303e8ed53745807da84c39cb29f25aa3911/residue_info.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1311, 12, 2890, 4672, 327, 7566, 2956, 67, 7175, 3113, 315, 285, 335, 67, 2019, 3113, 315, 31320, 310, 67, 1925, 7923, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1311, 12, 2890, 4672, 327, 7566, 2956, 67, 7175, 3113, 315, 285, 335, 67, 2019, 3113, 315, 31320, 310, 67, 1925, 7923, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if (not self.__createCertificateFile(keyfile,filename)): return None
if (not self.__createCertificateFile(keyfile,filename)): return None
def get_GratiaCertificateFile(self): filename = self.__getConfigAttribute('GratiaCertificateFile') if (filename == None or filename == ''): filename = "gratia.probecert.pem" filename = self.__get_fullpath_cert(filename) keyfile = self.get_GratiaKeyFile() try: f = open(filename,'r') cert = crypto.load_certificate(crypto.FILETYPE_PEM, f.read()) if (cert.has_expired() or os.path.exists(keyfile) == 0 ): if (not self.__createCertificateFile(keyfile,filename)): return None except IOError,i: # If we can not read it, let get a new one. if (not self.__createCertificateFile(keyfile,filename)): return None return filename
637869f92a8322c20ea53836dc7393fc485f077a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/637/637869f92a8322c20ea53836dc7393fc485f077a/Gratia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 43, 17048, 1155, 4719, 812, 12, 2890, 4672, 1544, 273, 365, 16186, 588, 809, 1499, 2668, 43, 17048, 1155, 4719, 812, 6134, 309, 261, 3459, 422, 599, 578, 1544, 422, 875, 4672, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 43, 17048, 1155, 4719, 812, 12, 2890, 4672, 1544, 273, 365, 16186, 588, 809, 1499, 2668, 43, 17048, 1155, 4719, 812, 6134, 309, 261, 3459, 422, 599, 578, 1544, 422, 875, 4672, ...
xpcsTailFile = [os.path.join(testharnessdir, 'tail.js')]
def processLeakLog(leakLogFile): """Process the leak log.""" # For the time being, don't warn (nor "info") if the log file is not there. (Bug 469523) if not os.path.exists(leakLogFile): return None
ce8f526fa598050b1d8e822a5f4bc26c47b0ec2f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/ce8f526fa598050b1d8e822a5f4bc26c47b0ec2f/runxpcshelltests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 1682, 581, 1343, 12, 298, 581, 19103, 4672, 3536, 2227, 326, 20891, 613, 12123, 468, 2457, 326, 813, 3832, 16, 2727, 1404, 1894, 261, 29561, 315, 1376, 7923, 309, 326, 613, 585, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 1682, 581, 1343, 12, 298, 581, 19103, 4672, 3536, 2227, 326, 20891, 613, 12123, 468, 2457, 326, 813, 3832, 16, 2727, 1404, 1894, 261, 29561, 315, 1376, 7923, 309, 326, 613, 585, 35...
are quite straightforwardly expressed with this Python idiom.
are quite straightforwardly expressed with this Python idiom. The problem is that this creates the same kind of reference cycle as the m235() implementation above, and again we have to explicitly close the innermost generator to clean up the cycle.
... def _m235():
90a84d4fadd28eb143aaa76463bf14a47954125f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/90a84d4fadd28eb143aaa76463bf14a47954125f/test_generators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 389, 81, 30803, 13332, 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, 1372, 377, 1652, 389, 81, 30803, 13332, 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, -...
writeStubsForInterface(f, iface)
writeStubsForInterface(f, conf.customMethodCalls, iface)
def writeIncludesForInterface(iface): assert iface.kind == 'interface' resulttypes = [] for member in iface.stubMembers: resulttype = writeIncludesForMember(member) if resulttype is not None and not isVariantType(resulttype): resulttypes.append(resulttype.name) includeType(iface)
8896184edbd95bdc709171e1892d30700ae56acd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/8896184edbd95bdc709171e1892d30700ae56acd/qsgen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 16815, 1290, 1358, 12, 31479, 4672, 1815, 9751, 18, 9224, 422, 296, 5831, 11, 563, 2352, 273, 5378, 364, 3140, 316, 9751, 18, 12847, 6918, 30, 563, 723, 273, 1045, 16815, 1290, 441...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 16815, 1290, 1358, 12, 31479, 4672, 1815, 9751, 18, 9224, 422, 296, 5831, 11, 563, 2352, 273, 5378, 364, 3140, 316, 9751, 18, 12847, 6918, 30, 563, 723, 273, 1045, 16815, 1290, 441...
return _old_inspect_getfile(object)
return _old_inspect_getfile(_ppresolve_ignore_failure(object))
def _ppimport_inspect_getfile(object): if isinstance(object,_ModuleLoader): return object.__dict__['__file__'] return _old_inspect_getfile(object)
c1361c857a2f28db25e4af652e0fc6de3fd3ad76 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/c1361c857a2f28db25e4af652e0fc6de3fd3ad76/ppimport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11858, 5666, 67, 12009, 67, 588, 768, 12, 1612, 4672, 309, 1549, 12, 1612, 16, 67, 3120, 2886, 4672, 327, 733, 16186, 1576, 972, 3292, 972, 768, 972, 3546, 327, 389, 1673, 67, 120...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 11858, 5666, 67, 12009, 67, 588, 768, 12, 1612, 4672, 309, 1549, 12, 1612, 16, 67, 3120, 2886, 4672, 327, 733, 16186, 1576, 972, 3292, 972, 768, 972, 3546, 327, 389, 1673, 67, 120...
def JUMP_ABSOLUTE(f, jumpto, next_instr, ec):
def JUMP_ABSOLUTE(f, jumpto, next_instr, ec=None):
def JUMP_ABSOLUTE(f, jumpto, next_instr, ec): pypyjitdriver.can_enter_jit(frame=f, ec=ec, next_instr=jumpto, pycode=f.getcode()) return jumpto
ca9e75a3c3ccd625db308d1630dfe66066ad12c2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/ca9e75a3c3ccd625db308d1630dfe66066ad12c2/interp_jit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 804, 23942, 67, 2090, 26786, 12, 74, 16, 525, 379, 21910, 16, 1024, 67, 267, 701, 16, 6557, 33, 7036, 4672, 18951, 93, 78, 305, 7407, 18, 4169, 67, 2328, 67, 78, 305, 12, 3789, 33, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 804, 23942, 67, 2090, 26786, 12, 74, 16, 525, 379, 21910, 16, 1024, 67, 267, 701, 16, 6557, 33, 7036, 4672, 18951, 93, 78, 305, 7407, 18, 4169, 67, 2328, 67, 78, 305, 12, 3789, 33, ...
except:
except Exception, e:
def post_url(url, data, filename='collection.zip'): import urllib2 ct, data = get_multipart(filename, data) headers = {"Content-Type": ct} req = urllib2.Request(url.encode('utf8'), data=data, headers=headers) return urllib2.urlopen(req).read()
b20bef394e7e007635315c74d7a6972bdbdb579f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12391/b20bef394e7e007635315c74d7a6972bdbdb579f/apps.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 67, 718, 12, 718, 16, 501, 16, 1544, 2218, 5548, 18, 4450, 11, 4672, 1930, 11527, 22, 225, 5691, 16, 501, 273, 336, 67, 16404, 12, 3459, 16, 501, 13, 1607, 273, 12528, 1350, 17...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 67, 718, 12, 718, 16, 501, 16, 1544, 2218, 5548, 18, 4450, 11, 4672, 1930, 11527, 22, 225, 5691, 16, 501, 273, 336, 67, 16404, 12, 3459, 16, 501, 13, 1607, 273, 12528, 1350, 17...
assert_array_almost_equal(numpy.matrixmultiply(a,x),b)
assert_array_almost_equal(numpy.dot(a,x),b)
def check_simple_complex(self): a = array([[5,2],[2j,4]],'D') for b in [[1j,0], [[1j,1j], [0,2]], [1,0j], array([1,0],'D'), ]: x = solve(a,b) assert_array_almost_equal(numpy.matrixmultiply(a,x),b)
9bd2ebf847b7c0e4bdf3e5d49ab67f415145df68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/9bd2ebf847b7c0e4bdf3e5d49ab67f415145df68/test_basic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 9647, 67, 14259, 12, 2890, 4672, 279, 273, 526, 3816, 63, 25, 16, 22, 6487, 63, 22, 78, 16, 24, 65, 6487, 11, 40, 6134, 364, 324, 316, 12167, 21, 78, 16, 20, 6487, 12167, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 9647, 67, 14259, 12, 2890, 4672, 279, 273, 526, 3816, 63, 25, 16, 22, 6487, 63, 22, 78, 16, 24, 65, 6487, 11, 40, 6134, 364, 324, 316, 12167, 21, 78, 16, 20, 6487, 12167, ...
self.changed = True self.currentLabel = survivor.label()
self._changed = True self._currentLabel = survivor.label()
def mouseMoved(self, x, y): if not self.painting: return # comment out to get mouse-over face output
65254bc446b7c353066fe806e0424030a38d558d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10394/65254bc446b7c353066fe806e0424030a38d558d/tools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7644, 25317, 12, 2890, 16, 619, 16, 677, 4672, 309, 486, 365, 18, 84, 1598, 310, 30, 327, 468, 2879, 596, 358, 336, 7644, 17, 1643, 7945, 876, 2, 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, 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, 7644, 25317, 12, 2890, 16, 619, 16, 677, 4672, 309, 486, 365, 18, 84, 1598, 310, 30, 327, 468, 2879, 596, 358, 336, 7644, 17, 1643, 7945, 876, 2, -100, -100, -100, -100, -100, -100, ...
total_pages = Fax.objects.filter(site=site).aggregate(Max('page_count'))['page_count__max']
total_pages = Fax.objects.filter(site=site).aggregate(Sum('page_count'))['page_count__sum']
def home(request): site = request.site updates = site.scheduledupdate_set.all() email_subscribers = Subscriber.via_email.filter(site=site) fax_subscribers = Subscriber.via_fax.filter(site=site) total_pages = Fax.objects.filter(site=site).aggregate(Max('page_count'))['page_count__max'] this_month = datetime(datetime.now().year, datetime.now().month, 1) pages_for_month = Fax.objects.filter( site=site, timestamp__gt=this_month).aggregate(Max('page_count'))['page_count__max'] return direct_to_template(request, template='dashboard/marketing.html', extra_context={ 'updates': updates, 'email_subscribers': email_subscribers, 'fax_subscribers': fax_subscribers, 'total_pages': total_pages, 'pages_for_month': pages_for_month })
6dc4f42cb179949cc59ad43b8f830b217530994c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9903/6dc4f42cb179949cc59ad43b8f830b217530994c/marketing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6382, 12, 2293, 4672, 2834, 273, 590, 18, 4256, 4533, 273, 2834, 18, 23307, 2725, 67, 542, 18, 454, 1435, 2699, 67, 1717, 17769, 273, 21339, 18, 21985, 67, 3652, 18, 2188, 12, 4256, 33...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6382, 12, 2293, 4672, 2834, 273, 590, 18, 4256, 4533, 273, 2834, 18, 23307, 2725, 67, 542, 18, 454, 1435, 2699, 67, 1717, 17769, 273, 21339, 18, 21985, 67, 3652, 18, 2188, 12, 4256, 33...
outlinetxt='Outline: '+ str(math.ceil(math.floor(10**4*properties.line_width/2.83465)/10)/1000) +' mm'
outlinetxt=_('Outline: ')+ str(math.ceil(math.floor(10**4*properties.line_width/2.83465)/10)/1000) +' mm'
def ColorInfo(): if len(self.document.selection) != 1 or self.document.CanUngroup(): fill_frame["style"]='ColorWatchDisabled' outline_frame["style"]='ColorWatchDisabled' fill_frame['background']=app.uimanager.currentColorTheme.bg outline_frame['background']=app.uimanager.currentColorTheme.bg return "" properties = self.document.CurrentProperties() filltxt='' outlinetxt='' try: fill_frame["style"]='ColorWatchNormal' fillcolor=rgb_to_tk(properties.fill_pattern.Color().RGB()) fill_frame["background"]=fillcolor filltxt='Fill: ' + properties.fill_pattern.Color().toString() except: fill_frame["style"]='ColorWatchTransp' filltxt='Fill: None' try: outline_frame["style"]='ColorWatchNormal' outline_frame["background"]=rgb_to_tk(properties.line_pattern.Color().RGB()) outlinetxt='Outline: '+ str(math.ceil(math.floor(10**4*properties.line_width/2.83465)/10)/1000) +' mm' except: outline_frame["style"]='ColorWatchTransp' outlinetxt='Outline: None' return _(filltxt + "\n" + outlinetxt)
5b0b1ea6519d06fdf8f2bc5a6c7256f8f274e195 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3123/5b0b1ea6519d06fdf8f2bc5a6c7256f8f274e195/mainwindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5563, 966, 13332, 309, 562, 12, 2890, 18, 5457, 18, 10705, 13, 480, 404, 578, 365, 18, 5457, 18, 2568, 984, 1655, 13332, 3636, 67, 3789, 9614, 4060, 11929, 2218, 2957, 5234, 8853, 11, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5563, 966, 13332, 309, 562, 12, 2890, 18, 5457, 18, 10705, 13, 480, 404, 578, 365, 18, 5457, 18, 2568, 984, 1655, 13332, 3636, 67, 3789, 9614, 4060, 11929, 2218, 2957, 5234, 8853, 11, ...
defaultValue = originalImage[0, 0] for i in range(originalImage.bands()): defaultValue[i] = 0.0
defaultValue = 0.0 if originalImage.bands() > 1: defaultValue = originalImage[0, 0] for i in range(originalImage.bands()): defaultValue[i] = 0.0
def __init__(self, map, originalImage, defaultValue = None, minSampleCount = 1, SIV = SplineImageView5): self.originalImage = originalImage self.map = ref(map)
d641c6f263cb1e4367516ac96eb8aff28ed38000 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10394/d641c6f263cb1e4367516ac96eb8aff28ed38000/statistics.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 852, 16, 2282, 2040, 16, 4593, 273, 599, 16, 1131, 8504, 1380, 273, 404, 16, 5705, 58, 273, 11484, 558, 2040, 1767, 25, 4672, 365, 18, 8830, 2040, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 852, 16, 2282, 2040, 16, 4593, 273, 599, 16, 1131, 8504, 1380, 273, 404, 16, 5705, 58, 273, 11484, 558, 2040, 1767, 25, 4672, 365, 18, 8830, 2040, 273, ...
response = self.http.request(method='POST', path=None, payload=form_body, headers=headers)
response = self.http.request(method='POST', path=path, payload=form_body, headers=headers)
def http_request(self, path_name=None, cookie_string=None, form={}, full_path=None, conn=None): if not full_path and self.config['cb_single_url']: full_path = self.config['cb_single_url'] if full_path: u = urlparse.urlparse(full_path) host = u.hostname port = u.port or 80 path = u.path if u.query: path += '?' + u.query else:
281868e348d5d5bec90dd367382087275996f957 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13219/281868e348d5d5bec90dd367382087275996f957/server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1062, 67, 2293, 12, 2890, 16, 589, 67, 529, 33, 7036, 16, 3878, 67, 1080, 33, 7036, 16, 646, 28793, 1983, 67, 803, 33, 7036, 16, 1487, 33, 7036, 4672, 309, 486, 1983, 67, 803, 471, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1062, 67, 2293, 12, 2890, 16, 589, 67, 529, 33, 7036, 16, 3878, 67, 1080, 33, 7036, 16, 646, 28793, 1983, 67, 803, 33, 7036, 16, 1487, 33, 7036, 4672, 309, 486, 1983, 67, 803, 471, ...
item2.value,
rev_second,
def compare_revisions(self, widget, data=None): from rabbitvcs.ui.diff import SVNDiff item1 = self.revisions[0]["revision"] item2 = self.revisions[1]["revision"] self.action = VCSAction( self.vcs_client, notification=False ) self.action.append( SVNDiff, self.vcs_client.get_repo_url(self.path), item2.value, self.vcs_client.get_repo_url(self.path), item1.value, sidebyside=True ) self.action.start()
254cf90c673c32fc3faafcde068598e8de07eeee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5119/254cf90c673c32fc3faafcde068598e8de07eeee/log.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3400, 67, 29892, 12, 2890, 16, 3604, 16, 501, 33, 7036, 4672, 628, 767, 70, 3682, 18982, 18, 4881, 18, 5413, 1930, 29537, 2908, 3048, 225, 761, 21, 273, 365, 18, 29892, 63, 20, 6362, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3400, 67, 29892, 12, 2890, 16, 3604, 16, 501, 33, 7036, 4672, 628, 767, 70, 3682, 18982, 18, 4881, 18, 5413, 1930, 29537, 2908, 3048, 225, 761, 21, 273, 365, 18, 29892, 63, 20, 6362, ...
previous_pid_affinities[tid] = affinity
previous_pid_affinities[tid] = copy.copy(affinity)
def isolate_cpu(cpu, nr_cpus): ps = procfs.pidstats() ps.reload_threads() previous_pid_affinities = {} for pid in ps.keys(): if iskthread(pid): continue affinity = schedutils.get_affinity(pid) if cpu in affinity: previous_pid_affinities[pid] = copy.copy(affinity) affinity = affinity_remove_cpu(affinity, cpu, nr_cpus) schedutils.set_affinity(pid, affinity) if not ps[pid].has_key("threads"): continue threads = ps[pid]["threads"] for tid in threads.keys(): if iskthread(tid): continue affinity = schedutils.get_affinity(tid) if cpu in affinity: previous_pid_affinities[tid] = affinity affinity = affinity_remove_cpu(affinity, cpu, nr_cpus) schedutils.set_affinity(tid, affinity) del ps # Now isolate it from IRQs too irqs = procfs.interrupts() previous_irq_affinities = {} for irq in irqs.keys(): # LOC, NMI, TLB, etc if not irqs[irq].has_key("affinity"): continue affinity = irqs[irq]["affinity"] if cpu in affinity: previous_irq_affinities[irq] = copy.copy(affinity) affinity = affinity_remove_cpu(affinity, cpu, nr_cpus) set_irq_affinity(int(irq), procfs.hexbitmask(affinity, nr_cpus)) return (previous_pid_affinities, previous_irq_affinities)
9eca514da1d4d00d4c5511010e81dee04acd849e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3406/9eca514da1d4d00d4c5511010e81dee04acd849e/tuna.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30630, 67, 11447, 12, 11447, 16, 9884, 67, 20696, 4672, 4250, 273, 5418, 2556, 18, 6610, 5296, 1435, 4250, 18, 17517, 67, 12495, 1435, 2416, 67, 6610, 67, 1727, 926, 1961, 273, 2618, 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, 30630, 67, 11447, 12, 11447, 16, 9884, 67, 20696, 4672, 4250, 273, 5418, 2556, 18, 6610, 5296, 1435, 4250, 18, 17517, 67, 12495, 1435, 2416, 67, 6610, 67, 1727, 926, 1961, 273, 2618, 364...
"""isinstance(%s, numbers.Number)"""
def _isNumberType(self, node, results): """isinstance(%s, numbers.Number)""" return self._handle_type2abc(node, results, "numbers", "Number")
9296c21e78ed50e8864f9f54d4e772a329a36240 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/9296c21e78ed50e8864f9f54d4e772a329a36240/fix_operator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 291, 1854, 559, 12, 2890, 16, 756, 16, 1686, 4672, 327, 365, 6315, 4110, 67, 723, 22, 18947, 12, 2159, 16, 1686, 16, 315, 13851, 3113, 315, 1854, 7923, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 291, 1854, 559, 12, 2890, 16, 756, 16, 1686, 4672, 327, 365, 6315, 4110, 67, 723, 22, 18947, 12, 2159, 16, 1686, 16, 315, 13851, 3113, 315, 1854, 7923, 2, -100, -100, -100, -100, ...
class DbEvaluationLoader(bulkloader.Loader):
class AppEngineDbEvaluationLoader(bulkloader.Loader):
def __init__(self): bulkloader.Exporter.__init__(self, 'DbIssue', [ ('__key__', lambda x: x.to_path()[1], None), ('bugPattern', str, None), ('priority', str, None), ('primaryClass', str, None), ('firstSeen', str, None), ('lastSeen', str, 0), ('bugLink', str, '') ])
f52986380d28d283aa7e99a55fe860d0af45b9b6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10256/f52986380d28d283aa7e99a55fe860d0af45b9b6/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 8280, 6714, 18, 22305, 16186, 2738, 972, 12, 2890, 16, 296, 4331, 12956, 2187, 306, 7707, 972, 856, 972, 2187, 3195, 619, 30, 619, 18, 869, 67, 803, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 8280, 6714, 18, 22305, 16186, 2738, 972, 12, 2890, 16, 296, 4331, 12956, 2187, 306, 7707, 972, 856, 972, 2187, 3195, 619, 30, 619, 18, 869, 67, 803, 14...
getPlatform())
platform)
def generateSnippet(abstDistDir, applicationIniFile, locale, downloadBaseURL, product): # Let's extract information from application.ini c = ConfigParser() try: c.readfp(open(applicationIniFile)) except IOError, (stderror): sys.exit(stderror) buildid = c.get("App", "BuildID") appVersion = c.get("App", "Version") branchName = c.get("App", "SourceRepository").split('/')[-1] marFileName = '%s-%s.%s.%s.complete.mar' % ( product, appVersion, locale, getPlatform()) # Let's determine the hash and the size of the MAR file # This function exits the script if the file does not exist (completeMarHash, completeMarSize) = getFileHashAndSize( os.path.join(abstDistDir, marFileName)) # Construct the URL to where the MAR file will exist interfix = '' if locale == 'en-US': interfix = '' else: interfix = '-l10n' marDownloadURL = "%s/%s%s/%s" % (downloadBaseURL, datedDirPath(buildid, branchName), interfix, marFileName) snippet = """complete
1c1af9bdb54019c5fa27ba31c96ae4f15b46e142 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/1c1af9bdb54019c5fa27ba31c96ae4f15b46e142/generatesnippet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 19614, 12, 378, 334, 5133, 1621, 16, 2521, 22129, 812, 16, 2573, 16, 4224, 29064, 16, 3017, 4672, 468, 10559, 1807, 2608, 1779, 628, 2521, 18, 8767, 276, 273, 25076, 1435, 775, 30,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 19614, 12, 378, 334, 5133, 1621, 16, 2521, 22129, 812, 16, 2573, 16, 4224, 29064, 16, 3017, 4672, 468, 10559, 1807, 2608, 1779, 628, 2521, 18, 8767, 276, 273, 25076, 1435, 775, 30,...
Let's compare the first CDS feature - it has gone from being the second feature (index 1) to the second last feature (index -2), its strand has changed, and the location switched round.
Let's compare the first CDS feature - it has gone from being the second feature (index 1) to the second last feature (index -2), its strand has changed, and the location switched round.
def reverse_complement(self, id=False, name=False, description=False, features=True, annotations=False, letter_annotations=True, dbxrefs=False): """Returns new SeqRecord with reverse complement sequence.
c10b2cb3eb4a1f3271c3589467698a9e6891c585 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7167/c10b2cb3eb4a1f3271c3589467698a9e6891c585/SeqRecord.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4219, 67, 2919, 806, 12, 2890, 16, 612, 33, 8381, 16, 508, 33, 8381, 16, 2477, 33, 8381, 16, 4467, 33, 5510, 16, 5617, 33, 8381, 16, 9471, 67, 14670, 33, 5510, 16, 1319, 92, 9316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4219, 67, 2919, 806, 12, 2890, 16, 612, 33, 8381, 16, 508, 33, 8381, 16, 2477, 33, 8381, 16, 4467, 33, 5510, 16, 5617, 33, 8381, 16, 9471, 67, 14670, 33, 5510, 16, 1319, 92, 9316, ...
"Expected: %s\nActual: %s" % (index+1, kw.name, expected, actual))
"Expected: %s\nActual: %s.\n%s" % (index+1, kw.name, expected, actual, kw.messages[index].message))
def _check_log_level(expected, test, kw, index): actual = kw.messages[index].level if actual == expected: return True test.status = 'FAIL' test.message = ("Wrong level for message %d of keyword '%s'.\n\n" "Expected: %s\nActual: %s" % (index+1, kw.name, expected, actual)) return False
29c4ac7d10dde8fd8eea2dfacec8fbef05382815 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7408/29c4ac7d10dde8fd8eea2dfacec8fbef05382815/statuschecker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 1330, 67, 2815, 12, 3825, 16, 1842, 16, 5323, 16, 770, 4672, 3214, 273, 5323, 18, 6833, 63, 1615, 8009, 2815, 309, 3214, 422, 2665, 30, 327, 1053, 1842, 18, 2327, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 1330, 67, 2815, 12, 3825, 16, 1842, 16, 5323, 16, 770, 4672, 3214, 273, 5323, 18, 6833, 63, 1615, 8009, 2815, 309, 3214, 422, 2665, 30, 327, 1053, 1842, 18, 2327, 273, ...
if not sePfnDict.has_key(se):
if not sePfnDict.has_key( se ):
def execute(self):
ff946fabd16f68b844021b4c5e84a27f3c288165 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/ff946fabd16f68b844021b4c5e84a27f3c288165/LFCvsSEAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
def make_parameter(name, excess_keyword=False, excess_positional=False):
def make_parameter(name, excess_keyword=0, excess_positional=0): """ excess_keyword and excess_positional must be either 1 or 0, and not both of them can be 1. """
def make_parameter(name, excess_keyword=False, excess_positional=False): n = pynodes.parameter() n.append(make_object_name(name)) assert not excess_keyword or not excess_positional if excess_keyword: n['excess_keyword'] = 1 if excess_positional: n['excess_positional'] = 1 return n
08b574ed0258caa4c1fa55c0d89d0726cf29c1a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/08b574ed0258caa4c1fa55c0d89d0726cf29c1a3/moduleparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 6775, 12, 529, 16, 23183, 67, 11041, 33, 20, 16, 23183, 67, 3276, 287, 33, 20, 4672, 3536, 23183, 67, 11041, 471, 23183, 67, 3276, 287, 1297, 506, 3344, 404, 578, 374, 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, 1221, 67, 6775, 12, 529, 16, 23183, 67, 11041, 33, 20, 16, 23183, 67, 3276, 287, 33, 20, 4672, 3536, 23183, 67, 11041, 471, 23183, 67, 3276, 287, 1297, 506, 3344, 404, 578, 374, 16, ...
gMonitor.addMark("Replication failed",1)
gMonitor.addMark( "Replication failed", 1 )
def executeRequest(self): ################################################ # Get a request from request DB gMonitor.addMark( "Iteration", 1 ) res = self.RequestDBClient.getRequest('transfer') if not res['OK']: gLogger.info("TransferAgent.execute: Failed to get request from database.") return S_OK() elif not res['Value']: gLogger.info("TransferAgent.execute: No requests to be executed found.") return S_OK() requestString = res['Value']['RequestString'] requestName = res['Value']['RequestName'] sourceServer= res['Value']['Server'] try: jobID = int(res['Value']['JobID']) except: jobID = 0 gLogger.info("TransferAgent.execute: Obtained request %s" % requestName)
e9b27a9be4536012e60823ee81099deb0a1fbe85 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/e9b27a9be4536012e60823ee81099deb0a1fbe85/TransferAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 691, 12, 2890, 4672, 19709, 26487, 13151, 468, 968, 279, 590, 628, 590, 2383, 314, 7187, 18, 1289, 3882, 12, 315, 10795, 3113, 404, 262, 400, 273, 365, 18, 691, 2290, 1227, 18, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 691, 12, 2890, 4672, 19709, 26487, 13151, 468, 968, 279, 590, 628, 590, 2383, 314, 7187, 18, 1289, 3882, 12, 315, 10795, 3113, 404, 262, 400, 273, 365, 18, 691, 2290, 1227, 18, 5...
nc = netCDF(self.nc, 'r') sym = nc.variables['DynamicAtomSpecies'][:] symbols = [x.tostring().strip() for x in sym] for sym in symbols: vn = 'AtomProperty_%s' % sym if vn in nc.variables: var = nc.variables[vn] pspfile = var.PspotFile self.psp[sym] = pspfile nc.close()
try: nc = netCDF(self.nc, 'r') sym = nc.variables['DynamicAtomSpecies'][:] symbols = [x.tostring().strip() for x in sym] for sym in symbols: vn = 'AtomProperty_%s' % sym if vn in nc.variables: var = nc.variables[vn] pspfile = var.PspotFile self.psp[sym] = pspfile finally: nc.close()
def set_psp_database(self, xc=None): ''' get the xc-dependent psp database
5fd0fd8628285f26365f47a3e582de7a9a63345b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5735/5fd0fd8628285f26365f47a3e582de7a9a63345b/jacapo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 1121, 84, 67, 6231, 12, 2890, 16, 15192, 33, 7036, 4672, 9163, 336, 326, 15192, 17, 10891, 293, 1752, 2063, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 444, 67, 1121, 84, 67, 6231, 12, 2890, 16, 15192, 33, 7036, 4672, 9163, 336, 326, 15192, 17, 10891, 293, 1752, 2063, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
fileHandle.write(x + "=" + self.configElements[x])
wstr = x + "=" + self.configElements[x] if wstr[len(wstr) - 1] != '\n': wstr = wstr + "\n" fileHandle.write(wstr)
def save(self): fileHandle = open("config", "w") for x in self.configElements: fileHandle.write(x + "=" + self.configElements[x])
45ff4a40741c0562b9feccec57b6e062f063ab76 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/45ff4a40741c0562b9feccec57b6e062f063ab76/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 4672, 26662, 273, 1696, 2932, 1425, 3113, 315, 91, 7923, 225, 364, 619, 316, 365, 18, 1425, 3471, 30, 26662, 18, 2626, 12, 92, 397, 9671, 397, 365, 18, 1425, 3471, 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, 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, 1923, 12, 2890, 4672, 26662, 273, 1696, 2932, 1425, 3113, 315, 91, 7923, 225, 364, 619, 316, 365, 18, 1425, 3471, 30, 26662, 18, 2626, 12, 92, 397, 9671, 397, 365, 18, 1425, 3471, 63, ...
for (theName, l) in self.chgGroup.iteritems():
for (theName, l) in chgGroup.iteritems():
def updateChangedTrove(self, name, flavor, old, new, weakRef = False):
ca134d89b09c6d5037b2d70a736ae860d9039af7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/ca134d89b09c6d5037b2d70a736ae860d9039af7/trove.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 5033, 56, 303, 537, 12, 2890, 16, 508, 16, 19496, 16, 1592, 16, 394, 16, 16046, 1957, 273, 1083, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 5033, 56, 303, 537, 12, 2890, 16, 508, 16, 19496, 16, 1592, 16, 394, 16, 16046, 1957, 273, 1083, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print "Creating resource fork..."
if DEBUG: print "Creating resource fork..."
def process(template, filename, output): print "Processing", `filename`, "..." # Read the source and compile it # (there's no point overwriting the destination if it has a syntax error) fp = open(filename) text = fp.read() fp.close() try: code = compile(text, filename, "exec") except (SyntaxError, EOFError): die("Syntax error in script %s" % `filename`) return # Set the destination file name if string.lower(filename[-3:]) == ".py": destname = filename[:-3] rsrcname = destname + '.rsrc' else: destname = filename + ".applet" rsrcname = filename + '.rsrc' if output: destname = output # Copy the data from the template (creating the file as well) template_fss = macfs.FSSpec(template) template_fss, d1, d2 = macfs.ResolveAliasFile(template_fss) dest_fss = macfs.FSSpec(destname) tmpl = open(template, "rb") dest = open(destname, "wb") data = tmpl.read() if data: dest.write(data) dest.close() tmpl.close() # Copy the creator of the template to the destination # unless it already got one. Set type to APPL tctor, ttype = template_fss.GetCreatorType() ctor, type = dest_fss.GetCreatorType() if type in undefs: type = 'APPL' if ctor in undefs: ctor = tctor # Open the output resource fork try: output = FSpOpenResFile(dest_fss, WRITE) except MacOS.Error: print "Creating resource fork..." CreateResFile(destname) output = FSpOpenResFile(dest_fss, WRITE) # Copy the resources from the template input = FSpOpenResFile(template_fss, READ) newctor = copyres(input, output) CloseResFile(input) if newctor: ctor = newctor # Copy the resources from the target specific resource template, if any try: input = FSpOpenResFile(rsrcname, READ) except MacOS.Error: pass else: newctor = copyres(input, output) CloseResFile(input) if newctor: ctor = newctor # Now set the creator, type and bundle bit of the destination dest_finfo = dest_fss.GetFInfo() dest_finfo.Creator = ctor dest_finfo.Type = type dest_finfo.Flags = dest_finfo.Flags | MACFS.kHasBundle dest_finfo.Flags = dest_finfo.Flags & ~MACFS.kHasBeenInited dest_fss.SetFInfo(dest_finfo) # Make sure we're manipulating the output resource file now UseResFile(output) # Delete any existing 'PYC 'resource named __main__ try: res = Get1NamedResource(RESTYPE, RESNAME) res.RemoveResource() except Error: pass # Create the raw data for the resource from the code object data = marshal.dumps(code) del code data = (MAGIC + '\0\0\0\0') + data # Create the resource and write it id = 0 while id < 128: id = Unique1ID(RESTYPE) res = Resource(data) res.AddResource(RESTYPE, id, RESNAME) res.WriteResource() res.ReleaseResource() # Close the output file CloseResFile(output) # Give positive feedback message("Applet %s created." % `destname`)
0f452fa557eaf41aa576f8644b0955efea8daaac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0f452fa557eaf41aa576f8644b0955efea8daaac/BuildApplet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 3202, 16, 1544, 16, 876, 4672, 225, 1172, 315, 7798, 3113, 1375, 3459, 9191, 26456, 225, 468, 2720, 326, 1084, 471, 4074, 518, 468, 261, 18664, 1807, 1158, 1634, 23492, 326, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 3202, 16, 1544, 16, 876, 4672, 225, 1172, 315, 7798, 3113, 1375, 3459, 9191, 26456, 225, 468, 2720, 326, 1084, 471, 4074, 518, 468, 261, 18664, 1807, 1158, 1634, 23492, 326, 29...
assert not pypypolicy.look_inside_function(id__ANY)
assert pypypolicy.look_inside_function(id__ANY)
def test_id_any(): from pypy.objspace.std.default import id__ANY assert not pypypolicy.look_inside_function(id__ANY)
f1272dce3cc7ef03a707c6dd6886534c07e07bb6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/f1272dce3cc7ef03a707c6dd6886534c07e07bb6/test_policy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 350, 67, 2273, 13332, 628, 18951, 93, 18, 2603, 2981, 18, 5084, 18, 1886, 1930, 612, 972, 15409, 1815, 18951, 879, 1590, 18, 7330, 67, 28091, 67, 915, 12, 350, 972, 15409, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 350, 67, 2273, 13332, 628, 18951, 93, 18, 2603, 2981, 18, 5084, 18, 1886, 1930, 612, 972, 15409, 1815, 18951, 879, 1590, 18, 7330, 67, 28091, 67, 915, 12, 350, 972, 15409, 13...
def lyx2latex(lines):
def lyx2latex(document, lines):
def lyx2latex(lines): 'Convert some LyX stuff into corresponding LaTeX stuff, as best we can.' # clean up multiline stuff content = "" ert_end = 0 reps = read_unicodesymbols() for curline in range(len(lines)): line = lines[curline] if line.startswith("\\begin_inset ERT"): # We don't want to replace things inside ERT, so figure out # where the end of the inset is. ert_end = find_end_of_inset(lines, curline + 1) continue elif line.startswith("\\begin_inset Formula"): line = line[20:] elif line.startswith("\\begin_inset Quotes"): # For now, we do a very basic reversion. Someone who understands # quotes is welcome to fix it up. qtype = line[20:].strip() # lang = qtype[0] side = qtype[1] dbls = qtype[2] if side == "l": if dbls == "d": line = "``" else: line = "`" else: if dbls == "d": line = "''" else: line = "'" elif line.isspace() or \ line.startswith("\\begin_layout") or \ line.startswith("\\end_layout") or \ line.startswith("\\begin_inset") or \ line.startswith("\\end_inset") or \ line.startswith("\\lang") or \ line.strip() == "status collapsed" or \ line.strip() == "status open": #skip all that stuff continue # a lossless reversion is not possible # try at least to handle some common insets and settings # do not replace inside ERTs if ert_end >= curline: line = line.replace(r'\backslash', r'\\') else: # Do the LyX text --> LaTeX conversion for rep in reps: line = line.replace(rep[1], rep[0] + "{}") line = line.replace(r'\backslash', r'\textbackslash{}') line = line.replace(r'\series bold', r'\bfseries{}').replace(r'\series default', r'\mdseries{}') line = line.replace(r'\shape italic', r'\itshape{}').replace(r'\shape smallcaps', r'\scshape{}') line = line.replace(r'\shape slanted', r'\slshape{}').replace(r'\shape default', r'\upshape{}') line = line.replace(r'\emph on', r'\em{}').replace(r'\emph default', r'\em{}') line = line.replace(r'\noun on', r'\scshape{}').replace(r'\noun default', r'\upshape{}') line = line.replace(r'\bar under', r'\underbar{').replace(r'\bar default', r'}') line = line.replace(r'\family sans', r'\sffamily{}').replace(r'\family default', r'\normalfont{}') line = line.replace(r'\family typewriter', r'\ttfamily{}').replace(r'\family roman', r'\rmfamily{}') line = line.replace(r'\InsetSpace ', r'').replace(r'\SpecialChar ', r'') content += line return content
0b115f57dbd54d7691a36a5e74e34ba006c6bacc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7514/0b115f57dbd54d7691a36a5e74e34ba006c6bacc/lyx_1_6.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18519, 92, 22, 26264, 12, 5457, 16, 2362, 4672, 296, 2723, 2690, 511, 93, 60, 10769, 1368, 4656, 21072, 21575, 60, 10769, 16, 487, 3796, 732, 848, 1093, 468, 2721, 731, 19431, 10769, 913...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18519, 92, 22, 26264, 12, 5457, 16, 2362, 4672, 296, 2723, 2690, 511, 93, 60, 10769, 1368, 4656, 21072, 21575, 60, 10769, 16, 487, 3796, 732, 848, 1093, 468, 2721, 731, 19431, 10769, 913...
print("[" + vessel['location'] + "] Setting user keys.")
print("[" + vessel['nodelocation'] + "] Setting user keys.")
def set_keys(vessel, identity): """ The first argument will be a vesseldict rather than a vesselhandle because we passed the result of get_vessels_on_nodes to run_parallelized. """ if vessel['vesselname'] != VESSELNAME_TO_SET_USER_KEYS_ON: msg = "[" + vessel['location'] + "] Skipping: vesselname is not: " + VESSELNAME_TO_SET_USER_KEYS_ON print(msg) raise Exception(msg) if vessel['userkeys'] != USERKEY_LIST: print("[" + vessel['location'] + "] Setting user keys.") try: experimentlib.set_vessel_users(vessel['handle'], identity, USERKEY_LIST) except Exception, e: msg = "[" + vessel['location'] + "] Failure: " + str(e) print(msg) import traceback traceback.print_exc() raise Exception(msg) else: print("[" + vessel['location'] + "] Success.") else: print("[" + vessel['location'] + "] Already had correct user keys.")
c05862ba556a55ecfe962167a0a62ac9ff1a5b43 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7263/c05862ba556a55ecfe962167a0a62ac9ff1a5b43/set_user_keys.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2452, 12, 90, 403, 292, 16, 4215, 4672, 3536, 1021, 1122, 1237, 903, 506, 279, 331, 403, 488, 933, 9178, 2353, 279, 331, 403, 292, 4110, 2724, 732, 2275, 326, 563, 434, 336, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2452, 12, 90, 403, 292, 16, 4215, 4672, 3536, 1021, 1122, 1237, 903, 506, 279, 331, 403, 488, 933, 9178, 2353, 279, 331, 403, 292, 4110, 2724, 732, 2275, 326, 563, 434, 336, ...
self.sizer2.Remove(self.buttons[0]) self.buttons.pop(0)
self.sizer2.Remove(0) self.buttons.pop(0).Destroy()
def callback(self, message): self.lock.acquire(1) print"" print "New Message at %.1f"%message.header.stamp.to_time() for s in message.status:
c959a661c23d29d777ab6c14080e2352da29936e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10233/c959a661c23d29d777ab6c14080e2352da29936e/wxmonitor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1348, 12, 2890, 16, 883, 4672, 365, 18, 739, 18, 1077, 1039, 12, 21, 13, 1172, 3660, 1172, 315, 1908, 2350, 622, 12639, 21, 74, 28385, 2150, 18, 3374, 18, 14317, 18, 869, 67, 957, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1348, 12, 2890, 16, 883, 4672, 365, 18, 739, 18, 1077, 1039, 12, 21, 13, 1172, 3660, 1172, 315, 1908, 2350, 622, 12639, 21, 74, 28385, 2150, 18, 3374, 18, 14317, 18, 869, 67, 957, 14...
uri = string.lstrip(uri, "//parcels")
uri = uri[10:]
def FindParcelFile(uri, searchPath): path = "" uri = string.lstrip(uri, "//parcels") for part in string.split(uri, '/'): path = os.path.join(path, part) path = os.path.join(path, 'parcel.xml') file = SearchFile(path, searchPath) return file
0b9d763fe57bb460cd35f33f1399c2ef5bef3b63 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/0b9d763fe57bb460cd35f33f1399c2ef5bef3b63/LoadParcels.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4163, 1553, 2183, 812, 12, 1650, 16, 1623, 743, 4672, 589, 273, 1408, 2003, 273, 2003, 63, 2163, 26894, 364, 1087, 316, 533, 18, 4939, 12, 1650, 16, 2023, 4672, 589, 273, 1140, 18, 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, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4163, 1553, 2183, 812, 12, 1650, 16, 1623, 743, 4672, 589, 273, 1408, 2003, 273, 2003, 63, 2163, 26894, 364, 1087, 316, 533, 18, 4939, 12, 1650, 16, 2023, 4672, 589, 273, 1140, 18, 803...
self.__parse()
def wife(self): """ Return wife this family """ self.__parse() #__init__ didn't run parse, I don't know why return self.__wife
0621dfd4c080b33e7cbaaca718e04e50c25e01f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14621/0621dfd4c080b33e7cbaaca718e04e50c25e01f9/simplepyged.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 341, 24723, 12, 2890, 4672, 3536, 2000, 341, 24723, 333, 6755, 3536, 468, 972, 2738, 972, 10242, 1404, 1086, 1109, 16, 467, 2727, 1404, 5055, 11598, 327, 365, 16186, 91, 24723, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 341, 24723, 12, 2890, 4672, 3536, 2000, 341, 24723, 333, 6755, 3536, 468, 972, 2738, 972, 10242, 1404, 1086, 1109, 16, 467, 2727, 1404, 5055, 11598, 327, 365, 16186, 91, 24723, 2, -100, ...
max_depth, father = 0, None
def add_node(self, name, deps): max_depth, father = 0, None for i in [Node(x, self) for x in deps]: if i.depth >= max_depth: father = i max_depth = i.depth if father: father.add_child(name) else: Node(name, self)
9e182ca8855d2a70434760dbccf7e601872dd1b0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/9e182ca8855d2a70434760dbccf7e601872dd1b0/module.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 2159, 12, 2890, 16, 508, 16, 8740, 4672, 364, 277, 316, 306, 907, 12, 92, 16, 365, 13, 364, 619, 316, 8740, 14542, 309, 277, 18, 5979, 1545, 943, 67, 5979, 30, 284, 4806, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 2159, 12, 2890, 16, 508, 16, 8740, 4672, 364, 277, 316, 306, 907, 12, 92, 16, 365, 13, 364, 619, 316, 8740, 14542, 309, 277, 18, 5979, 1545, 943, 67, 5979, 30, 284, 4806, ...
if "Alpha" in mesh.getColorLayerNames(): self.fState.fBlendFlags |= hsGMatState.hsGMatBlendFlags["kBlendAlpha"]
for colLayerName in mesh.getColorLayerNames(): if(colLayerName.lower() == "alpha"): self.fState.fBlendFlags |= hsGMatState.hsGMatBlendFlags["kBlendAlpha"]
def FromBlenderMat(self,obj,mat): # Now Copy Settings from the material... mesh = obj.getData(False,True)
e03385be66a794529e2e9f9f5c0af3d138c86813 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12286/e03385be66a794529e2e9f9f5c0af3d138c86813/prp_MatClasses.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6338, 4802, 2345, 15947, 12, 2890, 16, 2603, 16, 7373, 4672, 468, 4494, 5631, 8709, 628, 326, 9390, 2777, 6986, 273, 1081, 18, 588, 751, 12, 8381, 16, 5510, 13, 2, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6338, 4802, 2345, 15947, 12, 2890, 16, 2603, 16, 7373, 4672, 468, 4494, 5631, 8709, 628, 326, 9390, 2777, 6986, 273, 1081, 18, 588, 751, 12, 8381, 16, 5510, 13, 2, -100, -100, -100, -1...
start_script = \ " cd %s/lib/python%s/site-packages/openerp-server\n\ exec %s ./openerp-server.py $@\n" % (sys.prefix, py_short_version, sys.executable) f = open('openerp-server', 'w') f.write(start_script) f.close()
class openerp_server_install(install): def run(self): start_script = " f = open('openerp-server', 'w') f.write(start_script) f.close() install.run(self)
def data_files(): '''Build list of data files to be installed''' files = [] if os.name == 'nt': os.chdir('bin') for (dp,dn,names) in os.walk('addons'): files.append((dp, map(lambda x: opj('bin', dp, x), names))) for (dp,dn,names) in os.walk('i18n'): files.append((dp, map(lambda x: opj('bin', dp, x), names))) os.chdir('..') for (dp,dn,names) in os.walk('doc'): files.append((dp, map(lambda x: opj(dp, x), names))) files.append(('.', [('bin/import_xml.rng')])) else: man_directory = opj('share', 'man') files.append((opj(man_directory, 'man1'), ['man/openerp-server.1'])) files.append((opj(man_directory, 'man5'), ['man/openerp_serverrc.5'])) doc_directory = opj('share', 'doc', 'openerp-server-%s' % version) files.append((doc_directory, [f for f in glob.glob('doc/*') if os.path.isfile(f)])) files.append((opj(doc_directory, 'migrate', '3.3.0-3.4.0'), [f for f in glob.glob('doc/migrate/3.3.0-3.4.0/*') if os.path.isfile(f)])) files.append((opj(doc_directory, 'migrate', '3.4.0-4.0.0'), [f for f in glob.glob('doc/migrate/3.4.0-4.0.0/*') if os.path.isfile(f)])) openerp_site_packages = opj('lib', 'python%s' % py_short_version, 'site-packages', 'openerp-server') files.append((opj(openerp_site_packages, 'i18n'), glob.glob('bin/i18n/*'))) files.append((opj(openerp_site_packages, 'addons', 'custom'), glob.glob('bin/addons/custom/*xml') + glob.glob('bin/addons/custom/*rml') + glob.glob('bin/addons/custom/*xsl'))) files.append((openerp_site_packages, [('bin/import_xml.rng')])) for addon in find_addons(): add_path = addon.replace('.', os.path.sep).replace('openerp-server', 'bin', 1) addon_path = opj('lib', 'python%s' % py_short_version, 'site-packages', add_path.replace('bin', 'openerp-server', 1)) pathfiles = [ ( addon_path, glob.glob(opj(add_path, '*xml')) + glob.glob(opj(add_path, '*csv')) + glob.glob(opj(add_path, '*sql')) ), ( opj(addon_path, 'data'), glob.glob(opj(add_path, 'data', '*xml')) ), ( opj(addon_path, 'report'), glob.glob(opj(add_path, 'report', '*xml')) + glob.glob(opj(add_path, 'report', '*rml')) + glob.glob(opj(add_path, 'report', '*sxw')) + glob.glob(opj(add_path, 'report', '*xsl')) ), ( opj(addon_path, 'security'), glob.glob(opj(add_path, 'security', '*csv')) + glob.glob(opj(add_path, 'security', '*xml')) ), ( opj(addon_path, 'rng'), glob.glob(opj(add_path, 'rng', '*rng')) ) ] files.extend(pathfiles) return files
d0fcc9d7ec7b682fd5b8428f668e4a7fe9fb5ccc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/d0fcc9d7ec7b682fd5b8428f668e4a7fe9fb5ccc/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 67, 2354, 13332, 9163, 3116, 666, 434, 501, 1390, 358, 506, 5876, 26418, 1390, 273, 5378, 309, 1140, 18, 529, 422, 296, 496, 4278, 1140, 18, 343, 1214, 2668, 4757, 6134, 364, 261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 67, 2354, 13332, 9163, 3116, 666, 434, 501, 1390, 358, 506, 5876, 26418, 1390, 273, 5378, 309, 1140, 18, 529, 422, 296, 496, 4278, 1140, 18, 343, 1214, 2668, 4757, 6134, 364, 261, ...
k=0; sub=0; numin, numout = vals[3] if numin > 1:
k = 0 sub = 0 if uf.nin > 1: assert uf.nin == 2
def make_arrays(funcdict): # functions array contains an entry for every type implemented # NULL should be placed where PyUfunc_ style function will be filled in later # code1list = [] code2list = [] for name, vals in funcdict.iteritems(): funclist = [] datalist = [] siglist = [] k=0; sub=0; numin, numout = vals[3] if numin > 1: thedict = chartotype2 # two inputs and one output else: thedict = chartotype1 # one input and one output instr = ''.join([x*numin for x in list(vals[0])]) if len(vals) > 6: if isinstance(vals[6],type('')): outstr = vals[6] else: # a tuple specifying input signature, output signature instr, outstr = vals[6] else: outstr = ''.join([x*numout for x in list(vals[0])]) _valslen = len(vals[0]) assert _valslen*numout == len(outstr), "input/output signature doesn't match" assert len(instr) == _valslen*numin, "input/output signature doesn't match" for char in vals[0]: if char in vals[1]: # use generic function-based interface funclist.append('NULL') astr = '%s_functions[%d] = PyUFunc_%s;' % \ (name, k, thedict[char]) code2list.append(astr) thisfunc = vals[2][sub] if len(thisfunc) > 8 and thisfunc[:8] == "PyNumber": astr = '%s_data[%d] = (void *) %s;' % \ (name, k, thisfunc) code2list.append(astr) datalist.append('(void *)NULL'); else: datalist.append('(void *)%s' % thisfunc) sub += 1 else: # individual wrapper interface datalist.append('(void *)NULL'); funclist.append('%s_%s' % (chartoname[char].upper(), name)) insubstr = instr[numin*k:numin*(k+1)] outsubstr = outstr[numout*k:numout*(k+1)] siglist.extend(['PyArray_%s' % chartoname[x].upper() for x in insubstr]) siglist.extend(['PyArray_%s' % chartoname[x].upper() for x in outsubstr]) k += 1 funcnames = ', '.join(funclist) signames = ', '.join(siglist) datanames = ', '.join(datalist) code1list.append("static PyUFuncGenericFunction %s_functions[] = { %s };" \ % (name, funcnames)) code1list.append("static void * %s_data[] = { %s };" \ % (name, datanames)) code1list.append("static char %s_signatures[] = { %s };" \ % (name, signames)) return "\n".join(code1list),"\n".join(code2list)
912beccc011bf60d61b61fa24021f6235dba0225 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/912beccc011bf60d61b61fa24021f6235dba0225/generate_umath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 16223, 12, 644, 1576, 4672, 468, 4186, 526, 1914, 392, 1241, 364, 3614, 618, 8249, 468, 282, 3206, 1410, 506, 15235, 1625, 4707, 57, 644, 67, 2154, 445, 903, 506, 6300, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 16223, 12, 644, 1576, 4672, 468, 4186, 526, 1914, 392, 1241, 364, 3614, 618, 8249, 468, 282, 3206, 1410, 506, 15235, 1625, 4707, 57, 644, 67, 2154, 445, 903, 506, 6300, 316, ...
self.connection = None
self.allow_xmlrpc2 = True
def __init__(self): self.open = False self.url = None #self.password = None self.uid = None self.context = {} self.userName = None self.databaseName = None self.connection = None self.threads = [] self.server_options = [] self._log = logging.getLogger('RPC.Session')
353f7ed941dabbec39b45f1c8e628d6f2085e601 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12355/353f7ed941dabbec39b45f1c8e628d6f2085e601/rpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 3190, 273, 1083, 365, 18, 718, 273, 599, 468, 2890, 18, 3664, 273, 599, 365, 18, 1911, 273, 599, 365, 18, 2472, 273, 2618, 365, 18, 1355, 46...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 3190, 273, 1083, 365, 18, 718, 273, 599, 468, 2890, 18, 3664, 273, 599, 365, 18, 1911, 273, 599, 365, 18, 2472, 273, 2618, 365, 18, 1355, 46...
@return A description of this rule.
@return: A description of this rule.
def __str__(self): """ Return a human readable representation of the rule.
825c75951a4beaa739e372a43226ad90c2dd4643 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/847/825c75951a4beaa739e372a43226ad90c2dd4643/yeanpypa.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 3536, 2000, 279, 8672, 7471, 4335, 434, 326, 1720, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 3536, 2000, 279, 8672, 7471, 4335, 434, 326, 1720, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return matrix(out)
return asmatrix(out)
def __getitem__(self, index): out = self.arr.__getitem__(index) # Need to swap if slice is on first index retscal = False try: n = len(index) if (n==2): if isinstance(index[0], types.SliceType): if (isscalar(index[1])): sh = out.shape out.shape = (sh[1], sh[0]) else: if (isscalar(index[0])) and (isscalar(index[1])): retscal = True except TypeError: pass if retscal and out.shape == (1,1): # convert scalars return out.A[0,0] # Return array if the output is 1-d, or matrix if the output is 2-d if out.ndim == 2: return matrix(out) else: return out
9f57eaeaee4fa542932b99f4bea5dc7e44538184 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/9f57eaeaee4fa542932b99f4bea5dc7e44538184/matrix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 770, 4672, 596, 273, 365, 18, 5399, 16186, 31571, 972, 12, 1615, 13, 468, 12324, 358, 7720, 309, 2788, 353, 603, 1122, 770, 325, 87, 771, 273, 1083, 775...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 31571, 972, 12, 2890, 16, 770, 4672, 596, 273, 365, 18, 5399, 16186, 31571, 972, 12, 1615, 13, 468, 12324, 358, 7720, 309, 2788, 353, 603, 1122, 770, 325, 87, 771, 273, 1083, 775...
control.style, control.styles = self.styles([], defaultControlStyle)
control.style, control.styles = self.styles([], thisDefaultStyle) else: thisDefaultStyle = defaultControlStyle | \ _addDefaults.get(control.controlType, 0) control.style = thisDefaultStyle
def controls(self, dlg): if self.token=="BEGIN": self.getToken() while self.token!="END": control = ControlDef() control.controlType = self.token; #print self.token self.getToken() if self.token[0:1]=='"': control.label = self.token[1:-1] self.getCommaToken() self.getToken() elif self.token.isdigit(): control.label = self.token self.getCommaToken() self.getToken() # msvc seems to occasionally replace "IDC_STATIC" with -1 if self.token=='-': if self.getToken() != '1': raise RuntimeError, \ "Negative literal in rc script (other than -1) - don't know what to do" self.token = "IDC_STATIC" control.id = self.token control.idNum = self.addId(control.id) self.getCommaToken() if control.controlType == "CONTROL": self.getToken() control.subType = self.token[1:-1] # Styles self.getCommaToken() self.getToken() control.style, control.styles = self.styles([], defaultControlStyle) #self.getToken() #, # Rect control.x = int(self.getToken()) self.getCommaToken() control.y = int(self.getToken()) self.getCommaToken() control.w = int(self.getToken()) self.getCommaToken() self.getToken() control.h = int(self.token) self.getToken() if self.token==",": self.getToken() control.style, control.styles = self.styles([], defaultControlStyle) #print control.toString() dlg.controls.append(control)
4c7ce4aac702da7f45a3728e193d41cf292ed38d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/4c7ce4aac702da7f45a3728e193d41cf292ed38d/win32rcparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11022, 12, 2890, 16, 25840, 4672, 309, 365, 18, 2316, 31713, 16061, 6877, 365, 18, 588, 1345, 1435, 1323, 365, 18, 2316, 5, 1546, 4415, 6877, 3325, 273, 8888, 3262, 1435, 3325, 18, 7098,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11022, 12, 2890, 16, 25840, 4672, 309, 365, 18, 2316, 31713, 16061, 6877, 365, 18, 588, 1345, 1435, 1323, 365, 18, 2316, 5, 1546, 4415, 6877, 3325, 273, 8888, 3262, 1435, 3325, 18, 7098,...
if len(lines) > 100: lines = lines[100:] + ["%d more lines..." % (len(lines) - 100)]
if len(lines) > LINE_CUTOFF: lines = lines[:LINE_CUTOFF] + ["%d more lines..." % (len(lines) - LINE_CUTOFF)]
def postprocess_loop(loop, loops, memo): if loop in memo: return memo.add(loop) if loop is None: return m = re.search("debug_merge_point\('<code object (.*?)> (.*?)'", loop.content) if m is None: name = '?' else: name = m.group(1) + " " + m.group(2) opsno = loop.content.count("\n") lastline = loop.content[loop.content.rfind("\n", 0, len(loop.content) - 2):] m = re.search('descr=<Loop(\d+)', lastline) if m is not None: assert isinstance(loop, FinalBlock) loop.target = loops[int(m.group(1))] bcodes = loop.content.count('debug_merge_point') loop.linksource = "loop" + str(loop.no) loop.header = "%s loop%d\n%d operations\n%d opcodes" % (name, loop.no, opsno, bcodes) loop.header += "\n" * (opsno / 100) if bcodes == 0: loop.ratio = opsno else: loop.ratio = float(opsno) / bcodes content = loop.content lines = content.split("\n") if len(lines) > 100: lines = lines[100:] + ["%d more lines..." % (len(lines) - 100)] for i, line in enumerate(lines): lines[i] = re.sub("\[.*\]", "", line) loop.content = "Logfile at %d\n" % loop.startlineno + "\n".join(lines) loop.postprocess(loops, memo)
c1fc714ef01581c7e98012f062388ef969b05bac /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/c1fc714ef01581c7e98012f062388ef969b05bac/otherviewer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 2567, 67, 6498, 12, 6498, 16, 14075, 16, 11063, 4672, 309, 2798, 316, 11063, 30, 327, 11063, 18, 1289, 12, 6498, 13, 309, 2798, 353, 599, 30, 327, 312, 273, 283, 18, 3072, 2932, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 2567, 67, 6498, 12, 6498, 16, 14075, 16, 11063, 4672, 309, 2798, 316, 11063, 30, 327, 11063, 18, 1289, 12, 6498, 13, 309, 2798, 353, 599, 30, 327, 312, 273, 283, 18, 3072, 2932, ...
def __getitem(self, name):
def __getitem__(self, name):
def __getitem(self, name): raise SyntaxError
643a8778fa75c99ae5b346ac1d4ad4838d459d63 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/643a8778fa75c99ae5b346ac1d4ad4838d459d63/test_operator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 508, 4672, 1002, 18453, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 508, 4672, 1002, 18453, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
WXCONFIG=wx-config
WXCONFIG=%(WXCONFIG)s
def processArgs(self, args): try: for st in args: pair = string.split(st, '=') name = pair[0] value = pair[1] self.__dict__[name] = value except: print "Error parsing command-line: %s" % st return 0
352f281a242bba9357d00180aa9f4141f40cf5f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/352f281a242bba9357d00180aa9f4141f40cf5f4/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 2615, 12, 2890, 16, 833, 4672, 775, 30, 364, 384, 316, 833, 30, 3082, 273, 533, 18, 4939, 12, 334, 16, 5214, 13, 508, 273, 3082, 63, 20, 65, 460, 273, 3082, 63, 21, 65, 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, 1207, 2615, 12, 2890, 16, 833, 4672, 775, 30, 364, 384, 316, 833, 30, 3082, 273, 533, 18, 4939, 12, 334, 16, 5214, 13, 508, 273, 3082, 63, 20, 65, 460, 273, 3082, 63, 21, 65, 365, ...
if t:
if t.current_track != -1:
def show_status(self, arg=None, menuw=None): t = self.rip_thread if t: pop = AlertBox(text=_( 'Ripping in progress\nTrack %d of %d' ) % \ (t.current_track, t.max_track)) pop.show()
d7ee35cefce69dfd1a61796d184aa6f1a917efcd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/d7ee35cefce69dfd1a61796d184aa6f1a917efcd/cdbackup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 2327, 12, 2890, 16, 1501, 33, 7036, 16, 3824, 91, 33, 7036, 4672, 268, 273, 365, 18, 21335, 67, 5930, 309, 268, 18, 2972, 67, 4101, 480, 300, 21, 30, 1843, 273, 17913, 3514...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 2327, 12, 2890, 16, 1501, 33, 7036, 16, 3824, 91, 33, 7036, 4672, 268, 273, 365, 18, 21335, 67, 5930, 309, 268, 18, 2972, 67, 4101, 480, 300, 21, 30, 1843, 273, 17913, 3514...
elif (self.infeed or self.insource):
elif (self.infeed or self.insource) and (not self.intextinput) and (not self.inimage):
def pop(self, element, stripWhitespace=1): if not self.elementstack: return if self.elementstack[-1][0] != element: return element, expectingText, pieces = self.elementstack.pop()
b46d7e4f5773873813bf0c2abf7f311d20f6ee9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10695/b46d7e4f5773873813bf0c2abf7f311d20f6ee9d/feedparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1843, 12, 2890, 16, 930, 16, 2569, 9431, 33, 21, 4672, 309, 486, 365, 18, 2956, 3772, 30, 327, 309, 365, 18, 2956, 3772, 18919, 21, 6362, 20, 65, 480, 930, 30, 327, 225, 930, 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, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1843, 12, 2890, 16, 930, 16, 2569, 9431, 33, 21, 4672, 309, 486, 365, 18, 2956, 3772, 30, 327, 309, 365, 18, 2956, 3772, 18919, 21, 6362, 20, 65, 480, 930, 30, 327, 225, 930, 16, 1...
First, it looks in the current context for the variable specified. This should be either a QuerySet or a list. 1. If it is a QuerySet, this ``AutoPaginateNode`` will emit a ``QuerySetPaginator`` and the current page object into the context names ``paginator`` and ``page_obj``, respectively. 2. If it is a list, this ``AutoPaginateNode`` will emit a simple ``Paginator`` and the current page object into the context names ``paginator`` and ``page_obj``, respectively.
First, it looks in the current context for the variable specified, and using that object, it emits a simple ``Paginator`` and the current page object into the context names ``paginator`` and ``page_obj``, respectively.
def do_autopaginate(parser, token): """ Splits the arguments to the autopaginate tag and formats them correctly. """ split = token.split_contents() if len(split) == 2: return AutoPaginateNode(split[1]) elif len(split) == 3: try: paginate_by = int(split[2]) except ValueError: raise template.TemplateSyntaxError(u'Got %s, but expected integer.' % split[2]) return AutoPaginateNode(split[1], paginate_by=paginate_by) elif len(split) == 4: try: paginate_by = int(split[2]) except ValueError: raise template.TemplateSyntaxError(u'Got %s, but expected integer.' % split[2]) try: orphans = int(split[3]) except ValueError: raise template.TemplateSyntaxError(u'Got %s, but expected integer.' % split[3]) return AutoPaginateNode(split[1], paginate_by=paginate_by, orphans=orphans) else: raise template.TemplateSyntaxError('%r tag takes one required argument and one optional argument' % split[0])
abb16624e50457a312b82ff0b1843b9319401350 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4362/abb16624e50457a312b82ff0b1843b9319401350/pagination_tags.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 5854, 556, 346, 3322, 12, 4288, 16, 1147, 4672, 3536, 5385, 87, 326, 1775, 358, 326, 2059, 556, 346, 3322, 1047, 471, 6449, 2182, 8783, 18, 3536, 1416, 273, 1147, 18, 4939, 67...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 5854, 556, 346, 3322, 12, 4288, 16, 1147, 4672, 3536, 5385, 87, 326, 1775, 358, 326, 2059, 556, 346, 3322, 1047, 471, 6449, 2182, 8783, 18, 3536, 1416, 273, 1147, 18, 4939, 67...
sys.stdout = self.file
def generate_child(self, child, dir): "Generate a single child. May force a few children to be built as we generate deps" self.generate_type = GEN_DEMAND_CHILD oldOut = sys.stdout
591c2b14a9015b2d16e9b82897aff58bce26b07b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/591c2b14a9015b2d16e9b82897aff58bce26b07b/genpy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 3624, 12, 2890, 16, 1151, 16, 1577, 4672, 315, 4625, 279, 2202, 1151, 18, 225, 16734, 2944, 279, 11315, 2325, 358, 506, 6650, 487, 732, 2103, 8740, 6, 365, 18, 7163, 67, 723,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2103, 67, 3624, 12, 2890, 16, 1151, 16, 1577, 4672, 315, 4625, 279, 2202, 1151, 18, 225, 16734, 2944, 279, 11315, 2325, 358, 506, 6650, 487, 732, 2103, 8740, 6, 365, 18, 7163, 67, 723,...
if idebug:
if game.idebug:
def attack(torps_ok): # bad guy attacks us # torps_ok == False forces use of phasers in an attack # game could be over at this point, check if game.alldone: return attempt = False; ihurt = False; hitmax=0.0; hittot=0.0; chgfac=1.0 where = "neither" if idebug: prout("=== ATTACK!") # Tholian gets to move before attacking if game.tholian: movetholian() # if you have just entered the RNZ, you'll get a warning if game.neutz: # The one chance not to be attacked game.neutz = False return # commanders get a chance to tac-move towards you if (((game.quadrant in game.state.kcmdr or game.state.kscmdr==game.quadrant) and not game.justin) or game.skill == SKILL_EMERITUS) and torps_ok: moveklings() # if no enemies remain after movement, we're done if len(game.enemies)==0 or (len(game.enemies)==1 and thing == game.quadrant and not thing.angry): return # set up partial hits if attack happens during shield status change pfac = 1.0/game.inshld if game.shldchg: chgfac = 0.25 + randreal(0.5) skip(1) # message verbosity control if game.skill <= SKILL_FAIR: where = "sector" for enemy in game.enemies: if enemy.power < 0: continue; # too weak to attack # compute hit strength and diminish shield power r = randreal() # Increase chance of photon torpedos if docked or enemy energy is low if game.condition == "docked": r *= 0.25 if enemy.power < 500: r *= 0.25; if enemy.type=='T' or (enemy.type=='?' and not thing.angry): continue # different enemies have different probabilities of throwing a torp usephasers = not torps_ok or \ (enemy.type == 'K' and r > 0.0005) or \ (enemy.type=='C' and r > 0.015) or \ (enemy.type=='R' and r > 0.3) or \ (enemy.type=='S' and r > 0.07) or \ (enemy.type=='?' and r > 0.05) if usephasers: # Enemy uses phasers if game.condition == "docked": continue; # Don't waste the effort! attempt = True; # Attempt to attack dustfac = randreal(0.8, 0.85) hit = enemy.power*math.pow(dustfac,enemy.kavgd) enemy.power *= 0.75 else: # Enemy uses photon torpedo # We should be able to make the bearing() method work here course = 1.90985*math.atan2(game.sector.j-enemy.location.j, enemy.location.i-game.sector.i) hit = 0 proutn(_("***TORPEDO INCOMING")) if not damaged(DSRSENS): proutn(_(" From ") + crmena(False, enemy.type, where, enemy.location)) attempt = True prout(" ") dispersion = (randreal()+randreal())*0.5 - 0.5 dispersion += 0.002*enemy.power*dispersion hit = torpedo(enemy.location, course, dispersion, number=1, nburst=1) if (game.state.remkl + len(game.state.kcmdr) + game.state.nscrem)==0: finish(FWON); # Klingons did themselves in! if game.state.galaxy[game.quadrant.i][game.quadrant.j].supernova or game.alldone: return # Supernova or finished if hit == None: continue # incoming phaser or torpedo, shields may dissipate it if game.shldup or game.shldchg or game.condition=="docked": # shields will take hits propor = pfac * game.shield if game.condition =="docked": propr *= 2.1 if propor < 0.1: propor = 0.1 hitsh = propor*chgfac*hit+1.0 absorb = 0.8*hitsh if absorb > game.shield: absorb = game.shield game.shield -= absorb hit -= hitsh # taking a hit blasts us out of a starbase dock if game.condition == "docked": dock(False) # but the shields may take care of it if propor > 0.1 and hit < 0.005*game.energy: continue # hit from this opponent got through shields, so take damage ihurt = True proutn(_("%d unit hit") % int(hit)) if (damaged(DSRSENS) and usephasers) or game.skill<=SKILL_FAIR: proutn(_(" on the ") + crmshp()) if not damaged(DSRSENS) and usephasers: prout(_(" from ") + crmena(False, enemy.type, where, enemy.location)) skip(1) # Decide if hit is critical if hit > hitmax: hitmax = hit hittot += hit fry(hit) game.energy -= hit if game.energy <= 0: # Returning home upon your shield, not with it... finish(FBATTLE) return if not attempt and game.condition == "docked": prout(_("***Enemies decide against attacking your ship.")) percent = 100.0*pfac*game.shield+0.5 if not ihurt: # Shields fully protect ship proutn(_("Enemy attack reduces shield strength to ")) else: # Emit message if starship suffered hit(s) skip(1) proutn(_("Energy left %2d shields ") % int(game.energy)) if game.shldup: proutn(_("up ")) elif not damaged(DSHIELD): proutn(_("down ")) else: proutn(_("damaged, ")) prout(_("%d%%, torpedoes left %d") % (percent, game.torps)) # Check if anyone was hurt if hitmax >= 200 or hittot >= 500: icas = randrange(int(hittot * 0.015)) if icas >= 2: skip(1) prout(_("Mc Coy- \"Sickbay to bridge. We suffered %d casualties") % icas) prout(_(" in that last attack.\"")) game.casual += icas game.state.crew -= icas # After attack, reset average distance to enemies for enemy in game.enemies: enemy.kavgd = enemy.kdist game.enemies.sort(lambda x, y: cmp(x.kdist, y.kdist)) return
eafdd35f1af1e4e93d3609a0adbe768b562907e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3176/eafdd35f1af1e4e93d3609a0adbe768b562907e0/sst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13843, 12, 13039, 1121, 67, 601, 4672, 468, 5570, 3058, 93, 28444, 584, 468, 8934, 1121, 67, 601, 422, 1083, 26376, 999, 434, 1844, 345, 414, 316, 392, 13843, 468, 7920, 3377, 506, 1879,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13843, 12, 13039, 1121, 67, 601, 4672, 468, 5570, 3058, 93, 28444, 584, 468, 8934, 1121, 67, 601, 422, 1083, 26376, 999, 434, 1844, 345, 414, 316, 392, 13843, 468, 7920, 3377, 506, 1879,...
"""
"""
def getType(self, parameter): """ Created: 13.04.2006, KP Description: Return the type of the parameter """ return types.IntType
6d7b572696d4ecdce2049b45a6e109836f3272c9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2877/6d7b572696d4ecdce2049b45a6e109836f3272c9/SegmentationFilters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3130, 12, 2890, 16, 1569, 4672, 3536, 12953, 30, 5958, 18, 3028, 18, 6976, 26, 16, 1475, 52, 6507, 30, 2000, 326, 618, 434, 326, 1569, 3536, 327, 1953, 18, 1702, 559, 282, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3130, 12, 2890, 16, 1569, 4672, 3536, 12953, 30, 5958, 18, 3028, 18, 6976, 26, 16, 1475, 52, 6507, 30, 2000, 326, 618, 434, 326, 1569, 3536, 327, 1953, 18, 1702, 559, 282, 2, -100, -...
self.historyDict = pickle.dump(self.historyDict, datfile)
pickle.dump(self.historyDict, datfile)
def save(self): """ Saves the .dat file to disk. """ datfile = open(self.datfilename, 'w') self.historyDict = pickle.dump(self.historyDict, datfile) datfile.close()
fceea1450b35cc49e90865014818cbddd954b448 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/fceea1450b35cc49e90865014818cbddd954b448/weblinkchecker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 4672, 3536, 348, 6606, 326, 263, 3404, 585, 358, 4234, 18, 3536, 1150, 768, 273, 1696, 12, 2890, 18, 3404, 3459, 16, 296, 91, 6134, 13379, 18, 8481, 12, 2890, 18, 8189,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 4672, 3536, 348, 6606, 326, 263, 3404, 585, 358, 4234, 18, 3536, 1150, 768, 273, 1696, 12, 2890, 18, 3404, 3459, 16, 296, 91, 6134, 13379, 18, 8481, 12, 2890, 18, 8189,...
yield STRING, current
yield _STRING, current
def _tokenize(description): current = '' ops = ':=' nextOps = {':': ':=', '=': ':'} description = iter(description) for n in description: if n in ops: yield STRING, current yield OP, n current = '' ops = nextOps[n] elif n=='\\': current += description.next() else: current += n yield STRING, current
c0d7568500315932e31b2c459362790b4f18bd5d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/c0d7568500315932e31b2c459362790b4f18bd5d/ports.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2316, 554, 12, 3384, 4672, 783, 273, 875, 6727, 273, 4290, 2218, 1024, 8132, 273, 13666, 2497, 30, 4290, 33, 2187, 5214, 30, 3921, 97, 2477, 273, 1400, 12, 3384, 13, 364, 290, 316...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2316, 554, 12, 3384, 4672, 783, 273, 875, 6727, 273, 4290, 2218, 1024, 8132, 273, 13666, 2497, 30, 4290, 33, 2187, 5214, 30, 3921, 97, 2477, 273, 1400, 12, 3384, 13, 364, 290, 316...
imd.groups.append(g)
imd.groups.add(g)
def merge_additional_groups(self, imd, groups): for group in groups: if group in self.categories and \ self.categories[group] in imd.categories: continue nb, ng, _ = self.groups.get(group, (list(), [group], dict())) for b in nb: if b not in imd.bundles: imd.bundles.append(b) for g in ng: if g not in imd.groups: if g in self.categories and \ self.categories[g] in imd.categories: continue imd.groups.append(g)
da539a752053757bec3d4740269300d8d2b2c74e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11867/da539a752053757bec3d4740269300d8d2b2c74e/Metadata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2691, 67, 13996, 67, 4650, 12, 2890, 16, 709, 72, 16, 3252, 4672, 364, 1041, 316, 3252, 30, 309, 1041, 316, 365, 18, 8995, 471, 521, 365, 18, 8995, 63, 1655, 65, 316, 709, 72, 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, 2691, 67, 13996, 67, 4650, 12, 2890, 16, 709, 72, 16, 3252, 4672, 364, 1041, 316, 3252, 30, 309, 1041, 316, 365, 18, 8995, 471, 521, 365, 18, 8995, 63, 1655, 65, 316, 709, 72, 18, ...
processorIdSequenceGenerator = self.jobSchedulerIter(self.priorityJobAllocationCursor)
processorIdSequenceGenerator = self.unbalancedJobSchedulerIter(self.priorityJobAllocationCursor)
def priorityJobAllocationLoop(self): try: self.priorityJobAllocationDatabaseConnection = psycopg2.connect(self.config.databaseDSN) self.priorityJobAllocationCursor = self.priorityJobAllocationDatabaseConnection.cursor() except: self.quit = True socorro.lib.util.reportExceptionAndAbort(logger) # can't continue without a database connection symLinkIndexPath = os.path.join(self.config.storageRoot, "index") try: try: while (True): self.quitCheck() priorityUuids = self.getPriorityUuids(self.priorityJobAllocationCursor) if priorityUuids: self.insertionLock.acquire() try: # assign jobs logger.debug("%s - beginning search for priority jobs", threading.currentThread().getName()) try: processorIdSequenceGenerator = self.jobSchedulerIter(self.priorityJobAllocationCursor) # check for uuids already in the queue for uuid in priorityUuids.keys(): self.quitCheck() self.priorityJobAllocationCursor.execute("select owner from jobs where uuid = %s", (uuid,)) try: prexistingJobOwner = self.priorityJobAllocationCursor.fetchall()[0][0] except IndexError: prexistingJobOwner = None if prexistingJobOwner: logger.info("%s - priority job %s was already in the queue, assigned to %d - raising its priority", threading.currentThread().getName(), uuid, prexistingJobOwner) try: self.priorityJobAllocationCursor.execute("insert into priority_jobs_%d (uuid) values ('%s')" % (prexistingJobOwner, uuid)) except psycopg2.ProgrammingError: logger.debug("%s - %s assigned to dead processor %d - wait for reassignment", threading.currentThread().getName(), prexistingJobOwner, uuid) # likely that the job is assigned to a dead processor # skip processing it this time around - by next time hopefully it will have been # re assigned to a live processor self.priorityJobAllocationDatabaseConnection.rollback() del priorityUuids[uuid] continue self.priorityJobAllocationCursor.execute("update jobs set priority = priority + 1 where uuid = %s", (uuid,)) self.priorityJobAllocationCursor.execute("delete from priorityJobs where uuid = %s", (uuid,)) self.priorityJobAllocationDatabaseConnection.commit() del priorityUuids[uuid] if priorityUuids: # only need to continue if we still have jobs to process # check for jobs in symlink directories processorIdSequenceGenerator = self.jobSchedulerIter(self.priorityJobAllocationCursor) for uuid in priorityUuids.keys(): logger.debug("%s - looking for %s", threading.currentThread().getName(), uuid) for currentDirectory in dircache.listdir(symLinkIndexPath): self.quitCheck() absoluteSymLinkPathname = os.path.join(self.config.storageRoot, "index", currentDirectory, "%s.symlink" % uuid) logger.debug("%s - as %s", threading.currentThread().getName(), absoluteSymLinkPathname) try: relativeTargetPathname = os.readlink(absoluteSymLinkPathname) absoluteTargetPathname = os.path.join(self.config.storageRoot, relativeTargetPathname[6:]) except OSError: logger.debug("%s - Not it...", threading.currentThread().getName()) continue logger.debug("%s - FOUND", threading.currentThread().getName()) logger.info("%s - priority queuing %s", threading.currentThread().getName(), absoluteTargetPathname) processorIdAssignedToThisJob = self.queueJob(self.priorityJobAllocationDatabaseConnection, self.priorityJobAllocationCursor, absoluteTargetPathname, absoluteSymLinkPathname, processorIdSequenceGenerator, 1) logger.info("%s - %s assigned to %d", threading.currentThread().getName(), uuid, processorIdAssignedToThisJob) if processorIdAssignedToThisJob: self.priorityJobAllocationCursor.execute("insert into priority_jobs_%d (uuid) values ('%s')" % (processorIdAssignedToThisJob, uuid)) self.priorityJobAllocationCursor.execute("delete from priorityJobs where uuid = %s", (uuid,)) self.priorityJobAllocationDatabaseConnection.commit() del priorityUuids[uuid] break if priorityUuids: # we've failed to find the uuids anywhere for uuid in priorityUuids: self.quitCheck() logger.error("%s - priority uuid %s was never found", threading.currentThread().getName(), uuid) self.priorityJobAllocationCursor.execute("delete from priorityJobs where uuid = %s", (uuid,)) self.priorityJobAllocationDatabaseConnection.commit() except KeyboardInterrupt: logger.debug("%s - inner detects quit", threading.currentThread().getName()) raise except: self.priorityJobAllocationDatabaseConnection.rollback() socorro.lib.util.reportExceptionAndContinue(logger) finally: logger.debug("%s - releasing lock", threading.currentThread().getName()) self.insertionLock.release() logger.debug("%s - sleeping", threading.currentThread().getName()) self.responsiveSleep(self.config.priorityLoopDelay) except (KeyboardInterrupt, SystemExit): logger.debug("%s - outer detects quit", threading.currentThread().getName()) self.priorityJobAllocationDatabaseConnection.rollback() self.quit = True finally: self.priorityJobAllocationDatabaseConnection.close() logger.debug("%s - priorityLoop done.", threading.currentThread().getName())
84034bc05eed964565729d3b46fd16cb3b76c236 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12383/84034bc05eed964565729d3b46fd16cb3b76c236/monitor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4394, 2278, 17353, 6452, 12, 2890, 4672, 775, 30, 365, 18, 8457, 2278, 17353, 4254, 1952, 273, 4250, 93, 22295, 75, 22, 18, 3612, 12, 2890, 18, 1425, 18, 6231, 3948, 50, 13, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4394, 2278, 17353, 6452, 12, 2890, 4672, 775, 30, 365, 18, 8457, 2278, 17353, 4254, 1952, 273, 4250, 93, 22295, 75, 22, 18, 3612, 12, 2890, 18, 1425, 18, 6231, 3948, 50, 13, 365, 18, ...
cn1 = len( cmpstr1 ) - 1 cn2 = len( cmpstr2 ) - 1
cn1 = len( cmpstr1 ) cn2 = len( cmpstr2 )
def __compare_node( self, node1, node2, callback ): """Compare two nodes."""
45baf7d2aaa614a5e0533f85af0f2b815f01c8ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13212/45baf7d2aaa614a5e0533f85af0f2b815f01c8ee/diff.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9877, 67, 2159, 12, 365, 16, 756, 21, 16, 756, 22, 16, 1348, 262, 30, 3536, 8583, 2795, 2199, 12123, 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, 1001, 9877, 67, 2159, 12, 365, 16, 756, 21, 16, 756, 22, 16, 1348, 262, 30, 3536, 8583, 2795, 2199, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
30).rendevous(*all)
600).rendevous(*all)
def execute(self, server_ip, client_ip, role, script='snapshot_script', args=''): server_tag = server_ip + '#netperf-server' client_tag = client_ip + '#netperf-client' all = [server_tag, client_tag] job = self.job if (role == 'server'): self.server_start() try: job.barrier(server_tag, 'start', 30).rendevous(*all) job.barrier(server_tag, 'stop', 3600).rendevous(*all) finally: self.server_stop() elif (role == 'client'): os.environ['NETPERF_CMD'] = self.client_path job.barrier(client_tag, 'start', 30).rendevous(*all) self.client(script, server_ip, args) job.barrier(client_tag, 'stop', 30).rendevous(*all) else: raise UnhandledError('invalid role specified')
cb3e941c74181e5f09860b38a37d8a70772bd94f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12268/cb3e941c74181e5f09860b38a37d8a70772bd94f/netperf2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 1438, 67, 625, 16, 1004, 67, 625, 16, 2478, 16, 2728, 2218, 11171, 67, 4263, 2187, 833, 2218, 11, 4672, 1438, 67, 2692, 273, 1438, 67, 625, 397, 2946, 2758, 19825, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1438, 67, 625, 16, 1004, 67, 625, 16, 2478, 16, 2728, 2218, 11171, 67, 4263, 2187, 833, 2218, 11, 4672, 1438, 67, 2692, 273, 1438, 67, 625, 397, 2946, 2758, 19825, ...
'--scriptFile=%s' % item ]
'--scriptFile=%s' % item, ]
def runScriptPerfTests(options, testlist, largeData=False, repeat=1, logger=log): """ Run script performance tests. >>> options = parseOptions() >>> checkOptions(options) >>> options.dryrun = True >>> options.verbose = True >>> runScriptPerfTests(options, ['foobar']) /.../release/RunChandler --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --catsPerfLog=test_profile/time.log --scriptFile=foobar --create foobar 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 False >>> runScriptPerfTests(options, ['foobar'], largeData=True) /.../release/RunChandler --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --catsPerfLog=test_profile/time.log --scriptFile=foobar --restore=test_profile/__repository__.001 foobar 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 False >>> options.profile = True >>> runScriptPerfTests(options, ['foobar.py']) /.../release/RunChandler --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --catsPerfLog=test_profile/time.log --scriptFile=foobar.py --catsProfile=test_profile/foobar.hotshot --create foobar.py 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 False """ failed = False l = len(options.chandlerHome) + 1 timeLog = os.path.join(options.profileDir, 'time.log') if repeat == 1: just = 20 elif repeat == 2: just = 13 else: just = 6 for item in testlist: #$CHANDLERBIN/release/$RUN_CHANDLER --create --catch=tests # --profileDir="$PC_DIR" # --catsPerfLog="$TIME_LOG" # --scriptFile="$TESTNAME" &> $TESTLOG if item.startswith(options.chandlerHome): item = item[l:] name = item[item.rfind('/') + 1:] cmd = [ options.runchandler['release'], '--catch=tests', '--profileDir=%s' % options.profileDir, '--parcelPath=%s' % options.parcelPath, '--catsPerfLog=%s' % timeLog, '--scriptFile=%s' % item ] if options.profile: cmd += ['--catsProfile=%s.hotshot' % os.path.join(options.profileDir, name[:-3])] if not largeData: cmd += ['--create'] else: cmd += ['--restore=%s' % os.path.join(options.profileDir, '__repository__.001')] if options.params: cmd += [ options.params ] if options.verbose: log(' '.join(cmd)) values = [] log(name.ljust(33), newline=' ') for _x in range(repeat): if not options.dryrun: if os.path.isfile(timeLog): os.remove(timeLog) if options.dryrun: result = 0 else: tempLogger = DelayedLogger() result = build_lib.runCommand(cmd, timeout=1800, logger=tempLogger) if result != 0: if options.tbox: if result == -9: log("***Error: A timeout error has happened for %s" % name) log("***Error: The process output will be dumped below but it may be incomplete") log("***Error: due to the process either crashing or being killed.") # Strip OSAF_QA lines because we don't want to include # results from failed runs for args, kw in tempLogger.delayed: if not args[0].startswith('OSAF_QA: '): log(*args, **kw) else: tempLogger.logAll() log('***Error exit code=%d, %s' % (result, name)) failed = True failedTests.append(item) if not options.noStop: break else: if options.dryrun: value = 0.00 else: if os.path.isfile(timeLog): value = float(open(timeLog).readline()[:-1]) else: log('\ntimeLog [%s] not found' % timeLog) failed = True failedTests.append(item) if not options.noStop: break log(('%02.2f' % value).rjust(just), newline=' ') if not options.dryrun: values.append((value, tempLogger)) else: values.append((value, None)) if options.dryrun: log('- + ' * 15) else: tempLogger('- + ' * 15) else: try: originalValues = values[:] values.sort() value = values[repeat/2] log(' | ', newline='') log(('%02.2f' % value[0]).rjust(6) , newline='') log(u' \u00B1 '.encode('utf8'), newline='') # Unicode PLUS-MINUS SIGN log(('%02.2f' % stddev([x for x, _y in values])).rjust(6)) if not options.dryrun: if options.tbox: for args, kw in value[1].delayed: logger(*args, **kw) else: for _n, tempLogger in originalValues: for args, kw in tempLogger.delayed: logger(*args, **kw) except IndexError: if not options.noStop: raise if failed and not options.noStop: break return failed
64e3ec7e167097dc0b4afb4eadc40bc6adec660f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/64e3ec7e167097dc0b4afb4eadc40bc6adec660f/rt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 3651, 22016, 14650, 12, 2116, 16, 1842, 1098, 16, 7876, 751, 33, 8381, 16, 7666, 33, 21, 16, 1194, 33, 1330, 4672, 3536, 1939, 2728, 9239, 7434, 18, 225, 4080, 702, 273, 1109, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 3651, 22016, 14650, 12, 2116, 16, 1842, 1098, 16, 7876, 751, 33, 8381, 16, 7666, 33, 21, 16, 1194, 33, 1330, 4672, 3536, 1939, 2728, 9239, 7434, 18, 225, 4080, 702, 273, 1109, 13...
logged_uids.append(user.id)
logged_uids.append(user.id)
def my_fct( cr, uid, *args, **args2): obj_ids= self.pool.get('ir.model').search(cr, uid,[('model','=',object_name)]) if not len(obj_ids): return fct_src(cr, uid, *args, **args2) object=self.pool.get('ir.model').browse(cr,uid,obj_ids)[0] rule_ids=self.search(cr, uid, [('object_id','=',obj_ids[0]),('state','=','subscribed')]) if not len(rule_ids): return fct_src(cr, uid, *args, **args2)
34f773bee1ea4557c6115748c8c76cbf03e38740 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/34f773bee1ea4557c6115748c8c76cbf03e38740/audittrail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3399, 67, 74, 299, 12, 4422, 16, 4555, 16, 380, 1968, 16, 2826, 1968, 22, 4672, 1081, 67, 2232, 33, 365, 18, 6011, 18, 588, 2668, 481, 18, 2284, 16063, 3072, 12, 3353, 16, 4555, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3399, 67, 74, 299, 12, 4422, 16, 4555, 16, 380, 1968, 16, 2826, 1968, 22, 4672, 1081, 67, 2232, 33, 365, 18, 6011, 18, 588, 2668, 481, 18, 2284, 16063, 3072, 12, 3353, 16, 4555, 16, ...
sage: eq.originial_curve()
sage: eq.original_curve()
def originial_curve(self): """ Returns the elliptic curve the Tate curve was constructed from.
3c44f918e2805740e54e716dc4120403c32ce611 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/3c44f918e2805740e54e716dc4120403c32ce611/ell_tate_curve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4026, 649, 67, 16683, 12, 2890, 4672, 3536, 2860, 326, 415, 549, 21507, 8882, 326, 399, 340, 8882, 1703, 15688, 628, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4026, 649, 67, 16683, 12, 2890, 4672, 3536, 2860, 326, 415, 549, 21507, 8882, 326, 399, 340, 8882, 1703, 15688, 628, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
for item in self.clientdata_original.getroot().iter():
dataroot = self.clientdata_original.getroot() if hasattr(dataroot, 'iter'): items = dataroot.iter() else: items = dataroot.getchildren() for item in items:
def write_back_clients(self): '''Write changes to client.xml back to disk''' try: datafile = open("%s/%s" % (self.data, 'clients.xml'), 'w') except IOError: self.logger.error("Failed to write clients.xml") raise MetadataRuntimeError fd = datafile.fileno() while self.locked(fd) == True: pass for item in self.clientdata_original.getroot().iter(): # no items have text data of any sort item.tail = None item.text = None datafile.write(lxml.etree.tostring(self.clientdata_original.getroot(), pretty_print=True)) fcntl.lockf(fd, fcntl.LOCK_UN) datafile.close()
cb21a4d2696891bb290b53980664d5a1f8d73fe0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11867/cb21a4d2696891bb290b53980664d5a1f8d73fe0/Metadata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 823, 67, 16931, 12, 2890, 4672, 9163, 3067, 3478, 358, 1004, 18, 2902, 1473, 358, 4234, 26418, 775, 30, 30682, 273, 1696, 27188, 87, 5258, 87, 6, 738, 261, 2890, 18, 892, 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, 1045, 67, 823, 67, 16931, 12, 2890, 4672, 9163, 3067, 3478, 358, 1004, 18, 2902, 1473, 358, 4234, 26418, 775, 30, 30682, 273, 1696, 27188, 87, 5258, 87, 6, 738, 261, 2890, 18, 892, 16,...
print 'Using %' % classname
print 'Using ' + classname
def __init__(self, nwannier, calc, file=None, nbands=None, fixedenergy=None, fixedstates=None, spin=0, initialwannier='random', seed=None, verbose=False): """ Required arguments:
5ba7fe0aefb90425c97b69a90bb8b3922a45c697 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1380/5ba7fe0aefb90425c97b69a90bb8b3922a45c697/wannier.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 14376, 1072, 2453, 16, 7029, 16, 585, 33, 7036, 16, 4264, 5708, 33, 7036, 16, 5499, 15358, 33, 7036, 16, 5499, 7992, 33, 7036, 16, 12490, 33, 20, 16, 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, 1001, 2738, 972, 12, 2890, 16, 14376, 1072, 2453, 16, 7029, 16, 585, 33, 7036, 16, 4264, 5708, 33, 7036, 16, 5499, 15358, 33, 7036, 16, 5499, 7992, 33, 7036, 16, 12490, 33, 20, 16, 2...
assert newpath == self.expected_path
assert newpath[:len(self.expected_path)] == self.expected_path
def test_get_library_path(self): import sys import os sys.path.append(self.goal_dir) try: import app_main app_main.os = os newpath = app_main.get_library_path('/tmp/pypy-c') # stdlib not found assert newpath == sys.path newpath = app_main.get_library_path(self.fake_exe) assert newpath == self.expected_path finally: sys.path.pop()
c147005056381c7f83c19f2f59efe05dcd2b297f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/c147005056381c7f83c19f2f59efe05dcd2b297f/test_app_main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 588, 67, 12083, 67, 803, 12, 2890, 4672, 1930, 2589, 1930, 1140, 2589, 18, 803, 18, 6923, 12, 2890, 18, 27354, 67, 1214, 13, 775, 30, 1930, 595, 67, 5254, 595, 67, 5254, 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, 1842, 67, 588, 67, 12083, 67, 803, 12, 2890, 4672, 1930, 2589, 1930, 1140, 2589, 18, 803, 18, 6923, 12, 2890, 18, 27354, 67, 1214, 13, 775, 30, 1930, 595, 67, 5254, 595, 67, 5254, 18...
reader = conn.get_reader()
reader = conn.get_fileobj()
def clean_up(self, conn, urlobj, exception=None): """ Perform clean up after any exception """ reader = conn.get_reader() if reader: reader.stop() if exception==None: print '\n\nDownload aborted by user interrupt.'
a00af9c05e7d46c7f69e3f45b5ce929d53a9ce4d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4845/a00af9c05e7d46c7f69e3f45b5ce929d53a9ce4d/hget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 67, 416, 12, 2890, 16, 1487, 16, 8896, 383, 441, 16, 1520, 33, 7036, 4672, 3536, 11217, 2721, 731, 1839, 1281, 1520, 3536, 225, 2949, 273, 1487, 18, 588, 67, 768, 2603, 1435, 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, 2721, 67, 416, 12, 2890, 16, 1487, 16, 8896, 383, 441, 16, 1520, 33, 7036, 4672, 3536, 11217, 2721, 731, 1839, 1281, 1520, 3536, 225, 2949, 273, 1487, 18, 588, 67, 768, 2603, 1435, 309...
if not miromovieflag: if not isValidPosixFilename(title) and program['seriesid'] != u'' and not self.config['simulation']: abs_results = self.rtnAbsolutePath(results, graphicsDirectories[key]) (dirName, fileName) = os.path.split(abs_results) (fileBaseName, fileExtension) = os.path.splitext(fileName) newfilename = u"%s/%s%s" % (dirName, program['seriesid'], fileExtension) if not os.path.isfile(newfilename): os.rename(abs_results, newfilename) results = self.rtnRelativePath(newfilename, graphicsDirectories[key])
def _downloadScheduledRecordedGraphics(self): '''Get Scheduled and Recorded programs and Miro vidoes get their graphics if not already downloaded return (nothing is returned) ''' global localhostname
a2f974416e8001f45614f0ab9552374085d1abd1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/a2f974416e8001f45614f0ab9552374085d1abd1/jamu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7813, 10660, 426, 3850, 785, 17558, 12, 2890, 4672, 9163, 967, 17286, 471, 868, 3850, 785, 25038, 471, 490, 11373, 18339, 83, 281, 336, 3675, 17313, 309, 486, 1818, 13549, 327, 261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7813, 10660, 426, 3850, 785, 17558, 12, 2890, 4672, 9163, 967, 17286, 471, 868, 3850, 785, 25038, 471, 490, 11373, 18339, 83, 281, 336, 3675, 17313, 309, 486, 1818, 13549, 327, 261, ...
self.br.submit()
control = self.br.find_control("chunksz",type="text") control.value = "150" for arg in kargs: if arg == "approval_status": control = self.br.find_control("resolution_id",type="select") for item in control.items: if item.attrs['label'] == kargs[arg].strip(): control.value = [item.attrs['value']] elif arg == "task_status": control = self.br.find_control("status_id",type="select") for item in control.items: if item.attrs['label'] == kargs[arg].strip(): control.value = [item.attrs['value']] response = self.br.submit() response.read()
def selectQueryForm(self): if self.isLoggedIn: self.br.select_form(name="bug_form")
d5636626499553d56bf0e7421dd1138f7ae0b198 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8887/d5636626499553d56bf0e7421dd1138f7ae0b198/RequestQuery.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 1138, 1204, 12, 2890, 4672, 309, 365, 18, 291, 29327, 30, 365, 18, 2848, 18, 4025, 67, 687, 12, 529, 1546, 925, 67, 687, 7923, 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, 2027, 1138, 1204, 12, 2890, 4672, 309, 365, 18, 291, 29327, 30, 365, 18, 2848, 18, 4025, 67, 687, 12, 529, 1546, 925, 67, 687, 7923, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
d_data = self.data.select([d_variable, self.data.domain.classVar]) tmphdata = orange.DomainContingency(d_data)[0] dc = orange.DomainContingency(self.data) g = orange.ConditionalProbabilityEstimatorConstructor_loess(dc[self.attributeName], nPoints=200)
tmphdata = orange.ContingencyAttrClass(d_variable, self.data) try: g = orange.ConditionalProbabilityEstimatorConstructor_loess(self.dc[self.attributeName], nPoints=200) self.probGraphValues = [(x, ps, [(v>=0 and math.sqrt(v)*1.96 or 0.0) for v in ps.variances]) for (x, ps) in g.probabilities.items()] except: self.probGraphValues = []
def calcHistogramAndProbGraph(self): "Calculates the histogram." if self.data == None: return if self.pureHistogram: self.calcPureHistogram() return if self.variableContinuous: "Continuous variable, break data into self.NumberOfBars subintervals" "use orange.EquiDistDiscretization(numberOfIntervals)" equiDist = orange.EquiDistDiscretization(numberOfIntervals = self.numberOfBars) d_variable = equiDist(self.attributeName, self.data) d_data = self.data.select([d_variable, self.data.domain.classVar]) tmphdata = orange.DomainContingency(d_data)[0] dc = orange.DomainContingency(self.data) #!!! g = orange.ConditionalProbabilityEstimatorConstructor_loess(dc[self.attributeName], nPoints=200) #!!! # print [ps.variances for (x, ps) in g.probabilities.items()] self.probGraphValues = [(x, ps, [(v>=0 and math.sqrt(v)*1.96 or 0.0) for v in ps.variances]) for (x, ps) in g.probabilities.items()] # calculate the weighted CI=math.sqrt(prob*(1-prob)/(0.0+self.sums[curcol])), # where self.sums[curcol] = g.probabilities.items()[example][1].cases
57c9ec9c866855d29deb615f381096da9c71d809 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/57c9ec9c866855d29deb615f381096da9c71d809/OWDistributions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 12874, 1876, 9152, 4137, 12, 2890, 4672, 315, 10587, 326, 8892, 1199, 309, 365, 18, 892, 422, 599, 30, 327, 309, 365, 18, 84, 594, 12874, 30, 365, 18, 12448, 13645, 12874, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 12874, 1876, 9152, 4137, 12, 2890, 4672, 315, 10587, 326, 8892, 1199, 309, 365, 18, 892, 422, 599, 30, 327, 309, 365, 18, 84, 594, 12874, 30, 365, 18, 12448, 13645, 12874, 1435, ...
list the read positions of annotated attr with attrname of class obj,
list the read positions of annotated attr with attrname of class or classdef obj,
def do_readpos(self, arg): """readpos obj attrname [match expr] [as var]
3ac5bb1ed56b13e6310f726517f709ac5b3e49d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/3ac5bb1ed56b13e6310f726517f709ac5b3e49d6/pdbplus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 896, 917, 12, 2890, 16, 1501, 4672, 3536, 896, 917, 1081, 1604, 529, 306, 1916, 3065, 65, 306, 345, 569, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 896, 917, 12, 2890, 16, 1501, 4672, 3536, 896, 917, 1081, 1604, 529, 306, 1916, 3065, 65, 306, 345, 569, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
for prefix, timespan in settings.GRAPH_TIMESPANS: yield { 'prefix' : prefix, 'timespan' : timespan }
for prefix, _ in settings.GRAPH_TIMESPANS: yield prefix
def get_timespans(self): """ Returns a list of graph image filenames for different time periods. """ for prefix, timespan in settings.GRAPH_TIMESPANS: yield { 'prefix' : prefix, 'timespan' : timespan }
5ea1122bc59efc2a1a0a46823c7af73ccaf90f78 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11345/5ea1122bc59efc2a1a0a46823c7af73ccaf90f78/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8293, 84, 634, 12, 2890, 4672, 3536, 2860, 279, 666, 434, 2667, 1316, 9066, 364, 3775, 813, 12777, 18, 3536, 364, 1633, 16, 4124, 7355, 316, 1947, 18, 24372, 67, 4684, 3118, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8293, 84, 634, 12, 2890, 4672, 3536, 2860, 279, 666, 434, 2667, 1316, 9066, 364, 3775, 813, 12777, 18, 3536, 364, 1633, 16, 4124, 7355, 316, 1947, 18, 24372, 67, 4684, 3118, 1...
out_record_in_format = call_bibformat(recID, format)
out_record_in_format = call_bibformat(recID, format, ln, search_pattern=search_pattern, uid=uid)
def print_record(recID, format='hb', ot='', ln=cdslang, decompress=zlib.decompress): "Prints record 'recID' formatted accoding to 'format'." _ = gettext_set_language(ln) out = "" # sanity check: record_exist_p = record_exists(recID) if record_exist_p == 0: # doesn't exist return out # print record opening tags, if needed: if format == "marcxml" or format == "oai_dc": out += " <record>\n" out += " <header>\n" for id in get_fieldvalues(recID,cfg_oai_id_field): out += " <identifier>%s</identifier>\n" % id out += " <datestamp>%s</datestamp>\n" % get_modification_date(recID) out += " </header>\n" out += " <metadata>\n" if format.startswith("xm") or format == "marcxml": # look for detailed format existence: query = "SELECT value FROM bibfmt WHERE id_bibrec='%s' AND format='%s'" % (recID, format) res = run_sql(query, None, 1) if res and record_exist_p==1: # record 'recID' is formatted in 'format', so print it out += "%s" % decompress(res[0][0]) else: # record 'recID' is not formatted in 'format' -- they are not in "bibfmt" table; so fetch all the data from "bibXXx" tables: if format == "marcxml": out += """ <record xmlns="http://www.loc.gov/MARC21/slim">\n""" out += " <controlfield tag=\"001\">%d</controlfield>\n" % int(recID) elif format.startswith("xm"): out += """ <record>\n""" out += " <controlfield tag=\"001\">%d</controlfield>\n" % int(recID) if record_exist_p == -1: # deleted record, so display only OAI ID and 980: oai_ids = get_fieldvalues(recID, cfg_oaiidtag) if oai_ids: out += "<datafield tag=\"%s\" ind1=\"%s\" ind2=\"%s\"><subfield code=\"%s\">%s</subfield></datafield>\n" % \ (cfg_oaiidtag[0:3], cfg_oaiidtag[3:4], cfg_oaiidtag[4:5], cfg_oaiidtag[5:6], oai_ids[0]) out += "<datafield tag=\"980\" ind1=\"\" ind2=\"\"><subfield code=\"c\">DELETED</subfield></datafield>\n" else: for digit1 in range(0,10): for digit2 in range(0,10): bx = "bib%d%dx" % (digit1, digit2) bibx = "bibrec_bib%d%dx" % (digit1, digit2) query = "SELECT b.tag,b.value,bb.field_number FROM %s AS b, %s AS bb "\ "WHERE bb.id_bibrec='%s' AND b.id=bb.id_bibxxx AND b.tag LIKE '%s%%' "\ "ORDER BY bb.field_number, b.tag ASC" % (bx, bibx, recID, str(digit1)+str(digit2)) res = run_sql(query) field_number_old = -999 field_old = "" for row in res: field, value, field_number = row[0], row[1], row[2] ind1, ind2 = field[3], field[4] if ind1 == "_": ind1 = "" if ind2 == "_": ind2 = "" # print field tag if field_number != field_number_old or field[:-1] != field_old[:-1]: if format.startswith("xm") or format == "marcxml": fieldid = encode_for_xml(field[0:3]) if field_number_old != -999: out += """ </datafield>\n""" out += """ <datafield tag="%s" ind1="%s" ind2="%s">\n""" % \ (encode_for_xml(field[0:3]), encode_for_xml(ind1), encode_for_xml(ind2)) field_number_old = field_number field_old = field # print subfield value if format.startswith("xm") or format == "marcxml": value = encode_for_xml(value) out += """ <subfield code="%s">%s</subfield>\n""" % (encode_for_xml(field[-1:]), value) # all fields/subfields printed in this run, so close the tag: if (format.startswith("xm") or format == "marcxml") and field_number_old != -999: out += """ </datafield>\n""" # we are at the end of printing the record: if format.startswith("xm") or format == "marcxml": out += " </record>\n" elif format == "xd" or format == "oai_dc": # XML Dublin Core format, possibly OAI -- select only some bibXXx fields: out += """ <dc xmlns="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/elements/1.1/ http://www.openarchives.org/OAI/1.1/dc.xsd">\n""" if record_exist_p == -1: out += "" else: for f in get_fieldvalues(recID, "041__a"): out += " <language>%s</language>\n" % f for f in get_fieldvalues(recID, "100__a"): out += " <creator>%s</creator>\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "700__a"): out += " <creator>%s</creator>\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "245__a"): out += " <title>%s</title>\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "65017a"): out += " <subject>%s</subject>\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "8564_u"): out += " <identifier>%s</identifier>\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "520__a"): out += " <description>%s</description>\n" % encode_for_xml(f) out += " <date>%s</date>\n" % get_creation_date(recID) out += " </dc>\n" elif str(format[0:3]).isdigit(): # user has asked to print some fields only if format == "001": out += "<!--%s-begin-->%s<!--%s-end-->\n" % (format, recID, format) else: vals = get_fieldvalues(recID, format) for val in vals: out += "<!--%s-begin-->%s<!--%s-end-->\n" % (format, val, format) elif format.startswith('t'): ## user directly asked for some tags to be displayed only if record_exist_p == -1: out += get_fieldvalues_alephseq_like(recID, "001,%s,980" % cfg_oaiidtag) else: out += get_fieldvalues_alephseq_like(recID, ot) elif format == "hm": if record_exist_p == -1: out += "<pre>" + cgi.escape(get_fieldvalues_alephseq_like(recID, "001,%s,980" % cfg_oaiidtag)) + "</pre>" else: out += "<pre>" + cgi.escape(get_fieldvalues_alephseq_like(recID, ot)) + "</pre>" elif format.startswith("h") and ot: ## user directly asked for some tags to be displayed only if record_exist_p == -1: out += "<pre>" + get_fieldvalues_alephseq_like(recID, "001,%s,980" % cfg_oaiidtag) + "</pre>" else: out += "<pre>" + get_fieldvalues_alephseq_like(recID, ot) + "</pre>" elif format == "hd": # HTML detailed format if record_exist_p == -1: out += _("The record has been deleted.") else: # look for detailed format existence: query = "SELECT value FROM bibfmt WHERE id_bibrec='%s' AND format='%s'" % (recID, format) res = run_sql(query, None, 1) if res: # record 'recID' is formatted in 'format', so print it out += "%s" % decompress(res[0][0]) else: # record 'recID' is not formatted in 'format', so try to call BibFormat on the fly or use default format: out_record_in_format = call_bibformat(recID, format) if out_record_in_format: out += out_record_in_format else: out += websearch_templates.tmpl_print_record_detailed( ln = ln, recID = recID, weburl = weburl, ) elif format.startswith("hb_") or format.startswith("hd_"): # underscore means that HTML brief/detailed formats should be called on-the-fly; suitable for testing formats if record_exist_p == -1: out += _("The record has been deleted.") else: out += call_bibformat(recID, format) elif format.startswith("hx"): # BibTeX format, called on the fly: if record_exist_p == -1: out += _("The record has been deleted.") else: out += call_bibformat(recID, format) elif format.startswith("hs"): # for citation/download similarity navigation links: if record_exist_p == -1: out += _("The record has been deleted.") else: out += '<a href="%s">' % websearch_templates.build_search_url(recid=recID, ln=ln) # firstly, title: titles = get_fieldvalues(recID, "245__a") if titles: for title in titles: out += "<strong>%s</strong>" % title else: # usual title not found, try conference title: titles = get_fieldvalues(recID, "111__a") if titles: for title in titles: out += "<strong>%s</strong>" % title else: # just print record ID: out += "<strong>%s %d</strong>" % (get_field_i18nname("record ID", ln), recID) out += "</a>" # secondly, authors: authors = get_fieldvalues(recID, "100__a") + get_fieldvalues(recID, "700__a") if authors: out += " - %s" % authors[0] if len(authors) > 1: out += " <em>et al</em>" # thirdly publication info: publinfos = get_fieldvalues(recID, "773__s") if not publinfos: publinfos = get_fieldvalues(recID, "909C4s") if not publinfos: publinfos = get_fieldvalues(recID, "037__a") if not publinfos: publinfos = get_fieldvalues(recID, "088__a") if publinfos: out += " - %s" % publinfos[0] else: # fourthly publication year (if not publication info): years = get_fieldvalues(recID, "773__y") if not years: years = get_fieldvalues(recID, "909C4y") if not years: years = get_fieldvalues(recID, "260__c") if years: out += " (%s)" % years[0] else: # HTML brief format by default if record_exist_p == -1: out += _("The record has been deleted.") else: query = "SELECT value FROM bibfmt WHERE id_bibrec='%s' AND format='%s'" % (recID, format) res = run_sql(query) if res: # record 'recID' is formatted in 'format', so print it out += "%s" % decompress(res[0][0]) else: # record 'recID' is not formatted in 'format', so try to call BibFormat on the fly: or use default format: if cfg_call_bibformat: out_record_in_format = call_bibformat(recID, format) if out_record_in_format: out += out_record_in_format else: out += websearch_templates.tmpl_print_record_brief( ln = ln, recID = recID, weburl = weburl, ) else: out += websearch_templates.tmpl_print_record_brief( ln = ln, recID = recID, weburl = weburl, ) # at the end of HTML brief mode, print the "Detailed record" functionality: if format == 'hp' or format.startswith("hb_") or format.startswith("hd_"): pass # do nothing for portfolio and on-the-fly formats else: out += websearch_templates.tmpl_print_record_brief_links( ln = ln, recID = recID, weburl = weburl, ) # print record closing tags, if needed: if format == "marcxml" or format == "oai_dc": out += " </metadata>\n" out += " </record>\n" return out
cedddddc8cebbac6e7a9977942fa7192ccf7a919 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2139/cedddddc8cebbac6e7a9977942fa7192ccf7a919/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 3366, 12, 3927, 734, 16, 740, 2218, 76, 70, 2187, 15835, 2218, 2187, 7211, 33, 4315, 2069, 539, 16, 16824, 33, 94, 2941, 18, 323, 14706, 4672, 315, 15402, 1409, 296, 3927, 73...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 3366, 12, 3927, 734, 16, 740, 2218, 76, 70, 2187, 15835, 2218, 2187, 7211, 33, 4315, 2069, 539, 16, 16824, 33, 94, 2941, 18, 323, 14706, 4672, 315, 15402, 1409, 296, 3927, 73...
self.possibilityNumSpinBox = QtGui.QSpinBox() self.possibilityNumSpinBox.setRange(0, 0) self.numPossibilities = QtGui.QLabel('of ?')
self.atomicPossibilityNumSpinBox = QtGui.QSpinBox() self.atomicPossibilityNumSpinBox.setRange(0, 0) self.atomicNumPossibilities = QtGui.QLabel('of ?')
def setupAtomicTab(self): #These go in the atomic tab self.possibilityNumSpinBox = QtGui.QSpinBox() self.possibilityNumSpinBox.setRange(0, 0) self.numPossibilities = QtGui.QLabel('of ?') self.atomicForwardRadioButton = QtGui.QRadioButton('Forward') self.atomicForwardRadioButton.setChecked(True) self.atomicBackwardRadioButton = QtGui.QRadioButton('Backward') self.atomicResNames = { -2:QtGui.QLabel('?'), -1:QtGui.QLabel('?'), 0:QtGui.QLabel('?'), 1:QtGui.QLabel('?'), 2:QtGui.QLabel('?') } self.atomicResNumbers = { -2:QtGui.QLabel('#?'), -1:QtGui.QLabel('#?'), 0:QtGui.QLabel('#?'), 1:QtGui.QLabel('#?'), 2:QtGui.QLabel('#?') } for i in self.atomicResNames.keys(): self.atomicResNames[i].setStyleSheet("QLabel {font-size: 40pt}")#.setFont(resNameFont) self.atomicResNumbers[i].setAlignment(QtCore.Qt.AlignHCenter) self.atomicResNumbers[i].setStyleSheet("QLabel {font-size: 12pt}") #.setFont(resIndexFont) self.atomicResNumbers[0].setStyleSheet("QLabel {color: white; background-color:black; font-size: 12pt}") #This uses syntax similar to Cascading Style Sheets (CSS) self.atomicResNames[0].setStyleSheet("QLabel {color: white; background-color:black; font-size: 40pt}") self.atomicResNumbers[1].setStyleSheet("QLabel {color: green; font-size: 12pt}") #This uses syntax similar to Cascading Style Sheets (CSS) self.atomicResNames[1].setStyleSheet("QLabel {color: green; font-size: 40pt}") self.back1resButton = QtGui.QPushButton('<-') self.forward1resButton = QtGui.QPushButton('->') atomicLayout = QtGui.QVBoxLayout() atomicPossibilityLayout = QtGui.QHBoxLayout() atomicPossibilityLayout.setAlignment(QtCore.Qt.AlignHCenter) atomicPossibilityLayout.addWidget(self.possibilityNumSpinBox) atomicPossibilityLayout.addWidget(self.numPossibilities) atomicForwardBackwardLayout = QtGui.QVBoxLayout() atomicForwardBackwardLayout.addWidget(self.atomicForwardRadioButton) atomicForwardBackwardLayout.addWidget(self.atomicBackwardRadioButton) atomicPossibilityLayout.addLayout(atomicForwardBackwardLayout) atomicLayout.addLayout(atomicPossibilityLayout) atomic3ResLayout = QtGui.QHBoxLayout() atomic3ResSublayouts = {-2:QtGui.QVBoxLayout(), -1:QtGui.QVBoxLayout(), 0:QtGui.QVBoxLayout(), 1:QtGui.QVBoxLayout(), 2:QtGui.QVBoxLayout() }
e8ef4efb1ee70bddc3bc00074e7599d9adb9bfb9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4399/e8ef4efb1ee70bddc3bc00074e7599d9adb9bfb9/structure_editor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 23102, 5661, 12, 2890, 4672, 468, 29690, 1960, 316, 326, 7960, 3246, 365, 18, 27718, 1616, 17349, 2578, 3389, 267, 3514, 273, 23425, 18, 53, 3389, 267, 3514, 1435, 365, 18, 27718, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 23102, 5661, 12, 2890, 4672, 468, 29690, 1960, 316, 326, 7960, 3246, 365, 18, 27718, 1616, 17349, 2578, 3389, 267, 3514, 273, 23425, 18, 53, 3389, 267, 3514, 1435, 365, 18, 27718, ...
def http_error_302(self, url, fp, errcode, errmsg, headers, data=None):
def http_error_302(self, url, fp, errcode, errmsg, headers, data=None):
def http_error_302(self, url, fp, errcode, errmsg, headers, data=None): """Error 302 -- relocated (temporarily).""" # XXX The server can force infinite recursion here! if headers.has_key('location'): newurl = headers['location'] elif headers.has_key('uri'): newurl = headers['uri'] else: return void = fp.read() fp.close() # In case the server sent a relative URL, join with original: newurl = basejoin("http:" + url, newurl) if data is None: return self.open(newurl) else: return self.open(newurl, data)
70e89305cf7cc2bdb9acab85803dfa4b07ed1b45 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/70e89305cf7cc2bdb9acab85803dfa4b07ed1b45/urllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1062, 67, 1636, 67, 23, 3103, 12, 2890, 16, 880, 16, 4253, 16, 393, 710, 16, 17460, 16, 1607, 16, 501, 33, 7036, 4672, 3536, 668, 22072, 1493, 283, 1829, 690, 261, 874, 3831, 10243, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1062, 67, 1636, 67, 23, 3103, 12, 2890, 16, 880, 16, 4253, 16, 393, 710, 16, 17460, 16, 1607, 16, 501, 33, 7036, 4672, 3536, 668, 22072, 1493, 283, 1829, 690, 261, 874, 3831, 10243, ...
PRIORITY_SAME_TYPE = 2 PRIORITY_PARENT_TYPE = 1
PRIORITY_SAME_TYPE = 3 PRIORITY_PARENT_TYPE = 2 PRIORITY_CHANGE_TYPE = 1
def __init__(w_self, space): w_self.space = space # XXX not sure this is ever used any more
90913ae74ef2bffcad238d59a59dacd478e3a2de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/90913ae74ef2bffcad238d59a59dacd478e3a2de/objspace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 91, 67, 2890, 16, 3476, 4672, 341, 67, 2890, 18, 2981, 273, 3476, 377, 468, 11329, 486, 3071, 333, 353, 14103, 1399, 1281, 1898, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 91, 67, 2890, 16, 3476, 4672, 341, 67, 2890, 18, 2981, 273, 3476, 377, 468, 11329, 486, 3071, 333, 353, 14103, 1399, 1281, 1898, 2, -100, -100, -100, -100, -100, -...
result = {'gain': +1.00000e+00,
result = {'gain':+1.00000e+00,
def test_getPAZFromXSEED(self): """ Get PAZ from XSEED file, testcase for #146 """ filename = os.path.join(self.path, 'dataless.seed.BW_FURT') sp1 = Parser(filename) sp2 = Parser(sp1.getXSEED()) paz = sp2.getPAZ('EHE') result = {'gain': +1.00000e+00, 'zeros': [0j, 0j, 0j], 'poles': [(-4.44400e+00 + 4.44400e+00j), (-4.44400e+00 - 4.44400e+00j), (-1.08300e+00 + 0.00000e+00j)], 'sensitivity': +6.71140E+08, 'seismometer_gain': 4.00000E+02, 'digitizer_gain': 1677850.0} self.assertEqual(sorted(paz.items()), sorted(result.items()))
9a5481c2f977c5482014791eb4f8d267e241bd9a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10470/9a5481c2f977c5482014791eb4f8d267e241bd9a/test_parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 588, 4066, 62, 1265, 60, 1090, 2056, 12, 2890, 4672, 3536, 968, 15662, 62, 628, 1139, 1090, 2056, 585, 16, 1842, 3593, 364, 468, 27879, 3536, 1544, 273, 1140, 18, 803, 18, 57...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 588, 4066, 62, 1265, 60, 1090, 2056, 12, 2890, 4672, 3536, 968, 15662, 62, 628, 1139, 1090, 2056, 585, 16, 1842, 3593, 364, 468, 27879, 3536, 1544, 273, 1140, 18, 803, 18, 57...
if self.optimizationType == 0: totalPossibilities = OWVisFuncts.combinationsCount(self.attributeCount, len(evaluatedAttrs))
if self.optimizationType == 0: totalPossibilities = orngVisFuncts.combinationsCount(self.attributeCount, len(evaluatedAttrs))
def evaluateProjections(self): if not self.data or not self.classVals: return
4efd233be228eb9a1c05d22bfdf2e5818ec8861a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/4efd233be228eb9a1c05d22bfdf2e5818ec8861a/orngMosaic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5956, 14789, 87, 12, 2890, 4672, 309, 486, 365, 18, 892, 578, 486, 365, 18, 1106, 13169, 30, 327, 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, 5956, 14789, 87, 12, 2890, 4672, 309, 486, 365, 18, 892, 578, 486, 365, 18, 1106, 13169, 30, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
this_role = self._roles_map[pseudoperm]
these_roles = self._roles_map[pseudoperm]
def create_page(self, page, text='', title='', log=None, page_type='structuredtext'): """Create a new page.""" if hasattr(aq_base(self._my_folder()), page): raise ValueError, ("Document with name '%s' already exists.\n" "(Perhaps it was created while you were " "editing.)" % page) ob = self.__class__(source_string='', __name__=page) initPageMetadata(ob) ob.page_type = page_type ob.title = str(title) ob.parents = [self.getId()] folder = self._my_folder() id = folder._setObject(page,ob) ob = getattr(folder, id) # 2.2-specific: the new page object is owned by the current # authenticated user, if any; not desirable for executable content. # Remove any such ownership so that the page will acquire it's # owner from the parent folder. ob._deleteOwnershipAfterAdd()
2262b1426eb2bef7e8d92c63a8c506f11ee616d3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1843/2262b1426eb2bef7e8d92c63a8c506f11ee616d3/CMFWikiPage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2433, 12, 2890, 16, 1363, 16, 977, 2218, 2187, 2077, 2218, 2187, 613, 33, 7036, 16, 1363, 67, 723, 2218, 17233, 955, 11, 4672, 3536, 1684, 279, 394, 1363, 12123, 309, 3859, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 2433, 12, 2890, 16, 1363, 16, 977, 2218, 2187, 2077, 2218, 2187, 613, 33, 7036, 16, 1363, 67, 723, 2218, 17233, 955, 11, 4672, 3536, 1684, 279, 394, 1363, 12123, 309, 3859, 12...
"""
r"""
def __init__(self, succ, generators): """ TESTS::
313d220b6fdafe559d2ec1a83c493f5f01a31167 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/313d220b6fdafe559d2ec1a83c493f5f01a31167/backtrack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 21043, 16, 13327, 4672, 436, 8395, 22130, 55, 2866, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 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, 2738, 972, 12, 2890, 16, 21043, 16, 13327, 4672, 436, 8395, 22130, 55, 2866, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
trad = res and res[0] or ''
trad = res and res[0] or u''
def _get_source(self, cr, uid, name, tt, lang, source=None): if not lang: return '' if source: #if isinstance(source, unicode): # source = source.encode('utf8') cr.execute('select value ' \ 'from ir_translation ' \ 'where lang=%s ' \ 'and type=%s ' \ 'and name=%s ' \ 'and src=%s', (lang or '', tt, tools.ustr(name), source)) else: cr.execute('select value ' \ 'from ir_translation ' \ 'where lang=%s ' \ 'and type=%s ' \ 'and name=%s', (lang or '', tt, tools.ustr(name))) res = cr.fetchone() trad = res and res[0] or '' if source and not trad: return source return trad
d247901dcc8482d7f02af82eac34e30891132c96 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/d247901dcc8482d7f02af82eac34e30891132c96/ir_translation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 3168, 12, 2890, 16, 4422, 16, 4555, 16, 508, 16, 3574, 16, 3303, 16, 1084, 33, 7036, 4672, 309, 486, 3303, 30, 327, 875, 309, 1084, 30, 468, 430, 1549, 12, 3168, 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, 588, 67, 3168, 12, 2890, 16, 4422, 16, 4555, 16, 508, 16, 3574, 16, 3303, 16, 1084, 33, 7036, 4672, 309, 486, 3303, 30, 327, 875, 309, 1084, 30, 468, 430, 1549, 12, 3168, 16, ...
self.finish1.wait()
self.finish2.wait()
def test_threading(self): #Test the "threading isolation" of a Context.
e1fdabfc68132ddfc3c779f9bfa9bed62bed5435 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/e1fdabfc68132ddfc3c779f9bfa9bed62bed5435/test_decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5930, 310, 12, 2890, 4672, 468, 4709, 326, 315, 5930, 310, 25155, 6, 434, 279, 1772, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5930, 310, 12, 2890, 4672, 468, 4709, 326, 315, 5930, 310, 25155, 6, 434, 279, 1772, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
update_timeout = setTimeout('check_for_cell_update()', cell_output_delta);
var time_left = getTime() - update_time - cell_output_delta; if(time_left > 0) { update_timeout = setTimeout('check_for_cell_update()', time_left); } else { check_for_cell_update(); }
def javascript(): s = r"""
42635b1968deb6bac2453b16e15f282a855e4fb8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/42635b1968deb6bac2453b16e15f282a855e4fb8/js.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11341, 13332, 272, 273, 436, 8395, 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, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11341, 13332, 272, 273, 436, 8395, 225, 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, -...
user_pass = base64.encodestring(unquote(user_pass)).strip() req.add_header('Proxy-Authorization', 'Basic '+user_pass)
if ':' in user_pass: user, password = user_pass.split(':', 1) user_pass = base64.encodestring('%s:%s' % (unquote(user), unquote(password))) req.add_header('Proxy-Authorization', 'Basic ' + user_pass)
def proxy_open(self, req, proxy, type): orig_type = req.get_type() type, r_type = splittype(proxy) host, XXX = splithost(r_type) if '@' in host: user_pass, host = host.split('@', 1) user_pass = base64.encodestring(unquote(user_pass)).strip() req.add_header('Proxy-Authorization', 'Basic '+user_pass) host = unquote(host) req.set_proxy(host, type) if orig_type == type: # let other handlers take care of it # XXX this only makes sense if the proxy is before the # other handlers return None else: # need to start over, because the other handlers don't # grok the proxy's URL type return self.parent.open(req)
d1690a106e77ea2febb1b807a25311393939692d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/d1690a106e77ea2febb1b807a25311393939692d/urllib2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2889, 67, 3190, 12, 2890, 16, 1111, 16, 2889, 16, 618, 4672, 1647, 67, 723, 273, 1111, 18, 588, 67, 723, 1435, 618, 16, 436, 67, 723, 273, 1416, 723, 12, 5656, 13, 1479, 16, 11329, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2889, 67, 3190, 12, 2890, 16, 1111, 16, 2889, 16, 618, 4672, 1647, 67, 723, 273, 1111, 18, 588, 67, 723, 1435, 618, 16, 436, 67, 723, 273, 1416, 723, 12, 5656, 13, 1479, 16, 11329, ...
'''A trackball object. The current transformation matrix can be retrieved using the "matrix" attribute.'''
"""A trackball object."""
def proj2sphere(x, y): d = (x*x + y*y) ** .5 theta = pi * 0.5 * d s=sin(theta) if d>0.0001: return V(s*x/d, s*y/d, cos(theta)) else: return V(0.0, 0.0, 1.0)
a8ef9812e81d701930fa3e21753063a2e5704c69 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/a8ef9812e81d701930fa3e21753063a2e5704c69/VQT.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10296, 22, 87, 9346, 12, 92, 16, 677, 4672, 302, 273, 261, 92, 14, 92, 397, 677, 14, 93, 13, 2826, 263, 25, 7338, 273, 4790, 380, 374, 18, 25, 380, 302, 272, 33, 21861, 12, 14482, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10296, 22, 87, 9346, 12, 92, 16, 677, 4672, 302, 273, 261, 92, 14, 92, 397, 677, 14, 93, 13, 2826, 263, 25, 7338, 273, 4790, 380, 374, 18, 25, 380, 302, 272, 33, 21861, 12, 14482, ...
m = split_prefix_pat.match(klass) cmodule = None cname = klass if m: cmodule = m.group(1) cname = m.group(2)
if self.namespace: cname = klass[len(self.namespace):] cmodule = self.namespace else: m = split_prefix_pat.match(klass) cname = klass cmodule = None if m: cmodule = m.group(1) cname = m.group(2)
def write_obj_defs(self, objdefs, fp=None): if not fp: fp = self.fp
2311187824d1b48a996ee2620fd3c9a63e3edd66 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8659/2311187824d1b48a996ee2620fd3c9a63e3edd66/h2def.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 2603, 67, 12537, 12, 2890, 16, 1081, 12537, 16, 4253, 33, 7036, 4672, 309, 486, 4253, 30, 4253, 273, 365, 18, 7944, 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, 1045, 67, 2603, 67, 12537, 12, 2890, 16, 1081, 12537, 16, 4253, 33, 7036, 4672, 309, 486, 4253, 30, 4253, 273, 365, 18, 7944, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
gLogger.info("Found %d files incorrectly registered" % len(incorrectlyRegistered))
gLogger.info( "Found %d files incorrectly registered" % len( incorrectlyRegistered ) )
def __verifyPfns(self,pfnSizes,storageElements): gLogger.info('Checking %s storage files exist in the catalog' % len(pfnSizes)) pfnsToRemove = [] incorrectlyRegistered = [] allDone = True # First get all the PFNs as they should be registered in the catalog for pfns in breakListIntoChunks(sortList(pfnSizes.keys()),100): res = self.replicaManager.getPfnForProtocol(pfns,storageElements[0],withPort=False) if not res['OK']: allDone = False continue for pfn, error in res['Value']['Failed'].items(): gLogger.error('Failed to obtain registered PFN for physical file','%s %s' % (pfn,error)) if res['Value']['Failed']: allDone = False catalogStoragePfns = res['Value']['Successful'] # Determine whether these PFNs are registered and if so obtain the LFN res = self.replicaManager.getCatalogLFNForPFN(catalogStoragePfns.values()) if not res['OK']: allDone = False continue for surl in sortList(res['Value']['Failed'].keys()): if res['Value']['Failed'][surl] == 'No such file or directory': #pfnsToRemove.append(surl) print surl else: gLogger.error('Failed to get LFN for PFN','%s %s' % (surl,res['Value']['Failed'][surl])) existingLFNs = res['Value']['Successful'].values() if existingLFNs: res = self.replicaManager.getCatalogReplicas(existingLFNs) if not res['OK']: allDone = False continue for lfn, error in res['Value']['Failed'].items(): gLogger.error('Failed to obtain registered replicas for LFN','%s %s' % (lfn,error)) if res['Value']['Failed']: allDone = False for lfn,replicas in res['Value']['Successful'].items(): match = False for storageElement in storageElements: if storageElement in replicas.keys(): match = True if not match: pass#incorrectlyRegistered.append(lfn) #print lfn gLogger.info("Verification of PFNs complete") if incorrectlyRegistered: gLogger.info("Found %d files incorrectly registered" % len(incorrectlyRegistered)) if pfnsToRemove: gLogger.info("Found %d files to be removed" % len(pfnsToRemove)) resDict = {'Remove':pfnsToRemove,'ReRegister':incorrectlyRegistered,'AllDone':allDone} return S_OK(resDict)
ee83668b2f6e1bbb37e504fcdd26bdf3e730b233 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/ee83668b2f6e1bbb37e504fcdd26bdf3e730b233/SENamespaceCatalogCheckAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 8705, 52, 74, 2387, 12, 2890, 16, 84, 4293, 11923, 16, 5697, 3471, 4672, 314, 3328, 18, 1376, 2668, 14294, 738, 87, 2502, 1390, 1005, 316, 326, 6222, 11, 738, 562, 12, 84, 4293, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8705, 52, 74, 2387, 12, 2890, 16, 84, 4293, 11923, 16, 5697, 3471, 4672, 314, 3328, 18, 1376, 2668, 14294, 738, 87, 2502, 1390, 1005, 316, 326, 6222, 11, 738, 562, 12, 84, 4293, ...
self.doclist.MoveOutOfFolder(moved_entry) moved_entry = self.doclist.Get(moved_entry.GetSelfLink().href)
self.editClient.MoveOutOfFolder(moved_entry) moved_entry = self.client.Get(moved_entry.GetSelfLink().href)
def testMoveDocumentInAndOutOfFolder(self): created_entry = self.doclist.UploadDocument(self.ms, self.doc_title) moved_entry = self.doclist.MoveDocumentIntoFolder(created_entry, self.folder) for category in moved_entry.category: if category.scheme.startswith(gdata.docs.service.FOLDERS_SCHEME_PREFIX): self.assertEqual(category.label, self.folder_name) break
dcc46816af19bac967f4b588353a3ee4514dd5d2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6580/dcc46816af19bac967f4b588353a3ee4514dd5d2/service_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 7607, 2519, 382, 1876, 11224, 3899, 12, 2890, 4672, 2522, 67, 4099, 273, 365, 18, 2434, 1098, 18, 4777, 2519, 12, 2890, 18, 959, 16, 365, 18, 2434, 67, 2649, 13, 10456, 67, 4099,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7607, 2519, 382, 1876, 11224, 3899, 12, 2890, 4672, 2522, 67, 4099, 273, 365, 18, 2434, 1098, 18, 4777, 2519, 12, 2890, 18, 959, 16, 365, 18, 2434, 67, 2649, 13, 10456, 67, 4099,...
active_id = context.get('active_id', False)
active_id = context.get('active_id', False)
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): """ Changes the view dynamically @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param context: A standard dictionary @return: New arch of view. """ result = super(pos_make_payment, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False) active_model = context.get('active_model') if not active_model and active_model != 'pos.order': return result active_id = context.get('active_id', False) if active_id: order = self.pool.get('pos.order').browse(cr, uid, active_id) if order.amount_total == order.amount_paid: res['arch'] = """ <form string="Make Payment" colspan="4"> <group col="2" colspan="2"> <label string="Do you want to print the Receipt?" colspan="4"/> <separator colspan="4"/> <button icon="gtk-cancel" special="cancel" string="No" readonly="0"/> <button name="print_report" string="Print Receipt" type="object" icon="gtk-print"/> </group> </form> """ return res
56ded53b7c4ecc641bb26ee15d6f0d72b900ebed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/56ded53b7c4ecc641bb26ee15d6f0d72b900ebed/pos_payment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1466, 67, 1945, 67, 588, 12, 2890, 16, 4422, 16, 4555, 16, 1476, 67, 350, 33, 7036, 16, 1476, 67, 723, 2218, 687, 2187, 819, 33, 7036, 16, 12748, 33, 8381, 16, 27539, 33, 8381, 4672,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1466, 67, 1945, 67, 588, 12, 2890, 16, 4422, 16, 4555, 16, 1476, 67, 350, 33, 7036, 16, 1476, 67, 723, 2218, 687, 2187, 819, 33, 7036, 16, 12748, 33, 8381, 16, 27539, 33, 8381, 4672,...