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
right x * %f / %f * %f location <%f, 99999, %f> look_at <%f, 0, %f> }''' % ( max(max_x - min_x, max_z-min_z), step_x, step_z, max(max_x-min_x, max_z-min_z), (max_x - min_x) / 2, (max_z - min_z) / 2, (max_x - min_x) / 2, (max_z - min_z) /2)
right x*%f location <%f, %f, %f> look_at <%f, %f, %f> }''' % ((max_z-min_z), (max_x-min_x), (max_x + min_x) / 2, max_y+1, (max_z + min_z) / 2, (max_x + min_x) / 2, min_y-1, (max_z + min_z) / 2)
def make_pov(fname, include, step_x, step_y, step_z): 'Write a povray file that displays our included object' min_x = include.min_x() max_x = include.max_x() min_y = include.min_y() max_y = include.max_y() min_z = include.min_z() max_z = include.max_z() camera = '''camera { orthographic up y*%f right x * %f / %f * %f location <%f, 99999, %f> look_at <%f, 0, %f> }''' % ( max(max_x - min_x, max_z-min_z), step_x, step_z, max(max_x-min_x, max_z-min_z), (max_x - min_x) / 2, (max_z - min_z) / 2, (max_x - min_x) / 2, (max_z - min_z) /2) pov = '''// Generated by stl2gcode. Edits might get clobbered. #include "%s" background {color rgb 1 } %s intersection { object { %s } box { <%f, %f, %f>, <%f, %f, %f> translate y * frame_number * %f } }''' % (fname+'.inc', camera, include.name(), 2*min_x, min_y, min_z*2, 2*max_x, min_y + step_y, max_z*2, step_y) out = open(fname+'.pov', 'w') out.write(pov) out.close
f591e9d2ac2cab25ecb7d88489490874838d0368 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/479/f591e9d2ac2cab25ecb7d88489490874838d0368/stl2gcode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 84, 1527, 12, 12749, 16, 2341, 16, 2235, 67, 92, 16, 2235, 67, 93, 16, 2235, 67, 94, 4672, 296, 3067, 279, 293, 1527, 435, 585, 716, 22461, 3134, 5849, 733, 11, 1131, 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, 1221, 67, 84, 1527, 12, 12749, 16, 2341, 16, 2235, 67, 92, 16, 2235, 67, 93, 16, 2235, 67, 94, 4672, 296, 3067, 279, 293, 1527, 435, 585, 716, 22461, 3134, 5849, 733, 11, 1131, 67, ...
self._reader = RecordReader.StartsWith(handle, "LOCUS")
self._reader = RecordReader.StartsWith(_handle, "LOCUS")
def __init__(self, handle, parser = None, has_header = 0): """Initialize the iterator.
fa1113e382ee506b5da70487680d0b478737d7fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/fa1113e382ee506b5da70487680d0b478737d7fc/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1640, 16, 2082, 273, 599, 16, 711, 67, 3374, 273, 374, 4672, 3536, 7520, 326, 2775, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 1640, 16, 2082, 273, 599, 16, 711, 67, 3374, 273, 374, 4672, 3536, 7520, 326, 2775, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
L{TranssysInstanceCoordinates.time_series} for all the TranssysInstances
L{TranssysInstanceCoordinated.time_series} for all the TranssysInstances
def update_function(self, timesteps, rndseed = None) : """ Calculates the new transsys instance.
4e4693a52c95717018319fd37fd5d71cecb79c4f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1770/4e4693a52c95717018319fd37fd5d71cecb79c4f/translattice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 915, 12, 2890, 16, 17145, 13058, 16, 20391, 12407, 273, 599, 13, 294, 3536, 26128, 326, 394, 906, 9499, 791, 18, 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, 1089, 67, 915, 12, 2890, 16, 17145, 13058, 16, 20391, 12407, 273, 599, 13, 294, 3536, 26128, 326, 394, 906, 9499, 791, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
import os if "fork" not in dir(os): print """ There is no os.fork() function. Rubber needs it to run external programs, so it won't run on this system.""" print "There is a function os.fork(), good."
def do_check (): """ Check that everything required for Rubber is present. """ print "The configure script is running, good." try: import distutils.core print "The Distutils are installed, good." except ImportError: print """
205cd20213c7231c95b0ea9e173e7f478171ef8c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10102/205cd20213c7231c95b0ea9e173e7f478171ef8c/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 1893, 1832, 30, 3536, 2073, 716, 7756, 1931, 364, 534, 373, 744, 353, 3430, 18, 3536, 1172, 315, 1986, 5068, 2728, 353, 3549, 16, 7494, 1199, 775, 30, 1930, 2411, 5471, 18, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 741, 67, 1893, 1832, 30, 3536, 2073, 716, 7756, 1931, 364, 534, 373, 744, 353, 3430, 18, 3536, 1172, 315, 1986, 5068, 2728, 353, 3549, 16, 7494, 1199, 775, 30, 1930, 2411, 5471, 18, 36...
node_list = nodes.reference(refuri=data)
reference = nodes.reference(refuri=data)
def image(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): reference = ''.join(arguments[0].split('\n')) if reference.find(' ') != -1: error = state_machine.reporter.error( 'Image URI contains whitespace.', nodes.literal_block(block_text, block_text), line=lineno) return [error] options['uri'] = reference if options.has_key('target'): block = states.escape2null(options['target']).splitlines() block = [line for line in block] target_type, data = state.parse_target(block, block_text, lineno) if target_type == 'refuri': node_list = nodes.reference(refuri=data) elif target_type == 'refname': node_list = nodes.reference( refname=data, name=whitespace_normalize_name(options['target'])) state.document.note_refname(node_list) else: # malformed target node_list = [data] # data is a system message del options['target'] else: node_list = [] node_list.append(nodes.image(block_text, **options)) return node_list
49fa83d013a9c53c428a44d2e5b7ad9d3954394a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/49fa83d013a9c53c428a44d2e5b7ad9d3954394a/images.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1316, 12, 529, 16, 1775, 16, 702, 16, 913, 16, 7586, 16, 913, 67, 3348, 16, 1203, 67, 955, 16, 919, 16, 919, 67, 9149, 4672, 2114, 273, 875, 18, 5701, 12, 7099, 63, 20, 8009, 4939,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1316, 12, 529, 16, 1775, 16, 702, 16, 913, 16, 7586, 16, 913, 67, 3348, 16, 1203, 67, 955, 16, 919, 16, 919, 67, 9149, 4672, 2114, 273, 875, 18, 5701, 12, 7099, 63, 20, 8009, 4939,...
file_name=params.outlier_utils.input.xray_data.file_name)
file_name=params.outlier_utils.input.xray_data.file_name)
def outlier_utils(args): if len(args)==0: print_help() elif ( "--help" in args ): print_help() elif ( "--h" in args ): print_help() elif ("-h" in args ): print_help() else: log = multi_out() if (not "--quiet" in args): log.register(label="stdout", file_object=sys.stdout) string_buffer = StringIO() string_buffer_plots = StringIO() log.register(label="log_buffer", file_object=string_buffer) phil_objects = [] argument_interpreter = libtbx.phil.command_line.argument_interpreter( master_params=master_params, home_scope="outlier_detection") for arg in args: command_line_params = None arg_is_processed = False # is it a file? if arg=="--quiet": arg_is_processed = True if (os.path.isfile(arg)): ## is this a file name? # check if it is a phil file try: command_line_params = iotbx.phil.parse(file_name=arg) if command_line_params is not None: phil_objects.append(command_line_params) arg_is_processed = True except KeyboardInterrupt: raise except : pass else: try: command_line_params = argument_interpreter.process(arg=arg) if command_line_params is not None: phil_objects.append(command_line_params) arg_is_processed = True except KeyboardInterrupt: raise except : pass if not arg_is_processed: print >> log, "##----------------------------------------------##" print >> log, "## Unknown file or keyword:", arg print >> log, "##----------------------------------------------##" print >> log raise Sorry("Unknown file or keyword: %s" % arg) effective_params = master_params.fetch(sources=phil_objects) params = effective_params.extract() # now get the unit cell from the pdb file hkl_xs = None if params.outlier_utils.input.xray_data.file_name is not None: hkl_xs = crystal_symmetry_from_any.extract_from( file_name=params.outlier_utils.input.xray_data.file_name) pdb_xs = None if params.outlier_utils.input.model.file_name is not None: pdb_xs = crystal_symmetry_from_any.extract_from( file_name=params.outlier_utils.input.model.file_name) phil_xs = crystal.symmetry( unit_cell=params.outlier_utils.input.unit_cell, space_group_info=params.outlier_utils.input.space_group ) combined_xs = select_crystal_symmetry( None,phil_xs, [pdb_xs],[hkl_xs]) # inject the unit cell and symmetry in the phil scope please params.outlier_utils.input.unit_cell = combined_xs.unit_cell() params.outlier_utils.input.space_group = \ sgtbx.space_group_info( group = combined_xs.space_group() ) new_params = master_params.format(python_object=params) new_params.show(out=log) if params.outlier_utils.input.unit_cell is None: raise Sorry("unit cell not specified") if params.outlier_utils.input.space_group is None: raise Sorry("space group not specified") if params.outlier_utils.input.xray_data.file_name is None: raise Sorry("Xray data not specified") if params.outlier_utils.input.model.file_name is None: print "PDB file not specified. Basic wilson outlier rejections only." #----------------------------------------------------------- # # step 1: read in the reflection file # phil_xs = crystal.symmetry( unit_cell=params.outlier_utils.input.unit_cell, space_group_info=params.outlier_utils.input.space_group ) xray_data_server = reflection_file_utils.reflection_file_server( crystal_symmetry = phil_xs, force_symmetry = True, reflection_files=[]) miller_array = None miller_array = xray_data_server.get_xray_data( file_name = params.outlier_utils.input.xray_data.file_name, labels = params.outlier_utils.input.xray_data.obs_labels, ignore_all_zeros = True, parameter_scope = 'outlier_utils.input.xray_data', parameter_name = 'obs_labels' ) info = miller_array.info() miller_array = miller_array.map_to_asu() miller_array = miller_array.select( miller_array.indices() != (0,0,0)) miller_array = miller_array.select( miller_array.data() > 0 ) if miller_array.sigmas() is not None: miller_array = miller_array.select( miller_array.sigmas() > 0 ) if (miller_array.is_xray_intensity_array()): miller_array = miller_array.f_sq_as_f() elif (miller_array.is_complex_array()): miller_array = abs(miller_array) miller_array.set_info(info) merged_anomalous=False if miller_array.anomalous_flag(): miller_array = miller_array.average_bijvoet_mates().set_observation_type( miller_array ) merged_anomalous=True miller_array = miller_array.map_to_asu() # get the free reflections please free_flags = None if params.outlier_utils.input.xray_data.free_flags is None: free_flags = miller_array.generate_r_free_flags( fraction=params.outlier_utils.\ additional_parameters.free_flag_generation.fraction, max_free=params.outlier_utils.\ additional_parameters.free_flag_generation.max_number, lattice_symmetry_max_delta=params.outlier_utils.\ additional_parameters.free_flag_generation.lattice_symmetry_max_delta, use_lattice_symmetry=params.outlier_utils.\ additional_parameters.free_flag_generation.use_lattice_symmetry ) else: free_flags = xray_data_server.get_xray_data( file_name = params.outlier_utils.input.xray_data.file_name, labels = params.outlier_utils.input.xray_data.free_flags, ignore_all_zeros = True, parameter_scope = 'outlier_utils.input.xray_data', parameter_name = 'free_flags' ) if miller_array.anomalous_flag(): free_flags = free_flags.miller_array.average_bijvoet_mates() merged_anomalous=True free_flags = free_flags.common_set( miller_array ) free_flags = free_flags.customized_copy( data = flex.bool( free_flags.data()== 1 )) free_flags = free_flags.common_set( miller_array ).map_to_asu() free_flags, miller_array = free_flags.common_sets( miller_array ) print >> log print >> log, "Summary info of observed data" print >> log, "=============================" miller_array.show_summary(f=log) if merged_anomalous: print >> log, "For outlier detection purposes, the Bijvoet pairs have been merged." print >> log print >> log, "Constructing an outlier manager" print >> log, "===============================" print >> log outlier_manager = outlier_rejection.outlier_manager( miller_array, out=log) basic_array = None extreme_array = None model_based_array = None basic_array = outlier_manager.basic_wilson_outliers( p_basic_wilson = params.outlier_utils.outlier_detection.\ parameters.basic_wilson.level, return_array = True) extreme_array = outlier_manager.extreme_wilson_outliers( p_extreme_wilson = params.outlier_utils.outlier_detection.parameters.\ extreme_wilson.level, return_array = True) #---------------------------------------------------------------- # Step 2: get an xray structure from the PDB file # if params.outlier_utils.input.model.file_name is not None: model = xray_structure.from_pdb( file_name=params.outlier_utils.input.model.file_name, crystal_symmetry=phil_xs, force_symmetry=True) print >> log, "Atomic model summary" print >> log, "====================" model.show_summary(f=log) print >> log # please make an f_model object for bulk solvent scaling etc etc f_model_object = f_model.manager( f_obs = miller_array, r_free_flags = free_flags, xray_structure = model ) print >> log, "Bulk solvent scaling of the data" print >> log, "================================" print >> log, "Maximum likelihood bulk solvent scaling." print >> log f_model_object.update_solvent_and_scale(out=log) b_cart = f_model_object.b_cart() k_sol = f_model_object.k_sol() b_sol = f_model_object.b_sol() ls_scale = 1.0/f_model_object.scale_k1() print >> log print >> log, "The observed data is scaled by a multiplier" print >> log, "equal to %5.2e"%(ls_scale) print >> log, "This brings the data to an approximate absolute scale." # update the outlier object please outlier_manager.apply_scale_to_original_data( ls_scale) free_flags = free_flags.common_set( outlier_manager.miller_obs ) # redo the f model object please f_model_object = f_model.manager( f_obs = outlier_manager.miller_obs, r_free_flags = free_flags, xray_structure = model) # reset the bulk solvent parameters please f_model_object.update_core(b_cart=b_cart, k_sol=k_sol, b_sol=b_sol) f_model_data = f_model_object.f_model() plot_out = StringIO() # get alphas and betas please alpha,beta = f_model_object.alpha_beta() # get suspected outliers model_based_array = outlier_manager.model_based_outliers( f_model_data, alpha, beta, level=params.outlier_utils.outlier_detection.parameters.model_based.level, return_array=True, plot_out=plot_out) #check what needs to be put out please if params.outlier_utils.output.hklout is not None: if params.outlier_utils.outlier_detection.protocol == "model": if params.outlier_utils.input.model.file_name == None: print >> log, "Model based rejections requested. No model was supplied." print >> log, "Switching to writing out rejections based on extreme value Wilson statistics." params.outlier_utils.outlier_detection.protocol="extreme" output_array = None print >> log if params.outlier_utils.outlier_detection.protocol == "basic": print >> log, "Outliers found by the basic wilson statistics" print >> log, "protocol will be written out." output_array = basic_array new_set_of_free_flags = free_flags.common_set( basic_array ) if params.outlier_utils.outlier_detection.protocol == "extreme": print >> log, "Outliers found by the extreme value wilson statistics" print >> log, "protocol will be written out." output_array = extreme_array new_set_of_free_flags = free_flags.common_set( extreme_array ) if params.outlier_utils.outlier_detection.protocol == "model": print >> log, "Outliers found by the model based" print >> log, "protocol will be written out to the file:" print >> log, params.outlier_utils.output.hklout print >> log output_array = model_based_array new_set_of_free_flags = free_flags.common_set( model_based_array ) mtz_dataset = output_array.as_mtz_dataset( column_root_label="FOBS") mtz_dataset = mtz_dataset.add_miller_array( miller_array = new_set_of_free_flags, column_root_label = "Free_R_Flag" ) mtz_dataset.mtz_object().write( file_name=params.outlier_utils.output.hklout) if params.outlier_utils.output.logfile is not None: final_log = StringIO() print >> final_log, string_buffer.getvalue() print >> final_log print >> final_log, plot_out.getvalue() outfile = open( params.outlier_utils.output.logfile, 'w' ) outfile.write( final_log.getvalue() ) print >> log print >> log, "A logfile named %s was created."%( params.outlier_utils.output.logfile) print >> log, "This logfile contains the screen output and" print >> log, "(possibly) some ccp4 style loggraph plots"
95ea40706150efdd497c59bd7453515caa13e6e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/95ea40706150efdd497c59bd7453515caa13e6e4/remove_outliers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 596, 9800, 67, 5471, 12, 1968, 4672, 309, 562, 12, 1968, 13, 631, 20, 30, 1172, 67, 5201, 1435, 1327, 261, 5238, 5201, 6, 316, 833, 262, 30, 1172, 67, 5201, 1435, 1327, 261, 5238, 76...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 596, 9800, 67, 5471, 12, 1968, 4672, 309, 562, 12, 1968, 13, 631, 20, 30, 1172, 67, 5201, 1435, 1327, 261, 5238, 5201, 6, 316, 833, 262, 30, 1172, 67, 5201, 1435, 1327, 261, 5238, 76...
cmd_dict = { 'command': 'WaitForInfobarCount', 'count': count, 'tab_index': tab_index, }
def WaitForInfobarCount(self, count, windex=0, tab_index=0): """Wait until infobar count becomes |count|.
a9373e05f607d2a25b2a2861419b2a2e487dbda9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/a9373e05f607d2a25b2a2861419b2a2e487dbda9/pyauto.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24129, 966, 3215, 1380, 12, 2890, 16, 1056, 16, 341, 1615, 33, 20, 16, 3246, 67, 1615, 33, 20, 4672, 3536, 5480, 3180, 1123, 3215, 1056, 12724, 571, 1883, 96, 18, 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, 24129, 966, 3215, 1380, 12, 2890, 16, 1056, 16, 341, 1615, 33, 20, 16, 3246, 67, 1615, 33, 20, 4672, 3536, 5480, 3180, 1123, 3215, 1056, 12724, 571, 1883, 96, 18, 2, -100, -100, -100, ...
in H1,H2,L1 time, then there are 6 categories for H1,H2,L1 time: three param
in H1,H2,L1 time, then there are 6 categories for H1,H2,L1 time: three
def get_next_id(connection, table, id_column): """ Gets the next available id in the specified id_column in the specified table. """ sqlquery = ' '.join(['SELECT', id_column, 'FROM', table ]) ids = [id[0] for id in connection.cursor().execute(sqlquery)] idnums = [int(id.split(':')[2]) for id in ids] new_idnum = max(idnums) + 1 new_id = ':'.join([ids[0].split(':')[0], ids[1].split(':')[1], str(new_idnum)]) return new_id
562169c874c243a11ae23d004e13cc0c8cbdf521 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/562169c874c243a11ae23d004e13cc0c8cbdf521/ligolw_sqlutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4285, 67, 350, 12, 4071, 16, 1014, 16, 612, 67, 2827, 4672, 3536, 11881, 326, 1024, 2319, 612, 316, 326, 1269, 612, 67, 2827, 316, 326, 1269, 1014, 18, 3536, 1847, 2271, 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, 336, 67, 4285, 67, 350, 12, 4071, 16, 1014, 16, 612, 67, 2827, 4672, 3536, 11881, 326, 1024, 2319, 612, 316, 326, 1269, 612, 67, 2827, 316, 326, 1269, 1014, 18, 3536, 1847, 2271, 273, ...
import glob
def getFilesForName(name): """ Get a list of module files for a filename, a module or package name, or a directory. """ import imp if not os.path.exists(name): # check for glob chars if containsAny(name, "*?[]"): import glob files = glob.glob(name) list = [] for file in files: list.extend(getFilesForName(file)) return list # try to find module or package name = _get_modpkg_path(name) if not name: return [] if os.path.isdir(name): # find all python files in directory list = [] os.path.walk(name, _visit_pyfiles, list) return list elif os.path.exists(name): # a single file return [name] return []
580440e357ef5697439695d88ac36c3974e15cf7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/580440e357ef5697439695d88ac36c3974e15cf7/pygettext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18262, 1290, 461, 12, 529, 4672, 3536, 968, 279, 666, 434, 1605, 1390, 364, 279, 1544, 16, 279, 1605, 578, 2181, 508, 16, 578, 279, 1867, 18, 3536, 1930, 1646, 225, 309, 486, 1140, 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, 18262, 1290, 461, 12, 529, 4672, 3536, 968, 279, 666, 434, 1605, 1390, 364, 279, 1544, 16, 279, 1605, 578, 2181, 508, 16, 578, 279, 1867, 18, 3536, 1930, 1646, 225, 309, 486, 1140, 18,...
'ab': [u'Акатегориа', 'Категория'],
'ab': [u'Акатегориа', u'Категория'],
def __init__(self): self.name = None
edaa661e79306c74fec751f604b821b032189acb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4404/edaa661e79306c74fec751f604b821b032189acb/family.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 529, 273, 599, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 529, 273, 599, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
bitrate = self.get_bitrate_from_settings()
def update_example(self): sound_file = SoundFile(os.path.expanduser("~/foo/bar.flac")) sound_file.add_tags({ "artist": "Foo Bar", "title": "Hi Ho", "album": "IS: TOO", "track-number": 1L, "track-count": 11L, }) self.example.set_text(self.generate_filename(sound_file)) bitrate = self.get_bitrate_from_settings() markup = _("<small>Target bitrate: %s</small>") % self.get_bitrate_from_settings() self.aprox_bitrate.set_markup( markup )
fb263caf044aa99ff978564e088e8ab6a2b54428 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2369/fb263caf044aa99ff978564e088e8ab6a2b54428/soundconverter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 8236, 12, 2890, 4672, 14190, 67, 768, 273, 348, 772, 812, 12, 538, 18, 803, 18, 12320, 1355, 2932, 98, 19, 11351, 19, 3215, 18, 2242, 1077, 6, 3719, 14190, 67, 768, 18, 128...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 8236, 12, 2890, 4672, 14190, 67, 768, 273, 348, 772, 812, 12, 538, 18, 803, 18, 12320, 1355, 2932, 98, 19, 11351, 19, 3215, 18, 2242, 1077, 6, 3719, 14190, 67, 768, 18, 128...
def _fill_surface(self, surf): palette = self.test_palette
def _fill_surface(self, surf, palette=None): if palette is None: palette = self.test_palette
def _fill_surface(self, surf): palette = self.test_palette surf.fill(palette[1]) surf.fill(palette[2], (1, 2, 1, 2))
da1dba8599cf786a2b9e2d9d4eeef8d5753e462b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1298/da1dba8599cf786a2b9e2d9d4eeef8d5753e462b/surface_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5935, 67, 18266, 12, 2890, 16, 22253, 16, 12127, 33, 7036, 4672, 309, 12127, 353, 599, 30, 12127, 273, 365, 18, 3813, 67, 26474, 22253, 18, 5935, 12, 26474, 63, 21, 5717, 22253, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 5935, 67, 18266, 12, 2890, 16, 22253, 16, 12127, 33, 7036, 4672, 309, 12127, 353, 599, 30, 12127, 273, 365, 18, 3813, 67, 26474, 22253, 18, 5935, 12, 26474, 63, 21, 5717, 22253, 1...
"""Process the request"""
"""Process the request."""
def process(self): """Process the request"""
da1dca3f77b894f6d64135657128f461356526df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/da1dca3f77b894f6d64135657128f461356526df/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2890, 4672, 3536, 2227, 326, 590, 8395, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2890, 4672, 3536, 2227, 326, 590, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Form.form({key: value})
Form.form(self, {key: value})
def __setitem__(self, key, value): Form.form({key: value})
49fa2bdaa124e99c62ea901c8151eaa064f79c6d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/49fa2bdaa124e99c62ea901c8151eaa064f79c6d/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1726, 972, 12, 2890, 16, 498, 16, 460, 4672, 2748, 18, 687, 12590, 856, 30, 460, 6792, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1726, 972, 12, 2890, 16, 498, 16, 460, 4672, 2748, 18, 687, 12590, 856, 30, 460, 6792, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def enterFullScreen(self, parent):
def enterFullScreen(self, videoWindow):
def enterFullScreen(self, parent): if self.isVisible(): newFrame = self.frame() newFrame.size.width = 824 newFrame.origin.x = self.getHorizontalPosition(self, newFrame.size.width) self.setFrame_display_animate_(newFrame, YES, YES) self.adjustContent(parent, True) self.fsButton.setImage_(NSImage.imageNamed_('fs-button-exitfullscreen')) self.fsButton.setAlternateImage_(NSImage.imageNamed_('fs-button-exitfullscreen-alt')) else: NSCursor.setHiddenUntilMouseMoves_(YES)
0c83227b10207b99cca235dd965b652346d54092 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/0c83227b10207b99cca235dd965b652346d54092/VideoDisplay.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6103, 5080, 7956, 12, 2890, 16, 6191, 3829, 4672, 309, 365, 18, 291, 6207, 13332, 394, 3219, 273, 365, 18, 3789, 1435, 394, 3219, 18, 1467, 18, 2819, 273, 1725, 3247, 394, 3219, 18, 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, 6103, 5080, 7956, 12, 2890, 16, 6191, 3829, 4672, 309, 365, 18, 291, 6207, 13332, 394, 3219, 273, 365, 18, 3789, 1435, 394, 3219, 18, 1467, 18, 2819, 273, 1725, 3247, 394, 3219, 18, 10...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.DoubleField.__init__(self, 228) else quickfix.DoubleField.__init__(self, 228, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 5265, 974, 16186, 2738, 972, 12, 2890, 16, 576, 6030, 13, 469, 9549, 904, 18, 5265, 974, 16186, 2738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 5265, 974, 16186, 2738, 972, 12, 2890, 16, 576, 6030, 13, 469, 9549, 904, 18, 5265, 974, 16186, 2738, ...
self.logger.info("inner object: Converting %s" % object_node)
self.logger.debug("inner object: Converting %s" % object_node)
def _convert_inner_object(self, object_node, id, name): self.logger.info("inner object: Converting %s" % object_node) inner_object_def = self._convert_object(object_node, prefix="%s.%s" % (id, name)) self.objects.append(inner_object_def) return InnerObjectDef(name, inner_object_def)
f640b15368e4d3037d291c060bcc1380e557323f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7713/f640b15368e4d3037d291c060bcc1380e557323f/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6283, 67, 7872, 67, 1612, 12, 2890, 16, 733, 67, 2159, 16, 612, 16, 508, 4672, 365, 18, 4901, 18, 4148, 2932, 7872, 733, 30, 4037, 310, 738, 87, 6, 738, 733, 67, 2159, 13, 344...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6283, 67, 7872, 67, 1612, 12, 2890, 16, 733, 67, 2159, 16, 612, 16, 508, 4672, 365, 18, 4901, 18, 4148, 2932, 7872, 733, 30, 4037, 310, 738, 87, 6, 738, 733, 67, 2159, 13, 344...
print x return x
def __del__(self): x = self.ref() print x return x
edb969c190091dab2a3065203fcfd618c25be893 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/edb969c190091dab2a3065203fcfd618c25be893/test_descr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 972, 12, 2890, 4672, 619, 273, 365, 18, 1734, 1435, 1172, 619, 327, 619, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 972, 12, 2890, 4672, 619, 273, 365, 18, 1734, 1435, 1172, 619, 327, 619, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
The following is Trac is not recognized as being a field at this time, so the fraction field is not the quotient ring itself::
The following is Trac is not recognized as being a field at this time, so the fraction field is not the quotient ring itself::
def is_prime(self, **kwds): r""" Return ``True`` if this ideal is prime.
48cee9f14eb7438c715a4e520f22f10491e7ac22 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/48cee9f14eb7438c715a4e520f22f10491e7ac22/multi_polynomial_ideal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 16382, 12, 2890, 16, 2826, 25577, 4672, 436, 8395, 2000, 12176, 5510, 10335, 309, 333, 23349, 353, 17014, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 353, 67, 16382, 12, 2890, 16, 2826, 25577, 4672, 436, 8395, 2000, 12176, 5510, 10335, 309, 333, 23349, 353, 17014, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def __exc_info(self): """Return a version of sys.exc_info() with the traceback frame minimised; usually the top level of the traceback frame is not needed. """ exctype, excvalue, tb = sys.exc_info() newtb = tb.tb_next if newtb is None: return (exctype, excvalue, tb) return (exctype, excvalue, newtb)
def __exc_info(self): """Return a version of sys.exc_info() with the traceback frame minimised; usually the top level of the traceback frame is not needed. """ exctype, excvalue, tb = sys.exc_info() newtb = tb.tb_next if newtb is None: return (exctype, excvalue, tb) return (exctype, excvalue, newtb)
99fb595cca41d33d36ab582c50081efd19939891 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/99fb595cca41d33d36ab582c50081efd19939891/unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 10075, 67, 1376, 12, 2890, 4672, 3536, 990, 279, 1177, 434, 2589, 18, 10075, 67, 1376, 1435, 598, 326, 10820, 2623, 18172, 5918, 31, 11234, 326, 1760, 1801, 434, 326, 10820, 2623, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 10075, 67, 1376, 12, 2890, 4672, 3536, 990, 279, 1177, 434, 2589, 18, 10075, 67, 1376, 1435, 598, 326, 10820, 2623, 18172, 5918, 31, 11234, 326, 1760, 1801, 434, 326, 10820, 2623, ...
rea = BecauseBuiltIn(con, subj, pred, result)
def tryBuiltin(self, queue, bindings, evidence): """Check for built-in functions to see whether it will resolve. Return codes: 0 - give up;
87dd3ec5a136c7328a444febe73d542a9d5aea70 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/87dd3ec5a136c7328a444febe73d542a9d5aea70/query.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 775, 28032, 12, 2890, 16, 2389, 16, 7394, 16, 14481, 4672, 3536, 1564, 364, 225, 6650, 17, 267, 4186, 358, 2621, 2856, 518, 903, 2245, 18, 2000, 6198, 30, 225, 374, 300, 8492, 731, 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, 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, 775, 28032, 12, 2890, 16, 2389, 16, 7394, 16, 14481, 4672, 3536, 1564, 364, 225, 6650, 17, 267, 4186, 358, 2621, 2856, 518, 903, 2245, 18, 2000, 6198, 30, 225, 374, 300, 8492, 731, 31,...
p2 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1 \\2", p2)
p2n = re.sub(r'(\w)[^a-zA-Z0-9\s\:](\w)', "\\1 \\2", p2)
def perform_request_search(req=None, cc=cdsname, c=None, p="", f="", rg="10", sf="", so="d", sp="", of="hb", ot="", as="0", p1="", f1="", m1="", op1="", p2="", f2="", m2="", op2="", p3="", f3="", m3="", sc="0", jrec="0", id="-1", idb="-1", sysnb="", search="SEARCH", d1y="", d1m="", d1d="", d2y="", d2m="", d2d=""): """Perform search, without checking for authentication. Return list of recIDs found, if of=id. Otherwise create web page.""" # wash all passed arguments: cc = wash_url_argument(cc, 'str') p = wash_url_argument(p, 'str') f = wash_url_argument(f, 'str') rg = wash_url_argument(rg, 'int') sf = wash_url_argument(sf, 'str') so = wash_url_argument(so, 'str') sp = wash_url_argument(sp, 'string') of = wash_url_argument(of, 'str') if type(ot) is list: ot = string.join(ot,",") ot = wash_url_argument(ot, 'str') as = wash_url_argument(as, 'int') p1 = wash_url_argument(p1, 'str') f1 = wash_url_argument(f1, 'str') m1 = wash_url_argument(m1, 'str') op1 = wash_url_argument(op1, 'str') p2 = wash_url_argument(p2, 'str') f2 = wash_url_argument(f2, 'str') m2 = wash_url_argument(m2, 'str') op2 = wash_url_argument(op2, 'str') p3 = wash_url_argument(p3, 'str') f3 = wash_url_argument(f3, 'str') m3 = wash_url_argument(m3, 'str') sc = wash_url_argument(sc, 'int') jrec = wash_url_argument(jrec, 'int') id = wash_url_argument(id, 'int') idb = wash_url_argument(idb, 'int') sysnb = wash_url_argument(sysnb, 'int') search = wash_url_argument(search, 'str') d1y = wash_url_argument(d1y, 'str') d1m = wash_url_argument(d1m, 'str') d1d = wash_url_argument(d1d, 'str') d2y = wash_url_argument(d2y, 'str') d2m = wash_url_argument(d2m, 'str') d2d = wash_url_argument(d2d, 'str') day1, day2 = wash_dates(d1y, d1m, d1d, d2y, d2m, d2d) # deduce user id: uid = getUid(req) # start output if of.startswith('x'): # we are doing XML output: req.content_type = "text/xml" req.send_http_header() req.write("""<?xml version="1.0" encoding="UTF-8"?>\n""") if of.startswith("xm"): req.write("""<collection xmlns="http://www.loc.gov/MARC21/slim">\n""") else: req.write("""<collection>\n""") elif of.startswith('t') or str(of[0:3]).isdigit(): # we are doing plain text output: req.content_type = "text/plain" req.send_http_header() elif of == "id": # we are passing list of recIDs pass else: # we are doing HTML output: req.content_type = "text/html" req.send_http_header() # write header: req.write(create_header(cc, as, uid)) if sysnb or id>0: ## 1 - detailed record display if sysnb: # ALEPH sysnb is passed, so deduce MySQL id for the record: id = get_mysql_recid_from_aleph_sysno(sysnb) if of=="hb": of = "hd" if record_exists(id): if idb<=id: # sanity check idb=id+1 print_records(req, range(id,idb), -1, -9999, of, ot) else: # record does not exist if of.startswith("h"): (cc, colls_to_display, colls_to_search) = wash_colls(cc, c, sc) p = wash_pattern(p) f = wash_field(f) out = """<table width="100%%" cellspacing="0" cellpadding="0" border="0"> <tr valign="top"> <td> %s </td> <td class="pagestriperight"> %s </td> </tr> </table>""" % \ (create_search_box(cc, colls_to_display, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d, search), create_google_box(p, f, p1, p2, p3)) req.write(out) print_warning(req, "Requested record does not seem to exist.", None, "<p>") elif search == "Browse": ## 2 - browse needed (cc, colls_to_display, colls_to_search) = wash_colls(cc, c, sc) p = wash_pattern(p) f = wash_field(f) # write search box: if of.startswith("h"): out = """<table width="100%%" cellspacing="0" cellpadding="0" border="0"> <tr valign="top"> <td> %s </td> <td class="pagestriperight"> %s </td> </tr> </table>""" % \ (create_search_box(cc, colls_to_display, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d, search), create_google_box(p, f, p1, p2, p3)) req.write(out) if as==1 or (p1 or p2 or p3): browse_pattern(req, colls_to_search, p1, f1, rg) browse_pattern(req, colls_to_search, p2, f2, rg) browse_pattern(req, colls_to_search, p3, f3, rg) else: browse_pattern(req, colls_to_search, p, f, rg) else: ## 3 - search needed # wash passed collection arguments: (cc, colls_to_display, colls_to_search) = wash_colls(cc, c, sc) p = wash_pattern(p) f = wash_field(f) # write search box: if of.startswith("h"): out = """<table width="100%%" cellspacing="0" cellpadding="0" border="0"> <tr valign="top"> <td> %s </td> <td class="pagestriperight"> %s </td> </tr> </table>""" % \ (create_search_box(cc, colls_to_display, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d, search), create_google_box(p, f, p1, p2, p3)) req.write(out) # run search: t1 = os.times()[4] if as == 1 or (p1 or p2 or p3): # 3A - advanced search results_final = search_pattern(req, "", "", colls_to_search) if p1: results_tmp = search_pattern(req, p1, f1, colls_to_search, m1) for coll in colls_to_search: # join results for first advanced search boxen results_final[coll].intersect(results_tmp[coll]) if p2: results_tmp = search_pattern(req, p2, f2, colls_to_search, m2) for coll in colls_to_search: # join results for first and second advanced search boxen if op1 == "a": # add results_final[coll].intersect(results_tmp[coll]) elif op1 == "o": # or results_final[coll].union(results_tmp[coll]) elif op1 == "n": # not results_final[coll].difference(results_tmp[coll]) else: print_warning(req, "Invalid set operation %s." % op1, "Error") if p3: results_tmp = search_pattern(req, p3, f3, colls_to_search, m3) for coll in colls_to_search: # join results for second and third advanced search boxen if op2 == "a": # add results_final[coll].intersect(results_tmp[coll]) elif op2 == "o": # or results_final[coll].union(results_tmp[coll]) elif op2 == "n": # not results_final[coll].difference(results_tmp[coll]) else: print_warning(req, "Invalid set operation %s." % op1, "Error") for coll in colls_to_search: results_final[coll].calculate_nbhits() else: # 3B - simple search search_cache_key = p+"@"+f+"@"+string.join(colls_to_search,",") if search_cache.has_key(search_cache_key): # is the result in search cache? results_final = search_cache[search_cache_key] else: results_final = search_pattern(req, p, f, colls_to_search) search_cache[search_cache_key] = results_final if len(search_cache) > cfg_search_cache_size: # is the cache full? (sanity cleaning) search_cache.clear() # search done; was there a time restriction? if yes, apply it now: if day1 != "": results_of_time_restriction = search_in_bibrec(day1, day2) for coll in colls_to_search: results_final[coll].intersect(results_of_time_restriction) results_final[coll].calculate_nbhits() t2 = os.times()[4] cpu_time = t2 - t1 # find total number of records found in each collection results_final_nb_total = 0 results_final_nb = {} for coll in colls_to_search: results_final_nb[coll] = results_final[coll]._nbhits results_final_nb_total += results_final_nb[coll] # was there at least one hit? if results_final_nb_total == 0: # nope, so try silently dash-slash-etc-less matches first: if as==1 or (p1 or p2 or p3): if re.search(r'\w[^a-zA-Z0-9]\w',p1) or \ re.search(r'\w[^a-zA-Z0-9]\w',p2) or \ re.search(r'\w[^a-zA-Z0-9]\w',p3): if p1.startswith('"') and p1.endswith('"'): # is it ACC query? p1 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1_\\2", p1) else: # it is WRD query p1 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1 \\2", p1) if p1.startswith('"') and p1.endswith('"'): # is it ACC query? p2 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1_\\2", p2) else: # it is WRD query p2 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1 \\2", p2) if p3.startswith('"') and p3.endswith('"'): # is it ACC query? p3 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1_\\2", p3) else: # it is WRD query p3 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1 \\2", p3) if of.startswith('h'): print_warning(req, "No match found, trying similar queries...", "", "<p>","<p>") results_final = search_pattern(req, "", "", colls_to_search) if p1: results_tmp = search_pattern(req, p1, f1, colls_to_search, m1) for coll in colls_to_search: # join results for first advanced search boxen results_final[coll].intersect(results_tmp[coll]) if p2: results_tmp = search_pattern(req, p2, f2, colls_to_search, m2) for coll in colls_to_search: # join results for first and second advanced search boxen if op1 == "a": # add results_final[coll].intersect(results_tmp[coll]) elif op1 == "o": # or results_final[coll].union(results_tmp[coll]) elif op1 == "n": # not results_final[coll].difference(results_tmp[coll]) else: print_warning(req, "Invalid set operation %s." % op1, "Error") if p3: results_tmp = search_pattern(req, p3, f3, colls_to_search, m3) for coll in colls_to_search: # join results for second and third advanced search boxen if op2 == "a": # add results_final[coll].intersect(results_tmp[coll]) elif op2 == "o": # or results_final[coll].union(results_tmp[coll]) elif op2 == "n": # not results_final[coll].difference(results_tmp[coll]) else: print_warning(req, "Invalid set operation %s." % op1, "Error") for coll in colls_to_search: results_final[coll].calculate_nbhits() results_final_nb[coll] = results_final[coll]._nbhits results_final_nb_total += results_final_nb[coll] else: if re.search(r'\w[^a-zA-Z0-9]\w',p): if p.startswith('"') and p.endswith('"'): # is it ACC query? p = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1_\\2", p) else: # it is WRD query p = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1 \\2", p) if of.startswith('h'): print_warning(req, "No match found, trying %s..." % p, "", "<p>","<p>") results_final = search_pattern(req, p, f, colls_to_search, None) for coll in colls_to_search: results_final_nb[coll] = results_final[coll]._nbhits results_final_nb_total += results_final_nb[coll] # once again, was there at least one hit? if results_final_nb_total == 0: # nope, so try similar queries: if of.startswith('h'): print_warning(req, "No match found, trying similar queries...", "", "<p>","<p>") req.write("<p>") if as==1 or (p1 or p2 or p3): if p1: search_pattern(req, p1, f1, colls_to_search, m1, 1) if p2: search_pattern(req, p2, f2, colls_to_search, m2, 1) if p3: search_pattern(req, p3, f3, colls_to_search, m3, 1) else: search_pattern(req, p, f, colls_to_search, None, 1) else: # yes, some hits found, so print results overview: if of == "id": # we have been asked to return list of recIDs results_final_for_all_colls = HitList() for coll in colls_to_search: results_final_for_all_colls.union(results_final[coll]) return results_final_for_all_colls.items() elif of.startswith("h"): req.write(print_results_overview(colls_to_search, results_final_nb_total, results_final_nb, cpu_time)) # print records: if len(colls_to_search)>1: cpu_time = -1 # we do not want to have search time printed on each collection for coll in colls_to_search: if results_final[coll]._nbhits: if of.startswith("h"): req.write(print_search_info(p, f, sf, so, sp, of, ot, coll, results_final_nb[coll], jrec, rg, as, p1, p2, p3, f1, f2, f3, m1, m2, m3, op1, op2, d1y, d1m, d1d, d2y, d2m, d2d, cpu_time)) results_final_sorted = results_final[coll].items() if sf: results_final_sorted = sort_records(req, results_final_sorted, sf, so, sp) print_records(req, results_final_sorted, jrec, rg, of, ot) if of.startswith("h"): req.write(print_search_info(p, f, sf, so, sp, of, ot, coll, results_final_nb[coll], jrec, rg, as, p1, p2, p3, f1, f2, f3, m1, m2, m3, op1, op2, d1y, d1m, d1d, d2y, d2m, d2d, cpu_time, 1)) # log query: try: log_query(req.get_remote_host(), req.args, uid) except: # do not log query if req is None (used by CLI interface) pass log_query_info("ss", p, f, colls_to_search, results_final_nb_total) # 4 -- write footer: if of.startswith('h'): req.write(create_footer()) elif of.startswith('x'): req.write("""</collection>\n""") # 5 - return value if of == "id": return [] else: return "\n"
9abc6750025b014a8ac519a428db93e9918f7e41 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/9abc6750025b014a8ac519a428db93e9918f7e41/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 2293, 67, 3072, 12, 3658, 33, 7036, 16, 4946, 33, 71, 2377, 529, 16, 276, 33, 7036, 16, 293, 1546, 3113, 284, 1546, 3113, 14524, 1546, 2163, 3113, 9033, 1546, 3113, 1427, 154...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 2293, 67, 3072, 12, 3658, 33, 7036, 16, 4946, 33, 71, 2377, 529, 16, 276, 33, 7036, 16, 293, 1546, 3113, 284, 1546, 3113, 14524, 1546, 2163, 3113, 9033, 1546, 3113, 1427, 154...
return os.path.normcase( os.path.abspath(path) )
return os.path.normcase(os.path.abspath(path))
def canon(path): #bruce 050908 bugfix in case developer runs python with relative (or other non-canonical) path as argument return os.path.normcase( os.path.abspath(path) )
1b56534812bf499197bdc2ce577a8cc081c52e96 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/1b56534812bf499197bdc2ce577a8cc081c52e96/startup_before_most_imports.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29147, 12, 803, 4672, 468, 2848, 3965, 374, 5995, 6840, 7934, 904, 316, 648, 8751, 7597, 5790, 598, 3632, 261, 280, 1308, 1661, 17, 18288, 13, 589, 487, 1237, 327, 1140, 18, 803, 18, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29147, 12, 803, 4672, 468, 2848, 3965, 374, 5995, 6840, 7934, 904, 316, 648, 8751, 7597, 5790, 598, 3632, 261, 280, 1308, 1661, 17, 18288, 13, 589, 487, 1237, 327, 1140, 18, 803, 18, 7...
self.last_event = FakeQuotedCharEvent(evt)
self.last_event = FakeQuotedCharEvent(evt.GetEventObject())
def copyLastEvent(self, evt): self.last_event = FakeQuotedCharEvent(evt)
06dbd30848e3f3b419df2c1574810e7baa52289b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11522/06dbd30848e3f3b419df2c1574810e7baa52289b/multikey.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 3024, 1133, 12, 2890, 16, 6324, 4672, 365, 18, 2722, 67, 2575, 273, 11551, 15919, 2156, 1133, 12, 73, 11734, 18, 967, 1133, 921, 10756, 225, 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, 0, 0, 0, 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, 1610, 3024, 1133, 12, 2890, 16, 6324, 4672, 365, 18, 2722, 67, 2575, 273, 11551, 15919, 2156, 1133, 12, 73, 11734, 18, 967, 1133, 921, 10756, 225, 2, -100, -100, -100, -100, -100, -100, ...
group_id = self.id_get(cr, 'res.groups', group)
group_id = self.id_get(cr, group)
def ref(str_id): return self.id_get(cr, None, str_id)
4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1278, 12, 701, 67, 350, 4672, 327, 365, 18, 350, 67, 588, 12, 3353, 16, 599, 16, 609, 67, 350, 13, 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, 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, 1278, 12, 701, 67, 350, 4672, 327, 365, 18, 350, 67, 588, 12, 3353, 16, 599, 16, 609, 67, 350, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def __init__(self, user = None, path = None, size = None):
def __init__(self, user = None, path = None, size = 0):
def __init__(self, user = None, path = None, size = None): self.user = user self.path = path self.size = size
c7a6963a4933c0e7ee0736f808967467888d969a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8737/c7a6963a4933c0e7ee0736f808967467888d969a/messages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 729, 273, 599, 16, 589, 273, 599, 16, 963, 273, 374, 4672, 365, 18, 1355, 273, 729, 365, 18, 803, 273, 589, 365, 18, 1467, 273, 963, 2, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 729, 273, 599, 16, 589, 273, 599, 16, 963, 273, 374, 4672, 365, 18, 1355, 273, 729, 365, 18, 803, 273, 589, 365, 18, 1467, 273, 963, 2, -100, -100, -...
'title': f['channel']['title'].encode('ascii', 'xmlcharrefreplace'), 'desc': f['channel']['description'].encode('ascii', 'xmlcharrefreplace')
'title': f.feed['title'].encode('ascii', 'xmlcharrefreplace'), 'desc': f.feed['description'].encode('ascii', 'xmlcharrefreplace')
def add_feed(feed_xml): """Try to add a feed. Return values: tuple (status, feed_uid) -1: unknown error 0: feed added normally 1: feed added via autodiscovery 2: feed not added, already present 3: feed not added, connection or parse error""" from singleton import db c = db.cursor() try: f = feedparser.parse(feed_xml) normalize.normalize_feed(f) if not f['channel']: return 3, None feed = { 'xmlUrl': f['url'], 'htmlUrl': str(f['channel']['link']), 'etag': f['etag'], 'title': f['channel']['title'].encode('ascii', 'xmlcharrefreplace'), 'desc': f['channel']['description'].encode('ascii', 'xmlcharrefreplace') } for key, value in feed.items(): if type(value) == str: feed[key] = escape(value) try: c.execute("""insert into fm_feeds (feed_xml, feed_etag, feed_html, feed_title, feed_desc) values ('%(xmlUrl)s', '%(etag)s', '%(htmlUrl)s', '%(title)s', '%(desc)s')""" % feed) feed_uid = db.sqlite_last_insert_rowid() process_parsed_feed(f, c, feed_uid) db.commit() return 0, feed_uid except sqlite.IntegrityError, e: if 'feed_xml' not in str(e): return -1, None else: # duplicate attempt return 2, None finally: c.close()
9e8664b8d68275cee71596c2edbf5d87997ebb5a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10695/9e8664b8d68275cee71596c2edbf5d87997ebb5a/update.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 7848, 12, 7848, 67, 2902, 4672, 3536, 7833, 358, 527, 279, 4746, 18, 2000, 924, 30, 3193, 261, 2327, 16, 4746, 67, 1911, 13, 300, 21, 30, 5917, 555, 374, 30, 4746, 3096, 158...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 7848, 12, 7848, 67, 2902, 4672, 3536, 7833, 358, 527, 279, 4746, 18, 2000, 924, 30, 3193, 261, 2327, 16, 4746, 67, 1911, 13, 300, 21, 30, 5917, 555, 374, 30, 4746, 3096, 158...
window.do_itemhit(item, event)
self._windows[window].do_itemhit(item, event)
def do_dialogevent(self, event): gotone, window, item = DialogSelect(event) if gotone: if self._windows.has_key(window): window.do_itemhit(item, event) else: print 'Dialog event for unknown dialog'
13dc4f71a903ee38510aff6583a82435fbdf700b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/13dc4f71a903ee38510aff6583a82435fbdf700b/FrameWork.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 12730, 2575, 12, 2890, 16, 871, 4672, 2363, 476, 16, 2742, 16, 761, 273, 17242, 3391, 12, 2575, 13, 309, 2363, 476, 30, 309, 365, 6315, 13226, 18, 5332, 67, 856, 12, 5668, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 12730, 2575, 12, 2890, 16, 871, 4672, 2363, 476, 16, 2742, 16, 761, 273, 17242, 3391, 12, 2575, 13, 309, 2363, 476, 30, 309, 365, 6315, 13226, 18, 5332, 67, 856, 12, 5668, 4...
context.error("unsupported directive: %s %s" % (self.mnemonic, operands)) sys.exit()
pa = None if operands: expr = Expression(context, operands) if expr.complete: pa = expr.value if context.memmap.isErasable(pa): context.code = pa else: context.error("1DNADR operand must be in erasable memory")
def parse_Minus1_DNADR(self, context, symbol, operands): context.error("unsupported directive: %s %s" % (self.mnemonic, operands)) sys.exit()
7b29e1bdd72f89ef067f6f4227a2842caa307ee6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8152/7b29e1bdd72f89ef067f6f4227a2842caa307ee6/directives.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 18434, 21, 67, 8609, 1880, 54, 12, 2890, 16, 819, 16, 3273, 16, 14883, 4672, 6790, 273, 599, 309, 14883, 30, 3065, 273, 5371, 12, 2472, 16, 14883, 13, 309, 3065, 18, 6226, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 18434, 21, 67, 8609, 1880, 54, 12, 2890, 16, 819, 16, 3273, 16, 14883, 4672, 6790, 273, 599, 309, 14883, 30, 3065, 273, 5371, 12, 2472, 16, 14883, 13, 309, 3065, 18, 6226, ...
self.git_dir = url_parts.path
self.git_dir = url_parts[2]
def __init__(self, path, raw_file_url=None): if not is_exe_in_path('git'): # This is technically not the right kind of error, but it's the # pattern we use with all the other tools. raise ImportError
2ec5a8b33833f787e5b0476c12f06b5095413187 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1600/2ec5a8b33833f787e5b0476c12f06b5095413187/git.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 589, 16, 1831, 67, 768, 67, 718, 33, 7036, 4672, 309, 486, 353, 67, 14880, 67, 267, 67, 803, 2668, 6845, 11, 4672, 468, 1220, 353, 17734, 6478, 486, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 589, 16, 1831, 67, 768, 67, 718, 33, 7036, 4672, 309, 486, 353, 67, 14880, 67, 267, 67, 803, 2668, 6845, 11, 4672, 468, 1220, 353, 17734, 6478, 486, 32...
With the ``zero`` argument, one can define affine morphisms:
With the ``zero`` argument, one can define affine morphisms::
def module_morphism(self, on_basis = None, diagonal = None, triangular = None, **keywords): r""" Constructs morphisms by linearity
5e77b431e0bbe5251f2f32e3a2fe9539007540b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/5e77b431e0bbe5251f2f32e3a2fe9539007540b3/modules_with_basis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1605, 67, 81, 7657, 6228, 12, 2890, 16, 603, 67, 23774, 273, 599, 16, 15425, 273, 599, 16, 6882, 13077, 273, 599, 16, 2826, 11771, 4672, 436, 8395, 14291, 87, 14354, 23749, 635, 9103, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1605, 67, 81, 7657, 6228, 12, 2890, 16, 603, 67, 23774, 273, 599, 16, 15425, 273, 599, 16, 6882, 13077, 273, 599, 16, 2826, 11771, 4672, 436, 8395, 14291, 87, 14354, 23749, 635, 9103, ...
@type content: L{Object}
@type content: L{Content}
def end(self, content): """ Appending this content has ended. @param content: The content for which proccessing has ended. @type content: L{Object} """ pass
119720611fabd315e50ed5481f636ad6ec82cfaa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5377/119720611fabd315e50ed5481f636ad6ec82cfaa/marshaller.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 679, 12, 2890, 16, 913, 4672, 3536, 6181, 310, 333, 913, 711, 16926, 18, 632, 891, 913, 30, 1021, 913, 364, 1492, 450, 850, 310, 711, 16926, 18, 632, 723, 913, 30, 511, 95, 1350, 97,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 679, 12, 2890, 16, 913, 4672, 3536, 6181, 310, 333, 913, 711, 16926, 18, 632, 891, 913, 30, 1021, 913, 364, 1492, 450, 850, 310, 711, 16926, 18, 632, 723, 913, 30, 511, 95, 1350, 97,...
def __init__ (self, name, mapfile = None, **kwargs):
def __init__ (self, name, mapfile = None, styles = "", **kwargs):
def __init__ (self, name, mapfile = None, **kwargs): MetaLayer.__init__(self, name, **kwargs) self.mapfile = mapfile
74dcebbb03667c1be5020b000baab1d6009437ad /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6188/74dcebbb03667c1be5020b000baab1d6009437ad/Layer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 508, 16, 852, 768, 273, 599, 16, 5687, 273, 23453, 2826, 4333, 4672, 6565, 4576, 16186, 2738, 972, 12, 2890, 16, 508, 16, 2826, 4333, 13, 365, 18, 1458,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 508, 16, 852, 768, 273, 599, 16, 5687, 273, 23453, 2826, 4333, 4672, 6565, 4576, 16186, 2738, 972, 12, 2890, 16, 508, 16, 2826, 4333, 13, 365, 18, 1458,...
try: cPickle.dump(self.__backgroundDict__,file(pickleLocale,'w')) except: sys.stdout.write("Problem saving pickle of DQ information.") sys.stdout.write("Trying to place pickle in your home directory.")
if not backgroundPickle:
def createDQbackground(self,ifoEpochList=list(),pickleLocale=None): """ Two inputs a list of tuples (ifo,epochname) for each instrument. Also a place to save the potential pickle to for quick access later. """ if type(ifoEpochList) != type(list()): raise Exception, \ "Invalid input argument ifoEpochList,%s type(%s)"\ %(ifoEpochList,type(ifoEpochList)) #Make sure epoch exists for reach ifo for ifo,epoch in ifoEpochList: if ifo not in runEpochs.keys(): raise Exception, "Bad ifo specified, %s"%ifo if epoch not in runEpochs[ifo].keys(): raise Exception, "Bad ifo epoch specified, %s:%s"%(ifo,epoch) #If pickle location given try to load that pickle first. backgroundPickle=False if pickleLocale!=None: #If pickle file exists read it if not make sure we can #generate it properly otherwise skip creating background if os.path.isfile(pickleLocale): try: self.__backgroundDict__=cPickle.load(file(pickleLocale,'r')) backgroundPickle=True except: backgroundPickle=False sys.stderr.write("Error importing the pickle file! %s\n"\ %(pickleLocale)) return for (ifo,epoch) in ifoEpochList: if (ifo.upper().strip(),epoch.upper().strip()) \ not in self.__backgroundDict__["ifoepoch"]: raise Exception,\ "Invalid ifo and epoch information in \
6dd8d677924d136a0f3b5fb060f859178f7cc82c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/6dd8d677924d136a0f3b5fb060f859178f7cc82c/fu_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 40, 53, 9342, 12, 2890, 16, 20299, 14638, 682, 33, 1098, 9334, 20847, 3916, 33, 7036, 4672, 3536, 16896, 4540, 279, 666, 434, 10384, 261, 20299, 16, 12015, 529, 13, 364, 1517, 10353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 40, 53, 9342, 12, 2890, 16, 20299, 14638, 682, 33, 1098, 9334, 20847, 3916, 33, 7036, 4672, 3536, 16896, 4540, 279, 666, 434, 10384, 261, 20299, 16, 12015, 529, 13, 364, 1517, 10353...
channel.select_timeout_seconds=1.5*max(timeout, lock_timeout)/1000.0
channel.select_timeout_seconds=0.5+1.5*max(timeout, lock_timeout)/1000.0
def do_timeouts(self, timeout, lock_timeout, channel=None): if channel is None: channel=self.core flags=0 if timeout is None: timeout=self.timeout if not lock_timeout and hasattr(self,"default_lock_timeout"): lock_timeout=self.default_lock_timeout if lock_timeout: flags |= 1 # append waitlock bit if channel: channel.select_timeout_seconds=1.5*max(timeout, lock_timeout)/1000.0 #convert ms to sec, and be generous on hard timeout return flags, timeout, lock_timeout
6eda548930c3c7e4e8baf8e3746899fc4a8dcb65 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6028/6eda548930c3c7e4e8baf8e3746899fc4a8dcb65/vxi_11.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 4538, 87, 12, 2890, 16, 2021, 16, 2176, 67, 4538, 16, 1904, 33, 7036, 4672, 225, 309, 1904, 353, 599, 30, 1904, 33, 2890, 18, 3644, 225, 2943, 33, 20, 309, 225, 2021, 353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 4538, 87, 12, 2890, 16, 2021, 16, 2176, 67, 4538, 16, 1904, 33, 7036, 4672, 225, 309, 1904, 353, 599, 30, 1904, 33, 2890, 18, 3644, 225, 2943, 33, 20, 309, 225, 2021, 353, ...
if self.conf.obsoletes: for installed_pkg in instpkgs: for obsoleting in self.up.obsoleted_dict.get(installed_pkg.pkgtup, []): obsoleting_pkg = self.getPackageObject(obsoleting) txmbr = self.tsInfo.addObsoleting(obsoleting_pkg, installed_pkg) self.tsInfo.addObsoleted(installed_pkg, obsoleting_pkg) if requiringPo: txmbr.setAsDep(requiringPo)
if self.conf.obsoletes: for installed_pkg in instpkgs: for obsoleting in self.up.obsoleted_dict.get(installed_pkg.pkgtup, []): obsoleting_pkg = self.getPackageObject(obsoleting) txmbr = self.tsInfo.addObsoleting(obsoleting_pkg, installed_pkg) self.tsInfo.addObsoleted(installed_pkg, obsoleting_pkg) if requiringPo: txmbr.setAsDep(requiringPo) tx_return.append(txmbr) for available_pkg in availpkgs: for obsoleted in self.up.obsoleting_dict.get(available_pkg.pkgtup, []): obsoleted_pkg = self.getInstalledPackageObject(obsoleted) txmbr = self.tsInfo.addObsoleting(available_pkg, obsoleted_pkg) if requiringPo: txmbr.setAsDep(requiringPo) tx_return.append(txmbr) if self.tsInfo.isObsoleted(obsoleted): self.verbose_logger.log(logginglevels.DEBUG_2, _('Package is already obsoleted: %s.%s %s:%s-%s'), obsoleted) else: txmbr = self.tsInfo.addObsoleted(obsoleted_pkg, available_pkg)
def update(self, po=None, requiringPo=None, **kwargs): """try to mark for update the item(s) specified. po is a package object - if that is there, mark it for update, if possible else use **kwargs to match the package needing update if nothing is specified at all then attempt to update everything returns the list of txmbr of the items it marked for update""" # check for args - if no po nor kwargs, do them all # if po, do it, ignore all else # if no po do kwargs # uninstalled pkgs called for update get returned with errors in a list, maybe?
833e6056ee3711813167142d53802e464a0ac258 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5445/833e6056ee3711813167142d53802e464a0ac258/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 16, 8275, 33, 7036, 16, 29468, 29198, 33, 7036, 16, 2826, 4333, 4672, 3536, 698, 358, 2267, 364, 1089, 326, 761, 12, 87, 13, 1269, 18, 8275, 353, 279, 2181, 733, 300, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 16, 8275, 33, 7036, 16, 29468, 29198, 33, 7036, 16, 2826, 4333, 4672, 3536, 698, 358, 2267, 364, 1089, 326, 761, 12, 87, 13, 1269, 18, 8275, 353, 279, 2181, 733, 300, ...
"instanceof" : 'instanceof',
"instanceof" : ' instanceof ', "in" : ' in ',
def compress(node): type = node.type if type in prefixes: return prefix(node) elif type in postfixes: return postfix(node) elif type in dividers: return divider(node) else: try: return globals()["__" + type](node) except KeyError: print "Compressor does not support type: %s from line: %s" % (type, node.line) print node.toJson() sys.exit(1)
0419346bd7bb273cf4b929b7845815092958196f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/0419346bd7bb273cf4b929b7845815092958196f/Compressor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8099, 12, 2159, 4672, 618, 273, 756, 18, 723, 225, 309, 618, 316, 9419, 30, 327, 1633, 12, 2159, 13, 1327, 618, 316, 18923, 281, 30, 327, 18923, 12, 2159, 13, 1327, 618, 316, 3739, 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, 8099, 12, 2159, 4672, 618, 273, 756, 18, 723, 225, 309, 618, 316, 9419, 30, 327, 1633, 12, 2159, 13, 1327, 618, 316, 18923, 281, 30, 327, 18923, 12, 2159, 13, 1327, 618, 316, 3739, 2...
if is_sequence(sources):
if is_sequence(extension):
def template_sources(self, sources, extension): new_sources = [] if is_sequence(sources): depends = extension[1].get('depends') include_dirs = extension[1].get('include_dirs') else: depends = extension.depends include_dirs = extension.include_dirs for source in sources: (base, ext) = os.path.splitext(source) if ext == '.src': # Template file if self.inplace: target_dir = os.path.dirname(base) else: target_dir = appendpath(self.build_src, os.path.dirname(base)) self.mkpath(target_dir) target_file = os.path.join(target_dir,os.path.basename(base)) if (self.force or newer_group([source] + depends, target_file)): if _f_pyf_ext_match(base): log.info("from_template:> %s" % (target_file)) outstr = process_f_file(source) else: log.info("conv_template:> %s" % (target_file)) outstr = process_c_file(source) fid = open(target_file,'w') fid.write(outstr) fid.close() if _header_ext_match(target_file): d = os.path.dirname(target_file) if d not in include_dirs: log.info(" adding '%s' to include_dirs." % (d)) include_dirs.append(d) new_sources.append(target_file) else: new_sources.append(source) return new_sources
85fae8912301e6a2205c07e00bf22f43e7fa6020 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/85fae8912301e6a2205c07e00bf22f43e7fa6020/build_src.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1542, 67, 10141, 12, 2890, 16, 5550, 16, 2710, 4672, 394, 67, 10141, 273, 5378, 309, 353, 67, 6178, 12, 6447, 4672, 10935, 273, 2710, 63, 21, 8009, 588, 2668, 27360, 6134, 2341, 67, 82...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1542, 67, 10141, 12, 2890, 16, 5550, 16, 2710, 4672, 394, 67, 10141, 273, 5378, 309, 353, 67, 6178, 12, 6447, 4672, 10935, 273, 2710, 63, 21, 8009, 588, 2668, 27360, 6134, 2341, 67, 82...
else
else:
def __init__(data = None) if data == None: quickfix.IntField.__init__(self, 216) else quickfix.IntField.__init__(self, 216, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 576, 2313, 13, 469, 30, 9549, 904, 18, 1702, 974, 16186, 273...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 576, 2313, 13, 469, 30, 9549, 904, 18, 1702, 974, 16186, 273...
return """<input type='text' value='%s' size=%s onchange='%s'></input>"""%( self.default_value(), self.__width, self.interact())
return """<input type='text' value="%s" size=%s onchange='%s'></input>"""%( self.html_escaped_default_value(), self.__width, self.interact())
def render(self): """ Render this control as a string.
a0322d1aea08d97442b808ccb4e3e6d329cb03ba /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/a0322d1aea08d97442b808ccb4e3e6d329cb03ba/interact.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 4672, 3536, 6987, 333, 3325, 487, 279, 533, 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, 0, 0, ...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 4672, 3536, 6987, 333, 3325, 487, 279, 533, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
atts['height'] = int(round(atts['height'] * (float(atts['scale']) / 100))) del atts['scale'] if not atts.has_key('alt'): atts['alt'] = atts['src'] if atts.has_key('align'): atts['align'] = self.attval(atts['align'])
atts['height'] = int(round(node['height'] * (float(node['scale']) / 100))) atts['alt'] = node.get('alt', atts['src']) if node.has_key('align'): atts['align'] = self.attval(node['align'])
def visit_image(self, node): atts = node.non_default_attributes() if atts.has_key('classes'): del atts['classes'] # prevent duplication with node attrs atts['src'] = atts['uri'] del atts['uri'] if atts.has_key('scale'): if Image and not (atts.has_key('width') and atts.has_key('height')): try: im = Image.open(str(atts['src'])) except (IOError, # Source image can't be found or opened UnicodeError): # PIL doesn't like Unicode paths. pass else: if not atts.has_key('width'): atts['width'] = im.size[0] if not atts.has_key('height'): atts['height'] = im.size[1] del im if atts.has_key('width'): atts['width'] = int(round(atts['width'] * (float(atts['scale']) / 100))) if atts.has_key('height'): atts['height'] = int(round(atts['height'] * (float(atts['scale']) / 100))) del atts['scale'] if not atts.has_key('alt'): atts['alt'] = atts['src'] if atts.has_key('align'): atts['align'] = self.attval(atts['align']) atts['class'] = 'align-%s' % atts['align'] if (isinstance(node.parent, nodes.TextElement) or (isinstance(node.parent, nodes.reference) and not isinstance(node.parent.parent, nodes.TextElement))): # Inline context or surrounded by <a>...</a>. suffix = '' else: suffix = '\n' self.body.append(self.emptytag(node, 'img', suffix, **atts))
0b0f8392f3d43c060c8a3d911347e840e9d13a62 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/0b0f8392f3d43c060c8a3d911347e840e9d13a62/html4css1.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 2730, 12, 2890, 16, 756, 4672, 15687, 273, 756, 18, 5836, 67, 1886, 67, 4350, 1435, 309, 15687, 18, 5332, 67, 856, 2668, 4701, 11, 4672, 1464, 15687, 3292, 4701, 3546, 540, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 2730, 12, 2890, 16, 756, 4672, 15687, 273, 756, 18, 5836, 67, 1886, 67, 4350, 1435, 309, 15687, 18, 5332, 67, 856, 2668, 4701, 11, 4672, 1464, 15687, 3292, 4701, 3546, 540, 4...
'move_dest_id': fields.many2one('stock.move', 'Dest. Move'), 'move_history_ids': fields.many2many('stock.move', 'stock_move_history_ids', 'parent_id', 'child_id', 'Move History'), 'move_history_ids2': fields.many2many('stock.move', 'stock_move_history_ids', 'child_id', 'parent_id', 'Move History'),
'move_dest_id': fields.many2one('stock.move', 'Destination Move', help="Optional: next stock move when chaining them"), 'move_history_ids': fields.many2many('stock.move', 'stock_move_history_ids', 'parent_id', 'child_id', 'Move History (child moves)'), 'move_history_ids2': fields.many2many('stock.move', 'stock_move_history_ids', 'child_id', 'parent_id', 'Move History (parent moves)'),
def _check_product_lot(self, cr, uid, ids): """ Checks whether move is done or not and production lot is assigned to that move. @return: True or False """ for move in self.browse(cr, uid, ids): if move.prodlot_id and move.state == 'done' and (move.prodlot_id.product_id.id != move.product_id.id): return False return True
a47b49e672b314e5b1d6416498f868e991137407 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/a47b49e672b314e5b1d6416498f868e991137407/stock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 5896, 67, 23372, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 4672, 3536, 13074, 2856, 3635, 353, 2731, 578, 486, 471, 12449, 17417, 353, 6958, 358, 716, 3635, 18, 632, 2463, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 5896, 67, 23372, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 4672, 3536, 13074, 2856, 3635, 353, 2731, 578, 486, 471, 12449, 17417, 353, 6958, 358, 716, 3635, 18, 632, 2463, ...
"""Helper method for defining space-delimited indentation blocks, such as
"""Helper method for defining space-delimited indentation blocks, such as
def indentedBlock(blockStatementExpr, indentStack, indent=True): """Helper method for defining space-delimited indentation blocks, such as those used to define block statements in Python source code. Parameters: - blockStatementExpr - expression defining syntax of statement that is repeated within the indented block - indentStack - list created by caller to manage indentation stack (multiple statementWithIndentedBlock expressions within a single grammar should share a common indentStack) - indent - boolean indicating whether block must be indented beyond the the current level; set to False for block of left-most statements (default=True) A valid block must contain at least one blockStatement. """ def checkPeerIndent(s,l,t): if l >= len(s): return curCol = col(l,s) if curCol != indentStack[-1]: if curCol > indentStack[-1]: raise ParseFatalException(s,l,"illegal nesting") raise ParseException(s,l,"not a peer entry") def checkSubIndent(s,l,t): curCol = col(l,s) if curCol > indentStack[-1]: indentStack.append( curCol ) else: raise ParseException(s,l,"not a subentry") def checkUnindent(s,l,t): if l >= len(s): return curCol = col(l,s) if not(indentStack and curCol < indentStack[-1] and curCol <= indentStack[-2]): raise ParseException(s,l,"not an unindent") indentStack.pop() NL = OneOrMore(LineEnd().setWhitespaceChars("\t ").suppress()) INDENT = Empty() + Empty().setParseAction(checkSubIndent) PEER = Empty().setParseAction(checkPeerIndent) UNDENT = Empty().setParseAction(checkUnindent) if indent: smExpr = Group( Optional(NL) + FollowedBy(blockStatementExpr) + INDENT + (OneOrMore( PEER + Group(blockStatementExpr) + Optional(NL) )) + UNDENT) else: smExpr = Group( Optional(NL) + (OneOrMore( PEER + Group(blockStatementExpr) + Optional(NL) )) ) blockStatementExpr.ignore("\\" + LineEnd()) return smExpr
e0ca9c3ec38d75e110aa3bc15e2e5ca4c5cae61d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3693/e0ca9c3ec38d75e110aa3bc15e2e5ca4c5cae61d/pyparsing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23786, 1768, 12, 2629, 3406, 4742, 16, 3504, 2624, 16, 3504, 33, 5510, 4672, 3536, 2276, 707, 364, 9364, 3476, 17, 3771, 1038, 329, 12018, 4398, 16, 4123, 487, 5348, 1399, 358, 4426, 120...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23786, 1768, 12, 2629, 3406, 4742, 16, 3504, 2624, 16, 3504, 33, 5510, 4672, 3536, 2276, 707, 364, 9364, 3476, 17, 3771, 1038, 329, 12018, 4398, 16, 4123, 487, 5348, 1399, 358, 4426, 120...
f.write('\t__wt_unlock(ienv->mtx);\n')
f.write('\t__wt_unlock(env, ienv->mtx);\n')
def func_method_getset(a, f): func_method_decl(a, f) handle = a.handle method = a.method config = a.config args = a.args extfunc = config.count('extfunc') # Declarations: # If we don't have an environment handle, acquire one. # If we are hand-coding the routine, we'll need a place to save the # return value. if handle != 'env': f.write('\tENV *env = ' + handle + '->env;\n') f.write('\tIENV *ienv = env->ienv;\n') if extfunc: f.write('\tint ret;\n') if handle != 'env' or extfunc: f.write('\n') # If we have a "flags" argument to a setter function, check it # before we continue. if config.count('setter'): for l in args: if l.count('flags/'): f.write('\tWT_ENV_FCHK(env, "' + handle.upper() + '.' + method + '",\n\t ' + l.split('/')[0] + ', WT_APIMASK_' + handle.upper() + '_' + method.upper() + ');\n\n') break # Verify means call a standard verification routine because there are # constraints or side-effects on setting the value. The setter fails # if the verification routine fails. if config.count('verify'): f.write('\tWT_RET((__wt_' + handle + '_' + method + '_verify(' + handle) s = '' for l in args: s += ', ' + l.split('/')[0] s += ')' f.write(s + '));\n') # getter/setter implies ienvlock: lock the data structure. f.write('\t__wt_lock(env, ienv->mtx);\n') # Count the call. s = a.handle + '_' + a.method f.write( '\tWT_STAT_INCR(ienv->method_stats, ' + s.upper() + ');\n') # If the function is hand-coded, just call it. if extfunc: f.write('\tret = __wt_' + handle + '_' + method + '(\n\t ' + handle) for l in args: f.write(', ' + l.split('/')[0]) f.write(');\n') elif config.count('getter'): for l in args: if l.count('flags/') and flags[a.key][0] == '__NONE__': continue f.write('\t*' + l.split('/')[0] + ' = ' + handle + '->' + l.split('/')[0] + ';\n') else: for l in args: if l.count('flags/') and flags[a.key][0] == '__NONE__': continue f.write('\t' + handle + '->' + l.split('/')[0] + ' = ' + l.split('/')[0] + ';\n') # getter/setter implies ienvlock: unlock the data structure. f.write('\t__wt_unlock(ienv->mtx);\n') f.write('\treturn (') if extfunc: f.write('ret') else: f.write('0') f.write(');\n}\n\n')
94cf0c3e7d40d2fa0594a76619a189a81a7893e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11841/94cf0c3e7d40d2fa0594a76619a189a81a7893e0/api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1326, 67, 2039, 67, 588, 542, 12, 69, 16, 284, 4672, 1326, 67, 2039, 67, 8840, 12, 69, 16, 284, 13, 225, 1640, 273, 279, 18, 4110, 707, 273, 279, 18, 2039, 642, 273, 279, 18, 1425,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1326, 67, 2039, 67, 588, 542, 12, 69, 16, 284, 4672, 1326, 67, 2039, 67, 8840, 12, 69, 16, 284, 13, 225, 1640, 273, 279, 18, 4110, 707, 273, 279, 18, 2039, 642, 273, 279, 18, 1425,...
elif(os.path.isfile(src_file) and syntax(src_file) and needs_update(src_file)):
elif(os.path.isfile(src_file) and syntax(src_file) and needs_update(dir)):
def process(dir, margin = ''): """Recursively calls page() on every file/dir in the given directory""" for file in os.listdir(dir): src_file = os.path.join(dir, file) if(os.path.islink(src_file)): continue elif(os.path.isfile(src_file) and syntax(src_file) and needs_update(src_file)): out_file = src_file.split('.') out_file[-1] = template.obj_ext out_file = string.join(out_file, ".") if(len(sys.argv) == 3): out_file = string.join(sys.argv[2].split('/') + out_file.split('/')[len(sys.argv[1].split('/')):], '/') try: os.makedirs(string.join(out_file.split('/')[:-1], '/')) except OSError: pass print margin + src_file h_out_file = codecs.open(out_file, "w", "utf-8") h_out_file.write(page(src_file, dir)) h_out_file.close() elif(os.path.isdir(src_file)): process(src_file, margin + ' ')
3aa6a7c52adb7cabe6cc5e9c32eaa4a15c50e3bd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14400/3aa6a7c52adb7cabe6cc5e9c32eaa4a15c50e3bd/minimalsite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 1214, 16, 7333, 273, 875, 4672, 3536, 12474, 4097, 1363, 1435, 603, 3614, 585, 19, 1214, 316, 326, 864, 1867, 8395, 225, 364, 585, 316, 1140, 18, 1098, 1214, 12, 1214, 4672, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 1214, 16, 7333, 273, 875, 4672, 3536, 12474, 4097, 1363, 1435, 603, 3614, 585, 19, 1214, 316, 326, 864, 1867, 8395, 225, 364, 585, 316, 1140, 18, 1098, 1214, 12, 1214, 4672, ...
global _lock if (not _lock) and thread: _lock = threading.RLock()
def _acquireLock(): """ Acquire the module-level lock for serializing access to shared data. This should be released with _releaseLock(). """ global _lock if (not _lock) and thread: _lock = threading.RLock() if _lock: _lock.acquire()
71ddae82ca9559dcc4ffbc25dde2165c19a10dca /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/71ddae82ca9559dcc4ffbc25dde2165c19a10dca/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1077, 1039, 2531, 13332, 3536, 28822, 326, 1605, 17, 2815, 2176, 364, 2734, 6894, 2006, 358, 5116, 501, 18, 225, 1220, 1410, 506, 15976, 598, 389, 9340, 2531, 7675, 3536, 309, 389, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1077, 1039, 2531, 13332, 3536, 28822, 326, 1605, 17, 2815, 2176, 364, 2734, 6894, 2006, 358, 5116, 501, 18, 225, 1220, 1410, 506, 15976, 598, 389, 9340, 2531, 7675, 3536, 309, 389, ...
list, self.cb.mainwindow)
lst, self.cb.mainwindow)
def insert_at_cursor_cb(self, textbuffer, iter, text, length): complete = "" name, a,b,c = self.get_current() if self.ac_w is not None: self.ac_w.hide() if text in special_chars: name, buffer, text, model = self.get_current() iter2 = buffer.get_iter_at_mark(buffer.get_insert()) complete = self.get_context(buffer, iter2) print complete if len(complete.strip()) > 0: #~ try: list = importsTipper.GenerateTip(complete, os.path.dirname(name)) if self.ac_w is None: self.ac_w = AutoCompletionWindow(text, iter2, complete, list, self.cb.mainwindow) else: self.ac_w.set_list(text, iter2, complete, list, self.cb.mainwindow) #~ except: #~ print sys.exc_info()[1] return
10449cb4d34f22fdbee6714299a5514922fc253d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2233/10449cb4d34f22fdbee6714299a5514922fc253d/edit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 67, 270, 67, 9216, 67, 7358, 12, 2890, 16, 977, 4106, 16, 1400, 16, 977, 16, 769, 4672, 3912, 273, 1408, 508, 16, 279, 16, 70, 16, 71, 273, 365, 18, 588, 67, 2972, 1435, 309,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 67, 270, 67, 9216, 67, 7358, 12, 2890, 16, 977, 4106, 16, 1400, 16, 977, 16, 769, 4672, 3912, 273, 1408, 508, 16, 279, 16, 70, 16, 71, 273, 365, 18, 588, 67, 2972, 1435, 309,...
if index in (0x9, 0xA, 0xB):
if index in (0x9, 0xA, 0xB, 0xF):
def IsStringType(self, index): if index in (0x9, 0xA, 0xB): return True elif 0xA0 <= index < 0x100: result = self.GetEntry(index, 1) if result is not None and result in (0x9, 0xA, 0xB): return True return False
81444dd09828df8b38083f4ddebbf335e42e75fb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/116/81444dd09828df8b38083f4ddebbf335e42e75fb/node.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2585, 780, 559, 12, 2890, 16, 770, 4672, 309, 770, 316, 261, 20, 92, 29, 16, 374, 21703, 16, 374, 20029, 16, 374, 16275, 4672, 327, 1053, 1327, 374, 21703, 20, 1648, 770, 411, 374, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2585, 780, 559, 12, 2890, 16, 770, 4672, 309, 770, 316, 261, 20, 92, 29, 16, 374, 21703, 16, 374, 20029, 16, 374, 16275, 4672, 327, 1053, 1327, 374, 21703, 20, 1648, 770, 411, 374, 9...
for k in self.propcodes.keys(): self.fp.write("\t%s : %s,\n" % (`k`, self.propcodes[k]))
for k, v in self.namemappers[0].getall('property'): self.fp.write("\t%s : %s,\n" % (`k`, v))
def dumpindex(self): self.fp.write("\n#\n# Indices of types declared in this module\n#\n") self.fp.write("_classdeclarations = {\n") for k in self.classcodes.keys(): self.fp.write("\t%s : %s,\n" % (`k`, self.classcodes[k])) self.fp.write("}\n") self.fp.write("\n_propdeclarations = {\n") for k in self.propcodes.keys(): self.fp.write("\t%s : %s,\n" % (`k`, self.propcodes[k])) self.fp.write("}\n") self.fp.write("\n_compdeclarations = {\n") for k in self.compcodes.keys(): self.fp.write("\t%s : %s,\n" % (`k`, self.compcodes[k])) self.fp.write("}\n") self.fp.write("\n_enumdeclarations = {\n") for k in self.enumcodes.keys(): self.fp.write("\t%s : %s,\n" % (`k`, self.enumcodes[k])) self.fp.write("}\n")
0d0698fa0adf7267f5ec2fc36990cfe728e31744 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/0d0698fa0adf7267f5ec2fc36990cfe728e31744/gensuitemodule.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 1615, 12, 2890, 4672, 365, 18, 7944, 18, 2626, 31458, 82, 7, 64, 82, 7, 23046, 434, 1953, 7886, 316, 333, 1605, 64, 82, 7, 64, 82, 7923, 365, 18, 7944, 18, 2626, 2932, 67, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 1615, 12, 2890, 4672, 365, 18, 7944, 18, 2626, 31458, 82, 7, 64, 82, 7, 23046, 434, 1953, 7886, 316, 333, 1605, 64, 82, 7, 64, 82, 7923, 365, 18, 7944, 18, 2626, 2932, 67, 11...
sqlQuery=query01%(segName,ifo,gpsStop,gpsStart)
sqlQuery=query01%(segName,ifo,gpsStop,gpsStart,gpsStop,gpsStart)
def getSciSegs(ifo=None, gpsStart=None, gpsStop=None, cut=bool(False), serverURL=None, segName="DMT-SCIENCE", seglenmin=None, segpading=0
5270539576c4e2945cb782583298d134a1f2c06b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/5270539576c4e2945cb782583298d134a1f2c06b/fu_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1322, 8450, 1761, 564, 12, 20299, 33, 7036, 16, 20985, 1685, 33, 7036, 16, 20985, 4947, 33, 7036, 16, 6391, 33, 6430, 12, 8381, 3631, 1438, 1785, 33, 7036, 16, 2291, 461, 1546, 40, 615...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1322, 8450, 1761, 564, 12, 20299, 33, 7036, 16, 20985, 1685, 33, 7036, 16, 20985, 4947, 33, 7036, 16, 6391, 33, 6430, 12, 8381, 3631, 1438, 1785, 33, 7036, 16, 2291, 461, 1546, 40, 615...
return '\n <n:src>%s</n:src>\n' \ ' <n:dst>%s/document_src</n:dst>\n ' % (url, url)
return '\n <n:link>\n' \ ' <n:src>%s</n:src>\n' \ ' <n:dst>%s/document_src</n:dst>\n' \ ' </n:link>\n ' % (url, url)
def dav__source(self): vself=self.v_self() if hasattr(vself, 'meta_type') and vself.meta_type in \ ('Document', 'DTML Document', 'DTML Method'): url=vself.absolute_url() return '\n <n:src>%s</n:src>\n' \ ' <n:dst>%s/document_src</n:dst>\n ' % (url, url) return ''
bfa547755ead70ef43bdaf106331c736eb43c41d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/bfa547755ead70ef43bdaf106331c736eb43c41d/PropertySheets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 302, 842, 972, 3168, 12, 2890, 4672, 331, 2890, 33, 2890, 18, 90, 67, 2890, 1435, 309, 3859, 12, 90, 2890, 16, 296, 3901, 67, 723, 6134, 471, 331, 2890, 18, 3901, 67, 723, 316, 521, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 302, 842, 972, 3168, 12, 2890, 4672, 331, 2890, 33, 2890, 18, 90, 67, 2890, 1435, 309, 3859, 12, 90, 2890, 16, 296, 3901, 67, 723, 6134, 471, 331, 2890, 18, 3901, 67, 723, 316, 521, ...
if name != '': name = name.replace('&','&amp;').replace('<','&lt;') self.write_group_header(out, name) for var_doc in var_docs: if not var_doc.is_public: raise ValueError self.write_summary_line(out, var_doc, doc)
self.write_summary_group(out, doc, name, var_docs, grouped_inh_vars) if grouped_inh_vars: for base in doc.mro(): if base in grouped_inh_vars: hdr = 'Inherited from %s' % self.href(base) self.write_group_header(out, hdr) for var_doc in grouped_inh_vars[base]: self.write_summary_line(out, var_doc, doc)
def write_summary_table(self, out, heading, doc, value_type): """ Generate HTML code for a summary table, and write it to C{out}. A summary table is a table that includes a one-row description for each variable (of a given type) in a module or class.
b9a04f544e12574efdc55498e87f9f25c7c85265 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/b9a04f544e12574efdc55498e87f9f25c7c85265/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 7687, 67, 2121, 12, 2890, 16, 596, 16, 11053, 16, 997, 16, 460, 67, 723, 4672, 3536, 6654, 3982, 981, 364, 279, 4916, 1014, 16, 471, 1045, 518, 358, 385, 95, 659, 5496, 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, 1045, 67, 7687, 67, 2121, 12, 2890, 16, 596, 16, 11053, 16, 997, 16, 460, 67, 723, 4672, 3536, 6654, 3982, 981, 364, 279, 4916, 1014, 16, 471, 1045, 518, 358, 385, 95, 659, 5496, 225...
status = self.status_with_cache(path, recurse=False)[-1] if status.data["text_status"] == pysvn.wc_status_kind.added: return True return False
return self.is_status(path, pysvn.wc_status_kind.added)
def is_added(self, path): status = self.status_with_cache(path, recurse=False)[-1] if status.data["text_status"] == pysvn.wc_status_kind.added: return True return False
83315ccd8ce36cba36ecaf03234b6334b1f2fd4d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5119/83315ccd8ce36cba36ecaf03234b6334b1f2fd4d/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 9665, 12, 2890, 16, 589, 4672, 327, 365, 18, 291, 67, 2327, 12, 803, 16, 21027, 25031, 18, 27594, 67, 2327, 67, 9224, 18, 9665, 13, 225, 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, 1652, 353, 67, 9665, 12, 2890, 16, 589, 4672, 327, 365, 18, 291, 67, 2327, 12, 803, 16, 21027, 25031, 18, 27594, 67, 2327, 67, 9224, 18, 9665, 13, 225, 2, -100, -100, -100, -100, -100, -10...
print "Donation [%s] already inactive"%(donation)
print time.ctime(), "Donation [%s] already inactive"%(donation)
def handle_inactive_donation(donation): if donation.active == 0: print "Donation [%s] already inactive"%(donation) return try: if donation.epoch == 0: print "Donation [%s] epoch count is 0, making inactive"%(donation) vmaps = VesselMap.objects.filter(vessel_port__vessel__donation__exact = donation) print "Deleting %i vesselmaps linked to this donation: %s"%(vmaps.count(), vmaps) for vmap in vmaps: vmap.delete() # TODO: need to update people's flow records here!!! donation.active = 0 else: donation.epoch -= 1 print "Donation [%s] inactive, epoch count is now %i"%(donation , donation.epoch) donation.save() except: traceback.print_exc() transaction.rollback() raise else: # success transaction.commit() return True
1db1a15bc2d7456e1aafa032c74fc2cbbdf3ff67 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/1db1a15bc2d7456e1aafa032c74fc2cbbdf3ff67/genidb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 27366, 67, 19752, 367, 12, 19752, 367, 4672, 309, 2727, 367, 18, 3535, 422, 374, 30, 1172, 813, 18, 21261, 9334, 315, 22293, 367, 9799, 87, 65, 1818, 16838, 6, 17105, 19752, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 27366, 67, 19752, 367, 12, 19752, 367, 4672, 309, 2727, 367, 18, 3535, 422, 374, 30, 1172, 813, 18, 21261, 9334, 315, 22293, 367, 9799, 87, 65, 1818, 16838, 6, 17105, 19752, ...
self.assertEqual(len(w.warnings), 2) self.assertWarning(None, w.warnings[0], "Overriding __cmp__ blocks inheritance of __hash__ in 3.x")
self.assertEqual(len(w.warnings), 1)
def __eq__(self, other): pass
f4c9b609a329f3f3eb716a6bccc68b23e7e43370 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/f4c9b609a329f3f3eb716a6bccc68b23e7e43370/test_py3kwarn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 11253, 972, 12, 2890, 16, 1308, 4672, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 11253, 972, 12, 2890, 16, 1308, 4672, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if reason != speech.REASON_FOCUS:
obj=info.NVDAObjectAtStart if not obj: log.debugWarning("Invalid NVDAObjectAtStart") return if obj==self.rootNVDAObject: return
def _set_selection(self, info, reason=speech.REASON_CARET): super(VirtualBuffer, self)._set_selection(info) if isScriptWaiting() or not info.isCollapsed: return api.setReviewPosition(info) obj=info.NVDAObjectAtStart if not obj: log.debugWarning("Invalid NVDAObjectAtStart") return if obj==self.rootNVDAObject: return if reason == speech.REASON_FOCUS: focusObj = api.getFocusObject() else: focusObj=info.focusableNVDAObjectAtStart if reason != speech.REASON_FOCUS: if focusObj and not eventHandler.isPendingEvents("gainFocus") and focusObj!=self.rootNVDAObject and focusObj != api.getFocusObject() and self._shouldSetFocusToObj(focusObj): focusObj.setFocus() obj.scrollIntoView() if self.programmaticScrollMayFireEvent: self._lastProgrammaticScrollTime = time.time() self.passThrough=self.shouldPassThrough(focusObj,reason=reason) # Queue the reporting of pass through mode so that it will be spoken after the actual content. queueHandler.queueFunction(queueHandler.eventQueue, reportPassThrough, self)
bde2da675d0b23fd14bfee00b84707081f9e06de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9340/bde2da675d0b23fd14bfee00b84707081f9e06de/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 10705, 12, 2890, 16, 1123, 16, 3971, 33, 87, 12510, 18, 29416, 1413, 67, 3587, 10238, 4672, 2240, 12, 6466, 1892, 16, 365, 2934, 67, 542, 67, 10705, 12, 1376, 13, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 10705, 12, 2890, 16, 1123, 16, 3971, 33, 87, 12510, 18, 29416, 1413, 67, 3587, 10238, 4672, 2240, 12, 6466, 1892, 16, 365, 2934, 67, 542, 67, 10705, 12, 1376, 13, 309, ...
def decodeGivenEventualEncoding(self, eventualEncoding): return u'<!--' + self + u'-->'
def __str__(self, encoding=DEFAULT_OUTPUT_ENCODING): return "<!--%s-->" % NavigableString.__str__(self, encoding)
def decodeGivenEventualEncoding(self, eventualEncoding): return u'<!--' + self + u'-->'
7300e101f39b7a1a436c6765d140c987cbc58a45 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/7300e101f39b7a1a436c6765d140c987cbc58a45/BeautifulSoup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2495, 6083, 1133, 1462, 4705, 12, 2890, 16, 871, 1462, 4705, 4672, 327, 582, 11, 5586, 413, 11, 397, 365, 397, 582, 11, 413, 1870, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 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, 2495, 6083, 1133, 1462, 4705, 12, 2890, 16, 871, 1462, 4705, 4672, 327, 582, 11, 5586, 413, 11, 397, 365, 397, 582, 11, 413, 1870, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if tags.has_key('Image DateTime'): osd.drawstring('%s' % tags['Image DateTime'], 20, osd.height - pos, fgcolor=osd.COL_ORANGE)
if tags.has_key('Image DateTime') and \ tags.has_key('EXIF ExifImageWidth') and tags.has_key('EXIF ExifImageLength'): osd.drawstring('%s (%s x %s) @ %s' % \ (os.path.basename(self.filename), tags['EXIF ExifImageWidth'], tags['EXIF ExifImageLength'], \ tags['Image DateTime']), \ 20, osd.height - pos, fgcolor=osd.COL_ORANGE) else: osd.drawstring('%s' % (os.path.basename(self.filename)), \ 20, osd.height - pos, fgcolor=osd.COL_ORANGE) pos += 30 if tags.has_key('EXIF ExposureTime') and tags.has_key('EXIF FNumber') and \ tags.has_key('EXIF FocalLength') and tags.has_key('EXIF ISOSpeedRatings') and \ tags.has_key('EXIF ExposureProgram') and tags.has_key('EXIF MeteringMode') and \ tags.has_key('EXIF LightSource') and tags.has_key('EXIF Flash'): osd.drawstring('%s sec F/%s, L=%s mm, ISO %s, %s (%s Mtr), %s (Fls %s)' % \ (tags['EXIF ExposureTime'], tags['EXIF FNumber'], tags['EXIF FocalLength'], tags['EXIF ISOSpeedRatings'], tags['EXIF ExposureProgram'], tags['EXIF MeteringMode'], tags['EXIF LightSource'], tags['EXIF Flash']), 20, osd.height - pos, fgcolor=osd.COL_ORANGE)
def drawosd(self):
8edad2903f5ab4605b7c9f42dfe5775c023e3bbd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/8edad2903f5ab4605b7c9f42dfe5775c023e3bbd/iview.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 538, 72, 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, 3724, 538, 72, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
for child in self.childs:
for child in self.children:
def __setattr__(self, name, value): super(Singleton, self).__setattr__(name, value) if name in ('init', 'update', 'demo'): tools.config[name][self.name] = 1 for child in self.childs: setattr(child, name, value) if name == 'depth': for child in self.childs: setattr(child, name, value + 1)
5d881b19530b13f14fa5b067e4521b75506304b5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/5d881b19530b13f14fa5b067e4521b75506304b5/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1747, 972, 12, 2890, 16, 508, 16, 460, 4672, 2240, 12, 19571, 16, 365, 2934, 972, 542, 1747, 972, 12, 529, 16, 460, 13, 309, 508, 316, 7707, 2738, 2187, 296, 2725, 2187, 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, 542, 1747, 972, 12, 2890, 16, 508, 16, 460, 4672, 2240, 12, 19571, 16, 365, 2934, 972, 542, 1747, 972, 12, 529, 16, 460, 13, 309, 508, 316, 7707, 2738, 2187, 296, 2725, 2187, 2...
if (__name__ == "__main__"): import sys verbose = not "--quiet" in sys.argv[1:]
def compare_vectors(n, m, v_in, v_tr): for i in xrange(m): x = v_tr[i] / n assert abs(x - v_in[i]) < 1.e-6, "%d/%d %.6g %.6g" % (i, n, v_in[i], x) def test_comprehensive_cc_1d(max_transform_size): for n in xrange(1,max_transform_size+1): fft = fftbx.complex_to_complex(n) m = n * 2 v_in = shared.double() for i in xrange(m): v_in.append(debug_utils.random.random()) for f,b in ((fft.forward, fft.backward), (fft.backward, fft.forward)): v_tr = v_in.deep_copy() f(v_tr) b(v_tr) compare_vectors(n, m, v_in, v_tr) def test_comprehensive_rc_1d(max_transform_size): for n in xrange(1,max_transform_size+1): fft = fftbx.real_to_complex(n) m = fft.Mreal() v_in = shared.double() for i in xrange(n): v_in.append(debug_utils.random.random()) for i in xrange(n, m): v_in.append(999) v_tr = v_in.deep_copy() fft.forward(v_tr) fft.backward(v_tr) compare_vectors(n, n, v_in, v_tr) v_in[n] = v_in[1] v_in[1] = 0 if (n % 2 == 0): v_in[n+1] = 0 v_tr = v_in.deep_copy() fft.backward(v_tr) fft.forward(v_tr) compare_vectors(n, m, v_in, v_tr) def run(): Flags = debug_utils.command_line_options(sys.argv[1:], ( "RandomSeed", "verbose", )) if (not Flags.RandomSeed): debug_utils.set_random_seed(0)
def test_real_to_complex_3d(verbose): fft = fftbx.real_to_complex_3d((3,4,5)) M = fft.Mreal() vd = shared.double(M[0] * M[1] * M[2]) vc = shared.complex_double(vd.size() / 2) for i in xrange(vd.size()): vd[i] = i for i in xrange(vc.size()): vc[i] = complex(2*i, 2*i+1) assert vd.size() == 2 * vc.size() fft.forward(vd) fft.forward(vc) if (verbose): show_rseq_3d(vd, fft.Mreal(), fft.Mreal()) assert_complex_eq_real(vc, vd) fft.backward(vd) fft.backward(vc) if (verbose): show_rseq_3d(vd, fft.Mreal(), fft.Nreal()) assert_complex_eq_real(vc, vd)
4e9409e6920c2ff58fb390e05fe0d8fc75ab9213 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/4e9409e6920c2ff58fb390e05fe0d8fc75ab9213/tst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 7688, 67, 869, 67, 14259, 67, 23, 72, 12, 11369, 4672, 15741, 273, 15741, 70, 92, 18, 7688, 67, 869, 67, 14259, 67, 23, 72, 12443, 23, 16, 24, 16, 25, 3719, 490, 273, 157...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 869, 67, 14259, 67, 23, 72, 12, 11369, 4672, 15741, 273, 15741, 70, 92, 18, 7688, 67, 869, 67, 14259, 67, 23, 72, 12443, 23, 16, 24, 16, 25, 3719, 490, 273, 157...
files.extend(self._Run(['diff', upstream, '--name-only']).split())
files.extend(self._Capture(['diff', upstream, '--name-only']).split())
def _AttemptRebase(self, upstream, files, options, newbase=None, branch=None, printed_path=False): """Attempt to rebase onto either upstream or, if specified, newbase.""" files.extend(self._Run(['diff', upstream, '--name-only']).split()) revision = upstream if newbase: revision = newbase if not printed_path: options.stdout.write('\n_____ %s : Attempting rebase onto %s...\n' % ( self.relpath, revision)) printed_path = True else: options.stdout.write('Attempting rebase onto %s...\n' % revision)
9ee5d919647ed29a24b35149e866c885fd04b9bd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6076/9ee5d919647ed29a24b35149e866c885fd04b9bd/gclient_scm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7744, 426, 1969, 12, 2890, 16, 13505, 16, 1390, 16, 702, 16, 394, 1969, 33, 7036, 16, 3803, 33, 7036, 16, 14099, 67, 803, 33, 8381, 4672, 3536, 7744, 358, 283, 1969, 10170, 3344, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7744, 426, 1969, 12, 2890, 16, 13505, 16, 1390, 16, 702, 16, 394, 1969, 33, 7036, 16, 3803, 33, 7036, 16, 14099, 67, 803, 33, 8381, 4672, 3536, 7744, 358, 283, 1969, 10170, 3344, ...
'Mismatch: inline interpreted text start-string and' ' role with phrase-reference end-string at line %s.' % lineno) text = unescape(string[matchstart:matchend], 1) rawsource = unescape(string[matchstart:matchend], 1) prb = self.problematic(text, rawsource, msg) return (string[:matchstart], [prb], string[matchend:], [msg]) return self.phrase_ref( string[:matchstart], string[matchend:][endmatch.end():], text, rawsource)
'Mismatch: both interpreted text role %s and ' 'reference suffix at line %s.' % (position, lineno)) text = unescape(string[rolestart:textend], 1) prb = self.problematic(text, text, msg) return string[:rolestart], [prb], string[textend:], [msg] return self.phrase_ref(string[:matchstart], string[textend:], rawsource, text)
def interpreted_or_phrase_ref(self, match, lineno): pattern = self.patterns.interpreted_or_phrase_ref string = match.string matchstart = match.start('backquote') matchend = match.end('backquote') rolestart = match.start('role') role = match.group('role') position = '' if role: role = role[1:-1] position = 'prefix' elif self.quoted_start(match): return (string[:matchend], [], string[matchend:], []) endmatch = pattern.search(string[matchend:]) if endmatch and endmatch.start(1): # 1 or more chars escaped = endmatch.string[:endmatch.start(1)] text = unescape(escaped, 0) rawsource = unescape( string[match.start():matchend+endmatch.end()], 1) if rawsource[-1:] == '_': if role: msg = self.reporter.warning( 'Mismatch: inline interpreted text start-string and' ' role with phrase-reference end-string at line %s.' % lineno) text = unescape(string[matchstart:matchend], 1) rawsource = unescape(string[matchstart:matchend], 1) prb = self.problematic(text, rawsource, msg) return (string[:matchstart], [prb], string[matchend:], [msg]) return self.phrase_ref( string[:matchstart], string[matchend:][endmatch.end():], text, rawsource) else: return self.interpreted( string[:rolestart], string[matchend:][endmatch.end():], endmatch, role, position, lineno, escaped, rawsource, text) msg = self.reporter.warning( 'Inline interpreted text or phrase reference start-string ' 'without end-string at line %s.' % lineno) text = unescape(string[matchstart:matchend], 1) rawsource = unescape(string[matchstart:matchend], 1) prb = self.problematic(text, rawsource, msg) return string[:matchstart], [prb], string[matchend:], [msg]
9fe47ec4311156cad473d8ed8bf0dba5fd73c14e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/9fe47ec4311156cad473d8ed8bf0dba5fd73c14e/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19898, 67, 280, 67, 9429, 67, 1734, 12, 2890, 16, 845, 16, 7586, 4672, 1936, 273, 365, 18, 13317, 18, 24713, 329, 67, 280, 67, 9429, 67, 1734, 533, 273, 845, 18, 1080, 845, 1937, 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, 19898, 67, 280, 67, 9429, 67, 1734, 12, 2890, 16, 845, 16, 7586, 4672, 1936, 273, 365, 18, 13317, 18, 24713, 329, 67, 280, 67, 9429, 67, 1734, 533, 273, 845, 18, 1080, 845, 1937, 273...
jj10 = j[[0,1],:] jj21 = j[[1,2],:] jj20 = j[[0,2],:] det10 = numpy.linalg.det(jj10) det21 = numpy.linalg.det(jj21) det20 = numpy.linalg.det(jj20) if abs(det10) > minJacobian: ij10 = numpy.linalg.inv(jj10) if abs(det21) > minJacobian: ij21 = numpy.linalg.inv(jj21) jacobianInv[iQuad] = numpy.array([ [ij10[0,0], ij10[1,0]], [ij10[0,1], ij10[1,1]], [ij21[0,1], ij21[1,1]] ],
jj01 = j[[0,1],:] jj12 = j[[1,2],:] jj02 = j[[0,2],:] det01 = numpy.linalg.det(jj01) det12 = numpy.linalg.det(jj12) det02 = numpy.linalg.det(jj02) if abs(det01) > minJacobian: ij01 = numpy.linalg.inv(jj01) if abs(det12) > minJacobian: ij12 = numpy.linalg.inv(jj12) jacobianInv[iQuad] = numpy.array([ [ij01[0,0], ij01[0,1], ij12[0,1]], [ij01[1,0], ij01[1,1], ij12[1,1]] ],
def calculateJacobian(quadrature, vertices): """ Calculate jacobian, its determinant, and its inverse at quadrature points for a given cell. @param quadrature Quadrature information @param vertices Coordinates of cell's vertices """ jacobian = numpy.zeros( (quadrature.numQuadPts, quadrature.spaceDim, quadrature.cellDim), dtype=numpy.float64) jacobianInv = numpy.zeros( (quadrature.numQuadPts, quadrature.spaceDim, quadrature.cellDim), dtype=numpy.float64) jacobianDet = numpy.zeros( (quadrature.numQuadPts,), dtype=numpy.float64) iQuad = 0 for q in quadrature.quadPtsRef: # Jacobian at quadrature points deriv = quadrature.basisDeriv[iQuad] j = numpy.dot(vertices.transpose(), deriv) jacobian[iQuad] = j # Determinant of Jacobian and Jacobian inverse at quadrature points if quadrature.spaceDim == quadrature.cellDim: jacobianDet[iQuad] = numpy.linalg.det(j) jacobianInv[iQuad] = numpy.linalg.inv(j) else: det = numpy.linalg.det(numpy.dot(j.transpose(), j))**0.5 jacobianDet[iQuad] = det if 1 == quadrature.cellDim: jacobianInv[iQuad] = 1.0 / j elif 2 == quadrature.cellDim: minJacobian = 1.0e-06 jj10 = j[[0,1],:] jj21 = j[[1,2],:] jj20 = j[[0,2],:] det10 = numpy.linalg.det(jj10) det21 = numpy.linalg.det(jj21) det20 = numpy.linalg.det(jj20) if abs(det10) > minJacobian: ij10 = numpy.linalg.inv(jj10) if abs(det21) > minJacobian: ij21 = numpy.linalg.inv(jj21) jacobianInv[iQuad] = numpy.array([ [ij10[0,0], ij10[1,0]], [ij10[0,1], ij10[1,1]], [ij21[0,1], ij21[1,1]] ], dtype=numpy.float64) elif abs(det20) > minJacobian: ij20 = numpy.linalg.inv(jj20) jacobianInv[iQuad] = numpy.array([ [ij10[0,0], ij10[1,0]], [ij10[0,1], ij10[1,1]], [ij20[0,1], ij20[1,1]] ], dtype=numpy.float64) else: jacobianInv[iQuad] = numpy.array([ [ij10[0,0], ij10[0,1]], [ij10[1,0], ij10[1,1]], [ 0.0, 0.0] ], dtype=numpy.float64) elif abs(det20) > minJacobian: ij20 = numpy.linalg.inv(jj20) if abs(det21) > minJacobian: ij21 = numpy.linalg.inv(jj21) jacobianInv[iQuad] = numpy.array([ [ij20[0,0], ij20[1,0]], [ij21[0,0], ij21[1,0]], [ij20[0,1], ij20[1,1]] ], dtype=numpy.float64) else: jacobianInv[iQuad] = numpy.array([ [ij20[0,0], ij20[1,0]], [ 0.0, 0.0], [ij20[0,1], ij20[1,1]] ], dtype=numpy.float64) elif abs(det21) > minJacobian: ij21 = numpy.linalg.inv(jj21) jacobianInv[iQuad] = numpy.array([ [ 0.0, 0.0], [ij21[0,0], ij21[1,0]], [ij21[0,1], ij21[1,1]] ], dtype=numpy.float64) else: raise ValueError("Could not find inverse of Jacobian.") else: raise ValueError("Could not find inverse of Jacobian.") iQuad += 1 return (jacobian, jacobianInv, jacobianDet)
290459f37240880edeb52a4d3e3816731608bdbd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8645/290459f37240880edeb52a4d3e3816731608bdbd/feutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4604, 46, 1077, 26968, 12, 21733, 86, 1231, 16, 6928, 4672, 3536, 9029, 20138, 26968, 16, 2097, 6328, 970, 16, 471, 2097, 8322, 622, 9474, 86, 1231, 3143, 364, 279, 864, 2484, 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, 4604, 46, 1077, 26968, 12, 21733, 86, 1231, 16, 6928, 4672, 3536, 9029, 20138, 26968, 16, 2097, 6328, 970, 16, 471, 2097, 8322, 622, 9474, 86, 1231, 3143, 364, 279, 864, 2484, 18, 225, ...
if not _type_to_name_map:
if _type_to_name_map=={}:
def type_to_name(gtype): global _type_to_name_map if not _type_to_name_map: for name in _names: if name[:2] == 'A_': _type_to_name_map[eval(name)] = name[2:] if _type_to_name_map.has_key(gtype): return _type_to_name_map[gtype] return 'TYPE=' + `gtype`
74823b466b97f1a3be870d1d3c4a71f3826e0373 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/74823b466b97f1a3be870d1d3c4a71f3826e0373/gopherlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 618, 67, 869, 67, 529, 12, 75, 723, 4672, 2552, 389, 723, 67, 869, 67, 529, 67, 1458, 309, 389, 723, 67, 869, 67, 529, 67, 1458, 631, 2916, 30, 364, 508, 316, 389, 1973, 30, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 618, 67, 869, 67, 529, 12, 75, 723, 4672, 2552, 389, 723, 67, 869, 67, 529, 67, 1458, 309, 389, 723, 67, 869, 67, 529, 67, 1458, 631, 2916, 30, 364, 508, 316, 389, 1973, 30, 309, ...
callback(i)
callback(i)
def dd(self, src, dest, callback=None, bs=32768, count = -1, skip=0, seek=0): if type(src) in (str, unicode): srcfile = self.backend.open(src) else: srcfile = src
d1d1c079b0f72dc5d75ee260f0d6b0b8952ad3af /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1208/d1d1c079b0f72dc5d75ee260f0d6b0b8952ad3af/ufo_dd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6957, 12, 2890, 16, 1705, 16, 1570, 16, 1348, 33, 7036, 16, 7081, 33, 1578, 6669, 28, 16, 1056, 273, 300, 21, 16, 2488, 33, 20, 16, 6520, 33, 20, 4672, 309, 618, 12, 4816, 13, 316,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6957, 12, 2890, 16, 1705, 16, 1570, 16, 1348, 33, 7036, 16, 7081, 33, 1578, 6669, 28, 16, 1056, 273, 300, 21, 16, 2488, 33, 20, 16, 6520, 33, 20, 4672, 309, 618, 12, 4816, 13, 316,...
frame = panels.get_widget(window)
frame = self.panels.get_widget(window)
def get_root(self): """Create and return the application root window. """ # TODO: Menus, status bar, and an "execute" button root = tk.Tk() root.title(self.title) # Main window with fixed width/height window = tk.Frame(root, width=self.width, height=self.height) window.pack() window.pack_propagate(False) # Single-panel application if isinstance(self.panels, Panel): frame = panels.get_widget(window) frame.pack() # Multi-panel (tabbed) application elif isinstance(self.panels, list): labels = [panel.title for panel in self.panels] frames = [panel.get_widget(window) for panel in self.panels] tabs = Tabs(window, labels, frames) tabs.pack() frames[0].pack(fill='x') return root
c1d2ee0e89ec4d6a6568dea497dca546962c52bf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4675/c1d2ee0e89ec4d6a6568dea497dca546962c52bf/meta.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3085, 12, 2890, 4672, 3536, 1684, 471, 327, 326, 2521, 1365, 2742, 18, 3536, 468, 2660, 30, 490, 11797, 16, 1267, 4653, 16, 471, 392, 315, 8837, 6, 3568, 1365, 273, 13030, 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, 336, 67, 3085, 12, 2890, 4672, 3536, 1684, 471, 327, 326, 2521, 1365, 2742, 18, 3536, 468, 2660, 30, 490, 11797, 16, 1267, 4653, 16, 471, 392, 315, 8837, 6, 3568, 1365, 273, 13030, 18,...
roundtrip(suite, s)
roundtrip(parser.suite, s)
def test_suite(s): print "suite:", s roundtrip(suite, s)
e3fb18c1c47bda766c8e234368f4884cec1189ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e3fb18c1c47bda766c8e234368f4884cec1189ce/test_parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 30676, 12, 87, 4672, 1172, 315, 30676, 2773, 16, 272, 3643, 25125, 12, 4288, 18, 30676, 16, 272, 13, 282, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 30676, 12, 87, 4672, 1172, 315, 30676, 2773, 16, 272, 3643, 25125, 12, 4288, 18, 30676, 16, 272, 13, 282, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print "Connection refused when connecting to", ADDR
error_msg('was refused')
def test_timeout(): test_support.requires('network') if test_support.verbose: print "test_timeout ..." # A service which issues a welcome banner (without need to write # anything). # XXX ("gmail.org", 995) has been unreliable so far, from time to time # XXX non-responsive for hours on end (& across all buildbot slaves, # XXX so that's not just a local thing). ADDR = "gmail.org", 995 s = socket.socket() s.settimeout(30.0) try: s.connect(ADDR) except socket.timeout: print >> sys.stderr, """\ WARNING: an attempt to connect to %r timed out, in test_timeout. That may be legitimate, but is not the outcome we hoped for. If this message is seen often, test_timeout should be changed to use a more reliable address.""" % (ADDR,) return except socket.error, exc: # In case connection is refused. if exc.args[0] == errno.ECONNREFUSED: print "Connection refused when connecting to", ADDR return else: raise ss = socket.ssl(s) # Read part of return welcome banner twice. ss.read(1) ss.read(1) s.close()
877fdb01fed44e00863f09150b449aa838a3d3dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/877fdb01fed44e00863f09150b449aa838a3d3dc/test_socket_ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4538, 13332, 1842, 67, 13261, 18, 18942, 2668, 5185, 6134, 225, 309, 1842, 67, 13261, 18, 11369, 30, 1172, 315, 3813, 67, 4538, 18483, 225, 468, 432, 1156, 1492, 8296, 279, 283...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4538, 13332, 1842, 67, 13261, 18, 18942, 2668, 5185, 6134, 225, 309, 1842, 67, 13261, 18, 11369, 30, 1172, 315, 3813, 67, 4538, 18483, 225, 468, 432, 1156, 1492, 8296, 279, 283...
"HO2": atom_info("H", 0, "H'"), "H51": atom_info("H", 0, "H'"), "H52": atom_info("H", 0, "H'"), "HO1": atom_info("H", 0, "H'"),
"HO2": atom_info("H", 0, "H"), "H51": atom_info("H", 0, "H"), "H52": atom_info("H", 0, "H"), "HO1": 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...
raise util.Abort(_(msg))
raise util.Abort(_(str(msg)))
def getdiff(ui, repo, r, parent): '''return diff for the specified revision''' output = "" for chunk in patch.diff(repo, parent.node(), r.node()): output += chunk return output
396721bb31c3ad01cf587ea9c909dbeb2bde4ec3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11434/396721bb31c3ad01cf587ea9c909dbeb2bde4ec3/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 5413, 12, 4881, 16, 3538, 16, 436, 16, 982, 4672, 9163, 2463, 3122, 364, 326, 1269, 6350, 26418, 876, 273, 1408, 364, 2441, 316, 4729, 18, 5413, 12, 7422, 16, 982, 18, 2159, 9334,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 5413, 12, 4881, 16, 3538, 16, 436, 16, 982, 4672, 9163, 2463, 3122, 364, 326, 1269, 6350, 26418, 876, 273, 1408, 364, 2441, 316, 4729, 18, 5413, 12, 7422, 16, 982, 18, 2159, 9334,...
def is_of_class(self, doc, cls): return doc.__class__ == cls MESSAGE_HANDLERS = { gmodel.new_order_notification_t: 'on_new_order', gmodel.order_state_change_notification_t: 'on_order_state_change', gmodel.authorization_amount_notification_t: 'on_authorization_amount', gmodel.risk_information_notification_t: 'on_risk_information', gmodel.charge_amount_notification_t: 'on_charge_amount', gmodel.refund_amount_notification_t: 'on_refund_amount', gmodel.chargeback_amount_notification_t: 'on_chargeback_amount', gmodel.checkout_redirect_t: 'on_checkout_redirect',
def receive_xml(self, input_xml, context=None): if context is None: context = ControllerContext(outgoing=False) context.xml = input_xml try: self.__call_handler('on_xml_receiving', context=context) try: input = gxml.Document.fromxml(input_xml) context.message = input except Exception, e: error = 'Error reading XML: %s' % (e.message,) raise DataError(message=error, context=context, origin=e) result = self.receive_message(message=input, order_id=input.google_order_number, context=context) context.response_message = result try: response_xml = result.toxml() context.response_xml = response_xml except Exception, e: error = 'Error reading XML: %s' % (e.message,) raise DataError(message=error, context=context, origin=e) self.__call_handler('on_xml_received', context=context) return response_xml except GcheckyError, e: return self.on_exception(exception=e, context=context) __MESSAGE_HANDLERS = { gmodel.new_order_notification_t: 'handle_new_order', gmodel.order_state_change_notification_t: 'handle_order_state_change', gmodel.authorization_amount_notification_t: 'handle_authorization_amount', gmodel.risk_information_notification_t: 'handle_risk_information', gmodel.charge_amount_notification_t: 'handle_charge_amount', gmodel.refund_amount_notification_t: 'handle_refund_amount', gmodel.chargeback_amount_notification_t: 'handle_chargeback_amount',
def is_of_class(self, doc, cls): return doc.__class__ == cls
2dae73cb17e61665bc3a359c80357abb15f324ba /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10801/2dae73cb17e61665bc3a359c80357abb15f324ba/controller.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 792, 67, 1106, 12, 2890, 16, 997, 16, 2028, 4672, 327, 997, 16186, 1106, 972, 422, 2028, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 792, 67, 1106, 12, 2890, 16, 997, 16, 2028, 4672, 327, 997, 16186, 1106, 972, 422, 2028, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
remove_asserts=True)
remove_asserts=False)
def task_prejitbackendopt_lltype(self): from pypy.translator.backendopt.all import backend_optimizations backend_optimizations(self.translator, inline_threshold=0, merge_if_blocks=True, constfold=True, raisingop2direct_call=False, remove_asserts=True)
378799506abeab27cb10941a06b3c4fde1ed7709 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/378799506abeab27cb10941a06b3c4fde1ed7709/driver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1562, 67, 1484, 78, 305, 9993, 3838, 67, 2906, 723, 12, 2890, 4672, 628, 18951, 93, 18, 17879, 18, 9993, 3838, 18, 454, 1930, 4221, 67, 16689, 7089, 4221, 67, 16689, 7089, 12, 2890, 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, 1562, 67, 1484, 78, 305, 9993, 3838, 67, 2906, 723, 12, 2890, 4672, 628, 18951, 93, 18, 17879, 18, 9993, 3838, 18, 454, 1930, 4221, 67, 16689, 7089, 4221, 67, 16689, 7089, 12, 2890, 18...
log.error("Could not decode header: %s" % e.message)
log.error("Could not decode header: %s" % e)
def lineReceived(self, line): if self.command is None: try: command, seq = line.split() except ValueError: log.error("Could not decode command/sequence number pair from dispatcher: %s" % line) return if command in self.required_headers: self.command = command self.seq = seq self.headers = DecodingDict() else: log.error("Unknown command: %s" % command) elif line.strip() == "": for header in self.required_headers[self.command]: if header not in self.headers: log.error('Required header "%s" for command "%s" not found' % (header, self.command)) return try: try: response = self.factory.parent.got_command(self.factory.host, self.command, self.seq, self.headers) except: traceback.print_exc() response = "%s error\r\n" % self.seq finally: if response: self.transport.write(response) self.command = None else: try: name, value = line.split(": ", 1) except ValueError: log.error("Unable to parse header: %s" % line) try: self.headers[name] = value except DecodingError, e: log.error("Could not decode header: %s" % e.message)
ef5a547ddd88149e407aa0fffb2c1df0db44db0b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3445/ef5a547ddd88149e407aa0fffb2c1df0db44db0b/relay.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 980, 8872, 12, 2890, 16, 980, 4672, 309, 365, 18, 3076, 353, 599, 30, 775, 30, 1296, 16, 3833, 273, 980, 18, 4939, 1435, 1335, 2068, 30, 613, 18, 1636, 2932, 4445, 486, 2495, 1296, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 980, 8872, 12, 2890, 16, 980, 4672, 309, 365, 18, 3076, 353, 599, 30, 775, 30, 1296, 16, 3833, 273, 980, 18, 4939, 1435, 1335, 2068, 30, 613, 18, 1636, 2932, 4445, 486, 2495, 1296, 1...
skinCluster = cmd.skinCluster(geo,joints)[0]
skinCluster = cmd.skinCluster(geo,joints.values())[0]
def loadWeights( geos=None, filepath=DEFAULT_PATH, usePosition=True, tolerance=1e-6 ): '''loads weights back on to a model given a file. NOTE: the tolerance is an axis tolerance NOT a distance tolerance. ie each axis must fall within the value of the given vector to be considered a match - this makes matching a heap faster because vectors can be culled from the a sorted list. possibly implementing some sort of oct-tree class might speed up the matching more, but... the majority of weight loading time at this stage is spent by maya actually applying skin weights, not the positional searching''' start = time.clock() miscData,geoAndData = loadData(filepath) #the miscData contains a dictionary with a bunch of data stored from when the weights was saved - do some #sanity checking to make sure we're not loading weights from some completely different source curFile = cmd.file(q=True,sn=True) origFile = miscData['file'] if curFile != origFile: response = cmd.confirmDialog(t='files differ...',m='the file these weights were saved from was %s\nthis is different from your currently opened file.\n\nis that OK?'%miscData['file'],b=('Proceed','Cancel')) if response == 'Cancel': return #if the geo is None, then check for data in the verts arg - the user may just want weights #loaded on a specific list of verts - we can get the geo name from those verts skinCluster = '' verts = cmd.ls(cmd.polyListComponentConversion(geos,toVertex=True),fl=True) geoVertDict = {} for vert in verts: geo = vert[:vert.rfind('.')] try: geoVertDict[geo].append(vert) except KeyError: geoVertDict[geo] = [vert] #cache heavily access method objects as locals... skinPercent = cmd.skinPercent progressWindow = cmd.progressWindow xform = cmd.xform clock = time.clock numItems = len(geoVertDict) curItem = 1 mayaTime = 0 #records the amount of time spent performing maya cmds... progressWindow(title='loading weights from file %d items'%numItems) for geo,verts in geoVertDict.iteritems(): try: joints,weightData = geoAndData[geo] except KeyError: continue #sort the weightData by ascending x values so we can search faster weightData = sortByIdx(weightData) #are all the joints in the scene? joints = list(joints) for j in joints: if not cmd.objExists(j): raise Exception('missing joint %s'%j) #do we have a skinCluster on the geo already? if not, build one skinCluster = cmd.ls(cmd.listHistory(geo),type='skinCluster') if not skinCluster: cmd.delete(geo,ch=True) skinCluster = cmd.skinCluster(geo,joints)[0] verts = cmd.ls(cmd.polyListComponentConversion(geo,toVertex=True),fl=True) else: skinCluster = skinCluster[0] num = len(verts) cur = 0.0 inc = 100.0/num if usePosition: progressWindow(edit=True,status='by position: %s (%d/%d)'%(geo,curItem,numItems)) for vert in verts: progressWindow(edit=True,progress=cur) cur += inc time1 = clock() ###--- time spent by maya... pos = Vector( xform(vert,q=True,ws=True,t=True) ) mayaTime += clock() - time1 ###--- time spent by maya... vertData = findBestVector(pos,weightData,tolerance) try: id, jointList, weightList = vertData.id, vertData.joints, vertData.weights jointsAndWeights = zip(jointList,weightList) time1 = clock() ###--- time spent by maya... skinPercent(skinCluster,vert,tv=jointsAndWeights) mayaTime += clock() - time1 ###--- time spent by maya... except AttributeError: print '### no point found for %s'%vert else: progressWindow(status='by id: %s (%d/%d)'%(geo,curItem,numItems)) for item in weightData: progressWindow(edit=True,progress=cur/float(num)*100) cur += 1 id, jointList, weightList = item.id, item.joints, item.weights jointsAndWeights = zip(jointList,weightList) vertName = '%s.vtx[%d]'%(geo,id) time1 = clock() ### skinPercent(skinCluster,vertName,tv=jointsAndWeights) mayaTime += clock() - time1 ### curItem += 1 progressWindow(ep=True) end = clock() print 'time for weight load %.02f secs'%(end-start) print 'time spent doing maya cmds %.02f secs'%mayaTime
2ade017cab8b7824a24175b7b016a28e5619e2c6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1810/2ade017cab8b7824a24175b7b016a28e5619e2c6/skinWeights.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 16595, 12, 8244, 538, 33, 7036, 16, 3608, 33, 5280, 67, 4211, 16, 999, 2555, 33, 5510, 16, 10673, 33, 21, 73, 17, 26, 262, 30, 9163, 17135, 5376, 1473, 603, 358, 279, 938, 864,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16595, 12, 8244, 538, 33, 7036, 16, 3608, 33, 5280, 67, 4211, 16, 999, 2555, 33, 5510, 16, 10673, 33, 21, 73, 17, 26, 262, 30, 9163, 17135, 5376, 1473, 603, 358, 279, 938, 864,...
returned element.
returned element to add it.
def __getattr__(self, name): ''' If an element with the given name has already been added, just return that element. Otherwise, return a new element with the given name and this object as a parent. This does NOT add the returned element to this object yet, you still need to call the returned element. ''' if name.startswith('_'): return object.__getattr__(self, name) if name in self._element_map: return self._element_map[name] element = EasyXML(name) element._parent = self return element
c8145ff1268656e629297b3584563364516a9bcb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13705/c8145ff1268656e629297b3584563364516a9bcb/easyxml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1747, 972, 12, 2890, 16, 508, 4672, 9163, 971, 392, 930, 598, 326, 864, 508, 711, 1818, 2118, 3096, 16, 2537, 327, 716, 930, 18, 225, 5272, 16, 327, 279, 394, 930, 598, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1747, 972, 12, 2890, 16, 508, 4672, 9163, 971, 392, 930, 598, 326, 864, 508, 711, 1818, 2118, 3096, 16, 2537, 327, 716, 930, 18, 225, 5272, 16, 327, 279, 394, 930, 598, 32...
progress( "
progress( "
def testIncludes(self, workingContext, template, _variables, smartIn=[], bindings=[]):
8c96b63364032a74d7de3114d9de3114e988875a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/8c96b63364032a74d7de3114d9de3114e988875a/cwm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 16815, 12, 2890, 16, 5960, 1042, 16, 1542, 16, 389, 7528, 16, 13706, 382, 22850, 6487, 7394, 33, 8526, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 16815, 12, 2890, 16, 5960, 1042, 16, 1542, 16, 389, 7528, 16, 13706, 382, 22850, 6487, 7394, 33, 8526, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def _set_tunnel(self, host, port=None):
def _set_tunnel(self, host, port=None, headers=None):
def _set_tunnel(self, host, port=None): """ Sets up the host and the port for the HTTP CONNECT Tunnelling.
6ee9d207fd56fb5ce7ad85b65191b238f849defc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/6ee9d207fd56fb5ce7ad85b65191b238f849defc/httplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 19878, 12, 2890, 16, 1479, 16, 1756, 33, 7036, 16, 1607, 33, 7036, 4672, 3536, 11511, 731, 326, 1479, 471, 326, 1756, 364, 326, 2239, 21593, 399, 318, 82, 1165, 310, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 19878, 12, 2890, 16, 1479, 16, 1756, 33, 7036, 16, 1607, 33, 7036, 4672, 3536, 11511, 731, 326, 1479, 471, 326, 1756, 364, 326, 2239, 21593, 399, 318, 82, 1165, 310, 18, ...
ps.Publisher().sendMessage('Load slice to viewer', (proj.imagedata, proj.mask_dict))
def LoadProject(self): proj = prj.Project()
68cef1d5407f6804e077082091f3fe0d05177932 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10228/68cef1d5407f6804e077082091f3fe0d05177932/control.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4444, 4109, 12, 2890, 4672, 10296, 273, 27378, 18, 4109, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4444, 4109, 12, 2890, 4672, 10296, 273, 27378, 18, 4109, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
doctype.ownerDocument = self.dom
if Dom == minidom: doctype.ownerDocument = self.dom
def insertDoctype(self, name, publicId, systemId): domimpl = Dom.getDOMImplementation() doctype = domimpl.createDocumentType(name, publicId, systemId) self.document.appendChild(NodeBuilder(doctype)) doctype.ownerDocument = self.dom
8d874360a495935d13ad2ff16adf52585697dc6e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4487/8d874360a495935d13ad2ff16adf52585697dc6e/dom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 3244, 12387, 12, 2890, 16, 508, 16, 1071, 548, 16, 30083, 4672, 4092, 11299, 273, 12965, 18, 588, 8168, 13621, 1435, 24909, 273, 4092, 11299, 18, 2640, 2519, 559, 12, 529, 16, 1071...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 3244, 12387, 12, 2890, 16, 508, 16, 1071, 548, 16, 30083, 4672, 4092, 11299, 273, 12965, 18, 588, 8168, 13621, 1435, 24909, 273, 4092, 11299, 18, 2640, 2519, 559, 12, 529, 16, 1071...
peu.notify(grb_dict, 'DAG file vanished!?')
notify(grb, dag, 'DAG file vanished!?')
def check_status(self): """ Updating the status for this DAG, and return the fstat value """
6196656e03be958b606b4120d4998b03a9c7e5df /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/6196656e03be958b606b4120d4998b03a9c7e5df/pylal_exttrig_llutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 2327, 12, 2890, 4672, 3536, 27254, 1776, 326, 1267, 364, 333, 463, 1781, 16, 471, 327, 326, 284, 5642, 460, 3536, 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, 866, 67, 2327, 12, 2890, 4672, 3536, 27254, 1776, 326, 1267, 364, 333, 463, 1781, 16, 471, 327, 326, 284, 5642, 460, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.setFrameStyle(QFrame.Panel)
self.setStyleSheet("QFrame { border: 3px solid red }");
def activate(self): if not self.active_: self.active_ = True self.setFocus(Qt.OtherFocusReason) self.setFrameStyle(QFrame.Panel) self.update()
7d2de1ce0067cb6f5a099b6f4e737c30825aa8ba /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/142/7d2de1ce0067cb6f5a099b6f4e737c30825aa8ba/FrameViewer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10235, 12, 2890, 4672, 309, 486, 365, 18, 3535, 67, 30, 365, 18, 3535, 67, 273, 1053, 365, 18, 542, 9233, 12, 23310, 18, 8290, 9233, 8385, 13, 365, 18, 542, 2885, 8229, 2932, 53, 321...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10235, 12, 2890, 4672, 309, 486, 365, 18, 3535, 67, 30, 365, 18, 3535, 67, 273, 1053, 365, 18, 542, 9233, 12, 23310, 18, 8290, 9233, 8385, 13, 365, 18, 542, 2885, 8229, 2932, 53, 321...
'period_id': period_id, 'date': slip.date
'period_id': period_id, 'date': slip.date, 'ref':slip.number, 'narration': 'Adjustment : %s' % (slip.name)
def create_analytic_line(name, amount, unit_amount, account_id, general_account_id, move_id, journal_id, user_id): line_pool = self.pool.get('account.analytic.line') res = { 'name':name, 'amount':amount, 'unite_amount':unit_amount, 'account_id':account_id, 'general_account_id':general_account_id, 'move_id':move_id, 'date':time.strftime('%Y-%m-%d'), 'journal_id':journal_id, 'user_id': user_id, 'type':'src' } return line_pool.create(cr, uid, res)
f073b10053f19e1cf38a92e2be4efbc890e65abf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/f073b10053f19e1cf38a92e2be4efbc890e65abf/hr_payroll.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 304, 7834, 335, 67, 1369, 12, 529, 16, 3844, 16, 2836, 67, 8949, 16, 2236, 67, 350, 16, 7470, 67, 4631, 67, 350, 16, 3635, 67, 350, 16, 13001, 67, 350, 16, 729, 67, 350, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 304, 7834, 335, 67, 1369, 12, 529, 16, 3844, 16, 2836, 67, 8949, 16, 2236, 67, 350, 16, 7470, 67, 4631, 67, 350, 16, 3635, 67, 350, 16, 13001, 67, 350, 16, 729, 67, 350, ...
self.addTerTransponder(tlist, config.scan.sat.frequency.value[0], config.scan.sat.symbolrate.value[0], config.scan.sat.polarization.value, config.scan.sat.fec.value, config.scan.sat.inversion.value, self.satList[config.scan.nims.value][config.scan.satselection[config.scan.nims.value].value][1])
self.addTerTransponder(tlist, config.scan.ter.frequency.value[0])
def keyGo(self): tlist = [] flags = 0 if (config.scan.type.value == 0): # single transponder scan if (nimmanager.getNimType(config.scan.nims.value) == nimmanager.nimType["DVB-S"]): self.addSatTransponder(tlist, config.scan.sat.frequency.value[0], config.scan.sat.symbolrate.value[0], config.scan.sat.polarization.value, config.scan.sat.fec.value, config.scan.sat.inversion.value, self.satList[config.scan.nims.value][config.scan.satselection[config.scan.nims.value].value][1]) if (nimmanager.getNimType(config.scan.nims.value) == nimmanager.nimType["DVB-C"]): self.addCabTransponder(tlist, config.scan.cab.frequency.value[0], config.scan.cab.symbolrate.value[0], config.scan.cab.modulation.value, config.scan.cab.fec.value, config.scan.cab.inversion.value) if (nimmanager.getNimType(config.scan.nims.value) == nimmanager.nimType["DVB-T"]): self.addTerTransponder(tlist, config.scan.sat.frequency.value[0], config.scan.sat.symbolrate.value[0], config.scan.sat.polarization.value, config.scan.sat.fec.value, config.scan.sat.inversion.value, self.satList[config.scan.nims.value][config.scan.satselection[config.scan.nims.value].value][1])
33ce69ca1622ce06f00661c5974d2fbb78e0c2d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/33ce69ca1622ce06f00661c5974d2fbb78e0c2d5/ScanSetup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 5741, 12, 2890, 4672, 268, 1098, 273, 5378, 2943, 273, 374, 309, 261, 1425, 18, 9871, 18, 723, 18, 1132, 422, 374, 4672, 468, 2202, 906, 17707, 4135, 309, 261, 82, 381, 4181, 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, 498, 5741, 12, 2890, 4672, 268, 1098, 273, 5378, 2943, 273, 374, 309, 261, 1425, 18, 9871, 18, 723, 18, 1132, 422, 374, 4672, 468, 2202, 906, 17707, 4135, 309, 261, 82, 381, 4181, 18, ...
self.__proxypeername = (socket.inet_ntoa(ipaddr),destport) else: self.__proxypeername = (destaddr,destport)
self.__proxypeername = (socket.inet_ntoa(ipaddr), destport) else: self.__proxypeername = (destaddr, destport)
def __negotiatesocks5(self,destaddr,destport): """__negotiatesocks5(self,destaddr,destport) Negotiates a connection through a SOCKS5 server. """ # First we'll send the authentication packages we support. if (self.__proxy[4]!=None) and (self.__proxy[5]!=None): # The username/password details were supplied to the # setproxy method so we support the USERNAME/PASSWORD # authentication (in addition to the standard none). self.sendall("\x05\x02\x00\x02") else: # No username/password were entered, therefore we # only support connections with no authentication. self.sendall("\x05\x01\x00") # We'll receive the server's response to determine which # method was selected chosenauth = self.__recvall(2) if chosenauth[0] != "\x05": self.close() raise GeneralProxyError((1,_generalerrors[1])) # Check the chosen authentication method if chosenauth[1] == "\x00": # No authentication is required pass elif chosenauth[1] == "\x02": # Okay, we need to perform a basic username/password # authentication. self.sendall("\x01" + chr(len(self.__proxy[4])) + self.__proxy[4] + chr(len(self.__proxy[5])) + self.__proxy[5]) authstat = self.__recvall(2) if authstat[0] != "\x01": # Bad response self.close() raise GeneralProxyError((1,_generalerrors[1])) if authstat[1] != "\x00": # Authentication failed self.close() raise Socks5AuthError((3,_socks5autherrors[3])) # Authentication succeeded else: # Reaching here is always bad self.close() if chosenauth[1] == "\xFF": raise Socks5AuthError((2,_socks5autherrors[2])) else: raise GeneralProxyError((1,_generalerrors[1])) # Now we can request the actual connection req = "\x05\x01\x00" # If the given destination address is an IP address, we'll # use the IPv4 address request even if remote resolving was specified. try: ipaddr = socket.inet_aton(destaddr) req = req + "\x01" + ipaddr except socket.error: # Well it's not an IP number, so it's probably a DNS name. if self.__proxy[3]==True: # Resolve remotely ipaddr = None req = req + "\x03" + chr(len(destaddr)) + destaddr else: # Resolve locally ipaddr = socket.inet_aton(socket.gethostbyname(destaddr)) req = req + "\x01" + ipaddr req = req + self.__decode(struct.pack(">H",destport)) self.sendall(req) # Get the response resp = self.__recvall(4) if resp[0] != "\x05": self.close() raise GeneralProxyError((1,_generalerrors[1])) elif resp[1] != "\x00": # Connection failed self.close() if ord(resp[1])<=8: raise Socks5Error((ord(resp[1]),_socks5errors[ord(resp[1])])) else: raise Socks5Error((9,_socks5errors[9])) # Get the bound address/port elif resp[3] == "\x01": boundaddr = self.__recvall(4) elif resp[3] == "\x03": resp = resp + self.recv(1) boundaddr = self.__recvall(ord(resp[4])) else: self.close() raise GeneralProxyError((1,_generalerrors[1])) boundport = struct.unpack(">H",bytes(self.__recvall(2), 'utf8'))[0] self.__proxysockname = (boundaddr,boundport) if ipaddr != None: self.__proxypeername = (socket.inet_ntoa(ipaddr),destport) else: self.__proxypeername = (destaddr,destport)
6a596ed40071091ac51048087179560e15823043 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12748/6a596ed40071091ac51048087179560e15823043/socks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 14518, 352, 16020, 20641, 25, 12, 2890, 16, 10488, 4793, 16, 10488, 655, 4672, 3536, 972, 14518, 352, 16020, 20641, 25, 12, 2890, 16, 10488, 4793, 16, 10488, 655, 13, 423, 27445, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14518, 352, 16020, 20641, 25, 12, 2890, 16, 10488, 4793, 16, 10488, 655, 4672, 3536, 972, 14518, 352, 16020, 20641, 25, 12, 2890, 16, 10488, 4793, 16, 10488, 655, 13, 423, 27445, 1...
TYPE=%s'''%self.mysql_backend)
ENGINE=%s'''%self.mysql_backend)
def create_version_2_tables(self): # OTK store self.sql('''CREATE TABLE otks (otk_key VARCHAR(255), otk_value TEXT, otk_time FLOAT(20)) TYPE=%s'''%self.mysql_backend) self.sql('CREATE INDEX otks_key_idx ON otks(otk_key)')
92457cc043e01eeb60c7c845b5dd0cb82cf12564 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1906/92457cc043e01eeb60c7c845b5dd0cb82cf12564/back_mysql.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 1589, 67, 22, 67, 9373, 12, 2890, 4672, 468, 30638, 47, 1707, 365, 18, 4669, 2668, 6309, 9344, 7567, 15835, 7904, 261, 352, 79, 67, 856, 27915, 12, 10395, 3631, 15835, 79, 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, 752, 67, 1589, 67, 22, 67, 9373, 12, 2890, 4672, 468, 30638, 47, 1707, 365, 18, 4669, 2668, 6309, 9344, 7567, 15835, 7904, 261, 352, 79, 67, 856, 27915, 12, 10395, 3631, 15835, 79, 67,...
'value': '1', 'options': ['', 'option1', 'option2'],
'value': '1', 'options': ['option1', 'option2'],
def test_custom_field_optional_select(self): self.env.config.set('ticket-custom', 'test', 'select') self.env.config.set('ticket-custom', 'test.label', 'Test') self.env.config.set('ticket-custom', 'test.value', '1') self.env.config.set('ticket-custom', 'test.options', '|option1|option2') fields = TicketSystem(self.env).get_custom_fields() self.assertEqual({'name': 'test', 'type': 'select', 'label': 'Test', 'value': '1', 'options': ['', 'option1', 'option2'], 'order': 0, 'optional': True}, fields[0])
0d5e79373d43d274799b3c3f1bd929fa10dc5a72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/0d5e79373d43d274799b3c3f1bd929fa10dc5a72/api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3662, 67, 1518, 67, 10444, 67, 4025, 12, 2890, 4672, 365, 18, 3074, 18, 1425, 18, 542, 2668, 16282, 17, 3662, 2187, 296, 3813, 2187, 296, 4025, 6134, 365, 18, 3074, 18, 1425,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3662, 67, 1518, 67, 10444, 67, 4025, 12, 2890, 4672, 365, 18, 3074, 18, 1425, 18, 542, 2668, 16282, 17, 3662, 2187, 296, 3813, 2187, 296, 4025, 6134, 365, 18, 3074, 18, 1425,...
portstr = struct.pach("!H",port)
portstr = struct.pack("!H",port)
def socks5ResolveRequest(hostname): version = 5 command = 0xF0 rsv = 0 port = 0 atype = 0x03 reqheader = struct.pack("!BBBB",version, command, rsv, atype) portstr = struct.pach("!H",port) return "%s%s\0%s"%(reqheader,hostname,port)
6483f95ce722c1c8ae15d8e7134fc521fac896a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7483/6483f95ce722c1c8ae15d8e7134fc521fac896a5/tor-resolve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7313, 87, 25, 8460, 691, 12, 10358, 4672, 1177, 273, 1381, 1296, 273, 374, 16275, 20, 3597, 90, 273, 374, 1756, 273, 374, 30965, 273, 374, 92, 4630, 1111, 3374, 273, 1958, 18, 2920, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7313, 87, 25, 8460, 691, 12, 10358, 4672, 1177, 273, 1381, 1296, 273, 374, 16275, 20, 3597, 90, 273, 374, 1756, 273, 374, 30965, 273, 374, 92, 4630, 1111, 3374, 273, 1958, 18, 2920, 29...
x0 -- (0) default starting guess tol -- (1e-5) relative tolerance to achieve
def gmres(A, b, x0=None, tol=1e-5, restrt=None, maxiter=None, xtype=None, callback=None): """Use Generalized Minimal RESidual iteration to solve A x = b Inputs: A -- An array or an object with a matvec(x) method to represent A * x. May also have a psolve(b) methods for representing solution to the preconditioning equation M * x = b. b -- An n-length vector Outputs: x -- The converged solution info -- output result 0 : successful exit >0 : convergence to tolerance not achieved, number of iterations <0 : illegal input or breakdown Optional Inputs: restrt -- (n) When to restart (change this to get faster performance -- but may not converge). x0 -- (0) default starting guess tol -- (1e-5) relative tolerance to achieve maxiter -- (10*n) maximum number of iterations xtype -- The type of the result. If None, then it will be determined from A.dtype.char and b. If A does not have a typecode method then it will compute A.matvec(x0) to get a typecode. To save the extra computation when A does not have a typecode attribute use xtype=0 for the same type as b or use xtype='f','d','F',or 'D' callback -- an optional user-supplied function to call after each iteration. It is called as callback(xk), where xk is the current parameter vector. """ b = sb.asarray(b)+0.0 n = len(b) if maxiter is None: maxiter = n*10 x = x0 if x is None: x = sb.zeros(n) if xtype is None: try: atyp = A.dtype.char except AttributeError: atyp = A.matvec(x).dtype.char typ = _coerce_rules[b.dtype.char,atyp] elif xtype == 0: typ = b.dtype.char else: typ = xtype if typ not in 'fdFD': raise ValueError, "xtype must be 'f', 'd', 'F', or 'D'" x = sb.asarray(x,typ) b = sb.asarray(b,typ) matvec, psolve = (None,)*2 ltr = _type_conv[typ] revcom = _iterative.__dict__[ltr+'gmresrevcom'] stoptest = _iterative.__dict__[ltr+'stoptest2'] if restrt is None: restrt = n resid = tol ndx1 = 1 ndx2 = -1 work = sb.zeros((6+restrt)*n,typ) work2 = sb.zeros((restrt+1)*(2*restrt+2),typ) ijob = 1 info = 0 ftflag = True bnrm2 = -1.0 iter_ = maxiter while True: olditer = iter_ x, iter_, resid, info, ndx1, ndx2, sclr1, sclr2, ijob = \ revcom(b, x, restrt, work, work2, iter_, resid, info, ndx1, ndx2, ijob) if callback is not None and iter_ > olditer: callback(x) slice1 = slice(ndx1-1, ndx1-1+n) slice2 = slice(ndx2-1, ndx2-1+n) if (ijob == -1): break elif (ijob == 1): if matvec is None: matvec = get_matvec(A) work[slice2] *= sclr2 work[slice2] += sclr1*matvec(x) elif (ijob == 2): if psolve is None: psolve = get_psolve(A) work[slice1] = psolve(work[slice2]) elif (ijob == 3): if matvec is None: matvec = get_matvec(A) work[slice2] *= sclr2 work[slice2] += sclr1*matvec(work[slice1]) elif (ijob == 4): if ftflag: info = -1 ftflag = False bnrm2, resid, info = stoptest(work[slice1], b, bnrm2, tol, info) ijob = 2 return x, info
813b4e6e6d06aca25d02aaa8a246c6d0200f0096 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/813b4e6e6d06aca25d02aaa8a246c6d0200f0096/iterative.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14125, 455, 12, 37, 16, 324, 16, 619, 20, 33, 7036, 16, 6085, 33, 21, 73, 17, 25, 16, 400, 313, 88, 33, 7036, 16, 25743, 33, 7036, 16, 619, 723, 33, 7036, 16, 1348, 33, 7036, 467...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14125, 455, 12, 37, 16, 324, 16, 619, 20, 33, 7036, 16, 6085, 33, 21, 73, 17, 25, 16, 400, 313, 88, 33, 7036, 16, 25743, 33, 7036, 16, 619, 723, 33, 7036, 16, 1348, 33, 7036, 467...
if trackID == None: self._logger.debug("\'"+self.getPath(track)\ +"\' is not in the library.") return
path = self.getPathFromID(trackID)
def getLinkIDs(self, track): c = self._conn.cursor() trackID = track.getID() if trackID == None: self._logger.debug("\'"+self.getPath(track)\ +"\' is not in the library.") return c.execute("select linkid from links where secondtrackid = ?", (trackID, )) firstResult = c.fetchone() c.execute("select linkid from links where firsttrackid = ?", (trackID, )) secondResult = c.fetchone() c.close() if firstResult == None: if secondResult == None: return None else: return secondResult[0] else: if secondResult == None: return firstResult[0] else: return firstResult[0], secondResult[0]
afb8ac357cf5a6a40289a31d13b33e838bf2bdb1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8545/afb8ac357cf5a6a40289a31d13b33e838bf2bdb1/Database.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15545, 5103, 12, 2890, 16, 3298, 4672, 276, 273, 365, 6315, 4646, 18, 9216, 1435, 3298, 734, 273, 3298, 18, 588, 734, 1435, 589, 273, 365, 18, 588, 743, 1265, 734, 12, 4101, 734, 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, 15545, 5103, 12, 2890, 16, 3298, 4672, 276, 273, 365, 6315, 4646, 18, 9216, 1435, 3298, 734, 273, 3298, 18, 588, 734, 1435, 589, 273, 365, 18, 588, 743, 1265, 734, 12, 4101, 734, 13, ...
evalString = "_gnuplot.zlabel(\'%s\')" % self.zlabel
evalString = "_gnuplot('set zlabel \\'%s\\'')" % self.zlabel
def render(self): """ Does LinePlot object specific rendering stuff """ debugMsg("Called LinePlot.render()")
3e263eb8ddc3405c244a3493bf017db1177251ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/3e263eb8ddc3405c244a3493bf017db1177251ec/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 4672, 3536, 9637, 5377, 11532, 733, 2923, 9782, 10769, 3536, 1198, 3332, 2932, 8185, 5377, 11532, 18, 5902, 1435, 7923, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 4672, 3536, 9637, 5377, 11532, 733, 2923, 9782, 10769, 3536, 1198, 3332, 2932, 8185, 5377, 11532, 18, 5902, 1435, 7923, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
['sage/rings/complex_number.pyx'], libraries = ['mpfr', 'gmp'])
['sage/rings/complex_number.pyx'], libraries = ['mpfr', 'gmp'])
def is_newer(file1, file2): """ Return True if either file2 does not exist or is older than file1. If file1 does not exist, always return False. """ if not os.path.exists(file1): return False if not os.path.exists(file2): return True if os.path.getmtime(file2) < os.path.getmtime(file1): return True return False
1566a0251d3192d0d1c090cbeb6e117ad663da4f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/1566a0251d3192d0d1c090cbeb6e117ad663da4f/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 2704, 264, 12, 768, 21, 16, 585, 22, 4672, 3536, 2000, 1053, 309, 3344, 585, 22, 1552, 486, 1005, 578, 353, 12156, 2353, 585, 21, 18, 225, 971, 585, 21, 1552, 486, 1005, 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, 353, 67, 2704, 264, 12, 768, 21, 16, 585, 22, 4672, 3536, 2000, 1053, 309, 3344, 585, 22, 1552, 486, 1005, 578, 353, 12156, 2353, 585, 21, 18, 225, 971, 585, 21, 1552, 486, 1005, 16,...
resdata = serialize(filteredResources, combinedImages, resdata)
resdata = serialize(filteredResources, combinedImages, resdata) addResourcesToPackages(resdata, combinedImages, classToResourceMap) if resources_tree: resdata = resdata.getData()
def incorporateCombinedImages(filteredResources, combinedImages): for combId, combImg in combinedImages.items(): # combImg.embeds = {resId : ImgFmt} filteredResourceIds = filteredResources.keys() for embId in requiredEmbeds(combImg, filteredResourceIds): # patch simle image info lib = filteredResources[embId].lib # keep lib info filteredResources[embId] = combImg.embeds[embId] # replace info with combined info filteredResources[embId].lib = lib # restore original lib # add combined image if combId not in filteredResourceIds: filteredResources[combId] = combImg.info return filteredResources
bfe4c90417ed06513f17ea05c9b07c9f26b77dbc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/bfe4c90417ed06513f17ea05c9b07c9f26b77dbc/CodeGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 316, 3850, 3831, 340, 27994, 8946, 12, 12071, 3805, 16, 8224, 8946, 4672, 364, 3894, 548, 16, 3894, 12804, 316, 8224, 8946, 18, 3319, 13332, 225, 468, 3894, 12804, 18, 8483, 87, 273, 288...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 316, 3850, 3831, 340, 27994, 8946, 12, 12071, 3805, 16, 8224, 8946, 4672, 364, 3894, 548, 16, 3894, 12804, 316, 8224, 8946, 18, 3319, 13332, 225, 468, 3894, 12804, 18, 8483, 87, 273, 288...
'''This is similar to expect() except that it takes
"""This is similar to expect() except that it takes
def expect_exact (self, str_list, local_timeout = None): '''This is similar to expect() except that it takes list of regular strings instead of compiled regular expressions. The idea is that this should be much faster. It could also be useful when you don't want to have to worry about escaping regular expression characters that you want to match. You may also pass just a string without a list and the single string will be converted to a list. ''' matched_pattern = None before_pattern = None index = 0 if type(str_list)is StringType: str_list = [str_list]
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, 4489, 67, 17165, 261, 2890, 16, 609, 67, 1098, 16, 1191, 67, 4538, 273, 599, 4672, 3536, 2503, 353, 7281, 358, 4489, 1435, 1335, 716, 518, 5530, 666, 434, 6736, 2064, 3560, 434, 7743, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4489, 67, 17165, 261, 2890, 16, 609, 67, 1098, 16, 1191, 67, 4538, 273, 599, 4672, 3536, 2503, 353, 7281, 358, 4489, 1435, 1335, 716, 518, 5530, 666, 434, 6736, 2064, 3560, 434, 7743, ...
result ={}
result = {}
def _proposition_code(self, cr, uid, ids, name, args, context={}): result ={} for id in ids: pro = self.browse(cr,uid,[id])[0] pro_ids = self.search(cr,uid,[('camp_id','=',pro.camp_id.id)]) i=1 for pro_id in pro_ids: camp_code = pro.camp_id.code1 or '' offer_code = pro.camp_id.offer_id and pro.camp_id.offer_id.code or '' trademark_code = pro.camp_id.trademark_id and pro.camp_id.trademark_id.name or '' dealer_code =pro.camp_id.dealer_id and pro.camp_id.dealer_id.ref or '' date_start = pro.date_start or '' date = date_start.split('-') year = month = '' if len(date)==3: year = date[0][2:] month = date[1] country_code = pro.camp_id.country_id.code or '' seq = '%%0%sd' % 2 % i final_date = month+year code1='-'.join([camp_code, seq]) result[pro_id]=code1 i +=1 return result
7ee897432c7e7d5a5c8e889fc429c3c1b66627fd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/7ee897432c7e7d5a5c8e889fc429c3c1b66627fd/dm_campaign.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 685, 3276, 67, 710, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 833, 16, 819, 12938, 4672, 563, 273, 2618, 364, 612, 316, 3258, 30, 450, 273, 365, 18, 25731, 12, 3353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 685, 3276, 67, 710, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 833, 16, 819, 12938, 4672, 563, 273, 2618, 364, 612, 316, 3258, 30, 450, 273, 365, 18, 25731, 12, 3353, ...
(module is not None and
(module not in (None, UNKNOWN) and
def report_errors(api_doc, docindex, parse_errors, field_warnings): """A helper function for L{parse_docstring()} that reports any markup warnings and field warnings that we encountered while processing C{api_doc}'s docstring.""" if not parse_errors and not field_warnings: return # Get the name of the item containing the error, and the # filename of its containing module. name = api_doc.canonical_name module = api_doc.defining_module if module != UNKNOWN and module.filename not in (None, UNKNOWN): try: filename = py_src_filename(module.filename) except: filename = module.filename else: filename = '??' # [xx] Don't report markup errors for standard builtins. if (isinstance(api_doc, ValueDoc) and api_doc != module and (api_doc.pyval in __builtin__.__dict__.values() or (module is not None and module.pyval in (__builtin__, exceptions)))): return # Get the start line of the docstring containing the error. startline = api_doc.docstring_lineno if startline in (None, UNKNOWN): startline = introspect_docstring_lineno(api_doc) if startline in (None, UNKNOWN): startline = None # Display a block header. header = 'File %s, ' % filename if startline is not None: header += 'line %d, ' % startline header += 'in %s' % name log.start_block(header) # Display all parse errors. But first, combine any errors # with duplicate description messages. if startline is None: # remove dups, but keep original order: dups = {} for error in parse_errors: message = error.descr() if message not in dups: log.docstring_warning(message) dups[message] = 1 else: # Combine line number fields for dup messages: messages = {} # maps message -> list of linenum for error in parse_errors: error.set_linenum_offset(startline) message = error.descr() messages.setdefault(message, []).append(error.linenum()) message_items = messages.items() message_items.sort(lambda a,b:cmp(min(a[1]), min(b[1]))) for message, linenums in message_items: linenums = [n for n in linenums if n is not None] if len(linenums) == 0: log.docstring_warning(message) elif len(linenums) == 1: log.docstring_warning("Line %s: %s" % (linenums[0], message)) else: linenums = ', '.join(['%s' % l for l in linenums]) log.docstring_warning("Lines %s: %s" % (linenums, message)) # Display all field warnings. for warning in field_warnings: log.docstring_warning(warning) # End the message block. log.end_block()
d0e34cad7448a9798cbd0310e341cd9dc63dd9bd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/d0e34cad7448a9798cbd0310e341cd9dc63dd9bd/docstringparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 67, 4324, 12, 2425, 67, 2434, 16, 997, 1615, 16, 1109, 67, 4324, 16, 652, 67, 12103, 4672, 3536, 37, 4222, 445, 364, 511, 95, 2670, 67, 24675, 17767, 716, 10557, 1281, 9813, 5599...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 67, 4324, 12, 2425, 67, 2434, 16, 997, 1615, 16, 1109, 67, 4324, 16, 652, 67, 12103, 4672, 3536, 37, 4222, 445, 364, 511, 95, 2670, 67, 24675, 17767, 716, 10557, 1281, 9813, 5599...
assert true_dist.ndim in (1,2) if true_dist.ndim == 2: return -theano.sum(true_dist * log(coding_dist), axis=axis)
if true_dist.ndim == coding_dist.ndim: return -theano.sum(true_dist * log(coding_dist), axis=coding_dist.ndim-1) elif true_dist.ndim == coding_dist.ndim - 1: return crossentropy_categorical_1hot(coding_dist, true_dist)
def categorical_crossentropy(coding_dist, true_dist, axis=1): """ WARNING: THIS FUNCTION IS UNNECESSARILY POLYMORPHIC. We ultimately don't want the polymorphism, and will move this function to pylearn.algorithms.cost. The 1hot version will be removed. The length of the documentation here is a form of code smell. Return the cross-entropy between an approximating distribution and a true distribution The cross entropy between two probability distributions measures the average number of bits needed to identify an event from a set of possibilities, if a coding scheme is used based on a given probability distribution q, rather than the "true" distribution p. Mathematically it is defined as follows: .. math:: H(p,q) = - \sum_x p(x) \log(q(x)) :type coding_dist: a dense matrix. :param coding_dist: Each slice along axis represents one distribution. :type true_dist: a dense matrix or sparse matrix or integer vector. :param coding_dist: In the case of a matrix argument, each slice along axis represents one distribution. In the case of an integer vector argument, each element represents the position of the '1' in a 1-of-N encoding. :type axis: int :param axis: the dimension over which each distribution runs. (1 for row distributions, 0 for column distributions) :rtype: dvector :returns: the cross entropy between each coding and true distribution. """ assert true_dist.ndim in (1,2) if true_dist.ndim == 2: return -theano.sum(true_dist * log(coding_dist), axis=axis) else: if axis == 0: retval = coding_dist.T else: retval = coding_dist, return categorical_crossentropy_1hot( #backport #coding_dist.T if axis == 0 else coding_dist, retval, true_dist)
122f8d1e7d274d98c7a2b2785333a0820fc95cef /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12438/122f8d1e7d274d98c7a2b2785333a0820fc95cef/nnet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22237, 67, 14653, 21937, 12, 2014, 67, 4413, 16, 638, 67, 4413, 16, 2654, 33, 21, 4672, 3536, 9744, 30, 20676, 13690, 4437, 5019, 5407, 5119, 985, 25554, 19383, 61, 49, 916, 8939, 2871, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22237, 67, 14653, 21937, 12, 2014, 67, 4413, 16, 638, 67, 4413, 16, 2654, 33, 21, 4672, 3536, 9744, 30, 20676, 13690, 4437, 5019, 5407, 5119, 985, 25554, 19383, 61, 49, 916, 8939, 2871, ...
if (opts.count("MAYA5")): cmd = cmd + ' /I"' + MAYASDK["MAYA5"] + '/include"' if (opts.count("MAYA6")): cmd = cmd + ' /I"' + MAYASDK["MAYA6"] + '/include"'
for ver in ["MAYA5","MAYA6","MAYA65"]: if (opts.count(ver)): cmd = cmd + ' /I"' + MAYASDK[ver] + '/include"'
def CompileC(obj=0,src=0,ipath=[],opts=[]): global VERBOSE if ((obj==0)|(src==0)): sys.exit("syntax error in CompileC directive") ipath = [PREFIX+"/tmp"] + ipath + [PREFIX+"/include"] fullsrc = CxxFindSource(src, ipath) if (fullsrc == 0): sys.exit("Cannot find source file "+src) dep = CxxCalcDependencies(fullsrc, ipath, []) if (COMPILER=="MSVC7"): wobj = PREFIX+"/tmp/"+obj if (older(wobj, dep)): if VERBOSE >= 0: checkIfNewDir(ipath[1]) cmd = "cl.exe /Fo" + wobj + " /nologo /c" cmd = cmd + " /I" + PREFIX + "/python/include" if (opts.count("DXSDK")): cmd = cmd + ' /I"' + DIRECTXSDK + '/include"' if (opts.count("MAYA5")): cmd = cmd + ' /I"' + MAYASDK["MAYA5"] + '/include"' if (opts.count("MAYA6")): cmd = cmd + ' /I"' + MAYASDK["MAYA6"] + '/include"' for max in ["MAX5","MAX6","MAX7"]: if (PkgSelected(opts,max)): cmd = cmd + ' /I"' + MAXSDK[max] + '/include" /I"' + MAXSDKCS[max] + '" /D' + max for pkg in PACKAGES: if (pkg != "MAYA5") and (pkg != "MAYA6") and PkgSelected(opts,pkg): cmd = cmd + " /I" + THIRDPARTY + "/win-libs-vc7/" + pkg.lower() + "/include" for x in ipath: cmd = cmd + " /I" + x if (opts.count('NOFLOATWARN')): cmd = cmd + ' /wd4244 /wd4305' if (opts.count("WITHINPANDA")): cmd = cmd + ' /DWITHIN_PANDA' if (OPTIMIZE==1): cmd = cmd + " /Zc:forScope /MD /Zi /O2 /Ob2 /DFORCE_INLINING /RTCs /GS" if (OPTIMIZE==2): cmd = cmd + " /Zc:forScope /MD /Zi /O2 /Ob2 /DFORCE_INLINING " if (OPTIMIZE==3): cmd = cmd + " /Zc:forScope /MD /Zi /O2 /Ob2 /DFORCE_INLINING " if (OPTIMIZE==4): cmd = cmd + " /Zc:forScope /MD /Zi /O2 /Ob2 /DFORCE_INLINING /GL /DNDEBUG " cmd = cmd + " /Fd" + wobj[:-4] + ".pdb" building = buildingwhat(opts) if (building): cmd = cmd + " /DBUILDING_" + building cmd = cmd + " /EHsc /Zm300 /DWIN32_VC /DWIN32 /W3 " + fullsrc oscmd(cmd) updatefiledate(wobj) if (COMPILER=="LINUXA"): wobj = PREFIX+"/tmp/" + obj[:-4] + ".o" if (older(wobj, dep)): if VERBOSE >= 0: checkIfNewDir(ipath[1]) if (src[-2:]==".c"): cmd = 'gcc -c -o ' + wobj else: cmd = 'g++ -ftemplate-depth-30 -c -o ' + wobj cmd = cmd + ' -I"' + PythonSDK + '"' if (PkgSelected(opts,"VRPN")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/vrpn/include' if (PkgSelected(opts,"FFTW")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/fftw/include' if (PkgSelected(opts,"FMOD")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/fmod/include' if (PkgSelected(opts,"NVIDIACG")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/nvidiacg/include' if (PkgSelected(opts,"NSPR")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/nspr/include' if (PkgSelected(opts,"FREETYPE")): cmd = cmd + ' -I/usr/include/freetype2' for x in ipath: cmd = cmd + ' -I' + x if (opts.count("WITHINPANDA")): cmd = cmd + ' -DWITHIN_PANDA' if (OPTIMIZE==1): cmd = cmd + " -g" if (OPTIMIZE==2): cmd = cmd + " -O1" if (OPTIMIZE==3): cmd = cmd + " -O2" if (OPTIMIZE==4): cmd = cmd + " -O2" building = buildingwhat(opts) if (building): cmd = cmd + " -DBUILDING_" + building cmd = cmd + ' ' + fullsrc oscmd(cmd) updatefiledate(wobj)
9b54c46a9b4115279a0daf7cb856f7dc5e8758c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/9b54c46a9b4115279a0daf7cb856f7dc5e8758c9/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16143, 39, 12, 2603, 33, 20, 16, 4816, 33, 20, 16, 625, 421, 22850, 6487, 4952, 33, 8526, 4672, 2552, 27857, 309, 14015, 2603, 631, 20, 14047, 12, 4816, 631, 20, 3719, 30, 2589, 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, 16143, 39, 12, 2603, 33, 20, 16, 4816, 33, 20, 16, 625, 421, 22850, 6487, 4952, 33, 8526, 4672, 2552, 27857, 309, 14015, 2603, 631, 20, 14047, 12, 4816, 631, 20, 3719, 30, 2589, 18, ...
out.write("\nadded: '%s' ZCatalog" % UID_CATALOG)
out.write("\nadded: '%s' ZCatalog\n" % UID_CATALOG)
def PLFNGCatalogTest(self): out=StringIO() portal = getToolByName(self, 'portal_url').getPortalObject() # create the test ZCatalog as necessary if hasattr(portal, UID_CATALOG): out.write("\nfound: '%s' ZCatalog" % UID_CATALOG) else: #out.write('\n %s NOT found!!!' % UID_CATALOG) manage_addZCatalog(portal,UID_CATALOG,None) out.write("\nadded: '%s' ZCatalog" % UID_CATALOG) testCatalogObj = getattr( portal, UID_CATALOG ) extra = arguments(use_stopwords=None, use_converters=1, truncate_left=1) try: manage_addTextIndexNG(testCatalogObj, UID_INDEX, extra) out.write("\nadded: '%s' index" % UID_INDEX) except: out.write("\nfound: '%s' Index" % UID_INDEX) pass #out.write('\n indices = %s' % testCatalogObj.Indexes['xSearchableText'].__class__.__name__) catalogTool = getToolByName(portal, UID_CATALOG) #out.write("\ncatalogTool: %s" % catalogTool) if hasattr(portal, UID_PLFNG_TEST): out.write( '-!- %s already exists....leaving it alone.\n' % id ) newObj = getattr( portal, UID_PLFNG_TEST ) else: FSpath = os.path.join(SOFTWARE_HOME,'Products') FSpath = os.path.join(FSpath,'PloneLocalFolderNG') FSpath = os.path.join(FSpath,'tests') FSpath = os.path.join(FSpath,'SamplesFiles')+os.path.sep portal.invokeFactory(id=UID_PLFNG_TEST, type_name='PloneLocalFolderNG') newObj = getattr( portal, UID_PLFNG_TEST ) newObj.title = UID_PLFNG_TEST newObj.folder = FSpath newObj.require_MD5_with_upload = 1 newObj.generate_MD5_after_upload = 1 newObj.quota_aware = 0 newObj.allow_file_unpacking = 1 out.write( "\nadded: '%s' PLFNG instance.\n" % UID_PLFNG_TEST ) filesCataloged, filesNotCataloged = newObj.catalogContents(rel_dir=None, catalog=UID_CATALOG) out.write("\nfilesCataloged=%d , filesNotCataloged = %d" % (filesCataloged,filesNotCataloged)) return out.getvalue()
289c8172e33a49cb9d8bf1eacf3c676dd19affb3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/289c8172e33a49cb9d8bf1eacf3c676dd19affb3/testPLFNGContentsCataloging.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 453, 9105, 4960, 9769, 4709, 12, 2890, 4672, 596, 33, 780, 4294, 1435, 225, 11899, 273, 336, 6364, 5911, 12, 2890, 16, 296, 24386, 67, 718, 16063, 588, 24395, 921, 1435, 225, 468, 752, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 453, 9105, 4960, 9769, 4709, 12, 2890, 4672, 596, 33, 780, 4294, 1435, 225, 11899, 273, 336, 6364, 5911, 12, 2890, 16, 296, 24386, 67, 718, 16063, 588, 24395, 921, 1435, 225, 468, 752, ...
def fixSRAMaddresses(mem, sram):
def fixSRAMaddresses(mem, sram, dev):
def fixSRAMaddresses(mem, sram): """Set the addresses of SRAM calls for multiblock sequences. Takes a list of memory commands and an sram sequence (which will be a tuple of blocks for a multiblock sequence) and updates the call SRAM commands to the correct addresses. """ if not isinstance(sram, tuple): return sramCalls = sum(getOpcode(cmd) == 0xC for cmd in mem) if sramCalls > 1: raise Exception('Does not support multiple SRAM calls in multi-block sequences.') for i, cmd in enumerate(cmds): opcode, address = getOpcode(cmd), getAddress(cmd) if opcode == 0x8: address = SRAM_BLOCK0_LEN - len(sram[0])/4 cmds[i] = (opcode << 20) + address elif opcode == 0xA: address = SRAM_BLOCK0_LEN + len(sram[1])/4 cmds[i] = (opcode << 20) + address
e5536ee3540ed76874b9bd1b357a8407dd491843 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7016/e5536ee3540ed76874b9bd1b357a8407dd491843/ghz_dacs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 10090, 2192, 13277, 12, 3917, 16, 272, 1940, 16, 4461, 4672, 3536, 694, 326, 6138, 434, 19145, 2192, 4097, 364, 1778, 495, 739, 8463, 18, 225, 23004, 279, 666, 434, 3778, 4364, 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, 2917, 10090, 2192, 13277, 12, 3917, 16, 272, 1940, 16, 4461, 4672, 3536, 694, 326, 6138, 434, 19145, 2192, 4097, 364, 1778, 495, 739, 8463, 18, 225, 23004, 279, 666, 434, 3778, 4364, 471...
proutn(_("near %s") % q.planet)
proutn(_("near %s ") % q.planet)
def destroybase(): "Code merges here for any commander destroying a starbase." # Not perfect, but will have to do # Handle case where base is in same quadrant as starship if game.battle == game.quadrant: game.state.chart[game.battle.i][game.battle.j].starbase = False game.quad[game.base.i][game.base.j] = '.' game.base.invalidate() newcnd() skip(1) prout(_("Spock- \"Captain, I believe the starbase has been destroyed.\"")) elif game.state.baseq and communicating(): # Get word via subspace radio announce() skip(1) prout(_("Lt. Uhura- \"Captain, Starfleet Command reports that")) proutn(_(" the starbase in Quadrant %s has been destroyed by") % game.battle) if game.isatb == 2: prout(_("the Klingon Super-Commander")) else: prout(_("a Klingon Commander")) game.state.chart[game.battle.i][game.battle.j].starbase = False # Remove Starbase from galaxy game.state.galaxy[game.battle.i][game.battle.j].starbase = False game.state.baseq = filter(lambda x: x != game.battle, game.state.baseq) if game.isatb == 2: # reinstate a commander's base attack game.battle = hold game.isatb = 0 else: game.battle.invalidate()
c873e794bf5a029fef3a5ee5385cc0fec6220fa0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3176/c873e794bf5a029fef3a5ee5385cc0fec6220fa0/sst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5546, 1969, 13332, 315, 1085, 19037, 2674, 364, 1281, 1296, 264, 5546, 310, 279, 10443, 1969, 1199, 468, 2288, 24746, 16, 1496, 903, 1240, 358, 741, 468, 5004, 648, 1625, 1026, 353, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5546, 1969, 13332, 315, 1085, 19037, 2674, 364, 1281, 1296, 264, 5546, 310, 279, 10443, 1969, 1199, 468, 2288, 24746, 16, 1496, 903, 1240, 358, 741, 468, 5004, 648, 1625, 1026, 353, 316, ...