rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
return (1, "%s %s" % (CFG_WEBACCESS_WARNING_MSGS[1], make_apache_message(name_action, arguments, user_info.get('referer', None))))
return (1, "%s %s" % (CFG_WEBACCESS_WARNING_MSGS[1], make_apache_message(name_action, arguments)))
def acc_authorize_action(req, name_action, verbose=0, check_only_uid_p=False, **arguments): """Check if user is allowed to perform action with given list of arguments. Return (0, message) if authentication succeeds, (error code, error message) if it fails. The arguments are as follows: req - could be either one of these three things: id_user of the current user user_info dictionary built against the user details req mod_python request object name_action - the name of the action arguments - dictionary with keyword=value pairs created automatically by python on the extra arguments. these depend on the given action.
65ea7094ab75e683f85f6867dca65a9d596afbcc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/65ea7094ab75e683f85f6867dca65a9d596afbcc/access_control_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4078, 67, 22488, 67, 1128, 12, 3658, 16, 508, 67, 1128, 16, 3988, 33, 20, 16, 866, 67, 3700, 67, 1911, 67, 84, 33, 8381, 16, 2826, 7099, 4672, 3536, 1564, 309, 729, 353, 2935, 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, 4078, 67, 22488, 67, 1128, 12, 3658, 16, 508, 67, 1128, 16, 3988, 33, 20, 16, 866, 67, 3700, 67, 1911, 67, 84, 33, 8381, 16, 2826, 7099, 4672, 3536, 1564, 309, 729, 353, 2935, 358, ...
self.glplane.setViewProjection(0)
self.glpane.setViewProjection(PERSPECTIVE)
def setViewPerspec(self): self.glplane.setViewProjection(0)
209505bfc137287391367fd5a3527a86dff1ee5d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/209505bfc137287391367fd5a3527a86dff1ee5d/MWsemantics.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19923, 14781, 705, 12, 2890, 4672, 365, 18, 7043, 21314, 18, 542, 1767, 14789, 12, 20, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19923, 14781, 705, 12, 2890, 4672, 365, 18, 7043, 21314, 18, 542, 1767, 14789, 12, 20, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
doc="""The property's MetadataStore type.""")
doc="""The property's MetadataStore type.""")
def _get_metadataStoreType(self): # FIXME: No more node #javaType = self.javaType #if javaType[-4:] == "Node": # return "String" return javaType
da66d430c0acc35d155af13f1e3e3c04f787efd7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1844/da66d430c0acc35d155af13f1e3e3c04f787efd7/fu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 4165, 2257, 559, 12, 2890, 4672, 468, 9852, 30, 2631, 1898, 756, 468, 6290, 559, 273, 365, 18, 6290, 559, 468, 430, 29877, 18919, 24, 26894, 422, 315, 907, 6877, 468, 202...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 4165, 2257, 559, 12, 2890, 4672, 468, 9852, 30, 2631, 1898, 756, 468, 6290, 559, 273, 365, 18, 6290, 559, 468, 430, 29877, 18919, 24, 26894, 422, 315, 907, 6877, 468, 202...
if field._properties:
if field._properties and ((not field.store) or field._fnct_search):
def rg(ids, table, parent): if not ids: return [] ids2 = table.search(cr, uid, [(parent, 'in', ids)], context=context) return ids + rg(ids2, table, parent)
9148fc2662f99d7578a9688919567b94ee89e42d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9148fc2662f99d7578a9688919567b94ee89e42d/expression.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14524, 12, 2232, 16, 1014, 16, 982, 4672, 309, 486, 3258, 30, 327, 5378, 3258, 22, 273, 1014, 18, 3072, 12, 3353, 16, 4555, 16, 306, 12, 2938, 16, 296, 267, 2187, 3258, 13, 6487, 819...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14524, 12, 2232, 16, 1014, 16, 982, 4672, 309, 486, 3258, 30, 327, 5378, 3258, 22, 273, 1014, 18, 3072, 12, 3353, 16, 4555, 16, 306, 12, 2938, 16, 296, 267, 2187, 3258, 13, 6487, 819...
print self.__class__.__name__, "move relative", position, "->", (horizontal, vertical) print 'pos', (horizontal, vertical)
def execute(self, window): position = get_cursor_position() print position if not position: raise ActionError("Failed to retrieve cursor position.") horizontal = position[0] + self.horizontal vertical = position[1] + self.vertical print self.__class__.__name__, "move relative", position, "->", (horizontal, vertical) print 'pos', (horizontal, vertical) self._move_mouse(horizontal, vertical)
6e9bcf33fdb400a3bf700584c6be8d8c6bade1b0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6624/6e9bcf33fdb400a3bf700584c6be8d8c6bade1b0/action_mouse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 2742, 4672, 1754, 273, 336, 67, 9216, 67, 3276, 1435, 1172, 1754, 309, 486, 1754, 30, 1002, 4382, 668, 2932, 2925, 358, 4614, 3347, 1754, 1199, 13, 10300, 273, 1754, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 2742, 4672, 1754, 273, 336, 67, 9216, 67, 3276, 1435, 1172, 1754, 309, 486, 1754, 30, 1002, 4382, 668, 2932, 2925, 358, 4614, 3347, 1754, 1199, 13, 10300, 273, 1754, ...
doc.AddItem(Header(2, _("Error"))) doc.AddItem(Bold(_('%(listname)s: No such member %(user)s.')))
realname = mlist.real_name title = _('CGI script error') doc.SetTitle(title) doc.AddItem(Header(2, title)) add_error_message( doc, _('List "%(realname)s" has no such member: %(user)s.'))
def main(): doc = Document() doc.set_language(mm_cfg.DEFAULT_SERVER_LANGUAGE) parts = Utils.GetPathPieces() if not parts or len(parts) < 2: doc.AddItem(Header(2, _('Error'))) doc.AddItem(Bold(_('Invalid options to CGI script.'))) print doc.Format() return # get the list and user's name listname = parts[0].lower() # open list try: mlist = MailList.MailList(listname, lock=0) except Errors.MMListError, e: doc.AddItem(Header(2, _("Error"))) doc.AddItem(Bold(_('No such list <em>%(listname)s</em>'))) print doc.Format() syslog('error', 'No such list "%s": %s\n' % (listname, e)) return # Now we know which list is requested, so we can set the language to the # list's preferred language. i18n.set_language(mlist.preferred_language) doc.set_language(mlist.preferred_language) # Sanity check the user user = Utils.UnobscureEmail(SLASH.join(parts[1:])) user = Utils.LCDomain(user) if not mlist.IsMember(user): doc.AddItem(Header(2, _("Error"))) doc.AddItem(Bold(_('%(listname)s: No such member %(user)s.'))) doc.AddItem(mlist.GetMailmanFooter()) print doc.Format() return # Find the case preserved email address (the one the user subscribed with) lcuser = mlist.FindUser(user) cpuser = mlist.GetUserSubscribedAddress(lcuser) if lcuser == cpuser: cpuser = None # And now we know the user making the request, so set things up for the # user's preferred language. userlang = mlist.GetPreferredLanguage(user) doc.set_language(userlang) i18n.set_language(userlang) # Are we processing an unsubscription request from the login screen? cgidata = cgi.FieldStorage() if cgidata.has_key('login-unsub'): # Because they can't supply a password for unsubscribing, we'll need # to do the confirmation dance. mlist.ConfirmUnsubscription(user, userlang) add_error_message( doc, _('The confirmation email has been sent.'), tag='') loginpage(mlist, doc, user, cgidata) print doc.Format() return # Are we processing a password reminder from the login screen? if cgidata.has_key('login-remind'): mlist.MailUserPassword(user) add_error_message( doc, _('A reminder of your password has been emailed to you.'), tag='') loginpage(mlist, doc, user, cgidata) print doc.Format() return # Authenticate, possibly using the password supplied in the login page password = cgidata.getvalue('password', '').strip() if not mlist.WebAuthenticate((mm_cfg.AuthUser, mm_cfg.AuthListAdmin, mm_cfg.AuthSiteAdmin), password, user): # Not authenticated, so throw up the login page again. If they tried # to authenticate via cgi (instead of cookie), then print an error # message. if cgidata.has_key('login'): add_error_message(doc, _('Authentication failed.'), tag='Error: ') loginpage(mlist, doc, user, cgidata) print doc.Format() return # From here on out, the user is okay to view and modify their membership # options. The first set of checks does not require the list to be # locked. if cgidata.has_key('logout'): print mlist.ZapCookie(mm_cfg.AuthUser, user) loginpage(mlist, doc, user, cgidata) print doc.Format() return if cgidata.has_key('emailpw'): mlist.MailUserPassword(user) options_page( mlist, doc, user, cpuser, userlang, _('A reminder of your password has been emailed to you.')) print doc.Format() return if cgidata.has_key('othersubs'): hostname = mlist.host_name title = _('List subscriptions for %(user)s on %(hostname)s') doc.SetTitle(title) doc.AddItem(Header(2, title)) doc.AddItem(_('''Click on a link to visit your options page for the requested mailing list.''')) # Troll through all the mailing lists that match host_name and see if # the user is a member. If so, add it to the list. onlists = [] for gmlist in lists_of_member(mlist.host_name, user): url = gmlist.GetOptionsURL(user) link = Link(url, gmlist.real_name) onlists.append((gmlist.real_name, link)) onlists.sort() items = OrderedList(*[link for name, link in onlists]) doc.AddItem(items) print doc.Format() return if cgidata.has_key('change-of-address'): newaddr = cgidata.getvalue('new-address') confirmaddr = cgidata.getvalue('confirm-address') if not newaddr or not confirmaddr: options_page(mlist, doc, user, cpuser, userlang, _('Addresses may not be blank')) print doc.Format() return if newaddr <> confirmaddr: options_page(mlist, doc, user, cpuser, userlang, _('Addresses did not match!')) print doc.Format() return # See if the user wants to change their email address globally globally = cgidata.getvalue('changeaddr-globally') # Standard sigterm handler. def sigterm_handler(signum, frame, mlist=mlist): mlist.Unlock() sys.exit(0) # Register the pending change after the list is locked msg = _('A confirmation message has been sent to %(newaddr)s') mlist.Lock() try: try: signal.signal(signal.SIGTERM, sigterm_handler) mlist.ChangeMemberAddress(user, newaddr, globally) mlist.Save() finally: mlist.Unlock() except Errors.MMBadEmailError: msg = _('Bad email address provided') except Errors.MMHostileAddress: msg = _('Illegal email address provided') except Errors.MMAlreadyAMember: msg = _('%(newaddr)s is already a member of the list.') options_page(mlist, doc, user, cpuser, userlang, msg) print doc.Format() return if cgidata.has_key('changepw'): newpw = cgidata.getvalue('newpw') confirmpw = cgidata.getvalue('confpw') if not newpw or not confirmpw: options_page(mlist, doc, user, cpuser, userlang, _('Passwords may not be blank')) print doc.Format() return if newpw <> confirmpw: options_page(mlist, doc, user, cpuser, userlang, _('Passwords did not match!')) print doc.Format() return # See if the user wants to change their passwords globally if cgidata.getvalue('pw-globally'): mlists = lists_of_member(mlist.host_name, user) else: mlists = [mlist] for gmlist in mlists: change_password(gmlist, user, newpw, confirmpw) # Regenerate the cookie so a re-authorization isn't necessary print mlist.MakeCookie(mm_cfg.AuthUser, user) options_page(mlist, doc, user, cpuser, userlang, _('Password successfully changed.')) print doc.Format() return if cgidata.has_key('unsub'): # Was the confirming check box turned on? if not cgidata.getvalue('unsubconfirm'): options_page( mlist, doc, user, cpuser, userlang, _('''You must confirm your unsubscription request by turning on the checkbox below the <em>Unsubscribe</em> button. You have not been unsubscribed!''')) print doc.Format() return # Standard signal handler def sigterm_handler(signum, frame, mlist=mlist): mlist.Unlock() sys.exit(0) # Okay, zap them. Leave them sitting at the list's listinfo page. We # must own the list lock, and we want to make sure the user (BAW: and # list admin?) is informed of the removal. mlist.Lock() try: signal.signal(signal.SIGTERM, sigterm_handler) mlist.DeleteMember(user, _('via the member options page'), admin_notif=1, userack=1) mlist.Save() finally: mlist.Unlock() # Now throw up some results page, with appropriate links. We can't # drop them back into their options page, because that's gone now! fqdn_listname = mlist.GetListEmail() owneraddr = mlist.GetOwnerEmail() url = mlist.GetScriptURL('listinfo', absolute=1) title = _('Unsubscription results') doc.SetTitle(title) doc.AddItem(Header(2, title)) doc.AddItem(_("""You have been successfully unsubscribed from the mailing list %(fqdn_listname)s. If you were receiving digest deliveries you may get one more digest. If you have any questions about your unsubscription, please contact the list owners at %(owneraddr)s.""")) doc.AddItem(mlist.GetMailmanFooter()) print doc.Format() return if cgidata.has_key('options-submit'): # Digest action flags digestwarn = 0 cantdigest = 0 mustdigest = 0 newvals = [] # First figure out which options have changed. The item names come # from FormatOptionButton() in HTMLFormatter.py for item, flag in (('digest', mm_cfg.Digests), ('mime', mm_cfg.DisableMime), ('dontreceive', mm_cfg.DontReceiveOwnPosts), ('ackposts', mm_cfg.AcknowledgePosts), ('disablemail', mm_cfg.DisableDelivery), ('conceal', mm_cfg.ConcealSubscription), ('remind', mm_cfg.SuppressPasswordReminder), ): try: newval = int(cgidata.getvalue(item)) except (TypeError, ValueError): newval = None # Skip this option if there was a problem or it wasn't changed if newval is None or newval == mlist.GetUserOption(user, flag): continue newvals.append((flag, newval)) # The user language is handled a little differently userlang = cgidata.getvalue('language') if userlang not in mlist.GetAvailableLanguages(): newvals.append((SETLANGUAGE, mlist.preferred_language)) else: newvals.append((SETLANGUAGE, userlang)) # The standard sigterm handler (see above) def sigterm_handler(signum, frame, mlist=mlist): mlist.Unlock() sys.exit(0) # Now, lock the list and perform the changes mlist.Lock() try: signal.signal(signal.SIGTERM, sigterm_handler) # `values' is a tuple of flags and the web values for flag, newval in newvals: # Handle language settings differently if flag == SETLANGUAGE: mlist.SetPreferredLanguage(user, newval) continue mlist.SetUserOption(user, flag, newval, save_list=0) # Digests also need another setting, which is a bit bogus, as # SetUserOption() should be taught about this special step. if flag == mm_cfg.Digests: try: mlist.SetUserDigest(user, newval) if newval == 0: digestwarn = 1 except (Errors.MMAlreadyDigested, Errors.MMAlreadyUndigested): pass except Errors.MMCantDigestError: cantdigest = 1 except Errors.MMMustDigestError: mustdigest = 1 # All done mlist.Save() finally: mlist.Unlock() # The enable/disable option and the password remind option may have # their global flags sets. global_enable = None if cgidata.getvalue('deliver-globally'): # Yes, this is inefficient, but the list is so small it shouldn't # make much of a difference. for flag, newval in newvals: if flag == mm_cfg.DisableDelivery: global_enable = newval break global_remind = None if cgidata.getvalue('remind-globally'): for flag, newval in newvals: if flag == mm_cfg.SuppressPasswordReminder: global_remind = newval break if global_enable is not None or global_remind is not None: for gmlist in lists_of_member(mlist.host_name, user): global_options(gmlist, user, global_enable, global_remind) # Now print the results if cantdigest: msg = _('''The list administrator has disabled digest delivery for this list, so your delivery option has not been set. However your other options have been set successfully.''') elif mustdigest: msg = _('''The list administrator has disabled non-digest delivery for this list, so your delivery option has not been set. However your other options have been set successfully.''') else: msg = _('You have successfully set your options.') if digestwarn: msg += _('You may get one last digest.') options_page(mlist, doc, user, cpuser, userlang, msg) print doc.Format() return options_page(mlist, doc, user, cpuser, userlang) print doc.Format()
e3fa9ac21ace757364bf1352e5c3d184280bc75b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/e3fa9ac21ace757364bf1352e5c3d184280bc75b/options.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 997, 273, 4319, 1435, 997, 18, 542, 67, 4923, 12, 7020, 67, 7066, 18, 5280, 67, 4370, 67, 15547, 13, 225, 2140, 273, 6091, 18, 967, 743, 16539, 8610, 1435, 309, 486, 2140,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 997, 273, 4319, 1435, 997, 18, 542, 67, 4923, 12, 7020, 67, 7066, 18, 5280, 67, 4370, 67, 15547, 13, 225, 2140, 273, 6091, 18, 967, 743, 16539, 8610, 1435, 309, 486, 2140,...
import time if time.gmtime().tm_sec < 20 or time.gmtime().tm_sec > 40: ss_status = "Working" ss_progress = (time.gmtime().tm_sec % 20) * 5 else: ss_progress = None ss_status = None
def instance_state_json(self, trans, no_json=False): g_s = self.app.manager.get_services('Galaxy') if g_s and g_s[0].state == service_states.RUNNING: dns = 'http://%s' % str( self.app.cloud_interface.get_self_public_ip() ) else: # dns = '<a href="http://%s" target="_blank">Access Galaxy</a>' % str( 'localhost:8080' ) dns = '#' # TEMP TEST FOR RESIZING import time if time.gmtime().tm_sec < 20 or time.gmtime().tm_sec > 40: ss_status = "Working" ss_progress = (time.gmtime().tm_sec % 20) * 5 else: ss_progress = None ss_status = None ret_dict = {'instance_state':self.app.manager.get_instance_state(), 'cluster_status':self.app.manager.get_cluster_status(), 'dns':dns, 'instance_status':{'idle': str(len(self.app.manager.get_idle_instances())), 'available' : str(self.app.manager.get_num_available_workers()), 'requested' : str(len(self.app.manager.worker_instances))}, 'disk_usage':{'used':str(self.app.manager.disk_used), 'total':str(self.app.manager.disk_total), 'pct':str(self.app.manager.disk_pct)}, 'data_status':self.app.manager.get_data_status(), 'app_status':self.app.manager.get_app_status(), # 'services' : {'fs' : self.app.manager.fs_status_text(), # 'pg' : self.app.manager.pg_status_text(), # 'sge' : self.app.manager.sge_status_text(), # 'galaxy' : self.app.manager.galaxy_status_text()}, 'all_fs' : self.app.manager.all_fs_status_array(), # 'snapshot' : {'progress' : str(self.app.manager.snapshot_progress), # 'status' : str(self.app.manager.snapshot_status)}, 'snapshot' : {'progress' : str(ss_progress), 'status' : str(ss_status)}, 'autoscaling': {'use_autoscaling': bool(self.app.manager.get_services('Autoscale')), 'as_min': 'N/A' if not self.app.manager.get_services('Autoscale') else self.app.manager.get_services('Autoscale')[0].as_min, 'as_max': 'N/A' if not self.app.manager.get_services('Autoscale') else self.app.manager.get_services('Autoscale')[0].as_max} } if no_json: return ret_dict else: return to_json_string(ret_dict)
ae4e0df8e2176479c03ed851987eb5a12a9836e1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11241/ae4e0df8e2176479c03ed851987eb5a12a9836e1/root.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 791, 67, 2019, 67, 1977, 12, 2890, 16, 906, 16, 1158, 67, 1977, 33, 8381, 4672, 314, 67, 87, 273, 365, 18, 2910, 18, 4181, 18, 588, 67, 8387, 2668, 43, 287, 31851, 6134, 309, 314, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 791, 67, 2019, 67, 1977, 12, 2890, 16, 906, 16, 1158, 67, 1977, 33, 8381, 4672, 314, 67, 87, 273, 365, 18, 2910, 18, 4181, 18, 588, 67, 8387, 2668, 43, 287, 31851, 6134, 309, 314, ...
if pitch_type in merge_types: pitch_type = merge_types[pitch_type]
if pitch_type in self.merge_types: pitch_type = self.merge_types[pitch_type]
def __init__(self, name, cursor): self.name = name self.pitches = {} self.total = 0 self.enhanced = 0 for pitch in cursor: self.total += 1 # Can only analyze enhanced pitches if pitch['enhanced']: self.enhanced += 1 pitch_type = pitch['pitch_type'] if pitch_type in self.ignore_types: continue
056a5246145e1bc15a48aeb78dfe11a728b3691d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11178/056a5246145e1bc15a48aeb78dfe11a728b3691d/pitchfx.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 16, 3347, 4672, 365, 18, 529, 273, 508, 365, 18, 25910, 281, 273, 2618, 365, 18, 4963, 273, 374, 365, 18, 275, 17221, 273, 374, 364, 14486, 316, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 16, 3347, 4672, 365, 18, 529, 273, 508, 365, 18, 25910, 281, 273, 2618, 365, 18, 4963, 273, 374, 365, 18, 275, 17221, 273, 374, 364, 14486, 316, 3...
print "circular"
def getCircularStats(values,size): print "circular" # Store locals for speed lsin = math.sin lcos = math.cos lradians = math.radians lpow = math.pow # Circular Average - use some fancy trig that takes circular values # into account. This requires all values to be converted to radians. radAngles = [lradians(val) for val in values] radAvg = math.atan2( sum([lsin(radAngle) for radAngle in radAngles])/size, sum([lcos(radAngle) for radAngle in radAngles])/size, ) # Standard Deviation - shift the range of deviations +180 by applying # %(2*pi) to all angles. This creates a range of deviations -180-540. # Values greater than 180 are then shifted back by substracting from # 360, resulting in deviations -180-180. From there the Stdev formula # is the same. msum = 0 lpi = math.pi lpi_2 = lpi*2 for radAngle in radAngles: straight = radAngle%lpi_2 - radAvg msum += lpow(straight if straight < lpi else lpi_2 - straight, 2) return math.degrees(radAvg),math.degrees(math.sqrt(msum/(size-1)))
8680e2a39933acf7a06e30c71cc9987f2a82e814 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6163/8680e2a39933acf7a06e30c71cc9987f2a82e814/ConfDistFuncs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1927, 481, 9559, 4195, 12, 2372, 16, 1467, 4672, 225, 468, 4994, 8985, 364, 8632, 7180, 267, 273, 4233, 18, 21861, 9109, 538, 273, 4233, 18, 14445, 328, 22799, 634, 273, 4233, 18, 22799,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1927, 481, 9559, 4195, 12, 2372, 16, 1467, 4672, 225, 468, 4994, 8985, 364, 8632, 7180, 267, 273, 4233, 18, 21861, 9109, 538, 273, 4233, 18, 14445, 328, 22799, 634, 273, 4233, 18, 22799,...
self.log.info('Updating status to %s for pilot %s' % (newStatus,pRef) ) result = pilotAgentsDB.setPilotStatus(pRef,newStatus,'','Updated by SiteDirector')
self.log.info( 'Updating status to %s for pilot %s' % ( newStatus, pRef ) ) result = pilotAgentsDB.setPilotStatus( pRef, newStatus, '', 'Updated by SiteDirector' )
def updatePilotStatus(self): """ Update status of pilots in transient states """ for queue in self.queueDict: ce = self.queueDict[queue]['CE'] ceName = self.queueDict[queue]['CEName'] queueName = self.queueDict[queue]['QueueName'] result = pilotAgentsDB.selectPilots({'DestinationSite':ceName, 'Queue':queueName, 'GridType':'DIRAC', 'GridSite':self.siteName, 'Status':TRANSIENT_PILOT_STATUS}) if not result['OK']: self.log.error('Failed to select pilots: %s' % result['Message']) continue pilotRefs = result['Value'] if not pilotRefs: continue #print "AT >>> pilotRefs", pilotRefs result = pilotAgentsDB.getPilotInfo(pilotRefs) if not result['OK']: self.log.error('Failed to get pilots info: %s' % result['Message']) continue pilotDict = result['Value'] #print "AT >>> pilotDict", pilotDict result = ce.getJobStatus(pilotRefs) if not result['OK']: self.log.error('Failed to get pilots status from CE: %s' % result['Message']) continue pilotCEDict = result['Value'] #print "AT >>> pilotCEDict", pilotCEDict for pRef in pilotRefs: newStatus = '' oldStatus = pilotDict[pRef]['Status'] ceStatus = pilotCEDict[pRef] if oldStatus == ceStatus: # Status did not change, continue continue elif ceStatus == "Unknown" and not oldStatus in FINAL_PILOT_STATUS: # Pilot finished without reporting, consider it Aborted newStatus = 'Aborted' elif ceStatus != 'Unknown' : # Update the pilot status to the new value newStatus = ceStatus if newStatus: self.log.info('Updating status to %s for pilot %s' % (newStatus,pRef) ) result = pilotAgentsDB.setPilotStatus(pRef,newStatus,'','Updated by SiteDirector') # Retrieve the pilot output now if newStatus in FINAL_PILOT_STATUS: if pilotDict[pRef]['OutputReady'].lower() == 'false' and self.getOutput: self.log.info('Retrieving output for pilot %s' % pRef ) pilotStamp = pilotDict[pRef]['PilotStamp'] pRefStamp = pRef if pilotStamp: pRefStamp = pRef+':::'+pilotStamp result = ce.getJobOutput(pRefStamp) if not result['OK']: self.log.error('Failed to get pilot output: %s' % result['Message']) else: output,error = result['Value'] result = pilotAgentsDB.storePilotOutput(pRef,output,error) if not result['OK']: self.log.error('Failed to store pilot output: %s' % result['Message'])
fecf3d418a4e3a08002c58982e809e7e4b152546 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/fecf3d418a4e3a08002c58982e809e7e4b152546/SiteDirector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 52, 22797, 1482, 12, 2890, 4672, 3536, 2315, 1267, 434, 24970, 6968, 316, 12315, 5493, 3536, 364, 2389, 316, 365, 18, 4000, 5014, 30, 5898, 273, 365, 18, 4000, 5014, 63, 4000, 2396...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 52, 22797, 1482, 12, 2890, 4672, 3536, 2315, 1267, 434, 24970, 6968, 316, 12315, 5493, 3536, 364, 2389, 316, 365, 18, 4000, 5014, 30, 5898, 273, 365, 18, 4000, 5014, 63, 4000, 2396...
True if v is safe, false otherwise
True if token is safe, false otherwise
def _is_string_safe(v): """ <Purpose> Checks if a string is safe based on the defined rules. <Arguments> v: A value to check. <Returns> True if v is safe, false otherwise """ # Check if it is explicitly allowed or the wrong type if type(v) is not str and type(str) is not unicode: return True if v in _STR_OK: return True # Check all the prohibited sub-strings for s in _STR_NOT_CONTAIN: if s in v: return False # Check all the prohibited prefixes for s in _STR_NOT_BEGIN: if v[:len(s)] == s: return False # Safe otherwise return True
f947f50ed6b879a960205c41507b26e9c89241b7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7272/f947f50ed6b879a960205c41507b26e9c89241b7/safe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 291, 67, 1080, 67, 4626, 12, 90, 4672, 3536, 411, 10262, 4150, 34, 13074, 309, 279, 533, 353, 4183, 2511, 603, 326, 2553, 2931, 18, 225, 411, 4628, 34, 331, 30, 432, 460, 358, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 291, 67, 1080, 67, 4626, 12, 90, 4672, 3536, 411, 10262, 4150, 34, 13074, 309, 279, 533, 353, 4183, 2511, 603, 326, 2553, 2931, 18, 225, 411, 4628, 34, 331, 30, 432, 460, 358, 8...
return hash_combine(self.__class__, self.aggregate, self.index)
return hash_combine(self.__class__, self.aggregate, self.name)
def __hash__(self): from pytools import hash_combine return hash_combine(self.__class__, self.aggregate, self.index)
1d6e285f5b695ec3b883eff0af7d507217a92ee0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12571/1d6e285f5b695ec3b883eff0af7d507217a92ee0/primitives.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2816, 972, 12, 2890, 4672, 628, 2395, 6642, 1930, 1651, 67, 14082, 327, 1651, 67, 14082, 12, 2890, 16186, 1106, 972, 16, 365, 18, 18573, 16, 365, 18, 1615, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2816, 972, 12, 2890, 4672, 628, 2395, 6642, 1930, 1651, 67, 14082, 327, 1651, 67, 14082, 12, 2890, 16186, 1106, 972, 16, 365, 18, 18573, 16, 365, 18, 1615, 13, 2, -100, -100, -10...
t.append(Val_Str.mk(line))
t.append(Val_Str.mk(program))
def delay_callback(self): # Read string from terminal and send it in a tuple line = raw_input("P2 Terminal >> ") t = Tuple.mk() t.append(Val_Str.mk("overlog")) t.append(Val_Str.mk(address)) t.append(Val_Str.mk(line)) t.freeze() if self.py_push(0, t, self.callback) > 0: self.set_delay(1, self.delay_callback)
f7a03c90e8948849c5fb99491857bbcef534f0fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/929/f7a03c90e8948849c5fb99491857bbcef534f0fe/terminal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4624, 67, 3394, 12, 2890, 4672, 468, 2720, 533, 628, 8651, 471, 1366, 518, 316, 279, 3193, 980, 273, 1831, 67, 2630, 2932, 52, 22, 18778, 1671, 9369, 268, 273, 7257, 18, 24816, 1435, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4624, 67, 3394, 12, 2890, 4672, 468, 2720, 533, 628, 8651, 471, 1366, 518, 316, 279, 3193, 980, 273, 1831, 67, 2630, 2932, 52, 22, 18778, 1671, 9369, 268, 273, 7257, 18, 24816, 1435, 2...
"""Edit object properties via the web."""
"""Edit object properties via the web. The purpose of this method is to change all property values, even those not listed in REQUEST; otherwise checkboxes that get turned off will be ignored. Use manage_changeProperties() instead for most situations. """
def manage_editProperties(self, REQUEST): """Edit object properties via the web.""" for prop in self._properties: name=prop['id'] if REQUEST.has_key(name): if 'w' in prop.get('mode', 'wd'): value=REQUEST.get(name) self._setPropValue(name, value) return MessageDialog( title ='Success!', message='Your changes have been saved', action ='manage_propertiesForm')
0006e835a6b11991b010c8b10351aa33c74c5138 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/0006e835a6b11991b010c8b10351aa33c74c5138/PropertyManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 4619, 2297, 12, 2890, 16, 12492, 4672, 3536, 4666, 733, 1790, 3970, 326, 3311, 18, 1021, 13115, 434, 333, 707, 353, 358, 2549, 777, 1272, 924, 16, 5456, 5348, 486, 12889, 316,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 4619, 2297, 12, 2890, 16, 12492, 4672, 3536, 4666, 733, 1790, 3970, 326, 3311, 18, 1021, 13115, 434, 333, 707, 353, 358, 2549, 777, 1272, 924, 16, 5456, 5348, 486, 12889, 316,...
self.p2p_routes = {}
self.p2p_routes = {} self.p2p_lock = thread.allocate_lock()
def __init__(self, agentjid, serverplatform, p2p=True): """ inits an agent with a JID (user@server) and a platform JID (acc.platformserver) """ MessageReceiver.MessageReceiver.__init__(self) self._aid = AID.aid(name=agentjid, addresses=[ "xmpp://"+agentjid ]) self._jabber = None self._serverplatform = serverplatform self._defaultbehaviour = None self._behaviourList = dict() self._alive = True self._alivemutex = mutex.mutex() self._forceKill = threading.Event() self._forceKill.clear() self.JID=agentjid self.setName(str(agentjid))
9f0b7c0364d086fd6fa03dbe1cb839f880130866 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10121/9f0b7c0364d086fd6fa03dbe1cb839f880130866/Agent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4040, 18252, 16, 1438, 9898, 16, 293, 22, 84, 33, 5510, 4672, 3536, 1208, 87, 392, 4040, 598, 279, 804, 734, 261, 1355, 36, 3567, 13, 471, 279, 4072, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4040, 18252, 16, 1438, 9898, 16, 293, 22, 84, 33, 5510, 4672, 3536, 1208, 87, 392, 4040, 598, 279, 804, 734, 261, 1355, 36, 3567, 13, 471, 279, 4072, 8...
assert not unsortable, "unhandled unsortable edges occured"
if unsortable: raise RuntimeError("unhandled unsortable edges occured (%s)" % unsortable)
def _handleUnsortable(map, unsortable): # remove unsortable self-loops (most likely flowlines which # did not get far and were connected to the startNode by # addFlowLinesToMap()) for group in unsortable: i = 0 while i < len(group): dart = map.dart(group[i]) if dart.edge().isLoop() and -dart.label() in group: group.remove(dart.label()) group.remove(-dart.label()) else: i += 1 try: while True: unsortable.remove([]) except ValueError: pass assert not unsortable, "unhandled unsortable edges occured"
3fbd5952ed89ef538cabccf296c3056711c85e70 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10394/3fbd5952ed89ef538cabccf296c3056711c85e70/maputils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4110, 984, 27236, 12, 1458, 16, 640, 27236, 4672, 468, 1206, 640, 27236, 365, 17, 383, 4473, 261, 10329, 10374, 4693, 3548, 1492, 468, 5061, 486, 336, 10247, 471, 4591, 5840, 358, 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, 389, 4110, 984, 27236, 12, 1458, 16, 640, 27236, 4672, 468, 1206, 640, 27236, 365, 17, 383, 4473, 261, 10329, 10374, 4693, 3548, 1492, 468, 5061, 486, 336, 10247, 471, 4591, 5840, 358, 3...
path = [] steps = []
def toTuple(dictionary): return tuple([(bone, pos) for bone, pos in dictionary.iteritems()])
e5c3fdf9d416a244ef9ba1d87c02cab4bedd36d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/e5c3fdf9d416a244ef9ba1d87c02cab4bedd36d0/Algorithms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 9038, 12, 15556, 4672, 327, 3193, 3816, 12, 19930, 16, 949, 13, 364, 30823, 16, 949, 316, 3880, 18, 2165, 3319, 1435, 5717, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 9038, 12, 15556, 4672, 327, 3193, 3816, 12, 19930, 16, 949, 13, 364, 30823, 16, 949, 316, 3880, 18, 2165, 3319, 1435, 5717, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if isinstance(latex, unicode): latex = latex.encode('utf-8')
def render_math(self, math): """ Render the LaTeX math expression *math* using latex and dvipng. Return the filename relative to the built document and the "depth", that is, the distance of image bottom and baseline in pixels, if the option to use preview_latex is switched on. Error handling may seem strange, but follows a pattern: if LaTeX or dvipng aren't available, only a warning is generated (since that enables people on machines without these programs to at least build the rest of the docs successfully). If the programs are there, however, they may not fail since that indicates a problem in the math source. """ use_preview = self.builder.config.pngmath_use_preview shasum = "%s.png" % sha(math.encode('utf-8')).hexdigest() relfn = posixpath.join(self.builder.imgpath, 'math', shasum) outfn = path.join(self.builder.outdir, '_images', 'math', shasum) if path.isfile(outfn): depth = read_png_depth(outfn) return relfn, depth # if latex or dvipng has failed once, don't bother to try again if hasattr(self.builder, '_mathpng_warned_latex') or \ hasattr(self.builder, '_mathpng_warned_dvipng'): return None, None latex = DOC_HEAD + self.builder.config.pngmath_latex_preamble latex += (use_preview and DOC_BODY_PREVIEW or DOC_BODY) % math if isinstance(latex, unicode): latex = latex.encode('utf-8') # use only one tempdir per build -- the use of a directory is cleaner # than using temporary files, since we can clean up everything at once # just removing the whole directory (see cleanup_tempdir) if not hasattr(self.builder, '_mathpng_tempdir'): tempdir = self.builder._mathpng_tempdir = tempfile.mkdtemp() else: tempdir = self.builder._mathpng_tempdir tf = open(path.join(tempdir, 'math.tex'), 'w') tf.write(latex) tf.close() # build latex command; old versions of latex don't have the # --output-directory option, so we have to manually chdir to the # temp dir to run it. ltx_args = [self.builder.config.pngmath_latex, '--interaction=nonstopmode'] # add custom args from the config file ltx_args.extend(self.builder.config.pngmath_latex_args) ltx_args.append('math.tex') curdir = getcwd() chdir(tempdir) try: try: p = Popen(ltx_args, stdout=PIPE, stderr=PIPE) except OSError, err: if err.errno != ENOENT: # No such file or directory raise self.builder.warn('LaTeX command %r cannot be run (needed for math ' 'display), check the pngmath_latex setting' % self.builder.config.pngmath_latex) self.builder._mathpng_warned_latex = True return None, None finally: chdir(curdir) stdout, stderr = p.communicate() if p.returncode != 0: raise MathExtError('latex exited with error:\n[stderr]\n%s\n' '[stdout]\n%s' % (stderr, stdout)) ensuredir(path.dirname(outfn)) # use some standard dvipng arguments dvipng_args = [self.builder.config.pngmath_dvipng] dvipng_args += ['-o', outfn, '-T', 'tight', '-z9'] # add custom ones from config value dvipng_args.extend(self.builder.config.pngmath_dvipng_args) if use_preview: dvipng_args.append('--depth') # last, the input file name dvipng_args.append(path.join(tempdir, 'math.dvi')) try: p = Popen(dvipng_args, stdout=PIPE, stderr=PIPE) except OSError, err: if err.errno != ENOENT: # No such file or directory raise self.builder.warn('dvipng command %r cannot be run (needed for math ' 'display), check the pngmath_dvipng setting' % self.builder.config.pngmath_dvipng) self.builder._mathpng_warned_dvipng = True return None, None stdout, stderr = p.communicate() if p.returncode != 0: raise MathExtError('dvipng exited with error:\n[stderr]\n%s\n' '[stdout]\n%s' % (stderr, stdout)) depth = None if use_preview: for line in stdout.splitlines(): m = depth_re.match(line) if m: depth = int(m.group(1)) write_png_depth(outfn, depth) break return relfn, depth
910e5df189ed8267e664a211577f88647efcba45 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7032/910e5df189ed8267e664a211577f88647efcba45/pngmath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 15949, 12, 2890, 16, 4233, 4672, 3536, 6987, 326, 21072, 21575, 60, 4233, 2652, 380, 15949, 14, 1450, 25079, 471, 302, 522, 6446, 18, 225, 2000, 326, 1544, 3632, 358, 326, 6650...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 15949, 12, 2890, 16, 4233, 4672, 3536, 6987, 326, 21072, 21575, 60, 4233, 2652, 380, 15949, 14, 1450, 25079, 471, 302, 522, 6446, 18, 225, 2000, 326, 1544, 3632, 358, 326, 6650...
iAVSwitch.setWSS(configElement.value)
iAVSwitch.setAspectWSS()
def setWSS(configElement): iAVSwitch.setWSS(configElement.value)
05626c8692bb0775f993ee23494926b21c266eac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/05626c8692bb0775f993ee23494926b21c266eac/AVSwitch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 59, 1260, 12, 1425, 1046, 4672, 277, 5856, 10200, 18, 542, 59, 1260, 12, 1425, 1046, 18, 1132, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 59, 1260, 12, 1425, 1046, 4672, 277, 5856, 10200, 18, 542, 59, 1260, 12, 1425, 1046, 18, 1132, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
@unittest2.expectedFailure
def test_with_dsym_and_expr_parser(self): """Test 'frame variable this' and 'expr this' when stopped inside a constructor.""" self.buildDsym() self.class_types_expr_parser()
cccd506284b9373b42a00c366b1f011f8527a9a0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11986/cccd506284b9373b42a00c366b1f011f8527a9a0/TestClassTypes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1918, 67, 2377, 2942, 67, 464, 67, 8638, 67, 4288, 12, 2890, 4672, 3536, 4709, 296, 3789, 2190, 333, 11, 471, 296, 8638, 333, 11, 1347, 9627, 4832, 279, 3885, 12123, 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, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1918, 67, 2377, 2942, 67, 464, 67, 8638, 67, 4288, 12, 2890, 4672, 3536, 4709, 296, 3789, 2190, 333, 11, 471, 296, 8638, 333, 11, 1347, 9627, 4832, 279, 3885, 12123, 365, 18,...
file=open(fileName,'a') last=None for node in net: if last!=None: if net[last,node]==0: file.write(str(node)+"\t"+str(last)+"\t"+str(self.epsilon)+"\n") last=node file.close()
with open(fileName,'a') as f: last=None for node in net: if last!=None: if net[last,node]==0: file.write(str(node)+"\t"+str(last)+"\t" +str(self.epsilon)+"\n") last=node
def _writeEpsilonEdges(self,net,fileName): """Obsolete! Replaced by augmentNet, which generates a new network with the epsilon edges directly added. No need for rewriting to any file; EdgeWeightFilter is always used. """ file=open(fileName,'a') last=None for node in net: if last!=None: if net[last,node]==0: file.write(str(node)+"\t"+str(last)+"\t"+str(self.epsilon)+"\n") last=node file.close()
7e1a9ccb3fe5f2f6ab3821cdb0498ac430401ba5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/768/7e1a9ccb3fe5f2f6ab3821cdb0498ac430401ba5/visuals.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 29889, 10327, 10697, 12, 2890, 16, 2758, 16, 17812, 4672, 3536, 27637, 19513, 5, 6910, 72, 635, 18260, 7308, 16, 1492, 6026, 279, 394, 2483, 598, 326, 12263, 5231, 5122, 3096, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2626, 29889, 10327, 10697, 12, 2890, 16, 2758, 16, 17812, 4672, 3536, 27637, 19513, 5, 6910, 72, 635, 18260, 7308, 16, 1492, 6026, 279, 394, 2483, 598, 326, 12263, 5231, 5122, 3096, ...
or self.clustersCurrent == None:
or self.clustersCurrent == None:
def clusterFastaIterative(self, fastaIn=None, simCut=1.75, lenCut=0.9, ncpu=1 ): """ Run cluterFasta iteratively, with tighter clustering settings, until the number of clusters are less than self.clusterLimit.
192f7ffa922aed1ead1fed83d7e0b2a4faaea9b9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/482/192f7ffa922aed1ead1fed83d7e0b2a4faaea9b9/SequenceSearcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2855, 12305, 69, 2360, 1535, 12, 2890, 16, 13104, 382, 33, 7036, 16, 3142, 15812, 33, 21, 18, 5877, 16, 562, 15812, 33, 20, 18, 29, 16, 290, 11447, 33, 21, 262, 30, 3536, 1939, 927, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2855, 12305, 69, 2360, 1535, 12, 2890, 16, 13104, 382, 33, 7036, 16, 3142, 15812, 33, 21, 18, 5877, 16, 562, 15812, 33, 20, 18, 29, 16, 290, 11447, 33, 21, 262, 30, 3536, 1939, 927, ...
status.append ('connected')
status.append('connected')
def __repr__ (self): status = [self.__class__.__module__+"."+self.__class__.__name__] if self.accepting and self.addr: status.append ('listening') elif self.connected: status.append ('connected') if self.addr is not None: try: status.append ('%s:%d' % self.addr) except TypeError: status.append (repr(self.addr)) return '<%s at %#x>' % (' '.join (status), id (self))
79991224d1b5f3a4ab074ddac83ef59addf853be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/79991224d1b5f3a4ab074ddac83ef59addf853be/asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 261, 2890, 4672, 1267, 273, 306, 2890, 16186, 1106, 972, 16186, 2978, 972, 9078, 1199, 15, 2890, 16186, 1106, 972, 16186, 529, 972, 65, 309, 365, 18, 9436, 310, 471, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 261, 2890, 4672, 1267, 273, 306, 2890, 16186, 1106, 972, 16186, 2978, 972, 9078, 1199, 15, 2890, 16186, 1106, 972, 16186, 529, 972, 65, 309, 365, 18, 9436, 310, 471, 36...
import SOM
def create_2D_dist(som, *args, **kwargs): """ This function takes a SOM of single spectrum with energy transfer axes and rebins those axes to a given axis and converts the spectra into a single I(Q,E) spectrum. Parameters: ---------- -> som is the input SOM with energy transfer axis SOs -> *args is a mandatory list of axes for rebinning. There is a particular order to them. They should be present in the following order: Without errors 1. Energy transfer 2. Momentum transfer With errors 1. Energy transfer 2. Energy transfer error^2 3. Momentum transfer 4. Momentum transfer error ^2 -> **kwargs is a dictionary of optional keywords that pass information to the function. Here are the currently accepted keywords: - withXVar=<string>. The string will either be True or False. If the keyword is not present, the default value will be False - data_type=<string> The string can be either histogram, density or coordinate. If the keyword is not present, the default value will be histogram - so_id=<identifier> The identifier represents a number, string, tuple or other object that describes the resulting SO - y_label=<string> This is a string that sets the y axis label - y_units=<string> This is a string that sets the y axis units - x_labels=<list of strings> This is a list of strings that sets the individual x axes labels - x_units=<list of string> This is a list of strings that sets the individual x axes units Returns: ------- <- A SOM with a single 2D SO with E and Q axes Exceptions: ---------- <- RuntimeError is raised if the parameter given to the keyword argument withXVar is not True or False <- RuntimeError is raised if the parameter given to the keyword argument data_type is not histogram or density or coordinate <- RuntimeError is raised is the number of given arguments (x-axes) is not either 2 (no errors) or 4 (with errors) """ import common_lib import hlr_utils import nessi_list import SOM # Setup some variables dim = 2 N_y = [] N_tot = 1 N_args = len(args) # Check withXVar keyword argument and also check number of given args. # Set xvar and Q_pos (position of the momentum transfer axis in the args # list) to the appropriate values try: value = kwargs["withXVar"] if value.lower() == "true": if N_args != 4: raise RuntimeError("Since you have requested x errors, 4 x "\ +"axes must be provided.") else: xvar = True Q_pos = 2 elif value.lower() == "false": if N_args != 2: raise RuntimeError("Since you did not requested x errors, 2 "\ +"x axes must be provided.") else: xvar = False Q_pos = 1 else: raise RuntimeError("Do not understand given parameter %s" % \ value) except KeyError: if N_args != 2: raise RuntimeError("Since you did not requested x errors, 2 "\ +"x axes must be provided.") else: xvar = False Q_pos = 1 # Check dataType keyword argument. An offset will be set to 1 for the # histogram type and 0 for either density or coordinate try: data_type = kwargs["data_type"] if data_type.lower() == "histogram": offset = 1 elif data_type.lower() == "density" or \ data_type.lower() == "coordinate": offset = 0 else: raise RuntimeError("Do not understand data type given: %s" % \ data_type) # Default is offset for histogram except KeyError: offset = 1 so_dim = SOM.SO(dim) for i in range(dim): # Set the x-axis arguments from the *args list into the new SO if not xvar: # Axis positions are 1 (Q) and 0 (E) position = dim - i - 1 so_dim.axis[i].val = args[position] else: # Axis positions are 2 (Q), 3 (eQ), 0 (E), 1 (eE) position = dim - 2 * i so_dim.axis[i].val = args[position] so_dim.axis[i].var = args[position + 1] # Set individual value axis sizes (not x-axis size) N_y.append(len(args[position]) - offset) # Calculate total 2D array size N_tot = N_tot * N_y[-1] # Create y and var_y lists from total 2D size so_dim.y = nessi_list.NessiList(N_tot) so_dim.var_y = nessi_list.NessiList(N_tot) # Rebin data to E axis som_1 = common_lib.rebin_axis_1D(som, args[0]) som = None del som inst = som_1.attr_list.instrument lambda_final = som_1.attr_list["Wavelength_final"] import array_manip import axis_manip for i in range(hlr_utils.get_length(som_1)): # Find Q for pixel so = hlr_utils.get_value(som_1, i, "SOM", "all") (angle, angle_err2) = hlr_utils.get_parameter("polar", so, inst) l_f = hlr_utils.get_special(lambda_final, so) Q = axis_manip.wavelength_to_scalar_Q(l_f[0], l_f[1], angle / 2.0, angle_err2 / 2.0) # Find Q value in given momentum transfer axis index = -1 for j in range(N_y[0]): if Q[0] >= args[Q_pos][j] and Q[0] < args[Q_pos][j + 1]: index = j break if index != -1: start = index * N_y[1] finish = (index + 1) * N_y[1] length = finish - start + 1 val = hlr_utils.get_value(som_1, i, "SOM") err2 = hlr_utils.get_err2(som_1, i, "SOM") (so_dim.y, so_dim.var_y) = array_manip.add_ncerr(so_dim.y, so_dim.var_y, val, err2, a_start=start, b_size=length) # If the Q value is not found in the given axis, do nothing and # continue else: pass # Check for so_id keyword argument if kwargs.has_key("so_id"): so_dim.id = kwargs["so_id"] else: so_dim.id = 0 comb_som = SOM.SOM() comb_som.copyAttributes(som_1) # Check for y_label keyword argument if kwargs.has_key("y_label"): comb_som.setYLabel(kwargs["y_label"]) else: comb_som.setYLabel("Counts") # Check for y_units keyword argument if kwargs.has_key("y_units"): comb_som.setYUnits(kwargs["y_units"]) else: comb_som.setYUnits("Counts / THz A^-1") # Check for x_labels keyword argument if kwargs.has_key("x_labels"): comb_som.setAllAxisLabels(kwargs["x_labels"]) else: comb_som.setAllAxisLabels(["Momentum transfer", "Energy transfer"]) # Check for x_units keyword argument if kwargs.has_key("x_units"): comb_som.setAllAxisUnits(kwargs["x_units"]) else: comb_som.setAllAxisUnits(["A^-1", "THz"]) comb_som.append(so_dim) return comb_som
0d62ab63d145e77ab0f2b846ab7e78dc6b7f00d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/763/0d62ab63d145e77ab0f2b846ab7e78dc6b7f00d1/hlr_create_2D_dist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 22, 40, 67, 4413, 12, 87, 362, 16, 380, 1968, 16, 2826, 4333, 4672, 3536, 1220, 445, 5530, 279, 348, 1872, 434, 2202, 17970, 598, 12929, 7412, 6515, 471, 283, 11862, 5348, 651...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 22, 40, 67, 4413, 12, 87, 362, 16, 380, 1968, 16, 2826, 4333, 4672, 3536, 1220, 445, 5530, 279, 348, 1872, 434, 2202, 17970, 598, 12929, 7412, 6515, 471, 283, 11862, 5348, 651...
data = cPickle.dumps(value, self.binary)
data = _dumps(value, self.protocol)
def get_both(self, key, value, txn=None, flags=0): data = cPickle.dumps(value, self.binary) data = self.db.get(key, data, txn, flags) return cPickle.loads(data)
05cf33361140b3644eb30c58a1a0d669441bd7ec /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/05cf33361140b3644eb30c58a1a0d669441bd7ec/dbshelve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 18237, 12, 2890, 16, 498, 16, 460, 16, 7827, 33, 7036, 16, 2943, 33, 20, 4672, 501, 273, 389, 13302, 1121, 12, 1132, 16, 365, 18, 8373, 13, 501, 273, 365, 18, 1966, 18, 58...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 18237, 12, 2890, 16, 498, 16, 460, 16, 7827, 33, 7036, 16, 2943, 33, 20, 4672, 501, 273, 389, 13302, 1121, 12, 1132, 16, 365, 18, 8373, 13, 501, 273, 365, 18, 1966, 18, 58...
args[:index] = processed
args = processed + args self._check_arg_limits(args)
def _process_args(self, args, variables): index = RUN_KW_REGISTER.get_args_to_process(self.library.orig_name, self.name) # Negative index means that this is not Run Keyword variant and all # arguments are processed normally if index < 0: args = self._replace_vars_from_args(args, variables) else: processed = self._replace_vars_from_args(args[:index], variables) # In case @{list} variable is unpacked, the arguments going further # needs to be escaped, otherwise those are unescaped twice. processed[index:] = [utils.escape(arg) for arg in processed[index:]] args[:index] = processed return args
426f74b21f3ce710b15f81ec97a56dcdecfa881c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7408/426f74b21f3ce710b15f81ec97a56dcdecfa881c/handlers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 67, 1968, 12, 2890, 16, 833, 16, 3152, 4672, 770, 273, 15484, 67, 30134, 67, 27511, 18, 588, 67, 1968, 67, 869, 67, 2567, 12, 2890, 18, 12083, 18, 4949, 67, 529, 16, 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, 389, 2567, 67, 1968, 12, 2890, 16, 833, 16, 3152, 4672, 770, 273, 15484, 67, 30134, 67, 27511, 18, 588, 67, 1968, 67, 869, 67, 2567, 12, 2890, 18, 12083, 18, 4949, 67, 529, 16, 365, ...
if c2pwrite is not None:
if c2pwrite != -1:
def _execute_child(self, args, executable, preexec_fn, close_fds, cwd, env, universal_newlines, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session): """Execute program (MS Windows version)"""
8e071675c0d21410d7a25e546097ff2af8ac1432 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/8e071675c0d21410d7a25e546097ff2af8ac1432/subprocess.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8837, 67, 3624, 12, 2890, 16, 833, 16, 9070, 16, 675, 4177, 67, 4293, 16, 1746, 67, 74, 2377, 16, 7239, 16, 1550, 16, 26182, 67, 31276, 16, 11850, 1376, 16, 6710, 7133, 16, 5972...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8837, 67, 3624, 12, 2890, 16, 833, 16, 9070, 16, 675, 4177, 67, 4293, 16, 1746, 67, 74, 2377, 16, 7239, 16, 1550, 16, 26182, 67, 31276, 16, 11850, 1376, 16, 6710, 7133, 16, 5972...
topic['name'] = self.language.labels['contents']
name = self.language.labels['contents']
def transform(self): topic = nodes.topic(CLASS='contents') title = self.startnode.details['title'] if self.startnode.details.has_key('local'): startnode = self.startnode.parent # @@@ generate an error if the startnode (directive) not at # section/document top-level? Drag it up until it is? while not isinstance(startnode, nodes.Structural): startnode = startnode.parent else: startnode = self.document if not title: title = nodes.title('', self.language.labels['contents']) contents = self.build_contents(startnode) if len(contents): if title: topic['name'] = title.astext() topic += title else: topic['name'] = self.language.labels['contents'] topic += contents self.startnode.parent.replace(self.startnode, topic) self.document.note_implicit_target(topic) else: self.startnode.parent.remove(self.startnode)
e56f06ff69bafa4c80dcdcf7a5ba9358e4484d4e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/e56f06ff69bafa4c80dcdcf7a5ba9358e4484d4e/parts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2510, 12, 2890, 4672, 3958, 273, 2199, 18, 10476, 12, 5237, 2218, 3980, 6134, 2077, 273, 365, 18, 1937, 2159, 18, 6395, 3292, 2649, 3546, 309, 365, 18, 1937, 2159, 18, 6395, 18, 5332, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2510, 12, 2890, 4672, 3958, 273, 2199, 18, 10476, 12, 5237, 2218, 3980, 6134, 2077, 273, 365, 18, 1937, 2159, 18, 6395, 3292, 2649, 3546, 309, 365, 18, 1937, 2159, 18, 6395, 18, 5332, ...
Subgroup of Mordell Weil group: [[-2:3:1], [-14:25:8], [1:-1:1]]
Subgroup of Mordell-Weil group: [[-2:3:1], [-14:25:8], [1:-1:1]]
def saturate(self, max_prime=-1, odd_primes_only=False): r""" Saturate this subgroup of the Mordell-Weil group. INPUT: - ``max_prime`` (int, default -1) -- saturation is performed for all primes up to `max_prime`. If `-1` (default) then an upper bound is computed for the primes at which the subgroup may not be saturated, and this is used; however, if the computed bound is greater than a value set by the eclib library (currently 97) then no saturation will be attempted at primes above this. - ``odd_primes_only`` (bool, default False) -- only do saturation at odd primes. (If the points have been found via 2-descent they should alreday be 2-saturated.)
1cc4edc9aafb88d044d853b60331d1432546cf60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1cc4edc9aafb88d044d853b60331d1432546cf60/interface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5942, 295, 340, 12, 2890, 16, 943, 67, 16382, 29711, 21, 16, 14800, 67, 683, 4485, 67, 3700, 33, 8381, 4672, 436, 8395, 25793, 295, 340, 333, 720, 1655, 434, 326, 490, 517, 1165, 17, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5942, 295, 340, 12, 2890, 16, 943, 67, 16382, 29711, 21, 16, 14800, 67, 683, 4485, 67, 3700, 33, 8381, 4672, 436, 8395, 25793, 295, 340, 333, 720, 1655, 434, 326, 490, 517, 1165, 17, ...
flopy_name = os.environ['KVM_TEST_floppy'] self.floppy_img = os.path.join(kvm_test_dir, flopy_name)
self.nfs_mount = tempfile.mkdtemp(prefix='nfs_', dir='/tmp') floppy_name = os.environ['KVM_TEST_floppy'] self.floppy_img = os.path.join(kvm_test_dir, floppy_name)
def __init__(self): """ Gets params from environment variables and sets class attributes. """ script_dir = os.path.dirname(sys.modules[__name__].__file__) kvm_test_dir = os.path.abspath(os.path.join(script_dir, "..")) images_dir = os.path.join(kvm_test_dir, 'images') self.deps_dir = os.path.join(kvm_test_dir, 'deps') self.unattended_dir = os.path.join(kvm_test_dir, 'unattended')
e61f7fe7afa5590c4f5dc8e0d1fd40bf590176a0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12268/e61f7fe7afa5590c4f5dc8e0d1fd40bf590176a0/unattended.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 3536, 11881, 859, 628, 3330, 3152, 471, 1678, 667, 1677, 18, 3536, 2728, 67, 1214, 273, 1140, 18, 803, 18, 12287, 12, 9499, 18, 6400, 63, 972, 529, 972...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3536, 11881, 859, 628, 3330, 3152, 471, 1678, 667, 1677, 18, 3536, 2728, 67, 1214, 273, 1140, 18, 803, 18, 12287, 12, 9499, 18, 6400, 63, 972, 529, 972...
if toreturn:
if refresh_nodes and toreturn:
def genealogic_search(nid): if nid not in genealogy: genealogy.append(nid) if self.has_node(nid): node = self.get_node(nid) for par in node.get_parents(): genealogic_search(par)
390884d8a7ede5c01c4231f95453224fbbeba30c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/390884d8a7ede5c01c4231f95453224fbbeba30c/tree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7529, 6238, 335, 67, 3072, 12, 31030, 4672, 309, 19416, 486, 316, 7529, 6238, 93, 30, 7529, 6238, 93, 18, 6923, 12, 31030, 13, 309, 365, 18, 5332, 67, 2159, 12, 31030, 4672, 756, 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, 7529, 6238, 335, 67, 3072, 12, 31030, 4672, 309, 19416, 486, 316, 7529, 6238, 93, 30, 7529, 6238, 93, 18, 6923, 12, 31030, 13, 309, 365, 18, 5332, 67, 2159, 12, 31030, 4672, 756, 273, ...
str(self.data.domain.classVar.name), str(self.data.domain.classVar[oi]), str(self.attributeName), key,key+self.subIntervalStep, self.probGraphValues[cn][1][oi]) self.tips.addToolTip(key+self.subIntervalStep/2.0, self.hdata[key]/2.0, text, self.subIntervalStep/2.0, self.hdata[key]/2.0)
str(self.data.domain.classVar.name), str(self.data.domain.classVar[oi]), str(self.attributeName), key,key+self.subIntervalStep, float(subBarHeight/sum(self.hdata[key]))) self.tips.addToolTip(key+self.subIntervalStep/2.0, currentBarsHeight[cn] + subBarHeight/2.0, text, self.subIntervalStep/2.0, subBarHeight/2.0)
def refreshVisibleOutcomes(self): if not self.data or not self.visibleOutcomes: return self.tips.removeAll() if self.pureHistogram: self.refreshPureVisibleOutcomes() return self.enableYRaxis(0) self.setAxisScale(QwtPlot.yRight, 0.0, 1.0, 0.1) self.setYRaxisTitle("") keys = self.hdata.keys() if self.variableContinuous: keys.sort()
04f6de6ae1114398b6e2d56e64d6b62873b0e304 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/04f6de6ae1114398b6e2d56e64d6b62873b0e304/OWDistributions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4460, 6207, 1182, 10127, 12, 2890, 4672, 309, 486, 365, 18, 892, 578, 486, 365, 18, 8613, 1182, 10127, 30, 327, 365, 18, 88, 7146, 18, 4479, 1595, 1435, 309, 365, 18, 84, 594, 12874, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4460, 6207, 1182, 10127, 12, 2890, 4672, 309, 486, 365, 18, 892, 578, 486, 365, 18, 8613, 1182, 10127, 30, 327, 365, 18, 88, 7146, 18, 4479, 1595, 1435, 309, 365, 18, 84, 594, 12874, ...
if(before.charAt(before.length-1) != "?") { //this won't match anything ending in ?
var last_char_before = before.charAt(before.length-1); if(last_char_before == "?") { replacing = false; } else {
def javascript(): s = r"""
daa727c433a308de8e7d01eca269552342324324 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/daa727c433a308de8e7d01eca269552342324324/js.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11341, 13332, 272, 273, 436, 8395, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 11341, 13332, 272, 273, 436, 8395, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
def _pam_conv(auth, query_list, user_data):
def _pam_conv(auth, query_list, user_data = None):
def _pam_conv(auth, query_list, user_data): resp = [] for i in range(len(query_list)): query, qtype = query_list[i] if qtype == PAM.PAM_PROMPT_ECHO_ON: resp.append((username, 0)) elif qtype == PAM.PAM_PROMPT_ECHO_OFF: resp.append((password, 0)) else: return None return resp
7fbc543a3d9c3045926ff58a62d83eb37c4f5f2f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6195/7fbc543a3d9c3045926ff58a62d83eb37c4f5f2f/XendAuthSessions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 84, 301, 67, 4896, 12, 1944, 16, 843, 67, 1098, 16, 729, 67, 892, 273, 599, 4672, 1718, 273, 5378, 364, 277, 316, 1048, 12, 1897, 12, 2271, 67, 1098, 3719, 30, 843, 16, 28056, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 84, 301, 67, 4896, 12, 1944, 16, 843, 67, 1098, 16, 729, 67, 892, 273, 599, 4672, 1718, 273, 5378, 364, 277, 316, 1048, 12, 1897, 12, 2271, 67, 1098, 3719, 30, 843, 16, 28056, ...
z = RR.pi() - z
z = pi - z
def elliptic_logarithm(self, embedding=None, precision=100, algorithm='pari'): """ Returns the elliptic logarithm of this elliptic curve point.
5dd4c17a0a9d2570d785b2551f4f0a68bc33b16e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/5dd4c17a0a9d2570d785b2551f4f0a68bc33b16e/ell_point.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 415, 549, 21507, 67, 1330, 31249, 12, 2890, 16, 15853, 33, 7036, 16, 6039, 33, 6625, 16, 4886, 2218, 1065, 77, 11, 4672, 3536, 2860, 326, 415, 549, 21507, 613, 31249, 434, 333, 415, 54...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 415, 549, 21507, 67, 1330, 31249, 12, 2890, 16, 15853, 33, 7036, 16, 6039, 33, 6625, 16, 4886, 2218, 1065, 77, 11, 4672, 3536, 2860, 326, 415, 549, 21507, 613, 31249, 434, 333, 415, 54...
For method docs, see each method's docstrings. In general, there is a method of the same name to perform each SMTP command, and there is a method called 'sendmail' that will do an entire mail transaction. """
See each method's docstrings for details. In general, there is a method of the same name to perform each SMTP command. There is also a method called 'sendmail' that will do an entire mail transaction. """
def quotedata(data): """Quote data for email. Double leading '.', and change Unix newline '\n', or Mac '\r' into Internet CRLF end-of-line. """ return re.sub(r'(?m)^\.', '..', re.sub(r'(?:\r\n|\n|\r(?!\n))', CRLF, data))
e01b9711d468595d7e3ccadaae7ba2cc3df096ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/e01b9711d468595d7e3ccadaae7ba2cc3df096ae/smtplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9298, 396, 12, 892, 4672, 3536, 10257, 501, 364, 2699, 18, 225, 3698, 7676, 2611, 16, 471, 2549, 9480, 9472, 2337, 82, 2187, 578, 13217, 2337, 86, 11, 1368, 21352, 21791, 679, 17, 792, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9298, 396, 12, 892, 4672, 3536, 10257, 501, 364, 2699, 18, 225, 3698, 7676, 2611, 16, 471, 2549, 9480, 9472, 2337, 82, 2187, 578, 13217, 2337, 86, 11, 1368, 21352, 21791, 679, 17, 792, ...
def getSpawnPoints(mapName):
def getSpawnPoints(_mapName):
def getSpawnPoints(mapName): # Reset the spawn points dict and check if there is a spawnpoint file global spawnPoints spawnPoints = {} spawnFile = getGameDir('cfg\\gungame\\spawnpoints\\%s.txt' % mapName) spawnPointsExist = os.path.isfile(spawnFile) # Does the spawn file exist if not spawnPointsExist: spawnPoints = 0 return # Load the file spawnPointFile = open(spawnFile, 'r') fileLines = spawnPointFile.readlines() i = 0 # Loop through the lines for line in fileLines: # Strip the line line = line.strip() # Split the line values = line.split(' ') # Get each value and put it into the spawnPoints dictionary spawnPoints[i] = values # Increment the amount of lines i += 1
7070b3e05ebe1fdf31bfc3e545e36739b5982556 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4575/7070b3e05ebe1fdf31bfc3e545e36739b5982556/gg_deathmatch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1322, 84, 9533, 5636, 12, 1458, 461, 4672, 468, 7151, 326, 12560, 3143, 2065, 471, 866, 309, 1915, 353, 279, 12560, 1153, 585, 2552, 12560, 5636, 12560, 5636, 273, 2618, 12560, 812, 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, 1322, 84, 9533, 5636, 12, 1458, 461, 4672, 468, 7151, 326, 12560, 3143, 2065, 471, 866, 309, 1915, 353, 279, 12560, 1153, 585, 2552, 12560, 5636, 12560, 5636, 273, 2618, 12560, 812, 273, ...
self.myException.msg = self.errmsg
def __init__( self, notChars, min=1, max=0, exact=0 ): super(CharsNotIn,self).__init__() self.skipWhitespace = False self.notChars = notChars self.minLen = min
bb0e6c1d8894ec4cade5f95640e793eeb8be8f10 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3693/bb0e6c1d8894ec4cade5f95640e793eeb8be8f10/pyparsing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 486, 7803, 16, 1131, 33, 21, 16, 943, 33, 20, 16, 5565, 33, 20, 262, 30, 2240, 12, 7803, 21855, 16, 2890, 2934, 972, 2738, 972, 1435, 365, 18, 7457, 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 486, 7803, 16, 1131, 33, 21, 16, 943, 33, 20, 16, 5565, 33, 20, 262, 30, 2240, 12, 7803, 21855, 16, 2890, 2934, 972, 2738, 972, 1435, 365, 18, 7457, 9...
if i and i.dropEnabled():
if i and i.dropEnabled() and i != self.oldCurrent:
def contentsDragMoveEvent(self, e): vp = self.contentsToViewport(e.pos()) i = self.itemAt( vp ) droppable = True if i and i.dropEnabled(): for child in self.descendants: if child == i: droppable = False break if droppable: self.setSelected( i, True ) e.accept() e.acceptAction() else: e.ignore() else: e.ignore()
f80b1d58a644089f3524447747e01b95b8fbad1f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/f80b1d58a644089f3524447747e01b95b8fbad1f/modelTree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2939, 11728, 7607, 1133, 12, 2890, 16, 425, 4672, 18500, 273, 365, 18, 3980, 774, 22743, 12, 73, 18, 917, 10756, 277, 273, 365, 18, 1726, 861, 12, 18500, 262, 3640, 19586, 273, 1053, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2939, 11728, 7607, 1133, 12, 2890, 16, 425, 4672, 18500, 273, 365, 18, 3980, 774, 22743, 12, 73, 18, 917, 10756, 277, 273, 365, 18, 1726, 861, 12, 18500, 262, 3640, 19586, 273, 1053, 2...
)
ifdef='AF_PACKET')
'typedef unsigned __int32 uint32_t;',
214df338dd9e5eb75d85b65f919210ca9ed90668 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/214df338dd9e5eb75d85b65f919210ca9ed90668/_rsocket_rffi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 296, 723, 536, 9088, 1001, 474, 1578, 2254, 1578, 67, 88, 31, 2187, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 296, 723, 536, 9088, 1001, 474, 1578, 2254, 1578, 67, 88, 31, 2187, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
else:
else:
def run_doctest(infile="-", txt2code=True, globs={}, verbose=False, optionflags=0, **keyw): """run doctest on the text source """
6298e01579e8917b7d42c1bc1af5b0a3dda46ba8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2348/6298e01579e8917b7d42c1bc1af5b0a3dda46ba8/pylit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 2896, 299, 395, 12, 267, 768, 1546, 17, 3113, 6463, 22, 710, 33, 5510, 16, 4715, 87, 28793, 3988, 33, 8381, 16, 1456, 7133, 33, 20, 16, 2826, 856, 91, 4672, 3536, 2681, 312...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 2896, 299, 395, 12, 267, 768, 1546, 17, 3113, 6463, 22, 710, 33, 5510, 16, 4715, 87, 28793, 3988, 33, 8381, 16, 1456, 7133, 33, 20, 16, 2826, 856, 91, 4672, 3536, 2681, 312...
self.timer = QTimer(self) self.connect(self.timer, QtCore.SIGNAL('timeout()'), self.onTimer)
def getGps(self, reg="R00"): res = self.dev.sendCmd("INF", "GPS", reg) return self.dev.getValueFromResult(res)
def __init__(self, device=None): QtGui.QWidget.__init__(self) self.obj = Ui_Basic() self.obj.setupUi(self) self.dev = device
2b5dbfb17c8f2104784d4d34e61df65329a53dc9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3758/2b5dbfb17c8f2104784d4d34e61df65329a53dc9/tamerdevice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2346, 33, 7036, 4672, 23425, 18, 53, 4609, 16186, 2738, 972, 12, 2890, 13, 365, 18, 2603, 273, 22597, 67, 8252, 1435, 365, 18, 2603, 18, 8401, 13943, 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, 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, 2346, 33, 7036, 4672, 23425, 18, 53, 4609, 16186, 2738, 972, 12, 2890, 13, 365, 18, 2603, 273, 22597, 67, 8252, 1435, 365, 18, 2603, 18, 8401, 13943, 12,...
self.write(cr, uid, ids, {'state': 'confirmed'})
val = self.pool.get('ir.sequence').get(cr, uid, 'stock.picking') self.write(cr, uid, ids, {'name': val, 'state': 'confirmed'})
def action_confirm(self, cr, uid, ids, context={}): self.write(cr, uid, ids, {'state': 'confirmed'}) todo = [] for picking in self.browse(cr, uid, ids): for r in picking.move_lines: if r.state=='draft': todo.append(r.id) todo = self.action_explode(cr, uid, todo, context) if len(todo): self.pool.get('stock.move').action_confirm(cr, uid, todo, context) return True
442bba25c76a02cfb71c0df8dcad319ed2ad7c02 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/442bba25c76a02cfb71c0df8dcad319ed2ad7c02/stock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 10927, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 1244, 273, 365, 18, 6011, 18, 588, 2668, 481, 18, 6178, 16063, 588, 12, 3353, 16, 4555, 16, 296, 15381, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 10927, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 1244, 273, 365, 18, 6011, 18, 588, 2668, 481, 18, 6178, 16063, 588, 12, 3353, 16, 4555, 16, 296, 15381, ...
req = "%s (%d,%d,UTC_TIMESTAMP(),UTC_TIMESTAMP())," % (req,transID,fileID) req = req.rstrip(',') res = self._update(req,connection) if not res['OK']: return res return S_OK(fileIDs) def __addExistingFiles(self,transID,connection=False):
req = "%s (%d,%d,UTC_TIMESTAMP(),UTC_TIMESTAMP())," % ( req, transID, fileID ) req = req.rstrip( ',' ) res = self._update( req, connection ) if not res['OK']: return res return S_OK( fileIDs ) def __addExistingFiles( self, transID, connection = False ):
def __addFilesToTransformation(self,transID,fileIDs,connection=False): req = "SELECT FileID from TransformationFiles WHERE TransformationID = %d AND FileID IN (%s);" % (transID,intListToString(fileIDs)) res = self._query(req,connection) if not res['OK']: return res for tuple in res['Value']: fileIDs.remove(tuple[0]) if not fileIDs: return S_OK([]) req = "INSERT INTO TransformationFiles (TransformationID,FileID,LastUpdate,InsertedTime) VALUES" for fileID in fileIDs: req = "%s (%d,%d,UTC_TIMESTAMP(),UTC_TIMESTAMP())," % (req,transID,fileID) req = req.rstrip(',') res = self._update(req,connection) if not res['OK']: return res return S_OK(fileIDs)
9ad007ea503b29694fc081c1646b7c5ecd07b1f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9ad007ea503b29694fc081c1646b7c5ecd07b1f2/TransformationDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1289, 2697, 774, 15292, 12, 2890, 16, 2338, 734, 16, 768, 5103, 16, 4071, 33, 8381, 4672, 1111, 273, 315, 4803, 1387, 734, 628, 21274, 2697, 4852, 21274, 734, 273, 738, 72, 4116, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1289, 2697, 774, 15292, 12, 2890, 16, 2338, 734, 16, 768, 5103, 16, 4071, 33, 8381, 4672, 1111, 273, 315, 4803, 1387, 734, 628, 21274, 2697, 4852, 21274, 734, 273, 738, 72, 4116, ...
args=n+1
def search(self, text, start=0, name_match=regex.compile('[\0- ]*[a-zA-Z]+[\0- ]*').match, end_match=regex.compile('[\0- ]*\(/\|end\)', regex.casefold).match, start_search=regex.compile('[<&]').search, ent_name=regex.compile('[-a-zA-Z0-9_.]+').match, find=find, strip=strip ):
626960a1479cc325517d37bcbdbb2eb488e228f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/626960a1479cc325517d37bcbdbb2eb488e228f2/DT_HTML.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 977, 16, 787, 33, 20, 16, 508, 67, 1916, 33, 7584, 18, 11100, 2668, 7438, 20, 17, 308, 26625, 69, 17, 9600, 17, 62, 3737, 7438, 20, 17, 308, 4035, 2934, 1916, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 977, 16, 787, 33, 20, 16, 508, 67, 1916, 33, 7584, 18, 11100, 2668, 7438, 20, 17, 308, 26625, 69, 17, 9600, 17, 62, 3737, 7438, 20, 17, 308, 4035, 2934, 1916, 1...
self.forcecloseonsinsert = 1
self.forcecloseoninsert = 1
def __call__(self): context = aq_inner(self.context) request = aq_inner(self.request) session = request.get('SESSION', None) self.showbreadcrumbs = request.get('showbreadcrumbs', self.showbreadcrumbs) self.setScopeInfos(context, request, self.showbreadcrumbs) # use self.multiselect = False (or multiselect = False in request) # when multiselect is False window is closed on insert self.multiselect = request.get('multiselect', self.multiselect) # to force close on insert even in multiselect mode self.forcecloseonsinsert = request.get('forcecloseonsinsert', self.forcecloseonsinsert) if not self.multiselect : self.forcecloseonsinsert = 1 # use self.types (or types in request) to specify portal_types in catalog request self.types = request.get('types', self.types) # use self.typeupload (or typeupload in request) to specify portal_type for upload self.typeupload = request.get('typeupload', self.typeupload) # use self.typefolder (or typefolder in request) to specify portal_type used to create folder self.typefolder = request.get('typefolder', self.typefolder) # use self.typeview (or typeview in request) to specify typeview ('file' or 'image' for now, 'selection' in future) self.typeview = request.get('typeview', self.typeview) if self.typeview == 'image' : self.typecss = 'float' # use self.browse=False (or browse=False in request) to disallow browsing self.browse = request.get('browse', self.browse)
e540a2cfd26b242ae3a221b2c7539d7ca9a70900 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9052/e540a2cfd26b242ae3a221b2c7539d7ca9a70900/finder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 4672, 225, 819, 273, 279, 85, 67, 7872, 12, 2890, 18, 2472, 13, 590, 273, 279, 85, 67, 7872, 12, 2890, 18, 2293, 13, 1339, 273, 590, 18, 588, 2668, 7042, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1991, 972, 12, 2890, 4672, 225, 819, 273, 279, 85, 67, 7872, 12, 2890, 18, 2472, 13, 590, 273, 279, 85, 67, 7872, 12, 2890, 18, 2293, 13, 1339, 273, 590, 18, 588, 2668, 7042, ...
properties = properties or {}
""" :Parameters: `id` : `tw` : int number of colums in cells `th` : int number of rows in cells `cells` : container that supports cells[i][j] elements are stored in column-major order with y increasing up `origin` : (int, int, int) cell block offset x,y,z ; default is (0,0,0) `properties` : dict arbitrary properties if saving to XML, keys must be unicode or 8-bit ASCII strings """ self.properties = properties or {}
def __init__(self, id, tw, th, cells, origin=None, properties=None): properties = properties or {} self.id = id self.tw, self.th = tw, th if origin is None: origin = (0, 0, 0) self.origin_x, self.origin_y, self.origin_z = origin self.cells = cells self.px_width = len(cells) * tw self.px_height = len(cells[0]) * th
2e06d70ef31509abf12bed31b10d8d5ac719e1ed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7473/2e06d70ef31509abf12bed31b10d8d5ac719e1ed/tiles.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 612, 16, 2339, 16, 286, 16, 5983, 16, 4026, 33, 7036, 16, 1790, 33, 7036, 4672, 3536, 294, 2402, 30, 1375, 350, 68, 294, 1375, 11246, 68, 294, 509, 130...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 612, 16, 2339, 16, 286, 16, 5983, 16, 4026, 33, 7036, 16, 1790, 33, 7036, 4672, 3536, 294, 2402, 30, 1375, 350, 68, 294, 1375, 11246, 68, 294, 509, 130...
l = '0' * 32 + hex(ip)[2:-1]
if sys.hexversion >= 0x03000000 l = hex(ip)[2:] else: l = hex(ip)[2:-1] l = l.zfill(32)
def intToIp(ip, version): """Transform an integer string into an IP address.""" # just to be sure and hoping for Python 2.22 ip = long(ip) if ip < 0: raise ValueError, "IPs can't be negative: %d" % (ip) ret = '' if version == 4: if ip > 0xffffffffL: raise ValueError, "IPv4 Addresses can't be larger than 0xffffffff: %s" % (hex(ip)) for l in xrange(4): ret = str(ip & 0xffL) + '.' + ret ip = ip >> 8 ret = ret[:-1] elif version == 6: if ip > 0xffffffffffffffffffffffffffffffffL: raise ValueError, "IPv6 Addresses can't be larger than 0xffffffffffffffffffffffffffffffff: %s" % (hex(ip)) l = '0' * 32 + hex(ip)[2:-1] for x in xrange(1, 33): ret = l[-x] + ret if x % 4 == 0: ret = ':' + ret ret = ret[1:] else: raise ValueError, "only IPv4 and IPv6 supported" return ret
c834e04f7b97f44382e3c538d373fb1095b517f9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14367/c834e04f7b97f44382e3c538d373fb1095b517f9/IPy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 509, 774, 5273, 12, 625, 16, 1177, 4672, 3536, 4059, 392, 3571, 533, 1368, 392, 2971, 1758, 12123, 225, 468, 2537, 358, 506, 3071, 471, 19055, 310, 364, 6600, 576, 18, 3787, 2359, 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, 509, 774, 5273, 12, 625, 16, 1177, 4672, 3536, 4059, 392, 3571, 533, 1368, 392, 2971, 1758, 12123, 225, 468, 2537, 358, 506, 3071, 471, 19055, 310, 364, 6600, 576, 18, 3787, 2359, 273, ...
... xmin=0, ymin=-1, xmax=3, ymax=1, figsize=[2,1])
... xmin=0, ymin=-1, xmax=3, ymax=1, figsize=[2,1])
def __add__(self, other): """ Add two animations. This has the effect of superimposing the two animinations frame-by-frame.
f4789762a95f5ca46886a066896eb6dfd2df3273 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/f4789762a95f5ca46886a066896eb6dfd2df3273/animate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1289, 972, 12, 2890, 16, 1308, 4672, 3536, 1436, 2795, 25536, 18, 225, 1220, 711, 326, 5426, 434, 2240, 381, 24014, 326, 2795, 10536, 10144, 2623, 17, 1637, 17, 3789, 18, 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, 1001, 1289, 972, 12, 2890, 16, 1308, 4672, 3536, 1436, 2795, 25536, 18, 225, 1220, 711, 326, 5426, 434, 2240, 381, 24014, 326, 2795, 10536, 10144, 2623, 17, 1637, 17, 3789, 18, 2, -100, ...
and self.peek(length+1) not in u'\0 \t\r\n\x28\u2028\u2029,[]{}'):
and self.peek(length+1) not in u'\0 \t\r\n\x85\u2028\u2029,[]{}'):
def scan_plain(self): # See the specification for details. # We add an additional restriction for the flow context: # plain scalars in the flow context cannot contain ',', ':' and '?'. # We also keep track of the `allow_simple_key` flag here. # Indentation rules are loosed for the flow context. chunks = [] start_mark = self.get_mark() end_mark = start_mark indent = self.indent+1 # We allow zero indentation for scalars, but then we need to check for # document separators at the beginning of the line. #if indent == 0: # indent = 1 spaces = [] while True: length = 0 if self.peek() == u'#': break while True: ch = self.peek(length) if ch in u'\0 \t\r\n\x85\u2028\u2029' \ or (not self.flow_level and ch == u':' and self.peek(length+1) in u'\0 \t\r\n\x28\u2028\u2029') \ or (self.flow_level and ch in u',:?[]{}'): break length += 1 # It's not clear what we should do with ':' in the flow context. if (self.flow_level and ch == u':' and self.peek(length+1) not in u'\0 \t\r\n\x28\u2028\u2029,[]{}'): self.forward(length) raise ScannerError("while scanning a plain scalar", start_mark, "found unexpected ':'", self.get_mark(), "Please check http://pyyaml.org/wiki/YAMLColonInFlowContext for details.") if length == 0: break self.allow_simple_key = False chunks.extend(spaces) chunks.append(self.prefix(length)) self.forward(length) end_mark = self.get_mark() spaces = self.scan_plain_spaces(indent, start_mark) if not spaces or self.peek() == u'#' \ or (not self.flow_level and self.column < indent): break return ScalarToken(u''.join(chunks), True, start_mark, end_mark)
c176ec00d6b00b8c2aac9d83b7d7979282d43b94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/94/c176ec00d6b00b8c2aac9d83b7d7979282d43b94/scanner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4135, 67, 7446, 12, 2890, 4672, 468, 2164, 326, 7490, 364, 3189, 18, 468, 1660, 527, 392, 3312, 9318, 364, 326, 4693, 819, 30, 468, 282, 7351, 23743, 316, 326, 4693, 819, 2780, 912, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4135, 67, 7446, 12, 2890, 4672, 468, 2164, 326, 7490, 364, 3189, 18, 468, 1660, 527, 392, 3312, 9318, 364, 326, 4693, 819, 30, 468, 282, 7351, 23743, 316, 326, 4693, 819, 2780, 912, 22...
PARITIES = (PARITY_NONE, PARITY_EVEN, PARITY_ODD)
PARITIES = (PARITY_NONE, PARITY_EVEN, PARITY_ODD, PARITY_MARK, PARITY_SPACE)
def __iter__(self): return self
08389a910a6098708fb05bf3b12c10c8dafc4eb6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10955/08389a910a6098708fb05bf3b12c10c8dafc4eb6/serialutil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2165, 972, 12, 2890, 4672, 327, 365, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2165, 972, 12, 2890, 4672, 327, 365, 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...
log_file_name = _LOG_PREFIX + time_str + '.txt'
if self._use_tls: log_prefix = _WSS_LOG_PREFIX else: log_prefix = _WS_LOG_PREFIX log_file_name = log_prefix + time_str + '.txt'
def Start(self): if not self._webkit_tests: logging.info('No need to start PyWebSocket server.') return if self.IsRunning(): raise PyWebSocketNotStarted('PyWebSocket is already running.')
1e7c64df25a5fd0d96d40455e10197ad34d0bbbe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/1e7c64df25a5fd0d96d40455e10197ad34d0bbbe/websocket_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3603, 12, 2890, 4672, 309, 486, 365, 6315, 29319, 67, 16341, 30, 2907, 18, 1376, 2668, 2279, 1608, 358, 787, 4707, 19217, 1438, 1093, 13, 327, 309, 365, 18, 2520, 7051, 13332, 1002, 4707...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3603, 12, 2890, 4672, 309, 486, 365, 6315, 29319, 67, 16341, 30, 2907, 18, 1376, 2668, 2279, 1608, 358, 787, 4707, 19217, 1438, 1093, 13, 327, 309, 365, 18, 2520, 7051, 13332, 1002, 4707...
self.__insert_at_mark(buff,end,"\n")
self.insert_at_mark(buff,end,"\n")
def write_subtask(self,buff,line_nbr,anchor) : start_i = buff.get_iter_at_line(line_nbr) start = buff.create_mark("start",start_i,True) end_i = start_i.copy() end_i.forward_line() end = buff.create_mark("end",end_i,False) buff.delete(start_i,end_i) bullet =' ↪ ' self.__insert_at_mark(buff,start,bullet) self.__apply_tag_to_mark(start,end,name="bullet") newline = self.get_subtasktitle(anchor) self.__insert_at_mark(buff,end,newline,anchor=anchor) #The invisible "subtask" tag #It must be the last tag set as it's around everything else tag = buff.create_tag(None) tag.set_data('is_subtask', True) tag.set_data('child',anchor) self.__apply_tag_to_mark(start,end,tag=tag) self.__insert_at_mark(buff,end,"\n") buff.delete_mark(start) buff.delete_mark(end)
d11a5d2913ab9ec9b969e632dab63720868ed791 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/d11a5d2913ab9ec9b969e632dab63720868ed791/taskview.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 1717, 4146, 12, 2890, 16, 20664, 16, 1369, 67, 82, 2848, 16, 16215, 13, 294, 787, 67, 77, 273, 6139, 18, 588, 67, 2165, 67, 270, 67, 1369, 12, 1369, 67, 82, 2848, 13, 787...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 1717, 4146, 12, 2890, 16, 20664, 16, 1369, 67, 82, 2848, 16, 16215, 13, 294, 787, 67, 77, 273, 6139, 18, 588, 67, 2165, 67, 270, 67, 1369, 12, 1369, 67, 82, 2848, 13, 787...
c.privmsg(target, "%s: %s" % (source, map(random.choice, lists)))
c.privmsg(target, "%s: %s" % (source, " ".join(map(random.choice, lists))))
def bullshit(c, source, target, argv): """Bullshit Generator""" list1 = ["implement", "utilize", "integrate", "streamline", "optimize", "evolve", "transform", "embrace", "enable", "orchestrate", "leverage", "reinvent", "aggregate", "architect", "enhance", "incentivize", "morph", "empower", "envisioneer", "monetize", "harness", "facilitate", "seize", "disintermediate", "synergize", "strategize", "deploy", "brand", "grow", "target", "syndicate", "synthesize", "deliver", "mesh", "incubate", "engage", "maximize", "benchmark", "expedite", "reintermediate", "whiteboard", "visualize", "repurpose", "innovate", "scale", "unleash", "drive", "extend", "engineer", "revolutionize", "generate", "exploit", "transition", "e-enable", "iterate", "cultivate", "matrix", "productize", "redefine", "recontextualize"] list2 = ["clicks-and-mortar", "value-added", "vertical", "proactive", "robust", "revolutionary", "scalable", "leading-edge", "innovative", "intuitive", "strategic", "e-business", "mission-critical", "sticky", "one-to-one", "24/7", "end-to-end", "global", "B2B", "B2C", "granular", "frictionless", "virtual", "viral", "dynamic", "24/365", "best-of-breed", "killer", "magnetic", "bleeding-edge", "web-enabled", "interactive", "dot-com", "sexy", "back-end", "real-time", "efficient", "front-end", "distributed", "seamless", "extensible", "turn-key", "world-class", "open-source", "cross-platform", "cross-media", "synergistic", "bricks-and-clicks", "out-of-the-box", "enterprise", "integrated", "impactful", "wireless", "transparent", "next-generation", "cutting-edge", "user-centric", "visionary", "customized", "ubiquitous", "plug-and-play", "collaborative", "compelling", "holistic", "rich"] list3 = ["synergies", "web-readiness", "paradigms", "markets", "partnerships", "infrastructures", "platforms", "initiatives", "channels", "eyeballs", "communities", "ROI", "solutions", "e-tailers", "e-services", "action-items", "portals", "niches", "technologies", "content", "vortals", "supply-chains", "convergence", "relationships", "architectures", "interfaces", "e-markets", "e-commerce", "systems", "bandwidth", "infomediaries", "models", "mindshare", "deliverables", "users", "schemas", "networks", "applications", "metrics", "e-business", "functionalities", "experiences", "web services", "methodologies"] lists = [list1, list2, list3] c.privmsg(target, "%s: %s" % (source, map(random.choice, lists)))
fbc6467fa32ce0eec76ee9b32093a901bb95ed5f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10627/fbc6467fa32ce0eec76ee9b32093a901bb95ed5f/events.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 420, 674, 305, 12, 71, 16, 1084, 16, 1018, 16, 5261, 4672, 3536, 38, 420, 674, 305, 10159, 8395, 666, 21, 273, 8247, 10442, 3113, 315, 1367, 554, 3113, 315, 14970, 5141, 3113, 315...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 420, 674, 305, 12, 71, 16, 1084, 16, 1018, 16, 5261, 4672, 3536, 38, 420, 674, 305, 10159, 8395, 666, 21, 273, 8247, 10442, 3113, 315, 1367, 554, 3113, 315, 14970, 5141, 3113, 315...
function. Right now it's pretty crude."""
function. Right now it's pretty crude."""
def toString(self): """Utility method for converting a Field to a string for the purpose of comparing fields. This comparison is used for determining whether a schema has changed in the auto update function. Right now it's pretty crude.""" # XXX fixme s = '%s(%s): {' % ( self.__class__.__name__, self.__name__ ) sorted_keys = self._properties.keys() sorted_keys.sort() for k in sorted_keys: value = getattr( self, k, self._properties[k] ) if k == 'widget': value = value.__class__.__name__ if type(value) is UnicodeType: value = value.encode('utf-8') s = s + '%s:%s,' % (k, value ) s = s + '}' return s
6bf0b4d803f7a6c42f16af81053d806d99f67096 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12165/6bf0b4d803f7a6c42f16af81053d806d99f67096/Field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1762, 12, 2890, 4672, 3536, 6497, 707, 364, 14540, 279, 2286, 358, 279, 533, 364, 326, 13115, 434, 17553, 1466, 18, 225, 1220, 5826, 353, 1399, 364, 23789, 2856, 279, 1963, 711, 3550, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1762, 12, 2890, 4672, 3536, 6497, 707, 364, 14540, 279, 2286, 358, 279, 533, 364, 326, 13115, 434, 17553, 1466, 18, 225, 1220, 5826, 353, 1399, 364, 23789, 2856, 279, 1963, 711, 3550, 31...
WizardPage.__init__(self, wizard, "E-mail")
WizardPage.__init__(self, wizard, "Nickname")
def __init__(self, wizard): WizardPage.__init__(self, wizard, "E-mail")
3217e6eb24dd5370070176b8060f802dca21f2c4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/635/3217e6eb24dd5370070176b8060f802dca21f2c4/kayak.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 24204, 4672, 678, 13412, 1964, 16186, 2738, 972, 12, 2890, 16, 24204, 16, 315, 41, 17, 4408, 7923, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 24204, 4672, 678, 13412, 1964, 16186, 2738, 972, 12, 2890, 16, 24204, 16, 315, 41, 17, 4408, 7923, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
MiroTestCase.tearDown(self)
def tearDown(self): messages.BackendMessage.install_handler(None) messages.FrontendMessage.install_handler(None) MiroTestCase.tearDown(self)
e7a45206ebf70a90ba1fabeb21e92b13fe03afae /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/e7a45206ebf70a90ba1fabeb21e92b13fe03afae/messagetest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 2091, 4164, 12, 2890, 4672, 2743, 18, 7172, 1079, 18, 5425, 67, 4176, 12, 7036, 13, 2743, 18, 21905, 1079, 18, 5425, 67, 4176, 12, 7036, 13, 490, 11373, 4709, 2449, 18, 736, 297, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 268, 2091, 4164, 12, 2890, 4672, 2743, 18, 7172, 1079, 18, 5425, 67, 4176, 12, 7036, 13, 2743, 18, 21905, 1079, 18, 5425, 67, 4176, 12, 7036, 13, 490, 11373, 4709, 2449, 18, 736, 297, ...
if self.is_hvm() and self['platform'].get('vnc', 0):
if self.is_hvm() and int(self['platform'].get('vnc', 0)) != 0:
def update_with(n, o): if not self.get(n): self[n] = cfg.get(o, '')
ac70b90ee99156600e159a18647c22ce6f0ad725 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6195/ac70b90ee99156600e159a18647c22ce6f0ad725/XendConfig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 1918, 12, 82, 16, 320, 4672, 309, 486, 365, 18, 588, 12, 82, 4672, 365, 63, 82, 65, 273, 2776, 18, 588, 12, 83, 16, 28707, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 1918, 12, 82, 16, 320, 4672, 309, 486, 365, 18, 588, 12, 82, 4672, 365, 63, 82, 65, 273, 2776, 18, 588, 12, 83, 16, 28707, 2, -100, -100, -100, -100, -100, -100, -100, -1...
r = self.get_item_rectangle(r, self.content.width - x, self.content.height - y )[ 2 ]
r = self.get_item_rectangle(r, self.content.width - x - shadow_x, self.content.height - y - shadow_y )[ 2 ]
def return_formatedtext( self, sel_list ): """ receives a list of indexex of elements to be used and returns a array with XML_FormatText ready to print (with its elements x, y, width and height already calculated) """ x, y = 0, 0 item = self.infoitem
4eeccde8e715e3848d141b118b26dc1f8c7a74fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/4eeccde8e715e3848d141b118b26dc1f8c7a74fc/info_area.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 327, 67, 687, 690, 955, 12, 365, 16, 357, 67, 1098, 262, 30, 3536, 17024, 279, 666, 434, 770, 338, 434, 2186, 358, 506, 1399, 471, 1135, 279, 526, 598, 3167, 67, 1630, 1528, 5695, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 327, 67, 687, 690, 955, 12, 365, 16, 357, 67, 1098, 262, 30, 3536, 17024, 279, 666, 434, 770, 338, 434, 2186, 358, 506, 1399, 471, 1135, 279, 526, 598, 3167, 67, 1630, 1528, 5695, 35...
else: print "no move: %d %d" % (dy, bead.state) return
return def set_rod_value(self, rod, value): """ Move beads on rod r to represent value v (v can go negative)""" bead_index = 0 for r in range(rod): bead_index += self.bead_count[r] for i in range(self.bead_count[rod]): if self.beads[bead_index+i].get_state() == 1: self.beads[bead_index+i].move_down() if self.beads[bead_index+i].get_state() == -1: self.beads[bead_index+i].move_up() if value > 0: for i in range(value): self.beads[bead_index+i].move_up() elif value < 0: for i in range(-value): self.beads[bead_index+self.bead_count[rod]-i-1].move_down()
def move_bead(self, sprite, dy): """ Move a bead (or beads) up or down a rod from the middle. """
006f398bab4c9f6302a81f8e2528c22dd2b0b824 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7608/006f398bab4c9f6302a81f8e2528c22dd2b0b824/abacus_window.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3635, 67, 70, 684, 12, 2890, 16, 16839, 16, 7732, 4672, 3536, 9933, 279, 506, 361, 261, 280, 506, 17318, 13, 731, 578, 2588, 279, 721, 72, 628, 326, 7689, 18, 3536, 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, 3635, 67, 70, 684, 12, 2890, 16, 16839, 16, 7732, 4672, 3536, 9933, 279, 506, 361, 261, 280, 506, 17318, 13, 731, 578, 2588, 279, 721, 72, 628, 326, 7689, 18, 3536, 2, -100, -100, -1...
self.assertRaises(WindowsError, os.utime, test_support.TESTFN, 0)
self.assertRaises(WindowsError, os.chmod, test_support.TESTFN, 0)
def test_chmod(self): self.assertRaises(WindowsError, os.utime, test_support.TESTFN, 0)
e20f54f542195e053653b1902db7a4c1642f4589 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/e20f54f542195e053653b1902db7a4c1642f4589/test_os.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 343, 1711, 12, 2890, 4672, 365, 18, 11231, 12649, 6141, 12, 10399, 668, 16, 1140, 18, 322, 494, 16, 1842, 67, 13261, 18, 16961, 19793, 16, 374, 13, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 343, 1711, 12, 2890, 4672, 365, 18, 11231, 12649, 6141, 12, 10399, 668, 16, 1140, 18, 322, 494, 16, 1842, 67, 13261, 18, 16961, 19793, 16, 374, 13, 2, -100, -100, -100, -100,...
scene.initialize_tree_scene(t, style, None, \
scene.initialize_tree_scene(t, style, \
def render_tree(t, w, h, imgName, style="basic"): """ Render tree image into a PNG file.""" global _QApp if not _QApp: _QApp = QtGui.QApplication(["ETE"]) scene = _TreeScene() scene.initialize_tree_scene(t, style, None, \ tree_properties=tree_properties) scene.draw() scene.save(w, h, imgName)
90482c4bda6a4e6f783806c033a46de36fc06abb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14016/90482c4bda6a4e6f783806c033a46de36fc06abb/drawer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 3413, 12, 88, 16, 341, 16, 366, 16, 3774, 461, 16, 2154, 1546, 13240, 6, 4672, 3536, 6987, 2151, 1316, 1368, 279, 22476, 585, 12123, 2552, 389, 53, 3371, 309, 486, 389, 53, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 3413, 12, 88, 16, 341, 16, 366, 16, 3774, 461, 16, 2154, 1546, 13240, 6, 4672, 3536, 6987, 2151, 1316, 1368, 279, 22476, 585, 12123, 2552, 389, 53, 3371, 309, 486, 389, 53, ...
s1 = reportName[i:]
s1 = urlQuery[i:]
def showNode(node, reportsFolder, staticFolder, birtURL): if node.nodeName == "reportItem": # get the attributes. attrs = node.attributes for attrName in attrs.keys(): if attrName == 'link': reportsFolder = reportsFolder + '/' urlQuery = attrs.get(attrName).nodeValue i = urlQuery.index(']') + 1 s1 = reportName[i:] i = s1.index('.') + 1 reportFile = os.path.join(staticFolder, s1[:i] + 'pdf') ## print reportFile callURL = birtURL + '/' + attrs.get(attrName).nodeValue.replace('[ReportsFolder]', reportsFolder) ## print ('URL \n%s\n' % (callURL)) f = urllib.urlopen(callURL) w = open(reportFile, 'w') w.write(f.read()) w.close
52f4982030ce112f99d123db1cf135fc442771dd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/637/52f4982030ce112f99d123db1cf135fc442771dd/staticReports.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 907, 12, 2159, 16, 10557, 3899, 16, 760, 3899, 16, 324, 2714, 1785, 4672, 309, 756, 18, 2159, 461, 422, 315, 6006, 1180, 6877, 468, 336, 326, 1677, 18, 3422, 273, 756, 18, 4350, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 907, 12, 2159, 16, 10557, 3899, 16, 760, 3899, 16, 324, 2714, 1785, 4672, 309, 756, 18, 2159, 461, 422, 315, 6006, 1180, 6877, 468, 336, 326, 1677, 18, 3422, 273, 756, 18, 4350, ...
if package.arch == None: logger.warning("Package %s has no arch" % (package.name))
if package.arch not in Package.ARCHES: logger.warning("Package %s has missing or invalid arch" % (package.name))
def main(argv=None): """ Parses repo.db.tar.gz file and returns exit status. Keyword Arguments: argv -- A list/array simulating a sys.argv (default None) If left empty, sys.argv is used """ if argv == None: argv = sys.argv if len(argv) != 3: usage() return 0 # check if arch is valid if argv[1] not in Package.ARCHES: usage() return 0 else: primary_arch = argv[1] repo_file = os.path.normpath(argv[2]) packages = parse_repo(repo_file) # sort packages by arch -- to handle noarch stuff packages_arches = {} for arch in Package.ARCHES: packages_arches[arch] = [] for package in packages: if package.arch == None: logger.warning("Package %s has no arch" % (package.name)) package.arch = primary_arch packages_arches[package.arch].append(package) logger.info('Starting database updates.') for (arch, pkgs) in packages_arches.iteritems(): if len(pkgs) > 0: db_update(arch,pkgs) logger.info('Finished database updates.') return 0
45fda97596e250089f79023eff42b8397e80357c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11256/45fda97596e250089f79023eff42b8397e80357c/reporead.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 33, 7036, 4672, 3536, 2280, 2420, 3538, 18, 1966, 18, 11718, 18, 9764, 585, 471, 1135, 2427, 1267, 18, 225, 18317, 13599, 30, 5261, 1493, 432, 666, 19, 1126, 3142, 27967...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 33, 7036, 4672, 3536, 2280, 2420, 3538, 18, 1966, 18, 11718, 18, 9764, 585, 471, 1135, 2427, 1267, 18, 225, 18317, 13599, 30, 5261, 1493, 432, 666, 19, 1126, 3142, 27967...
number_ionic_steps = nc.dimensions['number_ionic_steps'] frame = number_ionic_steps -1
number_ionic_steps = nc.variables['TotalEnergy'].shape[0] frame = number_ionic_steps - 1
def _set_frame_number(self, frame=None): '''set framenumber in the netcdf file
2eb7a6c5197d803407c2e2c6668fad39f9aa85ff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5572/2eb7a6c5197d803407c2e2c6668fad39f9aa85ff/jacapo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 3789, 67, 2696, 12, 2890, 16, 2623, 33, 7036, 4672, 9163, 542, 21799, 21998, 316, 326, 2901, 24799, 585, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 3789, 67, 2696, 12, 2890, 16, 2623, 33, 7036, 4672, 9163, 542, 21799, 21998, 316, 326, 2901, 24799, 585, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
_fl_popup_entry_set_user_data = cfuncproto(so_libforms, "fl_popup_entry_set_user_data", cty.c_void_p, [cty.POINTER(FL_POPUP_ENTRY), cty.c_void_p],
_fl_popup_entry_set_user_data = cfuncproto(so_libforms, "fl_popup_entry_set_user_data", cty.c_void_p, [cty.POINTER(FL_POPUP_ENTRY), cty.c_void_p],
def fl_popup_entry_set_value(p1, p2): """ fl_popup_entry_set_value(p1, p2) -> num. """ retval = _fl_popup_entry_set_value(p1, p2) return retval
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, 16086, 67, 4099, 67, 542, 67, 1132, 12, 84, 21, 16, 293, 22, 4672, 3536, 1183, 67, 16086, 67, 4099, 67, 542, 67, 1132, 12, 84, 21, 16, 293, 22, 13, 317, 818, 18, 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, 1183, 67, 16086, 67, 4099, 67, 542, 67, 1132, 12, 84, 21, 16, 293, 22, 4672, 3536, 1183, 67, 16086, 67, 4099, 67, 542, 67, 1132, 12, 84, 21, 16, 293, 22, 13, 317, 818, 18, 3536, ...
logging.log(logging.VERBOSE_DEBUG,"Unable to handle command %r from line %s" % (self.cmd,self.cmdline.split()[0]))
logging.log(logging.VERBOSE_DEBUG,"Unable to handle command %r from line %s (%s)" % (self.cmd,self.cmdline.split()[0],e))
def parse(self): """ We parse the first message from the file like object in fp, thereby consuming it""" # Read the first command: self.cmdline=self.fd.readline() if len(self.cmdline)==0: raise IOError("Unable to command from stream")
bc911616c377f13a5ae5f43ef5e89a3787d10c33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5568/bc911616c377f13a5ae5f43ef5e89a3787d10c33/MSN.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 4672, 3536, 1660, 1109, 326, 1122, 883, 628, 326, 585, 3007, 733, 316, 4253, 16, 1915, 1637, 27815, 518, 8395, 225, 468, 2720, 326, 1122, 1296, 30, 365, 18, 4172, 1369, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 4672, 3536, 1660, 1109, 326, 1122, 883, 628, 326, 585, 3007, 733, 316, 4253, 16, 1915, 1637, 27815, 518, 8395, 225, 468, 2720, 326, 1122, 1296, 30, 365, 18, 4172, 1369, ...
index = ac_in_buffer.find (self.terminator)
index = self.ac_in_buffer.find(terminator)
def handle_read (self):
44c2761c33965fa97175aac9ec0c3a363d530635 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/44c2761c33965fa97175aac9ec0c3a363d530635/asynchat.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 896, 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, 1640, 67, 896, 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, -10...
for aRow in ((('7', self.numberButton), ('4', self.numberButton), ('1', self.numberButton), ('C', self.clear)), (('8', self.numberButton), ('5', self.numberButton), ('2', self.numberButton), ('0', self.numberButton)), (('9', self.numberButton), ('6', self.numberButton), ('3', self.numberButton), ('.', self.numberButton)), (('+', self.operate), ('-', self.operate), ('*', self.operate), ('/', self.operate))):
for aRow in (({'label': '7', 'onAction': self.numberButton}, {'label': '4', 'onAction': self.numberButton}, {'label': '1', 'onAction': self.numberButton}, {'label': 'C', 'onAction': self.clear}), ({'label': '8', 'onAction': self.numberButton}, {'label': '5', 'onAction': self.numberButton}, {'label': '2', 'onAction': self.numberButton}, {'label': '0', 'onAction': self.numberButton}), ({'label': '9', 'onAction': self.numberButton}, {'label': '6', 'onAction': self.numberButton}, {'label': '3', 'onAction': self.numberButton}, {'label': '.', 'onAction': self.numberButton}), ({'label': '+', 'onAction': self.operate, 'calcOp': operator.add}, {'label': '-', 'onAction': self.operate, 'calcOp': operator.sub}, {'label': '*', 'onAction': self.operate, 'calcOp': operator.mul}, {'label': '/', 'onAction': self.operate, 'calcOp': operator.div})):
def __init__(self, **kw): super(CalculatorController, self).__init__(**kw) self.win.title = 'Calculator' vbox = cimarron.skin.VBox(parent=self.win) self.display = cimarron.skin.Label(parent=vbox, text='0') hbox = cimarron.skin.HBox(parent=vbox) for aRow in ((('7', self.numberButton), ('4', self.numberButton), ('1', self.numberButton), ('C', self.clear)), (('8', self.numberButton), ('5', self.numberButton), ('2', self.numberButton), ('0', self.numberButton)), (('9', self.numberButton), ('6', self.numberButton), ('3', self.numberButton), ('.', self.numberButton)), (('+', self.operate), ('-', self.operate), ('*', self.operate), ('/', self.operate))): vbox = cimarron.skin.VBox(parent=hbox) for aLabel, anAction in aRow: cimarron.skin.Button(parent=vbox, label=aLabel, onAction=anAction) self.clear()
27e16bbdd0150637761796a1255cdc8f3b935731 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2219/27e16bbdd0150637761796a1255cdc8f3b935731/calculator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2826, 9987, 4672, 2240, 12, 19278, 2933, 16, 365, 2934, 972, 2738, 972, 12, 636, 9987, 13, 365, 18, 8082, 18, 2649, 273, 296, 19278, 11, 331, 2147, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2826, 9987, 4672, 2240, 12, 19278, 2933, 16, 365, 2934, 972, 2738, 972, 12, 636, 9987, 13, 365, 18, 8082, 18, 2649, 273, 296, 19278, 11, 331, 2147, 273, ...
A->A B->G C->F D->G E->G F->F G->G H->G I->I J->G K->K L->A M->G
A->A B->G C->F D->G E->G F->F G->G H->G I->I J->G K->K L->A M->G
... def __str__(self):
0665f7d932e15bc75f6d745c6e03e0762451c536 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/0665f7d932e15bc75f6d745c6e03e0762451c536/test_generators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 1001, 701, 972, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 1001, 701, 972, 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...
runList.append(run)
runobjList.append(run) runList = [ x['RunNumber'] for x in runobjList]
def createRun(fileinfo, apiRef = None): """ _createRun_ Create DbsRun instances and insert them. Return a list of DbsRun object. """ runList=[] #Fixme: are the following value required? nLumiSections=0 TotLumi=0 StoreNumber=0 #Fixme nEvts=int(fileinfo['TotalEvents']) for runinfo in fileinfo.runs: run = DbsRun ( RunNumber=runinfo['Run'], NumberOfEvents=nEvts, NumberOfLumiSections= nLumiSections, TotalLuminosity= TotLumi, StoreNumber= StoreNumber, StartOfRun= 'now', EndOfRun= 'never', ) if apiRef != None: apiRef.insertRun(run) runList.append(run) return runList
6de85755f138125c3df172ebd6455345c0a4d7da /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8886/6de85755f138125c3df172ebd6455345c0a4d7da/DBSWriterObjects.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 1997, 12, 768, 1376, 16, 1536, 1957, 273, 599, 4672, 3536, 389, 2640, 1997, 67, 225, 1788, 463, 2038, 1997, 3884, 471, 2243, 2182, 18, 2000, 279, 666, 434, 463, 2038, 1997, 733, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1997, 12, 768, 1376, 16, 1536, 1957, 273, 599, 4672, 3536, 389, 2640, 1997, 67, 225, 1788, 463, 2038, 1997, 3884, 471, 2243, 2182, 18, 2000, 279, 666, 434, 463, 2038, 1997, 733, 1...
print "Error : wait ", self.wait_element_list, " get ", name
def matrix(a, b, c, d, e, f): return (a , b, c, d, e, f)
0f71000645566dbe734440e44a39b9a57c6972bd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/0f71000645566dbe734440e44a39b9a57c6972bd/anim.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3148, 12, 69, 16, 324, 16, 276, 16, 302, 16, 425, 16, 284, 4672, 327, 261, 69, 269, 324, 16, 276, 16, 302, 16, 425, 16, 284, 13, 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, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3148, 12, 69, 16, 324, 16, 276, 16, 302, 16, 425, 16, 284, 4672, 327, 261, 69, 269, 324, 16, 276, 16, 302, 16, 425, 16, 284, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
if EOFReached:
if entityName is not None: char = entities[entityName] if not charStack[-1] == ";": self.parser.parseError() self.characterQueue.extend(charStack[entityLength:]) else:
def entitiesStartingWith(name): return [e for e in filteredEntityList if e.startswith(name)]
798aa527172bff9da9b87806e442c655bdf42e2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9368/798aa527172bff9da9b87806e442c655bdf42e2b/tokenizer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5140, 11715, 1190, 12, 529, 4672, 327, 306, 73, 364, 425, 316, 5105, 1943, 682, 309, 425, 18, 17514, 1918, 12, 529, 25887, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5140, 11715, 1190, 12, 529, 4672, 327, 306, 73, 364, 425, 316, 5105, 1943, 682, 309, 425, 18, 17514, 1918, 12, 529, 25887, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.ufeed, url, str(error))
self.ufeed, url, error.encode('ascii', 'replace'))
def _updateErrback(self, error, url): if not self.ufeed.id_exists(): return logging.warn("WARNING: error in Feed.update for %s (%s) -- %s", self.ufeed, url, str(error)) self.scheduleUpdateEvents(-1) self.updating -= 1 self.checkUpdateFinished() self.ufeed.signal_change(needs_save=False)
8abb93074dba6f07f74af73c5ed736821d0097eb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/8abb93074dba6f07f74af73c5ed736821d0097eb/feed.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 2524, 823, 12, 2890, 16, 555, 16, 880, 4672, 309, 486, 365, 18, 696, 73, 329, 18, 350, 67, 1808, 13332, 327, 2907, 18, 8935, 2932, 9511, 30, 555, 316, 14013, 18, 2725, 364...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 2524, 823, 12, 2890, 16, 555, 16, 880, 4672, 309, 486, 365, 18, 696, 73, 329, 18, 350, 67, 1808, 13332, 327, 2907, 18, 8935, 2932, 9511, 30, 555, 316, 14013, 18, 2725, 364...
'PreprendENVPath' : PreprendENVPathWrapper(self),
'PreprendENVPath' : PrependENVPathWrapper(self),
def __init__(self, *args, **kwargs): generate_functions = {} builder_wrappers = [ BuilderWrapper (self,'Download'), BuilderWrapper (self,'UnTar'), BuilderWrapper (self,'UnZip'), BuilderWrapper (self,'Delete',self.DeleteBuilder), BuilderWrapper (self,'Copy' ,self.CopyBuilder), BuilderWrapper (self,'Mkdir' ,self.MkdirBuilder), CMakeWrapper (self,'CMake'), EditWrapper (self,'Edit'), CommandWrapper (self,'Make'), CommandWrapper (self,'Patch'), CommandWrapper (self,'SysCommand', reg_name='Command'), ConfigureWrapper(self, 'Configure'), WaitDependenciesWrapper(self), ]
2172f1080a128135df603c35999a1e2919551a29 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8002/2172f1080a128135df603c35999a1e2919551a29/libextproject.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 2103, 67, 10722, 273, 2618, 2089, 67, 4113, 10422, 273, 306, 5008, 3611, 225, 261, 2890, 11189, 7109, 19899, 5008, 3611, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 2103, 67, 10722, 273, 2618, 2089, 67, 4113, 10422, 273, 306, 5008, 3611, 225, 261, 2890, 11189, 7109, 19899, 5008, 3611, 2...
imp_comp = context.get('import_comp',False)
imp_comp = context.get('import_comp',False)
def export_data(self, cr, uid, ids, fields_to_export, context=None): if not context: context = {} imp_comp = context.get('import_comp',False) cols = self._columns.copy() for f in self._inherit_fields: cols.update({f: self._inherit_fields[f][2]}) fields_to_export = map(lambda x: x.split('/'), fields_to_export) fields_export = fields_to_export+[] warning = '' warning_fields = [] for field in fields_export: if imp_comp and len(field)>1: warning_fields.append('/'.join(map(lambda x:x in cols and cols[x].string or x,field))) elif len (field) <=1: if imp_comp and cols.get(field and field[0],False): if ((isinstance(cols[field[0]], fields.function) and not cols[field[0]].store) \ or isinstance(cols[field[0]], fields.related)\ or isinstance(cols[field[0]], fields.one2many)): warning_fields.append('/'.join(map(lambda x:x in cols and cols[x].string or x,field))) datas = [] if imp_comp and len(warning_fields): warning = 'Following columns cannot be exported since you select to be import compatible.\n%s' %('\n'.join(warning_fields)) cr.rollback() return {'warning' : warning} for row in self.browse(cr, uid, ids, context): datas += self.__export_row(cr, uid, row, fields_to_export, context) return {'datas':datas}
9f8394a3119b661e0f978387e8467c7103893025 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/9f8394a3119b661e0f978387e8467c7103893025/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 892, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1466, 67, 869, 67, 6530, 16, 819, 33, 7036, 4672, 309, 486, 819, 30, 819, 273, 2618, 1646, 67, 2919, 273, 819, 18, 588, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 892, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1466, 67, 869, 67, 6530, 16, 819, 33, 7036, 4672, 309, 486, 819, 30, 819, 273, 2618, 1646, 67, 2919, 273, 819, 18, 588, 2...
print "number_edit del called"
logger.debug("number_edit del called")
def number_edit_del(self,emission, source, param): print "number_edit del called" value = emission.part_text_get("active-call") star_value = emission.part_text_get("num_field-text") if len(value) != 0: emission.part_text_set("num_field-text",star_value[:-1]) emission.part_text_set("active-call",value[:-1])
01c25941dcc46b5166dcddd3aeed3ae3b26b48e6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4712/01c25941dcc46b5166dcddd3aeed3ae3b26b48e6/paroli-dialer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1300, 67, 4619, 67, 3771, 12, 2890, 16, 351, 19710, 16, 1084, 16, 579, 4672, 1194, 18, 4148, 2932, 2696, 67, 4619, 1464, 2566, 7923, 460, 273, 801, 19710, 18, 2680, 67, 955, 67, 588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1300, 67, 4619, 67, 3771, 12, 2890, 16, 351, 19710, 16, 1084, 16, 579, 4672, 1194, 18, 4148, 2932, 2696, 67, 4619, 1464, 2566, 7923, 460, 273, 801, 19710, 18, 2680, 67, 955, 67, 588, ...
Abelian variety J0(42)
Abelian subvariety of dimension 3 of J0(42)
def __add__(self, other): """ Add two modular abelian variety factors. EXAMPLES: sage: A = J0(42); D = A.decomposition(); D [ Abelian variety factor of dimension 1 of J0(42), Abelian variety factor of dimension 2 of J0(42), Abelian variety factor of dimension 2 of J0(42) ] sage: D[0] + D[1] Abelian variety factor of dimension 3 of J0(42) sage: D[1].is_subvariety(D[0] + D[1]) True sage: D[0] + D[1] + D[2] Abelian variety J0(42) sage: D[0] + D[0] Abelian variety factor of dimension 1 of J0(42) sage: D[0] + D[0] == D[0] True sage: sum(D, D[0]) == A True """ if not is_ModularAbelianVariety(other): if other == 0: return self raise TypeError, "sum not defined" if not isinstance(other, ModularAbelianVariety_modsym_abstract): return ModularAbelianVariety_abstract.__add__(self, other) if self.groups() != other.groups(): raise TypeError, "sum not defined since ambient spaces different" M = self.modular_symbols() + other.modular_symbols() return ModularAbelianVariety_modsym(M)
f30f87afcce1c095974cd5259aa7272b60928586 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/f30f87afcce1c095974cd5259aa7272b60928586/abvar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1289, 972, 12, 2890, 16, 1308, 4672, 3536, 1436, 2795, 681, 2490, 1223, 292, 2779, 1394, 14369, 14490, 18, 225, 5675, 8900, 11386, 30, 272, 410, 30, 432, 273, 804, 20, 12, 9452, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1289, 972, 12, 2890, 16, 1308, 4672, 3536, 1436, 2795, 681, 2490, 1223, 292, 2779, 1394, 14369, 14490, 18, 225, 5675, 8900, 11386, 30, 272, 410, 30, 432, 273, 804, 20, 12, 9452, ...
global get_user_django, ESPUser
global get_user_django, ESPUser, get_user
def __get__(self, request, obj_type=None): global get_user_django, ESPUser if not hasattr(request, '_cached_user'): if get_user is None or ESPUser is None or get_user_django is None: from django.contrib.auth import get_user as get_user_django from esp.users.models import ESPUser from esp.utils.get_user import get_user
b9b238e23738819e9abcfb2455bd841bd8d59881 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12041/b9b238e23738819e9abcfb2455bd841bd8d59881/espauthmiddleware.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 972, 12, 2890, 16, 590, 16, 1081, 67, 723, 33, 7036, 4672, 2552, 336, 67, 1355, 67, 24573, 16, 512, 3118, 1299, 16, 336, 67, 1355, 309, 486, 3859, 12, 2293, 16, 2070, 7097...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 972, 12, 2890, 16, 590, 16, 1081, 67, 723, 33, 7036, 4672, 2552, 336, 67, 1355, 67, 24573, 16, 512, 3118, 1299, 16, 336, 67, 1355, 309, 486, 3859, 12, 2293, 16, 2070, 7097...
print "GB is 1" return strat if prot: print "(", strat.npairs(), ")" strat.clean_top_by_chain_criterion() return strat
print "(", strat.npairs(), ")" strat.clean_top_by_chain_criterion() return strat except KeyboardInterrupt: return strat
def sort_key(p): return p.lead()
8324f3bfa30135ffbfcefb5b6386a96470a7607e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2046/8324f3bfa30135ffbfcefb5b6386a96470a7607e/nf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1524, 67, 856, 12, 84, 4672, 327, 293, 18, 24429, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1524, 67, 856, 12, 84, 4672, 327, 293, 18, 24429, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
subject="buildbot %(result)s in %(projectName)s on %(builder)s",
subject="%(projectName)s %(builder)s %(result)s",
def __init__(self, username=None, password=None, port=2525, fromaddr=None, mode="failing", categories=None, builders=None, addLogs=False, relayhost="localhost", subject="buildbot %(result)s in %(projectName)s on %(builder)s", lookup=None, extraRecipients=[], sendToInterestedUsers=True, reply_to=None, html_body=False, TLS=True, mail_watcher=[]): MailNotifier.__init__(self, fromaddr, mode, categories, builders, addLogs, relayhost, subject, lookup, extraRecipients, sendToInterestedUsers) self.reply_to = reply_to self._username = username self._password = password self._port = port self._body = '' self.html_body = html_body self.TLS = TLS self.mail_watcher = mail_watcher self.projectName = ''
3e66141fe4f051daac832f2aaf0b1deac2694f2a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12355/3e66141fe4f051daac832f2aaf0b1deac2694f2a/mail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2718, 33, 7036, 16, 2201, 33, 7036, 16, 1756, 33, 2947, 2947, 16, 628, 4793, 33, 7036, 16, 1965, 1546, 507, 4973, 3113, 6477, 33, 7036, 16, 19916, 33, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2718, 33, 7036, 16, 2201, 33, 7036, 16, 1756, 33, 2947, 2947, 16, 628, 4793, 33, 7036, 16, 1965, 1546, 507, 4973, 3113, 6477, 33, 7036, 16, 19916, 33, ...
def fl_deactivate_form(form): """ fl_deactivate_form(form) """ _fl_deactivate_form(form)
def fl_deactivate_form(pForm): """ fl_deactivate_form(pForm) """ _fl_deactivate_form(pForm)
def fl_deactivate_form(form): """ fl_deactivate_form(form) """ _fl_deactivate_form(form)
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, 323, 10014, 67, 687, 12, 84, 1204, 4672, 3536, 1183, 67, 323, 10014, 67, 687, 12, 84, 1204, 13, 3536, 225, 389, 2242, 67, 323, 10014, 67, 687, 12, 84, 1204, 13, 282, 2, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 323, 10014, 67, 687, 12, 84, 1204, 4672, 3536, 1183, 67, 323, 10014, 67, 687, 12, 84, 1204, 13, 3536, 225, 389, 2242, 67, 323, 10014, 67, 687, 12, 84, 1204, 13, 282, 2, -...
increment(key_complete, namespace='S')
incr(key_complete, namespace='S')
def real_main(): args = parse_qs(environ['QUERY_STRING']) if not args: print "Status: 301 Moved Permanantly\nLocation: /\n\n", return for a in ('info_hash', 'port'): if a not in args or len(args[a]) < 1: if ERRORS: resps(bencode({'failure reason': "You must provide %s!"%a})) return ip = environ['REMOTE_ADDR'] key = args['info_hash'][0] if STATS: key_complete = '%s!complete'%key key_incomplete = '%s!incomplete'%key left = args.pop('left', [None])[0] err = None if(len(key) > 128): err = "Insanely long key!" else: try: port = int(args['port'][0]) except: err = "Invalid port number!" if err: if ERRORS: resps(bencode({'failure reason': err})) return # Crop raises chance of a clash, plausible deniability for the win! phash = md5("%s/%d" % (ip, port)).hexdigest()[:16] # TODO BT: If left=0, the download is done and we should not return any peers. event = args.pop('event', [None])[0] if event == 'stopped': # Maybe we should only remove it from this track, but this is good enough. mdel(phash, namespace='I') if STATS: # XXX Danger of incomplete underflow! if left == '0': decrement(key_complete, namespace='S') else: decrement(key_incomplete, namespace='S') return # They are going away, don't waste bw/cpu on this. resps(bencode({'interval': INTERVAL, 'peers': []})) elif STATS and event == 'completed': decrement(key_incomplete, namespace='S') increment(key_complete, namespace='S') updatetrack = False # Get existing peers r = get(key, namespace='K') if r: s = r.split('|') if len(s) > 32: ks = sample(s, 32) else: ks = s peers = get_multi(ks, namespace='I') lostpeers = (p for p in ks if p not in peers) if lostpeers: # Remove lost peers s = [k for k in s if k not in lostpeers] updatetrack = True if STATS: # XXX If we underflow, should decrement from '!complete' decrement(key_incomplete, len(lostpeers), namespace='S') if phash in peers: peers.pop(phash, None) # Remove self from returned peers # New track! else: s = [] peers = {} if STATS: mset(key_complete, '0', namespace='S') mset(key_incomplete, '0', namespace='S') # Might be redundant, but ensures we update the port number if it has changed. mset(phash, '|'.join((ip, str(port))), namespace='I') if phash not in s: # Assume new peer s.append(phash) updatetrack = True if STATS: # Should we bother to check event == 'started'? Why? if left == '0': increment(key_complete, namespace='S') else: increment(key_incomplete, namespace='S') if updatetrack: mset(key, '|'.join(s), namespace='K') ps = dict((k, peers[k].split('|')) for k in peers) pl = [{'ip': ps[h][0], 'port': ps[h][1]} for h in ps] if STATS: resps(bencode({'interval':INTERVAL, 'peers':pl, 'complete':get(key_complete, namespace='S'), 'incomplete':get(key_incomplete, namespace='S')})) else: resps(bencode({'interval':INTERVAL, 'peers': pl}))
2fc9438ee448a3f8e5f77c6eab847284091d5fbb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14779/2fc9438ee448a3f8e5f77c6eab847284091d5fbb/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2863, 67, 5254, 13332, 833, 273, 1109, 67, 12926, 12, 28684, 3292, 10753, 67, 5804, 19486, 225, 309, 486, 833, 30, 1172, 315, 1482, 30, 26403, 490, 9952, 13813, 304, 970, 715, 64, 82, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2863, 67, 5254, 13332, 833, 273, 1109, 67, 12926, 12, 28684, 3292, 10753, 67, 5804, 19486, 225, 309, 486, 833, 30, 1172, 315, 1482, 30, 26403, 490, 9952, 13813, 304, 970, 715, 64, 82, ...
""" General Automatically run Miro when I log in RUN_DTV_AT_STARTUP - boolean Warn me if I attempt to quit with downloads in progress WARN_IF_DOWNLOADING_ON_QUIT - boolean Channels [] Check channels for new content xxx CHECK_CHANNELS_EVERY_X_MN - integer > 0 every day, every hour, every 30 minutes, manually Note: you can set the frequency channels are checked for each channel in the channel's settings pane. Auto download default settings for new channels: CHANNEL_AUTO_DEFAULT - choice "new", "auto", "off" By default, remember xxx old items in addition to the current contents. MAX_OLD_iTEMS_DEFAULT - integer > 0 0, 20, 50, 100, 1000 Clear old items in all feeds now button Downloads Maximum number of manual downloads at a time: MAX_MANUAL_DOWNLOADS - integer > 0 Maximum number of auto-downloads at a time: DOWNLOADS_TARGET - integer > 0 Bittorrent: [] To avoid internet slowdowns, limit upstream to: xxx KB/s LIMIT_UPSTREAM - boolean UPSTREAM_LIMIT_IN_KBS - integer > 0 [] Limit torrent downstream to: xxx KB/s LIMIT_DOWNSTREAM_BT - boolean DOWNSTREAM_BT_LIMIT_IN_KBS - integer > 0 [] Limit torrent connections to: xxx LIMIT_CONNECTIONS_BT - boolean CONNECTION_LIMIT_BT_NUM - integer > 0 Use ports: xyz - xyz BT_MIN_PORT - integer 0 < i < 64,000 (FIXME check actual number) BT_MAX_PORT - integer 0 < i < 64,000 (FIXME check actual number) BT_MIN_PORT > BT_MAX_PORT [] Automatically forward ports. USE_UPNP - boolean [] Ignore unencrypted connections. BT_ENC_REQ - boolean [] Stop torrent uploads when this ratio is reached: xyz LIMIT_UPLOAD_RATIO - boolean UPLOAD_RATIO - float > 0.0 Folders Store downloads in this folder: MOVIES_DIRECTORY - file path Watch for new videos in these folders and include them in library: ??? Disk space [] Keep at least this much free space on my drive: xyz GB PRESERVE_DISK_SPACE - boolean PRESERVE_X_GB_FREE - float > 0.0 By default, videos expire after EXPIRE_AFTER_X_DAYS - integer > 0 1 day, 3 days, 6 days, 10 days, 1 month, never Playback [] Resume playing a video from the point it was last stopped. RESUME_VIDEOS_MODE - boolean () Play videos one after another () Stop after each video SINGLE_VIDEO_PLAYBACK_MODE - boolean Platform Use this renderer to play videos: xyz Note: If you change the renderer used to play videos, you MUST restart Miro for the changes to take effect. xine Use this for video when listening to audio: xyz """
def switcher(widget): text, panel_builder = PANEL[widget.panel_index] main_area_holder.set(create_panel(text, panel_builder()))
6520685a4362ac8adbadd95f3dd34bdf232bdb03 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/6520685a4362ac8adbadd95f3dd34bdf232bdb03/preferencespanel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1620, 264, 12, 6587, 4672, 977, 16, 6594, 67, 9574, 273, 453, 1258, 2247, 63, 6587, 18, 13916, 67, 1615, 65, 2774, 67, 5036, 67, 4505, 18, 542, 12, 2640, 67, 13916, 12, 955, 16, 6594...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1620, 264, 12, 6587, 4672, 977, 16, 6594, 67, 9574, 273, 453, 1258, 2247, 63, 6587, 18, 13916, 67, 1615, 65, 2774, 67, 5036, 67, 4505, 18, 542, 12, 2640, 67, 13916, 12, 955, 16, 6594...
def shortcutList_selectionChanged(self,item):
def shortcutList_selectionChanged(self):
def shortcutList_selectionChanged(self,item): self.rebuildMenuBar()
780514527b5e9c93cc3e1356283b1426890f598d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12631/780514527b5e9c93cc3e1356283b1426890f598d/swine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10995, 682, 67, 10705, 5033, 12, 2890, 4672, 365, 18, 266, 3510, 4599, 5190, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10995, 682, 67, 10705, 5033, 12, 2890, 4672, 365, 18, 266, 3510, 4599, 5190, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
z.call_policies = CP.custom_call_policies( "bp::return_value_policy<bp::return_by_value>", "return_as_ndarray.hpp" )
z.call_policies = CP.custom_call_policies( "bp::return_value_policy<bp::return_by_value>", "opencv_extra.hpp" )
def generate_code(mb, cc, D, FT, CP): cc.write('''
866f28ed7e9482fe98b63bf2a296c9315fa29aae /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4310/866f28ed7e9482fe98b63bf2a296c9315fa29aae/highgui_hpp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 710, 12, 1627, 16, 4946, 16, 463, 16, 478, 56, 16, 5181, 4672, 4946, 18, 2626, 2668, 6309, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 710, 12, 1627, 16, 4946, 16, 463, 16, 478, 56, 16, 5181, 4672, 4946, 18, 2626, 2668, 6309, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
{}, _("Similar records"),
{}, _("Similar records"),
def tmpl_records_format_other(self, ln, weburl, rows, format, url_argd): """Returns other formats of the records
db331841a37d58542b7cf2ea4a7c39fdd1d31403 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/db331841a37d58542b7cf2ea4a7c39fdd1d31403/websearch_templates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 7094, 67, 2139, 67, 3011, 12, 2890, 16, 7211, 16, 3311, 718, 16, 2595, 16, 740, 16, 880, 67, 3175, 72, 4672, 3536, 1356, 1308, 6449, 434, 326, 3853, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 7094, 67, 2139, 67, 3011, 12, 2890, 16, 7211, 16, 3311, 718, 16, 2595, 16, 740, 16, 880, 67, 3175, 72, 4672, 3536, 1356, 1308, 6449, 434, 326, 3853, 2, -100, -100, -100, -...
self.verticalLayout_12.addLayout(self.horizontalLayout_4)
self.verticalLayout_13.addLayout(self.horizontalLayout_4)
def setupUi(self, ui): ui.setObjectName("ui") ui.resize(625, 637) self.verticalLayout_12 = QtGui.QVBoxLayout(ui) self.verticalLayout_12.setObjectName("verticalLayout_12") self.verticalLayout_3 = QtGui.QVBoxLayout() self.verticalLayout_3.setObjectName("verticalLayout_3") self.horizontalLayout_13 = QtGui.QHBoxLayout() self.horizontalLayout_13.setObjectName("horizontalLayout_13") self.label = QtGui.QLabel(ui) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth()) self.label.setSizePolicy(sizePolicy) self.label.setObjectName("label") self.horizontalLayout_13.addWidget(self.label) self.comboBox_layers = QtGui.QComboBox(ui) self.comboBox_layers.setObjectName("comboBox_layers") self.horizontalLayout_13.addWidget(self.comboBox_layers) self.verticalLayout_3.addLayout(self.horizontalLayout_13) self.horizontalLayout_14 = QtGui.QHBoxLayout() self.horizontalLayout_14.setObjectName("horizontalLayout_14") self.label_5 = QtGui.QLabel(ui) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.label_5.sizePolicy().hasHeightForWidth()) self.label_5.setSizePolicy(sizePolicy) self.label_5.setObjectName("label_5") self.horizontalLayout_14.addWidget(self.label_5) self.lineEdit_crs = QtGui.QLineEdit(ui) self.lineEdit_crs.setEnabled(False) self.lineEdit_crs.setObjectName("lineEdit_crs") self.horizontalLayout_14.addWidget(self.lineEdit_crs) self.pushButton_crsChg = QtGui.QPushButton(ui) self.pushButton_crsChg.setEnabled(False) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.pushButton_crsChg.sizePolicy().hasHeightForWidth()) self.pushButton_crsChg.setSizePolicy(sizePolicy) self.pushButton_crsChg.setObjectName("pushButton_crsChg") self.horizontalLayout_14.addWidget(self.pushButton_crsChg) self.verticalLayout_3.addLayout(self.horizontalLayout_14) self.verticalLayout_12.addLayout(self.verticalLayout_3) self.horizontalLayout_4 = QtGui.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.verticalLayout_6 = QtGui.QVBoxLayout() self.verticalLayout_6.setObjectName("verticalLayout_6") self.plainTextEdit_note = QtGui.QPlainTextEdit(ui) self.plainTextEdit_note.setEnabled(True) self.plainTextEdit_note.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.plainTextEdit_note.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.plainTextEdit_note.setReadOnly(True) self.plainTextEdit_note.setObjectName("plainTextEdit_note") self.verticalLayout_6.addWidget(self.plainTextEdit_note) self.groupBox = QtGui.QGroupBox(ui) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth()) self.groupBox.setSizePolicy(sizePolicy) self.groupBox.setObjectName("groupBox") self.verticalLayout_7 = QtGui.QVBoxLayout(self.groupBox) self.verticalLayout_7.setObjectName("verticalLayout_7") self.horizontalLayout_6 = QtGui.QHBoxLayout() self.horizontalLayout_6.setObjectName("horizontalLayout_6") self.label_2 = QtGui.QLabel(self.groupBox) self.label_2.setObjectName("label_2") self.horizontalLayout_6.addWidget(self.label_2) spacerItem = QtGui.QSpacerItem(28, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum) self.horizontalLayout_6.addItem(spacerItem) self.lineEdit_vertexX0 = QtGui.QLineEdit(self.groupBox) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.lineEdit_vertexX0.sizePolicy().hasHeightForWidth()) self.lineEdit_vertexX0.setSizePolicy(sizePolicy) self.lineEdit_vertexX0.setObjectName("lineEdit_vertexX0") self.horizontalLayout_6.addWidget(self.lineEdit_vertexX0) self.pushButton_startCapture = QtGui.QPushButton(self.groupBox) self.pushButton_startCapture.setObjectName("pushButton_startCapture") self.horizontalLayout_6.addWidget(self.pushButton_startCapture) spacerItem1 = QtGui.QSpacerItem(28, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_6.addItem(spacerItem1) self.verticalLayout_7.addLayout(self.horizontalLayout_6) self.horizontalLayout_7 = QtGui.QHBoxLayout() self.horizontalLayout_7.setObjectName("horizontalLayout_7") self.label_3 = QtGui.QLabel(self.groupBox) self.label_3.setObjectName("label_3") self.horizontalLayout_7.addWidget(self.label_3) spacerItem2 = QtGui.QSpacerItem(28, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum) self.horizontalLayout_7.addItem(spacerItem2) self.lineEdit_vertexY0 = QtGui.QLineEdit(self.groupBox) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.lineEdit_vertexY0.sizePolicy().hasHeightForWidth()) self.lineEdit_vertexY0.setSizePolicy(sizePolicy) self.lineEdit_vertexY0.setObjectName("lineEdit_vertexY0") self.horizontalLayout_7.addWidget(self.lineEdit_vertexY0) spacerItem3 = QtGui.QSpacerItem(28, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_7.addItem(spacerItem3) self.verticalLayout_7.addLayout(self.horizontalLayout_7) self.horizontalLayout_8 = QtGui.QHBoxLayout() self.horizontalLayout_8.setObjectName("horizontalLayout_8") self.label_4 = QtGui.QLabel(self.groupBox) self.label_4.setObjectName("label_4") self.horizontalLayout_8.addWidget(self.label_4) spacerItem4 = QtGui.QSpacerItem(28, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum) self.horizontalLayout_8.addItem(spacerItem4) self.lineEdit_vertexZ0 = QtGui.QLineEdit(self.groupBox) self.lineEdit_vertexZ0.setEnabled(False) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.lineEdit_vertexZ0.sizePolicy().hasHeightForWidth()) self.lineEdit_vertexZ0.setSizePolicy(sizePolicy) self.lineEdit_vertexZ0.setObjectName("lineEdit_vertexZ0") self.horizontalLayout_8.addWidget(self.lineEdit_vertexZ0) spacerItem5 = QtGui.QSpacerItem(28, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_8.addItem(spacerItem5) self.verticalLayout_7.addLayout(self.horizontalLayout_8) self.verticalLayout_6.addWidget(self.groupBox) self.groupBox_2 = QtGui.QGroupBox(ui) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.groupBox_2.sizePolicy().hasHeightForWidth()) self.groupBox_2.setSizePolicy(sizePolicy) self.groupBox_2.setObjectName("groupBox_2") self.verticalLayout_8 = QtGui.QVBoxLayout(self.groupBox_2) self.verticalLayout_8.setObjectName("verticalLayout_8") self.horizontalLayout_9 = QtGui.QHBoxLayout() self.horizontalLayout_9.setObjectName("horizontalLayout_9") self.label_8 = QtGui.QLabel(self.groupBox_2) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.label_8.sizePolicy().hasHeightForWidth()) self.label_8.setSizePolicy(sizePolicy) self.label_8.setObjectName("label_8") self.horizontalLayout_9.addWidget(self.label_8) spacerItem6 = QtGui.QSpacerItem(2, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum) self.horizontalLayout_9.addItem(spacerItem6) self.lineEdit_nextAzimuth = QtGui.QLineEdit(self.groupBox_2) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.lineEdit_nextAzimuth.sizePolicy().hasHeightForWidth()) self.lineEdit_nextAzimuth.setSizePolicy(sizePolicy) self.lineEdit_nextAzimuth.setObjectName("lineEdit_nextAzimuth") self.horizontalLayout_9.addWidget(self.lineEdit_nextAzimuth) spacerItem7 = QtGui.QSpacerItem(28, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_9.addItem(spacerItem7) self.verticalLayout_8.addLayout(self.horizontalLayout_9) self.horizontalLayout_10 = QtGui.QHBoxLayout() self.horizontalLayout_10.setObjectName("horizontalLayout_10") self.label_9 = QtGui.QLabel(self.groupBox_2) self.label_9.setObjectName("label_9") self.horizontalLayout_10.addWidget(self.label_9) self.lineEdit_nextDistance = QtGui.QLineEdit(self.groupBox_2) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.lineEdit_nextDistance.sizePolicy().hasHeightForWidth()) self.lineEdit_nextDistance.setSizePolicy(sizePolicy) self.lineEdit_nextDistance.setObjectName("lineEdit_nextDistance") self.horizontalLayout_10.addWidget(self.lineEdit_nextDistance) spacerItem8 = QtGui.QSpacerItem(26, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_10.addItem(spacerItem8) self.verticalLayout_8.addLayout(self.horizontalLayout_10) self.horizontalLayout_11 = QtGui.QHBoxLayout() self.horizontalLayout_11.setObjectName("horizontalLayout_11") self.label_10 = QtGui.QLabel(self.groupBox_2) self.label_10.setObjectName("label_10") self.horizontalLayout_11.addWidget(self.label_10) spacerItem9 = QtGui.QSpacerItem(6, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum) self.horizontalLayout_11.addItem(spacerItem9) self.lineEdit_nextVertical = QtGui.QLineEdit(self.groupBox_2) self.lineEdit_nextVertical.setEnabled(False) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.lineEdit_nextVertical.sizePolicy().hasHeightForWidth()) self.lineEdit_nextVertical.setSizePolicy(sizePolicy) self.lineEdit_nextVertical.setObjectName("lineEdit_nextVertical") self.horizontalLayout_11.addWidget(self.lineEdit_nextVertical) spacerItem10 = QtGui.QSpacerItem(15, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum) self.horizontalLayout_11.addItem(spacerItem10) self.pushButton_vertexInsert = QtGui.QPushButton(self.groupBox_2) self.pushButton_vertexInsert.setObjectName("pushButton_vertexInsert") self.horizontalLayout_11.addWidget(self.pushButton_vertexInsert) spacerItem11 = QtGui.QSpacerItem(28, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_11.addItem(spacerItem11) self.verticalLayout_8.addLayout(self.horizontalLayout_11) self.verticalLayout_6.addWidget(self.groupBox_2) self.horizontalLayout_4.addLayout(self.verticalLayout_6) self.verticalLayout_4 = QtGui.QVBoxLayout() self.verticalLayout_4.setObjectName("verticalLayout_4") self.surveyGrpBox = QtGui.QGroupBox(ui) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.surveyGrpBox.sizePolicy().hasHeightForWidth()) self.surveyGrpBox.setSizePolicy(sizePolicy) self.surveyGrpBox.setObjectName("surveyGrpBox") self.layoutWidget = QtGui.QWidget(self.surveyGrpBox) self.layoutWidget.setGeometry(QtCore.QRect(11, 20, 94, 51)) self.layoutWidget.setObjectName("layoutWidget") self.verticalLayout_10 = QtGui.QVBoxLayout(self.layoutWidget) self.verticalLayout_10.setObjectName("verticalLayout_10") self.radioButton_irrSurvey = QtGui.QRadioButton(self.layoutWidget) self.radioButton_irrSurvey.setEnabled(False) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.radioButton_irrSurvey.sizePolicy().hasHeightForWidth()) self.radioButton_irrSurvey.setSizePolicy(sizePolicy) self.radioButton_irrSurvey.setCheckable(True) self.radioButton_irrSurvey.setChecked(False) self.radioButton_irrSurvey.setObjectName("radioButton_irrSurvey") self.verticalLayout_10.addWidget(self.radioButton_irrSurvey) self.radioButton_polySurvey = QtGui.QRadioButton(self.layoutWidget) self.radioButton_polySurvey.setEnabled(True) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.radioButton_polySurvey.sizePolicy().hasHeightForWidth()) self.radioButton_polySurvey.setSizePolicy(sizePolicy) self.radioButton_polySurvey.setChecked(True) self.radioButton_polySurvey.setObjectName("radioButton_polySurvey") self.verticalLayout_10.addWidget(self.radioButton_polySurvey) self.verticalLayout_4.addWidget(self.surveyGrpBox) self.groupBox_3 = QtGui.QGroupBox(ui) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.groupBox_3.sizePolicy().hasHeightForWidth()) self.groupBox_3.setSizePolicy(sizePolicy) self.groupBox_3.setObjectName("groupBox_3") self.layoutWidget1 = QtGui.QWidget(self.groupBox_3) self.layoutWidget1.setGeometry(QtCore.QRect(10, 17, 241, 63)) self.layoutWidget1.setObjectName("layoutWidget1") self.gridLayout = QtGui.QGridLayout(self.layoutWidget1) self.gridLayout.setObjectName("gridLayout") self.radioButton_defaultNorth = QtGui.QRadioButton(self.layoutWidget1) self.radioButton_defaultNorth.setEnabled(True) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.radioButton_defaultNorth.sizePolicy().hasHeightForWidth()) self.radioButton_defaultNorth.setSizePolicy(sizePolicy) self.radioButton_defaultNorth.setCheckable(True) self.radioButton_defaultNorth.setChecked(True) self.radioButton_defaultNorth.setObjectName("radioButton_defaultNorth") self.gridLayout.addWidget(self.radioButton_defaultNorth, 0, 0, 1, 1) self.radioButton_magNorth = QtGui.QRadioButton(self.layoutWidget1) self.radioButton_magNorth.setEnabled(True) self.radioButton_magNorth.setChecked(False) self.radioButton_magNorth.setObjectName("radioButton_magNorth") self.gridLayout.addWidget(self.radioButton_magNorth, 1, 0, 1, 1) self.lineEdit_magNorth = QtGui.QLineEdit(self.layoutWidget1) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.lineEdit_magNorth.sizePolicy().hasHeightForWidth()) self.lineEdit_magNorth.setSizePolicy(sizePolicy) self.lineEdit_magNorth.setObjectName("lineEdit_magNorth") self.gridLayout.addWidget(self.lineEdit_magNorth, 1, 1, 1, 1) self.verticalLayout_4.addWidget(self.groupBox_3) self.groupBox_7 = QtGui.QGroupBox(ui) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.groupBox_7.sizePolicy().hasHeightForWidth()) self.groupBox_7.setSizePolicy(sizePolicy) self.groupBox_7.setObjectName("groupBox_7") self.layoutWidget2 = QtGui.QWidget(self.groupBox_7) self.layoutWidget2.setGeometry(QtCore.QRect(10, 10, 201, 41)) self.layoutWidget2.setObjectName("layoutWidget2") self.horizontalLayout_2 = QtGui.QHBoxLayout(self.layoutWidget2) self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.radioButton_defaultUnits = QtGui.QRadioButton(self.layoutWidget2) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.radioButton_defaultUnits.sizePolicy().hasHeightForWidth()) self.radioButton_defaultUnits.setSizePolicy(sizePolicy) self.radioButton_defaultUnits.setObjectName("radioButton_defaultUnits") self.horizontalLayout_2.addWidget(self.radioButton_defaultUnits) self.radioButton_englishUnits = QtGui.QRadioButton(self.layoutWidget2) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.radioButton_englishUnits.sizePolicy().hasHeightForWidth()) self.radioButton_englishUnits.setSizePolicy(sizePolicy) self.radioButton_englishUnits.setObjectName("radioButton_englishUnits") self.horizontalLayout_2.addWidget(self.radioButton_englishUnits) spacerItem12 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_2.addItem(spacerItem12) self.verticalLayout_4.addWidget(self.groupBox_7) self.groupBox_6 = QtGui.QGroupBox(ui) self.groupBox_6.setEnabled(True) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.groupBox_6.sizePolicy().hasHeightForWidth()) self.groupBox_6.setSizePolicy(sizePolicy) self.groupBox_6.setObjectName("groupBox_6") self.verticalLayout_5 = QtGui.QVBoxLayout(self.groupBox_6) self.verticalLayout_5.setObjectName("verticalLayout_5") self.radioButton_azimuthAngle = QtGui.QRadioButton(self.groupBox_6) self.radioButton_azimuthAngle.setEnabled(True) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.radioButton_azimuthAngle.sizePolicy().hasHeightForWidth()) self.radioButton_azimuthAngle.setSizePolicy(sizePolicy) self.radioButton_azimuthAngle.setCheckable(True) self.radioButton_azimuthAngle.setChecked(True) self.radioButton_azimuthAngle.setObjectName("radioButton_azimuthAngle") self.verticalLayout_5.addWidget(self.radioButton_azimuthAngle) self.radioButton_bearingAngle = QtGui.QRadioButton(self.groupBox_6) self.radioButton_bearingAngle.setEnabled(True) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.radioButton_bearingAngle.sizePolicy().hasHeightForWidth()) self.radioButton_bearingAngle.setSizePolicy(sizePolicy) self.radioButton_bearingAngle.setChecked(False) self.radioButton_bearingAngle.setObjectName("radioButton_bearingAngle") self.verticalLayout_5.addWidget(self.radioButton_bearingAngle) self.radioButton_polarCoordAngle = QtGui.QRadioButton(self.groupBox_6) self.radioButton_polarCoordAngle.setEnabled(False) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.radioButton_polarCoordAngle.sizePolicy().hasHeightForWidth()) self.radioButton_polarCoordAngle.setSizePolicy(sizePolicy) self.radioButton_polarCoordAngle.setChecked(False) self.radioButton_polarCoordAngle.setObjectName("radioButton_polarCoordAngle") self.verticalLayout_5.addWidget(self.radioButton_polarCoordAngle) self.verticalLayout_4.addWidget(self.groupBox_6) self.horizontalLayout_4.addLayout(self.verticalLayout_4) self.verticalLayout_12.addLayout(self.horizontalLayout_4) self.horizontalLayout_12 = QtGui.QHBoxLayout() self.horizontalLayout_12.setObjectName("horizontalLayout_12") self.verticalLayout_11 = QtGui.QVBoxLayout() self.verticalLayout_11.setObjectName("verticalLayout_11") self.groupBox_8 = QtGui.QGroupBox(ui) self.groupBox_8.setObjectName("groupBox_8") self.verticalLayout_9 = QtGui.QVBoxLayout(self.groupBox_8) self.verticalLayout_9.setObjectName("verticalLayout_9") self.table_segmentList = QtGui.QTableWidget(self.groupBox_8) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.table_segmentList.sizePolicy().hasHeightForWidth()) self.table_segmentList.setSizePolicy(sizePolicy) self.table_segmentList.setObjectName("table_segmentList") self.table_segmentList.setColumnCount(3) self.table_segmentList.setRowCount(0) item = QtGui.QTableWidgetItem() self.table_segmentList.setHorizontalHeaderItem(0, item) item = QtGui.QTableWidgetItem() self.table_segmentList.setHorizontalHeaderItem(1, item) item = QtGui.QTableWidgetItem() self.table_segmentList.setHorizontalHeaderItem(2, item) self.verticalLayout_9.addWidget(self.table_segmentList) self.verticalLayout_11.addWidget(self.groupBox_8) self.horizontalLayout_3 = QtGui.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.pushButton_segListLoad = QtGui.QPushButton(ui) self.pushButton_segListLoad.setEnabled(True) self.pushButton_segListLoad.setObjectName("pushButton_segListLoad") self.horizontalLayout_3.addWidget(self.pushButton_segListLoad) self.pushButton_segListSave = QtGui.QPushButton(ui) self.pushButton_segListSave.setEnabled(True) self.pushButton_segListSave.setObjectName("pushButton_segListSave") self.horizontalLayout_3.addWidget(self.pushButton_segListSave) spacerItem13 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem13) self.pushButton_segListClear = QtGui.QPushButton(ui) self.pushButton_segListClear.setObjectName("pushButton_segListClear") self.horizontalLayout_3.addWidget(self.pushButton_segListClear) self.verticalLayout_11.addLayout(self.horizontalLayout_3) self.horizontalLayout_12.addLayout(self.verticalLayout_11) self.verticalLayout = QtGui.QVBoxLayout() self.verticalLayout.setSizeConstraint(QtGui.QLayout.SetDefaultConstraint) self.verticalLayout.setObjectName("verticalLayout") self.pushButton_segListRowUp = QtGui.QPushButton(ui) self.pushButton_segListRowUp.setEnabled(False) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.pushButton_segListRowUp.sizePolicy().hasHeightForWidth()) self.pushButton_segListRowUp.setSizePolicy(sizePolicy) self.pushButton_segListRowUp.setObjectName("pushButton_segListRowUp") self.verticalLayout.addWidget(self.pushButton_segListRowUp) self.pushButton_segListRowDn = QtGui.QPushButton(ui) self.pushButton_segListRowDn.setEnabled(False) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.pushButton_segListRowDn.sizePolicy().hasHeightForWidth()) self.pushButton_segListRowDn.setSizePolicy(sizePolicy) self.pushButton_segListRowDn.setObjectName("pushButton_segListRowDn") self.verticalLayout.addWidget(self.pushButton_segListRowDn) spacerItem14 = QtGui.QSpacerItem(20, 28, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.verticalLayout.addItem(spacerItem14) self.pushButton_segListRowDel = QtGui.QPushButton(ui) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.pushButton_segListRowDel.sizePolicy().hasHeightForWidth()) self.pushButton_segListRowDel.setSizePolicy(sizePolicy) self.pushButton_segListRowDel.setObjectName("pushButton_segListRowDel") self.verticalLayout.addWidget(self.pushButton_segListRowDel) self.horizontalLayout_12.addLayout(self.verticalLayout) self.verticalLayout_2 = QtGui.QVBoxLayout() self.verticalLayout_2.setObjectName("verticalLayout_2") self.pushButton_objectDraw = QtGui.QPushButton(ui) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.pushButton_objectDraw.sizePolicy().hasHeightForWidth()) self.pushButton_objectDraw.setSizePolicy(sizePolicy) self.pushButton_objectDraw.setObjectName("pushButton_objectDraw") self.verticalLayout_2.addWidget(self.pushButton_objectDraw) spacerItem15 = QtGui.QSpacerItem(28, 78, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.verticalLayout_2.addItem(spacerItem15) self.pushButton_dlgClose = QtGui.QPushButton(ui) self.pushButton_dlgClose.setObjectName("pushButton_dlgClose") self.verticalLayout_2.addWidget(self.pushButton_dlgClose) self.horizontalLayout_12.addLayout(self.verticalLayout_2) self.verticalLayout_12.addLayout(self.horizontalLayout_12) self.label_2.setBuddy(self.lineEdit_vertexX0) self.label_3.setBuddy(self.lineEdit_vertexY0) self.label_4.setBuddy(self.lineEdit_vertexZ0) self.label_8.setBuddy(self.lineEdit_nextAzimuth) self.label_9.setBuddy(self.lineEdit_nextDistance) self.label_10.setBuddy(self.lineEdit_nextVertical)
2503e9f807f1add21e1e4ab81249139c1d70195c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8312/2503e9f807f1add21e1e4ab81249139c1d70195c/Ui_ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13943, 12, 2890, 16, 5915, 4672, 5915, 18, 542, 16707, 2932, 4881, 7923, 5915, 18, 15169, 12, 26, 2947, 16, 1666, 6418, 13, 365, 18, 17824, 3744, 67, 2138, 273, 23425, 18, 53, 58...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13943, 12, 2890, 16, 5915, 4672, 5915, 18, 542, 16707, 2932, 4881, 7923, 5915, 18, 15169, 12, 26, 2947, 16, 1666, 6418, 13, 365, 18, 17824, 3744, 67, 2138, 273, 23425, 18, 53, 58...
style = self.sectLabels[index].get_style().copy() style.fg[STATE_NORMAL] = self.sectLabels[index].get_colormap().alloc(65535, 0, 0) self.sectLabels[index].set_style(style)
self.sectLabels[index].modify_fg ( gtk.STATE_NORMAL, self.sectLabels[index].get_colormap().alloc(65535, 0, 0))
def validate (self): """ Validate the configuration.
ec17e2ee5c945ddc11ff8bcc0cdc586ae535e76d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4580/ec17e2ee5c945ddc11ff8bcc0cdc586ae535e76d/driconf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 261, 2890, 4672, 3536, 3554, 326, 1664, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 261, 2890, 4672, 3536, 3554, 326, 1664, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.ci.HandleCommand("help", res, False)
self.ci.HandleCommand("help", res) self.assertTrue(res.Succeeded()) self.assertTrue(res.GetOutput().startswith( 'The following is a list of built-in, permanent debugger commands')) def test_help_should_not_hang_emacsshell(self): """'set term-width 0' should not hang the help command.""" res = lldb.SBCommandReturnObject() self.ci.HandleCommand("set term-width 0", res) self.assertTrue(res.Succeeded()) self.ci.HandleCommand("help", res)
def test_simplehelp(self): """A simple test of 'help' command and its output.""" res = lldb.SBCommandReturnObject() self.ci.HandleCommand("help", res, False) self.assertTrue(res.Succeeded()) self.assertTrue(res.GetOutput().startswith( 'The following is a list of built-in, permanent debugger commands')) #print res.GetOutput()
47474db26d2f0a86eebb721ed98cbca63c1a71bf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11986/47474db26d2f0a86eebb721ed98cbca63c1a71bf/TestHelp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9647, 5201, 12, 2890, 4672, 3536, 37, 4143, 1842, 434, 296, 5201, 11, 1296, 471, 2097, 876, 12123, 400, 273, 328, 1236, 70, 18, 14541, 2189, 990, 921, 1435, 365, 18, 8450, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9647, 5201, 12, 2890, 4672, 3536, 37, 4143, 1842, 434, 296, 5201, 11, 1296, 471, 2097, 876, 12123, 400, 273, 328, 1236, 70, 18, 14541, 2189, 990, 921, 1435, 365, 18, 8450, 18...
tindex.append([oid, serial, r, None, p])
if dest: new_vdata = dest, vdata[1] else: new_vdata = None tindex.append([oid, serial, r, new_vdata, p])
def commitVersion(self, src, dest, transaction): if transaction is not self._transaction: raise POSException.StorageTransactionError(self, transaction) self._lock_acquire() try: v=self._vindex.get(src, None) if v is None: return tindex=self._tindex oids=[] for r in v.values(): oid, serial, pre, vdata, p = r oids.append(oid) tindex.append([oid, serial, r, None, p])
5f48194f0adf628155c6138a3fcde59d9ea65eb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/5f48194f0adf628155c6138a3fcde59d9ea65eb6/DemoStorage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3294, 1444, 12, 2890, 16, 1705, 16, 1570, 16, 2492, 4672, 309, 2492, 353, 486, 365, 6315, 7958, 30, 1002, 12511, 503, 18, 3245, 3342, 668, 12, 2890, 16, 2492, 13, 225, 365, 6315, 739, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3294, 1444, 12, 2890, 16, 1705, 16, 1570, 16, 2492, 4672, 309, 2492, 353, 486, 365, 6315, 7958, 30, 1002, 12511, 503, 18, 3245, 3342, 668, 12, 2890, 16, 2492, 13, 225, 365, 6315, 739, ...
res = os.path.abspath(os.path.expanduser(value)) if not os.path.exists(res): raise optparse.OptionValueError("option %s: no such directory: %r" % (opt, value)) setattr(parser.values, option.dest, res)
""" Check the cmdline addons paths. Unlike the code in addons/__init__.py, where addons paths may be missing, command-line suplied paths must all be valid directories. """ paths = [] for res in map(str.strip, value.split(',')): res = os.path.abspath(os.path.expanduser(res)) if not os.path.isdir(res): raise optparse.OptionValueError("option %s: no such directory: %r" % (opt, res)) paths.append(res) setattr(parser.values, option.dest, ','.join(paths))
def _check_addons_path(self, option, opt, value, parser): res = os.path.abspath(os.path.expanduser(value)) if not os.path.exists(res): raise optparse.OptionValueError("option %s: no such directory: %r" % (opt, value)) setattr(parser.values, option.dest, res)
9c52a1bdf8eb7af2aca740d22864632718ec8f37 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/9c52a1bdf8eb7af2aca740d22864632718ec8f37/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 1289, 7008, 67, 803, 12, 2890, 16, 1456, 16, 2153, 16, 460, 16, 2082, 4672, 400, 273, 1140, 18, 803, 18, 5113, 803, 12, 538, 18, 803, 18, 12320, 1355, 12, 1132, 3719, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 1289, 7008, 67, 803, 12, 2890, 16, 1456, 16, 2153, 16, 460, 16, 2082, 4672, 400, 273, 1140, 18, 803, 18, 5113, 803, 12, 538, 18, 803, 18, 12320, 1355, 12, 1132, 3719, ...
print "after sub:", result print "after while:", result
def next_between(start, end): interval = ord(end) - ord(start) + 1 offset = extras.next() % interval return chr(ord(start) + offset)
8276b7c78ab7708ce793fe6345673e4bd8e91c3b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8620/8276b7c78ab7708ce793fe6345673e4bd8e91c3b/pwdhash.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 67, 15019, 12, 1937, 16, 679, 4672, 3673, 273, 4642, 12, 409, 13, 300, 4642, 12, 1937, 13, 397, 404, 1384, 273, 11875, 18, 4285, 1435, 738, 3673, 327, 4513, 12, 517, 12, 1937, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1024, 67, 15019, 12, 1937, 16, 679, 4672, 3673, 273, 4642, 12, 409, 13, 300, 4642, 12, 1937, 13, 397, 404, 1384, 273, 11875, 18, 4285, 1435, 738, 3673, 327, 4513, 12, 517, 12, 1937, ...
LHS_exact.Random(); Matrix.Multiply(False, LHS_exact, RHS); LHS.PutScalar(1.0);
LHS_exact.Random() Matrix.Multiply(False, LHS_exact, RHS) LHS.PutScalar(1.0)
def main(): Comm = Epetra.PyComm(); args = sys.argv[1:] if len(args) == 0: Type = "Amesos_Lapack" else: Type = args[0]; NumGlobalRows = 10; Map = Epetra.Map(NumGlobalRows, 0, Comm); LHS_exact = Epetra.MultiVector(Map, 1); LHS = Epetra.MultiVector(Map, 1); RHS = Epetra.MultiVector(Map, 1); Matrix = Epetra.CrsMatrix(Epetra.Copy, Map, 0); Indices = Epetra.IntSerialDenseVector(3); Values = Epetra.SerialDenseVector(3); Values[0] = 2.0; Values[1] = -1.0; Values[2] = -1.0; NumLocalRows = Map.NumMyElements() # Builds the matrix (1D Laplacian) for ii in range(0, NumLocalRows): i = Map.GID(ii) Indices[0] = i; if i == 0: NumEntries = 2; Indices[1] = i + 1; elif i == NumGlobalRows - 1: NumEntries = 2; Indices[1] = i - 1; else: NumEntries = 3; Indices[1] = i - 1; Indices[2] = i + 1; Matrix.InsertGlobalValues(i, NumEntries, Values, Indices); ierr = Matrix.FillComplete(); LHS_exact.Random(); Matrix.Multiply(False, LHS_exact, RHS); LHS.PutScalar(1.0); Problem = Epetra.LinearProblem(Matrix, LHS, RHS); if Type == "Amesos_Lapack": Solver = Amesos.Lapack(Problem); elif Type == "Amesos_Klu": Solver = Amesos.Klu(Problem); elif Type == "Amesos_Umfpack": Solver = Amesos.Umfpack(Problem); elif Type == "Amesos_Pardiso": Solver = Amesos.Umfpack(Problem); elif Type == "Amesos_Taucs": Solver = Amesos.Umfpack(Problem); elif Type == "Amesos_Superlu": Solver = Amesos.Superlu(Problem); elif Type == "Amesos_Superludist": Solver = Amesos.Superludist(Problem); elif Type == "Amesos_Dscpack": Solver = Amesos.Dscpack(Problem); elif Type == "Amesos_Mumps": Solver = Amesos.Mumps(Problem); else: print 'Selected solver (%s) not available' % Type PrintHelp(); sys.exit(-2); AmesosList = { "PrintStatus": True, "PrintTiming": True }; Solver.SetParameters(AmesosList); Solver.SymbolicFactorization(); Solver.NumericFactorization(); ierr = Solver.Solve(); print "Solver.Solve() return code = ", ierr del Solver
b0de99b594baede77af9aff7c1b994a5d198a226 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1130/b0de99b594baede77af9aff7c1b994a5d198a226/exSolvers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 16854, 273, 512, 6951, 354, 18, 9413, 12136, 5621, 225, 833, 273, 2589, 18, 19485, 63, 21, 26894, 309, 562, 12, 1968, 13, 422, 374, 30, 1412, 273, 315, 9864, 281, 538, 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, 2774, 13332, 16854, 273, 512, 6951, 354, 18, 9413, 12136, 5621, 225, 833, 273, 2589, 18, 19485, 63, 21, 26894, 309, 562, 12, 1968, 13, 422, 374, 30, 1412, 273, 315, 9864, 281, 538, 67,...
print 'before', self.maxT
def extractPointSetFromCurveCollection(self): # Use curve to compute new point set # Record maxT print 'before', self.maxT self.maxT = self.curveCollection.getMaxT() print 'after', self.maxT # Determine num samples # Limit point set to 1000 points and samples per second to 30 samplesPerSegment = min(30.0, 1000.0/self.curveCollection.getMaxT()) self.setNumSamples(self.maxT * samplesPerSegment) # Sample the curve but don't create a new curve collection self.sampleCurve(fCompute = 0) # Update widgets based on new data self.updateWidgets()
f9d35e3e417aec51b0fb2c95e2f5cf87cc739835 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/f9d35e3e417aec51b0fb2c95e2f5cf87cc739835/MopathRecorder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 2148, 694, 1265, 9423, 2532, 12, 2890, 4672, 468, 2672, 8882, 358, 3671, 394, 1634, 444, 468, 5059, 943, 56, 365, 18, 1896, 56, 273, 365, 18, 16683, 2532, 18, 588, 2747, 56, 1435...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 2148, 694, 1265, 9423, 2532, 12, 2890, 4672, 468, 2672, 8882, 358, 3671, 394, 1634, 444, 468, 5059, 943, 56, 365, 18, 1896, 56, 273, 365, 18, 16683, 2532, 18, 588, 2747, 56, 1435...
elif self.bot_rex.search(r['user']) or self.bot_rex.search(r.get('comment', '')):
elif not user: continue elif self.bot_rex.search(user) or self.bot_rex.search(r.get('comment', '')):
def filter_reverts(revs): # Start with oldest edit: # (note that we can *not* just pass rvdir=newer to API, because if we # have a given article revision, we have to get revisions older than # that) revs.reverse() # remove revs w/o size (happens with move) revs = [r for r in revs if "size" in r] for i, r in enumerate(revs): if "reverted" in r or i==0: continue last_size = revs[i-1]['size'] for j in range(i+1,min(len(revs)-1, i+REVERT_LOOKBACK+1)): if revs[j]['size'] == last_size and str(r['revid']) in revs[j].get('comment',''): for jj in range(i,j+1): # skip the reverted, all in between, and the reverting edit revs[jj]['reverted'] = True break #print "reverted", [r for r in revs if "reverted" in r] return [r for r in revs if not "reverted" in r]
0543f1da276b08b4a0cb10cb856ff323afdb9012 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12391/0543f1da276b08b4a0cb10cb856ff323afdb9012/mwapidb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1034, 67, 266, 31537, 12, 266, 6904, 4672, 468, 3603, 598, 17067, 3874, 30, 468, 261, 7652, 716, 732, 848, 380, 902, 14, 2537, 1342, 5633, 1214, 33, 2704, 264, 358, 1491, 16, 2724, 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, 1034, 67, 266, 31537, 12, 266, 6904, 4672, 468, 3603, 598, 17067, 3874, 30, 468, 261, 7652, 716, 732, 848, 380, 902, 14, 2537, 1342, 5633, 1214, 33, 2704, 264, 358, 1491, 16, 2724, 309...
xml_url = videos[0]
xml_url = videos.popitem()[1]
def get_rtmp_url(url_page, quality='hd', lang='fr'): '''get the real url of the video''' # inspired by the get_rtmp_url from arte7recorder project # get the web page try: soup = BeautifulSoup(urlopen(url_page).read()) object_tag = soup.find('object', classid=CLSID) # get the player_url straight from it player_url = unquote(object_tag.find('embed')['src']) # now we need a few jumps to get to the correct url movie_url = object_tag.find('param', {'name':'movie'}) # first xml file xml_url = unquote(movie_url['value'].split('videorefFileUrl=')[-1]) soup = BeautifulStoneSoup(urlopen(xml_url).read()) # second xml file videos_list = soup.findAll('video') videos = {} for v in videos_list: videos[v['lang']] = v['ref'] if lang not in videos: print >> stderr, 'The video in not available in the language %s. using the default one' % lang if DEFAULT_LANG in videos: xml_url = videos[DEFAULT_LANG] else: xml_url = videos[0] else: xml_url = videos[lang] soup = BeautifulStoneSoup(urlopen(xml_url).read()) # at last the video url video_url = soup.urls.find('url', {'quality': quality}).string return (video_url, player_url) except URLError: die('Invalid URL')
ed23d3c904f57d989a42263b1baae3ea7cc99aa4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11589/ed23d3c904f57d989a42263b1baae3ea7cc99aa4/arte+7.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3797, 1291, 67, 718, 12, 718, 67, 2433, 16, 9312, 2218, 22057, 2187, 3303, 2218, 4840, 11, 4672, 9163, 588, 326, 2863, 880, 434, 326, 6191, 26418, 468, 316, 1752, 2921, 635, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3797, 1291, 67, 718, 12, 718, 67, 2433, 16, 9312, 2218, 22057, 2187, 3303, 2218, 4840, 11, 4672, 9163, 588, 326, 2863, 880, 434, 326, 6191, 26418, 468, 316, 1752, 2921, 635, 3...
Image.open(StringIO(data))
a = Image.open(StringIO(data)) a.load()
def is_valid_image(data): import Image from cStringIO import StringIO try: Image.open(StringIO(data)) except IOError: return False return True
a8c9d04789ea21977ba644abde6603d16aa332f7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3913/a8c9d04789ea21977ba644abde6603d16aa332f7/code.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 877, 67, 2730, 12, 892, 4672, 1930, 3421, 628, 276, 780, 4294, 1930, 15777, 775, 30, 279, 273, 3421, 18, 3190, 12, 780, 4294, 12, 892, 3719, 279, 18, 945, 1435, 1335, 8340, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 877, 67, 2730, 12, 892, 4672, 1930, 3421, 628, 276, 780, 4294, 1930, 15777, 775, 30, 279, 273, 3421, 18, 3190, 12, 780, 4294, 12, 892, 3719, 279, 18, 945, 1435, 1335, 8340, ...
Николай Рерих
Николай Рерих
def test(): # TODO Test exceptions from StringIO import StringIO src = u""" В этом нет ничего нового, Ибо вообще ничего нового нет. Николай Рерих ÀùúûüýþÿĀāĂ㥹ĆćĈĉ $¢£¤¥₣₤₧₪₫€ """ u0 = src.encode("UTF-8") u1 = "" for c in src: u1 += "".join(symbolToUTF8(ord(c))) assert u1.decode("UTF-8") == src s = [] k = 0 s_read = StringIO(u1) while True: repr = readSymbol(s_read.read) if repr == None: break s.append(unichr(repr)) s = u"".join(s) assert s == src
acb5ededfe9b8d45e810e97dc5eb59a404072a12 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3153/acb5ededfe9b8d45e810e97dc5eb59a404072a12/UTF8.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 13332, 468, 2660, 7766, 4798, 225, 628, 15777, 1930, 15777, 1705, 273, 582, 8395, 225, 145, 245, 225, 146, 240, 146, 229, 145, 127, 145, 125, 225, 145, 126, 145, 118, 146, 229, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 13332, 468, 2660, 7766, 4798, 225, 628, 15777, 1930, 15777, 1705, 273, 582, 8395, 225, 145, 245, 225, 146, 240, 146, 229, 145, 127, 145, 125, 225, 145, 126, 145, 118, 146, 229, 2...
if not installDir: installDir = DEFAULT_INSTALLDIR
def __init__(self, flavorOrder=None, downloadDir=None, buildDir=None, installDir=None, pimpDatabase=None): if not flavorOrder: flavorOrder = DEFAULT_FLAVORORDER if not downloadDir: downloadDir = DEFAULT_DOWNLOADDIR if not buildDir: buildDir = DEFAULT_BUILDDIR if not installDir: installDir = DEFAULT_INSTALLDIR if not pimpDatabase: pimpDatabase = DEFAULT_PIMPDATABASE self.flavorOrder = flavorOrder self.downloadDir = downloadDir self.buildDir = buildDir self.installDir = installDir self.pimpDatabase = pimpDatabase
febcb863ca7d0946923a410edd2f9082b0ce60b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/febcb863ca7d0946923a410edd2f9082b0ce60b8/pimp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 19496, 2448, 33, 7036, 16, 4224, 1621, 33, 7036, 16, 1361, 1621, 33, 7036, 16, 3799, 1621, 33, 7036, 16, 293, 14532, 4254, 33, 7036, 4672, 309, 486, 1949...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19496, 2448, 33, 7036, 16, 4224, 1621, 33, 7036, 16, 1361, 1621, 33, 7036, 16, 3799, 1621, 33, 7036, 16, 293, 14532, 4254, 33, 7036, 4672, 309, 486, 1949...