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 |
|---|---|---|---|---|---|---|
for k in modified: if self.cachable(k): del self.cache[k] | keys = [k for k in modified if self.cachable(k)] self.cache.delete_many(keys) | def write(self, super, sitename, data): import simplejson response_str = super.write(sitename, data) response = simplejson.loads(response_str) if response['status'] == 'ok': result = response['result'] modified = result['created'] + result['updated'] for k in modified: if self.cachable(k): del self.cache[k] return response_str | 4cac3a046702fa3ea13837da305bfec03534c5d3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3913/4cac3a046702fa3ea13837da305bfec03534c5d3/ol.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
2240,
16,
10982,
1069,
16,
501,
4672,
1930,
4143,
1977,
766,
67,
701,
273,
2240,
18,
2626,
12,
25404,
1069,
16,
501,
13,
225,
766,
273,
4143,
1977,
18,
17135,
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,
1045,
12,
2890,
16,
2240,
16,
10982,
1069,
16,
501,
4672,
1930,
4143,
1977,
766,
67,
701,
273,
2240,
18,
2626,
12,
25404,
1069,
16,
501,
13,
225,
766,
273,
4143,
1977,
18,
17135,
12,
... |
logkpr('conffile of ' + username + 'exists') | logkpr('conffile of ' + username + ' exists') | def fromtoday(fname): #Is the file today's? fdate = strftime("%Y%m%d", localtime(getmtime(fname))) today = strftime("%Y%m%d", localtime()) return fdate == today | 7720d11da18259040351f202afd7f2206efb4ae7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1574/7720d11da18259040351f202afd7f2206efb4ae7/timekpr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
628,
30064,
12,
12749,
4672,
468,
2520,
326,
585,
10074,
1807,
35,
284,
712,
273,
10405,
27188,
61,
9,
81,
9,
72,
3113,
1191,
957,
12,
588,
10838,
12,
12749,
20349,
10074,
273,
10405,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
628,
30064,
12,
12749,
4672,
468,
2520,
326,
585,
10074,
1807,
35,
284,
712,
273,
10405,
27188,
61,
9,
81,
9,
72,
3113,
1191,
957,
12,
588,
10838,
12,
12749,
20349,
10074,
273,
10405,
... |
self.text.append('\n') | self.text.append(self.new_line) | def empty_paragraph_queue(self, nodelist, indent, need_indent): if need_indent: self.text.append(indent) for i in nodelist: if i.nodeType == Node.ELEMENT_NODE: self.process_inline(i) elif i.nodeType == Node.TEXT_NODE: self.text.append(i.data.strip('\n').replace('\n', ' ')) self.text.append('\n') del nodelist[:] | 4b03df1cf340caeb2a0e882fb5c853890be75c31 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/4b03df1cf340caeb2a0e882fb5c853890be75c31/text_html_text_x_moin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1008,
67,
22445,
67,
4000,
12,
2890,
16,
30068,
16,
3504,
16,
1608,
67,
9355,
4672,
309,
1608,
67,
9355,
30,
365,
18,
955,
18,
6923,
12,
9355,
13,
364,
277,
316,
30068,
30,
309,
277,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1008,
67,
22445,
67,
4000,
12,
2890,
16,
30068,
16,
3504,
16,
1608,
67,
9355,
4672,
309,
1608,
67,
9355,
30,
365,
18,
955,
18,
6923,
12,
9355,
13,
364,
277,
316,
30068,
30,
309,
277,... |
file = req.get_selector() localfile = url2pathname(file) | filename = req.get_selector() localfile = url2pathname(filename) | def open_local_file(self, req): import email.utils import mimetypes host = req.get_host() file = req.get_selector() localfile = url2pathname(file) try: stats = os.stat(localfile) size = stats.st_size modified = email.utils.formatdate(stats.st_mtime, usegmt=True) mtype = mimetypes.guess_type(file)[0] headers = mimetools.Message(StringIO( 'Content-type: %s\nContent-length: %d\nLast-modified: %s\n' % (mtype or 'text/plain', size, modified))) if host: host, port = splitport(host) if not host or \ (not port and socket.gethostbyname(host) in self.get_names()): return addinfourl(open(localfile, 'rb'), headers, 'file://'+ host + file) except OSError, msg: # urllib2 users shouldn't expect OSErrors coming from urlopen() raise URLError(msg) raise URLError('file not on local host') | 18e4dd74e06a8d036e46336041a72f3dae52b15c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/18e4dd74e06a8d036e46336041a72f3dae52b15c/urllib2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
67,
3729,
67,
768,
12,
2890,
16,
1111,
4672,
1930,
2699,
18,
5471,
1930,
20369,
15180,
1479,
273,
1111,
18,
588,
67,
2564,
1435,
1544,
273,
1111,
18,
588,
67,
9663,
1435,
1191,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
67,
3729,
67,
768,
12,
2890,
16,
1111,
4672,
1930,
2699,
18,
5471,
1930,
20369,
15180,
1479,
273,
1111,
18,
588,
67,
2564,
1435,
1544,
273,
1111,
18,
588,
67,
9663,
1435,
1191,
7... |
if verbose: print 'unpack string' a, b, c = 'one' if a != 'o' or b != 'n' or c != 'e': raise TestFailed | Unpack string... fun! | def __getitem__(self, i): if i >= 0 and i < 3: return i raise IndexError | 4f813074150348704b07b2ebfc7dc357e888a6aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/4f813074150348704b07b2ebfc7dc357e888a6aa/test_unpack.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
277,
4672,
309,
277,
1545,
374,
471,
277,
411,
890,
30,
327,
277,
1002,
10195,
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,
1001,
31571,
972,
12,
2890,
16,
277,
4672,
309,
277,
1545,
374,
471,
277,
411,
890,
30,
327,
277,
1002,
10195,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
f.write("%d\t%s\t%s\n" % (m.id, m.name.encode('utf-8'), m.current_party().__unicode__().encode('utf-8'))) | f.write("%d\t%s\t%s\n" % (m.id, m.name.encode('utf-8'), m.current_party.__unicode__().encode('utf-8') if m.current_party != None else '')) | def dump_to_file(self): f = open('votes.tsv','wt') for v in Vote.objects.filter(time__gte=datetime.date(2009,2,24)): if (v.full_text_url != None): link = v.full_text_url.encode('utf-8') else: link = '' if (v.summary != None): summary = v.summary.encode('utf-8') else: summary = '' #for_ids = ",".join([str(m.id) for m in v.votes.filter(voteaction__type='for').all()]) #against_ids = ",".join([str(m.id) for m in v.votes.filter(voteaction__type='against').all()]) #f.write("%d\t%s\t%s\t%s\t%s\t%s\t%s\n" % (v.id,v.title.encode('utf-8'),v.time_string.encode('utf-8'),summary, link, for_ids, against_ids)) f.write("%d\t%s\t%s\t%s\t%s\n" % (v.id, str(v.time), v.title.encode('utf-8'), summary, link)) f.close() | 7011967b145992149e4ebe03304ec627566b93b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1866/7011967b145992149e4ebe03304ec627566b93b0/syncdata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4657,
67,
869,
67,
768,
12,
2890,
4672,
284,
273,
1696,
2668,
27800,
18,
25338,
17023,
6046,
6134,
364,
331,
316,
27540,
18,
6911,
18,
2188,
12,
957,
972,
27225,
33,
6585,
18,
712,
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,
4657,
67,
869,
67,
768,
12,
2890,
4672,
284,
273,
1696,
2668,
27800,
18,
25338,
17023,
6046,
6134,
364,
331,
316,
27540,
18,
6911,
18,
2188,
12,
957,
972,
27225,
33,
6585,
18,
712,
12,... |
(res_output,res_code)=pexpect.run(command,int(options["-Y"])+int(options["-y"])+additional_timemout,True) | (res_output,res_code)=pexpect.run(command,int(self.options["-Y"])+int(self.options["-y"])+additional_timemout,True) | def run_command(self,command,additional_timemout=0): try: self.log_command(command) | dd4badc487c104422a389e7b5a18921beb5459fa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6868/dd4badc487c104422a389e7b5a18921beb5459fa/fencing_snmp.py.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
3076,
12,
2890,
16,
3076,
16,
13996,
67,
8584,
351,
659,
33,
20,
4672,
775,
30,
365,
18,
1330,
67,
3076,
12,
3076,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1086,
67,
3076,
12,
2890,
16,
3076,
16,
13996,
67,
8584,
351,
659,
33,
20,
4672,
775,
30,
365,
18,
1330,
67,
3076,
12,
3076,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
and input.character() == self.weight().chi()): return self(self._qsr(input.qexp(self.prec()))) | and input.character().primitive_character() == self.weight().chi().primitive_character()): p = ZZ(self.prime()) nu = (input.level() == 1 and p/(p+1)) or (1 / (p + 1) * p**(2 - input.level().valuation(p))) if self.radius() > nu: raise ValueError, "Form is not overconvergent enough (form is only %s-overconvergent)" % nu else: return self(self._qsr(input.q_expansion(self.prec()))) | def __call__(self, input): r""" Create an element of this space. Allowable inputs are: - elements of compatible spaces of modular forms or overconvergent modular forms - arbitrary power series in q - lists of elements of the base ring (interpreted as vectors in the basis given by self.gens()). | 838a498abee29f10814d0a05c45a15fbb11d024c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/838a498abee29f10814d0a05c45a15fbb11d024c/genus0.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
810,
4672,
436,
8395,
1788,
392,
930,
434,
333,
3476,
18,
7852,
429,
4540,
854,
30,
225,
300,
2186,
434,
7318,
7292,
434,
681,
2490,
10138,
578,
1879,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1991,
972,
12,
2890,
16,
810,
4672,
436,
8395,
1788,
392,
930,
434,
333,
3476,
18,
7852,
429,
4540,
854,
30,
225,
300,
2186,
434,
7318,
7292,
434,
681,
2490,
10138,
578,
1879,
59... |
migration.migrate_app(app, target_name="0003", resolve_mode=None, fake=False, silent=True) | migration.migrate_app(app, target_name="0003", resolve_mode=None, fake=False, verbosity=0) | def null_ok(): from django.db import connection, transaction # the DBAPI introspection module fails on postgres NULLs. cursor = connection.cursor() try: cursor.execute("INSERT INTO southtest_spam (id, weight, expires, name) VALUES (100, 10.1, now(), NULL);") except: transaction.rollback() return False else: cursor.execute("DELETE FROM southtest_spam") transaction.commit() return True | 2fddc57a2ea9e73dc9847c701c9d573a432cbace /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13142/2fddc57a2ea9e73dc9847c701c9d573a432cbace/logic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
446,
67,
601,
13332,
628,
13710,
18,
1966,
1930,
1459,
16,
2492,
468,
326,
2383,
2557,
18446,
7017,
1605,
6684,
603,
1603,
14107,
3206,
87,
18,
3347,
273,
1459,
18,
9216,
1435,
775,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
446,
67,
601,
13332,
628,
13710,
18,
1966,
1930,
1459,
16,
2492,
468,
326,
2383,
2557,
18446,
7017,
1605,
6684,
603,
1603,
14107,
3206,
87,
18,
3347,
273,
1459,
18,
9216,
1435,
775,
30,
... |
sql += " WHERE" + makeWhereClause('products.name', PRODUCTS) | sql += " WHERE" + makeWhereClause('products.name', PRODUCTS) | def convert(_db, _host, _user, _password, _env, _force): activityFields = FieldTranslator() # account for older versions of bugzilla print "Using Bugzilla v%s schema." % BZ_VERSION if BZ_VERSION == 2110: activityFields['removed'] = "oldvalue" activityFields['added'] = "newvalue" # init Bugzilla environment print "Bugzilla MySQL('%s':'%s':'%s':'%s'): connecting..." % \ (_db, _host, _user, ("*" * len(_password))) mysql_con = MySQLdb.connect(host=_host, user=_user, passwd=_password, db=_db, compress=1, cursorclass=MySQLdb.cursors.DictCursor) mysql_cur = mysql_con.cursor() # init Trac environment print "Trac SQLite('%s'): connecting..." % (_env) trac = TracDatabase(_env) # force mode... if _force == 1: print "\nCleaning all tickets..." c = trac.db().cursor() c.execute("DELETE FROM ticket_change") trac.db().commit() c.execute("DELETE FROM ticket") trac.db().commit() c.execute("DELETE FROM attachment") attachments_dir = os.path.join(os.path.normpath(trac.env.path), "attachments") # Straight from the Python documentation. for root, dirs, files in os.walk(attachments_dir, topdown=False): for name in files: os.remove(os.path.join(root, name)) for name in dirs: os.rmdir(os.path.join(root, name)) if not os.stat(attachments_dir): os.mkdir(attachments_dir) trac.db().commit() print "All tickets cleaned..." print "\n0. Filtering products..." mysql_cur.execute("SELECT name FROM products") products = [] for line in mysql_cur.fetchall(): product = line['name'] if PRODUCTS and product not in PRODUCTS: continue if product in IGNORE_PRODUCTS: continue products.append(product) PRODUCTS[:] = products print " Using products", " ".join(PRODUCTS) print "\n1. Import severities..." trac.setSeverityList(SEVERITIES) print "\n2. Import components..." if not COMPONENTS_FROM_PRODUCTS: if BZ_VERSION >= 2180: sql = """SELECT DISTINCT c.name AS name, c.initialowner AS owner FROM components AS c, products AS p WHERE c.product_id = p.id AND""" sql += makeWhereClause('p.name', PRODUCTS) else: sql = "SELECT value AS name, initialowner AS owner FROM components" sql += " WHERE" + makeWhereClause('program', PRODUCTS) mysql_cur.execute(sql) components = mysql_cur.fetchall() for component in components: component['owner'] = trac.getLoginName(mysql_cur, component['owner']) trac.setComponentList(components, 'name') else: sql = """SELECT program AS product, value AS comp, initialowner AS owner FROM components""" sql += " WHERE" + makeWhereClause('program', PRODUCTS) mysql_cur.execute(sql) lines = mysql_cur.fetchall() all_components = {} # product -> components all_owners = {} # product, component -> owner for line in lines: product = line['product'] comp = line['comp'] owner = line['owner'] all_components.setdefault(product, []).append(comp) all_owners[(product, comp)] = owner component_list = [] for product, components in all_components.items(): # find best default owner default = None for comp in DEFAULT_COMPONENTS: if comp in components: default = comp break if default is None: default = components[0] owner = all_owners[(product, default)] owner_name = trac.getLoginName(mysql_cur, owner) component_list.append({'product': product, 'owner': owner_name}) trac.setComponentList(component_list, 'product') print "\n3. Import priorities..." trac.setPriorityList(PRIORITIES) print "\n4. Import versions..." if BZ_VERSION >= 2180: sql = """SELECT DISTINCTROW versions.value AS value FROM products, versions""" sql += " WHERE" + makeWhereClause('products.name', PRODUCTS) else: sql = "SELECT DISTINCTROW value FROM versions" sql += " WHERE" + makeWhereClause('program', PRODUCTS) mysql_cur.execute(sql) versions = mysql_cur.fetchall() trac.setVersionList(versions, 'value') print "\n5. Import milestones..." sql = "SELECT DISTINCT value FROM milestones" sql += " WHERE" + makeWhereClause('value', IGNORE_MILESTONES, negative=True) mysql_cur.execute(sql) milestones = mysql_cur.fetchall() trac.setMilestoneList(milestones, 'value') print "\n6. Retrieving bugs..." sql = """SELECT DISTINCT b.*, c.name AS component, p.name AS product FROM bugs AS b, components AS c, products AS p """ sql += " WHERE (" + makeWhereClause('p.name', PRODUCTS) sql += ") AND b.product_id = p.id" sql += " AND b.component_id = c.id" sql += " ORDER BY b.bug_id" mysql_cur.execute(sql) bugs = mysql_cur.fetchall() print "\n7. Import bugs and bug activity..." for bug in bugs: bugid = bug['bug_id'] ticket = {} keywords = [] ticket['id'] = bugid ticket['time'] = bug['creation_ts'] ticket['changetime'] = bug['delta_ts'] if COMPONENTS_FROM_PRODUCTS: ticket['component'] = bug['product'] else: ticket['component'] = bug['component'] ticket['severity'] = bug['bug_severity'] ticket['priority'] = bug['priority'].lower() ticket['owner'] = trac.getLoginName(mysql_cur, bug['assigned_to']) ticket['reporter'] = trac.getLoginName(mysql_cur, bug['reporter']) mysql_cur.execute("SELECT * FROM cc WHERE bug_id = %s", bugid) cc_records = mysql_cur.fetchall() cc_list = [] for cc in cc_records: cc_list.append(trac.getLoginName(mysql_cur, cc['who'])) cc_list = [cc for cc in cc_list if '@' in cc and cc not in IGNORE_CC] ticket['cc'] = string.join(cc_list, ', ') ticket['version'] = bug['version'] target_milestone = bug['target_milestone'] if target_milestone in IGNORE_MILESTONES: target_milestone = '' ticket['milestone'] = target_milestone bug_status = bug['bug_status'].lower() ticket['status'] = statusXlator[bug_status] ticket['resolution'] = bug['resolution'].lower() # a bit of extra work to do open tickets if bug_status == 'open': if owner != '': ticket['status'] = 'assigned' else: ticket['status'] = 'new' ticket['summary'] = bug['short_desc'] mysql_cur.execute("SELECT * FROM longdescs WHERE bug_id = %s" % bugid) longdescs = list(mysql_cur.fetchall()) # check for empty 'longdescs[0]' field... if len(longdescs) == 0: ticket['description'] = '' else: ticket['description'] = longdescs[0]['thetext'] del longdescs[0] for desc in longdescs: ignore = False for comment in IGNORE_COMMENTS: if re.match(comment, desc['thetext']): ignore = True if ignore: continue trac.addTicketComment(ticket=bugid, time = desc['bug_when'], author=trac.getLoginName(mysql_cur, desc['who']), value = desc['thetext']) mysql_cur.execute("""SELECT * FROM bugs_activity WHERE bug_id = %s ORDER BY bug_when""" % bugid) bugs_activity = mysql_cur.fetchall() resolution = '' ticketChanges = [] keywords = [] for activity in bugs_activity: field_name = trac.getFieldName(mysql_cur, activity['fieldid']).lower() removed = activity[activityFields['removed']] added = activity[activityFields['added']] # statuses and resolutions are in lowercase in trac if field_name == "resolution" or field_name == "bug_status": removed = removed.lower() added = added.lower() # remember most recent resolution, we need this later if field_name == "resolution": resolution = added.lower() add_keywords = [] remove_keywords = [] # convert bugzilla field names... if field_name == "bug_severity": field_name = "severity" elif field_name == "assigned_to": field_name = "owner" elif field_name == "bug_status": field_name = "status" if removed in STATUS_KEYWORDS: remove_keywords.append(STATUS_KEYWORDS[removed]) if added in STATUS_KEYWORDS: add_keywords.append(STATUS_KEYWORDS[added]) added = statusXlator[added] removed = statusXlator[removed] elif field_name == "short_desc": field_name = "summary" elif field_name == "product" and COMPONENTS_FROM_PRODUCTS: field_name = "component" elif ((field_name == "product" and not COMPONENTS_FROM_PRODUCTS) or (field_name == "component" and COMPONENTS_FROM_PRODUCTS)): if MAP_ALL_KEYWORDS or removed in KEYWORDS_MAPPING: kw = KEYWORDS_MAPPING.get(removed, removed) if kw: remove_keywords.append(kw) if MAP_ALL_KEYWORDS or added in KEYWORDS_MAPPING: kw = KEYWORDS_MAPPING.get(added, added) if kw: add_keywords.append(kw) if field_name == "component": # just keep the keyword change added = removed = "" elif field_name == "target_milestone": field_name = "milestone" if added in IGNORE_MILESTONES: added = "" if removed in IGNORE_MILESTONES: removed = "" ticketChange = {} ticketChange['ticket'] = bugid ticketChange['time'] = activity['bug_when'] ticketChange['author'] = trac.getLoginName(mysql_cur, activity['who']) ticketChange['field'] = field_name ticketChange['oldvalue'] = removed ticketChange['newvalue'] = added if add_keywords or remove_keywords: # ensure removed ones are in old old_keywords = keywords + [kw for kw in remove_keywords if kw not in keywords] # remove from new keywords = [kw for kw in keywords if kw not in remove_keywords] # add to new keywords += [kw for kw in add_keywords if kw not in keywords] if old_keywords != keywords: ticketChangeKw = ticketChange.copy() ticketChangeKw['field'] = "keywords" ticketChangeKw['oldvalue'] = ' '.join(old_keywords) ticketChangeKw['newvalue'] = ' '.join(keywords) ticketChanges.append(ticketChangeKw) if field_name in IGNORED_ACTIVITY_FIELDS: continue # Skip changes that have no effect (think translation!). if added == removed: continue # Bugzilla splits large summary changes into two records. for oldChange in ticketChanges: if (field_name == "summary" and oldChange['field'] == ticketChange['field'] and oldChange['time'] == ticketChange['time'] and oldChange['author'] == ticketChange['author']): oldChange['oldvalue'] += " " + ticketChange['oldvalue'] oldChange['newvalue'] += " " + ticketChange['newvalue'] break # cc sometime appear in different activities with same time if (field_name == "cc" \ and oldChange['time'] == ticketChange['time']): oldChange['newvalue'] += ", " + ticketChange['newvalue'] break else: ticketChanges.append (ticketChange) for ticketChange in ticketChanges: trac.addTicketChange (**ticketChange) # For some reason, bugzilla v2.11 seems to clear the resolution # when you mark a bug as closed. Let's remember it and restore # it if the ticket is closed but there's no resolution. if not ticket['resolution'] and ticket['status'] == "closed": ticket['resolution'] = resolution bug_status = bug['bug_status'] if bug_status in STATUS_KEYWORDS: kw = STATUS_KEYWORDS[bug_status] if kw not in keywords: keywords.append(kw) product = bug['product'] if product in KEYWORDS_MAPPING and not COMPONENTS_FROM_PRODUCTS: kw = KEYWORDS_MAPPING.get(product, product) if kw and kw not in keywords: keywords.append(kw) component = bug['component'] if (COMPONENTS_FROM_PRODUCTS and \ (MAP_ALL_KEYWORDS or component in KEYWORDS_MAPPING)): kw = KEYWORDS_MAPPING.get(component, component) if kw and kw not in keywords: keywords.append(kw) ticket['keywords'] = string.join(keywords) ticketid = trac.addTicket(**ticket) mysql_cur.execute("SELECT * FROM attachments WHERE bug_id = %s" % bugid) attachments = mysql_cur.fetchall() for a in attachments: author = trac.getLoginName(mysql_cur, a['submitter_id']) trac.addAttachment(author, a) print "\n8. Importing users and passwords..." if BZ_VERSION >= 2180: mysql_cur.execute("SELECT login_name, cryptpassword FROM profiles") users = mysql_cur.fetchall() htpasswd = file("htpasswd", 'w') for user in users: if LOGIN_MAP.has_key(user['login_name']): login = LOGIN_MAP[user['login_name']] else: login = user['login_name'] htpasswd.write(login + ":" + user['cryptpassword'] + "\n") htpasswd.close() print " Bugzilla users converted to htpasswd format, see 'htpasswd'." print "\nAll tickets converted." | c27a48bc7d3e33e259dbb1bfcf7789acafcc80b3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2831/c27a48bc7d3e33e259dbb1bfcf7789acafcc80b3/bugzilla2trac.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
24899,
1966,
16,
389,
2564,
16,
389,
1355,
16,
389,
3664,
16,
389,
3074,
16,
389,
5734,
4672,
5728,
2314,
273,
2286,
12233,
1435,
225,
468,
2236,
364,
12156,
5244,
434,
7934,
15990... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
24899,
1966,
16,
389,
2564,
16,
389,
1355,
16,
389,
3664,
16,
389,
3074,
16,
389,
5734,
4672,
5728,
2314,
273,
2286,
12233,
1435,
225,
468,
2236,
364,
12156,
5244,
434,
7934,
15990... |
def output_stats_text(urls): | def output_stats_text(urls, lines): | def output_stats_text(urls): print print 'URL statistics:' print " Impact count min median mean max hangs" print "========= ===== ====== ====== ====== ====== =====" urls = [(times.impact(), url, times) for (url, times) in urls.iteritems() ] urls.sort() urls.reverse() for (_, url, times) in urls: if times.impact > 0 or times.hangs: print times, url | ba39a8840d2e26f7d357f08fd1799ffbe4620b0e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7695/ba39a8840d2e26f7d357f08fd1799ffbe4620b0e/tracereport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
876,
67,
5296,
67,
955,
12,
10518,
16,
2362,
4672,
1172,
1172,
296,
1785,
7691,
2497,
1172,
315,
282,
9457,
621,
1056,
565,
1131,
12644,
282,
3722,
565,
943,
25733,
87,
6,
1172,
315,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
876,
67,
5296,
67,
955,
12,
10518,
16,
2362,
4672,
1172,
1172,
296,
1785,
7691,
2497,
1172,
315,
282,
9457,
621,
1056,
565,
1131,
12644,
282,
3722,
565,
943,
25733,
87,
6,
1172,
315,
1... |
p = aq_parent(aq_inner(self) | p = aq_parent(aq_inner(self)) | def getPhysicalPath(self): '''Returns a path (an immutable sequence of strings) that can be used to access this object again later, for example in a copy/paste operation. getPhysicalRoot() and getPhysicalPath() are designed to operate together. ''' path = (self.getId(),) p = aq_parent(aq_inner(self) if p is not None: path = p.getPhysicalPath() + path | cddf8940df827d49b0051e763d8ab6233ee1206e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/cddf8940df827d49b0051e763d8ab6233ee1206e/Traversable.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21735,
7046,
743,
12,
2890,
4672,
9163,
1356,
279,
589,
261,
304,
11732,
3102,
434,
2064,
13,
716,
848,
506,
1399,
358,
2006,
333,
733,
3382,
5137,
16,
364,
3454,
316,
279,
1610,
19,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21735,
7046,
743,
12,
2890,
4672,
9163,
1356,
279,
589,
261,
304,
11732,
3102,
434,
2064,
13,
716,
848,
506,
1399,
358,
2006,
333,
733,
3382,
5137,
16,
364,
3454,
316,
279,
1610,
19,
2... |
a._Assay_key, a._ProbePrep_key, | a._Assay_key, a._ProbePrep_key, a._AntibodyPrep_key, | def collateResults (self): | fc52d6244205a528a41be102202580a068bc59c7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/536/fc52d6244205a528a41be102202580a068bc59c7/recombinase_gatherer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4508,
340,
3447,
261,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4508,
340,
3447,
261,
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,
-... |
self.class_names.sort(lambda x, y: cmp(x.lower(), y.lower())) | self.class_names.sort(lambda x, y: cmp(x[0].lower(), y[0].lower())) | def table_of_contents(self, classes): s = open(os.path.join(self.docgen.src_path, "classes.txt"), "w") s.write("=======\nClasses\n=======\n\n") s.write("Alphabetical\n-------------\n") self.class_names.sort(lambda x, y: cmp(x.lower(), y.lower())) letter = '~' first = True links = [] for name, combined_name in self.class_names: if name[0].upper() != letter: letter = name[0].upper() s.write("\n\n**") s.write(letter) s.write("**\n\n") first = True if not first: s.write(", ") s.write("%s_ (%s)" % (name, combined_name)) first = False links.append(".. _%s: %s.html" % (name, combined_name)) s.write("\n\n") s.write("\n".join(links)) s.close() | ebb837d1bfc3981593730f9a62b50126496efb8e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/ebb837d1bfc3981593730f9a62b50126496efb8e/gendoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1014,
67,
792,
67,
3980,
12,
2890,
16,
3318,
4672,
272,
273,
1696,
12,
538,
18,
803,
18,
5701,
12,
2890,
18,
2434,
4507,
18,
4816,
67,
803,
16,
315,
4701,
18,
5830,
6,
3631,
315,
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,
1014,
67,
792,
67,
3980,
12,
2890,
16,
3318,
4672,
272,
273,
1696,
12,
538,
18,
803,
18,
5701,
12,
2890,
18,
2434,
4507,
18,
4816,
67,
803,
16,
315,
4701,
18,
5830,
6,
3631,
315,
9... |
flvfile = tmpname+".mp4" | mp4file = tmpname+".mp4" | def clean(self, data, initial=None): """Checks that the file is valid video and converts it to FLV format""" f = super(VideoUploadToFLVField, self).clean(data, initial) if f is None: return None elif not data and initial: return initial | 672bf403efd0144c9c730f23d041ae7c86532f61 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/744/672bf403efd0144c9c730f23d041ae7c86532f61/fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2721,
12,
2890,
16,
501,
16,
2172,
33,
7036,
4672,
3536,
4081,
716,
326,
585,
353,
923,
6191,
471,
7759,
518,
358,
31358,
58,
740,
8395,
282,
284,
273,
2240,
12,
10083,
4777,
774,
1905... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2721,
12,
2890,
16,
501,
16,
2172,
33,
7036,
4672,
3536,
4081,
716,
326,
585,
353,
923,
6191,
471,
7759,
518,
358,
31358,
58,
740,
8395,
282,
284,
273,
2240,
12,
10083,
4777,
774,
1905... |
complexInput["complexdata"] = input.value | complexInput["complexdata"] = open(input.value,"r").read() | def _lineageComplexInput(self, input, complexInput): """ Fill input of complex data """ complexInput["complexdata"] = input.value complexInput["encoding"] = input.format["encoding"] complexInput["mimetype"] = input.format["mimeType"] complexInput["schema"] = input.format["schema"] return complexInput | ebad1d659d4bb8c7358b4df5895beb6dc7dbde3a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10967/ebad1d659d4bb8c7358b4df5895beb6dc7dbde3a/Execute.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1369,
410,
12795,
1210,
12,
2890,
16,
810,
16,
7233,
1210,
4672,
3536,
14192,
810,
434,
7233,
501,
3536,
7233,
1210,
9614,
14259,
892,
11929,
273,
1696,
12,
2630,
18,
1132,
10837,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1369,
410,
12795,
1210,
12,
2890,
16,
810,
16,
7233,
1210,
4672,
3536,
14192,
810,
434,
7233,
501,
3536,
7233,
1210,
9614,
14259,
892,
11929,
273,
1696,
12,
2630,
18,
1132,
10837,
8... |
for key in self.pkg_hooks.keys(): del self.env.hooks[key] self.env.update_seq() | for key in self.pkg_hooks.keys(): del self.env.hooks[key] self.env.update_seq() | def x_usepackage (self, dict): if not dict["arg"]: return remaining = [] | 8cbbdf956547e764087cac613d36efede65ec59b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10102/8cbbdf956547e764087cac613d36efede65ec59b/expand.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
619,
67,
1202,
5610,
261,
2890,
16,
2065,
4672,
309,
486,
2065,
9614,
3175,
11929,
30,
327,
4463,
273,
5378,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
619,
67,
1202,
5610,
261,
2890,
16,
2065,
4672,
309,
486,
2065,
9614,
3175,
11929,
30,
327,
4463,
273,
5378,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
def test_config1_ok(self): | def test_config1_ok(self, config=config1): | def test_config1_ok(self): # A config file defining a sub-parser as well. with captured_stdout() as output: self.apply_config(self.config1) logger = logging.getLogger("compiler.parser") # Both will output a message logger.info(self.next_message()) logger.error(self.next_message()) self.assert_log_lines([ ('INFO', '1'), ('ERROR', '2'), ], stream=output) # Original logger output is empty. self.assert_log_lines([]) | c625b03b327985118c0b5e80d1e87e4af9aa8ac3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/c625b03b327985118c0b5e80d1e87e4af9aa8ac3/test_logging.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1425,
21,
67,
601,
12,
2890,
16,
642,
33,
1425,
21,
4672,
468,
432,
642,
585,
9364,
279,
720,
17,
4288,
487,
5492,
18,
598,
19550,
67,
10283,
1435,
487,
876,
30,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1425,
21,
67,
601,
12,
2890,
16,
642,
33,
1425,
21,
4672,
468,
432,
642,
585,
9364,
279,
720,
17,
4288,
487,
5492,
18,
598,
19550,
67,
10283,
1435,
487,
876,
30,
365,
18,
... |
return map(Variable, zip(range(len(self)), | return map(Variable, zip(range(self._header['nvar']), | def variables(self): """Returns a list of the dataset's PyDTA.Variables.""" return map(Variable, zip(range(len(self)), self._header['typlist'], self._header['varlist'], self._header['srtlist'], self._header['fmtlist'], self._header['lbllist'], self._header['vlblist'])) | ff5817616dbeefd6f5f165bdf31e5a5ce8c62307 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8065/ff5817616dbeefd6f5f165bdf31e5a5ce8c62307/StataTools.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3152,
12,
2890,
4672,
3536,
1356,
279,
666,
434,
326,
3709,
1807,
4707,
9081,
37,
18,
6158,
12123,
327,
852,
12,
3092,
16,
3144,
12,
3676,
12,
2890,
6315,
3374,
3292,
82,
1401,
3546,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3152,
12,
2890,
4672,
3536,
1356,
279,
666,
434,
326,
3709,
1807,
4707,
9081,
37,
18,
6158,
12123,
327,
852,
12,
3092,
16,
3144,
12,
3676,
12,
2890,
6315,
3374,
3292,
82,
1401,
3546,
3... |
is_okay = find_quintuples(sums, wgts, begin, record, rec_begin, | is_okay = find_quintuples(sums, wgts, begin, record, | def pieces_combine(sums, wgts, begin, records, log, new_id): while records: record, rec_id = pieces_get_longest_overlap(average(sums, wgts), begin, records) rec_begin = record.first_year rec_end = record.last_year log.write("\t %s %d %d\n" % (rec_id, rec_begin, rec_end)) is_okay = find_quintuples(sums, wgts, begin, record, rec_begin, new_id, rec_id, log) if is_okay: del records[rec_id] add(sums, wgts, 0.0, begin, record) log.write("\t %s %d %d\n" % (rec_id, rec_begin, rec_end)) else: log.write("\t***no other pieces okay***\n") return | a1900cfa1a273cf44db8ff9f10cd18b0ed928d89 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6890/a1900cfa1a273cf44db8ff9f10cd18b0ed928d89/step1.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10167,
67,
14082,
12,
1364,
87,
16,
8397,
3428,
16,
2376,
16,
3853,
16,
613,
16,
394,
67,
350,
4672,
1323,
3853,
30,
1409,
16,
1950,
67,
350,
273,
10167,
67,
588,
67,
5748,
395,
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,
10167,
67,
14082,
12,
1364,
87,
16,
8397,
3428,
16,
2376,
16,
3853,
16,
613,
16,
394,
67,
350,
4672,
1323,
3853,
30,
1409,
16,
1950,
67,
350,
273,
10167,
67,
588,
67,
5748,
395,
67,
... |
for k, v in get_query_links(self.env, milestone['name']).items(): | for k, v in get_query_links(self.env, milestone_name).items(): | def process_request(self, req): req.perm.assert_permission('ROADMAP_VIEW') req.hdf['title'] = 'Roadmap' | b75ff7e82874085e52d6476ff2fda6604f03250c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/b75ff7e82874085e52d6476ff2fda6604f03250c/roadmap.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2293,
12,
2890,
16,
1111,
4672,
1111,
18,
12160,
18,
11231,
67,
9827,
2668,
1457,
1880,
8352,
67,
12145,
6134,
1111,
18,
26428,
3292,
2649,
3546,
273,
296,
54,
6189,
1458,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1207,
67,
2293,
12,
2890,
16,
1111,
4672,
1111,
18,
12160,
18,
11231,
67,
9827,
2668,
1457,
1880,
8352,
67,
12145,
6134,
1111,
18,
26428,
3292,
2649,
3546,
273,
296,
54,
6189,
1458,
11,
... |
def GetConstant(slef): | def GetConstants(self): | def GetConstant(slef): return self.Constant | 0a79f2c20c5f2a0a7107f754ccd58cbd63ba6dca /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12580/0a79f2c20c5f2a0a7107f754ccd58cbd63ba6dca/FourDAnalysis.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
2918,
12,
2890,
4672,
327,
365,
18,
6902,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
2918,
12,
2890,
4672,
327,
365,
18,
6902,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
"Test MCRYPT type miscelaneous methods." | "Test BZ2File type miscellaneous methods." | def decompress(self, data): return bz2.decompress(data) | 31c52ceddaaec2ff26bb95d826bd62af17917bdc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/31c52ceddaaec2ff26bb95d826bd62af17917bdc/test_bz2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16824,
12,
2890,
16,
501,
4672,
327,
24788,
22,
18,
323,
14706,
12,
892,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16824,
12,
2890,
16,
501,
4672,
327,
24788,
22,
18,
323,
14706,
12,
892,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
return not (s == '0' or s.lower() == 'False') | return not (s == '0' or s.lower() == 'false') | def str2bool(s): if is_string(s): return not (s == '0' or s.lower() == 'False') return bool(s) | 9c81f9cc0517031add7f31eddb489743e9324233 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14925/9c81f9cc0517031add7f31eddb489743e9324233/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
609,
22,
6430,
12,
87,
4672,
309,
353,
67,
1080,
12,
87,
4672,
327,
486,
261,
87,
422,
296,
20,
11,
578,
272,
18,
8167,
1435,
422,
296,
5743,
6134,
327,
1426,
12,
87,
13,
225,
2,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
609,
22,
6430,
12,
87,
4672,
309,
353,
67,
1080,
12,
87,
4672,
327,
486,
261,
87,
422,
296,
20,
11,
578,
272,
18,
8167,
1435,
422,
296,
5743,
6134,
327,
1426,
12,
87,
13,
225,
2,
... |
if days is not None: | if days is not None: | def __init__(self, absolute_time=None, days=None, hours=None, minutes=None, method=None, extension_elements=None, extension_attributes=None, text=None): self.absolute_time = absolute_time if days is not None: self.days = str(days) else: self.days = None if hours is not None: self.hours = str(hours) else: self.hours = None if minutes is not None: self.minutes = str(minutes) else: self.minutes = None self.method = method self.text = text self.extension_elements = extension_elements or [] self.extension_attributes = extension_attributes or {} | 6a016768dbbd7d5ee9c62bcd2d2ce3bf7f6d1048 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6580/6a016768dbbd7d5ee9c62bcd2d2ce3bf7f6d1048/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4967,
67,
957,
33,
7036,
16,
4681,
33,
7036,
16,
7507,
33,
7036,
16,
6824,
33,
7036,
16,
707,
33,
7036,
16,
2710,
67,
6274,
33,
7036,
16,
2710,
67,
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,
1001,
2738,
972,
12,
2890,
16,
4967,
67,
957,
33,
7036,
16,
4681,
33,
7036,
16,
7507,
33,
7036,
16,
6824,
33,
7036,
16,
707,
33,
7036,
16,
2710,
67,
6274,
33,
7036,
16,
2710,
67,
4... |
sage: A2 = WeylCharacterRing(['A',2]) sage: a2 = WeightRing(A2) sage: chi = A2([2,1,0]) sage: chi^4 8*A2(4,4,4) + 32*A2(5,4,3) + 20*A2(5,5,2) + 20*A2(6,3,3) + 33*A2(6,4,2) + 15*A2(6,5,1) + 2*A2(6,6,0) + 15*A2(7,3,2) + 12*A2(7,4,1) + 3*A2(7,5,0) + 2*A2(8,2,2) + 3*A2(8,3,1) + A2(8,4,0) sage: a2(chi)^4 a2(0,4,8) + 4*a2(0,5,7) + 6*a2(0,6,6) + 4*a2(0,7,5) + a2(0,8,4) + 4*a2(1,3,8) + 20*a2(1,4,7) + 40*a2(1,5,6) + 40*a2(1,6,5) + 20*a2(1,7,4) + 4*a2(1,8,3) + 6*a2(2,2,8) + 40*a2(2,3,7) + 106*a2(2,4,6) + 144*a2(2,5,5) + 106*a2(2,6,4) + 40*a2(2,7,3) + 6*a2(2,8,2) + 4*a2(3,1,8) + 40*a2(3,2,7) + 144*a2(3,3,6) + 260*a2(3,4,5) + 260*a2(3,5,4) + 144*a2(3,6,3) + 40*a2(3,7,2) + 4*a2(3,8,1) + a2(4,0,8) + 20*a2(4,1,7) + 106*a2(4,2,6) + 260*a2(4,3,5) + 346*a2(4,4,4) + 260*a2(4,5,3) + 106*a2(4,6,2) + 20*a2(4,7,1) + a2(4,8,0) + 4*a2(5,0,7) + 40*a2(5,1,6) + 144*a2(5,2,5) + 260*a2(5,3,4) + 260*a2(5,4,3) + 144*a2(5,5,2) + 40*a2(5,6,1) + 4*a2(5,7,0) + 6*a2(6,0,6) + 40*a2(6,1,5) + 106*a2(6,2,4) + 144*a2(6,3,3) + 106*a2(6,4,2) + 40*a2(6,5,1) + 6*a2(6,6,0) + 4*a2(7,0,5) + 20*a2(7,1,4) + 40*a2(7,2,3) + 40*a2(7,3,2) + 20*a2(7,4,1) + 4*a2(7,5,0) + a2(8,0,4) + 4*a2(8,1,3) + 6*a2(8,2,2) + 4*a2(8,3,1) + a2(8,4,0) sage: (a2(chi)^4).character() == chi^4 True | EXAMPLES: sage: A2 = WeylCharacterRing(['A',2]) sage: a2 = WeightRing(A2) sage: chi = A2([2,1,0]) sage: chi^4 8*A2(4,4,4) + 32*A2(5,4,3) + 20*A2(5,5,2) + 20*A2(6,3,3) + 33*A2(6,4,2) + 15*A2(6,5,1) + 2*A2(6,6,0) + 15*A2(7,3,2) + 12*A2(7,4,1) + 3*A2(7,5,0) + 2*A2(8,2,2) + 3*A2(8,3,1) + A2(8,4,0) sage: a2(chi)^4 a2(0,4,8) + 4*a2(0,5,7) + 6*a2(0,6,6) + 4*a2(0,7,5) + a2(0,8,4) + 4*a2(1,3,8) + 20*a2(1,4,7) + 40*a2(1,5,6) + 40*a2(1,6,5) + 20*a2(1,7,4) + 4*a2(1,8,3) + 6*a2(2,2,8) + 40*a2(2,3,7) + 106*a2(2,4,6) + 144*a2(2,5,5) + 106*a2(2,6,4) + 40*a2(2,7,3) + 6*a2(2,8,2) + 4*a2(3,1,8) + 40*a2(3,2,7) + 144*a2(3,3,6) + 260*a2(3,4,5) + 260*a2(3,5,4) + 144*a2(3,6,3) + 40*a2(3,7,2) + 4*a2(3,8,1) + a2(4,0,8) + 20*a2(4,1,7) + 106*a2(4,2,6) + 260*a2(4,3,5) + 346*a2(4,4,4) + 260*a2(4,5,3) + 106*a2(4,6,2) + 20*a2(4,7,1) + a2(4,8,0) + 4*a2(5,0,7) + 40*a2(5,1,6) + 144*a2(5,2,5) + 260*a2(5,3,4) + 260*a2(5,4,3) + 144*a2(5,5,2) + 40*a2(5,6,1) + 4*a2(5,7,0) + 6*a2(6,0,6) + 40*a2(6,1,5) + 106*a2(6,2,4) + 144*a2(6,3,3) + 106*a2(6,4,2) + 40*a2(6,5,1) + 6*a2(6,6,0) + 4*a2(7,0,5) + 20*a2(7,1,4) + 40*a2(7,2,3) + 40*a2(7,3,2) + 20*a2(7,4,1) + 4*a2(7,5,0) + a2(8,0,4) + 4*a2(8,1,3) + 6*a2(8,2,2) + 4*a2(8,3,1) + a2(8,4,0) sage: (a2(chi)^4).character() == chi^4 True | def __pow__(self, n): """ sage: A2 = WeylCharacterRing(['A',2]) sage: a2 = WeightRing(A2) sage: chi = A2([2,1,0]) sage: chi^4 8*A2(4,4,4) + 32*A2(5,4,3) + 20*A2(5,5,2) + 20*A2(6,3,3) + 33*A2(6,4,2) + 15*A2(6,5,1) + 2*A2(6,6,0) + 15*A2(7,3,2) + 12*A2(7,4,1) + 3*A2(7,5,0) + 2*A2(8,2,2) + 3*A2(8,3,1) + A2(8,4,0) sage: a2(chi)^4 a2(0,4,8) + 4*a2(0,5,7) + 6*a2(0,6,6) + 4*a2(0,7,5) + a2(0,8,4) + 4*a2(1,3,8) + 20*a2(1,4,7) + 40*a2(1,5,6) + 40*a2(1,6,5) + 20*a2(1,7,4) + 4*a2(1,8,3) + 6*a2(2,2,8) + 40*a2(2,3,7) + 106*a2(2,4,6) + 144*a2(2,5,5) + 106*a2(2,6,4) + 40*a2(2,7,3) + 6*a2(2,8,2) + 4*a2(3,1,8) + 40*a2(3,2,7) + 144*a2(3,3,6) + 260*a2(3,4,5) + 260*a2(3,5,4) + 144*a2(3,6,3) + 40*a2(3,7,2) + 4*a2(3,8,1) + a2(4,0,8) + 20*a2(4,1,7) + 106*a2(4,2,6) + 260*a2(4,3,5) + 346*a2(4,4,4) + 260*a2(4,5,3) + 106*a2(4,6,2) + 20*a2(4,7,1) + a2(4,8,0) + 4*a2(5,0,7) + 40*a2(5,1,6) + 144*a2(5,2,5) + 260*a2(5,3,4) + 260*a2(5,4,3) + 144*a2(5,5,2) + 40*a2(5,6,1) + 4*a2(5,7,0) + 6*a2(6,0,6) + 40*a2(6,1,5) + 106*a2(6,2,4) + 144*a2(6,3,3) + 106*a2(6,4,2) + 40*a2(6,5,1) + 6*a2(6,6,0) + 4*a2(7,0,5) + 20*a2(7,1,4) + 40*a2(7,2,3) + 40*a2(7,3,2) + 20*a2(7,4,1) + 4*a2(7,5,0) + a2(8,0,4) + 4*a2(8,1,3) + 6*a2(8,2,2) + 4*a2(8,3,1) + a2(8,4,0) sage: (a2(chi)^4).character() == chi^4 True """ if not n in ZZ: raise TypeError, "exponent must be an integer" if not n >= 0: raise TypeError, "exponent must be nonnegative" z = self._parent.__call__(1) for i in range(n): z *= self return z | 585641b32ec9003014ab40e39d632a05e840e883 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/585641b32ec9003014ab40e39d632a05e840e883/weyl_characters.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
23509,
972,
12,
2890,
16,
290,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
432,
22,
273,
678,
402,
80,
7069,
10369,
12,
3292,
37,
2187,
22,
5717,
272,
410,
30,
279,
22,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
23509,
972,
12,
2890,
16,
290,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
432,
22,
273,
678,
402,
80,
7069,
10369,
12,
3292,
37,
2187,
22,
5717,
272,
410,
30,
279,
22,
27... |
def _escapeRegexChars(s): for c in r"\[^$.|?*+()": s = s.replace(c,"\\"+c) s = s.replace("\n",r"\n") s = s.replace("\t",r"\t") return _ustr(s) | def _escapeRegexChars(s): #~ escape these chars: [\^$.|?*+() for c in r"\[^$.|?*+()": s = s.replace(c,"\\"+c) s = s.replace("\n",r"\n") s = s.replace("\t",r"\t") return _ustr(s) | fc374eb717c1a588cb73ceb556379c52474f65a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12364/fc374eb717c1a588cb73ceb556379c52474f65a4/pyparsing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6939,
6628,
7803,
12,
87,
4672,
468,
98,
225,
4114,
4259,
5230,
30,
23781,
66,
8,
18,
96,
35,
14,
15,
1435,
364,
276,
316,
436,
12691,
5969,
8,
18,
96,
35,
14,
15,
1435,
6877,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6939,
6628,
7803,
12,
87,
4672,
468,
98,
225,
4114,
4259,
5230,
30,
23781,
66,
8,
18,
96,
35,
14,
15,
1435,
364,
276,
316,
436,
12691,
5969,
8,
18,
96,
35,
14,
15,
1435,
6877,... | |
self.videoWindow.makeKeyAndOrderFront_(nil) if self.delegate is not nil and self.delegate.didEnterFullscreenMode: | FullScreenVideoController.fsWindow.makeKeyAndOrderFront_(nil) if self.delegate is not None: | def enterFullScreen(self): SetSystemUIMode(kUIModeAllHidden, 0) self.videoWindow.makeKeyAndOrderFront_(nil) if self.delegate is not nil and self.delegate.didEnterFullscreenMode: self.delegate.didEnterFullscreenMode() | 6186e4a5c970f8e47cbfc5c7d887acc6a15561fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/6186e4a5c970f8e47cbfc5c7d887acc6a15561fb/frontend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6103,
5080,
7956,
12,
2890,
4672,
1000,
3163,
5370,
2309,
12,
79,
5370,
2309,
1595,
9345,
16,
374,
13,
11692,
7956,
10083,
2933,
18,
2556,
3829,
18,
6540,
653,
1876,
2448,
9580,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6103,
5080,
7956,
12,
2890,
4672,
1000,
3163,
5370,
2309,
12,
79,
5370,
2309,
1595,
9345,
16,
374,
13,
11692,
7956,
10083,
2933,
18,
2556,
3829,
18,
6540,
653,
1876,
2448,
9580,
67,
12,
... |
amiId = bundleChannel.receive() logPrint('AMI: ' + amiId) | amiId = bundleChannel.receive() logPrint('AMI: ' + amiId) | def main(options, _args): runSystemEx('svn copy https://clovr.svn.sourceforge.net/svnroot/clovr/trunk https://clovr.svn.sourceforge.net/svnroot/clovr/tags/%s -m "Cutting release %s"' % (options('general.version'), options('general.version')), log=True) runSystemEx('svn copy https://vappio.svn.sourceforge.net/svnroot/vappio/trunk https://vappio.svn.sourceforge.net/svnroot/vappio/tags/%s -m "Cutting release %s"' % (options('general.version'), options('general.version')), log=True) runSystemEx('scp %s:/export/%s .' % (options('general.remote_name'), options('general.image')), log=True) runSystemEx('cp %s /usr/local/projects/clovr/images' % options('general.image'), log=True) runSystemEx('cp %s VMware_conversion/shared/convert_img.img' % options('general.image'), log=True) waitForPasswordChange() bundleChannel = threads.runThreadWithChannel(bundleAMI)[1].sendWithChannel(options) convertChannel = threads.runThreadWithChannel(convertImage)[1].sendWithChannel(options) try: amiId = bundleChannel.receive() logPrint('AMI: ' + amiId) except Exception, err: amiId = None errorPrint('Bundling AMI failed for some reason. Error message:') errorPrint(str(err)) try: convertChannel.receive() vmWareDir = 'clovr-vmware.beta-%s' % options('general.version') runSystemEx('mkdir -p ' + vmWareDir) runSystemEx('mv VMware_conversion/shared/converted_img.vmdk %s' % os.path.join(vmWareDir, 'clovr.9-04.x86-64.beta-%s.vmdk' % options('general.version'))) runSystemEx('mkdir -p %s %s' % (os.path.join(vmWareDir, 'keys'), os.path.join(vmWareDir, 'user_data'))) runSystemEx('cp -rv /usr/local/projects/clovr/shared ' + vmWareDir) fout = open(os.path.join(vmWareDir, 'start_clovr.vmx'), 'w') clovrConf = config.configFromMap(dict(version=options('general.version'))) for line in open('/usr/local/projects/clovr/start_clovr.vmx'): fout.write(config.replaceStr(line, clovrConf)) except Exception, err: errorPrint('Converting image failed. Error message:') errorPrint(str(err)) | ddca11fdef05bad1b5f0af6e0eeed6a0c3fd5136 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5741/ddca11fdef05bad1b5f0af6e0eeed6a0c3fd5136/releaseCutS2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
2116,
16,
389,
1968,
4672,
1086,
3163,
424,
2668,
31505,
1610,
2333,
2207,
7550,
18090,
18,
31505,
18,
3168,
1884,
908,
18,
2758,
19,
31505,
3085,
19,
7550,
18090,
19,
26133,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
2116,
16,
389,
1968,
4672,
1086,
3163,
424,
2668,
31505,
1610,
2333,
2207,
7550,
18090,
18,
31505,
18,
3168,
1884,
908,
18,
2758,
19,
31505,
3085,
19,
7550,
18090,
19,
26133,
2... |
self.runs.appendleft(job_run) self.remove_old_runs() | def build_run(self, node=None, actions=None, run_num=None): job_run = JobRun(self, run_num=run_num) job_run.node = node or self.node_pool.next() | 47660dac4296c27e039641dba3d3ece3ff71c575 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14977/47660dac4296c27e039641dba3d3ece3ff71c575/job.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
2681,
12,
2890,
16,
756,
33,
7036,
16,
4209,
33,
7036,
16,
1086,
67,
2107,
33,
7036,
4672,
1719,
67,
2681,
273,
3956,
1997,
12,
2890,
16,
1086,
67,
2107,
33,
2681,
67,
2107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1361,
67,
2681,
12,
2890,
16,
756,
33,
7036,
16,
4209,
33,
7036,
16,
1086,
67,
2107,
33,
7036,
4672,
1719,
67,
2681,
273,
3956,
1997,
12,
2890,
16,
1086,
67,
2107,
33,
2681,
67,
2107... | |
if duration and duration >= timedelta(hours=1): event.duration = duration | event.duration = duration | def OnCreateItem(self, unscrolledPosition): # @@@ this code might want to live somewhere else, refactored view = self.parent.blockItem.itsView event = Calendar.CalendarEvent(view=view) # if a region is selected, then use that for the event span if (self._bgSelectionStartTime): newTime = self._bgSelectionStartTime duration = self._bgSelectionEndTime - self._bgSelectionStartTime else: newTime = self.getDateTimeFromPosition(unscrolledPosition) duration = None event.InitOutgoingAttributes() event.ChangeStart(newTime) event.allDay = False event.anyTime = False # only set the duration if its something larger than the default if duration and duration >= timedelta(hours=1): event.duration = duration | 4a7fd1154cba574679f131dff6da66d5e5f4b713 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/4a7fd1154cba574679f131dff6da66d5e5f4b713/CalendarCanvas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
1684,
1180,
12,
2890,
16,
640,
1017,
25054,
2555,
4672,
468,
22175,
36,
333,
981,
4825,
2545,
358,
8429,
22234,
469,
16,
283,
3493,
7653,
1476,
273,
365,
18,
2938,
18,
2629,
1180,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1684,
1180,
12,
2890,
16,
640,
1017,
25054,
2555,
4672,
468,
22175,
36,
333,
981,
4825,
2545,
358,
8429,
22234,
469,
16,
283,
3493,
7653,
1476,
273,
365,
18,
2938,
18,
2629,
1180,
... |
EXAMPLES: These computations use pseudo-random numbers, so we set | EXAMPLES: These computations use pseudo-random numbers, so we set | def upper_central_series(self): """ Return the upper central series of this group as a list of permutation groups. EXAMPLES: These computations use pseudo-random numbers, so we set the seed for reproducible testing. :: sage: G = PermutationGroup([[(1,2,3),(4,5)],[(3,4)]]) sage: G.upper_central_series() [Permutation Group with generators [()]] """ current_randstate().set_seed_gap() ans = [] DS = self._gap_().UpperCentralSeriesOfGroup() n = DS.Length() for i in range(1,n+1): ans.append(PermutationGroup(gap_group=DS[i])) return ans | f5f8be9435d58a2a709e6aa602d3c0e6ac097c6a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/f5f8be9435d58a2a709e6aa602d3c0e6ac097c6a/permgroup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3854,
67,
71,
12839,
67,
10222,
12,
2890,
4672,
3536,
2000,
326,
3854,
18291,
4166,
434,
333,
1041,
487,
279,
666,
434,
17440,
3252,
18,
225,
5675,
8900,
11386,
30,
225,
8646,
5305,
1012... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3854,
67,
71,
12839,
67,
10222,
12,
2890,
4672,
3536,
2000,
326,
3854,
18291,
4166,
434,
333,
1041,
487,
279,
666,
434,
17440,
3252,
18,
225,
5675,
8900,
11386,
30,
225,
8646,
5305,
1012... |
An element of ps_ring which is the q-expansion of eta(q)/q^{1/24} truncated to n terms. | An element of ps_ring which is the q-expansion of $\eta(q)/q^{1/24}$ truncated to n terms. | def qexp_eta(ps_ring, n): r""" Return the q-expansion of $\eta(q) / q^{1/24}$, where $\eta(q)$ is Dedekind's function $$\eta(q) = q^{1/24}\prod_{i=1}^\infty (1-q^i)$$, as an element of ps_ring, to precision n. Completely naive algorithm. INPUTS: -- (PowerSeriesRing) ps_ring: a power series ring -- we pass this as an argument as we frequently need to create multiple series in the same ring. -- (integer) n: the number of terms to compute. OUTPUT: An element of ps_ring which is the q-expansion of eta(q)/q^{1/24} truncated to n terms. ALGORITHM: Multiply out the product $\prod_{i=1}^n (1 - q^i)$. Could perhaps be speeded up by using the identity \[ \eta(q) = q^{1/24}( 1 + \sum_{i \ge 1} (-1)^n (q^{n(3n+1)/2} + q^{n(3n-1)/2}),\] but I'm lazy. EXAMPLES: sage: qexp_eta(ZZ[['q']], 100) 1 - q - q^2 + q^5 + q^7 - q^12 - q^15 + q^22 + q^26 - q^35 - q^40 + q^51 + q^57 - q^70 - q^77 + q^92 + O(q^100) """ q = ps_ring.gen() t = ps_ring(1).add_bigoh(n) for i in xrange(1,n): t = t*ps_ring( 1 - q**i) return t | 1f3a538d6f6f09006ed698b975e492622ef875e5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/1f3a538d6f6f09006ed698b975e492622ef875e5/etaproducts.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1043,
2749,
67,
1066,
12,
1121,
67,
8022,
16,
290,
4672,
436,
8395,
2000,
326,
1043,
17,
2749,
12162,
434,
271,
64,
1066,
12,
85,
13,
342,
1043,
66,
95,
21,
19,
3247,
22496,
16,
1625... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1043,
2749,
67,
1066,
12,
1121,
67,
8022,
16,
290,
4672,
436,
8395,
2000,
326,
1043,
17,
2749,
12162,
434,
271,
64,
1066,
12,
85,
13,
342,
1043,
66,
95,
21,
19,
3247,
22496,
16,
1625... |
class wxTable(DropReceiveWidget, wx.grid.Grid): | class wxTable(DraggableWidget, DropReceiveWidget, wx.grid.Grid): | def GetAttr (self, row, column, kind): attribute = self.base_GetAttr (row, column, kind) if not attribute: type = self.GetTypeName (row, column) delegate = AttributeEditor.GetAttributeEditor (type) attribute = self.defaultROAttribute """ An apparent bug in table asks for an attribute even when there are no entries in the table """ view = self.GetView() if (view.GetElementCount() != 0 and delegate.ReadOnly (view.GetElementValue (row, column))): attribute = self.defaultRWAttribute attribute.IncRef() return attribute | b27aba0e79f1da95ee4752f9363327c548854455 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/b27aba0e79f1da95ee4752f9363327c548854455/ControlBlocks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
3843,
261,
2890,
16,
1027,
16,
1057,
16,
3846,
4672,
1566,
273,
365,
18,
1969,
67,
967,
3843,
261,
492,
16,
1057,
16,
3846,
13,
309,
486,
1566,
30,
618,
273,
365,
18,
967,
7947,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3843,
261,
2890,
16,
1027,
16,
1057,
16,
3846,
4672,
1566,
273,
365,
18,
1969,
67,
967,
3843,
261,
492,
16,
1057,
16,
3846,
13,
309,
486,
1566,
30,
618,
273,
365,
18,
967,
7947,... |
if __name__=="__main__": | if __name__ == "__main__": | def subtract_time_indep_bkg(obj,B_list,**kwargs): """ This function takes a SOM or a SO and a list of time-independent background tuples and subtracts the numbers from the appropriate SO in the SOM or the given SO. The list of tuples (could be just one tuple in the case of the SO) is assumed to be in the same order as the SOs in the SOM. Parameters: ---------- -> obj is a SOM or SO from which to subtract the individual Bs from the B_list -> B_list are the time-independent backgrounds to subtract from the SOs in the SOM or a SO Return: ------- <- A SOM or SO with the time-independent backgrounds subtracted Exceptions: ---------- <- IndexError is raised if the B_list object is empty <- TypeError is raised if the first argument is not a SOM or SO <- RuntimeError is raised if the SOM and list are not the same length """ if len(B_list) <= 0: raise IndexError, "List of time-independent background cannot be empty" # List is correct size, go on else: pass # import the helper functions import hlr_utils (o_descr,l_descr)=hlr_utils.get_descr(obj,B_list) if o_descr == "number" or o_descr == "list": raise TypeError, "First argument must be a SOM or a SO!" # Have a SOM or SO, go on else: pass (result,res_descr)=hlr_utils.empty_result(obj) result=hlr_utils.copy_som_attr(result,res_descr,obj,o_descr) import common_lib # iterate through the values for i in range(hlr_utils.get_length(obj)): val1 = hlr_utils.get_value(obj,i,o_descr,"all") val2 = hlr_utils.get_value(B_list,i,l_descr,"all") value = common_lib.sub_ncerr(val1, val2) hlr_utils.result_insert(result,res_descr,value,None,"all") return result | 4d49f1aa94b12824979865b976621cfb89eca2ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/763/4d49f1aa94b12824979865b976621cfb89eca2ad/hlr_subtract_time_indep_bkg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10418,
67,
957,
67,
267,
15037,
67,
70,
14931,
12,
2603,
16,
38,
67,
1098,
16,
636,
4333,
4672,
3536,
1220,
445,
5530,
279,
348,
1872,
578,
279,
7460,
471,
279,
666,
434,
813,
17,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10418,
67,
957,
67,
267,
15037,
67,
70,
14931,
12,
2603,
16,
38,
67,
1098,
16,
636,
4333,
4672,
3536,
1220,
445,
5530,
279,
348,
1872,
578,
279,
7460,
471,
279,
666,
434,
813,
17,
26... |
pathname = _winreg.QueryValueEx(HKEY_LOCAL_MACHINE, \ "Software\\Python\\PythonCore\\%s\\Modules\\%s" % (sys.winver, name)) | pathname = win32api.RegQueryValue(HKEY_LOCAL_MACHINE, "Software\\Python\\PythonCore\\%s\\Modules\\%s" % (sys.winver, name)) | def find_module(self, name, path): if name in self.excludes: self.msgout(3, "find_module -> Excluded") raise ImportError, name | d8c3466dfb0ae0eb2105137bf301bbd7bbd5637c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1361/d8c3466dfb0ae0eb2105137bf301bbd7bbd5637c/modulefinder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
2978,
12,
2890,
16,
508,
16,
589,
4672,
309,
508,
316,
365,
18,
338,
8993,
30,
365,
18,
3576,
659,
12,
23,
16,
315,
4720,
67,
2978,
317,
1312,
7908,
7923,
1002,
11308,
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,
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,
1104,
67,
2978,
12,
2890,
16,
508,
16,
589,
4672,
309,
508,
316,
365,
18,
338,
8993,
30,
365,
18,
3576,
659,
12,
23,
16,
315,
4720,
67,
2978,
317,
1312,
7908,
7923,
1002,
11308,
16,
... |
def __pp_dict(self, items, doublespace, depth, exclude, is_last): | def __pp_dict(self, dict, doublespace, depth, exclude, is_last): items = dict.items() items.sort() | def __pp_dict(self, items, doublespace, depth, exclude, is_last): line1 = (is_last and ' ') or '|' s = '' for item in items: line2 = ((item is items[-1]) and ' ') or '|' joiner = '\n %s %s ' % (line1, line2) if doublespace: s += '\n %s |' % line1 s += '\n %s +- ' % line1 valstr = self.__pp_val(item[1], doublespace, depth, exclude) s += joiner.join(('%s => %s' % (item[0], valstr)).split('\n')) return s | a15d7aa85de27eed09a891e5147e9f0ca61f2e10 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/a15d7aa85de27eed09a891e5147e9f0ca61f2e10/apidoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
11858,
67,
1576,
12,
2890,
16,
2065,
16,
31446,
909,
16,
3598,
16,
4433,
16,
353,
67,
2722,
4672,
1516,
273,
2065,
18,
3319,
1435,
1516,
18,
3804,
1435,
980,
21,
273,
261,
291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11858,
67,
1576,
12,
2890,
16,
2065,
16,
31446,
909,
16,
3598,
16,
4433,
16,
353,
67,
2722,
4672,
1516,
273,
2065,
18,
3319,
1435,
1516,
18,
3804,
1435,
980,
21,
273,
261,
291,
... |
wname = gtk.glade.get_widget_name(wid) | wname = gtkglade.get_widget_name(wid) | def __extract_autoWidgets(self): """Extract autoWidgets map if needed, out of the glade specifications and gtk builder""" if self.__autoWidgets_calculated: return | ba4eb0c3d70f523393531579908718bf417318d5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4095/ba4eb0c3d70f523393531579908718bf417318d5/view.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
8004,
67,
6079,
16166,
12,
2890,
4672,
3536,
4976,
3656,
16166,
852,
309,
3577,
16,
596,
434,
326,
5118,
2486,
21950,
471,
22718,
2089,
8395,
309,
365,
16186,
6079,
16166,
67,
22113,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
8004,
67,
6079,
16166,
12,
2890,
4672,
3536,
4976,
3656,
16166,
852,
309,
3577,
16,
596,
434,
326,
5118,
2486,
21950,
471,
22718,
2089,
8395,
309,
365,
16186,
6079,
16166,
67,
22113,... |
print 'Problem creating patch bundle %s'%filename | print 'Problem creating darcs patch bundle %s'%filename | def send(self, filename, options='', url=None): """ Create a darcs patch bundle with the given filename against the repository at the given url (which is by default the 'official' SAGE repository). | b557ec9134bed224df94f23d7a62a7bfaadb3d94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/b557ec9134bed224df94f23d7a62a7bfaadb3d94/darcs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
12,
2890,
16,
1544,
16,
702,
2218,
2187,
880,
33,
7036,
4672,
3536,
1788,
279,
302,
297,
2143,
4729,
3440,
598,
326,
864,
1544,
5314,
326,
3352,
622,
326,
864,
880,
261,
12784,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
12,
2890,
16,
1544,
16,
702,
2218,
2187,
880,
33,
7036,
4672,
3536,
1788,
279,
302,
297,
2143,
4729,
3440,
598,
326,
864,
1544,
5314,
326,
3352,
622,
326,
864,
880,
261,
12784,
3... |
head_ID = "Sequence identity in percent comparing a sequence to another \n(excluding deletions in the first sequence)" | head_ID = """Pairwise sequence identity in percent (excluding deletions in the reference) -- for that reason, the matrix is *not* symetric and should be read row-wise (the first line is the most interesting one). """ | def output_identities(self, aln_dictionary, identities_file = None, identities_info_file = None, identities_cov_file = None): """ Writes three files to disk with identity info about the current multiple alignment. | 2af0f1d3e1f7c08fcceef53833937bbe196e5c0d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/482/2af0f1d3e1f7c08fcceef53833937bbe196e5c0d/CheckIdentities.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
876,
67,
6392,
1961,
12,
2890,
16,
23266,
67,
15556,
16,
17230,
67,
768,
273,
599,
16,
17230,
67,
1376,
67,
768,
273,
599,
16,
17230,
67,
14014,
67,
768,
273,
599,
4672,
3536,
30053,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
876,
67,
6392,
1961,
12,
2890,
16,
23266,
67,
15556,
16,
17230,
67,
768,
273,
599,
16,
17230,
67,
1376,
67,
768,
273,
599,
16,
17230,
67,
14014,
67,
768,
273,
599,
4672,
3536,
30053,
... |
parser = OptionParser(usage, version=__version__, description=description) | parser = OptionParser(usage, version=__version__, description=description) | def make_document(structure, body): for level, text, struct in structure: # Create the heading with the corresponding level heading = odf_create_heading(level, text=text) # Add the heading to the document's body body.append(heading) make_document(struct, body) | fe705650ad1364b2f19105c85ea3abeb42334f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10612/fe705650ad1364b2f19105c85ea3abeb42334f14/lpod-mm2odt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
5457,
12,
7627,
16,
1417,
4672,
364,
1801,
16,
977,
16,
1958,
316,
3695,
30,
468,
1788,
326,
11053,
598,
326,
4656,
1801,
11053,
273,
320,
2180,
67,
2640,
67,
19948,
12,
2815... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
5457,
12,
7627,
16,
1417,
4672,
364,
1801,
16,
977,
16,
1958,
316,
3695,
30,
468,
1788,
326,
11053,
598,
326,
4656,
1801,
11053,
273,
320,
2180,
67,
2640,
67,
19948,
12,
2815... |
connection.getSessionAttr(self.WRITE_ATTR, write) | connection.setSessionAttr(self.WRITE_ATTR, write) | def startStream(self, environ, start_response, msg): """Start streaming response.""" | ecf9df0df4361f343ab01b0eab2ad5cc6484d1fe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5028/ecf9df0df4361f343ab01b0eab2ad5cc6484d1fe/wsgi_channel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
1228,
12,
2890,
16,
5473,
16,
787,
67,
2740,
16,
1234,
4672,
3536,
1685,
12833,
766,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
1228,
12,
2890,
16,
5473,
16,
787,
67,
2740,
16,
1234,
4672,
3536,
1685,
12833,
766,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
c_ethinca_12 = CoincInspiralUtils.simpleEThinca(c_ifo1, c_ifo2) c_ethinca_13 = CoincInspiralUtils.simpleEThinca(c_ifo1, c_ifo3) c_ethinca_23 = CoincInspiralUtils.simpleEThinca(c_ifo2, c_ifo3) | c_ethinca_12 = simpleEThinca(c_ifo1, c_ifo2) c_ethinca_13 = simpleEThinca(c_ifo1, c_ifo3) c_ethinca_23 = simpleEThinca(c_ifo2, c_ifo3) | def getTriggersWithinEpsilon(self, candidate, epsilon, epsilon_ball_type = "version2"): | c18d0c41d409197f7d9c036e72adbff6b8118292 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5758/c18d0c41d409197f7d9c036e72adbff6b8118292/CoincInspiralUtils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
15114,
18949,
29889,
10327,
12,
2890,
16,
5500,
16,
12263,
16,
12263,
67,
19067,
67,
723,
273,
315,
1589,
22,
6,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
15114,
18949,
29889,
10327,
12,
2890,
16,
5500,
16,
12263,
16,
12263,
67,
19067,
67,
723,
273,
315,
1589,
22,
6,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
VARS %s site="%s" ifo="%s" frstart="%s" frend="%s" start="%d" end="%d" chunklen="%d" channel="%s" calcache="%s"\ """ % ( jobname,site,ifo,seg.startpad,seg.endpad,chunk.start,chunk.end, chunk.length,chan,self.config['input'][string.lower(ifo) + '-cal']) | VARS %s site="%s" ifo="%s" frstart="%s" frend="%s" start="%d" end="%d" channel="%s" calcache="%s"\ """ % ( jobname,site,ifo,seg.startpad,seg.endpad,chunk.start,chunk.end,chan, self.config['input'][string.lower(ifo) + '-cal']) | def builddag(self,cache,bank,inspiral): chan = self.config['input']['channel-name'] site = chan[0] ifo = chan[0:2] dag_fh = open( self.basename + ".dag", "w" ) print >> dag_fh, "DOT %s.dot UPDATE OVERWRITE" % self.basename # jobs to generate the frame cache files for seg in self.segments: jobname = 'frcache_%s_%d_%d' % (site,seg.startpad,seg.endpad) print >> dag_fh, 'JOB %s %s.frcache.condor' % (jobname,self.basename), if cache: print >> dag_fh, 'done', print >> dag_fh, '\nVARS %s site="%s" frstart="%s" frend="%s"' % ( jobname, site, seg.startpad, seg.endpad ) for i in range(1,len(self.segments)): print >> dag_fh, 'PARENT frcache_%s_%s_%s CHILD frcache_%s_%s_%s' % ( site,self.segments[i-1].startpad,self.segments[i-1].endpad, site,self.segments[i].startpad,self.segments[i].endpad) # jobs to generate the template banks for seg in self.segments: parent = 'frcache_%s_%s_%s' % (site,seg.startpad,seg.endpad) for chunk in seg.chunks: jobname = 'tmpltbank_%s_%s_%s' % (ifo,chunk.start,chunk.end) print >> dag_fh, 'JOB %s %s.tmpltbank.condor' % (jobname,self.basename), if bank: print >> dag_fh, 'done', print >> dag_fh, """ | e9d33d7c74b71221fa79b8f07354e448e7971b07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/e9d33d7c74b71221fa79b8f07354e448e7971b07/inspiral_pipeline.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25666,
330,
449,
346,
12,
2890,
16,
2493,
16,
10546,
16,
267,
1752,
481,
287,
4672,
3861,
273,
365,
18,
1425,
3292,
2630,
21712,
4327,
17,
529,
3546,
2834,
273,
3861,
63,
20,
65,
21479... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25666,
330,
449,
346,
12,
2890,
16,
2493,
16,
10546,
16,
267,
1752,
481,
287,
4672,
3861,
273,
365,
18,
1425,
3292,
2630,
21712,
4327,
17,
529,
3546,
2834,
273,
3861,
63,
20,
65,
21479... |
C = 8*200*t | d = self._multiple_of_degree_of_isogeny_to_optimal_curve() C = 8*d*t | def L_ratio(self): r""" Returns the ratio $L(E,1)/\Omega$ as an exact rational number. The result is \emph{provably} correct if the Manin constant of the associated optimal quotient is $\leq 2$. This hypothesis on the Manin constant is true for all semistable curves (i.e., squarefree conductor), by a theorem of Mazur from his \emph{Rational Isogenies of Prime Degree} paper. | d61e20ab95dcae0adf139cfaf4ff8a568d208514 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/d61e20ab95dcae0adf139cfaf4ff8a568d208514/ell_rational_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
511,
67,
9847,
12,
2890,
4672,
436,
8395,
2860,
326,
7169,
271,
48,
12,
41,
16,
21,
13176,
64,
51,
81,
11061,
8,
487,
392,
5565,
436,
8371,
1300,
18,
1021,
563,
353,
521,
351,
844,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
511,
67,
9847,
12,
2890,
4672,
436,
8395,
2860,
326,
7169,
271,
48,
12,
41,
16,
21,
13176,
64,
51,
81,
11061,
8,
487,
392,
5565,
436,
8371,
1300,
18,
1021,
563,
353,
521,
351,
844,
... |
newRolloverAt = self.rolloverAt + (daysToWait * (60 * 60 * 24)) if not utc: | newRolloverAt = result + (daysToWait * (60 * 60 * 24)) if not self.utc: | def __init__(self, filename, when='h', interval=1, backupCount=0, encoding=None, delay=0, utc=False): BaseRotatingHandler.__init__(self, filename, 'a', encoding, delay) self.when = when.upper() self.backupCount = backupCount self.utc = utc # Calculate the real rollover interval, which is just the number of # seconds between rollovers. Also set the filename suffix used when # a rollover occurs. Current 'when' events supported: # S - Seconds # M - Minutes # H - Hours # D - Days # midnight - roll over at midnight # W{0-6} - roll over on a certain day; 0 - Monday # # Case of the 'when' specifier is not important; lower or upper case # will work. currentTime = int(time.time()) if self.when == 'S': self.interval = 1 # one second self.suffix = "%Y-%m-%d_%H-%M-%S" self.extMatch = r"^\d{4}-\d{2}-\d{2}_\d{2}-\d{2}-\d{2}$" elif self.when == 'M': self.interval = 60 # one minute self.suffix = "%Y-%m-%d_%H-%M" self.extMatch = r"^\d{4}-\d{2}-\d{2}_\d{2}-\d{2}$" elif self.when == 'H': self.interval = 60 * 60 # one hour self.suffix = "%Y-%m-%d_%H" self.extMatch = r"^\d{4}-\d{2}-\d{2}_\d{2}$" elif self.when == 'D' or self.when == 'MIDNIGHT': self.interval = 60 * 60 * 24 # one day self.suffix = "%Y-%m-%d" self.extMatch = r"^\d{4}-\d{2}-\d{2}$" elif self.when.startswith('W'): self.interval = 60 * 60 * 24 * 7 # one week if len(self.when) != 2: raise ValueError("You must specify a day for weekly rollover from 0 to 6 (0 is Monday): %s" % self.when) if self.when[1] < '0' or self.when[1] > '6': raise ValueError("Invalid day specified for weekly rollover: %s" % self.when) self.dayOfWeek = int(self.when[1]) self.suffix = "%Y-%m-%d" self.extMatch = r"^\d{4}-\d{2}-\d{2}$" else: raise ValueError("Invalid rollover interval specified: %s" % self.when) | 5de77b06bda346967d72fae5296a5c3aaac7f18a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/5de77b06bda346967d72fae5296a5c3aaac7f18a/handlers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1544,
16,
1347,
2218,
76,
2187,
3673,
33,
21,
16,
5114,
1380,
33,
20,
16,
2688,
33,
7036,
16,
4624,
33,
20,
16,
9439,
33,
8381,
4672,
3360,
8570,
1776,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1544,
16,
1347,
2218,
76,
2187,
3673,
33,
21,
16,
5114,
1380,
33,
20,
16,
2688,
33,
7036,
16,
4624,
33,
20,
16,
9439,
33,
8381,
4672,
3360,
8570,
1776,... |
control.send("hatari-shortcut %s\n" % line) | hatari.trigger_shortcut(line) elif first in event_tokens: hatari.insert_event(line) elif first in debugger_tokens: hatari.debug_command(line) elif first in option_tokens: hatari.change_option(line) | def loop(self): try: line = raw_input("hatari-command: ") return line except EOFError: return "" | 4fa40d0fa53f566e2da9a25725626441b833727b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8501/4fa40d0fa53f566e2da9a25725626441b833727b/hatari-console.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2798,
12,
2890,
4672,
775,
30,
980,
273,
1831,
67,
2630,
2932,
76,
8761,
77,
17,
3076,
30,
9369,
327,
980,
1335,
6431,
668,
30,
327,
1408,
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,
2798,
12,
2890,
4672,
775,
30,
980,
273,
1831,
67,
2630,
2932,
76,
8761,
77,
17,
3076,
30,
9369,
327,
980,
1335,
6431,
668,
30,
327,
1408,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def choose_possible_deformations(self): | def choose_possible_deformations(self, first=False): | def choose_possible_deformations(self): """Turn on sensible radio buttons. | 55a0953c005da558c7ba1024ad29f62e79599c11 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5735/55a0953c005da558c7ba1024ad29f62e79599c11/scaling.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9876,
67,
12708,
67,
536,
535,
1012,
12,
2890,
16,
1122,
33,
8381,
4672,
3536,
15858,
603,
15390,
1523,
13512,
9502,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9876,
67,
12708,
67,
536,
535,
1012,
12,
2890,
16,
1122,
33,
8381,
4672,
3536,
15858,
603,
15390,
1523,
13512,
9502,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
raise ValueError("Different strand") | raise ValueError("Different strand:\n%s\nvs:\n%s" % (str(old), str(new))) | def compare_feature(old, new, ignore_sub_features=False) : """Check two SeqFeatures agree.""" if old.type != new.type : raise ValueError("Type %s versus %s" % (old.type, new.type)) if old.location.nofuzzy_start != new.location.nofuzzy_start \ or old.location.nofuzzy_end != new.location.nofuzzy_end : raise ValueError("%s versus %s" % (old.location, new.location)) if old.strand != new.strand : raise ValueError("Different strand") if old.location.start != new.location.start : raise ValueError("%s versus %s" % (old.location.start, new.location.start)) if old.location.end != new.location.end : raise ValueError("%s versus %s" % (old.location.end, new.location.end)) if not ignore_sub_features : if len(old.sub_features) != len(new.sub_features) : raise ValueError("Different sub features") for a,b in zip(old.sub_features, new.sub_features) : if not compare_feature(a,b) : return False #This only checks key shared qualifiers #Would a white list be easier? #for key in ["name","gene","translation","codon_table","codon_start","locus_tag"] : for key in set(old.qualifiers.keys()).intersection(new.qualifiers.keys()): if key in ["db_xref","protein_id","product","note"] : #EMBL and GenBank files are use different references/notes/etc continue if old.qualifiers[key] != new.qualifiers[key] : raise ValueError("Qualifier mis-match for %s:\n%s\n%s" \ % (key, old.qualifiers[key], new.qualifiers[key])) return True | fb1b12e4f45aee41028f31e3010c1be3d0f9d3a9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7167/fb1b12e4f45aee41028f31e3010c1be3d0f9d3a9/test_SeqIO_features.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3400,
67,
7238,
12,
1673,
16,
394,
16,
2305,
67,
1717,
67,
7139,
33,
8381,
13,
294,
3536,
1564,
2795,
14367,
8696,
1737,
992,
12123,
309,
1592,
18,
723,
480,
394,
18,
723,
294,
1002,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3400,
67,
7238,
12,
1673,
16,
394,
16,
2305,
67,
1717,
67,
7139,
33,
8381,
13,
294,
3536,
1564,
2795,
14367,
8696,
1737,
992,
12123,
309,
1592,
18,
723,
480,
394,
18,
723,
294,
1002,
... |
def save(self): | def save(self, force_insert=False, force_update=False): | def save(self): if hasattr(self.product,'_sub_types'): del self.product._sub_types super(GiftCertificateProduct, self).save() | 4a1d6a47ea08e8aed44e9afcf1d63b6b48990789 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13656/4a1d6a47ea08e8aed44e9afcf1d63b6b48990789/models.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
12,
2890,
16,
2944,
67,
6387,
33,
8381,
16,
2944,
67,
2725,
33,
8381,
4672,
309,
3859,
12,
2890,
18,
5896,
11189,
67,
1717,
67,
2352,
11,
4672,
1464,
365,
18,
5896,
6315,
1717,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1923,
12,
2890,
16,
2944,
67,
6387,
33,
8381,
16,
2944,
67,
2725,
33,
8381,
4672,
309,
3859,
12,
2890,
18,
5896,
11189,
67,
1717,
67,
2352,
11,
4672,
1464,
365,
18,
5896,
6315,
1717,
... |
print 'msgstr ""' print | print 'msgstr ""\n' | def write(self, fp): options = self.__options timestamp = time.ctime(time.time()) # common header try: sys.stdout = fp # The time stamp in the header doesn't have the same format # as that generated by xgettext... print pot_header % {'time': timestamp, 'version':__version__} for k, v in self.__messages.items(): for filename, lineno in v: # location comments are different b/w Solaris and GNU d = {'filename': filename, 'lineno': lineno} if options.location == options.SOLARIS: print _('# File: %(filename)s, line: %(lineno)d') % d elif options.location == options.GNU: print _('#: %(filename)s:%(lineno)d') % d # TBD: sorting, normalizing print 'msgid', normalize(k) print 'msgstr ""' print finally: sys.stdout = sys.__stdout__ | b748a44903fd0395aa03a8c8e6f42748f50d37f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b748a44903fd0395aa03a8c8e6f42748f50d37f5/pygettext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
4253,
4672,
702,
273,
365,
16186,
2116,
2858,
273,
813,
18,
21261,
12,
957,
18,
957,
10756,
468,
2975,
1446,
775,
30,
2589,
18,
10283,
273,
4253,
468,
1021,
813,
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,
1045,
12,
2890,
16,
4253,
4672,
702,
273,
365,
16186,
2116,
2858,
273,
813,
18,
21261,
12,
957,
18,
957,
10756,
468,
2975,
1446,
775,
30,
2589,
18,
10283,
273,
4253,
468,
1021,
813,
14... |
self._helper_sanity_test(intbitset1) self._helper_sanity_test(intbitset2) | self._helper_sanity_test(intbitset1, msg) self._helper_sanity_test(intbitset2, msg) | def _helper_test_via_fncs_list(self, fncs, intbitset1, intbitset2): orig1 = intbitset(intbitset1) orig2 = intbitset(intbitset2) | ef561cec4ec958742e169db843ce98791db8916f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/ef561cec4ec958742e169db843ce98791db8916f/intbitset_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4759,
67,
3813,
67,
21985,
67,
4293,
2143,
67,
1098,
12,
2890,
16,
2295,
2143,
16,
509,
3682,
542,
21,
16,
509,
3682,
542,
22,
4672,
1647,
21,
273,
509,
3682,
542,
12,
474,
3682... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4759,
67,
3813,
67,
21985,
67,
4293,
2143,
67,
1098,
12,
2890,
16,
2295,
2143,
16,
509,
3682,
542,
21,
16,
509,
3682,
542,
22,
4672,
1647,
21,
273,
509,
3682,
542,
12,
474,
3682... |
cur.execute('select name from booze') | cur.execute('select name from %sbooze' % self.table_prefix) | def test_fetchmany(self): con = self._connect() try: cur = con.cursor() | cfcc2c93bb2f3afff81cb651f606e164b84e739d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7955/cfcc2c93bb2f3afff81cb651f606e164b84e739d/dbapi20.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5754,
9353,
12,
2890,
4672,
356,
273,
365,
6315,
3612,
1435,
775,
30,
662,
273,
356,
18,
9216,
1435,
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,
1842,
67,
5754,
9353,
12,
2890,
4672,
356,
273,
365,
6315,
3612,
1435,
775,
30,
662,
273,
356,
18,
9216,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
while size: experience, status, level, _class, charname = unpack(LD_INFO, data.read(szLD_INFO)) | while size > 0: try: experience, status, level, _class, charname = unpack(LD_INFO, data.read(szLD_INFO)) except: size = size - szLD_INFO continue | def get_ladder(file): try: size = stat(file)[6] data = open(file, "rb") except: print "Error opening %s for read" % file exit() maxtype, checksum = unpack(LD_HEAD, data.read(szLD_HEAD)) size = size - szLD_HEAD head = [] for i in range(maxtype): type, offset, number = unpack(LD_INDEX, data.read(szLD_INDEX)) size = size - szLD_INDEX head.append( { 'type': type, 'offset': offset, 'number': number }) ladder = {} ladder['nor'] = [] ladder['exp'] = [] temp = {} temp['nor'] = [] temp['exp'] = [] while size: experience, status, level, _class, charname = unpack(LD_INFO, data.read(szLD_INFO)) size = size - szLD_INFO ## Avoid null chars if not experience: continue charname = remove_null(charname) died = 0 if status & S_EXP: _type = 'exp' difficulty = ((status >> 0x08) & 0x0f) / 5 else: _type = 'nor' difficulty = ((status >> 0x08) & 0x0f) / 5 if status & S_HC: hc = 1 if status & S_DEAD: died = 1 else: hc = 0 c_class = classes[_class] if difficulty and diff[_type].has_key(difficulty): prefix = diff[_type][difficulty][hc][c_class[1]] else: prefix = None char = (experience, { 'charname' : charname, 'prefix' : prefix, 'experience' : experience, 'class' : c_class[0], 'sex' : c_class[0], 'level' : level, 'type' : _type, 'difficulty' : difficulty, 'hc' : hc, 'died' : died }) ## Dupe char? why? if char not in temp[_type]: temp[_type].append(char) data.close() ## Sorting by exp temp['nor'].sort() temp['nor'].reverse() temp['exp'].sort() temp['exp'].reverse() for _type in temp.keys(): for ch in temp[_type]: ladder[_type].append(ch[1]) del temp return ladder | 7c700949fe8e29852093818efb24aae1e7dff1bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3010/7c700949fe8e29852093818efb24aae1e7dff1bf/ladder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
80,
361,
765,
12,
768,
4672,
775,
30,
963,
273,
610,
12,
768,
25146,
26,
65,
501,
273,
1696,
12,
768,
16,
315,
6731,
7923,
1335,
30,
1172,
315,
668,
10890,
738,
87,
364,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
80,
361,
765,
12,
768,
4672,
775,
30,
963,
273,
610,
12,
768,
25146,
26,
65,
501,
273,
1696,
12,
768,
16,
315,
6731,
7923,
1335,
30,
1172,
315,
668,
10890,
738,
87,
364,
8... |
}) | }, context=context) | def create(self, cr, uid, vals, context={}): """Overrides orm create method """ result = super(account_invoice_line, self).create(cr, uid, vals, context) line = self.browse(cr, uid, result) member_line_obj = self.pool.get('membership.membership_line') if line.invoice_id.type == 'out_invoice': | 2a4c1e50cb967d4599507ed63424b4f85c7753ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2a4c1e50cb967d4599507ed63424b4f85c7753ea/membership.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
2890,
16,
4422,
16,
4555,
16,
5773,
16,
819,
12938,
4672,
3536,
13084,
13969,
752,
707,
3536,
563,
273,
2240,
12,
4631,
67,
16119,
67,
1369,
16,
365,
2934,
2640,
12,
3353,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
2890,
16,
4422,
16,
4555,
16,
5773,
16,
819,
12938,
4672,
3536,
13084,
13969,
752,
707,
3536,
563,
273,
2240,
12,
4631,
67,
16119,
67,
1369,
16,
365,
2934,
2640,
12,
3353,
16,... |
self.ui.write("path %s\n" % path) | def get_entry_from_path(path, module=self.module): # Given the repository url of this wc, say # "http://server/plone/CMFPlone/branches/Plone-2_0-branch" # extract the "entry" portion (a relative path) from what # svn log --xml says, ie # "/CMFPlone/branches/Plone-2_0-branch/tests/PloneTestCase.py" # that is to say "tests/PloneTestCase.py" if path.startswith(module): relative = path[len(module):] if relative.startswith('/'): return relative[1:] else: return relative | 16c5a70cfdb051898ca56593dfbe0c5e778129e5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11312/16c5a70cfdb051898ca56593dfbe0c5e778129e5/subversion.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4099,
67,
2080,
67,
803,
12,
803,
16,
1605,
33,
2890,
18,
2978,
4672,
468,
16803,
326,
3352,
880,
434,
333,
14310,
16,
12532,
468,
282,
315,
2505,
2207,
3567,
19,
412,
476,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4099,
67,
2080,
67,
803,
12,
803,
16,
1605,
33,
2890,
18,
2978,
4672,
468,
16803,
326,
3352,
880,
434,
333,
14310,
16,
12532,
468,
282,
315,
2505,
2207,
3567,
19,
412,
476,
... | |
if verbose: print 'unpack list wrong size' try: a, b = l raise TestFailed except ValueError: pass | Unpacking non-sequence | def __getitem__(self, i): if i >= 0 and i < 3: return i raise IndexError | 989a9d01aa1cbad29606c3b177b5c247a75fefc0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/989a9d01aa1cbad29606c3b177b5c247a75fefc0/test_unpack.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
277,
4672,
309,
277,
1545,
374,
471,
277,
411,
890,
30,
327,
277,
1002,
10195,
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,
1001,
31571,
972,
12,
2890,
16,
277,
4672,
309,
277,
1545,
374,
471,
277,
411,
890,
30,
327,
277,
1002,
10195,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
"""Pop up a dialog with all config possibilities, including optional | """Pop up a dialog with all config possibilities, including optional | def view(self): | 9c8307aa7ce1ae4cab8f3771902bbbb04d7b172b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4494/9c8307aa7ce1ae4cab8f3771902bbbb04d7b172b/moduleBase.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1476,
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,
1476,
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,
-... |
raise IOError("Cannot open raw ref file: %s to write" % raw_file) | raise IOError("Cannot open raw ref file: %s to write" \ % raw_file) | def main(): """Main function. """ global cli_opts (cli_opts, cli_args) = get_cli_options() extract_jobs = get_recids_and_filepaths(cli_args) if len(extract_jobs) == 0: ## no files provided for reference extraction - error message usage() ## Read the journal titles knowledge base, creating the search patterns and replace terms: (title_search_kb, title_search_standardised_titles, title_search_keys) = \ build_titles_knowledge_base(CFG_REFEXTRACT_KB_JOURNAL_TITLES) (preprint_reportnum_sre, standardised_preprint_reportnum_categs) = \ build_institutes_preprints_numeration_knowledge_base(CFG_REFEXTRACT_KB_REPORT_NUMBERS) done_coltags = 0 ## flag to signal that the XML collection tags have been output for curitem in extract_jobs: extract_error = 0 ## extraction was OK unless determined otherwise ## reset the stats counters: count_misc = count_title = count_reportnum = count_url = 0 recid = curitem[0] if cli_opts['verbosity'] >= 1: sys.stdout.write("--- processing RecID: %s pdffile: %s\n" \ % (str(curitem[0]), curitem[1])) if not done_coltags: ## Output opening XML collection tags: if cli_opts['xmlfile']: try: ofilehdl = open(cli_opts['xmlfile'], 'w') ofilehdl.write("%s\n" % CFG_REFEXTRACT_XML_VERSION.encode("utf-8")) ofilehdl.write("%s\n" % CFG_REFEXTRACT_XML_COLLECTION_OPEN.encode("utf-8")) ofilehdl.flush() except: sys.stdout.write("***%s\n\n" % cli_opts['xmlfile']) raise IOError("Cannot open %s to write!" % cli_opts['xmlfile']) else: sys.stdout.write("%s\n" % (CFG_REFEXTRACT_XML_VERSION.encode("utf-8"),)) sys.stdout.write("%s\n" % (CFG_REFEXTRACT_XML_COLLECTION_OPEN.encode("utf-8"),)) done_coltags = 1 ## 1. Get this document body as plaintext: (docbody, extract_error) = get_plaintext_document_body(curitem[1]) if extract_error == 0 and len(docbody) == 0: extract_error = 3 if cli_opts['verbosity'] >= 1: sys.stdout.write("-----get_plaintext_document_body gave: %s lines," \ " overall error: %s\n" % (str(len(docbody)), str(extract_error))) if len(docbody) > 0: ## the document body is not empty: ## 2. If necessary, locate the reference section: if cli_opts['treat_as_reference_section']: ## don't search for citations in the document body: treat it as a reference section: reflines = docbody else: ## launch search for the reference section in the document body: (reflines, extract_error) = extract_references_from_fulltext(docbody) if len(reflines) == 0 and extract_error == 0: extract_error = 6 if cli_opts['verbosity'] >= 1: sys.stdout.write("-----extract_references_from_fulltext gave " \ "len(reflines): %s overall error: %s\n" \ % (str(len(reflines)), str(extract_error))) ## 3. Standardise the reference lines: | afd852f45332d11ac027b8d47ce1a922ce7f2cc6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/afd852f45332d11ac027b8d47ce1a922ce7f2cc6/refextract.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
6376,
445,
18,
3536,
2552,
4942,
67,
4952,
261,
4857,
67,
4952,
16,
4942,
67,
1968,
13,
273,
225,
336,
67,
4857,
67,
2116,
1435,
225,
2608,
67,
10088,
273,
336,
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,
2774,
13332,
3536,
6376,
445,
18,
3536,
2552,
4942,
67,
4952,
261,
4857,
67,
4952,
16,
4942,
67,
1968,
13,
273,
225,
336,
67,
4857,
67,
2116,
1435,
225,
2608,
67,
10088,
273,
336,
67,
... |
line = self._handle.readline() if not line: | """S.next() -> obj or None""" lines = [] while 1: line = self._handle.readline() if not line: break if not lines: if string.find(line, 'Class:') < 0: raise SyntaxError, "I don't see a record:\n%s" % line if lines and string.find(line, 'Class:') >= 0: self._handle.saveline(line) break while line and line[-1] in ['\n', '\r']: line = line[:-1] lines.append(line) if not lines: | def next(self): line = self._handle.readline() if not line: return None if self._parser is not None: return self._parser.parse(line) return line | 9bf1c4c6c486210d0627b3e8feda842ff96939a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/9bf1c4c6c486210d0627b3e8feda842ff96939a2/Lin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
12,
2890,
4672,
3536,
55,
18,
4285,
1435,
317,
1081,
578,
599,
8395,
225,
2362,
273,
5378,
1323,
404,
30,
980,
273,
365,
6315,
4110,
18,
896,
1369,
1435,
309,
486,
980,
30,
898,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
12,
2890,
4672,
3536,
55,
18,
4285,
1435,
317,
1081,
578,
599,
8395,
225,
2362,
273,
5378,
1323,
404,
30,
980,
273,
365,
6315,
4110,
18,
896,
1369,
1435,
309,
486,
980,
30,
898,
... |
factor = round(1/values['rate'], 6) | factor = round(1.0/values['rate'], 6) | def check_factor_and_rate(values): factor = None rate = None | 4df7058a1bfea50026f1f02f1638f1b380528843 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/533/4df7058a1bfea50026f1f02f1638f1b380528843/uom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
6812,
67,
464,
67,
5141,
12,
2372,
4672,
5578,
273,
599,
4993,
273,
599,
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,
866,
67,
6812,
67,
464,
67,
5141,
12,
2372,
4672,
5578,
273,
599,
4993,
273,
599,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
p.append((xvec[0] + uvec[0], xvec[1] + uvec[1])) return p | cb((h * (a * (xvec[0] + uvec[0]) + b), w * (a * (xvec[1] + uvec[1]) + b))) | def positions(self): # x is nominal position # u is displacement p = [ ] for i in range(N**2): xvec = self.x[i] uvec = self.u[i] p.append((xvec[0] + uvec[0], xvec[1] + uvec[1])) return p | a345b3a7256c53c6d1e33b9e6f4af9771ffc75e7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/a345b3a7256c53c6d1e33b9e6f4af9771ffc75e7/jello.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6865,
12,
2890,
4672,
468,
619,
353,
12457,
1490,
1754,
468,
582,
353,
1015,
15917,
293,
273,
306,
308,
364,
277,
316,
1048,
12,
50,
636,
22,
4672,
619,
8799,
273,
365,
18,
92,
63,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6865,
12,
2890,
4672,
468,
619,
353,
12457,
1490,
1754,
468,
582,
353,
1015,
15917,
293,
273,
306,
308,
364,
277,
316,
1048,
12,
50,
636,
22,
4672,
619,
8799,
273,
365,
18,
92,
63,
7... |
self.addFactoryArguments(dbname=dbname,workdir=workdir,port=port) self.args = {'dbname': dbname,'workdir':workdir,'port':port} | self.addFactoryArguments(dbname=dbname,workdir=workdir,port=port,netport=netport) self.args = {'dbname': dbname,'workdir':workdir,'netport':netport, 'port':port} | def __init__(self, dbname='test',workdir=None,port=8869,**kwargs): LoggingBuildStep.__init__(self, **kwargs) self.addFactoryArguments(dbname=dbname,workdir=workdir,port=port) self.args = {'dbname': dbname,'workdir':workdir,'port':port} self.dbname = dbname # Compute defaults for descriptions: description = ["Dropping db"] self.description = description | b7db641b141dca8b63d6ec23f4f477a0d6c864a3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12355/b7db641b141dca8b63d6ec23f4f477a0d6c864a3/buildstep.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
18448,
2218,
3813,
2187,
1252,
1214,
33,
7036,
16,
655,
33,
28,
5292,
29,
16,
636,
4333,
4672,
10253,
3116,
4160,
16186,
2738,
972,
12,
2890,
16,
2826,
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,
1001,
2738,
972,
12,
2890,
16,
18448,
2218,
3813,
2187,
1252,
1214,
33,
7036,
16,
655,
33,
28,
5292,
29,
16,
636,
4333,
4672,
10253,
3116,
4160,
16186,
2738,
972,
12,
2890,
16,
2826,
4... |
t[0].extract() | try: alt = t[0].img['alt'].lower() if alt.find('prev') != -1 or alt.find('next') != -1 or alt.find('team') != -1: t[0].extract() except: pass | def _reformat(self, data): try: data = xml_to_unicode(data, strip_encoding_pats=True)[0] soup = BeautifulSoup(data) except ValueError: # hit some strange encoding problems... print "Unable to parse html for cleaning, leaving it :(" return data # nuke javascript... [s.extract() for s in soup('script')] # remove forward and back nav bars from the top/bottom of each page # cos they really fuck with the flow of things and generally waste space # since we can't use [a,b] syntax to select arbitrary items from a list # we'll have to do this manually... t = soup('table') if t: if (t[0].previousSibling is None or t[0].previousSibling.previousSibling is None): t[0].extract() if (t[-1].nextSibling is None or t[-1].nextSibling.nextSibling is None): t[-1].extract() # for some very odd reason each page's content appears to be in a table # too. and this table has sub-tables for random asides... grr. | 87ba1bf75bd739f72f644af2613e70032eecdb0a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/87ba1bf75bd739f72f644af2613e70032eecdb0a/reader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
266,
2139,
12,
2890,
16,
501,
4672,
775,
30,
501,
273,
2025,
67,
869,
67,
9124,
12,
892,
16,
2569,
67,
5999,
67,
84,
2323,
33,
5510,
25146,
20,
65,
15418,
273,
28132,
12,
892,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
266,
2139,
12,
2890,
16,
501,
4672,
775,
30,
501,
273,
2025,
67,
869,
67,
9124,
12,
892,
16,
2569,
67,
5999,
67,
84,
2323,
33,
5510,
25146,
20,
65,
15418,
273,
28132,
12,
892,
... |
vars[name] = cookies[name].value | value = cookies[name].value unquote_match = self._rx_quotes.match(value) if unquote_match is not None: value = unquote_match.group(1) vars[name] = value | def str_cookies(self): """ Return a *plain* dictionary of cookies as found in the request. """ env = self.environ source = env.get('HTTP_COOKIE', '') if 'webob._parsed_cookies' in env: vars, var_source = env['webob._parsed_cookies'] if var_source == source: return vars vars = {} if source: cookies = BaseCookie() cookies.load(source) for name in cookies: vars[name] = cookies[name].value env['webob._parsed_cookies'] = (vars, source) return vars | 9ba878c483dc7d7e969ffc3093a59513cf834a5d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12287/9ba878c483dc7d7e969ffc3093a59513cf834a5d/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
609,
67,
16240,
12,
2890,
4672,
3536,
2000,
279,
380,
7446,
14,
3880,
434,
7237,
487,
1392,
316,
326,
590,
18,
3536,
1550,
273,
365,
18,
28684,
1084,
273,
1550,
18,
588,
2668,
3693,
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,
609,
67,
16240,
12,
2890,
4672,
3536,
2000,
279,
380,
7446,
14,
3880,
434,
7237,
487,
1392,
316,
326,
590,
18,
3536,
1550,
273,
365,
18,
28684,
1084,
273,
1550,
18,
588,
2668,
3693,
67... |
(myCoH, myC, myT) = gatherCoHStuff(myCommandOnHostID) if myCoH == None: return | if checkAndFixCommand(myCommandOnHostID): return runWOLPhase(myCommandOnHostID) def checkAndFixCommand(myCommandOnHostID): """ pass command through a filter, trying to guess is command is valid four cases here: - command IS valid, return True - command is ALMOST valid, fix it, return True - command is a little invalid, neutralize it, return False - command IS completely messed-up, return False """ | def runCommand(myCommandOnHostID): """ Just a simple start point, chain-load on Upload Phase """ (myCoH, myC, myT) = gatherCoHStuff(myCommandOnHostID) if myCoH == None: return logger = logging.getLogger() # FIXME: those tests are performed way too late ! if not myC.inDeploymentInterval(): return if not myC.isPartOfABundle(): # command is independant, we may advance logger.debug("command_on_host #%s: not part of a bundle" % myCoH.getId()) else: # command is part of a bundle, let's check the bundle state logger.debug("command_on_host #%s: part of bundle %s, order %s " % (myCoH.getId(), myC.getBundleId(), myC.getOrderInBundle())) deps = getDependancies(myCommandOnHostID) if type(deps) == bool and not deps: logger.debug("command_on_host #%s: failed to get dependencies" % (myCoH.getId())) return True if len(deps) != 0: logger.debug("command_on_host #%s: depends on %s " % (myCoH.getId(), deps)) return True # give up, some deps has to be done else: logger.debug("command_on_host #%s: do not depends on something" % (myCoH.getId())) myCoH.setStartDate() logger = logging.getLogger() logger.info("going to do command_on_host #%s from command #%s" % (myCoH.getId(), myCoH.getIdCommand())) logger.debug("command_on_host state is %s" % myCoH.toH()) logger.debug("command state is %s" % myC.toH()) return runWOLPhase(myCommandOnHostID) | 321313c05802923dc31717f6bbd064db82e37e55 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5988/321313c05802923dc31717f6bbd064db82e37e55/scheduling.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31933,
12,
4811,
2189,
1398,
2594,
734,
4672,
3536,
12526,
279,
4143,
787,
1634,
16,
2687,
17,
945,
603,
9414,
19459,
3536,
225,
309,
30970,
8585,
2189,
12,
4811,
2189,
1398,
2594,
734,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31933,
12,
4811,
2189,
1398,
2594,
734,
4672,
3536,
12526,
279,
4143,
787,
1634,
16,
2687,
17,
945,
603,
9414,
19459,
3536,
225,
309,
30970,
8585,
2189,
12,
4811,
2189,
1398,
2594,
734,
... |
elif ((is_param and canonical_ctype in default_array_types) | elif ((is_param and canonical_ctype in default_array_types and not 'out' in options) | def _create_type(self, source_type, options, is_param, is_retval): ctype = self._create_source_type(source_type) if ctype == 'va_list': raise SkipError() # FIXME: FILE* should not be skipped, it should be handled # properly instead elif ctype == 'FILE*': raise SkipError | aa8bf8d82c96d7151017c8b7e721fb4454645597 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2770/aa8bf8d82c96d7151017c8b7e721fb4454645597/transformer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2640,
67,
723,
12,
2890,
16,
1084,
67,
723,
16,
702,
16,
353,
67,
891,
16,
353,
67,
18341,
4672,
11920,
273,
365,
6315,
2640,
67,
3168,
67,
723,
12,
3168,
67,
723,
13,
309,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2640,
67,
723,
12,
2890,
16,
1084,
67,
723,
16,
702,
16,
353,
67,
891,
16,
353,
67,
18341,
4672,
11920,
273,
365,
6315,
2640,
67,
3168,
67,
723,
12,
3168,
67,
723,
13,
309,
11... |
nodes = [] nodes.extend(flatten_nodes(self.nodes)) return tuple(nodes) | nodelist = [] nodelist.extend(flatten_nodes(self.nodes)) return tuple(nodelist) | def getChildNodes(self): nodes = [] nodes.extend(flatten_nodes(self.nodes)) return tuple(nodes) | 0ac16ec1493e76721d37d537a132195fdb2cbe4f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0ac16ec1493e76721d37d537a132195fdb2cbe4f/ast.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23895,
12,
2890,
4672,
2199,
273,
5378,
2199,
18,
14313,
12,
16940,
67,
4690,
12,
2890,
18,
4690,
3719,
327,
3193,
12,
4690,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23895,
12,
2890,
4672,
2199,
273,
5378,
2199,
18,
14313,
12,
16940,
67,
4690,
12,
2890,
18,
4690,
3719,
327,
3193,
12,
4690,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
fp.write('from %s import *\n'%basepackage._code_to_fullname[code]) | def compilesuite(suite, major, minor, language, script, fname, basepackage=None): """Generate code for a single suite""" [name, desc, code, level, version, events, classes, comps, enums] = suite modname = identify(name) if len(modname) > 28: modname = modname[:27] fss, ok = macfs.StandardPutFile('Python output file', modname+'.py') if not ok: return None, None pathname = fss.as_pathname() modname = os.path.splitext(os.path.split(pathname)[1])[0] fp = open(fss.as_pathname(), 'w') fss.SetCreatorType('Pyth', 'TEXT') fp.write('"""Suite %s: %s\n' % (name, desc)) fp.write("Level %d, version %d\n\n" % (level, version)) fp.write("Generated from %s\n"%fname) fp.write("AETE/AEUT resource version %d/%d, language %d, script %d\n" % \ (major, minor, language, script)) fp.write('"""\n\n') fp.write('import aetools\n') fp.write('import MacOS\n\n') fp.write("_code = %s\n\n"% `code`) if basepackage and basepackage._code_to_module.has_key(code): # We are an extension of a baseclass (usually an application extending # Standard_Suite or so). Import everything from our base module fp.write('from %s import *\n'%basepackage._code_to_fullname[code]) basemodule = basepackage._code_to_module[code] else: # We are not an extension. basemodule = None compileclassheader(fp, modname, basemodule) enumsneeded = {} if events: for event in events: compileevent(fp, event, enumsneeded) else: fp.write("\tpass\n\n") objc = ObjectCompiler(fp, basemodule) for cls in classes: objc.compileclass(cls) for cls in classes: objc.fillclasspropsandelems(cls) for comp in comps: objc.compilecomparison(comp) for enum in enums: objc.compileenumeration(enum) for enum in enumsneeded.keys(): objc.checkforenum(enum) objc.dumpindex() return code, modname | 0d0698fa0adf7267f5ec2fc36990cfe728e31744 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/0d0698fa0adf7267f5ec2fc36990cfe728e31744/gensuitemodule.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1161,
1449,
9519,
12,
30676,
16,
7888,
16,
8439,
16,
2653,
16,
2728,
16,
5299,
16,
1026,
5610,
33,
7036,
4672,
3536,
4625,
981,
364,
279,
2202,
11371,
8395,
306,
529,
16,
3044,
16,
981... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1161,
1449,
9519,
12,
30676,
16,
7888,
16,
8439,
16,
2653,
16,
2728,
16,
5299,
16,
1026,
5610,
33,
7036,
4672,
3536,
4625,
981,
364,
279,
2202,
11371,
8395,
306,
529,
16,
3044,
16,
981... | |
print "*** skipping leakage tests ***" | if verbose: print "*** skipping leakage tests ***" | def test_lineterminator(self): class mydialect(csv.Dialect): delimiter = ";" escapechar = '\\' doublequote = False skipinitialspace = True lineterminator = '\r\n' quoting = csv.QUOTE_NONE d = mydialect() | 9a59c54f3a659e3f9185da35eed6774ca13594ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/9a59c54f3a659e3f9185da35eed6774ca13594ad/test_csv.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
7511,
4443,
639,
12,
2890,
4672,
667,
3399,
25909,
386,
12,
6715,
18,
23030,
4672,
5654,
273,
11430,
4114,
3001,
273,
5282,
1645,
6889,
273,
1083,
2488,
6769,
2981,
273,
1053,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7511,
4443,
639,
12,
2890,
4672,
667,
3399,
25909,
386,
12,
6715,
18,
23030,
4672,
5654,
273,
11430,
4114,
3001,
273,
5282,
1645,
6889,
273,
1083,
2488,
6769,
2981,
273,
1053,
... |
raise ValueError, "can't jump from outline level %s to level %s, need intermediates" %(currentlevel, level) | raise ValueError, "can't jump from outline level %s to level %s, need intermediates (destinationname=%r, title=%r)" %(currentlevel, level, destinationname, title) | def addOutlineEntry(self, destinationname, level=0, title=None, closed=None): """destinationname of None means "close the tree" """ from types import IntType, TupleType if destinationname is None and level!=0: raise ValueError, "close tree must have level of 0" if type(level) is not IntType: raise ValueError, "level must be integer, got %s" % type(level) if level<0: raise ValueError, "negative levels not allowed" if title is None: title = destinationname currentlevel = self.currentlevel stack = self.levelstack tree = self.buildtree # adjust currentlevel and stack to match level if level>currentlevel: if level>currentlevel+1: raise ValueError, "can't jump from outline level %s to level %s, need intermediates" %(currentlevel, level) level = currentlevel = currentlevel+1 stack.append([]) while level<currentlevel: # pop off levels to match current = stack[-1] del stack[-1] previous = stack[-1] lastinprevious = previous[-1] if type(lastinprevious) is TupleType: (name, sectionlist) = lastinprevious raise ValueError, "cannot reset existing sections: " + repr(lastinprevious) else: name = lastinprevious sectionlist = current previous[-1] = (name, sectionlist) #sectionlist.append(current) currentlevel = currentlevel-1 if destinationname is None: return stack[-1].append(destinationname) self.destinationnamestotitles[destinationname] = title if closed: self.closedict[destinationname] = 1 self.currentlevel = level | bb5c52574552496fa9a580e7a2d7ebdb20043178 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3878/bb5c52574552496fa9a580e7a2d7ebdb20043178/pdfdoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
21805,
1622,
12,
2890,
16,
2929,
529,
16,
1801,
33,
20,
16,
2077,
33,
7036,
16,
4375,
33,
7036,
4672,
3536,
10590,
529,
434,
599,
4696,
315,
4412,
326,
2151,
6,
3536,
628,
1953,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
21805,
1622,
12,
2890,
16,
2929,
529,
16,
1801,
33,
20,
16,
2077,
33,
7036,
16,
4375,
33,
7036,
4672,
3536,
10590,
529,
434,
599,
4696,
315,
4412,
326,
2151,
6,
3536,
628,
1953,
... |
if __debug__: def debugPrint(self, message): """for debugging""" return self.notify.debug( str(id(self))+' '+message) | def monitor(self, foo): #assert(self.debugPrint("monitor()")) if 1: airborneHeight=self.avatar.getAirborneHeight() onScreenDebug.add("airborneHeight", "% 10.4f"%(airborneHeight,)) if 0: onScreenDebug.add("InputState forward", "%d"%(inputState.isSet("forward"))) onScreenDebug.add("InputState reverse", "%d"%(inputState.isSet("reverse"))) onScreenDebug.add("InputState turnLeft", "%d"%(inputState.isSet("turnLeft"))) onScreenDebug.add("InputState turnRight", "%d"%(inputState.isSet("turnRight"))) return Task.cont | b89bbac8300857fe485c1c4217180cabb1332c50 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/b89bbac8300857fe485c1c4217180cabb1332c50/ControlManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6438,
12,
2890,
16,
8431,
4672,
468,
11231,
12,
2890,
18,
4148,
5108,
2932,
10259,
10031,
3719,
309,
404,
30,
23350,
70,
280,
4644,
2686,
33,
2890,
18,
19660,
18,
588,
29752,
70,
280,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6438,
12,
2890,
16,
8431,
4672,
468,
11231,
12,
2890,
18,
4148,
5108,
2932,
10259,
10031,
3719,
309,
404,
30,
23350,
70,
280,
4644,
2686,
33,
2890,
18,
19660,
18,
588,
29752,
70,
280,
... | |
return _applydiff( ui, fp, patchfile, copyfile, changed, strip=strip, sourcefile=sourcefile, eolmode=eolmode) def _applydiff(ui, fp, patcher, copyfn, changed, strip=1, sourcefile=None, eolmode='strict'): | return _applydiff(ui, fp, patchfile, copyfile, changed, strip=strip, eolmode=eolmode) def _applydiff(ui, fp, patcher, copyfn, changed, strip=1, eolmode='strict'): | def applydiff(ui, fp, changed, strip=1, sourcefile=None, eolmode='strict'): """Reads a patch from fp and tries to apply it. The dict 'changed' is filled in with all of the filenames changed by the patch. Returns 0 for a clean patch, -1 if any rejects were found and 1 if there was any fuzz. If 'eolmode' is 'strict', the patch content and patched file are read in binary mode. Otherwise, line endings are ignored when patching then normalized according to 'eolmode'. Callers probably want to call 'cmdutil.updatedir' after this to apply certain categories of changes not done by this function. """ return _applydiff( ui, fp, patchfile, copyfile, changed, strip=strip, sourcefile=sourcefile, eolmode=eolmode) | 42d91961f6bbb4cd111124374b12d9141902aba1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/42d91961f6bbb4cd111124374b12d9141902aba1/patch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
5413,
12,
4881,
16,
4253,
16,
3550,
16,
2569,
33,
21,
16,
1084,
768,
33,
7036,
16,
14775,
3188,
2218,
13948,
11,
4672,
3536,
7483,
279,
4729,
628,
4253,
471,
9327,
358,
2230,
518... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
5413,
12,
4881,
16,
4253,
16,
3550,
16,
2569,
33,
21,
16,
1084,
768,
33,
7036,
16,
14775,
3188,
2218,
13948,
11,
4672,
3536,
7483,
279,
4729,
628,
4253,
471,
9327,
358,
2230,
518... |
try: self.socket.unwrap() except ssl.SSLError, err: if err.args[0] in (ssl.SSL_ERROR_WANT_READ, ssl.SSL_ERROR_WANT_WRITE): ssl_want_read_or_write = True else: raise | self.socket.unwrap() | def close(self): ssl_want_read_or_write = False try: if isinstance(self.socket, ssl.SSLSocket): if self.socket._sslobj is not None: try: self.socket.unwrap() except ssl.SSLError, err: if err.args[0] in (ssl.SSL_ERROR_WANT_READ, ssl.SSL_ERROR_WANT_WRITE): ssl_want_read_or_write = True else: raise finally: if not ssl_want_read_or_write: super(SSLConnection, self).close() | acfb41cf019ddbfe2d055efd2526a45067e4e2f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/acfb41cf019ddbfe2d055efd2526a45067e4e2f9/test_ftplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
5832,
67,
17369,
67,
896,
67,
280,
67,
2626,
273,
1083,
775,
30,
309,
1549,
12,
2890,
18,
7814,
16,
5832,
18,
1260,
25831,
4672,
309,
365,
18,
7814,
6315,
1049,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
5832,
67,
17369,
67,
896,
67,
280,
67,
2626,
273,
1083,
775,
30,
309,
1549,
12,
2890,
18,
7814,
16,
5832,
18,
1260,
25831,
4672,
309,
365,
18,
7814,
6315,
1049,
... |
dd[fn] = status | dd.setdefault(fn, statusdict()).status = status | def updatestatus(self, wfn, st=None, status=None): if st: status = self.filestatus(wfn, st) else: self.statcache.pop(wfn, None) root, fn = self.split(wfn) d = self.dir(self.tree, root) oldstatus = d.get(fn) isdir = False if oldstatus: try: if not status: if oldstatus in 'almn': status = '!' elif oldstatus == 'r': status = 'r' except TypeError: # oldstatus may be a dict left behind by a deleted # directory isdir = True else: if oldstatus in self.statuskeys and oldstatus != status: del self.dir(self.statustrees[oldstatus], root)[fn] if self.ui.debugflag and oldstatus != status: if isdir: self.ui.note(_('status: %r dir(%d) -> %s\n') % (wfn, len(oldstatus), status)) else: self.ui.note(_('status: %r %s -> %s\n') % (wfn, oldstatus, status)) if not isdir: if status and status != 'i': d[fn] = status if status in self.statuskeys: dd = self.dir(self.statustrees[status], root) if oldstatus != status or fn not in dd: dd[fn] = status else: d.pop(fn, None) | 54d9599c95ebd15d095f0db469ab90a950fae173 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/54d9599c95ebd15d095f0db469ab90a950fae173/server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2166,
270,
395,
996,
12,
2890,
16,
341,
4293,
16,
384,
33,
7036,
16,
1267,
33,
7036,
4672,
309,
384,
30,
1267,
273,
365,
18,
7540,
395,
996,
12,
91,
4293,
16,
384,
13,
469,
30,
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,
2166,
270,
395,
996,
12,
2890,
16,
341,
4293,
16,
384,
33,
7036,
16,
1267,
33,
7036,
4672,
309,
384,
30,
1267,
273,
365,
18,
7540,
395,
996,
12,
91,
4293,
16,
384,
13,
469,
30,
365... |
assert mode[:1] in ("b", "t") | def popen2(cmd, mode="t", bufsize=-1): assert mode[:1] in ("b", "t") import popen2 stdout, stdin = popen2.popen2(cmd, bufsize) return stdin, stdout | 371673927f055a88794b42b146decc7f8f51eeae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/371673927f055a88794b42b146decc7f8f51eeae/os.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
30925,
22,
12,
4172,
16,
1965,
1546,
88,
3113,
1681,
1467,
29711,
21,
4672,
1930,
30925,
22,
3909,
16,
8801,
273,
30925,
22,
18,
84,
3190,
22,
12,
4172,
16,
1681,
1467,
13,
327,
8801,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
30925,
22,
12,
4172,
16,
1965,
1546,
88,
3113,
1681,
1467,
29711,
21,
4672,
1930,
30925,
22,
3909,
16,
8801,
273,
30925,
22,
18,
84,
3190,
22,
12,
4172,
16,
1681,
1467,
13,
327,
8801,
... | |
fil = path + '/' + archivo parser.feed(open(fil).read()) | f = open(path + '/' + indexpage) parser.feed(f.read()) | def index(path, archivo, output): f = formatter.AbstractFormatter(AlmostNullWriter()) parser = IdxHlpHtmlParser(f) parser.path = path parser.ft = output fil = path + '/' + archivo parser.feed(open(fil).read()) parser.close() | f2a2dabef84d4e9ae26694d0244d9fa0cc7b9efd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f2a2dabef84d4e9ae26694d0244d9fa0cc7b9efd/prechm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
12,
803,
16,
6637,
20593,
16,
876,
4672,
284,
273,
4453,
18,
7469,
5074,
12,
1067,
10329,
2041,
2289,
10756,
2082,
273,
3124,
92,
44,
9953,
4353,
2678,
12,
74,
13,
2082,
18,
803,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
12,
803,
16,
6637,
20593,
16,
876,
4672,
284,
273,
4453,
18,
7469,
5074,
12,
1067,
10329,
2041,
2289,
10756,
2082,
273,
3124,
92,
44,
9953,
4353,
2678,
12,
74,
13,
2082,
18,
803,
... |
major_heading = True | got_preamble = True | def parse_substance(self,contents,report_date,url): | 392be97a0f9928862e73ceca51d21a10fb9a1fec /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8428/392be97a0f9928862e73ceca51d21a10fb9a1fec/parse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
1717,
593,
12,
2890,
16,
3980,
16,
6006,
67,
712,
16,
718,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
1717,
593,
12,
2890,
16,
3980,
16,
6006,
67,
712,
16,
718,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
test.test_support.run_unittest(ThreadTests, ThreadJoinOnShutdown) | greentest.test_support.run_unittest(ThreadTests, ThreadJoinOnShutdown) | def test_main(): test.test_support.run_unittest(ThreadTests, ThreadJoinOnShutdown) | cad7258540bacbd086339107275161b5cac2f7b4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10078/cad7258540bacbd086339107275161b5cac2f7b4/test_threading.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5254,
13332,
5174,
319,
395,
18,
3813,
67,
13261,
18,
2681,
67,
4873,
3813,
12,
3830,
14650,
16,
4884,
4572,
1398,
10961,
13,
225,
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,
1842,
67,
5254,
13332,
5174,
319,
395,
18,
3813,
67,
13261,
18,
2681,
67,
4873,
3813,
12,
3830,
14650,
16,
4884,
4572,
1398,
10961,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Manufacturer=u"Martin v. L\xf6wis") | Manufacturer=u"Python Software Foundation") | def build_database(): """Generate an empty database, with just the schema and the Summary information stream.""" if snapshot: uc = upgrade_code_snapshot else: uc = upgrade_code # schema represents the installer 2.0 database schema. # sequence is the set of standard sequences # (ui/execute, admin/advt/install) db = msilib.init_database("python-%s%s.msi" % (full_current_version, msilib.arch_ext), schema, ProductName="Python "+full_current_version, ProductCode=product_code, ProductVersion=current_version, Manufacturer=u"Martin v. L\xf6wis") # The default sequencing of the RemoveExistingProducts action causes # removal of files that got just installed. Place it after # InstallInitialize, so we first uninstall everything, but still roll # back in case the installation is interrupted msilib.change_sequence(sequence.InstallExecuteSequence, "RemoveExistingProducts", 1510) msilib.add_tables(db, sequence) # We cannot set ALLUSERS in the property table, as this cannot be # reset if the user choses a per-user installation. Instead, we # maintain WhichUsers, which can be "ALL" or "JUSTME". The UI manages # this property, and when the execution starts, ALLUSERS is set # accordingly. add_data(db, "Property", [("UpgradeCode", uc), ("WhichUsers", "ALL"), ("ProductLine", "Python%s%s" % (major, minor)), ]) db.Commit() return db | b6e940dbecd26e9dbfbd8ed31c716a581bec5474 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/b6e940dbecd26e9dbfbd8ed31c716a581bec5474/msi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
6231,
13332,
3536,
4625,
392,
1008,
2063,
16,
598,
2537,
326,
1963,
471,
326,
17967,
1779,
1407,
12123,
309,
4439,
30,
6232,
273,
8400,
67,
710,
67,
11171,
469,
30,
6232,
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,
1361,
67,
6231,
13332,
3536,
4625,
392,
1008,
2063,
16,
598,
2537,
326,
1963,
471,
326,
17967,
1779,
1407,
12123,
309,
4439,
30,
6232,
273,
8400,
67,
710,
67,
11171,
469,
30,
6232,
273,
... |
imagedata.append('BI') | def drawInlineImage(self, image, x,y, width=None,height=None): """Draw an Image into the specified rectangle. If width and height are omitted, they are calculated from the image size. Also allow file names as well as images. This allows a caching mechanism""" self._currentPageHasImages = 1 | 1ecb4c7d1e97961cb0ac8fd78208305cfc0aa6b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/1ecb4c7d1e97961cb0ac8fd78208305cfc0aa6b4/canvas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
10870,
2040,
12,
2890,
16,
1316,
16,
619,
16,
93,
16,
1835,
33,
7036,
16,
4210,
33,
7036,
4672,
3536,
6493,
392,
3421,
1368,
326,
1269,
11845,
18,
225,
971,
1835,
471,
2072,
854,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10870,
2040,
12,
2890,
16,
1316,
16,
619,
16,
93,
16,
1835,
33,
7036,
16,
4210,
33,
7036,
4672,
3536,
6493,
392,
3421,
1368,
326,
1269,
11845,
18,
225,
971,
1835,
471,
2072,
854,... | |
logger.info("ObjectClass to save:" + str( group["objectClass"]) ) | logger.debug("ObjectClass to save:" + str( group["objectClass"])) | def delGroupQuotaObjectClass(self, cn): """ Return true if the objectClass is removed. @return: return True if the object class is able to be removed @rtype: boolean """ logger = logging.getLogger() group = self.getDetailedGroup(cn) logger.info("Del Group object class") logger.info("group keys" + str(group.keys())) if "quota" in group.keys() or "networkquota" in group.keys(): return False logger.info("Del object class removal") if "defaultQuotas" in group["objectClass"]: group["objectClass"].remove("defaultQuotas") logger.info("ObjectClass to save:" + str( group["objectClass"]) ) self.changeGroupAttribute(cn, 'objectClass', group["objectClass"]) return True return False | c1b148277eaa33380684c03817015cbdb8ea5c22 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5988/c1b148277eaa33380684c03817015cbdb8ea5c22/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1464,
1114,
10334,
921,
797,
12,
2890,
16,
6227,
4672,
3536,
2000,
638,
309,
326,
23992,
353,
3723,
18,
225,
632,
2463,
30,
327,
1053,
309,
326,
733,
667,
353,
7752,
358,
506,
3723,
63... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1464,
1114,
10334,
921,
797,
12,
2890,
16,
6227,
4672,
3536,
2000,
638,
309,
326,
23992,
353,
3723,
18,
225,
632,
2463,
30,
327,
1053,
309,
326,
733,
667,
353,
7752,
358,
506,
3723,
63... |
where account_analytic_line.account_id =ANY(%s) \ | where account_analytic_line.account_id IN %s \ | def _ca_theorical_calc(self, cr, uid, ids, name, arg, context={}): res = {} res2 = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) # Warning # This computation doesn't take care of pricelist ! # Just consider list_price if ids2: cr.execute("""select account_analytic_line.account_id as account_id, \ COALESCE(sum((account_analytic_line.unit_amount * pt.list_price) \ - (account_analytic_line.unit_amount * pt.list_price \ * hr.factor)),0.0) as somme from account_analytic_line \ left join account_analytic_journal \ on (account_analytic_line.journal_id = account_analytic_journal.id) \ join product_product pp \ on (account_analytic_line.product_id = pp.id) \ join product_template pt \ on (pp.product_tmpl_id = pt.id) \ join account_analytic_account a \ on (a.id=account_analytic_line.account_id) \ join hr_timesheet_invoice_factor hr \ on (hr.id=a.to_invoice) \ where account_analytic_line.account_id =ANY(%s) \ and a.to_invoice IS NOT NULL \ and account_analytic_journal.type in ('purchase','general') GROUP BY account_analytic_line.account_id""",(ids2,)) for account_id, sum in cr.fetchall(): res2[account_id] = round(sum,2) for obj_id in ids: res.setdefault(obj_id, 0.0) res2.setdefault(obj_id, 0.0) for child_id in self.search(cr, uid, [('parent_id', 'child_of', [obj_id])]): if child_id != obj_id: res[obj_id] += res.get(child_id, 0.0) res[obj_id] += res2.get(child_id, 0.0) # sum both result on account_id for id in ids: res[id] = round(res.get(id, 0.0),2) + round(res2.get(id, 0.0),2) return res | 3c18c11c83e2549431192a3a0c1f46403db9d628 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8241/3c18c11c83e2549431192a3a0c1f46403db9d628/account_analytic_analysis.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5353,
67,
5787,
10129,
67,
12448,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
1501,
16,
819,
12938,
4672,
400,
273,
2618,
400,
22,
273,
2618,
3258,
22,
273,
365,
18,
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,
5353,
67,
5787,
10129,
67,
12448,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
1501,
16,
819,
12938,
4672,
400,
273,
2618,
400,
22,
273,
2618,
3258,
22,
273,
365,
18,
30... |
clause.append('%s = \'%s\'' % (constraints[i], vals.value)) | vals = vals.value clause.append('%s = \'%s\'' % (constraints[i], vals)) | def render(self): self.perm.assert_permission(perm.TICKET_VIEW) | b51f26f5d4eeeb4cc9ec057e58663601b56fbc9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/b51f26f5d4eeeb4cc9ec057e58663601b56fbc9b/Ticket.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
4672,
365,
18,
12160,
18,
11231,
67,
9827,
12,
12160,
18,
56,
16656,
1584,
67,
12145,
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,
1743,
12,
2890,
4672,
365,
18,
12160,
18,
11231,
67,
9827,
12,
12160,
18,
56,
16656,
1584,
67,
12145,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
if self.reassemble: | self.manager.register_hook_point('http') if not self.reassemble: | def register_decoders(self): if self.reassemble: for port in HTTP_PORTS: AuditManager().add_dissector(APP_LAYER_TCP, port, self._http_decoder) | 968802cc3fd7bddc23804216cfc04928b9bb40d9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11468/968802cc3fd7bddc23804216cfc04928b9bb40d9/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1744,
67,
323,
1559,
414,
12,
2890,
4672,
365,
18,
4181,
18,
4861,
67,
4476,
67,
1153,
2668,
2505,
6134,
225,
309,
486,
365,
18,
266,
29676,
30,
364,
1756,
316,
2239,
67,
6354,
55,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1744,
67,
323,
1559,
414,
12,
2890,
4672,
365,
18,
4181,
18,
4861,
67,
4476,
67,
1153,
2668,
2505,
6134,
225,
309,
486,
365,
18,
266,
29676,
30,
364,
1756,
316,
2239,
67,
6354,
55,
3... |
if DEBUG: log.debug('CHANNEL MATCH') | _debug_('CHANNEL MATCH') | def findProg(self, chan=None, start=None): global guide | dbf3be6baca9b3de2bbdcffda6a49e6878cff42d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/dbf3be6baca9b3de2bbdcffda6a49e6878cff42d/recordserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
626,
75,
12,
2890,
16,
3861,
33,
7036,
16,
787,
33,
7036,
4672,
2552,
7343,
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,
1104,
626,
75,
12,
2890,
16,
3861,
33,
7036,
16,
787,
33,
7036,
4672,
2552,
7343,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Tag = "SpamBayesCommand.RecoverFromSpam") | Caption="Recover from Spam", TooltipText = tt_text, Tag = "SpamBayesCommand.RecoverFromSpam", image = "recover_ham.bmp") | def SetupUI(self): manager = self.manager activeExplorer = self assert self.toolbar is None, "Should not yet have a toolbar" # Add our "Delete as ..." and "Recover as" buttons self.but_delete_as = self._AddControl( None, constants.msoControlButton, ButtonDeleteAsSpamEvent, (self.manager, self), BeginGroup = False, Tag = "SpamBayesCommand.DeleteAsSpam") # And again for "Recover as" self.but_recover_as = self._AddControl( None, constants.msoControlButton, ButtonRecoverFromSpamEvent, (self.manager, self), Tag = "SpamBayesCommand.RecoverFromSpam") | 58998f1882be5586092d9f417003f50ab8631efa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/58998f1882be5586092d9f417003f50ab8631efa/addin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10939,
5370,
12,
2890,
4672,
3301,
273,
365,
18,
4181,
2695,
20938,
273,
365,
1815,
365,
18,
18849,
353,
599,
16,
315,
14309,
486,
4671,
1240,
279,
12748,
6,
468,
1436,
3134,
315,
2613,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10939,
5370,
12,
2890,
4672,
3301,
273,
365,
18,
4181,
2695,
20938,
273,
365,
1815,
365,
18,
18849,
353,
599,
16,
315,
14309,
486,
4671,
1240,
279,
12748,
6,
468,
1436,
3134,
315,
2613,
... |
i = m.end(1) - 1 | p = m.end() i = p-1 while i >= 0 and str[i] in " \t\n": i = i-1 | def _study2(self, _rfind=string.rfind, _find=string.find, _ws=string.whitespace): if self.study_level >= 2: return self._study1() self.study_level = 2 | ad25922409746263f5b66ba28b7d83049982b029 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/ad25922409746263f5b66ba28b7d83049982b029/PyParse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
16120,
93,
22,
12,
2890,
16,
389,
86,
4720,
33,
1080,
18,
86,
4720,
16,
389,
4720,
33,
1080,
18,
4720,
16,
389,
4749,
33,
1080,
18,
18777,
4672,
309,
365,
18,
16120,
93,
67,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
16120,
93,
22,
12,
2890,
16,
389,
86,
4720,
33,
1080,
18,
86,
4720,
16,
389,
4720,
33,
1080,
18,
4720,
16,
389,
4749,
33,
1080,
18,
18777,
4672,
309,
365,
18,
16120,
93,
67,
2... |
assert res == (a == 1) | assert_equal(res,(a == 1)) | def check_int2(self,level=5): a = 1 res = inline_tools.inline('return_val = (1 == a);',['a']) assert res == (a == 1) | 267b08d9c3e7613c126729a179f4503c91625e9c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7416/267b08d9c3e7613c126729a179f4503c91625e9c/test_scxx_object.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
474,
22,
12,
2890,
16,
2815,
33,
25,
4672,
279,
273,
404,
400,
273,
6370,
67,
6642,
18,
10047,
2668,
2463,
67,
1125,
273,
261,
21,
422,
279,
1769,
2187,
3292,
69,
19486,
181... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
866,
67,
474,
22,
12,
2890,
16,
2815,
33,
25,
4672,
279,
273,
404,
400,
273,
6370,
67,
6642,
18,
10047,
2668,
2463,
67,
1125,
273,
261,
21,
422,
279,
1769,
2187,
3292,
69,
19486,
181... |
return (location and CLS_TITLE or CL_TITLE) % args | if single: return (location and CLSX_TITLE or CSX_TITLE) % args else: return (location and CLS_TITLE or CS_TITLE) % args | def buildItemDescription(mailStamp): #XXX Post Preview I will clean up # this logic since there are more # efficient ways to get the # item description strings. # Most likely will use a dict # instead of Globals for localizable strings # then build the key dynamically based on # recurrence frequency / interval and whether # the Event has a location and a recurrence # end date item = mailStamp.itsItem view = item.itsView isEvent = has_stamp(item, EventStamp) if isEvent: event = EventStamp(item) master = event.getMaster() recur = getattr(event, 'rruleset', None) noTime = event.allDay or event.anyTime location = getattr(event, 'location', u'') if location: location = location.displayName.strip() startDate, startTime = formatDateAndTime(view, event.startTime) endDate, endTime = formatDateAndTime(view, event.endTime) if getattr(event.startTime, "tzinfo", None) == view.tzinfo.floating: timezone = u"" else: timezone = getTimeZoneCode(view, event.startTime) if startDate == endDate: # The Event starts and ends on the same day endDate = None args = {'title': item.displayName, 'startTime': startTime, 'startDate': startDate, 'endTime': endTime, 'endDate': endDate, 'location': location, 'timezone': timezone, } if recur: args['masterStartDate'], args['masterStartTime'] = \ formatDateAndTime(view, master.startTime) args['masterEndDate'], args['masterEndTime'] = \ formatDateAndTime(view, master.endTime) args['masterTimeZone'] = getTimeZoneCode(view, master.startTime) if recur.isComplex(): if noTime: if endDate: return (location and CLD_TITLE or CD_TITLE) % args else: return (location and CL_TITLE or C_TITLE) % args if endDate: return (location and CLSD_TITLE or CLD_TITLE) % args else: return (location and CLS_TITLE or CL_TITLE) % args rule = recur.rrules.first() freq = rule.freq interval = rule.interval until = rule.calculatedUntil() args['recurrenceEndDate'] = until and formatDateAndTime(view, until)[0] or u'' ret = None if freq == "daily": if noTime: if until: ret = location and DUL_TITLE or DU_TITLE else: ret = location and DL_TITLE or D_TITLE else: if until: ret = location and DTUL_TITLE or DTU_TITLE else: ret = location and DTL_TITLE or DT_TITLE elif freq == "weekly": args['dayName'] = weekdayName(event.startTime) if noTime: if until: if interval == 2: ret = location and BUL_TITLE or BU_TITLE else: ret = location and WUL_TITLE or WU_TITLE else: if interval == 2: ret = location and BL_TITLE or B_TITLE else: ret = location and WL_TITLE or W_TITLE else: if until: if interval == 2: ret = location and BTUL_TITLE or BTU_TITLE else: ret = location and WTUL_TITLE or WTU_TITLE else: if interval == 2: ret = location and BTL_TITLE or BT_TITLE else: ret = location and WTL_TITLE or WT_TITLE elif freq == "monthly": num = int(PyICU.SimpleDateFormat(_(u"dd")).format(event.startTime)) args['abbreviation'] = PyICU.ChoiceFormat(DAY_OF_MONTH).format(num) args['dayOfMonth'] = num if noTime: if until: ret = location and MUL_TITLE or MU_TITLE else: ret = location and ML_TITLE or M_TITLE else: if until: ret = location and MTUL_TITLE or MTU_TITLE else: ret = location and MTL_TITLE or MT_TITLE elif freq == "yearly": if noTime: if until: ret = location and YUL_TITLE or YU_TITLE else: ret = location and YL_TITLE or Y_TITLE else: if until: if endDate: ret = location and YTULD_TITLE or YTUD_TITLE else: ret = location and YTUL_TITLE or YTU_TITLE else: if endDate: ret = location and YTLD_TITLE or YTD_TITLE else: ret = location and YTL_TITLE or YT_TITLE return ret % args if noTime: if endDate: return (location and ALD_TITLE or AD_TITLE) % args else: return (location and AL_TITLE or A_TITLE) % args else: if endDate: return (location and ELD_TITLE or ED_TITLE) % args else: return (location and EL_TITLE or E_TITLE) % args return item.displayName | 3ba7c328b2c98e3845fdea7a2d9641207c27c23a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/3ba7c328b2c98e3845fdea7a2d9641207c27c23a/mail.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
1180,
3291,
12,
4408,
8860,
4672,
468,
15639,
5616,
22289,
467,
903,
2721,
731,
468,
333,
4058,
3241,
1915,
854,
1898,
468,
14382,
16226,
358,
336,
326,
468,
761,
2477,
2064,
18,
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,
1361,
1180,
3291,
12,
4408,
8860,
4672,
468,
15639,
5616,
22289,
467,
903,
2721,
731,
468,
333,
4058,
3241,
1915,
854,
1898,
468,
14382,
16226,
358,
336,
326,
468,
761,
2477,
2064,
18,
4... |
if infohash != self.infohash: | if infohash != self.infohash or dns is None: | def got_ut_pex(self, connection, d): infohash, dns = c2infohash_dns(connection) is_tribler_peer = connection.is_tribler_peer() added = check_ut_pex_peerlist(d,'added')[:REPEX_PEX_MSG_MAX_PEERS] addedf = map(ord, d.get('addedf',[]))[:REPEX_PEX_MSG_MAX_PEERS] addedf.extend( [0]*(len(added)-len(addedf)) ) IS_SEED = 2 IS_SAME = 4 if infohash != self.infohash: return if DEBUG: print >>sys.stderr, "RePEXer: got_ut_pex: %s:%s pex_size = %s" % (dns + (len(added),)) # Remove bad IPs like 0.x.x.x (often received from Transmission peers) for i in range(len(added)-1,-1,-1): if added[i][0].startswith('0.'): added.pop(i) addedf.pop(i) # only store peer when sufficiently connected if len(added) >= REPEX_PEX_MINSIZE: # Clear flag IS_SAME if it was not a Tribler peer if not is_tribler_peer: addedf = [flag & ~IS_SAME for flag in addedf] # sample PEX message and picks = range(len(added)) shuffle(picks) pex_peers = [(added[i],addedf[i]) for i in picks[:REPEX_STORED_PEX_SIZE]] self.live_peers[dns] = {'last_seen' : ts_now(), 'pex' : pex_peers, 'version' : self.dns2version[dns]} # Should we do the following? Might lower the load on the tracker even more? # self.to_pex.extend(zip(*pex_peers)[0]) # Possible danger: too much crawling, wasting resources? # TODO: Might be more sophisticated to sampling of PEX msg at the end? # (allows us to get more diversity and perhaps also security?) self.datacost['pex_connections'] += 1 # Closing time connection.close() | 82ef062a465d25b7a7c42d32fe70984fb85c8e2f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9686/82ef062a465d25b7a7c42d32fe70984fb85c8e2f/repex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2363,
67,
322,
67,
84,
338,
12,
2890,
16,
1459,
16,
302,
4672,
1123,
2816,
16,
6605,
273,
276,
22,
1376,
2816,
67,
14926,
12,
4071,
13,
353,
67,
665,
749,
67,
12210,
273,
1459,
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,
2363,
67,
322,
67,
84,
338,
12,
2890,
16,
1459,
16,
302,
4672,
1123,
2816,
16,
6605,
273,
276,
22,
1376,
2816,
67,
14926,
12,
4071,
13,
353,
67,
665,
749,
67,
12210,
273,
1459,
18,
... |
import eunuchs | import eunuchs.socketpair | def setCloseOnExec(sock): fcntl.fcntl(sock.fileno(), fcntl.F_SETFD, fcntl.FD_CLOEXEC) | 2cab464ff40b42cf6798b2f8f4a7bf65e808aa66 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7624/2cab464ff40b42cf6798b2f8f4a7bf65e808aa66/preforkserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
4605,
1398,
1905,
12,
15031,
4672,
30894,
18,
7142,
16681,
12,
15031,
18,
7540,
5764,
9334,
30894,
18,
42,
67,
4043,
16894,
16,
30894,
18,
16894,
67,
22693,
15271,
13,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
4605,
1398,
1905,
12,
15031,
4672,
30894,
18,
7142,
16681,
12,
15031,
18,
7540,
5764,
9334,
30894,
18,
42,
67,
4043,
16894,
16,
30894,
18,
16894,
67,
22693,
15271,
13,
2,
-100,
-100... |
bound = self.emitter.getMinBound() | point = self.emitter.getMinBound() | def printParams(self, file = sys.stdout, targ = 'self'): """printParams(file, targ)""" file.write('# Particles parameters\n') file.write(targ + '.setFactory(\"' + self.factoryType + '\")\n') file.write(targ + '.setRenderer(\"' + self.rendererType + '\")\n') file.write(targ + '.setEmitter(\"' + self.emitterType + '\")\n') | 1fbce9bf3f625ec0395bb8de38e25bfbf0f309a1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/1fbce9bf3f625ec0395bb8de38e25bfbf0f309a1/Particles.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
1370,
12,
2890,
16,
585,
273,
2589,
18,
10283,
16,
24202,
273,
296,
2890,
11,
4672,
3536,
1188,
1370,
12,
768,
16,
24202,
15574,
585,
18,
2626,
2668,
7,
6393,
8383,
1472,
64,
82,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1370,
12,
2890,
16,
585,
273,
2589,
18,
10283,
16,
24202,
273,
296,
2890,
11,
4672,
3536,
1188,
1370,
12,
768,
16,
24202,
15574,
585,
18,
2626,
2668,
7,
6393,
8383,
1472,
64,
82,... |
self.fdone = fdone | if sys.platform == 'win32': self.fdone = os.path.basename(fdone) else: self.fdone = fdone | def __init__(self, finput, foutput, fdone): self.finput = finput self.foutput = foutput self.fdone = fdone Thread.__init__(self) | c796f9b06df586c88fab1934a8b69b8c1084ebb5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/c796f9b06df586c88fab1934a8b69b8c1084ebb5/MediaConverter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
574,
458,
16,
284,
2844,
16,
5194,
476,
4672,
365,
18,
926,
458,
273,
574,
458,
365,
18,
617,
322,
458,
273,
284,
2844,
309,
2589,
18,
9898,
422,
296,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
574,
458,
16,
284,
2844,
16,
5194,
476,
4672,
365,
18,
926,
458,
273,
574,
458,
365,
18,
617,
322,
458,
273,
284,
2844,
309,
2589,
18,
9898,
422,
296,
... |
server_response = app_service.AtomService.Put(self, data, uri, | server_response = app_service.AtomService.Put(self, data, uri, | def Put(self, data, uri, extra_headers=None, url_params=None, escape_params=True, redirects_remaining=3): """Updates an entry at the given URI. Args: data: string, ElementTree._Element, or xml_wrapper.ElementWrapper The XML containing the updated data. uri: string A URI indicating entry to which the update will be applied. Example: '/base/feeds/items/ITEM-ID' extra_headers: dict (optional) HTTP headers which are to be included. The client automatically sets the Content-Type, Authorization, and Content-Length headers. url_params: dict (optional) Additional URL parameters to be included in the URI. These are translated into query arguments in the form '&dict_key=value&...'. Example: {'max-results': '250'} becomes &max-results=250 escape_params: boolean (optional) If false, the calling code has already ensured that the query will form a valid URL (all reserved characters have been escaped). If true, this method will escape the query and any URL parameters provided. Returns: httplib.HTTPResponse Server's response to the PUT request. """ if extra_headers is None: extra_headers = {} | 373fc7b30b6d501e460df5aac5a2d8aeac354861 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6580/373fc7b30b6d501e460df5aac5a2d8aeac354861/gdata_service.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4399,
12,
2890,
16,
501,
16,
2003,
16,
2870,
67,
2485,
33,
7036,
16,
880,
67,
2010,
33,
7036,
16,
4114,
67,
2010,
33,
5510,
16,
18064,
67,
17956,
33,
23,
4672,
3536,
5121,
392,
1241,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4399,
12,
2890,
16,
501,
16,
2003,
16,
2870,
67,
2485,
33,
7036,
16,
880,
67,
2010,
33,
7036,
16,
4114,
67,
2010,
33,
5510,
16,
18064,
67,
17956,
33,
23,
4672,
3536,
5121,
392,
1241,... |
debug(" third-party RFC 2965 cookie during unverifiable " "transaction") | _debug(" third-party RFC 2965 cookie during unverifiable " "transaction") | def return_ok_verifiability(self, cookie, request): if request.is_unverifiable() and is_third_party(request): if cookie.version > 0 and self.strict_rfc2965_unverifiable: debug(" third-party RFC 2965 cookie during unverifiable " "transaction") return False elif cookie.version == 0 and self.strict_ns_unverifiable: debug(" third-party Netscape cookie during unverifiable " "transaction") return False return True | e3485b205e7bc77f437c4e5fc2d8b00eefb7fc77 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/e3485b205e7bc77f437c4e5fc2d8b00eefb7fc77/cookielib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
327,
67,
601,
67,
502,
704,
2967,
12,
2890,
16,
3878,
16,
590,
4672,
309,
590,
18,
291,
67,
318,
502,
8424,
1435,
471,
353,
67,
451,
6909,
67,
21214,
12,
2293,
4672,
309,
3878,
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,
327,
67,
601,
67,
502,
704,
2967,
12,
2890,
16,
3878,
16,
590,
4672,
309,
590,
18,
291,
67,
318,
502,
8424,
1435,
471,
353,
67,
451,
6909,
67,
21214,
12,
2293,
4672,
309,
3878,
18,
... |
callback=cb_sortby, metavar='field', | callback=cb_sortby, metavar=_('field'), | def _get_cmd_function(self, arg): """Returns the function for `arg`""" name = '_cmd_%s' % arg.lstrip('-') # and replace remaining slashes with underscores name = name.replace('-', '_') function = getattr(self, name) return function | 4b3b743891f632b72a23154fb253d46ea4705863 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2215/4b3b743891f632b72a23154fb253d46ea4705863/tel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
4172,
67,
915,
12,
2890,
16,
1501,
4672,
3536,
1356,
326,
445,
364,
1375,
3175,
68,
8395,
508,
273,
2070,
4172,
10185,
87,
11,
738,
1501,
18,
80,
6406,
2668,
17,
6134,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
4172,
67,
915,
12,
2890,
16,
1501,
4672,
3536,
1356,
326,
445,
364,
1375,
3175,
68,
8395,
508,
273,
2070,
4172,
10185,
87,
11,
738,
1501,
18,
80,
6406,
2668,
17,
6134,
... |
return re.sub(r'.*Repository Root: \w+://([^/]+?)/.*', r'\1', local("svn info").replace('\n', ' ')) | for l in local("svn info --xml").splitlines(): for svnhost in re.findall(r'\s*<root>\w+://([^/]+?)/.*</root>', l): return svnhost | def _get_svn_host(): return re.sub(r'.*Repository Root: \w+://([^/]+?)/.*', r'\1', local("svn info").replace('\n', ' ')) | 0e2f3a404f194b2db380ca0cc8b45308b45cd165 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12422/0e2f3a404f194b2db380ca0cc8b45308b45cd165/backup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
31505,
67,
2564,
13332,
364,
328,
316,
1191,
2932,
31505,
1123,
1493,
2902,
20387,
4939,
3548,
13332,
364,
5893,
82,
2564,
316,
283,
18,
4720,
454,
12,
86,
8314,
87,
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,
389,
588,
67,
31505,
67,
2564,
13332,
364,
328,
316,
1191,
2932,
31505,
1123,
1493,
2902,
20387,
4939,
3548,
13332,
364,
5893,
82,
2564,
316,
283,
18,
4720,
454,
12,
86,
8314,
87,
14,
... |
if rcmd[-1] not in u'bBeEhlwW${}': | if rcmd[-1] not in u'bBeEGhHlLMwW$|{}': | def ViCmdDispatch(self): """Processes vi commands | 629fd855188a01c2253d3e07294706d9beaf6767 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3530/629fd855188a01c2253d3e07294706d9beaf6767/ed_stc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23910,
5931,
5325,
12,
2890,
4672,
3536,
10599,
13206,
4364,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23910,
5931,
5325,
12,
2890,
4672,
3536,
10599,
13206,
4364,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
for job in troveWrapper: ((troveName, (oldVersion, oldFlavor), (newVersion, newFlavor), absolute), old, new, streams) = job | for (job, old, new, streams) in troveWrapper: (troveName, (oldVersion, oldFlavor), (newVersion, newFlavor), absolute) = job | # def createChangeSet begins here | d95ce3edf24f8325b0639823fb458925d79a53ee /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8747/d95ce3edf24f8325b0639823fb458925d79a53ee/fsrepos.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
1652,
752,
21565,
17874,
2674,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
1652,
752,
21565,
17874,
2674,
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,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.