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
createTestbedDocu()
self.createTestbedDocu()
def run(project): if not project.generateDoc: return
c3ecfa376fb8010f4c97a0776147ddd9ad9eece6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8259/c3ecfa376fb8010f4c97a0776147ddd9ad9eece6/Documentation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 4406, 4672, 309, 486, 1984, 18, 7163, 1759, 30, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 4406, 4672, 309, 486, 1984, 18, 7163, 1759, 30, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.assertTrue(hunk.type == HOST_HOSTNAME_ADD)
self.assertTrue(isinstance(hunk, HostHostnameAddHunk))
def test_hostname_add(self): a = Host() b = Host() a.hostnames = [] b.hostnames = ["b"] diff = host_diff(a, b) self.assertTrue(len(diff) > 0) for hunk in diff: self.assertTrue(hunk.type == HOST_HOSTNAME_ADD)
e100fe985a91dc50454e1b16bae62fa0d722a5a7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6331/e100fe985a91dc50454e1b16bae62fa0d722a5a7/ndifftest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 10358, 67, 1289, 12, 2890, 4672, 279, 273, 4893, 1435, 324, 273, 4893, 1435, 279, 18, 2564, 1973, 273, 5378, 324, 18, 2564, 1973, 273, 8247, 70, 11929, 3122, 273, 1479, 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, 1842, 67, 10358, 67, 1289, 12, 2890, 4672, 279, 273, 4893, 1435, 324, 273, 4893, 1435, 279, 18, 2564, 1973, 273, 5378, 324, 18, 2564, 1973, 273, 8247, 70, 11929, 3122, 273, 1479, 67, 5...
String representation of Arc primitive.
String representation of ``Arc`` primitive.
def _repr_(self): """ String representation of Arc primitive.
e24dd3c62ad1f440792ccb94718bf5873e280f2a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/e24dd3c62ad1f440792ccb94718bf5873e280f2a/arc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12715, 67, 12, 2890, 4672, 3536, 514, 4335, 434, 24881, 8225, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12715, 67, 12, 2890, 4672, 3536, 514, 4335, 434, 24881, 8225, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print >>sys.stderr, "Warning: mozilla/extensions directory does not exist; ChatZilla, DOM Inspector and/or Venkman could not be checked out." options.skip_chatzilla = \ options.skip_inspector = \ options.skip_venkman = \ True
sys.exit("Error: mozilla/extensions directory does not exist;" + \ " ChatZilla, DOM Inspector and/or Venkman cannot be checked out!")
def fixup_venkman_repo_options(options): """Handle special case: initial checkout of Venkman. See fixup_comm_repo_options(). """ if (options.venkman_repo is None and not os.path.exists(os.path.join(topsrcdir, 'mozilla', 'extensions', 'venkman'))): options.venkman_repo = DEFAULT_VENKMAN_REPO
0bc69e7bf7a88a560dd02422d30a49b58dedc9a6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11044/0bc69e7bf7a88a560dd02422d30a49b58dedc9a6/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 416, 67, 3995, 79, 4728, 67, 7422, 67, 2116, 12, 2116, 4672, 3536, 3259, 4582, 648, 30, 2172, 13926, 434, 776, 13775, 4728, 18, 225, 2164, 2917, 416, 67, 5702, 67, 7422, 67, 2116...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 416, 67, 3995, 79, 4728, 67, 7422, 67, 2116, 12, 2116, 4672, 3536, 3259, 4582, 648, 30, 2172, 13926, 434, 776, 13775, 4728, 18, 225, 2164, 2917, 416, 67, 5702, 67, 7422, 67, 2116...
return Sum((self, -other))
return Expression.__sub__(self, other)
def __sub__(self, other): if not isinstance(other, Expression): return Constant(self.Value - other) if self.Value == 0: return Negation(other) return Sum((self, -other))
0aea67b6248de24bf5c20988f84fdf8ba68e066d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12571/0aea67b6248de24bf5c20988f84fdf8ba68e066d/primitives.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1717, 972, 12, 2890, 16, 1308, 4672, 309, 486, 1549, 12, 3011, 16, 5371, 4672, 327, 10551, 12, 2890, 18, 620, 300, 1308, 13, 309, 365, 18, 620, 422, 374, 30, 327, 423, 1332, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1717, 972, 12, 2890, 16, 1308, 4672, 309, 486, 1549, 12, 3011, 16, 5371, 4672, 327, 10551, 12, 2890, 18, 620, 300, 1308, 13, 309, 365, 18, 620, 422, 374, 30, 327, 423, 1332, 36...
wikipedia.stopme()
wikipedia.stopme()
def readWarnfile(filename, bot): import warnfile reader = warnfile.WarnfileReader(filename) # we won't use removeHints (hints, removeHints) = reader.getHints() pages = hints.keys() for page in pages: # The WarnfileReader gives us a list of pagelinks, but titletranslate.py expects a list of strings, so we convert it back. # TODO: This is a quite ugly hack, in the future we should maybe make titletranslate expect a list of pagelinks. hintStrings = ['%s:%s' % (hintedPage.site().language(), hintedPage.title()) for hintedPage in hints[page]] bot.add(page, hints = hintStrings)
35988aec8175b6647bc2b6127ecbcc3ae9085045 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/35988aec8175b6647bc2b6127ecbcc3ae9085045/interwiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 3160, 768, 12, 3459, 16, 2512, 4672, 1930, 1894, 768, 2949, 273, 1894, 768, 18, 3160, 768, 2514, 12, 3459, 13, 468, 732, 8462, 1404, 999, 1206, 13368, 261, 24598, 16, 1206, 13368, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3160, 768, 12, 3459, 16, 2512, 4672, 1930, 1894, 768, 2949, 273, 1894, 768, 18, 3160, 768, 2514, 12, 3459, 13, 468, 732, 8462, 1404, 999, 1206, 13368, 261, 24598, 16, 1206, 13368, ...
sock2 = xmlrpclib.ServerProxy(url+'/db')
sock2 = xmlrpclib.ServerProxy(url+'/xmlrpc/db')
def wait(id,url=''): progress=0.0 sock2 = xmlrpclib.ServerProxy(url+'/db') while not progress==1.0: progress,users = execute(sock2,'get_progress',admin_passwd, id) return True
2f20758f02fabab6e9b8bd8115e6f6714cba7a88 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/2f20758f02fabab6e9b8bd8115e6f6714cba7a88/base_quality_interrogation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2529, 12, 350, 16, 718, 2218, 11, 4672, 4007, 33, 20, 18, 20, 7313, 22, 273, 2025, 13832, 830, 495, 18, 2081, 3886, 12, 718, 6797, 19, 2902, 7452, 19, 1966, 6134, 1323, 486, 4007, 63...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2529, 12, 350, 16, 718, 2218, 11, 4672, 4007, 33, 20, 18, 20, 7313, 22, 273, 2025, 13832, 830, 495, 18, 2081, 3886, 12, 718, 6797, 19, 2902, 7452, 19, 1966, 6134, 1323, 486, 4007, 63...
and self.combo_database.get_active() != -1 \
and self.combo_database.get_active_text() != "" \
def event_show_button_ok(self, widget, event, data=None): """ This event method decide by rules if the Create button will be sensitive or insensitive. The general rule is, all given fields must be filled, then the Create button is set to sensitive. This event method doesn't check the valid of single entrys. """ if self.entry_server_connection.get_text() != "" \ and self.combo_database.get_active() != -1 \ and self.entry_serverpasswd.get_text() != "": widget.unset_flags(gtk.HAS_DEFAULT) self.button_ok.set_sensitive(True) self.button_ok.set_flags(gtk.CAN_DEFAULT) self.button_ok.set_flags(gtk.HAS_DEFAULT) self.button_ok.set_flags(gtk.CAN_FOCUS) self.button_ok.set_flags(gtk.RECEIVES_DEFAULT) self.button_ok.grab_default() else: self.button_ok.set_sensitive(False)
a6d1f89c8595511490431a3890ed5b1c1c5611d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9151/a6d1f89c8595511490431a3890ed5b1c1c5611d3/dbdumpdrop.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 67, 4500, 67, 5391, 67, 601, 12, 2890, 16, 3604, 16, 871, 16, 501, 33, 7036, 4672, 3536, 1220, 871, 707, 16288, 635, 2931, 309, 326, 1788, 3568, 903, 506, 16692, 578, 17904, 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, 871, 67, 4500, 67, 5391, 67, 601, 12, 2890, 16, 3604, 16, 871, 16, 501, 33, 7036, 4672, 3536, 1220, 871, 707, 16288, 635, 2931, 309, 326, 1788, 3568, 903, 506, 16692, 578, 17904, 18, ...
param_obj = PassingData(no_of_valid_deletions=0, cnv_qc_call_id_set=set())
param_obj = PassingData(no_of_valid_deletions=0, cnv_qc_call_id_set=set(), array_id2qc_data={})
def countNoOfCNVDeletionsMatchQC(cls, db_250k, input_fname_ls, ecotype_id=6909, data_source_id=3, cnv_type_id=1, \ min_QC_segment_size=200, deletion_cutoff=-0.33, max_boundary_diff=10000, \ max_diff_perc=0.10, min_no_of_probes=5,\ count_embedded_segment_as_match=True): """ 2009-10-29 for all CNV deletions, check how many are in QC dataset. """ ecotype_id2cnv_qc_call_data = cls.getCNVQCDataFromDB(data_source_id, ecotype_id, cnv_type_id, min_QC_segment_size, min_no_of_probes) from pymodule import PassingData param_obj = PassingData(no_of_valid_deletions=0, cnv_qc_call_id_set=set()) cls.compareCNVSegmentsAgainstQCHandler(input_fname_ls, ecotype_id2cnv_qc_call_data, cls.countMatchedDeletionsFunctor, param_obj, \ deletion_cutoff, max_boundary_diff, max_diff_perc, min_no_of_probes, \ count_embedded_segment_as_match=count_embedded_segment_as_match) sys.stderr.write("For ecotype_id %s, data_source_id %s, min_QC_segment_size %s, deletion_cutoff: %s, min_no_of_probes: %s, max_boundary_diff: %s, max_diff_perc %s.\n"%\ (ecotype_id, \ data_source_id, min_QC_segment_size, deletion_cutoff, min_no_of_probes, max_boundary_diff, max_diff_perc)) param_obj.ecotype_id2cnv_qc_call_data = ecotype_id2cnv_qc_call_data cls.outputFalsePositiveRate(param_obj) cls.outputFalseNegativeRate(param_obj)
1440ce5092ec2e1bfdd9b1e187e40f109bf0000b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9645/1440ce5092ec2e1bfdd9b1e187e40f109bf0000b/misc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1056, 2279, 951, 39, 11679, 9019, 1115, 2060, 53, 39, 12, 6429, 16, 1319, 67, 26520, 79, 16, 810, 67, 12749, 67, 3251, 16, 6557, 10570, 67, 350, 33, 8148, 5908, 16, 501, 67, 3168, 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, 1056, 2279, 951, 39, 11679, 9019, 1115, 2060, 53, 39, 12, 6429, 16, 1319, 67, 26520, 79, 16, 810, 67, 12749, 67, 3251, 16, 6557, 10570, 67, 350, 33, 8148, 5908, 16, 501, 67, 3168, 67...
if last <= m.start() - 1: gen.putXMLString(self.text[last : m.start()-1]) last = m.end()
if next < m.start(): gen.putXMLString(self.text[next : m.start()]) next = m.end()
def publish(self, gen, pageNode = None): if pageNode is None: return last = 0 for m in re.finditer("%\w+;", self.text): if last <= m.start() - 1: gen.putXMLString(self.text[last : m.start()-1]) last = m.end() directive = self.text[m.start()+1 : m.end()-1]
cf995e17ae14a5c84f76f92c557511b77c0bef8f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10467/cf995e17ae14a5c84f76f92c557511b77c0bef8f/webdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3808, 12, 2890, 16, 3157, 16, 1363, 907, 273, 599, 4672, 309, 1363, 907, 353, 599, 30, 327, 1142, 273, 374, 364, 312, 316, 283, 18, 4720, 2165, 27188, 64, 91, 15, 31, 3113, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3808, 12, 2890, 16, 3157, 16, 1363, 907, 273, 599, 4672, 309, 1363, 907, 353, 599, 30, 327, 1142, 273, 374, 364, 312, 316, 283, 18, 4720, 2165, 27188, 64, 91, 15, 31, 3113, 365, 18, ...
('gecos', decodestring),
('gecos', gecos_decode),
def account_lock(value, tmp_entry=temp_user_dict): try: # get around an error where password is not base64 encoded. password = decodestring(value.split('}',1)[1]) except Exception: password = value
612e9eb2908557a6396597e951c2d666006dd93c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/612e9eb2908557a6396597e951c2d666006dd93c/ldap_backend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2236, 67, 739, 12, 1132, 16, 1853, 67, 4099, 33, 5814, 67, 1355, 67, 1576, 4672, 775, 30, 468, 336, 6740, 392, 555, 1625, 2201, 353, 486, 1026, 1105, 3749, 18, 2201, 273, 16889, 371, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2236, 67, 739, 12, 1132, 16, 1853, 67, 4099, 33, 5814, 67, 1355, 67, 1576, 4672, 775, 30, 468, 336, 6740, 392, 555, 1625, 2201, 353, 486, 1026, 1105, 3749, 18, 2201, 273, 16889, 371, ...
ret, indent = [], 0
ret, indent = [['']], 0
def redent(s): ret, indent = [], 0 for tok in _redent_pattern.finditer(s): line, end = [st.strip() for st in tok.groups()] if line: if end == ':': line += ':' ret.append(' ' * indent + line) if end == ':': indent += 1 else: indent -= 1 return '\n'.join(ret)
20a1d58e2ebbf9e0264070e64ed405f28c5723c7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6095/20a1d58e2ebbf9e0264070e64ed405f28c5723c7/infobatdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1755, 319, 12, 87, 4672, 325, 16, 3504, 273, 306, 3292, 3546, 6487, 374, 364, 946, 316, 389, 1118, 319, 67, 4951, 18, 4720, 2165, 12, 87, 4672, 980, 16, 679, 273, 306, 334, 18, 6406,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1755, 319, 12, 87, 4672, 325, 16, 3504, 273, 306, 3292, 3546, 6487, 374, 364, 946, 316, 389, 1118, 319, 67, 4951, 18, 4720, 2165, 12, 87, 4672, 980, 16, 679, 273, 306, 334, 18, 6406,...
if pref != latest: prefstr = pref[0][0] + ":" + pref[0][1] + '-' + pref[0][2] else:
prefstr = pref[0][0] + ":" + pref[0][1] + '-' + pref[0][2] lateststr = latest[0][0] + ":" + latest[0][1] + "-" + latest[0][2] if pref == latest:
def showVersions(self): pkg_pn = self.status.pkg_pn preferred_versions = {} latest_versions = {}
0e4e9ae990e7ac2da17d1e566640a79b3b0538b9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2672/0e4e9ae990e7ac2da17d1e566640a79b3b0538b9/cooker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 5940, 12, 2890, 4672, 3475, 67, 7449, 273, 365, 18, 2327, 18, 10657, 67, 7449, 9119, 67, 10169, 273, 2618, 4891, 67, 10169, 273, 2618, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 5940, 12, 2890, 4672, 3475, 67, 7449, 273, 365, 18, 2327, 18, 10657, 67, 7449, 9119, 67, 10169, 273, 2618, 4891, 67, 10169, 273, 2618, 2, -100, -100, -100, -100, -100, -100, -100, ...
if isinstance(module, MozillaModule): installdate = packagedb.installdate(module.name, module.get_revision() or '') elif isinstance(module, AutogenModule): installdate = packagedb.installdate(module.name, module.branch.branchname or '') elif isinstance(module, Tarball): installdate = packagedb.installdate(module.name, module.version or '') else: installdate = packagedb.installdate(module.name)
installdate = packagedb.installdate(module.name, module.get_revision() or '')
def show_info(self, module, packagedb, module_set): if isinstance(module, MozillaModule): installdate = packagedb.installdate(module.name, module.get_revision() or '') elif isinstance(module, AutogenModule): installdate = packagedb.installdate(module.name, module.branch.branchname or '') elif isinstance(module, Tarball): installdate = packagedb.installdate(module.name, module.version or '') else: installdate = packagedb.installdate(module.name)
073176e742a58883de2cdda9b44b9c54b2d7cfb8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4596/073176e742a58883de2cdda9b44b9c54b2d7cfb8/info.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 1376, 12, 2890, 16, 1605, 16, 2298, 11349, 70, 16, 1605, 67, 542, 4672, 309, 1549, 12, 2978, 16, 19058, 10745, 3120, 4672, 3799, 712, 273, 2298, 11349, 70, 18, 5425, 712, 12,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 1376, 12, 2890, 16, 1605, 16, 2298, 11349, 70, 16, 1605, 67, 542, 4672, 309, 1549, 12, 2978, 16, 19058, 10745, 3120, 4672, 3799, 712, 273, 2298, 11349, 70, 18, 5425, 712, 12,...
def update(self, Task = None):
def update(self, task = None):
def update(self, Task = None): """ Check pressed keys and send corresponding events. XXX The problem with this approach is that events are sent only on button down, not on button up. For the moment this is not a problem but it can become troublesome in the future """ commands = self._currentScheme.getCommands().values() + \ self._schemes[BASE_SCHEME].getCommands().values() for commandList in commands: for command in commandList: if command.pressed is True: command.pressed = False if command.type == Command.EVENT: logger.debug("Sending message %s with args %s" % (command.name, command.args)) messenger.send(command.name, command.args) elif command.type == Command.CALLBACK: logger.debug("Executing callback %s with args %s" % (command.name.__name__, command.args)) command.name(*command.args) return Task.cont
f4526751ec82c3a9c7bd2b5d0afc5b9d7d847e83 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7999/f4526751ec82c3a9c7bd2b5d0afc5b9d7d847e83/input.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 16, 1562, 273, 599, 4672, 3536, 2073, 19504, 1311, 471, 1366, 4656, 2641, 18, 11329, 1021, 6199, 598, 333, 17504, 353, 716, 2641, 854, 3271, 1338, 603, 3568, 2588, 16, 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, 1089, 12, 2890, 16, 1562, 273, 599, 4672, 3536, 2073, 19504, 1311, 471, 1366, 4656, 2641, 18, 11329, 1021, 6199, 598, 333, 17504, 353, 716, 2641, 854, 3271, 1338, 603, 3568, 2588, 16, 48...
DoubleNumber.__init__(self, text, forcetype=self.OCTAL)
DoubleNumber.__init__(self, text, forcetype=Number.OCTAL)
def __init__(self, text): DoubleNumber.__init__(self, text, forcetype=self.OCTAL)
61c498782190367933ab197480db4d4669c6485b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8152/61c498782190367933ab197480db4d4669c6485b/number.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 977, 4672, 3698, 1854, 16186, 2738, 972, 12, 2890, 16, 977, 16, 364, 71, 5872, 33, 2890, 18, 51, 1268, 1013, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 977, 4672, 3698, 1854, 16186, 2738, 972, 12, 2890, 16, 977, 16, 364, 71, 5872, 33, 2890, 18, 51, 1268, 1013, 13, 2, -100, -100, -100, -100, -100, -100, ...
view.set_error('Sorry, there was an error in your search.') results = [] else: results = []
errortext = 'Sorry, there was an error in your search.'
def GET(self, site): i = web.input() if solr is None: view.set_error('Solr is not configured.') results = [] elif 'q' in i: if i.q == '': view.set_error('You need to enter some search terms.') results = [] else: try: results = [] offset = int(i.get('offset', '0')) qresults = solr.basic_search(i.q, start=offset)
0768de2a3b17311838813e2c9c4169272332f77d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3913/0768de2a3b17311838813e2c9c4169272332f77d/code.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4978, 12, 2890, 16, 2834, 4672, 277, 273, 3311, 18, 2630, 1435, 309, 15575, 353, 599, 30, 1476, 18, 542, 67, 1636, 2668, 16478, 353, 486, 4351, 1093, 13, 1686, 273, 5378, 1327, 296, 85...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4978, 12, 2890, 16, 2834, 4672, 277, 273, 3311, 18, 2630, 1435, 309, 15575, 353, 599, 30, 1476, 18, 542, 67, 1636, 2668, 16478, 353, 486, 4351, 1093, 13, 1686, 273, 5378, 1327, 296, 85...
sage: sage.symbolic.units.is_unit(units.length.meter^2) False
sage: sage.symbolic.units.is_unit(units.length.meter^2) False
def is_unit(s): """ Returns a boolean when asked whether the input is in the list of units. INPUT: - `s` -- an object OUTPUT: - ``bool`` EXAMPLES:: sage: sage.symbolic.units.is_unit(1) False sage: sage.symbolic.units.is_unit(units.length.meter) True The square of a unit is not a unit:: sage: sage.symbolic.units.is_unit(units.length.meter^2) False You can also directly create units using var, though they won't have a nice docstring describing the unit:: sage: sage.symbolic.units.is_unit(var('meter')) True """ return unit_to_type.has_key(str(s))
d9145e61c2e167a847618a21778e0e532a04af5d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/d9145e61c2e167a847618a21778e0e532a04af5d/units.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 4873, 12, 87, 4672, 3536, 2860, 279, 1250, 1347, 19279, 2856, 326, 810, 353, 316, 326, 666, 434, 4971, 18, 225, 12943, 30, 225, 300, 1375, 87, 68, 1493, 392, 733, 225, 11550, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 4873, 12, 87, 4672, 3536, 2860, 279, 1250, 1347, 19279, 2856, 326, 810, 353, 316, 326, 666, 434, 4971, 18, 225, 12943, 30, 225, 300, 1375, 87, 68, 1493, 392, 733, 225, 11550, ...
pass
print('case 03') index = boxdata.index(change['target']) del(boxdata[index]) i = 0 for char in list(change['text']): new = {'char':char, 'xmin':change['target']['xmin'], 'ymin':change['target']['ymin'], 'xmax':change['target']['xmax'], 'ymax':change['target']['ymax']} boxdata.insert(index+i, new) i = i + 1
def resolve(self, boxdata, text): # Convert the boxing information into a plain text string with no bounding information. boxtext = '' for entry in boxdata: boxtext = boxtext + entry['char'] # Remove spacing and newlines from the readable text because the boxing data doesn't have those. text = text.replace(' ', '') text = text.replace('\n', '')
9dbf92d8294de519ef73fabf7e36e75533ae1963 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6474/9dbf92d8294de519ef73fabf7e36e75533ae1963/ocr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2245, 12, 2890, 16, 3919, 892, 16, 977, 4672, 468, 4037, 326, 3919, 310, 1779, 1368, 279, 7351, 977, 533, 598, 1158, 7552, 1779, 18, 3919, 955, 273, 875, 364, 1241, 316, 3919, 892, 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, 2245, 12, 2890, 16, 3919, 892, 16, 977, 4672, 468, 4037, 326, 3919, 310, 1779, 1368, 279, 7351, 977, 533, 598, 1158, 7552, 1779, 18, 3919, 955, 273, 875, 364, 1241, 316, 3919, 892, 30,...
real_path = os.path.join (base_path, rel_path)
def hyltMain (meta_screen, starting_filename): """The core Hylt functionality. Contains the main input and display loops, lots of initialization, and so on. """ curses.curs_set(0) # Remember: Parameters are in the order of (y, x). meta_y, meta_x = meta_screen.getmaxyx() core_state = {"y": meta_y, "x": meta_x} # Keep the "base path", as all Hylt links are relative. base_path = core_state["base_path"] = os.path.dirname (starting_filename) filename = os.path.basename (starting_filename) core_state["curr_base_path"] = core_state["base_path"] # There are three windows: a top status bar, a primary screen, and a bottom # status bar. There is also the main screen, of course. Create them. top = meta_screen.subwin (1, meta_x, 0, 0) main = meta_screen.subwin (meta_y - 2, meta_x, 1, 0) bottom = meta_screen.subwin (1, meta_x, meta_y - 1, 0) # Read in the configuration. config = core_state["config"] = generateConfiguration (base_path) core_state["history"] = [] fresh_page = True done = False curses.def_prog_mode () main_needs_redraw = True while not done: if fresh_page: core_state["curr_base_path"] = os.path.dirname (filename) readHyltFile (filename, core_state)
3d935dc1773bd71731a9550b77a62ca6c32a7bb4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2254/3d935dc1773bd71731a9550b77a62ca6c32a7bb4/hylt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4855, 5618, 6376, 261, 3901, 67, 9252, 16, 5023, 67, 3459, 4672, 3536, 1986, 2922, 14881, 5618, 14176, 18, 225, 8398, 326, 2774, 810, 471, 2562, 14075, 16, 328, 6968, 434, 10313, 16, 471...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4855, 5618, 6376, 261, 3901, 67, 9252, 16, 5023, 67, 3459, 4672, 3536, 1986, 2922, 14881, 5618, 14176, 18, 225, 8398, 326, 2774, 810, 471, 2562, 14075, 16, 328, 6968, 434, 10313, 16, 471...
result = [Music(row[0]) for row in rows]
result = [Music(row[0]) for row in rows if self.exists(row[0])]
def find_all_by_artist(self, artist): cmd = "SELECT Path FROM Music WHERE Artist = '%s'" % artist.replace("'", "''") rows = self.__db_helper.execute_reader(cmd) result = [Music(row[0]) for row in rows] return result
ad19ad19bb291ef6faba05abac135612ee36eb79 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5169/ad19ad19bb291ef6faba05abac135612ee36eb79/aspyplayer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 454, 67, 1637, 67, 25737, 12, 2890, 16, 15469, 4672, 1797, 273, 315, 4803, 2666, 4571, 490, 14894, 4852, 9042, 376, 273, 1995, 87, 4970, 738, 15469, 18, 2079, 29823, 3113, 2491...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 454, 67, 1637, 67, 25737, 12, 2890, 16, 15469, 4672, 1797, 273, 315, 4803, 2666, 4571, 490, 14894, 4852, 9042, 376, 273, 1995, 87, 4970, 738, 15469, 18, 2079, 29823, 3113, 2491...
if os.path.exists(a):
if os.path.exists(directory + '/' + a):
def parseArgs(args): """ Parse the command line args return a commands dict and directory. Sanity check all the things being passed in. """ if len(args) == 0: usage() cmds = {} cmds['quiet'] = 0 cmds['verbose'] = 0 cmds['excludes'] = [] cmds['baseurl'] = None cmds['groupfile'] = None cmds['sumtype'] = 'md5' cmds['pretty'] = 0 try: gopts, argsleft = getopt.getopt(args, 'phqVvg:s:x:u:', ['help', 'exclude', 'quiet', 'verbose', 'baseurl=', 'groupfile=', 'checksum=', 'version', 'pretty']) except getopt.error, e: errorprint(_('Options Error: %s.') % e) usage() try: for arg,a in gopts: if arg in ['-h','--help']: usage() elif arg in ['-V', '--version']: print '%s' % __version__ sys.exit(0) elif arg == '-v': cmds['verbose'] = 1 elif arg == "-q": cmds['quiet'] = 1 elif arg in ['-u', '--baseurl']: if cmds['baseurl'] is not None: errorprint(_('Error: Only one baseurl allowed.')) usage() else: cmds['baseurl'] = a elif arg in ['-g', '--groupfile']: if cmds['groupfile'] is not None: errorprint(_('Error: Only one groupfile allowed.')) usage() else: if os.path.exists(a): cmds['groupfile'] = a else: errorprint(_('Error: groupfile %s cannot be found.' % a)) usage() elif arg in ['-x', '--exclude']: cmds['excludes'].append(a) elif arg in ['-p', '--pretty']: cmds['pretty'] = 1 elif arg in ['-s', '--checksum']: if a not in ['md5', 'sha']: errorprint(_('Error: checksums are: md5 or sha.')) usage() else: cmds['sumtype'] = a except ValueError, e: errorprint(_('Options Error: %s') % e) usage() if len(argsleft) != 1: errorprint(_('Error: Only one directory allowed per run.')) usage() else: directory = argsleft[0] return cmds, directory
cbaae1150a20af8046109ed0c49b842d08159e2f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9557/cbaae1150a20af8046109ed0c49b842d08159e2f/genpkgmetadata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 2615, 12, 1968, 4672, 3536, 2884, 326, 1296, 980, 833, 327, 279, 4364, 2065, 471, 1867, 18, 23123, 866, 777, 326, 9198, 3832, 2275, 316, 18, 3536, 309, 225, 562, 12, 1968, 13, 42...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 2615, 12, 1968, 4672, 3536, 2884, 326, 1296, 980, 833, 327, 279, 4364, 2065, 471, 1867, 18, 23123, 866, 777, 326, 9198, 3832, 2275, 316, 18, 3536, 309, 225, 562, 12, 1968, 13, 42...
EXAMPLES: We illustrate the first six input formats (the other two
EXAMPLES: We illustrate the first six input formats (the other two
def canonical_label(self, partition=None, certify=False, verbosity=0, edge_labels=False): """ Returns the canonical label with respect to the partition. If no partition is given, uses the unit partition.
de4709933461015623fada3458699ad66b31a1d7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/de4709933461015623fada3458699ad66b31a1d7/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7378, 67, 1925, 12, 2890, 16, 3590, 33, 7036, 16, 3320, 1164, 33, 8381, 16, 11561, 33, 20, 16, 3591, 67, 5336, 33, 8381, 4672, 3536, 2860, 326, 7378, 1433, 598, 8762, 358, 326, 3590, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7378, 67, 1925, 12, 2890, 16, 3590, 33, 7036, 16, 3320, 1164, 33, 8381, 16, 11561, 33, 20, 16, 3591, 67, 5336, 33, 8381, 4672, 3536, 2860, 326, 7378, 1433, 598, 8762, 358, 326, 3590, ...
elif capCount < capMax: if (character == string.upper(character)): capitalize = True
elif (character == string.upper(character) and len(self.autoCapitalizeAllowPrefixes) and wordSoFar in self.autoCapitalizeAllowPrefixes): capitalize = True elif (len(self.autoCapitalizeForcePrefixes) and wordSoFar in self.autoCapitalizeForcePrefixes): capitalize = True
def _autoCapitalize(self): name = self.get().decode('utf-8') # capitalize each word capName = '' # allow no more than two capital letters per word capCount = 0 capMax = 2 for i in xrange(len(name)): character = name[i] # is it a letter that can be capitalized? # This assumes that string.lower and string.upper will return different # values for all unicode letters. canCapitalize = string.lower(character) != string.upper(character) if not canCapitalize: # this is a non-capitalize-able letter, assume we are between words. # reset the per-word capital letter count capCount = 0 else: capitalize = False # if it's not preceded by a letter, capitalize it unconditionally; # it's the first letter of a word if (i == 0) or string.lower(name[i-1]) == string.upper(name[i-1]): capitalize = True elif capCount < capMax: # we haven't hit the per-word limit for capital letters yet # is it a capital letter? if (character == string.upper(character)): # allow this letter to remain capitalized capitalize = True if capitalize: character = string.upper(character) capCount += 1 else: character = string.lower(character) capName += character self.enterText(capName.encode('utf-8'))
7e1083d8f97f208e4d9cb13ceab3cbf3a414014e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7242/7e1083d8f97f208e4d9cb13ceab3cbf3a414014e/DirectEntry.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6079, 4664, 7053, 554, 12, 2890, 4672, 508, 273, 365, 18, 588, 7675, 3922, 2668, 3158, 17, 28, 6134, 468, 17451, 1517, 2076, 3523, 461, 273, 875, 468, 1699, 1158, 1898, 2353, 2795, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6079, 4664, 7053, 554, 12, 2890, 4672, 508, 273, 365, 18, 588, 7675, 3922, 2668, 3158, 17, 28, 6134, 468, 17451, 1517, 2076, 3523, 461, 273, 875, 468, 1699, 1158, 1898, 2353, 2795, ...
if action == 'push': if not HasPermissionAnyMiddleware('repository.write', 'repository.admin')\ (user, repo_name): return HTTPForbidden()(environ, start_response)
def __call__(self, environ, start_response): if not is_mercurial(environ): return self.application(environ, start_response)
71052ce4e01163e7f0c4ea0966db2d47bcb5b568 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4230/71052ce4e01163e7f0c4ea0966db2d47bcb5b568/simplehg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 5473, 16, 787, 67, 2740, 4672, 309, 486, 353, 67, 6592, 1397, 649, 12, 28684, 4672, 327, 365, 18, 3685, 12, 28684, 16, 787, 67, 2740, 13, 2, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 5473, 16, 787, 67, 2740, 4672, 309, 486, 353, 67, 6592, 1397, 649, 12, 28684, 4672, 327, 365, 18, 3685, 12, 28684, 16, 787, 67, 2740, 13, 2, -100, -100...
key = (j[0], j[1], j[2], arch)
key = (j[0], arch)
def doop_source(self, pkg):
6abbd90bfcb33ae5f570c924e7387a2633b9d0de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/6abbd90bfcb33ae5f570c924e7387a2633b9d0de/britney.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 556, 67, 3168, 12, 2890, 16, 3475, 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, 741, 556, 67, 3168, 12, 2890, 16, 3475, 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, ...
'mail_service_id' : fields.many2one('dm.mail_service','Mail Service'), 'campaign_id' : fields.many2one('dm.campaign','Campaign'), 'offer_step_id' : fields.many2one('dm.offer.step','Offer Step'),
'mail_service_id': fields.many2one('dm.mail_service', 'Mail Service'), 'campaign_id': fields.many2one('dm.campaign', 'Campaign'), 'offer_step_id': fields.many2one('dm.offer.step', 'Offer Step'),
def on_change_service_type(self, cr, uid, ids, type_id): res = {'value':{}} if type_id: service_type = self.pool.get('dm.mail_service.type').read(cr, uid, [type_id])[0] res['value'] = {'service_type':service_type['code']} return res
7ee897432c7e7d5a5c8e889fc429c3c1b66627fd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/7ee897432c7e7d5a5c8e889fc429c3c1b66627fd/dm_campaign.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 3427, 67, 3278, 67, 723, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 618, 67, 350, 4672, 400, 273, 13666, 1132, 4278, 2916, 97, 309, 618, 67, 350, 30, 1156, 67, 723, 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, 603, 67, 3427, 67, 3278, 67, 723, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 618, 67, 350, 4672, 400, 273, 13666, 1132, 4278, 2916, 97, 309, 618, 67, 350, 30, 1156, 67, 723, 273, ...
if include_endpoint: if universe in [int, long, ZZ]: if (start-end) % step == 0: end += step else: count = (start-end)/step if count == int(float(count)): end += step count += 1 if universe is int: return xrange(start, end, step)
if universe in [int, long, ZZ]: if include_endpoint and (end-start) % step == 0: end += step include_endpoint = False if universe is not ZZ: return xrange(start, end, step) count = (end-start)/step if universe is long or not isinstance(universe, type) and universe.is_exact(): icount = int(math.ceil(float(count))) if icount != count: include_endpoint = False
def xsrange(start, end=None, step=1, universe=None, check=True, include_endpoint=False): """ Return an iterator over numbers \code{a, a+step, ..., a+k*step}, where \code{a+k*step < b} and \code{a+(k+1)*step > b}. INPUT: a -- number b -- number step -- number (default: 1) OUTPUT: iterator Unlike range, a and b can be any type of numbers, and the resulting iterator involves numbers of that type. SEE ALSO: srange. NOTE: This function is called \code{xsrange} to distinguish it from the builtin Python \code{xrange} command. EXAMPLES: sage: list(xsrange(1,10)) [1, 2, 3, 4, 5, 6, 7, 8, 9] sage: Q = RationalField() sage: list(xsrange(1, 10, Q('1/2'))) [1, 3/2, 2, 5/2, 3, 7/2, 4, 9/2, 5, 11/2, 6, 13/2, 7, 15/2, 8, 17/2, 9, 19/2] sage: R = RealField() sage: list(xsrange(1, 5, R(0.5))) [1.00000000000000, 1.50000000000000, 2.00000000000000, 2.50000000000000, 3.00000000000000, 3.50000000000000, 4.00000000000000, 4.50000000000000] sage: list(xsrange(0, 1, R('0.4'))) [0.000000000000000, 0.400000000000000, 0.800000000000000] Negative ranges are also allowed: sage: list(xrange(4,1,-1)) [4, 3, 2] sage: list(sxrange(4,1,-1)) [4, 3, 2] sage: list(sxrange(4,1,-1/2)) [4, 7/2, 3, 5/2, 2, 3/2] """ if end is None: end = start start = 0 if step == 0: raise ValueError, "step must not be 0" from sage.structure.sequence import Sequence from sage.rings.all import ZZ if check: if universe is None: universe = Sequence([start, end, step]).universe() start, end, step = universe(start), universe(end), universe(step) if include_endpoint: if universe in [int, long, ZZ]: if (start-end) % step == 0: end += step else: count = (start-end)/step if count == int(float(count)): end += step count += 1 if universe is int: return xrange(start, end, step)
7dbed6340590bb07caaccdfb42c33acf5a427320 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/7dbed6340590bb07caaccdfb42c33acf5a427320/misc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9280, 3676, 12, 1937, 16, 679, 33, 7036, 16, 2235, 33, 21, 16, 29235, 33, 7036, 16, 866, 33, 5510, 16, 2341, 67, 8003, 33, 8381, 4672, 3536, 2000, 392, 2775, 1879, 5600, 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, 9280, 3676, 12, 1937, 16, 679, 33, 7036, 16, 2235, 33, 21, 16, 29235, 33, 7036, 16, 866, 33, 5510, 16, 2341, 67, 8003, 33, 8381, 4672, 3536, 2000, 392, 2775, 1879, 5600, 521, 710, 95...
signode += addnodes.desc_addname(nameprefix, nameprefix)
signode += addnodes.desc_addname(nameprefix + '.', nameprefix + '.')
def handle_signature(self, sig, signode): match = js_sig_re.match(sig) if match is None: raise ValueError() nameprefix, name, arglist = match.groups()
16af1ad55982941124f9e5f63e6e81f7f3eebe88 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7032/16af1ad55982941124f9e5f63e6e81f7f3eebe88/javascript.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 8195, 12, 2890, 16, 3553, 16, 1573, 390, 4672, 845, 273, 3828, 67, 7340, 67, 266, 18, 1916, 12, 7340, 13, 309, 845, 353, 599, 30, 1002, 2068, 1435, 508, 3239, 16, 508, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 8195, 12, 2890, 16, 3553, 16, 1573, 390, 4672, 845, 273, 3828, 67, 7340, 67, 266, 18, 1916, 12, 7340, 13, 309, 845, 353, 599, 30, 1002, 2068, 1435, 508, 3239, 16, 508, 16, ...
Result: A list of TestCase objects on success or a dictionary containing values for the keys, "faultCode" and "faultString".
Result: A list of TestCase objects on success
def testplan_get_test_cases(self, plan_id): """Get A List of Test Cases For An Existing Test Plan.
83012e559756373ef19add9ed3d26f1bf779a22c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/231/83012e559756373ef19add9ed3d26f1bf779a22c/testopia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 7088, 67, 588, 67, 3813, 67, 22186, 12, 2890, 16, 4995, 67, 350, 4672, 3536, 967, 432, 987, 434, 7766, 385, 3304, 2457, 1922, 28257, 7766, 12540, 18, 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, 1842, 7088, 67, 588, 67, 3813, 67, 22186, 12, 2890, 16, 4995, 67, 350, 4672, 3536, 967, 432, 987, 434, 7766, 385, 3304, 2457, 1922, 28257, 7766, 12540, 18, 2, -100, -100, -100, -100, -...
if not re.match(r"^([\w-]+)/([\w-]+)/([\w-]+)/([\w-]+)$", key):
if not re.match(r"^([\w\.-]+)/([\w\.-]+)/([\w\.-]+)/([\w\.-]+)$", key):
def testPerfExpectations(self): perf_data = LoadData()
dec8a15f70878a3d38b16c552b0e3d893d7f68e6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/dec8a15f70878a3d38b16c552b0e3d893d7f68e6/perf_expectations_unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 22016, 11988, 1012, 12, 2890, 4672, 14184, 67, 892, 273, 4444, 751, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 1842, 22016, 11988, 1012, 12, 2890, 4672, 14184, 67, 892, 273, 4444, 751, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
box.Add(self.nextButton, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.ALL, 5)
def OnInit(self):
ba8e5f745581acf2bd520ada71fb09aa70a52e9e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/ba8e5f745581acf2bd520ada71fb09aa70a52e9e/CalendarCanvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 2570, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 2570, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
suff = suff[1:]
def is_square_free(self): r""" Returns True if self does not contain squares, and False otherwise.
65e004c0d1f96d960ea72ba590c71bc975cf9627 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/65e004c0d1f96d960ea72ba590c71bc975cf9627/finite_word.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 19719, 67, 9156, 12, 2890, 4672, 436, 8395, 2860, 1053, 309, 365, 1552, 486, 912, 31206, 16, 471, 1083, 3541, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 19719, 67, 9156, 12, 2890, 4672, 436, 8395, 2860, 1053, 309, 365, 1552, 486, 912, 31206, 16, 471, 1083, 3541, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
try: wikipedia.showDiff(oldtext, newtext) except: wikipedia.output(u'Error executing showDiff')
wikipedia.showDiff(oldtext, newtext)
def replaceLinks(self, pl, new, sa): wikipedia.output(u"Updating links on page %s." % pl.aslink(forceInterwiki = True))
02fc12a4124b63d8e2a4be36fe82132950863eae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/02fc12a4124b63d8e2a4be36fe82132950863eae/interwiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1453, 7100, 12, 2890, 16, 886, 16, 394, 16, 7864, 4672, 21137, 18, 2844, 12, 89, 6, 17858, 4716, 603, 1363, 738, 87, 1199, 738, 886, 18, 345, 1232, 12, 5734, 2465, 13044, 273, 1053, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1453, 7100, 12, 2890, 16, 886, 16, 394, 16, 7864, 4672, 21137, 18, 2844, 12, 89, 6, 17858, 4716, 603, 1363, 738, 87, 1199, 738, 886, 18, 345, 1232, 12, 5734, 2465, 13044, 273, 1053, ...
_logger.debug('BuddyLeft: %s', buddy_path)
_logger.debug('%r: BuddyLeft: %s', self, buddy_path)
def BuddyLeft(self, buddy_path): """Generates DBUS signal when a buddy leaves this activity.
25577b1486c01197df936bb991230734bc38df7b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3113/25577b1486c01197df936bb991230734bc38df7b/activity.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 605, 29017, 3910, 12, 2890, 16, 324, 29017, 67, 803, 4672, 3536, 6653, 2383, 3378, 4277, 1347, 279, 324, 29017, 15559, 333, 5728, 18, 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, 605, 29017, 3910, 12, 2890, 16, 324, 29017, 67, 803, 4672, 3536, 6653, 2383, 3378, 4277, 1347, 279, 324, 29017, 15559, 333, 5728, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
if 'readonly' in self.attrs and self.attrs['readonly']:
if key == 'readonly' and self.attrs.get(key, False):
def state_set(self, model, values=None): if values is None: values = {'state': 'draft'} state_changes = self.attrs.get('states', {}) try: if isinstance(state_changes, basestring): state_changes = eval(state_changes) for key in ('readonly', 'required', 'invisible'): if 'readonly' in self.attrs and self.attrs['readonly']: continue if key in state_changes: self.get_state_attrs(model)[key] = \ eval(state_changes[key], values) elif key in self.attrs: self.get_state_attrs(model)[key] = self.attrs[key] if model.mgroup.readonly: self.get_state_attrs(model)['readonly'] = True if 'value' in state_changes: value = eval(state_changes['value'], values) if value: self.set(model, value, test_state=False, modified=True) except: pass
5c79be6a7c670c3293355ffcc3e0f4cee9a78181 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9151/5c79be6a7c670c3293355ffcc3e0f4cee9a78181/field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 919, 67, 542, 12, 2890, 16, 938, 16, 924, 33, 7036, 4672, 309, 924, 353, 599, 30, 924, 273, 13666, 2019, 4278, 296, 17153, 11, 97, 919, 67, 6329, 273, 365, 18, 7039, 18, 588, 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, 919, 67, 542, 12, 2890, 16, 938, 16, 924, 33, 7036, 4672, 309, 924, 353, 599, 30, 924, 273, 13666, 2019, 4278, 296, 17153, 11, 97, 919, 67, 6329, 273, 365, 18, 7039, 18, 588, 2668, ...
raise ValueError("Unsupported scrap_type: %r" % (scrap_type,))
pass
def put(scrap_type, thing): board = NSPasteboard.generalPasteboard() if scrap_type == SCRAP_TEXT: board.declareTypes_owner_([NSStringPboardType, ScrapPboardType], None) if isinstance(thing, unicode): text_thing = thing else: text_thing = unicode(text_thing, 'utf-8') board.setString_forType_(text_thing, NSStringPboardType) board.setString_forType_(u'', ScrapPboardType) elif scrap_type == SCRAP_BMP: # This is pretty silly, we shouldn't have to do this... fh = tempfile.NamedTemporaryFile(suffix='.png') pygame.image.save(thing, fh.name) path = fh.name if not isinstance(path, unicode): path = unicode(path, sys.getfilesystemencoding()) img = NSImage.alloc().initByReferencingFile_(path) tiff = img.TIFFRepresentation() fh.close() board.declareTypes_owner_([NSTIFFPboardType, ScrapPboardType], None) board.setData_forType_(tiff, NSTIFFPboardType) board.setString_forType_(u'', ScrapPboardType) else: raise ValueError("Unsupported scrap_type: %r" % (scrap_type,))
bd6e0badd3e5bbf24d517ef0c768e2c1534a6350 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1298/bd6e0badd3e5bbf24d517ef0c768e2c1534a6350/mac_scrap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 12, 1017, 1266, 67, 723, 16, 7757, 4672, 11094, 273, 423, 3118, 14725, 3752, 18, 12259, 52, 14725, 3752, 1435, 309, 888, 1266, 67, 723, 422, 348, 5093, 2203, 67, 5151, 30, 11094, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 12, 1017, 1266, 67, 723, 16, 7757, 4672, 11094, 273, 423, 3118, 14725, 3752, 18, 12259, 52, 14725, 3752, 1435, 309, 888, 1266, 67, 723, 422, 348, 5093, 2203, 67, 5151, 30, 11094, ...
self.logger.debug("ThreadPackageMirror succeed %s"%(str(result)))
self.logger.debug("ThreadPackageMirror succeed %s" % (str(result)))
def onSuccess(self, result, args): pid, target, is_deletion = args out, err, code = result if code == 0: self.logger.debug("ThreadPackageMirror succeed %s"%(str(result))) Common().removePackagesFromRsyncList(pid, target) else: self.logger.error("ThreadPackageMirror mirroring command failed %s"%(str(result)))
7879d145d6e1f41cca4fb3f4649b20d89d33e95f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5988/7879d145d6e1f41cca4fb3f4649b20d89d33e95f/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20613, 12, 2890, 16, 563, 16, 833, 4672, 4231, 16, 1018, 16, 353, 67, 19003, 285, 273, 833, 596, 16, 393, 16, 981, 273, 563, 309, 981, 422, 374, 30, 365, 18, 4901, 18, 4148, 2932, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20613, 12, 2890, 16, 563, 16, 833, 4672, 4231, 16, 1018, 16, 353, 67, 19003, 285, 273, 833, 596, 16, 393, 16, 981, 273, 563, 309, 981, 422, 374, 30, 365, 18, 4901, 18, 4148, 2932, ...
package.load(package_dictionary.get(package.codepath, None)) if self._dependency_graph.vertices.has_key(package.identifier): raise VistrailsInternalError('duplicate package identifier: %s' % package.identifier) self._dependency_graph.add_vertex(package.identifier) self._identifier_map[package.identifier] = package
try: package.load(package_dictionary.get(package.codepath, None)) except Package.LoadFailed, e: print "FAILED TO LOAD, let's disable it" package.remove_own_dom_element() failed.append(package) else: if self._dependency_graph.vertices.has_key(package.identifier): raise VistrailsInternalError('duplicate package identifier: %s' % package.identifier) self._dependency_graph.add_vertex(package.identifier) self._identifier_map[package.identifier] = package for pkg in failed: del self._package_list[pkg.codepath]
def initialize_packages(self,package_dictionary={}): """initialize_packages(package_dictionary={}): None
05a09d37512301aa59c1abed9892c1cbc9d5c4d0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6341/05a09d37512301aa59c1abed9892c1cbc9d5c4d0/packagemanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 67, 10308, 12, 2890, 16, 5610, 67, 15556, 12938, 4672, 3536, 11160, 67, 10308, 12, 5610, 67, 15556, 12938, 4672, 599, 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, 0, 0, 0, 0, 0, 0, 0, 0, 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, 4046, 67, 10308, 12, 2890, 16, 5610, 67, 15556, 12938, 4672, 3536, 11160, 67, 10308, 12, 5610, 67, 15556, 12938, 4672, 599, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
residue_dict['%s_%s_%s'% (sidechain_atoms[0],sidechain_atoms[1],sidechain_atoms[2])] = sidechain_angle
residue_dict['%s_%s_%s'% (sidechain_atom_names[0],sidechain_atom_names[1],sidechain_atom_names[2])] = sidechain_angle
def calc_sidechain_angles(residue, residue_dict): """ NEEDS TESTING AND A GOOD LOOKING OVER""" """ Calculates Values for sidechain bond angles. Uses a predefined list from sidechain.py, specifically bond_angles. """ try: mapping = bond_lengths[residue.resname] for i in range(len(mapping)): sidechain_atom_names= mapping[i] try: sidechain_atoms = [residue[n].get_vector() for n in sidechain_atom_names] sidechain_angle = calc_angle(*sidechain_atoms) residue_dict['%s_%s_%s'% (sidechain_atoms[0],sidechain_atoms[1],sidechain_atoms[2])] = sidechain_angle except KeyError: #missing an atom continue except KeyError: # this residue type does not have sidechain angles pass
00777b831a990177de327735023515352dc803bf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6163/00777b831a990177de327735023515352dc803bf/ProcessPDBTask.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 67, 5564, 5639, 67, 12356, 12, 23388, 16, 14765, 67, 1576, 4672, 3536, 12901, 2056, 55, 22130, 1360, 4116, 432, 12389, 1212, 1806, 3141, 1360, 22577, 8395, 3536, 26128, 6876, 364, 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, 7029, 67, 5564, 5639, 67, 12356, 12, 23388, 16, 14765, 67, 1576, 4672, 3536, 12901, 2056, 55, 22130, 1360, 4116, 432, 12389, 1212, 1806, 3141, 1360, 22577, 8395, 3536, 26128, 6876, 364, 48...
def reload_orientation(self, entry, dropdown): self.load_orientation(entry['group'], entry['key'], dropdown)
def reload_orientation(self, group, key, value, dropdown): self.load_orientation(group, key, dropdown)
def reload_orientation(self, entry, dropdown): self.load_orientation(entry['group'], entry['key'], dropdown)
6e5ef9d2ff04626633394808ed3d5531bb4809af /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8416/6e5ef9d2ff04626633394808ed3d5531bb4809af/awnClass.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7749, 67, 19235, 12, 2890, 16, 1241, 16, 13972, 4672, 365, 18, 945, 67, 19235, 12, 4099, 3292, 1655, 17337, 1241, 3292, 856, 17337, 13972, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7749, 67, 19235, 12, 2890, 16, 1241, 16, 13972, 4672, 365, 18, 945, 67, 19235, 12, 4099, 3292, 1655, 17337, 1241, 3292, 856, 17337, 13972, 13, 2, -100, -100, -100, -100, -100, -100, -100...
try: fp = open(file) except: return None
fp = open(file)
def __init__(self, file=None): if not file: file = os.path.join(os.environ['HOME'], ".netrc") try: fp = open(file) except: return None self.hosts = {} self.macros = {} lexer = shlex.shlex(fp)
94386c09a599b72a60117b78821688716b60139b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/94386c09a599b72a60117b78821688716b60139b/netrc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 585, 33, 7036, 4672, 309, 486, 585, 30, 585, 273, 1140, 18, 803, 18, 5701, 12, 538, 18, 28684, 3292, 14209, 17337, 3552, 2758, 1310, 7923, 4253, 273, 169...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 585, 33, 7036, 4672, 309, 486, 585, 30, 585, 273, 1140, 18, 803, 18, 5701, 12, 538, 18, 28684, 3292, 14209, 17337, 3552, 2758, 1310, 7923, 4253, 273, 169...
self._consumer = _SequenceConsumer()
self._consumer = _SequenceConsumer(alphabet)
def __init__(self): self._scanner = _Scanner() self._consumer = _SequenceConsumer()
c003e4b85f91f86bef6738c9bee1feedd98e365a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/c003e4b85f91f86bef6738c9bee1feedd98e365a/SProt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 6315, 26842, 273, 389, 11338, 1435, 365, 6315, 13230, 273, 389, 4021, 5869, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 6315, 26842, 273, 389, 11338, 1435, 365, 6315, 13230, 273, 389, 4021, 5869, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if isinstance(document, str):
if isinstance(document, basestring):
def parse(cls, document, *args, **kwargs): try: if isinstance(document, str): xml = etree.XML(document, parser=cls._xml_parser) else: xml = etree.parse(document, parser=cls._xml_parser).getroot() except etree.XMLSyntaxError, e: raise ParserError(str(e)) else: kwargs.setdefault('xml_application', cls._xml_application) return cls.from_element(xml, *args, **kwargs)
cd5bb9cd53b39b63fb2b94913998bcd015831424 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3449/cd5bb9cd53b39b63fb2b94913998bcd015831424/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 6429, 16, 1668, 16, 380, 1968, 16, 2826, 4333, 4672, 775, 30, 309, 1549, 12, 5457, 16, 10699, 4672, 2025, 273, 12031, 18, 4201, 12, 5457, 16, 2082, 33, 6429, 6315, 2902, 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, 1109, 12, 6429, 16, 1668, 16, 380, 1968, 16, 2826, 4333, 4672, 775, 30, 309, 1549, 12, 5457, 16, 10699, 4672, 2025, 273, 12031, 18, 4201, 12, 5457, 16, 2082, 33, 6429, 6315, 2902, 67, ...
styles.stylize(styles.ST_BAD, 'ERROR:'),
stylize(ST_BAD, 'ERROR:'),
def error(mesg, returncode=1, full=False, tb=None, listener=None): """ Display a styles.stylized error message and exit badly. """ if full: if tb: sys.stderr.write(tb + '\n') else: import traceback sys.stderr.write ('''>>> %s: ''' % (styles.stylize(styles.ST_OK, "Call trace"))) traceback.print_tb( sys.exc_info()[2] ) sys.stderr.write("\n") sys.stderr.write('%s %s %s\n' % ( styles.stylize(styles.ST_BAD, 'ERROR:'), mytime(), mesg)) raise SystemExit(returncode)
a4712f82b2f0d14c0f1c465fc523b05667dfb57d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a4712f82b2f0d14c0f1c465fc523b05667dfb57d/logging.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 555, 12, 26244, 75, 16, 18125, 33, 21, 16, 1983, 33, 8381, 16, 8739, 33, 7036, 16, 2991, 33, 7036, 4672, 3536, 9311, 279, 5687, 18, 334, 93, 80, 1235, 555, 883, 471, 2427, 5570, 715,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 555, 12, 26244, 75, 16, 18125, 33, 21, 16, 1983, 33, 8381, 16, 8739, 33, 7036, 16, 2991, 33, 7036, 4672, 3536, 9311, 279, 5687, 18, 334, 93, 80, 1235, 555, 883, 471, 2427, 5570, 715,...
context)
context)
def check_type(field_type): if field_type == 'float': return 0.0 elif field_type == 'integer': return 0 elif field_type == 'boolean': return False return ''
0a6517a8d20ec7978c7b60dc4720e6fc04b81f83 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/0a6517a8d20ec7978c7b60dc4720e6fc04b81f83/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 723, 12, 1518, 67, 723, 4672, 309, 652, 67, 723, 422, 296, 5659, 4278, 327, 374, 18, 20, 1327, 652, 67, 723, 422, 296, 7745, 4278, 327, 374, 1327, 652, 67, 723, 422, 296, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 723, 12, 1518, 67, 723, 4672, 309, 652, 67, 723, 422, 296, 5659, 4278, 327, 374, 18, 20, 1327, 652, 67, 723, 422, 296, 7745, 4278, 327, 374, 1327, 652, 67, 723, 422, 296, ...
result += txt
result += unicode(txt)
def _process_text(self, txt): if not self.localcontext: return str2xml(txt) if not txt: return '' result = '' sps = _regex.split(txt) while sps: # This is a simple text to translate to_translate = tools.ustr(sps.pop(0)) result += tools.ustr(self.localcontext.get('translate', lambda x:x)(to_translate)) if sps: try: txt = None expr = sps.pop(0) txt = eval(expr, self.localcontext) if txt and isinstance(txt, basestring): txt = tools.ustr(txt) except Exception: pass if isinstance(txt, basestring): result += str2xml(txt) elif (txt is not None) and (txt is not False): result += txt return result
f886f8f43b6d627dcd6c6900e61bee3bc2c59648 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f886f8f43b6d627dcd6c6900e61bee3bc2c59648/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 67, 955, 12, 2890, 16, 6463, 4672, 309, 486, 365, 18, 3729, 2472, 30, 327, 609, 22, 2902, 12, 5830, 13, 309, 486, 6463, 30, 327, 875, 563, 273, 875, 272, 1121, 273, 389, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 67, 955, 12, 2890, 16, 6463, 4672, 309, 486, 365, 18, 3729, 2472, 30, 327, 609, 22, 2902, 12, 5830, 13, 309, 486, 6463, 30, 327, 875, 563, 273, 875, 272, 1121, 273, 389, ...
remove_paren = lexer.macro_map[t.value]
remove_paren = t.lexer.macro_map[t.value]
def t_ID(t): r'~?[a-zA-Z_\$][a-zA-Z_0-9\$]*[ \t]*' t.value = t.value.strip() try: remove_paren = lexer.macro_map[t.value] if remove_paren and t.lexer.lexdata[t.lexer.lexpos] == '(': t.lexer.begin('MACRO') except KeyError: t.type = reserved_map.get(t.value, "ID") return t
fd6e74705730e8bfe77462fc585dc1b6c5368739 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7302/fd6e74705730e8bfe77462fc585dc1b6c5368739/ddf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 67, 734, 12, 88, 4672, 436, 11, 98, 18428, 69, 17, 9600, 17, 62, 67, 14433, 6362, 69, 17, 9600, 17, 62, 67, 20, 17, 29, 14433, 5772, 63, 521, 88, 65, 4035, 268, 18, 1132, 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, 268, 67, 734, 12, 88, 4672, 436, 11, 98, 18428, 69, 17, 9600, 17, 62, 67, 14433, 6362, 69, 17, 9600, 17, 62, 67, 20, 17, 29, 14433, 5772, 63, 521, 88, 65, 4035, 268, 18, 1132, 27...
return self._track_on_device(episode)
return self._track_on_device(episode.title)
def episode_on_device(self, episode): return self._track_on_device(episode)
079fe886e7ed4e72eb93abcdf5e0a3104e11a387 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12778/079fe886e7ed4e72eb93abcdf5e0a3104e11a387/sync.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17054, 67, 265, 67, 5964, 12, 2890, 16, 17054, 4672, 327, 365, 6315, 4101, 67, 265, 67, 5964, 12, 29687, 13, 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, 17054, 67, 265, 67, 5964, 12, 2890, 16, 17054, 4672, 327, 365, 6315, 4101, 67, 265, 67, 5964, 12, 29687, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Note that decimal places (from zero) is usually not the same
Note that decimal places (from zero) are usually not the same
def failUnlessAlmostEqual(self, first, second, places=7, msg=None): """Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero.
99c020b458dc7210f2c230a25c6760727a00cc4d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/99c020b458dc7210f2c230a25c6760727a00cc4d/unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2321, 984, 2656, 1067, 10329, 5812, 12, 2890, 16, 1122, 16, 2205, 16, 12576, 33, 27, 16, 1234, 33, 7036, 4672, 3536, 3754, 309, 326, 2795, 2184, 854, 640, 9729, 487, 11383, 635, 3675, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2321, 984, 2656, 1067, 10329, 5812, 12, 2890, 16, 1122, 16, 2205, 16, 12576, 33, 27, 16, 1234, 33, 7036, 4672, 3536, 3754, 309, 326, 2795, 2184, 854, 640, 9729, 487, 11383, 635, 3675, ...
if (animtest.is_static_image() == True and self.preloadimg_next_pixbuf_original != animtest.get_static_image()) or (animtest.is_static_image() == False and self.preloadimg_next_pixbuf_original != animtest): self.preloadimg_next_pixbuf_original = None self.preload_when_idle = gobject.idle_add(self.preload_next_image, False)
if animtest.is_static_image() == True: if self.images_are_different(animtest.get_static_image(), self.preloadimg_next_pixbuf_original): self.preloadimg_next_pixbuf_original = None self.preload_when_idle = gobject.idle_add(self.preload_next_image, False) else: if self.images_are_different(animtest, self.preloadimg_next_pixbuf_original): self.preloadimg_next_pixbuf_original = None self.preload_when_idle = gobject.idle_add(self.preload_next_image, False) def images_are_different(self, pixbuf1, pixbuf2): if pixbuf1.get_pixels() == pixbuf2.get_pixels(): return False else: return True
def parse_action_command(self, command, batchmode): self.change_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) while gtk.events_pending(): gtk.main_iteration() if batchmode == True: for i in range(len(self.image_list)): imagename = self.image_list[i] self.parse_action_command2(command, imagename) else: self.parse_action_command2(command, self.currimg_name) gc.collect() self.change_cursor(None) # Refresh the current image or any preloaded needed if they have changed: if os.path.exists(self.currimg_name) == False: self.currimg_pixbuf_original = None self.image_load_failed(False) else: animtest = gtk.gdk.PixbufAnimation(self.currimg_name) if (animtest.is_static_image() == True and self.currimg_pixbuf_original != animtest.get_static_image()) or (animtest.is_static_image() == False and self.currimg_pixbuf_original != animtest): self.load_new_image(False, False, False, True, False) if os.path.exists(self.preloadimg_prev_name) == False: self.preloadimg_prev_pixbuf_original = None else: animtest = gtk.gdk.PixbufAnimation(self.preloadimg_prev_name) if (animtest.is_static_image() == True and self.preloadimg_prev_pixbuf_original != animtest.get_static_image()) or (animtest.is_static_image() == False and self.preloadimg_prev_pixbuf_original != animtest): self.preloadimg_prev_pixbuf_original = None self.preload_when_idle = gobject.idle_add(self.preload_prev_image, False) if os.path.exists(self.preloadimg_next_name) == False: self.preloadimg_next_pixbuf_original = None else: animtest = gtk.gdk.PixbufAnimation(self.preloadimg_next_name) if (animtest.is_static_image() == True and self.preloadimg_next_pixbuf_original != animtest.get_static_image()) or (animtest.is_static_image() == False and self.preloadimg_next_pixbuf_original != animtest): self.preloadimg_next_pixbuf_original = None self.preload_when_idle = gobject.idle_add(self.preload_next_image, False)
27d2355de4fb441298280d91b3753c51d39b2607 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/27d2355de4fb441298280d91b3753c51d39b2607/mirage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 1128, 67, 3076, 12, 2890, 16, 1296, 16, 2581, 3188, 4672, 365, 18, 3427, 67, 9216, 12, 4521, 79, 18, 75, 2883, 18, 6688, 12, 4521, 79, 18, 75, 2883, 18, 59, 5858, 3719, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 1128, 67, 3076, 12, 2890, 16, 1296, 16, 2581, 3188, 4672, 365, 18, 3427, 67, 9216, 12, 4521, 79, 18, 75, 2883, 18, 6688, 12, 4521, 79, 18, 75, 2883, 18, 59, 5858, 3719, 1...
(string.capitalize(name), data)) lines.append("%s=%s" % (name, repr(data)[1:-1]))
(string.capitalize(name), escape(data))) lines.append("%s=%s" % (name, escape(data)))
def get_inidata (self): # Return data describing the installation.
65e77e6acdaf1059f02c591a7b54e97974a06b3a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/65e77e6acdaf1059f02c591a7b54e97974a06b3a/bdist_wininst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 267, 350, 396, 261, 2890, 4672, 468, 2000, 501, 16868, 326, 13193, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 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, 336, 67, 267, 350, 396, 261, 2890, 4672, 468, 2000, 501, 16868, 326, 13193, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
def meldVariants(self, tile):
def __meldVariants(self, tile):
def meldVariants(self, tile): """returns a list of possible variants based on the dropped tile. The Variants are scoring strings. Do not use the real tiles because we change their properties""" lowerName = tile.scoringStr().lower() upperName = lowerName[0].upper() + lowerName[1] if self.lowerHalf: scName = upperName else: scName = lowerName variants = [scName] baseTiles = self.selector.tilesByElement(tile.element)[0].count if baseTiles >= 2: variants.append(scName * 2) if baseTiles >= 3: variants.append(scName * 3) if baseTiles == 4: if self.lowerHalf: variants.append(lowerName + upperName * 2 + lowerName) else: variants.append(lowerName * 4) variants.append(lowerName * 3 + upperName) if tile.element[:2] not in ('WI', 'DR') and tile.element[1] < '8': chow2 = self.chiNext(tile.element, 2) chow3 = self.chiNext(tile.element, 3) chow2 = self.selector.tilesByElement(chow2)[0] chow3 = self.selector.tilesByElement(chow3)[0] if chow2.count and chow3.count: baseChar = scName[0] baseValue = ord(scName[1]) varStr = '%s%s%s%s%s' % (scName, baseChar, chr(baseValue+1), baseChar, chr(baseValue+2)) variants.append(varStr) return [Meld(x) for x in variants]
13f3881b22585b4afca5955a50ab9791a11df14a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1679/13f3881b22585b4afca5955a50ab9791a11df14a/board.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 81, 488, 21165, 12, 2890, 16, 4769, 4672, 3536, 6154, 279, 666, 434, 3323, 12935, 2511, 603, 326, 14611, 4769, 18, 1021, 11487, 4388, 854, 22958, 2064, 18, 2256, 486, 999, 326, 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, 1001, 81, 488, 21165, 12, 2890, 16, 4769, 4672, 3536, 6154, 279, 666, 434, 3323, 12935, 2511, 603, 326, 14611, 4769, 18, 1021, 11487, 4388, 854, 22958, 2064, 18, 2256, 486, 999, 326, 286...
assert False, \ "There must be two nonzero entries (-1 & 1) per column."
msg += "There must be two nonzero entries (-1 & 1) per column." assert False
def __init__(self, data=None, pos=None, loops=None, format=None, boundary=[], weighted=None, implementation='networkx', sparse=True, vertex_labels=True, **kwds): """ TESTS:: sage: D = DiGraph() sage: loads(dumps(D)) == D True
4d8c83f4212c2b60b6c708db820fd70304ef6623 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/4d8c83f4212c2b60b6c708db820fd70304ef6623/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 501, 33, 7036, 16, 949, 33, 7036, 16, 14075, 33, 7036, 16, 740, 33, 7036, 16, 7679, 22850, 6487, 13747, 33, 7036, 16, 4471, 2218, 5185, 92, 2187, 9387, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 33, 7036, 16, 949, 33, 7036, 16, 14075, 33, 7036, 16, 740, 33, 7036, 16, 7679, 22850, 6487, 13747, 33, 7036, 16, 4471, 2218, 5185, 92, 2187, 9387, ...
self.__important__ = [entry.get('name') for struct in config for entry in struct \
self.__important__ = [entry.get('name') \ for struct in config for entry in struct \
def __init__(self, logger, setup, config): self.__important__ = [entry.get('name') for struct in config for entry in struct \ if entry.tag == 'Path' and \ entry.get('important') in ['true', 'True']] self.setup = setup self.logger = logger if not hasattr(self, '__ireq__'): self.__ireq__ = self.__req__ self.config = config self.cmd = executor(logger) self.modified = [] self.extra = [] self.handled = [entry for struct in self.config for entry in struct \ if self.handlesEntry(entry)] for filename in self.__execs__: try: mode = stat.S_IMODE(os.stat(filename)[stat.ST_MODE]) if mode & stat.S_IEXEC != stat.S_IEXEC: self.logger.debug("%s: %s not executable" % \ (self.name, filename)) raise toolInstantiationError except OSError: raise toolInstantiationError except: self.logger.debug("%s failed" % filename, exc_info=1) raise toolInstantiationError
decb4dd187c808e2f1c0ff7040e914abc7adeae2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11867/decb4dd187c808e2f1c0ff7040e914abc7adeae2/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1194, 16, 3875, 16, 642, 4672, 365, 16186, 23221, 972, 273, 306, 4099, 18, 588, 2668, 529, 6134, 521, 364, 1958, 316, 642, 364, 1241, 316, 1958, 521, 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, 1001, 2738, 972, 12, 2890, 16, 1194, 16, 3875, 16, 642, 4672, 365, 16186, 23221, 972, 273, 306, 4099, 18, 588, 2668, 529, 6134, 521, 364, 1958, 316, 642, 364, 1241, 316, 1958, 521, 309...
addnstr is safe
Safe call to addnstr
def addnstr(self, *args): """ addnstr is safe """ try: self.win.addnstr(*args) except: pass
53a5536cf12cbe8474f37b1c8e31b60489b2b62f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9814/53a5536cf12cbe8474f37b1c8e31b60489b2b62f/window.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 82, 701, 12, 2890, 16, 380, 1968, 4672, 3536, 14060, 745, 358, 527, 82, 701, 3536, 775, 30, 365, 18, 8082, 18, 1289, 82, 701, 30857, 1968, 13, 1335, 30, 1342, 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, 527, 82, 701, 12, 2890, 16, 380, 1968, 4672, 3536, 14060, 745, 358, 527, 82, 701, 3536, 775, 30, 365, 18, 8082, 18, 1289, 82, 701, 30857, 1968, 13, 1335, 30, 1342, 2, -100, -100, -10...
pass
self._allowed_languages.remove(language)
def remove_allowed_language(self, language): """The language must match the first part of the class name of the support class for that language (eg "C" for "CSupport", "Cpp" for "CppSupport"). """ pass
737b136d474a99d3a53c7a60afbfd6b0524e85f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2803/737b136d474a99d3a53c7a60afbfd6b0524e85f4/settings.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 8151, 67, 4923, 12, 2890, 16, 2653, 4672, 3536, 1986, 2653, 1297, 845, 326, 1122, 1087, 434, 326, 667, 508, 434, 326, 2865, 667, 364, 716, 2653, 261, 1332, 315, 39, 6, 364, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1206, 67, 8151, 67, 4923, 12, 2890, 16, 2653, 4672, 3536, 1986, 2653, 1297, 845, 326, 1122, 1087, 434, 326, 667, 508, 434, 326, 2865, 667, 364, 716, 2653, 261, 1332, 315, 39, 6, 364, ...
cmd = cmd + ' panda/src/configfiles/pandaIcon.obj'
cmd = cmd + ' panda/src/configfiles/pandaIcon.obj'
def CompileLink(dll, obj, opts): if (COMPILER=="MSVC"): cmd = 'link /nologo /NOD:MFC80.LIB /NOD:LIBCI.LIB /NOD:MSVCRTD.LIB /DEBUG ' cmd = cmd + " /nod:libc /nod:libcmtd /nod:atlthunk" if (GetOrigExt(dll) != ".exe"): cmd = cmd + " /DLL" optlevel = GetOptimizeOption(opts,OPTIMIZE) if (optlevel==1): cmd = cmd + " /MAP /MAPINFO:EXPORTS" if (optlevel==2): cmd = cmd + " /MAP:NUL " if (optlevel==3): cmd = cmd + " /MAP:NUL " if (optlevel==4): cmd = cmd + " /MAP:NUL /LTCG " cmd = cmd + " /FIXED:NO /OPT:REF /STACK:4194304 /INCREMENTAL:NO " cmd = cmd + ' /OUT:' + dll if (dll.endswith(".dll")): cmd = cmd + ' /IMPLIB:built/lib/'+dll[10:-4]+".lib" for (opt, dir) in LIBDIRECTORIES: if (opt=="ALWAYS") or (opts.count(opt)): cmd = cmd + ' /LIBPATH:"' + dir + '"' for x in obj: if (x.endswith(".dll")): cmd = cmd + ' built/lib/' + x[10:-4] + ".lib" elif (x.endswith(".lib")): dname = x[:-4]+".dll" if (os.path.exists("built/bin/" + x[10:-4] + ".dll")): exit("Error: in makepanda, specify "+dname+", not "+x) cmd = cmd + ' ' + x elif (x.endswith(".def")): cmd = cmd + ' /DEF:"' + x + '"' elif (x.endswith(".dat")): pass else: cmd = cmd + ' ' + x if (GetOrigExt(dll)==".exe"): cmd = cmd + ' panda/src/configfiles/pandaIcon.obj' for (opt, name) in LIBNAMES: if (opt=="ALWAYS") or (opts.count(opt)): cmd = cmd + ' ' + name oscmd(cmd) SetVC80CRTVersion(dll+".manifest", VC80CRTVERSION) mtcmd = 'mt -manifest ' + dll + '.manifest -outputresource:' + dll if (dll.endswith(".exe")==0): mtcmd = mtcmd + ';2' else: mtcmd = mtcmd + ';1' oscmd(mtcmd) if (COMPILER=="LINUX"): if (GetOrigExt(dll)==".exe"): cmd = 'g++ -o ' + dll + ' -Lbuilt/lib -L/usr/X11R6/lib' else: if (sys.platform == "darwin"): cmd = 'g++ -undefined dynamic_lookup -dynamic -dynamiclib -o ' + dll + ' -install_name built/lib/' + os.path.basename(dll) + ' -Lbuilt/lib -L/usr/X11R6/lib' else: cmd = 'g++ -shared -o ' + dll + ' -Lbuilt/lib -L/usr/X11R6/lib' for x in obj: if (GetOrigExt(x) != ".dat"): base = os.path.basename(x) if (base[-3:]==".so") and (base[:3]=="lib"): cmd = cmd + ' -l' + base[3:-3] else: cmd = cmd + ' ' + x for (opt, dir) in LIBDIRECTORIES: if (opt=="ALWAYS") or (opts.count(opt)): cmd = cmd + ' -L"' + dir + '"' for (opt, name) in LIBNAMES: if (opt=="ALWAYS") or (opts.count(opt)): cmd = cmd + ' ' + name cmd = cmd + " -lpthread -ldl" if (sys.platform == "darwin"): if (PkgSkip("PYTHON")==0): cmd = cmd + " -framework Python" cmd = cmd + " -isysroot " + SDK["MACOSX"] + " -Wl,-syslibroot," + SDK["MACOSX"] + " -arch ppc -arch i386" oscmd(cmd)
3d9c0e012fd5ecb5a8156a6ef677b6fbb4876afc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7242/3d9c0e012fd5ecb5a8156a6ef677b6fbb4876afc/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16143, 2098, 12, 27670, 16, 1081, 16, 1500, 4672, 309, 261, 31075, 14668, 31713, 3537, 13464, 6, 4672, 1797, 273, 296, 1232, 342, 82, 3966, 83, 342, 50, 1212, 30, 49, 4488, 3672, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16143, 2098, 12, 27670, 16, 1081, 16, 1500, 4672, 309, 261, 31075, 14668, 31713, 3537, 13464, 6, 4672, 1797, 273, 296, 1232, 342, 82, 3966, 83, 342, 50, 1212, 30, 49, 4488, 3672, 18, 1...
def processLayout(self, (staves, lyric, harmony), measures):
def processLayout(self, layout, measures):
def processLayout(self, (staves, lyric, harmony), measures): def groupBySystems(measures): system = [] for measure in measures: if measure.newSystem() and len(system): yield system system = [] system.append(measure) if len(system): yield system def groupByLyricLines(measure, width): system = [] for measure in measures: system.append(measure) if len(reduce(lambda x,y: x+y.lyrics(), system, "")) > width: if len(system) > 1: tmp = system.pop(-1) yield system system = [tmp] else: yield system system = [] if len(system): yield system # Process various layout types individually if staves == 1 and not lyric and not harmony: for system in groupBySystems(measures): self.newSystem(system) for measure in system: self.startOfMeasure(measure) self.printBrailleForStaff(measure.staff(0)) elif staves == 2 and not lyric and not harmony: for system in groupBySystems(measures): self.newSystem(system) for staff in range(2): self.startOfStaff(staff) for i, measure in enumerate(system): self.startOfMeasure(measure) if i == 0: self.addSymbol(hand_symbols[staff], None) self.printBrailleForStaff(measure.staff(staff)) elif staves == 1 and lyric and not harmony: for system in groupByLyricLines(measures, self.width): self.newLine() [self.addSymbol(unicode(note.lyric), note) for measure in system for note in measure.musicdata.justNotes() if note.lyric] self.newLine() self.whitespace() for measure in system: self.startOfMeasure(measure) self.printBrailleForStaff(measure.staff(0)) else: raise TypeError("Unsupported layout (%d, %r, %r)" % (staves, lyric, harmony))
33ef92586a1f46016e0adc007cb50c6fe70f43a0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8648/33ef92586a1f46016e0adc007cb50c6fe70f43a0/braillemusic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 3744, 12, 2890, 16, 3511, 16, 22692, 4672, 1652, 13197, 31072, 12, 21992, 1823, 4672, 2619, 273, 5378, 364, 6649, 316, 22692, 30, 309, 6649, 18, 2704, 3163, 1435, 471, 562, 12, 429...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3744, 12, 2890, 16, 3511, 16, 22692, 4672, 1652, 13197, 31072, 12, 21992, 1823, 4672, 2619, 273, 5378, 364, 6649, 316, 22692, 30, 309, 6649, 18, 2704, 3163, 1435, 471, 562, 12, 429...
raise TypeError("Function '" + self.__target_func.__name__ + "' called with incorrect arguments. " +
if type(self.__target_func) is str: name = self.__target_func else: name = self.__target_func.__name__ raise TypeError("Function '" + name + "' called with incorrect arguments. " +
def _check_arguments(self, *args, **kwargs): """ <Purpose> Check the arguments against the arg_checking_func provided to the constructor. <Arguments> self *args **kwargs The arguments that will ultimately be passed to the wrapped function. <Exceptions> TypeError If the arguments aren't valid. That is, if they fail the arg checking. <Side Effects> None <Returns> None """
e299317fe6ca36856f4bca6d67a5dd5543caf8c9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7272/e299317fe6ca36856f4bca6d67a5dd5543caf8c9/namespace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 7099, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 3536, 411, 10262, 4150, 34, 2073, 326, 1775, 5314, 326, 1501, 67, 24609, 67, 644, 2112, 358, 326, 3885, 18, 411, 462...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 7099, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 3536, 411, 10262, 4150, 34, 2073, 326, 1775, 5314, 326, 1501, 67, 24609, 67, 644, 2112, 358, 326, 3885, 18, 411, 462...
print name+" not found in "+str(format_elements)
def get_templates_that_use_element(name): """ Returns a list of format templates that call the given format element. The returned format templates also give their dependencies on tags. [ {'filename':"filename_1.bft" 'name': "a name" 'tags': ['710__a', '920__'] }, ... ] Returns templates sorted by name @param name a format element name """ format_templates = {} tags = [] files = os.listdir(CFG_BIBFORMAT_TEMPLATES_PATH) #Retrieve all templates for possible_template in files: if possible_template.endswith(CFG_BIBFORMAT_FORMAT_TEMPLATE_EXTENSION): format_elements = get_elements_used_by_template(possible_template) #Look for elements used in template format_elements = map(lambda x: x['name'].lower(), format_elements) try: #Look for element format_elements.index(name.lower()) #If not found, get out of "try" statement format_template = bibformat_engine.get_format_template(filename=possible_template, with_attributes=True) template_name = format_template['attrs']['name'] format_templates[template_name] = {'name':template_name, 'filename':possible_template} except: print name+" not found in "+str(format_elements) pass keys = format_templates.keys() keys.sort() return map(format_templates.get, keys)
18b5c65a88b4f5a6640b2c1bab76b0a39ca4a56f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2763/18b5c65a88b4f5a6640b2c1bab76b0a39ca4a56f/bibformatadminlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8502, 67, 19056, 67, 1202, 67, 2956, 12, 529, 4672, 3536, 2860, 279, 666, 434, 740, 5539, 716, 745, 326, 864, 740, 930, 18, 1021, 2106, 740, 5539, 2546, 8492, 3675, 5030, 603,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8502, 67, 19056, 67, 1202, 67, 2956, 12, 529, 4672, 3536, 2860, 279, 666, 434, 740, 5539, 716, 745, 326, 864, 740, 930, 18, 1021, 2106, 740, 5539, 2546, 8492, 3675, 5030, 603,...
return TLSGraphChainFastHybrid()
if USE_TLSMDMODULE==True: return TLSGraphChainFastHybrid() else: return TLSGraphChainHybrid()
def NewTLSGraphChain0(tls_model): """Generate and return the proper TLSGraphChain subclass for the requested TLS model. """ if tls_model=="HYBRID": return TLSGraphChainFastHybrid() if tls_model=="ANISO": return TLSGraphChainAnisotropic() if tls_model=="PLUGIN": return TLSGraphChainPlugin() raise Exception()
e84d51aa8f483309e902b29a0f740a21562abad5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/e84d51aa8f483309e902b29a0f740a21562abad5/tlsmd_analysis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1166, 9905, 4137, 3893, 20, 12, 17116, 67, 2284, 4672, 3536, 4625, 471, 327, 326, 5338, 8098, 4137, 3893, 10177, 364, 326, 3764, 8098, 938, 18, 3536, 309, 6871, 67, 2284, 31713, 44, 61, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1166, 9905, 4137, 3893, 20, 12, 17116, 67, 2284, 4672, 3536, 4625, 471, 327, 326, 5338, 8098, 4137, 3893, 10177, 364, 326, 3764, 8098, 938, 18, 3536, 309, 6871, 67, 2284, 31713, 44, 61, ...
debug("?",stream.tell(),offset)
def read(self,path,length,offset,fh=None): debug("read",path,length,offset) stream,rpath = self.files.get(path) stream.seek(offset) debug("?",stream.tell(),offset) return stream.read(length)
bf63f36d0f7fa2ecf2275b7b07126f2427e7669e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5937/bf63f36d0f7fa2ecf2275b7b07126f2427e7669e/archivefs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 803, 16, 2469, 16, 3348, 16, 19260, 33, 7036, 4672, 1198, 2932, 896, 3113, 803, 16, 2469, 16, 3348, 13, 1407, 16, 86, 803, 273, 365, 18, 2354, 18, 588, 12, 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, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 803, 16, 2469, 16, 3348, 16, 19260, 33, 7036, 4672, 1198, 2932, 896, 3113, 803, 16, 2469, 16, 3348, 13, 1407, 16, 86, 803, 273, 365, 18, 2354, 18, 588, 12, 803, ...
cvsdir = os.path.join(groupdir,projdir)
cvsdir = os.path.join(d,projdir)
def cvs_checkout(d): os.chdir(d) cvsdir = os.path.join(groupdir,projdir) recursive_rmdir(cvsdir) cvs = find_exe('cvs') if cvs is None: os.exit(1) os.environ['CVSROOT']=':pserver:%s@cvs.reportlab.sourceforge.net:/cvsroot/reportlab' % USER if release: do_exec(cvs+(' export -r %s %s' % (tagname,projdir)), 'the export phase') else: do_exec(cvs+' co %s' % projdir, 'the checkout phase') if py2pdf: # now we need to move the files & delete those we don't need dst = py2pdf_dir recursive_rmdir(dst) os.mkdir(dst) do_exec("mv reportlab/demos/py2pdf/py2pdf.py %s"%dst, "mv py2pdf.py") do_exec("mv reportlab/demos/py2pdf/PyFontify.py %s" % dst, "mv pyfontify.py") do_exec("mv reportlab/demos/py2pdf/idle_print.py %s" % dst, "mv idle_print.py") do_exec("rm -r reportlab/demos reportlab/platypus reportlab/lib/styles.py reportlab/README.pdfgen.txt reportlab/pdfgen/test", "rm") do_exec("mv %s %s" % (projdir,dst), "moving %s to %s" %(projdir,py2pdf_dir)) do_exec("chmod a+x %s/py2pdf.py %s/idle_print.py" % (dst, dst), "chmod") CVS_remove(dst)
06b31010b87a8019947bd5e16c3c4d4ed9be4bde /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/06b31010b87a8019947bd5e16c3c4d4ed9be4bde/daily.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 6904, 67, 17300, 12, 72, 4672, 1140, 18, 343, 1214, 12, 72, 13, 276, 6904, 1214, 273, 1140, 18, 803, 18, 5701, 12, 72, 16, 17995, 1214, 13, 5904, 67, 8864, 1214, 12, 71, 6904, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 6904, 67, 17300, 12, 72, 4672, 1140, 18, 343, 1214, 12, 72, 13, 276, 6904, 1214, 273, 1140, 18, 803, 18, 5701, 12, 72, 16, 17995, 1214, 13, 5904, 67, 8864, 1214, 12, 71, 6904, ...
timeout = 30
def testTimer(self): timeout = 30 l = [] t = internet.TimerService(1, l.append, "hello") t.startService() while not l: reactor.iterate(0.1) timeout -= 1 self.failIf(timeout == 0) t.stopService() self.failIf(t.running) self.assertEqual(l, ["hello"]) l.pop()
a79e9f9c61953c867382db060dfde03dbf771dc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a79e9f9c61953c867382db060dfde03dbf771dc3/test_application.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 6777, 12, 2890, 4672, 80, 273, 5378, 268, 273, 24264, 18, 6777, 1179, 12, 21, 16, 328, 18, 6923, 16, 315, 23711, 7923, 268, 18, 1937, 1179, 1435, 1323, 486, 328, 30, 19178, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 6777, 12, 2890, 4672, 80, 273, 5378, 268, 273, 24264, 18, 6777, 1179, 12, 21, 16, 328, 18, 6923, 16, 315, 23711, 7923, 268, 18, 1937, 1179, 1435, 1323, 486, 328, 30, 19178, 18, ...
EXAMPLE:
EXAMPLE::
def maximal_difference_probability(self): r""" Return the difference probability of the difference with the highest probability in the range between 0.0 and 1.0 indicating 0\% or 100\% respectively.
dd81b4a97db8b232434d8623d237dba45e418834 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/dd81b4a97db8b232434d8623d237dba45e418834/sbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 943, 2840, 67, 23444, 67, 22390, 12, 2890, 4672, 436, 8395, 2000, 326, 7114, 11331, 434, 326, 7114, 598, 326, 9742, 11331, 316, 326, 1048, 3086, 374, 18, 20, 471, 404, 18, 20, 11193, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 943, 2840, 67, 23444, 67, 22390, 12, 2890, 4672, 436, 8395, 2000, 326, 7114, 11331, 434, 326, 7114, 598, 326, 9742, 11331, 316, 326, 1048, 3086, 374, 18, 20, 471, 404, 18, 20, 11193, 3...
sage: T = Cylindrical('z', ['phi', 'rho']) sage: T.gen_transform(rho=var('rho'), phi=var('phi'), z=var('z')) (rho*cos(phi), rho*sin(phi), z) """ return (rho * cos(phi), rho * sin(phi), z)
sage: T = Cylindrical('height', ['azimuth', 'radius']) sage: T.transform(radius=var('r'), azimuth=var('theta'), height=var('z')) (r*cos(theta), r*sin(theta), z) """ return (radius * cos(azimuth), radius * sin(azimuth), height)
def gen_transform(self, rho=None, phi=None, z=None): """ EXAMPLE::
f1a033cac620bf133b1f996c6db511753cab6f3d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f1a033cac620bf133b1f996c6db511753cab6f3d/plot3d.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 67, 6547, 12, 2890, 16, 10360, 33, 7036, 16, 7706, 33, 7036, 16, 998, 33, 7036, 4672, 3536, 5675, 21373, 2866, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 67, 6547, 12, 2890, 16, 10360, 33, 7036, 16, 7706, 33, 7036, 16, 998, 33, 7036, 4672, 3536, 5675, 21373, 2866, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if level >= 3 or not ( filter( lambda x: unicode( msg ) in x[1], sharedData.scanoutput ) ) : sharedData.scanoutput.append( (level, unicode( newmsg ) + os.linesep) )
if level >= 3 or not ( filter( lambda x: unicodeC( msg ) in x[1], sharedData.scanoutput ) ) : sharedData.scanoutput.append( (level, unicodeC( newmsg ) + os.linesep) )
def logStatusMsg( msg, level, config=True ): u"""write a message to the log/stdout/stderr, depending on the level. if config=False, goes straight to stderr""" global _action TimeCode = u"[%4d%02d%02d.%02d:%02d.%02d]" % time.localtime()[:6] newmsg = TimeCode + ' ' + unicode( msg ) if not config and _action != "daemon": # daemon == no stdout/err! sys.stderrUTF.write( unicode(ReFormatString( inputstring=newmsg)) ) return None sharedData = getSharedData() # level >=3 is vebose. we don't want to repeatedly send the same error message (the second part), but if we want verbosity, the first part is enough to print the message if level >= 3 or not ( filter( lambda x: unicode( msg ) in x[1], sharedData.scanoutput ) ) : sharedData.scanoutput.append( (level, unicode( newmsg ) + os.linesep) ) logMsg( newmsg, level ) status( newmsg, level )
15efa811c3a3c7e375db44557ec2cc39fdd58d98 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1664/15efa811c3a3c7e375db44557ec2cc39fdd58d98/rssdler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 1482, 3332, 12, 1234, 16, 1801, 16, 642, 33, 5510, 262, 30, 582, 8395, 2626, 279, 883, 358, 326, 613, 19, 10283, 19, 11241, 16, 8353, 603, 326, 1801, 18, 309, 642, 33, 8381, 16,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 1482, 3332, 12, 1234, 16, 1801, 16, 642, 33, 5510, 262, 30, 582, 8395, 2626, 279, 883, 358, 326, 613, 19, 10283, 19, 11241, 16, 8353, 603, 326, 1801, 18, 309, 642, 33, 8381, 16,...
fileDestText.SetLabel(path)
self.fileDestText.SetLabel(path)
def newpath(self, path): fileDestText.SetLabel(path)
1837d5770325d3550eb3de5c39a6b107db1bd1ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4538/1837d5770325d3550eb3de5c39a6b107db1bd1ac/btdownloadgui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25094, 12, 2890, 16, 589, 4672, 585, 9378, 1528, 18, 694, 2224, 12, 803, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25094, 12, 2890, 16, 589, 4672, 585, 9378, 1528, 18, 694, 2224, 12, 803, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
[2, 3, 5]
[2, 3, 5, 23]
def bound_kato(self): r""" Returns a list `p` of primes such that the theorems of Kato's [Ka] and others (e.g., as explained in a paper/thesis of Grigor Grigorov [Gri]) imply that if `p` divides the order of Sha(E) then `p` is in the list.
bf83297096143ea5e25bcdcb414d7d4aa47651ca /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/bf83297096143ea5e25bcdcb414d7d4aa47651ca/sha_tate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2489, 67, 79, 31093, 12, 2890, 4672, 436, 8395, 2860, 279, 666, 1375, 84, 68, 434, 846, 4485, 4123, 716, 326, 326, 479, 959, 434, 1475, 31093, 1807, 306, 47, 69, 65, 471, 10654, 261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2489, 67, 79, 31093, 12, 2890, 4672, 436, 8395, 2860, 279, 666, 1375, 84, 68, 434, 846, 4485, 4123, 716, 326, 326, 479, 959, 434, 1475, 31093, 1807, 306, 47, 69, 65, 471, 10654, 261, ...
filt.append(bandpassZPHSH(tr.data,self.slideHigh.val,self.slideLow.val,df=tr.stats.sampling_rate)) print "Zero-Phase Bandpass: %.2f-%.2f Hz"%(self.slideHigh.val,self.slideLow.val)
filt.append(bandpassZPHSH(tr.data,self.spinbuttonHighpass.get_value(),self.spinbuttonLowpass.get_value(),df=tr.stats.sampling_rate)) msg = "Zero-Phase Bandpass: %.2f-%.2f Hz"%(self.spinbuttonHighpass.get_value(),self.spinbuttonLowpass.get_value()) appendTextview(self.textviewStdOut, msg)
def updatePlot(self): filt=[] #filter data if self.flagFilt==True: if self.flagFiltZPH: if self.flagFiltTyp==0: for tr in self.streams[self.stPt].traces: filt.append(bandpassZPHSH(tr.data,self.slideHigh.val,self.slideLow.val,df=tr.stats.sampling_rate)) print "Zero-Phase Bandpass: %.2f-%.2f Hz"%(self.slideHigh.val,self.slideLow.val) if self.flagFiltTyp==1: for tr in self.streams[self.stPt].traces: filt.append(bandstopZPHSH(tr.data,self.slideHigh.val,self.slideLow.val,df=tr.stats.sampling_rate)) print "Zero-Phase Bandstop: %.2f-%.2f Hz"%(self.slideHigh.val,self.slideLow.val) if self.flagFiltTyp==2: for tr in self.streams[self.stPt].traces: filt.append(lowpassZPHSH(tr.data,self.slideLow.val,df=tr.stats.sampling_rate)) print "Zero-Phase Lowpass: %.2f Hz"%(self.slideLow.val) if self.flagFiltTyp==3: for tr in self.streams[self.stPt].traces: filt.append(highpassZPHSH(tr.data,self.slideHigh.val,df=tr.stats.sampling_rate)) print "Zero-Phase Highpass: %.2f Hz"%(self.slideHigh.val) else: if self.flagFiltTyp==0: for tr in self.streams[self.stPt].traces: filt.append(bandpass(tr.data,self.slideHigh.val,self.slideLow.val,df=tr.stats.sampling_rate)) print "One-Pass Bandpass: %.2f-%.2f Hz"%(self.slideHigh.val,self.slideLow.val) if self.flagFiltTyp==1: for tr in self.streams[self.stPt].traces: filt.append(bandstop(tr.data,self.slideHigh.val,self.slideLow.val,df=tr.stats.sampling_rate)) print "One-Pass Bandstop: %.2f-%.2f Hz"%(self.slideHigh.val,self.slideLow.val) if self.flagFiltTyp==2: for tr in self.streams[self.stPt].traces: filt.append(lowpass(tr.data,self.slideLow.val,df=tr.stats.sampling_rate)) print "One-Pass Lowpass: %.2f Hz"%(self.slideLow.val) if self.flagFiltTyp==3: for tr in self.streams[self.stPt].traces: filt.append(highpass(tr.data,self.slideHigh.val,df=tr.stats.sampling_rate)) print "One-Pass Highpass: %.2f Hz"%(self.slideHigh.val) #make new plots for i in range(len(self.plts)): self.plts[i].set_ydata(filt[i]) else: #make new plots for i in range(len(self.plts)): self.plts[i].set_ydata(self.streams[self.stPt][i].data) print "Unfiltered Traces" # Update all subplots self.redraw()
b822b77814749ba0fa0b0a638d2c2e8ccf514f6c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10470/b822b77814749ba0fa0b0a638d2c2e8ccf514f6c/obspyck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 11532, 12, 2890, 4672, 18553, 33, 8526, 468, 2188, 501, 309, 365, 18, 6420, 42, 4526, 631, 5510, 30, 309, 365, 18, 6420, 42, 4526, 62, 8939, 30, 309, 365, 18, 6420, 42, 4526, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11532, 12, 2890, 4672, 18553, 33, 8526, 468, 2188, 501, 309, 365, 18, 6420, 42, 4526, 631, 5510, 30, 309, 365, 18, 6420, 42, 4526, 62, 8939, 30, 309, 365, 18, 6420, 42, 4526, 1...
parser = OptionParser(option_list=parser_opts + [DEBUG_OPT],
parser = OptionParser(option_list=parser_opts + COMMON_OPTS,
def _ParseArgs(argv, commands, aliases): """Parser for the command line arguments. This function parses the arguments and returns the function which must be executed together with its (modified) arguments. @param argv: the command line @param commands: dictionary with special contents, see the design doc for cmdline handling @param aliases: dictionary with command aliases {'alias': 'target, ...} """ if len(argv) == 0: binary = "<command>" else: binary = argv[0].split("/")[-1] if len(argv) > 1 and argv[1] == "--version": ToStdout("%s (ganeti %s) %s", binary, constants.VCS_VERSION, constants.RELEASE_VERSION) # Quit right away. That way we don't have to care about this special # argument. optparse.py does it the same. sys.exit(0) if len(argv) < 2 or not (argv[1] in commands or argv[1] in aliases): # let's do a nice thing sortedcmds = commands.keys() sortedcmds.sort() ToStdout("Usage: %s {command} [options...] [argument...]", binary) ToStdout("%s <command> --help to see details, or man %s", binary, binary) ToStdout("") # compute the max line length for cmd + usage mlen = max([len(" %s" % cmd) for cmd in commands]) mlen = min(60, mlen) # should not get here... # and format a nice command list ToStdout("Commands:") for cmd in sortedcmds: cmdstr = " %s" % (cmd,) help_text = commands[cmd][4] help_lines = textwrap.wrap(help_text, 79 - 3 - mlen) ToStdout("%-*s - %s", mlen, cmdstr, help_lines.pop(0)) for line in help_lines: ToStdout("%-*s %s", mlen, "", line) ToStdout("") return None, None, None # get command, unalias it, and look it up in commands cmd = argv.pop(1) if cmd in aliases: if cmd in commands: raise errors.ProgrammerError("Alias '%s' overrides an existing" " command" % cmd) if aliases[cmd] not in commands: raise errors.ProgrammerError("Alias '%s' maps to non-existing" " command '%s'" % (cmd, aliases[cmd])) cmd = aliases[cmd] func, args_def, parser_opts, usage, description = commands[cmd] parser = OptionParser(option_list=parser_opts + [DEBUG_OPT], description=description, formatter=TitledHelpFormatter(), usage="%%prog %s %s" % (cmd, usage)) parser.disable_interspersed_args() options, args = parser.parse_args() if not _CheckArguments(cmd, args_def, args): return None, None, None return func, options, args
5786c087558ab0aa68261057009a4716727b30bc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7542/5786c087558ab0aa68261057009a4716727b30bc/cli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3201, 2615, 12, 19485, 16, 4364, 16, 6900, 4672, 3536, 2678, 364, 326, 1296, 980, 1775, 18, 225, 1220, 445, 8940, 326, 1775, 471, 1135, 326, 445, 1492, 1297, 506, 7120, 9475, 598, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3201, 2615, 12, 19485, 16, 4364, 16, 6900, 4672, 3536, 2678, 364, 326, 1296, 980, 1775, 18, 225, 1220, 445, 8940, 326, 1775, 471, 1135, 326, 445, 1492, 1297, 506, 7120, 9475, 598, ...
print " " * idt + "parts[%d].iov_base = null;" % part_idx
print " " * idt + "parts[%d].iov_base = pad.ptr;" % part_idx
def nested_from_bytes(ctx_name, members, idt): var_fields = [i for i in members if type(i) is ListMember] print " " * idt + "auto %s_buf = cast(ubyte*)&%s;" % (ctx_name,ctx_name) if len(var_fields) == 0: print " " * idt + "%s_buf[0..%s.sizeof] = buf[offset_idx..offset_idx+%s.sizeof];" % (ctx_name,ctx_name,ctx_name) else: print " " * idt + "%s_buf[0..%s.%s.offsetof] =" % (ctx_name,ctx_name,var_fields[0].name) print " " * (idt+3) + "buf[offset_idx..offset_idx+%s.%s.offsetof];" % (ctx_name,var_fields[0].name) print " " * idt + "offset_idx += %s.%s.offsetof;" % (ctx_name,var_fields[0].name) for m in var_fields: print element_typeinfo = type_registry[m.element_type] if element_typeinfo.fixed(): # dupe slice of elements of fixed type print " " * idt + "%s.%s = (cast(%s*)&buf[offset_idx])[0..%s].dup;" % ( ctx_name,m.name, m.element_type, m.length_expr(ctx_name)) print " " * idt + "offset_idx += %s * %s.sizeof;" % (m.length_expr(ctx_name), m.element_type) #if m.type.size % 4 != 0: print " " * idt + "offset_idx += pad4(%s * %s.sizeof);" % (m.length_expr(ctx_name), m.element_type) else: # allocate array and set each element (vaiable-length) print " " * idt + "%s.%s.length = %s;" % (ctx_name,m.name, m.length_expr(ctx_name)) item = m.element_type.lower() # TODO: const ref? print " " * idt + "foreach (ref %s; %s.%s)" % (item, ctx_name,m.name) print " " * idt + "{" nested_from_bytes(item, element_typeinfo.members, idt + 1) # recursion! print " " * idt + "}"
f1040b873b6dd00166c326e4fab07762ef813c85 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3431/f1040b873b6dd00166c326e4fab07762ef813c85/codegen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4764, 67, 2080, 67, 3890, 12, 5900, 67, 529, 16, 4833, 16, 612, 88, 4672, 569, 67, 2821, 273, 306, 77, 364, 277, 316, 4833, 309, 618, 12, 77, 13, 353, 987, 4419, 65, 1172, 315, 565...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4764, 67, 2080, 67, 3890, 12, 5900, 67, 529, 16, 4833, 16, 612, 88, 4672, 569, 67, 2821, 273, 306, 77, 364, 277, 316, 4833, 309, 618, 12, 77, 13, 353, 987, 4419, 65, 1172, 315, 565...
cr.execute(""" SELECT move.id FROM stock_picking pick RIGHT JOIN stock_move move ON move.picking_id = pick.id AND move.state = %s WHERE pick.id = %s""", ('done', move.picking_id.id)) res = cr.fetchall() if len(res) == len(move.picking_id.move_lines): picking_obj.action_move(cr, uid, [move.picking_id.id]) wf_service.trg_validate(uid, 'stock.picking', move.picking_id.id, 'button_done', cr)
if move.picking_id.id : cr.execute(""" SELECT move.id FROM stock_picking pick RIGHT JOIN stock_move move ON move.picking_id = pick.id AND move.state = %s WHERE pick.id = %s""", ('done', move.picking_id.id)) res = cr.fetchall() if len(res) == len(move.picking_id.move_lines): picking_obj.action_move(cr, uid, [move.picking_id.id]) wf_service.trg_validate(uid, 'stock.picking', move.picking_id.id, 'button_done', cr)
def do_partial(self, cr, uid, ids, partial_datas, context={}): """ Makes partial pickings and moves done. @param partial_datas: Dictionary containing details of partial picking like partner_id, address_id, delivery_date, delivery moves with product_id, product_qty, uom """ res = {} picking_obj = self.pool.get('stock.picking') product_obj = self.pool.get('product.product') currency_obj = self.pool.get('res.currency') users_obj = self.pool.get('res.users') uom_obj = self.pool.get('product.uom') price_type_obj = self.pool.get('product.price.type') sequence_obj = self.pool.get('ir.sequence') wf_service = netsvc.LocalService("workflow") partner_id = partial_datas.get('partner_id', False) address_id = partial_datas.get('address_id', False) delivery_date = partial_datas.get('delivery_date', False) tracking_lot = context.get('tracking_lot', False)
77fc796e7f50b245eee03d59571118913429c80c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/77fc796e7f50b245eee03d59571118913429c80c/stock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 11601, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 4702, 67, 13178, 16, 819, 12938, 4672, 3536, 490, 3223, 4702, 6002, 899, 471, 13934, 2731, 18, 632, 891, 4702, 67, 13178, 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, 741, 67, 11601, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 4702, 67, 13178, 16, 819, 12938, 4672, 3536, 490, 3223, 4702, 6002, 899, 471, 13934, 2731, 18, 632, 891, 4702, 67, 13178, 30...
opt = {}
opt = []
def m2i(self, pkt, x): opt = {} while x: onum = ord(x[0]) if onum == 0: break if onum == 1: opt["NOP"] = () x=x[1:] continue olen = ord(x[1]) oval = x[2:olen] if TCPOptions[0].has_key(onum): oname, ofmt = TCPOptions[0][onum] if ofmt: oval = struct.unpack(ofmt, oval) if len(oval) == 1: oval = oval[0] opt[oname] = oval else: opt[onum] = oval x = x[olen:] return opt
72a6cb45046ec8460dd0e9285912420425eca706 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/72a6cb45046ec8460dd0e9285912420425eca706/scapy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 312, 22, 77, 12, 2890, 16, 11536, 16, 619, 4672, 2153, 273, 5378, 1323, 619, 30, 603, 379, 273, 4642, 12, 92, 63, 20, 5717, 309, 603, 379, 422, 374, 30, 898, 309, 603, 379, 422, 40...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 312, 22, 77, 12, 2890, 16, 11536, 16, 619, 4672, 2153, 273, 5378, 1323, 619, 30, 603, 379, 273, 4642, 12, 92, 63, 20, 5717, 309, 603, 379, 422, 374, 30, 898, 309, 603, 379, 422, 40...
self.assertAlmostEqual(np.prod(self.shape)*np.nbytes[np.float], \
self.assertAlmostEqual(np.prod(self.shape)*np.nbytes[self.dtype], \
def get_leaktest_scenario(self): self.assertAlmostEqual(np.prod(self.shape)*np.nbytes[np.float], \ self.footprint, -2) #100B
7b88fdcce5521d473c8d4302f68477e9e7b946f3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5735/7b88fdcce5521d473c8d4302f68477e9e7b946f3/vtk_data.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 298, 581, 3813, 67, 26405, 12, 2890, 4672, 365, 18, 11231, 1067, 10329, 5812, 12, 6782, 18, 17672, 12, 2890, 18, 4867, 17653, 6782, 18, 82, 3890, 63, 2890, 18, 8972, 6487, 521...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 298, 581, 3813, 67, 26405, 12, 2890, 4672, 365, 18, 11231, 1067, 10329, 5812, 12, 6782, 18, 17672, 12, 2890, 18, 4867, 17653, 6782, 18, 82, 3890, 63, 2890, 18, 8972, 6487, 521...
if (e.errno != ENOENT and e.errno != ENOTDIR
if (e.errno != errno.ENOENT and e.errno != errno.ENOTDIR
def _execvpe(file, args, env=None): from errno import ENOENT, ENOTDIR if env is not None: func = execve argrest = (args, env) else: func = execv argrest = (args,) env = environ head, tail = path.split(file) if head: func(file, *argrest) return if 'PATH' in env: envpath = env['PATH'] else: envpath = defpath PATH = envpath.split(pathsep) saved_exc = None saved_tb = None for dir in PATH: fullname = path.join(dir, file) try: func(fullname, *argrest) except error, e: tb = sys.exc_info()[2] if (e.errno != ENOENT and e.errno != ENOTDIR and saved_exc is None): saved_exc = e saved_tb = tb if saved_exc: raise error, saved_exc, saved_tb raise error, e, tb
b49efebb09f99387e06eee626ea679c43a9c22d1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/b49efebb09f99387e06eee626ea679c43a9c22d1/os.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4177, 90, 347, 12, 768, 16, 833, 16, 1550, 33, 7036, 4672, 628, 8402, 1930, 29018, 16, 512, 4400, 4537, 225, 309, 1550, 353, 486, 599, 30, 1326, 273, 1196, 537, 1501, 8792, 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, 389, 4177, 90, 347, 12, 768, 16, 833, 16, 1550, 33, 7036, 4672, 628, 8402, 1930, 29018, 16, 512, 4400, 4537, 225, 309, 1550, 353, 486, 599, 30, 1326, 273, 1196, 537, 1501, 8792, 273, ...
r""" The characteristic function of 0: $a(n) = 0^n$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000007;a The characteristic function of 0: a(n) = 0^n. sage: a(0) 1 sage: a(2) 0 sage: a(12) 0 sage: a.list(12) [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] AUTHOR: -- Jaap Spies (2007-01-12) """ def __init__(self):
def __init__(self): r""" The characteristic function of 0: $a(n) = 0^n$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000007;a The characteristic function of 0: a(n) = 0^n. sage: a(0) 1 sage: a(2) 0 sage: a(12) 0 sage: a.list(12) [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] AUTHOR: -- Jaap Spies (2007-01-12) """
def _eval(self, n): return arith.euler_phi(n)
69a199217d612e1c590af73e16003812c85b93ec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/69a199217d612e1c590af73e16003812c85b93ec/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 327, 419, 483, 18, 73, 17040, 67, 9973, 12, 82, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 327, 419, 483, 18, 73, 17040, 67, 9973, 12, 82, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.Append(LIBS=module)
self.Append(LINKFLAGS=['-framework', module])
def enable_modules(self, modules, debug=False, crosscompiling=False) : import sys validModules = [ 'QtCore', 'QtGui', 'QtOpenGL', 'Qt3Support', 'QtAssistant', 'QtScript', 'QtDBus', 'QtSql', # The next modules have not been tested yet so, please # maybe they require additional work on non Linux platforms 'QtNetwork', 'QtSvg', 'QtTest', 'QtXml', 'QtUiTools', 'QtDesigner', 'QtDesignerComponents', 'QtWebKit', ] pclessModules = [ 'QtDesigner', 'QtDesignerComponents', ] staticModules = [ 'QtUiTools', ] invalidModules=[] for module in modules: if module not in validModules : invalidModules.append(module) if invalidModules : raise "Modules %s are not Qt4 modules. Valid Qt4 modules are: %s"% \ (str(invalidModules),str(validModules)) moduleDefines = { 'QtScript' : ['QT_SCRIPT_LIB'], 'QtSvg' : ['QT_SVG_LIB'], 'Qt3Support' : ['QT_QT3SUPPORT_LIB','QT3_SUPPORT'], 'QtSql' : ['QT_SQL_LIB'], 'QtXml' : ['QT_XML_LIB'], 'QtOpenGL' : ['QT_OPENGL_LIB'], 'QtGui' : ['QT_GUI_LIB'], 'QtNetwork' : ['QT_NETWORK_LIB'], 'QtCore' : ['QT_CORE_LIB'], } for module in modules : try : self.AppendUnique(CPPDEFINES=moduleDefines[module]) except: pass debugSuffix = '' if sys.platform == "linux2" and not crosscompiling : if debug : debugSuffix = '_debug' for module in modules : if module not in pclessModules : continue self.AppendUnique(LIBS=[module+debugSuffix]) self.AppendUnique(LIBPATH=[os.path.join("$QTDIR","lib")]) self.AppendUnique(CPPPATH=[os.path.join("$QTDIR","include","qt4")]) self.AppendUnique(CPPPATH=[os.path.join("$QTDIR","include","qt4",module)]) pcmodules = [module+debugSuffix for module in modules if module not in pclessModules ] if 'QtDBus' in pcmodules: self.AppendUnique(CPPPATH=[os.path.join("$QTDIR","include","qt4","QtDBus")]) if "QtAssistant" in pcmodules: self.AppendUnique(CPPPATH=[os.path.join("$QTDIR","include","qt4","QtAssistant")]) pcmodules.remove("QtAssistant") pcmodules.append("QtAssistantClient") self.ParseConfig('pkg-config %s --libs --cflags'% ' '.join(pcmodules)) self["QT4_MOCCPPPATH"] = self["CPPPATH"] return if sys.platform == "win32" or crosscompiling : if crosscompiling: transformedQtdir = transformToWinePath(self['QTDIR']) self['QT4_MOC'] = "QTDIR=%s %s"%( transformedQtdir, self['QT4_MOC']) self.AppendUnique(CPPPATH=[os.path.join("$QTDIR","include")]) try: modules.remove("QtDBus") except: pass if debug : debugSuffix = 'd' if "QtAssistant" in modules: self.AppendUnique(CPPPATH=[os.path.join("$QTDIR","include","QtAssistant")]) modules.remove("QtAssistant") modules.append("QtAssistantClient") self.AppendUnique(LIBS=[lib+debugSuffix+'4' for lib in modules if lib not in staticModules]) self.PrependUnique(LIBS=[lib+debugSuffix for lib in modules if lib in staticModules]) if 'QtOpenGL' in modules: self.AppendUnique(LIBS=['opengl32']) self.AppendUnique(CPPPATH=[ '$QTDIR/include/']) self.AppendUnique(CPPPATH=[ '$QTDIR/include/'+module for module in modules]) if crosscompiling : self["QT4_MOCCPPPATH"] = [ path.replace('$QTDIR', transformedQtdir) for path in self['CPPPATH'] ] else : self["QT4_MOCCPPPATH"] = self["CPPPATH"] self.AppendUnique(LIBPATH=[os.path.join('$QTDIR','lib')]) return if sys.platform=="darwin" : # TODO: Test debug version on Mac self.AppendUnique(LIBPATH=[os.path.join('$QTDIR','lib')]) self.AppendUnique(LINKFLAGS="-F$QTDIR/lib") self.AppendUnique(LINKFLAGS="-L$QTDIR/lib") #TODO clean! if debug : debugSuffix = 'd' for module in modules :
fafa34655cb3a8031269e2f1320871076deb943f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11305/fafa34655cb3a8031269e2f1320871076deb943f/qt4.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4237, 67, 6400, 12, 2890, 16, 4381, 16, 1198, 33, 8381, 16, 6828, 2919, 4973, 33, 8381, 13, 294, 1930, 2589, 225, 923, 7782, 273, 306, 296, 23310, 4670, 2187, 296, 23310, 18070, 2187, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4237, 67, 6400, 12, 2890, 16, 4381, 16, 1198, 33, 8381, 16, 6828, 2919, 4973, 33, 8381, 13, 294, 1930, 2589, 225, 923, 7782, 273, 306, 296, 23310, 4670, 2187, 296, 23310, 18070, 2187, ...
return [ _("Policies regarding systematic processing of bounce messages," " to help automate recognition and handling of defunct" " addresses."), ('bounce_processing', mm_cfg.Toggle, (_('No'), _('Yes')), 0, _('Try to figure out error messages automatically? ')), ('minimum_removal_date', mm_cfg.Number, 3, 0, _('Minimum number of days an address has been non-fatally ' 'bad before we take action')), ('minimum_post_count_before_bounce_action', mm_cfg.Number, 3, 0, _('Minimum number of posts to the list since members first ' 'bounce before we consider removing them from the list')), ('max_posts_between_bounces', mm_cfg.Number, 3, 0, _("Maximum number of messages your list gets in an hour. " "(Yes, bounce detection finds this info useful)")), ('automatic_bounce_action', mm_cfg.Radio, (_("Do nothing"),
return [ _('''Policies regarding systematic processing of bounce messages, to help automate recognition and handling of defunct addresses.'''), ('bounce_processing', mm_cfg.Toggle, (_('No'), _('Yes')), 0, _('Try to figure out error messages automatically?')), ('minimum_removal_date', mm_cfg.Number, 3, 0, _('''Minimum number of days an address has been non-fatally bad before we take action''')), ('minimum_post_count_before_bounce_action', mm_cfg.Number, 3, 0, _('''Minimum number of posts to the list since members first bounce before we consider removing them from the list''')), ('max_posts_between_bounces', mm_cfg.Number, 3, 0, _('''Maximum number of messages your list gets in an hour. (Yes, bounce detection finds this info useful)''')), ('automatic_bounce_action', mm_cfg.Radio, (_("Do nothing"),
def GetConfigInfo(self):
7f16355cd6d7956dd6f7423c1138cae49b9e93d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/7f16355cd6d7956dd6f7423c1138cae49b9e93d5/Bouncer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26666, 966, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26666, 966, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
r""" Lucas numbers (beginning with 1): $L(n) = L(n-1) + L(n-2)$ with $L(1) = 1$, $L(2) = 3$. INPUT: n -- positive integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000204; a Lucas numbers (beginning at 1): L(n) = L(n-1) + L(n-2), L(2) = 3. sage: a(1) 1 sage: a(8) 47 sage: a(200) 627376215338105766356982006981782561278127 sage: a(-4) Traceback (most recent call last): ... ValueError: input n (=-4) must be a positive integer sage: a.list(12) [1, 3, 4, 7, 11, 18, 29, 47, 76, 123, 199, 322] sage: a(0) Traceback (most recent call last): ... ValueError: input n (=0) must be a positive integer AUTHOR: -- Jaap Spies (2007-01-18) """ def __init__(self):
def __init__(self): r""" Lucas numbers (beginning with 1): $L(n) = L(n-1) + L(n-2)$ with $L(1) = 1$, $L(2) = 3$. INPUT: n -- positive integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000204; a Lucas numbers (beginning at 1): L(n) = L(n-1) + L(n-2), L(2) = 3. sage: a(1) 1 sage: a(8) 47 sage: a(200) 627376215338105766356982006981782561278127 sage: a(-4) Traceback (most recent call last): ... ValueError: input n (=-4) must be a positive integer sage: a.list(12) [1, 3, 4, 7, 11, 18, 29, 47, 76, 123, 199, 322] sage: a(0) Traceback (most recent call last): ... ValueError: input n (=0) must be a positive integer AUTHOR: -- Jaap Spies (2007-01-18) """
def _eval(self, n): return arith.moebius(n)
8b300fed02e947af57b58146f62dccfc715cf0b9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/8b300fed02e947af57b58146f62dccfc715cf0b9/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 327, 225, 419, 483, 18, 8683, 24008, 8384, 12, 82, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 327, 225, 419, 483, 18, 8683, 24008, 8384, 12, 82, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
assert doId is None or doId == self.__preallocDoId doId=self.__preallocDoId
assert doId is None or doId == self.doId doId=self.doId
def generateOtpObject(self, parentId, zoneId, optionalFields=[], doId=None): assert self.notify.debugStateCall(self) # have we already allocated a doId? if self.__preallocDoId: assert doId is None or doId == self.__preallocDoId doId=self.__preallocDoId self.__preallocDoId = 0
3b3f694731d4273591114aa5979d2d77904b715b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7242/3b3f694731d4273591114aa5979d2d77904b715b/DistributedObjectAI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 51, 6834, 921, 12, 2890, 16, 11582, 16, 29939, 16, 3129, 2314, 22850, 6487, 741, 548, 33, 7036, 4672, 1815, 365, 18, 12336, 18, 4148, 1119, 1477, 12, 2890, 13, 468, 1240, 732, 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, 2103, 51, 6834, 921, 12, 2890, 16, 11582, 16, 29939, 16, 3129, 2314, 22850, 6487, 741, 548, 33, 7036, 4672, 1815, 365, 18, 12336, 18, 4148, 1119, 1477, 12, 2890, 13, 468, 1240, 732, 18...
call('cp %(infile)s %(outfile_prefix)s', cmd_dict, is_logged=False) pmsg('Compressing file', cmd_dict['outfile_prefix'], cmd_dict['outfile']) zip(cmd_dict['outfile_prefix'])
if isinstance(input_file_handle, gzip.GzipFile): call('cp %(infile)s %(outfile)s', {'infile': input_file, 'outfile': output_file}, is_logged=False) else: call('gzip -c %(infile)s > %(outfile)s', {'infile': input_file, 'outfile': output_file}, is_logged=False) finally: input_file_handle.close() output_file_handle.close()
def copy_sequence(input_file, output_file): '''Copy sequence files from staging area''' cmd_dict = CMD_DICT.copy() cmd_dict['infile'] = input_file cmd_dict['outfile'] = output_file cmd_dict['outfile_prefix'] = output_file.rstrip('.gz') pmsg('Copying sequence files', input_file, cmd_dict['outfile_prefix']) try: SeqIO.convert(cmd_dict['infile'], 'fastq-illumina', cmd_dict['outfile_prefix'], 'fastq-sanger') except ValueError: call('cp %(infile)s %(outfile_prefix)s', cmd_dict, is_logged=False) pmsg('Compressing file', cmd_dict['outfile_prefix'], cmd_dict['outfile']) zip(cmd_dict['outfile_prefix'])
c359c65b2a6820bd70042c17821d4f0279f2b172 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14572/c359c65b2a6820bd70042c17821d4f0279f2b172/align_reads.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 6178, 12, 2630, 67, 768, 16, 876, 67, 768, 4672, 9163, 2951, 3102, 1390, 628, 22207, 5091, 26418, 1797, 67, 1576, 273, 18052, 67, 31456, 18, 3530, 1435, 1797, 67, 1576, 3292, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 6178, 12, 2630, 67, 768, 16, 876, 67, 768, 4672, 9163, 2951, 3102, 1390, 628, 22207, 5091, 26418, 1797, 67, 1576, 273, 18052, 67, 31456, 18, 3530, 1435, 1797, 67, 1576, 3292, ...
def mouse_within_stickiness_limit(self, event): '''Returns True if the mouse hasn't exceeded the distance determined by the "stickiness limit". Returns False if the mouse has exceeded the limit.
def mouse_within_stickiness_limit(self, event, drag_stickiness_limit): '''Check if mouse has been dragged beyond <drag_stickiness_limit> while holding down the LMB. Returns True if the mouse has not exceeded <drag_stickiness_limit>. Returns False if the mouse has exceeded <drag_stickiness_limit>. <drag_stickiness_limit> is measured in Angstroms.
def mouse_within_stickiness_limit(self, event): '''Returns True if the mouse hasn't exceeded the distance determined by the "stickiness limit". Returns False if the mouse has exceeded the limit. ''' if self.drag_stickiness_limit_exceeded: return False LMB_drag_pt, junk = self.o.mousepoints(event, 0.01) self.drag_distance = vlen(LMB_drag_pt - self.LMB_press_pt) if self.drag_distance/self.o.scale < DRAG_STICKINESS_LIMIT: return True else: self.drag_stickiness_limit_exceeded = True return False
07fcee8afa6d8aa107e744aeb4ac2e422cc110df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/07fcee8afa6d8aa107e744aeb4ac2e422cc110df/depositMode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7644, 67, 25850, 67, 334, 1200, 6336, 67, 3595, 12, 2890, 16, 871, 16, 8823, 67, 334, 1200, 6336, 67, 3595, 4672, 9163, 1564, 309, 7644, 711, 2118, 8823, 2423, 17940, 411, 15997, 67, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7644, 67, 25850, 67, 334, 1200, 6336, 67, 3595, 12, 2890, 16, 871, 16, 8823, 67, 334, 1200, 6336, 67, 3595, 4672, 9163, 1564, 309, 7644, 711, 2118, 8823, 2423, 17940, 411, 15997, 67, 3...
def PrintResults(mlist, operation, doc, results):
def PrintResults(mlist, operation, doc, results, user=None): if user: url = '%s/%s' % (mlist.GetScriptURL('options'), Utils.ObscureEmail(user)) results = results + '<p>Continue to ' + \ Link(url, 'edit your personal options').Format() + \ '.'
def PrintResults(mlist, operation, doc, results): replacements = mlist.GetStandardReplacements() replacements['<mm-results>'] = results replacements['<mm-operation>'] = operation output = mlist.ParseTags('handle_opts.html', replacements) doc.AddItem(output) print doc.Format(bgcolor="#ffffff") # hrm... sys.exit(0)
7a8a0554b2a09886fbca63e3de1f1da8ae97ceea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/7a8a0554b2a09886fbca63e3de1f1da8ae97ceea/handle_opts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3038, 3447, 12, 781, 376, 16, 1674, 16, 997, 16, 1686, 16, 729, 33, 7036, 4672, 309, 729, 30, 880, 273, 1995, 87, 5258, 87, 11, 738, 261, 781, 376, 18, 967, 3651, 1785, 2668, 2116, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3038, 3447, 12, 781, 376, 16, 1674, 16, 997, 16, 1686, 16, 729, 33, 7036, 4672, 309, 729, 30, 880, 273, 1995, 87, 5258, 87, 11, 738, 261, 781, 376, 18, 967, 3651, 1785, 2668, 2116, ...
return [offsetvector for offsetvector in dbtables.table.get_table(dbtables.get_xml(connection), lsctables.TimeSlideTable.tableName).as_dict().values() if any(offsetvector.values())]
xmldoc = dbtables.get_xml(connection) offset_vectors = [offsetvector for offsetvector in dbtables.table.get_table(xmldoc, lsctables.TimeSlideTable.tableName).as_dict().values() if any(offsetvector.values())] xmldoc.unlink() return offset_vectors
def get_background_offset_vectors(connection): """ Return a list of the non-zero offset vectors extracted from the database at the given connection. Each offset vector is returned as a dictionary mapping instrument name to offset. """ return [offsetvector for offsetvector in dbtables.table.get_table(dbtables.get_xml(connection), lsctables.TimeSlideTable.tableName).as_dict().values() if any(offsetvector.values())]
e5ea340b13948c3fd0106220caa15d7241ecbbcc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/e5ea340b13948c3fd0106220caa15d7241ecbbcc/db_thinca_rings.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9342, 67, 3348, 67, 18535, 12, 4071, 4672, 3536, 2000, 279, 666, 434, 326, 1661, 17, 7124, 1384, 10046, 9438, 628, 326, 2063, 622, 326, 864, 1459, 18, 225, 8315, 1384, 3806, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9342, 67, 3348, 67, 18535, 12, 4071, 4672, 3536, 2000, 279, 666, 434, 326, 1661, 17, 7124, 1384, 10046, 9438, 628, 326, 2063, 622, 326, 864, 1459, 18, 225, 8315, 1384, 3806, 3...
return '0x%02x' % typ
return '0x%02x' % tag_type
def tag_type_name(self): """Tag data type name, if known, and formatted number otherwise.""" tag_type = type_of_tag(self._tag) if tag_type in _TYPE_TO_NAME_MAP: return _TYPE_TO_NAME_MAP[tag_type] return '0x%02x' % typ
4cc9f772087fac8a50e04abee68e2a07f6f29a80 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6985/4cc9f772087fac8a50e04abee68e2a07f6f29a80/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1047, 67, 723, 67, 529, 12, 2890, 4672, 3536, 1805, 501, 618, 508, 16, 309, 4846, 16, 471, 4955, 1300, 3541, 12123, 1047, 67, 723, 273, 618, 67, 792, 67, 2692, 12, 2890, 6315, 2692, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1047, 67, 723, 67, 529, 12, 2890, 4672, 3536, 1805, 501, 618, 508, 16, 309, 4846, 16, 471, 4955, 1300, 3541, 12123, 1047, 67, 723, 273, 618, 67, 792, 67, 2692, 12, 2890, 6315, 2692, ...
AbstractFunction.__init__(self,1)
AbstractFunction.__init__(self,find_parameter(func,'dimensions',1))
def __init__(self,func): AbstractFunction.__init__(self,1) transientFunctions[self]=func
efb839c5379e40113984c5668952a679b1239349 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/553/efb839c5379e40113984c5668952a679b1239349/nef.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 644, 4672, 4115, 2083, 16186, 2738, 972, 12, 2890, 16, 4720, 67, 6775, 12, 644, 11189, 14797, 2187, 21, 3719, 12315, 7503, 63, 2890, 65, 33, 644, 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, 1001, 2738, 972, 12, 2890, 16, 644, 4672, 4115, 2083, 16186, 2738, 972, 12, 2890, 16, 4720, 67, 6775, 12, 644, 11189, 14797, 2187, 21, 3719, 12315, 7503, 63, 2890, 65, 33, 644, 2, -100...
try: taskid = jobId[0].split('.')[0] chainid=jobId[0].split('.')[1] resub=jobId[0].split('.')[2] except: pass outfile=executeCommand("boss archive -taskid %s -jobid %s"%(taskid,chainid) + " -c " + bossCfgDir)
outfile=executeCommand("boss archive -taskid %s -jobid %s"%(jobId.split('.')[0],jobId.split('.')[1]) + " -c " + bossCfgDir)
def archive(jobId,bossCfgDir): """ BOSS4archive Boss 4 command to manually archive jobs in the BOSS db (i.e. move jobe entries to ENDED_ tables ) """ #logging.debug("Boss4 getoutput start %s "%jobId) #print "Boss4 getoutput start %s "%jobId try: taskid = jobId[0].split('.')[0] chainid=jobId[0].split('.')[1] resub=jobId[0].split('.')[2] except: pass outfile=executeCommand("boss archive -taskid %s -jobid %s"%(taskid,chainid) + " -c " + bossCfgDir) outp=outfile return outp
ef16c5674de64cd50350f3d7ac24e6741778ec12 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8887/ef16c5674de64cd50350f3d7ac24e6741778ec12/BOSSCommands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5052, 12, 4688, 548, 16, 70, 8464, 8198, 1621, 4672, 3536, 9784, 1260, 24, 10686, 225, 605, 8464, 1059, 1296, 358, 10036, 5052, 6550, 316, 326, 9784, 1260, 1319, 261, 77, 18, 73, 18, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5052, 12, 4688, 548, 16, 70, 8464, 8198, 1621, 4672, 3536, 9784, 1260, 24, 10686, 225, 605, 8464, 1059, 1296, 358, 10036, 5052, 6550, 316, 326, 9784, 1260, 1319, 261, 77, 18, 73, 18, 3...
However, if two points with the same x,y coordinates are given and different z coordinates an exception will be raised
However, if two points are given with the same x,y coordinates but different z coordinates, an exception will be raised:
def list_plot3d(v, interpolation_type='default', texture="automatic", point_list=None,**kwds): """ A 3-dimensional plot of a surface defined by the list $v$ of points in 3-dimensional space. INPUT: v -- something that defines a set of points in 3 space, for example: * a matrix * a list of 3-tuples * a list of lists (all of the same length) -- this is treated the same as a matrix. texture -- (default: "automatic"), solid light blue OPTIONAL KEYWORDS: interpolation_type - 'linear', 'nn' (nearest neighbor), 'spline' 'linear' will perform linear interpolation The option 'nn' will interpolate by averaging the value of the nearest neighbors, this produces an interpolating function that is smoother than a linear interpolation, it has one derivative everywhere except at the sample points. The option 'spline' interpolates using a bivariate B-spline. When v is a matrix the default is to use linear interpolation, when v is a list of points the default is nearest neighbor. degree - an integer between 1 and 5, controls the degree of spline used for spline interpolation. For data that is highly oscillatory use higher values point_list - If point_list=True is passed, then if the array is a list of lists of length three, it will be treated as an array of points rather than a 3xn array. num_points - Number of points to sample interpolating function in each direction. By default for an nxn array this is n. **kwds -- all other arguments are passed to the surface function OUTPUT: a 3d plot EXAMPLES: We plot a matrix that illustrates summation modulo $n$. sage: n = 5; list_plot3d(matrix(RDF,n,[(i+j)%n for i in [1..n] for j in [1..n]])) We plot a matrix of values of sin. sage: pi = float(pi) sage: m = matrix(RDF, 6, [sin(i^2 + j^2) for i in [0,pi/5,..,pi] for j in [0,pi/5,..,pi]]) sage: list_plot3d(m, texture='yellow', frame_aspect_ratio=[1,1,1/3]) Though it doesn't change the shap of the graph, increasing num_points can increase the clarity of the graph sage: list_plot3d(m, texture='yellow', frame_aspect_ratio=[1,1,1/3],num_points=40) We can change the interpolation type sage: list_plot3d(m, texture='yellow', interpolation_type='nn',frame_aspect_ratio=[1,1,1/3]) We can make this look better by increasing the number of samples sage: list_plot3d(m, texture='yellow', interpolation_type='nn',frame_aspect_ratio=[1,1,1/3],num_points=40) Lets try a spline sage: list_plot3d(m, texture='yellow', interpolation_type='spline',frame_aspect_ratio=[1,1,1/3]) That spline doesn't capture the oscillation very well, lets try a higher degree spline sage: list_plot3d(m, texture='yellow', interpolation_type='spline', degree=5, frame_aspect_ratio=[1,1,1/3]) We plot a list of lists: sage: show(list_plot3d([[1, 1, 1, 1], [1, 2, 1, 2], [1, 1, 3, 1], [1, 2, 1, 4]])) We plot a list of points: As a first example we can extract the (x,y,z) coordinates from the above example and make a list plot out of it. By default we do linear interpolation. sage: l=[] sage: for i in range(6): ... for j in range(6): ... l.append((float(i*pi/5),float(j*pi/5),m[i,j])) sage: list_plot3d(l,texture='yellow') Note that the points do not have to be regularly sampled. For example sage: l=[] sage: for i in range(-5,5): ... for j in range(-5,5): ... l.append((normalvariate(0,1),normalvariate(0,1),normalvariate(0,1))) sage: list_plot3d(l,interpolation_type='nn',texture='yellow',num_points=100) TESTS: We plot 0, 1, and 2 points: sage: list_plot3d([]) sage: list_plot3d([(2,3,4)]) sage: list_plot3d([(0,0,1), (2,3,4)]) However, if two points with the same x,y coordinates are given and different z coordinates an exception will be raised sage: pts =[(-4/5, -2/5, -2/5), (-4/5, -2/5, 2/5), (-4/5, 2/5, -2/5), (-4/5, 2/5, 2/5), (-2/5, -4/5, -2/5), (-2/5, -4/5, 2/5), (-2/5, -2/5, -4/5), (-2/5, -2/5, 4/5), (-2/5, 2/5, -4/5), (-2/5, 2/5, 4/5), (-2/5, 4/5, -2/5), (-2/5, 4/5, 2/5), (2/5, -4/5, -2/5), (2/5, -4/5, 2/5), (2/5, -2/5, -4/5), (2/5, -2/5, 4/5), (2/5, 2/5, -4/5), (2/5, 2/5, 4/5), (2/5, 4/5, -2/5), (2/5, 4/5, 2/5), (4/5, -2/5, -2/5), (4/5, -2/5, 2/5), (4/5, 2/5, -2/5), (4/5, 2/5, 2/5)] sage: show(list_plot3d(pts, interpolation_type='nn')) Traceback (most recent call last): ... ValueError: Two points with same x,y coordinates and different z coordinates were given. Interpolation cannot handle this. Additionally we need at least 3 points to do the interpolation sage: pts=[(0,0,0)] sage: show(list_plot3d(pts,interpolation_type='nn')) Traceback (most recent call last): ... ValueError: We need at least 3 points to perform the interpolation """ import numpy if texture == "automatic": texture = "lightblue" if is_Matrix(v): if interpolation_type=='default' or interpolation_type=='linear' and not kwds.has_key('num_points'): return list_plot3d_matrix(v, texture=texture, **kwds) else: l=[] for i in xrange(v.nrows()): for j in xrange(v.ncols()): l.append((i,j,v[i,j])) return list_plot3d_tuples(l,interpolation_type,texture,**kwds) if type(v)==numpy.ndarray: return list_plot3d(matrix(v),interpolation_type,texture,**kwds) if isinstance(v, list): if len(v) == 0: # return empty 3d graphic from base import Graphics3d return Graphics3d() elif len(v) == 1: # return a point from shapes2 import point3d return point3d(v[0], **kwds) elif len(v) == 2: # return a line from shapes2 import line3d return line3d(v, **kwds) elif isinstance(v[0],tuple) or point_list==True and len(v[0]) == 3: return list_plot3d_tuples(v,interpolation_type,texture=texture, **kwds) else: return list_plot3d_array_of_arrays(v, interpolation_type,texture, **kwds) raise TypeError, "v must be a matrix or list"
d0f0fc2115cde9e1670bebb42ac1add0bbca76c1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/d0f0fc2115cde9e1670bebb42ac1add0bbca76c1/list_plot3d.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 4032, 23, 72, 12, 90, 16, 12851, 67, 723, 2218, 1886, 2187, 11428, 1546, 5854, 4941, 3113, 1634, 67, 1098, 33, 7036, 16, 636, 25577, 4672, 3536, 432, 890, 17, 31236, 3207, 434...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 4032, 23, 72, 12, 90, 16, 12851, 67, 723, 2218, 1886, 2187, 11428, 1546, 5854, 4941, 3113, 1634, 67, 1098, 33, 7036, 16, 636, 25577, 4672, 3536, 432, 890, 17, 31236, 3207, 434...
if ce.find(ceb) > 0:
if ce.find(ceb) >= 0:
def lcgInfo(self, tags, seList=None, blacklist=None, whitelist=None, full=False): """ execute a resources discovery through bdii returns a list of resulting sites """
39a8bce7bded0962104656bf92390c6b74fdf5d0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8886/39a8bce7bded0962104656bf92390c6b74fdf5d0/SchedulerGLiteAPI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9109, 75, 966, 12, 2890, 16, 2342, 16, 695, 682, 33, 7036, 16, 11709, 33, 7036, 16, 10734, 33, 7036, 16, 1983, 33, 8381, 4672, 3536, 1836, 279, 2703, 11030, 3059, 13837, 2835, 1135, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9109, 75, 966, 12, 2890, 16, 2342, 16, 695, 682, 33, 7036, 16, 11709, 33, 7036, 16, 10734, 33, 7036, 16, 1983, 33, 8381, 4672, 3536, 1836, 279, 2703, 11030, 3059, 13837, 2835, 1135, 27...
item_id=self.read(cr,uid,ids)[0]['item_id']
item_id = self.read(cr,uid,ids)[0]['item_id']
def button_skip(self,cr,uid,ids,context=None): item_obj = self.pool.get('ir.actions.todo') item_id=self.read(cr,uid,ids)[0]['item_id'] if item_id: item = item_obj.browse(cr, uid, item_id, context=context) item_obj.write(cr, uid, item.id, { 'state': 'skip', }, context=context) return{ 'view_type': 'form', "view_mode": 'form', 'res_model': 'ir.actions.configuration.wizard', 'type': 'ir.actions.act_window', 'target':'new', } return self.button_next(cr, uid, ids, context)
5a75ea9c7c984bc42528ae56976c533a6d679191 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/5a75ea9c7c984bc42528ae56976c533a6d679191/ir_actions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3568, 67, 7457, 12, 2890, 16, 3353, 16, 1911, 16, 2232, 16, 2472, 33, 7036, 4672, 761, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 481, 18, 4905, 18, 9012, 6134, 761, 67, 350, 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, 3568, 67, 7457, 12, 2890, 16, 3353, 16, 1911, 16, 2232, 16, 2472, 33, 7036, 4672, 761, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 481, 18, 4905, 18, 9012, 6134, 761, 67, 350, 273, ...
if not xmin:
if xmin is None:
def __init__(self, v, xmin=None, xmax=None, ymin=None, ymax=None, **kwds): w = [] for x in v: if not isinstance(x, plot.Graphics): x = plot.plot(x, xmin=xmin, xmax=xmax) w.append(x) if len(w) == 0: w = [plot.Graphics()] self.__frames = w G = w[0] if not xmin: xmin = G.xmin() if not xmax: xmax = G.xmax() if not ymin: ymin = G.ymin() if not ymax: ymax = G.ymax() self.__xmin = xmin self.__xmax = xmax self.__ymin = ymin self.__ymax = ymax self.__kwds = kwds
9c81fcd897d50f9a2961371139896f44cf249289 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/9c81fcd897d50f9a2961371139896f44cf249289/animate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 331, 16, 13777, 33, 7036, 16, 14016, 33, 7036, 16, 15763, 33, 7036, 16, 15275, 33, 7036, 16, 2826, 25577, 4672, 341, 273, 5378, 364, 619, 316, 331, 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, 331, 16, 13777, 33, 7036, 16, 14016, 33, 7036, 16, 15763, 33, 7036, 16, 15275, 33, 7036, 16, 2826, 25577, 4672, 341, 273, 5378, 364, 619, 316, 331, 30, ...
print >>stream, warning.as_warning()
print >>stream, warning
def _print_errors(self, stream=None): """ Print any errors that were encountered while constructing this C{ObjDoc} to C{stream}. This method should be called at the end of the constructor of every class that is derived from C{ObjDoc} (I{after} the base C{ObjDoc} constructor has been called). @rtype: C{None} """ parse_warnings = self._parse_warnings parse_errors = self._parse_errors field_warnings = self._field_warnings misc_warnings = self._misc_warnings
7140f1248773f589eaa5826bd2b3d64a09ab01f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/7140f1248773f589eaa5826bd2b3d64a09ab01f2/objdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1188, 67, 4324, 12, 2890, 16, 1407, 33, 7036, 4672, 3536, 3038, 1281, 1334, 716, 4591, 9919, 1323, 27389, 333, 385, 95, 2675, 1759, 97, 358, 385, 95, 3256, 5496, 225, 1220, 707, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1188, 67, 4324, 12, 2890, 16, 1407, 33, 7036, 4672, 3536, 3038, 1281, 1334, 716, 4591, 9919, 1323, 27389, 333, 385, 95, 2675, 1759, 97, 358, 385, 95, 3256, 5496, 225, 1220, 707, 1...
def extract_tls_parameters(remark_3_records):
def extract_tls_parameters(remark_3_records, file_name = ""):
def extract_tls_parameters(remark_3_records):
c7414c7bd0f10baaa7d702b1454c3d4335e68afe /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/696/c7414c7bd0f10baaa7d702b1454c3d4335e68afe/remark_3_interpretation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 67, 17116, 67, 3977, 12, 2764, 1313, 67, 23, 67, 7094, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 67, 17116, 67, 3977, 12, 2764, 1313, 67, 23, 67, 7094, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if not self.reparse and delta > 0:
if not self.reparse:
def incrLoc(self, delta): if not self.memmap.isValid(self.loc + delta): self.error("trying to set loc to an invalid address (%06o)" % (self.loc + delta)) if not self.reparse and delta > 0: self.log(5, "incrementing loc from %06o to %06o (delta=%04o)" % (self.loc, self.loc + delta, delta)) self.loc += delta
e0a54c78f59317185fa7d620689dfe6fe83efd28 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8152/e0a54c78f59317185fa7d620689dfe6fe83efd28/context.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17633, 1333, 12, 2890, 16, 3622, 4672, 309, 486, 365, 18, 3917, 1458, 18, 26810, 12, 2890, 18, 1829, 397, 3622, 4672, 365, 18, 1636, 2932, 698, 310, 358, 444, 1515, 358, 392, 2057, 175...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17633, 1333, 12, 2890, 16, 3622, 4672, 309, 486, 365, 18, 3917, 1458, 18, 26810, 12, 2890, 18, 1829, 397, 3622, 4672, 365, 18, 1636, 2932, 698, 310, 358, 444, 1515, 358, 392, 2057, 175...
edition["toc"] = toc
edition['toc'] = toc
def find_toc(r, edition): # table of contents toc = [] for f in r.get_fields('505'): try: toc_line = [] for subfield, value in f.subfield_sequence: if subfield == 'a': toc.extend([x.strip() for x in value.split('--')]) continue if subfield == 't': if len(toc_line): toc.append(' -- '.join(toc_line)) toc_line = [value.strip(" /")] continue toc_line.append(value.strip(" -")) if toc: toc.append(' -- '.join(toc_line)) except AssertionError: print f.subfield_sequence raise if toc: edition["toc"] = toc
da804bedd5a86ca4953a76539728719f215e8cf0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3913/da804bedd5a86ca4953a76539728719f215e8cf0/parse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 1391, 12, 86, 16, 28432, 4672, 468, 1014, 434, 2939, 17919, 273, 5378, 364, 284, 316, 436, 18, 588, 67, 2821, 2668, 3361, 25, 11, 4672, 775, 30, 17919, 67, 1369, 273, 5378, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 1391, 12, 86, 16, 28432, 4672, 468, 1014, 434, 2939, 17919, 273, 5378, 364, 284, 316, 436, 18, 588, 67, 2821, 2668, 3361, 25, 11, 4672, 775, 30, 17919, 67, 1369, 273, 5378, ...
new_list_price = get_real_price(list_price, product.id, pricelist)
new_list_price = get_real_price(list_price, product.id, qty, uom, pricelist)
def get_real_price(res_dict, product_id, pricelist): item_obj = self.pool.get('product.pricelist.item') price_type_obj = self.pool.get('product.price.type') product_obj = self.pool.get('product.product') template_obj = self.pool.get('product.template') field_name = 'list_price'
95124a4a3f5b4124e6d6fd7b365643e639e0c5f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/95124a4a3f5b4124e6d6fd7b365643e639e0c5f7/product_visible_discount.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7688, 67, 8694, 12, 455, 67, 1576, 16, 3017, 67, 350, 16, 846, 335, 5449, 4672, 761, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 5896, 18, 683, 335, 5449, 18, 1726, 6134, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7688, 67, 8694, 12, 455, 67, 1576, 16, 3017, 67, 350, 16, 846, 335, 5449, 4672, 761, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 5896, 18, 683, 335, 5449, 18, 1726, 6134, ...
self.list_checkers_messages( checker)
for msgid in sort_msgs(msgs.keys()): print self.get_message_help(msgid, False)
def print_full_documentation(self): """output a full documentation in ReST format""" for checker in sort_checkers(self._checkers.values()): if checker.name == 'master': prefix = 'Main ' if checker.options: for section, options in checker.options_by_section(): if section is None: title = 'General options' else: title = '%s options' % section.capitalize() print title print '~' * len(title) rest_format_section(sys.stdout, None, options) print else: prefix = '' title = '%s checker' % checker.name.capitalize() print title print '-' * len(title) if checker.__doc__: # __doc__ is None with -OO print linesep.join([l.strip() for l in checker.__doc__.splitlines()]) if checker.options: title = 'Options' print title print '~' * len(title) for section, options in checker.options_by_section(): rest_format_section(sys.stdout, section, options) print if checker.msgs: title = ('%smessages' % prefix).capitalize() print title print '~' * len(title) self.list_checkers_messages( checker) print if getattr(checker, 'reports', None): title = ('%sreports' % prefix).capitalize() print title print '~' * len(title) for report in checker.reports: print ':%s: %s' % report[:2] print print
116d7011f303fd219acc40aabb14bbdc46eb52b6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/928/116d7011f303fd219acc40aabb14bbdc46eb52b6/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 2854, 67, 26941, 12, 2890, 4672, 3536, 2844, 279, 1983, 7323, 316, 868, 882, 740, 8395, 364, 12489, 316, 1524, 67, 1893, 414, 12, 2890, 6315, 1893, 414, 18, 2372, 1435, 4672, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 2854, 67, 26941, 12, 2890, 4672, 3536, 2844, 279, 1983, 7323, 316, 868, 882, 740, 8395, 364, 12489, 316, 1524, 67, 1893, 414, 12, 2890, 6315, 1893, 414, 18, 2372, 1435, 4672, ...
job -- a sage.dsage.database.Job object
jdict -- sage.dsage.database.Job.jdict
def store_job(self, jdict): """ Stores a job based on information from Job.jdict. The keys of the dictionary should correspond to the columns in the 'jobs' table. Parameters: job -- a sage.dsage.database.Job object """ job_id = jdict['job_id']
de28bc88eceaac20557bdfbfe7a974ed02d19768 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/de28bc88eceaac20557bdfbfe7a974ed02d19768/jobdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1707, 67, 4688, 12, 2890, 16, 525, 1576, 4672, 3536, 20296, 455, 279, 1719, 2511, 603, 1779, 628, 3956, 18, 78, 1576, 18, 1021, 1311, 434, 326, 3880, 1410, 4325, 358, 326, 2168, 316, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1707, 67, 4688, 12, 2890, 16, 525, 1576, 4672, 3536, 20296, 455, 279, 1719, 2511, 603, 1779, 628, 3956, 18, 78, 1576, 18, 1021, 1311, 434, 326, 3880, 1410, 4325, 358, 326, 2168, 316, 3...