rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
self.assertRaises(TypeError, list, chain(N(s))) | self.assertRaises(TypeError, chain, N(s)) | def test_chain(self): for s in ("123", "", range(1000), ('do', 1.2), xrange(2000,2200,5)): for g in (G, I, Ig, S, L, R): self.assertEqual(list(chain(g(s))), list(g(s))) self.assertEqual(list(chain(g(s), g(s))), list(g(s))+list(g(s))) self.assertRaises(TypeError, chain, X(s)) self.assertRaises(TypeError, list, chain(N(s))) self.assertRaises(ZeroDivisionError, list, chain(E(s))) | 99670b07b3fb0f90717126730b9ee2d3f78261c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/99670b07b3fb0f90717126730b9ee2d3f78261c2/test_itertools.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5639,
12,
2890,
4672,
364,
272,
316,
7566,
12936,
3113,
23453,
1048,
12,
18088,
3631,
7707,
2896,
2187,
404,
18,
22,
3631,
12314,
12,
17172,
16,
3787,
713,
16,
25,
3719,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5639,
12,
2890,
4672,
364,
272,
316,
7566,
12936,
3113,
23453,
1048,
12,
18088,
3631,
7707,
2896,
2187,
404,
18,
22,
3631,
12314,
12,
17172,
16,
3787,
713,
16,
25,
3719,
30,
... |
check_disambig = (thistxt is None) | def templatesWithParams(self, thistxt=None): """Return a list of templates used on this Page. | e209aca4a97685700a9613125cf0216fca9e1b79 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/e209aca4a97685700a9613125cf0216fca9e1b79/wikipedia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5539,
19591,
12,
2890,
16,
333,
5830,
33,
7036,
4672,
3536,
990,
279,
666,
434,
5539,
1399,
603,
333,
3460,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
5539,
19591,
12,
2890,
16,
333,
5830,
33,
7036,
4672,
3536,
990,
279,
666,
434,
5539,
1399,
603,
333,
3460,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | |
@return: -1 - no more fixups otherwise returns the | @return: -1 - no more fixups otherwise returns the | def GetPrevFixupEA(ea): """ Find previous address with fixup information @param ea: current address @return: -1 - no more fixups otherwise returns the previous address with fixup information """ return idaapi.get_prev_fixup_ea(ea) | bf1ab9894aabbc1bcdadb6513fc5ef25283e4f52 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3410/bf1ab9894aabbc1bcdadb6513fc5ef25283e4f52/idc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
9958,
8585,
416,
41,
37,
12,
24852,
4672,
3536,
4163,
2416,
1758,
598,
2917,
416,
1779,
225,
632,
891,
24164,
30,
783,
1758,
225,
632,
2463,
30,
300,
21,
300,
1158,
1898,
2917,
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,
968,
9958,
8585,
416,
41,
37,
12,
24852,
4672,
3536,
4163,
2416,
1758,
598,
2917,
416,
1779,
225,
632,
891,
24164,
30,
783,
1758,
225,
632,
2463,
30,
300,
21,
300,
1158,
1898,
2917,
18... |
def _offer_code(self, cr, uid, ids, name, args, context={}): | def _offer_step_code(self, cr, uid, ids, name, args, context={}): | def _offer_code(self, cr, uid, ids, name, args, context={}): result ={} print "Offer Step Context : ",context for id in ids: code='' offer_step = self.browse(cr,uid,[id])[0] code = '_'.join([offer_step.offer_id.code,(offer_step.type.code or '')]) result[id]=code return result | d9cbbeb742fed91f7f8dab8c2acea75718396b1f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7339/d9cbbeb742fed91f7f8dab8c2acea75718396b1f/offer_step.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
23322,
67,
4119,
67,
710,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
833,
16,
819,
12938,
4672,
563,
273,
2916,
1172,
315,
10513,
8693,
1772,
294,
3104,
2472,
364,
612,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
23322,
67,
4119,
67,
710,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
833,
16,
819,
12938,
4672,
563,
273,
2916,
1172,
315,
10513,
8693,
1772,
294,
3104,
2472,
364,
612,
... |
slot_number = IO.decode_link(r[base+8:base+12]) | slot_number = IO.decode_link(r[base+12:base+16]) | def _get_document_slot(self, slot_number, document_number): """ Searches and returns the slot number for the given document, starting from the given base slot. If it is not found None is returned. """ r = self.resource while True: base = 12 + slot_number * 12 x = IO.decode_uint32(r[base:base+4]) if x == document_number: return slot_number slot_number = IO.decode_link(r[base+8:base+12]) if slot_number is None: return None raise ValueError, 'The database is corrupted!!' | 0504ec1b99c0cca2d3256c2b3b35732faee92641 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/0504ec1b99c0cca2d3256c2b3b35732faee92641/IIndex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
5457,
67,
14194,
12,
2890,
16,
4694,
67,
2696,
16,
1668,
67,
2696,
4672,
3536,
5167,
281,
471,
1135,
326,
4694,
1300,
364,
326,
864,
1668,
16,
5023,
628,
326,
864,
1026,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5457,
67,
14194,
12,
2890,
16,
4694,
67,
2696,
16,
1668,
67,
2696,
4672,
3536,
5167,
281,
471,
1135,
326,
4694,
1300,
364,
326,
864,
1668,
16,
5023,
628,
326,
864,
1026,
... |
gLogger.error("SEvsLFCAgent.execute: Failed to get replica information.","%s %s" % (lfn,res['Value']['Failed'][lfn])) | gLogger.error( "SEvsLFCAgent.execute: Failed to get replica information.", "%s %s" % ( lfn, res['Value']['Failed'][lfn] ) ) | def execute(self): | 00d8a55a0d409a04efa1a3f677ff9c2bc47dd619 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/00d8a55a0d409a04efa1a3f677ff9c2bc47dd619/SEvsLFCAgent.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,
-... |
namespace['is_owner_or_admin'] = is_owner or root.is_admin(user, object) | namespace['is_owner_or_admin'] = is_owner or root.is_admin(user, self) | def profile(self, context): root = context.root user = context.user | 5854076b57ccff78d8d7afb653366f27b87e05e8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/5854076b57ccff78d8d7afb653366f27b87e05e8/users.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3042,
12,
2890,
16,
819,
4672,
1365,
273,
819,
18,
3085,
729,
273,
819,
18,
1355,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3042,
12,
2890,
16,
819,
4672,
1365,
273,
819,
18,
3085,
729,
273,
819,
18,
1355,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
sage: print G | sage: G | def gcs(self): """ A greedy critical set of a latin square self is found by successively removing elements in a row-wise (bottom-up) manner, checking for unique completion at each step. | 79588eb9f6225f31a0fe90ef3cb590193d4561c1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/79588eb9f6225f31a0fe90ef3cb590193d4561c1/latin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24253,
12,
2890,
4672,
3536,
432,
5174,
24009,
11239,
444,
434,
279,
30486,
8576,
365,
353,
1392,
635,
2216,
4492,
9427,
2186,
316,
279,
1027,
17,
2460,
261,
9176,
17,
416,
13,
21296,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24253,
12,
2890,
4672,
3536,
432,
5174,
24009,
11239,
444,
434,
279,
30486,
8576,
365,
353,
1392,
635,
2216,
4492,
9427,
2186,
316,
279,
1027,
17,
2460,
261,
9176,
17,
416,
13,
21296,
16... |
lis = [] for key,value in self.dict.items(): if len(value) == 1 : lis.append((key, value[0])) else: lis.append((key, value)) return lis | result = [] for key, value in self.dict.items(): if len(value) == 1: result.append((key, value[0])) else: result.append((key, value)) return result | def items(self): lis = [] for key,value in self.dict.items(): if len(value) == 1 : lis.append((key, value[0])) else: lis.append((key, value)) return lis | 577e004d95c9196437c824fbb55b80e4410b47a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/577e004d95c9196437c824fbb55b80e4410b47a7/cgi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1516,
12,
2890,
4672,
328,
291,
273,
5378,
364,
498,
16,
1132,
316,
365,
18,
1576,
18,
3319,
13332,
309,
562,
12,
1132,
13,
422,
404,
294,
328,
291,
18,
6923,
12443,
856,
16,
460,
63... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1516,
12,
2890,
4672,
328,
291,
273,
5378,
364,
498,
16,
1132,
316,
365,
18,
1576,
18,
3319,
13332,
309,
562,
12,
1132,
13,
422,
404,
294,
328,
291,
18,
6923,
12443,
856,
16,
460,
63... |
os.mkdir(path) | os.makedirs(path) | def retrieve_pdb_file(self,pdb_code, compression='.Z', uncompress="gunzip", dir=None, exist=0): """Retrieves a PDB structure file from the PDB server and stores it in a local file tree. The PDB structure is returned as a single string. The compression should be '.Z' or '.gz'. 'uncompress' is the command called to uncompress the files. | 09feacabd5a3d2f3244213b17b5431745b1fa01c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/09feacabd5a3d2f3244213b17b5431745b1fa01c/PDBList.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4614,
67,
17414,
67,
768,
12,
2890,
16,
17414,
67,
710,
16,
9154,
2218,
18,
62,
2187,
12704,
1028,
1546,
19339,
4450,
3113,
1577,
33,
7036,
16,
1005,
33,
20,
4672,
3536,
6960,
279,
216... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4614,
67,
17414,
67,
768,
12,
2890,
16,
17414,
67,
710,
16,
9154,
2218,
18,
62,
2187,
12704,
1028,
1546,
19339,
4450,
3113,
1577,
33,
7036,
16,
1005,
33,
20,
4672,
3536,
6960,
279,
216... |
if None != os.getenv ("EDITOR", None): | if (config["collection"]["editable"] and None != os.getenv ("EDITOR", None)): | def hyltMain (meta_screen, starting_filename): """The core Hylt functionality. Contains the main input and display loops, lots of initialization, and so on. """ curses.curs_set(0) # Remember: Parameters are in the order of (y, x). meta_y, meta_x = meta_screen.getmaxyx() core_state = {"y": meta_y, "x": meta_x} # Keep the "base path", as all Hylt links are relative. base_path = core_state["base_path"] = os.path.dirname (starting_filename) filename = os.path.basename (starting_filename) core_state["curr_base_path"] = core_state["base_path"] # There are three windows: a top status bar, a primary screen, and a bottom # status bar. There is also the main screen, of course. Create them. top = meta_screen.subwin (1, meta_x, 0, 0) main = meta_screen.subwin (meta_y - 2, meta_x, 1, 0) bottom = meta_screen.subwin (1, meta_x, meta_y - 1, 0) # Read in the configuration. config = core_state["config"] = generateConfiguration (base_path) core_state["history"] = [] fresh_page = True done = False curses.def_prog_mode () main_needs_redraw = True while not done: if fresh_page: core_state["curr_base_path"] = os.path.dirname (filename) readHyltFile (filename, core_state) | 4b1b14b3649b22084a2c1ddb1ecd4f5392eb5d16 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2254/4b1b14b3649b22084a2c1ddb1ecd4f5392eb5d16/hylt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4855,
5618,
6376,
261,
3901,
67,
9252,
16,
5023,
67,
3459,
4672,
3536,
1986,
2922,
14881,
5618,
14176,
18,
225,
8398,
326,
2774,
810,
471,
2562,
14075,
16,
328,
6968,
434,
10313,
16,
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,
4855,
5618,
6376,
261,
3901,
67,
9252,
16,
5023,
67,
3459,
4672,
3536,
1986,
2922,
14881,
5618,
14176,
18,
225,
8398,
326,
2774,
810,
471,
2562,
14075,
16,
328,
6968,
434,
10313,
16,
471... |
CurrentLineLen = len(self.profile.FileLinesList[self.CurrentLineNumber-1]) if self.__CurrentChar() in (T_CHAR_NULL, T_CHAR_CR, T_CHAR_SPACE, T_CHAR_TAB): | if self.__CurrentChar() in (T_CHAR_NULL, T_CHAR_CR, T_CHAR_LF, T_CHAR_SPACE, T_CHAR_TAB): | def __SkipWhiteSpace(self): Count = 0 while not self.__EndOfFile(): Count += 1 CurrentLineLen = len(self.profile.FileLinesList[self.CurrentLineNumber-1]) if self.__CurrentChar() in (T_CHAR_NULL, T_CHAR_CR, T_CHAR_SPACE, T_CHAR_TAB): self.__SkippedChars += str(self.__CurrentChar()) self.__GetOneChar() if self.__CurrentChar() == T_CHAR_LF: self.CurrentLineNumber += 1 self.CurrentOffsetWithinLine = 0 else: return Count - 1 | 2f743f829e2c9e634d3e62f83c6af106a22f6583 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/914/2f743f829e2c9e634d3e62f83c6af106a22f6583/FdfParser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
6368,
23108,
12,
2890,
4672,
6974,
273,
374,
1323,
486,
365,
16186,
23358,
812,
13332,
6974,
1011,
404,
309,
365,
16186,
3935,
2156,
1435,
316,
261,
56,
67,
7305,
67,
8560,
16,
399... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6368,
23108,
12,
2890,
4672,
6974,
273,
374,
1323,
486,
365,
16186,
23358,
812,
13332,
6974,
1011,
404,
309,
365,
16186,
3935,
2156,
1435,
316,
261,
56,
67,
7305,
67,
8560,
16,
399... |
self.dprint("start=%d pos=%d" % (st, posn)) | self.dprint("start=%s pos=%s" % (st, posn)) | def OnFindN(self, evt, allow_wrap=True, help='', interactive=True, incremental=False): self._lastcall = self.OnFindN posn, st = self.service.doFindNext(incremental=incremental) self.dprint("start=%d pos=%d" % (st, posn)) if posn is None: self.cancel() return elif not isinstance(posn, int): return self.OnNotFound(posn) elif posn != -1: self.dprint("interactive=%s" % interactive) if interactive: self.showLine(posn, help) self.loop = 0 return if allow_wrap and st != 0: posn, st = self.service.doFindNext(0) self.dprint("wrapped: start=%d pos=%d" % (st, posn)) self.loop = 1 if posn != -1: if interactive: self.showLine(posn, "Reached end of document, continued from start.") return self.dprint("not found: start=%d pos=%d" % (st, posn)) self.OnNotFound() | d1c07e0512f246e75f6747f261ec0f421ff382ab /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11522/d1c07e0512f246e75f6747f261ec0f421ff382ab/find_replace.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
3125,
50,
12,
2890,
16,
6324,
16,
1699,
67,
4113,
33,
5510,
16,
2809,
2218,
2187,
12625,
33,
5510,
16,
20649,
33,
8381,
4672,
365,
6315,
2722,
1991,
273,
365,
18,
1398,
3125,
50,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
3125,
50,
12,
2890,
16,
6324,
16,
1699,
67,
4113,
33,
5510,
16,
2809,
2218,
2187,
12625,
33,
5510,
16,
20649,
33,
8381,
4672,
365,
6315,
2722,
1991,
273,
365,
18,
1398,
3125,
50,... |
printAllProperties( s, ( REACTOR, '/', 'RC1' ) ) | printAllProperties( s, ( REACTOR, '/CYTOPLASM', 'RC1' ) ) | def printList( sim, primitivetype, systempath,list ): for i in list: printAllProperties( sim, ( primitivetype, systempath, i ) ) | 1a1fe362ec91a9aa39fe0cf3fe09ad6f5acdf133 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/1a1fe362ec91a9aa39fe0cf3fe09ad6f5acdf133/test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
682,
12,
3142,
16,
846,
1038,
427,
5872,
16,
2619,
803,
16,
1098,
262,
30,
364,
277,
316,
666,
30,
1172,
1595,
2297,
12,
3142,
16,
261,
846,
1038,
427,
5872,
16,
2619,
803,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
682,
12,
3142,
16,
846,
1038,
427,
5872,
16,
2619,
803,
16,
1098,
262,
30,
364,
277,
316,
666,
30,
1172,
1595,
2297,
12,
3142,
16,
261,
846,
1038,
427,
5872,
16,
2619,
803,
16,... |
rrd_dir = os.path.dirname( rrdfile ) if not os.path.exists( rrd_dir ): | rrd_dir = os.path.dirname( rrdfile ) if not os.path.exists( rrd_dir ): | def deliver(self, sub, msg, insec, rock): | 763bd88c050d5b7c1c8035882e37b6fef3ae29fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3643/763bd88c050d5b7c1c8035882e37b6fef3ae29fd/elvinrrd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11795,
12,
2890,
16,
720,
16,
1234,
16,
316,
3321,
16,
23486,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11795,
12,
2890,
16,
720,
16,
1234,
16,
316,
3321,
16,
23486,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
return _('%s section of %s') % (instructors, courses) | return _('%s section of %s') % (instructors, courses) | def _getLabel(self): instructors = " ".join([i.title for i in self.instructors]) courses = " ".join([c.title for c in self.courses]) return _('%s section of %s') % (instructors, courses) | 1e74387bc1d1f5f201e8c785d9af774f1b41ae2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/1e74387bc1d1f5f201e8c785d9af774f1b41ae2e/app.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
2224,
12,
2890,
4672,
316,
1697,
1383,
273,
315,
3552,
5701,
3816,
77,
18,
2649,
364,
277,
316,
365,
18,
267,
1697,
1383,
5717,
17224,
273,
315,
3552,
5701,
3816,
71,
18,
264... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2224,
12,
2890,
4672,
316,
1697,
1383,
273,
315,
3552,
5701,
3816,
77,
18,
2649,
364,
277,
316,
365,
18,
267,
1697,
1383,
5717,
17224,
273,
315,
3552,
5701,
3816,
71,
18,
264... |
rtList = [] for instanceId, rtId, recflag in cu.fetchall(): if rtId != roleId: | ugtList = [] results = cu.fetchall() instanceIds = set([ x[0] for x in results ]) for instanceId in instanceIds: permissions = [ x[2:] for x in results if x[0] == instanceId and x[1] == roleId ] if len(permissions) == 0: | def add(self, roleId, troveList, recursive=True): """ grant access on a troveList to a Role. If recursive = True, then access is also granted to all the children of the troves passed """ self._findInstanceIds(troveList) recursive = int(bool(recursive)) # we have now the list of instanceIds in the tmpInstanceId table. # avoid inserting duplicates cu = self.db.cursor() cu.execute(""" select distinct tmpInstanceId.instanceId, ugt.ugtId, ugt.recursive from tmpInstanceId left join UserGroupTroves as ugt using(instanceId) """) # record the new permissions rtList = [] for instanceId, rtId, recflag in cu.fetchall(): # new instanceId, left join returned a NULL rt record, or # another role has access to this instanceId if rtId != roleId: cu.execute("insert into UserGroupTroves(userGroupId, instanceId, recursive) " "values (?,?,?)", (roleId, instanceId, recursive)) rtId = cu.lastrowid elif recursive and not recflag: # granting recursive access to something that wasn't recursive before cu.execute("update UserGroupTroves set recursive = ? where rtId = ?", (recursive, rtId)) else: # not worth bothering with a rebuild rtId = None if rtId: # we have a new (or changed) acl self.rebuild(cu, rtId, roleId) rtList.append(rtId) return rtList | 06bc2b62d119d5d89b047d93a538d8e72cf636c2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8747/06bc2b62d119d5d89b047d93a538d8e72cf636c2/accessmap.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
12,
2890,
16,
21152,
16,
23432,
537,
682,
16,
5904,
33,
5510,
4672,
3536,
7936,
2006,
603,
279,
23432,
537,
682,
358,
279,
6204,
18,
971,
5904,
273,
1053,
16,
1508,
2006,
353,
254... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
2890,
16,
21152,
16,
23432,
537,
682,
16,
5904,
33,
5510,
4672,
3536,
7936,
2006,
603,
279,
23432,
537,
682,
358,
279,
6204,
18,
971,
5904,
273,
1053,
16,
1508,
2006,
353,
254... |
finalimg_width, finalimg_height = finalimg_height, finalimg_width | finalimg_width, finalimg_height = finalimg_height, finalimg_width | def put_zoom_image_to_window(self, currimg_preloaded): | a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1378,
67,
14932,
67,
2730,
67,
869,
67,
5668,
12,
2890,
16,
4306,
6081,
67,
1484,
4230,
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,... | [
1,
1,
1,
1,
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,
1378,
67,
14932,
67,
2730,
67,
869,
67,
5668,
12,
2890,
16,
4306,
6081,
67,
1484,
4230,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
details = 'Conflicting sections, (type: %s' % type | details = 'Conflicting sections (type: %s' % type | def __init__(self, type, name=None): self.type = type self.name = name details = 'Conflicting sections, (type: %s' % type if name is not None: details += ', name: %s' % name ConfigurationError.__init__(self, details + ')') | 3d30cabca7ab2b6f898661a131231aa65cfb6016 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9785/3d30cabca7ab2b6f898661a131231aa65cfb6016/Common.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
618,
16,
508,
33,
7036,
4672,
365,
18,
723,
273,
618,
365,
18,
529,
273,
508,
3189,
273,
296,
10732,
310,
7178,
261,
723,
30,
738,
87,
11,
738,
618,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
618,
16,
508,
33,
7036,
4672,
365,
18,
723,
273,
618,
365,
18,
529,
273,
508,
3189,
273,
296,
10732,
310,
7178,
261,
723,
30,
738,
87,
11,
738,
618,
... |
raise RuntimeError("cannot release un-aquired lock") | raise RuntimeError("cannot release un-acquired lock") | def release(self): if self.__owner is not current_thread(): raise RuntimeError("cannot release un-aquired lock") self.__count = count = self.__count - 1 if not count: self.__owner = None self.__block.release() if __debug__: self._note("%s.release(): final release", self) else: if __debug__: self._note("%s.release(): non-final release", self) | f63963809fe5f7a4e8c0a0f23e6d75f8e82b8686 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/f63963809fe5f7a4e8c0a0f23e6d75f8e82b8686/threading.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3992,
12,
2890,
4672,
309,
365,
16186,
8443,
353,
486,
783,
67,
5930,
13332,
1002,
7265,
2932,
12892,
3992,
640,
17,
1077,
1402,
2176,
7923,
365,
16186,
1883,
273,
1056,
273,
365,
16186,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3992,
12,
2890,
4672,
309,
365,
16186,
8443,
353,
486,
783,
67,
5930,
13332,
1002,
7265,
2932,
12892,
3992,
640,
17,
1077,
1402,
2176,
7923,
365,
16186,
1883,
273,
1056,
273,
365,
16186,
... |
"""m, name=None, globs=None, verbose=None, isprivate=None, report=1 Test examples in docstrings in functions and classes reachable from module m, starting with m.__doc__. Private names are skipped. | """m=None, name=None, globs=None, verbose=None, isprivate=None, report=1 Test examples in docstrings in functions and classes reachable from module m (or the current module if m is not supplied), starting with m.__doc__. Private names are skipped. | def testmod(m, name=None, globs=None, verbose=None, isprivate=None, report=1): """m, name=None, globs=None, verbose=None, isprivate=None, report=1 Test examples in docstrings in functions and classes reachable from module m, starting with m.__doc__. Private names are skipped. Also test examples reachable from dict m.__test__ if it exists and is not None. m.__dict__ maps names to functions, classes and strings; function and class docstrings are tested even if the name is private; strings are tested directly, as if they were docstrings. Return (#failures, #tests). See doctest.__doc__ for an overview. Optional keyword arg "name" gives the name of the module; by default use m.__name__. Optional keyword arg "globs" gives a dict to be used as the globals when executing examples; by default, use m.__dict__. A copy of this dict is actually used for each docstring, so that each docstring's examples start with a clean slate. Optional keyword arg "verbose" prints lots of stuff if true, prints only failures if false; by default, it's true iff "-v" is in sys.argv. Optional keyword arg "isprivate" specifies a function used to determine whether a name is private. The default function is doctest.is_private; see its docs for details. Optional keyword arg "report" prints a summary at the end when true, else prints nothing at the end. In verbose mode, the summary is detailed, else very brief (in fact, empty if all tests passed). Advanced tomfoolery: testmod runs methods of a local instance of class doctest.Tester, then merges the results into (or creates) global Tester instance doctest.master. Methods of doctest.master can be called directly too, if you want to do something unusual. Passing report=0 to testmod is especially useful then, to delay displaying a summary. Invoke doctest.master.summarize(verbose) when you're done fiddling. """ global master if not _ismodule(m): raise TypeError("testmod: module required; " + `m`) if name is None: name = m.__name__ tester = Tester(m, globs=globs, verbose=verbose, isprivate=isprivate) failures, tries = tester.rundoc(m, name) f, t = tester.rundict(m.__dict__, name, m) failures = failures + f tries = tries + t if hasattr(m, "__test__"): testdict = m.__test__ if testdict: if not hasattr(testdict, "items"): raise TypeError("testmod: module.__test__ must support " ".items(); " + `testdict`) f, t = tester.run__test__(testdict, name + ".__test__") failures = failures + f tries = tries + t if report: tester.summarize() if master is None: master = tester else: master.merge(tester) return failures, tries | 30d7b5aa38c17c0a3ee2db0de99a9fb0144d11a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/30d7b5aa38c17c0a3ee2db0de99a9fb0144d11a5/doctest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1711,
12,
81,
16,
508,
33,
7036,
16,
4715,
87,
33,
7036,
16,
3988,
33,
7036,
16,
353,
1152,
33,
7036,
16,
2605,
33,
21,
4672,
3536,
81,
33,
7036,
16,
508,
33,
7036,
16,
4715,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1711,
12,
81,
16,
508,
33,
7036,
16,
4715,
87,
33,
7036,
16,
3988,
33,
7036,
16,
353,
1152,
33,
7036,
16,
2605,
33,
21,
4672,
3536,
81,
33,
7036,
16,
508,
33,
7036,
16,
4715,... |
notes = self.xml.find('.//TEXT').text image = elixer.fix_filename(image, self.res_num) | notes = self.xml.find('.//TEXT').text or '' if image: image = elixer.fix_filename(image, self.res_num) | def _load(self): parts = ('FORMALTITLE', 'GIVEN', 'FAMILY') data_parts = [self.xml.find('.//%s' % p).attrib['value'] for p in parts] | 7668dc2dcbb21799cf97dc3780efb3b8221c8f80 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12927/7668dc2dcbb21799cf97dc3780efb3b8221c8f80/bb9_course.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
945,
12,
2890,
4672,
2140,
273,
7707,
4983,
1013,
14123,
2187,
296,
43,
8188,
1157,
2187,
296,
25002,
25554,
6134,
501,
67,
6019,
273,
306,
2890,
18,
2902,
18,
4720,
2668,
18,
759,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
945,
12,
2890,
4672,
2140,
273,
7707,
4983,
1013,
14123,
2187,
296,
43,
8188,
1157,
2187,
296,
25002,
25554,
6134,
501,
67,
6019,
273,
306,
2890,
18,
2902,
18,
4720,
2668,
18,
759,
... |
pos = self.currpos() target_ofs = pos - target_ofs target = WORD + target_ofs + arch.PC_OFFSET/2 | target += 2 * WORD | def B_offs(self, target_ofs, c=cond.AL): target = target_ofs-arch.PC_OFFSET/2 pos = self.currpos() if target_ofs > pos: raise NotImplementedError else: if target >= 0 and target <= 0xFF: pos = self.currpos() target_ofs = pos - target_ofs target = WORD + target_ofs + arch.PC_OFFSET/2 self.SUB_ri(reg.pc.value, reg.pc.value, target, cond=c) else: assert c == cond.AL self.LDR_ri(reg.ip.value, reg.pc.value, cond=c) self.SUB_rr(reg.pc.value, reg.pc.value, reg.ip.value, cond=c) pos = self.currpos() target_ofs = pos - target_ofs target = WORD + target_ofs + arch.PC_OFFSET/2 self.write32(target) | 705623c8b64a5ecd703ed2053e1e97380d6f6584 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/705623c8b64a5ecd703ed2053e1e97380d6f6584/codebuilder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
605,
67,
26600,
12,
2890,
16,
1018,
67,
792,
87,
16,
276,
33,
10013,
18,
1013,
4672,
1018,
273,
1018,
67,
792,
87,
17,
991,
18,
3513,
67,
11271,
19,
22,
949,
273,
365,
18,
17016,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
605,
67,
26600,
12,
2890,
16,
1018,
67,
792,
87,
16,
276,
33,
10013,
18,
1013,
4672,
1018,
273,
1018,
67,
792,
87,
17,
991,
18,
3513,
67,
11271,
19,
22,
949,
273,
365,
18,
17016,
9... |
objFreq = self.get_freq(objName) | objFreq = self.obj_size(objName)['freq'] | def read(self, name, start_date=None, end_date=None, start_case=None, end_case=None, max_string_len=65): """read specified object(s) from database | 9a931e02283bbf6d8fe5efbf776f3c06a5418dbe /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/9a931e02283bbf6d8fe5efbf776f3c06a5418dbe/fame.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
508,
16,
787,
67,
712,
33,
7036,
16,
679,
67,
712,
33,
7036,
16,
787,
67,
3593,
33,
7036,
16,
679,
67,
3593,
33,
7036,
16,
943,
67,
1080,
67,
1897,
33,
9222,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
508,
16,
787,
67,
712,
33,
7036,
16,
679,
67,
712,
33,
7036,
16,
787,
67,
3593,
33,
7036,
16,
679,
67,
3593,
33,
7036,
16,
943,
67,
1080,
67,
1897,
33,
9222,
4... |
schema = XMLSchema() | schema = schema or XMLSchema() | def loadFromURL(self, url): """Return an XMLSchema instance loaded from the given url. url -- URL to dereference """ reader = self.__readerClass() if self.__base_url: url = basejoin(self.__base_url,url) | 6d201de3040319ca5a8fc16b477b596f1fb849ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13054/6d201de3040319ca5a8fc16b477b596f1fb849ff/XMLSchema.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24935,
1785,
12,
2890,
16,
880,
4672,
3536,
990,
392,
3167,
3078,
791,
4203,
628,
326,
864,
880,
18,
880,
1493,
1976,
358,
27794,
3536,
2949,
273,
365,
16186,
10530,
797,
1435,
309,
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,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24935,
1785,
12,
2890,
16,
880,
4672,
3536,
990,
392,
3167,
3078,
791,
4203,
628,
326,
864,
880,
18,
880,
1493,
1976,
358,
27794,
3536,
2949,
273,
365,
16186,
10530,
797,
1435,
309,
365,... |
name = data[pos:pos+name_length].decode("utf-16").strip("\x00") | name = data[pos:pos+name_length].decode("utf-16-le").strip("\x00") | def parse(self, asf, data, fileobj, size): super(ExtendedContentDescriptionObject, self).parse(asf, data, fileobj, size) asf.extended_content_description_obj = self num_attributes, = struct.unpack("<H", data[0:2]) pos = 2 for i in range(num_attributes): name_length, = struct.unpack("<H", data[pos:pos+2]) pos += 2 name = data[pos:pos+name_length].decode("utf-16").strip("\x00") pos += name_length value_type, value_length = struct.unpack("<HH", data[pos:pos+4]) pos += 4 value = data[pos:pos+value_length] pos += value_length attr = _attribute_types[value_type](data=value) asf.tags.append((name, attr)) | f8045ddfb7a46abea4efd67a5303f027e3f7565a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1845/f8045ddfb7a46abea4efd67a5303f027e3f7565a/asf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
487,
74,
16,
501,
16,
17041,
16,
963,
4672,
2240,
12,
11456,
1350,
3291,
921,
16,
365,
2934,
2670,
12,
345,
74,
16,
501,
16,
17041,
16,
963,
13,
487,
74,
18,
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,
1109,
12,
2890,
16,
487,
74,
16,
501,
16,
17041,
16,
963,
4672,
2240,
12,
11456,
1350,
3291,
921,
16,
365,
2934,
2670,
12,
345,
74,
16,
501,
16,
17041,
16,
963,
13,
487,
74,
18,
14... |
def __init__(self, host='', port=None, **x509): | def __init__(self, host='', port=None, key_file=None, cert_file=None, strict=None): | def __init__(self, host='', port=None, **x509): # provide a default host, pass the X509 cert info | 10fb0cd552742f705321830d292919646e739dd2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/10fb0cd552742f705321830d292919646e739dd2/httplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1479,
2218,
2187,
1756,
33,
7036,
16,
498,
67,
768,
33,
7036,
16,
3320,
67,
768,
33,
7036,
16,
5490,
33,
7036,
4672,
468,
5615,
279,
805,
1479,
16,
134... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1479,
2218,
2187,
1756,
33,
7036,
16,
498,
67,
768,
33,
7036,
16,
3320,
67,
768,
33,
7036,
16,
5490,
33,
7036,
4672,
468,
5615,
279,
805,
1479,
16,
134... |
path=urllib.unquote(string.split(URL2, REQUEST.script)[1]) | path=string.split(URL2, REQUEST.script) if len(path) > 1: path=path[1] else: path='' path=urllib.unquote(path) | def manage_catalogFoundItems(self, REQUEST, RESPONSE, URL2, URL1, obj_metatypes=None, obj_ids=None, obj_searchterm=None, obj_expr=None, obj_mtime=None, obj_mspec=None, obj_roles=None, obj_permission=None): """ Find object according to search criteria and Catalog them """ | 2413d142cbaa7b5b74a9907119a4e9760c3f5111 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2413d142cbaa7b5b74a9907119a4e9760c3f5111/ZCatalog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
67,
7199,
2043,
3126,
12,
2890,
16,
12492,
16,
20645,
16,
1976,
22,
16,
1976,
21,
16,
1081,
67,
10578,
13373,
33,
7036,
16,
1081,
67,
2232,
33,
7036,
16,
1081,
67,
3072,
6408,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
67,
7199,
2043,
3126,
12,
2890,
16,
12492,
16,
20645,
16,
1976,
22,
16,
1976,
21,
16,
1081,
67,
10578,
13373,
33,
7036,
16,
1081,
67,
2232,
33,
7036,
16,
1081,
67,
3072,
6408,
... |
import sage.version canonical_info['sage_version'] = sage.version.version | try: import sage.version canonical_info['sage_version'] = sage.version.version except ImportError: canonical_info['sage_version'] = 'unknown' | def canonical_info(self, platform_host_info): """ Standarize host info so we can parse it easily. """ | 5c0a9405673505359105d945ae78c56ceef970f0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/5c0a9405673505359105d945ae78c56ceef970f0/hostinfo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7378,
67,
1376,
12,
2890,
16,
4072,
67,
2564,
67,
1376,
4672,
3536,
934,
464,
297,
554,
1479,
1123,
1427,
732,
848,
1109,
518,
17997,
18,
225,
3536,
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,
7378,
67,
1376,
12,
2890,
16,
4072,
67,
2564,
67,
1376,
4672,
3536,
934,
464,
297,
554,
1479,
1123,
1427,
732,
848,
1109,
518,
17997,
18,
225,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-1... |
print 'Type: %r' % x.type.value | log_debug('HTTP -> CONTENT -> Type: %r' % x.type.value) | def execute(self): """Launch the report and return it""" js_obj = self.pool.get('jasper.server') js_ids = js_obj.search(self.cr, self.uid, [('enable','=',True)]) if not len(js_ids): raise Exception('Error, no JasperServer found!') | f760cf13165af6f709a6fae8daf39833f55b216b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6641/f760cf13165af6f709a6fae8daf39833f55b216b/report_soap.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
4672,
3536,
9569,
326,
2605,
471,
327,
518,
8395,
3828,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
78,
345,
457,
18,
3567,
6134,
3828,
67,
2232,
273,
3828,
67,
2603,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
4672,
3536,
9569,
326,
2605,
471,
327,
518,
8395,
3828,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
78,
345,
457,
18,
3567,
6134,
3828,
67,
2232,
273,
3828,
67,
2603,
... |
filter = res_company_ldap['ldap_filter']%(login,) | filter = filter_format(res_company_ldap['ldap_filter'], (login,)) | def _ldap_login(db, login, passwd): ret = oldfnc(db, login, passwd) if ret: return ret | c2d798c06f7cd34b8f5ed60f1c8ea20072ad9ff9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/c2d798c06f7cd34b8f5ed60f1c8ea20072ad9ff9/users_ldap.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
14394,
67,
5819,
12,
1966,
16,
3925,
16,
19093,
4672,
325,
273,
1592,
4293,
71,
12,
1966,
16,
3925,
16,
19093,
13,
309,
325,
30,
327,
325,
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,
389,
14394,
67,
5819,
12,
1966,
16,
3925,
16,
19093,
4672,
325,
273,
1592,
4293,
71,
12,
1966,
16,
3925,
16,
19093,
13,
309,
325,
30,
327,
325,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
names = [prefix + suffix for suffix in suffixes] | def getColorsProperty(prefix): """ takes HSV 'S' and 'V' from conf files, hue from self, returns a tuple of four RGB colors. """ names = [prefix + suffix for suffix in suffixes] def getSaturatedColors(self): return [getLozengeTypeColor(self.hue, name) for name in names] | 244911ac583ccc75e9fed50e4d5ff72bbe5a13ac /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/244911ac583ccc75e9fed50e4d5ff72bbe5a13ac/CalendarCanvas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12570,
1396,
12,
3239,
4672,
3536,
5530,
670,
23927,
296,
55,
11,
471,
296,
58,
11,
628,
2195,
1390,
16,
16846,
628,
365,
16,
1135,
279,
3193,
434,
12792,
11510,
5740,
18,
225,
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,
336,
12570,
1396,
12,
3239,
4672,
3536,
5530,
670,
23927,
296,
55,
11,
471,
296,
58,
11,
628,
2195,
1390,
16,
16846,
628,
365,
16,
1135,
279,
3193,
434,
12792,
11510,
5740,
18,
225,
35... | |
def __init__(self, polynomial, name=None, check=True, embedding=None, latex_name=None): | def __init__(self, polynomial, name=None, latex_name=None, check=True, embedding=None): | def __init__(self, polynomial, name=None, check=True, embedding=None, latex_name=None): """ Create a quadratic number field. EXAMPLES:: sage: k.<a> = QuadraticField(5, check=False); k Number Field in a with defining polynomial x^2 - 5 Don't do this:: sage: k.<a> = QuadraticField(4, check=False); k Number Field in a with defining polynomial x^2 - 4 | f8a2d54cf6197e4b94c6442f8899260b5d1c4f31 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f8a2d54cf6197e4b94c6442f8899260b5d1c4f31/number_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
16991,
16,
508,
33,
7036,
16,
25079,
67,
529,
33,
7036,
16,
866,
33,
5510,
16,
15853,
33,
7036,
4672,
3536,
1788,
279,
26146,
1300,
652,
18,
225,
5675,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16991,
16,
508,
33,
7036,
16,
25079,
67,
529,
33,
7036,
16,
866,
33,
5510,
16,
15853,
33,
7036,
4672,
3536,
1788,
279,
26146,
1300,
652,
18,
225,
5675,
... |
sage: region_plot([x*(x-1)*(x+1)+y^2<0, x>-1], (x, -3, 2), (y, -3, 3), incol='lightblue', bordercol='gray', plot_points=50) | sage: region_plot([x*(x-1)*(x+1)+y^2<0, x>-1], (x, -3, 2), (y, -3, 3), incol='lightblue', plot_points=50) | def region_plot(f, xrange, yrange, plot_points, incol, outcol, bordercol): r""" ``region_plot`` takes a boolean function of two variables, `f(x,y)` and plots the region where f is True over the specified ``xrange`` and ``yrange`` as demonstrated below. ``region_plot(f, (xmin, xmax), (ymin, ymax), ...)`` INPUT: - ``f`` -- a boolean function of two variables - ``(xmin, xmax)`` -- 2-tuple, the range of ``x`` values OR 3-tuple ``(x,xmin,xmax)`` - ``(ymin, ymax)`` -- 2-tuple, the range of ``y`` values OR 3-tuple ``(y,ymin,ymax)`` - ``plot_points`` -- integer (default: 100); number of points to plot in each direction of the grid - ``incol`` -- a color (default: ``'blue'``), the color inside the region - ``outcol`` -- a color (default: ``'white'``), the color of the outside of the region - ``bordercol`` -- a color (default: ``None``), the color of the border (``incol`` if not specified) EXAMPLES: Here we plot a simple function of two variables:: sage: x,y = var('x,y') sage: region_plot(cos(x^2+y^2) <= 0, (x, -3, 3), (y, -3, 3)) Here we play with the colors:: sage: region_plot(x^2+y^3 < 2, (x, -2, 2), (y, -2, 2), incol='lightblue', bordercol='gray') An even more complicated plot:: sage: region_plot(sin(x)*sin(y) >= 1/4, (x,-10,10), (y,-10,10), incol='yellow', bordercol='black', plot_points=250) A disk centered at the origin:: sage: region_plot(x^2+y^2<1, (x,-1,1), (y,-1,1)).show(aspect_ratio=1) A plot with more than one condition:: sage: region_plot([x^2+y^2<1, x<y], (x,-2,2), (y,-2,2)) Since it doesn't look very good, let's increase plot_points:: sage: region_plot([x^2+y^2<1, x<y], (x,-2,2), (y,-2,2), plot_points=400).show(aspect_ratio=1) #long time The first quadrant of the unit circle:: sage: region_plot([y>0, x>0, x^2+y^2<1], (-1.1, 1.1), (-1.1, 1.1), plot_points = 400).show(aspect_ratio=1) Here is another plot:: sage: region_plot(x*(x-1)*(x+1)+y^2<0, (x, -3, 2), (y, -3, 3), incol='lightblue', bordercol='gray', plot_points=50) If we want to keep only the region where x is positive:: sage: region_plot([x*(x-1)*(x+1)+y^2<0, x>-1], (x, -3, 2), (y, -3, 3), incol='lightblue', bordercol='gray', plot_points=50) Here we have a cut circle:: sage: region_plot([x^2+y^2<4, x>-1], (x, -2, 2), (y, -2, 2), incol='lightblue', bordercol='gray', plot_points=200).show(aspect_ratio=1) #long time """ from sage.plot.plot import Graphics from sage.plot.misc import setup_for_eval_on_grid if not isinstance(f, (list, tuple)): f = [f] variables = reduce(lambda g1, g2: g1.union(g2), [set(g.variables()) for g in f], set([])) f = [equify(g, variables) for g in f] g, ranges = setup_for_eval_on_grid(f, [xrange, yrange], plot_points) xrange,yrange=[r[:2] for r in ranges] xy_data_arrays = map(lambda g: [[g(x, y) for x in xsrange(*ranges[0], include_endpoint=True)] for y in xsrange(*ranges[1], include_endpoint=True)], g) xy_data_array = map(lambda *rows: map(lambda *vals: mangle_neg(vals), *rows), *xy_data_arrays) from matplotlib.colors import ListedColormap incol = rgbcolor(incol) outcol = rgbcolor(outcol) cmap = ListedColormap([incol, outcol]) cmap.set_over(outcol) cmap.set_under(incol) g = Graphics() g.add_primitive(ContourPlot(xy_data_array, xrange,yrange, dict(plot_points=plot_points, contours=[-1e307, 0, 1e307], cmap=cmap, fill=True))) if bordercol is not None: bordercol = rgbcolor(bordercol) g.add_primitive(ContourPlot(xy_data_array, xrange, yrange, dict(plot_points=plot_points, contours=[0], cmap=[bordercol], fill=False))) return g | 37d8b6eadde6db814bff49b3658e71d67e3df889 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/37d8b6eadde6db814bff49b3658e71d67e3df889/contour_plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3020,
67,
4032,
12,
74,
16,
12314,
16,
677,
3676,
16,
3207,
67,
4139,
16,
316,
1293,
16,
596,
1293,
16,
5795,
1293,
4672,
436,
8395,
12176,
6858,
67,
4032,
10335,
5530,
279,
1250,
445,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3020,
67,
4032,
12,
74,
16,
12314,
16,
677,
3676,
16,
3207,
67,
4139,
16,
316,
1293,
16,
596,
1293,
16,
5795,
1293,
4672,
436,
8395,
12176,
6858,
67,
4032,
10335,
5530,
279,
1250,
445,... |
if self.IsWindows(): | if IsWindows(): | def Upload(self, coverage_file, upload_path, sym_path=None, src_root=None): """Upload the results to the dashboard. | bc410f64b906bf3a5ca7721d73b3632fcccaeae2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9392/bc410f64b906bf3a5ca7721d73b3632fcccaeae2/coverage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9414,
12,
2890,
16,
11196,
67,
768,
16,
3617,
67,
803,
16,
5382,
67,
803,
33,
7036,
16,
1705,
67,
3085,
33,
7036,
4672,
3536,
4777,
326,
1686,
358,
326,
11825,
18,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9414,
12,
2890,
16,
11196,
67,
768,
16,
3617,
67,
803,
16,
5382,
67,
803,
33,
7036,
16,
1705,
67,
3085,
33,
7036,
4672,
3536,
4777,
326,
1686,
358,
326,
11825,
18,
2,
-100,
-100,
-10... |
elif not css.get('extra_context', {}).get('prefix', None): | else: | def render(self, context): css_name = template.Variable(self.name).resolve(context) | 6f1319078c6e35cc6c56d9c6ba7075d4fe114b05 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12688/6f1319078c6e35cc6c56d9c6ba7075d4fe114b05/compressed.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
819,
4672,
3747,
67,
529,
273,
1542,
18,
3092,
12,
2890,
18,
529,
2934,
10828,
12,
2472,
13,
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,
1743,
12,
2890,
16,
819,
4672,
3747,
67,
529,
273,
1542,
18,
3092,
12,
2890,
18,
529,
2934,
10828,
12,
2472,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self.answermax = 12 self.answer = 5 | def __init__(self): super(EqualityLevelset, self).__init__() self.answermin = 5 self.answermax = 12 self.answer = 5 | af34e64d38be11ba68a4418286816d4e15a20114 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/af34e64d38be11ba68a4418286816d4e15a20114/gnumch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
2240,
12,
20273,
2355,
542,
16,
365,
2934,
972,
2738,
972,
1435,
365,
18,
634,
91,
1035,
267,
273,
1381,
365,
18,
634,
91,
1035,
651,
273,
2593,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
2240,
12,
20273,
2355,
542,
16,
365,
2934,
972,
2738,
972,
1435,
365,
18,
634,
91,
1035,
267,
273,
1381,
365,
18,
634,
91,
1035,
651,
273,
2593,
365,
... | |
libraries=["zlibstat", "mylib"], | libraries=["zlibstat"], | def _removefiles(self, dstdir, srcdir): if not os.path.isdir(srcdir): return for n in os.listdir(srcdir): name = os.path.join(dstdir, n) if os.path.isfile(name): self.announce("removing '%s'" % name) if not self.dry_run: os.remove(name) if os.path.splitext(name)[1] == '.py': try: os.remove(name + 'c') except: pass try: os.remove(name + 'o') except: pass elif os.path.isdir(name): self._removefiles(name, os.path.join(srcdir, n)) if not self.dry_run: os.rmdir(name) else: self.announce("skipping removal of '%s' (does not exist)" %\ name) | 6c0e865e7cfefd57ec3be3495edb997bb8f96e7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1361/6c0e865e7cfefd57ec3be3495edb997bb8f96e7f/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4479,
2354,
12,
2890,
16,
3046,
1214,
16,
1705,
1214,
4672,
309,
486,
1140,
18,
803,
18,
291,
1214,
12,
4816,
1214,
4672,
327,
364,
290,
316,
1140,
18,
1098,
1214,
12,
4816,
1214,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4479,
2354,
12,
2890,
16,
3046,
1214,
16,
1705,
1214,
4672,
309,
486,
1140,
18,
803,
18,
291,
1214,
12,
4816,
1214,
4672,
327,
364,
290,
316,
1140,
18,
1098,
1214,
12,
4816,
1214,... |
data = castep.read_formatted_potential('asap2.pot_fmt') | def test_write_electric_field(self): self.pot.calc(self.at, force=True, write_electrostatics=True, electrostatic_grid=[50,50,1]) data = castep.read_formatted_potential('asap2.pot_fmt') #self.at.write('dimer.cube', data=data) | a1cb4db9de2183ac3eaf58ac886c2f9faba7a6d7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8914/a1cb4db9de2183ac3eaf58ac886c2f9faba7a6d7/test_asap.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2626,
67,
13759,
1512,
67,
1518,
12,
2890,
4672,
365,
18,
13130,
18,
12448,
12,
2890,
18,
270,
16,
2944,
33,
5510,
16,
1045,
67,
13759,
303,
5642,
2102,
33,
5510,
16,
17375,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2626,
67,
13759,
1512,
67,
1518,
12,
2890,
4672,
365,
18,
13130,
18,
12448,
12,
2890,
18,
270,
16,
2944,
33,
5510,
16,
1045,
67,
13759,
303,
5642,
2102,
33,
5510,
16,
17375,
... | |
if arg == '-debug': | elif arg == '-move': moveBlockCheck = True elif arg == '-debug': | def main(): # Loading the comments global templateToRemove; global categoryToCheck; global comment; global project_inserted if config.mylang not in project_inserted: wikipedia.output(u"Your project is not supported by this script. You have to edit the script and add it!") wikipedia.stopme() # always, define a generator to understand if the user sets one, defining what's genFactory always = False; generator = False; debug = False; genFactory = pagegenerators.GeneratorFactory() # To prevent Infinite loops errorCount = 0 # Loading the default options. for arg in wikipedia.handleArgs(): if arg == '-always': always = True if arg == '-debug': debug = True elif arg.startswith('-page'): if len(arg) == 5: generator = [wikipedia.Page(wikipedia.getSite(), wikipedia.input(u'What page do you want to use?'))] else: generator = [wikipedia.Page(wikipedia.getSite(), arg[6:])] else: generator = genFactory.handleArg(arg) # Load the right site site = wikipedia.getSite() # Take the right templates to use, the category and the comment TTR = wikipedia.translate(site, templateToRemove) category = wikipedia.translate(site, categoryToCheck) commentUsed = wikipedia.translate(site, comment) if not generator: generator = list() wikipedia.output(u'Loading categories...') # Define the category if no other generator has been setted for CAT in category: cat = catlib.Category(site, CAT) # Define the generator gen = pagegenerators.CategorizedPageGenerator(cat) for pageCat in gen: generator.append(pageCat) wikipedia.output(u'Categories loaded, start!') # Main Loop for page in generator: pagename = page.title() wikipedia.output('Loading %s...' % pagename) try: # The same as .get() but it loads also the editRestriction var, that's what we # need to understand if the page is protected or not. (text, useless, editRestriction) = page._getEditPage() except wikipedia.NoPage: wikipedia.output("%s doesn't exist! Skipping..." % pagename) continue except wikipedia.IsRedirectPage: wikipedia.output("%s is a redirect! Skipping..." % pagename) continue if editRestriction == 'sysop': wikipedia.output(u'The page is protected to the sysop, skipping...') continue elif editRestriction == 'autoconfirmed': wikipedia.output(u'The page is editable only for the autoconfirmed users, skipping...') continue else: wikipedia.output(u'The page is editable for all, deleting the template...') # Only to see if the text is the same or not... oldtext = text # Deleting the template because the page doesn't need it. for replaceToPerform in TTR: text = re.sub('(?:<noinclude>|)%s(?:</noinclude>|)' % replaceToPerform, '', text) if oldtext != text: # Ok, asking if the change has to be performed and do it. wikipedia.output(u"\n\n>>> \03{lightpurple}%s\03{default} <<<" % page.title()) wikipedia.showDiff(oldtext, text) choice = '' while 1: if not always: choice = wikipedia.inputChoice(u'Do you want to accept these changes?', ['Yes', 'No', 'All'], ['y', 'N', 'a'], 'N') if choice.lower() in ['a', 'all']: always = True if choice.lower() in ['n', 'no']: break if choice.lower() in ['y', 'yes'] or always: try: page.put(text, commentUsed) except wikipedia.EditConflict: wikipedia.output(u'Edit conflict! skip!') break except wikipedia.ServerError: # Sometimes there is this error that's quite annoying because # can block the whole process for nothing. errorCount += 1 if errorCount < 5: wikipedia.output(u'Server Error! Wait..') time.sleep(3) continue else: # Prevent Infinite Loops raise wikipedia.ServerError(u'Fifth Server Error!') except wikipedia.SpamfilterError, e: wikipedia.output(u'Cannot change %s because of blacklist entry %s' % (page.title(), e.url)) break except wikipedia.PageNotSaved, error: wikipedia.output(u'Error putting page: %s' % (error.args,)) break except wikipedia.LockedPage: wikipedia.output(u'The page is still protected. Skipping...') break else: # Break only if the errors are one after the other errorCount = 0 break else: wikipedia.output(u'No changes! Strange! Check the regex!') if debug == True: quest = wikipedia.input(u'Do you want to open the page on your browser? [Y]es, [N]o: ') pathWiki = site.family.nicepath(site.lang) url = 'http://%s%s%s' % (wikipedia.getSite().hostname(), pathWiki, page.urlname()) while 1: if quest.lower() in ['y', 'yes']: webbrowser.open(url) break elif quest.lower() in ['n', 'no']: break else: wikipedia.output(u'wrong entry, type "yes" or "no"') continue | abf4497e2da74fe3bbb2c5674cc91256c5ed158b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/abf4497e2da74fe3bbb2c5674cc91256c5ed158b/blockpageschecker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
468,
4444,
310,
326,
5678,
2552,
1542,
12765,
31,
2552,
3150,
18126,
31,
2552,
2879,
31,
2552,
1984,
67,
6387,
329,
309,
642,
18,
4811,
4936,
486,
316,
1984,
67,
6387,
329,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
468,
4444,
310,
326,
5678,
2552,
1542,
12765,
31,
2552,
3150,
18126,
31,
2552,
2879,
31,
2552,
1984,
67,
6387,
329,
309,
642,
18,
4811,
4936,
486,
316,
1984,
67,
6387,
329,
... |
self.addheaders = [('User-Agent', server_version)] | self.addheaders = [('User-agent', server_version)] | def __init__(self): server_version = "Python-urllib/%s" % __version__ self.addheaders = [('User-Agent', server_version)] # manage the individual handlers self.handlers = [] self.handle_open = {} self.handle_error = {} | 097068a20bfbf07c00e3babb07c705119eba42ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/097068a20bfbf07c00e3babb07c705119eba42ac/urllib2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
1438,
67,
1589,
273,
315,
15774,
17,
718,
2941,
5258,
87,
6,
738,
1001,
1589,
972,
365,
18,
1289,
2485,
273,
306,
2668,
1299,
17,
5629,
2187,
1438,
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,
4672,
1438,
67,
1589,
273,
315,
15774,
17,
718,
2941,
5258,
87,
6,
738,
1001,
1589,
972,
365,
18,
1289,
2485,
273,
306,
2668,
1299,
17,
5629,
2187,
1438,
67,... |
self.groupBox_6.setGeometry(QtCore.QRect(10,200,711,131)) | sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.groupBox_6.sizePolicy().hasHeightForWidth()) self.groupBox_6.setSizePolicy(sizePolicy) self.groupBox_6.setMinimumSize(QtCore.QSize(0,121)) | def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(QtCore.QSize(QtCore.QRect(0,0,776,532).size()).expandedTo(MainWindow.minimumSizeHint())) MainWindow.setWindowIcon(QtGui.QIcon(" ")) | 63111e1c9754b5d54a0f7495871ccaf05c2651b1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1108/63111e1c9754b5d54a0f7495871ccaf05c2651b1/main_ui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
13943,
12,
2890,
16,
12740,
3829,
4672,
12740,
3829,
18,
542,
16707,
2932,
6376,
3829,
7923,
12740,
3829,
18,
15169,
12,
23310,
4670,
18,
53,
1225,
12,
23310,
4670,
18,
53,
6120,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
13943,
12,
2890,
16,
12740,
3829,
4672,
12740,
3829,
18,
542,
16707,
2932,
6376,
3829,
7923,
12740,
3829,
18,
15169,
12,
23310,
4670,
18,
53,
1225,
12,
23310,
4670,
18,
53,
6120,
1... |
solution = self.GetSolutionPath() self.Execute(['hammer', '-f', solution, '--clean']) | print "clean not implemented for this platform." | def CleanTargets(self, targets, options): """Cleans the targets.""" solution = self.GetSolutionPath() self.Execute(['hammer', '-f', solution, '--clean']) | a7ad4ba1c73e576e753e9483209664c779854472 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a7ad4ba1c73e576e753e9483209664c779854472/gypbuild.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9645,
9432,
12,
2890,
16,
5774,
16,
702,
4672,
3536,
31948,
326,
5774,
12123,
6959,
273,
365,
18,
967,
16135,
743,
1435,
365,
18,
5289,
12,
3292,
31698,
6592,
2187,
2400,
74,
2187,
6959,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9645,
9432,
12,
2890,
16,
5774,
16,
702,
4672,
3536,
31948,
326,
5774,
12123,
6959,
273,
365,
18,
967,
16135,
743,
1435,
365,
18,
5289,
12,
3292,
31698,
6592,
2187,
2400,
74,
2187,
6959,... |
self.conn.msg(self.target,"Failed to open weather URL!") | self.conn.commands.msg(self.target,"Failed to open weather URL!") | def fetch(self,zip): httpconn = httplib.HTTPConnection('weather.yahooapis.com') httpconn.request('GET', '/forecastrss?p=%s' % zip) r = httpconn.getresponse() if r.status != 200: self.conn.msg(self.target,"Failed to open weather URL!") return | 2b7864e3d464c274457faacdf459f34bb381fc2b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5037/2b7864e3d464c274457faacdf459f34bb381fc2b/weather.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2158,
12,
2890,
16,
4450,
4672,
1062,
4646,
273,
15851,
6673,
18,
3693,
1952,
2668,
1814,
4806,
18,
93,
9795,
5161,
18590,
18,
832,
6134,
1062,
4646,
18,
2293,
2668,
3264,
2187,
1173,
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,
2158,
12,
2890,
16,
4450,
4672,
1062,
4646,
273,
15851,
6673,
18,
3693,
1952,
2668,
1814,
4806,
18,
93,
9795,
5161,
18590,
18,
832,
6134,
1062,
4646,
18,
2293,
2668,
3264,
2187,
1173,
14... |
dbg('ConfigBase::get_item: found in plugin %s (%s)' % ( plugin, self.plugins[plugin][key])) | dbg('ConfigBase::get_item: %s found in plugin %s: %s' % ( key, plugin, self.plugins[plugin][key])) | def get_item(self, key, profile='default', plugin=None): """Look up a configuration item""" dbg('ConfigBase::get_item: %s:%s' % (profile, key)) if self.global_config.has_key(key): dbg('ConfigBase::get_item: found in globals: %s' % self.global_config[key]) return(self.global_config[key]) elif self.profiles[profile].has_key(key): dbg('ConfigBase::get_item: found in profile %s (%s)' % ( profile, self.profiles[profile][key])) return(self.profiles[profile][key]) elif key == 'keybindings': return(self.keybindings) elif plugin is not None and self.plugins[plugin].has_key(key): dbg('ConfigBase::get_item: found in plugin %s (%s)' % ( plugin, self.plugins[plugin][key])) return(self.plugins[plugin][key]) else: raise KeyError('ConfigBase::get_item: unknown key %s' % key) | 14f2522a889c698e69c190644c3738bd4b08154e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6502/14f2522a889c698e69c190644c3738bd4b08154e/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1726,
12,
2890,
16,
498,
16,
3042,
2218,
1886,
2187,
1909,
33,
7036,
4672,
3536,
9794,
731,
279,
1664,
761,
8395,
28966,
2668,
809,
2171,
2866,
588,
67,
1726,
30,
738,
87,
531... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1726,
12,
2890,
16,
498,
16,
3042,
2218,
1886,
2187,
1909,
33,
7036,
4672,
3536,
9794,
731,
279,
1664,
761,
8395,
28966,
2668,
809,
2171,
2866,
588,
67,
1726,
30,
738,
87,
531... |
os.remove(options.outfilename) | try: os.remove(options.outfilename) except OSError: pass | def main(): platform_win32 = sys.platform.startswith("win") if platform_win32: usage = """ | 53104833a64d97d369ce0376c732bb8b4695b9a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2367/53104833a64d97d369ce0376c732bb8b4695b9a7/Main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
4072,
67,
8082,
1578,
273,
2589,
18,
9898,
18,
17514,
1918,
2932,
8082,
7923,
225,
309,
4072,
67,
8082,
1578,
30,
4084,
273,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
4072,
67,
8082,
1578,
273,
2589,
18,
9898,
18,
17514,
1918,
2932,
8082,
7923,
225,
309,
4072,
67,
8082,
1578,
30,
4084,
273,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
os.path.join(execdir, 'doc'), '/usr/doc/python-docs-' + split(sys.version)[0], '/usr/doc/python-' + split(sys.version)[0], '/usr/doc/python-docs-' + sys.version[:3], '/usr/doc/python-' + sys.version[:3], os.path.join(sys.prefix, 'Resources/English.lproj/Documentation')]: if dir and os.path.isdir(os.path.join(dir, 'lib')): | join(execdir, 'doc'), join(sys.prefix, 'doc/python-docs-' + split(sys.version)[0]), join(sys.prefix, 'doc/python-' + split(sys.version)[0]), join(sys.prefix, 'doc/python-docs-' + sys.version[:3]), join(sys.prefix, 'doc/python-' + sys.version[:3]), join(sys.prefix, 'Resources/English.lproj/Documentation')]: if dir and os.path.isdir(join(dir, 'lib')): | def __init__(self, input, output): self.input = input self.output = output self.docdir = None execdir = os.path.dirname(sys.executable) homedir = os.environ.get('PYTHONHOME') for dir in [os.environ.get('PYTHONDOCS'), homedir and os.path.join(homedir, 'doc'), os.path.join(execdir, 'doc'), '/usr/doc/python-docs-' + split(sys.version)[0], '/usr/doc/python-' + split(sys.version)[0], '/usr/doc/python-docs-' + sys.version[:3], '/usr/doc/python-' + sys.version[:3], os.path.join(sys.prefix, 'Resources/English.lproj/Documentation')]: if dir and os.path.isdir(os.path.join(dir, 'lib')): self.docdir = dir | 15c1faa1741dc993564449cd8ec43449f7f82d06 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/15c1faa1741dc993564449cd8ec43449f7f82d06/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
810,
16,
876,
4672,
365,
18,
2630,
273,
810,
365,
18,
2844,
273,
876,
365,
18,
2434,
1214,
273,
599,
1196,
1214,
273,
1140,
18,
803,
18,
12287,
12,
949... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
810,
16,
876,
4672,
365,
18,
2630,
273,
810,
365,
18,
2844,
273,
876,
365,
18,
2434,
1214,
273,
599,
1196,
1214,
273,
1140,
18,
803,
18,
12287,
12,
949... |
substitute_file('configure.in') | substitute_file('configure.ac') | def substitute_file(name): subst = '' f = open(name) for l in f: if '#define LIBTORRENT_VERSION_MAJOR' in l and name.endswith('.hpp'): l = '#define LIBTORRENT_VERSION_MAJOR %d\n' % version[0] elif '#define LIBTORRENT_VERSION_MINOR' in l and name.endswith('.hpp'): l = '#define LIBTORRENT_VERSION_MINOR %d\n' % version[1] elif '#define LIBTORRENT_VERSION_TINY' in l and name.endswith('.hpp'): l = '#define LIBTORRENT_VERSION_TINY %d\n' % version[2] elif '#define LIBTORRENT_VERSION' in l and name.endswith('.hpp'): l = '#define LIBTORRENT_VERSION "%d.%d.%d.%d"\n' % (version[0], version[1], version[2], version[3]) elif 'AC_INIT([libtorrent-rasterbar]' in l and name.endswith('.in'): l = 'AC_INIT([libtorrent-rasterbar], [%d.%d.%d], [arvid@cs.umu.se])\n' % (version[0], version[1], version[2]) elif 'set (VERSION ' in l and name.endswith('.in'): l = 'set (VERSION "%d.%d.%d")\n' % (version[0], version[1], version[2]) elif ':Version: ' in l and name.endswith('.rst'): l = ':Version: %d.%d.%d\n' % (version[0], version[1], version[2]) elif 'VERSION = ' in l and name.endswith('Jamfile'): l = 'VERSION = %d.%d.%d ;\n' % (version[0], version[1], version[2]) subst += l f.close() open(name, 'w+').write(subst) | 1882de79e8ae59f151580687859959e24c1760a7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8308/1882de79e8ae59f151580687859959e24c1760a7/set_version.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14811,
67,
768,
12,
529,
4672,
27750,
273,
875,
284,
273,
1696,
12,
529,
13,
364,
328,
316,
284,
30,
309,
2946,
11255,
23983,
56,
916,
7480,
67,
5757,
67,
26976,
916,
11,
316,
328,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14811,
67,
768,
12,
529,
4672,
27750,
273,
875,
284,
273,
1696,
12,
529,
13,
364,
328,
316,
284,
30,
309,
2946,
11255,
23983,
56,
916,
7480,
67,
5757,
67,
26976,
916,
11,
316,
328,
4... |
self._record_member(tarinfo) | self.members.append(tarinfo) | def addfile(self, tarinfo, fileobj=None): """Add the TarInfo object `tarinfo' to the archive. If `fileobj' is given, tarinfo.size bytes are read from it and added to the archive. You can create TarInfo objects using gettarinfo(). On Windows platforms, `fileobj' should always be opened with mode 'rb' to avoid irritation about the file size. """ self._check("aw") | d0fb0ac63c5db48d344c6e8e8dab57214f04e854 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/d0fb0ac63c5db48d344c6e8e8dab57214f04e854/tarfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
768,
12,
2890,
16,
8232,
1376,
16,
17041,
33,
7036,
4672,
3536,
986,
326,
20334,
966,
733,
1375,
11718,
1376,
11,
358,
326,
5052,
18,
971,
1375,
768,
2603,
11,
353,
864,
16,
8232,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
768,
12,
2890,
16,
8232,
1376,
16,
17041,
33,
7036,
4672,
3536,
986,
326,
20334,
966,
733,
1375,
11718,
1376,
11,
358,
326,
5052,
18,
971,
1375,
768,
2603,
11,
353,
864,
16,
8232,... |
self.menu.Append(wxID_BREAKENABLED, 'Enabled', checkable = true) | self.menu.Append(wxID_BREAKENABLED, 'Enabled', '', true) | def __init__(self, parent, debugger):#, flist, browser): wxListCtrl.__init__(self, parent, wxID_BREAKVIEW, style = wxLC_REPORT | wxLC_SINGLE_SEL ) self.InsertColumn(0, 'Module', wxLIST_FORMAT_LEFT, 90) self.InsertColumn(1, 'Line', wxLIST_FORMAT_CENTER, 40) self.InsertColumn(2, 'Ignore', wxLIST_FORMAT_CENTER, 45) self.InsertColumn(3, 'Hits', wxLIST_FORMAT_CENTER, 45) self.InsertColumn(4, 'Condition', wxLIST_FORMAT_LEFT, 250) | 5970d581342ec17c39816f0b132ba3234ca9600f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/5970d581342ec17c39816f0b132ba3234ca9600f/Debugger.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
19977,
4672,
7,
16,
284,
1098,
16,
4748,
4672,
7075,
682,
12418,
16186,
2738,
972,
12,
2890,
16,
982,
16,
7075,
734,
67,
27960,
12145,
16,
2154,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
982,
16,
19977,
4672,
7,
16,
284,
1098,
16,
4748,
4672,
7075,
682,
12418,
16186,
2738,
972,
12,
2890,
16,
982,
16,
7075,
734,
67,
27960,
12145,
16,
2154,... |
for i in range(plot_points): | for i in range(plot_points+1): | def _call(self, funcs, xrange, parametric=False, polar=False, label='', **kwds): options = dict(self.options) for k, v in kwds.iteritems(): options[k] = v | ac9b3826b125c15136ec1e4292644b1319201e07 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/ac9b3826b125c15136ec1e4292644b1319201e07/plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1991,
12,
2890,
16,
15630,
16,
12314,
16,
579,
1591,
33,
8381,
16,
24244,
33,
8381,
16,
1433,
2218,
2187,
2826,
25577,
4672,
702,
273,
2065,
12,
2890,
18,
2116,
13,
364,
417,
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,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1991,
12,
2890,
16,
15630,
16,
12314,
16,
579,
1591,
33,
8381,
16,
24244,
33,
8381,
16,
1433,
2218,
2187,
2826,
25577,
4672,
702,
273,
2065,
12,
2890,
18,
2116,
13,
364,
417,
16,
... |
Multiplicative Abelian Group isomorphic to C2 x C3 x C5 x C729, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x Z x C2 x C3 x C5 x C64 x C729 generated by [c, e] | Multiplicative Abelian Group isomorphic to C2 x C3 x C5 x C729, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x Z x C30 x C64 x C729 generated by [c, e] | def subgroup(self, gensH, names="f"): """ Create a subgroup of this group. The "big" group must be defined using "named" generators. | 4b76758ecf69f92f14b50ef31dd04f2252c5a26c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/4b76758ecf69f92f14b50ef31dd04f2252c5a26c/abelian_group.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
720,
1655,
12,
2890,
16,
314,
773,
44,
16,
1257,
1546,
74,
6,
4672,
3536,
1788,
279,
720,
1655,
434,
333,
1041,
18,
1021,
315,
14002,
6,
1041,
1297,
506,
2553,
1450,
315,
13188,
6,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
720,
1655,
12,
2890,
16,
314,
773,
44,
16,
1257,
1546,
74,
6,
4672,
3536,
1788,
279,
720,
1655,
434,
333,
1041,
18,
1021,
315,
14002,
6,
1041,
1297,
506,
2553,
1450,
315,
13188,
6,
1... |
rc = os.execl('../../src/syslog-ng', '../../src/syslog-ng', '-f', 'test.conf', '--fd-limit', '1024', '-F', verbose_opt, '-p', 'syslog-ng.pid', '-R', 'syslog-ng.persist', '--no-caps', '--enable-core', '--seed') | module_path = '' for (root, dirs, files) in os.walk(os.path.abspath(os.path.join(os.environ['top_builddir'], 'src'))): module_path = ':'.join(map(lambda x: root + '/' + x, dirs)) break rc = os.execl('../../src/syslog-ng', '../../src/syslog-ng', '-f', 'test.conf', '--fd-limit', '1024', '-F', verbose_opt, '-p', 'syslog-ng.pid', '-R', 'syslog-ng.persist', '--no-caps', '--enable-core', '--seed', '--module-path', module_path) | def start_syslogng(conf, keep_persist=False, verbose=False): global syslogng_pid os.system('rm -f test-*.log test-*.lgs test-*.db wildcard/* log-file') if not keep_persist: os.system('rm -f syslog-ng.persist') if not logstore_store_supported: conf = re.sub('logstore\(.*\);', '', conf) f = open('test.conf', 'w') f.write(conf) f.close() if verbose: verbose_opt = '-edv' else: verbose_opt = '-e' syslogng_pid = os.fork() if syslogng_pid == 0: os.putenv("RANDFILE", "rnd") rc = os.execl('../../src/syslog-ng', '../../src/syslog-ng', '-f', 'test.conf', '--fd-limit', '1024', '-F', verbose_opt, '-p', 'syslog-ng.pid', '-R', 'syslog-ng.persist', '--no-caps', '--enable-core', '--seed') sys.exit(rc) time.sleep(3) print_user("Syslog-ng started") return True | d280ea5be34f05434b4879c760f8939c577aefb1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1177/d280ea5be34f05434b4879c760f8939c577aefb1/control.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
67,
9499,
1330,
3368,
12,
3923,
16,
3455,
67,
19251,
33,
8381,
16,
3988,
33,
8381,
4672,
2552,
16718,
3368,
67,
6610,
225,
1140,
18,
4299,
2668,
8864,
300,
74,
1842,
17,
11146,
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,
787,
67,
9499,
1330,
3368,
12,
3923,
16,
3455,
67,
19251,
33,
8381,
16,
3988,
33,
8381,
4672,
2552,
16718,
3368,
67,
6610,
225,
1140,
18,
4299,
2668,
8864,
300,
74,
1842,
17,
11146,
13... |
id="%s (%s)" % (oid, d['__name__']) | id=d['__name__'] | def f(con, detail=detail, rc=sys.getrefcount): for oid, ob in con._cache.items(): id=oid if hasattr(ob,'__dict__'): d=ob.__dict__ if d.has_key('id'): id="%s (%s)" % (oid, d['id']) elif d.has_key('__name__'): id="%s (%s)" % (oid, d['__name__']) | fb7b9b4dff99b8d898e08be3452fe6ab91e029f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/fb7b9b4dff99b8d898e08be3452fe6ab91e029f9/DB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
12,
591,
16,
7664,
33,
8992,
16,
4519,
33,
9499,
18,
588,
1734,
1883,
4672,
364,
7764,
16,
3768,
316,
356,
6315,
2493,
18,
3319,
13332,
612,
33,
839,
309,
3859,
12,
947,
11189,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
12,
591,
16,
7664,
33,
8992,
16,
4519,
33,
9499,
18,
588,
1734,
1883,
4672,
364,
7764,
16,
3768,
316,
356,
6315,
2493,
18,
3319,
13332,
612,
33,
839,
309,
3859,
12,
947,
11189,
... |
if len(Object.senders) == 0 and Object.current_source == None: | if not self.persistent and len(Object.senders) == 0 and \ Object.current_source == None: | def _name_owner_changed(self, name, old_owner, new_owner): | 222ab4dc0dbc904dbd5c3a7150445be6c9c3f037 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2838/222ab4dc0dbc904dbd5c3a7150445be6c9c3f037/service.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
529,
67,
8443,
67,
6703,
12,
2890,
16,
508,
16,
1592,
67,
8443,
16,
394,
67,
8443,
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,
... | [
1,
1,
1,
1,
1,
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,
389,
529,
67,
8443,
67,
6703,
12,
2890,
16,
508,
16,
1592,
67,
8443,
16,
394,
67,
8443,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
REFERENCE: - [1] Sampo Niskanen and Patric R. J. Östergård, "Cliquer User's Guide, Version 1.0," Communications Laboratory, Helsinki University of Technology, Espoo, Finland, Tech. Rep. T48, 2003. | def clique_maximum(self): """ Returns the vertex set of a maximal order complete subgraph. NOTE: - Currently only implemented for undirected graphs. Use to_undirected to convert a digraph to an undirected graph. ALGORITHM: - This function is based on Cliquer, [1]. REFERENCE: | ff0c9f33534c3168fbe7c717cbfddb40743165ac /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/ff0c9f33534c3168fbe7c717cbfddb40743165ac/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31380,
67,
15724,
12,
2890,
4672,
3536,
2860,
326,
5253,
444,
434,
279,
943,
2840,
1353,
3912,
21469,
18,
225,
5219,
30,
225,
300,
15212,
1338,
8249,
364,
640,
26830,
19422,
18,
2672,
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,
31380,
67,
15724,
12,
2890,
4672,
3536,
2860,
326,
5253,
444,
434,
279,
943,
2840,
1353,
3912,
21469,
18,
225,
5219,
30,
225,
300,
15212,
1338,
8249,
364,
640,
26830,
19422,
18,
2672,
35... | |
del defaults[o] | if defaults.has_key(o): del defaults[o] | def parse_cmdline(argv): lineopts, args = gnu_getopt(argv, opt.GETOPT_SHORT, opt.GETOPT_LONG) opts = {} defaults = {} for o, desc in opt.OPT.items(): if len(desc) < 4: continue defaults[o] = desc[3] for o, v in lineopts: o = opt.OPTS[o] if opt.OPT[o][2] is False: v = True opts[o] = v del defaults[o] return args, opts, defaults | 6172696777f49122b746328d84ebf512a74d243f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2855/6172696777f49122b746328d84ebf512a74d243f/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
4172,
1369,
12,
19485,
4672,
980,
4952,
16,
833,
273,
314,
13053,
67,
588,
3838,
12,
19485,
16,
2153,
18,
3264,
15620,
67,
15993,
16,
2153,
18,
3264,
15620,
67,
14639,
13,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
4172,
1369,
12,
19485,
4672,
980,
4952,
16,
833,
273,
314,
13053,
67,
588,
3838,
12,
19485,
16,
2153,
18,
3264,
15620,
67,
15993,
16,
2153,
18,
3264,
15620,
67,
14639,
13,
15... |
prelude = readLines(f, "%~~vis", True, False, basename) | global currentLine prelude = ( ["// file " + basename + " line " + str(currentLine) + "\n"] + readLines(f, "%~~vis", True, False, basename) ) | def doGen(cmd, args, f, line, basename): #print("doGen: " + cmd + " on " + "!".join(args)); prelude = readLines(f, "%~~vis", True, False, basename) body = readLines(f, "%~~siv", False, True, basename) postlude = readLines(f, "%~~neg", True, False, basename) classname = numberedName(basename) if len(args) >= 1: classname = args[0]; code = "\n".join(prelude + body + postlude) writeX10File(classname, code) | a1c8e2de5f4142cb4f4d63f0b54584c42e915440 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2077/a1c8e2de5f4142cb4f4d63f0b54584c42e915440/excheck.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
7642,
12,
4172,
16,
833,
16,
284,
16,
980,
16,
4882,
4672,
468,
1188,
2932,
2896,
7642,
30,
315,
397,
1797,
397,
315,
603,
315,
397,
23717,
18,
5701,
12,
1968,
10019,
2552,
22325,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7642,
12,
4172,
16,
833,
16,
284,
16,
980,
16,
4882,
4672,
468,
1188,
2932,
2896,
7642,
30,
315,
397,
1797,
397,
315,
603,
315,
397,
23717,
18,
5701,
12,
1968,
10019,
2552,
22325,... |
self._data_channel.send(notification.data) | self._data_channel.send(notification) | def _NH_SIPRegistrationDidSucceed(self, notification): self._data_channel.send(notification.data) | 1ce4656931ae7e7d6ab3871db270975707c62fc8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3449/1ce4656931ae7e7d6ab3871db270975707c62fc8/account.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
50,
44,
67,
17739,
7843,
18250,
55,
5286,
5288,
12,
2890,
16,
3851,
4672,
365,
6315,
892,
67,
4327,
18,
4661,
12,
9927,
18,
892,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
50,
44,
67,
17739,
7843,
18250,
55,
5286,
5288,
12,
2890,
16,
3851,
4672,
365,
6315,
892,
67,
4327,
18,
4661,
12,
9927,
18,
892,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
sqlFlag="True" | sqlFlag = "True" | def setPersistencyFlag( self, userDN, userGroup, persistent = True ): """ Set the proxy PersistentFlag to the flag value """ if persistent: sqlFlag="True" else: sqlFlag="False" retVal = self._query( "SELECT PersistentFlag FROM `ProxyDB_Proxies` WHERE UserDN='%s' AND UserGroup='%s'" % ( userDN, userGroup ) ) sqlInsert = True if retVal[ 'OK' ]: data = retVal[ 'Value' ] if len( data ) > 0: sqlInsert = False if data[0][0] == sqlFlag: return S_OK() if sqlInsert: #If it's not in the db and we're removing the persistency then do nothing if not persistent: return S_OK() cmd = "INSERT INTO `ProxyDB_Proxies` ( UserDN, UserGroup, Pem, ExpirationTime, PersistentFlag ) VALUES " cmd += "( '%s', '%s', '', UTC_TIMESTAMP(), 'True' )" % ( userDN, userGroup ) else: cmd = "UPDATE `ProxyDB_Proxies` SET PersistentFlag='%s' WHERE UserDN='%s' AND UserGroup='%s'" % ( sqlFlag, userDN, userGroup ) | 71763bc5d615265855ff68fdb1be8903192a3f1b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/71763bc5d615265855ff68fdb1be8903192a3f1b/ProxyDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
12771,
2075,
4678,
12,
365,
16,
729,
8609,
16,
26205,
16,
9195,
273,
1053,
262,
30,
3536,
1000,
326,
2889,
11049,
4678,
358,
326,
2982,
460,
3536,
309,
9195,
30,
1847,
4678,
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,
444,
12771,
2075,
4678,
12,
365,
16,
729,
8609,
16,
26205,
16,
9195,
273,
1053,
262,
30,
3536,
1000,
326,
2889,
11049,
4678,
358,
326,
2982,
460,
3536,
309,
9195,
30,
1847,
4678,
273,
... |
(bclient['ip'], bclient['port']) = string.split(bclient['ip'], ':', 1) | ipPortData = string.split(bclient['ip'], ':', 1) bclient['ip'] = ipPortData[0] if len(ipPortData) > 1: bclient['port'] = ipPortData[1] | def OnClientuserinfo(self, action, data, match=None): #2 \ip\145.99.135.227:27960\challenge\-232198920\qport\2781\protocol\68\battleye\1\name\[SNT]^1XLR^78or\rate\8000\cg_predictitems\0\snaps\20\model\sarge\headmodel\sarge\team_model\james\team_headmodel\*james\color1\4\color2\5\handicap\100\sex\male\cl_anonymous\0\teamtask\0\cl_guid\58D4069246865BB5A85F20FB60ED6F65 bclient = self.parseUserInfo(data) # remove spaces from name bclient['name'] = bclient['name'].replace(' ','') | 7f322aa901cee0729b2b76d63105f316340d8cc1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12909/7f322aa901cee0729b2b76d63105f316340d8cc1/iourt41.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
1227,
31271,
12,
2890,
16,
1301,
16,
501,
16,
845,
33,
7036,
4672,
468,
22,
521,
625,
64,
30379,
18,
2733,
18,
26612,
18,
3787,
27,
30,
5324,
29,
4848,
64,
25092,
12907,
22,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
1227,
31271,
12,
2890,
16,
1301,
16,
501,
16,
845,
33,
7036,
4672,
468,
22,
521,
625,
64,
30379,
18,
2733,
18,
26612,
18,
3787,
27,
30,
5324,
29,
4848,
64,
25092,
12907,
22,
15... |
- excample: the Example object that failed | - example: the Example object that failed | def output_difference(self, example, got, optionflags): """ Return a string describing the differences between the expected output for a given example (`example`) and the actual output (`got`). `optionflags` is the set of option flags used to compare `want` and `got`. """ want = example.want # If <BLANKLINE>s are being used, then replace blank lines # with <BLANKLINE> in the actual output string. if not (optionflags & DONT_ACCEPT_BLANKLINE): got = re.sub('(?m)^[ ]*(?=\n)', BLANKLINE_MARKER, got) | e6777d01d5ca3f733b4be35ed8a859e65de5a40c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/e6777d01d5ca3f733b4be35ed8a859e65de5a40c/doctest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
876,
67,
23444,
12,
2890,
16,
3454,
16,
2363,
16,
1456,
7133,
4672,
3536,
2000,
279,
533,
16868,
326,
16440,
3086,
326,
2665,
876,
364,
279,
864,
3454,
21863,
8236,
24065,
471,
326,
3214... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
876,
67,
23444,
12,
2890,
16,
3454,
16,
2363,
16,
1456,
7133,
4672,
3536,
2000,
279,
533,
16868,
326,
16440,
3086,
326,
2665,
876,
364,
279,
864,
3454,
21863,
8236,
24065,
471,
326,
3214... |
if self.url: | if url: | def navigate(self, url): if self.url: self._browser.get_frame().load_uri(url) | 9cb7c3158cef773ad459114dcd0befab658dcc6f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/9cb7c3158cef773ad459114dcd0befab658dcc6f/widgetset.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
28479,
12,
2890,
16,
880,
4672,
309,
880,
30,
365,
6315,
11213,
18,
588,
67,
3789,
7675,
945,
67,
1650,
12,
718,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
28479,
12,
2890,
16,
880,
4672,
309,
880,
30,
365,
6315,
11213,
18,
588,
67,
3789,
7675,
945,
67,
1650,
12,
718,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
""" fl_wincreate(label) -> window ref. | """ fl_wincreate(label) -> window | def fl_wincreate(label): """ fl_wincreate(label) -> window ref. """ retval = _fl_wincreate(label) return retval | 8765c710f695de392f6fc7c664c746ec98668b1d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/8765c710f695de392f6fc7c664c746ec98668b1d/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
8082,
2640,
12,
1925,
4672,
3536,
1183,
67,
8082,
2640,
12,
1925,
13,
317,
2742,
3536,
225,
5221,
273,
389,
2242,
67,
8082,
2640,
12,
1925,
13,
327,
5221,
282,
2,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
8082,
2640,
12,
1925,
4672,
3536,
1183,
67,
8082,
2640,
12,
1925,
13,
317,
2742,
3536,
225,
5221,
273,
389,
2242,
67,
8082,
2640,
12,
1925,
13,
327,
5221,
282,
2,
-100,
-100,... |
class DummySMTPServer(object): """one-time smtp server to test re-injects""" def __init__(self, config,port=11026,address="127.0.0.1"): self.logger=logging.getLogger("dummy.smtpserver") self.logger.debug('Starting dummy SMTP Server on Port %s'%port) self.port=port self.config=config self._socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self._socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) self._socket.bind((address, port)) self._socket.listen(5) self.suspect=None def serve(self): nsd = self._socket.accept() sess=SMTPSession(nsd[0],self.config) success=sess.getincomingmail() if not success: self.logger.error('incoming smtp transfer did not finish') return sess.endsession(250, "OK - queued as 1337 ") fromaddr=sess.from_address toaddr=sess.to_address self.tempfilename=sess.tempfilename self.logger.debug("Message from %s to %s stored to %s"%(fromaddr,toaddr,self.tempfilename)) self.suspect=Suspect(fromaddr,toaddr,self.tempfilename) | def serve(self): threading.currentThread().name='ControlServer Thread' controller=self.controller self.logger.info('Control/Info Server running on port %s'%self.port) while self.stayalive: try: self.logger.debug('Waiting for connection...') nsd = self._socket.accept() if not self.stayalive: break engine = ControlSession(nsd[0],controller) self.logger.debug('Incoming connection from %s'%str(nsd[1])) engine.handlesession() except Exception,e: self.logger.error('Exception in serve(): %s'%str(e)) | d9cf67144abef12545a88c1706b50a28ee7b1e30 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10919/d9cf67144abef12545a88c1706b50a28ee7b1e30/core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12175,
12,
2890,
4672,
17254,
18,
2972,
3830,
7675,
529,
2218,
3367,
2081,
4884,
11,
2596,
33,
2890,
18,
5723,
225,
365,
18,
4901,
18,
1376,
2668,
3367,
19,
966,
3224,
3549,
603,
1756,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12175,
12,
2890,
4672,
17254,
18,
2972,
3830,
7675,
529,
2218,
3367,
2081,
4884,
11,
2596,
33,
2890,
18,
5723,
225,
365,
18,
4901,
18,
1376,
2668,
3367,
19,
966,
3224,
3549,
603,
1756,
... | |
sys.modules['_apache'] = _FakeApache() | sys.modules['mod_python._apache'] = _FakeApache() from mod_python.util import FieldStorage | def __init__(self, q): self.args = q self.method = "GET" return | 9d1b5791fcf7412f4f6d48615ffe15214548d803 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2111/9d1b5791fcf7412f4f6d48615ffe15214548d803/webinterface_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1043,
4672,
365,
18,
1968,
273,
1043,
365,
18,
2039,
273,
315,
3264,
6,
327,
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,
2738,
972,
12,
2890,
16,
1043,
4672,
365,
18,
1968,
273,
1043,
365,
18,
2039,
273,
315,
3264,
6,
327,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
self.Draw(wxClientDC(self)) | self.Draw(wx.ClientDC(self)) | def ToggleLabel(self, state = None): """Toggle the label""" if state is None: self.showLabel = not self.showLabel else: self.showLabel = state self.Draw(wxClientDC(self)) | 52fcf3b1bd3b312d4bcabbeec39d749d73f7be40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/52fcf3b1bd3b312d4bcabbeec39d749d73f7be40/throbber.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
399,
9891,
2224,
12,
2890,
16,
919,
273,
599,
4672,
3536,
17986,
326,
1433,
8395,
309,
919,
353,
599,
30,
365,
18,
4500,
2224,
273,
486,
365,
18,
4500,
2224,
469,
30,
365,
18,
4500,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
399,
9891,
2224,
12,
2890,
16,
919,
273,
599,
4672,
3536,
17986,
326,
1433,
8395,
309,
919,
353,
599,
30,
365,
18,
4500,
2224,
273,
486,
365,
18,
4500,
2224,
469,
30,
365,
18,
4500,
... |
states.append(lx.statestack[:]) | if hasattr(lx, 'statestack'): states.append(lx.statestack[:]) else: states.append(None) | def show_token(tok): reprs = map(repr, tok) print ' ' + reprs[1] + ' ' + ' ' * (29-len(reprs[1])) + reprs[0], if debug_lexer: print ' ' + ' ' * (29-len(reprs[0])) + repr(states[i]), print | aa82d10c79a247547303d83826359f2a0ab11a92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2885/aa82d10c79a247547303d83826359f2a0ab11a92/find_error.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
67,
2316,
12,
17692,
4672,
8480,
87,
273,
852,
12,
12715,
16,
946,
13,
1172,
296,
282,
296,
397,
8480,
87,
63,
21,
65,
397,
296,
296,
397,
296,
296,
380,
261,
5540,
17,
1897,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2316,
12,
17692,
4672,
8480,
87,
273,
852,
12,
12715,
16,
946,
13,
1172,
296,
282,
296,
397,
8480,
87,
63,
21,
65,
397,
296,
296,
397,
296,
296,
380,
261,
5540,
17,
1897,
... |
elif line == '': | elif not line: | def _generate_toc(self): """Generate key-to-(start, stop) table of contents.""" starts, stops = [], [] self._file.seek(0) next_pos = 0 while True: line_pos = next_pos line = self._file.readline() next_pos = self._file.tell() if line.startswith('\001\001\001\001' + os.linesep): starts.append(next_pos) while True: line_pos = next_pos line = self._file.readline() next_pos = self._file.tell() if line == '\001\001\001\001' + os.linesep: stops.append(line_pos - len(os.linesep)) break elif line == '': stops.append(line_pos) break elif line == '': break self._toc = dict(enumerate(zip(starts, stops))) self._next_key = len(self._toc) self._file.seek(0, 2) self._file_length = self._file.tell() | a683ec25cf1492298a60a3f938dbf636c803acef /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/a683ec25cf1492298a60a3f938dbf636c803acef/mailbox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7163,
67,
1391,
12,
2890,
4672,
3536,
4625,
498,
17,
869,
17,
12,
1937,
16,
2132,
13,
1014,
434,
2939,
12123,
2542,
16,
12349,
273,
5378,
16,
5378,
365,
6315,
768,
18,
16508,
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,
389,
7163,
67,
1391,
12,
2890,
4672,
3536,
4625,
498,
17,
869,
17,
12,
1937,
16,
2132,
13,
1014,
434,
2939,
12123,
2542,
16,
12349,
273,
5378,
16,
5378,
365,
6315,
768,
18,
16508,
12,
... |
self.assertEqual(d.items(), []) | self.assertEqual(set(d.items()), set()) | def test_items(self): d = {} self.assertEqual(d.items(), []) | d97ef59cd009e3205fe166ecac3a2935156c382d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/d97ef59cd009e3205fe166ecac3a2935156c382d/test_dict.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3319,
12,
2890,
4672,
302,
273,
2618,
365,
18,
11231,
5812,
12,
72,
18,
3319,
9334,
5378,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3319,
12,
2890,
4672,
302,
273,
2618,
365,
18,
11231,
5812,
12,
72,
18,
3319,
9334,
5378,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.pm.draw_text(self.font,self.GCFullPNMap[aFullPNString],x0,y0+self.ascent,t) self.theWidget.queue_draw_area(x0,y0,self.font.string_width(t),self.ascent+self.descent) | self.pm.draw_text(self.font,self.GCFullPNMap[aFullPNString],int(x0),int(y0+self.ascent),t) self.theWidget.queue_draw_area(int(x0),int(y0),self.font.string_width(t),self.ascent+self.descent) | def drawtext(self,aFullPNString,x0,y0,text): t=str(text) self.pm.draw_text(self.font,self.GCFullPNMap[aFullPNString],x0,y0+self.ascent,t) self.theWidget.queue_draw_area(x0,y0,self.font.string_width(t),self.ascent+self.descent) | 2e4e7c5daa9d6b052171f723237d43de6db2f864 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/2e4e7c5daa9d6b052171f723237d43de6db2f864/Plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
955,
12,
2890,
16,
69,
5080,
15124,
780,
16,
92,
20,
16,
93,
20,
16,
955,
4672,
268,
33,
701,
12,
955,
13,
365,
18,
7755,
18,
9446,
67,
955,
12,
2890,
18,
5776,
16,
2890,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
955,
12,
2890,
16,
69,
5080,
15124,
780,
16,
92,
20,
16,
93,
20,
16,
955,
4672,
268,
33,
701,
12,
955,
13,
365,
18,
7755,
18,
9446,
67,
955,
12,
2890,
18,
5776,
16,
2890,
1... |
if i == 0: return '' | if i == 0: return '' | def commonprefix(m): "Given a list of pathnames, returns the longest common leading component" if not m: return '' prefix = m[0] for item in m: for i in range(len(prefix)): if prefix[:i+1] != item[:i+1]: prefix = prefix[:i] if i == 0: return '' break return prefix | 48d5c66045fe77d7b9b73d9a94f35f2863ee0d26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/48d5c66045fe77d7b9b73d9a94f35f2863ee0d26/posixpath.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2975,
3239,
12,
81,
4672,
315,
6083,
279,
666,
434,
589,
1973,
16,
1135,
326,
12163,
2975,
7676,
1794,
6,
309,
486,
312,
30,
327,
875,
1633,
273,
312,
63,
20,
65,
364,
761,
316,
312,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2975,
3239,
12,
81,
4672,
315,
6083,
279,
666,
434,
589,
1973,
16,
1135,
326,
12163,
2975,
7676,
1794,
6,
309,
486,
312,
30,
327,
875,
1633,
273,
312,
63,
20,
65,
364,
761,
316,
312,... |
for i in range(2,14): | for i in range(2,8): | def ajax_getshares(request): ret = [] if request.method == u'POST': for i in range(2,14): ret.append({'username' : "user" + str(i), 'percent' : i+i}) print "returning ret: ", str(ret) json = simplejson.dumps(ret) print "json object is ", str(json) return HttpResponse(json, mimetype='application/json') | fce57870765d26f99816f348767b6f473c9d6d7b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/fce57870765d26f99816f348767b6f473c9d6d7b/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10733,
67,
588,
30720,
12,
2293,
4672,
325,
273,
5378,
309,
590,
18,
2039,
422,
582,
11,
3798,
4278,
364,
277,
316,
1048,
12,
22,
16,
28,
4672,
325,
18,
6923,
12590,
11,
5053,
11,
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,
10733,
67,
588,
30720,
12,
2293,
4672,
325,
273,
5378,
309,
590,
18,
2039,
422,
582,
11,
3798,
4278,
364,
277,
316,
1048,
12,
22,
16,
28,
4672,
325,
18,
6923,
12590,
11,
5053,
11,
29... |
if not rc.app(): | if not rc.app() or not skin.get_singleton().force_redraw: | def eventhandler(self, event, menuw=None): """ catch OSD_MESSAGE and display it, return False, maybe someone else is watching for the event. """ if event == OSD_MESSAGE: self.poll_counter = 1 self.message = event.arg if not rc.app(): skin.get_singleton().redraw() elif hasattr(rc.app(), 'im_self') and hasattr(rc.app().im_self, 'redraw'): rc.app().im_self.redraw() return False | 7e695ed0963110d49c7d27d84f87d999639dc41a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/7e695ed0963110d49c7d27d84f87d999639dc41a/tiny_osd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
871,
4176,
12,
2890,
16,
871,
16,
3824,
91,
33,
7036,
4672,
3536,
1044,
5932,
40,
67,
8723,
471,
2562,
518,
16,
327,
1083,
16,
6944,
18626,
469,
353,
22917,
364,
326,
871,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
871,
4176,
12,
2890,
16,
871,
16,
3824,
91,
33,
7036,
4672,
3536,
1044,
5932,
40,
67,
8723,
471,
2562,
518,
16,
327,
1083,
16,
6944,
18626,
469,
353,
22917,
364,
326,
871,
18,
3536,
... |
CW.exec_loop() | CW.exec_() | def OpenCraftWindow(self): self.storeItem(self.itemattrlist.get(self.currentTabLabel)) CW = CraftWindow.CraftWindow(self, '', 1) CW.loadItem(self.itemattrlist.get(self.currentTabLabel)) CW.ExpMultiplier.setValue(self.craftMultiplier) CW.exec_loop() self.craftMultiplier = int(CW.ExpMultiplier.value()) self.calculate() self.modified = 1 | b02b1b3c3ce350ce2866d80a832fd61c5ae3b6c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6671/b02b1b3c3ce350ce2866d80a832fd61c5ae3b6c0/ScWindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3502,
39,
5015,
3829,
12,
2890,
4672,
365,
18,
2233,
1180,
12,
2890,
18,
1726,
1747,
1098,
18,
588,
12,
2890,
18,
2972,
5661,
2224,
3719,
385,
59,
273,
11184,
3829,
18,
39,
5015,
3829,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3502,
39,
5015,
3829,
12,
2890,
4672,
365,
18,
2233,
1180,
12,
2890,
18,
1726,
1747,
1098,
18,
588,
12,
2890,
18,
2972,
5661,
2224,
3719,
385,
59,
273,
11184,
3829,
18,
39,
5015,
3829,... |
str = 'ISA*00* *00* *ZZ*ZZ000 *ZZ*ZZ001 *030828*1128*U*00401*000010121*0*T*:~\n' str += 'ZZ*1***~\n' fd = tempfile.NamedTemporaryFile() fd.write(str) | str1 = 'ISA*00* *00* *ZZ*ZZ000 *ZZ*ZZ001 *030828*1128*U*00401*000010121*0*T*:~\n' str1 += 'ZZ*1***~\n' fd = tempfile.NamedTemporaryFile() fd.write(str1) | def test_trailing_ele_delim(self): str = 'ISA*00* *00* *ZZ*ZZ000 *ZZ*ZZ001 *030828*1128*U*00401*000010121*0*T*:~\n' str += 'ZZ*1***~\n' fd = tempfile.NamedTemporaryFile() fd.write(str) fd.seek(0) src = pyx12.x12file.X12file(fd.name) err_cde = None err_str = None for seg in src: if seg.get_seg_id() == 'ZZ': errors = src.pop_errors() if len(errors) > 0: err_cde = errors[0][1] err_str = errors[0][2] self.assertEqual(err_cde, 'SEG1', err_str) | 1433c380fc3bf2e7c5ac05b385e1b69e19134b72 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11528/1433c380fc3bf2e7c5ac05b385e1b69e19134b72/x12file.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
26453,
67,
6516,
67,
23822,
12,
2890,
4672,
609,
21,
273,
296,
5127,
37,
14,
713,
14,
1850,
380,
713,
14,
1850,
380,
27096,
14,
27096,
3784,
1850,
380,
27096,
14,
27096,
1166... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
26453,
67,
6516,
67,
23822,
12,
2890,
4672,
609,
21,
273,
296,
5127,
37,
14,
713,
14,
1850,
380,
713,
14,
1850,
380,
27096,
14,
27096,
3784,
1850,
380,
27096,
14,
27096,
1166... |
self.assertTrue(hunk.type in self.HOST_DIFF_HUNK_TYPES) | self.assertTrue(isinstance(hunk, self.HOST_DIFF_HUNK_TYPES)) | def test_state_change_unknown(self): a = Host() b = Host() a.state = "up" diff = host_diff(a, b) self.assertTrue(len(diff) > 0) for hunk in diff: self.assertTrue(hunk.type in self.HOST_DIFF_HUNK_TYPES) diff = host_diff(b, a) self.assertTrue(len(diff) > 0) for hunk in diff: self.assertTrue(hunk.type in self.HOST_DIFF_HUNK_TYPES) | e100fe985a91dc50454e1b16bae62fa0d722a5a7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6331/e100fe985a91dc50454e1b16bae62fa0d722a5a7/ndifftest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2019,
67,
3427,
67,
8172,
12,
2890,
4672,
279,
273,
4893,
1435,
324,
273,
4893,
1435,
279,
18,
2019,
273,
315,
416,
6,
3122,
273,
1479,
67,
5413,
12,
69,
16,
324,
13,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2019,
67,
3427,
67,
8172,
12,
2890,
4672,
279,
273,
4893,
1435,
324,
273,
4893,
1435,
279,
18,
2019,
273,
315,
416,
6,
3122,
273,
1479,
67,
5413,
12,
69,
16,
324,
13,
365,
... |
("24", _("1 day")), ("72", _("3 days")), ("144", _("6 days")), ("240", _("10 days")), ("720", _("1 month")), | ("24", _("Watched 1 day ago")), ("72", _("Watched 3 days ago")), ("144", _("Watched 6 days ago")), ("240", _("Watched 10 days ago")), ("720", _("Watched 1 month ago")), | def _build_video_expires(channel, grid): grid.pack_label(_("Videos expire after"), grid.ALIGN_RIGHT) expire_options = [ ("system", _("Default (%(expiration)s)", {"expiration": get_formatted_default_expiration()})), ("24", _("1 day")), ("72", _("3 days")), ("144", _("6 days")), ("240", _("10 days")), ("720", _("1 month")), ("never", _("never")) ] expire_values = [e[0] for e in expire_options] expire_combo = widgetset.OptionMenu([e[1] for e in expire_options]) if channel.expire == "system": selected = expire_values.index("system") elif channel.expire == "never": selected = expire_values.index("never") else: try: selected = expire_values.index(str(channel.expire_time)) except ValueError: selected = 0 expire_combo.set_selected(selected) def expire_changed(widget, index): value = expire_options[index][0] if value == "system": expire_type = "system" expire_time = config.get(prefs.EXPIRE_AFTER_X_DAYS) elif value == "never": expire_type = "never" expire_time = 0 else: expire_type = "feed" expire_time = int(value) messages.SetChannelExpire(channel, expire_type, expire_time).send_to_backend() expire_combo.connect('changed', expire_changed) grid.pack(expire_combo) | 4edfff305ac9febd20e9bc487fec3f6b70150965 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/4edfff305ac9febd20e9bc487fec3f6b70150965/channelsettingspanel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3510,
67,
9115,
67,
12431,
12,
4327,
16,
3068,
4672,
3068,
18,
2920,
67,
1925,
24899,
2932,
58,
19871,
6930,
1839,
6,
3631,
3068,
18,
26439,
67,
11847,
13,
6930,
67,
2116,
273,
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,
389,
3510,
67,
9115,
67,
12431,
12,
4327,
16,
3068,
4672,
3068,
18,
2920,
67,
1925,
24899,
2932,
58,
19871,
6930,
1839,
6,
3631,
3068,
18,
26439,
67,
11847,
13,
6930,
67,
2116,
273,
30... |
end_time. | end_time. | def WriteAnnotation(self, key, value): """Writes the annotation to the annotation file. If the key is already present with a different value, the value becomes a list and the new value is appended to it, except for start_time and end_time. """ # Initialize the annotation dict from the file (if present) if os.path.exists(self._annotationsFile): annotations = json.load(open(self._annotationsFile)) else: annotations = {} # hack because we do not have proper JSON support key, value = map(str, [key, value]) if key == "qmtest.run.start_time": # Special handling of the start time: # if we are updating a result, we have to keep the original start # time, but remove the original end time to mark the report to be # in progress. if key not in annotations: annotations[key] = value if "qmtest.run.end_time" in annotations: del annotations["qmtest.run.end_time"] else: # All other annotations are added to a list if key in annotations: old = annotations[key] if type(old) is list: if value not in old: annotations[key].append(value) elif value != old: annotations[key] = [old, value] else: annotations[key] = value # Write the new annotations file json.dump(annotations, open(self._annotationsFile, "w"), sort_keys = True) | 2fa638037c5796105293905450ff04c814893ed4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9140/2fa638037c5796105293905450ff04c814893ed4/GaudiTest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2598,
3257,
12,
2890,
16,
498,
16,
460,
4672,
3536,
8368,
326,
3204,
358,
326,
3204,
585,
18,
971,
326,
498,
353,
1818,
3430,
598,
279,
3775,
460,
16,
326,
460,
12724,
279,
666,
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,
2598,
3257,
12,
2890,
16,
498,
16,
460,
4672,
3536,
8368,
326,
3204,
358,
326,
3204,
585,
18,
971,
326,
498,
353,
1818,
3430,
598,
279,
3775,
460,
16,
326,
460,
12724,
279,
666,
471,
... |
t = string.join(L, "") | t = ''.join(L) | def compileComponent(self, parsedText, program): import types ttext = type(parsedText) #program = self.program if ttext is types.StringType: # handle special characters here... # short cut if parsedText: stext = parsedText.strip() #string.strip(parsedText) if not stext: program.append(" ") # contract whitespace to single space else: handleSpecialCharacters(self, parsedText, program) elif ttext is types.ListType: for e in parsedText: self.compileComponent(e, program) elif ttext is types.TupleType: (tagname, attdict, content, extra) = parsedText if not attdict: attdict = {} compilername = "compile_"+tagname compiler = getattr(self, compilername, None) if compiler is not None: compiler(attdict, content, extra, program) else: # just pass the tag through if debug: L = [ "<" + tagname ] a = L.append if not attdict: attdict = {} for (k, v) in attdict.items(): a(" %s=%s" % (k,v)) if content: a(">") a(str(content)) a("</%s>" % tagname) else: a("/>") t = string.join(L, "") handleSpecialCharacters(self, t, program) else: raise ValueError, "don't know how to handle tag " + repr(tagname) | a9fe2a25d7fcc8f510447cdecc4f6473c43d80f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/a9fe2a25d7fcc8f510447cdecc4f6473c43d80f7/para.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4074,
1841,
12,
2890,
16,
2707,
1528,
16,
5402,
4672,
1930,
1953,
268,
955,
273,
618,
12,
10817,
1528,
13,
468,
12890,
273,
365,
18,
12890,
309,
268,
955,
353,
1953,
18,
780,
559,
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,
4074,
1841,
12,
2890,
16,
2707,
1528,
16,
5402,
4672,
1930,
1953,
268,
955,
273,
618,
12,
10817,
1528,
13,
468,
12890,
273,
365,
18,
12890,
309,
268,
955,
353,
1953,
18,
780,
559,
30,
... |
if forceload and path in sys.modules: if path not in sys.builtin_module_names: info = inspect.getmoduleinfo(sys.modules[path].__file__) if info[3] != imp.C_EXTENSION: cache[path] = sys.modules[path] del sys.modules[path] | def safeimport(path, forceload=0, cache={}): """Import a module; handle errors; return None if the module isn't found. If the module *is* found but an exception occurs, it's wrapped in an ErrorDuringImport exception and reraised. Unlike __import__, if a package path is specified, the module at the end of the path is returned, not the package at the beginning. If the optional 'forceload' argument is 1, we reload the module from disk (unless it's a dynamic extension).""" if forceload and path in sys.modules: # This is the only way to be sure. Checking the mtime of the file # isn't good enough (e.g. what if the module contains a class that # inherits from another module that has changed?). if path not in sys.builtin_module_names: # Python never loads a dynamic extension a second time from the # same path, even if the file is changed or missing. Deleting # the entry in sys.modules doesn't help for dynamic extensions, # so we're not even going to try to keep them up to date. info = inspect.getmoduleinfo(sys.modules[path].__file__) if info[3] != imp.C_EXTENSION: cache[path] = sys.modules[path] # prevent module from clearing del sys.modules[path] try: module = __import__(path) except: # Did the error occur before or after the module was found? (exc, value, tb) = info = sys.exc_info() if path in sys.modules: # An error occurred while executing the imported module. raise ErrorDuringImport(sys.modules[path].__file__, info) elif exc is SyntaxError: # A SyntaxError occurred before we could execute the module. raise ErrorDuringImport(value.filename, info) elif exc is ImportError and \ split(lower(str(value)))[:2] == ['no', 'module']: # The module was not found. return None else: # Some other error occurred during the importing process. raise ErrorDuringImport(path, sys.exc_info()) for part in split(path, '.')[1:]: try: module = getattr(module, part) except AttributeError: return None return module | c86b1fee933b21417893cef4f73647f7a8f38768 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/c86b1fee933b21417893cef4f73647f7a8f38768/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4183,
5666,
12,
803,
16,
364,
2183,
6189,
33,
20,
16,
1247,
12938,
4672,
3536,
5010,
279,
1605,
31,
1640,
1334,
31,
327,
599,
309,
326,
1605,
5177,
1404,
1392,
18,
225,
971,
326,
1605,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4183,
5666,
12,
803,
16,
364,
2183,
6189,
33,
20,
16,
1247,
12938,
4672,
3536,
5010,
279,
1605,
31,
1640,
1334,
31,
327,
599,
309,
326,
1605,
5177,
1404,
1392,
18,
225,
971,
326,
1605,... | |
self.old_lock = h5py.config.RLock h5py.config.RLock = LOCKTYPE | self.old_lock = h5py.config.lock h5py.config.lock = LOCKTYPE() | def setUp(self): | 2c7309a9b49c12fcf7bd62f7147a79ef94a81fff /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10380/2c7309a9b49c12fcf7bd62f7147a79ef94a81fff/test_threads.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
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,
24292,
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,
... |
uf.userSetPassword(user.getUserName(), password) | uf.userSetPassword(user.getUserId(), password) | def resetPassword(self, userid, randomstring, password): """Set the password (in 'password') for the user who maps to the string in 'randomstring' iff the entered 'userid' is equal to the mapped userid. (This can be turned off with the 'toggleUserCheck' method.) | d31a0f56db36e3eba0308239b5f7d545c59880ce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12219/d31a0f56db36e3eba0308239b5f7d545c59880ce/PasswordResetTool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2715,
3913,
12,
2890,
16,
6709,
16,
2744,
1080,
16,
2201,
4672,
3536,
694,
326,
2201,
261,
267,
296,
3664,
6134,
364,
326,
729,
10354,
7565,
358,
326,
533,
316,
296,
9188,
1080,
11,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2715,
3913,
12,
2890,
16,
6709,
16,
2744,
1080,
16,
2201,
4672,
3536,
694,
326,
2201,
261,
267,
296,
3664,
6134,
364,
326,
729,
10354,
7565,
358,
326,
533,
316,
296,
9188,
1080,
11,
21... |
lines = text.split('\n') lines = map(lambda line, prefix=prefix: prefix + line, lines) | lines = [prefix + line for line in text.split('\n')] | def indent(self, text, prefix=' '): """Indent text by prepending a given prefix to each line.""" if not text: return '' lines = text.split('\n') lines = map(lambda line, prefix=prefix: prefix + line, lines) if lines: lines[-1] = lines[-1].rstrip() return '\n'.join(lines) | 72e110c1cdf1ab187b0799cca788748484556028 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/72e110c1cdf1ab187b0799cca788748484556028/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3504,
12,
2890,
16,
977,
16,
1633,
2218,
565,
296,
4672,
3536,
7790,
977,
635,
8254,
310,
279,
864,
1633,
358,
1517,
980,
12123,
309,
486,
977,
30,
327,
875,
2362,
273,
306,
3239,
397,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3504,
12,
2890,
16,
977,
16,
1633,
2218,
565,
296,
4672,
3536,
7790,
977,
635,
8254,
310,
279,
864,
1633,
358,
1517,
980,
12123,
309,
486,
977,
30,
327,
875,
2362,
273,
306,
3239,
397,... |
cl=xmpp.Client(jid.getDomain(),debug=[]) | cl=xmpp.Client(jid.getDomain(),debug=["dispatcher"]) | def xmpp_presence(self, conn, presence_node): #print presence_node if presence_node.getFrom().bareMatch(self.remotejid): if presence_node.getType() == 'subscribe': replypres=xmpp.Presence(typ='subscribed',to=presence_node.getFrom()) conn.send(replypres) replypres.setType('subscribe') conn.send(replypres) elif presence_node.getType() == 'probe': replypres = xmpp.Presence(to=presence_node.getFrom(), show='chat', status=self.presencestr) conn.send(replypres) elif ((not presence_node.getShow() is None) and \ presence_node.getShow != '') : pass #sys.stdout.write("*** Status: " + presence_node.getShow() + "\n") | 4e9a72d68317b800e23a7b28a1d97f6a98afc190 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14053/4e9a72d68317b800e23a7b28a1d97f6a98afc190/ax25xmpp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
619,
24109,
67,
21731,
12,
2890,
16,
1487,
16,
9805,
67,
2159,
4672,
468,
1188,
9805,
67,
2159,
309,
9805,
67,
2159,
18,
588,
1265,
7675,
70,
834,
2060,
12,
2890,
18,
7222,
18252,
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,
619,
24109,
67,
21731,
12,
2890,
16,
1487,
16,
9805,
67,
2159,
4672,
468,
1188,
9805,
67,
2159,
309,
9805,
67,
2159,
18,
588,
1265,
7675,
70,
834,
2060,
12,
2890,
18,
7222,
18252,
4672... |
locale_len = len(time.strftime("%x %X", time.localtime(0))) | locale_len = len(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(0))) | def debugstate(ui, repo): """show the contents of the current dirstate""" k = repo.dirstate._map.items() k.sort() for file_, ent in k: if ent[3] == -1: # Pad or slice to locale representation locale_len = len(time.strftime("%x %X", time.localtime(0))) timestr = 'unset' timestr = timestr[:locale_len] + ' '*(locale_len - len(timestr)) else: timestr = time.strftime("%x %X", time.localtime(ent[3])) if ent[1] & 020000: mode = 'lnk' else: mode = '%3o' % (ent[1] & 0777) ui.write("%c %s %10d %s %s\n" % (ent[0], mode, ent[2], timestr, file_)) for f in repo.dirstate.copies(): ui.write(_("copy: %s -> %s\n") % (repo.dirstate.copied(f), f)) | 9b008ae7eaeb7c22612e739acd68e24587005594 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/9b008ae7eaeb7c22612e739acd68e24587005594/commands.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1198,
2019,
12,
4881,
16,
3538,
4672,
3536,
4500,
326,
2939,
434,
326,
783,
302,
920,
340,
8395,
417,
273,
3538,
18,
72,
920,
340,
6315,
1458,
18,
3319,
1435,
417,
18,
3804,
1435,
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,
1198,
2019,
12,
4881,
16,
3538,
4672,
3536,
4500,
326,
2939,
434,
326,
783,
302,
920,
340,
8395,
417,
273,
3538,
18,
72,
920,
340,
6315,
1458,
18,
3319,
1435,
417,
18,
3804,
1435,
364,... |
"""Apply ModelView transformations""" | """ Apply ModelView transformations you will most likely want to wrap calls to this function with glPushMatrix/glPopMatrix """ | def transform( self ): """Apply ModelView transformations""" x,y = director.get_window_size() | d6a2243c8d0d185e924aa6e5519cc6eb3aba2e53 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7473/d6a2243c8d0d185e924aa6e5519cc6eb3aba2e53/cocosnode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2510,
12,
365,
262,
30,
3536,
5534,
3164,
1767,
19245,
1846,
903,
4486,
10374,
2545,
358,
2193,
4097,
358,
333,
445,
598,
5118,
7621,
4635,
19,
7043,
7049,
4635,
3536,
619,
16,
93,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2510,
12,
365,
262,
30,
3536,
5534,
3164,
1767,
19245,
1846,
903,
4486,
10374,
2545,
358,
2193,
4097,
358,
333,
445,
598,
5118,
7621,
4635,
19,
7043,
7049,
4635,
3536,
619,
16,
93,
273,
... |
m = m / max | m = m / flat_max | def createMasterFits(self,of,files): """Process acquired flat images.""" import numpy import os import pyfits | de2ac916b23a131fddd9179aa49e100dc5ee426e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6334/de2ac916b23a131fddd9179aa49e100dc5ee426e/flats.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
7786,
42,
1282,
12,
2890,
16,
792,
16,
2354,
4672,
3536,
2227,
20598,
3569,
4602,
12123,
1930,
3972,
1930,
1140,
1930,
2395,
18352,
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,
0,
0,
0,
0,
0,
0,
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,
752,
7786,
42,
1282,
12,
2890,
16,
792,
16,
2354,
4672,
3536,
2227,
20598,
3569,
4602,
12123,
1930,
3972,
1930,
1140,
1930,
2395,
18352,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
sage: QQ(1/2) * vector(ZZ[x][y],[1,2,3,4]) | sage: QQ(1/2) * vector(ZZ['x']['y'],[1,2,3,4]) | def is_submodule(self, other): """ Copied from FreeModule_generic_pid It only works partially since basis() is not implemented in general Trivial cases are already useful for coercion, e.g. sage: QQ(1/2) * vector(ZZ[x][y],[1,2,3,4]) (1/2, 1, 3/2, 2) sage: vector(ZZ[x][y],[1,2,3,4]) * QQ(1/2) (1/2, 1, 3/2, 2) """ if not isinstance(other, FreeModule_generic): return False if self.ambient_vector_space() != other.ambient_vector_space(): return False if other == other.ambient_vector_space(): return True if other.rank() < self.rank(): return False if self.base_ring() != other.base_ring(): try: if not self.base_ring().is_subring(other.base_ring()): return False except NotImplementedError: return False for b in self.basis(): if not (b in other): return False return True | ade817eb50cd7e7679a090a7aedf0b8eb213d5ba /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/ade817eb50cd7e7679a090a7aedf0b8eb213d5ba/free_module.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
1717,
2978,
12,
2890,
16,
1308,
4672,
3536,
28506,
2092,
628,
15217,
3120,
67,
13540,
67,
6610,
2597,
1338,
6330,
19976,
3241,
10853,
1435,
353,
486,
8249,
316,
7470,
840,
20109,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
1717,
2978,
12,
2890,
16,
1308,
4672,
3536,
28506,
2092,
628,
15217,
3120,
67,
13540,
67,
6610,
2597,
1338,
6330,
19976,
3241,
10853,
1435,
353,
486,
8249,
316,
7470,
840,
20109,
... |
self.connect("confirm-overwrite", self.__cb_confirm_overwrite) def __cb_confirm_overwrite(self, widget, data = None): "Handles confirm-overwrite signals" try: FileReplace(self, io.file_normpath(self.get_uri())).run() except: return gtk.FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN else: return gtk.FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME | def __init__(self, parent): FileSelector.__init__( self, parent, _('Select File to Save to'), gtk.FILE_CHOOSER_ACTION_SAVE, gtk.STOCK_SAVE ) | dd18cc846c5f3e58f6ab758e33e05fff6e16d554 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/dd18cc846c5f3e58f6ab758e33e05fff6e16d554/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
4672,
1387,
4320,
16186,
2738,
972,
12,
365,
16,
982,
16,
389,
2668,
3391,
1387,
358,
7074,
358,
19899,
22718,
18,
3776,
67,
22213,
51,
2123,
67,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
4672,
1387,
4320,
16186,
2738,
972,
12,
365,
16,
982,
16,
389,
2668,
3391,
1387,
358,
7074,
358,
19899,
22718,
18,
3776,
67,
22213,
51,
2123,
67,
12... | |
if self.splitters.has_key(pkg.get('type')): | if self.splitters.has_key(pkg.get('type')) and pkg.get('file') != None: | def __init__(self, data, pdict, parent=None): # copy local attributes to all child nodes if no local attribute exists if not pdict.has_key('Package'): pdict['Package'] = [] for child in data.getchildren(): for attr in [key for key in data.attrib.keys() if key != 'name' and not child.attrib.has_key(key)]: child.set(attr, data.get(attr)) Bcfg2.Server.Plugin.INode.__init__(self, data, pdict, parent) if not self.contents.has_key('Package'): self.contents['Package'] = {} for pkg in data.findall('./Package'): if pkg.attrib.has_key('name') and pkg.get('name') not in pdict['Package']: pdict['Package'].append(pkg.get('name')) if pkg.attrib.has_key('simplefile'): pkg.set('url', "%s/%s" % (pkg.get('uri'), pkg.get('simplefile'))) self.contents['Package'][pkg.get('name')] = pkg.attrib else: if pkg.attrib.has_key('file'): pkg.set('url', '%s/%s' % (pkg.get('uri'), pkg.get('file'))) if self.splitters.has_key(pkg.get('type')): mdata = self.splitters[pkg.get('type')].match(pkg.get('file')) if not mdata: logger.error("Failed to match pkg %s" % pkg.get('file')) continue pkgname = mdata.group('name') self.contents['Package'][pkgname] = mdata.groupdict() if pkg.attrib.get('file'): self.contents['Package'][pkgname]['url'] = pkg.get('url') self.contents['Package'][pkgname]['type'] = pkg.get('type') if pkgname not in pdict['Package']: pdict['Package'].append(pkgname) else: self.contents['Package'][pkg.get('name')] = pkg.attrib | 74a93ea79f568b61e17c0eddf519c895bcdb249e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/74a93ea79f568b61e17c0eddf519c895bcdb249e/Pkgmgr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
501,
16,
293,
1576,
16,
982,
33,
7036,
4672,
468,
1610,
1191,
1677,
358,
777,
1151,
2199,
309,
1158,
1191,
1566,
1704,
309,
486,
293,
1576,
18,
5332,
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,
501,
16,
293,
1576,
16,
982,
33,
7036,
4672,
468,
1610,
1191,
1677,
358,
777,
1151,
2199,
309,
1158,
1191,
1566,
1704,
309,
486,
293,
1576,
18,
5332,
67,... |
entry = vocab2row(defn, []) | if 'other' in defn: entry = ['other', defn['other']] else: entry = vocab2row(defn, []) | def vocab2row(vocab, default=None): if vocab: if 'error' in vocab: return ['ERROR', vocab['error']] else: return [vocab['short'], vocab['long'], vocab['defn']] | 537906f2a7418a1f0d4f2c6c7c9e323892da3e44 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12122/537906f2a7418a1f0d4f2c6c7c9e323892da3e44/metadata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9623,
22,
492,
12,
15913,
16,
805,
33,
7036,
4672,
309,
9623,
30,
309,
296,
1636,
11,
316,
9623,
30,
327,
10228,
3589,
2187,
9623,
3292,
1636,
3546,
65,
469,
30,
327,
306,
15913,
3292,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9623,
22,
492,
12,
15913,
16,
805,
33,
7036,
4672,
309,
9623,
30,
309,
296,
1636,
11,
316,
9623,
30,
327,
10228,
3589,
2187,
9623,
3292,
1636,
3546,
65,
469,
30,
327,
306,
15913,
3292,... |
def get_media_internal (request, path, use_cache=True) : | def get_media_internal (request, path, use_cache=True, force_mimetype=None) : | def get_media_internal (request, path, use_cache=True) : # get media type mimetype = mimetypes.guess_type(path)[0] contents = get_mime_handler(mimetype)(request, file(path, "rb"), path=path) return ( contents, mimetype, 200, rfc822.formatdate(os.stat(path)[stat.ST_MTIME]), ) | 118e8e2c4fddd63f6cf6650853c68cb0b173aa7b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4349/118e8e2c4fddd63f6cf6650853c68cb0b173aa7b/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
5829,
67,
7236,
261,
2293,
16,
589,
16,
999,
67,
2493,
33,
5510,
16,
2944,
67,
22571,
33,
7036,
13,
294,
468,
336,
3539,
618,
12595,
273,
20369,
15180,
18,
20885,
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,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
5829,
67,
7236,
261,
2293,
16,
589,
16,
999,
67,
2493,
33,
5510,
16,
2944,
67,
22571,
33,
7036,
13,
294,
468,
336,
3539,
618,
12595,
273,
20369,
15180,
18,
20885,
67,
723,
1... |
if not anchor =='start': | if not anchor=='start': | def _text2PathDescription(text, x=0, y=0, fontName='Times-Roman', fontSize=1000, anchor='start', truncate=1, pathReverse=0): global _gs if not _gs: import _renderPM _gs = _renderPM.gstate(1,1) from reportlab.graphics import renderPM renderPM._setFont(_gs,fontName,fontSize) P = [] if not anchor =='start': textLen = stringWidth(text, fontName,fontSize) if text_anchor=='end': x = x-textLen elif text_anchor=='middle': x = x - textLen/2. for g in _gs._stringPath(text,x,y): P.extend(_processGlyph(g,truncate=truncate,pathReverse=pathReverse)) return P | 0367606c39861c59a7816eada013ab3511b78c87 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7053/0367606c39861c59a7816eada013ab3511b78c87/textlabels.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
955,
22,
743,
3291,
12,
955,
16,
619,
33,
20,
16,
677,
33,
20,
16,
3512,
461,
2218,
10694,
17,
54,
362,
304,
2187,
16746,
33,
18088,
16,
6984,
2218,
1937,
2187,
10310,
33,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
955,
22,
743,
3291,
12,
955,
16,
619,
33,
20,
16,
677,
33,
20,
16,
3512,
461,
2218,
10694,
17,
54,
362,
304,
2187,
16746,
33,
18088,
16,
6984,
2218,
1937,
2187,
10310,
33,
21,
... |
def get(self, key, default=None): | def __contains__(self, key): return self.get(key, _marker) is not _marker def __setitem__(self, key, value): foundStack = False | def get(self, key, default=None): for resourceManager in self.resourceResolutionOrder(): if key in resourceManager._resources: return resourceManager._resources[key] return default | 4649aa3564f7038dfa483cff707f2603f3ac622b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12263/4649aa3564f7038dfa483cff707f2603f3ac622b/layer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12298,
972,
12,
2890,
16,
498,
4672,
327,
365,
18,
588,
12,
856,
16,
389,
11145,
13,
353,
486,
389,
11145,
225,
1652,
1001,
542,
1726,
972,
12,
2890,
16,
498,
16,
460,
4672,
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,
1001,
12298,
972,
12,
2890,
16,
498,
4672,
327,
365,
18,
588,
12,
856,
16,
389,
11145,
13,
353,
486,
389,
11145,
225,
1652,
1001,
542,
1726,
972,
12,
2890,
16,
498,
16,
460,
4672,
13... |
print 'UnitCell not found, there are probably no atoms in ',ncfile | def read_only_atoms(self,ncfile): '''read only the atoms from an existing netcdf file. Used to initialize a calculator from a ncfilename. | 1b61135a666dd666fd01da23019c007519f625f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1380/1b61135a666dd666fd01da23019c007519f625f4/jacapo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
3700,
67,
14937,
12,
2890,
16,
14202,
768,
4672,
9163,
896,
1338,
326,
9006,
628,
392,
2062,
2901,
24799,
585,
18,
10286,
358,
4046,
279,
15497,
628,
279,
8194,
3459,
18,
2,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
3700,
67,
14937,
12,
2890,
16,
14202,
768,
4672,
9163,
896,
1338,
326,
9006,
628,
392,
2062,
2901,
24799,
585,
18,
10286,
358,
4046,
279,
15497,
628,
279,
8194,
3459,
18,
2,
-... | |
path = os.path.join(d, filename) | path = d + '/' + filename | def findIDL(includePath, irregularFilenames, interfaceName): filename = irregularFilenames.get(interfaceName, interfaceName) + '.idl' for d in includePath: path = os.path.join(d, filename) if os.path.exists(path): return path raise UserError("No IDL file found for interface %s " "in include path %r" % (interfaceName, includePath)) | 147d080563ae6b92c545b0d66e87634c127f3305 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11102/147d080563ae6b92c545b0d66e87634c127f3305/qsgen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
734,
48,
12,
6702,
743,
16,
9482,
16819,
25579,
6809,
16,
24088,
4672,
1544,
273,
9482,
16819,
25579,
6809,
18,
588,
12,
5831,
461,
16,
24088,
13,
397,
2418,
350,
80,
11,
364,
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,
1104,
734,
48,
12,
6702,
743,
16,
9482,
16819,
25579,
6809,
16,
24088,
4672,
1544,
273,
9482,
16819,
25579,
6809,
18,
588,
12,
5831,
461,
16,
24088,
13,
397,
2418,
350,
80,
11,
364,
30... |
""" | """ | def flimage_free(pImage): """ flimage_free(pImage) -> num. """ retval = _flimage_free(pImage) return retval | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
2730,
67,
9156,
12,
84,
2040,
4672,
3536,
1183,
2730,
67,
9156,
12,
84,
2040,
13,
317,
818,
18,
3536,
225,
5221,
273,
389,
2242,
2730,
67,
9156,
12,
84,
2040,
13,
327,
5221,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1183,
2730,
67,
9156,
12,
84,
2040,
4672,
3536,
1183,
2730,
67,
9156,
12,
84,
2040,
13,
317,
818,
18,
3536,
225,
5221,
273,
389,
2242,
2730,
67,
9156,
12,
84,
2040,
13,
327,
5221,
28... |
PROFILE = True | PROFILE = False | def print_times(self): times = [(e-s,t) for (t,s,e) in self._times] times.sort() total = sum([time for (time, task) in times]) for (time, task) in times: task = task[:31] print '%s%s %.4f secs' % (task, '.'*(35-len(task)), time), print '|'+'=' * min(30,int(50*time/total)) | c0aafe2a557778dc005757711d589d7564d970ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/c0aafe2a557778dc005757711d589d7564d970ac/cli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
8293,
12,
2890,
4672,
4124,
273,
306,
12,
73,
17,
87,
16,
88,
13,
364,
261,
88,
16,
87,
16,
73,
13,
316,
365,
6315,
8293,
65,
4124,
18,
3804,
1435,
2078,
273,
2142,
3816,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8293,
12,
2890,
4672,
4124,
273,
306,
12,
73,
17,
87,
16,
88,
13,
364,
261,
88,
16,
87,
16,
73,
13,
316,
365,
6315,
8293,
65,
4124,
18,
3804,
1435,
2078,
273,
2142,
3816,... |
return ButlerLocation(None, None, "PickleStorage", path, None) | return ButlerLocation(None, None, "PickleStorage", path, {}) | def map_satPixelSet(self, dataId): pathId = self._needFilter(dataId) path = os.path.join(self.root, self.satPixelSetTemplate % pathId) return ButlerLocation(None, None, "PickleStorage", path, None) | 970d4cd14c0ef9f670947fce17f7e1a1c7d1857e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6940/970d4cd14c0ef9f670947fce17f7e1a1c7d1857e/cfhtMapper.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
852,
67,
12973,
9037,
694,
12,
2890,
16,
501,
548,
4672,
589,
548,
273,
365,
6315,
14891,
1586,
12,
892,
548,
13,
589,
273,
1140,
18,
803,
18,
5701,
12,
2890,
18,
3085,
16,
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,
852,
67,
12973,
9037,
694,
12,
2890,
16,
501,
548,
4672,
589,
548,
273,
365,
6315,
14891,
1586,
12,
892,
548,
13,
589,
273,
1140,
18,
803,
18,
5701,
12,
2890,
18,
3085,
16,
365,
18,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.