rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
def gen(self): return self.polynomial_ring().gen() | def gen(self): return self.polynomial_ring().gen() | adf9ccf9ef2a50f0d9d6da1d166866ae9bd061e6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/adf9ccf9ef2a50f0d9d6da1d166866ae9bd061e6/unramified_ring_extension.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
12,
2890,
4672,
327,
365,
18,
3915,
13602,
67,
8022,
7675,
4507,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
12,
2890,
4672,
327,
365,
18,
3915,
13602,
67,
8022,
7675,
4507,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
(contexts.variable('clause_num'), | (contexts.variable('next_clause_num'), contexts.variable('clause_num'), | def populate(engine): This_rule_base = engine.get_create('compiler') bc_rule.bc_rule('file', This_rule_base, 'compile', file, None, (contexts.variable('generated_root_pkg'), contexts.variable('rb_name'), pattern.pattern_tuple((pattern.pattern_literal('file'), contexts.variable('parent'), pattern.pattern_tuple((contexts.variable('fc_rules'), contexts.variable('fc_extra_lines'),), None), pattern.pattern_tuple((contexts.variable('bc_rules'), contexts.variable('bc_extra_lines'), contexts.variable('plan_extra_lines'),), None),), None), contexts.variable('fc_lines'), contexts.variable('bc_lines'), contexts.variable('plan_lines'),), (), (contexts.variable('fc_head'), contexts.variable('bc_head'), contexts.variable('plan_head'), contexts.variable('rb_name'), contexts.variable('parent'), contexts.variable('decl_line'), contexts.variable('fc_rules'), contexts.variable('fc_fun_lines'), contexts.variable('fc_init_lines'), contexts.variable('bc_rules'), contexts.variable('bc_plan_lines'), contexts.variable('bc_bc_fun_lines'), contexts.variable('bc_bc_init_lines'), contexts.variable('fc_lines'), contexts.variable('plan_lines'), contexts.variable('bc_lines'),)) bc_rule.bc_rule('rule_decl', This_rule_base, 'rule_decl', rule_decl, None, (contexts.variable('rb_name'), pattern.pattern_literal(None), contexts.variable('decl_line'),), (), (contexts.variable('decl_line'),)) bc_rule.bc_rule('rule_decl_with_parent', This_rule_base, 'rule_decl', rule_decl_with_parent, None, (contexts.variable('rb_name'), pattern.pattern_tuple((pattern.pattern_literal('parent'), contexts.variable('parent'), contexts.variable('excluded_symbols'),), None), contexts.variable('decl_line'),), (), (contexts.variable('decl_line'),)) bc_rule.bc_rule('fc_rules', This_rule_base, 'fc_rules', fc_rules, None, (contexts.variable('fc_rules'), contexts.variable('fc_funs'), contexts.variable('fc_init'),), (), (contexts.variable('fc_rule'), contexts.variable('fc_fun_1'), contexts.variable('fc_init_1'), contexts.variable('fc_funs'), contexts.variable('fc_init'),)) bc_rule.bc_rule('fc_rule_', This_rule_base, 'fc_rule', fc_rule_, None, (pattern.pattern_tuple((pattern.pattern_literal('fc_rule'), contexts.variable('rule_name'), contexts.variable('fc_premises'), contexts.variable('assertions'),), None), contexts.variable('fc_fun'), contexts.variable('fc_init'),), (), (contexts.variable('rule_name'), pattern.pattern_literal(0), contexts.anonymous('_'), contexts.variable('fc_premises'), pattern.pattern_literal(None), pattern.pattern_literal(False), contexts.variable('prem_fn_head'), contexts.variable('prem_fn_tail'), contexts.variable('prem_decl_lines'), pattern.pattern_literal(()), contexts.variable('patterns_out1'), contexts.variable('assertions'), contexts.variable('asserts_fn_lines'), contexts.variable('patterns_out'), contexts.variable('fc_fun'), contexts.variable('fc_init'),)) bc_rule.bc_rule('fc_premises0', This_rule_base, 'fc_premises', fc_premises0, None, (contexts.anonymous('_'), contexts.variable('clause_num'), contexts.variable('clause_num'), pattern.pattern_literal(()), contexts.anonymous('_'), contexts.anonymous('_'), pattern.pattern_literal(()), pattern.pattern_literal(()), pattern.pattern_literal(()), contexts.variable('patterns_in'), contexts.variable('patterns_in'),), (), ()) bc_rule.bc_rule('fc_premises1', This_rule_base, 'fc_premises', fc_premises1, None, (contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), pattern.pattern_tuple((contexts.variable('first_prem'),), contexts.variable('rest_prems')), contexts.variable('break_cond'), contexts.variable('multi_match'), pattern.pattern_tuple((contexts.variable('fn_head1'),), contexts.variable('fn_head2')), pattern.pattern_tuple((contexts.variable('fn_tail2'),), contexts.variable('fn_tail1')), contexts.variable('decl_lines'), contexts.variable('patterns_in'), contexts.variable('patterns_out'),), (), (contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num1'), contexts.variable('first_prem'), contexts.variable('break_cond'), contexts.variable('multi_match'), contexts.variable('fn_head1'), contexts.variable('fn_tail1'), contexts.variable('decl_lines1'), contexts.variable('patterns_in'), contexts.variable('patterns_out1'), contexts.variable('next_clause_num'), contexts.variable('rest_prems'), contexts.variable('fn_head2'), contexts.variable('fn_tail2'), contexts.variable('decl_lines2'), contexts.variable('patterns_out'), contexts.variable('decl_lines'),)) bc_rule.bc_rule('fc_premise', This_rule_base, 'fc_premise', fc_premise, None, (contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), pattern.pattern_tuple((pattern.pattern_literal('fc_premise'), contexts.variable('kb_name'), contexts.variable('entity_name'), contexts.variable('arg_patterns'), contexts.variable('start_lineno'), contexts.variable('end_lineno'),), None), contexts.variable('break_cond'), contexts.variable('multi_match'), contexts.variable('fn_head'), contexts.variable('fn_tail'), contexts.variable('decl_lines'), contexts.variable('patterns_in'), contexts.variable('patterns_in'),), (), (contexts.variable('kb_name'), contexts.variable('entity_name'), contexts.variable('start_lineno'), contexts.variable('end_lineno'), contexts.variable('multi_match'), contexts.variable('clause_num'), contexts.variable('fn_head'), contexts.variable('fn_tail'), contexts.variable('next_clause_num'), contexts.variable('decl_lines'),)) bc_rule.bc_rule('gen_fc_for_false', This_rule_base, 'gen_fc_for', gen_fc_for_false, None, (contexts.variable('kb_name'), contexts.variable('entity_name'), contexts.variable('start_lineno'), contexts.variable('end_lineno'), pattern.pattern_literal(False), contexts.variable('clause_num'), contexts.variable('fn_head'),), (), (contexts.variable('fn_head'),)) bc_rule.bc_rule('gen_fc_for_true', This_rule_base, 'gen_fc_for', gen_fc_for_true, None, (contexts.variable('kb_name'), contexts.variable('entity_name'), contexts.variable('start_lineno'), contexts.variable('end_lineno'), pattern.pattern_literal(True), contexts.variable('clause_num'), contexts.variable('fn_head'),), (), (contexts.variable('fn_head'),)) bc_rule.bc_rule('fc_first', This_rule_base, 'fc_premise', fc_first, None, (contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), pattern.pattern_tuple((pattern.pattern_literal('fc_first'), contexts.variable('premises1'), contexts.anonymous('_'),), None), contexts.anonymous('_'), contexts.anonymous('_'), pattern.pattern_tuple((contexts.variable('init_worked'), contexts.variable('fn_head'), contexts.variable('set_worked'),), None), contexts.variable('fn_tail'), contexts.variable('decl_lines'), contexts.variable('patterns_in'), contexts.variable('patterns_out'),), (), (contexts.variable('break_cond'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), contexts.variable('premises1'), pattern.pattern_literal(True), contexts.variable('fn_head'), contexts.variable('fn_tail'), contexts.variable('decl_lines'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('init_worked'), contexts.variable('set_worked'),)) bc_rule.bc_rule('fc_forall_None', This_rule_base, 'fc_premise', fc_forall_None, None, (contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), pattern.pattern_tuple((pattern.pattern_literal('fc_forall'), contexts.variable('premises1'), pattern.pattern_literal(None), contexts.anonymous('_'), contexts.anonymous('_'),), None), contexts.anonymous('_'), contexts.anonymous('_'), contexts.variable('fn_head'), pattern.pattern_literal(()), contexts.variable('decl_lines'), contexts.variable('patterns_in'), contexts.variable('patterns_out'),), (), (contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), contexts.variable('premises1'), pattern.pattern_literal(None), pattern.pattern_literal(True), contexts.variable('fn_head1'), contexts.variable('fn_tail1'), contexts.variable('decl_lines'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('fn_head'),)) bc_rule.bc_rule('fc_forall_require', This_rule_base, 'fc_premise', fc_forall_require, None, (contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), pattern.pattern_tuple((pattern.pattern_literal('fc_forall'), contexts.variable('premises1'), contexts.variable('require'), contexts.variable('start_lineno'), contexts.anonymous('_'),), None), contexts.anonymous('_'), contexts.anonymous('_'), contexts.variable('fn_head'), pattern.pattern_literal(("POPINDENT",)), contexts.variable('decl_lines'), contexts.variable('patterns_in'), contexts.variable('patterns_out'),), (), (contexts.variable('break_true'), contexts.variable('break_false'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num1'), contexts.variable('premises1'), pattern.pattern_literal(True), contexts.variable('fn_head1'), contexts.variable('fn_tail1'), contexts.variable('decl_lines1'), contexts.variable('patterns_in'), contexts.variable('patterns_out1'), contexts.variable('next_clause_num'), contexts.variable('require'), contexts.variable('fn_head2'), contexts.variable('fn_tail2'), contexts.variable('decl_lines2'), contexts.variable('patterns_out'), contexts.variable('fn_head'), contexts.variable('decl_lines'),)) bc_rule.bc_rule('fc_notany', This_rule_base, 'fc_premise', fc_notany, None, (contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), pattern.pattern_tuple((pattern.pattern_literal('fc_notany'), contexts.variable('premises'), contexts.variable('start_lineno'),), None), contexts.anonymous('_'), contexts.anonymous('_'), contexts.variable('fn_head'), pattern.pattern_literal(("POPINDENT",)), contexts.variable('decl_lines'), contexts.variable('patterns_in'), contexts.variable('patterns_out'),), (), (contexts.variable('break_true'), contexts.variable('break_false'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), contexts.variable('premises'), pattern.pattern_literal(True), contexts.variable('fn_head1'), contexts.variable('fn_tail1'), contexts.variable('decl_lines'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('fn_head'),)) bc_rule.bc_rule('fc_python_premise', This_rule_base, 'fc_premise', fc_python_premise, None, (contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('clause_num'), contexts.variable('python_premise'), contexts.variable('break_cond'), contexts.anonymous('_'), contexts.variable('fn_head'), contexts.variable('fn_tail'), pattern.pattern_literal(()), contexts.variable('patterns_in'), contexts.variable('patterns_out'),), (), (contexts.variable('clause_num'), contexts.variable('python_premise'), contexts.variable('break_cond'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('fn_head'), contexts.variable('fn_tail'),)) bc_rule.bc_rule('assertions_0', This_rule_base, 'assertions', assertions_0, None, (pattern.pattern_literal(()), pattern.pattern_literal(()), contexts.variable('patterns_in'), contexts.variable('patterns_in'),), (), ()) bc_rule.bc_rule('assertions_n', This_rule_base, 'assertions', assertions_n, None, (pattern.pattern_tuple((contexts.variable('first_assertion'),), contexts.variable('rest_assertions')), pattern.pattern_tuple((contexts.variable('fn_lines1'),), contexts.variable('fn_lines2')), contexts.variable('patterns_in'), contexts.variable('patterns_out'),), (), (contexts.variable('first_assertion'), contexts.variable('fn_lines1'), contexts.variable('patterns_in'), contexts.variable('patterns_out1'), contexts.variable('rest_assertions'), contexts.variable('fn_lines2'), contexts.variable('patterns_out'),)) bc_rule.bc_rule('assertion', This_rule_base, 'assertion', assertion, None, (pattern.pattern_tuple((pattern.pattern_literal('assert'), contexts.variable('kb_name'), contexts.variable('entity_name'), contexts.variable('patterns'), contexts.variable('start_lineno'), contexts.variable('end_lineno'),), None), contexts.variable('fn_lines'), contexts.variable('patterns_in'), contexts.variable('patterns_out'),), (), (pattern.pattern_tuple((contexts.variable('pat_nums'), contexts.variable('patterns_out'),), None), contexts.variable('fn_lines'),)) bc_rule.bc_rule('python_assertion', This_rule_base, 'assertion', python_assertion, None, (pattern.pattern_tuple((pattern.pattern_literal('python_assertion'), pattern.pattern_tuple((contexts.variable('python_code'), contexts.anonymous('_'), contexts.anonymous('_'), contexts.anonymous('_'),), None), contexts.variable('start_lineno'), contexts.variable('end_lineno'),), None), pattern.pattern_tuple((pattern.pattern_tuple((pattern.pattern_literal('STARTING_LINENO'), contexts.variable('start_lineno'),), None), contexts.variable('python_code'), pattern.pattern_tuple((pattern.pattern_literal('ENDING_LINENO'), contexts.variable('end_lineno'),), None),), None), contexts.variable('patterns_in'), contexts.variable('patterns_in'),), (), ()) bc_rule.bc_rule('bc_rules', This_rule_base, 'bc_rules', bc_rules, None, (contexts.variable('rb_name'), contexts.variable('bc_rules'), contexts.variable('bc_plan_lines'), contexts.variable('bc_bc_funs'), contexts.variable('bc_bc_init'),), (), (contexts.variable('bc_rule'), contexts.variable('rb_name'), contexts.variable('bc_plan1'), contexts.variable('bc_bc_fun1'), contexts.variable('bc_bc_init1'), contexts.variable('bc_plan_lines'), contexts.variable('bc_bc_funs'), contexts.variable('bc_bc_init'),)) bc_rule.bc_rule('bc_rule_', This_rule_base, 'bc_rule', bc_rule_, None, (contexts.variable('rb_name'), pattern.pattern_tuple((pattern.pattern_literal('bc_rule'), contexts.variable('name'), contexts.variable('goal'), contexts.variable('bc_premises'), contexts.variable('python_lines'), contexts.variable('plan_vars_needed'),), None), contexts.variable('plan_lines'), contexts.variable('bc_fun_lines'), contexts.variable('bc_init_lines'),), (), (contexts.variable('rb_name'), contexts.variable('name'), contexts.variable('bc_premises'), contexts.variable('plan_vars_needed'), contexts.variable('prem_plan_lines'), contexts.variable('prem_fn_head'), contexts.variable('prem_fn_tail'), contexts.variable('prem_decl_lines'), pattern.pattern_tuple((contexts.variable('plan_lines'), contexts.variable('goal_fn_head'), contexts.variable('goal_fn_tail'), contexts.variable('goal_decl_lines'),), None), contexts.variable('bc_fun_lines'), contexts.variable('bc_init_lines'),)) bc_rule.bc_rule('bc_premises', This_rule_base, 'bc_premises', bc_premises, None, (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('bc_premises'), contexts.variable('plan_vars_needed'), contexts.variable('plan_lines'), contexts.variable('fn_head'), contexts.variable('fn_tail'), contexts.variable('decl_lines'),), (), (contexts.variable('rb_name'), contexts.variable('rule_name'), pattern.pattern_literal(1), contexts.anonymous('_'), contexts.variable('bc_premises'), pattern.pattern_literal(None), pattern.pattern_literal(True), pattern.pattern_literal(()), contexts.variable('patterns'), contexts.variable('plan_vars_needed'), contexts.variable('plan_var_names'), contexts.variable('plan_lines1'), contexts.variable('fn_head'), contexts.variable('fn_tail'), contexts.variable('pat_lines'), contexts.variable('decl_lines'), contexts.variable('plan_lines'),)) bc_rule.bc_rule('bc_premises1_0', This_rule_base, 'bc_premises1', bc_premises1_0, None, (contexts.anonymous('_'), contexts.anonymous('_'), contexts.variable('clause_num'), contexts.variable('clause_num'), pattern.pattern_literal(()), contexts.anonymous('_'), contexts.anonymous('_'), contexts.variable('patterns'), contexts.variable('patterns'), contexts.variable('plan_var_names'), contexts.variable('plan_var_names'), pattern.pattern_literal(()), pattern.pattern_literal(()), pattern.pattern_literal(()),), (), ()) bc_rule.bc_rule('bc_premises1_n', This_rule_base, 'bc_premises1', bc_premises1_n, None, (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), pattern.pattern_tuple((contexts.variable('first_prem'),), contexts.variable('rest_prems')), contexts.variable('break_cond'), contexts.variable('allow_plan'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('plan_var_names_in'), contexts.variable('plan_var_names_out'), contexts.variable('plan_lines'), contexts.variable('fn_head'), contexts.variable('fn_tail'),), (), (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num1'), contexts.variable('first_prem'), contexts.variable('break_cond'), contexts.variable('allow_plan'), contexts.variable('patterns_in'), contexts.variable('patterns_out1'), contexts.variable('plan_var_names_in'), contexts.variable('plan_var_names_out1'), contexts.variable('plan_lines1'), contexts.variable('fn_head1'), contexts.variable('fn_tail1'), contexts.variable('next_clause_num'), contexts.variable('rest_prems'), contexts.variable('patterns_out'), contexts.variable('plan_var_names_out'), contexts.variable('plan_lines2'), contexts.variable('fn_head2'), contexts.variable('fn_tail2'), contexts.variable('plan_lines'), contexts.variable('fn_head'), contexts.variable('fn_tail'),)) bc_rule.bc_rule('bc_premise', This_rule_base, 'bc_premise', bc_premise, None, (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), pattern.pattern_tuple((pattern.pattern_literal('bc_premise'), contexts.variable('required'), contexts.variable('kb_name'), contexts.variable('entity_name'), contexts.variable('arg_patterns'), contexts.variable('plan_spec'), contexts.variable('start_lineno'), contexts.variable('end_lineno'),), None), contexts.variable('break_cond'), contexts.variable('allow_plan'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('plan_var_names_in'), contexts.variable('plan_var_names_out'), contexts.variable('plan_lines'), contexts.variable('fn_head'), contexts.variable('fn_tail'),), (), (contexts.variable('next_clause_num'), contexts.variable('kb_name2'), pattern.pattern_tuple((contexts.variable('pat_nums'), contexts.variable('patterns_out1'),), None), contexts.variable('fn_head1'), contexts.variable('required'), contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), pattern.pattern_literal(('POPINDENT', 'POPINDENT',)), contexts.variable('fn_head2'), contexts.variable('fn_tail2'), contexts.variable('plan_spec'), contexts.variable('allow_plan'), contexts.variable('patterns_out1'), contexts.variable('patterns_out'), contexts.variable('fn_head3'), contexts.variable('fn_tail3'), contexts.variable('plan_lines'), contexts.variable('plan_vars_needed'), pattern.pattern_tuple((contexts.anonymous('_'), contexts.variable('plan_var_names_out'),), None), contexts.variable('fn_head'), contexts.variable('fn_tail'),)) bc_rule.bc_rule('bc_first', This_rule_base, 'bc_premise', bc_first, None, (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), pattern.pattern_tuple((pattern.pattern_literal('bc_first'), contexts.variable('required'), contexts.variable('bc_premises'), contexts.anonymous('_'),), None), contexts.anonymous('_'), contexts.variable('allow_plan'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('plan_var_names_in'), contexts.variable('plan_var_names_out'), contexts.variable('plan_lines'), pattern.pattern_tuple((contexts.variable('init_worked'), contexts.variable('fn_head'), contexts.variable('set_worked'),), None), contexts.variable('fn_tail'),), (), (contexts.variable('break_cond'), contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), contexts.variable('bc_premises'), contexts.variable('allow_plan'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('plan_var_names_in'), contexts.variable('plan_var_names_out'), contexts.variable('plan_lines'), contexts.variable('fn_head1'), contexts.variable('fn_tail1'), contexts.variable('required'), contexts.variable('fn_head'), contexts.variable('fn_tail'), contexts.variable('init_worked'), contexts.variable('set_worked'),)) bc_rule.bc_rule('bc_forall_None', This_rule_base, 'bc_premise', bc_forall_None, None, (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), pattern.pattern_tuple((pattern.pattern_literal('bc_forall'), contexts.variable('bc_premises'), pattern.pattern_literal(None), contexts.anonymous('_'), contexts.anonymous('_'),), None), contexts.anonymous('_'), contexts.anonymous('_'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('plan_var_names_in'), contexts.variable('plan_var_names_out'), contexts.variable('plan_lines'), contexts.variable('fn_head'), pattern.pattern_literal(()),), (), (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), contexts.variable('bc_premises'), pattern.pattern_literal(None), pattern.pattern_literal(False), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('plan_var_names_in'), contexts.variable('plan_var_names_out'), contexts.variable('plan_lines'), contexts.variable('fn_head1'), contexts.variable('fn_tail'), contexts.variable('fn_head'),)) bc_rule.bc_rule('bc_forall_require', This_rule_base, 'bc_premise', bc_forall_require, None, (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), pattern.pattern_tuple((pattern.pattern_literal('bc_forall'), contexts.variable('premises1'), contexts.variable('require'), contexts.variable('start_lineno'), contexts.anonymous('_'),), None), contexts.anonymous('_'), contexts.anonymous('_'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('plan_var_names_in'), contexts.variable('plan_var_names_out'), pattern.pattern_literal(()), contexts.variable('fn_head'), pattern.pattern_literal(("POPINDENT",)),), (), (contexts.variable('break_true'), contexts.variable('break_false'), contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num1'), contexts.variable('premises1'), pattern.pattern_literal(False), contexts.variable('patterns_in'), contexts.variable('patterns_out1'), contexts.variable('plan_var_names_in'), contexts.variable('plan_var_names_out1'), pattern.pattern_literal(()), contexts.variable('fn_head1'), contexts.variable('fn_tail1'), contexts.variable('next_clause_num'), contexts.variable('require'), contexts.variable('patterns_out'), contexts.variable('plan_var_names_out'), contexts.variable('fn_head2'), contexts.variable('fn_tail2'), contexts.variable('fn_head'),)) bc_rule.bc_rule('bc_notany', This_rule_base, 'bc_premise', bc_notany, None, (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), pattern.pattern_tuple((pattern.pattern_literal('bc_notany'), contexts.variable('bc_premises'), contexts.variable('start_lineno'),), None), contexts.anonymous('_'), contexts.anonymous('_'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('plan_var_in'), contexts.variable('plan_var_out'), pattern.pattern_literal(()), contexts.variable('fn_head'), pattern.pattern_literal(("POPINDENT",)),), (), (contexts.variable('break_true'), contexts.variable('break_false'), contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), contexts.variable('bc_premises'), pattern.pattern_literal(False), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('plan_var_in'), contexts.variable('plan_var_out'), pattern.pattern_literal(()), contexts.variable('fn_head1'), contexts.variable('fn_tail1'), contexts.variable('fn_head'),)) bc_rule.bc_rule('no_plan', This_rule_base, 'gen_plan_lines', no_plan, None, (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), pattern.pattern_literal(None), contexts.anonymous('_'), contexts.variable('patterns_in'), contexts.variable('patterns_in'), contexts.variable('fn_head'), pattern.pattern_literal(()), pattern.pattern_literal(()), pattern.pattern_literal(()),), (), (contexts.variable('fn_head'),)) bc_rule.bc_rule('as_plan', This_rule_base, 'gen_plan_lines', as_plan, None, (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), pattern.pattern_tuple((pattern.pattern_literal('as'), contexts.variable('pat_var_name'),), None), contexts.anonymous('_'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('fn_head'), contexts.variable('fn_tail'), pattern.pattern_literal(()), pattern.pattern_literal(()),), (), (pattern.pattern_tuple((contexts.variable('pat_num'), contexts.variable('patterns_out'),), None), contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('pat_var_name'), contexts.variable('pat_num'), contexts.variable('fn_head'), contexts.variable('fn_tail'),)) bc_rule.bc_rule('plan_spec', This_rule_base, 'gen_plan_lines', plan_spec, None, (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), pattern.pattern_tuple((pattern.pattern_literal('plan_spec'), contexts.variable('step_num'), contexts.variable('plan_var_name'), contexts.variable('python_code'), contexts.variable('plan_vars_needed'), contexts.anonymous('_'), contexts.anonymous('_'),), None), pattern.pattern_literal(True), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('fn_head'), contexts.variable('fn_tail'), pattern.pattern_tuple((pattern.pattern_tuple((contexts.variable('step_num'), contexts.variable('python_code'),), None),), None), contexts.variable('plan_vars_needed'),), (), (pattern.pattern_tuple((contexts.variable('pat_num'), contexts.variable('patterns_out'),), None), contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('plan_var_name'), contexts.variable('pat_num'), contexts.variable('fn_head'), contexts.variable('fn_tail'),)) bc_rule.bc_rule('illegal_plan_spec', This_rule_base, 'gen_plan_lines', illegal_plan_spec, None, (contexts.anonymous('_'), contexts.anonymous('_'), contexts.anonymous('_'), pattern.pattern_tuple((pattern.pattern_literal('plan_spec'), contexts.anonymous('_'), contexts.anonymous('_'), contexts.anonymous('_'), contexts.anonymous('_'), contexts.variable('lineno'), contexts.variable('lexpos'),), None), pattern.pattern_literal(False), contexts.anonymous('_'), contexts.anonymous('_'), contexts.anonymous('_'), contexts.anonymous('_'), contexts.anonymous('_'), contexts.anonymous('_'),), (), (contexts.anonymous('_'),)) bc_rule.bc_rule('plan_bindings', This_rule_base, 'plan_bindings', plan_bindings, None, (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('plan_var_name'), contexts.variable('pat_num'), contexts.variable('fn_head'), contexts.variable('fn_tail'),), (), (contexts.variable('fn_head'), contexts.variable('fn_tail'),)) bc_rule.bc_rule('not_required', This_rule_base, 'add_required', not_required, None, (pattern.pattern_literal(False), contexts.anonymous('_'), contexts.anonymous('_'), contexts.anonymous('_'), contexts.variable('fn_head'), contexts.variable('fn_tail'), contexts.variable('fn_head'), contexts.variable('fn_tail'),), (), ()) bc_rule.bc_rule('required', This_rule_base, 'add_required', required, None, (pattern.pattern_literal(True), contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('fn_head1'), contexts.variable('fn_tail1'), contexts.variable('fn_head'), contexts.variable('fn_tail'),), (), (contexts.variable('fn_head'), contexts.variable('fn_tail'),)) bc_rule.bc_rule('bc_python_premise', This_rule_base, 'bc_premise', bc_python_premise, None, (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), contexts.variable('python_premise'), contexts.variable('break_cond'), contexts.anonymous('_'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('plan_var_names'), contexts.variable('plan_var_names'), pattern.pattern_literal(()), contexts.variable('fn_head'), contexts.variable('fn_tail'),), (), (contexts.variable('next_clause_num'), contexts.variable('clause_num'), contexts.variable('python_premise'), contexts.variable('break_cond'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('fn_head'), contexts.variable('fn_tail'),)) bc_rule.bc_rule('python_eq', This_rule_base, 'python_premise', python_eq, None, (contexts.variable('clause_num'), pattern.pattern_tuple((pattern.pattern_literal('python_eq'), contexts.variable('pattern'), pattern.pattern_tuple((contexts.variable('python_code'), contexts.anonymous('_'), contexts.anonymous('_'), contexts.anonymous('_'),), None), contexts.variable('start_lineno'), contexts.variable('end_lineno'),), None), contexts.anonymous('_'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('fn_head'), contexts.variable('fn_tail'),), (), (pattern.pattern_tuple((contexts.variable('pat_num'), contexts.variable('patterns_out'),), None), contexts.variable('python_code2'), contexts.variable('fn_head'), contexts.variable('fn_tail'),)) bc_rule.bc_rule('python_in', This_rule_base, 'python_premise', python_in, None, (contexts.variable('clause_num'), pattern.pattern_tuple((pattern.pattern_literal('python_in'), contexts.variable('pattern'), pattern.pattern_tuple((contexts.variable('python_code'), contexts.anonymous('_'), contexts.anonymous('_'), contexts.anonymous('_'),), None), contexts.variable('start_lineno'), contexts.variable('end_lineno'),), None), contexts.variable('break_cond'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('fn_head'), contexts.variable('fn_tail'),), (), (pattern.pattern_tuple((contexts.variable('pat_num'), contexts.variable('patterns_out'),), None), contexts.variable('python_code2'), contexts.variable('fn_head'), contexts.variable('fn_tail'),)) bc_rule.bc_rule('python_check', This_rule_base, 'python_premise', python_check, None, (contexts.variable('clause_num'), pattern.pattern_tuple((pattern.pattern_literal('python_check'), pattern.pattern_tuple((contexts.variable('python_code'), contexts.anonymous('_'), contexts.anonymous('_'), contexts.anonymous('_'),), None), contexts.variable('start_lineno'), contexts.variable('end_lineno'),), None), contexts.anonymous('_'), contexts.variable('patterns_in'), contexts.variable('patterns_in'), contexts.variable('fn_head'), pattern.pattern_literal(('POPINDENT',)),), (), (contexts.variable('python_code2'), contexts.variable('fn_head'),)) bc_rule.bc_rule('python_block', This_rule_base, 'python_premise', python_block, None, (contexts.variable('clause_num'), pattern.pattern_tuple((pattern.pattern_literal('python_block'), pattern.pattern_tuple((contexts.variable('python_code'), contexts.anonymous('_'), contexts.anonymous('_'), contexts.anonymous('_'),), None), contexts.variable('start_lineno'), contexts.variable('end_lineno'),), None), contexts.anonymous('_'), contexts.variable('patterns_in'), contexts.variable('patterns_in'), pattern.pattern_tuple((pattern.pattern_tuple((pattern.pattern_literal('STARTING_LINENO'), contexts.variable('start_lineno'),), None), contexts.variable('python_code'), pattern.pattern_tuple((pattern.pattern_literal('ENDING_LINENO'), contexts.variable('end_lineno'),), None),), None), pattern.pattern_literal(()),), (), ()) | bd4e660a9ed69b909bf026a87883b9b1a9562934 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14714/bd4e660a9ed69b909bf026a87883b9b1a9562934/compiler_bc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6490,
12,
8944,
4672,
1220,
67,
5345,
67,
1969,
273,
4073,
18,
588,
67,
2640,
2668,
9576,
6134,
225,
6533,
67,
5345,
18,
13459,
67,
5345,
2668,
768,
2187,
1220,
67,
5345,
67,
1969,
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,
6490,
12,
8944,
4672,
1220,
67,
5345,
67,
1969,
273,
4073,
18,
588,
67,
2640,
2668,
9576,
6134,
225,
6533,
67,
5345,
18,
13459,
67,
5345,
2668,
768,
2187,
1220,
67,
5345,
67,
1969,
16,... |
>>> [x for x in c1] | >>> [x for x in c3] | def __sub__(self,other): """ >>> c1=SparseIntVect(10) >>> c1[0] = 3 >>> c1[2] = 2 >>> c1[4] = 5 >>> c2=SparseIntVect(10) >>> c2[0] = 2 >>> c2[2] = 2 >>> c2[5] = 6 >>> c3 = c1-c2 >>> [x for x in c1] [(0, 1), (4, 5), (5, -6)] | 1f2aff8a3b0d18e01d45b5ef21647527796baefb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9195/1f2aff8a3b0d18e01d45b5ef21647527796baefb/SparseIntVect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1717,
972,
12,
2890,
16,
3011,
4672,
3536,
4080,
276,
21,
33,
20565,
1702,
58,
386,
12,
2163,
13,
4080,
276,
21,
63,
20,
65,
273,
890,
4080,
276,
21,
63,
22,
65,
273,
576,
40... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1717,
972,
12,
2890,
16,
3011,
4672,
3536,
4080,
276,
21,
33,
20565,
1702,
58,
386,
12,
2163,
13,
4080,
276,
21,
63,
20,
65,
273,
890,
4080,
276,
21,
63,
22,
65,
273,
576,
40... |
fileListing=list() | finalList=list() | def __readCache__(self,cacheListing=list()): """ Simple mehtod to read in a cache or list of cache files and return a list of files or an empty list if nothing found """ #Open the cache entry and search for those entrys fileListing=list() for entry in cacheListing: #Cache files listed themselves comment out following line fileListing.append(entry) fileListing.extend([x.rstrip("\n") for x in file(entry)]) #PATCH START to add in the z distribution files for fname in fileListing: if ".html" in fname: zFile=fname.replace(".html",".txt") fileListing.append(zFile) #PATCH END finalList=list() for thisFile in fileListing: #Search filesystem for file full path finalList.extend(fnmatch.filter(self.fsys,"*%s"%thisFile)) #Look for potential matching thumbnails if thisFile.endswith(".png"): finalList.extend(fnmatch.filter(self.fsys,"*%s"%thisFile.replace(".png","?thumb?png"))) if len(finalList) < 1: return list() else: return finalList | 05455322ab6b4df00c83701e9e61844538f87dd5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/05455322ab6b4df00c83701e9e61844538f87dd5/makeCheckListWiki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
896,
1649,
972,
12,
2890,
16,
2493,
19081,
33,
1098,
1435,
4672,
3536,
4477,
1791,
647,
369,
358,
855,
316,
279,
1247,
578,
666,
434,
1247,
1390,
471,
327,
279,
666,
434,
1390,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
896,
1649,
972,
12,
2890,
16,
2493,
19081,
33,
1098,
1435,
4672,
3536,
4477,
1791,
647,
369,
358,
855,
316,
279,
1247,
578,
666,
434,
1247,
1390,
471,
327,
279,
666,
434,
1390,
5... |
... m2, m3, m5, mRes = tee(_m235(), 4) ... return mRes >>> it = m235() | ... m1 = _m235() ... m2, m3, m5, mRes = tee(m1, 4) ... return m1.close, mRes >>> closer, it = m235() | ... def _m235(): | 90a84d4fadd28eb143aaa76463bf14a47954125f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/90a84d4fadd28eb143aaa76463bf14a47954125f/test_generators.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
377,
1652,
389,
81,
30803,
13332,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
377,
1652,
389,
81,
30803,
13332,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
if ((token is Token.Punctuation and value == ')') or (token is Token.Punctuation and value == u',') and not parendepth): | if (token is Token.Punctuation and (value == ',' or (value == ')' and parendepth == -1))): | def parsekeywordpairs(signature): tokens = PythonLexer().get_tokens(signature) stack = [] substack = [] parendepth = 0 begin = False for token, value in tokens: if not begin: if token is Token.Punctuation and value == u'(': begin = True continue if token is Token.Punctuation: if value == u'(': parendepth += 1 elif value == u')' and parendepth: parendepth -= 1 elif value == ':': # End of signature reached break if parendepth: substack.append(value) continue if ((token is Token.Punctuation and value == ')') or (token is Token.Punctuation and value == u',') and not parendepth): stack.append(substack[:]) del substack[:] continue if value and value.strip(): substack.append(value) d = {} for item in stack: if len(item) >= 3: d[item[0]] = ''.join(item[2:]) return d | 2924c6633b6b760476dc6904aa1ffd5170c87866 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6932/2924c6633b6b760476dc6904aa1ffd5170c87866/cli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
11041,
11545,
12,
8195,
4672,
2430,
273,
6600,
13356,
7675,
588,
67,
7860,
12,
8195,
13,
2110,
273,
5378,
720,
3772,
273,
5378,
22146,
5979,
273,
374,
2376,
273,
1083,
364,
1147,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11041,
11545,
12,
8195,
4672,
2430,
273,
6600,
13356,
7675,
588,
67,
7860,
12,
8195,
13,
2110,
273,
5378,
720,
3772,
273,
5378,
22146,
5979,
273,
374,
2376,
273,
1083,
364,
1147,
1... |
{'abcoulomb':'CGS unit defined to be 10 coulombs.', 'coulomb':'SI derived unit of charge.\nDefined to be the amount of electric charge transported by 1 ampere in 1 second.', 'elementary_charge':'Defined to be the amount of electric charge carried by a single proton or negative charge carried by a single electron.\nApproximately equal to 1.602176462*10^-19 coulombs.', 'faraday':'Defined to be the magnitude of electric charge in one mole of electrons.\nApproximately equal to 96485.3399 coulombs.', 'franklin':'CGS unit defined to be the amount of electric charge necessary such that if two stationary objects placed one centimeter apart had one franklin of charge each they would repel each other with a force of one dyne.\nApproximately equal to 3.3356*10^-10 coulombs.', 'statcoulomb':'Equivalent to franklin.\nApproximately equal to 3.3356*10^-10 coulombs.'}, | {'abcoulomb':'CGS unit defined to be 10 coulombs.', 'coulomb':'SI derived unit of charge.\nDefined to be the amount of electric charge transported by 1 ampere in 1 second.', 'elementary_charge':'Defined to be the amount of electric charge carried by a single proton or negative charge carried by a single electron.\nApproximately equal to 1.602176462*10^-19 coulombs.', 'faraday':'Defined to be the magnitude of electric charge in one mole of electrons.\nApproximately equal to 96485.3399 coulombs.', 'franklin':'CGS unit defined to be the amount of electric charge necessary such that if two stationary objects placed one centimeter apart had one franklin of charge each they would repel each other with a force of one dyne.\nApproximately equal to 3.3356*10^-10 coulombs.', 'statcoulomb':'Equivalent to franklin.\nApproximately equal to 3.3356*10^-10 coulombs.'}, | def evalunitdict(): """ Replace all the string values of the unitdict variable by their evaluated forms, and builds some other tables for ease of use. This function is mainly used internally, for efficiency (and flexibility) purposes, making it easier to describe the units. EXAMPLES:: sage: sage.symbolic.units.evalunitdict() """ from sage.misc.all import sage_eval for key, value in unitdict.iteritems(): unitdict[key] = dict([(a,sage_eval(repr(b))) for a, b in value.iteritems()]) # FEATURE IDEA: create a function that would allow users to add # new entries to the table without having to know anything about # how the table is stored internally. # # Format the table for easier use. # for k, v in unitdict.iteritems(): for a in v: unit_to_type[a] = k for w in unitdict.iterkeys(): for j in unitdict[w].iterkeys(): if type(unitdict[w][j]) == tuple: unitdict[w][j] = unitdict[w][j][0] value_to_unit[w] = dict(zip(unitdict[w].itervalues(), unitdict[w].iterkeys())) | 36d2f28c044694ad73a4a70a9d869366d0e39ec4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/36d2f28c044694ad73a4a70a9d869366d0e39ec4/units.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5302,
4873,
1576,
13332,
3536,
6910,
777,
326,
533,
924,
434,
326,
2836,
1576,
2190,
635,
3675,
12697,
10138,
16,
471,
10736,
2690,
1308,
4606,
364,
28769,
434,
999,
18,
1220,
445,
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,
5302,
4873,
1576,
13332,
3536,
6910,
777,
326,
533,
924,
434,
326,
2836,
1576,
2190,
635,
3675,
12697,
10138,
16,
471,
10736,
2690,
1308,
4606,
364,
28769,
434,
999,
18,
1220,
445,
353,
... |
self.oldValueStr = {} for channel in self.channels: self.oldValueStr[channel] = None self.updateValues() self.valueUpdateTimeout = gtk.timeout_add(self.valueUpdateInterval, self.updateValues) | if self.valueUpdateInterval: self.oldValueStr = {} for channel in self.channels: self.oldValueStr[channel] = None self.updateValues() self.valueUpdateTimeout = gtk.timeout_add(self.valueUpdateInterval, self.updateValues) | def fillModel(self): """Fills the model with data, must be called after self.window is valid""" for channel in self.channels: i = self.model.append() self.model.set(i, 0, channel, 1, str(channel), 2, gtk.FALSE, 3, gtk.TRUE, 4, self.makeColorSamplePixbuf(channel), 5, "", | 59acd7101d02a60e7dcd31cf40cf07a5a2045926 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/59acd7101d02a60e7dcd31cf40cf07a5a2045926/rtgraph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3636,
1488,
12,
2890,
4672,
3536,
28688,
326,
938,
598,
501,
16,
1297,
506,
2566,
1839,
365,
18,
5668,
353,
923,
8395,
364,
1904,
316,
365,
18,
9114,
30,
277,
273,
365,
18,
2284,
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,
3636,
1488,
12,
2890,
4672,
3536,
28688,
326,
938,
598,
501,
16,
1297,
506,
2566,
1839,
365,
18,
5668,
353,
923,
8395,
364,
1904,
316,
365,
18,
9114,
30,
277,
273,
365,
18,
2284,
18,
... |
if user: | if user and (user not in users): | def get_moderatorUserObjects(self): """ Get the user objects corresponding to the moderator, assuming we can. """ member_groups = self.getProperty('moderator_groups', []) uids = [] for gid in member_groups: group = self.acl_users.getGroupById(gid) uids += group.getUsers() uids += self.getProperty('moderator_members', []) users = [] for uid in uids and (user not in users): user = self.acl_users.getUser(uid) if user: users.append(user) return users | 6cd237344be4b0794ee3a67c1bcc57ea94657315 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6274/6cd237344be4b0794ee3a67c1bcc57ea94657315/XWFMailingList.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1711,
7385,
1299,
4710,
12,
2890,
4672,
3536,
968,
326,
729,
2184,
4656,
358,
326,
681,
7385,
16,
15144,
732,
848,
18,
225,
3536,
3140,
67,
4650,
273,
365,
18,
588,
1396,
2668... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1711,
7385,
1299,
4710,
12,
2890,
4672,
3536,
968,
326,
729,
2184,
4656,
358,
326,
681,
7385,
16,
15144,
732,
848,
18,
225,
3536,
3140,
67,
4650,
273,
365,
18,
588,
1396,
2668... |
canvas = treevis.drawTree(tree, autoclose=False, | canvas = treesvg.drawTree(tree, autoclose=False, | def drawParamTree(tree, params, *args, **kargs): tree = tree.copy() kargs.setdefault("legendScale", True) kargs.setdefault("xscale", 100) kargs.setdefault("yscale", 20) kargs.setdefault("minlen", 0) kargs.setdefault("maxlen", util.INF) if "labels" not in kargs: kargs["labels"] = {} for name in tree.nodes: if not tree.nodes[name].isLeaf(): kargs["labels"][name] = str(name) # set branch lengths to means for name in tree.nodes: tree.nodes[name].dist = params[name][0] # draw basic tree tmargin = 10 lmargin = 10 canvas = treevis.drawTree(tree, autoclose=False, tmargin=tmargin, lmargin=lmargin, *args, **kargs) # draw variance coords = treevis.layoutTree(tree, kargs["xscale"], kargs["yscale"], kargs["minlen"], kargs["maxlen"]) canvas.beginTransform(("translate", lmargin, tmargin)) canvas.beginStyle("stroke-width: 3") for name, node in tree.nodes.iteritems(): if node == tree.root: continue x, y = coords[node] if node.parent: parentx = coords[node.parent][0] else: parentx = 0 varline = params[name][1] * (x - parentx) / params[name][0] canvas.line(x, y, max(parentx, x - varline), y, ) canvas.endStyle() canvas.endTransform() canvas.endSvg() | b483115a5fd542a830f9247f3e48635621f1e5dd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8482/b483115a5fd542a830f9247f3e48635621f1e5dd/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
786,
2471,
12,
3413,
16,
859,
16,
380,
1968,
16,
2826,
79,
1968,
4672,
2151,
273,
2151,
18,
3530,
1435,
25916,
18,
542,
1886,
2932,
16292,
5587,
3113,
1053,
13,
25916,
18,
542,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
786,
2471,
12,
3413,
16,
859,
16,
380,
1968,
16,
2826,
79,
1968,
4672,
2151,
273,
2151,
18,
3530,
1435,
25916,
18,
542,
1886,
2932,
16292,
5587,
3113,
1053,
13,
25916,
18,
542,
1... |
node[target].value += cur.delta | node[target].value += cur.delta.movepointer(-pointer) | def optimize_propagate(self, node): if not isinstance(node, ComplexNode): return node | 55a86fc4f319ddc89439f1749954cde74fdadcf3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2040/55a86fc4f319ddc89439f1749954cde74fdadcf3/esotope-bfc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10979,
67,
5986,
346,
340,
12,
2890,
16,
756,
4672,
309,
486,
1549,
12,
2159,
16,
16060,
907,
4672,
327,
756,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10979,
67,
5986,
346,
340,
12,
2890,
16,
756,
4672,
309,
486,
1549,
12,
2159,
16,
16060,
907,
4672,
327,
756,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if len(self.parameters['AppVersions'])> 0: | if self.parameters['JobSpecInstance'].parameters['JobType'] in ("CleanUp", "LogArchive"): swversion=None elif len(self.parameters['AppVersions'])> 0: | def doSubmit(self, wrapperScript, jobTarball): """ _doSubmit_ | b2c52137e90d6ecb64be526f98743a6d87c0e4bf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8887/b2c52137e90d6ecb64be526f98743a6d87c0e4bf/LCGAdvanced.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
11620,
12,
2890,
16,
4053,
3651,
16,
1719,
56,
23846,
4672,
3536,
389,
2896,
11620,
67,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
11620,
12,
2890,
16,
4053,
3651,
16,
1719,
56,
23846,
4672,
3536,
389,
2896,
11620,
67,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
building = 0; | building = 0 | def Interrogate(ipath=0, opts=0, outd=0, outc=0, src=0, module=0, library=0, files=0): if ((ipath==0)|(opts==0)|(outd==0)|(outc==0)|(src==0)|(module==0)|(library==0)|(files==0)): sys.exit("syntax error in Interrogate directive"); ipath = ["built/tmp"] + ipath + ["built/include"] outd = "built/etc/"+outd outc = "built/tmp/"+outc paths = xpaths(src+"/",files,"") dep = CxxCalcDependenciesAll(paths, ipath) dotdots = "" for i in range(0,src.count("/")+1): dotdots = dotdots + "../" ALLIN.append(outd) building = 0; for x in opts: if (x[:9]=="BUILDING_"): building = x[9:] if (older(outc, dep) or older(outd, dep)): if (COMPILER=="MSVC7"): cmd = dotdots + "built/bin/interrogate.exe" cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -longlong __int64 -D_X86_ -DWIN32_VC -D_WIN32' cmd = cmd + ' -D"_declspec(param)=" -D_near -D_far -D__near -D__far -D__stdcall' if (OPTIMIZE==1): cmd = cmd + ' ' if (OPTIMIZE==2): cmd = cmd + ' ' if (OPTIMIZE==3): cmd = cmd + ' -DFORCE_INLINING' if (OPTIMIZE==4): cmd = cmd + ' -DFORCE_INLINING' cmd = cmd + ' -S"' + dotdots + 'built/include/parser-inc"' cmd = cmd + ' -I"' + dotdots + 'built/python/include"' if (COMPILER=="LINUXA"): cmd = dotdots + "built/bin/interrogate" cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__i386__ -D__const=const' if (OPTIMIZE==1): cmd = cmd + ' ' if (OPTIMIZE==2): cmd = cmd + ' ' if (OPTIMIZE==3): cmd = cmd + ' ' if (OPTIMIZE==4): cmd = cmd + ' ' cmd = cmd + ' -S"' + dotdots + 'built/include/parser-inc" -S"/usr/include"' cmd = cmd + ' -I"' + dotdots + 'built/python/include"' cmd = cmd + " -oc "+dotdots+outc+" -od "+dotdots+outd cmd = cmd + ' -fnames -string -refcount -assert -python' for x in ipath: cmd = cmd + ' -I"' + dotdots + x + '"' if (building): cmd = cmd + " -DBUILDING_"+building if (opts.count("WITHINPANDA")): cmd = cmd + " -DWITHIN_PANDA" for pkg in PACKAGES: if (PkgSelected(opts,pkg)): cmd = cmd + ' -I"' + dotdots + STDTHIRDPARTY + pkg.lower() + "/include" + '"' cmd = cmd + ' -module "' + module + '" -library "' + library + '"' if ((COMPILER=="MSVC7") and opts.count("DXSDK")): cmd = cmd + ' -I"' + DirectXSDK + '/include"' if ((COMPILER=="MSVC7") and opts.count("MAYA5")): cmd = cmd + ' -I"' + Maya5SDK + 'include"' if ((COMPILER=="MSVC7") and opts.count("MAYA6")): cmd = cmd + ' -I"' + Maya6SDK + 'include"' for x in files: cmd = cmd + ' ' + x oscdcmd(src, cmd) updatefiledate(outd) updatefiledate(outc) | 4a71a3ad56d88a79d9aba6c9d9fa1abc8c3a885e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/4a71a3ad56d88a79d9aba6c9d9fa1abc8c3a885e/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5294,
15283,
12,
625,
421,
33,
20,
16,
1500,
33,
20,
16,
596,
72,
33,
20,
16,
596,
71,
33,
20,
16,
1705,
33,
20,
16,
1605,
33,
20,
16,
5313,
33,
20,
16,
1390,
33,
20,
4672,
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,
5294,
15283,
12,
625,
421,
33,
20,
16,
1500,
33,
20,
16,
596,
72,
33,
20,
16,
596,
71,
33,
20,
16,
1705,
33,
20,
16,
1605,
33,
20,
16,
5313,
33,
20,
16,
1390,
33,
20,
4672,
309... |
if '__WXGTK__' not in wx.PlatformInfo: self.timeHeight += 3 y += self.timeHeight | if '__WXGTK__' in wx.PlatformInfo: y += 1 else: y += 3 | def Draw(self, dc, styles, brushOffset, selected, rightSideCutOff=False): # @@@ add a general cutoff parameter? item = self._item if item.isDeleted(): return | 068b53bf5aeb0ce05891f6b3fc355754a1fae262 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/068b53bf5aeb0ce05891f6b3fc355754a1fae262/CalendarCanvas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10184,
12,
2890,
16,
6744,
16,
5687,
16,
5186,
1218,
2335,
16,
3170,
16,
2145,
8895,
15812,
7210,
33,
8381,
4672,
468,
22175,
36,
527,
279,
7470,
13383,
1569,
35,
761,
273,
365,
6315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10184,
12,
2890,
16,
6744,
16,
5687,
16,
5186,
1218,
2335,
16,
3170,
16,
2145,
8895,
15812,
7210,
33,
8381,
4672,
468,
22175,
36,
527,
279,
7470,
13383,
1569,
35,
761,
273,
365,
6315,
... |
if f_o is None: | if f_o is None or f_o == 'NULL': | def GetFeature( self, fid ): f_o = _gdal.OGR_L_GetFeature( self._o, fid ) if f_o is None: return None else: return Feature( obj = f_o ) | b7d449ee48f4c53c685bdaab9372c0c76d37109c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10289/b7d449ee48f4c53c685bdaab9372c0c76d37109c/ogr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
4595,
12,
365,
16,
13444,
262,
30,
284,
67,
83,
273,
389,
19016,
287,
18,
51,
6997,
67,
48,
67,
967,
4595,
12,
365,
6315,
83,
16,
13444,
262,
309,
284,
67,
83,
353,
599,
578,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
4595,
12,
365,
16,
13444,
262,
30,
284,
67,
83,
273,
389,
19016,
287,
18,
51,
6997,
67,
48,
67,
967,
4595,
12,
365,
6315,
83,
16,
13444,
262,
309,
284,
67,
83,
353,
599,
578,
... |
self.write(cr, uid, ids, {'state':'draft'}) | self.write(cr, uid, ids, {'state': 'draft'}) | def state_draft_set(self, cr, uid, ids, *args): self.write(cr, uid, ids, {'state':'draft'}) return True | 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,
919,
67,
17153,
67,
542,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
380,
1968,
4672,
365,
18,
2626,
12,
3353,
16,
4555,
16,
3258,
16,
13666,
2019,
4278,
296,
17153,
11,
6792,
327,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
919,
67,
17153,
67,
542,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
380,
1968,
4672,
365,
18,
2626,
12,
3353,
16,
4555,
16,
3258,
16,
13666,
2019,
4278,
296,
17153,
11,
6792,
327,
1... |
node.filename = tokenizer.filename | """Parses the toplevel and def bodies.""" | 8821e4327bfb86a33947d65d4f1015998b0304f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/8821e4327bfb86a33947d65d4f1015998b0304f4/Parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3536,
6656,
326,
28999,
471,
1652,
25126,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3536,
6656,
326,
28999,
471,
1652,
25126,
12123,
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,
... | |
if obtained != valid: | if not expected_result(obtained, valid): | def expand (file, entry, type = -1): | 2c91226d74c638ff6bcbbbaf53b4a27125f9589b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1356/2c91226d74c638ff6bcbbbaf53b4a27125f9589b/testsuite.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4542,
261,
768,
16,
1241,
16,
618,
273,
300,
21,
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,
... | [
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,
4542,
261,
768,
16,
1241,
16,
618,
273,
300,
21,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
print "%s/sqlite3.h: version %s"%(d, sqlite_version) | if sqlite_setup_debug: print "%s/sqlite3.h: version %s"%(d, sqlite_version) | def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 87949ecca00b63f3383a2037a83e9f865ca5b733 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/87949ecca00b63f3383a2037a83e9f865ca5b733/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
67,
6400,
12,
2890,
4672,
468,
7693,
716,
342,
13640,
19,
3729,
353,
3712,
1399,
527,
67,
1214,
67,
869,
67,
1098,
12,
2890,
18,
9576,
18,
12083,
67,
8291,
16,
1173,
13640,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
67,
6400,
12,
2890,
4672,
468,
7693,
716,
342,
13640,
19,
3729,
353,
3712,
1399,
527,
67,
1214,
67,
869,
67,
1098,
12,
2890,
18,
9576,
18,
12083,
67,
8291,
16,
1173,
13640,
19,
... |
print "Scheduling software installation and actions on clients" | print timestamp(), "Scheduling software installation and actions on clients." | def main(): if options.demo: key = False current_channels = {} current_channel_labels = ['rhel-x86_64-server-5'] else: # Login to Satellite server key = login(options.user, options.password) # Build existing channel list current_channels = client.channel.list_all_channels(key) current_channel_labels = [] for channel in current_channels: current_channel_labels.append(channel['label']) if options.debug: print "DEBUG: Channels on current Satellite server:", current_channel_labels if client.api.get_version() < 5.1: # TODO: Haven't tested with Spacewalk, not sure how it is reported print "This script uses features not available with Satellite versions older than 5.1" sys.exit(1) if not options.client_actions_only: # This begins the server actions section if not os.path.exists(options.localdir): try: os.makedirs(options.localdir) except: print "Error: Unable to create %s" % (options.localdir) raise if (not options.delete) and (not options.no_rsync): # Sync local Dell repo with public Dell repo returncode = get_dell_repo(DELL_REPO_URL, options.localdir) if not returncode == 0: print "rsync process exited with returncode:", returncode # Build child channels based on dell repo as needed systems = build_channel_list(options.localdir, SYSTEM_VENDOR_ID) systems['platform_independent'] = PLATFORM_INDEPENDENT # Iterate through list of supported RHEL versions and archs, create parent channels if needed channels = {} print "Checking base channels on Satellite server" for parent in SUPPORTED_CHANNELS: if options.verbose: print "Checking base channel", parent # Check each supported base channel, skip if it does not exist on Satellite server if parent not in current_channel_labels: if options.verbose: print "-%s is not a current base channel, skipping." % (parent) continue else: channels[parent] = SUPPORTED_CHANNELS[parent] channels[parent]['child_channels'] = [] # Initialize key for child channels if options.verbose: print "+%s found on Satellite server, checking child channels." % (parent) if channels[parent]['arch'] == 'i386': # This is because Satellite stores x86 as 'ia32' arch = 'channel-ia32' else: arch = 'channel-' + channels[parent]['arch'] subdir = channels[parent]['subdir'] print " Checking child channels for %s" % parent for system in systems: # use system name plus parent to create a unique child channel c_label = DELL_INFO['label'] + '-' + system + '-' + parent c_name = DELL_INFO['name'] + ' on ' + systems[system] + ' for ' + parent c_summary = DELL_INFO['summary'] + ' on ' + systems[system] + ' running ' + parent c_arch = arch c_dir = options.localdir + system + '/' + subdir if options.verbose: print " Checking child channel:", c_label if channel_exists(key, c_label, current_channels): if options.delete: # Delete child channels if requested if options.demo: print "Deleting channel:", c_label else: delete_channel(key, c_label) else: if options.debug: print "DEBUG: checking for dir:", c_dir if options.verbose: print "Child channel already exists:", c_label if os.path.isdir(c_dir): channels[parent]['child_channels'].append(system) else: if not options.delete: # Build child channels if needed if options.debug: print "DEBUG: checking for dir:", c_dir if os.path.isdir(c_dir): channels[parent]['child_channels'].append(system) if options.debug: print "DEBUG: %s exists for %s, creating channel" % (subdir, system) if options.demo: if options.verbose: print "Creating child channel:", c_label else: create_channel(key, c_label, c_name, c_summary, c_arch, parent) else: if options.debug: print "DEBUG: %s does not exists for %s" % (subdir, system) if (not options.delete) and (not options.no_packages): # Iterate through channels, pushing rpms from the local repo as needed # TODO: check if rpm is already uploaded and orphaned or part of another channel if options.debug: print "DEBUG: Channel mapping:", channels print "Syncing rpms as needed" for parent in channels: print " Syncing rpms for child channels in %s" % parent for child in channels[parent]['child_channels']: dir = options.localdir + child + '/' + channels[parent]['subdir'] channel = DELL_INFO['label'] + '-' + child + '-' + parent if options.verbose: print " Syncing rpms to child channel", channel if options.debug: print "DEBUG: Looking for rpms in", dir rpms = gen_rpm_list(dir) # Get all packages in child channel existing_packages = client.channel.software.list_all_packages(key, channel) if options.debug: print "DEBUG: Existing packages in", channel, existing_packages for rpm in rpms: if options.debug: print "DEBUG: Working on:", rpm # Strip off '.rpm' at end of file to match against existing entries rpm_name = rpm.split('.rpm')[0] # Now strip off any preceeding paths rpm_name = rpm_name.split('/')[-1] # Iterate through existing packages, and skip existing ones if options.verbose: print "Checking if %s is already on the Satellite server in %s" % (rpm_name, channel) for package in existing_packages: existing_rpm_name = reconstruct_name(package) if options.debug: print "DEBUG: Checking match for %s and %s" % (rpm_name, existing_rpm_name) if existing_rpm_name == rpm_name: # This means the intended rpm is already in Satellite, so skip if options.verbose: print "- %s already in Satellite, skipping" % (rpm_name) break else: if options.verbose: print "+ %s is not in Satellite, adding" % (rpm_name) if options.debug: print "DEBUG: Calling: push_rpm(",rpm, channel, options.user, options.password, options.satserver, ")" returncode = push_rpm(rpm, channel, options.user, options.password, options.satserver) if not returncode == 0: print "rhnpush process exited with returncode:", returncode if returncode == 255: print "You may force package uploads with --force" sys.exit(1) print "Completed uploading rpms." if (not options.server_actions_only) and (not options.demo) and (not options.delete): # This is the client actions section print "Subscribing registered systems to the %s channel" % (PLATFORM_INDEPENDENT) client_systems = subscribe_clients(key) print "Scheduling software installation and actions on clients" client_systems = schedule_actions(key, client_systems) print "Waiting for client actions to complete" client_systems = get_action_results(key, client_systems) print "All actions completed.\n" show_client_results(client_systems) if not options.demo: logout(key) | 07e2421549e748ccb09a392c60834eaea3e54917 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3457/07e2421549e748ccb09a392c60834eaea3e54917/dell-satellite-sync.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
309,
702,
18,
27928,
30,
498,
273,
1083,
783,
67,
9114,
273,
2618,
783,
67,
4327,
67,
5336,
273,
10228,
30138,
292,
17,
92,
5292,
67,
1105,
17,
3567,
17,
25,
3546,
469,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
309,
702,
18,
27928,
30,
498,
273,
1083,
783,
67,
9114,
273,
2618,
783,
67,
4327,
67,
5336,
273,
10228,
30138,
292,
17,
92,
5292,
67,
1105,
17,
3567,
17,
25,
3546,
469,
... |
d_obs = miller.array(miller_set = f_model, data = self.f_obs.data()*k ).phase_transfer(phase_source = f_model) d_model = self.f_model_scaled_with_k1().data()*n return miller.array(miller_set = f_model, data = d_obs.data() - d_model) | return self._map_coeff(f_obs = self.f_obs, f_model = self.f_model(), f_obs_scale = k * f_obs_scale, f_model_scale = n * f_model_scale) | def map_coefficients(self, map_type = None, k = None, n = None, w1 = None, w2 = None): assert map_type in ("k*Fobs-n*Fmodel", "2m*Fobs-D*Fmodel", "m*Fobs-D*Fmodel") if(map_type == "k*Fobs-n*Fmodel"): if([k,n].count(None) != 0): raise Sorry("Map coefficients (k and n) must be provided.") f_model = self.f_model() if(map_type == "k*Fobs-n*Fmodel"): d_obs = miller.array(miller_set = f_model, data = self.f_obs.data()*k ).phase_transfer(phase_source = f_model) d_model = self.f_model_scaled_with_k1().data()*n return miller.array(miller_set = f_model, data = d_obs.data() - d_model) if(map_type == "2m*Fobs-D*Fmodel"): alpha, beta = self.alpha_beta() d_obs = miller.array(miller_set = f_model, data = self.f_obs.data()*2.*self.figures_of_merit() ).phase_transfer(phase_source = f_model) d_model = f_model.data()*alpha.data() return miller.array(miller_set = self.f_model(), data = d_obs.data() - d_model) if(map_type == "m*Fobs-D*Fmodel"): alpha, beta = self.alpha_beta() d_obs = miller.array(miller_set = f_model, data = self.f_obs.data()*self.figures_of_merit() ).phase_transfer(phase_source = f_model) d_model = f_model.data()*alpha.data() #### #result = miller.array(miller_set = self.f_calc, # data = d_obs.data() - d_model) #centrics = result.select_centric() #acentrics = result.select_acentric() #acentrics_data = acentrics.data() * 2.0 #centrics_data = centrics.data() #new = acentrics.customized_copy( # indices = acentrics.indices().concatenate(centrics.indices()), # data = acentrics_data.concatenate(centrics_data) ) #### #return new #f = open("qq","w") #fom = self.figures_of_merit() #for i, a, b in zip(self.f_calc.indices(), fom, alpha.data()): # print >> f, "%5d%5d%5d %10.3f %10.3f" % (i[0], i[1], i[2], a, b) return miller.array(miller_set = f_model, data = d_obs.data() - d_model) | f19aefb5e2e6f1ee1fe619eeb40f1643efc3d937 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/696/f19aefb5e2e6f1ee1fe619eeb40f1643efc3d937/f_model.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
852,
67,
8075,
12344,
12,
2890,
16,
852,
67,
723,
1850,
273,
599,
16,
417,
1171,
273,
599,
16,
290,
1171,
273,
599,
16,
341,
21,
7734,
273,
599,
16,
341,
22,
7734,
273,
599,
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,
852,
67,
8075,
12344,
12,
2890,
16,
852,
67,
723,
1850,
273,
599,
16,
417,
1171,
273,
599,
16,
290,
1171,
273,
599,
16,
341,
21,
7734,
273,
599,
16,
341,
22,
7734,
273,
599,
4672,
... |
os.write(handle, contents) | os.write(handle, contents.encode('utf-8')) | def preview_changes(self, req, page): """ Preview suggested changes. """ page_id = self.env.get_real_filename(page) if page_id is None: raise NotFound() author = req.form.get('name') email = req.form.get('email') contents = req.form.get('contents') | 98afdb3434bab297611b8a043ea35d50e8d01096 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1278/98afdb3434bab297611b8a043ea35d50e8d01096/application.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10143,
67,
6329,
12,
2890,
16,
1111,
16,
1363,
4672,
3536,
22289,
22168,
3478,
18,
3536,
1363,
67,
350,
273,
365,
18,
3074,
18,
588,
67,
7688,
67,
3459,
12,
2433,
13,
309,
1363,
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,
10143,
67,
6329,
12,
2890,
16,
1111,
16,
1363,
4672,
3536,
22289,
22168,
3478,
18,
3536,
1363,
67,
350,
273,
365,
18,
3074,
18,
588,
67,
7688,
67,
3459,
12,
2433,
13,
309,
1363,
67,
... |
self.db.addnode(self.classname, newid, d) | def import_list(self, propnames, proplist): ''' Import a node - all information including "id" is present and should not be sanity checked. Triggers are not triggered. The journal should be initialised using the "creator" and "created" information. | 01f0ef6c6dae68879d65d11a3bdae2c995f2fccc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/01f0ef6c6dae68879d65d11a3bdae2c995f2fccc/rdbms_common.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1930,
67,
1098,
12,
2890,
16,
2270,
1973,
16,
450,
17842,
4672,
9163,
6164,
279,
756,
300,
777,
1779,
6508,
315,
350,
6,
353,
3430,
471,
1410,
486,
506,
16267,
5950,
18,
840,
8060,
854... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1930,
67,
1098,
12,
2890,
16,
2270,
1973,
16,
450,
17842,
4672,
9163,
6164,
279,
756,
300,
777,
1779,
6508,
315,
350,
6,
353,
3430,
471,
1410,
486,
506,
16267,
5950,
18,
840,
8060,
854... | |
print "Decoded: %s = %s" % (k, v) | def decode_list(self, prop, value): if not isinstance(value, list): value = [value] if hasattr(prop, 'item_type'): item_type = getattr(prop, "item_type") dec_val = {} for val in value: k,v = self.decode_map_element(item_type, val) try: k = int(k) except: k = v dec_val[k] = v print "Decoded: %s = %s" % (k, v) value = dec_val.values() return value | 2397b5455d5c906af044f37d3adaecb6c177f43b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1098/2397b5455d5c906af044f37d3adaecb6c177f43b/sdbmanager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2495,
67,
1098,
12,
2890,
16,
2270,
16,
460,
4672,
309,
486,
1549,
12,
1132,
16,
666,
4672,
460,
273,
306,
1132,
65,
309,
3859,
12,
5986,
16,
296,
1726,
67,
723,
11,
4672,
761,
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,
2495,
67,
1098,
12,
2890,
16,
2270,
16,
460,
4672,
309,
486,
1549,
12,
1132,
16,
666,
4672,
460,
273,
306,
1132,
65,
309,
3859,
12,
5986,
16,
296,
1726,
67,
723,
11,
4672,
761,
67,
... | |
base_facets.update(self.__facets) if self.__baseTypeDefinition.facets(): assert type(self.__baseTypeDefinition.facets()) == types.DictType base_facets.update(self.__baseTypeDefinition.facets()) | facet_contributors = [ self ] td = self.__baseTypeDefinition while td.facets(): facet_contributors.append(td) td = td.__baseTypeDefinition facet_contributors.reverse() for td in facet_contributors: print 'Adding facets to %s from %s' % (self, td) base_facets.update(td.facets()) | def __updateFacets (self, body): # We want a map from the union of the facet classes from this # STD and the baseTypeDefinition (if present), to None if the # facet has not been constrained, or a ConstrainingFacet # instance if it is. ConstrainingFacet instances created for # local constraints also need a pointer to the corresponding # facet from the base type definition, because those # constraints also affect this type. base_facets = {} base_facets.update(self.__facets) if self.__baseTypeDefinition.facets(): assert type(self.__baseTypeDefinition.facets()) == types.DictType base_facets.update(self.__baseTypeDefinition.facets()) local_facets = {} for fc in base_facets.keys(): children = LocateMatchingChildren(body, fc.Name()) fi = base_facets[fc] if 0 < len(children): fi = fc(base_type_definition=self.__baseTypeDefinition, owner_type_definition=self, super_facet=fi) if isinstance(fi, facets._LateDatatype_mixin): fi.bindValueDatatype(self) for cn in children: kw = { 'annotation': LocateUniqueChild(cn, 'annotation') } for ai in range(0, cn.attributes.length): attr = cn.attributes.item(ai) # Convert name from unicode to string kw[str(attr.name)] = attr.value #print 'set %s from %s' % (fi.Name(), kw) fi.setFromKeywords(**kw) local_facets[fc] = fi self.__facets = local_facets assert type(self.__facets) == types.DictType | 078f730e5bb5a3698a24e61b36688335e6bce0b5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7171/078f730e5bb5a3698a24e61b36688335e6bce0b5/structures.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2725,
6645,
2413,
261,
2890,
16,
1417,
4672,
468,
1660,
2545,
279,
852,
628,
326,
7812,
434,
326,
11082,
3318,
628,
333,
468,
2347,
40,
471,
326,
23937,
1852,
261,
430,
3430,
3631,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2725,
6645,
2413,
261,
2890,
16,
1417,
4672,
468,
1660,
2545,
279,
852,
628,
326,
7812,
434,
326,
11082,
3318,
628,
333,
468,
2347,
40,
471,
326,
23937,
1852,
261,
430,
3430,
3631,... |
res.update({user_id:status}) | res.update({user_id:status}) | def _get_user_avail(self, cr, uid, ids, context=None): current_datetime = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') res = super(res_users, self)._get_user_avail(cr, uid, ids, context) cr.execute("SELECT crm_case.user_id, 'busy' as status \ FROM crm_meeting meeting, crm_case \ WHERE meeting.inherit_case_id = crm_case.id \ and crm_case.date <= %s and crm_case.date_deadline >= %s and crm_case.user_id = ANY(%s) and meeting.show_as = %s", (current_datetime, current_datetime , ids, 'busy')) result = cr.dictfetchall() for user_data in result: user_id = user_data['user_id'] status = user_data['status'] res.update({user_id:status}) return res | 75258015cae6ae0d493e7eb6204a16eafed73cd9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/75258015cae6ae0d493e7eb6204a16eafed73cd9/crm_meeting.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
1355,
67,
842,
671,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
33,
7036,
4672,
783,
67,
6585,
273,
3314,
18,
6585,
18,
3338,
7675,
701,
9982,
29909,
61,
6456,
81,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
1355,
67,
842,
671,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
33,
7036,
4672,
783,
67,
6585,
273,
3314,
18,
6585,
18,
3338,
7675,
701,
9982,
29909,
61,
6456,
81,... |
def _getStandardBias( self, dt ): winInfo = self.getWinInfo( dt.year ) | def _getStandardBias(self, dt): winInfo = self.getWinInfo(dt.year) | def _getStandardBias( self, dt ): winInfo = self.getWinInfo( dt.year ) return winInfo.bias + winInfo.standardBiasOffset | c68039a3f4004e3fe46621e4c6512fd2401398fc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/677/c68039a3f4004e3fe46621e4c6512fd2401398fc/win32timezone.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
8336,
31645,
12,
2890,
16,
3681,
4672,
5657,
966,
273,
365,
18,
588,
18049,
966,
12,
7510,
18,
6874,
13,
327,
5657,
966,
18,
13931,
397,
5657,
966,
18,
10005,
31645,
2335,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
8336,
31645,
12,
2890,
16,
3681,
4672,
5657,
966,
273,
365,
18,
588,
18049,
966,
12,
7510,
18,
6874,
13,
327,
5657,
966,
18,
13931,
397,
5657,
966,
18,
10005,
31645,
2335,
2,... |
self._parser.ProcessingInstructionHandler = \ self._cont_handler.processingInstruction self._parser.CharacterDataHandler = self._cont_handler.characters | self._reset_cont_handler() | def reset(self): if self._namespaces: self._parser = expat.ParserCreate(None, " ") self._parser.StartElementHandler = self.start_element_ns self._parser.EndElementHandler = self.end_element_ns else: self._parser = expat.ParserCreate() self._parser.StartElementHandler = self.start_element self._parser.EndElementHandler = self.end_element | 97c4c1a3bc3ef2249d8b1174a968d7cd0dfc6b76 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/97c4c1a3bc3ef2249d8b1174a968d7cd0dfc6b76/expatreader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2715,
12,
2890,
4672,
309,
365,
6315,
16078,
30,
365,
6315,
4288,
273,
1329,
270,
18,
2678,
1684,
12,
7036,
16,
315,
9369,
365,
6315,
4288,
18,
1685,
1046,
1503,
273,
365,
18,
1937,
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,
2715,
12,
2890,
4672,
309,
365,
6315,
16078,
30,
365,
6315,
4288,
273,
1329,
270,
18,
2678,
1684,
12,
7036,
16,
315,
9369,
365,
6315,
4288,
18,
1685,
1046,
1503,
273,
365,
18,
1937,
67... |
header, data=line.split(":",1) | header, data = line.split(":", 1) | def ParseReport(self, MetarReport=None): """Take report with raw info only and return it with in parsed values filled in. Note: This function edits the WeatherReport object you supply!""" if self.Report is None and MetarReport is None: raise EmptyReportException, \ "No report given on init and ParseReport()." elif MetarReport is not None: self.Report=MetarReport | fe1cdcd11658fbbfba6d30dfe37a2f9dfce6a1a8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4602/fe1cdcd11658fbbfba6d30dfe37a2f9dfce6a1a8/pymetar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2884,
4820,
12,
2890,
16,
21604,
297,
4820,
33,
7036,
4672,
3536,
13391,
2605,
598,
1831,
1123,
1338,
471,
327,
518,
598,
316,
2707,
924,
6300,
316,
18,
3609,
30,
1220,
445,
24450,
326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2884,
4820,
12,
2890,
16,
21604,
297,
4820,
33,
7036,
4672,
3536,
13391,
2605,
598,
1831,
1123,
1338,
471,
327,
518,
598,
316,
2707,
924,
6300,
316,
18,
3609,
30,
1220,
445,
24450,
326,
... |
* *host* is an IPv4 dotted quad or an IPv6 address | * *ip* is an IPv4 dotted quad or an IPv6 address | def listen(self, bind_info, qlen=5): """ Sets the socket to listen. | 90682baa5ab5e105fb31ca84cac0f9a398304906 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11722/90682baa5ab5e105fb31ca84cac0f9a398304906/sockets.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6514,
12,
2890,
16,
1993,
67,
1376,
16,
1043,
1897,
33,
25,
4672,
3536,
11511,
326,
2987,
358,
6514,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6514,
12,
2890,
16,
1993,
67,
1376,
16,
1043,
1897,
33,
25,
4672,
3536,
11511,
326,
2987,
358,
6514,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return self._DictIterator(1,self) | return self._DictIterator(1) | def iterkeys(self): """ obj.iterkeys() -> an iterator over the keys of obj ordered by self.field_order """ return self._DictIterator(1,self) | 579d2b0d74c64f5c9a73587dd87d4cda3aafef04 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13713/579d2b0d74c64f5c9a73587dd87d4cda3aafef04/MythBase.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31664,
12,
2890,
4672,
3536,
1081,
18,
2165,
2452,
1435,
317,
392,
2775,
1879,
326,
1311,
434,
1081,
5901,
635,
365,
18,
1518,
67,
1019,
3536,
327,
365,
6315,
5014,
3198,
12,
21,
13,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31664,
12,
2890,
4672,
3536,
1081,
18,
2165,
2452,
1435,
317,
392,
2775,
1879,
326,
1311,
434,
1081,
5901,
635,
365,
18,
1518,
67,
1019,
3536,
327,
365,
6315,
5014,
3198,
12,
21,
13,
2... |
tmpfile = mkstemp_symlink(dirname, basename, linkto) | tmpfile = mkstemp_symlink(dirname, tmpprefix, linkto) | def extractCpio(self, filedata, read_data, filenamehash, devinode, filenames): filename = filedata[0] data = read_data(filedata[5]) fileinfo = filenamehash.get(filename) if fileinfo == None: self.printErr("cpio file %s not in rpm header" % filename) return (fn, flag, mode, mtime, dev, inode, user, group, rdev, linkto, i) = fileinfo del filenamehash[filename] uid = gid = None if self.owner: uid = self.uid.ugid[user] gid = self.gid.ugid[group] if self.relocated: filename = self.relocatedFile(filename) filename = "%s%s" % (self.buildroot, filename) (dirname, basename) = os.path.split(filename) makeDirs(dirname) if S_ISREG(mode): di = devinode.get((dev, inode)) if di == None or data: (fd, tmpfilename) = mkstemp_file(dirname, basename) os.write(fd, data) os.close(fd) setPerms(tmpfilename, uid, gid, mode, mtime) os.rename(tmpfilename, filename) if di: di.remove(i) for j in di: if self.relocated: fn2 = "%s%s" % (self.buildroot, self.relocatedFile(filenames[j])) else: fn2 = "%s%s" % (self.buildroot, filenames[j]) (dirname, basename) = os.path.split(fn2) makeDirs(dirname) tmpfilename = mkstemp_link(dirname, basename, filename) if tmpfilename == None: (fd, tmpfilename) = mkstemp_file(dirname, basename) os.write(fd, data) os.close(fd) setPerms(tmpfilename, uid, gid, mode, mtime) os.rename(tmpfilename, fn2) del devinode[(dev, inode)] elif S_ISDIR(mode): makeDirs(filename) setPerms(filename, uid, gid, mode, None) elif S_ISLNK(mode): #if os.path.islink(filename) \ # and os.readlink(filename) == linkto: # return tmpfile = mkstemp_symlink(dirname, basename, linkto) setPerms(tmpfile, uid, gid, None, None) os.rename(tmpfile, filename) elif S_ISFIFO(mode): tmpfile = mkstemp_mkfifo(dirname, basename) setPerms(tmpfile, uid, gid, mode, mtime) os.rename(tmpfile, filename) elif S_ISCHR(mode) or S_ISBLK(mode): if self.owner: tmpfile = mkstemp_mknod(dirname, basename, mode, rdev) setPerms(tmpfile, uid, gid, mode, mtime) os.rename(tmpfile, filename) # if not self.owner: we could give a warning here elif S_ISSOCK(mode): raise ValueError, "UNIX domain sockets can't be packaged." else: raise ValueError, "%s: not a valid filetype" % (oct(mode)) | 73fe5b4e17300fe703da079a2bdf4fefe1e4ee56 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/73fe5b4e17300fe703da079a2bdf4fefe1e4ee56/oldpyrpm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
28954,
1594,
12,
2890,
16,
585,
892,
16,
855,
67,
892,
16,
1544,
2816,
16,
4461,
267,
390,
16,
9066,
4672,
1544,
273,
585,
892,
63,
20,
65,
501,
273,
855,
67,
892,
12,
768,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
28954,
1594,
12,
2890,
16,
585,
892,
16,
855,
67,
892,
16,
1544,
2816,
16,
4461,
267,
390,
16,
9066,
4672,
1544,
273,
585,
892,
63,
20,
65,
501,
273,
855,
67,
892,
12,
768,
8... |
this = apply(_quickfix.new_LegSettlDate, args) | this = _quickfix.new_LegSettlDate(*args) | def __init__(self, *args): this = apply(_quickfix.new_LegSettlDate, args) try: self.this.append(this) except: self.this = this | 7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
8329,
694,
6172,
1626,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
8329,
694,
6172,
1626,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
... |
if timeout != None and time() >= end: break | if timeout != None and timer() >= end: break | def recv(self, n, timeout=None, peek=False, waitall=False): """Reads up to n bytes in a manner identical to socket.recv. Blocks for up to timeout seconds if n > 0 and no data is available (timeout=None means wait forever). If still no data is available, raises BlockError or Timeout. For a closed stream, recv will read the data stored in the buffer until EOF, at which point the read data will be truncated. If peek is True, the data is not removed. If waitall is True, reads exactly n bytes, or raises BlockError or Timeout as appropriate. Returns data.""" | 4b100a5a64fb3d1a2c87cd04aa5b2af0b232051e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11109/4b100a5a64fb3d1a2c87cd04aa5b2af0b232051e/samclasses.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10665,
12,
2890,
16,
290,
16,
2021,
33,
7036,
16,
8032,
33,
8381,
16,
2529,
454,
33,
8381,
4672,
3536,
7483,
731,
358,
290,
1731,
316,
279,
21296,
12529,
358,
2987,
18,
18334,
18,
2271... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10665,
12,
2890,
16,
290,
16,
2021,
33,
7036,
16,
8032,
33,
8381,
16,
2529,
454,
33,
8381,
4672,
3536,
7483,
731,
358,
290,
1731,
316,
279,
21296,
12529,
358,
2987,
18,
18334,
18,
2271... |
sys.exit(not main()) | exit_status = not main() sys.exit(exit_status) | def main(): """Script main program.""" import getopt try: opts, args = getopt.getopt(sys.argv[1:], 'lfd:') except getopt.error, msg: print msg print "usage: compileall [-l] [-f] [-d destdir] [directory ...]" print "-l: don't recurse down" print "-f: force rebuild even if timestamps are up-to-date" print "-d destdir: purported directory name for error messages" print "if no directory arguments, -l sys.path is assumed" sys.exit(2) maxlevels = 10 ddir = None force = 0 for o, a in opts: if o == '-l': maxlevels = 0 if o == '-d': ddir = a if o == '-f': force = 1 if ddir: if len(args) != 1: print "-d destdir require exactly one directory argument" sys.exit(2) success = 1 try: if args: for dir in args: success = success and compile_dir(dir, maxlevels, ddir, force) else: success = compile_path() except KeyboardInterrupt: print "\n[interrupt]" success = 0 return success | c8123ba8709fb01b32659d2d930ad099c5e995e2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c8123ba8709fb01b32659d2d930ad099c5e995e2/compileall.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
3651,
2774,
5402,
12123,
1930,
336,
3838,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
30,
6487,
296,
80,
8313,
2497,
13,
1335... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
3651,
2774,
5402,
12123,
1930,
336,
3838,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
30,
6487,
296,
80,
8313,
2497,
13,
1335... |
base_path = request.get_header('X-Base-Path') | base_path = uri.Path(request.get_header('X-Base-Path')) | def __init__(self, request): self.request = request self.response = Response() | 3607004ea82fcaac87f765463271f53ae3e3c265 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/3607004ea82fcaac87f765463271f53ae3e3c265/context.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
590,
4672,
365,
18,
2293,
273,
590,
365,
18,
2740,
273,
2306,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
590,
4672,
365,
18,
2293,
273,
590,
365,
18,
2740,
273,
2306,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
output = subprocess.Popen(cmd, stdout=subprocess.PIPE).stdout.read() return output.strip() | try: output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0] return output.strip() finally: reap_children() | def run_pydoc(module_name, *args): """ Runs pydoc on the specified module. Returns the stripped output of pydoc. """ cmd = [sys.executable, pydoc.__file__, " ".join(args), module_name] output = subprocess.Popen(cmd, stdout=subprocess.PIPE).stdout.read() return output.strip() | 8315987803ab15f3c561cdb9b07afa7bcd0aff44 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/8315987803ab15f3c561cdb9b07afa7bcd0aff44/test_pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
2074,
2434,
12,
2978,
67,
529,
16,
380,
1968,
4672,
3536,
1939,
87,
2395,
2434,
603,
326,
1269,
1605,
18,
2860,
326,
13300,
876,
434,
2395,
2434,
18,
3536,
1797,
273,
306,
94... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
2074,
2434,
12,
2978,
67,
529,
16,
380,
1968,
4672,
3536,
1939,
87,
2395,
2434,
603,
326,
1269,
1605,
18,
2860,
326,
13300,
876,
434,
2395,
2434,
18,
3536,
1797,
273,
306,
94... |
if k.name == s3path_dst: | if _eq_utf8(k.name,s3path_dst): | def copy(self,src,dst,overwrite=False,chunk_size=16384): """Copy a file from 'src' to 'dst'. | 0b5d272c58e42332822190f6d93fa2968f5f91da /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5579/0b5d272c58e42332822190f6d93fa2968f5f91da/s3fs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
12,
2890,
16,
4816,
16,
11057,
16,
19274,
33,
8381,
16,
6551,
67,
1467,
33,
2313,
17295,
4672,
3536,
2951,
279,
585,
628,
296,
4816,
11,
358,
296,
11057,
10332,
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,
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,
12,
2890,
16,
4816,
16,
11057,
16,
19274,
33,
8381,
16,
6551,
67,
1467,
33,
2313,
17295,
4672,
3536,
2951,
279,
585,
628,
296,
4816,
11,
358,
296,
11057,
10332,
2,
-100,
-100,
-1... |
p = _RegEnumKey(k,i) | p = RegEnumKey(k,i) | def get_devstudio_versions (): """Get list of devstudio versions from the Windows registry. Return a list of strings containing version numbers; the list will be empty if we were unable to access the registry (eg. couldn't import a registry-access module) or the appropriate registry keys weren't found.""" if not _can_read_reg: return [] K = 'Software\\Microsoft\\Devstudio' L = [] for base in (_HKEY_CLASSES_ROOT, _HKEY_LOCAL_MACHINE, _HKEY_CURRENT_USER, _HKEY_USERS): try: k = _RegOpenKeyEx(base,K) i = 0 while 1: try: p = _RegEnumKey(k,i) if p[0] in '123456789' and p not in L: L.append(p) except _RegError: break i = i + 1 except _RegError: pass L.sort() L.reverse() return L | 01a95b62bc16d9fbe67a94fd58e1c238749ab403 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/01a95b62bc16d9fbe67a94fd58e1c238749ab403/msvccompiler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
5206,
334,
4484,
67,
10169,
1832,
30,
3536,
967,
666,
434,
4461,
334,
4484,
5244,
628,
326,
8202,
4023,
18,
225,
2000,
279,
666,
434,
2064,
4191,
1177,
5600,
31,
326,
666,
903... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5206,
334,
4484,
67,
10169,
1832,
30,
3536,
967,
666,
434,
4461,
334,
4484,
5244,
628,
326,
8202,
4023,
18,
225,
2000,
279,
666,
434,
2064,
4191,
1177,
5600,
31,
326,
666,
903... |
schedId = obj['schedulerId'] if obj['schedulerId'] is None: return jobAttributes = self.schedObj.query( schedId, \ self.parameters['service'], 'node' ) for key, value in jobAttributes[schedId].iteritems() : | if not valid( obj ): raise SchedulerError('invalid object', str( obj )) jobAttributes = self.schedObj.query( obj['schedulerId'], self.parameters['service'], 'node' ) for key, value in jobAttributes[obj['schedulerId']].iteritems() : | def query(self, obj, objType='node') : """ query status and eventually other scheduler related information """ | 37c2f876cfac35d07f26047ffc4b3fc1f1b41055 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8886/37c2f876cfac35d07f26047ffc4b3fc1f1b41055/Scheduler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
843,
12,
2890,
16,
1081,
16,
30078,
2218,
2159,
6134,
294,
3536,
843,
1267,
471,
18011,
1308,
8129,
3746,
1779,
3536,
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,
843,
12,
2890,
16,
1081,
16,
30078,
2218,
2159,
6134,
294,
3536,
843,
1267,
471,
18011,
1308,
8129,
3746,
1779,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
for fmt in ('B', 'H', 'I', 'L', 'b', 'h', 'i', 'l'): | for fmt in ('B', 'H', 'I', 'L', 'Q', 'b', 'h', 'i', 'l', 'q'): | def XXXtest_1530559(self): # XXX This is broken: see the bug report # SF bug 1530559. struct.pack raises TypeError where it used to convert. for endian in ('', '>', '<'): for fmt in ('B', 'H', 'I', 'L', 'b', 'h', 'i', 'l'): self.check_float_coerce(endian + fmt, 1.0) self.check_float_coerce(endian + fmt, 1.5) | 3671163d064d0a027d3f172fa8572d590fefeffc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/3671163d064d0a027d3f172fa8572d590fefeffc/test_struct.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11329,
3813,
67,
3600,
5082,
2539,
29,
12,
2890,
4672,
468,
11329,
1220,
353,
12933,
30,
2621,
326,
7934,
2605,
468,
21318,
7934,
4711,
5082,
2539,
29,
18,
1958,
18,
2920,
14183,
3580,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11329,
3813,
67,
3600,
5082,
2539,
29,
12,
2890,
4672,
468,
11329,
1220,
353,
12933,
30,
2621,
326,
7934,
2605,
468,
21318,
7934,
4711,
5082,
2539,
29,
18,
1958,
18,
2920,
14183,
3580,
1... |
Run Hart's quadratic sieve and return the distinct prime factors | Run Hart's quadratic sieve and return the distinct proper factors | def qsieve(n, block=True, time=False): """ Run Hart's quadratic sieve and return the distinct prime factors of the integer n that it finds. INPUT: n -- an integer with at least 40 digits block -- (default: True) if True, you must wait until the sieve computation is complete before using SAGE further. If False, SAGE will run while the sieve computation runs in parallel. time -- (default: False) if True, time the command using the UNIX "time" command (which you might have to install). OUTPUT: list -- a list of the prime factors of n found str -- the time in cpu seconds that the computation took, as given by the command line time command. (If time is False, this is always an empty string.) EXAMPLES: sage: k = 19; n = next_prime(10^k)*next_prime(10^(k+1)) sage: factor(n) # (currently) uses PARI 10000000000000000051 * 100000000000000000039 sage: v, t = qsieve(n, time=True) # uses the sieve sage: v [10000000000000000051, 100000000000000000039] sage: t # random output """ Z = sage.rings.integer.Integer n = Z(n) if len(str(n)) < 40: raise ValueError, "n must have at least 40 digits" if block: return qsieve_block(n, time) else: return qsieve_nonblock(n, time) | 644b5150be86509b6978df461f46a88eec2c971b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/644b5150be86509b6978df461f46a88eec2c971b/qsieve.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8719,
21271,
12,
82,
16,
1203,
33,
5510,
16,
813,
33,
8381,
4672,
3536,
1939,
670,
485,
1807,
26146,
272,
21271,
471,
327,
326,
10217,
5338,
14490,
434,
326,
3571,
290,
716,
518,
13094,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8719,
21271,
12,
82,
16,
1203,
33,
5510,
16,
813,
33,
8381,
4672,
3536,
1939,
670,
485,
1807,
26146,
272,
21271,
471,
327,
326,
10217,
5338,
14490,
434,
326,
3571,
290,
716,
518,
13094,
... |
self.app.iconname('Dialog') self.app.geometry("+300+200") | def createDialog(self): self.app = tk.Tk() self.app.protocol('WM_DELETE_WINDOW', self.denyWindowManagerClose) self.app.title(self.title) self.app.iconname('Dialog') self.app.geometry("+300+200") # # the main window # self.entryWidgets = [None]*len(self.options) self.labelWidgets = [None]*len(self.options) self.app.bind("<Escape>", self.doCancel) # all use grid management # top message # do not use a very long description please tk.Message(self.app, text=self.description, width=600).grid(row=0, column=0, columnspan = 2 * self.nCol, sticky=tk.N+tk.E+tk.S+tk.W, pady=20) # find out number of items etc colParam = 0 for opt in self.options: if opt.has_key('label'): colParam += 1 if opt.has_key('chooseFrom'): colParam += len( opt['chooseFrom']) -1 if opt.has_key('chooseOneOf'): colParam += len( opt['chooseOneOf']) -1 if colParam / self.nCol * self.nCol == colParam: colParam /= self.nCol else: colParam = colParam/self.nCol + 1 colCount = 0 colIndex = 0 # all entries for g in range(len(self.options)): opt = self.options[g] if not opt.has_key('label'): continue # --------- entryWidget ---------------------------------------------- # use different entry method for different types if opt.has_key('chooseOneOf'): # single choice self.labelWidgets[g] = tk.Label(self.app, text=opt['label']) self.labelWidgets[g].grid(column=colIndex*2, row=colCount%colParam+1, padx=10, rowspan = len(opt['chooseOneOf']), sticky=tk.E) self.entryWidgets[g] = tk.Listbox(self.app, width=40, selectmode=tk.SINGLE, \ exportselection=0, height=len(opt['chooseOneOf'])) self.entryWidgets[g].grid(column=colIndex*2+1, row=colCount%colParam+1, padx=10, rowspan = len(opt['chooseOneOf'])) colCount += len(opt['chooseOneOf']) for entry in opt['chooseOneOf']: self.entryWidgets[g].insert(tk.END, str(entry)) if self.values[g] is not None: self.entryWidgets[g].select_set( opt['chooseOneOf'].index(self.values[g])) elif opt.has_key('chooseFrom'): # multiple choice self.labelWidgets[g] = tk.Label(self.app, text=opt['label']) self.labelWidgets[g].grid(column=colIndex*2, row=colCount%colParam+1, padx=10, rowspan = len(opt['chooseFrom']), sticky=tk.E) self.entryWidgets[g] = tk.Listbox(self.app, width=40, selectmode=tk.EXTENDED, \ exportselection=0, height=len( opt['chooseFrom'])) self.entryWidgets[g].grid(column=colIndex*2+1, row=colCount%colParam+1, padx=10, rowspan = len(opt['chooseFrom'])) colCount += len(opt['chooseFrom']) for entry in opt['chooseFrom']: self.entryWidgets[g].insert(tk.END, str(entry)) if self.values[g] is not None: if type(self.values[g]) in [types.TupleType, types.ListType]: for val in self.values[g]: self.entryWidgets[g].select_set( opt['chooseFrom'].index(val)) else: self.entryWidgets[g].select_set( opt['chooseFrom'].index( self.values[g] )) elif (opt.has_key('arg') and opt['arg'][-1] != ':') or \ (opt.has_key('longarg') and opt['longarg'][-1] != '='): # true or false self.labelWidgets[g] = tk.Label(self.app, text=opt['label']) self.labelWidgets[g].grid(column=colIndex*2, row=colCount%colParam+1, padx=10, rowspan = 1, sticky=tk.E) # replace self.values[g] by a tk IntVar() because tk.Checkbutton has to store # its value in such a variable. self.values[g].get() will be used to return the # state of this Checkbutton. # c.f. http://infohost.nmt.edu/tcc/help/pubs/tkinter/control-variables.html iv = tk.IntVar() iv.set(self.values[g] == True) # self.values[g] can be None, True or False self.values[g] = iv self.entryWidgets[g] = tk.Checkbutton(self.app, height=1, text = "Yes / No", variable=self.values[g]) self.entryWidgets[g].grid(column=colIndex*2+1, row=colCount%colParam+1, padx=10, rowspan = 1) colCount += 1 self.entryWidgets[g].deselect() else: self.labelWidgets[g] = tk.Label(self.app, text=opt['label']) self.labelWidgets[g].grid(column=colIndex*2, row=colCount%colParam+1, padx=10, sticky=tk.E) self.entryWidgets[g] = tk.Entry(self.app, width=40) self.entryWidgets[g].grid(column=colIndex*2+1, row=colCount%colParam+1, padx=10) colCount += 1 # put default value into the entryWidget if self.values[g] is not None: self.entryWidgets[g].insert(0, prettyOutput(self.values[g])) colIndex = colCount /colParam self.entryWidgets[g].bind("<Return>", self.doGetText) self.entryWidgets[g].bind("<Escape>", self.doCancel) # help button helpButton = tk.Button(self.app, takefocus=1, text="Help") helpButton.bind("<Return>", self.doHelp) helpButton.bind("<Button-1>", self.doHelp) helpButton.grid(column=0, columnspan=self.nCol, row = colParam+1, pady=20) # ok button okButton = tk.Button(self.app, takefocus=1, text="Run!") okButton.bind("<Return>", self.doGetText) okButton.bind("<Button-1>", self.doGetText) okButton.grid( column=self.nCol, columnspan=self.nCol, row = colParam+1, pady=20) # cancel button cancelButton = tk.Button(self.app, takefocus=1, text="Cancel") cancelButton.bind("<Return>", self.doCancel) cancelButton.bind("<Button-1>", self.doCancel) cancelButton.grid( column=0, columnspan=2*self.nCol, row = colParam+1, pady=20) | b8dc92ef8ad792606f004235722b9585e2bbe014 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/401/b8dc92ef8ad792606f004235722b9585e2bbe014/simuOpt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
6353,
12,
2890,
4672,
365,
18,
2910,
273,
13030,
18,
56,
79,
1435,
365,
18,
2910,
18,
8373,
2668,
25173,
67,
6460,
67,
23407,
2187,
365,
18,
13002,
93,
3829,
1318,
4605,
13,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
6353,
12,
2890,
4672,
365,
18,
2910,
273,
13030,
18,
56,
79,
1435,
365,
18,
2910,
18,
8373,
2668,
25173,
67,
6460,
67,
23407,
2187,
365,
18,
13002,
93,
3829,
1318,
4605,
13,
365,
... | |
['.mov','.wmv','.mp4','.mp3','.mpg','.avi']) or | ['.mov','.wmv','.mp4','.m4v','.mp3','.mpg','.avi']) or | def processLinks(self,links, depth = 0,linkNumber = 0): maxDepth = 2 urls = links[0] links = links[1] if depth<maxDepth: for link in urls: if depth == 0: linkNumber += 1 #print "Processing %s (%d)" % (link,linkNumber) | e0b9df9a264fb6133b46584a812bee8e9e0d6287 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/e0b9df9a264fb6133b46584a812bee8e9e0d6287/feed.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
7100,
12,
2890,
16,
7135,
16,
3598,
273,
374,
16,
1232,
1854,
273,
374,
4672,
22074,
273,
576,
6903,
273,
4716,
63,
20,
65,
4716,
273,
4716,
63,
21,
65,
309,
3598,
32,
1896,
61... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7100,
12,
2890,
16,
7135,
16,
3598,
273,
374,
16,
1232,
1854,
273,
374,
4672,
22074,
273,
576,
6903,
273,
4716,
63,
20,
65,
4716,
273,
4716,
63,
21,
65,
309,
3598,
32,
1896,
61... |
if debug != 0: print vals | if debug != 0: print >> sys.stderr, vals | def dprint(*vals): global debug if debug != 0: print vals | 205dc77afcd0947155f1616e31da8b63c19d81a9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6154/205dc77afcd0947155f1616e31da8b63c19d81a9/otl2tags.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
302,
1188,
30857,
4524,
4672,
2552,
1198,
309,
1198,
480,
374,
30,
1172,
1671,
2589,
18,
11241,
16,
5773,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
302,
1188,
30857,
4524,
4672,
2552,
1198,
309,
1198,
480,
374,
30,
1172,
1671,
2589,
18,
11241,
16,
5773,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
key = string.upper(key) | def __setitem__(self, key, item): key = string.upper(key) putenv(key, item) self.data[key] = item | 6cc104c0bf0129caba359437e946cbe2dca48dcb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/6cc104c0bf0129caba359437e946cbe2dca48dcb/os.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
1726,
972,
12,
2890,
16,
498,
16,
761,
4672,
1378,
3074,
12,
856,
16,
761,
13,
365,
18,
892,
63,
856,
65,
273,
761,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
1726,
972,
12,
2890,
16,
498,
16,
761,
4672,
1378,
3074,
12,
856,
16,
761,
13,
365,
18,
892,
63,
856,
65,
273,
761,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
elif(attribute == 'latest'): | elif attribute == 'latest': | def getTestRun(id, attribute, form): if(attribute == 'values'): return getTestRunValues(id) elif(attribute == 'latest'): return getLatestTestRunValues(id, form) else: sql = """SELECT test_runs.*, builds.id as build_id, builds.ref_build_id as ref_build_id, builds.ref_changeset as changeset FROM test_runs INNER JOIN builds ON (test_runs.build_id = builds.id) WHERE test_runs.id = %s""" cursor = db.cursor(cursorclass=MySQLdb.cursors.DictCursor) cursor.execute(sql, (id)) if cursor.rowcount == 1: testRun = cursor.fetchone() annotations = getAnnotations(id, 'dictionary') result = {'stat':'ok', 'testrun':{'id':testRun['id'], 'build':{'id':testRun['build_id'], 'build_id':testRun['ref_build_id'], 'changeset':testRun['changeset']}, 'date_run':testRun['date_run'], 'average':testRun['average'], 'annotations':annotations}} else: return {'stat':'fail', 'code':'104', 'message':'Test run not found'} return result | d68d641bc29329a4e44a020f6afe2ac195f90439 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14013/d68d641bc29329a4e44a020f6afe2ac195f90439/api.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29384,
1997,
12,
350,
16,
1566,
16,
646,
4672,
309,
12,
4589,
422,
296,
2372,
11,
4672,
327,
29384,
1997,
1972,
12,
350,
13,
1327,
1566,
422,
296,
13550,
4278,
327,
336,
18650,
4709,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29384,
1997,
12,
350,
16,
1566,
16,
646,
4672,
309,
12,
4589,
422,
296,
2372,
11,
4672,
327,
29384,
1997,
1972,
12,
350,
13,
1327,
1566,
422,
296,
13550,
4278,
327,
336,
18650,
4709,
1... |
if template_string in template_defaults.keys(): template_string = template_defaults[template_string] edit_template = Template(template_string) def edit(obj, bg=False, editor=None): | if not(isinstance(template_string,Template)): template_string = Template(template_string) fields = set(template_fields(template_string)) if not(fields <= set(['file','line']) and ('file' in fields)): raise ValueError, "Only ${file} and ${line} are allowed as template variables, and ${file} must occur." edit_template = template_string def set_editor(editor_name,opts=''): r""" Sets the editor to be used by the edit command by basic editor name. Currently, the system only knows appropriate call strings for a limited number of editors. If you want to use another editor, you should set the whole edit template via set_edit_template. AUTHOR: Nils Bruin (2007-10-05) EXAMPLE: sage: from sage.misc.edit_module import set_editor sage: set_editor('vi') sage: sage.misc.edit_module.edit_template.template 'vi -c ${line} ${file}' """ if sage.misc.edit_module.template_defaults.has_key(editor_name): set_edit_template(Template(template_defaults[editor_name].safe_substitute(opts=opts))) else: raise ValueError, "editor_name not known. Try set_edit_template(<template_string>) instead." def edit(obj, editor=None): | def set_edit_template(template_string): r""" Sets default edit template string. It should reference ${file} and ${line}. This routine normally needs to be called prior to using 'edit'. However, if the editor set in the shell variable EDITOR is known, then the system will substitute an appropriate template for you. See edit_module.template_defaults for the recognised templates. AUTHOR: Nils Bruin (2007-10-03) EXAMPLE: sage: from sage.misc.edit_module import set_edit_template sage: set_edit_template("echo EDIT ${file}:${line}") sage: edit(sage) # not tested EDIT /usr/local/sage/default/devel/sage/sage/__init__.py:1 """ global edit_template if template_string in template_defaults.keys(): template_string = template_defaults[template_string] edit_template = Template(template_string) | 934f6f084107c1d251c5df48297db1cc748d92df /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/934f6f084107c1d251c5df48297db1cc748d92df/edit_module.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
4619,
67,
3202,
12,
3202,
67,
1080,
4672,
436,
8395,
11511,
805,
3874,
1542,
533,
18,
225,
2597,
1410,
2114,
3531,
768,
97,
471,
3531,
1369,
5496,
1220,
12245,
15849,
4260,
358,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
4619,
67,
3202,
12,
3202,
67,
1080,
4672,
436,
8395,
11511,
805,
3874,
1542,
533,
18,
225,
2597,
1410,
2114,
3531,
768,
97,
471,
3531,
1369,
5496,
1220,
12245,
15849,
4260,
358,... |
def print_report(self, cr, uid, ids, context=None): | def print_report(self, cr, uid, ids, context={}): | def print_report(self, cr, uid, ids, context=None): | 350cfd98b11acdd6ea3b80d7c6f6edb2299b4fe0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/350cfd98b11acdd6ea3b80d7c6f6edb2299b4fe0/pos_details.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
6006,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
33,
7036,
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,
... | [
1,
1,
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,
1172,
67,
6006,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
33,
7036,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
distutils.sysconfig._config_vars['LDSHARED'] = ld.replace('gcc','g++') | link_cmds = ld.split() if gcc_exists(link_cmds[0]): link_cmds[0] = 'g++' ld = ' '.join(link_cmds) distutils.sysconfig._config_vars['LDSHARED'] = ld | def _init_posix(): old_init_posix() ld = distutils.sysconfig._config_vars['LDSHARED'] distutils.sysconfig._config_vars['LDSHARED'] = ld.replace('gcc','g++') | 525bfa8f809ecb4a14080b5a3b4b055b303b701e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/525bfa8f809ecb4a14080b5a3b4b055b303b701e/build_tools.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
67,
24463,
13332,
1592,
67,
2738,
67,
24463,
1435,
16916,
273,
2411,
5471,
18,
9499,
1425,
6315,
1425,
67,
4699,
3292,
12069,
8325,
5879,
3546,
1377,
1692,
67,
24680,
273,
16916... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2738,
67,
24463,
13332,
1592,
67,
2738,
67,
24463,
1435,
16916,
273,
2411,
5471,
18,
9499,
1425,
6315,
1425,
67,
4699,
3292,
12069,
8325,
5879,
3546,
1377,
1692,
67,
24680,
273,
16916... |
args = self._LoadTestNamesFrom(pyauto_tests_file) args = args * self._options.repeat logging.debug("Loading %d tests from %s", len(args), args) loaded_tests = unittest.defaultTestLoader.loadTestsFromNames(args) return loaded_tests def _LoadTestNamesFrom(self, filename): modules= PyUITest.EvalDataFrom(filename) | args = self._ExpandTestNamesFrom(pyauto_tests_file, self._options.suite) return args def _ExpandTestNamesFrom(self, filename, suite): """Load test names from the given file. Args: filename: the file to read the tests from suite: the name of the suite to load from |filename|. Returns: a list of test names [module.testcase.testX, module.testcase.testY, ..] """ suites = PyUITest.EvalDataFrom(filename) | def _LoadTests(self, args): """Returns a suite of tests loaded from the given args. | f46cb9be7f9b81256b5d7388b7f62184f59c54ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f46cb9be7f9b81256b5d7388b7f62184f59c54ea/pyauto.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2563,
14650,
12,
2890,
16,
833,
4672,
3536,
1356,
279,
11371,
434,
7434,
4203,
628,
326,
864,
833,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2563,
14650,
12,
2890,
16,
833,
4672,
3536,
1356,
279,
11371,
434,
7434,
4203,
628,
326,
864,
833,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
self.propnames = {} self.classnames = {} self.propcodes = {} self.classcodes = {} self.compcodes = {} self.enumcodes = {} self.othersuites = [] | def __init__(self, fp, basesuite=None): self.fp = fp self.propnames = {} self.classnames = {} self.propcodes = {} self.classcodes = {} self.compcodes = {} self.enumcodes = {} self.othersuites = [] self.basesuite = basesuite | b18e37723e6f3e7fe6bae03f14e954721df23eaf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b18e37723e6f3e7fe6bae03f14e954721df23eaf/gensuitemodule.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4253,
16,
8337,
9519,
33,
7036,
4672,
365,
18,
7944,
273,
4253,
365,
18,
18602,
9519,
273,
8337,
9519,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4253,
16,
8337,
9519,
33,
7036,
4672,
365,
18,
7944,
273,
4253,
365,
18,
18602,
9519,
273,
8337,
9519,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
nlp.solve(x0) | x, zl, zu, obj = nlp.solve(x0) | def apply_new(x): return True | 12984cfb6fa7e8be12f36eedcf2d84b376a0fe6b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12033/12984cfb6fa7e8be12f36eedcf2d84b376a0fe6b/example.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
67,
2704,
12,
92,
4672,
327,
1053,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
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,
2230,
67,
2704,
12,
92,
4672,
327,
1053,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if isintance(var, VarProxy): | if isinstance(var, VarProxy): | def set_default(var, value): """ Set default value for the given config variable (proxy). """ if isintance(var, VarProxy): var._item._cfg_set(value, default = True) | de426c92fa33421cd68a5ab4226b869bf8834376 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11722/de426c92fa33421cd68a5ab4226b869bf8834376/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
1886,
12,
1401,
16,
460,
4672,
3536,
1000,
805,
460,
364,
326,
864,
642,
2190,
261,
5656,
2934,
3536,
309,
1549,
12,
1401,
16,
4562,
3886,
4672,
569,
6315,
1726,
6315,
7066,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
444,
67,
1886,
12,
1401,
16,
460,
4672,
3536,
1000,
805,
460,
364,
326,
864,
642,
2190,
261,
5656,
2934,
3536,
309,
1549,
12,
1401,
16,
4562,
3886,
4672,
569,
6315,
1726,
6315,
7066,
6... |
ar = a[45:140, 50:180]- 26000 ax1.imshow(log10(ar)) ax2.semilogx(ar[:,65], arange(len(ar[:,65]))) ax2.set_ylim([0, len(ar[:,65])]) ax2.set_ylim(ax2.get_ylim()[::-1]) ax2.set_xlim([5e2, 1e5]) ax3.semilogy(ar[47,:]) ax3.set_xlim([0, len(ar[47,:])]) ax3.set_ylim([5e2, 1e5]) | ar = a[45:140, 50:180]- 26000 ax1.imshow(log10(ar)) ax2.semilogx(ar[:,65], arange(len(ar[:,65]))) ax2.set_ylim([0, len(ar[:,65])]) ax2.set_ylim(ax2.get_ylim()[::-1]) ax2.set_xlim([5e2, 1e5]) ax3.semilogy(ar[47,:]) ax3.set_xlim([0, len(ar[47,:])]) ax3.set_ylim([5e2, 1e5]) | def _draw(): f = figure() | e3c96a8a40bc1133dc5d36153be8a61ff1575d10 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8436/e3c96a8a40bc1133dc5d36153be8a61ff1575d10/plotter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9446,
13332,
284,
273,
7837,
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,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9446,
13332,
284,
273,
7837,
1435,
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,
-... |
if not bingo: val = string.join(vals) | if not bingo: val = sort_pattern + " " + string.join(vals) | def sort_records(req, recIDs, sort_field='', sort_order='d', sort_pattern='', verbose=0): """Sort records in 'recIDs' list according sort field 'sort_field' in order 'sort_order'. If more than one instance of 'sort_field' is found for a given record, try to choose that that is given by 'sort pattern', for example "sort by report number that starts by CERN-PS". Note that 'sort_field' can be field code like 'author' or MARC tag like '100__a' directly.""" ## check arguments: if not sort_field: return recIDs if len(recIDs) > cfg_nb_records_to_sort: print_warning(req, "Sorry, sorting is allowed on sets of up to %d records only. Using default sort order (\"latest first\")." % cfg_nb_records_to_sort,"Warning") return recIDs sort_fields = string.split(sort_field, ",") recIDs_dict = {} recIDs_out = [] ## first deduce sorting MARC tag out of the 'sort_field' argument: tags = [] for sort_field in sort_fields: if sort_field and str(sort_field[0:2]).isdigit(): # sort_field starts by two digits, so this is probably a MARC tag already tags.append(sort_field) else: # let us check the 'field' table query = """SELECT DISTINCT(t.value) FROM tag AS t, field_tag AS ft, field AS f WHERE f.code='%s' AND ft.id_field=f.id AND t.id=ft.id_tag ORDER BY ft.score DESC""" % sort_field res = run_sql(query) if res: for row in res: tags.append(row[0]) else: print_warning(req, "Sorry, '%s' does not seem to be a valid sort option. Choosing title sort instead." % sort_field, "Error") tags.append("245__a") if verbose >= 3: print_warning(req, "Sorting by tags %s." % tags) ## check if we have sorting tag defined: if tags: # fetch the necessary field values: for recID in recIDs: val = "" # will hold value for recID according to which sort vals = [] # will hold all values found in sorting tag for recID for tag in tags: vals.extend(get_fieldvalues(recID, tag)) if sort_pattern: # try to pick that tag value that corresponds to sort pattern bingo = 0 for v in vals: if v.startswith(sort_pattern): # bingo! bingo = 1 val = v break if not bingo: # not found, so joint them all together val = string.join(vals) else: # no sort pattern defined, so join them all together val = string.join(vals) val = val.lower() if recIDs_dict.has_key(val): recIDs_dict[val].append(recID) else: recIDs_dict[val] = [recID] # sort them: recIDs_dict_keys = recIDs_dict.keys() recIDs_dict_keys.sort() # now that keys are sorted, create output array: for k in recIDs_dict_keys: for s in recIDs_dict[k]: recIDs_out.append(s) # ascending or descending? if sort_order == 'a': recIDs_out.reverse() # okay, we are done return recIDs_out else: # good, no sort needed return recIDs | 0b416d1dd205d9c4ad94e91fbcaaa9e638ede5dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2139/0b416d1dd205d9c4ad94e91fbcaaa9e638ede5dd/search_engine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1524,
67,
7094,
12,
3658,
16,
1950,
5103,
16,
1524,
67,
1518,
2218,
2187,
1524,
67,
1019,
2218,
72,
2187,
1524,
67,
4951,
2218,
2187,
3988,
33,
20,
4672,
3536,
4416,
3853,
316,
296,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1524,
67,
7094,
12,
3658,
16,
1950,
5103,
16,
1524,
67,
1518,
2218,
2187,
1524,
67,
1019,
2218,
72,
2187,
1524,
67,
4951,
2218,
2187,
3988,
33,
20,
4672,
3536,
4416,
3853,
316,
296,
39... |
coinc_tables.append_coinc(process_id, node.time_slide_id, coinc_def_id, ntuple) | coinc_tables.append_coinc(process_id, node, coinc_def_id, ntuple) | def ligolw_rinca( xmldoc, process_id, EventListType, CoincTables, coinc_definer_row, event_comparefunc, thresholds, ntuple_comparefunc = lambda events, offset_vector: False, small_coincs = False, veto_segments = None, verbose = False | 33c375988e5fbb955cb57c83b181ddc3e9420c4e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/33c375988e5fbb955cb57c83b181ddc3e9420c4e/ligolw_rinca.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16917,
355,
91,
67,
86,
267,
5353,
12,
2025,
2434,
16,
1207,
67,
350,
16,
2587,
19366,
16,
28932,
71,
6905,
16,
13170,
71,
67,
5649,
264,
67,
492,
16,
871,
67,
9877,
644,
16,
19983,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16917,
355,
91,
67,
86,
267,
5353,
12,
2025,
2434,
16,
1207,
67,
350,
16,
2587,
19366,
16,
28932,
71,
6905,
16,
13170,
71,
67,
5649,
264,
67,
492,
16,
871,
67,
9877,
644,
16,
19983,
... |
data.byteswap() | if big_endian: data.byteswap() | def writeframesraw(self, data): self._ensure_header_written(len(data)) nframes = len(data) / (self._sampwidth * self._nchannels) if self._convert: data = self._convert(data) if self._sampwidth > 1: import array data = array.array(_array_fmts[self._sampwidth], data) data.byteswap() data.tofile(self._file) self._datawritten = self._datawritten + len(data) * self._sampwidth else: self._file.write(data) self._datawritten = self._datawritten + len(data) self._nframeswritten = self._nframeswritten + nframes | 33577efee6ad54c8566f8cd66b5129fe1856c135 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/33577efee6ad54c8566f8cd66b5129fe1856c135/wave.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
10278,
1899,
12,
2890,
16,
501,
4672,
365,
6315,
15735,
67,
3374,
67,
9748,
12,
1897,
12,
892,
3719,
290,
10278,
273,
562,
12,
892,
13,
342,
261,
2890,
6315,
87,
931,
2819,
380,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10278,
1899,
12,
2890,
16,
501,
4672,
365,
6315,
15735,
67,
3374,
67,
9748,
12,
1897,
12,
892,
3719,
290,
10278,
273,
562,
12,
892,
13,
342,
261,
2890,
6315,
87,
931,
2819,
380,
... |
map = socket_map | map = self._map | def del_channel(self, map=None): fd = self._fileno if map is None: map = socket_map if map.has_key(fd): #self.log_info('closing channel %d:%s' % (fd, self)) del map[fd] | d7d53ce226231f47da1516ea2b83efce04ba0c7a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/d7d53ce226231f47da1516ea2b83efce04ba0c7a/asyncore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1464,
67,
4327,
12,
2890,
16,
852,
33,
7036,
4672,
5194,
273,
365,
6315,
7540,
5764,
309,
852,
353,
599,
30,
852,
273,
365,
6315,
1458,
309,
852,
18,
5332,
67,
856,
12,
8313,
4672,
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,
1464,
67,
4327,
12,
2890,
16,
852,
33,
7036,
4672,
5194,
273,
365,
6315,
7540,
5764,
309,
852,
353,
599,
30,
852,
273,
365,
6315,
1458,
309,
852,
18,
5332,
67,
856,
12,
8313,
4672,
4... |
raise ValueError, _('Not an interval spec: [+-] [ '[ | raise ValueError, self._('Not an interval spec:' ' [+-] [ | def set(self, spec, allowdate=1, interval_re=re.compile(''' \s*(?P<s>[-+])? # + or - \s*((?P<y>\d+\s*)y)? # year \s*((?P<m>\d+\s*)m)? # month \s*((?P<w>\d+\s*)w)? # week \s*((?P<d>\d+\s*)d)? # day \s*(((?P<H>\d+):(?P<M>\d+))?(:(?P<S>\d+))?)? # time \s*(?P<D> (\d\d\d\d[/-])?(\d\d?)?[/-](\d\d?)? # [yyyy-]mm-dd \.? # . (\d?\d:\d\d)?(:\d\d)? # hh:mm:ss )?''', re.VERBOSE), serialised_re=re.compile(''' (?P<s>[+-])?1?(?P<y>([ ]{3}\d|\d{4}))(?P<m>\d{2})(?P<d>\d{2}) (?P<H>\d{2})(?P<M>\d{2})(?P<S>\d{2})''', re.VERBOSE), add_granularity=0): ''' set the date to the value in spec ''' self.year = self.month = self.week = self.day = self.hour = \ self.minute = self.second = 0 self.sign = 1 m = serialised_re.match(spec) if not m: m = interval_re.match(spec) if not m: raise ValueError, _('Not an interval spec: [+-] [#y] [#m] [#w] ' '[#d] [[[H]H:MM]:SS] [date spec]') else: allowdate = 0 | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
12,
2890,
16,
857,
16,
1699,
712,
33,
21,
16,
3673,
67,
266,
33,
266,
18,
11100,
2668,
6309,
521,
87,
14,
3680,
52,
1,
18919,
15,
5717,
35,
540,
468,
397,
578,
300,
521,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
12,
2890,
16,
857,
16,
1699,
712,
33,
21,
16,
3673,
67,
266,
33,
266,
18,
11100,
2668,
6309,
521,
87,
14,
3680,
52,
1,
18919,
15,
5717,
35,
540,
468,
397,
578,
300,
521,
87,
... |
t = self.get_time() - self.t if self.dispatch[event](frame,t): self.t = self.get_time() else: self.t = self.get_time()-t | get_time = self.get_time t = get_time() - self.t if self.dispatch[event](self, frame,t): self.t = get_time() else: self.t = get_time() - t | def trace_dispatch_l(self, frame, event, arg): t = self.get_time() - self.t | bc75e8f6af740f0d3b26d6eeaa9a4428ce268142 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/bc75e8f6af740f0d3b26d6eeaa9a4428ce268142/profile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2606,
67,
10739,
67,
80,
12,
2890,
16,
2623,
16,
871,
16,
1501,
4672,
268,
273,
365,
18,
588,
67,
957,
1435,
300,
365,
18,
88,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2606,
67,
10739,
67,
80,
12,
2890,
16,
2623,
16,
871,
16,
1501,
4672,
268,
273,
365,
18,
588,
67,
957,
1435,
300,
365,
18,
88,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
</datafield> | </datafield> | def setUp(self): """Prepare some ideal outputs""" | e392a2b83cce91ef4d27622e150c5c79211c9eae /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/e392a2b83cce91ef4d27622e150c5c79211c9eae/bibformat_regression_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
3536,
7543,
2690,
23349,
6729,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
3536,
7543,
2690,
23349,
6729,
8395,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
wikipedia.output(fakedata.decode(self.site.encoding())) | def getCookie(self, api = config.use_api_login, remember=True, captcha = None): """ Login to the site. | fe2538f2b95b0327e60d625c5c352ac0d64ffb96 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/fe2538f2b95b0327e60d625c5c352ac0d64ffb96/login.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24643,
12,
2890,
16,
1536,
273,
642,
18,
1202,
67,
2425,
67,
5819,
16,
11586,
33,
5510,
16,
21083,
273,
599,
4672,
3536,
11744,
358,
326,
2834,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24643,
12,
2890,
16,
1536,
273,
642,
18,
1202,
67,
2425,
67,
5819,
16,
11586,
33,
5510,
16,
21083,
273,
599,
4672,
3536,
11744,
358,
326,
2834,
18,
2,
-100,
-100,
-100,
-100,
-100,
-10... | |
if self.browser is None: self.browser = WebBrowser(SIGNATURE, start = 1) self.browser.openfile(self.hits[i][1]) | path = self.hits[i][1] url = "file://" + "/".join(path.split(":")) webbrowser.open(url) | def listhit(self, isdbl = 1): if isdbl: for i in self.w.results.getselection(): if self.browser is None: self.browser = WebBrowser(SIGNATURE, start = 1) self.browser.openfile(self.hits[i][1]) | 098c24d1623b3e159a985711de5b9d4b7648128e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/098c24d1623b3e159a985711de5b9d4b7648128e/PyDocSearch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
15989,
12,
2890,
16,
353,
1966,
80,
273,
404,
4672,
309,
353,
1966,
80,
30,
364,
277,
316,
365,
18,
91,
18,
4717,
18,
588,
10705,
13332,
309,
365,
18,
11213,
353,
599,
30,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
15989,
12,
2890,
16,
353,
1966,
80,
273,
404,
4672,
309,
353,
1966,
80,
30,
364,
277,
316,
365,
18,
91,
18,
4717,
18,
588,
10705,
13332,
309,
365,
18,
11213,
353,
599,
30,
365,
... |
logger.Error("Can't change syncer rate: %s " % result.fail_reason) | logger.Error("Can't change syncer rate: %s - %s" % (result.fail_reason, result.output)) | def SetSyncSpeed(self, kbytes): """Set the speed of the DRBD syncer. | 6c896e2ffcdf4889279d9b6607e23d61bab96bc4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/6c896e2ffcdf4889279d9b6607e23d61bab96bc4/bdev.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
4047,
16562,
12,
2890,
16,
417,
3890,
4672,
3536,
694,
326,
8632,
434,
326,
16801,
18096,
3792,
264,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
4047,
16562,
12,
2890,
16,
417,
3890,
4672,
3536,
694,
326,
8632,
434,
326,
16801,
18096,
3792,
264,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
html.write("<td colspan=%d>" % colspan) | html.write("<td>") | def show_painter_options(painter_options, colspan): html.write('<tr class=form id=painter_options style="display: none">') html.write("<td colspan=%d>" % colspan) html.begin_form("painteroptions") html.write("<div class=whiteborder>\n") html.write("<table class=form>\n") for on in painter_options: opt = multisite_painter_options[on] html.write("<tr>") html.write("<td class=legend>%s</td>" % opt["title"]) html.write("<td class=content>") html.select(on, opt["values"], opt["default"], "submit();" ) html.write("</td></tr>\n") html.write("</table>\n") html.hidden_fields() html.end_form() html.write("</div>") html.write("</td></tr>\n") | 5988dc68b2c4439ac451c483e6643ca4800ad36f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5589/5988dc68b2c4439ac451c483e6643ca4800ad36f/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
67,
84,
11606,
67,
2116,
12,
84,
11606,
67,
2116,
16,
20856,
4672,
1729,
18,
2626,
2668,
32,
313,
667,
33,
687,
612,
33,
84,
11606,
67,
2116,
2154,
1546,
5417,
30,
6555,
7918,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
67,
84,
11606,
67,
2116,
12,
84,
11606,
67,
2116,
16,
20856,
4672,
1729,
18,
2626,
2668,
32,
313,
667,
33,
687,
612,
33,
84,
11606,
67,
2116,
2154,
1546,
5417,
30,
6555,
7918,
... |
elif resp == gtk.RESPONSE_NO: return False else: return True | elif resp == gtk.RESPONSE_NO: FileSelector.rescan(fs) else: nb.grab_focus() return True | def __pre_selection_changed(self, view, event): if self.__save: resp = qltk.CancelRevertSave(self).run() if resp == gtk.RESPONSE_YES: self.__save.clicked() elif resp == gtk.RESPONSE_NO: return False else: return True # cancel or closed | be0506067aa91b17bf184969b2a12bc38b5f72ed /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4764/be0506067aa91b17bf184969b2a12bc38b5f72ed/exfalsowindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1484,
67,
10705,
67,
6703,
12,
2890,
16,
1476,
16,
871,
4672,
309,
365,
16186,
5688,
30,
1718,
273,
1043,
5618,
79,
18,
6691,
426,
1097,
4755,
12,
2890,
2934,
2681,
1435,
309,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1484,
67,
10705,
67,
6703,
12,
2890,
16,
1476,
16,
871,
4672,
309,
365,
16186,
5688,
30,
1718,
273,
1043,
5618,
79,
18,
6691,
426,
1097,
4755,
12,
2890,
2934,
2681,
1435,
309,
17... |
raise Errors.YumBaseError("Error: " + e.message) | if sys.hexversion < 0x02050000: if hasattr(e,'message'): raise Errors.YumBaseError("Error: " + str(e.message)) else: raise Errors.YumBaseError("Error: " + str(e)) raise Errors.YumBaseError("Error: " + str(e)) | def _getsysver(installroot, distroverpkg): '''Calculate the release version for the system. @param installroot: The value of the installroot option. @param distroverpkg: The value of the distroverpkg option. @return: The release version as a string (eg. '4' for FC4) ''' ts = rpmUtils.transaction.initReadOnlyTransaction(root=installroot) ts.pushVSFlags(~(rpm._RPMVSF_NOSIGNATURES|rpm._RPMVSF_NODIGESTS)) try: idx = ts.dbMatch('provides', distroverpkg) except TypeError, e: # This is code for "cannot open rpmdb" raise Errors.YumBaseError("Error: " + e.message) # we're going to take the first one - if there is more than one of these # then the user needs a beating if idx.count() == 0: releasever = '$releasever' else: hdr = idx.next() releasever = hdr['version'] del hdr del idx del ts return releasever | 705ae2132f469037b9a77459aeab18a23fc08dd1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5445/705ae2132f469037b9a77459aeab18a23fc08dd1/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
9499,
502,
12,
5425,
3085,
16,
27450,
502,
10657,
4672,
9163,
8695,
326,
3992,
1177,
364,
326,
2619,
18,
225,
632,
891,
3799,
3085,
30,
1021,
460,
434,
326,
3799,
3085,
1456,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
9499,
502,
12,
5425,
3085,
16,
27450,
502,
10657,
4672,
9163,
8695,
326,
3992,
1177,
364,
326,
2619,
18,
225,
632,
891,
3799,
3085,
30,
1021,
460,
434,
326,
3799,
3085,
1456,
... |
""" <directives namespace="http://namespaces.zope.org/zope"> <directive name="permission" attributes="id title description" handler=" zope.app.security.metaconfigure.definePermission" /> </directives> | ''' <include package="zope.app.security" file="meta.zcml" /> | def testProtectedNamedViewPageViews(self): self.assertEqual(queryView(ob, 'test', request), None) | 1cfc7ddd1cac0110cca3e909215477e1c59bbca3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9523/1cfc7ddd1cac0110cca3e909215477e1c59bbca3/test_directives.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
15933,
7604,
1767,
1964,
9959,
12,
2890,
4672,
365,
18,
11231,
5812,
12,
2271,
1767,
12,
947,
16,
296,
3813,
2187,
590,
3631,
599,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
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,
15933,
7604,
1767,
1964,
9959,
12,
2890,
4672,
365,
18,
11231,
5812,
12,
2271,
1767,
12,
947,
16,
296,
3813,
2187,
590,
3631,
599,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.respond("500 Unrecognized command.") | self.respond("501 Unrecognized command.") | def ftp_HELP(self, line): """Return help text to the client.""" | bc6e6f5a24c367c3544c75d935b0eb4264088117 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3782/bc6e6f5a24c367c3544c75d935b0eb4264088117/ftpserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13487,
67,
27396,
12,
2890,
16,
980,
4672,
3536,
990,
2809,
977,
358,
326,
1004,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
13487,
67,
27396,
12,
2890,
16,
980,
4672,
3536,
990,
2809,
977,
358,
326,
1004,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
DEBUG_ORIENTATION = True | def modify(self, group, ladderEndAxisAtom, numberOfBasePairs, basesPerTurn, duplexRise, endPoint1, endPoint2 ): """ AVAILABLE AS A DEBUG PREFERENCE ONLY AS OF 2008-03-24. NEED CLEANUP , LOTS OF DOCUMENTATION AND RENAMING. """ self.assy = group.assy assy = group.assy #Make sure to clear self.baseList each time self.make() is called self.baseList = [] | c4a8d077f70d55111f7a19ce7efa485e92728f66 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/c4a8d077f70d55111f7a19ce7efa485e92728f66/DnaDuplex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5612,
12,
2890,
16,
1041,
16,
328,
361,
765,
1638,
6558,
3641,
16,
7922,
2171,
10409,
16,
8337,
2173,
15858,
16,
302,
2268,
92,
54,
784,
16,
19849,
21,
16,
19849,
22,
262,
30,
3536,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5612,
12,
2890,
16,
1041,
16,
328,
361,
765,
1638,
6558,
3641,
16,
7922,
2171,
10409,
16,
8337,
2173,
15858,
16,
302,
2268,
92,
54,
784,
16,
19849,
21,
16,
19849,
22,
262,
30,
3536,
... | |
(rc,u) = semanage_user_create(self.sh) | (rc, u) = semanage_user_create(self.sh) | def __add(self, name, roles, selevel, serange, prefix): if is_mls_enabled == 1: if serange == "": serange = "s0" else: serange = untranslate(serange) if selevel == "": selevel = "s0" else: selevel = untranslate(selevel) if len(roles) < 1: raise ValueError(_("You must add at least one role for %s") % name) (rc,k) = semanage_user_key_create(self.sh, name) if rc < 0: raise ValueError(_("Could not create a key for %s") % name) | 8ad29a27255b6eb5a4f8e1083ce9832034f3e205 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7147/8ad29a27255b6eb5a4f8e1083ce9832034f3e205/seobject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1289,
12,
2890,
16,
508,
16,
4900,
16,
357,
73,
941,
16,
703,
726,
16,
1633,
4672,
309,
353,
67,
781,
87,
67,
5745,
422,
404,
30,
309,
703,
726,
422,
1408,
30,
703,
726,
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,
1001,
1289,
12,
2890,
16,
508,
16,
4900,
16,
357,
73,
941,
16,
703,
726,
16,
1633,
4672,
309,
353,
67,
781,
87,
67,
5745,
422,
404,
30,
309,
703,
726,
422,
1408,
30,
703,
726,
273,... |
pass | """ Handle the POST method. Send the head and the file. But ignore the POST params. Use the bistreams for a better analysis. """ x = self.send_head() if x : self.copyfile(x) | def handle_POST(self): pass | 6503db549e45c7b35361eac9e4aa36af968eb65e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8801/6503db549e45c7b35361eac9e4aa36af968eb65e/http.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
3798,
12,
2890,
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,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
3798,
12,
2890,
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,
-100,
-100,
-10... |
else: self.parse(connection.getfile().readlines()) | _debug("allow all") elif self.errcode == 200 and lines: _debug("parse lines") self.parse(lines) | def read(self): import httplib tries = 0 while tries<5: connection = httplib.HTTP(self.host) connection.putrequest("GET", self.path) connection.putheader("Host", self.host) connection.endheaders() status, text, mime = connection.getreply() if status in [301,302] and mime: tries = tries + 1 newurl = mime.get("Location", mime.get("Uri", "")) newurl = urlparse.urljoin(self.url, newurl) self.set_url(newurl) else: break if status==401 or status==403: self.disallow_all = 1 elif status>=400: self.allow_all = 1 else: # status < 400 self.parse(connection.getfile().readlines()) | a4da0263739b0f1a95d34e7acaf3e6b7a1a0fd5e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a4da0263739b0f1a95d34e7acaf3e6b7a1a0fd5e/robotparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
4672,
1930,
15851,
6673,
9327,
273,
374,
1323,
9327,
32,
25,
30,
1459,
273,
15851,
6673,
18,
3693,
12,
2890,
18,
2564,
13,
1459,
18,
458,
2293,
2932,
3264,
3113,
365,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
4672,
1930,
15851,
6673,
9327,
273,
374,
1323,
9327,
32,
25,
30,
1459,
273,
15851,
6673,
18,
3693,
12,
2890,
18,
2564,
13,
1459,
18,
458,
2293,
2932,
3264,
3113,
365,
18... |
def visit_admonition(self, node, name): | def visit_admonition(self, node, name=''): | def visit_admonition(self, node, name): self.body.append('\\begin{center}\\begin{sffamily}\n') self.body.append('\\fbox{\\parbox{\\admonitionwidth}{\n') self.body.append('\\textbf{\\large '+ self.language.labels[name] + '}\n'); self.body.append('\\vspace{2mm}\n') | 8b5bf758f1bc30137cc4e548f5fd8e129819b722 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/8b5bf758f1bc30137cc4e548f5fd8e129819b722/latex2e.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
361,
2586,
608,
12,
2890,
16,
756,
16,
508,
2218,
11,
4672,
365,
18,
3432,
18,
6923,
2668,
1695,
10086,
95,
5693,
97,
1695,
10086,
95,
87,
1403,
3954,
6280,
82,
6134,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
361,
2586,
608,
12,
2890,
16,
756,
16,
508,
2218,
11,
4672,
365,
18,
3432,
18,
6923,
2668,
1695,
10086,
95,
5693,
97,
1695,
10086,
95,
87,
1403,
3954,
6280,
82,
6134,
365,
... |
gLogger.verbose("ReplicaManager.__initializeReplication: Determining whether source Storage Element is sane.") | gLogger.verbose( "ReplicaManager.__initializeReplication: Determining whether source Storage Element is sane." ) | def __initializeReplication(self,lfn,sourceSE,destSE): ########################################################### # Check that the destination storage element is sane and resolve its name gLogger.verbose("ReplicaManager.__initializeReplication: Verifying destination Storage Element validity (%s)." % destSE) destStorageElement = StorageElement(destSE) res = destStorageElement.isValid() if not res['OK']: errStr = "ReplicaManager.__initializeReplication: The storage element is not currently valid." gLogger.error(errStr,"%s %s" % (destSE,res['Message'])) return S_ERROR(errStr) destSE = destStorageElement.getStorageElementName()['Value'] gLogger.info("ReplicaManager.__initializeReplication: Destination Storage Element verified.") ########################################################### # Get the LFN replicas from the file catalogue gLogger.verbose("ReplicaManager.__initializeReplication: Attempting to obtain replicas for %s." % lfn) res = self.fileCatalogue.getReplicas(lfn) if not res['OK']: errStr = "ReplicaManager.__initializeReplication: Completely failed to get replicas for LFN." gLogger.error(errStr,"%s %s" % (lfn,res['Message'])) return res if not res['Value']['Successful'].has_key(lfn): errStr = "ReplicaManager.__initializeReplication: Failed to get replicas for LFN." gLogger.error(errStr,"%s %s" % (lfn,res['Value']['Failed'][lfn])) return S_ERROR("%s %s" % (errStr,res['Value']['Failed'][lfn])) gLogger.info("ReplicaManager.__initializeReplication: Successfully obtained replicas for LFN.") lfnReplicas = res['Value']['Successful'][lfn] ########################################################### # If the file catalogue size is zero fail the transfer gLogger.verbose("ReplicaManager.__initializeReplication: Attempting to obtain size for %s." % lfn) res = self.fileCatalogue.getFileSize(lfn) if not res['OK']: errStr = "ReplicaManager.__initializeReplication: Completely failed to get size for LFN." gLogger.error(errStr,"%s %s" % (lfn,res['Message'])) return res if not res['Value']['Successful'].has_key(lfn): errStr = "ReplicaManager.__initializeReplication: Failed to get size for LFN." gLogger.error(errStr,"%s %s" % (lfn,res['Value']['Failed'][lfn])) return S_ERROR("%s %s" % (errStr,res['Value']['Failed'][lfn])) catalogueSize = res['Value']['Successful'][lfn] if catalogueSize == 0: errStr = "ReplicaManager.__initializeReplication: Registered file size is 0." gLogger.error(errStr,lfn) return S_ERROR(errStr) gLogger.info("ReplicaManager.__initializeReplication: File size determined to be %s." % catalogueSize) ########################################################### # Check whether the destination storage element is banned gLogger.verbose("ReplicaManager.__initializeReplication: Determining whether %s is banned." % destSE) configStr = '/Resources/StorageElements/BannedTarget' bannedTargets = gConfig.getValue(configStr,[]) if destSE in bannedTargets: infoStr = "ReplicaManager.__initializeReplication: Destination Storage Element is currently banned." gLogger.info(infoStr,destSE) return S_ERROR(infoStr) gLogger.info("ReplicaManager.__initializeReplication: Destination site not banned.") ########################################################### # Check whether the supplied source SE is sane gLogger.verbose("ReplicaManager.__initializeReplication: Determining whether source Storage Element is sane.") configStr = '/Resources/StorageElements/BannedSource' bannedSources = gConfig.getValue(configStr,[]) if sourceSE: if not lfnReplicas.has_key(sourceSE): errStr = "ReplicaManager.__initializeReplication: LFN does not exist at supplied source SE." gLogger.error(errStr,"%s %s" % (lfn,sourceSE)) return S_ERROR(errStr) elif sourceSE in bannedSources: infoStr = "ReplicaManager.__initializeReplication: Supplied source Storage Element is currently banned." gLogger.info(infoStr,sourceSE) return S_ERROR(errStr) gLogger.info("ReplicaManager.__initializeReplication: Replication initialization successful.") resDict = {'DestStorage':destStorageElement,'DestSE':destSE,'Replicas':lfnReplicas,'CatalogueSize':catalogueSize} return S_OK(resDict) | 9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
11160,
8309,
12,
2890,
16,
80,
4293,
16,
3168,
1090,
16,
10488,
1090,
4672,
19709,
5516,
3228,
1189,
468,
2073,
716,
326,
2929,
2502,
930,
353,
30426,
471,
2245,
2097,
508,
314,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
11160,
8309,
12,
2890,
16,
80,
4293,
16,
3168,
1090,
16,
10488,
1090,
4672,
19709,
5516,
3228,
1189,
468,
2073,
716,
326,
2929,
2502,
930,
353,
30426,
471,
2245,
2097,
508,
314,
33... |
"""Extract the doctest examples from a docstring. | """Extract the test sources from a doctest test docstring as a script | def testsource(module, name): """Extract the doctest examples from a docstring. Provide the module (or dotted name of the module) containing the tests to be extracted, and the name (within the module) of the object with the docstring containing the tests to be extracted. The doctest examples are returned as a string containing Python code. The expected output blocks in the examples are converted to Python comments. """ module = _normalize_module(module) tests = _find_tests(module, "") test = [doc for (tname, doc, dummy, dummy) in tests if tname == name] if not test: raise ValueError(name, "not found in tests") test = test[0] examples = [source + _expect(expect) for source, expect, dummy in _extract_examples(test)] return '\n'.join(examples) | a6afa35755a4baa401905be750203fee48f42bb3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/a6afa35755a4baa401905be750203fee48f42bb3/doctest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
3168,
12,
2978,
16,
508,
4672,
3536,
4976,
326,
1842,
5550,
628,
279,
31263,
395,
1842,
14525,
487,
279,
2728,
225,
26569,
326,
1605,
261,
280,
20965,
508,
434,
326,
1605,
13,
4191... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3168,
12,
2978,
16,
508,
4672,
3536,
4976,
326,
1842,
5550,
628,
279,
31263,
395,
1842,
14525,
487,
279,
2728,
225,
26569,
326,
1605,
261,
280,
20965,
508,
434,
326,
1605,
13,
4191... |
self.text.insert(mark, str(s), tags) | self.text.insert(mark, s, tags) | def write(self, s, tags=(), mark="insert"): self.text.insert(mark, str(s), tags) self.text.see(mark) self.text.update() | 7f4d1fe69940ee2edc0aa012cf68ab325ba8f4d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7f4d1fe69940ee2edc0aa012cf68ab325ba8f4d6/OutputWindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
272,
16,
2342,
33,
9334,
2267,
1546,
6387,
6,
4672,
365,
18,
955,
18,
6387,
12,
3355,
16,
272,
16,
2342,
13,
365,
18,
955,
18,
5946,
12,
3355,
13,
365,
18,
955,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
272,
16,
2342,
33,
9334,
2267,
1546,
6387,
6,
4672,
365,
18,
955,
18,
6387,
12,
3355,
16,
272,
16,
2342,
13,
365,
18,
955,
18,
5946,
12,
3355,
13,
365,
18,
955,... |
self.tk.call(self._w, 'popup') | self.tk.call(self._w, 'popup') | def popup(self): | b0e44d61d9e592e1acd6aa05eac9704ba5776f61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b0e44d61d9e592e1acd6aa05eac9704ba5776f61/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10431,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10431,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
msg = IncomingMessage(connection=message.conection, text=message.text, | msg = IncomingMessage(connection=message.connection, text=message.text, | def handle(self, message): # make and save messages on their way in and # cast backend as string so pysqlite doesnt complain msg = IncomingMessage(connection=message.conection, text=message.text, received=message.received) msg.save() self.debug(msg) | be79714148dda55b351e22e36df490ea50e946e6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11809/be79714148dda55b351e22e36df490ea50e946e6/app.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
12,
2890,
16,
883,
4672,
468,
1221,
471,
1923,
2743,
603,
3675,
4031,
316,
471,
468,
4812,
4221,
487,
533,
1427,
293,
5308,
1137,
31272,
532,
7446,
1234,
273,
26437,
1079,
12,
4071... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
2890,
16,
883,
4672,
468,
1221,
471,
1923,
2743,
603,
3675,
4031,
316,
471,
468,
4812,
4221,
487,
533,
1427,
293,
5308,
1137,
31272,
532,
7446,
1234,
273,
26437,
1079,
12,
4071... |
ParserElement.exprArgCache.clear() | ParserElement.resetCache() | def parseString( self, instring ): """Execute the parse expression with the given string. This is the main interface to the client code, once the complete expression has been built. """ ParserElement.exprArgCache.clear() if not self.streamlined: self.streamline() self.saveAsList = True for e in self.ignoreExprs: e.streamline() if self.keepTabs: loc, tokens = self.parse( instring, 0 ) else: loc, tokens = self.parse( instring.expandtabs(), 0 ) return tokens | cf270a876802009d82e8d28923bdd6b889a1f506 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3693/cf270a876802009d82e8d28923bdd6b889a1f506/pyparsing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23659,
12,
365,
16,
316,
1080,
262,
30,
3536,
5289,
326,
1109,
2652,
598,
326,
864,
533,
18,
1220,
353,
326,
2774,
1560,
358,
326,
1004,
981,
16,
3647,
326,
3912,
2652,
711,
2118,
6650... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23659,
12,
365,
16,
316,
1080,
262,
30,
3536,
5289,
326,
1109,
2652,
598,
326,
864,
533,
18,
1220,
353,
326,
2774,
1560,
358,
326,
1004,
981,
16,
3647,
326,
3912,
2652,
711,
2118,
6650... |
def DelStrucMember(id, member_offset): | def DelStrucMember(sid, member_offset): | def DelStrucMember(id, member_offset): """ Delete structure member @param id: structure type ID @param member_offset: offset of the member @return: != 0 - ok. @note: IDA allows 'holes' between members of a structure. It treats these 'holes' as unnamed arrays of bytes. """ s = idaapi.get_struc(id) if not s: return 0 return idaapi.del_struc_member(s, member_offset) | 244a3cd02a580c0095170004ec30e922f0d1a8a6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6984/244a3cd02a580c0095170004ec30e922f0d1a8a6/idc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6603,
1585,
5286,
4419,
12,
7453,
16,
3140,
67,
3348,
4672,
3536,
2504,
3695,
3140,
225,
632,
891,
612,
30,
3695,
618,
1599,
632,
891,
3140,
67,
3348,
30,
1384,
434,
326,
3140,
225,
63... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6603,
1585,
5286,
4419,
12,
7453,
16,
3140,
67,
3348,
4672,
3536,
2504,
3695,
3140,
225,
632,
891,
612,
30,
3695,
618,
1599,
632,
891,
3140,
67,
3348,
30,
1384,
434,
326,
3140,
225,
63... |
self.log.debug("self.jobDB.setJobAttribute(%s,'MinorStatus','%s',update=True)" %(job,minorstatus)) | self.log.verbose("self.jobDB.setJobAttribute(%s,'MinorStatus','%s',update=True)" %(job,minorstatus)) | def updateJobStatus(self,job,status,minorstatus=None): """This method updates the job status in the JobDB, this should only be used to fail jobs due to the optimizer chain. """ self.log.debug("self.jobDB.setJobAttribute(%s,'Status','%s',update=True)" %(job,status)) if self.enable: result = self.jobDB.setJobAttribute(job,'Status',status, update=True) else: result = S_OK('DisabledMode') | 8dc7639e7c774fafc62439e538b06f48265c0f07 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/8dc7639e7c774fafc62439e538b06f48265c0f07/Optimizer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
23422,
12,
2890,
16,
4688,
16,
2327,
16,
17364,
2327,
33,
7036,
4672,
3536,
2503,
707,
4533,
326,
1719,
1267,
316,
326,
3956,
2290,
16,
333,
1410,
1338,
506,
1399,
358,
2321,
6550,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
23422,
12,
2890,
16,
4688,
16,
2327,
16,
17364,
2327,
33,
7036,
4672,
3536,
2503,
707,
4533,
326,
1719,
1267,
316,
326,
3956,
2290,
16,
333,
1410,
1338,
506,
1399,
358,
2321,
6550,... |
def GetPositionFromLine(line): | def GetPositionFromLine(self, line): | def GetPositionFromLine(line): return self.XYToPosition(0,line) | b6176ab7222945e5a5e113c60b7280d3214c106e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/b6176ab7222945e5a5e113c60b7280d3214c106e/Main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
2555,
1265,
1670,
12,
2890,
16,
980,
4672,
327,
365,
18,
8546,
774,
2555,
12,
20,
16,
1369,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
2555,
1265,
1670,
12,
2890,
16,
980,
4672,
327,
365,
18,
8546,
774,
2555,
12,
20,
16,
1369,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
def removeRelation(self, node, next, quiet=0): | def removeRelation(self, node, next): | def removeRelation(self, node, next, quiet=0): """Drop the "RpmPackage node requires RpmPackage next" arc.""" #if not quiet: # txt = "Removing" # if self[node].pre[next]: # txt = "Zapping" # print "%s requires for %s from %s" % \ # (txt, next.getNEVRA(), node.getNEVRA())) del self[node].pre[next] del self[next].post[node] | e88bd7c78ae123c185f17919515d68d29510e836 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1143/e88bd7c78ae123c185f17919515d68d29510e836/oldpyrpm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
3963,
12,
2890,
16,
756,
16,
1024,
4672,
3536,
7544,
326,
315,
54,
7755,
2261,
756,
4991,
534,
7755,
2261,
1024,
6,
8028,
12123,
468,
430,
486,
10902,
30,
468,
565,
6463,
273,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
3963,
12,
2890,
16,
756,
16,
1024,
4672,
3536,
7544,
326,
315,
54,
7755,
2261,
756,
4991,
534,
7755,
2261,
1024,
6,
8028,
12123,
468,
430,
486,
10902,
30,
468,
565,
6463,
273,
31... |
(self.name,self.unit) | (self.name,self.unit)) | def rfc2426(self): return rfc2425encode("org","%s;%s" % (self.name,self.unit) | 9f926fea99081b163ba5fe9e0140265ee4648f78 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12769/9f926fea99081b163ba5fe9e0140265ee4648f78/vcard.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16590,
3247,
5558,
12,
2890,
4672,
327,
16590,
3247,
2947,
3015,
2932,
3341,
15937,
9,
87,
31,
9,
87,
6,
738,
261,
2890,
18,
529,
16,
2890,
18,
4873,
13,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16590,
3247,
5558,
12,
2890,
4672,
327,
16590,
3247,
2947,
3015,
2932,
3341,
15937,
9,
87,
31,
9,
87,
6,
738,
261,
2890,
18,
529,
16,
2890,
18,
4873,
13,
2,
-100,
-100,
-100,
-100,
-... |
try: str(u'Hello \u00E1') except Exception, e: sampleUnicodeEncodeError = e try: unicode('\xff') except Exception, e: sampleUnicodeDecodeError = e | def testAttributes(self): # test that exception attributes are happy try: str(u'Hello \u00E1') except Exception, e: sampleUnicodeEncodeError = e | ecab623e1315cd0cfbe01e046e618001fe315490 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ecab623e1315cd0cfbe01e046e618001fe315490/test_exceptions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
2498,
12,
2890,
4672,
468,
1842,
716,
1520,
1677,
854,
5622,
2074,
775,
30,
609,
12,
89,
11,
18601,
521,
89,
713,
41,
21,
6134,
1335,
1185,
16,
425,
30,
3296,
16532,
5509,
668,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
2498,
12,
2890,
4672,
468,
1842,
716,
1520,
1677,
854,
5622,
2074,
775,
30,
609,
12,
89,
11,
18601,
521,
89,
713,
41,
21,
6134,
1335,
1185,
16,
425,
30,
3296,
16532,
5509,
668,
... | |
def __init__(self, root, flist, stack=None): self.top = top = ListedToplevel(root) top.protocol("WM_DELETE_WINDOW", self.close) top.bind("<Key-Escape>", self.close) top.wm_title("Stack viewer") top.wm_iconname("Stack") self.helplabel = Label(top, text="Click once to view variables; twice for source", borderwidth=2, relief="groove") self.helplabel.pack(fill="x") self.sv = StackViewer(top, flist, self) if stack is None: stack = get_stack() self.sv.load_stack(stack) | def __init__(self, flist=None): self.flist = flist self.stack = get_stack() self.text = get_exception() | def __init__(self, root, flist, stack=None): self.top = top = ListedToplevel(root) top.protocol("WM_DELETE_WINDOW", self.close) top.bind("<Key-Escape>", self.close) top.wm_title("Stack viewer") top.wm_iconname("Stack") # Create help label self.helplabel = Label(top, text="Click once to view variables; twice for source", borderwidth=2, relief="groove") self.helplabel.pack(fill="x") # self.sv = StackViewer(top, flist, self) if stack is None: stack = get_stack() self.sv.load_stack(stack) | db595cd40700f5e452c6e43b4a4422365567aba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/db595cd40700f5e452c6e43b4a4422365567aba7/StackViewer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1365,
16,
284,
1098,
16,
2110,
33,
7036,
4672,
365,
18,
3669,
273,
1760,
273,
987,
329,
3401,
2815,
12,
3085,
13,
1760,
18,
8373,
2932,
25173,
67,
6460,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1365,
16,
284,
1098,
16,
2110,
33,
7036,
4672,
365,
18,
3669,
273,
1760,
273,
987,
329,
3401,
2815,
12,
3085,
13,
1760,
18,
8373,
2932,
25173,
67,
6460,
... |
print 'no cumplioooo: ',no_cump | def procesar_producto(self, cr, uid, ids, prod_id, Dict, loc_ids, inter_loc_ids, prod_loc_ids, pending=False): ''' Concepto de prueba de Humberto Arocha para procesamiento recursivo de de stock card line ''' rpp_obj = self.pool.get('report.profit.picking') sc_line_obj = self.pool.get('stock.card.line') product = Dict[prod_id] sml_x_pd_id = product['sml'] no_cump = product['no_cump'] total = product['total'] avg = product['avg'] qda = product['qda'] cont = product['cont'] seq = product['seq'] def_code = self.pool.get('product.product').browse(cr,uid,prod_id).default_code.strip() if pending: print '@'*10 print 'procesando: ',self.pool.get('product.product').browse(cr,uid,prod_id).name #~ time.sleep(10) while sml_x_pd_id: sml_id = sml_x_pd_id.pop(0) value={} if not cont: cont = True q = 0.0 subtotal = 0.0 qda = 0.0 #se debe buscar el costo inicial cr.execute('SELECT standard_price,product_qty FROM lst_cost ' \ 'WHERE default_code=%s', (def_code,)) res = cr.fetchall() if res and res[0][1]: print 'encontre costo inicccc' avg,q = res[0] else: rpp = rpp_obj.browse(cr,uid,sml_id) if rpp.location_dest_id.id == loc_ids and rpp.invoice_id.type == 'in_invoice': q = rpp.picking_qty print 'cantidad inicialxxxxx: ',q avg = rpp.invoice_price_unit else: no_cump.append(sml_id) continue #avg = 1430.96 #q = 5.0 print 'cantidad inicial: ',q print 'costo inicial: ',avg total = avg*q subtotal = avg*q qda = q seq += 1 value = { 'subtotal':subtotal, 'total':total, 'avg':avg, 'stk_bef_cor':0.0, 'stk_aft_cor':qda, 'sequence':seq } scl_id = sc_line_obj.search(cr, uid, [('stk_mov_id','=',sml_id)]) sc_line_obj.write(cr, uid, scl_id, value) print 'q inicial: ',q print 'avg: ',avg print 'qda inicial: ',qda print 'seq inicial: ',seq else: rpp = rpp_obj.browse(cr,uid,sml_id) q = rpp.picking_qty scl_id = sc_line_obj.search(cr, uid, [('stk_mov_id','=',sml_id)]) scl = sc_line_obj.browse(cr,uid,scl_id)[0] print 'viene operac: ',sml_id print 'packing: ',rpp.picking_id.name print 'seq antes operac: ',seq #VENTA if rpp.location_id.id == loc_ids and rpp.invoice_id.type == 'out_invoice': print 'validando VENTA:' qda,total,avg,no_cump,seq= \ self.validate_venta(cr, uid, ids,scl,q,total,avg,qda,no_cump,sml_x_pd_id,sml_id,seq) print 'seq despues operac: ',seq #NC COMPRA if rpp.location_id.id == loc_ids and (rpp.invoice_id.type == 'in_refund' or rpp.invoice_id.type == 'in_invoice'): print 'validando NC compra:' qda,total,avg,no_cump,seq= \ self.validate_nc_compra(cr,uid,ids,scl,q,total,avg,qda,no_cump,sml_x_pd_id,sml_id,seq) print 'seq despues operac: ',seq #COMPRA if rpp.location_dest_id.id == loc_ids and rpp.invoice_id.type == 'in_invoice': print 'procesooo compra:' q_bef = qda qda,subtotal,total,avg = self.compute_compra(cr, uid, ids,scl,q,total,avg,qda) #REALIZAR EL WRITE DE LA LINEA value = { 'subtotal':subtotal, 'total':total, 'avg':avg, 'stk_bef_cor':q_bef, 'stk_aft_cor':qda } seq=self.write_data(cr, uid, ids, scl.id, value, seq) print 'seq despues operac: ',seq if no_cump: print 'agregando nuevamente las vta:' #no_cump.append(sml_id) no_cump.extend(sml_x_pd_id) print 'no cumplioooo: ',no_cump sml_x_pd_id = no_cump print 'nueva listaaa: ',sml_x_pd_id no_cump = [] #NC VENTA if rpp.location_dest_id.id == loc_ids and rpp.invoice_id.type == 'out_refund': print 'validando NC VENTA:' qda,total,avg,no_cump,seq= \ self.validate_nc_vta(cr, uid, ids,scl,q,total,avg,qda,no_cump,sml_x_pd_id,sml_id,seq) print 'seq despues operac: ',seq if no_cump and not scl.parent_id: print 'agregando nuevamente los movimientos:' #no_cump.append(sml_id) no_cump.extend(sml_x_pd_id) print 'no cumplioooo: ',no_cump sml_x_pd_id = no_cump print 'nueva listaaa: ',sml_x_pd_id no_cump = [] #DESTINO USO INTERNO if rpp.location_id.id == loc_ids and rpp.location_dest_id.id == inter_loc_ids: print 'validando USO INTERNO:' #fixme blanquear la variables de cuenta #acc_src = None #acc_dest = None qda,total,avg,no_cump,seq= \ self.validate_venta(cr, uid, ids,scl,q,total,avg,qda,no_cump,sml_x_pd_id,sml_id,seq) print 'seq despues operac: ',seq valores = {} if not (rpp.aml_cost_id or rpp.aml_inv_id): move = scl.stk_mov_id acc_src = move.product_id.product_tmpl_id.\ property_stock_account_output.id if move.location_dest_id.account_id: acc_dest = move.location_dest_id.account_id.id acc_mov_id = self.write_aml(cr, uid, ids, scl, q, avg, acc_src, acc_dest) acc_mov_obj = self.pool.get('account.move').browse(cr,uid,acc_mov_id) for aml in acc_mov_obj.line_id: valores.update({ 'aml_cost_qty':aml.quantity or 0.0, 'aml_cost_price_unit':avg, 'aml_inv_qty':aml.quantity or 0.0, 'aml_inv_price_unit':avg}) if aml.debit: valores.update({'aml_cost_id':aml.id}) if aml.credit: valores.update({'aml_inv_id':aml.id}) sc_line_obj.write(cr, uid, scl.id, valores) #~ else: #~ id1=scl.aml_cost_id.id #~ id2=scl.aml_inv_id.id #~ if not scl.aml_cost_id.credit: #~ valores.update({'aml_cost_id':id2, 'aml_inv_id':id1}) #~ sc_line_obj.write(cr, uid, scl.id, valores) #~ #DESTINO PROCESAMIENTO if rpp.location_id.id == loc_ids and rpp.location_dest_id.id == prod_loc_ids: print 'validando PROCESAMIENTO:' #fixme blanquear la variables de cuenta #acc_src = None #acc_dest = None qda,total,avg,no_cump,seq= \ self.validate_venta(cr, uid, ids,scl,q,total,avg,qda,no_cump,sml_x_pd_id,sml_id,seq) print 'seq despues operac: ',seq valores = {} if not (rpp.aml_cost_id or rpp.aml_inv_id): move = scl.stk_mov_id acc_src = move.product_id.product_tmpl_id.\ property_stock_account_output.id if move.location_dest_id.account_id: acc_dest = move.location_dest_id.account_id.id | 62ca858ba796453e95db5d16001d237fb203c2e9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7359/62ca858ba796453e95db5d16001d237fb203c2e9/stock_card.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
450,
764,
297,
67,
5896,
83,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
10791,
67,
350,
16,
9696,
16,
1515,
67,
2232,
16,
1554,
67,
1829,
67,
2232,
16,
10791,
67,
1829,
67,
2232,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
450,
764,
297,
67,
5896,
83,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
10791,
67,
350,
16,
9696,
16,
1515,
67,
2232,
16,
1554,
67,
1829,
67,
2232,
16,
10791,
67,
1829,
67,
2232,
... | |
re.MULTILINE, *flags), | re.MULTILINE | flags), | sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False) | 2d8dd972b7654687a2e8843501b1e511c530c8b7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/2d8dd972b7654687a2e8843501b1e511c530c8b7/sagedoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
272,
410,
30,
296,
2892,
291,
1383,
11,
316,
389,
3072,
67,
4816,
67,
280,
67,
2434,
2668,
4816,
2187,
10731,
380,
536,
17014,
2187,
16592,
33,
8381,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
272,
410,
30,
296,
2892,
291,
1383,
11,
316,
389,
3072,
67,
4816,
67,
280,
67,
2434,
2668,
4816,
2187,
10731,
380,
536,
17014,
2187,
16592,
33,
8381,
13,
2,
-100,
-100,
-100,
-100,
-100,
-10... |
print " --installer (build an installer)" | def usage(problem): if (problem): print "" print problem print "" print "Makepanda generates a 'built' subdirectory containing a" print "compiled copy of Panda3D. Command-line arguments are:" print "" print " --help (print the help message you're reading now)" print " --target T (target can be 'all','panda3d','plugins','installer')" print " --optimize X (optimization level can be 1,2,3,4)" print " --installer (build an installer)" print " --version (set the panda version number)" print " --lzma (use lzma compression when building installer)" print " --threads N (use the multithreaded build system. see manual)" print "" for pkg in PkgListGet(): p = pkg.lower() print " --use-%-9s --no-%-9s (enable/disable use of %s)"%(p, p, pkg) print "" print " --nothing (disable every third-party lib)" print " --everything (enable every third-party lib)" print "" print "The simplest way to compile panda is to just type:" print "" print " makepanda --everything" print "" exit("") | 3d5b46ad500e2dbc723fa06bcfdce3d29083b6c0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7242/3d5b46ad500e2dbc723fa06bcfdce3d29083b6c0/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
12,
18968,
4672,
309,
261,
18968,
4672,
1172,
1408,
1172,
6199,
1172,
1408,
1172,
315,
49,
581,
881,
464,
69,
6026,
279,
296,
12406,
11,
29869,
4191,
279,
6,
1172,
315,
19397,
1610... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
12,
18968,
4672,
309,
261,
18968,
4672,
1172,
1408,
1172,
6199,
1172,
1408,
1172,
315,
49,
581,
881,
464,
69,
6026,
279,
296,
12406,
11,
29869,
4191,
279,
6,
1172,
315,
19397,
1610... | |
date,c = getdate(DATEmOBS) | date,c = getdate(DATEmOBS, yearguess) | def parseheader(h=None,comments=None): """ parseheader returns lists of all values in each category (all dates, all ras, etc). Each list is composed of tuples, being (value, field, confidence), where value is the number, field is a string containing the name of the FITS header field it was derived from, and confidence is a number from 0 to ~200 containing the 'confidence' that that field is valid'. All field values are converted to the same units: dates: (y,m,d) tuples times: (h,m,s) tuples jds: full julian days, including fractional part hjds: full julian days, with heliocentric correction ras: fractional hours decs: fractional degrees equinoxes: fractional years exptimes: seconds """ DATE = geth(h,'DATE') DATEmOBS = geth(h,'DATE-OBS') DEC = gethe(h,'DEC') DEC_OBJ = gethf(h,'DEC_OBJ') DEC_OBS = gethf(h,'DEC_OBS') EPOCH = gethe(h,'EPOCH') EQUINOX = gethe(h,'EQUINOX') EXPT = gethf(h,'EXPT') EXPTIME = gethf(h,'EXPTIME') EXPOSURE = gethf(h,'EXPOSURE') HJD = gethf(h,'HJD') ITIME = gethf(h,'ITIME') JD = gethf(h,'JD') LJD = gethf(h,'LJD') MJD = gethf(h,'MJD') MJDmOBS = gethf(h,'MJD-OBS') OBJECT = geth(h,'OBJECT') OBSERVAT = geth(h,'OBSERVAT') OBSERVER = geth(h,'OBSERVER') RA = gethe(h,'RA') RA_OBJ = gethf(h,'RA_OBJ') RA_OBS = gethf(h,'RA_OBS') TELESCOP = geth(h,'TELESCOP') TIME = geth(h,'TIME') TIMEmOBS = geth(h,'TIME-OBS') TM_END = gethf(h,'TM_END') TM_START = gethf(h,'TM_START') TMmSTART = gethf(h,'TM-START') UT = geth(h,'UT') UTDATE = geth(h,'UTDATE') UTMIDDLE = geth(h,'UTMIDDLE') UTSHUT = geth(h,'UTSHUT') DATEmOBSd = None #d and t suffixes refer to components, eg '2003-06-24T06:39:12.152' DATEmOBSt = None if DATEmOBS: tmp=string.split(DATEmOBS, 'T') if len(tmp)==2: DATEmOBSd = tmp[0] DATEmOBSt = tmp[1] DATEd = None DATEt = None if DATE: tmp=string.split(DATE, 'T') if len(tmp)==2: DATEd = tmp[0] DATEt = tmp[1] dates=[] #A list of valid ((y,m,d),"header fields",confidence) tuples times=[] #A list of valid ((h,m,s),"header fields",confidence) tuples jds=[] #A list of valid (jd,"header fields",confidence) tuples (non-HJD) hjds=[] #A list of valid (hjd,"header fields",confidence) tuples ras=[] #A list of valid (ra,"header fields",confidence) tuples (RA in hours) decs=[] #A list of valid (dec,"header fields",confidence) tuples (DEC in degrees) equinoxes=[] #A list of valid (equinox,"header fields",confidence) tuples (eg 1950, 2000, etc) exptimes=[] #A list of valid (exptime,"header fields",confidence) tuples, exptime in seconds | 77dc1cebf1577c1346bade46be0e5544c237788a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8228/77dc1cebf1577c1346bade46be0e5544c237788a/parseing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
3374,
12,
76,
33,
7036,
16,
9231,
33,
7036,
4672,
3536,
1109,
3374,
1135,
6035,
434,
777,
924,
316,
1517,
3150,
261,
454,
7811,
16,
777,
18306,
16,
5527,
2934,
8315,
666,
353,
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,
1109,
3374,
12,
76,
33,
7036,
16,
9231,
33,
7036,
4672,
3536,
1109,
3374,
1135,
6035,
434,
777,
924,
316,
1517,
3150,
261,
454,
7811,
16,
777,
18306,
16,
5527,
2934,
8315,
666,
353,
18... |
def has_level(self, level): | def has_level(self, level, name=None): | def has_level(self, level): if name == None: name=self.name if self.log.get_level(name) <= level: return True else: return False | 9c55e315b14a1985e6388e465b8905e8a3ae14a6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11626/9c55e315b14a1985e6388e465b8905e8a3ae14a6/logger.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
711,
67,
2815,
12,
2890,
16,
1801,
16,
508,
33,
7036,
4672,
309,
508,
422,
599,
30,
508,
33,
2890,
18,
529,
309,
365,
18,
1330,
18,
588,
67,
2815,
12,
529,
13,
1648,
1801,
30,
327,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
711,
67,
2815,
12,
2890,
16,
1801,
16,
508,
33,
7036,
4672,
309,
508,
422,
599,
30,
508,
33,
2890,
18,
529,
309,
365,
18,
1330,
18,
588,
67,
2815,
12,
529,
13,
1648,
1801,
30,
327,... |
if binary_re.search(line): print_debug("%s: appears to be binary" % fullpath) | if has_correct_encoding(line1+line2+rest, "ascii"): | def looks_like_python(fullpath): infile = _open(fullpath) if infile is None: return False line = infile.readline() infile.close() if binary_re.search(line): # file appears to be binary print_debug("%s: appears to be binary" % fullpath) return False if fullpath.endswith(".py") or fullpath.endswith(".pyw"): return True elif "python" in line: # disguised Python script (e.g. CGI) return True return False | 220fd0f750c3a47b29c6af7bff82ddb95c23cba0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/220fd0f750c3a47b29c6af7bff82ddb95c23cba0/findnocoding.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10192,
67,
5625,
67,
8103,
12,
2854,
803,
4672,
14568,
273,
389,
3190,
12,
2854,
803,
13,
309,
14568,
353,
599,
30,
327,
1083,
225,
980,
273,
14568,
18,
896,
1369,
1435,
14568,
18,
441... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10192,
67,
5625,
67,
8103,
12,
2854,
803,
4672,
14568,
273,
389,
3190,
12,
2854,
803,
13,
309,
14568,
353,
599,
30,
327,
1083,
225,
980,
273,
14568,
18,
896,
1369,
1435,
14568,
18,
441... |
thread = threading.Thread(target=self.connect2, args=(blocking, force_connection)) | thread = threading.Thread(target=self._connect, args=(blocking, force_connection)) | def connect(self, blocking=False, force_connection=False): if blocking: self.connect2(blocking, force_connection) else: thread = threading.Thread(target=self.connect2, args=(blocking, force_connection)) thread.setDaemon(True) thread.start() | d9f94ae44e704d6986404a96af8786c6246b4182 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2312/d9f94ae44e704d6986404a96af8786c6246b4182/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3077,
12,
2890,
16,
9445,
33,
8381,
16,
2944,
67,
4071,
33,
8381,
4672,
309,
9445,
30,
365,
18,
3612,
22,
12,
18926,
16,
2944,
67,
4071,
13,
469,
30,
2650,
273,
17254,
18,
3830,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3077,
12,
2890,
16,
9445,
33,
8381,
16,
2944,
67,
4071,
33,
8381,
4672,
309,
9445,
30,
365,
18,
3612,
22,
12,
18926,
16,
2944,
67,
4071,
13,
469,
30,
2650,
273,
17254,
18,
3830,
12,
... |
cr.execute('CREATE DATABASE ' + db_name + ' ENCODING \'unicode\'') | cr.execute('CREATE DATABASE "%s" ENCODING \'unicode\'' % db_name) | def restore(self, password, db_name, data): security.check_super(password) logger = netsvc.Logger() | 9e72676066e05fe2cfe4b12a3d52a2f16401b361 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/9e72676066e05fe2cfe4b12a3d52a2f16401b361/web_services.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5217,
12,
2890,
16,
2201,
16,
1319,
67,
529,
16,
501,
4672,
4373,
18,
1893,
67,
9565,
12,
3664,
13,
1194,
273,
21954,
4227,
18,
3328,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5217,
12,
2890,
16,
2201,
16,
1319,
67,
529,
16,
501,
4672,
4373,
18,
1893,
67,
9565,
12,
3664,
13,
1194,
273,
21954,
4227,
18,
3328,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
return self.db().db.sqlite_last_insert_rowid() | return self.db().get_last_id(c, 'ticket') | def addTicket(self, id, time, changetime, component, severity, priority, owner, reporter, cc, version, milestone, status, resolution, summary, description, keywords): c = self.db().cursor() desc = description.encode('utf-8') if PREFORMAT_COMMENTS: desc = '{{{\n%s\n}}}' % desc | 63f7bce156a2ed5a10227f95c07a9ae105efaf62 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/63f7bce156a2ed5a10227f95c07a9ae105efaf62/bugzilla2trac.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
13614,
12,
2890,
16,
612,
16,
813,
16,
9435,
2374,
16,
1794,
16,
11426,
16,
4394,
16,
3410,
16,
11528,
16,
4946,
16,
1177,
16,
28664,
16,
1267,
16,
7861,
16,
4916,
16,
2477,
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,
527,
13614,
12,
2890,
16,
612,
16,
813,
16,
9435,
2374,
16,
1794,
16,
11426,
16,
4394,
16,
3410,
16,
11528,
16,
4946,
16,
1177,
16,
28664,
16,
1267,
16,
7861,
16,
4916,
16,
2477,
16,... |
self._haveTweakedColumnWidths = initialMode == "list" | def __init__(self, posSize, initialMode="cell", listColumnDescriptions=None, listShowColumnTitles=False, cellRepresentationName="defconAppKitGlyphCell", glyphDetailWindowClass=GlyphInformationPopUpWindow, selectionCallback=None, doubleClickCallback=None, deleteCallback=None, editCallback=None, enableDelete=False, selfWindowDropSettings=None, selfDocumentDropSettings=None, selfApplicationDropSettings=None, otherApplicationDropSettings=None, allowDrag=False, dragAndDropType="DefconAppKitSelectedGlyphIndexesPboardType"): # placeholder attributes self._selectionCallback = None self._doubleClickCallback = None self._deleteCallback = deleteCallback self._dragAndDropType = dragAndDropType ## set up the list self._listEditChangingAttribute = None self._listEditChangingGlyph = None enableDelete = deleteCallback is not None if editCallback is not None: self._finalEditCallback = editCallback editCallback = self._listEditCallback # prep for drag and drop if selfWindowDropSettings is not None: selfWindowDropSettings = dict(selfWindowDropSettings) if selfDocumentDropSettings is not None: selfDocumentDropSettings = dict(selfDocumentDropSettings) if selfApplicationDropSettings is not None: selfApplicationDropSettings = dict(selfApplicationDropSettings) if otherApplicationDropSettings is not None: otherApplicationDropSettings = dict(otherApplicationDropSettings) dropSettings = [ (selfWindowDropSettings, self._selfWindowDropCallback), (selfDocumentDropSettings, self._selfDocumentDropCallback), (selfApplicationDropSettings, self._selfApplicationDropCallback), (otherApplicationDropSettings, self._otherApplicationDropCallback) ] for d, internalCallback in dropSettings: if d is None: continue d["type"] = dragAndDropType d["finalCallback"] = d["callback"] d["callback"] = internalCallback dragSettings = None if allowDrag: dragSettings = dict(type=dragAndDropType, callback=self._packListRowsForDrag) if listColumnDescriptions is None: listColumnDescriptions = [dict(title="Name", attribute="name")] super(GlyphCollectionView, self).__init__(posSize, [], columnDescriptions=listColumnDescriptions, editCallback=editCallback, selectionCallback=selectionCallback, showColumnTitles=listShowColumnTitles, enableTypingSensitivity=True, enableDelete=enableDelete, autohidesScrollers=False, selfWindowDropSettings=selfWindowDropSettings, selfDocumentDropSettings=selfDocumentDropSettings, selfApplicationDropSettings=selfApplicationDropSettings, otherApplicationDropSettings=otherApplicationDropSettings, dragSettings=dragSettings) self._keyToAttribute = {} self._orderedListKeys = [] self._wrappedListItems = {} for columnDescription in listColumnDescriptions: title = columnDescription["title"] key = columnDescription.get("key", title) attribute = columnDescription["attribute"] self._keyToAttribute[key] = attribute self._orderedListKeys.append(key) ## set up the cell view self._glyphCellView = self.glyphCellViewClass.alloc().initWithFrame_cellRepresentationName_detailWindowClass_( ((0, 0), (400, 400)), cellRepresentationName, glyphDetailWindowClass) self._glyphCellView.vanillaWrapper = weakref.ref(self) self._glyphCellView.setAllowsDrag_(allowDrag) dropTypes = [] for d in (selfWindowDropSettings, selfDocumentDropSettings, selfApplicationDropSettings, otherApplicationDropSettings): if d is not None: dropTypes.append(d["type"]) self._glyphCellView.registerForDraggedTypes_(dropTypes) ## set up the placard placardW = 34 placardH = 16 self._placard = vanilla.Group((0, 0, placardW, placardH)) self._placard.button = PlacardSegmentedButton((0, 0, placardW, placardH), [dict(imageObject=placardCellImage, width=16), dict(imageObject=placardListImage, width=18)], callback=self._placardSelection, sizeStyle="mini") self._nsObject.setPlacard_(self._placard.getNSView()) ## tweak the scroll view self._nsObject.setBackgroundColor_(gridColor) ## set the mode self._mode = None self.setMode(initialMode) ## table view tweak self._haveTweakedColumnWidths = initialMode == "list" | 4b5c548ae1f4073b9586c0d7f60282837cb5dbfa /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8848/4b5c548ae1f4073b9586c0d7f60282837cb5dbfa/glyphCollectionView.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
949,
1225,
16,
2172,
2309,
1546,
3855,
3113,
666,
1494,
16844,
33,
7036,
16,
666,
5706,
1494,
25088,
33,
8381,
16,
2484,
13742,
461,
1546,
536,
591,
3371,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
949,
1225,
16,
2172,
2309,
1546,
3855,
3113,
666,
1494,
16844,
33,
7036,
16,
666,
5706,
1494,
25088,
33,
8381,
16,
2484,
13742,
461,
1546,
536,
591,
3371,
... | |
help="video sink is SINK", | help=_("video sink is SINK"), | def main(): progName = os.path.basename(sys.argv[0]) # Parse the commandline. optParser = OptionParser() optParser.set_usage('Usage: %prog [options]') optParser.set_description("Seamless: A DVD player based on GStreamer") optParser.add_option("--fullscreen", dest="fullScreen", action="store_true", help="start in full screen mode") optParser.add_option("--device", dest="location", metavar="PATH", help="set path to DVD device to PATH", default="/dev/dvd") optParser.add_option("--lirc", dest="lirc", action="store_true", help="enable lirc remote control support") optParser.add_option("--region", dest="region", metavar="REGION", help="Set player's region to REGION. Possible " "regions are: " "0: Region free (not accepted by some DVDs); " "1: U.S., Canada, U.S. Territories; " "2: Japan, Europe, South Africa, and Middle " "East (including Egypt); " "3: Southeast Asia and East Asia (including " "Hong Kong); " "4: Australia, New Zealand, Pacific Islands, " "Central America, Mexico, South America, " "and the Caribbean; " "5: Eastern Europe (Former Soviet Union), " "Indian subcontinent, Africa, North Korea, " "and Mongolia; " "6: China; " "7: Reserved; " "8: Special international venues (airplanes, " "cruise ships, etc.)", default=0) optParser.add_option("--audio-sink", dest="audioSink", metavar="SINK", help="audio sink is SINK", default="alsasink") optParser.add_option("--spdif-card", dest="spdifCard", metavar="CARD", help="Instead of decoding audio in software, " "output raw AC3 and DTS to the SP/DIF " "output in card CARD. CARD must be an audio " "card name as defined by the ALSA driver (look " "at the contents of your /proc/asound/cards " "file). This option won't work if you don't " "have the ALSA audio drivers installed and " "configured in your machine") optParser.add_option("--video-sink", dest="videoSink", metavar="SINK", help="video sink is SINK", default="xvimagesink") optParser.add_option("--pixel-aspect", dest="pixelAspect", metavar="ASPECT", help="set pixel aspect ratio to ASPECT (default 1/1)", default="1/1") (options, args) = optParser.parse_args() options = DictOptions(options) if args != []: optParser.error("invalid argument(s): %s" % string.join(args, ' ')) # Create the main objects. playerObj = player.DVDPlayer(options) appInstance = mainui.MainUserInterface(playerObj, options) gtk.main() | ef3bafb96a42e71f4f732479cdddd028ff8a7b51 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5222/ef3bafb96a42e71f4f732479cdddd028ff8a7b51/seamless.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
11243,
461,
273,
1140,
18,
803,
18,
13909,
12,
9499,
18,
19485,
63,
20,
5717,
225,
468,
2884,
326,
28305,
18,
2153,
2678,
273,
18862,
1435,
2153,
2678,
18,
542,
67,
9167,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
11243,
461,
273,
1140,
18,
803,
18,
13909,
12,
9499,
18,
19485,
63,
20,
5717,
225,
468,
2884,
326,
28305,
18,
2153,
2678,
273,
18862,
1435,
2153,
2678,
18,
542,
67,
9167,
... |
label = infos[1] position = infos[2].split('.')[0] duration = infos[3].split('.')[0] | label = infos[1] position = infos[2].split('.')[0] duration = infos[3].split('.')[0] if self.server != None: | def event(self,line): infos = line.split('|')[1:] log.debug(infos) if infos[0] == 'playing': transport_state = 'PLAYING' if infos[0] == 'stopped': transport_state = 'STOPPED' if infos[0] == 'paused': transport_state = 'PAUSED_PLAYBACK' if self.server != None: connection_id = self.server.connection_manager_server.lookup_avt_id(self.current_connection_id) if self.state != transport_state: self.state = transport_state if self.server != None: self.server.av_transport_server.set_variable(connection_id, 'TransportState', transport_state) | 1fc2dc582e79ef3b43f34189c6f0c25aa59f2a50 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11626/1fc2dc582e79ef3b43f34189c6f0c25aa59f2a50/buzztard_control.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
871,
12,
2890,
16,
1369,
4672,
10626,
273,
980,
18,
4939,
2668,
96,
6134,
63,
21,
26894,
613,
18,
4148,
12,
18227,
13,
309,
10626,
63,
20,
65,
422,
296,
1601,
310,
4278,
4736,
67,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
871,
12,
2890,
16,
1369,
4672,
10626,
273,
980,
18,
4939,
2668,
96,
6134,
63,
21,
26894,
613,
18,
4148,
12,
18227,
13,
309,
10626,
63,
20,
65,
422,
296,
1601,
310,
4278,
4736,
67,
20... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.