rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
def test_rigid_organics_C2H6(self): StructureTest(dir="rigid_organics", test="C2H6")
def test_rigid_organics_C2H6(self): StructureTest(dir="rigid_organics", test="C2H6")
1b04cff6e27f660e98e628b425c09e2c157b0350 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/1b04cff6e27f660e98e628b425c09e2c157b0350/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 86, 28542, 67, 22543, 2102, 67, 39, 22, 44, 26, 12, 2890, 4672, 13348, 4709, 12, 1214, 1546, 86, 28542, 67, 22543, 2102, 3113, 1842, 1546, 39, 22, 44, 26, 7923, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 86, 28542, 67, 22543, 2102, 67, 39, 22, 44, 26, 12, 2890, 4672, 13348, 4709, 12, 1214, 1546, 86, 28542, 67, 22543, 2102, 3113, 1842, 1546, 39, 22, 44, 26, 7923, 2, -100, -1...
inodes.append(adjustnode)
def optimize_tightloop(self, node): if not isinstance(node, ComplexNode): return node
b7aa0ef0102558dadc414a45ccdc4d8e270adb78 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2040/b7aa0ef0102558dadc414a45ccdc4d8e270adb78/esotope-bfc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10979, 67, 88, 750, 6498, 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, 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, 88, 750, 6498, 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, ...
l.complete = TodolistPkg.objects.filter(list=l.id,complete=False).count() == 0
l.complete = TodolistPkg.objects.filter( list=l.id,complete=False).count() == 0
def list(request): lists = Todolist.objects.order_by('-date_added') for l in lists: l.complete = TodolistPkg.objects.filter(list=l.id,complete=False).count() == 0 return render_response(request, 'todolists/list.html', {'lists':lists})
4184dae7c46a95ede489f7b20b5befc69b3a20ba /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11256/4184dae7c46a95ede489f7b20b5befc69b3a20ba/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 12, 2293, 4672, 6035, 273, 399, 369, 355, 376, 18, 6911, 18, 1019, 67, 1637, 2668, 17, 712, 67, 9665, 6134, 364, 328, 316, 6035, 30, 328, 18, 6226, 273, 399, 369, 355, 376, 1126...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2293, 4672, 6035, 273, 399, 369, 355, 376, 18, 6911, 18, 1019, 67, 1637, 2668, 17, 712, 67, 9665, 6134, 364, 328, 316, 6035, 30, 328, 18, 6226, 273, 399, 369, 355, 376, 1126...
self.assertEqual(check_line('f(a=1)', REPORTER), None)
self.assertEqual(check_line('f(a=1)'), None)
def test_known_values_opspace_4(self): self.assertEqual(check_line('f(a=1)', REPORTER), None)
455beb61539a40eb35dfd637d0cd015a7cbec7a0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/928/455beb61539a40eb35dfd637d0cd015a7cbec7a0/test_format.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2994, 67, 2372, 67, 556, 2981, 67, 24, 12, 2890, 4672, 365, 18, 11231, 5812, 12, 1893, 67, 1369, 2668, 74, 12, 69, 33, 21, 13, 2187, 2438, 52, 916, 2560, 3631, 599, 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, 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, 1842, 67, 2994, 67, 2372, 67, 556, 2981, 67, 24, 12, 2890, 4672, 365, 18, 11231, 5812, 12, 1893, 67, 1369, 2668, 74, 12, 69, 33, 21, 13, 2187, 2438, 52, 916, 2560, 3631, 599, 13, 2...
dc.SetPen(wx.Pen(wx.WHITE, 1))
dc.SetPen(self.whitePen)
def Draw(self, dc, styles, selected, leftSideCutoff=False, rightSideCutOff=False): # @@@ add a general cutoff parameter? event = self.event # recurring items, when deleted or stamped non-Calendar, are sometimes # passed to Draw before wxSynchronize is called, ignore those items if (event.itsItem.isDeleted() or not has_stamp(event, Calendar.EventStamp)): return isAnyTimeOrAllDay = Calendar.isDayEvent(event) textOffset = self.textOffset minHeightToShowTime = (styles.eventLabelMeasurements.height + styles.eventTimeMeasurements.height + 3 * textOffset.y + TIME_BOTTOM_MARGIN - 1)
97fca281eb784fa0a7e3354e2bf9cea97de8397d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/97fca281eb784fa0a7e3354e2bf9cea97de8397d/CalendarCanvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 12, 2890, 16, 6744, 16, 5687, 16, 3170, 16, 2002, 8895, 15812, 3674, 33, 8381, 16, 2145, 8895, 15812, 7210, 33, 8381, 4672, 468, 22175, 36, 527, 279, 7470, 13383, 1569, 35, 871, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 12, 2890, 16, 6744, 16, 5687, 16, 3170, 16, 2002, 8895, 15812, 3674, 33, 8381, 16, 2145, 8895, 15812, 7210, 33, 8381, 4672, 468, 22175, 36, 527, 279, 7470, 13383, 1569, 35, 871, ...
return ('%s<ol%s>\n%s%s</ol>\n' %
return ('%s<ol start="%s">\n%s%s</ol>\n' %
def _to_html(self, tree, linker, directory, docindex, context, indent=0, seclevel=0): if isinstance(tree, basestring): return plaintext_to_html(tree)
6205c076eaccf0d7412bee51a7bf0e83814f236a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3512/6205c076eaccf0d7412bee51a7bf0e83814f236a/epytext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 869, 67, 2620, 12, 2890, 16, 2151, 16, 28058, 16, 1867, 16, 997, 1615, 16, 819, 16, 3504, 33, 20, 16, 1428, 2815, 33, 20, 4672, 309, 1549, 12, 3413, 16, 10699, 4672, 327, 11917,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 869, 67, 2620, 12, 2890, 16, 2151, 16, 28058, 16, 1867, 16, 997, 1615, 16, 819, 16, 3504, 33, 20, 16, 1428, 2815, 33, 20, 4672, 309, 1549, 12, 3413, 16, 10699, 4672, 327, 11917,...
end_string_suffix = (r'(?:(?=$)|(?=[- \n.,:;!?%s]))'
end_string_suffix = (r'(?:(?=$)|(?=[-/:.,;!? \n%s]))'
def parse(self, text, lineno, memo, parent): """ Return 2 lists: nodes (text and inline elements), and system_messages.
9e3d15a8a5423c3b786979fd60c66132b47c14e6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/9e3d15a8a5423c3b786979fd60c66132b47c14e6/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 977, 16, 7586, 16, 11063, 16, 982, 4672, 3536, 2000, 576, 6035, 30, 2199, 261, 955, 471, 6370, 2186, 3631, 471, 2619, 67, 6833, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 977, 16, 7586, 16, 11063, 16, 982, 4672, 3536, 2000, 576, 6035, 30, 2199, 261, 955, 471, 6370, 2186, 3631, 471, 2619, 67, 6833, 18, 2, -100, -100, -100, -100, -100,...
isinf.unwrap_spec = [ObjSpace, float, float]
isinf.unwrap_spec = [ObjSpace, float]
def isinf(space, x): """Return True if x is infinity.""" return space.wrap(rarithmetic.isinf(x))
0b4d1fbfacfc215bde17fab2b9dfd5311737d576 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/0b4d1fbfacfc215bde17fab2b9dfd5311737d576/interp_math.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 10625, 12, 2981, 16, 619, 4672, 3536, 990, 1053, 309, 619, 353, 27272, 12123, 327, 3476, 18, 4113, 12, 86, 297, 16368, 18, 291, 10625, 12, 92, 3719, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 10625, 12, 2981, 16, 619, 4672, 3536, 990, 1053, 309, 619, 353, 27272, 12123, 327, 3476, 18, 4113, 12, 86, 297, 16368, 18, 291, 10625, 12, 92, 3719, 2, -100, -100, -100, -100, -10...
return self.folder().subscriber_list[:]
return list(self.folder().subscriber_list)
def _getSubscribers(self, parent=0): """ Return (a copy of!) this page's subscriber list. With parent flag, manage the parent folder's subscriber list instead. """ if AUTO_UPGRADE: self._upgradeSubscribers() if parent: if hasattr(self.folder(),'subscriber_list'): return self.folder().subscriber_list[:] else: return [] else: return self.subscriber_list[:]
b4e8fb9ba160855c9e87f030ce900461d0764a23 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5225/b4e8fb9ba160855c9e87f030ce900461d0764a23/Mail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 26141, 12, 2890, 16, 982, 33, 20, 4672, 3536, 2000, 261, 69, 1610, 434, 24949, 333, 1363, 1807, 9467, 666, 18, 225, 3423, 982, 2982, 16, 10680, 326, 982, 3009, 1807, 9467, 66...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 26141, 12, 2890, 16, 982, 33, 20, 4672, 3536, 2000, 261, 69, 1610, 434, 24949, 333, 1363, 1807, 9467, 666, 18, 225, 3423, 982, 2982, 16, 10680, 326, 982, 3009, 1807, 9467, 66...
('create', re.compile('create index .*\son\s+"?([a-z_0-9]+)"?[\s\(]', re.I)),
('create', re.compile('create or replace view\s+"?([a-z_0-9]+)"?[\s\(]', re.I)), ('create', re.compile('create (?:unique )?index .*\son\s+"?([a-z_0-9]+)"?[\s\(]', re.I)), ('drop', re.compile(r'drop view\s+"?([a-z_0-9]+)"?\s', re.I)),
def undecimalize(symb, cr): if symb is None: return None return float(symb)
a3d11ecee8b69ee4bbd64355f9bc2b4929913e2a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/a3d11ecee8b69ee4bbd64355f9bc2b4929913e2a/sql_db.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 12586, 554, 12, 9009, 1627, 16, 4422, 4672, 309, 1393, 1627, 353, 599, 30, 327, 599, 327, 1431, 12, 9009, 1627, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 12586, 554, 12, 9009, 1627, 16, 4422, 4672, 309, 1393, 1627, 353, 599, 30, 327, 599, 327, 1431, 12, 9009, 1627, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
cmd.append('f77_opt_path=%s' % self.scons_fcompiler_path)
cmd.append('f77_opt_path=%s' % self.scons_fcompiler_path)
def _call_scons(self, scons_exec, sconscript, pkg_name, bootstrapping): # XXX: when a scons script is missing, scons only prints warnings, and # does not return a failure (status is 0). We have to detect this from # distutils (this cannot work for recursive scons builds...)
2f6604a638ca0c96f426a2010a0dc8e6e6e2c93f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/2f6604a638ca0c96f426a2010a0dc8e6e6e2c93f/scons.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1991, 67, 87, 8559, 12, 2890, 16, 272, 8559, 67, 4177, 16, 272, 591, 4263, 16, 3475, 67, 529, 16, 7065, 1382, 4672, 468, 11329, 30, 1347, 279, 272, 8559, 2728, 353, 3315, 16, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1991, 67, 87, 8559, 12, 2890, 16, 272, 8559, 67, 4177, 16, 272, 591, 4263, 16, 3475, 67, 529, 16, 7065, 1382, 4672, 468, 11329, 30, 1347, 279, 272, 8559, 2728, 353, 3315, 16, 27...
new=manager(f_obs = self.f_obs.deep_copy(),
return manager(f_obs = self.f_obs.deep_copy(),
def deep_copy(self): if(self.abcd is not None): abcd = self.abcd.deep_copy() else: abcd = None if(self.xray_structure is None): xrs = None else: xrs = self.xray_structure.deep_copy_scatterers() new=manager(f_obs = self.f_obs.deep_copy(), r_free_flags = self.r_free_flags.deep_copy(), b_cart = self.b_cart(), f_mask = self.f_mask().deep_copy(), k_sol = self.k_sol(), b_sol = self.b_sol(), sf_algorithm = self.sf_algorithm, sf_cos_sin_table = self.sf_cos_sin_table, target_name = self.target_name, abcd = abcd, alpha_beta_params = self.alpha_beta_params, xray_structure = xrs, f_calc = self.f_calc().deep_copy(), mask_params = self.mask_params, trust_xray_structure = True, update_xray_structure = False) new.f_ordered_solvent = self.f_ordered_solvent.deep_copy() new.f_ordered_solvent_dist = self.f_ordered_solvent_dist.deep_copy() new.n_ordered_water = self.n_ordered_water new.b_ordered_water = self.b_ordered_water return new
65c736cff24544f6f106f227d62f69c231be8261 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/696/65c736cff24544f6f106f227d62f69c231be8261/f_model.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4608, 67, 3530, 12, 2890, 4672, 309, 12, 2890, 18, 378, 4315, 353, 486, 599, 4672, 1223, 4315, 273, 365, 18, 378, 4315, 18, 16589, 67, 3530, 1435, 469, 30, 1223, 4315, 273, 599, 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, 4608, 67, 3530, 12, 2890, 4672, 309, 12, 2890, 18, 378, 4315, 353, 486, 599, 4672, 1223, 4315, 273, 365, 18, 378, 4315, 18, 16589, 67, 3530, 1435, 469, 30, 1223, 4315, 273, 599, 309, ...
t += s[:i].replace('<','&lt;') + s[i+6:j]
t += format(s[:i]) + s[i+6:j]
def output_text(self, ncols=0, html=True): if ncols and not self.introspect(): s = word_wrap(self.__out, ncols=ncols) else: s = self.__out if html: # Everything not wrapped in <html> ... </html> # should have the <'s replaced by &lt;'s. t = '' while len(s) > 0: i = s.find('<html>') if i == -1: t += s.replace('<','&lt;') break j = s.find('</html>') if j == -1: t += s.replace('<','&lt;') break t += s[:i].replace('<','&lt;') + s[i+6:j] s = s[j+7:] s = t if not self.is_html() and len(s.strip()) > 0: s = '<pre class="shrunk">' + s + '</pre>' return s
2085e8271e2fac40e6923df66c0b13dc7c8f3319 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/2085e8271e2fac40e6923df66c0b13dc7c8f3319/cell.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 876, 67, 955, 12, 2890, 16, 21330, 33, 20, 16, 1729, 33, 5510, 4672, 309, 21330, 471, 486, 365, 18, 474, 26170, 13332, 272, 273, 2076, 67, 4113, 12, 2890, 16186, 659, 16, 21330, 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, 876, 67, 955, 12, 2890, 16, 21330, 33, 20, 16, 1729, 33, 5510, 4672, 309, 21330, 471, 486, 365, 18, 474, 26170, 13332, 272, 273, 2076, 67, 4113, 12, 2890, 16186, 659, 16, 21330, 33, ...
SIGNAL("stateChanged(int)"), self.toggleTexture)
SIGNAL("stateChanged(int)"), self.toggleTexture)
def connect_or_disconnect_signals(self, isConnect): """ Connect or disconnect widget signals sent to their slot methods. This can be overridden in subclasses. By default it does nothing. @param isConnect: If True the widget will send the signals to the slot method. @type isConnect: boolean """ #TODO: Fix for bug: When you invoke a temporary mode # entering such a temporary mode keeps the signals of #PM from the previous mode connected ( #but while exiting that temporary mode and reentering the #previous mode, it actually reconnects the signal! This gives rise to #lots of bugs. This needs more general fix in Temporary mode API. # -- Ninad 2008-01-09 (similar comment exists in MovePropertyManager.py #UPDATE: (comment copied and modifief from BuildNanotube_PropertyManager. #The general problem still remains -- Ninad 2008-06-25 if isConnect and self.isAlreadyConnected: if debug_flags.atom_debug: print_compact_stack("warning: attempt to connect widgets"\ "in this PM that are already connected." ) return if not isConnect and self.isAlreadyDisconnected: if debug_flags.atom_debug: print_compact_stack("warning: attempt to disconnect widgets"\ "in this PM that are already disconnected.") return self.isAlreadyConnected = isConnect self.isAlreadyDisconnected = not isConnect if isConnect: change_connect = self.win.connect else: change_connect = self.win.disconnect change_connect(self.pmPlacementOptions.buttonGroup, SIGNAL("buttonClicked(int)"), self.changePlanePlacement) change_connect(self.widthDblSpinBox, SIGNAL("valueChanged(double)"), self.change_plane_width) change_connect(self.heightDblSpinBox, SIGNAL("valueChanged(double)"), self.change_plane_height) change_connect(self.aspectRatioCheckBox, SIGNAL("stateChanged(int)"), self._enableAspectRatioSpinBox) #signal slot connection for imageDisplayCheckBox change_connect(self.imageDisplayCheckBox, SIGNAL("stateChanged(int)"), self.toggleFileChooserBehavior)
6ca1728879e65f379512b44ee2623ad89c7a92ac /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/6ca1728879e65f379512b44ee2623ad89c7a92ac/PlanePropertyManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 67, 280, 67, 20177, 67, 29659, 12, 2890, 16, 353, 5215, 4672, 3536, 8289, 578, 9479, 3604, 11505, 3271, 358, 3675, 4694, 2590, 18, 1220, 848, 506, 11000, 316, 15320, 18, 2525, 805,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 280, 67, 20177, 67, 29659, 12, 2890, 16, 353, 5215, 4672, 3536, 8289, 578, 9479, 3604, 11505, 3271, 358, 3675, 4694, 2590, 18, 1220, 848, 506, 11000, 316, 15320, 18, 2525, 805,...
print struct.size() offset += struct.size() buf = buf[offset:]
if rc > maxrows - 1: break buf = buf[struct.size():]
def render_HTMLUI(data): """Callback to render mysql stored data in HTML""" tmp = result.__class__(result) tmp.result = data return tmp
006976a5f252913f17c3c0fed6a24bb0302be5b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5568/006976a5f252913f17c3c0fed6a24bb0302be5b9/RevEng.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 4870, 5370, 12, 892, 4672, 3536, 2428, 358, 1743, 7219, 4041, 501, 316, 3982, 8395, 1853, 273, 563, 16186, 1106, 972, 12, 2088, 13, 1853, 18, 2088, 273, 501, 327, 1853, 2, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 4870, 5370, 12, 892, 4672, 3536, 2428, 358, 1743, 7219, 4041, 501, 316, 3982, 8395, 1853, 273, 563, 16186, 1106, 972, 12, 2088, 13, 1853, 18, 2088, 273, 501, 327, 1853, 2, -1...
""" Creates a new unique ID which can be assigned to an new project object.
""" Creates a new unique ID which can be assigned to an new Project object. Parameters: id -- an unique ID proposal. If it's already taken, a new one is generated. Returns: an unique ID suitable for a new Project.
def GenerateUniqueID(self, id = None): """ Creates a new unique ID which can be assigned to an new project object. """ if id != None: if id in self.___id_list: Globals.debug("Error: id", id, "already taken") else: self.___id_list.append(id) return id counter = 0 while True: if not counter in self.___id_list: self.___id_list.append(counter) return counter counter += 1
e2b4f4a534dc5054c26a7ac44730cd6e0c158de4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10033/e2b4f4a534dc5054c26a7ac44730cd6e0c158de4/Project.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6654, 31118, 12, 2890, 16, 612, 273, 599, 4672, 3536, 10210, 279, 394, 3089, 1599, 1492, 848, 506, 6958, 358, 392, 394, 5420, 733, 18, 225, 7012, 30, 612, 1493, 392, 3089, 1599, 14708, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6654, 31118, 12, 2890, 16, 612, 273, 599, 4672, 3536, 10210, 279, 394, 3089, 1599, 1492, 848, 506, 6958, 358, 392, 394, 5420, 733, 18, 225, 7012, 30, 612, 1493, 392, 3089, 1599, 14708, ...
while self.p2c_width( afont.metrics()['linespace']) > height: dh = self.p2c_width( afont.metrics()['linespace']) - height if dh > 3: cairo_size += int( 0.5*dh) else: cairo_size += 1
tk_font_linespace = self.p2c_width( afont.metrics()['linespace']) while abs(tk_font_linespace - asc - desc) > 0.1: dh = tk_font_linespace - asc - desc cairo_size += 0.8*dh
def _draw_text( self, item):
95e3205eeada3c2abe4f2df1129d3e4e784c3ff0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4298/95e3205eeada3c2abe4f2df1129d3e4e784c3ff0/tk2cairo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9446, 67, 955, 12, 365, 16, 761, 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, ...
[ 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, 389, 9446, 67, 955, 12, 365, 16, 761, 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, -...
self["VKeyIcon"] = Pixmap()
self["VKeyIcon"] = Boolean(False)
def __init__(self, session, networkinfo, essid=None, aplist=None): Screen.__init__(self, session) HelpableScreen.__init__(self) self.session = session if isinstance(networkinfo, (list, tuple)): self.iface = networkinfo[0] self.essid = networkinfo[1] self.aplist = networkinfo[2] else: self.iface = networkinfo self.essid = essid self.aplist = aplist self.extended = None self.applyConfigRef = None self.finished_cb = None self.oktext = _("Press OK on your remote control to continue.") self.oldInterfaceState = iNetwork.getAdapterAttribute(self.iface, "up")
f741c4cc282f2f99b86e6ec305604f27216087ba /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6652/f741c4cc282f2f99b86e6ec305604f27216087ba/NetworkSetup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1339, 16, 2483, 1376, 16, 18518, 350, 33, 7036, 16, 279, 17842, 33, 7036, 4672, 10146, 16186, 2738, 972, 12, 2890, 16, 1339, 13, 11288, 429, 7956, 16186, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1339, 16, 2483, 1376, 16, 18518, 350, 33, 7036, 16, 279, 17842, 33, 7036, 4672, 10146, 16186, 2738, 972, 12, 2890, 16, 1339, 13, 11288, 429, 7956, 16186, ...
return os.path.splitext(basename)[0]
while 1: new_basename = os.path.splitext(basename)[0] if basename == new_basename: break else: basename = new_basename return basename
def ExtractModuleName(infile_path): """Infers the module name from the input file path. The input filename is supposed to be in the form "ModuleName.sigs". This function splits the filename from the extention on that basename of the path and returns that as the module name. Args: infile_path: String holding the path to the input file. Returns: The module name as a string. """ basename = os.path.basename(infile_path) return os.path.splitext(basename)[0]
6ef2067c287ffbe78bf193f72fd12cf9ce57f08a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/6ef2067c287ffbe78bf193f72fd12cf9ce57f08a/generate_stubs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8152, 22542, 12, 267, 768, 67, 803, 4672, 3536, 13149, 414, 326, 1605, 508, 628, 326, 810, 585, 589, 18, 225, 1021, 810, 1544, 353, 18405, 358, 506, 316, 326, 646, 315, 22542, 18, 7340...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8152, 22542, 12, 267, 768, 67, 803, 4672, 3536, 13149, 414, 326, 1605, 508, 628, 326, 810, 585, 589, 18, 225, 1021, 810, 1544, 353, 18405, 358, 506, 316, 326, 646, 315, 22542, 18, 7340...
def tearDown(self): GettextBaseTest.tearDown(self)
def tearDown(self): GettextBaseTest.tearDown(self)
fd9faa3ac7888182ec34b24c7543303b502dd440 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/fd9faa3ac7888182ec34b24c7543303b502dd440/test_gettext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 2091, 4164, 12, 2890, 4672, 968, 955, 2171, 4709, 18, 736, 297, 4164, 12, 2890, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 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, 268, 2091, 4164, 12, 2890, 4672, 968, 955, 2171, 4709, 18, 736, 297, 4164, 12, 2890, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self.copyHtmlFile(libraryName, versionName, variant.name, buildTarget, demoBrowserBase, qxVersion)
def buildAllDemos(self, buildTarget="build", demoBrowser=None, copyDemos=False): if demoBrowser: demoBrowser = os.path.abspath(demoBrowser) console.info("Generating demos for all known libraries") repositoryData = [] console.indent() for libraryName in self.libraries: library = self.libraries[libraryName] libraryData = { "classname": libraryName, "children" : [] } validDemo = False for versionName in library: version = library[versionName] versionData = { "classname" : versionName, #"tags" : [libraryName], "tests" : [], "manifest" : version.getManifest() } qxVersions = version.getManifest()["info"]["qooxdoo-versions"] #for ver in qxVersions: # versionData["tags"].append("qxVersion_" + ver) # getting the library's top-level readme here since we only have path # information for the library versions if not "readme" in libraryData: libDir = os.path.dirname(version.path) readme = self.getReadmeContent(libDir) if readme: libraryData["readme"] = readme else: libraryData["readme"] = "No readme file found." # get the version's readme if not "readme" in versionData: readme = self.getReadmeContent(version.path) if readme: versionData["readme"] = readme else: versionData["readme"] = "No readme file found." if not version.hasDemoDir: continue buildStatus = [] for variant in version.demos: if buildTarget == "build": #get the compatible qooxdoo versions of the library version for qxVersion in qxVersions: macro = { "BUILD_PATH" : "./" + qxVersion, "QOOXDOO_PATH" : "../../../../qooxdoo/" + qxVersion } status = variant.build("build", macro) #DEBUG #status = {"buildError" : None} status["qxVersion"] = qxVersion status["variant"] = variant.name buildStatus.append(status) else: status = variant.build(buildTarget) buildStatus.append(status) if demoBrowser: if copyDemos: demoBrowserBase = os.path.split(demoBrowser)[0] for demoStatus in buildStatus: qxVersion = demoStatus["qxVersion"] if demoStatus["buildError"]: console.warn("%s %s demo %s %s generation against qooxdoo %s failed!" %(libraryName, versionName, variant.name, buildTarget, qxVersion)) console.warn(demoStatus["buildError"]) continue sourceDir = os.path.join(version.path, "demo", variant.name, qxVersion) targetDir = os.path.join(demoBrowser, "demo", libraryName, versionName, variant.name) console.debug("Copying from %s to %s" %(sourceDir, targetDir)) try: copier = CopyTool() copier.parse_args(["-u", sourceDir, targetDir]) copier.do_work() except IOError, e: console.error("Couldn't copy demo: " + str(e)) demoManifest = version.getDemoManifest(variant.name) demoData = self.getDemoData(libraryName, versionName, variant.name, qxVersion) demoData["manifest"] = demoManifest versionData["tests"].append(demoData) else: demoManifest = version.getDemoManifest(variant.name) demoBrowserBase = os.path.split(demoBrowser)[0] for qxVersion in qxVersions: self.copyHtmlFile(libraryName, versionName, variant.name, buildTarget, demoBrowserBase, qxVersion) demoData = self.getDemoData(libraryName, versionName, variant.name, qxVersion) versionData["tests"].append(demoData) libraryData["children"].append(versionData) repositoryData.append(libraryData)
3902061437c031778044bcaa375e1d2f03ae6d4f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/3902061437c031778044bcaa375e1d2f03ae6d4f/repository.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 1595, 15058, 538, 12, 2890, 16, 1361, 2326, 1546, 3510, 3113, 21477, 9132, 33, 7036, 16, 1610, 15058, 538, 33, 8381, 4672, 309, 21477, 9132, 30, 21477, 9132, 273, 1140, 18, 803, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 1595, 15058, 538, 12, 2890, 16, 1361, 2326, 1546, 3510, 3113, 21477, 9132, 33, 7036, 16, 1610, 15058, 538, 33, 8381, 4672, 309, 21477, 9132, 30, 21477, 9132, 273, 1140, 18, 803, 18...
return timestep def writeToDB(self, filepath, server, username, password): """ Writes the vistrail to eXist database given the full path to the file""" tempTimestamp = 0 tagElements = [] macroElements = [] update = UpdateFunctions(server, username, password) if(update.docExists(filepath)): tempDoc = update.getDom(filepath) actionElements = tempDoc.getElementsByTagName("action") tempLen = len(actionElements) tempTimestamp = 0 for act in actionElements: t = act.getAttribute("time") if t > tempTimestamp: tempTimestamp = t tagElements = tempDoc.getElementsByTagName("tag") macroElements = tempDoc.getElementsByTagName("macro") source = """(""" actionLen = len(self.actionMap.values()) tagLen = len(self.tagMap.items()) macroLen = len(self.macroMap.values()) i = 0 for (time, action) in self.actionMap.items(): if(int(time) > int(tempTimestamp)): if(i == actionLen-1): if(tagLen == 0): source = source + action.writeToDB() else: source = source + action.writeToDB() + """,""" else: source = source + action.writeToDB() + """,""" i = i + 1 i = 0 for (name, time) in self.tagMap.items(): if(self.hasTagDBHelper(str(time), tagElements) == 0): if(i == tagLen-1): if(macroLen == 0): source = source + """<tag name=\"""" + str(name) + """\" time=\"""" + str(time) + """\" />""" else: source = source + """<tag name=\"""" + str(name) + """\" time=\"""" + str(time) + """\" />,""" else: source = source + """<tag name=\"""" + str(name) + """\" time=\"""" + str(time) + """\" />,""" i = i + 1 i = 0 for (name, macro) in self.macroMap.items(): if(self.hasMacroDBHelper(str(name), macroElements) == 0): if(i == macroLen-1): source = source + macro.writeToDB() else: source = source + macro.writeToDB() + """,""" i = i + 1 source = source + """)""" if(source != """()"""): if(update.docExists(filepath) == False): update.createNewDoc(filepath) update.addActions(source, "/db/" + filepath) def hasTagDBHelper(self, time, tagElements): for tag in tagElements: if(tag.getAttribute("time") == time): return 1 return 0 def hasMacroDBHelper(self, name, macroElements): for macro in macroElements: if(macro.getAttribute("name") == name): return 1 return 0
return timestep
def getLastCommonVersion(self, v): """Returns the last version that is common to both v1 and v2
0d08a982cb8d26e26f2e6ab32b89ef18e54df8fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6341/0d08a982cb8d26e26f2e6ab32b89ef18e54df8fb/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7595, 6517, 1444, 12, 2890, 16, 331, 4672, 3536, 1356, 326, 1142, 1177, 716, 353, 2975, 358, 3937, 331, 21, 471, 331, 22, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7595, 6517, 1444, 12, 2890, 16, 331, 4672, 3536, 1356, 326, 1142, 1177, 716, 353, 2975, 358, 3937, 331, 21, 471, 331, 22, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
gclient_scm.CreateSCM(webkit_path, self.root_dir, 'foo/third_party/WebKit').AndReturn(gclient_scm.CreateSCM) gclient_scm.CreateSCM.RunCommand('update', options, self.args, [])
gclient.gclient_scm.CreateSCM(webkit_path, self.root_dir, 'foo/third_party/WebKit').AndReturn(gclient.gclient_scm.CreateSCM) gclient.gclient_scm.CreateSCM.RunCommand('update', options, self.args, [])
def testRunOnDepsSuccessCustomVars(self): # Fake .gclient file. name = 'testRunOnDepsSuccessCustomVars_solution_name' gclient_config = """solutions = [ {
90ba161b70b445eba62b2a376e4fa2f508854e13 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6076/90ba161b70b445eba62b2a376e4fa2f508854e13/gclient_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1997, 1398, 14430, 4510, 3802, 5555, 12, 2890, 4672, 468, 11551, 263, 75, 2625, 585, 18, 508, 273, 296, 3813, 1997, 1398, 14430, 4510, 3802, 5555, 67, 13385, 67, 529, 11, 314, 2625...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1997, 1398, 14430, 4510, 3802, 5555, 12, 2890, 4672, 468, 11551, 263, 75, 2625, 585, 18, 508, 273, 296, 3813, 1997, 1398, 14430, 4510, 3802, 5555, 67, 13385, 67, 529, 11, 314, 2625...
contents=open(os.path.normpath(myroot+"var/db/pkg/"+category+"/"+pkgname+"/CONTENTS"))
contents=open(os.path.normpath(root+"var/db/pkg/"+category+"/"+pkgname+"/CONTENTS"))
def unmerge(myroot,category,pkgname): if myroot=="": myroot="/" if os.path.isdir(os.path.normpath(myroot+"var/db/pkg/"+category+"/"+pkgname)): if myroot=="/": print "Unmerging",pkgname+"..." else: print "Unmerging",pkgname,"from",myroot+"..." print else: print pkgname,"not installed" return try: contents=open(os.path.normpath(myroot+"var/db/pkg/"+category+"/"+pkgname+"/CONTENTS")) except: print "Error -- could not open CONTENTS file for", pkgname+". Aborting." return pkgfiles={} for line in contents.readlines(): mydat=string.split(line) # we do this so we can remove from non-root filesystems # (use the ROOT var to allow maintenance on other partitions) mydat[1]=os.path.normpath(myroot+mydat[1][1:]) if mydat[0]=="obj": #format: type, mtime, md5sum pkgfiles[mydat[1]]=[mydat[0], mydat[3], mydat[2]] elif mydat[0]=="dir": #format: type pkgfiles[mydat[1]]=[mydat[0] ] elif mydat[0]=="sym": #format: type, mtime, dest pkgfiles[mydat[1]]=[mydat[0], mydat[4], mydat[3]] elif mydat[0]=="dev": #format: type pkgfiles[mydat[1]]=[mydat[0] ] elif mydat[0]=="fif": #format: type pkgfiles[mydat[1]]=[mydat[0]] else: print "Error -- CONTENTS file for", pkgname, "is corrupt." print ">>> "+line return # we don't want to automatically remove the ebuild file listed # in the CONTENTS file. We'll do after everything else has # completed successfully. myebuildfile=os.path.normpath(myroot+"var/db/pkg/"+category+"/"+pkgname+"/"+pkgname+".ebuild") if pkgfiles.has_key(myebuildfile): del pkgfiles[myebuildfile] mykeys=pkgfiles.keys() mykeys.sort() mykeys.reverse() #prerm script pkgscript("prerm",myebuildfile) for obj in mykeys: obj=os.path.normpath(obj) if not os.path.islink(obj): #we skip this if we're dealing with a symlink #because os.path.exists() will operate on the #link target rather than the link itself. if not os.path.exists(obj): print "--- !found", pkgfiles[obj][0], obj continue if (pkgfiles[obj][0] not in ("dir","fif","dev")) and (getmtime(obj) != pkgfiles[obj][1]): print "--- !mtime", pkgfiles[obj][0], obj continue if pkgfiles[obj][0]=="dir": if not os.path.isdir(obj): print "--- !dir ","dir", obj continue if os.listdir(obj): print "--- !empty","dir", obj continue os.rmdir(obj) print "<<< ","dir",obj elif pkgfiles[obj][0]=="sym": if not os.path.islink(obj): print "--- !sym ","sym", obj continue mydest=os.readlink(obj) if os.path.exists(os.path.normpath(myroot+mydest)): if mydest != pkgfiles[obj][2]: print "--- !destn","sym", obj continue os.unlink(obj) print "<<< ","sym",obj elif pkgfiles[obj][0]=="obj": if not os.path.isfile(obj): print "--- !obj ","obj", obj continue mymd5=md5(obj) if mymd5 != string.upper(pkgfiles[obj][2]): print "--- !md5 ","obj", obj continue os.unlink(obj) print "<<< ","obj",obj elif pkgfiles[obj][0]=="fif": if not isfifo(obj): print "--- !fif ","fif", obj continue os.unlink(obj) print "<<< ","fif",obj elif pkgfiles[obj][0]=="dev": if not isdev(obj): print "--- !dev ","dev", obj continue os.unlink(obj) print "<<< ","dev",obj #postrm script pkgscript("postrm",myebuildfile) #recursive cleanup for thing in os.listdir(myroot+"var/db/pkg/"+category+"/"+pkgname): os.unlink(myroot+"var/db/pkg/"+category+"/"+pkgname+"/"+thing) os.rmdir(myroot+"var/db/pkg/"+category+"/"+pkgname) print if myroot=="/": print pkgname,"unmerged." else: print pkgname,"unmerged from",myroot+"."
37ec033936cd148abafc52a24966a719023ae65c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2807/37ec033936cd148abafc52a24966a719023ae65c/portage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 2702, 12, 4811, 3085, 16, 4743, 16, 10657, 529, 4672, 309, 3399, 3085, 631, 3660, 30, 3399, 3085, 1546, 4898, 309, 1140, 18, 803, 18, 291, 1214, 12, 538, 18, 803, 18, 7959, 803, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 2702, 12, 4811, 3085, 16, 4743, 16, 10657, 529, 4672, 309, 3399, 3085, 631, 3660, 30, 3399, 3085, 1546, 4898, 309, 1140, 18, 803, 18, 291, 1214, 12, 538, 18, 803, 18, 7959, 803, ...
libtorrent_so = os.path.join("Miro.app", "Contents", "Resources", "lib", "python%s" % PYTHON_VERSION, "lib-dynload", "libtorrent.so")
libtorrent_so = os.path.join("Miro.app", "Contents", "Resources", "lib", "python%s" % PYTHON_VERSION, "lib-dynload", "miro", "libtorrent.so")
def fix_install_names(self): py_install_name = os.path.join("@executable_path", "..", "Frameworks", "Python.framework", "Versions", PYTHON_VERSION, "Python")
138509122776841361fb1ffb1d95a5c51e74b437 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/138509122776841361fb1ffb1d95a5c51e74b437/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 67, 5425, 67, 1973, 12, 2890, 4672, 2395, 67, 5425, 67, 529, 273, 1140, 18, 803, 18, 5701, 2932, 36, 17751, 67, 803, 3113, 315, 838, 3113, 315, 13701, 87, 3113, 315, 15774, 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, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 67, 5425, 67, 1973, 12, 2890, 4672, 2395, 67, 5425, 67, 529, 273, 1140, 18, 803, 18, 5701, 2932, 36, 17751, 67, 803, 3113, 315, 838, 3113, 315, 13701, 87, 3113, 315, 15774, 18, ...
Subwidget Class --------- ----- incr Button decr Button entry Entry label Label"""
Subwidget Class --------- ----- incr Button decr Button entry Entry label Label"""
def pick(self, index):
22710823fb554a796dc96c44885d7a9389426824 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/22710823fb554a796dc96c44885d7a9389426824/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6002, 12, 2890, 16, 770, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6002, 12, 2890, 16, 770, 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...
""" Test adding a property to any component """
"""Test adding a property to any component. """
def test_add_property(self): """ Test adding a property to any component """ cal = self.cal2 event = cal.get_components('VEVENT')[1]
4284d14984f2a4b3da93b77281110353f761aa67 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12681/4284d14984f2a4b3da93b77281110353f761aa67/test_ical.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1289, 67, 4468, 12, 2890, 4672, 3536, 4709, 6534, 279, 1272, 358, 1281, 1794, 18, 3536, 1443, 273, 365, 18, 771, 22, 871, 273, 1443, 18, 588, 67, 8119, 2668, 3412, 6465, 6134...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1289, 67, 4468, 12, 2890, 4672, 3536, 4709, 6534, 279, 1272, 358, 1281, 1794, 18, 3536, 1443, 273, 365, 18, 771, 22, 871, 273, 1443, 18, 588, 67, 8119, 2668, 3412, 6465, 6134...
def onPageChanging(self, event): inspector = self.inspectors[event.GetOldSelection()] if inspector is not None: inspector.willBeClosed() inspector = self.inspectors[event.GetSelection()] if inspector is not None: inspector.willBeShown()
def onShowInspector(self, event): for inspector in self._activeInspectors: if inspector.toolbarId == event.GetId(): self._lastClickedInspectorClass = inspector.__class__ self.setActiveInspector(inspector) break
def onPageChanging(self, event): inspector = self.inspectors[event.GetOldSelection()] if inspector is not None: inspector.willBeClosed() inspector = self.inspectors[event.GetSelection()] if inspector is not None: inspector.willBeShown()
853364df34a3a5ee0851c87290c96a6e9b16b8f5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6368/853364df34a3a5ee0851c87290c96a6e9b16b8f5/InspectorFrame.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 5706, 19443, 12, 2890, 16, 871, 4672, 364, 22700, 316, 365, 6315, 3535, 12073, 1383, 30, 309, 22700, 18, 18849, 548, 422, 871, 18, 967, 548, 13332, 365, 6315, 2722, 27633, 19443, 79...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 5706, 19443, 12, 2890, 16, 871, 4672, 364, 22700, 316, 365, 6315, 3535, 12073, 1383, 30, 309, 22700, 18, 18849, 548, 422, 871, 18, 967, 548, 13332, 365, 6315, 2722, 27633, 19443, 79...
pass
self.__child = None if hasattr(self, 'item') and self.item: PLAY_END.post(self.item)
def child_finished(self): """ Callback when the child is finished. Override this method to react when the child is finished. """ pass
6c6f757d74971379853d8a2bd5aa70177e48d2f1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/6c6f757d74971379853d8a2bd5aa70177e48d2f1/childapp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1151, 67, 13527, 12, 2890, 4672, 3536, 8444, 1347, 326, 1151, 353, 6708, 18, 1439, 333, 707, 358, 13417, 1347, 326, 1151, 353, 6708, 18, 3536, 1342, 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, 0, 0, 0, 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, 1151, 67, 13527, 12, 2890, 4672, 3536, 8444, 1347, 326, 1151, 353, 6708, 18, 1439, 333, 707, 358, 13417, 1347, 326, 1151, 353, 6708, 18, 3536, 1342, 2, -100, -100, -100, -100, -100, -100...
def __init__(self, app):
def __init__(self, rootapp=None, **apps):
def __init__(self, app): trace("ISAPIThreadPoolHandler.__init__") self.app = app
742beb9f59a980a41b87dc069bb870643ade7d03 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4963/742beb9f59a980a41b87dc069bb870643ade7d03/isapi_wsgi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1365, 2910, 33, 7036, 16, 2826, 11411, 4672, 2606, 2932, 5127, 2557, 20621, 1503, 16186, 2738, 972, 7923, 365, 18, 2910, 273, 595, 2, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 1365, 2910, 33, 7036, 16, 2826, 11411, 4672, 2606, 2932, 5127, 2557, 20621, 1503, 16186, 2738, 972, 7923, 365, 18, 2910, 273, 595, 2, -100, -100, -100, -10...
level=zLOG.DEBUG)
level=zLOG.TRACE)
def message_input(self, message): """Decoding an incoming message and dispatch it""" # XXX Not sure what to do with errors that reach this level. # Need to catch ZRPCErrors in handle_reply() and # handle_request() so that they get back to the client. try: msgid, flags, name, args = self.marshal.decode(message) except DecodingError, msg: return self.return_error(None, None, DecodingError, msg)
8d7c57665d46df0cacc46068195732bd4e94a4b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/8d7c57665d46df0cacc46068195732bd4e94a4b5/connection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 883, 67, 2630, 12, 2890, 16, 883, 4672, 3536, 1799, 4751, 392, 6935, 883, 471, 3435, 518, 8395, 468, 11329, 2288, 3071, 4121, 358, 741, 598, 1334, 716, 9287, 333, 1801, 18, 468, 12324, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 883, 67, 2630, 12, 2890, 16, 883, 4672, 3536, 1799, 4751, 392, 6935, 883, 471, 3435, 518, 8395, 468, 11329, 2288, 3071, 4121, 358, 741, 598, 1334, 716, 9287, 333, 1801, 18, 468, 12324, ...
def dumb_consensus(self, threshold = .7, ambiguous = "N",
def dumb_consensus(self, threshold = .7, ambiguous = "X",
def dumb_consensus(self, threshold = .7, ambiguous = "N", consensus_alpha = None, require_multiple = 0): """Output a fast consensus sequence of the alignment.
0ec07d8e8c9dce51e4fa14a6ed64e9dcf93ab5b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/0ec07d8e8c9dce51e4fa14a6ed64e9dcf93ab5b9/AlignInfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 302, 3592, 67, 29220, 12, 2890, 16, 5573, 273, 263, 27, 16, 20399, 273, 315, 60, 3113, 18318, 67, 5429, 273, 599, 16, 2583, 67, 9622, 273, 374, 4672, 3536, 1447, 279, 4797, 18318, 3102...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 302, 3592, 67, 29220, 12, 2890, 16, 5573, 273, 263, 27, 16, 20399, 273, 315, 60, 3113, 18318, 67, 5429, 273, 599, 16, 2583, 67, 9622, 273, 374, 4672, 3536, 1447, 279, 4797, 18318, 3102...
if options['colorbar']:
if options.get('colorbar', False):
def _render_on_subplot(self, subplot): """ TESTS:
b930bde638c3418aac0325b1169327bc9ca7176c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/b930bde638c3418aac0325b1169327bc9ca7176c/contour_plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 67, 265, 67, 24523, 12, 2890, 16, 19826, 4672, 3536, 22130, 55, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 67, 265, 67, 24523, 12, 2890, 16, 19826, 4672, 3536, 22130, 55, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def act_final_query(query, verbose_message):
def act_final_query(query, verbose_message):
def act_final_query(query, verbose_message): """ Either print or execute the given query """ if options.print_only: print query else: update_cursor = master_connection.cursor() try: try: update_cursor.execute(query) verbose(verbose_message) except: print_error("error executing: %s" % query) finally: update_cursor.close()
4742f48980dc812a72089f810c0c66c5b52fec74 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10338/4742f48980dc812a72089f810c0c66c5b52fec74/oak-purge-master-logs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1328, 67, 6385, 67, 2271, 12, 2271, 16, 3988, 67, 2150, 4672, 3536, 14635, 1172, 578, 1836, 326, 864, 843, 3536, 309, 702, 18, 1188, 67, 3700, 30, 1172, 843, 469, 30, 1089, 67, 9216, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1328, 67, 6385, 67, 2271, 12, 2271, 16, 3988, 67, 2150, 4672, 3536, 14635, 1172, 578, 1836, 326, 864, 843, 3536, 309, 702, 18, 1188, 67, 3700, 30, 1172, 843, 469, 30, 1089, 67, 9216, ...
def _pprint_var_value(self, var, multiline=1, summary_linelen=0):
def _pprint_var_value(self, var, multiline=1, summary_linelen=0): """ @return: A string representation of the value of the variable C{var}, suitable for use in a C{<pre>...</pre>} HTML block. @type var: L{Lar} """
def _pprint_var_value(self, var, multiline=1, summary_linelen=0): if not var.has_value(): return '' val = var.uid().value()
b57986399a2595e7095d7d67227b7bcda199a18b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/b57986399a2595e7095d7d67227b7bcda199a18b/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 84, 1188, 67, 1401, 67, 1132, 12, 2890, 16, 569, 16, 19431, 33, 21, 16, 4916, 67, 7511, 292, 275, 33, 20, 4672, 3536, 632, 2463, 30, 432, 533, 4335, 434, 326, 460, 434, 326, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 84, 1188, 67, 1401, 67, 1132, 12, 2890, 16, 569, 16, 19431, 33, 21, 16, 4916, 67, 7511, 292, 275, 33, 20, 4672, 3536, 632, 2463, 30, 432, 533, 4335, 434, 326, 460, 434, 326, 2...
self.command_help(['set'])
self.command_help('set')
def command_set(self, arg): """ /set <option> [value] """ args = arg.split() if len(args) != 2 and len(args) != 1: self.command_help(['set']) return option = args[0] if len(args) == 2: value = args[1] else: value = '' config.set_and_save(option, value) msg = "%s=%s" % (option, value) room = self.current_room() self.add_message_to_room(room, msg)
7fbeef6a239c2c1f0ffd0a2f80fa994d6004fa9f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9814/7fbeef6a239c2c1f0ffd0a2f80fa994d6004fa9f/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1296, 67, 542, 12, 2890, 16, 1501, 4672, 3536, 342, 542, 411, 3482, 34, 306, 1132, 65, 3536, 833, 273, 1501, 18, 4939, 1435, 309, 562, 12, 1968, 13, 480, 576, 471, 562, 12, 1968, 13,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1296, 67, 542, 12, 2890, 16, 1501, 4672, 3536, 342, 542, 411, 3482, 34, 306, 1132, 65, 3536, 833, 273, 1501, 18, 4939, 1435, 309, 562, 12, 1968, 13, 480, 576, 471, 562, 12, 1968, 13,...
sys.stderr.write('!!!Error importing %s: %s\n!!!', (mname, e))
sys.stderr.write('!!!Error importing %s: %s\n!!!' % (name, e))
def document(options, progress, cancel): """ Create the documentation for C{modules}, using the options specified by C{options}. C{document} is designed to be started in its own thread by L{EpydocGUI._go}. @param options: The options to use for generating documentation. This includes keyword options that can be given to L{html.HTMLFormatter}, as well as the option C{outdir}, which controls where the output is written to. @type options: C{dictionary} @param progress: This first element of this list will be modified by C{document} to reflect its progress. This first element will be a number between 0 and 1 while C{document} is creating the documentation; and the string C{"done"} once it finishes creating the documentation. @type progress: C{list} """ progress[0] = 0.02 from epydoc.html import HTMLFormatter from epydoc.objdoc import DocMap from epydoc.imports import import_module, find_modules try: # Import the modules. modnames = options['modules'] # First, expand packages. for name in modnames[:]: if os.path.isdir(name): modnames.remove(name) new_modules = find_modules(name) if new_modules: modnames += new_modules sys.stderr.write('!!!Error: %r is not a pacakge\n!!!' % name) modules = [] for (name, num) in zip(modnames, range(len(modnames))): if cancel[0]: exit_thread() sys.stderr.write('***Importing %s\n***' % name) try: module = import_module(name) if module not in modules: modules.append(module) except ImportError, e: sys.stderr.write('!!!Error importing %s: %s\n!!!', (mname, e)) progress[0] += (IMPORT_PROGRESS*0.98)/len(modnames) # Create the documentation map. d = DocMap() # Build the documentation. for (module, num) in zip(modules, range(len(modules))): if cancel[0]: exit_thread() sys.stderr.write('***Building docs for %s\n***' % module.__name__) d.add(module) progress[0] += (BUILD_PROGRESS*0.98)/len(modules) htmldoc = HTMLFormatter(d, **options) numfiles = htmldoc.num_files() # Set up the progress callback. n = htmldoc.num_files() def progress_callback(path, doc, numfiles=numfiles, progress=progress, cancel=cancel, num=[1]): if cancel[0]: exit_thread() # Find the short name of the file we're writing. (dir, file) = os.path.split(path) (root, d) = os.path.split(dir) if d in ('public', 'private'): fname = os.path.join(d, file) else: fname = file sys.stderr.write('***Writing %s\n***' % fname) progress[0] += (WRITE_PROGRESS*0.98)/numfiles num[0] += 1 # Write the documentation. htmldoc.write(options.get('outdir', 'html'), progress_callback) # We're done. sys.stderr.write('***Finished!\n***') progress[0] = 'done' except SystemExit: # Cancel. sys.stderr.write('!!!Cancel!\n!!!') progress[0] = 'cancel' raise except Exception, e: # We failed. sys.stderr.write('!!!Internal error: %s\n!!!' % e) progress[0] = 'cancel' raise except: # We failed. sys.stderr.write('!!!Internal error\n!!!') progress[0] = 'cancel' raise
64f9726f3191683c24571daf68e581ad7ef3b87e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/64f9726f3191683c24571daf68e581ad7ef3b87e/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1668, 12, 2116, 16, 4007, 16, 3755, 4672, 3536, 1788, 326, 7323, 364, 385, 95, 6400, 5779, 1450, 326, 702, 1269, 635, 385, 95, 2116, 5496, 225, 385, 95, 5457, 97, 353, 26584, 358, 506,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1668, 12, 2116, 16, 4007, 16, 3755, 4672, 3536, 1788, 326, 7323, 364, 385, 95, 6400, 5779, 1450, 326, 702, 1269, 635, 385, 95, 2116, 5496, 225, 385, 95, 5457, 97, 353, 26584, 358, 506,...
other = LIGOTimeGPS(other)
try: other = LIGOTimeGPS(other) except: return 1
def __cmp__(self, other): """ Compare a value to a LIGOTimeGPS. If the value being compared to the LIGOTimeGPS is not also a LIGOTimeGPS, then an attempt is made to convert it to a LIGOTimeGPS.
b2e11ba06e87aefa73c9cfb4263c686ab3b0f91f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3589/b2e11ba06e87aefa73c9cfb4263c686ab3b0f91f/lal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9625, 972, 12, 2890, 16, 1308, 4672, 3536, 11051, 279, 460, 358, 279, 511, 3047, 51, 950, 28983, 18, 225, 971, 326, 460, 3832, 15843, 358, 326, 511, 3047, 51, 950, 28983, 353, 48...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9625, 972, 12, 2890, 16, 1308, 4672, 3536, 11051, 279, 460, 358, 279, 511, 3047, 51, 950, 28983, 18, 225, 971, 326, 460, 3832, 15843, 358, 326, 511, 3047, 51, 950, 28983, 353, 48...
d = clientCreator.connectTCP("127.0.0.1", portNum)
d2 = clientCreator.connectTCP("127.0.0.1", portNum)
def _rememberProtocolInstance(addr): protocol = buildProtocol(addr) self.serverProtocol = protocol.wrappedProtocol return protocol
6dc2595124ed21d282576cfb553463fbb3d540f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6dc2595124ed21d282576cfb553463fbb3d540f3/test_ftp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 28155, 5752, 1442, 12, 4793, 4672, 1771, 273, 1361, 5752, 12, 4793, 13, 365, 18, 3567, 5752, 273, 1771, 18, 18704, 5752, 327, 1771, 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, 0, 0, 0, 0, 0, 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, 28155, 5752, 1442, 12, 4793, 4672, 1771, 273, 1361, 5752, 12, 4793, 13, 365, 18, 3567, 5752, 273, 1771, 18, 18704, 5752, 327, 1771, 2, -100, -100, -100, -100, -100, -100, -100, -100...
for whitespace in whitespace_string: format = format.replace(whitespace, r'\s*')
whitespace_replacement = re_compile('\s+') format = whitespace_replacement.sub('\s*', format)
def pattern(self, format): """Return re pattern for the format string.""" processed_format = '' for whitespace in whitespace_string: format = format.replace(whitespace, r'\s*') while format.find('%') != -1: directive_index = format.index('%')+1 processed_format = "%s%s%s" % (processed_format, format[:directive_index-1], self[format[directive_index]]) format = format[directive_index+1:] return "%s%s" % (processed_format, format)
80cebc16aa800ec5740e4b9c8b6508bae4cca434 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/80cebc16aa800ec5740e4b9c8b6508bae4cca434/_strptime.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1936, 12, 2890, 16, 740, 4672, 3536, 990, 283, 1936, 364, 326, 740, 533, 12123, 5204, 67, 2139, 273, 875, 7983, 67, 24394, 273, 283, 67, 11100, 2668, 64, 87, 15, 6134, 740, 273, 7983, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1936, 12, 2890, 16, 740, 4672, 3536, 990, 283, 1936, 364, 326, 740, 533, 12123, 5204, 67, 2139, 273, 875, 7983, 67, 24394, 273, 283, 67, 11100, 2668, 64, 87, 15, 6134, 740, 273, 7983, ...
av.detachNode()
if (av.getParent().compareTo(self) == 0): av.detachNode()
def removeObjectFromGrid(self, av): # TODO: WHAT LOCATION SHOULD WE SET THIS TO? #av.reparentTo(hidden) av.detachNode() #av.b_setLocation(0,0)
fa4d2a16a3c98e46cac499b7b7878a5859b858fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/fa4d2a16a3c98e46cac499b7b7878a5859b858fd/DistributedCartesianGrid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 921, 1265, 6313, 12, 2890, 16, 1712, 4672, 468, 2660, 30, 14735, 789, 22960, 6122, 31090, 13880, 7855, 20676, 8493, 35, 468, 842, 18, 266, 2938, 774, 12, 6345, 13, 309, 261, 842, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 921, 1265, 6313, 12, 2890, 16, 1712, 4672, 468, 2660, 30, 14735, 789, 22960, 6122, 31090, 13880, 7855, 20676, 8493, 35, 468, 842, 18, 266, 2938, 774, 12, 6345, 13, 309, 261, 842, ...
""" dtermine if the requested folder path is legal and exists """
""" determine if the requested folder path is legal and exists """ trimmedFolderBasePath = os.path.normpath(self.folder)
def validFolder(self, REQUEST=None): """ dtermine if the requested folder path is legal and exists """
6abd6fb096b7cf9709c9fedce9b68c0d3cd973d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/6abd6fb096b7cf9709c9fedce9b68c0d3cd973d8/PloneLocalFolderNG.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 923, 3899, 12, 2890, 16, 225, 12492, 33, 7036, 4672, 3536, 302, 387, 3081, 309, 326, 3764, 3009, 589, 353, 19286, 471, 1704, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 923, 3899, 12, 2890, 16, 225, 12492, 33, 7036, 4672, 3536, 302, 387, 3081, 309, 326, 3764, 3009, 589, 353, 19286, 471, 1704, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self.__maxheaderlen = maxheaderlen
self._maxheaderlen = maxheaderlen
def __init__(self, outfp, mangle_from_=True, maxheaderlen=78): """Create the generator for message flattening.
bebf357b442a43365c8883f99b9f699444d75bc7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/bebf357b442a43365c8883f99b9f699444d75bc7/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 596, 7944, 16, 312, 4341, 67, 2080, 67, 33, 5510, 16, 943, 3374, 1897, 33, 8285, 4672, 3536, 1684, 326, 4456, 364, 883, 5341, 310, 18, 2, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 596, 7944, 16, 312, 4341, 67, 2080, 67, 33, 5510, 16, 943, 3374, 1897, 33, 8285, 4672, 3536, 1684, 326, 4456, 364, 883, 5341, 310, 18, 2, -100, -100, -...
if rspec.has_key('net_min_rate'):
MinRate = int(rspec.get("net_min_rate", default_MinRate)) if MinRate > int(.25 * default_MaxRate): MinRate = int(.25 * default_MaxRate) if MinRate != self.MinRate: self.MinRate = MinRate
def updateSliceAttributes(self, rspec): # Incase the limits have changed. if (self.MaxRate != default_MaxRate) or \ (self.Maxi2Rate != default_Maxi2Rate): self.MaxRate = int(bwlimit.get_bwcap() / 1000) self.Maxi2Rate = int(bwlimit.bwmax / 1000)
552d3ccba58387b6ad8cc621b0bd7f47d5faa132 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6995/552d3ccba58387b6ad8cc621b0bd7f47d5faa132/bwmon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 5959, 2498, 12, 2890, 16, 436, 2793, 4672, 468, 657, 3593, 326, 8181, 1240, 3550, 18, 309, 261, 2890, 18, 2747, 4727, 480, 805, 67, 2747, 4727, 13, 578, 521, 261, 2890, 18, 2747,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5959, 2498, 12, 2890, 16, 436, 2793, 4672, 468, 657, 3593, 326, 8181, 1240, 3550, 18, 309, 261, 2890, 18, 2747, 4727, 480, 805, 67, 2747, 4727, 13, 578, 521, 261, 2890, 18, 2747,...
obj = models.AddressRange.create(form.cleaned_data['lo'], form.cleaned_data['hi'], parent=parent)
obj = models.AddressRange(form.cleaned_data['lo'], form.cleaned_data['hi'], parent=parent)
def prefix_split_view(request, pk): handle = request.session['handle'] prefix = get_object_or_404(models.AddressRange.objects, pk=pk) # ensure this resource range belongs to a parent of the current conf parent_set = get_parents_or_404(handle, prefix) if request.method == 'POST': form = forms.PrefixSplitForm(prefix, request.POST) if form.is_valid(): obj = models.AddressRange.create(form.cleaned_data['lo'], form.cleaned_data['hi'], parent=parent) obj.save() return http.HttpResponseRedirect(obj.get_absolute_url()) else: form = forms.PrefixSplitForm(prefix) return render('myrpki/prefix_view.html', { 'form': form, 'addr': prefix, 'form': form, 'parent': parent_set }, request)
67eda9c96f34b1466353c1cbe79a5755c985ac28 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/119/67eda9c96f34b1466353c1cbe79a5755c985ac28/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1633, 67, 4939, 67, 1945, 12, 2293, 16, 2365, 4672, 1640, 273, 590, 18, 3184, 3292, 4110, 3546, 1633, 273, 336, 67, 1612, 67, 280, 67, 11746, 12, 7665, 18, 1887, 2655, 18, 6911, 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, 1633, 67, 4939, 67, 1945, 12, 2293, 16, 2365, 4672, 1640, 273, 590, 18, 3184, 3292, 4110, 3546, 1633, 273, 336, 67, 1612, 67, 280, 67, 11746, 12, 7665, 18, 1887, 2655, 18, 6911, 16, ...
if sys.stdin.isatty() and not self.conf.assumeyes:
if not sys.stdin.isatty() and not self.conf.assumeyes:
def gpgsigcheck(self, pkgs): '''Perform GPG signature verification on the given packages, installing keys if possible
13e9572b2c346b1871950069d1b98f459d5f88a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/13e9572b2c346b1871950069d1b98f459d5f88a7/cli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4178, 564, 360, 1893, 12, 2890, 16, 16922, 4672, 9163, 4990, 28378, 3372, 11805, 603, 326, 864, 5907, 16, 3799, 310, 1311, 309, 3323, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4178, 564, 360, 1893, 12, 2890, 16, 16922, 4672, 9163, 4990, 28378, 3372, 11805, 603, 326, 864, 5907, 16, 3799, 310, 1311, 309, 3323, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
print >> sys.stderr, msg print >> sys.stderr, __doc__
print(msg, file=sys.stderr) print(__doc__, file=sys.stderr)
def usage(msg=None): if msg is not None: print >> sys.stderr, msg print >> sys.stderr, __doc__
4b4b89427d87518d9ad192a0b272bc7895013afc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/4b4b89427d87518d9ad192a0b272bc7895013afc/reindent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 12, 3576, 33, 7036, 4672, 309, 1234, 353, 486, 599, 30, 1172, 12, 3576, 16, 585, 33, 9499, 18, 11241, 13, 1172, 12, 972, 2434, 972, 16, 585, 33, 9499, 18, 11241, 13, 225, 2, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4084, 12, 3576, 33, 7036, 4672, 309, 1234, 353, 486, 599, 30, 1172, 12, 3576, 16, 585, 33, 9499, 18, 11241, 13, 1172, 12, 972, 2434, 972, 16, 585, 33, 9499, 18, 11241, 13, 225, 2, ...
def __init__(self, postr):
def __init__(self, postr, upload_queue):
def __init__(self, postr): threading.Thread.__init__(self) self.setDaemon(True) self.postr = postr
ae707731ea27e583eef75e3f658dc191f133b44f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11023/ae707731ea27e583eef75e3f658dc191f133b44f/postr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 949, 313, 16, 3617, 67, 4000, 4672, 17254, 18, 3830, 16186, 2738, 972, 12, 2890, 13, 365, 18, 542, 12858, 12, 5510, 13, 365, 18, 917, 313, 273, 949, 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, 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, 949, 313, 16, 3617, 67, 4000, 4672, 17254, 18, 3830, 16186, 2738, 972, 12, 2890, 13, 365, 18, 542, 12858, 12, 5510, 13, 365, 18, 917, 313, 273, 949, 31...
velocity = self.__oldPosDelta*(1.0/self.__oldDt)
if self.__oldDt == 0: velocity = 0 else: velocity = self.__oldPosDelta*(1.0/self.__oldDt)
def setPriorParentVector(self): assert self.notify.debugStateCall(self) if __debug__: onScreenDebug.add("__oldDt", "% 10.4f"%self.__oldDt) onScreenDebug.add("self.__oldPosDelta", self.__oldPosDelta.pPrintValues()) velocity = self.__oldPosDelta*(1.0/self.__oldDt) self.priorParent = Vec3(velocity) if __debug__: if self.wantDebugIndicator: onScreenDebug.add("priorParent", self.priorParent.pPrintValues())
3b57b93a982e84f815ed78d3cf510c88dffd4bca /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8543/3b57b93a982e84f815ed78d3cf510c88dffd4bca/GravityWalker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17004, 2432, 3054, 5018, 12, 2890, 4672, 1815, 365, 18, 12336, 18, 4148, 1119, 1477, 12, 2890, 13, 309, 1001, 4148, 972, 30, 603, 7956, 2829, 18, 1289, 2932, 972, 1673, 19739, 3113, 2213...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17004, 2432, 3054, 5018, 12, 2890, 4672, 1815, 365, 18, 12336, 18, 4148, 1119, 1477, 12, 2890, 13, 309, 1001, 4148, 972, 30, 603, 7956, 2829, 18, 1289, 2932, 972, 1673, 19739, 3113, 2213...
cellFrame, controlView)
cellFrame, view)
def drawInteriorWithFrame_inView_(self, cellFrame, view): super(ProgressCell, self).drawInteriorWithFrame_inView_( cellFrame, controlView) self.setControlView_(view) NSColor.controlColor().set() NSRectFill(cellFrame)
82ef1db3d518545b9f8de5df8d0363118ecc5ae0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/82ef1db3d518545b9f8de5df8d0363118ecc5ae0/ProgressCell.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 2465, 9659, 1190, 3219, 67, 267, 1767, 67, 12, 2890, 16, 2484, 3219, 16, 1476, 4672, 2240, 12, 5491, 4020, 16, 365, 2934, 9446, 2465, 9659, 1190, 3219, 67, 267, 1767, 67, 12, 248...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2465, 9659, 1190, 3219, 67, 267, 1767, 67, 12, 2890, 16, 2484, 3219, 16, 1476, 4672, 2240, 12, 5491, 4020, 16, 365, 2934, 9446, 2465, 9659, 1190, 3219, 67, 267, 1767, 67, 12, 248...
fp = open(filename)
fp = open(filename, encoding='utf-8')
def verify_bad_module(self, module_name): self.assertRaises(SyntaxError, __import__, 'test.' + module_name)
1b1d513a93780d622563049fff1f850276c73ccb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/1b1d513a93780d622563049fff1f850276c73ccb/test_coding.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 67, 8759, 67, 2978, 12, 2890, 16, 1605, 67, 529, 4672, 365, 18, 11231, 12649, 6141, 12, 22510, 16, 1001, 5666, 972, 16, 296, 3813, 1093, 397, 1605, 67, 529, 13, 2, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 67, 8759, 67, 2978, 12, 2890, 16, 1605, 67, 529, 4672, 365, 18, 11231, 12649, 6141, 12, 22510, 16, 1001, 5666, 972, 16, 296, 3813, 1093, 397, 1605, 67, 529, 13, 2, -100, -100, ...
file.Write(" parse_error::ParseError result =\n") file.Write(" Validate%s(this, immediate_data_size%s);\n" % (func.name, func.MakeOriginalArgString("", True))) file.Write(" if (result != parse_error::kParseNoError) {\n") file.Write(" return result;\n") file.Write(" }\n")
func.WriteHandlerValidation(file)
def WriteServiceImplementation(self, func, file): """Overrriden from TypeHandler.""" file.Write( "parse_error::ParseError GLES2DecoderImpl::Handle%s(\n" % func.name) file.Write( " uint32 immediate_data_size, const gles2::%s& c) {\n" % func.name) last_arg = func.GetLastOriginalArg()
ba3176a8f0a18527c0af5896f9d595d866e5ceeb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/ba3176a8f0a18527c0af5896f9d595d866e5ceeb/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1179, 13621, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 585, 18, 3067, 12, 315, 2670, 67, 1636, 2866, 21004, 611, 11386, 22, 7975, 2828, 286...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1179, 13621, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 585, 18, 3067, 12, 315, 2670, 67, 1636, 2866, 21004, 611, 11386, 22, 7975, 2828, 286...
conditional = conditional.split('&')
conditional = re.split('([|&])', conditional)
def extractConditional(idlFilePath): conditional = None # Read file and look for "interface [ Conditional=XXX ]". idlFile = open(idlFilePath) idlContents = idlFile.read().replace('\n', '') idlFile.close() match = conditionalPattern.search(idlContents) if match: conditional = match.group(1) conditional = conditional.split('&') return conditional
1caa5a7f3d95b6c1f96755f2dd329e99f51c7e06 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/1caa5a7f3d95b6c1f96755f2dd329e99f51c7e06/action_derivedsourcesallinone.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 14132, 12, 350, 80, 5598, 4672, 11139, 273, 599, 225, 468, 2720, 585, 471, 2324, 364, 315, 5831, 306, 22466, 33, 15639, 308, 9654, 612, 80, 812, 273, 1696, 12, 350, 80, 5598, 13,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 14132, 12, 350, 80, 5598, 4672, 11139, 273, 599, 225, 468, 2720, 585, 471, 2324, 364, 315, 5831, 306, 22466, 33, 15639, 308, 9654, 612, 80, 812, 273, 1696, 12, 350, 80, 5598, 13,...
if ContentType == '6' and self.has_kepubs == False:
if ContentType == '6' and MimeType == 'Shortcover':
def update_booklist(prefix, path, title, authors, mime, date, ContentType, ImageID, readstatus): changed = False # if path_to_ext(path) in self.FORMATS: try: lpath = path.partition(self.normalize_path(prefix))[2] if lpath.startswith(os.sep): lpath = lpath[len(os.sep):] lpath = lpath.replace('\\', '/') # debug_print("LPATH: ", lpath, " - Title: " , title)
f81cd1413e030f2174ff61a9b71a66e1df1e06f0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/f81cd1413e030f2174ff61a9b71a66e1df1e06f0/driver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 3618, 1098, 12, 3239, 16, 589, 16, 2077, 16, 14494, 16, 4892, 16, 1509, 16, 11691, 16, 3421, 734, 16, 855, 2327, 4672, 3550, 273, 1083, 468, 309, 589, 67, 869, 67, 408, 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, 1089, 67, 3618, 1098, 12, 3239, 16, 589, 16, 2077, 16, 14494, 16, 4892, 16, 1509, 16, 11691, 16, 3421, 734, 16, 855, 2327, 4672, 3550, 273, 1083, 468, 309, 589, 67, 869, 67, 408, 12,...
items1[j] = items2[i]
l1.ll_setitem_fast(j, l2.ll_getitem_fast(i))
def ll_listsetslice(l1, slice, l2): count = l2.ll_length() assert count == slice.stop - slice.start, ( "setslice cannot resize lists in RPython") # XXX but it should be easy enough to support, soon start = slice.start j = start items1 = l1.ll_items() items2 = l2.ll_items() i = 0 while i < count: items1[j] = items2[i] i += 1 j += 1
afabe8603c579750f81fa9c16896184dfa4a53b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/afabe8603c579750f81fa9c16896184dfa4a53b8/rlist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6579, 67, 1098, 4424, 2008, 12, 80, 21, 16, 2788, 16, 328, 22, 4672, 1056, 273, 328, 22, 18, 2906, 67, 2469, 1435, 1815, 1056, 422, 2788, 18, 5681, 300, 2788, 18, 1937, 16, 261, 315,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6579, 67, 1098, 4424, 2008, 12, 80, 21, 16, 2788, 16, 328, 22, 4672, 1056, 273, 328, 22, 18, 2906, 67, 2469, 1435, 1815, 1056, 422, 2788, 18, 5681, 300, 2788, 18, 1937, 16, 261, 315,...
site = ceToSite[gatekeeper] procThresh = self.siteThresholds[site]["processingThreshold"] minSubmit = self.siteThresholds[site]["minimumSubmission"] test = idle - procThresh
if ceToSite.get(gatekeeper): site = ceToSite[gatekeeper] procThresh = self.siteThresholds[site]["processingThreshold"] minSubmit = self.siteThresholds[site]["minimumSubmission"] maxSubmit = self.siteThresholds[site]["maximumSubmission"] test = idle - procThresh msg="CondorMonitor Proc: Site=%s, Idle=%s, Thresh=%s, Test=%s"%(site,idle,procThresh,test) logging.debug(msg)
def __call__(self): result = [] # // # // get list of all active gatekeepers from DB info #// activeGatekeepers = [ self.allSites[x]['CEName'] for x in self.activeSites ]
74d0e5c2e0ed6081ca29c5fde17459e315e2f3ad /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8887/74d0e5c2e0ed6081ca29c5fde17459e315e2f3ad/CondorMonitor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 4672, 563, 273, 5378, 468, 225, 368, 468, 368, 336, 666, 434, 777, 2695, 12611, 10102, 414, 628, 2383, 1123, 468, 759, 2695, 13215, 10102, 414, 273, 306, 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, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 4672, 563, 273, 5378, 468, 225, 368, 468, 368, 336, 666, 434, 777, 2695, 12611, 10102, 414, 628, 2383, 1123, 468, 759, 2695, 13215, 10102, 414, 273, 306, 365, ...
elif callable(item):
elif hasattr(item, "__call__"):
def _lookfor_generate_cache(module, import_modules, regenerate): """ Generate docstring cache for given module. Parameters ---------- module : str, None, module Module for which to generate docstring cache import_modules : bool Whether to import sub-modules in packages. regenerate: bool Re-generate the docstring cache Returns ------- cache : dict {obj_full_name: (docstring, kind, index), ...} Docstring cache for the module, either cached one (regenerate=False) or newly generated. """ global _lookfor_caches # Local import to speed up numpy's import time. import inspect from cStringIO import StringIO if module is None: module = "numpy" if isinstance(module, str): try: __import__(module) except ImportError: return {} module = sys.modules[module] elif isinstance(module, list) or isinstance(module, tuple): cache = {} for mod in module: cache.update(_lookfor_generate_cache(mod, import_modules, regenerate)) return cache if id(module) in _lookfor_caches and not regenerate: return _lookfor_caches[id(module)] # walk items and collect docstrings cache = {} _lookfor_caches[id(module)] = cache seen = {} index = 0 stack = [(module.__name__, module)] while stack: name, item = stack.pop(0) if id(item) in seen: continue seen[id(item)] = True index += 1 kind = "object" if inspect.ismodule(item): kind = "module" try: _all = item.__all__ except AttributeError: _all = None # import sub-packages if import_modules and hasattr(item, '__path__'): for pth in item.__path__: for mod_path in os.listdir(pth): this_py = os.path.join(pth, mod_path) init_py = os.path.join(pth, mod_path, '__init__.py') if os.path.isfile(this_py) and mod_path.endswith('.py'): to_import = mod_path[:-3] elif os.path.isfile(init_py): to_import = mod_path else: continue if to_import == '__init__': continue try: # Catch SystemExit, too base_exc = BaseException except NameError: # Python 2.4 doesn't have BaseException base_exc = Exception try: old_stdout = sys.stdout old_stderr = sys.stderr try: sys.stdout = StringIO() sys.stderr = StringIO() __import__("%s.%s" % (name, to_import)) finally: sys.stdout = old_stdout sys.stderr = old_stderr except base_exc: continue for n, v in _getmembers(item): item_name = getattr(v, '__name__', "%s.%s" % (name, n)) mod_name = getattr(v, '__module__', None) if '.' not in item_name and mod_name: item_name = "%s.%s" % (mod_name, item_name) if not item_name.startswith(name + '.'): # don't crawl foreign objects continue elif not (inspect.ismodule(v) or _all is None or n in _all): continue stack.append(("%s.%s" % (name, n), v)) elif inspect.isclass(item): kind = "class" for n, v in _getmembers(item): stack.append(("%s.%s" % (name, n), v)) elif callable(item): kind = "func" doc = inspect.getdoc(item) if doc is not None: cache[name] = (doc, kind, index) return cache
0a56dcb06b49721fa0b758c58183f580da1eb51a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14925/0a56dcb06b49721fa0b758c58183f580da1eb51a/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7330, 1884, 67, 7163, 67, 2493, 12, 2978, 16, 1930, 67, 6400, 16, 20821, 4672, 3536, 6654, 14525, 1247, 364, 864, 1605, 18, 225, 7012, 12181, 1605, 294, 609, 16, 599, 16, 1605, 59...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7330, 1884, 67, 7163, 67, 2493, 12, 2978, 16, 1930, 67, 6400, 16, 20821, 4672, 3536, 6654, 14525, 1247, 364, 864, 1605, 18, 225, 7012, 12181, 1605, 294, 609, 16, 599, 16, 1605, 59...
OUTPUT: a permutation group EXAMPLES: We explicitly construct the alternating group on four elements. ::
OUTPUT: - A permutation group. EXAMPLES: We explicitly construct the alternating group on four elements::
def __init__(self, gens=None, gap_group=None, canonicalize=True): r""" INPUT: - ``gens`` - list of generators - ``gap_group`` - a gap permutation group - ``canonicalize`` - bool (default: True), if True sort generators and remove duplicates OUTPUT: a permutation group EXAMPLES: We explicitly construct the alternating group on four elements. :: sage: A4 = PermutationGroup([[(1,2,3)],[(2,3,4)]]); A4 Permutation Group with generators [(2,3,4), (1,2,3)] sage: A4.__init__([[(1,2,3)],[(2,3,4)]]); A4 Permutation Group with generators [(2,3,4), (1,2,3)] sage: A4.center() Permutation Group with generators [()] sage: loads(A4.dumps()) == A4 True """ if (gens is None and gap_group is None): raise ValueError, "you must specify gens or gap_group"
6ac30ecf5071d4fb909072e90d2311932d8c2165 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/6ac30ecf5071d4fb909072e90d2311932d8c2165/permgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 314, 773, 33, 7036, 16, 9300, 67, 1655, 33, 7036, 16, 25839, 33, 5510, 4672, 436, 8395, 12943, 30, 282, 300, 225, 12176, 23730, 10335, 300, 666, 434, 133...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 314, 773, 33, 7036, 16, 9300, 67, 1655, 33, 7036, 16, 25839, 33, 5510, 4672, 436, 8395, 12943, 30, 282, 300, 225, 12176, 23730, 10335, 300, 666, 434, 133...
slave_fd = slave_open(tty_name)
def fork(): """Fork and make the child a session leader with a controlling terminal. Return (pid, master_fd).""" master_fd, tty_name = master_open() pid = os.fork() if pid == CHILD: # Establish a new session. os.setsid() # Acquire controlling terminal. slave_fd = slave_open(tty_name) os.close(master_fd) # Slave becomes stdin/stdout/stderr of child. os.dup2(slave_fd, STDIN_FILENO) os.dup2(slave_fd, STDOUT_FILENO) os.dup2(slave_fd, STDERR_FILENO) if (slave_fd > STDERR_FILENO): os.close (slave_fd) # Parent and child process. return pid, master_fd
a87d564be8a68bd3ff2121048095aeb3e46fb7d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a87d564be8a68bd3ff2121048095aeb3e46fb7d4/pty.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12515, 13332, 3536, 22662, 471, 1221, 326, 1151, 279, 1339, 10302, 598, 279, 3325, 2456, 8651, 18, 2000, 261, 6610, 16, 4171, 67, 8313, 13, 12123, 4171, 67, 8313, 16, 21520, 67, 529, 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, 12515, 13332, 3536, 22662, 471, 1221, 326, 1151, 279, 1339, 10302, 598, 279, 3325, 2456, 8651, 18, 2000, 261, 6610, 16, 4171, 67, 8313, 13, 12123, 4171, 67, 8313, 16, 21520, 67, 529, 273...
title='Important reports', lang='en')
title='Important reports', lang='en')
def update_countries_1(self): """ """ from Products.NaayaCore.PortletsTool.HTMLPortlet import addHTMLPortlet for x in self.countries.objectValues(METATYPE_NYCOUNTRY): addHTMLPortlet(x, id=x.get_portlet_indicators_id(), title='Key indicators', lang='en') addHTMLPortlet(x, id=x.get_portlet_reports_id(), title='Important reports', lang='en')
ffeb211164a19371c4ffa202b70c9aa9c9628d54 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/ffeb211164a19371c4ffa202b70c9aa9c9628d54/SEMIDESite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 22904, 67, 21, 12, 2890, 4672, 3536, 3536, 628, 8094, 87, 18, 24101, 528, 69, 4670, 18, 2617, 17307, 6364, 18, 4870, 18566, 1930, 527, 4870, 18566, 364, 619, 316, 365, 18, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 22904, 67, 21, 12, 2890, 4672, 3536, 3536, 628, 8094, 87, 18, 24101, 528, 69, 4670, 18, 2617, 17307, 6364, 18, 4870, 18566, 1930, 527, 4870, 18566, 364, 619, 316, 365, 18, 22...
read_and_call(uhandle, consumer.matrix, start='Matrix')
attempt_read_and_call(uhandle, consumer.matrix, start='Matrix')
def _scan_parameters(self, uhandle, consumer): # Matrix: BLOSUM62 # Gap Penalties: Existence: 11, Extension: 1 # Number of Hits to DB: 50604 # Number of Sequences: 1323 # Number of extensions: 1526 # Number of successful extensions: 6 # Number of sequences better than 10.0: 5 # Number of HSP's better than 10.0 without gapping: 5 # Number of HSP's successfully gapped in prelim test: 0 # Number of HSP's that attempted gapping in prelim test: 1 # Number of HSP's gapped (non-prelim): 5 # length of query: 140 # length of database: 223,339 # effective HSP length: 39 # effective length of query: 101 # effective length of database: 171,742 # effective search space: 17345942 # effective search space used: 17345942 # T: 11 # A: 40 # X1: 16 ( 7.4 bits) # X2: 38 (14.8 bits) # X3: 64 (24.9 bits) # S1: 41 (21.9 bits) # S2: 42 (20.8 bits)
9cf337202ffcb7031dc68664b847a12547d05c07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/9cf337202ffcb7031dc68664b847a12547d05c07/NCBIStandalone.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9871, 67, 3977, 12, 2890, 16, 582, 4110, 16, 4765, 4672, 468, 7298, 30, 605, 1502, 14020, 8898, 468, 611, 438, 453, 275, 2390, 606, 30, 22558, 802, 30, 4648, 16, 10021, 30, 404, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9871, 67, 3977, 12, 2890, 16, 582, 4110, 16, 4765, 4672, 468, 7298, 30, 605, 1502, 14020, 8898, 468, 611, 438, 453, 275, 2390, 606, 30, 22558, 802, 30, 4648, 16, 10021, 30, 404, ...
return HttpClient._prepare_connection(self, url, headers) else: proxy = os.environ.get('http_proxy') if proxy:
def _prepare_connection(self, url, headers): proxy_auth = _get_proxy_auth(url.protocol) if url.protocol == 'https': # destination is https proxy = os.environ.get('https_proxy') if proxy: # Set any proxy auth headers if proxy_auth: proxy_auth = 'Proxy-authorization: %s' % proxy_auth # Construct the proxy connect command. port = url.port if not port: port = '443' proxy_connect = 'CONNECT %s:%s HTTP/1.0\r\n' % (url.host, port) # Set the user agent to send to the proxy if headers and 'User-Agent' in headers: user_agent = 'User-Agent: %s\r\n' % (headers['User-Agent']) else: user_agent = '' proxy_pieces = '%s%s%s\r\n' % (proxy_connect, proxy_auth, user_agent) # Find the proxy host and port. proxy_url = atom.url.parse_url(proxy) if not proxy_url.port: proxy_url.port = '80' # Connect to the proxy server, very simple recv and error checking p_sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM) p_sock.connect((proxy_url.host, int(proxy_url.port))) p_sock.sendall(proxy_pieces) response = ''
fd7144c02bd0a385dbf6cd8b54d685ceef911565 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6580/fd7144c02bd0a385dbf6cd8b54d685ceef911565/http.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9366, 67, 4071, 12, 2890, 16, 880, 16, 1607, 4672, 2889, 67, 1944, 273, 389, 588, 67, 5656, 67, 1944, 12, 718, 18, 8373, 13, 309, 880, 18, 8373, 422, 296, 4528, 4278, 468, 2929,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9366, 67, 4071, 12, 2890, 16, 880, 16, 1607, 4672, 2889, 67, 1944, 273, 389, 588, 67, 5656, 67, 1944, 12, 718, 18, 8373, 13, 309, 880, 18, 8373, 422, 296, 4528, 4278, 468, 2929,...
result = rslt result = [u""]
def serializeNode(node, opts, rslt, enableBreaks=False, enableVerbose=False): global indent global result global pretty global verbose global breaks global afterLine global afterBreak global afterDoc global afterDivider global afterArea global options result = rslt
66942a31e30537eb739b144d8b46c3b613b2076a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/66942a31e30537eb739b144d8b46c3b613b2076a/Packer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4472, 907, 12, 2159, 16, 1500, 16, 22841, 16, 4237, 26806, 33, 8381, 16, 4237, 14489, 33, 8381, 4672, 2552, 3504, 2552, 563, 2552, 7517, 2552, 3988, 2552, 16217, 2552, 1839, 1670, 2552, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4472, 907, 12, 2159, 16, 1500, 16, 22841, 16, 4237, 26806, 33, 8381, 16, 4237, 14489, 33, 8381, 4672, 2552, 3504, 2552, 563, 2552, 7517, 2552, 3988, 2552, 16217, 2552, 1839, 1670, 2552, ...
self.lock()
lock = self.lock()
def undo(self): self.lock() if os.path.exists(self.join("undo")): f = self.changelog.read(self.changelog.tip())[3] self.ui.status("attempting to rollback last transaction\n") rollback(self.opener, self.join("undo")) self.manifest = manifest(self.opener) self.changelog = changelog(self.opener)
ba524319b7370bd5822ee0eab512f9e6b957ce45 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/ba524319b7370bd5822ee0eab512f9e6b957ce45/hg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15436, 12, 2890, 4672, 2176, 273, 365, 18, 739, 1435, 309, 1140, 18, 803, 18, 1808, 12, 2890, 18, 5701, 2932, 31226, 6, 3719, 30, 284, 273, 365, 18, 24083, 12970, 18, 896, 12, 2890, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15436, 12, 2890, 4672, 2176, 273, 365, 18, 739, 1435, 309, 1140, 18, 803, 18, 1808, 12, 2890, 18, 5701, 2932, 31226, 6, 3719, 30, 284, 273, 365, 18, 24083, 12970, 18, 896, 12, 2890, ...
execf2 = ctx2.parents()[0].manifest().copy().execf
mc = ctx2.parents()[0].manifest().copy() execf2 = mc.execf linkf2 = mc.linkf
def getfilectx(f, ctx): flctx = ctx.filectx(f, filelog=flcache.get(f)) if f not in flcache: flcache[f] = flctx._filelog return flctx
bc2dbf91424b73253110ff9f2e7af369f2995f54 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11312/bc2dbf91424b73253110ff9f2e7af369f2995f54/patch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 768, 5900, 12, 74, 16, 1103, 4672, 1183, 5900, 273, 1103, 18, 768, 5900, 12, 74, 16, 661, 12970, 33, 2242, 2493, 18, 588, 12, 74, 3719, 309, 284, 486, 316, 1183, 2493, 30, 1183,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 768, 5900, 12, 74, 16, 1103, 4672, 1183, 5900, 273, 1103, 18, 768, 5900, 12, 74, 16, 661, 12970, 33, 2242, 2493, 18, 588, 12, 74, 3719, 309, 284, 486, 316, 1183, 2493, 30, 1183,...
return s.split(NUL, 1)[0]
return s.rstrip(NUL)
def nts(s): """Convert a null-terminated string buffer to a python string. """ return s.split(NUL, 1)[0]
e8f9a44295dbacb3f8b8da19833f8d4d452115fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/e8f9a44295dbacb3f8b8da19833f8d4d452115fb/tarfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 290, 3428, 12, 87, 4672, 3536, 2723, 279, 446, 17, 29133, 533, 1613, 358, 279, 5790, 533, 18, 3536, 327, 272, 18, 86, 6406, 12, 50, 1506, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 290, 3428, 12, 87, 4672, 3536, 2723, 279, 446, 17, 29133, 533, 1613, 358, 279, 5790, 533, 18, 3536, 327, 272, 18, 86, 6406, 12, 50, 1506, 13, 225, 2, -100, -100, -100, -100, -100, -1...
return ret
return ret
def xorstr( a, b ): if len(a) != len(b): raise "xorstr(): lengths differ" ret = '' for i in range(len(a)): ret += chr(ord(a[i]) ^ ord(b[i])) return ret
adc8746dabba5a5936767cddc028f6c33b858a4c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/adc8746dabba5a5936767cddc028f6c33b858a4c/pbkdf2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17586, 701, 12, 279, 16, 324, 262, 30, 309, 562, 12, 69, 13, 480, 562, 12, 70, 4672, 1002, 315, 31346, 701, 13332, 10917, 15221, 6, 225, 325, 273, 875, 364, 277, 316, 1048, 12, 1897,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17586, 701, 12, 279, 16, 324, 262, 30, 309, 562, 12, 69, 13, 480, 562, 12, 70, 4672, 1002, 315, 31346, 701, 13332, 10917, 15221, 6, 225, 325, 273, 875, 364, 277, 316, 1048, 12, 1897,...
3) set evt to true to let the parent know we're done
3) [optional] if test_done is not None, it's an event; wait for parent to set test_done before closing connection 4) set evt to true to let the parent know we're done
def server(evt, serv, dataq=None): """ Open a tcp server in three steps 1) set evt to true to let the parent know we are ready 2) [optional] if is not False, write the list of data from dataq.get() to the socket. 3) set evt to true to let the parent know we're done """ serv.listen(5) evt.set() try: conn, addr = serv.accept() if dataq: data = b'' new_data = dataq.get(True, 0.5) dataq.task_done() for item in new_data: if item == EOF_sigil: break if type(item) in [int, float]: time.sleep(item) else: data += item written = conn.send(data) data = data[written:] except socket.timeout: pass finally: serv.close() evt.set()
23454cc9b95762fba5574ff1889a3486a73001d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/23454cc9b95762fba5574ff1889a3486a73001d3/test_telnetlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1438, 12, 73, 11734, 16, 13515, 16, 501, 85, 33, 7036, 4672, 3536, 3502, 279, 9658, 1438, 316, 8925, 6075, 404, 13, 444, 6324, 358, 638, 358, 2231, 326, 982, 5055, 732, 854, 5695, 576,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1438, 12, 73, 11734, 16, 13515, 16, 501, 85, 33, 7036, 4672, 3536, 3502, 279, 9658, 1438, 316, 8925, 6075, 404, 13, 444, 6324, 358, 638, 358, 2231, 326, 982, 5055, 732, 854, 5695, 576,...
return val, _quote( dumps(val) )
return val, _quote( dumps(val).decode('latin-1') )
def value_encode(self, val): return val, _quote( dumps(val) )
f167a8efcc6ffae538e8e5550307d5bebb4c4a27 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/f167a8efcc6ffae538e8e5550307d5bebb4c4a27/Cookie.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 460, 67, 3015, 12, 2890, 16, 1244, 4672, 327, 1244, 16, 389, 6889, 12, 6711, 12, 1125, 13, 262, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 460, 67, 3015, 12, 2890, 16, 1244, 4672, 327, 1244, 16, 389, 6889, 12, 6711, 12, 1125, 13, 262, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
shuffled_records[ns] = list(test_records)
shuffled_records[ns.ip] = list(test_records)
def _SingleTestRun(self, test_records): """Manage and execute a single test-run on all nameservers.
2c42206e842762b2e00f9dd574e3b673ee0d2469 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4170/2c42206e842762b2e00f9dd574e3b673ee0d2469/benchmark.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5281, 4709, 1997, 12, 2890, 16, 1842, 67, 7094, 4672, 3536, 21258, 471, 1836, 279, 2202, 1842, 17, 2681, 603, 777, 1257, 29638, 18, 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, 0, 0, 0, 0, 0, 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, 5281, 4709, 1997, 12, 2890, 16, 1842, 67, 7094, 4672, 3536, 21258, 471, 1836, 279, 2202, 1842, 17, 2681, 603, 777, 1257, 29638, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100...
setup(name = 'spytify', version = 'v0.1', description = 'spytify - Python bindings for libdespotify', author = 'Jørgen Pedersen Tjernø', author_email = 'jorgen@devsoft.no', license = 'New BSD (3-clause BSD)', ext_modules = [Extension('spytify', ['src/callback.c', 'src/spytify.c'], **pkgconfig('despotify'))] )
password = getpass("Enter your password: ").strip() if not password: print >>sys.stderr, "Empty password, exiting." sys.exit(1)
def pkgconfig(*packages, **kw): flag_map = {'-I': 'include_dirs', '-L': 'library_dirs', '-l': 'libraries'} for token in commands.getoutput("pkg-config --libs --cflags %s" % ' '.join(packages)).split(): if flag_map.has_key(token[:2]): kw.setdefault(flag_map.get(token[:2]), []).append(token[2:]) else: # throw others to extra_link_args kw.setdefault('extra_link_args', []).append(token) for k, v in kw.iteritems(): # remove duplicated kw[k] = list(set(v)) return kw
08f7ab0787e7ae694c61e83d1ae8f19e5442d37c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11577/08f7ab0787e7ae694c61e83d1ae8f19e5442d37c/test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3475, 1425, 30857, 10308, 16, 2826, 9987, 4672, 2982, 67, 1458, 273, 13666, 17, 45, 4278, 296, 6702, 67, 8291, 2187, 2400, 48, 4278, 296, 12083, 67, 8291, 2187, 2400, 80, 4278, 296, 3141...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3475, 1425, 30857, 10308, 16, 2826, 9987, 4672, 2982, 67, 1458, 273, 13666, 17, 45, 4278, 296, 6702, 67, 8291, 2187, 2400, 48, 4278, 296, 12083, 67, 8291, 2187, 2400, 80, 4278, 296, 3141...
list of pairs (root, multiplicity)
list of pairs (root, multiplicity) or list of roots
def roots(self, x=None, explicit_solutions=True): r""" Returns roots of \code{self} that can be found exactly, with multiplicities. Not all root are guaranteed to be found.
d471d8ec9f13193e3daf6f31409fcd9fa17d1fcb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/d471d8ec9f13193e3daf6f31409fcd9fa17d1fcb/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12876, 12, 2890, 16, 619, 33, 7036, 16, 5515, 67, 18281, 6170, 33, 5510, 4672, 436, 8395, 2860, 12876, 434, 521, 710, 95, 2890, 97, 716, 848, 506, 1392, 8950, 16, 598, 3309, 1780, 1961...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12876, 12, 2890, 16, 619, 33, 7036, 16, 5515, 67, 18281, 6170, 33, 5510, 4672, 436, 8395, 2860, 12876, 434, 521, 710, 95, 2890, 97, 716, 848, 506, 1392, 8950, 16, 598, 3309, 1780, 1961...
pdict['Package'].append(pkgname)
pdict['Package'].add(pkgname)
def __init__(self, data, pdict, parent=None): # copy local attributes to all child nodes if no local attribute exists if not pdict.has_key('Package'): pdict['Package'] = pdlist() for child in data.getchildren(): for attr in [key for key in data.attrib.keys() \ if key != 'name' and not child.attrib.has_key(key)]: try: child.set(attr, data.get(attr)) except: # don't fail on things like comments and other immutable elements pass Bcfg2.Server.Plugin.INode.__init__(self, data, pdict, parent) if not self.contents.has_key('Package'): self.contents['Package'] = FuzzyDict() for pkg in data.findall('./Package'): if pkg.attrib.has_key('name') and pkg.get('name') not in pdict['Package']: pdict['Package'].add(pkg.get('name')) if pkg.get('name') != None: self.contents['Package'][pkg.get('name')] = {} if pkg.getchildren(): self.contents['Package'][pkg.get('name')]['__children__'] \ = pkg.getchildren() if pkg.attrib.has_key('simplefile'): pkg.set('url', "%s/%s" % (pkg.get('uri'), pkg.get('simplefile'))) self.contents['Package'][pkg.get('name')].update(pkg.attrib) else: if pkg.attrib.has_key('file'): if pkg.attrib.has_key('multiarch'): archs = pkg.get('multiarch').split() srcs = pkg.get('srcs', pkg.get('multiarch')).split() url = ' '.join(["%s/%s" % (pkg.get('uri'), pkg.get('file') % {'src':srcs[idx], 'arch':archs[idx]}) for idx in range(len(archs))]) pkg.set('url', url) else: pkg.set('url', '%s/%s' % (pkg.get('uri'), pkg.get('file'))) if self.splitters.has_key(pkg.get('type')) and pkg.get('file') != None: mdata = self.splitters[pkg.get('type')].match(pkg.get('file')) if not mdata: logger.error("Failed to match pkg %s" % pkg.get('file')) continue pkgname = mdata.group('name') self.contents['Package'][pkgname] = mdata.groupdict() self.contents['Package'][pkgname].update(pkg.attrib) if pkg.attrib.get('file'): self.contents['Package'][pkgname]['url'] = pkg.get('url') self.contents['Package'][pkgname]['type'] = pkg.get('type') if pkg.get('verify'): self.contents['Package'][pkgname]['verify'] = pkg.get('verify') if pkg.get('multiarch'): self.contents['Package'][pkgname]['multiarch'] = pkg.get('multiarch') if pkgname not in pdict['Package']: pdict['Package'].append(pkgname) if pkg.getchildren(): self.contents['Package'][pkgname]['__children__'] = pkg.getchildren() else: self.contents['Package'][pkg.get('name')].update(pkg.attrib)
abf79b249aab9e343f51dea9c9f6b2ec0676060b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11867/abf79b249aab9e343f51dea9c9f6b2ec0676060b/Pkgmgr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 501, 16, 293, 1576, 16, 982, 33, 7036, 4672, 468, 1610, 1191, 1677, 358, 777, 1151, 2199, 309, 1158, 1191, 1566, 1704, 309, 486, 293, 1576, 18, 5332, 67,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 501, 16, 293, 1576, 16, 982, 33, 7036, 4672, 468, 1610, 1191, 1677, 358, 777, 1151, 2199, 309, 1158, 1191, 1566, 1704, 309, 486, 293, 1576, 18, 5332, 67,...
w("\t\tmainGroup = %s;\n" % self.mainGroup)
w("\t\tprojectRoot=\"\";\n")
def writePBXProject(self): w = self.file.write w("/* Begin PBXProject section */\n") w("\t%s /* Project object */ = {\n" % self.projectID) w("\t\tisa = PBXProject;\n") w("\t\tcompatibilityVersion = \"%s\";\n" % self.version[0]) w("\t\tbuildConfigurationList = %s;\n" % self.buildSettingsId[0]) w("\t\thasScannedForEncodings = 1;\n") w("\t\tprojectDirPath=\"\";\n") w("\t\tmainGroup = %s;\n" % self.mainGroup) w("\t\ttargets = (\n") for d in self.projects: if d.type in ['game', 'tool']: w("\t\t\t%s,\n" % d.targetId) for d in self.projects: if d.type in ['library', 'static_library', 'plugin']: w("\t\t\t%s,\n" % d.targetId) w("\t\t);\n") w("\t};\n") w("/* End PBXProject section */\n\n")
c73f2456ec51b2b4797d870c08f234ed68da574a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7302/c73f2456ec51b2b4797d870c08f234ed68da574a/xcode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 20724, 60, 4109, 12, 2890, 4672, 341, 273, 365, 18, 768, 18, 2626, 341, 2932, 20308, 14323, 20819, 60, 4109, 2442, 1195, 64, 82, 7923, 341, 31458, 88, 9, 87, 1748, 5420, 733, 119...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 20724, 60, 4109, 12, 2890, 4672, 341, 273, 365, 18, 768, 18, 2626, 341, 2932, 20308, 14323, 20819, 60, 4109, 2442, 1195, 64, 82, 7923, 341, 31458, 88, 9, 87, 1748, 5420, 733, 119...
testdir=None, huntrleaks=False):
testdir=None, huntrleaks=False, debug=False):
def runtest_inner(test, generate, verbose, quiet, testdir=None, huntrleaks=False): test_support.unload(test) if not testdir: testdir = findtestdir() outputdir = os.path.join(testdir, "output") outputfile = os.path.join(outputdir, test) if verbose: cfp = None else: cfp = cStringIO.StringIO() try: save_stdout = sys.stdout try: if cfp: sys.stdout = cfp print(test) # Output file starts with test name if test.startswith('test.'): abstest = test else: # Always import it from the test package abstest = 'test.' + test the_package = __import__(abstest, globals(), locals(), []) the_module = getattr(the_package, test) # Most tests run to completion simply as a side-effect of # being imported. For the benefit of tests that can't run # that way (like test_threaded_import), explicitly invoke # their test_main() function (if it exists). indirect_test = getattr(the_module, "test_main", None) if indirect_test is not None: indirect_test() if huntrleaks: dash_R(the_module, test, indirect_test, huntrleaks) finally: sys.stdout = save_stdout except test_support.ResourceDenied as msg: if not quiet: print(test, "skipped --", msg) sys.stdout.flush() return -2 except (ImportError, test_support.TestSkipped) as msg: if not quiet: print(test, "skipped --", msg) sys.stdout.flush() return -1 except KeyboardInterrupt: raise except test_support.TestFailed as msg: print("test", test, "failed --", msg) sys.stdout.flush() return 0 except: type, value = sys.exc_info()[:2] print("test", test, "crashed --", str(type) + ":", value) sys.stdout.flush() if verbose: traceback.print_exc(file=sys.stdout) sys.stdout.flush() return 0 else: if not cfp: return 1 output = cfp.getvalue() if generate: if output == test + "\n": if os.path.exists(outputfile): # Write it since it already exists (and the contents # may have changed), but let the user know it isn't # needed: print("output file", outputfile, \ "is no longer needed; consider removing it") else: # We don't need it, so don't create it. return 1 fp = open(outputfile, "w") fp.write(output) fp.close() return 1 if os.path.exists(outputfile): fp = open(outputfile, "r") expected = fp.read() fp.close() else: expected = test + "\n" if output == expected or huntrleaks: return 1 print("test", test, "produced unexpected output:") sys.stdout.flush() reportdiff(expected, output) sys.stdout.flush() return 0
b3e3fca047db11e5db0b95c81653d8a87054ce65 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/b3e3fca047db11e5db0b95c81653d8a87054ce65/regrtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 3813, 67, 7872, 12, 3813, 16, 2103, 16, 3988, 16, 10902, 16, 1842, 1214, 33, 7036, 16, 366, 318, 313, 298, 581, 87, 33, 8381, 16, 1198, 33, 8381, 4672, 1842, 67, 13261, 18, 318...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3813, 67, 7872, 12, 3813, 16, 2103, 16, 3988, 16, 10902, 16, 1842, 1214, 33, 7036, 16, 366, 318, 313, 298, 581, 87, 33, 8381, 16, 1198, 33, 8381, 4672, 1842, 67, 13261, 18, 318...
before = [l.rstrip('\n') for l in lines[lbound:lineno]] line = lines[lineno].rstrip('\n') after = [l.rstrip('\n') for l in lines[lineno + 1:ubound]]
charset = None rep = re.compile('coding[=:]\s*([-\w.]+)') for linestr in lines[0], lines[1]: match = rep.search(linestr) if match: charset = match.group(1) break before = [to_unicode(l.rstrip('\n'), charset) for l in lines[lbound:lineno]] line = to_unicode(lines[lineno].rstrip('\n'), charset) after = [to_unicode(l.rstrip('\n'), charset) \ for l in lines[lineno + 1:ubound]]
def get_lines_from_file(filename, lineno, context=0): """Return `content` number of lines before and after the specified `lineno` from the file identified by `filename`. Returns a `(lines_before, line, lines_after)` tuple. """ if os.path.isfile(filename): fileobj = open(filename, 'U') try: lines = fileobj.readlines() lbound = max(0, lineno - context) ubound = lineno + 1 + context before = [l.rstrip('\n') for l in lines[lbound:lineno]] line = lines[lineno].rstrip('\n') after = [l.rstrip('\n') for l in lines[lineno + 1:ubound]] return before, line, after finally: fileobj.close() return (), None, ()
d02aae88caae087c0715c97a22ebe0b857bcb116 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9317/d02aae88caae087c0715c97a22ebe0b857bcb116/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3548, 67, 2080, 67, 768, 12, 3459, 16, 7586, 16, 819, 33, 20, 4672, 3536, 990, 1375, 1745, 68, 1300, 434, 2362, 1865, 471, 1839, 326, 1269, 1375, 17782, 68, 628, 326, 585, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3548, 67, 2080, 67, 768, 12, 3459, 16, 7586, 16, 819, 33, 20, 4672, 3536, 990, 1375, 1745, 68, 1300, 434, 2362, 1865, 471, 1839, 326, 1269, 1375, 17782, 68, 628, 326, 585, 9...
self.quit()
Engine.quit(self)
def restart(self): """Restart the game.""" if not self.restartRequested: self.restartRequested = True self.input.broadcastSystemEvent("restartRequested") else: self.quit()
8d54b713f3adc9cc79283393ef3f20402eb26471 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7946/8d54b713f3adc9cc79283393ef3f20402eb26471/GameEngine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7870, 12, 2890, 4672, 3536, 15057, 326, 7920, 12123, 309, 486, 365, 18, 19164, 11244, 30, 365, 18, 19164, 11244, 273, 1053, 365, 18, 2630, 18, 19805, 3163, 1133, 2932, 19164, 11244, 7923, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7870, 12, 2890, 4672, 3536, 15057, 326, 7920, 12123, 309, 486, 365, 18, 19164, 11244, 30, 365, 18, 19164, 11244, 273, 1053, 365, 18, 2630, 18, 19805, 3163, 1133, 2932, 19164, 11244, 7923, ...
ct = (color.red / 256, color.green / 255, color.blue / 255)
ct = (color.red / 256, color.green / 256, color.blue / 256)
def set_color(self, button): color = button.get_color() ct = (color.red / 256, color.green / 255, color.blue / 255) config.set("settings", "osdcolor", "#%02x%02x%02x" % ct)
8350e310ca163bcb862bf93f2b78fcb26e2ef721 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/8350e310ca163bcb862bf93f2b78fcb26e2ef721/quodlibet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 3266, 12, 2890, 16, 3568, 4672, 2036, 273, 3568, 18, 588, 67, 3266, 1435, 5691, 273, 261, 3266, 18, 1118, 342, 8303, 16, 2036, 18, 11571, 342, 8303, 16, 2036, 18, 14081, 342, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3266, 12, 2890, 16, 3568, 4672, 2036, 273, 3568, 18, 588, 67, 3266, 1435, 5691, 273, 261, 3266, 18, 1118, 342, 8303, 16, 2036, 18, 11571, 342, 8303, 16, 2036, 18, 14081, 342, ...
else:
elif DEBUG:
def _interpret(self): # Execute the frames forward until we raise a DoneWithThisFrame, # a ContinueRunningNormally, or a GenerateMergePoint exception. if not we_are_translated(): history.log.event('ENTER' + self.history.extratext) self.staticdata.stats.enter_count += 1 else: debug_print('~~~ ENTER', self.history.extratext) try: while True: self.framestack[-1].run_one_step() finally: if not we_are_translated(): history.log.event('LEAVE' + self.history.extratext) else: debug_print('~~~ LEAVE', self.history.extratext)
7d4f6d7b47f3baca5c02240f5775709621644903 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/7d4f6d7b47f3baca5c02240f5775709621644903/pyjitpl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 24713, 12, 2890, 4672, 468, 7903, 326, 7793, 5104, 3180, 732, 1002, 279, 8677, 1190, 2503, 3219, 16, 468, 279, 16773, 7051, 14624, 1230, 16, 578, 279, 6654, 6786, 2148, 1520, 18, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 24713, 12, 2890, 4672, 468, 7903, 326, 7793, 5104, 3180, 732, 1002, 279, 8677, 1190, 2503, 3219, 16, 468, 279, 16773, 7051, 14624, 1230, 16, 578, 279, 6654, 6786, 2148, 1520, 18, 30...
if (time):
if (time) and (time != 'None'):
def GetAcquisitionTime(self): """ Return string containing the acquisition time using the format "hh:mm:ss". Return "" (empty string) if not set.
f4bb8776261436490c9d86a319a745d9122690d8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10228/f4bb8776261436490c9d86a319a745d9122690d8/dicom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 9988, 22094, 950, 12, 2890, 4672, 3536, 2000, 533, 4191, 326, 1721, 22094, 813, 1450, 326, 740, 315, 21622, 30, 7020, 30, 1049, 9654, 2000, 1408, 261, 5531, 533, 13, 309, 486, 444, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 968, 9988, 22094, 950, 12, 2890, 4672, 3536, 2000, 533, 4191, 326, 1721, 22094, 813, 1450, 326, 740, 315, 21622, 30, 7020, 30, 1049, 9654, 2000, 1408, 261, 5531, 533, 13, 309, 486, 444, ...
try: fields = fields.items() except AttributeError: pass
def create_table(self, table_name, fields): """ Creates the table 'table_name'. 'fields' is a tuple of fields, each repsented by a 2-part tuple of field name and a django.db.models.fields.Field object """ qn = connection.ops.quote_name # allow fields to be a dictionary try: fields = fields.items() except AttributeError: pass columns = [ self.column_sql(table_name, field_name, field) for field_name, field in fields ] self.execute('CREATE TABLE %s (%s);' % (qn(table_name), ', '.join([col for col in columns if col])))
99e3a99c5cfacb50e48488520c486365b0e90577 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13142/99e3a99c5cfacb50e48488520c486365b0e90577/generic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2121, 12, 2890, 16, 1014, 67, 529, 16, 1466, 4672, 3536, 10210, 326, 1014, 296, 2121, 67, 529, 10332, 296, 2821, 11, 353, 279, 3193, 434, 1466, 16, 1517, 283, 1121, 319, 329, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2121, 12, 2890, 16, 1014, 67, 529, 16, 1466, 4672, 3536, 10210, 326, 1014, 296, 2121, 67, 529, 10332, 296, 2821, 11, 353, 279, 3193, 434, 1466, 16, 1517, 283, 1121, 319, 329, ...
time.sleep(0.3)
time.sleep(1.0)
def test(): import time, sys Message("Testing EasyDialogs.") optionlist = (('v', 'Verbose'), ('verbose', 'Verbose as long option'), ('flags=', 'Valued option'), ('f:', 'Short valued option')) commandlist = (('start', 'Start something'), ('stop', 'Stop something')) argv = GetArgv(optionlist=optionlist, commandlist=commandlist, addoldfile=0) for i in range(len(argv)): print 'arg[%d] = %s'%(i, `argv[i]`) print 'Type return to continue - ', sys.stdin.readline() ok = AskYesNoCancel("Do you want to proceed?") ok = AskYesNoCancel("Do you want to identify?", yes="Identify", no="No") if ok > 0: s = AskString("Enter your first name", "Joe") s2 = AskPassword("Okay %s, tell us your nickname"%s, s, cancel="None") if not s2: Message("%s has no secret nickname"%s) else: Message("Hello everybody!!\nThe secret nickname of %s is %s!!!"%(s, s2)) text = ( "Working Hard...", "Hardly Working..." , "So far, so good!", "Keep on truckin'" ) bar = ProgressBar("Progress, progress...", 100) try: appsw = MacOS.SchedParams(1, 0) for i in range(100): bar.set(i) time.sleep(0.1) if i % 10 == 0: bar.label(text[(i/10) % 4]) bar.label("Done.") time.sleep(0.3) # give'em a chance to see the done. finally: del bar apply(MacOS.SchedParams, appsw)
911e87de6f283e2326422c6746dd296511368a76 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/911e87de6f283e2326422c6746dd296511368a76/EasyDialogs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 13332, 1930, 813, 16, 2589, 225, 2350, 2932, 22218, 29442, 11885, 14072, 1199, 13, 1456, 1098, 273, 261, 2668, 90, 2187, 296, 14489, 19899, 7707, 11369, 2187, 296, 14489, 487, 1525, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13332, 1930, 813, 16, 2589, 225, 2350, 2932, 22218, 29442, 11885, 14072, 1199, 13, 1456, 1098, 273, 261, 2668, 90, 2187, 296, 14489, 19899, 7707, 11369, 2187, 296, 14489, 487, 1525, ...
elif "HTTP_HOST" in request.environ:
elif "REMOTE_ADDR" in request.environ:
def get_ip(request): """ Extract the client IP address from the HTTP request in proxy compatible way. @return: IP address as a string or None if not available """ if "HTTP_X_FORWARDED_FOR" in request.environ: # Virtual host ip = request.environ["HTTP_X_FORWARDED_FOR"] elif "HTTP_HOST" in request.environ: # Non-virtualhost ip = request.environ["REMOTE_ADDR"] else: # Unit test code? ip = None return ip
de5521d2805c4c54a40c1fb5880653b96f115dc4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10164/de5521d2805c4c54a40c1fb5880653b96f115dc4/utilities.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 625, 12, 2293, 4672, 3536, 225, 8152, 326, 1004, 2971, 1758, 628, 326, 2239, 590, 316, 2889, 7318, 4031, 18, 225, 632, 2463, 30, 2971, 1758, 487, 279, 533, 578, 599, 309, 486,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 625, 12, 2293, 4672, 3536, 225, 8152, 326, 1004, 2971, 1758, 628, 326, 2239, 590, 316, 2889, 7318, 4031, 18, 225, 632, 2463, 30, 2971, 1758, 487, 279, 533, 578, 599, 309, 486,...
format_function = lambda x, f = format: _formatInteger(x, f)
format_function = lambda x: _formatInteger(x, format)
def _array2string(a, max_line_width, precision, suppress_small, separator=' ', prefix=""): if max_line_width is None: max_line_width = _line_width if precision is None: precision = _float_output_precision if suppress_small is None: suppress_small = _float_output_suppress_small if a.size > _summaryThreshhold: summary_insert = "..., " data = _leading_trailing(a) else: summary_insert = "" data = ravel(a) try: format_function = a._format except AttributeError: dtype = a.dtype.type if issubclass(dtype, _nt.bool): format = "%s" format_function = lambda x, f = format: format % x if issubclass(dtype, _nt.integer): max_str_len = max(len(str(max_reduce(data))), len(str(min_reduce(data)))) format = '%' + str(max_str_len) + 'd' format_function = lambda x, f = format: _formatInteger(x, f) elif issubclass(dtype, _nt.floating): format = _floatFormat(data, precision, suppress_small) format_function = lambda x, f = format: _formatFloat(x, f) elif issubclass(dtype, _nt.complexfloating): real_format = _floatFormat( data.real, precision, suppress_small, sign=0) imag_format = _floatFormat( data.imag, precision, suppress_small, sign=1) format_function = lambda x, f1 = real_format, f2 = imag_format: \ _formatComplex(x, f1, f2) elif issubclass(dtype, _nt.unicode_): format = "%s" format_function = lambda x, f = format: repr(x) else: format = '%s' format_function = lambda x, f = format: format % str(x) next_line_prefix = " " # skip over "[" next_line_prefix += " "*len(prefix) # skip over array( lst = _formatArray(a, format_function, len(a.shape), max_line_width, next_line_prefix, separator, _summaryEdgeItems, summary_insert)[:-1] return lst
6cf0da748afc8580030027c8390a5139034d75b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/6cf0da748afc8580030027c8390a5139034d75b8/arrayprint.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1126, 22, 1080, 12, 69, 16, 943, 67, 1369, 67, 2819, 16, 6039, 16, 12257, 67, 12019, 16, 4182, 2218, 2265, 1633, 1546, 6, 4672, 225, 309, 943, 67, 1369, 67, 2819, 353, 599, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1126, 22, 1080, 12, 69, 16, 943, 67, 1369, 67, 2819, 16, 6039, 16, 12257, 67, 12019, 16, 4182, 2218, 2265, 1633, 1546, 6, 4672, 225, 309, 943, 67, 1369, 67, 2819, 353, 599, 30, ...
print (('<a href="?deletelocal=%s">' % self.page_name) +
print (('<a href="%s?deletelocal=%s">' % (base, self.page_name)) +
def send_footer(self, versioned, mod_string=None, page_path=None, unmodified=False):
f8595ddfe1a99f0daf81474c72c391eda99fcb64 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4007/f8595ddfe1a99f0daf81474c72c391eda99fcb64/piki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 14723, 12, 2890, 16, 17083, 16, 681, 67, 1080, 33, 7036, 16, 1363, 67, 803, 33, 7036, 16, 30481, 33, 8381, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 14723, 12, 2890, 16, 17083, 16, 681, 67, 1080, 33, 7036, 16, 1363, 67, 803, 33, 7036, 16, 30481, 33, 8381, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
popts |= gsm.PRINT_SCH
popts |= gsm.PRINT_NORMAL
def __init__(self, frame, panel, vbox, argv): stdgui.gui_flow_graph.__init__(self)
e623985d7bed48ea54ab06635e2e25c6f77f3808 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10611/e623985d7bed48ea54ab06635e2e25c6f77f3808/gsm_scan.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2623, 16, 6594, 16, 331, 2147, 16, 5261, 4672, 2044, 20292, 18, 20292, 67, 2426, 67, 4660, 16186, 2738, 972, 12, 2890, 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, 0, 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, 2623, 16, 6594, 16, 331, 2147, 16, 5261, 4672, 2044, 20292, 18, 20292, 67, 2426, 67, 4660, 16186, 2738, 972, 12, 2890, 13, 2, -100, -100, -100, -100, -10...
def setup(self, tarball = 'pi_tests.tar.bz2'):
def setup(self, tarball = 'pi_tests.tar.bz2', *args, **dargs):
def setup(self, tarball = 'pi_tests.tar.bz2'): autotest_utils.check_glibc_ver('2.5') tarball = autotest_utils.unmap_url(self.bindir, tarball, self.tmpdir) autotest_utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) utils.system('make')
ed239916d73b89bb749bf9f41a529de47a5c36a9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/ed239916d73b89bb749bf9f41a529de47a5c36a9/pi_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12, 2890, 16, 29441, 273, 296, 7259, 67, 16341, 18, 11718, 18, 25292, 22, 2187, 380, 1968, 16, 2826, 72, 1968, 4672, 2059, 352, 395, 67, 5471, 18, 1893, 67, 75, 2941, 71, 67, 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, 3875, 12, 2890, 16, 29441, 273, 296, 7259, 67, 16341, 18, 11718, 18, 25292, 22, 2187, 380, 1968, 16, 2826, 72, 1968, 4672, 2059, 352, 395, 67, 5471, 18, 1893, 67, 75, 2941, 71, 67, 5...
('tof', tof, '0.1*microsecond'),
('tof', tof, tofunit),
def readHistogram( filename ): s = open(filename).read() import numpy as N I = N.fromstring( s, 'u4' ) n = len(I) tof = N.arange( 0, n, 1. ) import histogram as H Itof = H.histogram( 'I(tof)', [ ('tof', tof, '0.1*microsecond'), ], data = I, errors = I ) return Itof
440484cba5767e21136a061751f58b33ac8bd289 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4114/440484cba5767e21136a061751f58b33ac8bd289/monitorData.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12874, 12, 1544, 262, 30, 272, 273, 1696, 12, 3459, 2934, 896, 1435, 1930, 3972, 487, 423, 467, 273, 423, 18, 2080, 1080, 12, 272, 16, 296, 89, 24, 11, 262, 290, 273, 562, 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, 855, 12874, 12, 1544, 262, 30, 272, 273, 1696, 12, 3459, 2934, 896, 1435, 1930, 3972, 487, 423, 467, 273, 423, 18, 2080, 1080, 12, 272, 16, 296, 89, 24, 11, 262, 290, 273, 562, 12, ...
attrs['id'], type='MultiChannelAnalyzer', attrs=attrs
attrs['id'], type='MultiChannelAnalyzer', **attrs
def process_mca(scan, measurement, process_scalars=False, masked=None): num_mca = int(scan.nbmca()/scan.lines()) mca_info = scan.header('@') mca_names = [] print 'Number of MCA:', num_mca for mca_index in xrange(num_mca): attrs = {} if len(mca_info)/3 == num_mca: item_info, mca_info = mca_info[:3], mca_info[3:] attrs['id'] = item_info[0].split()[0][2:] start, stop, step = [int(i) for i in item_info[1].split()[2:]] channels = np.arange(start, stop+1, step) attrs['calibration'] = str(tuple(np.array( [float(i) for i in item_info[2].split()[1:]] ))) else: print 'mca metadata in specfile is incomplete!' attrs['id'] = 'mca_%d'%mca_index channels = np.arange(len(scan.mca(1))) mca_names.append(attrs['id']) mca = measurement.create_group( attrs['id'], type='MultiChannelAnalyzer', attrs=attrs ) mca['channels'] = channels mca.create_dataset( 'counts', type='McaSpectrum', dtype='float32', shape=(scan.lines(), len(channels)) ) i = 0 for line in xrange(scan.lines()): i += 1 if i%10 == 0: sys.stdout.write('.') sys.stdout.flush() mca['counts'][line] = \ scan.mca(num_mca * line + 1 + mca_index)[:len(channels)] if i>10: sys.stdout.write('\n') sys.stdout.flush() if process_scalars: # assume all scalars to be signals for i, label in enumerate(scan.alllabels()): kwargs = {'class':'Signal'} dset = mca.create_dataset( label, data=scan.datacol(i+1), dtype='float32', **kwargs ) if masked is not None: mca['masked'] = masked try: return mca except UnboundLocalError: pass
ae0531ca8fe212eb9b9897191b1cf52c89ee71ca /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14949/ae0531ca8fe212eb9b9897191b1cf52c89ee71ca/phynx.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 81, 5353, 12, 9871, 16, 12464, 16, 1207, 67, 8748, 87, 33, 8381, 16, 13196, 33, 7036, 4672, 818, 67, 81, 5353, 273, 509, 12, 9871, 18, 6423, 81, 5353, 1435, 19, 9871, 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, 1207, 67, 81, 5353, 12, 9871, 16, 12464, 16, 1207, 67, 8748, 87, 33, 8381, 16, 13196, 33, 7036, 4672, 818, 67, 81, 5353, 273, 509, 12, 9871, 18, 6423, 81, 5353, 1435, 19, 9871, 18, ...
htmlString = "<html><body><h5>Item</h5><ul>" htmlString = htmlString + "<li><b>Path:</b> %s" % item.getItemPath() htmlString = htmlString + "<li><b>UUID:</b> %s" % item.getUUID() htmlString = htmlString + "</ul><h5>Attributes</h5><ul>" for attribute in item.iterAttributes(): key = attribute[0] if isinstance(attribute[1], dict): htmlString = htmlString + ("<li><b>%s:</b></li><ul>" % key) for attr in attribute[1]: attrString = str(attr) attrString = attrString.replace("<", "&lt;") attrString = attrString.replace(">", "&gt;") htmlString = htmlString + ("<li>%s</li>" % attrString) htmlString = htmlString + ("</ul>") else: value = str(attribute[1]) value = value.replace("<", "&lt;") value = value.replace(">", "&gt;") htmlString = htmlString + ("<li><b>%s: </b>%s</li>" % (key, value)) htmlString = htmlString + "</ul></body></html>" self.detail.SetPage(htmlString)
self.detail.DisplayItem(item)
def DisplayItem(self, item): """Display the given Item's details in an HTML window. """ htmlString = "<html><body><h5>Item</h5><ul>" htmlString = htmlString + "<li><b>Path:</b> %s" % item.getItemPath() htmlString = htmlString + "<li><b>UUID:</b> %s" % item.getUUID() htmlString = htmlString + "</ul><h5>Attributes</h5><ul>" for attribute in item.iterAttributes(): key = attribute[0]
464097a3941694ddd1a5ef4b8bc01b6addc03b23 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/464097a3941694ddd1a5ef4b8bc01b6addc03b23/RepositoryViewer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9311, 1180, 12, 2890, 16, 761, 4672, 3536, 4236, 326, 864, 4342, 1807, 3189, 316, 392, 3982, 2742, 18, 3536, 1729, 780, 273, 3532, 2620, 4438, 3432, 4438, 76, 25, 34, 1180, 1757, 76, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9311, 1180, 12, 2890, 16, 761, 4672, 3536, 4236, 326, 864, 4342, 1807, 3189, 316, 392, 3982, 2742, 18, 3536, 1729, 780, 273, 3532, 2620, 4438, 3432, 4438, 76, 25, 34, 1180, 1757, 76, 2...
asock.send(msg)
if string.find(msg,"INSERT") >-1 or string.find(msg,"insert")>-1 or string.find(msg,"UPDATE")>-1 or string.find(msg,"update")>-1 or string.find(sub,"DELETE")>-1 or string.find(sub,"delete")>-1: print "processing updating query" mip, mport = servers[masterid] msock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) msock.connect((mip,mport)) msock.send(totalmsg) idx = string.find(totalmsg,msg) totalmsg = totalmsg[0:idx-1] msg = msock.recv(RECV_BUFF_SIZE) sock.send(msg) msock.close() else: asock.send(msg)
def process_client(sock, addr, ip, port): cont = 1 asock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) asock.connect((ip,port)) #sock.setblocking(0) #asock.setblocking(0) #try and except below wer placed for the use of #non-blocking sockets. this was just a test and should be removed #from the final version. while cont == 1: if os.fork() != 0: while cont == 1: try: msg = sock.recv(RECV_BUFF_SIZE) if msg == "": cont = 0 asock.send(msg) except: cont = 1 else: while cont == 1: try: msg = asock.recv(RECV_BUFF_SIZE) if msg == "": cont = 0 sock.send(msg) except: cont = 1
6fcdffd159fc00b812f7a5096cdcc5e143393b19 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/848/6fcdffd159fc00b812f7a5096cdcc5e143393b19/proxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2625, 12, 15031, 16, 3091, 16, 2359, 16, 1756, 4672, 466, 273, 404, 487, 975, 273, 2987, 18, 7814, 12, 7814, 18, 6799, 67, 18819, 16, 2987, 18, 3584, 3507, 67, 13693, 13, 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, 1207, 67, 2625, 12, 15031, 16, 3091, 16, 2359, 16, 1756, 4672, 466, 273, 404, 487, 975, 273, 2987, 18, 7814, 12, 7814, 18, 6799, 67, 18819, 16, 2987, 18, 3584, 3507, 67, 13693, 13, 4...
OWGUI.tableItem(self.table, i, 0, k) OWGUI.tableItem(self.table, i, 1, "*" if (k, run) == self.bestRun else "")
item = OWGUI.tableItem(self.table, i, 0, k) item.setData(Qt.TextAlignmentRole, QVariant(Qt.AlignCenter)) item = OWGUI.tableItem(self.table, i, 1, " * " if (k, run) == self.bestRun else "") item.setData(Qt.TextAlignmentRole, QVariant(Qt.AlignCenter))
def showResults(self): self.table.setHorizontalHeaderLabels(["K", "Best", "Score"]) self.table.setColumnCount(3) self.table.setRowCount(len(self.optimizationRun)) bestScore = self.bestRun[1].score worstScore = min([km.score for k, km in self.optimizationRun]) for i, (k, run) in enumerate(self.optimizationRun): OWGUI.tableItem(self.table, i, 0, k) OWGUI.tableItem(self.table, i, 1, "*" if (k, run) == self.bestRun else "") item = OWGUI.tableItem(self.table, i, 2, run.score) item.setData(OWGUI.TableBarItem.BarRole, QVariant(1 - (run.score - worstScore) / (bestScore - worstScore))) item.setSelected((k, run) == self.bestRun) self.table.resizeColumnsToContents() self.table.show() self.table.verticalHeader().hide() tablewidth = sum(self.table.columnWidth(i) + 2 for i in range(3))
b5200d400a472ae12720d7772ce15d5dcc3a721d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6366/b5200d400a472ae12720d7772ce15d5dcc3a721d/OWKMeans.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 3447, 12, 2890, 4672, 365, 18, 2121, 18, 542, 14457, 1864, 5888, 3816, 6, 47, 3113, 315, 14173, 3113, 315, 7295, 6, 5717, 365, 18, 2121, 18, 542, 1494, 1380, 12, 23, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 3447, 12, 2890, 4672, 365, 18, 2121, 18, 542, 14457, 1864, 5888, 3816, 6, 47, 3113, 315, 14173, 3113, 315, 7295, 6, 5717, 365, 18, 2121, 18, 542, 1494, 1380, 12, 23, 13, 365, 1...
sim.getRNG().setSeed(12345)
sim.getRNG().set(seed=12345)
def func(*fields): return 0.4*sum(fields)
205f55f8c6cd28aed704d70838912648f07ac340 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/401/205f55f8c6cd28aed704d70838912648f07ac340/userGuide.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1326, 30857, 2821, 4672, 327, 374, 18, 24, 14, 1364, 12, 2821, 13, 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,...
[ 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, 1326, 30857, 2821, 4672, 327, 374, 18, 24, 14, 1364, 12, 2821, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.requiredvars=(('SAPlugin','lowpamaction'),('SAPlugin','highspamaction'),('SAPlugin','highspamlevel'),('SAPlugin','peruserconfig'),('SAPlugin','host'),('SAPlugin','port'),('SAPlugin','maxsize'),('SAPlugin','spamheader'),('SAPlugin','timeout'),('SAPlugin','retries'))
self.requiredvars=(('SAPlugin','lowspamaction'),('SAPlugin','highspamaction'),('SAPlugin','highspamlevel'),('SAPlugin','peruserconfig'),('SAPlugin','host'),('SAPlugin','port'),('SAPlugin','maxsize'),('SAPlugin','spamheader'),('SAPlugin','timeout'),('SAPlugin','retries'))
def __init__(self,config): ScannerPlugin.__init__(self,config) self.requiredvars=(('SAPlugin','lowpamaction'),('SAPlugin','highspamaction'),('SAPlugin','highspamlevel'),('SAPlugin','peruserconfig'),('SAPlugin','host'),('SAPlugin','port'),('SAPlugin','maxsize'),('SAPlugin','spamheader'),('SAPlugin','timeout'),('SAPlugin','retries')) self.logger=self._logger()
4e6edb1704c29125d011f001853cf5676bd172cc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10919/4e6edb1704c29125d011f001853cf5676bd172cc/sa.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1425, 4672, 19074, 3773, 16186, 2738, 972, 12, 2890, 16, 1425, 13, 365, 18, 4718, 4699, 28657, 2668, 5233, 3773, 17023, 821, 1752, 301, 1128, 19899, 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, 1001, 2738, 972, 12, 2890, 16, 1425, 4672, 19074, 3773, 16186, 2738, 972, 12, 2890, 16, 1425, 13, 365, 18, 4718, 4699, 28657, 2668, 5233, 3773, 17023, 821, 1752, 301, 1128, 19899, 2668, ...
drawcylinder(color1, self.a1pos, self.center, TubeRadius)
drawcylinder(color1, a1pos, c1, TubeRadius) else: drawsphere(black, c1, TubeRadius, level)
via dispdef from the calling molecule -- this might cause bugs if some
8458fbfe4c9e599a4e7092a28b468082d5fe6e91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/8458fbfe4c9e599a4e7092a28b468082d5fe6e91/bonds.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3970, 16232, 536, 628, 326, 4440, 13661, 1493, 333, 4825, 4620, 22398, 309, 2690, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 3970, 16232, 536, 628, 326, 4440, 13661, 1493, 333, 4825, 4620, 22398, 309, 2690, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
M = int(amax(ij[0])) N = int(amax(ij[1]))
M = int(amax(ij[0])) + 1 N = int(amax(ij[1])) + 1
def __init__(self, obj, ij_in, dims=None, nzmax=None, dtype=None): spmatrix.__init__(self) try: # Assume the first calling convention # assert len(ij) == 2 if len(ij_in) != 2: if isdense( ij_in ) and (ij_in.shape[1] == 2): ij = (ij_in[:,0], ij_in[:,1]) else: raise AssertionError else: ij = ij_in if dims is None: M = int(amax(ij[0])) N = int(amax(ij[1])) self.shape = (M, N) else: # Use 2 steps to ensure dims has length 2. M, N = dims self.shape = (M, N) self.row = asarray(ij[0]) self.col = asarray(ij[1]) self.data = asarray(obj, dtype=dtype) self.dtype = self.data.dtype if nzmax is None: nzmax = len(self.data) self.nzmax = nzmax self._check() except Exception, e: raise e, "invalid input format"
57e057b52364d5b77af01198799ed00aea306d4c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/57e057b52364d5b77af01198799ed00aea306d4c/sparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1081, 16, 19313, 67, 267, 16, 9914, 33, 7036, 16, 15062, 1896, 33, 7036, 16, 3182, 33, 7036, 4672, 1694, 5667, 16186, 2738, 972, 12, 2890, 13, 775, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1081, 16, 19313, 67, 267, 16, 9914, 33, 7036, 16, 15062, 1896, 33, 7036, 16, 3182, 33, 7036, 4672, 1694, 5667, 16186, 2738, 972, 12, 2890, 13, 775, 30, ...
isize = read32(self.fileobj) if crc32%0x100000000L != self.crc%0x100000000L:
isize = U32(read32(self.fileobj)) if U32(crc32) != U32(self.crc):
def _read_eof(self): # We've read to the end of the file, so we have to rewind in order # to reread the 8 bytes containing the CRC and the file size. # We check the that the computed CRC and size of the # uncompressed data matches the stored values. self.fileobj.seek(-8, 1) crc32 = read32(self.fileobj) isize = read32(self.fileobj) if crc32%0x100000000L != self.crc%0x100000000L: raise ValueError, "CRC check failed" elif isize != self.size: raise ValueError, "Incorrect length of data produced"
1b11c3877d262c1eda5dc42c6fe5672b68f7b89f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1b11c3877d262c1eda5dc42c6fe5672b68f7b89f/gzip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 9339, 12, 2890, 4672, 468, 1660, 8081, 855, 358, 326, 679, 434, 326, 585, 16, 1427, 732, 1240, 358, 12881, 316, 1353, 468, 358, 436, 264, 684, 326, 1725, 1731, 4191, 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, 389, 896, 67, 9339, 12, 2890, 4672, 468, 1660, 8081, 855, 358, 326, 679, 434, 326, 585, 16, 1427, 732, 1240, 358, 12881, 316, 1353, 468, 358, 436, 264, 684, 326, 1725, 1731, 4191, 326,...
sage: sr = mq.SR(2,1,1,4)
sage: sr = mq.SR(2, 1, 1, 4)
def block_order(self): """ Return a block order for self where each round is a block.
62424369e932ac59629cb4d40b7e47ae2a712293 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/62424369e932ac59629cb4d40b7e47ae2a712293/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1203, 67, 1019, 12, 2890, 4672, 3536, 2000, 279, 1203, 1353, 364, 365, 1625, 1517, 3643, 353, 279, 1203, 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, 1203, 67, 1019, 12, 2890, 4672, 3536, 2000, 279, 1203, 1353, 364, 365, 1625, 1517, 3643, 353, 279, 1203, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
s = idaapi.get_struc(id)
s = idaapi.get_struc(sid)
def GetMemberName(id, member_offset): """ Get name of a member of a structure @param id: structure type ID @param member_offset: member offset. The offset can be any offset in the member. For example, is a member is 4 bytes long and starts at offset 2, then 2,3,4,5 denote the same structure member. @return: None if bad structure type ID is passed or no such member in the structure otherwise returns name of the specified member. """ s = idaapi.get_struc(id) if not s: return None m = idaapi.get_member(s, member_offset) if not m: return None return idaapi.get_member_name(m.id)
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, 968, 4419, 461, 12, 350, 16, 3140, 67, 3348, 4672, 3536, 968, 508, 434, 279, 3140, 434, 279, 3695, 225, 632, 891, 612, 30, 3695, 618, 1599, 632, 891, 3140, 67, 3348, 30, 3140, 1384, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4419, 461, 12, 350, 16, 3140, 67, 3348, 4672, 3536, 968, 508, 434, 279, 3140, 434, 279, 3695, 225, 632, 891, 612, 30, 3695, 618, 1599, 632, 891, 3140, 67, 3348, 30, 3140, 1384, ...
sage: E.Lseries_values_along_line(1, 0.5+20*I, 5) [(0.500000000, 0), (0.400000000 + 4.00000000*I, 3.31920245 - 2.60028054*I), (0.300000000 + 8.00000000*I, -0.886341185 - 0.422640337*I), (0.200000000 + 12.0000000*I, -3.50558936 - 0.108531690*I), (0.100000000 + 16.0000000*I, -3.87043288 - 1.88049411*I)]
sage: E.Lseries_values_along_line(1, 0.5+20*I, 5) [(0.500000000, -5.45450037e-18), (0.400000000 + 4.00000000*I, 3.31920245 - 2.60028054*I), (0.300000000 + 8.00000000*I, -0.886341185 - 0.422640337*I), (0.200000000 + 12.0000000*I, -3.50558936 - 0.108531690*I), (0.100000000 + 16.0000000*I, -3.87043288 - 1.88049411*I)]
def Lseries_values_along_line(self, s0, s1, number_samples): """ Return values of $L(E, s)$ at \code{number_samples} equally-spaced sample points along the line from $s_0$ to $s_1$ in the complex plane.
06428793728de3b4ebb1ce01f18c2a0e5abfb62b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/06428793728de3b4ebb1ce01f18c2a0e5abfb62b/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 511, 10222, 67, 2372, 67, 287, 932, 67, 1369, 12, 2890, 16, 272, 20, 16, 272, 21, 16, 1300, 67, 7319, 4672, 3536, 2000, 924, 434, 271, 48, 12, 41, 16, 272, 21877, 622, 521, 710, 95...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 511, 10222, 67, 2372, 67, 287, 932, 67, 1369, 12, 2890, 16, 272, 20, 16, 272, 21, 16, 1300, 67, 7319, 4672, 3536, 2000, 924, 434, 271, 48, 12, 41, 16, 272, 21877, 622, 521, 710, 95...