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
'Finite subgroup with invariants [3, 3, 3, 3, 3, 3, 3, 3, 3, 3] over QQ of Jacobian of the modular curve associated to the congruence subgroup Gamma0(42)'
'Finite subgroup with invariants [3, 3, 3, 3, 3, 3, 3, 3, 3, 3] over QQ of Abelian variety J0 (42) of dimension 5'
def _repr_(self): """ Return string representation of this finite subgroup.
d54847b81567aa533334316a466ed6bddbc8638c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/d54847b81567aa533334316a466ed6bddbc8638c/finite_subgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12715, 67, 12, 2890, 4672, 3536, 2000, 533, 4335, 434, 333, 25922, 720, 1655, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12715, 67, 12, 2890, 4672, 3536, 2000, 533, 4335, 434, 333, 25922, 720, 1655, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
'addresses':relation(mapper(Address, addresses), lazy=False)
'addresses':relation(mapper(Address, addresses), lazy=False, order_by=Address.id)
def test_basic(self): mapper(User, users, properties={ 'addresses':relation(mapper(Address, addresses), lazy=False) }) sess = create_session() q = sess.query(User)
c6558eecb5a9b897174f5c3635c78c9442aab1d2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1074/c6558eecb5a9b897174f5c3635c78c9442aab1d2/eager_relations.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 13240, 12, 2890, 4672, 5815, 12, 1299, 16, 3677, 16, 1790, 5899, 296, 13277, 4278, 5488, 12, 13919, 12, 1887, 16, 6138, 3631, 7962, 33, 8381, 16, 1353, 67, 1637, 33, 1887, 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 13240, 12, 2890, 4672, 5815, 12, 1299, 16, 3677, 16, 1790, 5899, 296, 13277, 4278, 5488, 12, 13919, 12, 1887, 16, 6138, 3631, 7962, 33, 8381, 16, 1353, 67, 1637, 33, 1887, 18...
buf += struct.pack("%ds" % BLOCKSIZE, "".join(parts))
buf += "".join(parts).ljust(BLOCKSIZE, NUL)
def tobuf(self, posix=False): """Return a tar header as a string of 512 byte blocks. """ buf = "" type = self.type prefix = ""
4f3f7ddb6855989d087cf6a50dc026a5b4a137fc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/4f3f7ddb6855989d087cf6a50dc026a5b4a137fc/tarfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 4385, 12, 2890, 16, 16366, 33, 8381, 4672, 3536, 990, 279, 8232, 1446, 487, 279, 533, 434, 13908, 1160, 4398, 18, 3536, 1681, 273, 1408, 618, 273, 365, 18, 723, 1633, 273, 1408, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 4385, 12, 2890, 16, 16366, 33, 8381, 4672, 3536, 990, 279, 8232, 1446, 487, 279, 533, 434, 13908, 1160, 4398, 18, 3536, 1681, 273, 1408, 618, 273, 365, 18, 723, 1633, 273, 1408, 2...
body = textile.textile(parent.parent.cfg.useReplacements(message['body']))
body = textile.textile(message['body'])
def __init__(self, message, parent, name=None, modal=0, fl=0): MsgPreviewDialogImpl.__init__(self, parent, name, modal, fl) qApp.setOverrideCursor(QCursor(Qt.WaitCursor)) try: self.setCaption('%s - %s' % (self.__tr('Message preview'), unicode(message['title']))) if message['content-type'] == 'textile': body = textile.textile(parent.parent.cfg.useReplacements(message['body'])) else: body = parent.parent.cfg.useReplacements(message['body']) msgText = MSGTEMPLATE % (message['title'], body) self.tbPreview.setText(msgText) finally: qApp.restoreOverrideCursor()
2370b416925f8d57d8dd98b159413d56c614092e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2229/2370b416925f8d57d8dd98b159413d56c614092e/qjt_msgpreviewdialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 883, 16, 982, 16, 508, 33, 7036, 16, 13010, 33, 20, 16, 1183, 33, 20, 4672, 8671, 11124, 6353, 2828, 16186, 2738, 972, 12, 2890, 16, 982, 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, 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, 883, 16, 982, 16, 508, 33, 7036, 16, 13010, 33, 20, 16, 1183, 33, 20, 4672, 8671, 11124, 6353, 2828, 16186, 2738, 972, 12, 2890, 16, 982, 16, 508, 16, ...
file.Write(" EXPECT_EQ(%s::kCmdId, cmd.header.command);\n" % func.name)
file.Write(" EXPECT_EQ(%s::kCmdId ^ cmd.header.command);\n" % func.name)
def WriteImmediateFormatTest(self, func, file): """Overrriden from TypeHandler.""" file.Write("TEST(GLES2FormatTest, %s) {\n" % func.name) file.Write(" int8 buf[256] = { 0, };\n") file.Write(" %s& cmd = *static_cast<%s*>(static_cast<void*>(&buf));\n" % (func.name, func.name)) file.Write(" static const char* const test_str = \"test string\";\n") file.Write(" void* next_cmd = cmd.Set(\n") file.Write(" &cmd") all_but_last_arg = func.GetCmdArgs()[:-1] value = 11 for arg in all_but_last_arg: file.Write(",\n static_cast<%s>(%d)" % (arg.type, value)) value += 1 file.Write(",\n test_str);\n") value = 11 file.Write(" EXPECT_EQ(%s::kCmdId, cmd.header.command);\n" % func.name) file.Write(" EXPECT_EQ(sizeof(cmd) + // NOLINT\n") file.Write(" RoundSizeToMultipleOfEntries(strlen(test_str)),\n") file.Write(" cmd.header.size * 4);\n") for arg in all_but_last_arg: file.Write(" EXPECT_EQ(static_cast<%s>(%d), cmd.%s);\n" % (arg.type, value, arg.name)) value += 1 file.Write(" // TODO(gman): check that string got copied.\n") file.Write("}\n") file.Write("\n")
022e207e0d45ad5354bd7230d48c4691f72f7e10 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/022e207e0d45ad5354bd7230d48c4691f72f7e10/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 22651, 1630, 4709, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 585, 18, 3067, 2932, 16961, 12, 43, 11386, 22, 1630, 4709, 16, 738, 87, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 22651, 1630, 4709, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 585, 18, 3067, 2932, 16961, 12, 43, 11386, 22, 1630, 4709, 16, 738, 87, 13, ...
pending_deliveries = False if not order.order_line: return False for line in order.order_line: move_ids = stock_move_obj.search(cr, uid, [('sale_line_id','=', line.id)]) for move in stock_move_obj.browse( cr, uid, move_ids ): if move.state in ('draft', 'auto', 'confirmed'): pending_deliveries = True if move_ids and ((not line.procurement_id) or (line.procurement_id.state=='done')) and not pending_deliveries:
for line in order.order_line: if (not line.procurement_id) or (line.procurement_id.state=='done'): finished = True
def test_state(self, cr, uid, ids, mode, *args): assert mode in ('finished', 'canceled'), _("invalid mode for test_state") finished = True canceled = False notcanceled = False write_done_ids = [] write_cancel_ids = [] stock_move_obj = self.pool.get('stock.move') for order in self.browse(cr, uid, ids, context={}): #check for pending deliveries pending_deliveries = False # check => if order_lines do not exist,don't proceed for any mode. if not order.order_line: return False for line in order.order_line: move_ids = stock_move_obj.search(cr, uid, [('sale_line_id','=', line.id)]) for move in stock_move_obj.browse( cr, uid, move_ids ): #if one of the related order lines is in state draft, auto or confirmed #this order line is not yet delivered if move.state in ('draft', 'auto', 'confirmed'): pending_deliveries = True # Reason => if there are no move lines,the following condition will always set to be true,and will set SO to 'DONE'. # Added move_ids check to SOLVE. if move_ids and ((not line.procurement_id) or (line.procurement_id.state=='done')) and not pending_deliveries:
198bc602895b8e7c28c60a1d84a3ff6debbd6461 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/198bc602895b8e7c28c60a1d84a3ff6debbd6461/sale.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2019, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1965, 16, 380, 1968, 4672, 1815, 1965, 316, 7707, 13527, 2187, 296, 10996, 329, 19899, 389, 2932, 5387, 1965, 364, 1842, 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, 1842, 67, 2019, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1965, 16, 380, 1968, 4672, 1815, 1965, 316, 7707, 13527, 2187, 296, 10996, 329, 19899, 389, 2932, 5387, 1965, 364, 1842, 67, ...
self.useragent['User-agent'] = str(useragent)
self.useragent = str(useragent)
def setUserAgent(self, useragent): """Function to set a different user-agent""" self.useragent['User-agent'] = str(useragent) return self.useragent
0b71c04080350489f82f5395abb347baa8e3f131 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10544/0b71c04080350489f82f5395abb347baa8e3f131/wiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 12276, 12, 2890, 16, 22649, 4672, 3536, 2083, 358, 444, 279, 3775, 729, 17, 5629, 8395, 365, 18, 1355, 5629, 273, 609, 12, 1355, 5629, 13, 327, 365, 18, 1355, 5629, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 12276, 12, 2890, 16, 22649, 4672, 3536, 2083, 358, 444, 279, 3775, 729, 17, 5629, 8395, 365, 18, 1355, 5629, 273, 609, 12, 1355, 5629, 13, 327, 365, 18, 1355, 5629, 2, -100, -100,...
if not id and clean_filename == self.getId():
if not used_id:
def post_validate(self, REQUEST=None, errors=None): """Validates upload file and id """ id = REQUEST.form.get('id') parent = aq_parent(self) parent_ids = parent.objectIds() field = self.getPrimaryField() f_name = field.getName() upload = REQUEST.form.get('%s_file' % f_name, None) filename = getattr(upload, 'filename', None) clean_filename = cleanupFilename(filename, self.getCharset())
88b29ebbd07f317224b2627c3f4b833a15a13851 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11956/88b29ebbd07f317224b2627c3f4b833a15a13851/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 67, 5662, 12, 2890, 16, 12492, 33, 7036, 16, 1334, 33, 7036, 4672, 3536, 9594, 3617, 585, 471, 612, 3536, 612, 377, 273, 12492, 18, 687, 18, 588, 2668, 350, 6134, 982, 273, 279, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 67, 5662, 12, 2890, 16, 12492, 33, 7036, 16, 1334, 33, 7036, 4672, 3536, 9594, 3617, 585, 471, 612, 3536, 612, 377, 273, 12492, 18, 687, 18, 588, 2668, 350, 6134, 982, 273, 279, ...
if not c in string.whitespace and (c<' ' or ord(c) > 0177): break
if not c in string.whitespace and (c<' ' or ord(c) > 0177): break
def getfileinfo(name):
cada31e8208b1e7201f5afc9f9782089bec7ebe3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/cada31e8208b1e7201f5afc9f9782089bec7ebe3/binhex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 768, 1376, 12, 529, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 768, 1376, 12, 529, 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...
match = re.search(conf_pat, subject) if not match: match = re.search(conf_pat, mail.body) if match: lines = ["confirm %s" % (match.group(1))]
mo = re.search(conf_pat, subject) if not mo: mo = re.search(conf_pat, msg.body) if mo: lines = ["confirm %s" % (mo.group(1))]
def ParseMailCommands(self):
4b2df7e3d338f55697b3a243715d01d52d223317 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/4b2df7e3d338f55697b3a243715d01d52d223317/MailCommandHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 6759, 9127, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 6759, 9127, 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, -...
if not is_valid_email(email): errors['email'] = True if not organisation: errors['organisation'] = True
def subscribe(self, REQUEST, notif_type, lang=None): """ Add a new subscribtion. First to a temporary list, then after confirmation to the correct container """ email = REQUEST.get('email', '') organisation = REQUEST.get('organisation', '') sector = REQUEST.get('sector', '') country = REQUEST.get('country', '') errors = {} REQUEST.SESSION['errors'] = {} # Send errors back to form if not is_valid_email(email): errors['email'] = True if not organisation: errors['organisation'] = True if not lang: lang = self.get_implicit_lang() try: notificationTool = self.getSite().portal_anonymous_notification notificationTool.add_email_subscription( email, organisation, sector, country, notif_type, lang, str(self.absolute_url()) + '/confirm' ) except ValueError, e: if is_valid_email(email): errors['email_exists'] = True if not len(errors): return REQUEST.RESPONSE.redirect(self.absolute_url() + '/thank_you') else: REQUEST.SESSION['errors'] = errors return REQUEST.RESPONSE.redirect(self.absolute_url())
57c50f06b3ce82b87e00d5ba2cdf6cae4068c28e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/57c50f06b3ce82b87e00d5ba2cdf6cae4068c28e/AnonymousSubscriber.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9129, 12, 2890, 16, 12492, 16, 486, 430, 67, 723, 16, 3303, 33, 7036, 4672, 3536, 1436, 279, 394, 10189, 24252, 18, 5783, 358, 279, 6269, 666, 16, 1508, 1839, 14296, 358, 326, 3434, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9129, 12, 2890, 16, 12492, 16, 486, 430, 67, 723, 16, 3303, 33, 7036, 4672, 3536, 1436, 279, 394, 10189, 24252, 18, 5783, 358, 279, 6269, 666, 16, 1508, 1839, 14296, 358, 326, 3434, 14...
cert_reqs=ssl.CERT_NONE, ciphers="^$:,;?*'dorothyx")
cert_reqs=ssl.CERT_NONE, ciphers="xyzzy")
def test_ciphers(self): if not support.is_resource_enabled('network'): return remote = ("svn.python.org", 443) s = ssl.wrap_socket(socket.socket(socket.AF_INET), cert_reqs=ssl.CERT_NONE, ciphers="ALL") s.connect(remote) s = ssl.wrap_socket(socket.socket(socket.AF_INET), cert_reqs=ssl.CERT_NONE, ciphers="DEFAULT") s.connect(remote) # Error checking can happen at instantiation or when connecting with self.assertRaisesRegexp(ssl.SSLError, "No cipher can be selected"): s = ssl.wrap_socket(socket.socket(socket.AF_INET), cert_reqs=ssl.CERT_NONE, ciphers="^$:,;?*'dorothyx") s.connect(remote)
65ec8ae47fa4bb0a3c2ef815ca1b03f3519398bc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/65ec8ae47fa4bb0a3c2ef815ca1b03f3519398bc/test_ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3449, 76, 414, 12, 2890, 4672, 309, 486, 2865, 18, 291, 67, 3146, 67, 5745, 2668, 5185, 11, 4672, 327, 2632, 273, 7566, 31505, 18, 8103, 18, 3341, 3113, 23796, 13, 272, 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, 1842, 67, 3449, 76, 414, 12, 2890, 4672, 309, 486, 2865, 18, 291, 67, 3146, 67, 5745, 2668, 5185, 11, 4672, 327, 2632, 273, 7566, 31505, 18, 8103, 18, 3341, 3113, 23796, 13, 272, 273, ...
def unicode_safe(text): if isinstance(text, str): print text.decode('utf-8') else: print text
def unicode_safe(text): if isinstance(text, str): print text.decode('utf-8') else: print text
62ed3ed8e5155b0d475beb2478ccdd4a98c0b3ba /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6723/62ed3ed8e5155b0d475beb2478ccdd4a98c0b3ba/importer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5252, 67, 4626, 12, 955, 4672, 309, 1549, 12, 955, 16, 609, 4672, 1172, 977, 18, 3922, 2668, 3158, 17, 28, 6134, 469, 30, 1172, 977, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5252, 67, 4626, 12, 955, 4672, 309, 1549, 12, 955, 16, 609, 4672, 1172, 977, 18, 3922, 2668, 3158, 17, 28, 6134, 469, 30, 1172, 977, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
local = len(self._subs) + self.nos_subs
local = len(self._subs) + len(self.nos_subs)
def getTotalSubtitles(self): """return total number of subtitles, local and remote""" local = len(self._subs) + self.nos_subs try: return len(self._osdb_info) + local except: return local
5e17dd3e98013cc3cac8290d1f97e0e8523b15e4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1108/5e17dd3e98013cc3cac8290d1f97e0e8523b15e4/videofile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12831, 1676, 17643, 12, 2890, 4672, 3536, 2463, 2078, 1300, 434, 720, 17643, 16, 1191, 471, 2632, 8395, 1191, 273, 562, 12, 2890, 6315, 22284, 13, 397, 562, 12, 2890, 18, 18050, 67, 2228...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12831, 1676, 17643, 12, 2890, 4672, 3536, 2463, 2078, 1300, 434, 720, 17643, 16, 1191, 471, 2632, 8395, 1191, 273, 562, 12, 2890, 6315, 22284, 13, 397, 562, 12, 2890, 18, 18050, 67, 2228...
check(x, size(vh + '12P3i') +\ CO_MAXBLOCKS*struct.calcsize('3i') +\ self.P + extras*self.P)
check(x, size(vh + '12P3i' + CO_MAXBLOCKS*'3i' + 'P' + extras*'P'))
def method(): pass
6d08a0b563d4a5f82571f7fb0b8a13a918ebcf2b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/6d08a0b563d4a5f82571f7fb0b8a13a918ebcf2b/test_sys.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 707, 13332, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 707, 13332, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
4*5^3 + 3*5^4 + 3*5^5 + 4*5^6 + O(5^7)
4*5^3 + 3*5^4 + 3*5^5 + 4*5^6 + 4*5^7 + 5^8 + O(5^10)
def padic_height(self, p, prec=20, sigma=None, check_hypotheses=True): r""" Computes the cyclotomic p-adic height. The equation of the curve must be minimal at $p$.
dc02e67e52b9174198fb76d7b9504168026ea700 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/dc02e67e52b9174198fb76d7b9504168026ea700/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4627, 335, 67, 4210, 12, 2890, 16, 293, 16, 13382, 33, 3462, 16, 7299, 33, 7036, 16, 866, 67, 76, 879, 10370, 281, 281, 33, 5510, 4672, 436, 8395, 14169, 281, 326, 6143, 830, 352, 24...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4627, 335, 67, 4210, 12, 2890, 16, 293, 16, 13382, 33, 3462, 16, 7299, 33, 7036, 16, 866, 67, 76, 879, 10370, 281, 281, 33, 5510, 4672, 436, 8395, 14169, 281, 326, 6143, 830, 352, 24...
key = TextField('Access Key', validators=[Required()])
key = PasswordField('Access Key', validators=[Required()])
def validate_edition(self, field): if field.data == u'bangalore': raise ValidationError, "Registrations are closed for this city"
f7cc649d162305e0ce6ef8008f6f776172e0d077 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12083/f7cc649d162305e0ce6ef8008f6f776172e0d077/website.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 67, 329, 608, 12, 2890, 16, 652, 4672, 309, 652, 18, 892, 422, 582, 11, 70, 539, 287, 479, 4278, 1002, 13167, 16, 315, 20175, 1012, 854, 4375, 364, 333, 12797, 6, 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, 1954, 67, 329, 608, 12, 2890, 16, 652, 4672, 309, 652, 18, 892, 422, 582, 11, 70, 539, 287, 479, 4278, 1002, 13167, 16, 315, 20175, 1012, 854, 4375, 364, 333, 12797, 6, 2, -100, -100...
self.assertRaises(Exception, test_view('workflow'))
test_view('workflow')
def test0030workflow(self): ''' Test workflow. ''' self.assertRaises(Exception, test_view('workflow'))
21ee22919528f4bf15192e77602a6801360c41d2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9266/21ee22919528f4bf15192e77602a6801360c41d2/test_tryton.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 713, 5082, 13815, 12, 2890, 4672, 9163, 7766, 6095, 18, 9163, 365, 18, 11231, 12649, 6141, 12, 503, 16, 1842, 67, 1945, 2668, 13815, 26112, 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, 0, 0, 0, 0, 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, 713, 5082, 13815, 12, 2890, 4672, 9163, 7766, 6095, 18, 9163, 365, 18, 11231, 12649, 6141, 12, 503, 16, 1842, 67, 1945, 2668, 13815, 26112, 2, -100, -100, -100, -100, -100, -100, -...
if timer is None: if os.name == 'mac':
if not timer: if _has_res: self.timer = resgetrusage self.dispatcher = self.trace_dispatch self.get_time = _get_time_resource elif os.name == 'mac':
def __init__(self, timer=None, bias=None): self.timings = {} self.cur = None self.cmd = "" self.c_func_name = ""
7641bb94ef452b3a59d8c964e223b1d19ef95029 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/7641bb94ef452b3a59d8c964e223b1d19ef95029/profile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5441, 33, 7036, 16, 12005, 33, 7036, 4672, 365, 18, 8584, 899, 273, 2618, 365, 18, 1397, 273, 599, 365, 18, 4172, 273, 1408, 365, 18, 71, 67, 644, 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, 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, 5441, 33, 7036, 16, 12005, 33, 7036, 4672, 365, 18, 8584, 899, 273, 2618, 365, 18, 1397, 273, 599, 365, 18, 4172, 273, 1408, 365, 18, 71, 67, 644, 67, ...
inherit = (container != cls.uid() and container.value() is not types.ClassType)
inherit = (container != cls.uid())
def _func_details(self, functions, cls, heading='Function Details'): """ @return: The HTML code for a function details table. This is used by L{_module_to_html} to describe the functions in a module; and by L{_class_to_html} to describe member functions. @rtype: C{string} """ functions = self._filtersort_links(functions) if len(functions) == 0: return '' str = self._table_header(heading, 'details')+'</table>\n'
69540e8ca19e42b8260f259dcf6c8a5c04b5e851 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/69540e8ca19e42b8260f259dcf6c8a5c04b5e851/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 644, 67, 6395, 12, 2890, 16, 4186, 16, 2028, 16, 11053, 2218, 2083, 21897, 11, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 279, 445, 3189, 1014, 18, 225, 1220, 353, 1399, 635...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 644, 67, 6395, 12, 2890, 16, 4186, 16, 2028, 16, 11053, 2218, 2083, 21897, 11, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 279, 445, 3189, 1014, 18, 225, 1220, 353, 1399, 635...
paths = self.shaderpaths.getValue().split(";")
self.paths = self.shaderpaths.getValue().split(";")
def __init__(self): self.options = {"Renderer":["Renderer:", { "Aqsis":"aqsis", "BMRT":"bmrt", "Pixie":"Pixie", "3Delight":"renderdl", "RenderDotC":"wrendrdc" }], "UseSlParams":["Use CGKIT Slparams?", True], "RenderMatsStartup":["Render Mats on Startup?", True]} sdict = globals()
f44d204f6145db2c41cb10f37cdd1232f0fd8fc9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11560/f44d204f6145db2c41cb10f37cdd1232f0fd8fc9/BtoRMain.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 2116, 273, 12528, 6747, 6877, 9614, 6747, 2773, 16, 288, 315, 37, 12926, 291, 15563, 69, 12926, 291, 3113, 315, 38, 49, 12185, 15563, 25709, 379...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 2116, 273, 12528, 6747, 6877, 9614, 6747, 2773, 16, 288, 315, 37, 12926, 291, 15563, 69, 12926, 291, 3113, 315, 38, 49, 12185, 15563, 25709, 379...
Now we construct an SBox object for the 4-bit small scale AES S-Box. sage: sr = mq.SR(1,1,1,4, allow_zero_inversions=True) sage: S = mq.SBox([sr.sub_byte(e) for e in list(sr.k)]) sage: S (6, 5, 2, 9, 4, 7, 3, 12, 14, 15, 10, 0, 8, 1, 13, 11)
def __init__(self, *args, **kwargs): """ Construct a substitution box (S-box) for a given lookup table $S$.
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, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 225, 2826, 4333, 4672, 3536, 14291, 279, 12785, 3919, 261, 55, 17, 2147, 13, 364, 279, 864, 3689, 1014, 271, 55, 8, 18, 2, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 225, 2826, 4333, 4672, 3536, 14291, 279, 12785, 3919, 261, 55, 17, 2147, 13, 364, 279, 864, 3689, 1014, 271, 55, 8, 18, 2, -100, -100, -...
apply(self.loader.rectangle, t.coeff())
apply(self.loader.rectangle, (wx, wy, hx, hy, x, y, rx, ry))
def rect(self, attrs): #print 'rect', attrs.map if self.in_defs: id = attrs.get('id', '') if id: self.named_objects[id] = ('object', 'rect', attrs) return if attrs.has_key('x'): x = attrs['x'] else: x = '0' if attrs.has_key('y'): y = attrs['y'] else: y = '0' x, y = self.point(x, y) wx, wy = self.point(attrs['width'], "0", relative = 1) hx, hy = self.point("0", attrs['height'], relative = 1) t = Trafo(wx, wy, hx, hy, x, y) self._print('rect', t) style = attrs.get('style', '') if style: self.parse_style(style) self.set_loader_style() apply(self.loader.rectangle, t.coeff())
20f97a1a1862b824365b83f00419d19bd29be2c5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3123/20f97a1a1862b824365b83f00419d19bd29be2c5/svgloader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4917, 12, 2890, 16, 3422, 4672, 468, 1188, 296, 2607, 2187, 3422, 18, 1458, 309, 365, 18, 267, 67, 12537, 30, 612, 273, 3422, 18, 588, 2668, 350, 2187, 28707, 309, 612, 30, 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, 4917, 12, 2890, 16, 3422, 4672, 468, 1188, 296, 2607, 2187, 3422, 18, 1458, 309, 365, 18, 267, 67, 12537, 30, 612, 273, 3422, 18, 588, 2668, 350, 2187, 28707, 309, 612, 30, 365, 18, ...
def fl_set_form_minsize(form, w, h): """ fl_set_form_minsize(form, w, h) """ _fl_set_form_minsize(form, w, h)
def fl_set_form_minsize(pForm, w, h): """ fl_set_form_minsize(pForm, w, h) """ _fl_set_form_minsize(pForm, w, h)
def fl_set_form_minsize(form, w, h): """ fl_set_form_minsize(form, w, h) """ _fl_set_form_minsize(form, w, h)
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 687, 67, 1154, 1467, 12, 84, 1204, 16, 341, 16, 366, 4672, 3536, 1183, 67, 542, 67, 687, 67, 1154, 1467, 12, 84, 1204, 16, 341, 16, 366, 13, 3536, 225, 389, 2242...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 687, 67, 1154, 1467, 12, 84, 1204, 16, 341, 16, 366, 4672, 3536, 1183, 67, 542, 67, 687, 67, 1154, 1467, 12, 84, 1204, 16, 341, 16, 366, 13, 3536, 225, 389, 2242...
n = 500 while PORT is None and n > 0: time.sleep(0.01) n -= 1 time.sleep(0.5)
self.serv_evt.wait() self.serv_evt.clear()
def setUp(self): self.serv_evt = threading.Event() self.client_evt = threading.Event() serv_args = (SimSMTPServer, self.serv_evt, self.client_evt) threading.Thread(target=debugging_server, args=serv_args).start()
f3dbd94ca4cfb5b9221c4651ce7cd9a359514698 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/f3dbd94ca4cfb5b9221c4651ce7cd9a359514698/test_smtplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 365, 18, 23039, 67, 73, 11734, 273, 17254, 18, 1133, 1435, 365, 18, 2625, 67, 73, 11734, 273, 17254, 18, 1133, 1435, 13515, 67, 1968, 273, 261, 7993, 55, 14636, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 365, 18, 23039, 67, 73, 11734, 273, 17254, 18, 1133, 1435, 365, 18, 2625, 67, 73, 11734, 273, 17254, 18, 1133, 1435, 13515, 67, 1968, 273, 261, 7993, 55, 14636, ...
offsets.append(first)
offsets.add(first)
def parse_slidespec(slidespec): """ Accepts a string in the format instrument=first:last:step[,first:last:step]... and returns the tuple (instrument, [offset1, offset2, ....]) where the offsets are the sorted list of numbers described by the ranges. Example: >>> parse_slidespec("H1=-5:+5:0.5") ('H1', [-5.0, -4.5, -4.0, -3.5, -3.0, -2.5, -2.0, -1.5, -1.0, -0.5, 0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0]) """ try: instrument, rangespec = slidespec.split("=") except ValueError: raise ValueError, "cannot parse time slide \"%s\"" % slidespec offsets = [] for range in rangespec.strip().split(","): try: first, last, step = map(float, range.strip().split(":")) except ValueError: raise ValueError, "malformed range \"%s\" in \"%s\"" % (range, rangespec) if step == 0: if first != last: raise ValueError, "divide by zero in range \"%s\"" % range offsets.append(first) continue if (last - first) / step < 0.0: raise ValueError, "step has wrong sign in range \"%s\"" % range i = 0 while True: offsets.append(first + i * step) if offsets[-1] >= last: if offsets[-1] > last: del offsets[-1] break i += 1 offsets.sort() return instrument.strip(), offsets
912bb392494721e2367fb5969ec1883dce5d8e59 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/912bb392494721e2367fb5969ec1883dce5d8e59/ligolw_tisi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 2069, 4369, 705, 12, 2069, 4369, 705, 4672, 3536, 27158, 279, 533, 316, 326, 740, 10353, 33, 3645, 30, 2722, 30, 4119, 63, 16, 3645, 30, 2722, 30, 4119, 65, 2777, 225, 471, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 2069, 4369, 705, 12, 2069, 4369, 705, 4672, 3536, 27158, 279, 533, 316, 326, 740, 10353, 33, 3645, 30, 2722, 30, 4119, 63, 16, 3645, 30, 2722, 30, 4119, 65, 2777, 225, 471, ...
self.create_static_lib(object_list,library_name,temp_dir)
self.create_static_lib(object_list,library_name,build_dir)
def build_library(self,library_name,source_list,module_dirs=None, temp_dir = ''): #make sure the temp directory exists before trying to build files import distutils.dir_util distutils.dir_util.mkpath(temp_dir)
339894e598e70c7736640659fb1e677b88866a72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/339894e598e70c7736640659fb1e677b88866a72/build_flib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 12083, 12, 2890, 16, 12083, 67, 529, 16, 3168, 67, 1098, 16, 2978, 67, 8291, 33, 7036, 16, 1906, 67, 1214, 273, 875, 4672, 468, 6540, 3071, 326, 1906, 1867, 1704, 1865, 8374,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 12083, 12, 2890, 16, 12083, 67, 529, 16, 3168, 67, 1098, 16, 2978, 67, 8291, 33, 7036, 16, 1906, 67, 1214, 273, 875, 4672, 468, 6540, 3071, 326, 1906, 1867, 1704, 1865, 8374,...
raise HTTPError((statuscode,statusline[2])) self.__proxysockname = ("0.0.0.0",0) self.__proxypeername = (addr,destport) def connect(self,destpair):
raise HTTPError((statuscode, statusline[2])) self.__proxysockname = ("0.0.0.0", 0) self.__proxypeername = (addr, destport) def connect(self, destpair):
def __negotiatehttp(self,destaddr,destport): """__negotiatehttp(self,destaddr,destport) Negotiates a connection through an HTTP server. """ # If we need to resolve locally, we do this now if self.__proxy[3] == False: addr = socket.gethostbyname(destaddr) else: addr = destaddr self.sendall("CONNECT " + addr + ":" + str(destport) + " HTTP/1.1\r\n" + "Host: " + destaddr + "\r\n\r\n") # We read the response until we get the string "\r\n\r\n" resp = self.recv(1) while resp.find("\r\n\r\n")==-1: resp = resp + self.recv(1) # We just need the first line to check if the connection # was successful statusline = resp.splitlines()[0].split(" ",2) if statusline[0] not in ("HTTP/1.0","HTTP/1.1"): self.close() raise GeneralProxyError((1,_generalerrors[1])) try: statuscode = int(statusline[1]) except ValueError: self.close() raise GeneralProxyError((1,_generalerrors[1])) if statuscode != 200: self.close() raise HTTPError((statuscode,statusline[2])) self.__proxysockname = ("0.0.0.0",0) self.__proxypeername = (addr,destport)
6a596ed40071091ac51048087179560e15823043 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12748/6a596ed40071091ac51048087179560e15823043/socks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 14518, 352, 3840, 2505, 12, 2890, 16, 10488, 4793, 16, 10488, 655, 4672, 3536, 972, 14518, 352, 3840, 2505, 12, 2890, 16, 10488, 4793, 16, 10488, 655, 13, 423, 27445, 16020, 279, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 14518, 352, 3840, 2505, 12, 2890, 16, 10488, 4793, 16, 10488, 655, 4672, 3536, 972, 14518, 352, 3840, 2505, 12, 2890, 16, 10488, 4793, 16, 10488, 655, 13, 423, 27445, 16020, 279, 1...
funcpat=re.compile(r"^(\w+_\w+)\s*\(\s*\w+\s*\*\s*self") name=None
funcpat1=re.compile(r"^(\w+_\w+)\s*\(\s*\w+\s*\*\s*self") funcpat2=re.compile(r"^(\w+)\s*\(") name1=None name2=None
def testSourceChecks(self): "Check various source code issues" # We expect a coding style where the functions are named # Object_method, are at the start of the line and have a first # parameter named self. if not os.path.exists("src/apsw.c"): return
f0f139ca1c73176ffc374f8eb6f63ed6e2cd34b3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/993/f0f139ca1c73176ffc374f8eb6f63ed6e2cd34b3/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1830, 4081, 12, 2890, 4672, 315, 1564, 11191, 1084, 981, 8296, 6, 468, 1660, 4489, 279, 14848, 2154, 1625, 326, 4186, 854, 4141, 468, 1033, 67, 2039, 16, 854, 622, 326, 787, 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, 1842, 1830, 4081, 12, 2890, 4672, 315, 1564, 11191, 1084, 981, 8296, 6, 468, 1660, 4489, 279, 14848, 2154, 1625, 326, 4186, 854, 4141, 468, 1033, 67, 2039, 16, 854, 622, 326, 787, 434, ...
self.builder.get_object('results_progressbar'), self.builder.get_object('popular_progressbar'), self.builder.get_object('latest_progressbar'),
builder.get_object('results_progressbar'), builder.get_object('popular_progressbar'), builder.get_object('latest_progressbar'),
def do_activate(self, totem_object): """ Plugin activation. """ # Initialise the interface self.builder = Totem.plugin_load_interface ("jamendo", "jamendo.ui", True, totem_object.get_main_window (), self) self.config_dialog = self.builder.get_object('config_dialog') self.popup = self.builder.get_object('popup_menu') container = self.builder.get_object('container') self.notebook = self.builder.get_object('notebook') self.search_entry = self.builder.get_object('search_entry') self.search_combo = self.builder.get_object('search_combo') self.search_combo.set_active(0) self.album_button = self.builder.get_object('album_button') self.previous_button = self.builder.get_object('previous_button') self.next_button = self.builder.get_object('next_button') self.progressbars = [ self.builder.get_object('results_progressbar'), self.builder.get_object('popular_progressbar'), self.builder.get_object('latest_progressbar'), ] self.treeviews = [ self.builder.get_object('results_treeview'), self.builder.get_object('popular_treeview'), self.builder.get_object('latest_treeview'), ] self.setup_treeviews()
da410ba883ec34ae6b559c7250fb68517c75617f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11070/da410ba883ec34ae6b559c7250fb68517c75617f/jamendo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 10014, 12, 2890, 16, 9997, 351, 67, 1612, 4672, 3536, 6258, 10027, 18, 3536, 468, 31739, 326, 1560, 365, 18, 9574, 273, 399, 352, 351, 18, 4094, 67, 945, 67, 5831, 7566, 78, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10014, 12, 2890, 16, 9997, 351, 67, 1612, 4672, 3536, 6258, 10027, 18, 3536, 468, 31739, 326, 1560, 365, 18, 9574, 273, 399, 352, 351, 18, 4094, 67, 945, 67, 5831, 7566, 78, ...
0: 'Formatted details of methods, functions, or code.'
0: %r
def test_disassemble_str(self): self.do_disassembly_test(expr_str, dis_expr_str) self.do_disassembly_test(simple_stmt_str, dis_simple_stmt_str) self.do_disassembly_test(compound_stmt_str, dis_compound_stmt_str)
2dbbe1eb97ec7c2d74e297704e83146fc0990845 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/2dbbe1eb97ec7c2d74e297704e83146fc0990845/test_dis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2251, 29676, 67, 701, 12, 2890, 4672, 365, 18, 2896, 67, 2251, 28050, 67, 3813, 12, 8638, 67, 701, 16, 1015, 67, 8638, 67, 701, 13, 365, 18, 2896, 67, 2251, 28050, 67, 3813...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2251, 29676, 67, 701, 12, 2890, 4672, 365, 18, 2896, 67, 2251, 28050, 67, 3813, 12, 8638, 67, 701, 16, 1015, 67, 8638, 67, 701, 13, 365, 18, 2896, 67, 2251, 28050, 67, 3813...
verbose = 1
if "-q" not in sys.argv: verbose = 1
def NullThreadFunc(): pass
5af16383253cf687ba26415b93fe945b32ae49ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/5af16383253cf687ba26415b93fe945b32ae49ae/testPyComTest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4112, 3830, 2622, 13332, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 4112, 3830, 2622, 13332, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return string.join(chartData, '')
self.assertFalse(chart_encoding.is_number("")) self.assertFalse(chart_encoding.is_number("a")) self.assertFalse(chart_encoding.is_number("4a"))
def simpleEncode(valueArray,maxValue): chartData = ['s:'] for currentValue in valueArray: if is_number(currentValue) and currentValue >= 0: chartData.append(simpleEncoding[int(round((simpleEncodingLength - 1) * currentValue / maxValue))]) else: chartData.append('_') return string.join(chartData, '')
e3dc1d60d1e1ea5af82cb695a3f2dcd6b78767ac /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2031/e3dc1d60d1e1ea5af82cb695a3f2dcd6b78767ac/chart_encoding_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4143, 5509, 12, 1132, 1076, 16, 1896, 620, 4672, 4980, 751, 273, 10228, 87, 2497, 65, 364, 14794, 316, 460, 1076, 30, 309, 353, 67, 2696, 12, 2972, 620, 13, 471, 14794, 1545, 374, 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, 4143, 5509, 12, 1132, 1076, 16, 1896, 620, 4672, 4980, 751, 273, 10228, 87, 2497, 65, 364, 14794, 316, 460, 1076, 30, 309, 353, 67, 2696, 12, 2972, 620, 13, 471, 14794, 1545, 374, 30, ...
if logging_file: _logger.addHandler( logging.FileHandler(logging_file) )
if logging_file and len(_logger.handlers) < 2: _logger.addHandler(logging.FileHandler(logging_file))
def get_logger(): debug_on = getattr(settings, "SOUTH_LOGGING_ON", False) logging_file = getattr(settings, "SOUTH_LOGGING_FILE", False) if debug_on: if logging_file: _logger.addHandler( logging.FileHandler(logging_file) ) _logger.setLevel(logging.DEBUG) else: raise IOError, "SOUTH_LOGGING_ON is True. You also need a SOUTH_LOGGING_FILE setting." return _logger
4544a664afb8d5ff38c431c2a732452d83d0eb80 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13142/4544a664afb8d5ff38c431c2a732452d83d0eb80/logger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4901, 13332, 1198, 67, 265, 273, 3869, 12, 4272, 16, 315, 3584, 5844, 67, 28162, 67, 673, 3113, 1083, 13, 2907, 67, 768, 273, 3869, 12, 4272, 16, 315, 3584, 5844, 67, 28162, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4901, 13332, 1198, 67, 265, 273, 3869, 12, 4272, 16, 315, 3584, 5844, 67, 28162, 67, 673, 3113, 1083, 13, 2907, 67, 768, 273, 3869, 12, 4272, 16, 315, 3584, 5844, 67, 28162, ...
r"<CENTER>[\s\S]*?</CENTER>", '', response_content["main_content"]) self.response.out.write(response_content["main_content"])'''
r"<CENTER>[\s\S]*?</CENTER>", '', response_content["main_content"])''' self.response.out.write(response_content["main_content"])
def content_response(self, response_content, if_content): self.response.set_status(response_content["code"], None) #Set-Cookie. Refer to Solrex.cn in solving the muti-cookie problem in GAppProxy for name, address in response_content.items(): if name.lower() == "set-cookie": scs = re.sub(r',([^,;]+=)', r'\n\1', address).split('\n') for sc in scs: if self.request.host == APP_ID_HOST: self.response.headers.add_header("Set-Cookie", re.sub(PROXY_SER_URL, \ APP_ID_HOST, \ sc.strip())) else: self.response.headers.add_header("Set-Cookie", sc.strip()) #Modify and add HEADERS for name, address in response_content.items(): if name.lower()!="main_content" and name.lower()!="code": if self.request.host == APP_ID_HOST: if self.request.environ["SERVER_PORT"] == "443": address = re.sub("http://" + PROXY_SER_URL, \ "https://" + APP_ID_HOST, \ address) address = re.sub(PROXY_SER_URL, \ APP_ID_HOST, \ address) else: address = address if name.lower() not in IGNORE_RESPONSE_HEADERS: self.response.headers.add_header(name, address) elif name.lower() != 'set-cookie': self.response.headers[name] = address #Main content is here if if_content: if self.request.host == APP_ID_HOST: if self.request.environ["SERVER_PORT"] == "443": response_content["main_content"] = re.sub("http://" + PROXY_SER_URL, \ "https://" + APP_ID_HOST, \ response_content["main_content"]) response_content["main_content"] = re.sub(PROXY_SER_URL, \ APP_ID_HOST, \ response_content["main_content"]) #Strip DRIP Host ADs '''response_content["main_content"]=re.sub( \ r"<CENTER>[\s\S]*?</CENTER>", '', response_content["main_content"]) response_content["main_content"]=re.sub( \ r"<CENTER>[\s\S]*?</CENTER>", '', response_content["main_content"]) self.response.out.write(response_content["main_content"])'''
6f12422431cd6563b7702f2a8723e30b272b2a1d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1797/6f12422431cd6563b7702f2a8723e30b272b2a1d/edu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 913, 67, 2740, 12, 2890, 16, 766, 67, 1745, 16, 309, 67, 1745, 4672, 365, 18, 2740, 18, 542, 67, 2327, 12, 2740, 67, 1745, 9614, 710, 6, 6487, 599, 13, 468, 694, 17, 6151, 18, 868,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 913, 67, 2740, 12, 2890, 16, 766, 67, 1745, 16, 309, 67, 1745, 4672, 365, 18, 2740, 18, 542, 67, 2327, 12, 2740, 67, 1745, 9614, 710, 6, 6487, 599, 13, 468, 694, 17, 6151, 18, 868,...
if node.getChild("value").isComplex() and not node.isLastChild(True):
if node.getChild("value").isComplex():
def compileNode(node): if node.type in [ "commentsBefore", "commentsAfter" ]: return if node.get("breakBefore", False) and not node.isFirstChild(True): sep() if node.getChild("commentsBefore", False) != None: commentCounter = 0 commentsBefore = node.getChild("commentsBefore") isFirst = node.isFirstChild() previous = node.getPreviousSibling(False, True) if previous and previous.type == "case": inCase = True else: inCase = False for child in commentsBefore.children: docComment = child.get("detail") in [ "javadoc", "qtdoc" ] headComment = child.get("detail") in [ "header" ] divComment = child.get("detail") in [ "divider" ] if not child.isFirstChild(): pass elif inCase: pass elif not isFirst: sep() elif not headComment: line() write(child.get("text")) # separator after divider/head comments if divComment or headComment: sep() # separator after block comments which are not for documentation elif child.get("detail") == "block" and not docComment: sep() else: line() ##################################################################################################################### # Opening... ##################################################################################################################### # # OPEN: MAP ################################## if node.type == "map": par = node.parent # No break before return statement if node.hasParent() and node.parent.type == "expression" and node.parent.parent.type == "return": pass elif node.isComplex(): line() write("{") if node.isComplex(): line() plus() elif node.hasChildren(True): space() # # OPEN: ARRAY ################################## elif node.type == "array": write("[") if node.isComplex(): line() plus() elif node.hasChildren(True): space() # # OPEN: BLOCK ################################## elif node.type == "block": if node.hasChildren(): if node.isComplex(): line() # in else, try to find the mode of the previous if first elif node.hasParent() and node.parent.type == "elseStatement": stmnt = node.parent.parent.getChild("statement") if stmnt.getChild("block", False) and stmnt.getChild("block", False).isComplex(): line() else: space() # in if, try to find the mode of the parent if (if existent) elif node.hasParent() and node.parent.type == "statement" and node.parent.parent.type == "loop" and node.parent.parent.get("loopType") == "IF": if node.parent.parent.hasParent() and node.parent.parent.parent.type == "elseStatement": stmnt = node.parent.parent.parent.parent.getChild("statement") if stmnt.getChild("block", False) and stmnt.getChild("block", False).isComplex(): line() else: space() else: space() # in catch/finally, try to find the mode of the try statement elif node.hasParent() and node.parent.hasParent() and node.parent.parent.type in [ "catch", "finally" ]: if node.parent.parent.parent.getChild("statement").getChild("block").isComplex(): line() else: space() else: space() else: space() write("{") if node.hasChildren(): plus() line() # # OPEN: PARAMS ################################## elif node.type == "params": write("(") # # OPEN: GROUP ################################## elif node.type == "group": write("(") # # OPEN: CASE ################################## elif node.type == "case": # force double new lines if not node.isFirstChild() and not node.getPreviousSibling(True).type == "case": sep() minus() line() write("case") space() # # OPEN: CATCH ################################## elif node.type == "catch": # If this statement block or the previous try were not complex, be not complex here, too if not node.getChild("statement").getChild("block").isComplex() and not node.parent.getChild("statement").getChild("block").isComplex(): noline() space() write("catch") # # OPEN: BREAK ################################## elif node.type == "break": write("break") if node.get("label", False): space() write(node.get("label", False)) # # OPEN: CONTINUE ################################## elif node.type == "continue": write("continue") if node.get("label", False): space() write(node.get("label", False)) # # OPEN: ELSE ################################## elif node.type == "elseStatement": if node.hasChild("commentsBefore"): pass else: # If this statement block and the previous were not complex, be not complex here, too inner = node.getChild("block", False) # Find inner IF statement (e.g. if; else if) if not inner and node.hasChild("loop"): inner = node.getChild("loop").getChild("statement").getChild("block", False) selfSimple = not inner or not inner.isComplex() prev = node.parent.getChild("statement") prevSimple = not prev.hasChild("block") or not prev.getChild("block").isComplex() if selfSimple and prevSimple and inner: noline() space() write("else") # This is a elseStatement without a block around (a set of {}) if not node.hasChild("block"): space() # # OPEN: TRY ################################## elif node.type == "switch": # Additional new line before each switch/try if not node.isFirstChild(True) and not node.getChild("commentsBefore", False): prev = node.getPreviousSibling(False, True) # No separation after case statements if prev != None and prev.type == "case": pass else: sep() if node.get("switchType") == "catch": write("try") elif node.get("switchType") == "case": write("switch") # # OPEN: FINALLY ################################## elif node.type == "finally": write("finally") # # OPEN: DELETE ################################## elif node.type == "delete": write("delete") space() # # OPEN: THROW ################################## elif node.type == "throw": write("throw") space() # # OPEN: NEW ################################## elif node.type == "instantiation": write("new") space() # # OPEN: RETURN ################################## elif node.type == "return": write("return") if node.hasChildren(): space() # # OPEN: DEFINITION LIST ################################## elif node.type == "definitionList": write("var") space() # # OPEN: DEFAULT ################################## elif node.type == "default": minus() # force double new lines sep() write("default") write(":") plus() line() # # OPEN: KEYVALUE ################################## elif node.type == "keyvalue": keyString = node.get("key") keyQuote = node.get("quote", False) if keyQuote != None: # print "USE QUOTATION" if keyQuote == "doublequotes": keyString = '"' + keyString + '"' else: keyString = "'" + keyString + "'" elif keyString in config.JSPROTECTED or not KEY.match(keyString): print "Warning: Auto protect key: %s" % keyString keyString = "\"" + keyString + "\"" if node.getChild("value").isComplex() and not node.isFirstChild(True): sep() write(keyString) space() # Fill with spaces # Do this only if the parent is complex (many entries) # But not if the value itself is complex if node.parent.isComplex() and not node.getChild("value").isComplex(): write(" " * (node.parent.get("maxKeyLength") - len(keyString))) write(":") space() # # OPEN: KEY ################################## elif node.type == "key": if node.parent.type == "accessor": write("[") # # OPEN: RIGHT ################################## elif node.type == "right": if node.parent.type == "accessor": write(".") # # OPEN: EXPRESSION ################################## elif node.type == "expression": if node.parent.type == "loop": loopType = node.parent.get("loopType") if loopType == "DO": stmnt = node.parent.getChild("statement") compact = stmnt.hasChild("block") and not stmnt.getChild("block").isComplex() if compact: noline() space() write("while") space() # open expression block of IF/WHILE/DO-WHILE/FOR statements write("(") elif node.parent.type == "catch": # open expression block of CATCH statement write("(") elif node.parent.type == "switch" and node.parent.get("switchType") == "case": # open expression block of SWITCH statement write("(") # # OPEN: LOOP ################################## elif node.type == "loop": # Additional new line before each loop if not node.isFirstChild(True) and not node.getChild("commentsBefore", False): prev = node.getPreviousSibling(False, True) # No separation after case statements if prev != None and prev.type == "case": pass else: sep() loopType = node.get("loopType") if loopType == "IF": write("if") space() elif loopType == "WHILE": write("while") space() elif loopType == "FOR": write("for") space() elif loopType == "DO": write("do") space() elif loopType == "WITH": write("with") space() else: print "Warning: Unknown loop type: %s" % loopType # # OPEN: FUNCTION ################################## elif node.type == "function": write("function") functionName = node.get("name", False) if functionName != None: space() write(functionName) # # OPEN: IDENTIFIER ################################## elif node.type == "identifier": name = node.get("name", False) if name != None: write(name) # # OPEN: DEFINITION ################################## elif node.type == "definition": if node.parent.type != "definitionList": write("var") space() write(node.get("identifier")) # # OPEN: CONSTANT ################################## elif node.type == "constant": if node.get("constantType") == "string": if node.get("detail") == "singlequotes": write("'") else: write('"') write(node.get("value")) if node.get("detail") == "singlequotes": write("'") else: write('"') else: write(node.get("value")) # # OPEN: THIRD (?: operation) ################################## elif node.type == "third": if node.parent.type == "operation": if node.parent.get("operator") == "HOOK": space() write(":") space() # # OPEN: LABEL ################################## elif node.type == "labelTerminator": write(":") # # OPEN: BODY ################################## elif node.type == "body": if not node.parent.getChild("params"): write("()") # # OPEN: COMMENT ################################## elif node.type == "comment": # insert a space before and no newline in the case of after comments if node.get("connection") == "after": noline() space() write(node.get("text")) # new line after inline comment (for example for syntactical reasons) if node.get("detail") == "inline": line() else: space() # # OPEN: ASSIGNMENT ################################## elif node.type == "assignment": if node.parent.type == "definition": oper = node.get("operator", False) realNode = node.parent.parent inForLoop = realNode.hasParent() and realNode.parent.type in [ "first", "second", "third" ] and realNode.parent.parent.type == "loop" and realNode.parent.parent.get("loopType") == "FOR" if not inForLoop and not oper in [ "INC", "DEC" ]: space() if oper != None: write(getTokenSource(oper)) else: write("=") if not inForLoop and not oper in [ "INC", "DEC" ]: space() # # INSIDE: FOR LOOP ################################## if node.hasParent() and node.parent.type == "loop" and node.parent.get("loopType") == "FOR": if node.type == "first": write("(") elif node.type == "statement": write(")") else: if node.type == "second" and not node.parent.hasChild("first"): write("(") if node.type == "third" and not node.parent.hasChild("first") and not node.parent.hasChild("second"): write("(") if not result.endswith(";") and not result.endswith("\n"): semicolon() space() # # INSIDE: OPERATION ################################## if node.hasParent() and node.parent.type == "operation": if node.parent.get("left", False) == True: oper = node.parent.get("operator") if oper == "TYPEOF": write("typeof") space() else: write(getTokenSource(oper)) ##################################################################################################################### # Children content ##################################################################################################################### if node.hasChildren(): for child in node.children: compileNode(child) ##################################################################################################################### # Closing node ##################################################################################################################### # # CLOSE: MAP ################################## if node.type == "map": if node.isComplex(): line() minus() elif node.hasChildren(True): space() write("}") # # CLOSE: ARRAY ################################## elif node.type == "array": if node.isComplex(): line() minus() elif node.hasChildren(True): space() write("]") # # CLOSE: KEY ################################## elif node.type == "key": if node.hasParent() and node.parent.type == "accessor": write("]") # # CLOSE: BLOCK ################################## elif node.type == "block": if node.hasChildren(): minus() line() write("}") comment(node) if node.hasChildren(): # Newline afterwards if node.parent.type == "body" and node.parent.parent.type == "function": # But only when this isn't a function block inside a assignment if node.parent.parent.parent.type in [ "right", "params" ]: pass elif node.parent.parent.parent.type == "value" and node.parent.parent.parent.parent.type == "keyvalue": pass else: line() else: line() # # CLOSE: PARAMS ################################## elif node.type == "params": write(")") # # CLOSE: SWITCH ################################## elif node.type == "switch": if node.get("switchType") == "case": minus() minus() line() write("}") comment(node) line() # Force a additinal line feed after each switch/try if not node.isLastChild(): sep() # # CLOSE: GROUP ################################## elif node.type == "group": write(")") # # CLOSE: CASE ################################## elif node.type == "case": write(":") comment(node) plus() line() # # CLOSE: CALL ################################## elif node.type == "call": if not node.getChild("params", False): write("()") # # CLOSE: FUNCTION ################################## elif node.type == "function": if not node.getChild("params", False): write("()") # # CLOSE: EXPRESSION ################################## elif node.type == "expression": if node.parent.type == "loop": write(")") # e.g. a if-construct without a block {} if node.parent.getChild("statement").hasChild("block"): pass elif node.parent.type == "loop" and node.parent.get("loopType") == "DO": pass else: space() elif node.parent.type == "catch": write(")") elif node.parent.type == "switch" and node.parent.get("switchType") == "case": write(")") comment(node) line() write("{") plus() plus() # # CLOSE: LOOP ################################## elif node.type == "loop": if node.get("loopType") == "DO": semicolon() comment(node) # Force a additinal line feed after each loop if not node.isLastChild(): sep() # # CLOSE: FIRST ################################## elif node.type == "first": if node.hasParent() and node.parent.type == "operation" and node.parent.get("left", False) != True: oper = node.parent.get("operator") if node.parent.parent.type == "statementList": realNode = node.parent.parent else: realNode = node.parent inForLoop = realNode.hasParent() and realNode.parent.type in [ "first", "second", "third" ] and realNode.parent.parent.type == "loop" and realNode.parent.parent.get("loopType") == "FOR" if oper == "IN": space() write("in") space() elif oper == "INSTANCEOF": space() write("instanceof") space() else: if not inForLoop and not oper in [ "INC", "DEC" ]: space() write(getTokenSource(oper)) if not inForLoop and not oper in [ "INC", "DEC" ]: space() # # CLOSE: LEFT ################################## elif node.type == "left": if node.hasParent() and node.parent.type == "assignment": oper = node.parent.get("operator", False) if node.parent.parent.type == "statementList": realNode = node.parent.parent else: realNode = node.parent inForLoop = realNode.hasParent() and realNode.parent.type in [ "first", "second", "third" ] and realNode.parent.parent.type == "loop" and realNode.parent.parent.get("loopType") == "FOR" if not inForLoop and not oper in [ "INC", "DEC" ]: space() if oper != None: write(getTokenSource(oper)) else: write("=") if not inForLoop and not oper in [ "INC", "DEC" ]: space() # # CLOSE: IDENTIFIER ################################## elif node.type == "identifier": if node.hasParent() and node.parent.type == "variable" and not node.isLastChild(True): write(".") # # CLOSE: ACCESSOR ################################## elif node.type == "accessor": if node.hasParent() and node.parent.type == "variable" and not node.isLastChild(True): write(".") # # CLOSE: KEYVALUE ################################## elif node.type == "keyvalue": if node.hasParent() and node.parent.type == "map" and not node.isLastChild(True): write(",") if node.getChild("value").isComplex() and not node.isLastChild(True): sep() elif node.parent.isComplex(): line() else: space() # # CLOSE: DEFINITION ################################## elif node.type == "definition": if node.hasParent() and node.parent.type == "definitionList" and not node.isLastChild(True): write(",") space() # # CLOSE: OTHER ################################## if node.hasParent() and not node.type in [ "comment", "commentsBefore", "commentsAfter" ]: # Add comma dividers between statements in these parents if node.parent.type in [ "array", "params", "statementList" ] and not node.isLastChild(True): write(",") space() # Semicolon handling if node.type in [ "block", "assignment", "call", "operation", "definitionList", "return", "break", "continue", "delete", "accessor", "instantiation", "throw", "variable" ]: # Default semicolon handling if node.parent.type in [ "block", "file" ]: semicolon() comment(node) line() if node.isComplex() and not node.isLastChild(): sep() # Special handling for switch statements elif node.parent.type == "statement" and node.parent.parent.type == "switch" and node.parent.parent.get("switchType") == "case": semicolon() comment(node) line() if node.isComplex() and not node.isLastChild(): sep() # Special handling for loops (e.g. if) without blocks {} elif node.parent.type in [ "statement", "elseStatement" ] and not node.parent.hasChild("block") and node.parent.parent.type == "loop": semicolon() comment(node) line() if node.isComplex() and not node.isLastChild(): sep() # # CLOSE: COMMENT ################################## # Rest of the after comments (not inserted previously) comment(node)
9cf07c1c2688fd9e673e7730f281973f5d893b41 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5718/9cf07c1c2688fd9e673e7730f281973f5d893b41/prettyprint.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 907, 12, 2159, 4672, 225, 309, 756, 18, 723, 316, 306, 315, 9231, 4649, 3113, 315, 9231, 4436, 6, 308, 30, 327, 565, 309, 756, 18, 588, 2932, 8820, 4649, 3113, 1083, 13, 471, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 907, 12, 2159, 4672, 225, 309, 756, 18, 723, 316, 306, 315, 9231, 4649, 3113, 315, 9231, 4436, 6, 308, 30, 327, 565, 309, 756, 18, 588, 2932, 8820, 4649, 3113, 1083, 13, 471, 4...
translation = Translation("de_DE")
translation = Translation({ "Static Feeds" : "Statische Quellen", "User Feeds" : "Eigene Quellen", "Add feed" : "Quelle hinzufügen" })
def build(): # Locales session.addLocale("en_US") # Values session.addVariant("qx.debug", [ '"on"' ]) session.addVariant("qx.client", [ '"gecko"' ]) session.addVariant("qx.dynlocale", [ '"off"' ]) session.addVariant("qx.globalErrorHandling", [ '"off"' ]) session.addVariant("qx.version", ["1.0"]) session.addVariant("qx.theme", ['"qx.theme.Modern"']) # Create optimizer for improved speed/compression optimization = Optimization(["unused", "privates", "variables", "declarations", "blocks"]) translation = Translation("de_DE") localization = Localization("de_DE") # Process every possible permutation for permutation in session.getPermutations(): logging.info("PERMUTATION: %s" % permutation) # Build file header headerCode = "" headerCode += "/*\n" headerCode += " * Copyright 2010\n" headerCode += " *\n" headerCode += " * Permutation: %s\n" % permutation headerCode += " * Optimizations: %s\n" % optimization headerCode += " */\n\n" # Boot bootCode = "qx.core.Init.boot(feedreader.Application);" # Resolving dependencies resolver = Resolver(session, permutation) resolver.addClassName("feedreader.Application") resolver.addClassName("qx.theme.Modern") classes = resolver.getIncludedClasses() # Collecting Resources resources = Resources(session, classes, permutation) resources.publishFiles("build/resource") resources.publishManifest("build/manifest", "resource") resourceCode = resources.exportInfo(replaceRoots="resource") # Compiling classes sorter = Sorter(resolver, permutation) compressedCode = Combiner(permutation, optimization, translation, localization).compress(sorter.getSortedClasses(), format=False) # TODO # Create filenames # Based on permutation.getKey(), optimization, modification date, etc. # Write file writefile("build/script/feedreader.js", headerCode + resourceCode + compressedCode + bootCode)
b6cf61aabe8a9a81ca4dd0e774a0f3e37e46bb9b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/b6cf61aabe8a9a81ca4dd0e774a0f3e37e46bb9b/generate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 13332, 468, 3566, 281, 1339, 18, 1289, 3916, 2932, 275, 67, 3378, 7923, 225, 468, 6876, 1339, 18, 1289, 9356, 2932, 85, 92, 18, 4148, 3113, 306, 2119, 265, 5187, 308, 13, 1339, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 13332, 468, 3566, 281, 1339, 18, 1289, 3916, 2932, 275, 67, 3378, 7923, 225, 468, 6876, 1339, 18, 1289, 9356, 2932, 85, 92, 18, 4148, 3113, 306, 2119, 265, 5187, 308, 13, 1339, 1...
''' Supply a unit for the IbiPerSecondFormatter, like 'bit' or 'B' (for byte). '''
''' Supply a unit for the IbiFormatter, like 'bit' or 'B' (for byte). '''
def __init__(self, unit): ''' Supply a unit for the IbiPerSecondFormatter, like 'bit' or 'B' (for byte). ''' self.unit = unit
4cd40d33a845ec0d4925de2d24a40eaa33edad06 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5357/4cd40d33a845ec0d4925de2d24a40eaa33edad06/graphutil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2836, 4672, 9163, 3425, 1283, 279, 2836, 364, 326, 467, 13266, 5074, 16, 3007, 296, 3682, 11, 578, 296, 38, 11, 261, 1884, 1160, 2934, 9163, 365, 18, 487...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2836, 4672, 9163, 3425, 1283, 279, 2836, 364, 326, 467, 13266, 5074, 16, 3007, 296, 3682, 11, 578, 296, 38, 11, 261, 1884, 1160, 2934, 9163, 365, 18, 487...
@param address: any address in the breakpoint range
@param ea: any address in the breakpoint range
def GetBptAttr(ea, bptattr): """ Get the characteristics of a breakpoint @param address: any address in the breakpoint range @param bptattr: the desired attribute code, one of BPTATTR_... constants @return: the desired attribute value or -1 """ bpt = idaapi.bpt_t() if not idaapi.get_bpt(ea, bpt): return -1 else: if bptattr == BPTATTR_EA: return bpt.ea if bptattr == BPTATTR_SIZE: return bpt.size if bptattr == BPTATTR_TYPE: return bpt.type if bptattr == BPTATTR_COUNT: return bpt.pass_count if bptattr == BPTATTR_FLAGS: return bpt.flags if bptattr == BPTATTR_COND: return bpt.condition return -1
e44bdcd4de27699ae0ecbd6c9dc2f42ebbbc110e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3410/e44bdcd4de27699ae0ecbd6c9dc2f42ebbbc110e/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 38, 337, 3843, 12, 24852, 16, 324, 337, 1747, 4672, 3536, 968, 326, 29385, 434, 279, 18820, 225, 632, 891, 24164, 30, 1281, 1758, 316, 326, 18820, 1048, 632, 891, 324, 337, 1747, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 38, 337, 3843, 12, 24852, 16, 324, 337, 1747, 4672, 3536, 968, 326, 29385, 434, 279, 18820, 225, 632, 891, 24164, 30, 1281, 1758, 316, 326, 18820, 1048, 632, 891, 324, 337, 1747, ...
self.assertEqual( info['version'], u'1.0' )
def testOneStepImport(self): zcml.load_string(ONE_STEP_ZCML) self.assertEqual(_import_step_registry._registered.keys(), [ u'Products.GenericSetup.teststep' ]) info = _import_step_registry._registered[ u'Products.GenericSetup.teststep' ] self.assertEqual( info['description'], u'step description' ) self.assertEqual( info['title'], u'step title' ) self.assertEqual( info['handler'], 'Products.GenericSetup.initialize') self.assertEqual( info['version'], u'1.0' ) self.assertEqual( info['id'], u'Products.GenericSetup.teststep' )
648e05bfe5e7f9e1eb010eff1ffe7d58710d1a75 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3757/648e05bfe5e7f9e1eb010eff1ffe7d58710d1a75/test_stepzcml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 3335, 4160, 5010, 12, 2890, 4672, 998, 71, 781, 18, 945, 67, 1080, 12, 5998, 67, 26951, 67, 62, 39, 1495, 13, 365, 18, 11231, 5812, 24899, 5666, 67, 4119, 67, 9893, 6315, 14327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3335, 4160, 5010, 12, 2890, 4672, 998, 71, 781, 18, 945, 67, 1080, 12, 5998, 67, 26951, 67, 62, 39, 1495, 13, 365, 18, 11231, 5812, 24899, 5666, 67, 4119, 67, 9893, 6315, 14327, ...
desc = split(freshimport(modname).__doc__ or '', '\n')[0] if find(lower(modname + ' - ' + desc), key) >= 0: callback(None, modname, desc)
if key is None: callback(None, modname, '') else: desc = split(freshimport(modname).__doc__ or '', '\n')[0] if find(lower(modname + ' - ' + desc), key) >= 0: callback(None, modname, desc)
def run(self, key, callback, completer=None): key = lower(key) self.quit = 0 seen = {}
62de9755a6b9ac845b39db8fb3dc73ec9598b5f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/62de9755a6b9ac845b39db8fb3dc73ec9598b5f9/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 498, 16, 1348, 16, 31848, 33, 7036, 4672, 498, 273, 2612, 12, 856, 13, 365, 18, 27176, 273, 374, 5881, 273, 2618, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 498, 16, 1348, 16, 31848, 33, 7036, 4672, 498, 273, 2612, 12, 856, 13, 365, 18, 27176, 273, 374, 5881, 273, 2618, 2, -100, -100, -100, -100, -100, -100, -100, -100,...
self._writer.whole_element('a', status, {'class': status.lower(),
self._writer.element('a', status, {'class': status.lower(),
def _col_status_content(self, s_or_t): status = s_or_t.status col_status = 'col_status %s' % status.lower() self._writer.start_element('td', {'class': col_status}) if s_or_t.link is not None: type = self._get_type(s_or_t) link = '%s#%s_%s' % (s_or_t.link, type, s_or_t.longname) self._writer.whole_element('a', status, {'class': status.lower(), 'href': link, 'title': s_or_t.longname }) else: self._writer.content(status) self._writer.end_element('td')
9cdb508010da4366326649ba4d0a07a65263ab66 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7408/9cdb508010da4366326649ba4d0a07a65263ab66/robotdiff.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1293, 67, 2327, 67, 1745, 12, 2890, 16, 272, 67, 280, 67, 88, 4672, 1267, 273, 272, 67, 280, 67, 88, 18, 2327, 645, 67, 2327, 273, 296, 1293, 67, 2327, 738, 87, 11, 738, 1267,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1293, 67, 2327, 67, 1745, 12, 2890, 16, 272, 67, 280, 67, 88, 4672, 1267, 273, 272, 67, 280, 67, 88, 18, 2327, 645, 67, 2327, 273, 296, 1293, 67, 2327, 738, 87, 11, 738, 1267,...
SmartPkgEnable("X11", "x11", "X11", ("X11", "X11/Xlib.h"))
SmartPkgEnable("X11", ("x11", "xcb", "xau"), ("X11", "xcb", "Xau"), ("X11", "X11/Xlib.h"))
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR global VERSION,COMPRESSOR,THREADCOUNT,OSXTARGET longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","threads=","outputdir=","override="] anything = 0 optimize = "" for pkg in PkgListGet(): longopts.append("no-"+pkg.lower()) for pkg in PkgListGet(): longopts.append("use-"+pkg.lower()) try: opts, extras = getopt.getopt(args, "", longopts) for option,value in opts: if (option=="--help"): raise "usage" elif (option=="--optimize"): optimize=value elif (option=="--installer"): INSTALLER=1 elif (option=="--verbose"): SetVerbose(True) elif (option=="--distributor"): DISTRIBUTOR=value elif (option=="--rtdist"): RTDIST=1 elif (option=="--runtime"): RUNTIME=1 elif (option=="--genman"): GENMAN=1 elif (option=="--everything"): PkgEnableAll() elif (option=="--nothing"): PkgDisableAll() elif (option=="--threads"): THREADCOUNT=int(value) elif (option=="--outputdir"): SetOutputDir(value.strip()) elif (option=="--osxtarget"): OSXTARGET=value.strip() elif (option=="--nocolor"): DisableColors() elif (option=="--version"): VERSION=value if (len(VERSION.split(".")) != 3): raise "usage" elif (option=="--lzma"): COMPRESSOR="lzma" elif (option=="--override"): AddOverride(value.strip()) else: for pkg in PkgListGet(): if (option=="--use-"+pkg.lower()): PkgEnable(pkg) break for pkg in PkgListGet(): if (option=="--no-"+pkg.lower()): PkgDisable(pkg) break anything = 1 except: usage(0) if (anything==0): usage(0) if (RTDIST and RUNTIME): usage("Options --runtime and --rtdist cannot be specified at the same time!") if (optimize=="" and (RTDIST or RUNTIME)): optimize = "4" elif (optimize==""): optimize = "3" if (OSXTARGET != None and OSXTARGET.strip() == ""): OSXTARGET = None elif (OSXTARGET != None): OSXTARGET = OSXTARGET.strip() if (len(OSXTARGET) != 4 or not OSXTARGET.startswith("10.")): usage("Invalid setting for OSXTARGET") try: OSXTARGET = "10.%d" % int(OSXTARGET[-1]) except: usage("Invalid setting for OSXTARGET") try: SetOptimize(int(optimize)) assert GetOptimize() in [1, 2, 3, 4] except: usage("Invalid setting for OPTIMIZE")
c93d7a834bc19cc4ee31bcfb3842e574d3dda0c8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7242/c93d7a834bc19cc4ee31bcfb3842e574d3dda0c8/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 4952, 12, 1968, 4672, 2552, 22880, 4685, 654, 16, 12185, 2565, 882, 16, 54, 25375, 16, 16652, 9560, 16, 2565, 27424, 1693, 916, 2552, 8456, 16, 4208, 22526, 916, 16, 21730, 7240, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4952, 12, 1968, 4672, 2552, 22880, 4685, 654, 16, 12185, 2565, 882, 16, 54, 25375, 16, 16652, 9560, 16, 2565, 27424, 1693, 916, 2552, 8456, 16, 4208, 22526, 916, 16, 21730, 7240, 1...
return FormatIOIterator(iterator.iterateString(s, builder))
if format.multirecord == 1: iterator = exp.make_iterator("record", debug_level = debug_level) return FormatIOIterator(iterator.iterateString(s, builder)) elif format.multirecord == 0: parser = exp.make_parser(debug_level = debug_level) parser.setContentHandler(builder) parser.parseString(infile) return builder.document else: raise AssertionError(format.multirecord)
def readString(self, s, format = None, builder = None, debug_level = 0): if format is None: format = self.default_input_format format = self.registery.normalize(format)
bc44f143f3116fc1fabe2b3114bc7866d5e84f8f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/bc44f143f3116fc1fabe2b3114bc7866d5e84f8f/FormatIO.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18646, 12, 2890, 16, 272, 16, 740, 273, 599, 16, 2089, 273, 599, 16, 1198, 67, 2815, 273, 374, 4672, 309, 740, 353, 599, 30, 740, 273, 365, 18, 1886, 67, 2630, 67, 2139, 740, 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, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18646, 12, 2890, 16, 272, 16, 740, 273, 599, 16, 2089, 273, 599, 16, 1198, 67, 2815, 273, 374, 4672, 309, 740, 353, 599, 30, 740, 273, 365, 18, 1886, 67, 2630, 67, 2139, 740, 273, ...
- ``n`` - number of rounds (default: None) - ``rc`` - number of rows \* number of cols (default: None) - ``e`` - exponent of base field (default: None)
- ``n`` - number of rounds (default: ``None``) - ``rc`` - number of rows \* number of cols (default: ``None``) - ``e`` - exponent of base field (default: ``None``)
def varformatstr(self, name, n=None, rc=None, e=None): """ Return a format string which is understood by print et al. If a numerical value is omitted, the default value of self is used. The numerical values (n, rc, e) are used to determine the width of the respective fields in the format string. INPUT: - ``name`` - name of the variable - ``n`` - number of rounds (default: None) - ``rc`` - number of rows \* number of cols (default: None) - ``e`` - exponent of base field (default: None) EXAMPLE:: sage: sr = mq.SR(1, 2, 2, 4) sage: sr.varformatstr('x') 'x%01d%01d%01d' sage: sr.varformatstr('x', n=1000) 'x%03d%03d%03d' """ if n is None: n = self.n if rc is None: rc = self.r * self.c if e is None: e = self.e l = str(max([ len(str(rc-1)), len(str(n-1)), len(str(e-1)) ] )) if name not in ("k", "s"): pf = self._postfix else: pf = "" format_string = name + pf + "%0" + l + "d" + "%0" + l + "d" + "%0" + l + "d" return format_string
64b5e0e9186de5235119791631990329cc9aecfa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/64b5e0e9186de5235119791631990329cc9aecfa/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 569, 2139, 701, 12, 2890, 16, 508, 16, 290, 33, 7036, 16, 4519, 33, 7036, 16, 425, 33, 7036, 4672, 3536, 2000, 279, 740, 533, 1492, 353, 31727, 4773, 635, 1172, 3393, 524, 18, 225, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 569, 2139, 701, 12, 2890, 16, 508, 16, 290, 33, 7036, 16, 4519, 33, 7036, 16, 425, 33, 7036, 4672, 3536, 2000, 279, 740, 533, 1492, 353, 31727, 4773, 635, 1172, 3393, 524, 18, 225, 9...
"<div padding=6 id='div-interact-3'> ...</div>\n "
"<!--notruncate--><div padding=6 id='div-interact-3'> ...</div>\n "
def wrap_in_outside_frame(self, inside): """ Return the entire HTML for the interactive canvas, obtained by wrapping all the inside html of the canvas in a div and a table.
e886480249649fa64572856f9ed85a914600a590 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/e886480249649fa64572856f9ed85a914600a590/interact.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2193, 67, 267, 67, 659, 5564, 67, 3789, 12, 2890, 16, 4832, 4672, 3536, 2000, 326, 7278, 3982, 364, 326, 12625, 5953, 16, 12700, 635, 14702, 777, 326, 4832, 1729, 434, 326, 5953, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2193, 67, 267, 67, 659, 5564, 67, 3789, 12, 2890, 16, 4832, 4672, 3536, 2000, 326, 7278, 3982, 364, 326, 12625, 5953, 16, 12700, 635, 14702, 777, 326, 4832, 1729, 434, 326, 5953, 316, ...
print "b_extra:", adptbx.U_as_B(sampled_density.u_extra())
print "b_extra:", adptbx.U_as_B(sampled_density.u_extra())
def print_structure_factors(SgInfo, adp=0, d_min=2., grid_resolution_factor = 1./3): elements = ("N", "C", "C", "O", "N", "C", "C", "O") xtal = debug_utils.random_structure( SgInfo, elements, volume_per_atom=50., min_distance=1.5, general_positions_only=0, anisotropic_displacement_parameters=adp) if (0): assert SgInfo.SgNumber() == 1 from cctbx_boost import uctbx xtal.UnitCell = uctbx.UnitCell((10,10,10)) if (0): from cctbx_boost import uctbx from cctbx_boost.eltbx.caasf_wk1995 import CAASF_WK1995 xtal.UnitCell = uctbx.UnitCell((10,10,10)) xtal.Sites = shared.XrayScatterer() #s = sftbx.XrayScatterer("O", CAASF_WK1995("O"), 0j, (1./64,1./64,1./64), 1., 0) s = sftbx.XrayScatterer("O", CAASF_WK1995("O"), 0j, (1./32,1./16,1./6), 1., 0.5) s.ApplySymmetry(xtal.UnitCell, xtal.SgOps, 0.1, 0, 0) xtal.Sites.append(s) s = sftbx.XrayScatterer("O", CAASF_WK1995("O"), 0j, (8./32,5./16,3./6), 1., 0.5) s.ApplySymmetry(xtal.UnitCell, xtal.SgOps, 0.1, 0, 0) xtal.Sites.append(s) print xtal.UnitCell debug_utils.print_sites(xtal) MillerIndices = xutils.build_miller_indices(xtal, d_min) Fcalc = xutils.calculate_structure_factors(MillerIndices, xtal) if (0): run_cns(elements, xtal, d_min, grid_resolution_factor) return max_q = 1. / (d_min**2) max_prime = 5 mandatory_grid_factors = xtal.SgOps.refine_gridding() grid_logical = sftbx.determine_grid( xtal.UnitCell, max_q, grid_resolution_factor, max_prime, mandatory_grid_factors) fft = fftbx.real_to_complex_3d(grid_logical) sampled_density = sftbx.sampled_model_density( xtal.UnitCell, xtal.Sites, max_q, grid_resolution_factor, fft.Nreal(), fft.Mreal()) tags = sftbx.grid_tags(fft.Nreal()) sym_flags = sftbx.map_symmetry_flags(1) tags.build(xtal.SgInfo, sym_flags) sampled_density.apply_symmetry(tags) if (0): print "max_q:", sampled_density.max_q() print "grid_resolution_factor:", sampled_density.resolution_factor() print "quality_factor:", sampled_density.quality_factor() print "wing_cutoff:", sampled_density.wing_cutoff() print "u_extra:", sampled_density.u_extra() print "b_extra:", adptbx.U_as_B(sampled_density.u_extra()) map = sampled_density.map_as_shared() map_stats = shared.statistics(map) if (0): print "Electron density" print "max %.6g" % (map_stats.max()) print "min %.6g" % (map_stats.min()) print "mean %.6g" % (map_stats.mean()) print "sigma %.6g" % (map_stats.sigma()) if (0): map = sftbx.structure_factor_map( xtal.SgOps, Fcalc.H, Fcalc.F, fft.Ncomplex()) fft.backward(map) map_stats = shared.statistics(map) print "True electron density" print "max %.6g" % (map_stats.max()) print "min %.6g" % (map_stats.min()) print "mean %.6g" % (map_stats.mean()) print "sigma %.6g" % (map_stats.sigma()) fft.forward(map) map_stats = shared.statistics(map) if (0): print "Transformed electron density" print "max %.6g" % (map_stats.max()) print "min %.6g" % (map_stats.min()) print "mean %.6g" % (map_stats.mean()) print "sigma %.6g" % (map_stats.sigma()) print "Ncomplex", fft.Ncomplex() if (0): map = sftbx.structure_factor_map( xtal.SgOps, Fcalc.H, Fcalc.F, fft.Ncomplex()) miller_indices, fcal = sftbx.collect_structure_factors( xtal.UnitCell, xtal.SgInfo, max_q, map, fft.Ncomplex()) sampled_density.eliminate_u_extra_and_normalize(miller_indices, fcal) if (0): u_extra = sampled_density.u_extra() xtal_extra = add_u_extra(xtal, u_extra) fcalc_extra = xutils.calculate_structure_factors(MillerIndices, xtal_extra) show_structure_factor_correlation("before", Fcalc.F, fcalc_extra.F) sftbx.eliminate_u_extra( xtal.UnitCell, u_extra, MillerIndices.H, fcalc_extra.F) show_structure_factor_correlation("after", Fcalc.F, fcalc_extra.F) js = shared.join_sets(MillerIndices.H, miller_indices) if (0): for i,j in js.pairs(): print MillerIndices.H[i], miller_indices[j] print "singles 1:" for i in js.singles(0): print MillerIndices.H[i] print "singles 2:" for i in js.singles(1): print miller_indices[i] assert js.pairs().size() + js.singles(0).size() == MillerIndices.H.size() assert js.pairs().size() + js.singles(1).size() == miller_indices.size() assert js.pairs().size() == MillerIndices.H.size() for i in xrange(2): assert js.singles(i).size() == 0 x = shared.double() y = shared.double() for i,j in js.pairs(): assert MillerIndices.H[i] == miller_indices[j] if (0): print MillerIndices.H[i], print "(" + debug_utils.format_structure_factor(Fcalc.F[i]) + ")", print "(" + debug_utils.format_structure_factor(fcal[j]) + ")" x.append(abs(Fcalc.F[i])) y.append(abs(fcal[j])) xy_regr = shared.linear_regression(x, y) assert xy_regr.is_well_defined() print "cc:", xy_regr.cc(), "m:", xy_regr.m()
94a2c1f8c4ebbad46242101310116b05b009f4a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/94a2c1f8c4ebbad46242101310116b05b009f4a8/dbg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 7627, 67, 22108, 12, 55, 75, 966, 16, 1261, 84, 33, 20, 16, 302, 67, 1154, 33, 22, 12990, 3068, 67, 19182, 67, 6812, 273, 404, 18, 19, 23, 4672, 2186, 273, 7566, 50, 3113...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7627, 67, 22108, 12, 55, 75, 966, 16, 1261, 84, 33, 20, 16, 302, 67, 1154, 33, 22, 12990, 3068, 67, 19182, 67, 6812, 273, 404, 18, 19, 23, 4672, 2186, 273, 7566, 50, 3113...
"FROM ticket OUTER JOIN ticket_custom ON id = ticket"
"FROM ticket LEFT OUTER JOIN ticket_custom ON id = ticket"
def _render_results(self, constraints, order, desc): self.req.hdf.setValue('title', 'Custom Query') self.req.hdf.setValue('query.edit_href', self.env.href.query(constraints, order, desc, action='edit'))
fcc0ab901e452ef047e9faf265363d39723b31de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/fcc0ab901e452ef047e9faf265363d39723b31de/Query.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 67, 4717, 12, 2890, 16, 6237, 16, 1353, 16, 3044, 4672, 365, 18, 3658, 18, 26428, 18, 542, 620, 2668, 2649, 2187, 296, 3802, 2770, 6134, 365, 18, 3658, 18, 26428, 18, 542, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 67, 4717, 12, 2890, 16, 6237, 16, 1353, 16, 3044, 4672, 365, 18, 3658, 18, 26428, 18, 542, 620, 2668, 2649, 2187, 296, 3802, 2770, 6134, 365, 18, 3658, 18, 26428, 18, 542, ...
varBinds.append((sysUpTime.name, sysUpTime.syntax)) snmpTrapOid, = apply(
varBinds.append((sysUpTime.name + (0,), sysUpTime.syntax)) snmpTrapOid, = contextMibInstrumCtl.mibBuilder.importSymbols( 'SNMPv2-MIB', 'snmpTrapOID' ) snmpTrapVal, = apply(
def sendNotification( self, snmpEngine, notificationTarget, notificationName, additionalVarBinds=None, contextName='' ): # 3.3 ( notifyTag, notifyType ) = config.getNotificationInfo( snmpEngine, notificationTarget ) contextMibInstrumCtl = self.__context.getMibInstrum( contextName ) for targetAddrName in config.getTargetNames(snmpEngine, notifyTag): ( transportDomain, transportAddress, timeout, retryCount, params ) = config.getTargetAddr(snmpEngine, targetAddrName) ( messageProcessingModel, securityModel, securityName, securityLevel ) = config.getTargetParams(snmpEngine, params)
beac2b8a85446ea9e67020370cf82edea825ab65 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/587/beac2b8a85446ea9e67020370cf82edea825ab65/ntforg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 4386, 12, 365, 16, 15366, 4410, 16, 3851, 2326, 16, 3851, 461, 16, 3312, 1537, 17856, 33, 7036, 16, 819, 461, 2218, 11, 262, 30, 468, 890, 18, 23, 261, 5066, 1805, 16, 5066, 55...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 4386, 12, 365, 16, 15366, 4410, 16, 3851, 2326, 16, 3851, 461, 16, 3312, 1537, 17856, 33, 7036, 16, 819, 461, 2218, 11, 262, 30, 468, 890, 18, 23, 261, 5066, 1805, 16, 5066, 55...
wx.ToolBar.__init__(self, parent, -1, wx.DefaultPosition, wx.DefaultSize, wx.TB_FLAT|wx.TB_NODIVIDER)
wx.ToolBar.__init__(self, parent, -1, wx.DefaultPosition, wx.DefaultSize, wx.TB_FLAT|wx.TB_NODIVIDER)
def __init__(self, parent): wx.ToolBar.__init__(self, parent, -1, wx.DefaultPosition, wx.DefaultSize, wx.TB_FLAT|wx.TB_NODIVIDER) if sys.platform == 'darwin': self.SetToolBitmapSize(wx.Size(32,32)) self.parent = parent self.__init_items() self.__bind_events()
a034dd5816cdd448759782ed9b521ab96a3ed85f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10228/a034dd5816cdd448759782ed9b521ab96a3ed85f/frame.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 4672, 7075, 18, 6364, 5190, 16186, 2738, 972, 12, 2890, 16, 982, 16, 300, 21, 16, 7075, 18, 1868, 2555, 16, 7075, 18, 1868, 1225, 16, 7075, 18, 25...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 982, 4672, 7075, 18, 6364, 5190, 16186, 2738, 972, 12, 2890, 16, 982, 16, 300, 21, 16, 7075, 18, 1868, 2555, 16, 7075, 18, 1868, 1225, 16, 7075, 18, 25...
gender = { "M": "%simages/male.png" % MEDIA_URL, "F": "%simages/female.png" % MEDIA_URL } return gender[self.gender]
return GENDER_IMAGES[self.gender]
def get_genderimage_url(self): gender = { "M": "%simages/male.png" % MEDIA_URL, "F": "%simages/female.png" % MEDIA_URL } return gender[self.gender]
7edefec0672c00843557626c7f8e45d854e45cf2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12976/7edefec0672c00843557626c7f8e45d854e45cf2/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 27638, 2730, 67, 718, 12, 2890, 4672, 18578, 273, 288, 315, 49, 6877, 2213, 87, 7369, 19, 81, 5349, 18, 6446, 6, 738, 26312, 67, 1785, 16, 315, 42, 6877, 2213, 87, 7369, 19,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 27638, 2730, 67, 718, 12, 2890, 4672, 18578, 273, 288, 315, 49, 6877, 2213, 87, 7369, 19, 81, 5349, 18, 6446, 6, 738, 26312, 67, 1785, 16, 315, 42, 6877, 2213, 87, 7369, 19,...
elif now.tm_yday - local.tm_yday < 7: dateString = time.strftime("%A", local)
elif now.tm_yday - t.tm_yday < 7: dateString = time.strftime("%A", t)
def formatDate(t): local = time.localtime(t) now = time.localtime(time.time()) timeString = "%02d:%02d" % (local.tm_hour, local.tm_min) if local.tm_year == now.tm_year: if local.tm_yday == now.tm_yday: dateString = "Today" elif local.tm_yday == now.tm_yday - 1: dateString = "Yesterday" elif now.tm_yday - local.tm_yday < 7: dateString = time.strftime("%A", local) else: dateString = time.strftime("%b %d", local) else: dateString = time.strftime("%b %d", local) return "%s %s" % (timeString, dateString)
2cd4713931afd10a9da400e647cf99c69a5682c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/2cd4713931afd10a9da400e647cf99c69a5682c8/mobile-feed-aggregator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29341, 12, 88, 4672, 1191, 273, 813, 18, 3729, 957, 12, 88, 13, 2037, 273, 813, 18, 3729, 957, 12, 957, 18, 957, 10756, 813, 780, 273, 2213, 3103, 72, 5319, 3103, 72, 6, 738, 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, 29341, 12, 88, 4672, 1191, 273, 813, 18, 3729, 957, 12, 88, 13, 2037, 273, 813, 18, 3729, 957, 12, 957, 18, 957, 10756, 813, 780, 273, 2213, 3103, 72, 5319, 3103, 72, 6, 738, 261, ...
/.../release/RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/quit.py --create - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /usr/bin/time --format=%e -o test_profile/time.log .../release/RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py
/.../chandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/quit.py --create - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /usr/bin/time --format=%e -o test_profile/time.log .../chandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py
def runStartupPerfTests(options, timer, largeData=False, repeat=3, logger=log): """ Run startup time tests. >>> options = parseOptions() >>> checkOptions(options) >>> options.dryrun = True >>> options.verbose = True >>> runStartupPerfTests(options, '/usr/bin/time') Creating repository for startup time tests /.../release/RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/quit.py --create - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /usr/bin/time --format=%e -o test_profile/time.log .../release/RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py Startup 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 False >>> runStartupPerfTests(options, '/usr/bin/time', repeat=1) Creating repository for startup time tests /.../RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/quit.py --create - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /usr/bin/time --format=%e -o test_profile/time.log /.../RunChandler --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py Startup 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 False >>> runStartupPerfTests(options, '/usr/bin/time', largeData=True) Creating repository for startup time tests /.../release/RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/quit.py --restore=test_profile/__repository__.001 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /usr/bin/time --format=%e -o test_profile/time.log .../release/RunChandler --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py Startup_with_large_calendar 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 False >>> options.tbox = True >>> runStartupPerfTests(options, '/usr/bin/time') Creating repository for startup time tests /.../release/RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/quit.py --create - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /usr/bin/time --format=%e -o test_profile/time.log .../release/RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py Startup 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 <BLANKLINE> Startup [#TINDERBOX# Status = PASSED] OSAF_QA: Startup | ... | 0.00 #TINDERBOX# Testname = Startup #TINDERBOX# Status = PASSED #TINDERBOX# Time elapsed = 0.00 (seconds) - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + False """ if repeat < 3: repeat = 3 # You can't get an accurate number otherwise # Create test repo if options.verbose: log('Creating repository for startup time tests') cmd = options.runchandler['release'][:] cmd += ['--catch=tests', '--profileDir=%s' % options.profileDir, '--parcelPath=%s' % options.parcelPath, '--scriptFile=%s' % os.path.join('tools', 'QATestScripts', 'Performance', 'quit.py'),] if not largeData: cmd += ['--create'] timeout = 180 name = 'Startup' else: cmd += ['--restore=%s' % os.path.join(options.profileDir, '__repository__.001')] timeout = 600 name = 'Startup_with_large_calendar' if options.params: cmd += [options.params] if options.verbose: log(' '.join(cmd)) if options.dryrun: result = 0 else: result = build_lib.runCommand(cmd, timeout=timeout, logger=logger) if result != 0: log('***Error exit code=%d, creating %s repository' % (result, name)) failedTests.append(name) return True if options.dryrun: log('- + ' * 15) else: logger('- + ' * 15) # Time startup values = [] timeLog = os.path.join(options.profileDir, 'time.log') if not options.dryrun: if os.path.isfile(timeLog): os.remove(timeLog) cmd = [timer, r'--format=%e', '-o', timeLog] cmd += options.runchandler['release'][:] cmd += ['--catch=tests', '--profileDir=%s' % options.profileDir, '--parcelPath=%s' % options.parcelPath, '--scriptFile=%s' % os.path.join('tools', 'QATestScripts', 'Performance', 'end.py'),] if options.params: cmd += [options.params] if options.verbose: log(' '.join(cmd)) log(name.ljust(33), newline=' ') for _x in range(repeat): if options.dryrun: result = 0 else: result = build_lib.runCommand(cmd, timeout=180, logger=logger) if result == 0: if options.dryrun: line = '0.0' else: line = open(timeLog).readline()[:-1] try: value = float(line) except ValueError, e: log('| %s' % str(e)) failedTests.append(name) return True log(('%02.2f' % value).rjust(6), newline=' ') values.append(value) else: log('| failed') failedTests.append(name) return True if options.dryrun: log('- + ' * 15) else: logger('- + ' * 15) else: values.sort() value = values[repeat/2] log(' | ', newline='') log(('%02.2f' % value).rjust(6) , newline='') log(u' \u00B1 '.encode('utf8'), newline='') # Unicode PLUS-MINUS SIGN log(('%02.2f' % stddev(values)).rjust(6)) if options.tbox: revision = getattr(build_lib.loadModuleFromFile(os.path.join(options.chandlerHome, 'version.py'), 'vmodule'), 'revision', '') log('') log('%s [#TINDERBOX# Status = PASSED]' % name) log('OSAF_QA: %s | %s | %02.2f' % (name, revision, value)) log('#TINDERBOX# Testname = %s' % name) log('#TINDERBOX# Status = PASSED') log('#TINDERBOX# Time elapsed = %02.2f (seconds)' % value) if options.dryrun: log('- + ' * 15) else: logger('- + ' * 15) return False
2268248f0e4728b63ca1842648cbad866d679472 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/2268248f0e4728b63ca1842648cbad866d679472/rt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 22178, 22016, 14650, 12, 2116, 16, 5441, 16, 7876, 751, 33, 8381, 16, 7666, 33, 23, 16, 1194, 33, 1330, 4672, 3536, 1939, 11850, 813, 7434, 18, 225, 4080, 702, 273, 1109, 1320, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 22178, 22016, 14650, 12, 2116, 16, 5441, 16, 7876, 751, 33, 8381, 16, 7666, 33, 23, 16, 1194, 33, 1330, 4672, 3536, 1939, 11850, 813, 7434, 18, 225, 4080, 702, 273, 1109, 1320, 1...
keys = SSHKey.objects.filter(user__pk=user_id)
keys = SSHKey.objects.filter(user__pk=user_id).order_by("pk")
def keys_ajax_list(request, user_id=None): if request.is_ajax: user = request.user if not (user.is_superuser or user==user_id): return HttpResponseForbidden("Only superuser or owner can get user's SSH keys.") keys = SSHKey.objects.filter(user__pk=user_id) return render_to_response("ssh_keys/ajax_list_response.html", { 'keyslist': keys }, context_instance=RequestContext(request), ) return HttpResponse("Cannot retrieve information")
de7079f3b6ba425af07463ca7c80d015c628b16b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10509/de7079f3b6ba425af07463ca7c80d015c628b16b/users.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1311, 67, 12813, 67, 1098, 12, 2293, 16, 729, 67, 350, 33, 7036, 4672, 309, 590, 18, 291, 67, 12813, 30, 729, 273, 590, 18, 1355, 309, 486, 261, 1355, 18, 291, 67, 9565, 1355, 578, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1311, 67, 12813, 67, 1098, 12, 2293, 16, 729, 67, 350, 33, 7036, 4672, 309, 590, 18, 291, 67, 12813, 30, 729, 273, 590, 18, 1355, 309, 486, 261, 1355, 18, 291, 67, 9565, 1355, 578, ...
return self.popup
child = self.popup.GetChildren()[0] return self.popup, child def setPopupFocusCallback(self, end=False): """Callback for use within wx.CallAfter to prevent focus being set after the control has been removed. """ dprint() popup, child = self.getPopup() if popup.IsShown(): dprint("setting focus") child.SetFocus() def OnGainFocus(self, event): self.hasFocus = True self.Refresh() self.Update() wx.CallAfter(self.setPopupFocusCallback) dprint() def OnLoseFocus(self, event): self.hasFocus = False self.Refresh() self.Update() dprint()
def getPopup(self): if self.popup is None: self.popup = self.GetParent().getNewPopup() # Create the window using the popup as the parent self.window_cb(self.popup, self) return self.popup
dfb0001908470a3c66065d87e9916623f9a610ff /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11522/dfb0001908470a3c66065d87e9916623f9a610ff/springtabs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1689, 556, 416, 12, 2890, 4672, 309, 365, 18, 16086, 353, 599, 30, 365, 18, 16086, 273, 365, 18, 967, 3054, 7675, 588, 1908, 13770, 1435, 225, 468, 1788, 326, 2742, 1450, 326, 10431, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1689, 556, 416, 12, 2890, 4672, 309, 365, 18, 16086, 353, 599, 30, 365, 18, 16086, 273, 365, 18, 967, 3054, 7675, 588, 1908, 13770, 1435, 225, 468, 1788, 326, 2742, 1450, 326, 10431, 4...
if const.MAINCHAIN_ATOM_DICT.has_key(atom.name) is False:
if const.MAINCHAIN_ATOM_DICT.has_key(atm.name) is False:
def calc_include_atom(atm, reject_messages = False): """Filter out atoms from the model which will cause problems or cont contribute to the TLS analysis. """ if atm.position == None: return False if atm.occupancy < 0.1: if reject_messages == True: console.stdoutln("calc_include_atom(%s): rejected because of low occupancy" % (atm)) return False if numpy.trace(atm.get_U()) <= const.TSMALL: if reject_messages == True: console.stdoutln("calc_include_atom(%s): rejected because of small Uiso magnitude " % (atm)) return False elif conf.globalconf.include_atoms == "MAINCHAIN": if const.MAINCHAIN_ATOM_DICT.has_key(atom.name) is False: if reject_messages == True: console.stdoutln("calc_include_atom(%s): rejected non-mainchain atom" % (atm)) return False return True
8a073b457d87aac2cb7a4880ce71c77f6f8f23c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/8a073b457d87aac2cb7a4880ce71c77f6f8f23c9/atom_selection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 67, 6702, 67, 7466, 12, 270, 81, 16, 4925, 67, 6833, 273, 1083, 4672, 3536, 1586, 596, 9006, 628, 326, 938, 1492, 903, 4620, 9688, 578, 466, 356, 887, 358, 326, 8098, 6285, 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, 7029, 67, 6702, 67, 7466, 12, 270, 81, 16, 4925, 67, 6833, 273, 1083, 4672, 3536, 1586, 596, 9006, 628, 326, 938, 1492, 903, 4620, 9688, 578, 466, 356, 887, 358, 326, 8098, 6285, 18, ...
self.assert_(self._box.get_string(key1) == self._template % 1)
self.assertEqual(self._box.get_string(key1), self._template % 1)
def _test_remove_or_delitem(self, method): # (Used by test_remove() and test_delitem().) key0 = self._box.add(self._template % 0) key1 = self._box.add(self._template % 1) self.assertEqual(len(self._box), 2) method(key0) l = len(self._box) self.assert_(l == 1, "actual l: %s" % l) self.assertRaises(KeyError, lambda: self._box[key0]) self.assertRaises(KeyError, lambda: method(key0)) self.assert_(self._box.get_string(key1) == self._template % 1) key2 = self._box.add(self._template % 2) self.assertEqual(len(self._box), 2) method(key2) l = len(self._box) self.assert_(l == 1, "actual l: %s" % l) self.assertRaises(KeyError, lambda: self._box[key2]) self.assertRaises(KeyError, lambda: method(key2)) self.assert_(self._box.get_string(key1) == self._template % 1) method(key1) self.assertEqual(len(self._box), 0) self.assertRaises(KeyError, lambda: self._box[key1]) self.assertRaises(KeyError, lambda: method(key1))
7731c36bc6f787ca91b8429603fe004822f1f2d8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/7731c36bc6f787ca91b8429603fe004822f1f2d8/test_mailbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 67, 4479, 67, 280, 67, 3771, 1726, 12, 2890, 16, 707, 4672, 468, 261, 6668, 635, 1842, 67, 4479, 1435, 471, 1842, 67, 3771, 1726, 7675, 13, 498, 20, 273, 365, 6315, 2147, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3813, 67, 4479, 67, 280, 67, 3771, 1726, 12, 2890, 16, 707, 4672, 468, 261, 6668, 635, 1842, 67, 4479, 1435, 471, 1842, 67, 3771, 1726, 7675, 13, 498, 20, 273, 365, 6315, 2147, ...
Canonicalize(pyobj, sw, comments=self.comments)
Canonicalize(pyobj, sw, unsuppressedPrefixes=unsuppressedPrefixes, comments=self.comments)
def serialize(self, sw, pyobj, name=None, attrtext='', **kw): if not self.wrapped: Canonicalize(pyobj, sw, comments=self.comments) return objid = '%x' % id(pyobj) n = name or self.oname or ('E' + objid) if type(pyobj) in _stringtypes: print >>sw, '<%s%s href="%s"/>' % (n, attrtext, pyobj) elif kw.get('inline', self.inline): self.cb(sw, pyobj) else: print >>sw, '<%s%s href="#%s"/>' % (n, attrtext, objid) sw.AddCallback(self.cb, pyobj)
1460ab4d6d3e9581d168ae904fd5c9a83c05f0cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/1460ab4d6d3e9581d168ae904fd5c9a83c05f0cf/TC.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4472, 12, 2890, 16, 1352, 16, 2395, 2603, 16, 508, 33, 7036, 16, 1604, 955, 2218, 2187, 2826, 9987, 4672, 309, 486, 365, 18, 18704, 30, 19413, 554, 12, 2074, 2603, 16, 1352, 16, 640, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4472, 12, 2890, 16, 1352, 16, 2395, 2603, 16, 508, 33, 7036, 16, 1604, 955, 2218, 2187, 2826, 9987, 4672, 309, 486, 365, 18, 18704, 30, 19413, 554, 12, 2074, 2603, 16, 1352, 16, 640, ...
title, seq = line.split("\t")
try : title, seq = line.split("\t") except : if line.strip() == "" : continue raise ValueError("Each line should have one tab separating the" + \ " title and sequence, this line has %i tabs: %s" \ % (line.count("\t"), repr(line)))
def TabIterator(handle, alphabet = single_letter_alphabet) : """Iterates over tab separated lines (as SeqRecord objects). Each line of the file should contain one tab only, dividing the line into an identifier and the full sequence. handle - input file alphabet - optional alphabet The first field is taken as the record's .id and .name (regardless of any spaces within the text) and the second field is the sequence. """ for line in handle : title, seq = line.split("\t") #will fail if more than one tab! title = title.strip() seq = seq.strip() #removes the trailing new line yield SeqRecord(Seq(seq, alphabet), id = title, name = title)
46c61cf12b194a44647f4729960687771831cfa4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7167/46c61cf12b194a44647f4729960687771831cfa4/TabIO.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9483, 3198, 12, 4110, 16, 10877, 273, 2202, 67, 13449, 67, 287, 8907, 13, 294, 3536, 22051, 1879, 3246, 8936, 2362, 261, 345, 14367, 2115, 2184, 2934, 225, 8315, 980, 434, 326, 585, 1410...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9483, 3198, 12, 4110, 16, 10877, 273, 2202, 67, 13449, 67, 287, 8907, 13, 294, 3536, 22051, 1879, 3246, 8936, 2362, 261, 345, 14367, 2115, 2184, 2934, 225, 8315, 980, 434, 326, 585, 1410...
if options.source_uri: source = options.source_uri
if options.source_url: source = options.source_url
def generate_footer(self): # @@@ Text is hard-coded for now. # Should be made dynamic (language-dependent). options = self.document.options if options.generator or options.datestamp or options.source_link \ or options.source_url: text = [] if options.source_link and options.source or options.source_url: if options.source_uri: source = options.source_uri else: source = utils.relative_uri(options.destination, options.source) text.extend([ nodes.reference('', 'View document source', refuri=source), nodes.Text('. ')]) if options.datestamp: datestamp = time.strftime(options.datestamp, time.gmtime()) text.append(nodes.Text('Generated on: ' + datestamp + '. ')) if options.generator: text.extend([ nodes.Text('Generated by '), nodes.reference('', 'Docutils', refuri= 'http://docutils.sourceforge.net/'), nodes.Text(' from '), nodes.reference('', 'reStructuredText', refuri='http://' 'docutils.sourceforge.net/rst.html'), nodes.Text(' source. ')]) footer = nodes.footer() footer += nodes.paragraph('', '', *text) return footer else: return None
83c8ad41fdba37aff772d97cd622b34e910818d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/83c8ad41fdba37aff772d97cd622b34e910818d8/universal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 14723, 12, 2890, 4672, 468, 22175, 36, 3867, 353, 7877, 17, 24808, 364, 2037, 18, 468, 9363, 506, 7165, 5976, 261, 4923, 17, 10891, 2934, 702, 273, 365, 18, 5457, 18, 2116, 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, 2103, 67, 14723, 12, 2890, 4672, 468, 22175, 36, 3867, 353, 7877, 17, 24808, 364, 2037, 18, 468, 9363, 506, 7165, 5976, 261, 4923, 17, 10891, 2934, 702, 273, 365, 18, 5457, 18, 2116, 3...
return " pre-up iwconfig "+iface+" essid "+config.plugins.wlan.hiddenessid.value+"\n pre-up /usr/sbin/wpa_supplicant -i"+iface+" -c/etc/wpa_supplicant.conf -B -dd -Dmadwifi\n post-down wpa_cli terminate" return " pre-up iwconfig "+iface+" essid "+config.plugins.wlan.essid.value+"\n pre-up /usr/sbin/wpa_supplicant -i"+iface+" -c/etc/wpa_supplicant.conf -B -dd -Dmadwifi\n post-down wpa_cli terminate"
if ' ' in config.plugins.wlan.hiddenessid.value: return ' pre-up iwconfig '+iface+' essid "'+config.plugins.wlan.hiddenessid.value+'"\n pre-up /usr/sbin/wpa_supplicant -i'+iface+' -c/etc/wpa_supplicant.conf -B -dd -Dmadwifi\n post-down wpa_cli terminate' else: return ' pre-up iwconfig '+iface+' essid '+config.plugins.wlan.hiddenessid.value+'\n pre-up /usr/sbin/wpa_supplicant -i'+iface+' -c/etc/wpa_supplicant.conf -B -dd -Dmadwifi\n post-down wpa_cli terminate' else: if ' ' in config.plugins.wlan.essid.value: return ' pre-up iwconfig '+iface+' essid "'+config.plugins.wlan.essid.value+'"\n pre-up /usr/sbin/wpa_supplicant -i'+iface+' -c/etc/wpa_supplicant.conf -B -dd -Dmadwifi\n post-down wpa_cli terminate' else: return ' pre-up iwconfig '+iface+' essid '+config.plugins.wlan.essid.value+'\n pre-up /usr/sbin/wpa_supplicant -i'+iface+' -c/etc/wpa_supplicant.conf -B -dd -Dmadwifi\n post-down wpa_cli terminate'
def configStrings(iface): driver = iNetwork.detectWlanModule() print "WLAN-MODULE",driver if driver == 'ralink': return " pre-up /usr/sbin/wpa_supplicant -i"+iface+" -c/etc/wpa_supplicant.conf -B -Dralink\n post-down wpa_cli terminate" if driver == 'madwifi': if config.plugins.wlan.essid.value == "hidden...": return " pre-up iwconfig "+iface+" essid "+config.plugins.wlan.hiddenessid.value+"\n pre-up /usr/sbin/wpa_supplicant -i"+iface+" -c/etc/wpa_supplicant.conf -B -dd -Dmadwifi\n post-down wpa_cli terminate" return " pre-up iwconfig "+iface+" essid "+config.plugins.wlan.essid.value+"\n pre-up /usr/sbin/wpa_supplicant -i"+iface+" -c/etc/wpa_supplicant.conf -B -dd -Dmadwifi\n post-down wpa_cli terminate" if driver == 'zydas': return " pre-up /usr/sbin/wpa_supplicant -i"+iface+" -c/etc/wpa_supplicant.conf -B -dd -Dzydas\n post-down wpa_cli terminate"
4e08450f3d15c875231a264dfeec4fa0bcfa8997 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6652/4e08450f3d15c875231a264dfeec4fa0bcfa8997/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 642, 7957, 12, 31479, 4672, 3419, 273, 277, 3906, 18, 16518, 59, 6115, 3120, 1435, 1172, 315, 59, 11074, 17, 12194, 3113, 7407, 309, 3419, 422, 296, 86, 16194, 4278, 327, 315, 202, 1484,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 642, 7957, 12, 31479, 4672, 3419, 273, 277, 3906, 18, 16518, 59, 6115, 3120, 1435, 1172, 315, 59, 11074, 17, 12194, 3113, 7407, 309, 3419, 422, 296, 86, 16194, 4278, 327, 315, 202, 1484,...
vx[x] = "%%-%is" % vx[x]
vx[x] = fmtfunc(vx[x])
def make_table(list, fx, fy, fz, sortx=None, sorty=None): vx = {} vy = {} vz = {} l = 0 for e in list: xx = str(fx(e)) yy = str(fy(e)) zz = str(fz(e)) l = max(len(yy),l) vx[xx] = max(vx.get(xx,0), len(xx), len(zz)) vy[yy] = None vz[(xx,yy)] = zz vxk = vx.keys() vyk = vy.keys() if sortx: vxk.sort(sortx) else: vxk.sort() if sorty: vyk.sort(sorty) else: vyk.sort() fmt = "%%-%is" % l print fmt % "", for x in vxk: vx[x] = "%%-%is" % vx[x] print vx[x] % x, print for y in vyk: print fmt % y, for x in vxk: print vx[x] % vz.get((x,y), "-"), print
5954052c846097b5372c106718d2b41ea1e89a60 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/5954052c846097b5372c106718d2b41ea1e89a60/scapy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 2121, 12, 1098, 16, 12661, 16, 28356, 16, 284, 94, 16, 1524, 92, 33, 7036, 16, 1524, 93, 33, 7036, 4672, 17911, 273, 2618, 24993, 273, 2618, 24856, 273, 2618, 328, 273, 374, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 2121, 12, 1098, 16, 12661, 16, 28356, 16, 284, 94, 16, 1524, 92, 33, 7036, 16, 1524, 93, 33, 7036, 4672, 17911, 273, 2618, 24993, 273, 2618, 24856, 273, 2618, 328, 273, 374, ...
repnum_matches_repl_str[repnum_match.start()] = preprint_repnum_standardised_categs[categ] + numeration_match
repnum_matches_repl_str[repnum_match.start()] = \ preprint_repnum_standardised_categs[categ] \ + numeration_match
def _by_len(a, b): """Comparison function used to sort a list by the length of the strings in each element of the list. """ if len(a[1]) < len(b[1]): return 1 elif len(a[1]) == len(b[1]): return 0 else: return -1
afd852f45332d11ac027b8d47ce1a922ce7f2cc6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/afd852f45332d11ac027b8d47ce1a922ce7f2cc6/refextract.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1637, 67, 1897, 12, 69, 16, 324, 4672, 3536, 16059, 445, 1399, 358, 1524, 279, 666, 635, 326, 769, 434, 326, 2064, 316, 1517, 930, 434, 326, 666, 18, 3536, 309, 562, 12, 69, 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, 389, 1637, 67, 1897, 12, 69, 16, 324, 4672, 3536, 16059, 445, 1399, 358, 1524, 279, 666, 635, 326, 769, 434, 326, 2064, 316, 1517, 930, 434, 326, 666, 18, 3536, 309, 562, 12, 69, 63,...
self.btnHide = QtGui.QToolButton(self) self.btnHide.setText("Hide") self.btnHide.setCheckable(True) self.connect(self.btnHide, QtCore.SIGNAL("clicked(bool)"), self.hideChannel) layout.addWidget(self.btnHide, 1, 0)
def __init__(self, number, parent=None, name=""): QtGui.QWidget.__init__(self, parent) layout = QtGui.QGridLayout(self) self.number = number if name is not "": name = " (%s)" % name self.lbl = QtGui.QLabel("Ch. %i\n%s" % (self.number, name), self) layout.addWidget(self.lbl, 0, 0, 1, 2)
4d84dfa73e69c0a0249a7a781ad4f97417b02c0e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11526/4d84dfa73e69c0a0249a7a781ad4f97417b02c0e/matrixmixer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1300, 16, 982, 33, 7036, 16, 508, 1546, 6, 4672, 23425, 18, 53, 4609, 16186, 2738, 972, 12, 2890, 16, 982, 13, 3511, 273, 23425, 18, 53, 6313, 3744, 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, 1001, 2738, 972, 12, 2890, 16, 1300, 16, 982, 33, 7036, 16, 508, 1546, 6, 4672, 23425, 18, 53, 4609, 16186, 2738, 972, 12, 2890, 16, 982, 13, 3511, 273, 23425, 18, 53, 6313, 3744, 12...
ct.sequenceNum
ct.sequenceNum, e._Label_key
def collateResults (self):
4a7303d9450b9421704bf8f984bb762c92631b18 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/536/4a7303d9450b9421704bf8f984bb762c92631b18/vocabulary_gatherer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4508, 340, 3447, 261, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4508, 340, 3447, 261, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
libraries=['amos','toms','c_misc','cephes','mach', 'cdf', 'specfun'],
libraries=['sc_amos','sc_toms','sc_c_misc','sc_cephes','sc_mach', 'sc_cdf', 'sc_specfun'],
def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('special', parent_package, top_path) define_macros = [] if sys.platform=='win32':
23ae9977267f9c38304c633798ed014516310694 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/23ae9977267f9c38304c633798ed014516310694/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1664, 12, 2938, 67, 5610, 2218, 2187, 3669, 67, 803, 33, 7036, 4672, 628, 3972, 18, 4413, 5471, 18, 23667, 67, 1367, 1930, 4659, 642, 273, 4659, 2668, 9371, 2187, 982, 67, 5610, 16, 17...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1664, 12, 2938, 67, 5610, 2218, 2187, 3669, 67, 803, 33, 7036, 4672, 628, 3972, 18, 4413, 5471, 18, 23667, 67, 1367, 1930, 4659, 642, 273, 4659, 2668, 9371, 2187, 982, 67, 5610, 16, 17...
self.hashmod = sha
self.hashmod = _sha
def __init__(self, credentials, host, request_uri, headers, response, content, http): Authentication.__init__(self, credentials, host, request_uri, headers, response, content, http) challenge = _parse_www_authenticate(response, 'www-authenticate') self.challenge = challenge['hmacdigest'] # TODO: self.challenge['domain'] self.challenge['reason'] = self.challenge.get('reason', 'unauthorized') if self.challenge['reason'] not in ['unauthorized', 'integrity']: self.challenge['reason'] = 'unauthorized' self.challenge['salt'] = self.challenge.get('salt', '') if not self.challenge.get('snonce'): raise UnimplementedHmacDigestAuthOptionError( _("The challenge doesn't contain a server nonce, or this one is empty.")) self.challenge['algorithm'] = self.challenge.get('algorithm', 'HMAC-SHA-1') if self.challenge['algorithm'] not in ['HMAC-SHA-1', 'HMAC-MD5']: raise UnimplementedHmacDigestAuthOptionError( _("Unsupported value for algorithm: %s." % self.challenge['algorithm'])) self.challenge['pw-algorithm'] = self.challenge.get('pw-algorithm', 'SHA-1') if self.challenge['pw-algorithm'] not in ['SHA-1', 'MD5']: raise UnimplementedHmacDigestAuthOptionError( _("Unsupported value for pw-algorithm: %s." % self.challenge['pw-algorithm'])) if self.challenge['algorithm'] == 'HMAC-MD5': self.hashmod = md5 else: self.hashmod = sha if self.challenge['pw-algorithm'] == 'MD5': self.pwhashmod = md5 else: self.pwhashmod = sha self.key = "".join([self.credentials[0], ":", self.pwhashmod.new("".join([self.credentials[1], self.challenge['salt']])).hexdigest().lower(), ":", self.challenge['realm'] ]) self.key = self.pwhashmod.new(self.key).hexdigest().lower()
0bb9ecff53d99f9937cdf070dadbfb564adb2683 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13138/0bb9ecff53d99f9937cdf070dadbfb564adb2683/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4448, 16, 1479, 16, 590, 67, 1650, 16, 1607, 16, 766, 16, 913, 16, 1062, 4672, 8665, 16186, 2738, 972, 12, 2890, 16, 4448, 16, 1479, 16, 590, 67, 1650,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4448, 16, 1479, 16, 590, 67, 1650, 16, 1607, 16, 766, 16, 913, 16, 1062, 4672, 8665, 16186, 2738, 972, 12, 2890, 16, 4448, 16, 1479, 16, 590, 67, 1650,...
self._digest_auth_handler.add_password(self.REALM, self.URL,
self.proxy_digest_handler.add_password(self.REALM, self.URL,
def test_proxy_qop_auth_works(self): self._digest_auth_handler.add_password(self.REALM, self.URL, self.USER, self.PASSWD) FakeProxyHandler.digest_auth_handler.set_qop("auth") result = self.opener.open(self.URL) while result.read(): pass result.close()
5ca1d2f6c2e5d52b6cfc2a93de4179cc0779e42a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/5ca1d2f6c2e5d52b6cfc2a93de4179cc0779e42a/test_urllib2_localnet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5656, 67, 85, 556, 67, 1944, 67, 18597, 12, 2890, 4672, 365, 18, 5656, 67, 10171, 67, 4176, 18, 1289, 67, 3664, 12, 2890, 18, 31052, 49, 16, 365, 18, 1785, 16, 365, 18, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5656, 67, 85, 556, 67, 1944, 67, 18597, 12, 2890, 4672, 365, 18, 5656, 67, 10171, 67, 4176, 18, 1289, 67, 3664, 12, 2890, 18, 31052, 49, 16, 365, 18, 1785, 16, 365, 18, 4...
if type == "used-by": usedByDeps(depsLogConf) elif type == "using": usingDeps(depsLogConf)
if type in ("used-by", "using"): logDeps(depsLogConf, type)
def usingDeps(depsLogConf):
9fe10b42be513df41053afa53e91b1f58d06af21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/9fe10b42be513df41053afa53e91b1f58d06af21/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1450, 14430, 12, 14877, 1343, 3976, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1450, 14430, 12, 14877, 1343, 3976, 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, ...
wx.Frame.__init__(self, None, -1, VERSION)
wx.Frame.__init__(self, None, -1, VERSION, style=wx.SYSTEM_MENU)
def __init__(self): """ Creates pose editor window. """ wx.Frame.__init__(self, None, -1, VERSION) #, wx.SYSTEM_MENU)
9cc9c52377b604adeb3eae500ecd625feb2faad2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9859/9cc9c52377b604adeb3eae500ecd625feb2faad2/PyPose.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 3536, 10210, 26948, 4858, 2742, 18, 3536, 7075, 18, 3219, 16186, 2738, 972, 12, 2890, 16, 599, 16, 300, 21, 16, 8456, 16, 2154, 33, 27226, 18, 14318, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 3536, 10210, 26948, 4858, 2742, 18, 3536, 7075, 18, 3219, 16186, 2738, 972, 12, 2890, 16, 599, 16, 300, 21, 16, 8456, 16, 2154, 33, 27226, 18, 14318, 6...
raise RuntimeError("%r could not be fetched" % ((title, revid), ))
print "WARNING: %r could not be fetched" % ((title, revid),)
def _sanity_check(self): seen = self.fsout.seen for title, revid in self.pages: if revid is not None: if revid in seen: continue
cd55a4182e5b7efb0da03b636b969d7a2ba705f4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12391/cd55a4182e5b7efb0da03b636b969d7a2ba705f4/fetch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 87, 10417, 67, 1893, 12, 2890, 4672, 5881, 273, 365, 18, 2556, 659, 18, 15156, 364, 2077, 16, 283, 1246, 316, 365, 18, 7267, 30, 309, 283, 1246, 353, 486, 599, 30, 309, 283, 124...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 87, 10417, 67, 1893, 12, 2890, 4672, 5881, 273, 365, 18, 2556, 659, 18, 15156, 364, 2077, 16, 283, 1246, 316, 365, 18, 7267, 30, 309, 283, 1246, 353, 486, 599, 30, 309, 283, 124...
print node
def factor(self, nodelist): elt = nodelist[0] t = elt[0] print "source", nodelist[-1] node = self.com_node(nodelist[-1]) # need to handle (unary op)constant here... if t == token.PLUS: node = UnaryAdd(node) node.lineno = elt[2] elif t == token.MINUS: print node node = UnarySub(node) node.lineno = elt[2] elif t == token.TILDE: node = Invert(node) node.lineno = elt[2] return node
8d0ffe0126f301338625fe7402d3c4c4b617a449 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8d0ffe0126f301338625fe7402d3c4c4b617a449/transformer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5578, 12, 2890, 16, 30068, 4672, 11572, 273, 30068, 63, 20, 65, 268, 273, 11572, 63, 20, 65, 1172, 315, 3168, 3113, 30068, 18919, 21, 65, 756, 273, 365, 18, 832, 67, 2159, 12, 82, 24...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5578, 12, 2890, 16, 30068, 4672, 11572, 273, 30068, 63, 20, 65, 268, 273, 11572, 63, 20, 65, 1172, 315, 3168, 3113, 30068, 18919, 21, 65, 756, 273, 365, 18, 832, 67, 2159, 12, 82, 24...
print "Sending Dtella state to IRC..."
LOG.info( "Sending Dtella state to IRC..." )
def sendState(self): osm = self.main.osm assert (self.readytosend and osm and osm.syncd)
94194b78b83de3d89b6ffd035804de2c82bbaff0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4752/94194b78b83de3d89b6ffd035804de2c82bbaff0/dtella_bridgeserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 1119, 12, 2890, 4672, 225, 1140, 81, 273, 365, 18, 5254, 18, 538, 81, 1815, 261, 2890, 18, 1672, 14627, 409, 471, 1140, 81, 471, 1140, 81, 18, 8389, 72, 13, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 1119, 12, 2890, 4672, 225, 1140, 81, 273, 365, 18, 5254, 18, 538, 81, 1815, 261, 2890, 18, 1672, 14627, 409, 471, 1140, 81, 471, 1140, 81, 18, 8389, 72, 13, 2, -100, -100, -100...
current = ruleset.after(current) if inclusive and (before is not None) and (before in ruleset):
current = next_in_ruleset() if inclusive and (before is not None) and (current == before):
def iterRecurrenceIDs(): if after is not None: if (exact or (inclusive and (after <= start))): if after in ruleset: yield after
d454d67fdd769001a100d9473f6dcbb3248ed6b1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/d454d67fdd769001a100d9473f6dcbb3248ed6b1/Calendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 426, 17131, 5103, 13332, 309, 1839, 353, 486, 599, 30, 309, 261, 17165, 578, 261, 267, 9173, 471, 261, 5205, 1648, 787, 3719, 4672, 309, 1839, 316, 25303, 30, 2824, 1839, 2, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1400, 426, 17131, 5103, 13332, 309, 1839, 353, 486, 599, 30, 309, 261, 17165, 578, 261, 267, 9173, 471, 261, 5205, 1648, 787, 3719, 4672, 309, 1839, 316, 25303, 30, 2824, 1839, 2, -100, ...
hklout = os.path.join( self.get_working_directory(), os.path.split(hklin)[-1].replace('.mtz', '_rdx.mtz'))
def _scale_prepare(self): '''Perform all of the preparation required to deliver the scaled data. This should sort together the reflection files, ensure that they are correctly indexed (via pointless) and generally tidy things up.'''
7752bb71d7ae5b94e428baff550671a5c7af970a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3290/7752bb71d7ae5b94e428baff550671a5c7af970a/CCP4ScalerImplementation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5864, 67, 9366, 12, 2890, 4672, 9163, 4990, 777, 434, 326, 31981, 1931, 358, 11795, 326, 12304, 501, 18, 1220, 1410, 1524, 9475, 326, 5463, 1390, 16, 3387, 716, 2898, 854, 8783, 880...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 5864, 67, 9366, 12, 2890, 4672, 9163, 4990, 777, 434, 326, 31981, 1931, 358, 11795, 326, 12304, 501, 18, 1220, 1410, 1524, 9475, 326, 5463, 1390, 16, 3387, 716, 2898, 854, 8783, 880...
if not (row and column):
if (row is None or column is None):
def cell(self, coordinate=None, row=None, column=None): """Returns a cell object based on the given coordinates.
acf65b630652b6a419bb06a2fbd860744dbf4c51 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13008/acf65b630652b6a419bb06a2fbd860744dbf4c51/worksheet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2484, 12, 2890, 16, 7799, 33, 7036, 16, 1027, 33, 7036, 16, 1057, 33, 7036, 4672, 3536, 1356, 279, 2484, 733, 2511, 603, 326, 864, 5513, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2484, 12, 2890, 16, 7799, 33, 7036, 16, 1027, 33, 7036, 16, 1057, 33, 7036, 4672, 3536, 1356, 279, 2484, 733, 2511, 603, 326, 864, 5513, 18, 2, -100, -100, -100, -100, -100, -100, -100...
type = selected_tab_list.type
tab_type = selected_tab_list.type
def select_display_for_tabs(self, selected_tab_list, selected_tabs): """Select a display to show in the right-hand side. """ if (selected_tab_list is self.selected_tab_list and selected_tabs == self.selected_tabs and len(self.display_stack) > 0 and isinstance(self.display_stack[-1], TabDisplay)): logging.debug('not reselecting') return
8b9a3f4dfba5989d296d22657facbc6d61718af5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/8b9a3f4dfba5989d296d22657facbc6d61718af5/displays.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 67, 5417, 67, 1884, 67, 16056, 12, 2890, 16, 3170, 67, 7032, 67, 1098, 16, 3170, 67, 16056, 4672, 3536, 3391, 279, 2562, 358, 2405, 316, 326, 2145, 17, 2349, 4889, 18, 225, 3536,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 67, 5417, 67, 1884, 67, 16056, 12, 2890, 16, 3170, 67, 7032, 67, 1098, 16, 3170, 67, 16056, 4672, 3536, 3391, 279, 2562, 358, 2405, 316, 326, 2145, 17, 2349, 4889, 18, 225, 3536,...
send_viewfile(pagename, request)
send_viewfile(orig_pagename, request)
def _do_view(pagename, request): _ = request.getText orig_pagename = pagename pagename, filename, fpath = _access_file(pagename, request) if not request.user.may.read(pagename): return _('You are not allowed to view attachments of this page.') if not filename: return # send header & title request.emit_http_headers() # Use user interface language for this generated page request.setContentLanguage(request.lang) title = _('attachment:%(filename)s of %(pagename)s') % { 'filename': filename, 'pagename': pagename} request.theme.send_title(title, pagename=pagename) # send body request.write(request.formatter.startContent()) send_viewfile(pagename, request) send_uploadform(pagename, request) request.write(request.formatter.endContent()) request.theme.send_footer(pagename) request.theme.send_closing_html()
6149c0c2efa5634fb7963ae1facd7d07fd6277e9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/6149c0c2efa5634fb7963ae1facd7d07fd6277e9/AttachFile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 1945, 12, 9095, 1069, 16, 590, 4672, 389, 273, 590, 18, 588, 1528, 225, 1647, 67, 9095, 1069, 273, 4262, 1069, 4262, 1069, 16, 1544, 16, 13543, 273, 389, 3860, 67, 768, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2896, 67, 1945, 12, 9095, 1069, 16, 590, 4672, 389, 273, 590, 18, 588, 1528, 225, 1647, 67, 9095, 1069, 273, 4262, 1069, 4262, 1069, 16, 1544, 16, 13543, 273, 389, 3860, 67, 768, ...
if rawQueueStats.get('counters:deletes_unprocessed_priority'): deletes_unprocessed_priority = long(struct.unpack('>q', rawQueueStats['counters:deletes_unprocessed_priority'])[0]) else:
def get_queue_statistics(self): """ Get a set of statistics from the HBase metrics table regarding processing queues """ aggStats = {} rawQueueStats = self._make_row_nice(self.client.getRow('metrics', 'crash_report_queues')[0]) if rawQueueStats.get('counters:inserts_unprocessed_legacy'): inserts_unprocessed_legacy = long(struct.unpack('>q', rawQueueStats['counters:inserts_unprocessed_legacy'])[0]) else: inserts_unprocessed_legacy = 0 if rawQueueStats.get('counters:deletes_unprocessed_legacy'): deletes_unprocessed_legacy = long(struct.unpack('>q', rawQueueStats['counters:deletes_unprocessed_legacy'])[0]) else: deletes_unprocessed_legacy = 0 if rawQueueStats.get('counters:inserts_unprocessed_priority'): inserts_unprocessed_priority = long(struct.unpack('>q', rawQueueStats['counters:inserts_unprocessed_priority'])[0]) else: inserts_unprocessed_priority = 0 if rawQueueStats.get('counters:deletes_unprocessed_priority'): deletes_unprocessed_priority = long(struct.unpack('>q', rawQueueStats['counters:deletes_unprocessed_priority'])[0]) else: deletes_unprocessed_priority = 0 if rawQueueStats.get('counters:inserts_unprocessed'): inserts_unprocessed = long(struct.unpack('>q', rawQueueStats['counters:inserts_unprocessed'])[0]) else: inserts_unprocessed = 0 if rawQueueStats.get('counters:deletes_unprocessed'): deletes_unprocessed = long(struct.unpack('>q', rawQueueStats['counters:deletes_unprocessed'])[0]) else: deletes_unprocessed = 0 if rawQueueStats.get('counters:inserts_processed_legacy'): inserts_processed_legacy = long(struct.unpack('>q', rawQueueStats['counters:inserts_processed_legacy'])[0]) else: inserts_processed_legacy = 0 if rawQueueStats.get('counters:deletes_processed_legacy'): deletes_processed_legacy = long(struct.unpack('>q', rawQueueStats['counters:deletes_processed_legacy'])[0]) else: deletes_processed_legacy = 0 if rawQueueStats.get('counters:inserts_processed_priority'): inserts_processed_priority = long(struct.unpack('>q', rawQueueStats['counters:inserts_processed_priority'])[0]) else: inserts_processed_priority = 0 if rawQueueStats.get('counters:deletes_processed_priority'): deletes_processed_priority = long(struct.unpack('>q', rawQueueStats['counters:deletes_processed_priority'])[0]) else: deletes_processed_priority = 0
cadce30658d3300f051172e443dbfa5ec78d5b7e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12383/cadce30658d3300f051172e443dbfa5ec78d5b7e/hbaseClient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4000, 67, 14438, 12, 2890, 4672, 3536, 968, 279, 444, 434, 7691, 628, 326, 30265, 4309, 1014, 29012, 4929, 11897, 3536, 10421, 4195, 273, 2618, 1831, 3183, 4195, 273, 365, 6315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4000, 67, 14438, 12, 2890, 4672, 3536, 968, 279, 444, 434, 7691, 628, 326, 30265, 4309, 1014, 29012, 4929, 11897, 3536, 10421, 4195, 273, 2618, 1831, 3183, 4195, 273, 365, 6315, ...
parts = ctype.split('/') if len(parts) > 1: return ctype.split('/')[1] return failobj
if ctype.count('/') <> 1: return failobj return ctype.split('/')[1] def get_content_type(self): """Returns the message's content type. The returned string is coerced to lowercase and returned as a ingle string of the form `maintype/subtype'. If there was no Content-Type: header in the message, the default type as give by get_default_type() will be returned. Since messages always have a default type this will always return a value. The current state of RFC standards define a message's default type to be text/plain unless it appears inside a multipart/digest container, in which case it would be message/rfc822. """ missing = [] value = self.get('content-type', missing) if value is missing: return self.get_default_type() return paramre.split(value)[0].lower().strip() def get_content_maintype(self): """Returns the message's main content type. This is the `maintype' part of the string returned by get_content_type(). If no slash is found in the full content type, a ValueError is raised. """ ctype = self.get_content_type() if ctype.count('/') <> 1: raise ValueError, 'No maintype found in: %s' % ctype return ctype.split('/')[0] def get_content_subtype(self): """Returns the message's sub content type. This is the `subtype' part of the string returned by get_content_type(). If no slash is found in the full content type, a ValueError is raised. """ ctype = self.get_content_type() if ctype.count('/') <> 1: raise ValueError, 'No subtype found in: %s' % ctype return ctype.split('/')[1]
def get_subtype(self, failobj=None): """Return the message's content subtype if present.""" missing = [] ctype = self.get_type(missing) if ctype is missing: return failobj parts = ctype.split('/') if len(parts) > 1: return ctype.split('/')[1] return failobj
8b6fb51a00b698e73dce077dd98e026502b96e90 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8b6fb51a00b698e73dce077dd98e026502b96e90/Message.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 21974, 12, 2890, 16, 2321, 2603, 33, 7036, 4672, 3536, 990, 326, 883, 1807, 913, 12308, 309, 3430, 12123, 3315, 273, 5378, 11920, 273, 365, 18, 588, 67, 723, 12, 7337, 13, 309...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 21974, 12, 2890, 16, 2321, 2603, 33, 7036, 4672, 3536, 990, 326, 883, 1807, 913, 12308, 309, 3430, 12123, 3315, 273, 5378, 11920, 273, 365, 18, 588, 67, 723, 12, 7337, 13, 309...
entry, _, subentry = string.partition('!') add_entry(entry, subentry)
entry, _, subentry = string.partition(';') add_entry(entry.strip(), subentry.strip())
def add_entry(word, subword, dic=new): entry = dic.get(word) if not entry: dic[word] = entry = [[], {}] if subword: add_entry(subword, '', dic=entry[1]) else: entry[0].append(builder.get_relative_uri('genindex.rst', fn) + '#' + tid)
32aa42f067ff1677a239369612493a8f9fe138a6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5532/32aa42f067ff1677a239369612493a8f9fe138a6/environment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 4099, 12, 1095, 16, 720, 1095, 16, 11681, 33, 2704, 4672, 1241, 273, 11681, 18, 588, 12, 1095, 13, 309, 486, 1241, 30, 11681, 63, 1095, 65, 273, 1241, 273, 12167, 6487, 2618, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 4099, 12, 1095, 16, 720, 1095, 16, 11681, 33, 2704, 4672, 1241, 273, 11681, 18, 588, 12, 1095, 13, 309, 486, 1241, 30, 11681, 63, 1095, 65, 273, 1241, 273, 12167, 6487, 2618, ...
if s == "":
if s == b"":
def read(self, size=None): L = [self._buf] avail = len(self._buf) while size is None or avail < size: s = self._read() if s == "": break L.append(s) avail += len(s) all = "".join(L) if size is None: self._buf = "" return all else: self._buf = all[size:] return all[:size]
910e3e908837b13bd6a1f027c67fbdbdd3646dc3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/910e3e908837b13bd6a1f027c67fbdbdd3646dc3/httplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 963, 33, 7036, 4672, 511, 273, 306, 2890, 6315, 4385, 65, 15783, 273, 562, 12, 2890, 6315, 4385, 13, 1323, 963, 353, 599, 578, 15783, 411, 963, 30, 272, 273, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 963, 33, 7036, 4672, 511, 273, 306, 2890, 6315, 4385, 65, 15783, 273, 562, 12, 2890, 6315, 4385, 13, 1323, 963, 353, 599, 578, 15783, 411, 963, 30, 272, 273, 365, ...
if prefix and tcode.lower() != prefix and tcode.lower().startswith(prefix):
if (use_prefix and prefix and tcode.lower() != prefix and tcode.lower().startswith(prefix)):
def typecode(typename, prefix=''): """create a typecode (eg. GTK_TYPE_WIDGET) from a typename""" tcode = to_upper_str(typename) if prefix and tcode.lower() != prefix and tcode.lower().startswith(prefix): l = len(prefix) tcode = tcode[:l] + '_TYPE' + tcode[l:] else: tcode = tcode.replace('_', '_TYPE_', 1) return tcode
e857558ac6c8557b27e204d09917eff7eecdbddb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8659/e857558ac6c8557b27e204d09917eff7eecdbddb/defsgen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 618, 710, 12, 12846, 1069, 16, 1633, 2218, 11, 4672, 3536, 2640, 279, 618, 710, 261, 1332, 18, 19688, 47, 67, 2399, 67, 59, 734, 3264, 13, 628, 279, 26735, 8395, 268, 710, 273, 358, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 618, 710, 12, 12846, 1069, 16, 1633, 2218, 11, 4672, 3536, 2640, 279, 618, 710, 261, 1332, 18, 19688, 47, 67, 2399, 67, 59, 734, 3264, 13, 628, 279, 26735, 8395, 268, 710, 273, 358, ...
f = polynomial_ring.PolynomialRing(QQ)(1) for g, _ in self.charpoly('x').factor():
f = polynomial_ring.PolynomialRing(QQ, var)(1) for g, _ in self.charpoly(var).factor():
def minpoly(self): # The minimal polynomial is square-free and # divisible by same irreducible factors as # the characteristic polynomial. # TODO: factoring to find the square-free part is idiotic. # Instead use a GCD algorithm! f = polynomial_ring.PolynomialRing(QQ)(1) for g, _ in self.charpoly('x').factor(): f *= g return f
1614e389236e95f6e8ba8256aa39a87cc276abcd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/1614e389236e95f6e8ba8256aa39a87cc276abcd/number_field_element.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1131, 16353, 12, 2890, 4672, 468, 1021, 16745, 16991, 353, 8576, 17, 9156, 471, 468, 3739, 18932, 635, 1967, 9482, 1118, 5286, 1523, 14490, 487, 468, 326, 23158, 16991, 18, 468, 2660, 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, 1131, 16353, 12, 2890, 4672, 468, 1021, 16745, 16991, 353, 8576, 17, 9156, 471, 468, 3739, 18932, 635, 1967, 9482, 1118, 5286, 1523, 14490, 487, 468, 326, 23158, 16991, 18, 468, 2660, 30, ...
if ctype == type_formencoded:
if ctype.startswith(type_formencoded):
def content_type(self): """ Returns the content type of the request in all cases where it is different than a submitted form - application/x-www-form-urlencoded """ type_formencoded = "application/x-www-form-urlencoded"
a304b275abf1124e48075e3bd9e3c67d58d5b9ef /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2150/a304b275abf1124e48075e3bd9e3c67d58d5b9ef/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 913, 67, 723, 12, 2890, 4672, 3536, 2860, 326, 913, 618, 434, 326, 590, 316, 777, 6088, 1625, 518, 353, 3775, 2353, 279, 9638, 646, 300, 2521, 19, 92, 17, 5591, 17, 687, 17, 19690, 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 913, 67, 723, 12, 2890, 4672, 3536, 2860, 326, 913, 618, 434, 326, 590, 316, 777, 6088, 1625, 518, 353, 3775, 2353, 279, 9638, 646, 300, 2521, 19, 92, 17, 5591, 17, 687, 17, 19690, 3...
The URLs are dict's keys, and values are lists of tuples where each tuple
The URLs are dictionary keys, and values are lists of tuples where each tuple
def run(self): linkChecker = LinkChecker(self.url) try: ok, message = linkChecker.check() except: wikipedia.output('Exception while processing URL %s in page %s' % (self.url, self.page.title())) raise if ok: if self.history.setLinkAlive(self.url): wikipedia.output('*Link to %s in [[%s]] is back alive.' % (self.url, self.page.title())) else: wikipedia.output('*[[%s]] links to %s - %s.' % (self.page.title(), self.url, message)) self.history.setLinkDead(self.url, message, self.page)
b75e298300f474241a491b06dd262b1be42dbba5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/b75e298300f474241a491b06dd262b1be42dbba5/weblinkchecker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1692, 8847, 273, 4048, 8847, 12, 2890, 18, 718, 13, 775, 30, 1529, 16, 883, 273, 1692, 8847, 18, 1893, 1435, 1335, 30, 21137, 18, 2844, 2668, 503, 1323, 4929, 197...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1692, 8847, 273, 4048, 8847, 12, 2890, 18, 718, 13, 775, 30, 1529, 16, 883, 273, 1692, 8847, 18, 1893, 1435, 1335, 30, 21137, 18, 2844, 2668, 503, 1323, 4929, 197...
stddev = '%s_stddev' % field[1] avg = entry['%s_avg' % field[1]] annotations = {stddev:DirectionalStdDev(field[1], avg=avg)} if avg != None: bin_where_clause = ['%s=%s AND %s=%s' % (x_aggregate,x,y_aggregate,y), 'NOT %s IS NULL' % field[1] ] stddev_query = self.querySet.extra(where=bin_where_clause) \ .annotate(**annotations) \ .values(*annotations.keys()) stddev_query.query.group_by = [] for k, v in stddev_query[0].items(): bin[k] = v if v else 0
if avg: torsion_avgs[field[0]]['%s%s' % (x,y)] = bin[avg]
def __init__(self, xSize, ySize, xPadding, yPadding, xOffset, yOffset, xMin, xMax, yMin, yMax, xbin, ybin, xText, yText, ref, residue_attribute, residue_xproperty, residue_yproperty, querySet, color='green'): self.color = color
a7c1765b838eed185e2608027c5244bf969f328f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6163/a7c1765b838eed185e2608027c5244bf969f328f/ConfDistFuncs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 619, 1225, 16, 677, 1225, 16, 619, 9485, 16, 677, 9485, 16, 619, 2335, 16, 677, 2335, 16, 619, 2930, 16, 619, 2747, 16, 677, 2930, 16, 677, 2747, 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, 1001, 2738, 972, 12, 2890, 16, 619, 1225, 16, 677, 1225, 16, 619, 9485, 16, 677, 9485, 16, 619, 2335, 16, 677, 2335, 16, 619, 2930, 16, 619, 2747, 16, 677, 2930, 16, 677, 2747, 16, ...
old_parent = self.get_parent()
try: old_parent = self.get_parent() except ObjectNotFoundError: old_parent = None
def expire(self): self.confirm_db_thread() if self.has_parent(): old_parent = self.get_parent() else: old_parent = None if not fileutil.exists(self.filename): # item whose file has been deleted outside of Miro self.remove() elif self.has_parent(): self.make_deleted() else: # external item that the user deleted in Miro url = self.get_feed_url() if url.startswith("dtv:manualFeed") or url.startswith("dtv:singleFeed"): self.remove() else: self.make_deleted() if old_parent is not None and old_parent.getChildren().count() == 0: old_parent.expire()
8aba529f606b0f247e7ce7701e84a3002ea6913f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/8aba529f606b0f247e7ce7701e84a3002ea6913f/item.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6930, 12, 2890, 4672, 365, 18, 10927, 67, 1966, 67, 5930, 1435, 309, 365, 18, 5332, 67, 2938, 13332, 282, 775, 30, 1592, 67, 2938, 273, 365, 18, 588, 67, 2938, 1435, 1335, 1033, 13276,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6930, 12, 2890, 4672, 365, 18, 10927, 67, 1966, 67, 5930, 1435, 309, 365, 18, 5332, 67, 2938, 13332, 282, 775, 30, 1592, 67, 2938, 273, 365, 18, 588, 67, 2938, 1435, 1335, 1033, 13276,...
Ncoeff = L * unoccc
Ncoeff = L * unocc
def step(self, dX, updaterot=True, updatecoeff=True): """ dX is (A, dC) where U->Uexp(-A) and C->C+dC """ Nw = self.nwannier Nk = self.Nk M_k = self.fixedstates_k L_k = self.edf_k if updaterot: A_kww = dX[:Nk * Nw**2].reshape(Nk, Nw, Nw) for U, A in zip(self.U_kww, A_kww): H = -1.j * A.conj() epsilon, Z = npy.linalg.eigh(H) # Z contains the eigenvectors as COLUMNS. # Since H = iA, dU = exp(-A) = exp(iH) = ZDZ^d dU = npy.dot(Z * npy.exp(1.j * epsilon), dag(Z)) U[:] = npy.dot(U, dU)
f533fa4eb440364639e5cf289acd1ca787f4be42 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5735/f533fa4eb440364639e5cf289acd1ca787f4be42/wannier.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2235, 12, 2890, 16, 302, 60, 16, 7760, 352, 33, 5510, 16, 1089, 18132, 33, 5510, 4672, 3536, 302, 60, 353, 261, 37, 16, 302, 39, 13, 1625, 587, 2122, 57, 2749, 19236, 37, 13, 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, 2235, 12, 2890, 16, 302, 60, 16, 7760, 352, 33, 5510, 16, 1089, 18132, 33, 5510, 4672, 3536, 302, 60, 353, 261, 37, 16, 302, 39, 13, 1625, 587, 2122, 57, 2749, 19236, 37, 13, 471, ...
def __init__(self, host, port = NNTP_PORT):
def __init__(self, host, port = NNTP_PORT, user=None, password=None):
def __init__(self, host, port = NNTP_PORT): self.host = host self.port = port self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.sock.connect(self.host, self.port) self.file = self.sock.makefile('rb') self.debugging = 0 self.welcome = self.getresp()
39c675a70dab47f6fcfea2517365163e7fe7e4b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/39c675a70dab47f6fcfea2517365163e7fe7e4b2/nntplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1479, 16, 1756, 273, 423, 1784, 52, 67, 6354, 16, 729, 33, 7036, 16, 2201, 33, 7036, 4672, 365, 18, 2564, 273, 1479, 365, 18, 655, 273, 1756, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1479, 16, 1756, 273, 423, 1784, 52, 67, 6354, 16, 729, 33, 7036, 16, 2201, 33, 7036, 4672, 365, 18, 2564, 273, 1479, 365, 18, 655, 273, 1756, 365, 18, ...
jigsAngleActionText = "<u><b>Measure Angle Jig</b></u></b></p><br>"\
jigsAngleActionText = "<u><b>Measure Angle Jig</b></u><br>"\
def createWhatsThis(self): ############################################## # File Toolbar ############################################## #### Open File #### fileOpenText = "<u><b>Open File</b></u> (Ctrl + O)</b></p><br> "\ "<p><img source=\"fileopen\"><br> "\ "Opens a new file."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "fileopen", self.fileOpenAction.iconSet().pixmap() ) self.fileOpenAction.setWhatsThis( fileOpenText ) #### Save File #### fileSaveText = "<u><b>Save File</b></u> (Ctrl + S)</b></p><br> "\ "<p><img source=\"filesave\"><br> "\ "Saves the current file."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "filesave", self.fileSaveAction.iconSet().pixmap() ) self.fileSaveAction.setWhatsThis( fileSaveText ) ############################################## # Edit Toolbar ############################################## #### Make Checkpoint ### editMakeCheckpointText = "<u><b>Make Checkpoint</b></u>"\ "<p><img source=\"editMakeCheckpoint\"><br> "\ "Make Undo checkpoint."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "editMakeCheckpoint", self.editMakeCheckpointAction.iconSet().pixmap() ) self.editMakeCheckpointAction.setWhatsThis( editMakeCheckpointText ) #### Automatic Checkpointing ### [minor changes, bruce 060319] editAutoCheckpointingText = "<u><b>Automatic Checkpointing</b></u>"\ "<p>Enables/Disables <b>Automatic Checkpointing</b>. When enabled, the program "\ "maintains the Undo stack automatically. When disabled, the user is required to "\ "manually create Undo checkpoints using the <b>Make Checkpoint</b> button: </p>"\ "<p><img source=\"editMakeCheckpoint\"></p>"\ "<p><b>Automatic Checkpointing</b> can impact program performance. By disabling "\ "Automatic Checkpointing, the program will run faster.</p>"\ "<p><b><i>Remember that you must make your own Undo checkpoints manually when "\ "Automatic Checkpointing is disabled.</i></b>"\ "</p>" self.editAutoCheckpointingAction.setWhatsThis( editAutoCheckpointingText ) #### Clear Undo Stack ### [minor changes, bruce 060319] editClearUndoStackText = "<u><b>Clear Undo Stack</b></u>"\ "<p>Clears all checkpoints on the Undo and Redo stacks, freeing up memory."\ "</p>" self.editClearUndoStackAction.setWhatsThis( editClearUndoStackText ) #### Undo #### editUndoText = "<u><b>Undo</b></u> (Ctrl + Z)</b></p><br> "\ "<p><img source=\"editUndo\"><br> "\ "Reverses the last edit or command which changed structure or selection. "\ "<br><font color=\"#808080\">"\ "Known bug: the link to wiki help for Undo "\ "only works if you got this popup from the Edit menu item for Undo, "\ "not from the Undo toolbutton."\ "</font>"\ "</p>" #bruce 060317 revised this text to reflect what it does in A7; 060320 added 1421-not-fixed warning QMimeSourceFactory.defaultFactory().setPixmap( "editUndo", self.editUndoAction.iconSet().pixmap() ) self.editUndoAction.setWhatsThis( editUndoText ) self.editUndoText = editUndoText #bruce 060317 to help fix bug 1421 in Undo whatsthis wiki help link #### Redo #### import platform if platform.is_macintosh(): redo_accel = "(Ctrl + Shift + Z)" # note: this is further modified (Ctrl -> Cmd) by other code # changing this is partly redundant with code in undo*.py, but as of 060317 it's desirable in editRedoText too else: redo_accel = "(Ctrl + Y)" editRedoText = "<u><b>Redo</b></u> %s</b></p><br> "\ "<p><img source=\"editRedo\"> <br>"\ "Restores a change which was undone using the Undo command."\ "<br><font color=\"#808080\">"\ "Known bug: the link to wiki help for Redo "\ "only works if you got this popup from the Edit menu item for Redo, "\ "not from the Redo toolbutton."\ "</font>"\ "</p>" % redo_accel #bruce 060317 revised this text to be more accurate, and split out redo_accel; 060320 added 1421-not-fixed warning QMimeSourceFactory.defaultFactory().setPixmap( "editRedo", self.editRedoAction.iconSet().pixmap() ) self.editRedoAction.setWhatsThis( editRedoText ) self.editRedoText = editRedoText #bruce 060317 to help fix bug 1421 in Redo whatsthis wiki help link #### Cut #### editCutText = "<u><b>Cut</b></u> (Ctrl + X)</b></p><br> "\ "<p><img source=\"editCut\"><br> "\ "Removes the selected object(s) and stores the cut data on the"\ "clipboard."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "editCut", self.editCutAction.iconSet().pixmap() ) self.editCutAction.setWhatsThis( editCutText ) #### Copy #### editCopyText = "<u><b>Copy</b></u> (Ctrl + C)</b></p><br> "\ "<p><img source=\"editCopy\"><br> "\ "Places a copy of the selected chunk(s) on the clipboard "\ "while leaving the original chunk(s) unaffected."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "editCopy", self.editCopyAction.iconSet().pixmap() ) self.editCopyAction.setWhatsThis( editCopyText ) #### Paste #### editPasteText = "<u><b>Paste</b></u> (Ctrl + V)</b></p><br> "\ "<p><img source=\"editPaste\"><br> "\ "<b>Paste</b> places the user in <b>Build</b> mode where copied chunks on "\ "the clipboard can be pasted into the model by double clicking in empty space. "\ "If the current clipboard chunk has a <b><i>hotspot</i></b>, it can be bonded to "\ "another chunk by single clicking on one of the chunk's bondpoints."\ "</p>"\ "<p>A <b><i>Hotspot</i></b> is a green bondpoint on a clipboard chunk indicating "\ "it will be the active bondpoint which will connect to another chunk's bondpoint. "\ "To specify a hotspot on the clipboard chunk, click on one of its bondpoints in the "\ "<b><i>MMKit's Thumbview</i></b>."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "editPaste", self.editPasteAction.iconSet().pixmap() ) self.editPasteAction.setWhatsThis( editPasteText ) #### Delete #### editDeleteText = "<u><b>Delete</b></u> (DEL)</b></p><br> "\ "<p><img source=\"editDelete\"><br> "\ "Deletes the selected object(s). "\ "For this Alpha release, deleted objects may be permanently lost, or they might be recoverable using Undo.</p>" #bruce 060212 revised above text (and fixed spelling error); should be revised again before A7 release QMimeSourceFactory.defaultFactory().setPixmap( "editDelete", self.editDeleteAction.iconSet().pixmap() ) self.editDeleteAction.setWhatsThis( editDeleteText ) ############################################## # View Toolbar ############################################## #### Home View #### setViewHomeActionText = "<u><b>Home</b></u> (Home)<br>"\ "<p><img source=\"setViewHome\"><br> "\ "When you create a new model, it appears in a default view orientation (FRONT view). When you open an existing model, it appears in the orientation it was last saved. You can change the default orientation by selecting <b>Set Home View to Current View</b> from the <b>View</b> menu.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewHome", self.setViewHomeAction.iconSet().pixmap() ) self.setViewHomeAction.setWhatsThis( setViewHomeActionText ) #### Fit to Window #### setViewFitToWindowActionText = "<u><b>Fit To Window</b></u><br>"\ "<p><img source=\"setViewFitToWindow\"><br> "\ "Refits the model to the screen so you can view the entire model."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewFitToWindow", self.setViewFitToWindowAction.iconSet().pixmap() ) self.setViewFitToWindowAction.setWhatsThis( setViewFitToWindowActionText ) #### Recenter #### setViewRecenterActionText = "<u><b>Recenter</b></u><br>"\ "<p><img source=\"setViewRecenter\"><br> "\ "Changes the view center and zoom factor so that the origin is in the "\ "center of the view and you can view the entire model."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewRecenter", self.setViewRecenterAction.iconSet().pixmap() ) self.setViewRecenterAction.setWhatsThis( setViewRecenterActionText ) #### Zoom Tool #### setzoomToolActionText = "<u><b>Zoom Tool</b></u><br>"\ "<p><img source=\"setzoomTool\"><br> "\ "Allows the user to zoom into a specific area of the model by specifying a rectangular area. "\ "This is done by holding down the left button and dragging the mouse.</p>"\ "<p>A mouse with a mouse wheel can also be used to zoom in and out "\ "at any time, without using the Zoom Tool.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setzoomTool", self.zoomToolAction.iconSet().pixmap() ) self.zoomToolAction.setWhatsThis( setzoomToolActionText ) #### Pan Tool #### setpanToolActionText = "<u><b>Pan Tool</b></u><br>"\ "<p><img source=\"setpanTool\"><br> "\ "Allows X-Y panning using the left mouse button.</p>"\ "<p>Users with a 3-button mouse can pan the model at any time by pressing "\ "the middle mouse button while holding down the Shift key.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setpanTool", self.panToolAction.iconSet().pixmap() ) self.panToolAction.setWhatsThis( setpanToolActionText ) #### Rotate Tool #### setrotateToolActionText = "<u><b>Rotate Tool</b></u><br>"\ "<p><img source=\"setrotateTool\"><br> "\ "Allows free rotation using the left mouse button.</p>"\ "<p>Users with a 3-button mouse can rotate the model at any time by pressing "\ "the middle mouse button and dragging the mouse.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setrotateTool", self.rotateToolAction.iconSet().pixmap() ) self.rotateToolAction.setWhatsThis( setrotateToolActionText ) #### Orthographic Projection #### setViewOrthoActionText = "<u><b>Orthographic Projection</b></u><br>"\ "<p>Sets nonperspective (or parallel) projection, with no foreshortening."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewOrtho", self.setViewOrthoAction.iconSet().pixmap() ) self.setViewOrthoAction.setWhatsThis( setViewOrthoActionText ) #### Perspective Projection #### setViewPerspecActionText = "<u><b>Perspective Projection</b></u><br>"\ "<p>Set perspective projection, drawing objects slightly larger "\ "that are closer to the viewer."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewPerspec", self.setViewPerspecAction.iconSet().pixmap() ) self.setViewPerspecAction.setWhatsThis( setViewPerspecActionText ) #### Normal To #### setViewNormalToActionText = "<u><b>Set View Normal To</b></u><br>"\ "<p><img source=\"setViewNormalTo\"><br> "\ "Orients view to the normal vector of the plane defined by "\ "3 or more selected atoms, or a jig's axis."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewNormalTo", self.setViewNormalToAction.iconSet().pixmap() ) self.setViewNormalToAction.setWhatsThis( setViewNormalToActionText ) #### Parallel To #### setViewParallelToActionText = "<u><b>Set View Parallel To</b></u><br>"\ "<p><img source=\"setViewParallelTo\"><br> "\ "Orients view parallel to the vector defined by 2 selected atoms."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewParallelTo", self.setViewParallelToAction.iconSet().pixmap() ) self.setViewParallelToAction.setWhatsThis( setViewParallelToActionText ) #### Save Named View #### saveNamedViewActionText = "<u><b>Save Named View</b></u><br>"\ "<p><img source=\"saveNamedView\"><br> "\ "Saves the current view as a custom <b>named view</b> and places it in the Model Tree.</p>" \ "<p>The view can be restored by selecting <b>Change View</b> from its context menu in the Model Tree."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "saveNamedView", self.saveNamedViewAction.iconSet().pixmap() ) self.saveNamedViewAction.setWhatsThis( saveNamedViewActionText ) #### Front View #### setViewFrontActionText = "<u><b>Front View</b></u><br>"\ "<p><img source=\"setViewFront\"><br> "\ "Orients the view to the Front View."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewFront", self.setViewFrontAction.iconSet().pixmap() ) self.setViewFrontAction.setWhatsThis( setViewFrontActionText ) #### Back View #### setViewBackActionText = "<u><b>Back View</b></u><br>"\ "<p><img source=\"setViewBack\"><br> "\ "Orients the view to the Back View."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewBack", self.setViewBackAction.iconSet().pixmap() ) self.setViewBackAction.setWhatsThis( setViewBackActionText ) #### Top View #### setViewTopActionText = "<u><b>Top View</b></u><br>"\ "<p><img source=\"setViewTop\"><br> "\ "Orients the view to the Top View."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewTop", self.setViewTopAction.iconSet().pixmap() ) self.setViewTopAction.setWhatsThis( setViewTopActionText ) #### Bottom View #### setViewBottomActionText = "<u><b>Bottom View</b></u><br>"\ "<p><img source=\"setViewBottom\"><br> "\ "Orients the view to the Bottom View."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewBottom", self.setViewBottomAction.iconSet().pixmap() ) self.setViewBottomAction.setWhatsThis( setViewBottomActionText ) #### Left View #### setViewLeftActionText = "<u><b>Left View</b></u><br>"\ "<p><img source=\"setViewLeft\"><br> "\ "Orients the view to the Left View."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewLeft", self.setViewLeftAction.iconSet().pixmap() ) self.setViewLeftAction.setWhatsThis( setViewLeftActionText ) #### Right View #### setViewRightActionText = "<u><b>Right View</b></u><br>"\ "<p><img source=\"setViewRight\"><br> "\ "Orients the view to the Right View."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewRight", self.setViewRightAction.iconSet().pixmap() ) self.setViewRightAction.setWhatsThis( setViewRightActionText ) #### Rotate View 180 #### setViewOppositeActionText = "<u><b>Rotate View 180</b></u><br>"\ "<p><img source=\"setViewOpposite\"><br> "\ "Rotates the view 180 degrees."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewOpposite", self.setViewOppositeAction.iconSet().pixmap() ) self.setViewOppositeAction.setWhatsThis( setViewOppositeActionText ) #### Rotate View +90 #### setViewPlus90ActionText = "<u><b>Rotate View +90</b></u><br>"\ "<p><img source=\"setViewPlus90\"><br> "\ "Increment the current view by 90 degrees around the vertical axis."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewPlus90", self.setViewPlus90Action.iconSet().pixmap() ) self.setViewPlus90Action.setWhatsThis( setViewPlus90ActionText ) #### Rotate View -90 #### setViewMinus90ActionText = "<u><b>Rotate View -90</b></u><br>"\ "<p><img source=\"setViewMinus90\"><br> "\ "Decrement the current view by 90 degrees around the vertical axis."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewMinus90", self.setViewMinus90Action.iconSet().pixmap() ) self.setViewMinus90Action.setWhatsThis( setViewMinus90ActionText ) ############################################## # Grids Toolbar ############################################## #### Surface 100 #### orient100ActionText = "<u><b>Surface 100</b></u><br>"\ "<p><img source=\"orient100Action\"><br> "\ "Reorients the view to the nearest angle that would "\ "look straight into a (1,0,0) surface of a diamond lattice."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "orient100Action", self.orient100Action.iconSet().pixmap() ) self.orient100Action.setWhatsThis(orient100ActionText ) #### Surface 110 #### orient110ActionText = "<u><b>Surface 110</b></u><br>"\ "<p><img source=\"orient110Action\"><br> "\ "Reorients the view to the nearest angle that would "\ "look straight into a (1,1,0) surface of a diamond lattice."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "orient110Action", self.orient110Action.iconSet().pixmap() ) self.orient110Action.setWhatsThis(orient110ActionText ) #### Surface 111 #### orient111ActionText = "<u><b>Surface 111</b></u><br>"\ "<p><img source=\"orient111Action\"><br> "\ "Reorients the view to the nearest angle that would "\ "look straight into a (1,1,1) surface of a diamond lattice."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "orient111Action", self.orient111Action.iconSet().pixmap() ) self.orient111Action.setWhatsThis(orient111ActionText ) ############################################## # Molecular Display toolbar ############################################## #### Display Default #### dispDefaultActionText = "<u><b>Display Default</b></u><br>"\ "<p><img source=\"dispDefaultAction\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Default</b> , rendering them in the <b>Current Display Mode</b>."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to the <b>Default Display Mode</b>. " \ "All chunks with their display setting set to <b>Default</b> will be rendered in the "\ "<b>Default Display Mode</b>."\ "</p>"\ "<p>The <b>Default Display Mode</b> can be changed via the "\ "<b>Edit > Preferences</b> menu and selecting the <b>General</b> tab."\ "</p>"\ "<p>The <b>Current or Default Display Mode</b> is displayed in the status bar in the "\ "lower right corner of the main window."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "dispDefaultAction", self.dispDefaultAction.iconSet().pixmap() ) self.dispDefaultAction.setWhatsThis(dispDefaultActionText ) #### Display Invisible #### dispInvisActionText = "<u><b>Display Invisible</b></u><br>"\ "<p><img source=\"dispInvisAction\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Invisible</b>, making them invisible."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Invisible</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "dispInvisAction", self.dispInvisAction.iconSet().pixmap() ) self.dispInvisAction.setWhatsThis(dispInvisActionText ) #### Display Lines #### dispLinesActionText = "<u><b>Display Lines</b></u><br>"\ "<p><img source=\"dispLinesAction\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ " <b>Lines</b>. Only bonds are rendered as colored lines."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Lines</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "dispLinesAction", self.dispLinesAction.iconSet().pixmap() ) self.dispLinesAction.setWhatsThis(dispLinesActionText ) #### Display Tubes #### dispTubesActionText = "<u><b>Display Tubes</b></u><br>"\ "<p><img source=\"dispTubesAction\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Tubes</b>. Atoms and bonds are rendered as colored tubes."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Tubes</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "dispTubesAction", self.dispTubesAction.iconSet().pixmap() ) self.dispTubesAction.setWhatsThis(dispTubesActionText ) #### Display Ball and Stick (was CPK) #### dispCPKActionText = "<u><b>Display Ball and Stick</b></u><br>"\ "<p><img source=\"dispCPKAction\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Ball and Stick</b> mode. Atoms are rendered "\ "as spheres and bonds are rendered as narrow cylinders."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Ball and Stick</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>"\ "<p>The scale of the spheres and cylinders can be changed from the "\ "<b>Atoms</b> and <b>Bonds</b> pages of the <b>Preferences</b> dialog."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "dispCPKAction", self.dispCPKAction.iconSet().pixmap() ) self.dispCPKAction.setWhatsThis(dispCPKActionText ) #### Display CPK (was VdW) #### [bruce extended and slightly corrected text, 060307] dispVdWActionText = "<u><b>Display CPK</b></u><br>"\ "<p><img source=\"dispVdWAction\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>CPK</b> mode. Atoms are rendered as spheres with "\ "a size equal to 0.78 of their VdW radius, corresponding "\ "to a contact force of approximately 0.1 nN with neighboring "\ "nonbonded atoms. Bonds are not rendered."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>CPK</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>"\ "<p>The scale of the spheres can be changed from the "\ "<b>Atoms</b> and <b>Bonds</b> pages of the <b>Preferences</b> dialog."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "dispVdWAction", self.dispVdWAction.iconSet().pixmap() ) self.dispVdWAction.setWhatsThis(dispVdWActionText ) ############################################## # Select toolbar ############################################## #### Select All #### selectAllActionText = "<u><b>Select All</b></u> (Ctrl + A)</b></p><br>"\ "<p><img source=\"selectAllAction\"><br> "\ "During <b>Select Atoms</b> mode, this will select all the atoms in "\ "the model. Otherwise, this will select all the chunks in the model."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "selectAllAction", self.selectAllAction.iconSet().pixmap() ) self.selectAllAction.setWhatsThis(selectAllActionText ) #### Select None #### selectNoneActionText = "<u><b>Select None</b></u></p><br>"\ "<p><img source=\"selectNoneAction\"><br> "\ "Unselects everything currently selected.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "selectNoneAction", self.selectNoneAction.iconSet().pixmap() ) self.selectNoneAction.setWhatsThis(selectNoneActionText ) #### Invert Selection #### selectInvertActionText = "<u><b>Invert Selection</b></u> <br> (Ctrl + Shift + I)</b></p><br>"\ "<p><img source=\"selectInvertAction\"><br> "\ "Inverts the current selection.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "selectInvertAction", self.selectInvertAction.iconSet().pixmap() ) self.selectInvertAction.setWhatsThis(selectInvertActionText ) #### Select Connected #### selectConnectedActionText = "<u><b>Select Connected</b></u> (Ctrl + Shift + C)</b></p><br>"\ "<p><img source=\"selectConnectedAction\"><br> "\ "Selects all the atoms that can be reached by the currently selected atom "\ "via an unbroken chain of bonds. </p>"\ "<p>To use this feature, you must first be in "\ "<b>Select Atoms</b> mode and select at least one atom.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "selectConnectedAction", self.selectConnectedAction.iconSet().pixmap() ) self.selectConnectedAction.setWhatsThis(selectConnectedActionText ) #### Select Doubly #### selectDoublyActionText = "<u><b>Select Doubly</b></u></b></p><br>"\ "<p><img source=\"selectDoublyAction\"><br> "\ "Selects all the atoms that can be reached from a currently selected "\ "atom through two disjoint unbroken chains of bonds. Atoms singly "\ "connected to this group and unconnected to anything else are also "\ "included in the selection.</p>"\ "<p>To use this feature, you must first be in "\ "<b>Select Atoms</b> mode and select at least one atom.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "selectDoublyAction", self.selectDoublyAction.iconSet().pixmap() ) self.selectDoublyAction.setWhatsThis(selectDoublyActionText ) #### Expand Selection #### selectExpandActionText = "<u><b>Expand Selection</b></u> (Ctrl + D)</b></p><br>"\ "<p><img source=\"selectExpandAction\"><br> "\ "Selects any atom that is a neighbor of a currently selected atom."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "selectExpandAction", self.selectExpandAction.iconSet().pixmap() ) self.selectExpandAction.setWhatsThis(selectExpandActionText ) #### Contract Selection #### selectContractActionText = "<u><b>Contract Selection</b></u> (Ctrl + Shift + D)</b></p><br>"\ "<p><img source=\"selectContractAction\"><br> "\ "Deselects any atom that is a neighbor of a non-picked atom or has a bondpoint."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "selectContractAction", self.selectContractAction.iconSet().pixmap() ) self.selectContractAction.setWhatsThis(selectContractActionText ) ############################################## # Modify Toolbar ############################################## #### Minimize Selection #### modifyMinimizeSelActionText = "<u><b>Minimize Selection</b></u> (Ctrl + M)</b></p><br>"\ "<p><img source=\"modifyMinimizeSelAction\"><br> "\ "Arranges the atoms (<i>of the current selection</i>) to their chemically stable point of "\ "equilibrium in reference to the other atoms in the structure."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "modifyMinimizeSelAction", self.modifyMinimizeSelAction.iconSet().pixmap() ) self.modifyMinimizeSelAction.setWhatsThis(modifyMinimizeSelActionText ) #### Minimize All #### modifyMinimizeAllActionText = "<u><b>Minimize All</b></u></p><br>"\ "<p><img source=\"modifyMinimizeAllAction\"><br> "\ "Arranges the atoms (<i>of the entire part</i>) to their chemically stable point of "\ "equilibrium in reference to the other atoms in the structure."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "modifyMinimizeAllAction", self.modifyMinimizeAllAction.iconSet().pixmap() ) self.modifyMinimizeAllAction.setWhatsThis(modifyMinimizeAllActionText ) #### Hydrogenate #### modifyHydrogenateActionText = "<u><b>Hydrogenate</b></u> </b></p><br>"\ "<p><img source=\"modifyHydrogenateAction\"><br> "\ "Adds hydrogen atoms to all the bondpoints in the selection.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "modifyHydrogenateAction", self.modifyHydrogenateAction.iconSet().pixmap() ) self.modifyHydrogenateAction.setWhatsThis(modifyHydrogenateActionText ) #### Dehydrogenate #### modifyDehydrogenateActionText = "<u><b>Dehydrogenate</b></u><br>"\ "<p><img source=\"modifyDehydrogenateAction\"><br> "\ "Removes all hydrogen atoms from the selection.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "modifyDehydrogenateAction", self.modifyDehydrogenateAction.iconSet().pixmap() ) self.modifyDehydrogenateAction.setWhatsThis(modifyDehydrogenateActionText ) #### Passivate #### modifyPassivateActionText = "<u><b>Passivate</b></u> (Ctrl + P)</b></p><br>"\ "<p><img source=\"modifyPassivateAction\"><br> "\ "Changes the types of incompletely bonded atoms to atoms with the "\ "right number of bonds, using atoms with the best atomic radius."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "modifyPassivateAction", self.modifyPassivateAction.iconSet().pixmap() ) self.modifyPassivateAction.setWhatsThis(modifyPassivateActionText ) #### Stretch #### modifyStretchActionText = "<u><b>Stretch</b></u><br>"\ "<p><img source=\"modifyStretchAction\"><br> "\ "Stretches the bonds of the selected chunk(s).</p>" QMimeSourceFactory.defaultFactory().setPixmap( "modifyStretchAction", self.modifyStretchAction.iconSet().pixmap() ) self.modifyStretchAction.setWhatsThis(modifyStretchActionText ) #### Delete Bonds #### modifyDeleteBondsActionText = "<u><b>Delete Bonds</b></u><br>"\ "<p><img source=\"modifyDeleteBondsAction\"><br> "\ "Delete all bonds between selected and unselected atoms or chunks.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "modifyDeleteBondsAction", self.modifyDeleteBondsAction.iconSet().pixmap() ) self.modifyDeleteBondsAction.setWhatsThis(modifyDeleteBondsActionText ) #### Separate #### modifySeparateActionText = "<u><b>Separate</b></u><br>"\ "<p><img source=\"modifySeparateAction\"><br> "\ "Creates a new chunk from the currently selected atoms.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "modifySeparateAction", self.modifySeparateAction.iconSet().pixmap() ) self.modifySeparateAction.setWhatsThis(modifySeparateActionText ) #### Merge Chunks #### modifyMergeActionText = "<u><b>Merge Chunks</b></u><br>"\ "<p><img source=\"modifyMergeAction\"><br> "\ "Merges two or more chunks into a single chunk.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "modifyMergeAction", self.modifyMergeAction.iconSet().pixmap() ) self.modifyMergeAction.setWhatsThis(modifyMergeActionText ) #### Invert Chunks #### modifyInvertActionText = "<u><b>Invert</b></u><br>"\ "<p><img source=\"modifyInvertAction\"><br> "\ "Inverts the atoms of the selected chunks.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "modifyInvertAction", self.modifyInvertAction.iconSet().pixmap() ) self.modifyInvertAction.setWhatsThis(modifyInvertActionText ) #### Align to Common Axis #### modifyAlignCommonAxisActionText = "<u><b>Align To Common Axis</b></u><br>"\ "<p><img source=\"modifyAlignCommonAxis\"><br> "\ "Aligns one or more chunks to the axis of the first selected chunk."\ "You must select two or more chunks before using this feature."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "modifyAlignCommonAxis", self. modifyAlignCommonAxisAction.iconSet().pixmap() ) self. modifyAlignCommonAxisAction.setWhatsThis( modifyAlignCommonAxisActionText ) ############################################## # Tools Toolbar ############################################## #### Select Chunks #### toolsSelectMoleculesActionText = "<u><b>Select Chunks</b></u><!-- [[Feature:Select Chunks Mode]] --><br>"\ "<p><img source=\" toolsSelectMoleculesAction\"><br> "\ "<b>Select Chunks</b> allows you to select/unselect chunks with the mouse.</p>"\ "<p><b><u>Mouse/Key Combinations</u></b></p>"\ "<p><b>Left Click/Drag</b> - selects a chunk(s).</p>"\ "<p><b>Ctrl+Left Click/Drag</b> - removes chunk(s) from selection.</p>"\ "<p><b>Shift+Left Click/Drag</b> - adds chunk(s) to selection."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( " toolsSelectMoleculesAction", self. toolsSelectMoleculesAction.iconSet().pixmap() ) self. toolsSelectMoleculesAction.setWhatsThis( toolsSelectMoleculesActionText ) #### Select Atoms #### toolsSelectAtomsActionText = "<u><b>Select Atoms</b></u><!-- [[Feature:Select Atoms Mode]] --><br>"\ "<p><img source=\" toolsSelectAtomsAction\"><br> "\ "<b>Select Atoms</b> allows you to select/unselect atoms with the mouse.</p>"\ "<p><b><u>Mouse/Key Combinations</u></b></p>"\ "<p><b>Left Click/Drag</b> - selects an atom(s).</p>"\ "<p><b>Ctrl+Left Click/Drag</b> - removes atom(s) from selection.</p>"\ "<p><b>Shift+Left Click/Drag</b> - adds atom(s) to selection."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( " toolsSelectAtomsAction", self. toolsSelectAtomsAction.iconSet().pixmap() ) self. toolsSelectAtomsAction.setWhatsThis( toolsSelectAtomsActionText ) #### Move Chunks #### toolsMoveMoleculeActionText = "<u><b>Move Chunks</b></u><!-- [[Feature:Move Chunks Mode]] --><br>"\ "<p><img source=\" toolsMoveMoleculeAction\"><br> "\ "Activates <b>Move Chunks</b> mode, allowing you to select, "\ "move and rotate one of more chunks with the mouse.</p>"\ "<p><b><u>Mouse/Key Combinations</u></b></p>"\ "<p><b>Left Drag</b> - moves the selected chunk(s).</p>"\ "<p><b>Ctrl+Left Drag</b> - freely rotates selected chunk(s).</p>"\ "<p><b>Shift+Left Drag</b> - constrained movement and rotation of a chunk about its own axis."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( " toolsMoveMoleculeAction", self. toolsMoveMoleculeAction.iconSet().pixmap() ) self. toolsMoveMoleculeAction.setWhatsThis( toolsMoveMoleculeActionText ) #### Build Atoms Tool #### toolsDepositAtomActionText = "<u><b>Build Tool</b></u><!-- [[Feature:Build Mode]] --><br>"\ "<p><img source=\" toolsDepositAtomAction\"><br> "\ "<b>Build Mode</b> allows you to build structures by depositing objects "\ "from the Molecular Modeling Kit, including atoms, clipboard objects and parts "\ "from the nanoENGINEER-1 Library.</p>"\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( " toolsDepositAtomAction", self. toolsDepositAtomAction.iconSet().pixmap() ) self. toolsDepositAtomAction.setWhatsThis( toolsDepositAtomActionText ) #### Cookie Cutter #### toolsCookieCutActionText = "<u><b>Cookie Cutter Tool</b></u><!-- [[Feature:Cookie Cutter Mode]] --><br>"\ "<p><><img source=\" toolsCookieCutAction\"><br> "\ "Activates <b>Cookie Cutter</b> mode, allowing you to cut out 3-D shapes from a "\ "slab of diamond or lonsdaleite lattice.</p>" QMimeSourceFactory.defaultFactory().setPixmap( " toolsCookieCutAction", self. toolsCookieCutAction.iconSet().pixmap() ) self. toolsCookieCutAction.setWhatsThis( toolsCookieCutActionText ) #### Extrude Tool #### toolsExtrudeActionText = "<u><b>Extrude Tool</b></u><!-- [[Feature:Extrude Mode]] --><br>"\ "<p><img source=\" toolsExtrudeAction\"><br> "\ "Activates <b>Extrude</b> mode, allowing you to create a rod or ring using a chunk as "\ "a repeating unit.</p>" QMimeSourceFactory.defaultFactory().setPixmap( " toolsExtrudeAction", self. toolsExtrudeAction.iconSet().pixmap() ) self. toolsExtrudeAction.setWhatsThis( toolsExtrudeActionText ) #### Fuse Chunks Tool #### toolsFuseChunksActionText = "<u><b>Fuse Chunks Tool</b></u><!-- [[Feature:Fuse Chunks Mode]] --><br>"\ "<p><img source=\" toolsFuseChunksAction\"><br> "\ "<b>Fuse Chunks</b> can be used to interactively join two or more "\ "chunks by dragging chunks around and fusing them together. "\ "Two types of fusing are supported:<br><br>"\ "<b>Make Bonds</b> creates bonds between the existing bondpoints) "\ "of two or more chunks. Bonds are drawn (and undrawn) as chunks "\ "are moved together (and apart).<br><br>"\ "<b>Fuse Atoms</b> fuses overlapping atoms between chunks. Overlapping "\ "pairs of atoms are highlighted in green and blue to indicate which atoms "\ "will be fused.<br>"\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( " toolsFuseChunksAction", self. toolsFuseChunksAction.iconSet().pixmap() ) self.toolsFuseChunksAction.setWhatsThis( toolsFuseChunksActionText ) #### Fuse Atoms Tool #### toolsFuseAtomsActionText = "<u><b>Fuse Atoms Tool</b></u><!-- [[Feature:Fuse Atoms Mode]] (nim?) --><br>"\ "<p><img source=\" toolsFuseAtomsAction\"><br> "\ "<b>Fuse Atoms</b> fuses the overlapping atoms between two or more chunks.</p>" QMimeSourceFactory.defaultFactory().setPixmap( " toolsFuseAtomsAction", self. toolsFuseAtomsAction.iconSet().pixmap() ) self.toolsFuseAtomsAction.setWhatsThis( toolsFuseAtomsActionText ) #### Movie Player #### simMoviePlayerActionText = "<u><b>Movie Player</b></u><br>"\ "<p><img source=\" simMoviePlayerAction\"><br> "\ "Plays the most recent trajectory (movie) file created by the <b>Simulator</b>.</p>" QMimeSourceFactory.defaultFactory().setPixmap( " simMoviePlayerAction", self. simMoviePlayerAction.iconSet().pixmap() ) self. simMoviePlayerAction.setWhatsThis( simMoviePlayerActionText ) #### Simulator #### simSetupActionText = "<u><b>Simulator</b></u><br>"\ "<p><img source=\" simSetupAction\"><br> "\ "Creates a trajectory (movie) file by calculating the inter-atomic potentials and bonding "\ "of the entire model. The user determines the number of frames in the movie, the time step, "\ "and the temperature for the simulation.</p>" QMimeSourceFactory.defaultFactory().setPixmap( " simSetupAction", self. simSetupAction.iconSet().pixmap() ) self. simSetupAction.setWhatsThis( simSetupActionText ) #### Plot Tool #### simPlotToolActionText = "<u><b>Plot Tool</b></u><br>"\ "<p><img source=\" simPlotToolAction\"><br> "\ "Plots a simulator trace file using GNUplot. A simulation must be run to create "\ "the trace file, and the part must have a jig that writes output to the trace file. <br><br>"\ "The following list of jigs write data to the trace file:<br>"\ "<b>Rotary Motors:</b> speed (GHz) and torque (nn-nm)<br>"\ "<b>Linear Motors:</b> displacement (pm)<br>"\ "<b>Anchors:</b> torque (nn-nm)<br>"\ "<b>Thermostats:</b> energy added (zJ)<br>"\ "<b>Thermometer:</b> temperature (K)<br>"\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( " simPlotToolAction", self. simPlotToolAction.iconSet().pixmap() ) self. simPlotToolAction.setWhatsThis( simPlotToolActionText ) ############################################## # Dashboard Buttons ############################################## #### Done #### toolsDoneActionText = "<u><b>Done</b></u><br>"\ "<p><img source=\" toolsDoneAction\"><br> "\ "Completes the current operation and enters Select Chunks mode."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( " toolsDoneAction", self. toolsDoneAction.iconSet().pixmap() ) self. toolsDoneAction.setWhatsThis( toolsDoneActionText ) #### Cancel #### toolsCancelActionText = "<u><b>Cancel</b></u><br>"\ "<p><img source=\" toolsCancelAction\"><br> "\ "Cancels the current operation and enters Select Chunks mode."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( " toolsCancelAction", self.toolsCancelAction.iconSet().pixmap() ) self. toolsCancelAction.setWhatsThis( toolsCancelActionText ) #### Back up #### toolsBackUpActionText = "<u><b>Back Up</b></u><br>"\ "<p><img source=\" toolsBackUpAction\"><br> "\ "Undoes the previous operation."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( " toolsBackUpAction", self.toolsBackUpAction.iconSet().pixmap() ) self. toolsBackUpAction.setWhatsThis( toolsBackUpActionText ) #### Start Over #### toolsStartOverActionText = "<u><b>Start Over</b></u><br>"\ "<p><img source=\"toolsStartOverAction\"><br> "\ "Cancels the current operation, leaving the user in the current mode."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "toolsStartOverAction", self.toolsStartOverAction.iconSet().pixmap() ) self.toolsStartOverAction.setWhatsThis(toolsStartOverActionText ) #### Add Layers #### ccAddLayerActionText = "<u><b>Add Layer</b></u><br>"\ "<p><img source=\"ccAddLayerAction\"><br> "\ "Adds a new layer of diamond lattice to the existing layer."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "ccAddLayerAction", self.ccAddLayerAction.iconSet().pixmap() ) self.ccAddLayerAction.setWhatsThis(ccAddLayerActionText ) ############################################## # Jigs ############################################## #### Anchor #### jigsAnchorActionText = "<u><b>Anchor</b></u><br>"\ "<p><img source=\"jigsAnchorAction\"><br> "\ "Attaches a <b>Anchor</b> to the selected atom(s), which "\ "constrains its motion during a minimization or simulation."\ "</p>"\ "<p>To create an Anchor, enter <b>Select Atoms</b> mode, "\ "select the atom(s) you want to anchor and then select this action. "\ "Anchors are drawn as a black wireframe box around each selected atom."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "jigsAnchorAction", self.jigsAnchorAction.iconSet().pixmap() ) self.jigsAnchorAction.setWhatsThis(jigsAnchorActionText ) #### Rotary Motor #### jigsMotorActionText = "<u><b>Rotary Motor</b></u><br>"\ "<p><img source=\"jigsMotorAction\"><br> "\ "Attaches a <b>Rotary Motor</b> to the selected atoms. The Rotary Motor is used by "\ "the simulator to apply rotary motion to a set of atoms during a simulation run. You may "\ "specify the <b>torque (in nN*nm)</b> and <b>speed (in Ghz)</b> of the motor."\ "</p>"\ "<p>To create a Rotary Motor, enter <b>Select Atoms</b> mode, "\ "select the atoms you want to attach the motor to and then select this action."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "jigsMotorAction", self.jigsMotorAction.iconSet().pixmap() ) self.jigsMotorAction.setWhatsThis(jigsMotorActionText ) #### Linear Motor #### jigsLinearMotorActionText = "<u><b>Linear Motor</b></u><br>"\ "<p><img source=\"jigsLinearMotorAction\"><br> "\ "Attaches a <b>Linear Motor</b> to the selected atoms. The Linear Motor is used by "\ "the simulator to apply linear motion to a set of atoms during a simulation run. You may "\ "specify the <b>force (in nN*nm)</b> and <b>stiffness (in N/m)</b> of the motor."\ "</p>"\ "<p>To create a Linear Motor, enter <b>Select Atoms</b> mode, "\ "select the atoms you want to attach the motor to and then select this action."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "jigsLinearMotorAction", self.jigsLinearMotorAction.iconSet().pixmap() ) self.jigsLinearMotorAction.setWhatsThis(jigsLinearMotorActionText ) #### Thermostat #### jigsStatActionText = "<u><b>Thermostat</b></u><br>"\ "<p><img source=\"jigsStatAction\"><br> "\ "Attaches a <b>Langevin Thermostat</b> to a single selected atom, thereby associating "\ "the themostat to the entire molecule of which the selected atom is a member. The user "\ "specifies the temperature (in Kelvin)."\ "</p>"\ "<p>The Langevin Thermostat is used to set and hold the temperature "\ "of a molecule during a simulation run."\ "</p>"\ "<p>To create a Langevin Thermostat, enter <b>Select Atoms</b> mode, "\ "select a single atom and then select this action. The thermostat is drawn as a "\ "blue wireframe box around the selected atom."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "jigsStatAction", self.jigsStatAction.iconSet().pixmap() ) self.jigsStatAction.setWhatsThis(jigsStatActionText ) #### Thermometer #### jigsThermoActionText = "<u><b>Thermometer</b></u><br>"\ "<p><img source=\"jigsThermoAction\"><br> "\ "Attaches a <b>Thermometer</b> to a single selected atom, thereby associating "\ "the themometer to the entire molecule of which the selected atom is a member. "\ "<p>The temperature of the molecule will be recorded and written to a trace file "\ "during a simulation run."\ "</p>"\ "<p>To create a Thermometer, enter <b>Select Atoms</b> mode, "\ "select a single atom and then select this action. The thermometer is drawn as a "\ "dark red wireframe box around the selected atom."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "jigsThermoAction", self.jigsThermoAction.iconSet().pixmap() ) self.jigsThermoAction.setWhatsThis(jigsThermoActionText ) #### ESP Image #### jigsESPImageActionText = "<u><b>ESP Image</b></u></b></p><br>"\ "<p><img source=\"jigsESPImageAction\"><br> "\ "An <b>ESP Image</b> allows the user to visualize the electrostatic potential "\ "of points on the face of a square 2D surface. Nano-Hive's MPQC ESP Plane plug-in "\ "is used to calculate the electrostatic potential."\ "</p>"\ "<p>To create an ESP Image, enter <b>Select Atoms</b> mode, "\ "select three or more atoms and then select this jig. The ESP Image is drawn as a "\ "plane with a bounding volume."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "jigsESPImageAction", self.jigsESPImageAction.iconSet().pixmap() ) self.jigsESPImageAction.setWhatsThis(jigsESPImageActionText ) #### Atom Set #### jigsAtomSetActionText = "<u><b>Atom Set</b></u></b></p><br>"\ "<p><img source=\"jigsAtomSetAction\"><br> "\ "An <b>Atom Set</b> jig provides a convienient way to save an atom "\ "selection which can be reselected later."\ "</p>"\ "<p>To create an Atom Set, enter <b>Select Atoms</b> mode, "\ "select any number of atoms and then select this jig. The Atom Set is "\ "drawn as a set of wireframe boxes around each atom in the selection."\ "</p>"\ "<p>To reselect the atoms in an Atom Set, select it's context "\ "menu in the Model Tree and click the menu item that states "\ "<b>Select this jig's atoms</b>."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "jigsAtomSetAction", self.jigsAtomSetAction.iconSet().pixmap() ) self.jigsAtomSetAction.setWhatsThis(jigsAtomSetActionText ) #### Measure Distance #### jigsDistanceActionText = "<u><b>Measure Distance Jig</b></u></b></p><br>"\ "<p><img source=\"jigsDistanceAction\"><br> "\ "A <b>Measure Distance Jig</b> functions as a dimension to display the "\ "distance between two atoms."\ "</p>"\ "<p>To create the Measure Distance Jig, enter <b>Select Atoms</b> mode, "\ "select two atoms and then select this jig. The Measure Distance Jig is "\ "drawn as a pair of wireframe boxes around each atom connected by "\ "a line and a pair of numbers. The first number is the distance between the "\ "VdW radii (this can be a negative number for atoms that are close together). "\ "The second number is the distance between the nuclei."\ "</p>"\ "<p>The Measure Distance Jig will write the two distance values to the trace file "\ "for each frame of a simulation run and can be plotted using the Plot Tool."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "jigsDistanceAction", self.jigsDistanceAction.iconSet().pixmap() ) self.jigsDistanceAction.setWhatsThis(jigsDistanceActionText ) #### Measure Angle #### jigsAngleActionText = "<u><b>Measure Angle Jig</b></u></b></p><br>"\ "<p><img source=\"jigsAngleAction\"><br> "\ "A <b>Measure Angle Jig</b> functions as a dimension to display the "\ "angle between three atoms.</p>"\ "<p>To create the Measure Angle Jig, enter <b>Select Atoms</b> mode, "\ "select three atoms and then select this jig. The Measure Angle Jig is "\ "drawn as a set of wireframe boxes around each atom and a number "\ "which is the angle between the three atoms."\ "</p>"\ "<p>The Measure Angle Jig will write the angle value to the trace file "\ "for each frame of a simulation run and can be plotted using the Plot Tool."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "jigsAngleAction", self.jigsAngleAction.iconSet().pixmap() ) self.jigsAngleAction.setWhatsThis(jigsAngleActionText ) #### Measure Dihedral #### jigsDihedralActionText = "<u><b>Measure Dihedral Jig</b></u></b></p><br>"\ "<p><img source=\"jigsDihedralAction\"><br> "\ "A <b>Measure Dihedral Jig</b> functions as a dimension to display the "\ "dihedral angle of a four atom sequence.</p>"\ "<p>To create the Measure Dihedral Jig, enter <b>Select Atoms</b> mode, "\ "select four atoms and then select this jig. The Measure Dihedral Jig is "\ "drawn as a set of wireframe boxes around each atom and a number "\ "which is the dihedral angle value."\ "</p>"\ "<p>The Measure Dihedral Jig will write the dihedral angle value to the trace file "\ "for each frame of a simulation run and can be plotted using the Plot Tool."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "jigsDihedralAction", self.jigsDihedralAction.iconSet().pixmap() ) self.jigsDihedralAction.setWhatsThis(jigsDihedralActionText ) #### GAMESS Jig #### jigsGamessActionText = "<u><b>GAMESS Jig</b></u></b></p><br>"\ "<p><img source=\"jigsGamessAction\"><br> "\ "A <b>GAMESS Jig</b> is used to tag a set of atoms for running a GAMESS "\ "calculation. <b>Energy</b> and <b>Geometry Optimization</b> calculations are supported."\ "</p>"\ "<p>To create the GAMESS Jig, enter <b>Select Atoms</b> mode, "\ "select the atoms to tag and then select this jig. The GAMESS Jig is drawn as a "\ "set of magenta wireframe boxes around each atom."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "jigsGamessAction", self.jigsGamessAction.iconSet().pixmap() ) self.jigsGamessAction.setWhatsThis(jigsGamessActionText ) #### Grid Plane Jig #### jigsGridPlaneActionText = "<u><b>Grid Plane</b></u></b></p><br>"\ "<p><img source=\"jigsGridPlaneAction\"><br> "\ "A <b>Grid Plane</b> jig is a rectanglar plane that can display a square or SiC grid "\ "within its boundary. It is often used as an aid in constructing large lattice "\ "structures made of silicon carbide (SiC). It is also used as a visual aid in estimating "\ "distances between atoms and/or other structures."\ "</p>"\ "<p>To create the Grid Plane jig, enter <b>Select Atoms</b> mode, "\ "select three or more atoms and then select this jig. "\ "</p>"\ "<p>The Grid Plane jig is drawn as a rectanglar plane with a grid."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "jigsGridPlaneAction", self.jigsGridPlaneAction.iconSet().pixmap() ) self.jigsGridPlaneAction.setWhatsThis(jigsGridPlaneActionText ) ############################################## # Display ############################################## #### Display Object Color #### dispObjectColorActionText = "<u><b>Object Color</b></u><br>"\ "<p><img source=\"dispObjectColorAction\"><br> "\ "Allows you to change the color of the selected object(s).</p>" QMimeSourceFactory.defaultFactory().setPixmap( "dispObjectColorAction", self.dispObjectColorAction.iconSet().pixmap() ) self.dispObjectColorAction.setWhatsThis(dispObjectColorActionText ) #### Display Background Color #### dispBGColorActionText = "<u><b>Background Color</b></u><br>"\ "<p><img source=\"dispBGColorAction\"><br> "\ "Allows you to change the background color of the main window.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "dispBGColorAction", self.dispBGColorAction.iconSet().pixmap() ) self.dispBGColorAction.setWhatsThis(dispBGColorActionText ) ############################################## # Help Toolbar ############################################## #### What's This #### helpWhatsThisText = "<u><b>What's This</b></u><br>"\ "<p><img source=\"helpWhatsThis\"><br> "\ "Click this option to invoke a small question mark that is attached to the mouse pointer. "\ "Click on a feature which you would like more information about. "\ "A popup box appears with information about the feature.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "helpWhatsThis", self.helpWhatsThisAction.iconSet().pixmap() ) self.helpWhatsThisAction.setWhatsThis( helpWhatsThisText ) ############################################## # Datum Display Toolbar ############################################## #### Display Trihedron #### dispTrihedronText = "<u><b>Display Trihedron</b></u><br>"\ "<p><img source=\"dispTrihedron\"><br> "\ "Toggles the trihedron on and off.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "dispTrihedron", self.dispTrihedronAction.iconSet().pixmap() ) self.dispTrihedronAction.setWhatsThis(dispTrihedronText ) #### Display Csys #### dispCsysText = "<u><b>Display Csys Axis</b></u><br>"\ "<p><img source=\"dispCsys\"><br> "\ "Toggles the coordinate system axis on and off."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "dispCsys", self.dispCsysAction.iconSet().pixmap() ) self.dispCsysAction.setWhatsThis(dispCsysText ) #### Display Datum Lines #### dispDatumLinesText = "<u><b>Display Datum Lines</b></u><br>"\ "<p><img source=\"dispDatumLines\"><br> "\ "Toggles Datum Lines on and off.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "dispDatumLines", self.dispDatumLinesAction.iconSet().pixmap() ) self.dispDatumLinesAction.setWhatsThis(dispDatumLinesText ) #### Display Datum Planes #### dispDatumPlanesText = "<u><b>Display Datum Planes</b></u><br>"\ "<p><img source=\"dispDatumPlanes\"><br> "\ "Toggles Datum Planes on and off.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "dispDatumPlanes", self.dispDatumPlanesAction.iconSet().pixmap() ) self.dispDatumPlanesAction.setWhatsThis(dispDatumPlanesText ) #### Display Grid #### dispGridText = "<u><b>Display 3-D Grid</b></u><br>"\ "<p><img source=\"dispGrid\"><br> "\ "Toggles the 3-D grid on and off."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "dispGrid", self.dispGridAction.iconSet().pixmap() ) self.dispGridAction.setWhatsThis(dispGridText )
778480334357616b82303c863b630decc9748d34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/778480334357616b82303c863b630decc9748d34/whatsthis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 2888, 2323, 2503, 12, 2890, 4672, 225, 19709, 26487, 7, 468, 1387, 13288, 3215, 19709, 26487, 7, 225, 11849, 7, 3502, 1387, 11849, 7, 225, 585, 3678, 1528, 273, 3532, 89, 4438, 70, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 2888, 2323, 2503, 12, 2890, 4672, 225, 19709, 26487, 7, 468, 1387, 13288, 3215, 19709, 26487, 7, 225, 11849, 7, 3502, 1387, 11849, 7, 225, 585, 3678, 1528, 273, 3532, 89, 4438, 70, ...
self.dom=self.getDocumentObjectModel() if self.dom.body.isContentEditable: self.role=controlTypes.ROLE_EDITABLETEXT self.TextInfo=MSHTMLTextInfo if not api.isVirtualBufferPassThrough(): api.toggleVirtualBufferPassThrough()
self.TextInfo=MSHTMLTextInfo if not api.isVirtualBufferPassThrough(): api.toggleVirtualBufferPassThrough()
def event_gainFocus(self): if self.IAccessibleRole==IAccessibleHandler.ROLE_SYSTEM_PANE and self.IAccessibleObjectID==-4: return self.dom=self.getDocumentObjectModel() if self.dom.body.isContentEditable: self.role=controlTypes.ROLE_EDITABLETEXT self.TextInfo=MSHTMLTextInfo if not api.isVirtualBufferPassThrough(): api.toggleVirtualBufferPassThrough() IAccessible.event_gainFocus(self)
e414733012e267c4ac0a4ed4c2b245743e7a1b97 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9340/e414733012e267c4ac0a4ed4c2b245743e7a1b97/MSHTML.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 67, 25540, 9233, 12, 2890, 4672, 309, 365, 18, 45, 10451, 2996, 631, 45, 10451, 1503, 18, 16256, 67, 14318, 67, 30819, 41, 471, 365, 18, 45, 10451, 22359, 631, 17, 24, 30, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 67, 25540, 9233, 12, 2890, 4672, 309, 365, 18, 45, 10451, 2996, 631, 45, 10451, 1503, 18, 16256, 67, 14318, 67, 30819, 41, 471, 365, 18, 45, 10451, 22359, 631, 17, 24, 30, 327, ...
os.system('dd if=/dev/zero of=/tmp/'+ pkgname +'.mb count='+str(dirSize/800))
os.system('dd if=/dev/zero of=/tmp/'+ pkgname +'.mb count='+str(dirSize/500+1))
def doMb(path, pkgname): """ creates metaball image file from path doMB(path, pkgname) """ pkgname = pkgname.split("/")[-1] dirSize = getDirSize(path) print 'Size of dir: ' + str(dirSize) try: os.system('dd if=/dev/zero of=/tmp/'+ pkgname +'.mb count='+str(dirSize/800)) os.system("echo 'y' | mkfs.ext2 /tmp/"+pkgname+".mb &> /dev/null") except: print 'Error: make image failed, exiting' sys.exit() if os.access('/tmp/mbimage',os.F_OK): os.system('/tmp/mbimage -rf') os.makedirs('/tmp/mbimage') os.system('mount -o loop /tmp/' + pkgname + '.mb /tmp/mbimage') os.system('cp -r /tmp/mb/* /tmp/mbimage') os.system('umount -l /tmp/mbimage') os.system('rm /tmp/mbimage -rf') os.system('rm /tmp/mb -rf')
29f66a54b0905aaf095561c0c413eab14c295fce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2327/29f66a54b0905aaf095561c0c413eab14c295fce/mb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 49, 70, 12, 803, 16, 29348, 4672, 3536, 3414, 5100, 378, 454, 1316, 585, 628, 589, 741, 7969, 12, 803, 16, 29348, 13, 3536, 29348, 273, 29348, 18, 4939, 2932, 4898, 13, 18919, 21,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 49, 70, 12, 803, 16, 29348, 4672, 3536, 3414, 5100, 378, 454, 1316, 585, 628, 589, 741, 7969, 12, 803, 16, 29348, 13, 3536, 29348, 273, 29348, 18, 4939, 2932, 4898, 13, 18919, 21,...
self.cookiefile.name, \
self.cookiefile.name, '-a', self.wgetlog, \
def get_stateval(self): argList = [\ '/usr/bin/wget','--output-document', '-', \ '--keep-session-cookies', '--save-cookies', \ self.cookiefile.name, \ 'http://judis.nic.in/supremecourt/DateQry.aspx'\ ]
f55a79144368a66b96fa92a55d8cec444dbad926 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5095/f55a79144368a66b96fa92a55d8cec444dbad926/supremecourt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2019, 1125, 12, 2890, 4672, 1501, 682, 273, 23781, 1173, 13640, 19, 4757, 19, 91, 588, 17023, 413, 2844, 17, 5457, 2187, 2400, 2187, 521, 3534, 10102, 17, 3184, 17, 16240, 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, 336, 67, 2019, 1125, 12, 2890, 4672, 1501, 682, 273, 23781, 1173, 13640, 19, 4757, 19, 91, 588, 17023, 413, 2844, 17, 5457, 2187, 2400, 2187, 521, 3534, 10102, 17, 3184, 17, 16240, 2187,...
podir = os.path.join (os.path.realpath ("."), "po") if os.path.isdir (podir): buildcmd = "msgfmt -o build/locale/%s/ccsm.mo po/%s.po" mopath = "build/locale/%s/ccsm.mo" destpath = "share/locale/%s/LC_MESSAGES" for name in os.listdir (podir): if name[-2:] == "po": name = name[:-3] if not os.path.isdir ("build/locale/" + name): os.makedirs ("build/locale/" + name) os.system (buildcmd % (name, name)) data_files.append ((destpath % name, [mopath % name]))
if sys.argv[1] == "build": podir = os.path.join (os.path.realpath ("."), "po") if os.path.isdir (podir): buildcmd = "msgfmt -o build/locale/%s/ccsm.mo po/%s.po" mopath = "build/locale/%s/ccsm.mo" destpath = "share/locale/%s/LC_MESSAGES" for name in os.listdir (podir): if name[-2:] == "po": name = name[:-3] if not os.path.isdir ("build/locale/" + name): os.makedirs ("build/locale/" + name) os.system (buildcmd % (name, name)) data_files.append ((destpath % name, [mopath % name]))
def filter_images (image): return image.startswith ("plugin-") or image.startswith ("category-")
4b0b2d5aaf123749adffa665fec8c52a424901ee /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1272/4b0b2d5aaf123749adffa665fec8c52a424901ee/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1034, 67, 7369, 261, 2730, 4672, 327, 1316, 18, 17514, 1918, 7566, 4094, 17, 7923, 578, 1316, 18, 17514, 1918, 7566, 4743, 17, 7923, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1034, 67, 7369, 261, 2730, 4672, 327, 1316, 18, 17514, 1918, 7566, 4094, 17, 7923, 578, 1316, 18, 17514, 1918, 7566, 4743, 17, 7923, 225, 2, -100, -100, -100, -100, -100, -100, -100, -10...
- a `Resource`, which is then used as a base for making a copy - a `basestring`, used to specify a `realm`
- a `Resource`, which is then used as a base for making a copy - a `basestring`, used to specify a `realm` - `None`, in which case this means "no resource" and `None` is returned instead of a `Resource` instance
def __new__(cls, resource_or_realm=False, id=False, version=False, parent=False): """Create a new Resource object from a specification.
78621f2cb1f6bfc5ab06799cebdb6c1bb9d9eabd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9317/78621f2cb1f6bfc5ab06799cebdb6c1bb9d9eabd/resource.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2704, 972, 12, 6429, 16, 1058, 67, 280, 67, 24056, 33, 8381, 16, 612, 33, 8381, 16, 1177, 33, 8381, 16, 982, 33, 8381, 4672, 3536, 1684, 279, 394, 2591, 733, 628, 279, 7490, 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, 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, 2704, 972, 12, 6429, 16, 1058, 67, 280, 67, 24056, 33, 8381, 16, 612, 33, 8381, 16, 1177, 33, 8381, 16, 982, 33, 8381, 4672, 3536, 1684, 279, 394, 2591, 733, 628, 279, 7490, 18...
s1 = etree.tostring(doc)
s1 = ToString(doc)
def create_meta(self): root = etree.Element('office:document-meta', attrib=META_NAMESPACE_DICT) doc = etree.ElementTree(root) root = etree.SubElement(root, 'office:meta') el1 = etree.SubElement(root, 'meta:generator') el1.text = 'Docutils/rst2odf.py/%s' % (VERSION, ) s1 = os.environ.get('USER', '') el1 = etree.SubElement(root, 'meta:initial-creator') el1.text = s1 s2 = time.strftime('%Y-%m-%dT%H:%M:%S', time.localtime()) el1 = etree.SubElement(root, 'meta:creation-date') el1.text = s2 el1 = etree.SubElement(root, 'dc:creator') el1.text = s1 el1 = etree.SubElement(root, 'dc:date') el1.text = s2 el1 = etree.SubElement(root, 'dc:language') el1.text = 'en-US' el1 = etree.SubElement(root, 'meta:editing-cycles') el1.text = '1' el1 = etree.SubElement(root, 'meta:editing-duration') el1.text = 'PT00M01S' title = self.visitor.get_title() el1 = etree.SubElement(root, 'dc:title') if title: el1.text = title else: el1.text = '[no title]' s1 = etree.tostring(doc) #doc = minidom.parseString(s1) #s1 = doc.toprettyxml(' ') return s1
277ba1af817dc725b8179dbbf649a815fdff5939 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/277ba1af817dc725b8179dbbf649a815fdff5939/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 3901, 12, 2890, 4672, 1365, 273, 12031, 18, 1046, 2668, 19789, 30, 5457, 17, 3901, 2187, 5885, 33, 19294, 67, 11368, 67, 31456, 13, 997, 273, 12031, 18, 1046, 2471, 12, 3085, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 3901, 12, 2890, 4672, 1365, 273, 12031, 18, 1046, 2668, 19789, 30, 5457, 17, 3901, 2187, 5885, 33, 19294, 67, 11368, 67, 31456, 13, 997, 273, 12031, 18, 1046, 2471, 12, 3085, ...
resDict = {'Failed':failed,'Successful':successful} return S_OK(resDict) def __getFile(self,src_url,dest_file): if not os.path.exists(os.path.dirname(dest_file)): os.makedirs(os.path.dirname(dest_file)) if os.path.exists(dest_file): gLogger.debug("SRM2Storage.__getFile: Local file already exists %s. Removing..." % dest_file) os.remove(dest_file)
resDict = {'Failed':failed, 'Successful':successful} return S_OK( resDict ) def __getFile( self, src_url, dest_file ): if not os.path.exists( os.path.dirname( dest_file ) ): os.makedirs( os.path.dirname( dest_file ) ) if os.path.exists( dest_file ): gLogger.debug( "SRM2Storage.__getFile: Local file already exists %s. Removing..." % dest_file ) os.remove( dest_file )
def getFile(self,path,localPath=False): """ Get a local copy in the current directory of a physical file specified by its path """ res = self.checkArgumentFormat(path) if not res['OK']: return res urls = res['Value']
70e66af095cb6701e39b1e701e4a2ce4d012b4f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/70e66af095cb6701e39b1e701e4a2ce4d012b4f7/SRM2Storage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6034, 12, 2890, 16, 803, 16, 3729, 743, 33, 8381, 4672, 3536, 968, 279, 1191, 1610, 316, 326, 783, 1867, 434, 279, 11640, 585, 1269, 635, 2097, 589, 3536, 400, 273, 365, 18, 1893, 1379...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6034, 12, 2890, 16, 803, 16, 3729, 743, 33, 8381, 4672, 3536, 968, 279, 1191, 1610, 316, 326, 783, 1867, 434, 279, 11640, 585, 1269, 635, 2097, 589, 3536, 400, 273, 365, 18, 1893, 1379...
if result[0] in string.digits:
if not result: return result elif result[0] in string.digits:
def datestr(then, now=None, lang=None): """Internationalized version of web.datestr.""" result = web.datestr(then, now) if result[0] in string.digits: # eg: 2 milliseconds ago t, message = result.split(' ', 1) return _("%d " + message) % int(t) else: return format_date(then, lang=lang)
ef1d8c529b7c5f0f8beeaa4c04e73c99d75705c6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3913/ef1d8c529b7c5f0f8beeaa4c04e73c99d75705c6/helpers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7811, 313, 12, 15991, 16, 2037, 33, 7036, 16, 3303, 33, 7036, 4672, 3536, 21843, 8371, 1235, 1177, 434, 3311, 18, 9683, 313, 12123, 563, 273, 3311, 18, 9683, 313, 12, 15991, 16, 2037, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7811, 313, 12, 15991, 16, 2037, 33, 7036, 16, 3303, 33, 7036, 4672, 3536, 21843, 8371, 1235, 1177, 434, 3311, 18, 9683, 313, 12123, 563, 273, 3311, 18, 9683, 313, 12, 15991, 16, 2037, ...
if '/' in arg: pagename, arg = arg.split('/') url = arg
def macro(self, macro_obj, name, args): #use ImageLink for resized images if name == "ImageLink" and args is not None: pagename = self.page.page_name if args: args = [arg.strip() for arg in args.split(',')] else: args = [] url = None kw = {} kw['src'] = None pos = 0 for arg in args: if '=' in arg: key, value = arg.split('=') if key == 'width' and value: kw['width'] = value elif key == 'height' and value: kw['height'] = value elif key == 'alt' and value: kw['alt'] = value else: if pos == 0 and arg: url = arg if url.startswith('http'): kw['src'] = url else: if '/' in arg: pagename, arg = arg.split('/') url = arg kw['title'] = "attachment:%s" % wikiutil.quoteWikinameURL(url) elif pos == 1 and arg: kw['target'] = arg pos += 1 if not kw['src']: kw['src'] = AttachFile.getAttachUrl(pagename, url, self.request, addts=1) return self.image(**kw)
56e0d48c6896fd998c7b926839081c09172733e8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/888/56e0d48c6896fd998c7b926839081c09172733e8/text_gedit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 12, 2890, 16, 11522, 67, 2603, 16, 508, 16, 833, 4672, 468, 1202, 3421, 2098, 364, 21615, 4602, 309, 508, 422, 315, 2040, 2098, 6, 471, 833, 353, 486, 599, 30, 4262, 1069, 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, 11522, 12, 2890, 16, 11522, 67, 2603, 16, 508, 16, 833, 4672, 468, 1202, 3421, 2098, 364, 21615, 4602, 309, 508, 422, 315, 2040, 2098, 6, 471, 833, 353, 486, 599, 30, 4262, 1069, 273, ...