rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
def read(self, cr, uid, ids, fields=None, context={}, | def read(self, cr, uid, ids, fields=None, context={}, | def read(self, cr, uid, ids, fields=None, context={}, load='_classic_read'): """ logic for recurrent event example : 123-20091111170822""" if context and context.has_key('read'): return super(crm_case, self).read(cr, uid, ids, fields=fields, context=context, load=load) if not type(ids) == list : # Called from code ids = int(str(ids).split('-')[0]) res = super(crm_case, self).read(cr, uid, ids, fields=fields, context=context, load=load) return res else: ids = map(lambda x:int(str(x).split('-')[0]), ids) res = super(crm_case, self).read(cr, uid, ids, fields=fields, context=context, load=load) read_ids = ",".join([str(x) for x in ids]) cr.execute('select id,rrule,rdates from crm_case where id in (%s)' % read_ids) rrules = filter(lambda x: not x['rrule']==None, cr.dictfetchall()) rdates = [] if not rrules: return res result = res + [] for data in rrules: if data['rrule'] and data['rdates']: # delete 2nd condition at last rdates = eval(data['rdates']) for res_temp in res: if res_temp['id'] == data['id']: val = res_temp if rdates: result.remove(val) | 6ef425eb9ba53031aed0c6d62efd20dc99d4dc99 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/6ef425eb9ba53031aed0c6d62efd20dc99d4dc99/crm_calendar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
1466,
33,
7036,
16,
819,
28793,
1262,
2218,
67,
1106,
335,
67,
896,
11,
4672,
3536,
540,
4058,
364,
283,
2972,
871,
3454,
294,
17335,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
1466,
33,
7036,
16,
819,
28793,
1262,
2218,
67,
1106,
335,
67,
896,
11,
4672,
3536,
540,
4058,
364,
283,
2972,
871,
3454,
294,
17335,
... |
xdg_home_dir = os.path.join(os.environ.get('HOME'), '.config') | xdg_home_dir = os.path.join(home_dir, '.config') | def _get_xdg_path(filename, data_type, default_directories=None, create_missing_dir=False): """Get the full path to a file using XDG file layout spec. Follows XDG Base Directory Specification. (http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html). Tries default_directories and DEFAULT_GOOGLECL_DIR if no file is found via XDG spec. Keyword arguments: filename: Filename of the file. data_type: One of 'config' for config files or 'data' for data files. default_directories: List of directories to check if no file is found in directories specified by XDG spec and DEFAULT_GOOGLECL_DIR. Default None. create_missing_dir: Whether or not to create a missing config subdirectory in the default base directory. Default False. Returns: Path to config file, which may not exist. If create_missing_dir, the directory where the config file should be will be created if it does not exist. """ data_type = data_type.upper() if data_type not in ('CONFIG', 'DATA'): raise Exception('Invalid value for data_type: ' + data_type) xdg_home_dir = os.environ.get('XDG_' + data_type + '_HOME') if not xdg_home_dir: if data_type == 'DATA': xdg_home_dir = os.path.join(os.environ.get('HOME'), '.local', 'share') elif data_type == 'CONFIG': # No variable defined, using $HOME/.config xdg_home_dir = os.path.join(os.environ.get('HOME'), '.config') xdg_home_dir = os.path.join(xdg_home_dir, SUBDIR_NAME) xdg_dir_list = os.environ.get('XDG_' + data_type + '_DIRS') if not xdg_dir_list: if data_type == 'DATA': xdg_dir_list = '/usr/local/share/:/usr/share/' elif data_type == 'CONFIG': xdg_dir_list = '/etc/xdg' xdg_dir_list = [os.path.join(d, SUBDIR_NAME) for d in xdg_dir_list.split(':')] dir_list = [os.path.abspath('.'), xdg_home_dir] + xdg_dir_list +\ [DEFAULT_GOOGLECL_DIR] if default_directories: dir_list += default_directories for directory in dir_list: config_path = os.path.join(directory, filename) if os.path.isfile(config_path): return config_path LOG.debug('Could not find ' + filename + ' in any of ' + str(dir_list)) if os.name == 'posix': default_dir = xdg_home_dir mode = 0700 else: default_dir = DEFAULT_GOOGLECL_DIR mode = 0777 if not os.path.isdir(default_dir) and create_missing_dir: try: os.mkdir(default_dir, mode) except OSError, err: LOG.error(err) return '' return os.path.join(default_dir, filename) | 0b2d9ef5295d41332d0f0e5f2e1f69039e19d7e7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2899/0b2d9ef5295d41332d0f0e5f2e1f69039e19d7e7/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
7669,
75,
67,
803,
12,
3459,
16,
501,
67,
723,
16,
805,
67,
15121,
33,
7036,
16,
752,
67,
7337,
67,
1214,
33,
8381,
4672,
3536,
967,
326,
1983,
589,
358,
279,
585,
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,
7669,
75,
67,
803,
12,
3459,
16,
501,
67,
723,
16,
805,
67,
15121,
33,
7036,
16,
752,
67,
7337,
67,
1214,
33,
8381,
4672,
3536,
967,
326,
1983,
589,
358,
279,
585,
14... |
def get_config(rank_method_code): """Load common data into memory""" global voutput global stopwords global stemmer global chars_alphanumericseparators global col_size global rnkWORD_table languages = {'fr': 'french', 'en': 'porter', 'no':'norwegian', 'se':'swedish', 'de': 'german', 'it':'italian', 'pt':'portugese'} voutput = "" try: if stemmer and stopwords: pass except StandardError, e: if methods[rank_method_code].has_key("rnkWORD_table"): rnkWORD_table = methods[rank_method_code]["rnkWORD_table"] try: if methods[rank_method_code].has_key("stem_lang"): stemmer = Stemmer.Stemmer(languages[methods[rank_method_code]["stem_lang"]]) else: stemmer = None except Exception, e: stemmer = None if methods[rank_method_code].has_key("stopword"): stopwords = get_stopwords("%s" % methods[rank_method_code]["stopword"]) else: stopwords = {} chars_alphanumericseparators = r"[1234567890\!\"\ if methods[rank_method_code].has_key("rnkWORD_table"): col_size = run_sql("SELECT count(*) FROM %sR" % rnkWORD_table[:-1])[0][0] | def get_config(rank_method_code): #needs some work """Load common data into memory""" global voutput global stopwords global stemmer global chars_alphanumericseparators global col_size global rnkWORD_table languages = {'fr': 'french', 'en': 'porter', 'no':'norwegian', 'se':'swedish', 'de': 'german', 'it':'italian', 'pt':'portugese'} voutput = "" try: if stemmer and stopwords: pass except StandardError, e: if methods[rank_method_code].has_key("rnkWORD_table"): rnkWORD_table = methods[rank_method_code]["rnkWORD_table"] try: if methods[rank_method_code].has_key("stem_lang"): stemmer = Stemmer.Stemmer(languages[methods[rank_method_code]["stem_lang"]]) else: stemmer = None except Exception, e: stemmer = None if methods[rank_method_code].has_key("stopword"): stopwords = get_stopwords("%s" % methods[rank_method_code]["stopword"]) else: stopwords = {} chars_alphanumericseparators = r"[1234567890\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~]" if methods[rank_method_code].has_key("rnkWORD_table"): col_size = run_sql("SELECT count(*) FROM %sR" % rnkWORD_table[:-1])[0][0] | 2b7ec6adb61acaf4f4c7868f48416243cf69c71b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/2b7ec6adb61acaf4f4c7868f48416243cf69c71b/bibrank_record_sorter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1425,
12,
11500,
67,
2039,
67,
710,
4672,
468,
20600,
2690,
1440,
3536,
2563,
2975,
501,
1368,
3778,
8395,
2552,
331,
2844,
2552,
2132,
3753,
2552,
13119,
6592,
2552,
5230,
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,
336,
67,
1425,
12,
11500,
67,
2039,
67,
710,
4672,
468,
20600,
2690,
1440,
3536,
2563,
2975,
501,
1368,
3778,
8395,
2552,
331,
2844,
2552,
2132,
3753,
2552,
13119,
6592,
2552,
5230,
67,
... | |
'is': u'Kerfissíður', | 'is': u'Kerfissíða', | def __init__(self): | bf9f84d58f7e268f49ad502fc8594f3de4a541da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/bf9f84d58f7e268f49ad502fc8594f3de4a541da/family.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
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,... | [
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,
1001,
2738,
972,
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,
-1... |
self.id = id | self.id = None | def __init__(self, cmd): # command data self.cmd = cmd self.done = False self.isnotifyingparent = False # semaphore to handle possible thread intersections self.id = id self.group = None self.kind = None | cf0767600df8f7af46b7388a601ffcaf48e045df /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5988/cf0767600df8f7af46b7388a601ffcaf48e045df/process_control.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1797,
4672,
468,
1296,
501,
365,
18,
4172,
273,
1797,
365,
18,
8734,
273,
1083,
365,
18,
291,
12336,
310,
2938,
273,
1083,
468,
28921,
358,
1640,
3323,
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,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1797,
4672,
468,
1296,
501,
365,
18,
4172,
273,
1797,
365,
18,
8734,
273,
1083,
365,
18,
291,
12336,
310,
2938,
273,
1083,
468,
28921,
358,
1640,
3323,
2... |
name = "c" + zero_pad(ch, channel_digits) + ss + fr + ".tif" | name = fr + ss + "_c" + zero_pad(ch, channel_digits) +".tif" | def create_registered_hyperstack(imp, target_folder, channel): """ Takes the imp, which contains a virtual hyper stack, and determines the x,y,z drift for each pair of time points, using the preferred given channel, and output one image for each slide into the target folder.""" shifts = compute_frame_translations(imp, channel) # Make shifts relative to 0,0,0 of the original imp: shifts = concatenate_shifts(shifts) print "shifts concatenated:" for s in shifts: print s.x, s.y, s.z # Compute bounds of the new volume, # which accounts for all translations: minx, miny, minz, maxx, maxy, maxz = compute_min_max(shifts) # Make shifts relative to new canvas dimensions # so that the min values become 0,0,0 for shift in shifts: shift.x -= minx shift.y -= miny shift.z -= minz print "shifts relative to new dimensions:" for s in shifts: print s.x, s.y, s.z # new canvas dimensions: width = imp.width + maxx - minx height = maxy - miny + imp.height slices = maxz - minz + imp.getNSlices() print "New dimensions:", width, height, slices # Count number of digits of each dimension, to output zero-padded numbers: slice_digits = len(str(slices)) frame_digits = len(str(imp.getNFrames())) channel_digits = len(str(imp.getNChannels())) # List to accumulate all created names: names = [] # Prepare empty slice to pad in Z when necessary empty = imp.getProcessor().createProcessor(width, height) # if it's RGB, fill the empty slice with blackness if isinstance(empty, ColorProcessor): empty.setValue(0) empty.fill() # Write all slices to files: stack = imp.getStack() for frame in range(1, imp.getNFrames()+1): shift = shifts[frame-1] fr = "_t" + zero_pad(frame, frame_digits) # Pad with mpty slices before reaching the first slice for s in range(shift.z): ss = "_z" + zero_pad(s + 1, slice_digits) # slices start at 1 for ch in range(1, imp.getNChannels()+1): name = "c" + zero_pad(ch, channel_digits) + ss + fr + ".tif" names.append(name) FileSaver(ImagePlus("", empty)).saveAsTiff(target_folder + "/" + name) # Add all proper slices for s in range(1, imp.getNSlices()+1): ss = "_z" + zero_pad(s + shift.z, slice_digits) for ch in range(1, imp.getNChannels()+1): ip = stack.getProcessor(imp.getStackIndex(ch, s, frame)) ip2 = ip.createProcessor(width, height) # potentially larger ip2.insert(ip, shift.x, shift.y) name = "c" + zero_pad(ch, channel_digits) + ss + fr + ".tif" names.append(name) FileSaver(ImagePlus("", ip2)).saveAsTiff(target_folder + "/" + name) # Pad the end for s in range(shift.z + imp.getNSlices(), slices): ss = "_z" + zero_pad(s + 1, slice_digits) for ch in range(1, imp.getNChannels()+1): name = "c" + zero_pad(ch, channel_digits) + ss + fr + ".tif" names.append(name) FileSaver(ImagePlus("", empty)).saveAsTiff(target_folder + "/" + name) # Create virtual hyper stack with the result vs = VirtualStack(width, height, None, target_folder) for name in names: vs.addSlice(name) vs_imp = ImagePlus("registered time points", vs) vs_imp.setDimensions(imp.getNChannels(), len(names) / (imp.getNChannels() * imp.getNFrames()), imp.getNFrames()) vs_imp.setOpenAsHyperStack(True) IJ.log("\nHyperstack dimensions: time frames:" + str(vs_imp.getNFrames()) + ", slices: " + str(vs_imp.getNSlices()) + ", channels: " + str(vs_imp.getNChannels())) if 1 == vs_imp.getNSlices(): return vs_imp # Else, as composite mode = CompositeImage.COLOR; if isinstance(imp, CompositeImage): mode = imp.getMode() else: return vs_imp return CompositeImage(vs_imp, mode) | 8e0bb5df0cb6d1afacfb24aa8fe7f62984bd1033 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12827/8e0bb5df0cb6d1afacfb24aa8fe7f62984bd1033/Correct_3D_drift.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
14327,
67,
17203,
3772,
12,
14532,
16,
1018,
67,
5609,
16,
1904,
4672,
3536,
23004,
326,
1646,
16,
1492,
1914,
279,
5024,
9512,
2110,
16,
471,
12949,
326,
619,
16,
93,
16,
94,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
14327,
67,
17203,
3772,
12,
14532,
16,
1018,
67,
5609,
16,
1904,
4672,
3536,
23004,
326,
1646,
16,
1492,
1914,
279,
5024,
9512,
2110,
16,
471,
12949,
326,
619,
16,
93,
16,
94,... |
if markuptype=='Note': | if markuptype.lower()=='Note': | def sectionheader(text,level,beginmarkup): #output of headinglevels to console if checklevels: print text.rstrip('\n') levelstr='='*level remuster='%s.*?%s' %(levelstr,levelstr) such=re.compile(remuster,re.DOTALL) for treffer in such.findall(text): sectiontitle=treffer.replace(levelstr,'') sectiontitle=sectiontitle.strip(' ') sectionid=sectiontitle.replace("'",'') sectionid=sectionid.replace("?",'') sectionid=sectionid.replace(",",'') sectionid=sectionid.replace("/",'-') sectionid=sectionid.replace(' ','-') sectionid=sectionid.replace('<quote>','').replace('</quote>','') sectionid=sectionid.replace('"','') sectionid=sectionid.replace(' ','') sectionid=sectionid.replace('&','') sectionid=sectionid.replace('(','').replace(')','') sectionid=sectionid.lower() text=text.replace(treffer, '%s id="%s"><title>%s</title>' %(beginmarkup,sectionid,sectiontitle)) return text | 647202bf053c7f4e4c5037445d41961954e346cf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1692/647202bf053c7f4e4c5037445d41961954e346cf/wiki2docbook.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2442,
3374,
12,
955,
16,
2815,
16,
10086,
15056,
4672,
468,
2844,
434,
910,
1714,
941,
87,
358,
2983,
309,
866,
12095,
30,
1172,
977,
18,
86,
6406,
2668,
64,
82,
6134,
1801,
701,
2218,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2442,
3374,
12,
955,
16,
2815,
16,
10086,
15056,
4672,
468,
2844,
434,
910,
1714,
941,
87,
358,
2983,
309,
866,
12095,
30,
1172,
977,
18,
86,
6406,
2668,
64,
82,
6134,
1801,
701,
2218,... |
self.commit_transaction(context) | self.before_commit() | def handle_request(self, request): context = Context(request) response = context.response # (1) Initialize the context context.init() context.server = self root = self.root context.root = root set_context(context) | c4389bd9a3cde7a969752d4f3e661f1002e088c3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12681/c4389bd9a3cde7a969752d4f3e661f1002e088c3/server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
2293,
12,
2890,
16,
590,
4672,
819,
273,
1772,
12,
2293,
13,
766,
273,
819,
18,
2740,
468,
261,
21,
13,
9190,
326,
819,
819,
18,
2738,
1435,
819,
18,
3567,
273,
365,
1365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1640,
67,
2293,
12,
2890,
16,
590,
4672,
819,
273,
1772,
12,
2293,
13,
766,
273,
819,
18,
2740,
468,
261,
21,
13,
9190,
326,
819,
819,
18,
2738,
1435,
819,
18,
3567,
273,
365,
1365,
... |
result = self._find_primary(code, len(code) - 1) | result = self._find_primary(code, len(code) - 2) | def xxx_test_getting_primary_cancatenating_strs(self): code = 's = "a"\n"b" "c"\n' result = self._find_primary(code, len(code) - 1) self.assertEquals('"b" "c"', result) | 628861e59529545e6836de31de6c1bc5af86a3d2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8286/628861e59529545e6836de31de6c1bc5af86a3d2/codeanalyzetest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23354,
67,
3813,
67,
588,
1787,
67,
8258,
67,
4169,
2574,
275,
1776,
67,
24432,
12,
2890,
4672,
981,
273,
296,
87,
273,
315,
69,
12691,
82,
6,
70,
6,
315,
71,
12691,
82,
11,
563,
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,
23354,
67,
3813,
67,
588,
1787,
67,
8258,
67,
4169,
2574,
275,
1776,
67,
24432,
12,
2890,
4672,
981,
273,
296,
87,
273,
315,
69,
12691,
82,
6,
70,
6,
315,
71,
12691,
82,
11,
563,
2... |
sys.path=syspath os.chdir(cwd) | if syspath: sys.path=syspath if cwd: os.chdir(cwd) | def load_extension(filename): import imp paths = conf.extensions_paths if type(paths) is not list: paths = [paths] name = os.path.realpath(os.path.expanduser(filename)) thepath = os.path.dirname(name) thename = os.path.basename(name) if thename.endswith(".py"): thename = thename[:-3] paths.insert(0, thepath) try: cwd = os.getcwd() os.chdir(thepath) syspath = sys.path[:] sys.path += paths try: extf = imp.find_module(thename, paths) except ImportError: log_runtime.error("Module [%s] not found. Check conf.extensions_paths ?" % filename) else: ext = imp.load_module(thename, *extf) import __builtin__ __builtin__.__dict__.update(ext.__dict__) finally: sys.path=syspath os.chdir(cwd) | fff04113ee8eb92762458cdc1fcd8da6178fa636 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7311/fff04113ee8eb92762458cdc1fcd8da6178fa636/scapy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
6447,
12,
3459,
4672,
1930,
1646,
2953,
273,
2195,
18,
9489,
67,
4481,
309,
618,
12,
4481,
13,
353,
486,
666,
30,
2953,
273,
306,
4481,
65,
225,
508,
273,
1140,
18,
803,
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,
1262,
67,
6447,
12,
3459,
4672,
1930,
1646,
2953,
273,
2195,
18,
9489,
67,
4481,
309,
618,
12,
4481,
13,
353,
486,
666,
30,
2953,
273,
306,
4481,
65,
225,
508,
273,
1140,
18,
803,
18... |
'''This opens a log file. All data read from the child | """This opens a log file. All data read from the child | def log_open (self, filename): '''This opens a log file. All data read from the child application will be written to the log file. This is very useful to use while creating scripts. You can use this to figure out exactly what the child is sending. ''' self.log_fd = os.open (filename, O_APPEND | O_CREAT) | a6436229531e4cc3cceb58c0322f4ecc258e53d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9386/a6436229531e4cc3cceb58c0322f4ecc258e53d4/pexpect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
613,
67,
3190,
261,
2890,
16,
1544,
4672,
3536,
2503,
10400,
279,
613,
585,
18,
4826,
501,
855,
628,
326,
1151,
2521,
903,
506,
5941,
358,
326,
613,
585,
18,
1220,
353,
8572,
5301,
358... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
613,
67,
3190,
261,
2890,
16,
1544,
4672,
3536,
2503,
10400,
279,
613,
585,
18,
4826,
501,
855,
628,
326,
1151,
2521,
903,
506,
5941,
358,
326,
613,
585,
18,
1220,
353,
8572,
5301,
358... |
task = self._install(pkg, cs, lk, None, pruneweight, depth) for res in task: pass | task = trans.TaskInstall(self, pkg, cs, lk, None, self._pruneweight, self._yieldweight) for res in task: yield res; pruneweight=min(pruneweight,self._pruneweight); task.setWeights(pruneweight, self._yieldweight) | def _upgrade(self, pkgs, changeset, locked, pending, pruneweight, depth=0): depth += 1 trace(2, depth, "_upgrade(%s)", (pkgs)) | c2ff0e2fa3473e5898baf091e7a39f94abf28732 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8317/c2ff0e2fa3473e5898baf091e7a39f94abf28732/transaction.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
15097,
12,
2890,
16,
16922,
16,
22463,
16,
8586,
16,
4634,
16,
846,
318,
359,
1274,
16,
3598,
33,
20,
4672,
3598,
1011,
404,
2606,
12,
22,
16,
3598,
16,
4192,
15097,
9275,
87,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
15097,
12,
2890,
16,
16922,
16,
22463,
16,
8586,
16,
4634,
16,
846,
318,
359,
1274,
16,
3598,
33,
20,
4672,
3598,
1011,
404,
2606,
12,
22,
16,
3598,
16,
4192,
15097,
9275,
87,
2... |
return NotifySeverity.NSInfo | return NSInfo | def getSeverity(self): from pandac.PandaModules import NotifySeverity if self.getDebug(): return NotifySeverity.NSDebug elif self.getInfo(): return NotifySeverity.NSInfo elif self.getWarning(): return NotifySeverity.NSWarning else: return NotifySeverity.NSError | 439beadb7b0354026959fb92d947dce0178d4bfc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/439beadb7b0354026959fb92d947dce0178d4bfc/Notifier.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1322,
6084,
560,
12,
2890,
4672,
628,
293,
464,
1077,
18,
52,
464,
69,
7782,
1930,
10918,
21630,
309,
365,
18,
588,
2829,
13332,
327,
10918,
21630,
18,
3156,
2829,
1327,
365,
18,
588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1322,
6084,
560,
12,
2890,
4672,
628,
293,
464,
1077,
18,
52,
464,
69,
7782,
1930,
10918,
21630,
309,
365,
18,
588,
2829,
13332,
327,
10918,
21630,
18,
3156,
2829,
1327,
365,
18,
588,
... |
return unit | return unit | def base_units(unit): """ Converts unit to base SI units. INPUT: - ``unit`` OUTPUT: - `symbolic expression` EXAMPLES:: sage: sage.symbolic.units.base_units(units.length.foot) 381/1250*meter If unit is already a base unit, it just returns that unit:: sage: sage.symbolic.units.base_units(units.length.meter) meter Derived units get broken down into their base parts:: sage: sage.symbolic.units.base_units(units.force.newton) kilogram*meter/second^2 sage: sage.symbolic.units.base_units(units.volume.liter) 1/1000*meter^3 Returns variable if 'unit' is not a unit:: sage: sage.symbolic.units.base_units(var('x')) x """ from sage.misc.all import sage_eval if not unit_to_type.has_key(str(unit)): return unit elif unit_to_type[str(unit)] == 'si_prefixes' or unit_to_type[str(unit)] == 'unit_multipliers': return sage_eval(unitdict[unit_to_type[str(unit)]][str(unit)]) else: v = SR.var(unit_to_type[str(unit)]) if unit_derivations.has_key(str(v)): base = unit_derivations_expr(v) for i in base.variables(): base = base.subs({i:SR.var(value_to_unit[str(i)]['1'])}) return base*sage_eval(unitdict[str(v)][str(unit)]) else: base = SR.var(value_to_unit[str(v)]['1'])*sage_eval(unitdict[str(v)][str(unit)]) return base | d9145e61c2e167a847618a21778e0e532a04af5d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/d9145e61c2e167a847618a21778e0e532a04af5d/units.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1026,
67,
7705,
12,
4873,
4672,
3536,
20377,
2836,
358,
1026,
5705,
4971,
18,
225,
12943,
30,
225,
300,
12176,
4873,
10335,
225,
11550,
30,
225,
300,
1375,
9009,
12164,
2652,
68,
225,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1026,
67,
7705,
12,
4873,
4672,
3536,
20377,
2836,
358,
1026,
5705,
4971,
18,
225,
12943,
30,
225,
300,
12176,
4873,
10335,
225,
11550,
30,
225,
300,
1375,
9009,
12164,
2652,
68,
225,
56... |
elif err.message().find( "Job current status doesn" ) != -1: | elif err.message().find("Output not yet Ready") != -1 or \ err.message().find( "Job current status doesn" ) != -1: | def getOutput(cls, job, task, schedSession ): """ __getOutput__ | a5f066d56a58a64ff674799e20ee0e09f1a06fb3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8887/a5f066d56a58a64ff674799e20ee0e09f1a06fb3/JobOutput.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11062,
12,
6429,
16,
1719,
16,
1562,
16,
23964,
2157,
262,
30,
3536,
1001,
588,
1447,
972,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11062,
12,
6429,
16,
1719,
16,
1562,
16,
23964,
2157,
262,
30,
3536,
1001,
588,
1447,
972,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
var = wx.aui.AUI_ART_INACTIVE_CAPTION_TEXT_COLOUR | var = wx.aui.AUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR | def OnSetColor(self, event): dlg = wx.ColourDialog(self._frame) dlg.SetTitle("Color Picker") if dlg.ShowModal() != wx.ID_OK: return var = 0 if event.GetId() == ID_BackgroundColor: var = wx.aui.AUI_ART_BACKGROUND_COLOUR elif event.GetId() == ID_SashColor: var = wx.aui.AUI_ART_SASH_COLOUR elif event.GetId() == ID_InactiveCaptionColor: var = wx.aui.AUI_ART_INACTIVE_CAPTION_COLOUR elif event.GetId() == ID_InactiveCaptionGradientColor: var = wx.aui.AUI_ART_INACTIVE_CAPTION_GRADIENT_COLOUR elif event.GetId() == ID_InactiveCaptionTextColor: var = wx.aui.AUI_ART_INACTIVE_CAPTION_TEXT_COLOUR elif event.GetId() == ID_ActiveCaptionColor: var = wx.aui.AUI_ART_ACTIVE_CAPTION_COLOUR elif event.GetId() == ID_ActiveCaptionGradientColor: var = wx.aui.AUI_ART_ACTIVE_CAPTION_GRADIENT_COLOUR elif event.GetId() == ID_ActiveCaptionTextColor: var = wx.aui.AUI_ART_ACTIVE_CAPTION_TEXT_COLOUR elif event.GetId() == ID_BorderColor: var = wx.aui.AUI_ART_BORDER_COLOUR elif event.GetId() == ID_GripperColor: var = wx.aui.AUI_ART_GRIPPER_COLOUR else: return self._frame.GetDockArt().SetColor(var, dlg.GetColourData().GetColour()) self._frame.DoUpdate() self.UpdateColors() | de824c0c9cec70a6369d011fb635c8ba12bdacea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/de824c0c9cec70a6369d011fb635c8ba12bdacea/AUI_DockingWindowMgr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
694,
2957,
12,
2890,
16,
871,
4672,
225,
25840,
273,
7075,
18,
26404,
6353,
12,
2890,
6315,
3789,
13,
225,
25840,
18,
694,
4247,
2932,
2957,
453,
5448,
7923,
225,
309,
25840,
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,
2755,
694,
2957,
12,
2890,
16,
871,
4672,
225,
25840,
273,
7075,
18,
26404,
6353,
12,
2890,
6315,
3789,
13,
225,
25840,
18,
694,
4247,
2932,
2957,
453,
5448,
7923,
225,
309,
25840,
18,
... |
self.blockItem.PostSelectItems([item]) def SelectedIndexRanges(self): """ Uses RowRangeToIndexRange to convert the selected rows to selected indexes """ topLeftList = self.GetSelectionBlockTopLeft() bottomRightList = self.GetSelectionBlockBottomRight() selectedRows = ((row1, row2) for ((row1, col1), (row2, col2)) in zip(topLeftList, bottomRightList)) return self.RowRangeToIndexRange(selectedRows) def RowRangeToIndexRange(self, rowRanges): """ Given a list of row ranges, [(a,b), (c,d), ...], generate corresponding index ranges [(w,x), (y, z),..] """ for (topRow, bottomRow) in rowRanges: indexStart = self.RowToIndex(topRow) indexEnd = self.RowToIndex(bottomRow) if -1 not in (indexStart, indexEnd): yield (indexStart, indexEnd) | self.blockItem.PostSelectItems() def SelectedRowRanges(self): """ Uses IndexRangeToRowRange to convert the selected indexes to selected rows """ selection = self.blockItem.contents.getSelectionRanges() return self.IndexRangeToRowRange(selection) def IndexRangeToRowRange(self, indexRanges): """ Given a list of index ranges, [(a,b), (c,d), ...], generate corresponding row ranges [(w,x), (y, z),..] Eventually this will need to get more complex when IndexToRow() returns multiple rows """ for (indexStart, indexEnd) in indexRanges: topRow = self.IndexToRow(indexStart) bottomRow = self.IndexToRow(indexEnd) if -1 not in (topRow, bottomRow): yield (topRow, bottomRow) | def GoToItem(self, item): if item != None: try: index = self.blockItem.contents.index (item) row = self.IndexToRow(index) except ValueError: item = None blockItem = self.blockItem if item is not None: blockItem.contents.addSelectionRange (index) blockItem.selectedItemToView = item self.SelectBlock (row, 0, row, self.GetColumnCount() - 1) self.MakeCellVisible (row, 0) else: blockItem.contents.setSelectionRanges([]) blockItem.selectedItemToView = None self.ClearSelection() self.blockItem.PostSelectItems([item]) | 1331e5142b681fe4c817533479865e8bae695c30 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/1331e5142b681fe4c817533479865e8bae695c30/Table.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4220,
774,
1180,
12,
2890,
16,
761,
4672,
309,
761,
480,
599,
30,
775,
30,
770,
273,
365,
18,
2629,
1180,
18,
3980,
18,
1615,
261,
1726,
13,
1027,
273,
365,
18,
1016,
774,
1999,
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,
4220,
774,
1180,
12,
2890,
16,
761,
4672,
309,
761,
480,
599,
30,
775,
30,
770,
273,
365,
18,
2629,
1180,
18,
3980,
18,
1615,
261,
1726,
13,
1027,
273,
365,
18,
1016,
774,
1999,
12,
... |
u"""write a message to the log/stdout/stderr, depending on the level. if config=False, goes straight to stderr""" | u"""write a message to the log/stdout/stderr, depending on the level. if config=False, goes straight to stderr""" | def logStatusMsg( msg, level, config=True ): u"""write a message to the log/stdout/stderr, depending on the level. if config=False, goes straight to stderr""" l = {1:logging.critical, 2:logging.error, 3:logging.warn, 4:logging.info, 5:logging.debug} if not config: # daemon == no stdout/err! print >> sys.stderr, unicodeC(ReFormatString( inputstring=newmsg)) elif level: l[level](msg) #ReFormatString ? | 633e00b171a777d923e4aead2f2717108d53a3b9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1664/633e00b171a777d923e4aead2f2717108d53a3b9/rssdler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
613,
1482,
3332,
12,
1234,
16,
1801,
16,
642,
33,
5510,
262,
30,
582,
8395,
2626,
279,
883,
358,
326,
613,
19,
10283,
19,
11241,
16,
8353,
603,
326,
1801,
18,
309,
642,
33,
8381,
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,
613,
1482,
3332,
12,
1234,
16,
1801,
16,
642,
33,
5510,
262,
30,
582,
8395,
2626,
279,
883,
358,
326,
613,
19,
10283,
19,
11241,
16,
8353,
603,
326,
1801,
18,
309,
642,
33,
8381,
16,... |
self._parsebody(root, fp) | if not headersonly: self._parsebody(root, fp) | def parse(self, fp): root = self._class() self._parseheaders(root, fp) self._parsebody(root, fp) return root | 3f1ae9b34469c4a9c9ea69dfeb77feedc8a53ac5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/3f1ae9b34469c4a9c9ea69dfeb77feedc8a53ac5/Parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
4253,
4672,
1365,
273,
365,
6315,
1106,
1435,
365,
6315,
2670,
2485,
12,
3085,
16,
4253,
13,
309,
486,
1607,
3700,
30,
365,
6315,
2670,
3432,
12,
3085,
16,
4253,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
4253,
4672,
1365,
273,
365,
6315,
1106,
1435,
365,
6315,
2670,
2485,
12,
3085,
16,
4253,
13,
309,
486,
1607,
3700,
30,
365,
6315,
2670,
3432,
12,
3085,
16,
4253,
13... |
self.text.append(self.new_line) | if self.depth == 0: self.text.append(self.new_line) | def process_table(self, node, style=""): self.text.append(self.new_line) self.new_table = True style += self._table_style(node) for i in node.childNodes: if i.nodeType == Node.ELEMENT_NODE: name = i.localName if name == 'tr': self.process_table_record(i, style) style = "" elif name in ('thead', 'tbody', 'tfoot'): self.process_table(i, style) elif name == 'caption': self.process_caption(node, i, style) style = '' elif name in ('col', 'colgroup', 'strong', ): pass # we don't support these, but we just ignore them else: raise ConvertError("process_table: Don't support %s element" % name) #else: # raise ConvertError("Unexpected node: %r" % i) self.text.append(self.new_line_dont_remove) | 4f0d57f360f4048ef6b9b1886ef9b545e603c657 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/4f0d57f360f4048ef6b9b1886ef9b545e603c657/text_html_text_moin_wiki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2121,
12,
2890,
16,
756,
16,
2154,
1546,
6,
4672,
309,
365,
18,
5979,
422,
374,
30,
365,
18,
955,
18,
6923,
12,
2890,
18,
2704,
67,
1369,
13,
365,
18,
2704,
67,
2121,
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,
1207,
67,
2121,
12,
2890,
16,
756,
16,
2154,
1546,
6,
4672,
309,
365,
18,
5979,
422,
374,
30,
365,
18,
955,
18,
6923,
12,
2890,
18,
2704,
67,
1369,
13,
365,
18,
2704,
67,
2121,
273... |
if x > last: | if step > 0: if not (first <= x <= last): break elif not (last <= x <= first): | def parse_slidespec(slidespec): """ Accepts a string in the format instrument=first:last:step[,first:last:step]... and returns the tuple (instrument, [offset1, offset2, ....]) where the offsets are the sorted list of unique numbers described by the ranges. Example: >>> parse_slidespec("H1=-5:+5:0.5") ('H1', [-5.0, -4.5, -4.0, -3.5, -3.0, -2.5, -2.0, -1.5, -1.0, -0.5, 0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0]) """ try: instrument, rangespec = slidespec.split("=") except ValueError: raise ValueError, "cannot parse time slide \"%s\"" % slidespec offsets = set() for range in rangespec.split(","): try: first, last, step = map(float, range.split(":")) except ValueError: raise ValueError, "malformed range \"%s\" in \"%s\"" % (range, rangespec) if step == 0: if first != last: raise ValueError, "divide by zero in range \"%s\"" % range offsets.add(first) continue if (last - first) / step < 0.0: raise ValueError, "step has wrong sign in range \"%s\"" % range i = 0 while True: x = first + i * step if x > last: break offsets.add(x) i += 1 offsets = list(offsets) offsets.sort() return instrument.strip(), offsets | 3280eb72d42d7add55fe0714f37c98d2e461410d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3592/3280eb72d42d7add55fe0714f37c98d2e461410d/ligolw_tisi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
2069,
4369,
705,
12,
2069,
4369,
705,
4672,
3536,
27158,
279,
533,
316,
326,
740,
10353,
33,
3645,
30,
2722,
30,
4119,
63,
16,
3645,
30,
2722,
30,
4119,
65,
2777,
225,
471,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
2069,
4369,
705,
12,
2069,
4369,
705,
4672,
3536,
27158,
279,
533,
316,
326,
740,
10353,
33,
3645,
30,
2722,
30,
4119,
63,
16,
3645,
30,
2722,
30,
4119,
65,
2777,
225,
471,
... |
self.safe_remove(ABSTFN + "/link-y") self.safe_rmdir(ABSTFN + "/k/y") self.safe_rmdir(ABSTFN + "/k") self.safe_rmdir(ABSTFN) | test_support.unlink(ABSTFN + "/link-y") safe_rmdir(ABSTFN + "/k/y") safe_rmdir(ABSTFN + "/k") safe_rmdir(ABSTFN) | def test_realpath_resolve_before_normalizing(self): # Bug #990669: Symbolic links should be resolved before we # normalize the path. E.g.: if we have directories 'a', 'k' and 'y' # in the following hierarchy: # a/k/y # # and a symbolic link 'link-y' pointing to 'y' in directory 'a', # then realpath("link-y/..") should return 'k', not 'a'. try: old_path = abspath('.') os.mkdir(ABSTFN) os.mkdir(ABSTFN + "/k") os.mkdir(ABSTFN + "/k/y") os.symlink(ABSTFN + "/k/y", ABSTFN + "/link-y") | a11ac07dffa1601eaedcb5c761a2ded5e280c53b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/a11ac07dffa1601eaedcb5c761a2ded5e280c53b/test_posixpath.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
7688,
803,
67,
10828,
67,
5771,
67,
6130,
6894,
12,
2890,
4672,
468,
16907,
468,
2733,
20,
6028,
29,
30,
16455,
12164,
4716,
1410,
506,
4640,
1865,
732,
468,
3883,
326,
589,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7688,
803,
67,
10828,
67,
5771,
67,
6130,
6894,
12,
2890,
4672,
468,
16907,
468,
2733,
20,
6028,
29,
30,
16455,
12164,
4716,
1410,
506,
4640,
1865,
732,
468,
3883,
326,
589,
... |
msgs.append(makepatch(p, i + 1, len(patches), name)) | msg = makepatch(ui, repo, p, opts, _charsets, i + 1, len(patches), name) msgs.append(msg) | def getpatchmsgs(patches, patchnames=None): jumbo = [] msgs = [] | 036a97f1795cbe9ef154c92f43ec10652267b497 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/036a97f1795cbe9ef154c92f43ec10652267b497/patchbomb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
2272,
27439,
12,
30278,
16,
4729,
1973,
33,
7036,
4672,
525,
379,
1075,
273,
5378,
8733,
273,
5378,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
2272,
27439,
12,
30278,
16,
4729,
1973,
33,
7036,
4672,
525,
379,
1075,
273,
5378,
8733,
273,
5378,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
parentstr += " " + hg.hex(pp[1]) | parentstr += " " + hg.short(pp[1]) | def is_reachable(ar, reachable, sha): if len(ar) == 0: return 1 mask = 0 for i in range(len(ar)): if sha in reachable[i]: mask |= 1 << i | 1c5a771c9609237f9deb3e7d05682937d58d4a9e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/1c5a771c9609237f9deb3e7d05682937d58d4a9e/hgk.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
17246,
12,
297,
16,
19234,
16,
6056,
4672,
309,
562,
12,
297,
13,
422,
374,
30,
327,
404,
3066,
273,
374,
364,
277,
316,
1048,
12,
1897,
12,
297,
3719,
30,
309,
6056,
316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
17246,
12,
297,
16,
19234,
16,
6056,
4672,
309,
562,
12,
297,
13,
422,
374,
30,
327,
404,
3066,
273,
374,
364,
277,
316,
1048,
12,
1897,
12,
297,
3719,
30,
309,
6056,
316,
... |
sage: sage.calculus.calculus.arctan2(2,3) | sage: arctan2 = sage.calculus.calculus.arctan2 sage: arctan2(1,2) arctan(1/2) sage: float(arctan2(1,2)) 0.46364760900080609 sage: arctan2(2,3) | def arctan2(y, x): r""" Modified version of arctan function, since it is used by Maxima. \code{arctan2(y,x) = arctan(y/x)} This is mainly for internal use. EXAMPLES: sage: sage.calculus.calculus.arctan2(2,3) arctan(2/3) """ return arctan(y/x) | 9c7726e3497cdffb5c142e37014d0bc7d3ed0af4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/9c7726e3497cdffb5c142e37014d0bc7d3ed0af4/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
27397,
22,
12,
93,
16,
619,
4672,
436,
8395,
21154,
1177,
434,
27397,
445,
16,
3241,
518,
353,
1399,
635,
4238,
13888,
18,
225,
521,
710,
95,
297,
299,
304,
22,
12,
93,
16,
92,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
27397,
22,
12,
93,
16,
619,
4672,
436,
8395,
21154,
1177,
434,
27397,
445,
16,
3241,
518,
353,
1399,
635,
4238,
13888,
18,
225,
521,
710,
95,
297,
299,
304,
22,
12,
93,
16,
92,
13,
... |
out.data = ma.masked_array(out.data, isnan(out.data)) out.stats.endtime = rt.stats.endtime | out.data = np.ma.masked_array(out.data, np.isnan(out.data)) | def __add__(self, trace): """ Adds a Trace object to this Trace It will automatically append the data by interpolating overlaps or filling gaps with numpy.NaN samples. Sampling rate and Trace ID must be the same. """ if not isinstance(trace, Trace): raise TypeError # check id if self.getId() != trace.getId(): raise TypeError("Trace ID differs") # check sample rate if self.stats.sampling_rate != trace.stats.sampling_rate: raise TypeError("Sampling rate differs") # check times if self.stats.starttime <= trace.stats.starttime and \ self.stats.endtime >= trace.stats.endtime: # new trace is within this trace return deepcopy(self) elif self.stats.starttime >= trace.stats.starttime and \ self.stats.endtime <= trace.stats.endtime: # this trace is within new trace return deepcopy(trace) # shortcuts if self.stats.starttime <= trace.stats.starttime: lt = self rt = trace else: rt = self lt = trace sr = self.stats.sampling_rate delta = int(round((rt.stats.starttime - lt.stats.endtime) * sr)) - 1 # check if overlap or gap if delta <= 0: # overlap delta = abs(delta) out = deepcopy(lt) ltotal = len(lt) lend = ltotal - delta if isinstance(lt.data, list): ldata = array(lt.data) else: ldata = lt.data if isinstance(rt.data, list): rdata = array(rt.data) else: rdata = rt.data samples = (ldata[lend:] + rdata[0:delta]) / 2 if ma.is_masked(ldata) or ma.is_masked(rdata): out.data = ma.concatenate([ldata[0:lend], samples, rdata[delta:]]) else: out.data = concatenate([ldata[0:lend], samples, rdata[delta:]]) out.stats.endtime = rt.stats.endtime out.stats.npts = out.data.size else: # gap out = deepcopy(lt) # get number of missing samples nans = array([NaN] * delta) out.data = concatenate([lt.data, nans, rt.data]) # Create masked array. out.data = ma.masked_array(out.data, isnan(out.data)) out.stats.endtime = rt.stats.endtime out.stats.npts = out.data.count() return out | 8c64f680815bfb63eb96c46f8eee0df203360f37 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10470/8c64f680815bfb63eb96c46f8eee0df203360f37/trace.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1289,
972,
12,
2890,
16,
2606,
4672,
3536,
15605,
279,
2677,
733,
358,
333,
2677,
225,
2597,
903,
6635,
714,
326,
501,
635,
7326,
1776,
19582,
578,
25740,
21085,
598,
3972,
18,
211... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1289,
972,
12,
2890,
16,
2606,
4672,
3536,
15605,
279,
2677,
733,
358,
333,
2677,
225,
2597,
903,
6635,
714,
326,
501,
635,
7326,
1776,
19582,
578,
25740,
21085,
598,
3972,
18,
211... |
print "Mouse down at global:", where print "\tUnknown part code:", partcode | if DEBUG: print "Mouse down at global:", where if DEBUG: print "\tUnknown part code:", partcode MacOS.HandleEvent(event) | def do_unknownpartcode(self, partcode, window, event): (what, message, when, where, modifiers) = event print "Mouse down at global:", where print "\tUnknown part code:", partcode | 7a58336511b8c405e01bcda0b886b19c2947189a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7a58336511b8c405e01bcda0b886b19c2947189a/FrameWork.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
8172,
2680,
710,
12,
2890,
16,
1087,
710,
16,
2742,
16,
871,
4672,
261,
23770,
16,
883,
16,
1347,
16,
1625,
16,
10429,
13,
273,
871,
309,
6369,
30,
1172,
315,
9186,
2588,
62... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
8172,
2680,
710,
12,
2890,
16,
1087,
710,
16,
2742,
16,
871,
4672,
261,
23770,
16,
883,
16,
1347,
16,
1625,
16,
10429,
13,
273,
871,
309,
6369,
30,
1172,
315,
9186,
2588,
62... |
sc_menu_id = self.pool.get('ir.ui.view_sc').create(cr, uid, sc_data, context) | sc_menu_id = self.pool.get('ir.ui.view_sc').create(cr, uid, sc_data, new_context) | def create_shortcut(self, cr, uid, values, context={}): dataobj = self.pool.get('ir.model.data') menu_id = dataobj._get_id(cr, uid, 'base', 'menu_administration_shortcut', context) shortcut_menu_id = int(dataobj.read(cr, uid, menu_id, ['res_id'], context)['res_id']) action_id = self.pool.get('ir.actions.act_window').create(cr, uid, values, context) menu_data = {'name':values['name'], 'sequence':10, 'action':'ir.actions.act_window,'+str(action_id), 'parent_id':shortcut_menu_id, 'icon':'STOCK_JUSTIFY_FILL'} menu_id = self.pool.get('ir.ui.menu').create(cr, uid, menu_data) sc_data= {'name':values['name'], 'sequence': 1,'res_id': menu_id } sc_menu_id = self.pool.get('ir.ui.view_sc').create(cr, uid, sc_data, context) | 658d2ba6256d12d5e170246819401beb72c19d2d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/658d2ba6256d12d5e170246819401beb72c19d2d/ir_ui_menu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
24744,
12,
2890,
16,
4422,
16,
4555,
16,
924,
16,
819,
12938,
4672,
501,
2603,
273,
365,
18,
6011,
18,
588,
2668,
481,
18,
2284,
18,
892,
6134,
3824,
67,
350,
273,
501,
2603... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
24744,
12,
2890,
16,
4422,
16,
4555,
16,
924,
16,
819,
12938,
4672,
501,
2603,
273,
365,
18,
6011,
18,
588,
2668,
481,
18,
2284,
18,
892,
6134,
3824,
67,
350,
273,
501,
2603... |
pagelinks.append({"href": dispatch.translate(request, request.path_info), | pagelinks.append({"href": dispatch.translate(request, request.path_info, item=0), | def get_page_links(request, store, pagesize, translations, first_item): """gets links to other pages of items, based on the given baselink""" pagelinks = [] pofilelen = store.file.getitemslen() state = dispatch.TranslatePageState(request.GET) if pofilelen <= pagesize or first_item is None: return pagelinks lastitem = min(pofilelen-1, first_item + pagesize - 1) if pofilelen > pagesize and not first_item == 0: # l10n: noun (the start) pagelinks.append({"href": dispatch.translate(request, request.path_info), "text": _("Start")}) else: # l10n: noun (the start) pagelinks.append({"text": _("Start")}) if first_item > 0: linkitem = max(first_item - pagesize, 0) # l10n: the parameter refers to the number of messages pagelinks.append({"href": dispatch.translate(request, request.path_info, item=linkitem), "text": _("Previous %d", (first_item - linkitem))}) else: # l10n: the parameter refers to the number of messages pagelinks.append({"text": _("Previous %d" % pagesize)}) # l10n: the third parameter refers to the total number of messages in the file pagelinks.append({"text": _("Items %d to %d of %d", (first_item + 1, lastitem + 1, pofilelen))}) if first_item + len(translations) < pofilelen: linkitem = first_item + pagesize itemcount = min(pofilelen - linkitem, pagesize) # l10n: the parameter refers to the number of messages pagelinks.append({"href": dispatch.translate(request, request.path_info, item=linkitem), "text": _("Next %d", itemcount)}) else: # l10n: the parameter refers to the number of messages pagelinks.append({"text": _("Next %d", pagesize)}) if pofilelen > pagesize and (state.item + pagesize) < pofilelen: # l10n: noun (the end) pagelinks.append({"href": dispatch.translate(request, request.path_info, item=max(pofilelen - pagesize, 0)), "text": _("End")}) else: # l10n: noun (the end) pagelinks.append({"text": _("End")}) for n, pagelink in enumerate(pagelinks): if n < len(pagelinks)-1: pagelink["sep"] = " | " else: pagelink["sep"] = "" return pagelinks | e1d52ac848ac97563c04e5dabb029a78a97ebeff /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11388/e1d52ac848ac97563c04e5dabb029a78a97ebeff/translate_page.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2433,
67,
7135,
12,
2293,
16,
1707,
16,
4689,
554,
16,
7863,
16,
1122,
67,
1726,
4672,
3536,
14665,
4716,
358,
1308,
4689,
434,
1516,
16,
2511,
603,
326,
864,
2580,
27269,
839... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2433,
67,
7135,
12,
2293,
16,
1707,
16,
4689,
554,
16,
7863,
16,
1122,
67,
1726,
4672,
3536,
14665,
4716,
358,
1308,
4689,
434,
1516,
16,
2511,
603,
326,
864,
2580,
27269,
839... |
if env.debug(): | if env.debug() or DEBUG_PYREX_ATOMS: | def collect_state(self, objdict, keyknower, exclude_layers = ()): #060329/060404 added exclude_layers """ Given a dict from id(obj) to obj, which is already transclosed to include all objects of interest, ensure all these objs have objkeys (allocating them from keyknower (an objkey_allocator instance) as needed), and grab the values of all their state-holding attrs, and return this in the form of a StateSnapshot object. #e In future we'll provide a differential version too. """ key4obj = keyknower.key4obj_maybe_new # or our arg could just be this method attrcodes = self.dict_of_all_state_attrcodes.keys() if exclude_layers: assert exclude_layers == ('atoms',) # the only one we support right here attrcodes = filter( lambda (attr, acode): ## acode not in ('Atom', 'Bond'), not _KLUGE_acode_is_special_for_extract_layers(acode), attrcodes ) # this is required, otherwise insert_layers (into this) will complain about these layers already being there snapshot = StateSnapshot(attrcodes) # make a place to keep all the values we're about to grab attrdicts = snapshot.attrdicts len1 = len(objdict) if DEBUG_PYREX_ATOMS: print "\nDEBUG_PYREX_ATOMS: collect_state len(objdict) = %d" % len1 for obj in objdict.itervalues(): key = key4obj(obj) clas = self.classify_instance(obj) if DEBUG_PYREX_ATOMS: ## if 0 and 'ENABLE SLOW TEST CODE': # @@@@@@@ 080221 if exclude_layers: assert exclude_layers == ('atoms',) # the only one we support right here ## print "remove when works, once this code is debugged -- too slow!" ### bruce 071114 ## if not ( clas.class1.__name__ not in ('Atom', 'Bond') ): if getattr(obj, '_s_undo_specialcase', None) in (UNDO_SPECIALCASE_ATOM, UNDO_SPECIALCASE_BOND): print "bug: exclude_layers didn't stop us from seeing", obj # hmm, use attrs in clas or use __dict__? Either one might be way too big... start with smaller one? nah. guess. # also we might as well use getattr and be more flexible (not depending on __dict__ to exist). Ok, use getattr. # Do we optim dflt values of attrs? We ought to... even when we're differential, we're not *always* differential. ###e need to teach clas to know those, then. for attrcode, dflt in clas.attrcode_dflt_pairs: # for attrs holding state (S_DATA, S_CHILD*, S_PARENT*, S_REF*) with dflts attr, acode_unused = attrcode if clas.exclude(attr, exclude_layers): if env.debug():###@@@ rm when works print "debug: collect_state exclude_layers1 excludes", attr, "of", obj continue val = getattr(obj, attr, dflt) # note: this dflt can depend on key -- no need for it to be the same within one attrdict, # provided we have no objects whose attrs all have default values and all equal them at once [060302] if val is not dflt: # it's important in general to use 'is' rather than '==' (I think), e.g. for different copies of {} # We might need to store a copy of val, or we might not if val == dflt and it's not mutable. # There's no efficient perfect test for this, and it's not worth the runtime to even guess it, # since for typical cases where val needn't be stored, val is dflt since instance didn't copy it. # (Not true if Undo stored the val back into the object, but it won't if it doesn't copy it out!) attrdicts[attrcode][key] = copy_val(val) for attrcode in clas.attrcodes_with_no_dflt: # (This kind of attr might be useful when you want full dicts for turning into Numeric arrays later. Not sure.) # Does that mean the attr must always exist on obj? Or that we should "store its nonexistence"? # For simplicity, I hope latter case can always be thought of as the attr having a default. # I might need a third category of attrs to pull out of __dict__.get so we don't run __getattr__ for them... ##e #val = getattr(obj, attr) #valcopy = copy_val(val) #attrdict = attrdicts[attr] #attrdict[key] = valcopy attr, acode_unused = attrcode if clas.exclude(attr, exclude_layers): if env.debug():###@@@ rm when works print "debug: collect_state exclude_layers2 excludes", attr, "of", obj continue attrdicts[attrcode][key] = copy_val(getattr(obj, attr, _Bugval)) # We do it all in one statement, for efficiency in case compiler is not smart enough to see that local vars # would not be used again; it might even save time due to lack of bytecodes to update linenumber # to report in exceptions! (Though that will make bugs harder to track down, if exceptions occur.) # #bruce 060311 adding default of Bugval to protect us from bugs (nonexistence of attr) without entirely hiding # them. In theory, if this ever happens in correct code, then this attrval (or whether it's set) shouldn't matter. # I want to use something recognizable, but not _UNSET_ since that would (I think) conflict with its meaning # in diffs (not sure). If it turns out this is not always a bug, I can make this act similarly to _UNSET_ # in that, when storing it back, I can unset the attr (this would make Undo least likely to introduce a bug). # I'm not yet doing that, but I added a comment mentioning _Bugval next to the relevant setattr in undo_archive.py. len2 = len(objdict) if len1 != len2: # this should be impossible print "bug: collect_state in %r sees objdict (id %#x) modified during itervalues (len %d -> %d)" % \ (self, id(objdict), len1, len2) if 0 and env.debug(): print "atom_debug: collect_state got this snapshot:", snapshot | c9c96afe91e5f17468276c3c868b6210e16db00e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/c9c96afe91e5f17468276c3c868b6210e16db00e/state_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3274,
67,
2019,
12,
2890,
16,
1081,
1576,
16,
498,
21112,
2085,
16,
4433,
67,
10396,
273,
1832,
4672,
468,
20,
4848,
1578,
29,
19,
7677,
3028,
3028,
3096,
4433,
67,
10396,
3536,
16803,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3274,
67,
2019,
12,
2890,
16,
1081,
1576,
16,
498,
21112,
2085,
16,
4433,
67,
10396,
273,
1832,
4672,
468,
20,
4848,
1578,
29,
19,
7677,
3028,
3028,
3096,
4433,
67,
10396,
3536,
16803,
... |
else: self.fetchEXTHFields() | self.have_exth = True self.fetchEXTHFields() | def __init__(self, stream): self.stream = stream data = self.data = StreamSlicer(stream) self.type = data[60:68] | ebdf1e0558c44d92ec0d324ffac4f710f828f37d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/ebdf1e0558c44d92ec0d324ffac4f710f828f37d/mobi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1407,
4672,
365,
18,
3256,
273,
1407,
501,
273,
365,
18,
892,
273,
3961,
3738,
21349,
12,
3256,
13,
365,
18,
723,
273,
501,
63,
4848,
30,
9470,
65,
2,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1407,
4672,
365,
18,
3256,
273,
1407,
501,
273,
365,
18,
892,
273,
3961,
3738,
21349,
12,
3256,
13,
365,
18,
723,
273,
501,
63,
4848,
30,
9470,
65,
2,
... |
"H2": atom_info("H", 0, "H'"), "H3": atom_info("H", 0, "H'"), "H1": atom_info("H", 0, "H'"), "H4": atom_info("H", 0, "H'"), "H5": atom_info("H", 0, "H'"), "HO6": atom_info("H", 0, "H'"), "HO4": atom_info("H", 0, "H'"), "HO2": atom_info("H", 0, "H'"), "HO3": atom_info("H", 0, "H'"), "HO1": atom_info("H", 0, "H'"), "H61": atom_info("H", 0, "H'"), | "H2": atom_info("H", 0, "H"), "H3": atom_info("H", 0, "H"), "H1": atom_info("H", 0, "H"), "H4": atom_info("H", 0, "H"), "H5": atom_info("H", 0, "H"), "HO6": atom_info("H", 0, "H"), "HO4": atom_info("H", 0, "H"), "HO2": atom_info("H", 0, "H"), "HO3": atom_info("H", 0, "H"), "HO1": atom_info("H", 0, "H"), "H61": atom_info("H", 0, "H"), | def keys(self): return ("element_symbol", "ionic_state", "scattering_label") | 46b20303e8ed53745807da84c39cb29f25aa3911 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/46b20303e8ed53745807da84c39cb29f25aa3911/residue_info.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1311,
12,
2890,
4672,
327,
7566,
2956,
67,
7175,
3113,
315,
285,
335,
67,
2019,
3113,
315,
31320,
310,
67,
1925,
7923,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1311,
12,
2890,
4672,
327,
7566,
2956,
67,
7175,
3113,
315,
285,
335,
67,
2019,
3113,
315,
31320,
310,
67,
1925,
7923,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fp=image.fp | fp=im._image.fp | def loadImageFromSRC(self, im): "Extracts the stream, width and height" if im._image.format=='JPEG': fp=image.fp fp.seek(0) self.loadImageFromJPEG(fp) else: zlib = import_zlib() if not zlib: return self.width, self.height = im.getSize() raw = im.getRGBData() assert(len(raw) == self.width*self.height, "Wrong amount of data for image") self.streamContent = pdfutils._AsciiBase85Encode(zlib.compress(raw)) self.colorSpace = 'DeviceRGB' self.bitsPerComponent = 8 self._filters = 'ASCII85Decode','FlateDecode' #'A85','Fl' self._checkTransparency(im) | f2ef522e3459b39fe5ad28d7ccc75b83bea2a61c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/f2ef522e3459b39fe5ad28d7ccc75b83bea2a61c/pdfdoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
2040,
1265,
28413,
12,
2890,
16,
709,
4672,
315,
12809,
326,
1407,
16,
1835,
471,
2072,
6,
309,
709,
6315,
2730,
18,
2139,
18920,
28698,
4278,
4253,
33,
381,
6315,
2730,
18,
7944,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
2040,
1265,
28413,
12,
2890,
16,
709,
4672,
315,
12809,
326,
1407,
16,
1835,
471,
2072,
6,
309,
709,
6315,
2730,
18,
2139,
18920,
28698,
4278,
4253,
33,
381,
6315,
2730,
18,
7944,
... |
temp = temp + "%s" % (sha256("%x%x%s" % (counter, number_of_bits, temp)).hexdigest(),) | temp = temp + sha256("%.2x%.8x%s" % (counter, number_of_bits, input)).hexdigest() | def _hash_df(input, number_of_bits): temp = "" length = int(ceil(float(number_of_bits) / 160)) counter = 1 for i in xrange(length): temp = temp + "%s" % (sha256("%x%x%s" % (counter, number_of_bits, temp)).hexdigest(),) counter = (counter + 1) % 256 return long(temp[:number_of_bits / 4], 16) | 560e613d1c6a4f937e7e2feb273a6eeb729519f3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6416/560e613d1c6a4f937e7e2feb273a6eeb729519f3/hash_drbg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2816,
67,
2180,
12,
2630,
16,
1300,
67,
792,
67,
6789,
4672,
1906,
273,
1408,
769,
273,
509,
12,
311,
330,
12,
5659,
12,
2696,
67,
792,
67,
6789,
13,
342,
25430,
3719,
225,
3895... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2816,
67,
2180,
12,
2630,
16,
1300,
67,
792,
67,
6789,
4672,
1906,
273,
1408,
769,
273,
509,
12,
311,
330,
12,
5659,
12,
2696,
67,
792,
67,
6789,
13,
342,
25430,
3719,
225,
3895... |
ans = self.parent()(0) | ans = R(0) | def log(self): r""" Compute the p-adic logarithm of any nonzero element of $\Q_p$. (See below for normalization.) The usual power series for log with values in the additive group of $\Q_p$ only converges for 1-units (units congruent to 1 modulo p). However, there is a unique extension of log to a homomorphism defined on all the units. If u = a*v is a unit with v = 1 (mod p), then we define log(u) = log(v). This is the correct extension because the units U of Z_p splits as a product U = V x <w>, where V is the subgroup of 1-units and w is a (p-1)st root of unity. The <w> factor is torsion, so must go to 0 under any homomorphism to the torsion free group $(\Q_p, +)$. | 3eebf12aa30864266175533b76ce6d0542a88326 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/3eebf12aa30864266175533b76ce6d0542a88326/padic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
613,
12,
2890,
4672,
436,
8395,
8155,
326,
293,
17,
20333,
613,
31249,
434,
1281,
16966,
930,
434,
271,
64,
53,
67,
84,
8,
18,
261,
9704,
5712,
364,
13728,
12998,
225,
1021,
25669,
721... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
613,
12,
2890,
4672,
436,
8395,
8155,
326,
293,
17,
20333,
613,
31249,
434,
1281,
16966,
930,
434,
271,
64,
53,
67,
84,
8,
18,
261,
9704,
5712,
364,
13728,
12998,
225,
1021,
25669,
721... |
def replacement(self, **form): | """ A decorator (meant to be used under ``wsgiapp()``) that resolves the ``debugcount`` variable to a ``DebugInfo`` object (or gives an error if it can't be found). """ def debug_info_replacement(self, **form): | def replacement(self, **form): try: if 'debugcount' not in form: raise ValueError('You must provide a debugcount parameter') debugcount = form.pop('debugcount') try: debugcount = int(debugcount) except ValueError: raise ValueError('Bad value for debugcount') if debugcount not in self.debug_infos: raise ValueError('Debug %s no longer found (maybe it has expired?)' % debugcount) debug_info = self.debug_infos[debugcount] return func(self, debug_info=debug_info, **form) except ValueError, e: form['headers']['status'] = '500 Server Error' return '<html>There was an error: %s</html>' % e | d0441ff28d999e1ade91f96ba9f46dc821fc0f2d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11400/d0441ff28d999e1ade91f96ba9f46dc821fc0f2d/middleware.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3536,
432,
7367,
261,
3501,
970,
358,
506,
1399,
3613,
12176,
28539,
2910,
1435,
10335,
13,
716,
17385,
326,
12176,
4148,
1883,
10335,
2190,
358,
279,
12176,
2829,
966,
10335,
733,
261,
280,
147... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3536,
432,
7367,
261,
3501,
970,
358,
506,
1399,
3613,
12176,
28539,
2910,
1435,
10335,
13,
716,
17385,
326,
12176,
4148,
1883,
10335,
2190,
358,
279,
12176,
2829,
966,
10335,
733,
261,
280,
147... |
_putFragLine(tx, line) | _putFragLine(m,tx, line) | def _centerDrawParaLineX( tx, offset, line, last=0): m = offset+0.5*line.extraSpace setXPos(tx,m) _putFragLine(tx, line) setXPos(tx,-m) return m | ae97b90f6a178f0d7566cbd8acc91dc0dd0700c1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7053/ae97b90f6a178f0d7566cbd8acc91dc0dd0700c1/paragraph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5693,
6493,
23529,
1670,
60,
12,
2229,
16,
1384,
16,
980,
16,
1142,
33,
20,
4672,
312,
273,
1384,
15,
20,
18,
25,
14,
1369,
18,
7763,
3819,
23733,
1616,
12,
978,
16,
81,
13,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5693,
6493,
23529,
1670,
60,
12,
2229,
16,
1384,
16,
980,
16,
1142,
33,
20,
4672,
312,
273,
1384,
15,
20,
18,
25,
14,
1369,
18,
7763,
3819,
23733,
1616,
12,
978,
16,
81,
13,
3... |
p = self.protocol(self.username, self.password, self._contextFactory, self.domain, len(self.toEmail)*2+2) | p = self.protocol(self.username, self.password, self._contextFactory, self.domain, self.nEmails*2+2) | def buildProtocol(self, addr): p = self.protocol(self.username, self.password, self._contextFactory, self.domain, len(self.toEmail)*2+2) p.heloFallback = self._heloFallback p.requireAuthentication = self._requireAuthentication p.requireTransportSecurity = self._requireTransportSecurity p.factory = self return p | f75030b75edbe6c90136972acbf7050669ff7506 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f75030b75edbe6c90136972acbf7050669ff7506/smtp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
5752,
12,
2890,
16,
3091,
4672,
293,
273,
365,
18,
8373,
12,
2890,
18,
5053,
16,
365,
18,
3664,
16,
365,
6315,
2472,
1733,
16,
365,
18,
4308,
16,
365,
18,
82,
26614,
14,
22,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5752,
12,
2890,
16,
3091,
4672,
293,
273,
365,
18,
8373,
12,
2890,
18,
5053,
16,
365,
18,
3664,
16,
365,
6315,
2472,
1733,
16,
365,
18,
4308,
16,
365,
18,
82,
26614,
14,
22,
... |
def testDnsPrefectchingEnabledPref(self): | def testDnsPrefetchingEnabledPref(self): | def testDnsPrefectchingEnabledPref(self): """Verify DNS prefetching pref.""" # Assert default self.assertTrue(self.GetPrefsInfo().Prefs(pyauto.kDnsPrefetchingEnabled)) self.SetPrefs(pyauto.kDnsPrefetchingEnabled, False) self.RestartBrowser(clear_profile=False) self.assertFalse(self.GetPrefsInfo().Prefs(pyauto.kDnsPrefetchingEnabled)) | a2b600c5b2175571888da48f76adec7bc80b8b9d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/a2b600c5b2175571888da48f76adec7bc80b8b9d/prefs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
18600,
25591,
310,
1526,
23218,
12,
2890,
4672,
3536,
8097,
8858,
17607,
310,
11307,
12123,
468,
5452,
805,
365,
18,
11231,
5510,
12,
2890,
18,
967,
1386,
2556,
966,
7675,
1386,
2556... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
18600,
25591,
310,
1526,
23218,
12,
2890,
4672,
3536,
8097,
8858,
17607,
310,
11307,
12123,
468,
5452,
805,
365,
18,
11231,
5510,
12,
2890,
18,
967,
1386,
2556,
966,
7675,
1386,
2556... |
addcap = datum['BaseCapToCapBonus'] | def calculate(self): if self.nocalc: return errorcount = 0 self.errorsmenu.clear() charleveltext = str(self.CharLevel.text()) if charleveltext == '': charlevel = 1 else: charlevel = max(min(50, int(charleveltext)), 1) self.CharLevel.setText(str(charlevel)) for key, item in self.itemattrlist.iteritems(): if item.ActiveState != 'player': continue gemeffects = [] for i in range(0, item.slotCount()): slot = item.slot(i) if slot.slotType() != 'player': continue gemtype = slot.type() if gemtype == 'Unused': continue effect = slot.effect() if [gemtype, effect] in gemeffects: error_act = QAction('Two of same type of gem on %s' \ % key, self) if item.Location in JewelTabList: row = 1 col = JewelTabList.index(item.Location) else: row = 0 col = PieceTabList.index(item.Location) error_act.setData(QVariant((row << 8) | col)) self.errorsmenu.addAction(error_act) errorcount = errorcount + 1 gemeffects.append([gemtype, effect]) item = self.itemattrlist[self.currentTabLabel] self.ItemUtility.setText('%3.1f' % item.utility()) if item.ActiveState == 'player': imbuevals = item.listGemImbue() imbuepts = sum(imbuevals) itemimbue = item.itemImbue() for i in range(0, item.slotCount()): slot = item.slot(i) if i < len(imbuevals): self.Cost[i].setText(SC.formatCost(slot.gemCost())) self.Points[i].setText('%3.1f' % imbuevals[i]) if i < len(self.Name): self.Name[i].setText(slot.gemName(self.realm)) self.ItemImbue.setText('%3.1f' % imbuepts) self.ItemImbueTotal.setText(' / ' + unicode(itemimbue)) self.ItemCost.setText(SC.formatCost(item.cost())) self.ItemPrice.setText(SC.formatCost(item.price(self.pricingInfo))) if imbuepts >= (itemimbue + 6.0): self.ItemOvercharge.setText('Impossible') error_act = QAction('Impossible overcharge on %s' % key, self) if item.Location in JewelTabList: row = 1 col = JewelTabList.index(item.Location) else: row = 0 col = PieceTabList.index(item.Location) error_act.setData(QVariant((row << 8) | col)) self.errorsmenu.addAction(error_act) errorcount = errorcount + 1 elif imbuepts < (itemimbue + 1.0): self.ItemOvercharge.setText('None') else: success = item.overchargeSuccess(self.crafterSkill) if success < 0: self.ItemOvercharge.setText('BOOM! (%d%%)' % success) else: self.ItemOvercharge.setText('%d%%' % success) tot = self.summarize() self.SkillsList.model().removeRows(0,self.SkillsList.model().rowCount()) for key, amounts in tot['Resists'].iteritems(): val = amounts['TotalBonus'] if not self.capDistance: if self.includeRacials: if amounts.has_key('RacialBonus'): rr = amounts['RacialBonus'] val += rr self.StatValue[key].setText(unicode(val)) else: basecap = amounts['BaseCap'] self.StatValue[key].setText(unicode(basecap - val)) for (key, datum) in tot['Stats'].iteritems(): ### XXX fix it if key == "Acuity": continue val = datum['TotalBonus'] if key == "% Power Pool": key = "PowerPool" if not self.capDistance: if datum['TotalCapBonus'] > 0: self.StatCap[key].setText( \ '('+str(datum['TotalCapBonus'])+')') else: self.StatCap[key].setText('-') self.StatValue[key].setText(unicode(val)) else: basecap = datum['BaseCap'] if datum['TotalCapBonus'] > 0: addcap = datum['BaseCapToCapBonus'] capmod = datum['TotalCapBonus'] capcap = addcap - capmod if capmod > addcap: capmod = addcap self.StatCap[key].setText('('+unicode(int(capcap))+')') else: capmod = 0 self.StatValue[key].setText(unicode(int(basecap + capmod) -val)) for skillkey, suffix, lookup in ( ('Skills', '', 'Skill'), ('Focus', ' Focus', 'Focus'), ('OtherBonuses', '', 'Bonus'), ('PvEBonuses', ' (PvE)', 'Bonus')): skills = tot[skillkey].keys() skills.sort() for skill in skills: amounts = tot[skillkey][skill] if self.capDistance: amount = amounts['BaseCap'] - amounts['TotalBonus'] else: amount = amounts['TotalBonus'] self.insertSkill(amount, skill + suffix, lookup) self.TotalCost.setText(SC.formatCost(tot['Cost'])) self.TotalPrice.setText(SC.formatCost(tot['Price'])) self.TotalUtility.setText('%3.1f' % tot['Utility']) self.errorsmenuid.setEnabled(errorcount > 0) | 04af27d9cc8801888e9574a199d826ec7ed0e2da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6671/04af27d9cc8801888e9574a199d826ec7ed0e2da/ScWindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4604,
12,
2890,
4672,
309,
365,
18,
82,
23735,
71,
30,
327,
555,
1883,
273,
374,
365,
18,
4324,
5414,
18,
8507,
1435,
1149,
2815,
955,
273,
609,
12,
2890,
18,
2156,
2355,
18,
955,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4604,
12,
2890,
4672,
309,
365,
18,
82,
23735,
71,
30,
327,
555,
1883,
273,
374,
365,
18,
4324,
5414,
18,
8507,
1435,
1149,
2815,
955,
273,
609,
12,
2890,
18,
2156,
2355,
18,
955,
10... | |
fd, name = tempfile.mkstemp() fileobj = os.fdopen(fd, "w+b") try: | with TemporaryFile("w+") as fileobj: | def test_read_long_with_rest_no_fieldnames(self): fd, name = tempfile.mkstemp() fileobj = os.fdopen(fd, "w+b") try: fileobj.write("f1,f2\r\n1,2,abc,4,5,6\r\n") fileobj.seek(0) reader = csv.DictReader(fileobj, restkey="_rest") self.assertEqual(next(reader), {"f1": '1', "f2": '2', "_rest": ["abc", "4", "5", "6"]}) finally: fileobj.close() os.unlink(name) | 2837440cd7e82f53ee7e194e97a8b6ffcc4e97cf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/2837440cd7e82f53ee7e194e97a8b6ffcc4e97cf/test_csv.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
896,
67,
5748,
67,
1918,
67,
8792,
67,
2135,
67,
1518,
1973,
12,
2890,
4672,
598,
22791,
812,
2932,
91,
15,
7923,
487,
17041,
30,
17041,
18,
2626,
2932,
74,
21,
16,
74,
22,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
896,
67,
5748,
67,
1918,
67,
8792,
67,
2135,
67,
1518,
1973,
12,
2890,
4672,
598,
22791,
812,
2932,
91,
15,
7923,
487,
17041,
30,
17041,
18,
2626,
2932,
74,
21,
16,
74,
22,... |
mapper_args['inherits'] = cls._decl_class_registry.get(c.__name__, None) | mapper_args['inherits'] = cls._decl_class_registry.get( c.__name__, None) | def _as_declarative(cls, classname, dict_): # dict_ will be a dictproxy, which we can't write to, and we need to! dict_ = dict(dict_) column_copies = {} potential_columns = {} mapper_args = {} table_args = inherited_table_args = None tablename = None parent_columns = () for base in cls.__mro__: if _is_mapped_class(base): parent_columns = base.__table__.c.keys() else: for name,obj in vars(base).items(): if name == '__mapper_args__': if not mapper_args: mapper_args = cls.__mapper_args__ elif name == '__tablename__': if not tablename: tablename = cls.__tablename__ elif name == '__table_args__': if not table_args: table_args = cls.__table_args__ if base is not cls: inherited_table_args = True elif base is not cls: # we're a mixin. if isinstance(obj, Column): if obj.foreign_keys: raise exceptions.InvalidRequestError( "Columns with foreign keys to other columns " "must be declared as @classproperty callables " "on declarative mixin classes. ") if name not in dict_ and not ( '__table__' in dict_ and name in dict_['__table__'].c ): potential_columns[name] = \ column_copies[obj] = \ obj.copy() column_copies[obj]._creation_order = \ obj._creation_order elif isinstance(obj, MapperProperty): raise exceptions.InvalidRequestError( "Mapper properties (i.e. deferred," "column_property(), relationship(), etc.) must " "be declared as @classproperty callables " "on declarative mixin classes.") elif isinstance(obj, util.classproperty): dict_[name] = ret = \ column_copies[obj] = getattr(cls, name) if isinstance(ret, (Column, MapperProperty)) and \ ret.doc is None: ret.doc = obj.__doc__ # apply inherited columns as we should for k, v in potential_columns.items(): if tablename or k not in parent_columns: dict_[k] = v if inherited_table_args and not tablename: table_args = None # make sure that column copies are used rather # than the original columns from any mixins for k, v in mapper_args.iteritems(): mapper_args[k] = column_copies.get(v,v) cls._decl_class_registry[classname] = cls our_stuff = util.OrderedDict() for k in dict_: value = dict_[k] if (isinstance(value, tuple) and len(value) == 1 and isinstance(value[0], (Column, MapperProperty))): util.warn("Ignoring declarative-like tuple value of attribute " "%s: possibly a copy-and-paste error with a comma " "left at the end of the line?" % k) continue if not isinstance(value, (Column, MapperProperty)): continue prop = _deferred_relationship(cls, value) our_stuff[k] = prop # set up attributes in the order they were created our_stuff.sort(key=lambda key: our_stuff[key]._creation_order) # extract columns from the class dict cols = [] for key, c in our_stuff.iteritems(): if isinstance(c, ColumnProperty): for col in c.columns: if isinstance(col, Column) and col.table is None: _undefer_column_name(key, col) cols.append(col) elif isinstance(c, Column): _undefer_column_name(key, c) cols.append(c) # if the column is the same name as the key, # remove it from the explicit properties dict. # the normal rules for assigning column-based properties # will take over, including precedence of columns # in multi-column ColumnProperties. if key == c.key: del our_stuff[key] table = None if '__table__' not in dict_: if tablename is not None: if isinstance(table_args, dict): args, table_kw = (), table_args elif isinstance(table_args, tuple): args = table_args[0:-1] table_kw = table_args[-1] if len(table_args) < 2 or not isinstance(table_kw, dict): raise exceptions.ArgumentError( "Tuple form of __table_args__ is " "(arg1, arg2, arg3, ..., {'kw1':val1, 'kw2':val2, ...})" ) else: args, table_kw = (), {} autoload = dict_.get('__autoload__') if autoload: table_kw['autoload'] = True cls.__table__ = table = Table(tablename, cls.metadata, *(tuple(cols) + tuple(args)), **table_kw) else: table = cls.__table__ if cols: for c in cols: if not table.c.contains_column(c): raise exceptions.ArgumentError( "Can't add additional column %r when specifying __table__" % key ) if 'inherits' not in mapper_args: for c in cls.__bases__: if _is_mapped_class(c): mapper_args['inherits'] = cls._decl_class_registry.get(c.__name__, None) break if hasattr(cls, '__mapper_cls__'): mapper_cls = util.unbound_method_to_callable(cls.__mapper_cls__) else: mapper_cls = mapper if table is None and 'inherits' not in mapper_args: raise exceptions.InvalidRequestError( "Class %r does not have a __table__ or __tablename__ " "specified and does not inherit from an existing table-mapped class." % cls ) elif 'inherits' in mapper_args and not mapper_args.get('concrete', False): inherited_mapper = class_mapper(mapper_args['inherits'], compile=False) inherited_table = inherited_mapper.local_table if 'inherit_condition' not in mapper_args and table is not None: # figure out the inherit condition with relaxed rules # about nonexistent tables, to allow for ForeignKeys to # not-yet-defined tables (since we know for sure that our # parent table is defined within the same MetaData) mapper_args['inherit_condition'] = sql_util.join_condition( mapper_args['inherits'].__table__, table, ignore_nonexistent_tables=True) if table is None: # single table inheritance. # ensure no table args if table_args: raise exceptions.ArgumentError( "Can't place __table_args__ on an inherited class with no table." ) # add any columns declared here to the inherited table. for c in cols: if c.primary_key: raise exceptions.ArgumentError( "Can't place primary key columns on an inherited class with no table." ) if c.name in inherited_table.c: raise exceptions.ArgumentError( "Column '%s' on class %s conflicts with existing column '%s'" % (c, cls, inherited_table.c[c.name]) ) inherited_table.append_column(c) # single or joined inheritance # exclude any cols on the inherited table which are not mapped on the # parent class, to avoid # mapping columns specific to sibling/nephew classes inherited_mapper = class_mapper(mapper_args['inherits'], compile=False) inherited_table = inherited_mapper.local_table if 'exclude_properties' not in mapper_args: mapper_args['exclude_properties'] = exclude_properties = \ set([c.key for c in inherited_table.c if c not in inherited_mapper._columntoproperty]) exclude_properties.difference_update([c.key for c in cols]) cls.__mapper__ = mapper_cls(cls, table, properties=our_stuff, **mapper_args) | 47663a62287b4563a15dc08b4942a49616f9f1df /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1074/47663a62287b4563a15dc08b4942a49616f9f1df/declarative.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
345,
67,
8840,
297,
1535,
12,
6429,
16,
7479,
16,
2065,
67,
4672,
225,
468,
2065,
67,
903,
506,
279,
2065,
5656,
16,
1492,
732,
848,
1404,
1045,
358,
16,
471,
732,
1608,
358,
5,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
345,
67,
8840,
297,
1535,
12,
6429,
16,
7479,
16,
2065,
67,
4672,
225,
468,
2065,
67,
903,
506,
279,
2065,
5656,
16,
1492,
732,
848,
1404,
1045,
358,
16,
471,
732,
1608,
358,
5,... |
from ctypes import c_wchar, c_wchar_p | from ctypes import c_wchar_p | def test_cw_strings(self): from ctypes import byref, sizeof try: from ctypes import c_wchar, c_wchar_p except ImportError: | a4d54cec2e4dcc638a6091a8ca22e15b91f7466a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/a4d54cec2e4dcc638a6091a8ca22e15b91f7466a/test_parameters.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
71,
91,
67,
10219,
12,
2890,
4672,
628,
6983,
1930,
12725,
16,
13726,
775,
30,
628,
6983,
1930,
276,
67,
91,
3001,
67,
84,
1335,
11308,
30,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
71,
91,
67,
10219,
12,
2890,
4672,
628,
6983,
1930,
12725,
16,
13726,
775,
30,
628,
6983,
1930,
276,
67,
91,
3001,
67,
84,
1335,
11308,
30,
2,
-100,
-100,
-100,
-100,
-100,
... |
return section in self.sections() | return section in self.__sections | def has_section(self, section): """Indicate whether the named section is present in the configuration. | c2ff9051d2dace414d5ec928fa3e41edd9297992 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c2ff9051d2dace414d5ec928fa3e41edd9297992/ConfigParser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
711,
67,
3464,
12,
2890,
16,
2442,
4672,
3536,
3866,
2659,
2856,
326,
4141,
2442,
353,
3430,
316,
326,
1664,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
711,
67,
3464,
12,
2890,
16,
2442,
4672,
3536,
3866,
2659,
2856,
326,
4141,
2442,
353,
3430,
316,
326,
1664,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
return "".join(map(lambda s: (s <= "~" and s) or "_", filename)) | return u"".join(map(lambda s: (s <= "~" and s) or u"_", filename)) | def filter(self, original, filename): return "".join(map(lambda s: (s <= "~" and s) or "_", filename)) | 91ed10c3a18de5891a4bf875594b0fd26e3ac6c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/91ed10c3a18de5891a4bf875594b0fd26e3ac6c6/renamefiles.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1034,
12,
2890,
16,
2282,
16,
1544,
4672,
327,
1408,
18,
5701,
12,
1458,
12,
14661,
272,
30,
261,
87,
1648,
31964,
471,
272,
13,
578,
4192,
3113,
1544,
3719,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1034,
12,
2890,
16,
2282,
16,
1544,
4672,
327,
1408,
18,
5701,
12,
1458,
12,
14661,
272,
30,
261,
87,
1648,
31964,
471,
272,
13,
578,
4192,
3113,
1544,
3719,
2,
-100,
-100,
-100,
-100,... |
enz_complex_path = self.enzyme.path + '/enz_cplx' | self.enz_complex_table = None self.enz_table = None enz_complex_path = self.enzyme.path + '/' + self.enzyme.name + '_cplx' | def __init__(self, mode=0): self.context = moose.PyMooseBase.getContext() self.kin_compt = moose.KinCompt('mm') self.enz_mol = moose.Molecule('enzMol', self.kin_compt) self.enzyme = moose.Enzyme('enzyme', self.enz_mol) self.substrate = moose.Molecule('substrate', self.kin_compt) self.product = moose.Molecule('product', self.kin_compt) self.kin_compt.volume = 1.0 self.substrate.concInit = 1.0 self.product.concInit = 0.0 self.enz_mol.concInit = 1.0 self.enzyme.k1 = 0.1 self.enzyme.k2 = 0.4 self.enzyme.k3 = 0.1 self.enzyme.mode = mode print 'Set Enzyme.mode =', self.enzyme.mode self.enz_complex = None enz_complex_path = self.enzyme.path + '/enz_cplx' if self.context.exists(enz_complex_path): self.enz_complex = moose.Molecule(enz_complex_path) print 'Found enzyme-substrate-complex at', enz_complex_path else: print 'No enzyme-substrate-complex at', enz_complex_path self.enzyme.connect('sub', self.substrate, 'reac') self.enzyme.connect('prd', self.product, 'prd') self.enz_mol.connect('reac', self.enzyme, 'enz') self.data = moose.Neutral('/data') self.sub_conc_table = moose.Table('sub_conc_table', self.data) self.prd_conc_table = moose.Table('prd_conc_table', self.data) self.sub_conc_table.stepMode = 3 self.prd_conc_table.stepMode = 3 self.sub_conc_table.connect('inputRequest', self.substrate, 'conc') self.prd_conc_table.connect('inputRequest', self.product, 'conc') self.dt = 1.0 self.simtime = 1000.0 | 281cd287c37903cefcbd750d106e0534d7d096cd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2961/281cd287c37903cefcbd750d106e0534d7d096cd/simple.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1965,
33,
20,
4672,
365,
18,
2472,
273,
7344,
2584,
18,
9413,
16727,
2584,
2171,
18,
29120,
1435,
365,
18,
15984,
67,
832,
337,
273,
7344,
2584,
18,
47,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1965,
33,
20,
4672,
365,
18,
2472,
273,
7344,
2584,
18,
9413,
16727,
2584,
2171,
18,
29120,
1435,
365,
18,
15984,
67,
832,
337,
273,
7344,
2584,
18,
47,
... |
spec_file.append('Source0: %{name}-%{version}.tar.bz2') | spec_file.append('Source0: %{name}-%{unmangled_version}.tar.bz2') | def _make_spec_file(self): """Generate the text of an RPM spec file and return it as a list of strings (one per line). """ # definitions and headers spec_file = [ '%define name ' + self.distribution.get_name(), '%define version ' + self.distribution.get_version().replace('-','_'), '%define release ' + self.release.replace('-','_'), '', 'Summary: ' + self.distribution.get_description(), ] | 962e4317bc925d284d960e04ef304586cabaf479 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/962e4317bc925d284d960e04ef304586cabaf479/bdist_rpm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6540,
67,
2793,
67,
768,
12,
2890,
4672,
3536,
4625,
326,
977,
434,
392,
534,
12728,
857,
585,
471,
327,
518,
487,
279,
666,
434,
2064,
261,
476,
1534,
980,
2934,
3536,
468,
6377,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6540,
67,
2793,
67,
768,
12,
2890,
4672,
3536,
4625,
326,
977,
434,
392,
534,
12728,
857,
585,
471,
327,
518,
487,
279,
666,
434,
2064,
261,
476,
1534,
980,
2934,
3536,
468,
6377,... |
if (Name, Guid) in Pcds: PcdItemTypeUsed = Pcds[(Name, Guid)].Type DefaultValue = Pcds[(Name, Guid)].DefaultValue | if (Name, Guid, Type) in Pcds: Pcd = Pcds[(Name, Guid, Type)] PcdItemTypeUsed = Pcd.Type DefaultValue = Pcd.DefaultValue | def ShowUnFoundPcds(self): if self.UnFoundPcdInDsc != {}: WrnMessage = '**** WARNING ****\n' WrnMessage += 'The following Pcds were not defined in the DSC file: %s\n' % self.DscFileName WrnMessage += 'The default values were obtained from the DEC file that declares the PCD and the PCD default value\n' for (Guid, Name, Arch) in self.UnFoundPcdInDsc: Dec = self.UnFoundPcdInDsc[(Guid, Name, Arch)] Pcds = self.Build[Arch].PackageDatabase[Dec].Pcds if (Name, Guid) in Pcds: PcdItemTypeUsed = Pcds[(Name, Guid)].Type DefaultValue = Pcds[(Name, Guid)].DefaultValue WrnMessage += '%s.%s: Defined in file %s, PcdItemType is Pcds%s, DefaultValue is %s\n' % (Guid, Name, Dec, PcdItemTypeUsed, DefaultValue) EdkLogger.info(WrnMessage) | 53049dd912b7d991e8e60ace3da08d8df468e046 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/914/53049dd912b7d991e8e60ace3da08d8df468e046/EdkIIWorkspaceBuild.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9674,
984,
2043,
28136,
2377,
12,
2890,
4672,
309,
365,
18,
984,
2043,
52,
4315,
382,
40,
1017,
480,
16648,
678,
27639,
1079,
273,
296,
1007,
9744,
18852,
12174,
82,
11,
678,
27639,
1079... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9674,
984,
2043,
28136,
2377,
12,
2890,
4672,
309,
365,
18,
984,
2043,
52,
4315,
382,
40,
1017,
480,
16648,
678,
27639,
1079,
273,
296,
1007,
9744,
18852,
12174,
82,
11,
678,
27639,
1079... |
logf = '/tmp/etl_log.out' | logf = os.path.join(tempfile.gettempdir(), "etl_log.out") | def init_logger(): logger = logging.getLogger() # create a format for log messages and dates formatter = logging.Formatter('[%(asctime)s] %(levelname)s: %(name)s: %(message)s', '%a %b %d %Y %H:%M:%S') logf = '/tmp/etl_log.out' handler = logging.handlers.TimedRotatingFileHandler(logf, 'D', 1, 30) # tell the handler to use this format handler.setFormatter(formatter) # add the handler to the root logger logger.addHandler(handler) logger.setLevel(logging.INFO) | 9234aad030b389c02680fad380d013e29a88c0aa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/9234aad030b389c02680fad380d013e29a88c0aa/logger.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
67,
4901,
13332,
1194,
273,
2907,
18,
588,
3328,
1435,
468,
752,
279,
740,
364,
613,
2743,
471,
7811,
4453,
273,
2907,
18,
5074,
2668,
14451,
12,
345,
21261,
13,
87,
65,
8975,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
67,
4901,
13332,
1194,
273,
2907,
18,
588,
3328,
1435,
468,
752,
279,
740,
364,
613,
2743,
471,
7811,
4453,
273,
2907,
18,
5074,
2668,
14451,
12,
345,
21261,
13,
87,
65,
8975,
31... |
args["width"] = args["width"].strip('"') if not args["width"].endswith("%"): self.formatter._emitComment("Width %s not supported" % args["width"]) | argsdict["width"] = argsdict["width"].strip('"') if not argsdict["width"].endswith("%"): self.formatter._emitComment("Width %s not supported" % argsdict["width"]) | def _handleColWidth(self, args): if not args.has_key("width"): return args["width"] = args["width"].strip('"') if not args["width"].endswith("%"): self.formatter._emitComment("Width %s not supported" % args["width"]) return | 1433435f169a98600ed153334470f8365d04459c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/1433435f169a98600ed153334470f8365d04459c/text_docbook.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4110,
914,
2384,
12,
2890,
16,
833,
4672,
309,
486,
833,
18,
5332,
67,
856,
2932,
2819,
6,
4672,
327,
833,
1576,
9614,
2819,
11929,
273,
833,
1576,
9614,
2819,
6,
8009,
6406,
2668... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4110,
914,
2384,
12,
2890,
16,
833,
4672,
309,
486,
833,
18,
5332,
67,
856,
2932,
2819,
6,
4672,
327,
833,
1576,
9614,
2819,
11929,
273,
833,
1576,
9614,
2819,
6,
8009,
6406,
2668... |
r.reverse() | for i in range(len2 - 1, -1, -1): items[start+i*step] = sequence2[i] return space.w_None | def _setitem_slice_helper(space, w_list, w_slice, sequence2, len2): start, stop, step, slicelength = slicetype.indices4(space, w_slice, w_list.ob_size) assert slicelength >= 0 if step == 1: # Support list resizing for non-extended slices oldsize = w_list.ob_size delta = len2 - slicelength if delta >= 0: newsize = oldsize + delta _list_resize(w_list, newsize) w_list.ob_size = newsize items = w_list.ob_item for i in range(newsize-1, start+len2-1, -1): items[i] = items[i-delta] else: # shrinking requires the careful memory management of _del_slice() _del_slice(w_list, start, start-delta) elif len2 != slicelength: # No resize for extended slices raise OperationError(space.w_ValueError, space.wrap("attempt to " "assign sequence of size %d to extended slice of size %d" % (len2,slicelength))) items = w_list.ob_item if sequence2 is items: if step > 0: # Always copy starting from the right to avoid # having to make a shallow copy in the case where # the source and destination lists are the same list. r.reverse() else: # Make a shallow copy to more easily handle the reversal case sequence2 = list(sequence2) for i in range(len2): items[start+i*step] = sequence2[i] return space.w_None | b2d84bf888145c79e4006202011ba259e70c9552 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/b2d84bf888145c79e4006202011ba259e70c9552/listobject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
542,
1726,
67,
6665,
67,
4759,
12,
2981,
16,
341,
67,
1098,
16,
341,
67,
6665,
16,
3102,
22,
16,
562,
22,
4672,
787,
16,
2132,
16,
2235,
16,
2020,
335,
292,
1288,
273,
2020,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
542,
1726,
67,
6665,
67,
4759,
12,
2981,
16,
341,
67,
1098,
16,
341,
67,
6665,
16,
3102,
22,
16,
562,
22,
4672,
787,
16,
2132,
16,
2235,
16,
2020,
335,
292,
1288,
273,
2020,
3... |
forms.append(form) | forms.append(form) | def contents(self): # A call to 'switch_on' is required before we can render z3c.forms. z2.switch_on(self, request_layer=collective.singing.interfaces.IFormLayer) | 6a225131d5814f4fcaf8f720f43c7e7816ee8a6b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9843/6a225131d5814f4fcaf8f720f43c7e7816ee8a6b/channel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2939,
12,
2890,
4672,
468,
432,
745,
358,
296,
9610,
67,
265,
11,
353,
1931,
1865,
732,
848,
1743,
998,
23,
71,
18,
9741,
18,
998,
22,
18,
9610,
67,
265,
12,
2890,
16,
590,
67,
636... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2939,
12,
2890,
4672,
468,
432,
745,
358,
296,
9610,
67,
265,
11,
353,
1931,
1865,
732,
848,
1743,
998,
23,
71,
18,
9741,
18,
998,
22,
18,
9610,
67,
265,
12,
2890,
16,
590,
67,
636... |
self._signalCombo(True) | self.disableSignal(False) | def loadMacros(self, conn, signal=False): """ Load all macros for a connection. | 201b1c9e4adf26ba529bd9bf36b9e00c8fe2621e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8560/201b1c9e4adf26ba529bd9bf36b9e00c8fe2621e/gui_option.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
9990,
6973,
12,
2890,
16,
1487,
16,
4277,
33,
8381,
4672,
3536,
4444,
777,
24302,
364,
279,
1459,
18,
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,
1262,
9990,
6973,
12,
2890,
16,
1487,
16,
4277,
33,
8381,
4672,
3536,
4444,
777,
24302,
364,
279,
1459,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
stringtable_offset = self.dword_align( | new_stringtable_offset = self.dword_align( | def parse_version_information(self, version_struct): """Parse version information structure. The date will be made available in three attributes of the PE object. VS_VERSIONINFO will contain the first three fields of the main structure: 'Length', 'ValueLength', and 'Type' VS_FIXEDFILEINFO will hold the rest of the fields, accessible as sub-attributes: 'Signature', 'StrucVersion', 'FileVersionMS', 'FileVersionLS', 'ProductVersionMS', 'ProductVersionLS', 'FileFlagsMask', 'FileFlags', 'FileOS', 'FileType', 'FileSubtype', 'FileDateMS', 'FileDateLS' FileInfo is a list of all StringFileInfo and VarFileInfo structures. StringFileInfo structures will have a list as an attribute named 'StringTable' containing all the StringTable structures. Each of those structures contains a dictionary 'entries' with all the key/value version information string pairs. VarFileInfo structures will have a list as an attribute named 'Var' containing all Var structures. Each Var structure will have a dictionary as an attribute named 'entry' which will contain the name and value of the Var. """ # Retrieve the data for the version info resource # start_offset = self.get_offset_from_rva( version_struct.OffsetToData ) raw_data = self.__data__[ start_offset : start_offset+version_struct.Size ] # Map the main structure and the subsequent string # versioninfo_struct = self.__unpack_data__( self.__VS_VERSIONINFO_format__, raw_data, file_offset = start_offset ) if versioninfo_struct is None: return ustr_offset = version_struct.OffsetToData + versioninfo_struct.sizeof() try: versioninfo_string = self.get_string_u_at_rva( ustr_offset ) except PEFormatError, excp: self.__warnings.append( 'Error parsing the version information, ' + 'attempting to read VS_VERSION_INFO string. Can\'t ' + 'read unicode string at offset 0x%x' % ( ustr_offset ) ) versioninfo_string = None # If the structure does not contain the expected name, it's assumed to be invalid # if versioninfo_string != u'VS_VERSION_INFO': self.__warnings.append('Invalid VS_VERSION_INFO block') return # Set the PE object's VS_VERSIONINFO to this one # self.VS_VERSIONINFO = versioninfo_struct # The the Key attribute to point to the unicode string identifying the structure # self.VS_VERSIONINFO.Key = versioninfo_string # Process the fixed version information, get the offset and structure # fixedfileinfo_offset = self.dword_align( versioninfo_struct.sizeof() + 2 * (len(versioninfo_string) + 1), version_struct.OffsetToData) fixedfileinfo_struct = self.__unpack_data__( self.__VS_FIXEDFILEINFO_format__, raw_data[fixedfileinfo_offset:], file_offset = start_offset+fixedfileinfo_offset ) if not fixedfileinfo_struct: return # Set the PE object's VS_FIXEDFILEINFO to this one # self.VS_FIXEDFILEINFO = fixedfileinfo_struct # Start parsing all the StringFileInfo and VarFileInfo structures # # Get the first one # stringfileinfo_offset = self.dword_align( fixedfileinfo_offset + fixedfileinfo_struct.sizeof(), version_struct.OffsetToData) original_stringfileinfo_offset = stringfileinfo_offset # Set the PE object's attribute that will contain them all. # self.FileInfo = list() while True: # Process the StringFileInfo/VarFileInfo struct # stringfileinfo_struct = self.__unpack_data__( self.__StringFileInfo_format__, raw_data[stringfileinfo_offset:], file_offset = start_offset+stringfileinfo_offset ) if stringfileinfo_struct is None: self.__warnings.append( 'Error parsing StringFileInfo/VarFileInfo struct' ) return None # Get the subsequent string defining the structure. # ustr_offset = ( version_struct.OffsetToData + stringfileinfo_offset + versioninfo_struct.sizeof() ) try: stringfileinfo_string = self.get_string_u_at_rva( ustr_offset ) except PEFormatError, excp: self.__warnings.append( 'Error parsing the version information, ' + 'attempting to read StringFileInfo string. Can\'t ' + 'read unicode string at offset 0x%x' % ( ustr_offset ) ) break # Set such string as the Key attribute # stringfileinfo_struct.Key = stringfileinfo_string # Append the structure to the PE object's list # self.FileInfo.append(stringfileinfo_struct) # Parse a StringFileInfo entry # if stringfileinfo_string.startswith(u'StringFileInfo'): if stringfileinfo_struct.Type == 1 and stringfileinfo_struct.ValueLength == 0: stringtable_offset = self.dword_align( stringfileinfo_offset + stringfileinfo_struct.sizeof() + 2*(len(stringfileinfo_string)+1), version_struct.OffsetToData) stringfileinfo_struct.StringTable = list() # Process the String Table entries # while True: stringtable_struct = self.__unpack_data__( self.__StringTable_format__, raw_data[stringtable_offset:], file_offset = start_offset+stringtable_offset ) if not stringtable_struct: break ustr_offset = ( version_struct.OffsetToData + stringtable_offset + stringtable_struct.sizeof() ) try: stringtable_string = self.get_string_u_at_rva( ustr_offset ) except PEFormatError, excp: self.__warnings.append( 'Error parsing the version information, ' + 'attempting to read StringTable string. Can\'t ' + 'read unicode string at offset 0x%x' % ( ustr_offset ) ) break stringtable_struct.LangID = stringtable_string stringtable_struct.entries = dict() stringtable_struct.entries_offsets = dict() stringtable_struct.entries_lengths = dict() stringfileinfo_struct.StringTable.append(stringtable_struct) entry_offset = self.dword_align( stringtable_offset + stringtable_struct.sizeof() + 2*(len(stringtable_string)+1), version_struct.OffsetToData) # Process all entries in the string table # while entry_offset < stringtable_offset + stringtable_struct.Length: string_struct = self.__unpack_data__( self.__String_format__, raw_data[entry_offset:], file_offset = start_offset+entry_offset ) if not string_struct: break ustr_offset = ( version_struct.OffsetToData + entry_offset + string_struct.sizeof() ) try: key = self.get_string_u_at_rva( ustr_offset ) key_offset = self.get_offset_from_rva( ustr_offset ) except PEFormatError, excp: self.__warnings.append( 'Error parsing the version information, ' + 'attempting to read StringTable Key string. Can\'t ' + 'read unicode string at offset 0x%x' % ( ustr_offset ) ) break value_offset = self.dword_align( 2*(len(key)+1) + entry_offset + string_struct.sizeof(), version_struct.OffsetToData) ustr_offset = version_struct.OffsetToData + value_offset try: value = self.get_string_u_at_rva( ustr_offset, max_length = string_struct.ValueLength ) value_offset = self.get_offset_from_rva( ustr_offset ) except PEFormatError, excp: self.__warnings.append( 'Error parsing the version information, ' + 'attempting to read StringTable Value string. ' + 'Can\'t read unicode string at offset 0x%x' % ( ustr_offset ) ) break if string_struct.Length == 0: entry_offset = stringtable_offset + stringtable_struct.Length else: entry_offset = self.dword_align( string_struct.Length+entry_offset, version_struct.OffsetToData) key_as_char = [] for c in key: if ord(c)>128: key_as_char.append('\\x%02x' %ord(c)) else: key_as_char.append(c) key_as_char = ''.join(key_as_char) setattr(stringtable_struct, key_as_char, value) stringtable_struct.entries[key] = value stringtable_struct.entries_offsets[key] = (key_offset, value_offset) stringtable_struct.entries_lengths[key] = (len(key), len(value)) stringtable_offset = self.dword_align( stringtable_struct.Length + stringtable_offset, version_struct.OffsetToData) if stringtable_offset >= stringfileinfo_struct.Length: break # Parse a VarFileInfo entry # elif stringfileinfo_string.startswith( u'VarFileInfo' ): varfileinfo_struct = stringfileinfo_struct varfileinfo_struct.name = 'VarFileInfo' if varfileinfo_struct.Type == 1 and varfileinfo_struct.ValueLength == 0: var_offset = self.dword_align( stringfileinfo_offset + varfileinfo_struct.sizeof() + 2*(len(stringfileinfo_string)+1), version_struct.OffsetToData) varfileinfo_struct.Var = list() # Process all entries # while True: var_struct = self.__unpack_data__( self.__Var_format__, raw_data[var_offset:], file_offset = start_offset+var_offset ) if not var_struct: break ustr_offset = ( version_struct.OffsetToData + var_offset + var_struct.sizeof() ) try: var_string = self.get_string_u_at_rva( ustr_offset ) except PEFormatError, excp: self.__warnings.append( 'Error parsing the version information, ' + 'attempting to read VarFileInfo Var string. ' + 'Can\'t read unicode string at offset 0x%x' % (ustr_offset)) break varfileinfo_struct.Var.append(var_struct) varword_offset = self.dword_align( 2*(len(var_string)+1) + var_offset + var_struct.sizeof(), version_struct.OffsetToData) orig_varword_offset = varword_offset while varword_offset < orig_varword_offset + var_struct.ValueLength: word1 = self.get_word_from_data( raw_data[varword_offset:varword_offset+2], 0) word2 = self.get_word_from_data( raw_data[varword_offset+2:varword_offset+4], 0) varword_offset += 4 if isinstance(word1, (int, long)) and isinstance(word1, (int, long)): var_struct.entry = {var_string: '0x%04x 0x%04x' % (word1, word2)} var_offset = self.dword_align( var_offset+var_struct.Length, version_struct.OffsetToData) if var_offset <= var_offset+var_struct.Length: break # Increment and align the offset # stringfileinfo_offset = self.dword_align( stringfileinfo_struct.Length+stringfileinfo_offset, version_struct.OffsetToData) # Check if all the StringFileInfo and VarFileInfo items have been processed # if stringfileinfo_struct.Length == 0 or stringfileinfo_offset >= versioninfo_struct.Length: break | a028c80f9c13f7c553ac4a9612d34ae8132a1d52 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4177/a028c80f9c13f7c553ac4a9612d34ae8132a1d52/pefile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
1589,
67,
13117,
12,
2890,
16,
1177,
67,
1697,
4672,
3536,
3201,
1177,
1779,
3695,
18,
225,
1021,
1509,
903,
506,
7165,
2319,
316,
8925,
1677,
434,
326,
16628,
733,
18,
225,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
1589,
67,
13117,
12,
2890,
16,
1177,
67,
1697,
4672,
3536,
3201,
1177,
1779,
3695,
18,
225,
1021,
1509,
903,
506,
7165,
2319,
316,
8925,
1677,
434,
326,
16628,
733,
18,
225,
... |
Q = (nlevels*nlevels*(labels_ab[equilabel]-1)+ nlevels*image_a[equilabel]+image_b[equilabel]) R = np.bincount(Q) if R.size != nobjects*nlevels*nlevels: S = np.zeros(nobjects*nlevels*nlevels-R.size) R = np.hstack((R, S)) P = R.reshape(nobjects, nlevels, nlevels) | Q = (nlevels*nlevels*(labels_ab[equilabel]-1)+ nlevels*image_a[equilabel]+image_b[equilabel]) R = np.bincount(Q) if R.size != nobjects*nlevels*nlevels: S = np.zeros(nobjects*nlevels*nlevels-R.size) R = np.hstack((R, S)) P = R.reshape(nobjects, nlevels, nlevels) | def cooccurrence(quantized_image, labels, scale=3): """Calculates co-occurrence matrices for all the objects in the image. Return an array P of shape (nobjects, nlevels, nlevels) such that P[o, :, :] is the cooccurence matrix for object o. quantized_image -- a numpy array of integer type labels -- a numpy array of integer type scale -- an integer For each object O, the cooccurrence matrix is defined as follows. Given a row number I in the matrix, let A be the set of pixels in O with gray level I, excluding pixels in the rightmost S columns of the image. Let B be the set of pixels in O that are S pixels to the right of a pixel in A. Row I of the cooccurence matrix is the gray-level histogram of the pixels in B. """ labels = labels.astype(int) nlevels = quantized_image.max() + 1 nobjects = labels.max() image_a = quantized_image[:, :-scale] image_b = quantized_image[:, scale:] labels_ab = labels[:, :-scale] equilabel = ((labels[:, :-scale] == labels[:, scale:]) & (labels[:,:-scale] > 0)) if np.any(equilabel): Q = (nlevels*nlevels*(labels_ab[equilabel]-1)+ nlevels*image_a[equilabel]+image_b[equilabel]) R = np.bincount(Q) if R.size != nobjects*nlevels*nlevels: S = np.zeros(nobjects*nlevels*nlevels-R.size) R = np.hstack((R, S)) P = R.reshape(nobjects, nlevels, nlevels) pixel_count = fix(scind.sum(equilabel, labels[:,:-scale], np.arange(nobjects)+1)) pixel_count = np.tile(pixel_count[:,np.newaxis,np.newaxis], (1,nlevels,nlevels)) return (P.astype(float) / pixel_count.astype(float), nlevels) else: return np.zeros((nobjects, nlevels, nlevels)), nlevels | d6ef99a0d20619fffb034a8c13e29246d416e615 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2600/d6ef99a0d20619fffb034a8c13e29246d416e615/haralick.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1825,
31177,
12,
17753,
1235,
67,
2730,
16,
3249,
16,
3159,
33,
23,
4672,
3536,
10587,
1825,
17,
31177,
16415,
364,
777,
326,
2184,
316,
326,
1316,
18,
225,
2000,
392,
526,
453,
434,
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,
1825,
31177,
12,
17753,
1235,
67,
2730,
16,
3249,
16,
3159,
33,
23,
4672,
3536,
10587,
1825,
17,
31177,
16415,
364,
777,
326,
2184,
316,
326,
1316,
18,
225,
2000,
392,
526,
453,
434,
2... |
externalIDs.append(taskDict['ExternalID']) gLogger.info("Found %d tasks for transformation" % len(externalIDs)) return S_OK(externalIDs) def __removeRequests(self,requestIDs): gLogger.error("Not removing requests but should do") return S_OK() def __removeWMSTasks(self,jobIDs): | externalIDs.append( taskDict['ExternalID'] ) gLogger.info( "Found %d tasks for transformation" % len( externalIDs ) ) return S_OK( externalIDs ) def __removeRequests( self, requestIDs ): gLogger.error( "Not removing requests but should do" ) return S_OK() def __removeWMSTasks( self, jobIDs ): | def __getTransformationExternalIDs(self, transID): res = self.transClient.getTransformationTasks(condDict={'TransformationID':transID}) if not res['OK']: gLogger.error("Failed to get externalIDs for transformation %d" % transID, res['Message']) return res externalIDs = [] for taskDict in res['Value']: externalIDs.append(taskDict['ExternalID']) gLogger.info("Found %d tasks for transformation" % len(externalIDs)) return S_OK(externalIDs) | c3853ad0438058db66814335a87076cdaecd2d33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/c3853ad0438058db66814335a87076cdaecd2d33/TransformationCleaningAgent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
15292,
6841,
5103,
12,
2890,
16,
906,
734,
4672,
400,
273,
365,
18,
2338,
1227,
18,
588,
15292,
6685,
12,
10013,
5014,
5899,
11,
15292,
734,
4278,
2338,
734,
6792,
309,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
15292,
6841,
5103,
12,
2890,
16,
906,
734,
4672,
400,
273,
365,
18,
2338,
1227,
18,
588,
15292,
6685,
12,
10013,
5014,
5899,
11,
15292,
734,
4278,
2338,
734,
6792,
309,
486,
... |
self.req.hdf.setValue('title', 'Create New Report') | if action == 'commit': self.req.hdf.setValue('title', 'Edit Report {%d} %s' % (id, row['title'])) else: self.req.hdf.setValue('title', 'Create New Report') | def render_report_editor(self, id, action='commit', copy=0): self.perm.assert_permission(perm.REPORT_MODIFY) cursor = self.db.cursor() | 5e8e0422246437cc2f84ac34bf4e22bc8067b18e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/5e8e0422246437cc2f84ac34bf4e22bc8067b18e/Report.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
6006,
67,
9177,
12,
2890,
16,
612,
16,
1301,
2218,
7371,
2187,
1610,
33,
20,
4672,
365,
18,
12160,
18,
11231,
67,
9827,
12,
12160,
18,
22710,
67,
6720,
12096,
13,
3347,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
6006,
67,
9177,
12,
2890,
16,
612,
16,
1301,
2218,
7371,
2187,
1610,
33,
20,
4672,
365,
18,
12160,
18,
11231,
67,
9827,
12,
12160,
18,
22710,
67,
6720,
12096,
13,
3347,
273,
... |
self.marks = 27 | self.marks = 22 | def __init__(self): RPMBaseCallback.__init__(self) self.lastmsg = None self.lastpackage = None # name of last package we looked at self.output = True # for a progress bar self.mark = "#" self.marks = 27 | e985627f074202e2f1a5bcd221079c16b288b13e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5445/e985627f074202e2f1a5bcd221079c16b288b13e/output.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
534,
12728,
2171,
2428,
16186,
2738,
972,
12,
2890,
13,
365,
18,
2722,
3576,
273,
599,
365,
18,
2722,
5610,
273,
599,
468,
508,
434,
1142,
2181,
732,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
534,
12728,
2171,
2428,
16186,
2738,
972,
12,
2890,
13,
365,
18,
2722,
3576,
273,
599,
365,
18,
2722,
5610,
273,
599,
468,
508,
434,
1142,
2181,
732,
2... |
new_commit_data = _coalesce_patches(trans, patches, msg) | new_commit_data = _coalesce_patches(trans, patches, msg, save_template) | def make_coalesced_patch(trans, new_commit_data): name = get_name(new_commit_data) trans.patches[name] = stack.repository.commit(new_commit_data) trans.unapplied.insert(0, name) | d568af721e596af12d0cde961da0030cbb43f3f0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12366/d568af721e596af12d0cde961da0030cbb43f3f0/coalesce.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
2894,
5408,
3263,
67,
2272,
12,
2338,
16,
394,
67,
7371,
67,
892,
4672,
508,
273,
336,
67,
529,
12,
2704,
67,
7371,
67,
892,
13,
906,
18,
30278,
63,
529,
65,
273,
2110,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2894,
5408,
3263,
67,
2272,
12,
2338,
16,
394,
67,
7371,
67,
892,
4672,
508,
273,
336,
67,
529,
12,
2704,
67,
7371,
67,
892,
13,
906,
18,
30278,
63,
529,
65,
273,
2110,
1... |
""" | """ | def setRenderWindowSize(self, size, taskwin): """ Created: 28.04.2005, KP Description: Set the render window size """ x, y = size #self.currentWindow.SetSize((size)) currx, curry = self.visWin.GetSize() self.visWin.origSize = (currx, curry) Logging.info("Current window size = ", currx, curry) diffx = currx - x diffy = curry - y Logging.info("Need to modify renderwindow size by ", diffx, ", ", diffy)#, kw = "visualizer") sx, sy = self.sidebarWin.GetSize() self.sidebarWin.origSize = (sx, sy) sx2, sy2 = taskwin.GetSize() d2 = sx2 - sx if sx2 < abs(diffx / 2): diffx -= sx sx2 = 0 else: d = diffx / 2 d -= (d2 / 2) sx2 += d diffx += -d taskwin.SetDefaultSize((sx2, sy2)) taskwin.parent.OnSize(None) if sx: sx += diffx self.sidebarWin.SetDefaultSize((sx, sy)) Logging.info("Size of siderbar window after modification = ", sx, sy) slx, sly = self.sliderWin.GetSize() self.sliderWin.origSize = (slx, sly) if diffy < 0 and abs(diffy) > abs(sly): Logging.info("Hiding toolbar to get more space in y - direction")#, kw = "visualizer") tx, ty = self.toolWin.GetSize() self.toolWin.origSize = (tx, ty) self.toolWin.SetDefaultSize((0, 0)) diffy += ty if diffy: Logging.info("I'm told to set renderwindow size to %d, \ %d with a %d modification of y - size." \ %(x, y, diffy))#, kw = "visualizer") if diffy < 0 and sly < diffy: Logging.info("Giving %d more to y - size is the best I can do" % sy)#, kw = "visualizer") sly = 0 else: sly += diffy Logging.info("Size of slider win after modification = ", sx, sy) self.sliderWin.SetDefaultSize((slx, sly)) #self.wxrenwin.SetSize((size)) #self.renwin.SetSize((size)) self.OnSize(None) self.parent.Layout() self.parent.Refresh() self.currentWindow.Update() self.Render() | 228d177ed04eda3e5752ade67b1e400d3b569646 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2877/228d177ed04eda3e5752ade67b1e400d3b569646/Visualizer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
3420,
3829,
1225,
12,
2890,
16,
963,
16,
1562,
8082,
4672,
3536,
12953,
30,
9131,
18,
3028,
18,
6976,
25,
16,
1475,
52,
6507,
30,
1000,
326,
1743,
2742,
963,
3536,
619,
16,
677,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
3420,
3829,
1225,
12,
2890,
16,
963,
16,
1562,
8082,
4672,
3536,
12953,
30,
9131,
18,
3028,
18,
6976,
25,
16,
1475,
52,
6507,
30,
1000,
326,
1743,
2742,
963,
3536,
619,
16,
677,
... |
out += """<br><span class="moreinfo"><a class="moreinfo" href="%s/search.py?id=%s">Detailed record</a></span>""" \ | out += """<br><span class="moreinfo"><a class="moreinfo" href="%s/search.py?recid=%s">Detailed record</a></span>""" \ | def print_record(recID, format='hb', ot='', decompress=zlib.decompress): "Prints record 'recID' formatted accoding to 'format'." out = "" # sanity check: if not record_exists(recID): return out # print record opening tags, if needed: if format == "marcxml" or format == "oai_dc": out += " <record>\n" out += " <header>\n" for id in get_fieldvalues(recID,oaiidfield): out += " <identifier>%s</identifier>\n" % id out += " <datestamp>%s</datestamp>\n" % get_modification_date(recID) out += " </header>\n" out += " <metadata>\n" if format.startswith("xm") or format == "marcxml": # look for detailed format existence: query = "SELECT value FROM bibfmt WHERE id_bibrec='%s' AND format='%s'" % (recID, format) res = run_sql(query, None, 1) if res: # record 'recID' is formatted in 'format', so print it out += "%s" % decompress(res[0][0]) else: # record 'recID' is not formatted in 'format' -- they are not in "bibfmt" table; so fetch all the data from "bibXXx" tables: if format == "marcxml": out += """ <record xmlns="http://www.loc.gov/MARC21/slim">\n""" out += " <controlfield tag=\"001\">%d</controlfield>\n" % int(recID) elif format.startswith("xm"): out += """ <record>\n""" out += " <controlfield tag=\"001\">%d</controlfield>\n" % int(recID) for digit1 in range(0,10): for digit2 in range(0,10): bx = "bib%d%dx" % (digit1, digit2) bibx = "bibrec_bib%d%dx" % (digit1, digit2) query = "SELECT b.tag,b.value,bb.field_number FROM %s AS b, %s AS bb "\ "WHERE bb.id_bibrec='%s' AND b.id=bb.id_bibxxx AND b.tag LIKE '%s%%' "\ "ORDER BY bb.field_number, b.tag ASC" % (bx, bibx, recID, str(digit1)+str(digit2)) if dbg: out += "<br>Debug: " + query res = run_sql(query) field_number_old = -999 field_old = "" for row in res: field, value, field_number = row[0], row[1], row[2] ind1, ind2 = field[3], field[4] if ind1 == "_": ind1 = "" if ind2 == "_": ind2 = "" # print field tag if field_number != field_number_old or field[:-1] != field_old[:-1]: if format.startswith("xm") or format == "marcxml": fieldid = encode_for_xml(field[0:3]) if field_number_old != -999: out += """ </datafield>\n""" out += """ <datafield tag="%s" ind1="%s" ind2="%s">\n""" % (encode_for_xml(field[0:3]), encode_for_xml(ind1), encode_for_xml(ind2)) field_number_old = field_number field_old = field # print subfield value if format.startswith("xm") or format == "marcxml": value = encode_for_xml(value) out += """ <subfield code="%s">%s</subfield>\n""" % (encode_for_xml(field[-1:]), value) # all fields/subfields printed in this run, so close the tag: if (format.startswith("xm") or format == "marcxml") and field_number_old != -999: out += """ </datafield>\n""" # we are at the end of printing the record: if format.startswith("xm") or format == "marcxml": out += " </record>\n" elif format == "xd" or format == "oai_dc": # XML Dublin Core format, possibly OAI -- select only some bibXXx fields: out += """ <dc xmlns="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/elements/1.1/ http://www.openarchives.org/OAI/1.1/dc.xsd">\n""" for f in get_fieldvalues(recID, "041__a"): out += " <language>%s</language>\n" % f for f in get_fieldvalues(recID, "100__a"): out += " <creator>%s</creator>\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "700__a"): out += " <creator>%s</creator>\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "245__a"): out += " <title>%s</title>\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "65017a"): out += " <subject>%s</subject>\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "8564_u"): out += " <identifier>%s</identifier>\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "520__a"): out += " <description>%s</description>\n" % encode_for_xml(f) out += " <date>%s</date>\n" % get_creation_date(recID) out += " </dc>\n" elif str(format[0:3]).isdigit(): # user has asked to print some fields only if format == "001": out += "<!--%s-begin-->%s<!--%s-end-->\n" % (format, recID, format) else: vals = get_fieldvalues(recID, format) for val in vals: out += "<!--%s-begin-->%s<!--%s-end-->\n" % (format, val, format) elif format.startswith('t'): ## user directly asked for some tags to be displayed only out += get_fieldvalues_alephseq_like(recID, ot) elif format == "hm": out += "<pre>" + get_fieldvalues_alephseq_like(recID, ot) + "</pre>" elif format.startswith("h") and ot: ## user directly asked for some tags to be displayed only out += "<pre>" + get_fieldvalues_alephseq_like(recID, ot) + "</pre>" elif format == "hd": # HTML detailed format # look for detailed format existence: query = "SELECT value FROM bibfmt WHERE id_bibrec='%s' AND format='%s'" % (recID, format) res = run_sql(query, None, 1) if res: # record 'recID' is formatted in 'format', so print it out += "%s" % decompress(res[0][0]) else: # record 'recID' is not formatted in 'format', so either call BibFormat on the fly or use default format # second, see if we are calling BibFormat on the fly: if cfg_call_bibformat: out += call_bibformat(recID) else: # okay, need to construct a simple "Detailed record" format of our own: out += "<p> " # secondly, title: titles = get_fieldvalues(recID, "245__a") for title in titles: out += "<p><p><center><big><strong>%s</strong></big></center>" % title # thirdly, authors: authors = get_fieldvalues(recID, "100__a") + get_fieldvalues(recID, "700__a") if authors: out += "<p><p><center>" for author in authors: out += """<a href="%s/search.py?p=%s&f=author">%s</a> ;""" % (weburl, urllib.quote(author), author) out += "</center>" # fourthly, date of creation: dates = get_fieldvalues(recID, "260__c") for date in dates: out += "<p><center><small>%s</small></center>" % date # fifthly, abstract: abstracts = get_fieldvalues(recID, "520__a") for abstract in abstracts: out += """<p style="margin-left: 15%%; width: 70%%"> <small><strong>Abstract:</strong> %s</small></p>""" % abstract # fifthly bis, keywords: keywords = get_fieldvalues(recID, "6531_a") if len(keywords): out += """<p style="margin-left: 15%; width: 70%"> <small><strong>Keyword(s):</strong></small>""" for keyword in keywords: out += """<small><a href="%s/search.py?p=%s&f=keyword">%s</a> ;</small> """ % (weburl, urllib.quote(keyword), keyword) # fifthly bis bis, published in: prs_p = get_fieldvalues(recID, "909C4p") prs_v = get_fieldvalues(recID, "909C4v") prs_y = get_fieldvalues(recID, "909C4y") prs_n = get_fieldvalues(recID, "909C4n") prs_c = get_fieldvalues(recID, "909C4c") for idx in range(0,len(prs_p)): out += """<p style="margin-left: 15%%; width: 70%%"> <small><strong>Publ. in:</strong> %s""" % prs_p[idx] if prs_v and prs_v[idx]: out += """<strong>%s</strong>""" % prs_v[idx] if prs_y and prs_y[idx]: out += """(%s)""" % prs_y[idx] if prs_n and prs_n[idx]: out += """, no.%s""" % prs_n[idx] if prs_c and prs_c[idx]: out += """, p.%s""" % prs_c[idx] out += """.</small>""" # sixthly, fulltext link: urls_z = get_fieldvalues(recID, "8564_z") urls_u = get_fieldvalues(recID, "8564_u") for idx in range(0,len(urls_u)): link_text = "URL" if urls_z[idx]: link_text = urls_z[idx] out += """<p style="margin-left: 15%%; width: 70%%"> <small><strong>%s:</strong> <a href="%s">%s</a></small>""" % (link_text, urls_u[idx], urls_u[idx]) # print some white space at the end: out += "<p><p>" elif format == "hb-fly": # HTML brief called on the fly; suitable for testing brief formats out += call_bibformat(recID, "BRIEF_HTML") out += """<br><span class="moreinfo"><a class="moreinfo" href="%s/search.py?id=%s">Detailed record</a></span>""" \ % (weburl, recID) elif format == "hd-ejournalsite": # HTML brief called on the fly; suitable for testing brief formats out += call_bibformat(recID, "EJOURNALSITE") out += """<br><span class="moreinfo"><a class="moreinfo" href="%s/search.py?id=%s">Detailed record</a></span>""" \ % (weburl, recID) else: # HTML brief format by default query = "SELECT value FROM bibfmt WHERE id_bibrec='%s' AND format='%s'" % (recID, format) res = run_sql(query) if res: # record 'recID' is formatted in 'format', so print it out += "%s" % decompress(res[0][0]) else: # record 'recID' does not exist in format 'format', so print some default format: # firstly, title: titles = get_fieldvalues(recID, "245__a") for title in titles: out += "<strong>%s</strong> " % title # secondly, authors: authors = get_fieldvalues(recID, "100__a") + get_fieldvalues(recID, "700__a") if authors: out += " / " for i in range (0,cfg_author_et_al_threshold): if i < len(authors): out += """<a href="%s/search.py?p=%s&f=author">%s</a> ;""" % (weburl, urllib.quote(authors[i]), authors[i]) if len(authors) > cfg_author_et_al_threshold: out += " <em>et al.</em>" # thirdly, date of creation: dates = get_fieldvalues(recID, "260__c") for date in dates: out += " %s." % date # thirdly bis, report numbers: rns = get_fieldvalues(recID, "037__a") for rn in rns: out += """ <small class="quicknote">[%s]</small>""" % rn rns = get_fieldvalues(recID, "088__a") for rn in rns: out += """ <small class="quicknote">[%s]</small>""" % rn # fourthly, beginning of abstract: abstracts = get_fieldvalues(recID, "520__a") for abstract in abstracts: out += "<br><small>%s [...]</small>" % abstract[:1+string.find(abstract, '.')] # fifthly, fulltext link: urls_z = get_fieldvalues(recID, "8564_z") urls_u = get_fieldvalues(recID, "8564_u") for idx in range(0,len(urls_u)): out += """<br><small class="note"><a class="note" href="%s">%s</a></small>""" % (urls_u[idx], urls_u[idx]) # at the end of HTML mode, print the "Detailed record" functionality: if cfg_use_aleph_sysnos: alephsysnos = get_fieldvalues(recID, "970__a") if len(alephsysnos)>0: alephsysno = alephsysnos[0] out += """<br><span class="moreinfo"><a class="moreinfo" href="%s/search.py?sysnb=%s">Detailed record</a></span>""" \ % (weburl, alephsysno) else: out += """<br><span class="moreinfo"><a class="moreinfo" href="%s/search.py?id=%s">Detailed record</a></span>""" \ % (weburl, recID) else: out += """<br><span class="moreinfo"><a class="moreinfo" href="%s/search.py?id=%s">Detailed record</a></span>""" \ % (weburl, recID) # ...and the "Mark record" functionality: #out += """<span class="moreinfo"> - <input name="recid" type="checkbox" value="%s"> Mark record</span>""" % recID # print record closing tags, if needed: if format == "marcxml" or format == "oai_dc": out += " </metadata>\n" out += " </record>\n" return out | c8bc8e9e8dcaad50892504a6b2ad935d0e8bb72d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/c8bc8e9e8dcaad50892504a6b2ad935d0e8bb72d/search_engine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
3366,
12,
3927,
734,
16,
740,
2218,
76,
70,
2187,
15835,
2218,
2187,
16824,
33,
94,
2941,
18,
323,
14706,
4672,
315,
15402,
1409,
296,
3927,
734,
11,
4955,
4078,
4751,
358,
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,
1172,
67,
3366,
12,
3927,
734,
16,
740,
2218,
76,
70,
2187,
15835,
2218,
2187,
16824,
33,
94,
2941,
18,
323,
14706,
4672,
315,
15402,
1409,
296,
3927,
734,
11,
4955,
4078,
4751,
358,
2... |
self.run_peer (cmd) | self.run_peer (cmd_name) | def run (self): | ba38d12063919288d6593593493cd37057d0ba67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ba38d12063919288d6593593493cd37057d0ba67/install.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
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,
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,
1086,
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,
-100,
-100,
... |
downgrade_apkgs[pkg.name] = pkg | downgrade_apkgs[na] = pkg | def downgrade(self, po=None, **kwargs): """ Try to downgrade a package. Works like: % yum shell <<EOL remove abcd install abcd-<old-version> run EOL """ | 9fbb21beef647848564f1801d07819cd7dc1ca5c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5445/9fbb21beef647848564f1801d07819cd7dc1ca5c/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2588,
3994,
12,
2890,
16,
8275,
33,
7036,
16,
2826,
4333,
4672,
3536,
6161,
358,
2588,
3994,
279,
2181,
18,
4147,
87,
3007,
30,
738,
677,
379,
5972,
2296,
5842,
1206,
225,
1223,
4315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2588,
3994,
12,
2890,
16,
8275,
33,
7036,
16,
2826,
4333,
4672,
3536,
6161,
358,
2588,
3994,
279,
2181,
18,
4147,
87,
3007,
30,
738,
677,
379,
5972,
2296,
5842,
1206,
225,
1223,
4315,
... |
self.domains_lock.release() | if resu: self.domains_lock.release() | def list(self, state = DOM_STATE_RUNNING): """Get list of domain objects. | 2c96453d8a968bca3c8590094e94b93c81ff26c0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6195/2c96453d8a968bca3c8590094e94b93c81ff26c0/XendDomain.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
12,
2890,
16,
919,
273,
4703,
67,
7998,
67,
29358,
4672,
3536,
967,
666,
434,
2461,
2184,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
12,
2890,
16,
919,
273,
4703,
67,
7998,
67,
29358,
4672,
3536,
967,
666,
434,
2461,
2184,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
i = string.find(host, '@') + 1 | i = host.find('@') + 1 | def retry_https_basic_auth(self, url, realm, data=None): host, selector = splithost(url) i = string.find(host, '@') + 1 host = host[i:] user, passwd = self.get_user_passwd(host, realm, i) if not (user or passwd): return None host = user + ':' + passwd + '@' + host newurl = '//' + host + selector return self.open_https(newurl) | 2a3596c7d04c9635576a712f85db07ce4de4bff2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2a3596c7d04c9635576a712f85db07ce4de4bff2/urllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3300,
67,
4528,
67,
13240,
67,
1944,
12,
2890,
16,
880,
16,
11319,
16,
501,
33,
7036,
4672,
1479,
16,
3451,
273,
6121,
483,
669,
12,
718,
13,
277,
273,
1479,
18,
4720,
2668,
36,
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,
3300,
67,
4528,
67,
13240,
67,
1944,
12,
2890,
16,
880,
16,
11319,
16,
501,
33,
7036,
4672,
1479,
16,
3451,
273,
6121,
483,
669,
12,
718,
13,
277,
273,
1479,
18,
4720,
2668,
36,
6134... |
includes = ['-I' + incldir, '-I' + binlib] | includes = ['-I' + incldir, '-I' + config_h_dir] | def main(): # overridable context prefix = None # settable with -p option exec_prefix = None # settable with -P option extensions = [] exclude = [] # settable with -x option addn_link = [] # settable with -l, but only honored under Windows. path = sys.path[:] modargs = 0 debug = 1 odir = '' win = sys.platform[:3] == 'win' # default the exclude list for each platform | 0b8c862f7ede27e01f92c5825807ff0071d65a83 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/0b8c862f7ede27e01f92c5825807ff0071d65a83/freeze.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
468,
5713,
27621,
819,
1633,
273,
599,
15604,
468,
444,
2121,
598,
300,
84,
1456,
1196,
67,
3239,
273,
599,
5375,
468,
444,
2121,
598,
300,
52,
1456,
4418,
273,
5378,
4433,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
468,
5713,
27621,
819,
1633,
273,
599,
15604,
468,
444,
2121,
598,
300,
84,
1456,
1196,
67,
3239,
273,
599,
5375,
468,
444,
2121,
598,
300,
52,
1456,
4418,
273,
5378,
4433,
... |
self.file_list = file_list.load() | self.file_list = file_list.load(self) | def __init__(self): self.config = {} self.config['plugin_folder'] = "plugins" self.plugins_avaible = {} | 730b6969ca49535b95b17dde92819aea5bd057c9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9838/730b6969ca49535b95b17dde92819aea5bd057c9/pyLoadCore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
1425,
273,
2618,
365,
18,
1425,
3292,
4094,
67,
5609,
3546,
273,
315,
8057,
6,
365,
18,
8057,
67,
1629,
1523,
273,
2618,
2,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
1425,
273,
2618,
365,
18,
1425,
3292,
4094,
67,
5609,
3546,
273,
315,
8057,
6,
365,
18,
8057,
67,
1629,
1523,
273,
2618,
2,
-100,
-100,
-100,
... |
ar = area.T(legend = legend.T(), x_grid_style= line_style.gray70_dash1, x_axis = axis.X(label="Periods", format="/a90/hC%s"), x_coord = category_coord.T(x_index, 0), y_axis = axis.Y(label=y_label), y_range = (0, None), size = (640,480)) | ar = area.T(legend = legend.T(), x_grid_style = line_style.gray70_dash1, x_axis = axis.X(label="Periods", format="/a90/hC%s"), x_coord = category_coord.T(x_index, 0), y_axis = axis.Y(label=y_label), y_range = (0, None), size = (640,480)) | def create(self, cr, uid, ids, datas, context={}): assert len(ids), 'You should provide some ids!' colors = choice_colors(len(ids)) ids_str = ','.join(map(str, ids)) cr.execute( "SELECT MAX(date_planned) AS stop "\ "FROM mrp_workcenter, mrp_production, mrp_production_workcenter_line "\ "WHERE mrp_production_workcenter_line.production_id=mrp_production.id "\ "AND mrp_production_workcenter_line.workcenter_id=mrp_workcenter.id "\ "AND mrp_production.state NOT IN ('cancel','done') "\ "AND mrp_workcenter.id IN (%s)" % ids_str) res = cr.dictfetchone() if not res['stop']: res['stop'] = time.strftime('%Y-%m-%d') dates = self._compute_dates(datas['form']['time_unit'], time.strftime('%Y-%m-%d'), res['stop']) dates_list = dates.keys() dates_list.sort() x_index = [] for date in dates_list: x_index.append((dates[date]['name'], date)) pdf_string = StringIO.StringIO() can = canvas.init(fname=pdf_string, format='pdf') chart_object.set_defaults(line_plot.T, line_style=None) if datas['form']['measure_unit'] == 'cycles': y_label = "Load (Cycles)" else: y_label = "Load (Hours)" ar = area.T(legend = legend.T(), x_grid_style= line_style.gray70_dash1, x_axis = axis.X(label="Periods", format="/a90/hC%s"), x_coord = category_coord.T(x_index, 0), y_axis = axis.Y(label=y_label), y_range = (0, None), size = (640,480)) bar_plot.fill_styles.reset(); | 3388852590ee297a69d5396407adb918950a4989 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/3388852590ee297a69d5396407adb918950a4989/workcenter_load.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
5386,
16,
819,
12938,
4672,
1815,
562,
12,
2232,
3631,
296,
6225,
1410,
5615,
2690,
3258,
5124,
5740,
273,
6023,
67,
9724,
12,
1897,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
5386,
16,
819,
12938,
4672,
1815,
562,
12,
2232,
3631,
296,
6225,
1410,
5615,
2690,
3258,
5124,
5740,
273,
6023,
67,
9724,
12,
1897,
12... |
text = _('When an entry is successfully created the server MUST return a Link: HTTP header.') | text = _('When an entry is successfully created the server MUST return a Location: HTTP header.') | def tostring(self): return self.context + ":" + self.text + ":" + self.extra | 62545eb4a0f245496aec57ddf77c32bdf1a873f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5012/62545eb4a0f245496aec57ddf77c32bdf1a873f9/appclienttest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26135,
12,
2890,
4672,
327,
365,
18,
2472,
397,
6153,
397,
365,
18,
955,
397,
6153,
397,
365,
18,
7763,
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,
26135,
12,
2890,
4672,
327,
365,
18,
2472,
397,
6153,
397,
365,
18,
955,
397,
6153,
397,
365,
18,
7763,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if len(argv) < 4: | if len(argv) < 3: | def main(argv): global path_svnrepo, path_srcurl print """svnpull.py | 26c47efdb6949a74b8fcf907fa469188e8033d01 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6387/26c47efdb6949a74b8fcf907fa469188e8033d01/svnpull.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
19485,
4672,
2552,
589,
67,
31505,
7422,
16,
589,
67,
4816,
718,
225,
1172,
3536,
5751,
6782,
420,
18,
2074,
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,
2774,
12,
19485,
4672,
2552,
589,
67,
31505,
7422,
16,
589,
67,
4816,
718,
225,
1172,
3536,
5751,
6782,
420,
18,
2074,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Subgroup of Mordell Weil group: [[-2:3:1], [2707496766203306:864581029138191:2969715140223272], [-13422227300:-49322830557:12167000000]] | Subgroup of Mordell-Weil group: [[-2:3:1], [2707496766203306:864581029138191:2969715140223272], [-13422227300:-49322830557:12167000000]] | def saturate(self, max_prime=-1, odd_primes_only=False): r""" Saturate this subgroup of the Mordell-Weil group. INPUT: - ``max_prime`` (int, default -1) -- saturation is performed for all primes up to `max_prime`. If `-1` (default) then an upper bound is computed for the primes at which the subgroup may not be saturated, and this is used; however, if the computed bound is greater than a value set by the eclib library (currently 97) then no saturation will be attempted at primes above this. - ``odd_primes_only`` (bool, default False) -- only do saturation at odd primes. (If the points have been found via 2-descent they should alreday be 2-saturated.) | 1cc4edc9aafb88d044d853b60331d1432546cf60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1cc4edc9aafb88d044d853b60331d1432546cf60/interface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5942,
295,
340,
12,
2890,
16,
943,
67,
16382,
29711,
21,
16,
14800,
67,
683,
4485,
67,
3700,
33,
8381,
4672,
436,
8395,
25793,
295,
340,
333,
720,
1655,
434,
326,
490,
517,
1165,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5942,
295,
340,
12,
2890,
16,
943,
67,
16382,
29711,
21,
16,
14800,
67,
683,
4485,
67,
3700,
33,
8381,
4672,
436,
8395,
25793,
295,
340,
333,
720,
1655,
434,
326,
490,
517,
1165,
17,
... |
path_prefix = member_prefix, | path_prefix=member_prefix, | def collection( self, collection_name, resource_name, path_prefix=None, member_prefix='/{id}', controller=None, collection_actions=COLLECTION_ACTIONS, member_actions = MEMBER_ACTIONS, member_options=None, **kwargs): """Create a submapper that represents a collection. | 5fb4c0a4dadc5fe2486dee255c3991b78918fa87 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12081/5fb4c0a4dadc5fe2486dee255c3991b78918fa87/mapper.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1849,
12,
365,
16,
1849,
67,
529,
16,
1058,
67,
529,
16,
589,
67,
3239,
33,
7036,
16,
3140,
67,
3239,
2218,
4938,
350,
24259,
2596,
33,
7036,
16,
1849,
67,
4905,
33,
25964,
67,
12249... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1849,
12,
365,
16,
1849,
67,
529,
16,
1058,
67,
529,
16,
589,
67,
3239,
33,
7036,
16,
3140,
67,
3239,
2218,
4938,
350,
24259,
2596,
33,
7036,
16,
1849,
67,
4905,
33,
25964,
67,
12249... |
curses.init_pair(5, curses.COLOR_BLACK, curses.COLOR_WHITE) | curses.init_pair(5, curses.COLOR_BLACK, curses.COLOR_WHITE ) | def __init__(self, stdscr, server_url): self.stdscr = stdscr self.lock = RLock() self.lock.acquire() self.stop = False self.download_win = None self.collectorbox = None self.add_win = None self.proxy = None self.downloads = [] self.tmp_bind = [] self.current_dwin_rows = 0 self.lock.release() self.connect(server_url) self.lock.acquire() curses.init_pair(1, curses.COLOR_BLUE, curses.COLOR_BLACK) curses.init_pair(2, curses.COLOR_YELLOW, curses.COLOR_BLACK) curses.init_pair(3, curses.COLOR_GREEN, curses.COLOR_BLACK) curses.init_pair(4, curses.COLOR_CYAN, curses.COLOR_BLACK) curses.init_pair(5, curses.COLOR_BLACK, curses.COLOR_WHITE) self.screen = self.stdscr.subwin(23, 79, 0, 0) self.screen.box() self.screen.addstr(1, 48, "py", curses.color_pair(1)) self.screen.addstr(1, 50, "Load", curses.color_pair(2)) self.screen.addstr(1, 55, "Command Line Interface") self.lock.release() self.add_menu("Status", "s", None) self.add_menu("Collector", "c", self.collector_menu) self.add_menu("Add-Link", "l", self.show_addl_box) self.add_menu("New-Package", "p", self.show_newp_box) self.add_menu("Quit", "q", self.exit) self.init_download_win() self.update_downloads() | dcf9df576d0e30e016bb6ecb9fb67decc04d2761 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9838/dcf9df576d0e30e016bb6ecb9fb67decc04d2761/pyLoadCli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2044,
24638,
16,
1438,
67,
718,
4672,
365,
18,
5084,
24638,
273,
2044,
24638,
365,
18,
739,
273,
8718,
1435,
365,
18,
739,
18,
1077,
1039,
1435,
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,
1001,
2738,
972,
12,
2890,
16,
2044,
24638,
16,
1438,
67,
718,
4672,
365,
18,
5084,
24638,
273,
2044,
24638,
365,
18,
739,
273,
8718,
1435,
365,
18,
739,
18,
1077,
1039,
1435,
365,
18,... |
size1 = intbitset1.get_size() allocated1 = intbitset1.get_allocated() creator_list = intbitset1.extract_finite_list() up_to1 = creator_list and max(creator_list) or -1 self.failUnless(up_to1 <= size1 * wordbitsize < allocated1 * wordbitsize, "After serialization up_to1=%s, size1=%s, allocated1=%s while testing %s during %s" % (up_to1, size1 * wordbitsize, allocated1 * wordbitsize, intbitset1, msg)) | size2 = tmp.get_size() allocated2 = tmp.get_allocated() creator_list = tmp.extract_finite_list() up_to2 = creator_list and max(creator_list) or -1 self.failUnless(up_to2 <= size2 * wordbitsize < allocated2 * wordbitsize, "After serialization up_to2=%s, size2=%s, allocated2=%s while testing %s during %s" % (up_to2, size2 * wordbitsize, allocated2 * wordbitsize, intbitset1, msg)) | def _helper_sanity_test(self, intbitset1, msg=''): wordbitsize = intbitset1.get_wordbitsize() size1 = intbitset1.get_size() allocated1 = intbitset1.get_allocated() creator_list = intbitset1.extract_finite_list() up_to1 = creator_list and max(creator_list) or -1 self.failUnless(up_to1 <= size1 * wordbitsize < allocated1 * wordbitsize, "up_to1=%s, size1=%s, allocated1=%s while testing %s during %s" % (up_to1, size1 * wordbitsize, allocated1 * wordbitsize, intbitset1, msg)) tmp = intbitset(intbitset1.fastdump()) size1 = intbitset1.get_size() allocated1 = intbitset1.get_allocated() creator_list = intbitset1.extract_finite_list() up_to1 = creator_list and max(creator_list) or -1 self.failUnless(up_to1 <= size1 * wordbitsize < allocated1 * wordbitsize, "After serialization up_to1=%s, size1=%s, allocated1=%s while testing %s during %s" % (up_to1, size1 * wordbitsize, allocated1 * wordbitsize, intbitset1, msg)) | ab9f1a1d70a4865c384e7b0fdcae5bea43474b13 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/ab9f1a1d70a4865c384e7b0fdcae5bea43474b13/intbitset_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4759,
67,
87,
10417,
67,
3813,
12,
2890,
16,
509,
3682,
542,
21,
16,
1234,
2218,
11,
4672,
2076,
6789,
554,
273,
509,
3682,
542,
21,
18,
588,
67,
1095,
6789,
554,
1435,
963,
21,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4759,
67,
87,
10417,
67,
3813,
12,
2890,
16,
509,
3682,
542,
21,
16,
1234,
2218,
11,
4672,
2076,
6789,
554,
273,
509,
3682,
542,
21,
18,
588,
67,
1095,
6789,
554,
1435,
963,
21,... |
limm t1, imm srai t2, t1, "(env.dataSize == 8) ? 3 : ((env.dataSize == 4) ? 2 : 1)" | srai t2, reg, "(env.dataSize == 8) ? 3 : ((env.dataSize == 4) ? 2 : 1)" | def macroop BTS_M_R { limm t1, imm srai t2, t1, "(env.dataSize == 8) ? 3 : ((env.dataSize == 4) ? 2 : 1)" add t2, t2, base limm t3, 1 rol t3, t3, reg ldst t1, seg, [scale, index, t2], disp sext t0, t1, reg, flags=(CF,) or t1, t1, t3 st t1, seg, [scale, index, t2], disp | b5d40183829f5aa6f8f7196aad11cef037d04443 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6787/b5d40183829f5aa6f8f7196aad11cef037d04443/bit_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11522,
556,
605,
8047,
67,
49,
67,
54,
288,
272,
354,
77,
268,
22,
16,
960,
16,
7751,
3074,
18,
892,
1225,
422,
1725,
13,
692,
890,
294,
14015,
3074,
18,
892,
1225,
422,
1059,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11522,
556,
605,
8047,
67,
49,
67,
54,
288,
272,
354,
77,
268,
22,
16,
960,
16,
7751,
3074,
18,
892,
1225,
422,
1725,
13,
692,
890,
294,
14015,
3074,
18,
892,
1225,
422,
1059,
13,
... |
environment.append(string.join([str(var),str(val)],'=')) except Exception,x: return self._reportError('Expected string for environment variable key value pairs',**kwargs) envStr = string.join(environment,';') | environment.append( string.join( [str( var ), str( val )], '=' ) ) except Exception, x: return self._reportError( 'Expected string for environment variable key value pairs', **kwargs ) envStr = string.join( environment, ';' ) | def setExecutionEnv(self,environmentDict): """Helper function. | 50b3322668816ba92ea3f9b253d993dc34c53a21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/50b3322668816ba92ea3f9b253d993dc34c53a21/Job.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
3210,
3491,
12,
2890,
16,
10274,
5014,
4672,
3536,
2276,
445,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
3210,
3491,
12,
2890,
16,
10274,
5014,
4672,
3536,
2276,
445,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
class A001110(SloaneSequence): r""" Numbers that are both triangular and square: $a(n) = 34a(n-1) - a(n-2) + 2$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A001110; a Numbers that are both triangular and square: a(n) = 34a(n-1) - a(n-2) + 2. sage: a(0) 0 sage: a(1) 1 sage: a(8) 55420693056 sage: a(21) 4446390382511295358038307980025 sage: a.list(8) [0, 1, 36, 1225, 41616, 1413721, 48024900, 1631432881] AUTHOR: -- Jaap Spies (2007-01-19) """ def __init__(self): | class RecurrenceSequence(SloaneSequence): def _precompute(self, how_many=20): """ EXAMPLES: sage: initial = len(sloane.A001110._b) sage: sloane.A001110._precompute(10) sage: len(sloane.A001110._b) - initial == 10 True """ try: f = self._f except AttributeError: self._f = recur_gen2b(*self._params) f = self._f self._b += [f.next() for i in range(how_many)] def _eval(self, n): """ EXAMPLES: sage: [sloane.A001110._eval(n) for n in range(5)] [0, 1, 36, 1225, 41616] """ if len(self._b) < n: self._precompute(n - len(self._b) + 1) return self._b[n] def list(self, n): """ EXAMPLES: sage: sloane.A001110.list(8) [0, 1, 36, 1225, 41616, 1413721, 48024900, 1631432881] """ self._eval(n) return self._b[:n] class A001110(RecurrenceSequence): def __init__(self): r""" Numbers that are both triangular and square: $a(n) = 34a(n-1) - a(n-2) + 2$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A001110; a Numbers that are both triangular and square: a(n) = 34a(n-1) - a(n-2) + 2. sage: a(0) 0 sage: a(1) 1 sage: a(8) 55420693056 sage: a(21) 4446390382511295358038307980025 sage: a.list(8) [0, 1, 36, 1225, 41616, 1413721, 48024900, 1631432881] AUTHOR: -- Jaap Spies (2007-01-19) """ | # def f(n): | 7b02e5455d5d52d6dcc7f2314cdd56803031a1c6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/7b02e5455d5d52d6dcc7f2314cdd56803031a1c6/sloane_functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
1652,
284,
12,
82,
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,
... | [
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,
284,
12,
82,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
def fake_input_checked(self, type, detail=0, time=0, window=XNone, rootX=0, rootY=0, deviceid=0): | def fake_input_checked(self, type, detail=0, time=0, window=None, rootX=0, rootY=0, deviceid=0): | def fake_input_checked(self, type, detail=0, time=0, window=XNone, rootX=0, rootY=0, deviceid=0): window = get_internal(window) buf = StringIO.StringIO() buf.write(pack("=xxxxBBxxIIxxxxxxxxHHxxxxxxxB", type, detail, time, window, rootX, rootY, deviceid)) return self.conn.xtest.send_request(ooxcb.Request(self.conn, buf.getvalue(), 2, True, True), \ ooxcb.VoidCookie()) | 45ab94870f449006d5cd6b0e0b242c76eb7403dd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10761/45ab94870f449006d5cd6b0e0b242c76eb7403dd/xtest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10517,
67,
2630,
67,
4532,
12,
2890,
16,
618,
16,
7664,
33,
20,
16,
813,
33,
20,
16,
2742,
33,
7036,
16,
1365,
60,
33,
20,
16,
1365,
61,
33,
20,
16,
2346,
350,
33,
20,
4672,
2742... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10517,
67,
2630,
67,
4532,
12,
2890,
16,
618,
16,
7664,
33,
20,
16,
813,
33,
20,
16,
2742,
33,
7036,
16,
1365,
60,
33,
20,
16,
1365,
61,
33,
20,
16,
2346,
350,
33,
20,
4672,
2742... |
dbobj.dbconn.commit() | ligomd.dbcon.commit() | uniq_def = (row[run_col],row[ifos_col],row[name_col],row[vers_col]) | f1b7f4b95c365f86c41ee5bc03bed1506e362562 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/f1b7f4b95c365f86c41ee5bc03bed1506e362562/LDBDServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
10748,
67,
536,
273,
261,
492,
63,
2681,
67,
1293,
6487,
492,
63,
430,
538,
67,
1293,
6487,
492,
63,
529,
67,
1293,
6487,
492,
63,
2496,
67,
1293,
5717,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
10748,
67,
536,
273,
261,
492,
63,
2681,
67,
1293,
6487,
492,
63,
430,
538,
67,
1293,
6487,
492,
63,
529,
67,
1293,
6487,
492,
63,
2496,
67,
1293,
5717,
2,
-100,
-100,
-100,
-100,
-100,
-1... |
rt = "Network Netmask Gateway Iface\n" | rt = "Network Netmask Gateway Iface Output IP\n" | def __repr__(self): rt = "Network Netmask Gateway Iface\n" for net,msk,gw,iface,addr in self.routes: rt += "%-15s %-15s %-15s %s\n" % (ltoa(net), ltoa(msk), gw, iface) return rt | 3189058f12fcf8b5eb134c746ce4ab9b49c84e27 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/3189058f12fcf8b5eb134c746ce4ab9b49c84e27/scapy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
8253,
273,
315,
3906,
540,
8503,
4455,
540,
11381,
540,
29808,
6647,
3633,
2971,
64,
82,
6,
364,
2901,
16,
959,
79,
16,
28500,
16,
31479,
16,
4793,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12715,
972,
12,
2890,
4672,
8253,
273,
315,
3906,
540,
8503,
4455,
540,
11381,
540,
29808,
6647,
3633,
2971,
64,
82,
6,
364,
2901,
16,
959,
79,
16,
28500,
16,
31479,
16,
4793,
31... |
for set1 in self.sets + []: | for set1 in self.sets + [[]]: | def test_set_update_with_signs(self): """intbitset - set update with signs""" dict1 = {10 : -1, 20 : 1, 23 : -1, 27 : 1, 33 : -1, 56 : 1, 70 : -1, 74 : 1} for set1 in self.sets + []: intbitset1 = intbitset(set1) intbitset1.update_with_signs(dict1) up_to = max(dict1.keys() + set1) for i in xrange(up_to + 1): if dict1.get(i, i in set1 and 1 or -1) == 1: self.failUnless(i in intbitset1, "%s was not correctly updated from %s by %s" % (repr(intbitset1), repr(set1), repr(dict1))) else: self.failIf(i in intbitset1, "%s was not correctly updated from %s by %s" % (repr(intbitset1), repr(set1), repr(dict1))) | d4a1d7e3f52dbeaebf8d74a7a99b4870caa65e1a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/d4a1d7e3f52dbeaebf8d74a7a99b4870caa65e1a/intbitset_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
542,
67,
2725,
67,
1918,
67,
2977,
87,
12,
2890,
4672,
3536,
474,
3682,
542,
300,
444,
1089,
598,
21588,
8395,
2065,
21,
273,
288,
2163,
294,
300,
21,
16,
4200,
294,
404,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
542,
67,
2725,
67,
1918,
67,
2977,
87,
12,
2890,
4672,
3536,
474,
3682,
542,
300,
444,
1089,
598,
21588,
8395,
2065,
21,
273,
288,
2163,
294,
300,
21,
16,
4200,
294,
404,
1... |
return isinstance(other, deque) and list.__ge__(self, other) def __gt__(self, other): return isinstance(other, deque) and list.__gt__(self, other) | if isinstance(other, deque): return list(self) >= list(other) else: return NotImplemented | def __ge__(self, other): return isinstance(other, deque) and list.__ge__(self, other) | 98d77cf1aef09187f66c5d480f696aed0614be1e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/98d77cf1aef09187f66c5d480f696aed0614be1e/collections.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
908,
972,
12,
2890,
16,
1308,
4672,
327,
1549,
12,
3011,
16,
21147,
13,
471,
666,
16186,
908,
972,
12,
2890,
16,
1308,
13,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
908,
972,
12,
2890,
16,
1308,
4672,
327,
1549,
12,
3011,
16,
21147,
13,
471,
666,
16186,
908,
972,
12,
2890,
16,
1308,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
print "\t Current mode:off" | print "Current mode:off" print | def print_power(wifi): """ Print power management info for the card. """ (pm_capa, power_period, power_timeout, power_saving, power_params) = \ wifi.getPowermanagement() print "%-8.16s Supported modes :" % (wifi.ifname, ) if pm_capa & (pythonwifi.flags.IW_POWER_UNICAST_R | pythonwifi.flags.IW_POWER_MULTICAST_R): print "\t\t\to Receive all packets (unicast & multicast)" if pm_capa & pythonwifi.flags.IW_POWER_UNICAST_R: print "\t\t\to Receive Unicast only (discard multicast)" if pm_capa & pythonwifi.flags.IW_POWER_MULTICAST_R: print "\t\t\to Receive Multicast only (discard unicast)" if pm_capa & pythonwifi.flags.IW_POWER_FORCE_S: print "\t\t\to Force sending using Power Management" if pm_capa & pythonwifi.flags.IW_POWER_REPEATER: print "\t\t\to Repeat multicast" if power_params.disabled: print "\t Current mode:off" | 11ad9d719d99019dfd1e5ee72ea0181d1afafa85 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3159/11ad9d719d99019dfd1e5ee72ea0181d1afafa85/pyiwlist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
12238,
12,
91,
704,
4672,
3536,
3038,
7212,
11803,
1123,
364,
326,
5270,
18,
225,
3536,
261,
7755,
67,
5909,
69,
16,
7212,
67,
6908,
16,
7212,
67,
4538,
16,
7212,
67,
87,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
12238,
12,
91,
704,
4672,
3536,
3038,
7212,
11803,
1123,
364,
326,
5270,
18,
225,
3536,
261,
7755,
67,
5909,
69,
16,
7212,
67,
6908,
16,
7212,
67,
4538,
16,
7212,
67,
87,
5... |
def __float__(self): return 2.685452001065306445309714835481795693820 | def __float__(self): """ EXAMPLES: sage: float(khinchin) 2.6854520010653062 """ return float(self.__value) | def __float__(self): return 2.685452001065306445309714835481795693820 | 2a839b3d50866729418f3c87713bc3adb8f65bac /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/2a839b3d50866729418f3c87713bc3adb8f65bac/constants.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
5659,
972,
12,
2890,
4672,
327,
576,
18,
9470,
6564,
25,
6976,
2163,
9222,
5082,
1105,
7950,
5082,
10580,
25005,
4763,
8875,
28814,
4313,
29,
7414,
3462,
2,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
5659,
972,
12,
2890,
4672,
327,
576,
18,
9470,
6564,
25,
6976,
2163,
9222,
5082,
1105,
7950,
5082,
10580,
25005,
4763,
8875,
28814,
4313,
29,
7414,
3462,
2,
-100,
-100,
-100,
-100,
... |
state = deepcopy(state) | state = deepcopy(state, memo) | def _reconstruct(x, info, deep): if isinstance(info, str): return x assert isinstance(info, tuple) n = len(info) assert n in (2, 3) callable, args = info[:2] if n > 2: state = info[2] else: state = {} if deep: args = deepcopy(args) y = callable(*args) if state: if deep: state = deepcopy(state) y.__dict__.update(state) return y | 1e91c1444a9c8b8b58310cffbe4252698527a31e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1e91c1444a9c8b8b58310cffbe4252698527a31e/copy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
266,
10062,
12,
92,
16,
1123,
16,
4608,
4672,
309,
1549,
12,
1376,
16,
609,
4672,
327,
619,
1815,
1549,
12,
1376,
16,
3193,
13,
290,
273,
562,
12,
1376,
13,
1815,
290,
316,
261,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
266,
10062,
12,
92,
16,
1123,
16,
4608,
4672,
309,
1549,
12,
1376,
16,
609,
4672,
327,
619,
1815,
1549,
12,
1376,
16,
3193,
13,
290,
273,
562,
12,
1376,
13,
1815,
290,
316,
261,... |
TypeError: iteration over non-sequence | TypeError: 'int' object is not iterable | >>> def f(n): | ccff78525889fe2fa1a3512c4084a407994f9ce3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ccff78525889fe2fa1a3512c4084a407994f9ce3/test_genexps.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4080,
1652,
284,
12,
82,
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,... | [
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,
4080,
1652,
284,
12,
82,
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... |
print >>sys.stderr, '\n'+'!'*70 | print >>sys.stderr, '!'*70+'\n' | def cli(): """ Command line interface for epydoc. @rtype: C{None} """ # Parse the command line arguments. options = _parse_args() # Import all the specified modules. modules = _import(options['modules'], options['verbosity']) # Build their documentation docmap = _make_docmap(modules, options) # Perform the requested action. if options['action'] == 'html': _html(docmap, options) elif options['action'] == 'check': _check(docmap, options) elif options['action'] == 'latex': _latex(docmap, options, 'latex') elif options['action'] == 'dvi': _latex(docmap, options, 'dvi') elif options['action'] == 'ps': _latex(docmap, options, 'ps') elif options['action'] == 'pdf': _latex(docmap, options, 'pdf') else: raise ValueError('Unknown action %r' % options['action']) # Report any internal errors. if _encountered_internal_error: estr = ("An internal error occured. To see the exception "+ "that caused the\n error, use the '--debug' option.") print >>sys.stderr, '\n'+'!'*70 print >>sys.stderr, estr print >>sys.stderr, '\n'+'!'*70 | ddbe2185aea227ca535b5ea25a1f6d176b757acb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/ddbe2185aea227ca535b5ea25a1f6d176b757acb/cli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4942,
13332,
3536,
3498,
980,
1560,
364,
425,
2074,
2434,
18,
225,
632,
86,
723,
30,
385,
95,
7036,
97,
3536,
468,
2884,
326,
1296,
980,
1775,
18,
702,
273,
389,
2670,
67,
1968,
1435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4942,
13332,
3536,
3498,
980,
1560,
364,
425,
2074,
2434,
18,
225,
632,
86,
723,
30,
385,
95,
7036,
97,
3536,
468,
2884,
326,
1296,
980,
1775,
18,
702,
273,
389,
2670,
67,
1968,
1435,
... |
self.debug = False; | def lociCoCoA(self, resp, xs, xe, ys, ye, number, polys): self.debug = False; cinput = "" | 44c8c686bdf478ef36bb4dc703c506126334c1f1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11079/44c8c686bdf478ef36bb4dc703c506126334c1f1/geoloci.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1515,
77,
4249,
4249,
37,
12,
2890,
16,
1718,
16,
9280,
16,
20517,
16,
16036,
16,
677,
73,
16,
1300,
16,
2952,
1900,
4672,
276,
2630,
273,
1408,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1515,
77,
4249,
4249,
37,
12,
2890,
16,
1718,
16,
9280,
16,
20517,
16,
16036,
16,
677,
73,
16,
1300,
16,
2952,
1900,
4672,
276,
2630,
273,
1408,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
def _calcTickPositions(self): | def _calcStepAndTickPositions(self): | def _calcTickPositions(self): valueStep = getattr(self,'_computedValueStep',None) if valueStep: del self._computedValueStep self._valueStep = valueStep else: self._calcValueStep() valueStep = self._valueStep valueMin = self._valueMin valueMax = self._valueMax fuzz = 1e-8*valueStep rangeRound = self.rangeRound i0 = int(float(valueMin)/valueStep) v = i0*valueStep if rangeRound in ('both','floor'): if v>valueMin+fuzz: i0 -= 1 elif v<valueMin-fuzz: i0 += 1 i1 = int(float(valueMax)/valueStep) v = i1*valueStep if rangeRound in ('both','ceiling'): if v<valueMax-fuzz: i1 += 1 elif v>valueMax+fuzz: i1 -= 1 return [i*valueStep for i in xrange(i0,i1+1)] | e64d888e8421f2dbd882caf5bffb8bbed55bb416 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7053/e64d888e8421f2dbd882caf5bffb8bbed55bb416/axes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
12448,
4160,
1876,
6264,
11024,
12,
2890,
4672,
460,
4160,
273,
3869,
12,
2890,
11189,
67,
20307,
620,
4160,
2187,
7036,
13,
309,
460,
4160,
30,
1464,
365,
6315,
20307,
620,
4160,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
12448,
4160,
1876,
6264,
11024,
12,
2890,
4672,
460,
4160,
273,
3869,
12,
2890,
11189,
67,
20307,
620,
4160,
2187,
7036,
13,
309,
460,
4160,
30,
1464,
365,
6315,
20307,
620,
4160,
3... |
transformed = queryMapper.map(query) print transformed.toString() canon = SWObjects.SWObjectCanonicalizer(F) print "canon: ", canon transformed.express(canon) ourlast = canon.last print "our last: ", ourlast transformedNorm = ourlast.operation print transformedNorm.toString() agent = SWObjects.WEBagent_boostASIO() xmlParser = SWObjects.SAXparser_expat() DB = SWObjects.RdfDB(agent, xmlParser) rs = SWObjects.ResultSet(F) transformedNorm.execute(DB, rs) print rs.toString() | try: transformed = queryMapper.map(query) canon = SWObjects.SWObjectCanonicalizer(F) transformed.express(canon) ourlast = canon.last transformedNorm = ourlast.operation agent = SWObjects.WEBagent_boostASIO() xmlParser = SWObjects.SAXparser_expat() DB = SWObjects.RdfDB(agent, xmlParser) rs = SWObjects.ResultSet(F) transformedNorm.execute(DB, rs) p = rs.toString() print p except ValueError: queryMapper.clear() print "ERROR: The Federator couldn't find one or more of the predicates in your query in the list of registered endpoints.\n Please check your predicates and run the query again." | def test_federation (self): F = SWObjects.AtomFactory() sparqlParser = SWObjects.SPARQLfedDriver("", F) mapSetParser = SWObjects.MapSetDriver("", F) queryMapper = SWObjects.ChainingMapper(F, None) sparqlParser.unnestTree = True | eae4d84be70816bb271d04d857dae7ba5b98bb03 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10468/eae4d84be70816bb271d04d857dae7ba5b98bb03/t_SWObjects.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
31835,
7067,
261,
2890,
4672,
478,
273,
16392,
4710,
18,
3641,
1733,
1435,
272,
25366,
2678,
273,
16392,
4710,
18,
55,
2778,
2024,
31835,
4668,
2932,
3113,
478,
13,
852,
694,
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,
1842,
67,
31835,
7067,
261,
2890,
4672,
478,
273,
16392,
4710,
18,
3641,
1733,
1435,
272,
25366,
2678,
273,
16392,
4710,
18,
55,
2778,
2024,
31835,
4668,
2932,
3113,
478,
13,
852,
694,
2... |
print "in traverse, item=%s has a child" %repr(self.tree.GetItemPyData(item)) | def traverse(self, parent, itemId): print "in traverse for itemId=%s..." %repr(itemId) | 018dc2f3a19f43f863b8a1cd816cbdb4591b1bce /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7242/018dc2f3a19f43f863b8a1cd816cbdb4591b1bce/SceneGraphUI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10080,
12,
2890,
16,
982,
16,
18424,
4672,
1172,
315,
267,
10080,
364,
18424,
5095,
87,
7070,
738,
12715,
12,
1726,
548,
13,
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,
10080,
12,
2890,
16,
982,
16,
18424,
4672,
1172,
315,
267,
10080,
364,
18424,
5095,
87,
7070,
738,
12715,
12,
1726,
548,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
_new_script(name = glob_script.name, description = glob_script.description, workspace = ws, pipeline = glob_script.pipeline, events = ['upload', 'item copy']) | _new_script(name = glob_script.name, description = glob_script.description, workspace = ws, pipeline = glob_script.pipeline, events = ['upload', 'item copy'], is_global = True) | def create_workspace(self, name, description, creator): """ Creates a new workspace @param name name of the new workspace (string) @param description description of the new workspace (optional string) @param creator an instance of auth.User """ from dam.scripts.models import ScriptDefault, Script from dam.scripts.views import _new_script from dam.treeview.models import Node, Category from dam.eventmanager.models import Event, EventRegistration | ed9c282785e2b5e7b6c2d971a8150faf53c3bd28 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4589/ed9c282785e2b5e7b6c2d971a8150faf53c3bd28/models.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
14915,
12,
2890,
16,
508,
16,
2477,
16,
11784,
4672,
3536,
10210,
279,
394,
6003,
632,
891,
508,
508,
434,
326,
394,
6003,
261,
1080,
13,
632,
891,
2477,
2477,
434,
326,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
14915,
12,
2890,
16,
508,
16,
2477,
16,
11784,
4672,
3536,
10210,
279,
394,
6003,
632,
891,
508,
508,
434,
326,
394,
6003,
261,
1080,
13,
632,
891,
2477,
2477,
434,
326,
394,
... |
for f in output_filelist: print >>dagfile, """ <filename file="%s" link="output"/>""" % f | def write_abstract_dag(self): """ Write all the nodes in the workflow to the DAX file. """ if not self.__dax_file_path: # this workflow is not dax-compatible, so don't write a dax return try: dagfile = open( self.__dax_file_path, 'w' ) except: raise CondorDAGError, "Cannot open file " + self.__dag_file_path | 34f5795fcb60d7590187acbce0f34abf68d1c803 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/34f5795fcb60d7590187acbce0f34abf68d1c803/pipeline.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
17801,
67,
30204,
12,
2890,
4672,
3536,
2598,
777,
326,
2199,
316,
326,
6095,
358,
326,
463,
2501,
585,
18,
3536,
309,
486,
365,
16186,
72,
651,
67,
768,
67,
803,
30,
468,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
17801,
67,
30204,
12,
2890,
4672,
3536,
2598,
777,
326,
2199,
316,
326,
6095,
358,
326,
463,
2501,
585,
18,
3536,
309,
486,
365,
16186,
72,
651,
67,
768,
67,
803,
30,
468,
... | |
check = getattr(self, 'postConnectionCheck', Connection.clientPostConnectionCheck) | check = getattr(self, 'postConnectionCheck', self.clientPostConnectionCheck) | def connect(self, addr): self.socket.connect(addr) self.addr = addr self.setup_ssl() self.set_connect_state() ret = self.connect_ssl() check = getattr(self, 'postConnectionCheck', Connection.clientPostConnectionCheck) if check is not None: if not check(self.get_peer_cert(), self.addr[0]): raise Checker.SSLVerificationError, 'post connection check failed' return ret | 67b7566b58de5103197c4dd76dc1065c78ef0dc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8055/67b7566b58de5103197c4dd76dc1065c78ef0dc3/Connection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3077,
12,
2890,
16,
3091,
4672,
365,
18,
7814,
18,
3612,
12,
4793,
13,
365,
18,
4793,
273,
3091,
365,
18,
8401,
67,
8157,
1435,
365,
18,
542,
67,
3612,
67,
2019,
1435,
325,
273,
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,
3077,
12,
2890,
16,
3091,
4672,
365,
18,
7814,
18,
3612,
12,
4793,
13,
365,
18,
4793,
273,
3091,
365,
18,
8401,
67,
8157,
1435,
365,
18,
542,
67,
3612,
67,
2019,
1435,
325,
273,
365,... |
name = (None, name, None) else: name = pair + [None] | name = (None, name) | def end_element_ns(self, name): pair = name.split() if len(pair) == 1: name = (None, name, None) else: name = pair + [None] # prefix is not implemented yet! self._cont_handler.endElement(name, None) | c5252b9fd6d85186c0b2dd684b36bb5006dca568 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c5252b9fd6d85186c0b2dd684b36bb5006dca568/expatreader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
679,
67,
2956,
67,
2387,
12,
2890,
16,
508,
4672,
3082,
273,
508,
18,
4939,
1435,
309,
562,
12,
6017,
13,
422,
404,
30,
508,
273,
261,
7036,
16,
508,
13,
468,
1633,
353,
486,
8249,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
679,
67,
2956,
67,
2387,
12,
2890,
16,
508,
4672,
3082,
273,
508,
18,
4939,
1435,
309,
562,
12,
6017,
13,
422,
404,
30,
508,
273,
261,
7036,
16,
508,
13,
468,
1633,
353,
486,
8249,
... |
query = urllib.unquote_plus(query) | def __init__(self, query): if query: query = urllib.unquote_plus(query) for x in query.split('&'): if x: key, value = x.split('=', 1) dict.__setitem__(self, key, value) | c7fe76ee9c9dd1e69923db3295414f0642bc44cd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/c7fe76ee9c9dd1e69923db3295414f0642bc44cd/generic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
843,
4672,
309,
843,
30,
364,
619,
316,
843,
18,
4939,
2668,
26045,
4672,
309,
619,
30,
498,
16,
460,
273,
619,
18,
4939,
2668,
33,
2187,
404,
13,
2065... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
843,
4672,
309,
843,
30,
364,
619,
316,
843,
18,
4939,
2668,
26045,
4672,
309,
619,
30,
498,
16,
460,
273,
619,
18,
4939,
2668,
33,
2187,
404,
13,
2065... | |
varURI = self._baseURI + " | varURI = self._store.newSymbol(self._baseURI + " | def variable(self, str, i, res): | 0369e3821f75d437bac671db93ee7802d671e669 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/0369e3821f75d437bac671db93ee7802d671e669/notation3.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2190,
12,
2890,
16,
609,
16,
277,
16,
400,
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,
... | [
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,
2190,
12,
2890,
16,
609,
16,
277,
16,
400,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
def Subdirs(dirlist): | def Subdirs(env, dirlist): | def Subdirs(dirlist): for file in _subconf_list(dirlist): SCons.Script.SConscript.SConscript(file, "env") | f1f8f507a4fe83128e418ecdb7c7d1474489187f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12817/f1f8f507a4fe83128e418ecdb7c7d1474489187f/scan-once.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2592,
8291,
12,
3074,
16,
1577,
1098,
4672,
364,
585,
316,
389,
1717,
3923,
67,
1098,
12,
1214,
1098,
4672,
20487,
18,
3651,
18,
55,
442,
4263,
18,
55,
442,
4263,
12,
768,
16,
315,
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,
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,
2592,
8291,
12,
3074,
16,
1577,
1098,
4672,
364,
585,
316,
389,
1717,
3923,
67,
1098,
12,
1214,
1098,
4672,
20487,
18,
3651,
18,
55,
442,
4263,
18,
55,
442,
4263,
12,
768,
16,
315,
3... |
print '_'+encoding+'_' print type(encoding) | def GetEncoding(self): """ Return the dicom encoding DICOM standard tag (0x0008, 0x0005) was used. """ tag = gdcm.Tag(0x0008, 0x0005) ds = self.gdcm_reader.GetFile().GetDataSet() if ds.FindDataElement(tag): encoding = str(ds.GetDataElement(tag).GetValue()) | f4fb28232816f7863151a84c929cbc9577814306 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10228/f4fb28232816f7863151a84c929cbc9577814306/dicom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
4705,
12,
2890,
4672,
3536,
2000,
326,
29357,
2688,
30530,
4529,
1047,
261,
20,
92,
3784,
28,
16,
374,
92,
3784,
25,
13,
1703,
1399,
18,
3536,
1047,
273,
314,
7201,
81,
18,
1805,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4705,
12,
2890,
4672,
3536,
2000,
326,
29357,
2688,
30530,
4529,
1047,
261,
20,
92,
3784,
28,
16,
374,
92,
3784,
25,
13,
1703,
1399,
18,
3536,
1047,
273,
314,
7201,
81,
18,
1805,
... | |
def tmpl_create_adminactivities_menu(req, ln, selected, url_referer, guest, username, submitter, referee, admin, usebaskets, usemessages, usealerts, usegroups, useloans, usestats, activities): | def tmpl_create_adminactivities_menu(self, req, ln, selected, url_referer, guest, username, submitter, referee, admin, usebaskets, usemessages, usealerts, usegroups, useloans, usestats, activities): | def tmpl_create_adminactivities_menu(req, ln, selected, url_referer, guest, username, submitter, referee, admin, usebaskets, usemessages, usealerts, usegroups, useloans, usestats, activities): """ Returns the main navigation menu with actions based on user's priviledges | 932e210e96119b402343c23c81db3bf46426a666 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12027/932e210e96119b402343c23c81db3bf46426a666/websession_templates.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10720,
67,
2640,
67,
3666,
24745,
67,
5414,
12,
2890,
16,
1111,
16,
7211,
16,
3170,
16,
880,
67,
28596,
16,
13051,
16,
2718,
16,
4879,
387,
16,
8884,
1340,
16,
3981,
16,
999,
70,
835... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10720,
67,
2640,
67,
3666,
24745,
67,
5414,
12,
2890,
16,
1111,
16,
7211,
16,
3170,
16,
880,
67,
28596,
16,
13051,
16,
2718,
16,
4879,
387,
16,
8884,
1340,
16,
3981,
16,
999,
70,
835... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.